diff --git a/.github/workflows/exakat.yml b/.github/workflows/exakat.yml new file mode 100644 index 00000000000..861f6ccd4b0 --- /dev/null +++ b/.github/workflows/exakat.yml @@ -0,0 +1,17 @@ +# See syntax file on https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions +name: "Exakat analysis" + +on: + schedule: + - cron: "0 20 * * *" + +jobs: + exakat: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Exakat + uses: docker://exakat/exakat-ga + with: + ignore_rules: 'Classes/UseInstanceof,Performances/PrePostIncrement,Functions/WrongNumberOfArguments,Variables/UndefinedVariable,Classes/DontUnsetProperties,Classes/NonPpp,Classes/StaticMethodsCalledFromObject,Classes/UseClassOperator,Functions/UsesDefaultArguments,Php/NoClassInGlobal,Php/ShouldUseCoalesce,Structures/MergeIfThen,Structures/ElseIfElseif,Structures/RepeatedPrint,Structures/UselessParenthesis,Structures/SwitchWithoutDefault,Structures/ShouldMakeTernary,Structures/UseConstant' + ignore_dirs: '/htdocs/includes,/htdocs/build,/htdocs/dev,/htdocs/doc,/htdocs/scripts,/htdocs/test' \ No newline at end of file diff --git a/.github/workflows/stale-issues-safe.yml b/.github/workflows/stale-issues-safe.yml index ed37c9aadc2..844b19c7a3f 100644 --- a/.github/workflows/stale-issues-safe.yml +++ b/.github/workflows/stale-issues-safe.yml @@ -14,11 +14,11 @@ jobs: - uses: Dolibarr/stale@staleunstale with: repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 15 days (you should still be able to re-open it if required).' + stale-message: 'This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).' stale-label: 'Issue Stale (automatic label)' exempt-labels: 'Priority High / Blocking,Priority Top Strategic,Priority Medium,Hacktoberfest,good first issue,Bug Security (CVE),Analysis of PR in progres' days-before-stale: 365 - days-before-close: 15 + days-before-close: 10 operations-per-run: 100 dry-run: false \ No newline at end of file diff --git a/.gitignore b/.gitignore index 30151359365..b49fdf8dc86 100644 --- a/.gitignore +++ b/.gitignore @@ -36,8 +36,21 @@ htdocs/includes/jakub-onderka/ htdocs/includes/phpdocumentor/ htdocs/includes/phpspec/ htdocs/includes/phpunit/ +htdocs/includes/php-parallel-lint/ htdocs/includes/sebastian/ htdocs/includes/squizlabs/ -htdocs/includes/symfony/ htdocs/includes/webmozart/ htdocs/.well-known/apple-developer-merchantid-domain-association + +# Node Modules +build/yarn-error.log +build/node_modules/ +node_modules/ + +#yarn +yarn.lock + +#package-lock +package-lock.json + +doc/install.lock diff --git a/.travis.yml b/.travis.yml index 688d706331d..16d3403f554 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,9 @@ # We use dist: xenial to have php 5.6+ available os: linux dist: xenial -sudo: required +#dist: bionic +# Deprecated: The key sudo has no effect anymore. +#sudo: required language: php @@ -118,24 +120,18 @@ install: echo - | - echo "Installing Composer dependencies (PHP Unit, Parallel Lint & PHP CodeSniffer" - if [ "$TRAVIS_PHP_VERSION" = '5.4' ] || [ "$TRAVIS_PHP_VERSION" = '5.5' ]; then - composer -n require phpunit/phpunit ^4 \ - jakub-onderka/php-parallel-lint ^0 \ - jakub-onderka/php-console-highlighter ^0 \ - squizlabs/php_codesniffer ^3 - fi + echo "Installing Composer dependencies - PHP Unit, Parallel Lint, PHP CodeSniffer - for $TRAVIS_PHP_VERSION" if [ "$TRAVIS_PHP_VERSION" = '5.6' ] || [ "$TRAVIS_PHP_VERSION" = '7.0' ] || [ "$TRAVIS_PHP_VERSION" = '7.1' ] \ [ "$TRAVIS_PHP_VERSION" = '7.2' ] || [ "$TRAVIS_PHP_VERSION" = '7.3' ] || [ "$TRAVIS_PHP_VERSION" = '7.4' ]; then composer -n require phpunit/phpunit ^5 \ - jakub-onderka/php-parallel-lint ^0 \ - jakub-onderka/php-console-highlighter ^0 \ + php-parallel-lint/php-parallel-lint ^0 \ + php-parallel-lint/php-console-highlighter ^0 \ squizlabs/php_codesniffer ^3 fi if [ "$TRAVIS_PHP_VERSION" = 'nightly' ]; then composer -n require --ignore-platform-reqs phpunit/phpunit ^5 \ - jakub-onderka/php-parallel-lint ^0 \ - jakub-onderka/php-console-highlighter ^0 \ + php-parallel-lint/php-parallel-lint ^1 \ + php-parallel-lint/php-console-highlighter ^0 \ squizlabs/php_codesniffer ^3 fi echo @@ -282,7 +278,11 @@ script: # Ensure we catch errors set -e #parallel-lint --exclude htdocs/includes --blame . - parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/myclabs --exclude htdocs/includes/webmozart --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes --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 --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/composer/autoload_static.php --blame . + parallel-lint --exclude dev/namespacemig --exclude htdocs/includes/composer --exclude htdocs/includes/myclabs --exclude htdocs/includes/phpspec --exclude dev/initdata/dbf/includes \ + --exclude htdocs/includes/sabre --exclude htdocs/includes/phpoffice/phpexcel --exclude htdocs/includes/phpoffice/PhpSpreadsheet --exclude htdocs/includes/sebastian \ + --exclude htdocs/includes/squizlabs/php_codesniffer --exclude htdocs/includes/jakub-onderka --exclude htdocs/includes/php-parallel-lint --exclude htdocs/includes/symfony \ + --exclude htdocs/includes/mike42/escpos-php/example --exclude htdocs/includes/maximebf \ + --exclude htdocs/includes/phpunit/ --exclude htdocs/includes/tecnickcom/tcpdf/include/barcodes --exclude htdocs/includes/webmozart --blame . set +e echo @@ -291,7 +291,7 @@ script: # Ensure we catch errors set -e # Exclusions are defined in the ruleset.xml file - #phpcs -s -n -p -d memory_limit=-1 --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 . + #phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true . if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then phpcs -s -p -d memory_limit=-1 --extensions=php --colors --tab-width=4 --standard=dev/setup/codesniffer/ruleset.xml --encoding=utf-8 --runtime-set ignore_warnings_on_exit true .; fi set +e echo @@ -404,6 +404,10 @@ script: php upgrade.php 11.0.0 12.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade11001200.log php upgrade2.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-2.log php step5.php 11.0.0 12.0.0 > $TRAVIS_BUILD_DIR/upgrade11001200-3.log + php upgrade.php 12.0.0 13.0.0 ignoredbversion > $TRAVIS_BUILD_DIR/upgrade12001300.log + php upgrade2.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-2.log + php step5.php 12.0.0 13.0.0 > $TRAVIS_BUILD_DIR/upgrade12001300-3.log + # Enable modules not enabled into original dump php upgrade2.php 0.0.0 0.0.0 MAIN_MODULE_API,MAIN_MODULE_SUPPLIERPROPOSAL,MAIN_MODULE_WEBSITE,MAIN_MODULE_TICKETSUP,MAIN_MODULE_ACCOUNTING > $TRAVIS_BUILD_DIR/enablemodule.log echo $? diff --git a/.tx/config b/.tx/config index 5c52849c29c..696ff858394 100644 --- a/.tx/config +++ b/.tx/config @@ -326,6 +326,12 @@ source_file = htdocs/langs/en_US/receptions.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.recruitment] +file_filter = htdocs/langs//recruitment.lang +source_file = htdocs/langs/en_US/recruitment.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.resource] file_filter = htdocs/langs//resource.lang source_file = htdocs/langs/en_US/resource.lang diff --git a/COPYRIGHT b/COPYRIGHT index 2964c915ec1..d8cefedcd65 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -21,7 +21,7 @@ Mobiledetect 2.8.34 MIT License Yes NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency ParseDown 1.6 MIT License Yes Markdown parser -PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers +PHPDebugBar 1.15.1 MIT License Yes Used only by the module "debugbar" for developers PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP @@ -39,7 +39,7 @@ TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes JS libraries: Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea. ChartJS 2.9.3 MIT License Yes JS library for graph -jQuery 3.4.1 MIT License Yes JS library +jQuery 3.5.1 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css jQuery blockUI 2.70.0 GPL and MIT License Yes JS library plugin blockUI (to use ajax popups) diff --git a/ChangeLog b/ChangeLog index e7abb3f7cd6..60aa376f96d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,31 @@ English Dolibarr ChangeLog -------------------------------------------------------------- + +***** ChangeLog for 13.0.0 compared to 12.0.0 ***** +For users: +NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files. +NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable. + + +WARNING: + +Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* Properties ->contactid have been renamed into ->contact_id +* Properties ->titre have been renamed into ->title +* Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id (english) +* The deprecated subsitution key __SIGNATURE__ has been removed. Replace with __USER_SIGNATURE__ if you used the old syntax in + your email templates. +* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom + days of holiday. +* Property 'num_paiement' has been renamed 'num_payment' everywhere for better code consistency. +* If you build a class that implement CommonObject to use the incoterm properties or methods (->fk_incoterm, ->label_incoterm, ->location_incoterm), + you must now also include declaration of the Trait 'CommonIncoterm' in your class. All incoterm functions were moved into this Trait. +* The GETPOST(..., 'alpha') has now the same behaviour than GETPOST(..., 'alphanohtml') so no html will be allowed. Use GETPOST(..., 'restricthtml') to accept HTML. +* If you have links in your code with '&action=delete' as a parameter, you must also add '&token='.newToken() as another parameter to avoid CSRF protection errors. +* The API addPayment for api_invoice has evolved to accept amount into a foreign currency. You must provide array(amount=>X,mutlicurrency_ammount=>Y) instead of amount. +* The method select_thirdparty(), deprecated since 3.8, into html.form.class.php has been removed. + ***** ChangeLog for 12.0.3 compared to 12.0.2 ***** FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename FIX: 11.0 - expenses lines overlapping the total amounts frame @@ -373,14 +398,14 @@ Following changes may create regressions for some external modules, but were nec WARNING FOR DOLIWAMP USERS ONLY: -Only people that installed Dolibarr using the all-in-one autoinstaller for Windows called "DoliWAMP" are concerned by the following warnings: +Only people that installed Dolibarr using the all-in-one auto-installer for Windows called "DoliWAMP" are concerned by the following warnings: -* DoliWAMP autoinstaller for Windows is not more available on 32bits systems. Use standard package if you need to use such architecture. -* It is not possible to migrate from an installation done with the old DoliWAMP autoinstaller for Windows by using this new one. You must make a backup - of your database, make a fresh installation using the new installer and reload. -* Don't forget that DoliWAMP is a good solution to make a quick test of Dolibarr on your local computer but was never recommanded as a production - solution on a local desktop since a desktop computer has not a backup and security policy as good as on a server (when there is one). - DoliWAMP remains a solution for fast test or demo purposes. +* DoliWAMP auto-installer for Windows is no more available on 32 bits systems. Use standard package if you need to use such architecture. +* It is not possible to migrate from an installation done with the old DoliWAMP auto-installer for Windows by using this new one. + You must make a backup of your database, make a fresh installation using the new installer and reload your backup. + Don't forget that DoliWAMP is a good solution to make a quick test of Dolibarr on your local computer but is not recommended as a production + solution on a local desktop since a local desktop computer has often no backup and security policy, or not as good as on a server (when there is one). + DoliWAMP remains a solution for fast test or demo purposes. Prefer using standard packages for production. ***** ChangeLog for 11.0.5 compared to 11.0.4 ***** diff --git a/README.md b/README.md index fa5326079ec..648d5ef003d 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,15 @@ ![Downloads per day](https://img.shields.io/sourceforge/dw/dolibarr.svg) ![Build status](https://img.shields.io/travis/Dolibarr/dolibarr/develop.svg) -Dolibarr ERP & CRM is a modern software package to manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…). +Dolibarr ERP & CRM is a modern software package that helps manage your organization's activity (contacts, suppliers, invoices, orders, stocks, agenda…). -It's an Open Source Software (written in PHP language) designed for small, medium or large companies, foundations and freelancers. +It's an Open Source Software suite (written in PHP with optional JavaScript enhancements) designed for small, medium or large companies, foundations and freelancers. -You can freely use, study, modify or distribute it according to its Free Software licence. +You can freely use, study, modify or distribute it according to its licence. -You can use it as a standalone application or as a web application to be able to access it from the Internet or a LAN. +You can use it as a standalone application or as a web application to access it from the Internet or a LAN. + +Dolibarr has a large community ready to help you, free forums and [oficially preferred partners ready to offer commercial support should you need it](https://partners.dolibarr.org) ![ScreenShot](https://www.dolibarr.org/images/dolibarr_screenshot1_1920x1080.jpg) @@ -27,19 +29,23 @@ Other licenses apply for some included dependencies. See [COPYRIGHT](https://git If you have low technical skills and you're looking to install Dolibarr ERP/CRM in just a few clicks, you can use one of the packaged versions: -- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_(DoliWamp) -- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian +- [DoliWamp for Windows](https://wiki.dolibarr.org/index.php/Dolibarr_for_Windows_DoliWamp) +- [DoliDeb for Debian](https://wiki.dolibarr.org/index.php/Dolibarr_for_Ubuntu_or_Debian) - DoliRpm for Redhat, Fedora, OpenSuse, Mandriva or Mageia Releases can be downloaded from [official website](https://www.dolibarr.org/). ### Advanced setup -You can use a Web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version. +You can use a web server and a supported database (MariaDB, MySQL or PostgreSQL) to install the standard version. + +On GNU/Linux, first check if your distribution has already packaged Dolibarr. + +#### Generic install steps: - Check that your installed PHP version is supported [see PHP support](https://wiki.dolibarr.org/index.php/Versions). -- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you known git): +- Uncompress the downloaded .zip archive to copy the "dolibarr/htdocs" directory and all its files inside your web server root or get the files directly from GitHub (recommanded if you know git as it makes it easier if you want to upgrade later): `git clone https://github.com/dolibarr/dolibarr -b x.y` (where x.y is main version like 3.6, 9.0, ...) @@ -70,13 +76,13 @@ If you don't have time to install it yourself, you can try some commercial 'read ## UPGRADING -- At first make a backup of your Dolibarr files & than see https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr +Dolibarr supports upgrading usually wihtout the need for any (commercial) support (depending on if you use any commercial extensions) and supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate! + +- At first make a backup of your Dolibarr files & than [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr) - Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md). - Overwrite all old files from 'dolibarr' directory with files provided into the new version's package. -- At first next access, Dolibarr will redirect your to the "install/" page to follow the upgrade process. -  If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file into the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*"). - -*Note: migration process can be safely done multiple times by calling the `/install/index.php` page* +- At first next access, Dolibarr will redirect you to the "install/" page to follow the upgrade process. +  If an `install.lock` file exists to lock any other upgrade process, the application will ask you to remove the file manually (you should find the `install.lock` file in the directory used to store generated and uploaded documents, in most cases, it is the directory called "*documents*"). ## WHAT'S NEW @@ -139,7 +145,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Highly customizable: enable only the modules you need, add user personalized fields, choose your skin, several menu managers (can be used by internal users as a back-office with a particular menu, or by external users as a front-office with another one) - APIs -- An easy to understand, maintain and develop code (PHP with no heavy framework; trigger and hook architecture) +- Code that is easy to understand, maintain and develop (PHP with no heavy framework; trigger and hook architecture) - Support a lot of country specific features: - Spanish Tax RE and ISPF - French NPR VAT rate (VAT called "Non Perçue Récupérable" for DOM-TOM) @@ -149,7 +155,7 @@ See the [ChangeLog](https://github.com/Dolibarr/dolibarr/blob/develop/ChangeLog) - Compatible with [European directives](http://europa.eu/legislation_summaries/taxation/l31057_en.htm) (2006/112/CE ... 2010/45/UE) - Compatible with European GDPR rules - ... -- PDF or ODT generation for invoice, proposals, orders... +- Flexible PDF & ODT generation for invoices, proposals, orders... - … ### System Environment / Requirements @@ -167,12 +173,12 @@ These are features that Dolibarr does **not** yet fully support: - Tasks dependencies in projects - Payroll module -- No native embedded Webmail +- No native embedded Webmail, but you can send email to contacts in Dolibarr with e.g. offers, invoices, etc. - Dolibarr can't do coffee (yet) ## DOCUMENTATION -Administrator, user, developer and translator's documentations are available along with other community resources on the [Wiki](https://wiki.dolibarr.org). +Administrator, user, developer and translator's documentations are available along with other community resources in the [Wiki](https://wiki.dolibarr.org). ## CONTRIBUTING @@ -182,7 +188,7 @@ This project exists thanks to all the people who contribute. [[Contribute](https ## CREDITS -Dolibarr is the work of many contributors over the years and uses some fine libraries. +Dolibarr is the work of many contributors over the years and uses some fine PHP libraries. See [COPYRIGHT](https://github.com/Dolibarr/dolibarr/blob/develop/COPYRIGHT) file. diff --git a/SECURITY.md b/SECURITY.md index e5493805733..56e1da679ed 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,13 +1,115 @@ # Security Policy -## Supported Versions +This file contains some policies about the security reports on Dolibarr ERP CRM project, one of the most popular Open Source ERP and CRM in the world. + +## Supported Versions for security reports + +| Version | Supported | +| --------- | ------------------ | +| <= 9.0.* | :x: | +| >= 10.0.* | :white_check_mark: | -| Version | Supported | -| -------- | ------------------ | -| <= 8.0.* | :x: | -| >= 9.0.* | :white_check_mark: | ## Reporting a Vulnerability To report a vulnerability, please send an email to security@dolibarr.org In most cases, after fixing the security, we make an answer by email to say the issue has been fixed. + + +## Hunting vulnerabilities on Dolibarr + +We believe that future of software is online SaaS. This means software are more and more critical and no technology is perfect. Working with skilled security researchers is crucial in identifying weaknesses in our technology. + +If you believe you've found a security bug in our service, we are happy to work with you to resolve the issue promptly and ensure you are fairly rewarded for your discovery. + +Any type of denial of service attacks is strictly forbidden, as well as any interference with network equipment and Dolibarr infrastructure. + +We recommand to install Dolibarr ERP CRM on you own server (as most Open Source software, download and use is free: https://www.dolibarr.org/download) to get access on every side of application. + +### User Agent + +If you try to find bug on Dolibarr, we recommend to append to your user-agent header the following value: '-BugHunting-dolibarr'. + +### Account access + +You can install the web application yourself on your own platform/server so you get full access to application and sources. Download the zip of the files to put into your own web server virtual host from https://www.dolibarr.org/download + + +## Eligibility and Responsible Disclosure + +We are happy to thank everyone who submits valid reports which help us improve the security of Dolibarr however, only those that meet the following eligibility requirements may receive a monetary reward: + +You must be the first reporter of a vulnerability. + +The vulnerability must be a qualifying vulnerability (see below) + +Any vulnerability found must be reported no later than 24 hours after discovery + +You must send a clear textual description of the report along with steps to reproduce the issue, include attachments such as screenshots or proof of concept code as necessary. + +You must avoid tests that could cause degradation or interruption of our service (refrain from using automated tools, and limit yourself about requests per second), that's why we recommand to install softwate on your own platform. + +You must not leak, manipulate, or destroy any user data. + +You must not be a former or current employee of Dolibarr or one of its contractor. + +Reports about vulnerabilities are examined by our security analysts. + +Our analysis is always based on worst case exploitation of the vulnerability, as is the reward we pay. + +No vulnerability disclosure, including partial is allowed for the moment. + + +## Scope for qualified vulnerabilities + +ONLY vulnerabilities discovered, when the following setup on test platform is used, are accepted: + +* $dolibarr_main_prod must be set to 1 into conf.php +* $dolibarr_nocsrfcheck must be kept to the value 0 into conf.php (this is the default value) +* $dolibarr_main_force_https must be set to something else than 0. +* The constant MAIN_SECURITY_CSRF_WITH_TOKEN must be set to 1 into backoffice menu Home - Setup - Other (this protection should be enabled soon by default) +* The module DebugBar must NOT be enabled (by default, this module is not enabled. This is a developer tool) +* The module ModuleBuilder must NOT be enabled (by default, this module is not enabled. This is a developer tool) +* ONLY security reports on modules provided by default and with the "stable" status are allowed (troubles into "experimental", "developement" or external modules are not accepted). +* The root of web server must link to htdocs and the documents directory must be outside of the web server root (this is the default when using the default installer but may differs with external installer). +* The web server setup must be done so only the documents directory is in write mode. The root directory called htdocs must be readonly. +* CSRF attacks are accepted for all when using a POST URL, but are accepted only for creating or updating data resctricted to the admin user when using GET URL. +* Ability for a high level user to edit web site pages in the CMS by including javascript is an expected feature. + +Scope is the web application (back office) and the APIs. + + +## Qualifying vulnerabilities for Bug bounty programs +* Remote code execution (RCE) +* Local files access and manipulation (LFI, RFI, XXE, SSRF, XSPA) +* Code injections (HTML, JS, SQL, PHP, ...) +* Cross-Site Scripting (XSS) +* Cross-Site Requests Forgery (CSRF) with real security impact +* Open redirect +* Broken authentication & session management +* Insecure direct object references +* CORS with real security impact +* Horizontal and vertical privilege escalation +* "HTTP Host Header" XSS +* Software version disclosure (for non admin users only) +* Stack traces or path disclosure (for non admin users only) + + +## Non-qualifying vulnerabilities for Bug bounty programs, but qualified for reporting +* "Self" XSS +* SSL/TLS best practices +* Denial of Service attacks +* Clickjacking/UI redressing +* Physical or social engineering attempts or issues that require physical access to a victim’s computer/device +* Presence of autocomplete attribute on web forms +* Vulnerabilities affecting outdated browsers or platforms +* Logout and other instances of low-severity Cross-Site Request Forgery +* Missing cookie flags +* Missing security-related HTTP headers which do not lead directly to a vulnerability +* Reports from automated web vulnerability scanners (Acunetix, Vega, etc.) that have not been validated +* Invalid or missing SPF (Sender Policy Framework) records (Incomplete or missing SPF/DKIM/DMARC) +* Reports on features flagged as "experimental" or "development" +* Software version or private IP disclosure when logged user is admin +* Stack traces or path disclosure when logged user is admin +* Any vulnerabilities due to a configuration different than the one defined into chapter "Scope for qualified vulnerabilities". + diff --git a/build/README b/build/README index 67ceb05c8d2..f7e8ebfe60b 100644 --- a/build/README +++ b/build/README @@ -19,30 +19,34 @@ Note: Prerequisites to build autoexe DoliWamp package: > Launch "wine cmd" to check a drive Z: pointing to / exists. > Install InnoSetup For example by running isetup-5.3.9.exe (http://www.jrsoftware.org) -> Install WampServer into "C:\Program Files\Wamp" - For example by running wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-32b.exe (http://www.wampserver.com) -> Install WampServer addon to have versions: Mysql5.0.45 - For example by running WampServer2-MYSQL5045.exe (http://www.wampserver.com) -> To build from Windows (running from makepack-dolibarr.pl script is however - recommanded), open file build/exe/doliwamp.iss and click on button "Compile". - The .exe file will be build into directory build. +> Install WampServer into "C:\wamp64" to have Apache, PHP and MariaDB + For example by running wampserver3.2.0_x64.exe (http://www.wampserver.com). See file build/exe/doliwamp.iss to know the doliwamp version currently setup. > Add path to ISCC into PATH windows var: Launch wine cmd, then regedit and add entry int HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment\PATH +> To build manually the .exe from Windows (running from makepack-dolibarr.pl script is however recommanded), + open file build/exe/doliwamp.iss and click on button "Compile". + The .exe file will be build into directory build. + + - To build a theme package, launch the script > perl makepack-dolibarrtheme.pl + + - To build a package for a module, launch the script > perl makepack-dolibarrmodule.pl + + - To build developper documentation, launch the script > perl dolibarr-doxygen-build.pl + Note: -The build directory and all its contents is absolutely not required to make -Dolibarr working. It is here only to build Dolibarr packages, and those -generated packages will not contains this "build" directory. +The build directory and all its contents is absolutely not required to make Dolibarr working. +It is here only to build Dolibarr packages, and those generated packages will not contains this "build" directory. You can find in "build", following sub-directories: @@ -59,6 +63,9 @@ To build Mac OS package (not ready yet). * doap: To build Doap descriptor to promote/describe Dolibarr releases. +* docker: +To deploy Dolibarr with docker. + * doxygen: Dir with config file to build doxygen documentation. @@ -66,12 +73,12 @@ Dir with config file to build doxygen documentation. To build exe package for Windows that distribute Dolibarr sources or to build the complete DoliWamp package. +* gource: +To build the video of history of git changes. + * launchpad: Doc file to explain how to use launchpad. -* live: -Doc file to explain how to create a demo live CD. - * obs: Doc file to explain how to push release onto OBS. @@ -90,5 +97,8 @@ To build Redhat, Opensuse or Mandriva package. * tgz: To build a tgz package. +* travis-ci: +Used by travis to make CI. + * zip: To build a zip package. diff --git a/build/docker/Dockerfile b/build/docker/Dockerfile index 4b1df7e0876..2be287c2db9 100644 --- a/build/docker/Dockerfile +++ b/build/docker/Dockerfile @@ -1,38 +1,50 @@ -FROM php:7.2-apache +FROM php:7.3-apache -ENV HOST_USER_ID 33 ENV PHP_INI_DATE_TIMEZONE 'UTC' +ENV PHP_INI_MEMORY_LIMIT 256M -RUN apt-get update && apt-get install -y libpng-dev libjpeg-dev libldap2-dev libzip-dev zlib1g-dev libicu-dev g++\ - && rm -rf /var/lib/apt/lists/* \ - && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ - && docker-php-ext-install gd \ - && docker-php-ext-install zip \ - && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ - && docker-php-ext-install ldap \ - && docker-php-ext-install mysqli \ - && docker-php-ext-install calendar \ - && docker-php-ext-configure intl \ - && docker-php-ext-install intl \ - && apt-get autoremove --purge -y libjpeg-dev libldap2-dev zlib1g-dev libicu-dev g++ +RUN apt-get update -y \ + && apt-get install -y --no-install-recommends \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libjpeg62-turbo \ + libpng-dev \ + libpng16-16 \ + libldap2-dev \ + libxml2-dev \ + libzip-dev \ + zlib1g-dev \ + libicu-dev \ + g++ \ + default-mysql-client \ + unzip \ + curl \ + apt-utils \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ + && docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ + && docker-php-ext-install -j$(nproc) calendar intl mysqli pdo_mysql gd soap zip \ + && docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ \ + && docker-php-ext-install -j$(nproc) ldap && \ + mv ${PHP_INI_DIR}/php.ini-development ${PHP_INI_DIR}/php.ini RUN mkdir /var/documents -RUN chown www-data /var/documents +RUN chown www-data:www-data /var/documents COPY docker-run.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-run.sh RUN pecl install xdebug && docker-php-ext-enable xdebug -RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20151012/xdebug.so"' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_autostart=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_enable=1' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.default_enable=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_host=docker.host' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_port=9000' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_connect_back=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.profiler_enable=0' >> /usr/local/etc/php/php.ini -RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> /usr/local/etc/php/php.ini -RUN echo '172.17.0.1 docker.host' >> /etc/hosts +RUN echo 'zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20180731/xdebug.so"' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_autostart=1' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_enable=1' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.default_enable=1' >> ${PHP_INI_DIR}/php.ini +#RUN echo 'xdebug.remote_host=docker.host' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_port=9000' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_connect_back=1' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.profiler_enable=0' >> ${PHP_INI_DIR}/php.ini +RUN echo 'xdebug.remote_log="/tmp/xdebug.log"' >> ${PHP_INI_DIR}/php.ini +#RUN echo '172.17.0.1 docker.host' >> /etc/hosts EXPOSE 80 diff --git a/build/docker/README.md b/build/docker/README.md index 616cbd8fa78..2fd278a531f 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -1,6 +1,8 @@ # How to use it ? The docker-compose.yml file is used to build and run Dolibarr in the current workspace. +This docker image intended for developpement usage. +For production usage you should consider other contributor reference like https://hub.docker.com/r/tuxgasy/dolibarr Before build/run, define the variable HOST_USER_ID as following: @@ -26,3 +28,4 @@ The URL to go to PhpMyAdmin is (login/password is root/root) : Setup the database connection during the installation process, please use mariad b (name of the database container) as database host. +Setup documents folder, during the installation process, to /var/documents diff --git a/build/docker/docker-compose.yml b/build/docker/docker-compose.yml index 3fe6125a874..7e4ceda902e 100644 --- a/build/docker/docker-compose.yml +++ b/build/docker/docker-compose.yml @@ -1,25 +1,54 @@ -mariadb: - build: mariadb - environment: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: dolibarr +version: '3' -phpmyadmin: - image: phpmyadmin/phpmyadmin - environment: - PMA_HOST: mariadb - links: - - mariadb - ports: - - "8080:80" +networks: + internal-pod: + internal: true + external-pod: + internal: false -web: - build: . - environment: - HOST_USER_ID: $HOST_USER_ID - volumes: - - ../../htdocs:/var/www/html - links: - - mariadb - ports: - - "80:80" +services: + mariadb: + image: mariadb:latest + environment: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: dolibarr + ports: + - "3306:3306" + networks: + - internal-pod + - external-pod + + phpmyadmin: + image: phpmyadmin/phpmyadmin + environment: + PMA_HOST: mariadb + depends_on: + - mariadb + ports: + - "8080:80" + networks: + - internal-pod + - external-pod + + web: + build: . + environment: + HOST_USER_ID: $HOST_USER_ID + volumes: + - ../../htdocs:/var/www/html/ + - ../../documents:/var/documents + ports: + - "80:80" + - "9000:9000" + depends_on: + - mariadb + - mail + networks: + - internal-pod + - external-pod + + mail: + image: maildev/maildev + ports: + - "8081:80" + - "25:25" diff --git a/build/docker/docker-run.sh b/build/docker/docker-run.sh index df7272c317d..e57d9adfad0 100644 --- a/build/docker/docker-run.sh +++ b/build/docker/docker-run.sh @@ -1,15 +1,21 @@ #!/bin/bash -usermod -u $HOST_USER_ID www-data -groupmod -g $HOST_USER_ID www-data +usermod -u ${HOST_USER_ID} www-data +groupmod -g ${HOST_USER_ID} www-data chgrp -hR www-data /var/www/html chmod g+rwx /var/www/html/conf +if [ ! -d /var/documents ]; then + echo "[docker-run] => create volume directory /var/documents ..." + mkdir -p /var/documents +fi +echo "[docker-run] => Set Permission to www-data for /var/documents" +chown -R www-data:www-data /var/documents + if [ ! -f /usr/local/etc/php/php.ini ]; then cat < /usr/local/etc/php/php.ini date.timezone = $PHP_INI_DATE_TIMEZONE -display_errors = On EOF fi diff --git a/build/exe/doliwamp/README.md b/build/exe/doliwamp/README.md index 87d3371f9bb..be8cf1f3ac5 100644 --- a/build/exe/doliwamp/README.md +++ b/build/exe/doliwamp/README.md @@ -5,6 +5,7 @@ It's a dedicated Dolibarr version for Windows newbies with no technical knowledg This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready to be distributed (for Windows). +The build of .exe files need to have some windows executable files already installed (Apache, MariaDb). The package to install to get this files are defined into the file *doliwamp.iss* (searhc line starting with "; Value OK:") If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file). diff --git a/build/generate_filelist_xml.php b/build/generate_filelist_xml.php index 976f2cb6ba3..581353b758b 100755 --- a/build/generate_filelist_xml.php +++ b/build/generate_filelist_xml.php @@ -110,7 +110,7 @@ print "Working on files into : ".DOL_DOCUMENT_ROOT."\n"; print "Include custom in signature : ".$includecustom."\n"; print "Include constants in signature : "; foreach ($includeconstants as $countrycode => $tmp) { - foreach($tmp as $constname => $constvalue) { + foreach ($tmp as $constname => $constvalue) { print $constname.'='.$constvalue." "; } } @@ -130,7 +130,7 @@ fputs($fp, ''."\n"); - foreach($tmp as $constname => $constvalue) { + foreach ($tmp as $constname => $constvalue) { $valueforchecksum=(empty($constvalue)?'0':$constvalue); $checksumconcat[]=$valueforchecksum; fputs($fp, ' '.$valueforchecksum.''."\n"); diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 24b32dcff91..85212d9c5ba 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -620,6 +620,9 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`; + + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`; } diff --git a/build/pdf/README.txt b/build/pdf/README.txt index 2335ff4b7f7..7a5424ca3d5 100644 --- a/build/pdf/README.txt +++ b/build/pdf/README.txt @@ -1,9 +1,10 @@ -To make htmldoc working from wiki.dolibarr.org, them must be modified to have +To make htmldoc working from wiki.dolibarr.org, the wiki must be modified to have -$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z" -$_COOKIE["htmldoc"] may also be defined if set on command line. - -To disable part, add -class="htmldoc-ignore" with css +To disable part of content, add: +class="htmldoc-ignore" +with css .htmldoc-ignore { display: none; } +Note: +$_SERVER["HTTP_USER_AGENT"] is "HTMLDOC/x.y.z" +$_COOKIE["htmldoc"] may also be defined if set on command line. diff --git a/build/sitemap/urllist-wiki.txt b/build/sitemap/urllist-wiki.txt index ae13bb96d87..2a70e61f146 100644 --- a/build/sitemap/urllist-wiki.txt +++ b/build/sitemap/urllist-wiki.txt @@ -1 +1 @@ -http://wiki.dolibarr.org/ +https://wiki.dolibarr.org/ diff --git a/composer.json b/composer.json index d26bbb05ad9..9fede994525 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "vendor-dir" : "htdocs/includes" }, "require" : { - "php" : ">=5.5.0", + "php" : ">=5.6.0", "ext-curl" : "*", "ckeditor/ckeditor" : "4.12.1", "mike42/escpos-php" : "2.2", @@ -33,11 +33,13 @@ "restler/framework" : "3.0.0-RC6", "tecnickcom/tcpdf" : "6.3.2", "nnnick/chartjs" : "^2.9", - "stripe/stripe-php" : "6.43.1" + "stripe/stripe-php" : "6.43.1", + "maximebf/debugbar" : "1.15.1", + "symfony/var-dumper": "3" }, "require-dev" : { - "jakub-onderka/php-parallel-lint" : "^0", - "jakub-onderka/php-console-highlighter" : "^0", + "php-parallel-lint/php-parallel-lint" : "^0", + "php-parallel-lint/php-console-highlighter" : "^0", "phpunit/phpunit" : "^4", "squizlabs/php_codesniffer" : "^2", "phpunit/phpunit-selenium" : "^2" diff --git a/composer.lock b/composer.lock index 09c71674512..5afe0ca34f2 100644 --- a/composer.lock +++ b/composer.lock @@ -1,10 +1,10 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "17e906996157e8a94564f686a6096dc5", + "content-hash": "1dbd2d05cc0836acfca5988f29005cf2", "packages": [ { "name": "ckeditor/ckeditor", @@ -47,6 +47,67 @@ ], "time": "2019-06-28T10:41:23+00:00" }, + { + "name": "maximebf/debugbar", + "version": "v1.15.1", + "source": { + "type": "git", + "url": "https://github.com/maximebf/php-debugbar.git", + "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "reference": "6c4277f6117e4864966c9cb58fb835cee8c74a1e", + "shasum": "" + }, + "require": { + "php": ">=5.6", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Maxime Bouroumeau-Fuseau", + "email": "maxime.bouroumeau@gmail.com", + "homepage": "http://maximebf.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Debug bar in the browser for php application", + "homepage": "https://github.com/maximebf/php-debugbar", + "keywords": [ + "debug", + "debugbar" + ], + "time": "2019-09-24T14:55:42+00:00" + }, { "name": "mike42/escpos-php", "version": "v2.2", @@ -253,6 +314,53 @@ "abandoned": "phpoffice/phpspreadsheet", "time": "2015-05-01T07:00:55+00:00" }, + { + "name": "psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, { "name": "restler/framework", "version": "3.0.0-RC6", @@ -260,12 +368,12 @@ "source": { "type": "git", "url": "https://github.com/Luracast/Restler-Framework.git", - "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0" + "reference": "d52e61600d153bca60a287c35141c5c01863127b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/0f6b0f26152f83e43a2a86820206c455095fb2b0", - "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0", + "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/d52e61600d153bca60a287c35141c5c01863127b", + "reference": "d52e61600d153bca60a287c35141c5c01863127b", "shasum": "" }, "require": { @@ -312,7 +420,7 @@ "rest", "server" ], - "time": "2019-05-12T15:15:11+00:00" + "time": "2020-02-13T16:05:12+00:00" }, { "name": "stripe/stripe-php", @@ -370,6 +478,146 @@ ], "time": "2019-08-29T16:56:12+00:00" }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a6977d63bf9a0ad4c65cd352709e230876f9904a", + "reference": "a6977d63bf9a0ad4c65cd352709e230876f9904a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v3.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "737e07704cca83f9dd0af926d45ce27eedc25657" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/737e07704cca83f9dd0af926d45ce27eedc25657", + "reference": "737e07704cca83f9dd0af926d45ce27eedc25657", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "time": "2015-11-18T13:48:51+00:00" + }, { "name": "tecnickcom/tcpdf", "version": "6.3.2", @@ -489,16 +737,16 @@ "time": "2015-06-14T21:17:01+00:00" }, { - "name": "jakub-onderka/php-console-color", + "name": "php-parallel-lint/php-console-color", "version": "v0.2", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", + "url": "https://github.com/php-parallel-lint/PHP-Console-Color.git", "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", "shasum": "" }, @@ -531,28 +779,31 @@ "time": "2018-09-29T17:23:10+00:00" }, { - "name": "jakub-onderka/php-console-highlighter", - "version": "v0.4", + "name": "php-parallel-lint/php-console-highlighter", + "version": "v0.5", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" + "url": "https://github.com/php-parallel-lint/PHP-Console-Highlighter.git", + "reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", - "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Console-Highlighter/zipball/21bf002f077b177f056d8cb455c5ed573adfdbb8", + "reference": "21bf002f077b177f056d8cb455c5ed573adfdbb8", "shasum": "" }, "require": { "ext-tokenizer": "*", - "jakub-onderka/php-console-color": "~0.2", - "php": ">=5.4.0" + "php": ">=5.4.0", + "php-parallel-lint/php-console-color": "~0.2" + }, + "replace": { + "jakub-onderka/php-console-highlighter": "*" }, "require-dev": { - "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~1.0", - "jakub-onderka/php-var-dump-check": "~0.1", + "php-parallel-lint/php-code-style": "~1.0", + "php-parallel-lint/php-parallel-lint": "~1.0", + "php-parallel-lint/php-var-dump-check": "~0.1", "phpunit/phpunit": "~4.0", "squizlabs/php_codesniffer": "~1.5" }, @@ -574,19 +825,19 @@ } ], "description": "Highlight PHP code in terminal", - "time": "2018-09-29T18:48:56+00:00" + "time": "2020-05-13T07:37:49+00:00" }, { - "name": "jakub-onderka/php-parallel-lint", + "name": "php-parallel-lint/php-parallel-lint", "version": "v0.9.2", "source": { "type": "git", - "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git", + "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git", "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa", + "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa", "reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa", "shasum": "" }, @@ -1082,6 +1333,7 @@ "keywords": [ "tokenizer" ], + "abandoned": true, "time": "2017-12-04T08:55:13+00:00" }, { @@ -1785,6 +2037,159 @@ ], "time": "2019-08-06T08:03:45+00:00" }, + { + "name": "symfony/polyfill-php72", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "639447d008615574653fb3bc60d1986d7172eaae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "v1.18.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2020-07-14T12:35:20+00:00" + }, { "name": "symfony/yaml", "version": "v3.4.32", @@ -1903,8 +2308,9 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">=5.5.0", + "php": ">=5.6.0", "ext-curl": "*" }, - "platform-dev": [] + "platform-dev": [], + "plugin-api-version": "1.1.0" } diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index cdb0999e53f..5f09d9536be 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -28,19 +28,6 @@ With -DEBUGBAR: ---------- - -Move - this.options = { - bodyMarginBottom: true, - bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')), - }; -few line lower in the - initialize: function() { - - - ESCPOS: ------- Replace @@ -181,6 +168,7 @@ In htdocs/includes/tecnickcom/tcpdf/tcpdf.php TCPDI: ------ Add fpdf_tpl.php 1.2 + Add tcpdi.php Add tcpdi_parser.php and replace: @@ -219,8 +207,6 @@ with - - JCROP: ------ * Remove analytics tag into file index.html diff --git a/dev/examples/code/create_invoice.php b/dev/examples/code/create_invoice.php index 1b212e0a5d7..1acf181a4ba 100755 --- a/dev/examples/code/create_invoice.php +++ b/dev/examples/code/create_invoice.php @@ -87,14 +87,11 @@ if ($idobject > 0) // Change status to validated $result=$obj->validate($user); if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else - { + else { $error++; dol_print_error($db, $obj->error); } -} -else -{ +} else { $error++; dol_print_error($db, $obj->error); } @@ -106,9 +103,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/code/create_order.php b/dev/examples/code/create_order.php index 703254ad5e9..7fe1a82251a 100755 --- a/dev/examples/code/create_order.php +++ b/dev/examples/code/create_order.php @@ -85,14 +85,11 @@ if ($idobject > 0) // Change status to validated $result=$com->valid($user); if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else - { + else { $error++; dol_print_error($db, $com->error); } -} -else -{ +} else { $error++; dol_print_error($db, $com->error); } @@ -104,9 +101,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/code/create_product.php b/dev/examples/code/create_product.php index 234658388df..20b898a92aa 100755 --- a/dev/examples/code/create_product.php +++ b/dev/examples/code/create_product.php @@ -82,9 +82,7 @@ $idobject = $myproduct->create($user); if ($idobject > 0) { print "OK Object created with id ".$idobject."\n"; -} -else -{ +} else { $error++; dol_print_error($db, $myproduct->error); } @@ -95,9 +93,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/code/create_user.php b/dev/examples/code/create_user.php index 96d369085d2..d585b490a9c 100755 --- a/dev/examples/code/create_user.php +++ b/dev/examples/code/create_user.php @@ -74,18 +74,14 @@ if ($idobject > 0) // Change status to validated $result=$obj->setStatut(1); if ($result > 0) print "OK Object created with id ".$idobject."\n"; - else - { + else { $error++; dol_print_error($db, $obj->error); } -} -elseif ($obj->error == 'ErrorLoginAlreadyExists') +} elseif ($obj->error == 'ErrorLoginAlreadyExists') { print "User with login ".$obj->login." already exists\n"; -} -else -{ +} else { $error++; dol_print_error($db, $obj->error); } @@ -97,9 +93,7 @@ if (! $error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/dev/examples/mail/source_email_ticket_1_to_create.txt b/dev/examples/mail/source_email_ticket_1_to_create.txt new file mode 100644 index 00000000000..94d4cb620b9 --- /dev/null +++ b/dev/examples/mail/source_email_ticket_1_to_create.txt @@ -0,0 +1,89 @@ +Delivered-To: testldrdev@gmail.com +Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1425223lji; + Thu, 20 Aug 2020 08:29:02 -0700 (PDT) +X-Received: by 2002:a05:620a:1292:: with SMTP id w18mr2938234qki.158.1597937342304; + Thu, 20 Aug 2020 08:29:02 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1597937342; cv=none; + d=google.com; s=arc-20160816; + b=FhT/+rJ/zNYgVQ5Nt/rLZJycGd/Ntkhm6LwI16YUfmEmxeGrP/cXXQULrqQ1LhBr9B + oRKweltTdnpyA14gm0kzbs1vUkf5HxLUuGk8IqqJWAPMUZoN8oUPkzq2BuKNQGxPiE+y + Hsg/fnYp8WzcAlZOLsEP2kcFIdA95Dyy5LkM8HgphI1jSS1d6gkx6nDGIMIpDD9D+w4X + ISxRUXp5JlDwFCUMOPoAvHIBUdJ3jpLsjesbMEnU4ssFqhxU21pBq+Fc+csSPeY5DL0M + HR1o+ChEAXIdDOrDqa0ohHfqR216juGCzH8YuEQ88LT0Qbst9IkOYWiAQv4TIh7vHtvQ + TMvA== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=to:subject:message-id:date:from:mime-version:dkim-signature; + bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=; + b=CRlrRPfoGkfmz6iXKy4HdxKQ4SeJTiIxjC2jNkgQPSnIDFJgDkJcwASJVpcjTmlVmH + Z9WnHKVUPRIHGDEoMRlx6eUx9QfelWqPYu3BBQGFry9sgth0BR/1s6tmQ+P+bAj23ryo + aL3UkF6KCSx4GhEk3MfHA5Ex81YDFHvHL3BZ2kb3XCVSlPiBq2szw1ETmRAsDdS5Gbu+ + ZlzBbl4pRtUWgi1fB5H4Wcv7e90F4Et1SBP8IKSCa23qu2nV9xefgjfMw2ndxCj1zgCL + c3l7Ul6pw32nqf6+vxfZTstwIwgu6dXZXCHDqJqesI2g8RGxeba+LfKZEDpBuSeINS9r + GMvw== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj; + spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id w14sor2138230qtb.9.2020.08.20.08.29.00 + for + (Google Transport Security); + Thu, 20 Aug 2020 08:29:01 -0700 (PDT) +Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@destailleur.fr header.s=google header.b=IPMz90Yj; + spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=destailleur.fr; s=google; + h=mime-version:from:date:message-id:subject:to; + bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=; + b=IPMz90Yjw1Mf57/rYWUYGtpc+IazEWcy6/bqxf1j0h6rxDH/wjhxsCWzfARgqqlfVj + ACg4IbPpZZlKFIYDSCbfMlWF65rbKfNre56HldfQgy0Tq3LC434zHz2ZZMOVCM52w3J9 + VGBpASUlSL1o+YRmzOpRtHVu7I9aNwGxHuA070Yka8XLV76vV3P0vdL8PcoHq0jUUEoi + +dCZ9NCPuAFtGK2IavNoM2qQrLdfYIi+RwgWBtqjTwzyvDEJR+p5fIPK142ynMbHgWYO + RVtMqAgxjvL4sfyKZ5KuzKXkQNM3zyzMinWK89scBl+QLFCcWA4Qqc0dJjqLCBhh8lmq + n67g== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20161025; + h=x-gm-message-state:mime-version:from:date:message-id:subject:to; + bh=sojOjnIKAXmsZ9zvMk5MGvY3qyOaFgnpRe6YPMYutOI=; + b=H0GsrFAi9JmRTKQ2budtDeLBqCaTisHKYCVVziyxmv+/tIcrSZBA4tdKwm+wR80r50 + zMJXmyVS2DMDWfnIlOv39wcwQjYN3WK1aRJfV0bVuEWrQuzt5MMWbskf6xbzo201nhr9 + ZlqATsEV7v1u5EHmfYwRhR8+AOmENdnm0g9RXPJVrFS58WNEJUSotS5Y5rZPjnT943y0 + 62Kf4Bd6uWvXhPFXWQoZLtWrPpkbcYPWIBmpftKhD0PD9c6rKaVduV0WhbigYsDoxb3F + iIafGPOyq91hiHR2gTLHiMmTDm+IDQ4n6gSkS7HKpZlLQhHoBMnpqJZYoxMJTxdpAbSy + mY+A== +X-Gm-Message-State: AOAM5325RcN4/ThWbYCO3vWRMFFBrfzJUHC1bd1Z9VB3/2Q3RuF9lmIJ +SjshEErhK68Of2pHDZQ3aPU4rzDfV8ozbvRsgChdfZg8aA= +X-Google-Smtp-Source: ABdhPJxUOUdurKEQfLldtiQGRkgC/h8gKQG1zhS+8k93p6N1SsOn517+GeRyT3E+/Uw536pmReO29la3EIAS6VT33SE= +X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3191190qtf.67.1597937340509; Thu, 20 Aug 2020 08:29:00 -0700 (PDT) +MIME-Version: 1.0 +From: John Tester +Date: Thu, 20 Aug 2020 17:28:34 +0200 +Message-ID: +Subject: Support besoin +To: testldrdev@gmail.com +Content-Type: multipart/alternative; boundary="0000000000008e099705ad50c772" + +--0000000000008e099705ad50c772 +Content-Type: text/plain; charset="UTF-8" + +adfsdfsdfds + +-- +Laurent. +------------------------------------------------------------------------------------ +Twitter: https://www.twitter.com/eldy10 + +--0000000000008e099705ad50c772 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +
adfsdfsdfds

--
Laur= +ent.
-------------------------------------------------------------------= +-----------------
Twitter: https://www.twitter.com/eldy10
+ +--0000000000008e099705ad50c772-- diff --git a/dev/examples/mail/source_email_ticket_2_answer_from_ticket.txt b/dev/examples/mail/source_email_ticket_2_answer_from_ticket.txt new file mode 100644 index 00000000000..350b9a93cad --- /dev/null +++ b/dev/examples/mail/source_email_ticket_2_answer_from_ticket.txt @@ -0,0 +1,57 @@ +Return-Path: +Received: from smtp.gmail.com ([2a01:e0a:7e:4ae0:329c:23ff:feb8:dc8d]) + by smtp.gmail.com with ESMTPSA id 32sm5811196wrh.18.2020.08.20.09.31.37 + for + (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); + Thu, 20 Aug 2020 09:31:37 -0700 (PDT) +From: testldrdev@gmail.com +X-Google-Original-From: +To: customer@customercompany.fr +Subject: [MyBigCompany - Ticket #TS2008-0040] Nouveau message +Date: Thu, 20 Aug 2020 18:31:37 +0200 +Message-ID: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62> +References: <1597941097.SMTPs-dolibarr-tic58@83b5bc91f83a56e458db71e0adac2b62> +X-Dolibarr-TRACKID: tic58@83b5bc91f83a56e458db71e0adac2b62 +X-RemoteAddr: 127.0.0.1 +X-Mailer: Dolibarr version 13.0.0-alpha (using SMTPs Mailer) +X-Dolibarr-Option: MAIN_MAIL_USE_MULTI_PART +Mime-Version: 1.0 +Content-Type: multipart/mixed; boundary="multipart_x.1597941097.x_boundary" +Content-Transfer-Encoding: 8bit + +--multipart_x.1597941097.x_boundary +Content-Type: multipart/alternative; boundary="mul_872cdd6a64216735955664484832b075" + +--mul_872cdd6a64216735955664484832b075 +Content-Type: text/plain; charset=UTF-8 + +Bonjour + + +Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici +le message :PredefinedMailContentTicket_send + + +Vous pouvez voir la progression du ticket en cliquant sur le lien +ci-dessus. : fr5uw2yospypn2rz + Cordialement, + +-- +--mul_872cdd6a64216735955664484832b075 +Content-Type: text/html; charset=UTF-8 + +Bonjour
+ +
+Une nouvelle réponse a été ajoutée à un ticket que vous suivez. Voici +le message :PredefinedMailContentTicket_send
+
+
+Vous pouvez voir la progression du ticket en cliquant sur le lien +ci-dessus. : fr5uw2yospypn2rz
+
Cordialement,
+
+-- +--mul_872cdd6a64216735955664484832b075-- +--multipart_x.1597941097.x_boundary-- diff --git a/dev/examples/mail/source_email_ticket_3_answer_from_mailer.txt b/dev/examples/mail/source_email_ticket_3_answer_from_mailer.txt new file mode 100644 index 00000000000..6c2ac1bb2af --- /dev/null +++ b/dev/examples/mail/source_email_ticket_3_answer_from_mailer.txt @@ -0,0 +1,48 @@ +MIME-Version: 1.0 +Date: Thu, 20 Aug 2020 18:34:01 +0200 +References: +In-Reply-To: +Message-ID: +Subject: Re: Support besoin +From: John Tester +To: John Tester +Content-Type: multipart/alternative; boundary="0000000000001620dd05ad51b075" + +--0000000000001620dd05ad51b075 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Merci pour votre question. +Voici la rep. + +Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester +a =C3=A9crit : + +> adfsdfsdfds +> +> -- +> Laurent. +> +> -------------------------------------------------------------------------= +----------- +> Twitter: https://www.twitter.com/eldy10 +> + +--0000000000001620dd05ad51b075 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +
Merci pour votre question.
Voici la rep.
Le=C2=A0= +jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, John Tester <customer@customercompany.fr> a =C3=A9c= +rit=C2=A0:
adfsdfsdfds

--
Laurent.
----------------------------------------------------------= +--------------------------
Twitter: https://www.twitter.com/eldy10
+
+ +--0000000000001620dd05ad51b075-- diff --git a/dev/examples/mail/source_email_ticket_4_answer_of_answer_from_mailer.txt b/dev/examples/mail/source_email_ticket_4_answer_of_answer_from_mailer.txt new file mode 100644 index 00000000000..314e9cda20f --- /dev/null +++ b/dev/examples/mail/source_email_ticket_4_answer_of_answer_from_mailer.txt @@ -0,0 +1,134 @@ +Delivered-To: testldrdev@gmail.com +Received: by 2002:a2e:9b9a:0:0:0:0:0 with SMTP id z26csp1483607lji; + Thu, 20 Aug 2020 09:56:03 -0700 (PDT) +X-Received: by 2002:ac8:3868:: with SMTP id r37mr3301993qtb.95.1597942563252; + Thu, 20 Aug 2020 09:56:03 -0700 (PDT) +ARC-Seal: i=1; a=rsa-sha256; t=1597942563; cv=none; + d=google.com; s=arc-20160816; + b=skUGL+keim3FdNXfKGgQokCfj85gnhYhuLbMM61qY5W6ixSH9s8I6uoNh3gzVy89XM + NGbZiajjDiPMBryl87PhD+ACBjv8WoZAQiojAga0ELPPmVDnhrtWKANLbRrkUI3Xtfoj + b1o2iHP2Q12Vqs6xiAy86yxURlIKGM3tw91WryWiIPiAL7bRZPn49N3XbO2ULE0QKTBq + BI5YnOxt9NfTj0xhKaLLIJ9M1qa4e1QyOHl56WuEv3Gx6uHDAQDYz+C5G0VgdjBvwRzH + pJaiAulc1uW/V9TcRMwvwIWtI7eWygvU2PiuI/c05G1KVKibAubHE55IjOJCn2O2UaH4 + WMNQ== +ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; + h=to:subject:message-id:date:from:in-reply-to:references:mime-version + :dkim-signature; + bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=; + b=Ps5kk+tBGQzMP6ugDCwKf4hzn8fn3DU4AFz1dJvkHdDestLZWN99Qtr6iNMdslsHJm + ov378c+8oCfcV7shyBYjlAFfikFi7o4RM/evh3yqqjAnhyVfcYH7c9cexVvDo/AXUAZ7 + N7Mh7EOvyDXXsaHK2l89XiAxZx/hZh/O+/HR2EoVEGre1eYRYwI/aEfPN8d4/fL2VtCD + 0wzAwnUrINuXmcaUDT30Twjk9kwGjjTsM6Z531vKM6L3y48a7f3GTE7V+vo2QxHdUT54 + fQVue9OO7b4VKTEj/x/dmNr+92sHRAMMS7dj/VXMmzM+WttUCAPNxZ27/bvt4bBc5oBp + QPEA== +ARC-Authentication-Results: i=1; mx.google.com; + dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT; + spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr +Return-Path: +Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) + by mx.google.com with SMTPS id q3sor2285165qtn.34.2020.08.20.09.56.02 + for + (Google Transport Security); + Thu, 20 Aug 2020 09:56:03 -0700 (PDT) +Received-SPF: pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; +Authentication-Results: mx.google.com; + dkim=pass header.i=@destailleur.fr header.s=google header.b=SEYSmxbT; + spf=pass (google.com: domain of contact@destailleur.fr designates 209.85.220.41 as permitted sender) smtp.mailfrom=contact@destailleur.fr; + dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=destailleur.fr +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=destailleur.fr; s=google; + h=mime-version:references:in-reply-to:from:date:message-id:subject:to; + bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=; + b=SEYSmxbTKCuc1baQZzjIJwm7WXvgjt/nEGhMLqWxQCU3beM3qhH8wYlSeMyB8Z/9pi + tszZFZhZ3cjnIbbJnjzsMYJgBnYbkf6hz14+BsFwyPU030EkDjJy2i3DSXzYK7A+GbBn + G9I9foG/4+pcx0LnFsjchGsRhLFkTKJIsP2SVfOx0wlim3WHMIqIXvKsxY05PoPyf8Tp + IwQi7iNl/+nTyjNHl2DQh+ty3CRTmUw9uEbY+jRRvIg5i/7cfREekK98d7qi/5HQycr6 + aptRDdCVHXpe47q+c7OPiMEEQWs+mFJhBqPXIlU54fwFApEEnLn/jwGbrPsrPYJaswgI + vd/g== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20161025; + h=x-gm-message-state:mime-version:references:in-reply-to:from:date + :message-id:subject:to; + bh=j6+rsx5MBsg1/s7LIIfByV7u0jGK09n72bnK4XcN6ZQ=; + b=M6a4k1gKc4e7TwKncuNPy0b3KxutR1FLFJGWxd4NyW84b7f3LfIR94IeInLQIWmY8C + Ddus0upZJI4+NN9XBGvXCdsiiYlwFGBJRWwjv82XFKVAKL5DD94RJNQZJUiE39hgJ2aa + 6V9gasiP+nUAX4ZV9bZmw21CgKEZrZVXh5unmW2ABrfcx8lHjp/DUw5XEkym1J92Wo1l + g0H3XrC2FL+aQuj+WpCynMNkY9ljw71oqyv3SP9pjnVNHArAdZiPMHkNxiuPdq7q41fg + eIbdRCQXYZL5O48QsjDdiXwaQzx+NcYtrKAH0RIVD1lG6zc9pxqDJsbGxP9VLs8jGDTT + mSdQ== +X-Gm-Message-State: AOAM532LuATWDKbo1HImMWshHVqb0kC0isehf3owfYUKq5J68o3juKbm kCgUMt25A2C7QoNMDXcjfJyteBNQD7ZhSh3yeYTGoLSvsD4= +X-Google-Smtp-Source: ABdhPJyQYCpCHSwA87x030i8YChySZqcNXxT1qVlZyEA+XM6DTyPZusa8gtbDUVcMyx7Jma/7toh+4EEE2bWg0bG+2E= +X-Received: by 2002:aed:3e8e:: with SMTP id n14mr3547383qtf.67.1597942562373; Thu, 20 Aug 2020 09:56:02 -0700 (PDT) +MIME-Version: 1.0 +References: +In-Reply-To: +From: John Tester +Date: Thu, 20 Aug 2020 18:55:36 +0200 +Message-ID: +Subject: Re: Support besoin +To: John Tester +Content-Type: multipart/alternative; boundary="000000000000cd54be05ad51fe67" + +--000000000000cd54be05ad51fe67 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Merci + +Le jeu. 20 ao=C3=BBt 2020 =C3=A0 18:34, John Tester a +=C3=A9crit : + +> Merci pour votre question. +> Voici la rep. +> +> Le jeu. 20 ao=C3=BBt 2020 =C3=A0 17:29, John Tester +> a =C3=A9crit : +> +>> adfsdfsdfds +>> +>> -- +>> Laurent. +>> +>> ------------------------------------------------------------------------= +------------ +>> Twitter: https://www.twitter.com/eldy10 +>> +> + +--=20 +Laurent. +---------------------------------------------------------------------------= +--------- +Twitter: https://www.twitter.com/eldy10 + +--000000000000cd54be05ad51fe67 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +
Merci

Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A018:34, Lau= +rent Destailleur <testldrdev@gma= +il.com> a =C3=A9crit=C2=A0:
Merci pour votre question.
Voici la= + rep.

Le=C2=A0jeu. 20 ao=C3=BBt 2020 =C3=A0=C2=A017:29, Laurent Destai= +lleur <laure= +nt@destailleur.fr> a =C3=A9crit=C2=A0:
adfsdfsdfds

--
Laurent.
-----------------------= +-------------------------------------------------------------
Twitter: <= +a href=3D"https://www.twitter.com/eldy10" target=3D"_blank">https://www.twi= +tter.com/eldy10
+
+


--
Laurent.
------------------------------------= +------------------------------------------------
Twitter: https://www.twitter.com/eldy= +10
+ +--000000000000cd54be05ad51fe67-- \ No newline at end of file diff --git a/dev/initdata/dbf/importdb-products.php b/dev/initdata/dbf/importdb-products.php index 845064f0688..2c06c07e103 100644 --- a/dev/initdata/dbf/importdb-products.php +++ b/dev/initdata/dbf/importdb-products.php @@ -227,8 +227,7 @@ while ($fields = $db->fetch_array($resql)) { $error++; // $errorrecord will be reset } $j++; -} else - die("error : $sql"); +} else die("error : $sql"); diff --git a/dev/initdata/dbf/importdb-thirdparties.php b/dev/initdata/dbf/importdb-thirdparties.php index 8f0eb0635f0..a6b2697eed8 100644 --- a/dev/initdata/dbf/importdb-thirdparties.php +++ b/dev/initdata/dbf/importdb-thirdparties.php @@ -179,8 +179,7 @@ while ($fields = $db->fetch_array($resql)) { $object->town = trim($fields['FVILLE']); if ($fields['FPAYS']) $object->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['FPAYS']))), 'c_country', 'label', 'rowid'); - else - $object->country_id = 1; + else $object->country_id = 1; $object->phone = trim($fields['FTEL']) ? trim($fields['FTEL']) : trim($fields['FCONTACT']); $object->phone = substr($object->phone, 0, 20); $object->fax = trim($fields['FFAX']) ? trim($fields['FFAX']) : trim($fields['FCONTACT']); @@ -299,8 +298,7 @@ while ($fields = $db->fetch_array($resql)) { $contact->town = trim($fields['LVILLE']); if ($fields['FPAYS']) $contact->country_id = dol_getIdFromCode($db, trim(ucwords(strtolower($fields['LPAYS']))), 'c_country', 'label', 'rowid'); - else - $contact->country_id = 1; + else $contact->country_id = 1; $contact->email = $fields['LMAIL']; $contact->phone = trim($fields['LTEL']) ? trim($fields['LTEL']) : trim($fields['LCONTACT']); $contact->fax = trim($fields['LFAX']) ? trim($fields['LFAX']) : trim($fields['LCONTACT']); @@ -340,8 +338,7 @@ while ($fields = $db->fetch_array($resql)) { $error++; // $errorrecord will be reset } $j++; -} else - die("error : $sql"); +} else die("error : $sql"); $db->commit(); diff --git a/dev/initdata/dbf/includes/dbase.class.php b/dev/initdata/dbf/includes/dbase.class.php index 0c2f6820a96..e70f18087c4 100644 --- a/dev/initdata/dbf/includes/dbase.class.php +++ b/dev/initdata/dbf/includes/dbase.class.php @@ -207,8 +207,7 @@ class DBase $value = true; elseif ($value == 'f' || $value == 'n') $value = false; - else - $value = null; + else $value = null; } $record[$i] = $value; } @@ -295,8 +294,7 @@ class DBase $i = unpack("S$n", $data); if ($n == 1) return (int) $i[1]; - else - return array_merge($i); + else return array_merge($i); } private static function putInt16($fd, $value) @@ -310,8 +308,7 @@ class DBase $i = unpack("L$n", $data); if ($n == 1) return (int) $i[1]; - else - return array_merge($i); + else return array_merge($i); } private static function putInt32($fd, $value) diff --git a/dev/initdata/generate-invoice.php b/dev/initdata/generate-invoice.php index 3fe058e8d3e..c35fe2440ef 100755 --- a/dev/initdata/generate-invoice.php +++ b/dev/initdata/generate-invoice.php @@ -179,14 +179,10 @@ while ($i < GEN_NUMBER_FACTURE && $result >= 0) if ($result) { print " OK with ref ".$object->ref."\n";; - } - else - { + } else { dol_print_error($db, $object->error); } - } - else - { + } else { dol_print_error($db, $object->error); } } diff --git a/dev/initdata/generate-order.php b/dev/initdata/generate-order.php index 1dc56aa5582..c421e39ffe3 100755 --- a/dev/initdata/generate-order.php +++ b/dev/initdata/generate-order.php @@ -124,8 +124,7 @@ if ($resql) { $row = $db->fetch_row($resql); $societesid[$i] = $row[0]; } -} -else { print "err"; } +} else { print "err"; } $commandesid = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."commande"; @@ -138,8 +137,7 @@ if ($resql) { $row = $db->fetch_row($resql); $commandesid[$i] = $row[0]; } -} -else { print "err"; } +} else { print "err"; } $prodids = array(); $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product WHERE tosell=1"; @@ -206,16 +204,12 @@ for ($s = 0 ; $s < GEN_NUMBER_COMMANDE ; $s++) { $db->commit(); print " OK with ref ".$object->ref."\n"; - } - else - { + } else { print " KO\n"; $db->rollback(); dol_print_error($db, $object->error); } - } - else - { + } else { print " KO\n"; $db->rollback(); dol_print_error($db, $object->error); diff --git a/dev/initdata/generate-proposal.php b/dev/initdata/generate-proposal.php index 4c5d70aadc4..42c0c4098f2 100755 --- a/dev/initdata/generate-proposal.php +++ b/dev/initdata/generate-proposal.php @@ -210,16 +210,12 @@ while ($i < GEN_NUMBER_PROPAL && $result >= 0) { $db->commit(); print " OK with ref ".$object->ref."\n"; - } - else - { + } else { print " KO\n"; $db->rollback(); dol_print_error($db, $object->error); } - } - else - { + } else { dol_print_error($db, $object->error); } } diff --git a/dev/initdata/generate-thirdparty.php b/dev/initdata/generate-thirdparty.php index 05ac6416aa3..a13e2351e9c 100755 --- a/dev/initdata/generate-thirdparty.php +++ b/dev/initdata/generate-thirdparty.php @@ -136,9 +136,7 @@ for ($s = 0 ; $s < GEN_NUMBER_SOCIETE ; $s++) } print "Company ".$s." created nom=".$soc->name."\n"; - } - else - { + } else { print "Error: ".$soc->error."\n"; } } diff --git a/dev/initdata/import-products.php b/dev/initdata/import-products.php index 4288c5bf3b1..fb07143f972 100755 --- a/dev/initdata/import-products.php +++ b/dev/initdata/import-products.php @@ -163,9 +163,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create result code = ".$ret." - ".$produit->errorsToString(); $errorrecord++; - } - else - { + } else { print " - Creation OK with ref ".$produit->ref." - id = ".$ret; } @@ -180,9 +178,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in updatePrice result code = ".$ret1." ".$ret2." - ".$produit->errorsToString(); $errorrecord++; - } - else - { + } else { print " - updatePrice OK"; } } @@ -200,9 +196,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in setMultiLangs result code = ".$ret." - ".$produit->errorsToString(); $errorrecord++; - } - else - { + } else { print " - setMultiLangs OK"; } } @@ -227,9 +221,7 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { print "Rollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdata/import-thirdparties.php b/dev/initdata/import-thirdparties.php index ef1dfcc99ab..a0ddaac7674 100755 --- a/dev/initdata/import-thirdparties.php +++ b/dev/initdata/import-thirdparties.php @@ -181,9 +181,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create result code = ".$ret." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - Creation OK with name ".$object->name." - id = ".$ret; } } @@ -212,9 +210,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create link with sale representative result code = ".$result." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - create link sale representative OK"; } } @@ -243,9 +239,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - create contact OK"; } } @@ -277,9 +271,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create contact result code = ".$ret1." ".$ret2." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - create contact OK"; } } @@ -305,9 +297,7 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { print "Rollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdata/import-users.php b/dev/initdata/import-users.php index 4247415288c..8e4878577a1 100755 --- a/dev/initdata/import-users.php +++ b/dev/initdata/import-users.php @@ -142,9 +142,7 @@ while ($fields=fgetcsv($fhandle, $linelength, $delimiter, $enclosure, $escape)) { print " - Error in create result code = ".$ret." - ".$object->errorsToString(); $errorrecord++; - } - else - { + } else { print " - Creation OK with login ".$object->login." - id = ".$ret; } @@ -168,9 +166,7 @@ if ($mode != 'confirmforced' && ($error || $mode != 'confirm')) { print "Rollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdata/purge-data.php b/dev/initdata/purge-data.php index b1aadd56ed8..e6a67aa73c8 100755 --- a/dev/initdata/purge-data.php +++ b/dev/initdata/purge-data.php @@ -26,7 +26,7 @@ $sapi_type = php_sapi_name(); $script_file = basename(__FILE__); -$path=dirname(__FILE__).'/'; +$path=__DIR__.'/'; // Test si mode batch if (substr($sapi_type, 0, 3) == 'cgi') { @@ -198,7 +198,7 @@ if (empty($option)) if ($option != 'all') { $listofoptions=explode(',', $option); - foreach($listofoptions as $cursoroption) + foreach ($listofoptions as $cursoroption) { if (! in_array($cursoroption, array_keys($sqls))) { print "Usage: $script_file (test|confirm) (all|option) (all|YYYY-MM-DD) [dbtype dbhost dbuser dbpassword dbname dbport]\n"; @@ -264,7 +264,7 @@ function processfamily($family, $date) global $db, $sqls; $error=0; - foreach($sqls[$family] as $sql) + foreach ($sqls[$family] as $sql) { if (preg_match('/^@/', $sql)) { @@ -302,10 +302,10 @@ function processfamily($family, $date) $db->begin(); $listofoptions=explode(',', $option); -foreach($listofoptions as $cursoroption) +foreach ($listofoptions as $cursoroption) { $oldfamily=''; - foreach($sqls as $family => $familysql) + foreach ($sqls as $family => $familysql) { if ($cursoroption && $cursoroption != 'all' && $cursoroption != $family) continue; @@ -325,9 +325,7 @@ if ($error || $mode != 'confirm') { print "\nRollback any changes.\n"; $db->rollback(); -} -else -{ +} else { print "Commit all changes.\n"; $db->commit(); } diff --git a/dev/initdemo/initdemo.sh b/dev/initdemo/initdemo.sh index 7fd9eb551d4..1b32161b44b 100755 --- a/dev/initdemo/initdemo.sh +++ b/dev/initdemo/initdemo.sh @@ -69,6 +69,7 @@ then 255) exit;; esac + rm $fichtemp # ----------------------------- database name DIALOG=${DIALOG=dialog} @@ -86,6 +87,7 @@ then 255) exit;; esac + rm $fichtemp # ---------------------------- database port DIALOG=${DIALOG=dialog} @@ -104,6 +106,7 @@ then 255) exit;; esac + rm $fichtemp # ---------------------------- compte admin mysql DIALOG=${DIALOG=dialog} @@ -122,6 +125,7 @@ then 255) exit;; esac + rm $fichtemp # ---------------------------- mot de passe admin mysql DIALOG=${DIALOG=dialog} @@ -140,6 +144,7 @@ then 255) exit;; esac + rm $fichtemp 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' ` diff --git a/dev/initdemo/initdemopassword.sh b/dev/initdemo/initdemopassword.sh new file mode 100755 index 00000000000..d5aa9c1ef0e --- /dev/null +++ b/dev/initdemo/initdemopassword.sh @@ -0,0 +1,166 @@ +#!/bin/sh +#------------------------------------------------------ +# Script to reinit admin password. +# Note: "dialog" tool need to be available if no parameter provided. +# +# Laurent Destailleur - eldy@users.sourceforge.net +#------------------------------------------------------ +# Usage: initdemopassword.sh confirm +# usage: initdemopassword.sh confirm base port login pass +#------------------------------------------------------ + + +export mydir=`echo "$0" | sed -e 's/initdemopassword.sh//'`; +if [ "x$mydir" = 'x' -o "x$mydir" = 'x./' ] +then + export mydir="." +fi +export id=`id -u`; + + +# ----------------------------- check if root +if [ "x$id" != "x0" -a "x$id" != "x1001" ] +then + echo "Script must be ran as root" + exit +fi + + +# ----------------------------- command line params +confirm=$1; +base=$2; +port=$3; +demologin=$4; +demopass=$5; + +# ----------------------------- check params +if [ "x$confirm" != "xconfirm" ] +then + echo "----- $0 -----" + echo "Usage: initdemopassword.sh confirm [base port login pass]" + exit +fi + + +# ----------------------------- if no params on command line +if [ "x$demopass" = "x" ] +then + export dumpfile=`ls -v $mydir/mysqldump_dolibarr_*.sql | tail -n 1` + export dumpfile=`basename $dumpfile` + + # ----------------------------- database name + DIALOG=${DIALOG=dialog} + DIALOG="$DIALOG --ascii-lines" + fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ + trap "rm -f $fichtemp" 0 1 2 5 15 + $DIALOG --title "Init Dolibarr with demo values" --clear \ + --inputbox "Mysql database name :" 16 55 dolibarrdemo 2> $fichtemp + valret=$? + case $valret in + 0) + base=`cat $fichtemp`;; + 1) + exit;; + 255) + exit;; + esac + rm $fichtemp + + # ---------------------------- database port + DIALOG=${DIALOG=dialog} + fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ + trap "rm -f $fichtemp" 0 1 2 5 15 + $DIALOG --title "Init Dolibarr with demo values" --clear \ + --inputbox "Mysql port (ex: 3306):" 16 55 3306 2> $fichtemp + + valret=$? + + case $valret in + 0) + port=`cat $fichtemp`;; + 1) + exit;; + 255) + exit;; + esac + rm $fichtemp + + + # ----------------------------- demo login + DIALOG=${DIALOG=dialog} + DIALOG="$DIALOG --ascii-lines" + fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ + trap "rm -f $fichtemp" 0 1 2 5 15 + $DIALOG --title "Reset login password" --clear \ + --inputbox "Login to reset :" 16 55 dolibarrdemologin 2> $fichtemp + valret=$? + case $valret in + 0) + demologin=`cat $fichtemp`;; + 1) + exit;; + 255) + exit;; + esac + rm fichtemp + + # ----------------------------- demo pass + DIALOG=${DIALOG=dialog} + DIALOG="$DIALOG --ascii-lines" + fichtemp=`tempfile 2>/dev/null` || fichtemp=/tmp/test$$ + trap "rm -f $fichtemp" 0 1 2 5 15 + $DIALOG --title "Reset login password" --clear \ + --inputbox "Pass to set :" 16 55 dolibarrdemopass 2> $fichtemp + valret=$? + case $valret in + 0) + demopass=`cat $fichtemp`;; + 1) + exit;; + 255) + exit;; + esac + rm fichtemp + + + 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 demo login with demo values" --clear \ + --yesno "Do you confirm ? \n Mysql database : '$base' \n Mysql port : '$port' \n Demo login: '$demologin' \n Demo password : '$demopass'" 15 55 + + case $? in + 0) echo "Ok, start process...";; + 1) exit;; + 255) exit;; + esac + +fi + + +# ---------------------------- run sql file +if [ "x$passwd" != "x" ] +then + export passwd="-p$passwd" +fi +#echo "mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile" +#mysql -P$port -u$admin $passwd $base < $mydir/$dumpfile +echo "echo \"UPDATE llx_user SET pass_crypted = MD5('$demopass') WHERE login = '$demologin';\" | mysql -P$port $base" +echo "UPDATE llx_user SET pass_crypted = MD5('$demopass') WHERE login = '$demologin';" | mysql -P$port $base +export res=$? + +if [ $res -ne 0 ]; then + echo "Error to execute sql with mysql -P$port -u$admin -p***** $base" + exit +fi + + +if [ "x$res" = "x0" ] +then + echo "Success, file successfully loaded." +else + echo "Error, load failed." +fi +echo diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index 5b16d3afe9b..4da5ffaad58 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -95,8 +95,7 @@ if ($connection) dol_syslog("Could not authenticate with username ".$login." . and password ".preg_replace('/./', '*', $password), LOG_ERR); exit(-5); } - else - { + else { //$stream = ssh2_exec($connection, '/usr/bin/php -i'); /* print "Generate dump ".$filesys1.'.bz2'."\n"; @@ -125,14 +124,13 @@ if ($connection) $return_var=0; print strftime("%Y%m%d-%H%M%S").' '.$fullcommand."\n"; exec($fullcommand, $output, $return_var); - foreach($output as $line) print $line."\n"; + foreach ($output as $line) print $line."\n"; //ssh2_sftp_unlink($sftp, $fileinstalllock); //print $output; } } -else -{ +else { print 'Failed to connect to ssh2 to '.$server; exit(-6); } diff --git a/dev/initdemo/updatedemo.php b/dev/initdemo/updatedemo.php index 51a5310a694..5da0d4a2498 100755 --- a/dev/initdemo/updatedemo.php +++ b/dev/initdemo/updatedemo.php @@ -87,7 +87,7 @@ while ($year <= $currentyear) if ($delta1) { - foreach($tables as $tablekey => $tableval) + foreach ($tables as $tablekey => $tableval) { print "Correct ".$tablekey." for year ".$year." and move them to current year ".$currentyear." "; $sql="select rowid from ".MAIN_DB_PREFIX.$tablekey." where ".$tableval[0]." between '".$year."-01-01' and '".$year."-12-31' and ".$tableval[0]." < DATE_ADD(NOW(), INTERVAL -1 YEAR)"; @@ -105,7 +105,7 @@ while ($year <= $currentyear) print "."; $sql2="UPDATE ".MAIN_DB_PREFIX.$tablekey." set "; $j=0; - foreach($tableval as $field) + foreach ($tableval as $field) { if ($j) $sql2.=", "; $sql2.= $field." = ".$db->ifsql("DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR) > NOW()", "DATE_ADD(".$field.", INTERVAL ".$delta2." YEAR)", "DATE_ADD(".$field.", INTERVAL ".$delta1." YEAR)"); diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index e726df6db7c..03104270dcf 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -27,7 +27,7 @@ - + @@ -101,7 +101,7 @@ - --> + --> 0 @@ -117,7 +117,7 @@ --> - + @@ -188,8 +188,8 @@ - @@ -213,6 +213,10 @@ + + + + @@ -309,16 +313,16 @@ 0 - + 0 - + 0 - + 0 @@ -332,7 +336,7 @@ 0 - + 0 @@ -385,7 +389,7 @@ - + 0 @@ -426,5 +430,5 @@ - + diff --git a/dev/tools/dolibarr-postgres2mysql.php b/dev/tools/dolibarr-postgres2mysql.php index f2794455ca3..fd30540c019 100644 --- a/dev/tools/dolibarr-postgres2mysql.php +++ b/dev/tools/dolibarr-postgres2mysql.php @@ -76,14 +76,12 @@ function getfieldname($l) if (preg_match("/`(.*)`/", $l, $regs)) { if ($regs[1]) return $regs[1]; - else - return null; + else return null; } // if its not in quotes, then it should (we hope!) be the first "word" on the line, up to the first space. elseif (preg_match("/([^\ ]*)/", trim($l), $regs)) { if ($regs[1]) return $regs[1]; - else - return null; + else return null; } } @@ -102,8 +100,7 @@ function formatsize($s) return sprintf("%.1f", round($s / 1024, 1)) . "K"; elseif ($s < pow(2, 30)) return sprintf("%.1f", round($s / 1024 / 1024, 1)) . "M"; - else - return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G"; + else return sprintf("%.1f", round($s / 1024 / 1024 / 1024, 1)) . "G"; } /** @@ -146,8 +143,7 @@ function pg2mysql_large($infilename, $outfilename) if ($c % 2 != 0) { if ($inquotes) $inquotes = false; - else - $inquotes = true; + else $inquotes = true; } if ($linenum % 10000 == 0) { @@ -329,8 +325,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $num = $regs[1]; if ($num <= 255) $line = preg_replace("/ character varying\([0-9]*\)/", " varchar($num)", $line); - else - $line = preg_replace("/ character varying\([0-9]*\)/", " text", $line); + else $line = preg_replace("/ character varying\([0-9]*\)/", " text", $line); } // character varying with no size, we will default to varchar(255) if (preg_match("/ character varying/", $line)) { @@ -352,8 +347,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $num = $regs[1]; if ($num <= 255) $line = preg_replace("/ character\([0-9]*\)/", " varchar($num)", $line); - else - $line = preg_replace("/ character\([0-9]*\)/", " text", $line); + else $line = preg_replace("/ character\([0-9]*\)/", " text", $line); } // timestamps $line = str_replace(" timestamp with time zone", " datetime", $line); @@ -363,8 +357,8 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) $line = str_replace(" time with time zone", " time", $line); $line = str_replace(" time without time zone", " time", $line); - $line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line); - $line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP", $line); + $line = str_replace(" timestamp DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line); + $line = str_replace(" timestamp without time zone DEFAULT now()", " timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP", $line); if (strstr($line, "auto_increment") || preg_match('/ rowid int/', $line) || preg_match('/ id int/', $line)) { $field = getfieldname($line); @@ -465,8 +459,7 @@ function pg2mysql(&$input, &$arrayofprimaryalreadyintabledef, $header = true) if ($c % 2 != 0) { if ($inquotes) $inquotes = false; - else - $inquotes = true; + else $inquotes = true; // echo "inquotes=$inquotes\n"; } } while (substr($lines[$linenumber], - 3, - 1) != ");" || $inquotes); diff --git a/dev/tools/test/testperf.php b/dev/tools/test/testperf.php new file mode 100755 index 00000000000..f49e8a4ca0d --- /dev/null +++ b/dev/tools/test/testperf.php @@ -0,0 +1,21 @@ +getTranslationFilesArray($this->_refLang); $counter = 1; - foreach($files as $file) + foreach ($files as $file) { if ($this->_limittofile && $this->_limittofile != $file) continue; $counter++; @@ -94,7 +94,7 @@ class autoTranslator // If we must process all languages $arraytmp=dol_dir_list($this->_langDir, 'directories', 0); - foreach($arraytmp as $dirtmp) + foreach ($arraytmp as $dirtmp) { if ($dirtmp['name'] === $this->_refLang) continue; // We discard source language $tmppart=explode('_', $dirtmp['name']); @@ -112,7 +112,7 @@ class autoTranslator } // Process translation of source file for each target languages - foreach($targetlangs as $my_destlang) + foreach ($targetlangs as $my_destlang) { $this->_translatedFiles = array(); @@ -124,15 +124,14 @@ class autoTranslator echo "File not found: " . $destPath . ". We generate it.
\n"; $this->createTranslationFile($destPath, $my_destlang); } - else - { + else { echo "Updating file: " . $destPath . "
\n"; } // Translate lines $fileContentDest = file($destPath, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES); $newlines=0; - foreach($fileContent as $line){ + foreach ($fileContent as $line){ $key = $this->getLineKey($line); $value = $this->getLineValue($line); if ($key && $value) @@ -167,7 +166,7 @@ class autoTranslator fwrite($fp, "\n"); fwrite($fp, "// START - Lines generated via autotranslator.php tool (".$this->_time.").\n"); fwrite($fp, "// Reference language: ".$this->_refLang." -> ".$my_destlang."\n"); - foreach($this->_translatedFiles[$file] as $line) { + foreach ($this->_translatedFiles[$file] as $line) { fwrite($fp, $line . "\n"); } fwrite($fp, "// STOP - Lines generated via autotranslator.php tool (".$this->_time_end.").\n"); @@ -209,7 +208,7 @@ class autoTranslator { //print "key =".$key."\n"; - foreach($content as $line) { + foreach ($content as $line) { $destKey = $this->getLineKey($line); $destValue = $this->getLineValue($line); // If translated return @@ -273,8 +272,8 @@ class autoTranslator private function getTranslationFilesArray($lang) { $dir = new DirectoryIterator($this->_langDir.$lang); - while($dir->valid()) { - if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { + while ($dir->valid()) { + if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { $files[] = $dir->getFilename(); } $dir->next(); diff --git a/dev/translation/sanity_check_en_langfiles.php b/dev/translation/sanity_check_en_langfiles.php index f568ba2b04b..0268fc94ed8 100755 --- a/dev/translation/sanity_check_en_langfiles.php +++ b/dev/translation/sanity_check_en_langfiles.php @@ -360,16 +360,14 @@ if ((! empty($_REQUEST['unused']) && $_REQUEST['unused'] == 'true') || (isset($a $unused[$value] = $line; echo $line; // $trad contains the \n } - else - { + else { unset($output); //print 'X'.$output.'Y'; } } if (empty($unused)) print "No string not used found.\n"; - else - { + else { $filetosave='/tmp/'.($argv[2]?$argv[2]:"").'notused.lang'; print "Strings in en_US that are never used are saved into file ".$filetosave.":\n"; file_put_contents($filetosave, implode("", $unused)); diff --git a/dev/translation/strip_language_file.php b/dev/translation/strip_language_file.php index f2263b1d18b..adc5a706d06 100755 --- a/dev/translation/strip_language_file.php +++ b/dev/translation/strip_language_file.php @@ -80,8 +80,8 @@ $aEnglish = array(); if ($filesToProcess == 'all') { $dir = new DirectoryIterator('htdocs/langs/'.$lPrimary); - while($dir->valid()) { - if(!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { + while ($dir->valid()) { + if (!$dir->isDot() && $dir->isFile() && ! preg_match('/^\./', $dir->getFilename())) { $files[] = $dir->getFilename(); } $dir->next(); @@ -94,7 +94,7 @@ else $filesToProcess=explode(',', $filesToProcess); // Loop on each file -foreach($filesToProcess as $fileToProcess) +foreach ($filesToProcess as $fileToProcess) { $lPrimaryFile = 'htdocs/langs/'.$lPrimary.'/'.$fileToProcess; $lSecondaryFile = 'htdocs/langs/'.$lSecondary.'/'.$fileToProcess; @@ -285,8 +285,7 @@ foreach($filesToProcess as $fileToProcess) print "Key $key is redundant in file $lPrimaryFile (line: $cnt) - Already found into ".$fileFirstFound[$key]." (line: ".$lineFirstFound[$key].").\n"; continue; } - else - { + else { $fileFirstFound[$key] = $fileToProcess; $lineFirstFound[$key] = $cnt; } diff --git a/doc/images/invoice.png b/doc/images/invoice.png new file mode 100644 index 00000000000..9be03a52ed8 Binary files /dev/null and b/doc/images/invoice.png differ diff --git a/htdocs/accountancy/admin/account.php b/htdocs/accountancy/admin/account.php index cf00519e9d7..88282447c51 100644 --- a/htdocs/accountancy/admin/account.php +++ b/htdocs/accountancy/admin/account.php @@ -54,8 +54,8 @@ if (!$user->rights->accounting->chartofaccount) accessforbidden(); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -119,8 +119,7 @@ if (empty($reshook)) { $obj = $db->fetch_object($resql); $country_code = $obj->code; - } - else dol_print_error($db); + } else dol_print_error($db); // Try to load sql file if ($country_code) @@ -143,9 +142,7 @@ if (empty($reshook)) if ($result > 0) { setEventMessages($langs->trans("ChartLoaded"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("ErrorDuringChartLoad"), null, 'warnings'); } } @@ -233,10 +230,9 @@ if (strlen(trim($search_account))) { $search_account_tmp_clean = preg_replace('/^\^/', '', $search_account_tmp); $search_account_clean = preg_replace('/^\^/', '', $search_account); } - $sql .= " AND (aa.account_number LIKE '".$startchar.$search_account_tmp_clean."'"; - $sql .= " OR aa.account_number LIKE '".$startchar.$search_account_clean."%')"; - } - else $sql .= natural_search("aa.account_number", $search_account_tmp); + $sql .= " AND (aa.account_number LIKE '".$db->escape($startchar.$search_account_tmp_clean)."'"; + $sql .= " OR aa.account_number LIKE '".$db->escape($startchar.$search_account_clean)."%')"; + } else $sql .= natural_search("aa.account_number", $search_account_tmp); } } if (strlen(trim($search_label))) $sql .= natural_search("aa.label", $search_label); @@ -267,15 +263,15 @@ if ($resql) { $num = $db->num_rows($resql); - $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; + $param = ''; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($search_account) $param .= '&search_account='.urlencode($search_account); if ($search_label) $param .= '&search_label='.urlencode($search_label); if ($search_labelshort) $param .= '&search_labelshort='.urlencode($search_labelshort); if ($search_accountparent > 0 || $search_accountparent == '0') $param .= '&search_accountparent='.urlencode($search_accountparent); if ($search_pcgtype) $param .= '&search_pcgtype='.urlencode($search_pcgtype); - if ($optioncss != '') $param .= '&optioncss='.$optioncss; + if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if (!empty($conf->use_javascript_ajax)) { @@ -298,13 +294,11 @@ if ($resql) print ''; print ''; print ''; - print ''; print ''; $newcardbutton .= dolGetButtonTitle($langs->trans("New"), $langs->trans("Addanaccount"), 'fa fa-plus-circle', './card.php?action=create'); - - print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans('ListAccounts'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); // Box to select active chart of account print $langs->trans("Selectchartofaccounts")." : "; @@ -328,8 +322,7 @@ if ($resql) $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); print ""; print ajax_combobox("chartofaccounts"); print ''; @@ -348,15 +341,15 @@ if ($resql) // Line for search fields print ''; - if (!empty($arrayfields['aa.account_number']['checked'])) print ''; - if (!empty($arrayfields['aa.label']['checked'])) print ''; - if (!empty($arrayfields['aa.labelshort']['checked'])) print ''; + if (!empty($arrayfields['aa.account_number']['checked'])) print ''; + if (!empty($arrayfields['aa.label']['checked'])) print ''; + if (!empty($arrayfields['aa.labelshort']['checked'])) print ''; if (!empty($arrayfields['aa.account_parent']['checked'])) { print ''; print $formaccounting->select_account($search_accountparent, 'search_accountparent', 2); print ''; } - if (!empty($arrayfields['aa.pcg_type']['checked'])) print ''; + if (!empty($arrayfields['aa.pcg_type']['checked'])) print ''; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['aa.reconcilable']['checked'])) print ' '; } if (!empty($arrayfields['aa.active']['checked'])) print ' '; print ''; @@ -395,7 +388,7 @@ if ($resql) if (!empty($arrayfields['aa.account_number']['checked'])) { print ""; - print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1); + print $accountstatic->getNomUrl(1, 0, 0, '', 0, 1, 0, 'accountcard'); print "\n"; if (!$i) $totalarray['nbfield']++; } @@ -421,20 +414,24 @@ if ($resql) // Account parent if (!empty($arrayfields['aa.account_parent']['checked'])) { - if (!empty($obj->account_parent)) + // Note: obj->account_parent is a foreign key to a rowid. It is field in child table and obj->rowid2 is same, but in parent table. + // So for orphans, obj->account_parent is set but not obj->rowid2 + if (!empty($obj->account_parent) && !empty($obj->rowid2)) { + print ""; + print ''; $accountparent->id = $obj->rowid2; $accountparent->label = $obj->label2; - $accountparent->account_number = $obj->account_number2; - - print ""; + $accountparent->account_number = $obj->account_number2; // Sotre an account number for output print $accountparent->getNomUrl(1); print "\n"; if (!$i) $totalarray['nbfield']++; - } - else - { - print ' '; + } else { + print ''; + if (!empty($obj->account_parent)) { + print ''; + } + print ''; if (!$i) $totalarray['nbfield']++; } } @@ -488,11 +485,11 @@ if ($resql) // Action print ''; if ($user->rights->accounting->chartofaccount) { - print ''; + print ''; print img_edit(); print ''; print ' '; - print ''; + print ''; print img_delete(); print ''; } diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index b31cd23dfa4..d3bd17d95a5 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -228,8 +228,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU'); - } - elseif ($value == 'entity') { + } elseif ($value == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -245,13 +244,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); $_POST = array('id'=>$id); // Clean $_POST array, we keep only - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { + } else { dol_print_error($db); } } @@ -260,8 +256,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Si verif ok et action modify, on modifie la ligne if ($ok && GETPOST('actionmodify', 'alpha')) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; @@ -276,8 +271,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU'); - } - elseif ($field == 'entity') { + } elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -286,7 +280,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; $i++; } - $sql .= " WHERE ".$rowidcol." = '".$rowid."'"; + $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); dol_syslog("actionmodify", LOG_DEBUG); //print $sql; @@ -306,10 +300,9 @@ if (GETPOST('actioncancel', 'alpha')) if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'"; + $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = ".((int) $rowid); dol_syslog("delete", LOG_DEBUG); $result = $db->query($sql); @@ -318,9 +311,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { + } else { dol_print_error($db); } } @@ -329,14 +320,12 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$db->escape($code)."'"; } $result = $db->query($sql); @@ -349,14 +338,12 @@ if ($action == $acts[0]) // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$db->escape($code)."'"; } $result = $db->query($sql); @@ -369,14 +356,12 @@ if ($action == $acts[1]) // favorite if ($action == 'activate_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".$db->escape($code)."'"; } $result = $db->query($sql); @@ -389,14 +374,12 @@ if ($action == 'activate_favorite') // disable favorite if ($action == 'disable_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".$db->escape($code)."'"; } $result = $db->query($sql); @@ -581,9 +564,7 @@ if ($id) print ''; print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone'); print ''; - } - else - { + } else { print ''; } } @@ -629,9 +610,7 @@ if ($id) print ' '; print ' '; - } - else - { + } else { $tmpaction = 'view'; $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -652,26 +631,20 @@ if ($id) if ($value == 'element') { $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; - } - elseif ($value == 'source') + } elseif ($value == 'source') { $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow; - } - elseif ($valuetoshow == 'all') { + } elseif ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } - elseif ($fieldlist[$field] == 'country') { + } elseif ($fieldlist[$field] == 'country') { if (empty($obj->country_code)) { $valuetoshow = '-'; - } - else - { + } else { $key = $langs->trans("Country".strtoupper($obj->country_code)); $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); } - } - elseif ($fieldlist[$field] == 'country_id') { + } elseif ($fieldlist[$field] == 'country_id') { $showfield = 0; } @@ -696,11 +669,11 @@ if ($id) print ""; // Modify link - if ($canbemodified) print ''.img_edit().''; + if ($canbemodified) print ''.img_edit().''; else print ' '; // Delete link - if ($iserasable) print ''.img_delete().''; + if ($iserasable) print ''.img_delete().''; else print ' '; print "\n"; @@ -708,8 +681,7 @@ if ($id) $i++; } } - } - else { + } else { dol_print_error($db); } @@ -761,8 +733,7 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = $fieldname = 'country'; print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone'); print ''; - } - elseif ($fieldlist[$field] == 'country_id') + } elseif ($fieldlist[$field] == 'country_id') { if (!in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) { @@ -771,8 +742,7 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = print ''; print ''; } - } - elseif ($fieldlist[$field] == 'type_cdr') { + } elseif ($fieldlist[$field] == 'type_cdr') { if ($fieldlist[$field] == 'type_cdr') print ''; else print ''; if ($fieldlist[$field] == 'type_cdr') { @@ -781,12 +751,9 @@ function fieldListAccountModel($fieldlist, $obj = '', $tabname = '', $context = print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); } print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; - } - else - { + } else { print ''; $size = ''; $class = ''; if ($fieldlist[$field] == 'code') $size = 'size="8" '; diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index 708165fc757..29ed90bb7be 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -44,6 +44,8 @@ $cancel = GETPOST('cancel', 'alpha'); $accountingaccount = GETPOST('accountingaccount', 'alpha'); // Security check +if ($user->socid > 0) accessforbidden(); +if (!$user->rights->accounting->chartofaccount) accessforbidden(); $object = new AccountingAccount($db); @@ -75,18 +77,14 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1) { $account_number = GETPOST('account_number', 'string'); - } - else - { + } else { $account_number = clean_account(GETPOST('account_number', 'string')); } if (GETPOST('account_parent', 'int') <= 0) { $account_parent = 0; - } - else - { + } else { $account_parent = GETPOST('account_parent', 'int'); } @@ -104,13 +102,11 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) $error = 1; $action = "create"; setEventMessages($object->error, $object->errors, 'errors'); - } - elseif ($res == - 4) { + } elseif ($res == - 4) { $error = 2; $action = "create"; setEventMessages($object->error, $object->errors, 'errors'); - } - elseif ($res < 0) + } elseif ($res < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); @@ -140,18 +136,14 @@ if ($action == 'add' && $user->rights->accounting->chartofaccount) if ($conf->global->ACCOUNTING_MANAGE_ZERO == 1) { $account_number = GETPOST('account_number', 'string'); - } - else - { + } else { $account_number = clean_account(GETPOST('account_number', 'string')); } if (GETPOST('account_parent', 'int') <= 0) { $account_parent = 0; - } - else - { + } else { $account_parent = GETPOST('account_parent', 'int'); } @@ -269,8 +261,7 @@ if ($action == 'create') { print ''; print ''; -} -elseif ($id > 0 || $ref) { +} elseif ($id > 0 || $ref) { $result = $object->fetch($id, $ref, 1); if ($result > 0) { @@ -381,13 +372,13 @@ elseif ($id > 0 || $ref) { print '
'; if (!empty($user->rights->accounting->chartofaccount)) { - print ''.$langs->trans('Modify').''; + print ''.$langs->trans('Modify').''; } else { print ''.$langs->trans('Modify').''; } if (!empty($user->rights->accounting->chartofaccount)) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } else { print ''.$langs->trans('Delete').''; } diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 909d633c487..f68fbc18905 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -170,9 +170,9 @@ if ($action == 'display' || $action == 'delete') { print ''.length_accountg($cpt->account_number).''; print ''.$cpt->label.''; print ''; - print "rowid."'>"; + print ''; print $langs->trans("DeleteFromCat"); - print img_picto($langs->trans("DeleteFromCat"), 'unlink'); + print img_picto($langs->trans("DeleteFromCat"), 'unlink', 'class="paddingleft"'); print ""; print ""; print "\n"; diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index 1b2733e2045..9469a1e64f1 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -235,13 +235,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); $_POST = array('id'=>$id); // Clean $_POST array, we keep only - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { + } else { dol_print_error($db); } } @@ -250,8 +247,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Si verif ok et action modify, on modifie la ligne if ($ok && GETPOST('actionmodify', 'alpha')) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; @@ -266,8 +262,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($field == 'fk_country' && $_POST['country'] > 0) { $_POST[$listfieldvalue[$i]] = $_POST['country']; - } - elseif ($field == 'entity') { + } elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -276,7 +271,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; $i++; } - $sql .= " WHERE ".$rowidcol." = '".$rowid."'"; + $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); dol_syslog("actionmodify", LOG_DEBUG); //print $sql; @@ -296,10 +291,9 @@ if (GETPOST('actioncancel', 'alpha')) if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; + $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = ".((int) $rowid); dol_syslog("delete", LOG_DEBUG); $result = $db->query($sql); @@ -308,9 +302,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { + } else { dol_print_error($db); } } @@ -319,13 +311,11 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code = '".$db->escape($code)."'"; } @@ -339,13 +329,11 @@ if ($action == $acts[0]) // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code = '".$db->escape($code)."'"; } @@ -359,13 +347,11 @@ if ($action == $acts[1]) // favorite if ($action == 'activate_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code = '".$db->escape($code)."'"; } @@ -379,13 +365,11 @@ if ($action == 'activate_favorite') // disable favorite if ($action == 'disable_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol." = '".$db->escape($rowid)."'"; - } - elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code = '".$db->escape($code)."'"; } @@ -597,9 +581,7 @@ if ($id) print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone'); print ''; $filterfound++; - } - else - { + } else { print ''; } } @@ -726,10 +708,8 @@ if ($id) print ''; print ''; print ''; - } - else - { - $tmpaction = 'view'; + } else { + $tmpaction = 'view'; $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -745,35 +725,27 @@ if ($id) if ($value == 'category_type') { $valuetoshow = yn($valuetoshow); - } - elseif ($valuetoshow == 'all') { + } elseif ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } - elseif ($fieldlist[$field] == 'country') { + } elseif ($fieldlist[$field] == 'country') { if (empty($obj->country_code)) { $valuetoshow = '-'; - } - else - { + } else { $key = $langs->trans("Country".strtoupper($obj->country_code)); $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); } - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { $key = $langs->trans("Country".strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != "Country".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { $langs->loadLangs(array("propal")); $key = $langs->trans("AvailabilityType".strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != "AvailabilityType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { $key = $langs->trans("Action".strtoupper($obj->code)); $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { + } elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $showfield = 0; } @@ -799,8 +771,7 @@ if ($id) // Active print ''; if ($canbedisabled) print ''.$actl[$obj->active].''; - else - { + else { print $langs->trans("AlwaysActive"); } print ""; @@ -816,8 +787,7 @@ if ($id) if ($user->admin) print ''.img_delete().''; //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin print ''; - } - else print ' '; + } else print ' '; // Link to setup the group print ''; @@ -833,8 +803,7 @@ if ($id) $i++; } } - } - else { + } else { dol_print_error($db); } @@ -882,14 +851,11 @@ function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $co { $fieldname = 'country_id'; print $form->select_country(GETPOST('country_id', 'int'), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone'); - } - else - { + } else { print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : $mysoc->country_code)), $fieldname, '', 28, 'maxwidth200 maxwidthonsmartphone'); } print ''; - } - elseif ($fieldlist[$field] == 'country_id') + } elseif ($fieldlist[$field] == 'country_id') { if (!in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) { @@ -898,17 +864,13 @@ function fieldListAccountingCategories($fieldlist, $obj = '', $tabname = '', $co print ''; print ''; } - } - elseif ($fieldlist[$field] == 'category_type') { + } elseif ($fieldlist[$field] == 'category_type') { print ''; print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; - } - else - { + } else { print ''; $size = ''; $class = ''; if ($fieldlist[$field] == 'code') $class = 'maxwidth100'; diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index 63b2131f309..a425fd45768 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -92,7 +92,7 @@ print ''.$langs->trans("DefaultClosureDesc").''; print '
'; -print ''; +print ''; print ''; // Define main accounts for closure diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index ad22a88f415..b9377ce4431 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -47,9 +47,9 @@ $action = GETPOST('action', 'aZ09'); $list_account_main = array( - 'ACCOUNTING_ACCOUNT_CUSTOMER', - 'ACCOUNTING_ACCOUNT_SUPPLIER', - 'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT', + 'ACCOUNTING_ACCOUNT_CUSTOMER', + 'ACCOUNTING_ACCOUNT_SUPPLIER', + 'SALARIES_ACCOUNTING_ACCOUNT_PAYMENT', ); $list_account = array(); @@ -75,7 +75,7 @@ if ($mysoc->isInEEC()) { $list_account[] = 'ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT'; } $list_account[] = 'ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT'; -$list_account[] = '---Other---'; +$list_account[] = '---Others---'; $list_account[] = 'ACCOUNTING_VAT_BUY_ACCOUNT'; $list_account[] = 'ACCOUNTING_VAT_SOLD_ACCOUNT'; $list_account[] = 'ACCOUNTING_VAT_PAY_ACCOUNT'; @@ -94,26 +94,13 @@ if ($conf->loan->enabled) { $list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INTEREST'; $list_account[] = 'LOAN_ACCOUNTING_ACCOUNT_INSURANCE'; } +if ($conf->societe->enabled) { + $list_account[] = 'ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT'; +} /* * Actions */ - -$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE; - -if (GETPOST('change_chart', 'alpha')) -{ - $chartofaccounts = GETPOST('chartofaccounts', 'int'); - - if (!empty($chartofaccounts)) { - if (!dolibarr_set_const($db, 'CHARTOFACCOUNTS', $chartofaccounts, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } else { - $error++; - } -} - if ($action == 'update') { $error = 0; @@ -133,9 +120,9 @@ if ($action == 'update') { $constvalue = GETPOST($constname, 'alpha'); - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } } if (!$error) { @@ -172,20 +159,20 @@ print ''; print ''; foreach ($list_account_main as $key) { - print ''; - // Param - $label = $langs->trans($key); - $keydesc = $key.'_Desc'; + print ''; + // Param + $label = $langs->trans($key); + $keydesc = $key.'_Desc'; - $htmltext = $langs->trans($keydesc); - print ''; - // Value - print ''; - print ''; + $htmltext = $langs->trans($keydesc); + print ''; + // Value + print ''; + print ''; } @@ -193,8 +180,7 @@ foreach ($list_account as $key) { $reg = array(); if (preg_match('/---(.*)---/', $key, $reg)) { print ''; - } - else { + } else { print ''; // Param $label = $langs->trans($key); diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index b5cc46a3d0d..1ddcddf13e6 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -29,8 +29,8 @@ $action = GETPOST('action', 'aZ09'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -79,6 +79,7 @@ $object = new Fiscalyear($db); $max = 100; $form = new Form($db); +$fiscalyearstatic = new Fiscalyear($db); $title = $langs->trans('AccountingPeriods'); $helpurl = ""; @@ -132,13 +133,15 @@ if ($result) print ''; if ($num) { - $fiscalyearstatic = new Fiscalyear($db); - while ($i < $num && $i < $max) { $obj = $db->fetch_object($result); + $fiscalyearstatic->id = $obj->rowid; + print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 88890aa004f..a4227a761a4 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -71,9 +71,7 @@ if ($action == 'confirm_delete' && $confirm == "yes") { } else { setEventMessages($object->error, $object->errors, 'errors'); } -} - -elseif ($action == 'add') { +} elseif ($action == 'add') { if (!GETPOST('cancel', 'alpha')) { $error = 0; @@ -302,16 +300,16 @@ if ($action == 'create') if (!empty($user->rights->accounting->fiscalyear->write)) { - /* + /* * Barre d'actions */ - print '
'; + print ''; + print '
'; } } } else { diff --git a/htdocs/accountancy/admin/index.php b/htdocs/accountancy/admin/index.php index 006db08fe9c..516af988334 100644 --- a/htdocs/accountancy/admin/index.php +++ b/htdocs/accountancy/admin/index.php @@ -31,9 +31,10 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "admin", "accountancy")); +$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "other")); // Security access if (empty($user->rights->accounting->chartofaccount)) @@ -45,78 +46,95 @@ $action = GETPOST('action', 'aZ09'); // Parameters ACCOUNTING_* and others $list = array( - 'ACCOUNTING_LENGTH_GACCOUNT', - 'ACCOUNTING_LENGTH_AACCOUNT', + 'ACCOUNTING_LENGTH_GACCOUNT', + 'ACCOUNTING_LENGTH_AACCOUNT', // 'ACCOUNTING_LENGTH_DESCRIPTION', // adjust size displayed for lines description for dol_trunc // 'ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT', // adjust size displayed for select account description for dol_trunc ); - +$list_binding = array( + 'ACCOUNTING_DATE_START_BINDING', + 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER' +); /* * Actions */ -$accounting_mode = empty($conf->global->ACCOUNTING_MODE) ? 'RECETTES-DEPENSES' : $conf->global->ACCOUNTING_MODE; - if ($action == 'update') { $error = 0; if (!$error) { - foreach ($list as $constname) - { - $constvalue = GETPOST($constname, 'alpha'); + foreach ($list as $constname) + { + $constvalue = GETPOST($constname, 'alpha'); - if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { - $error++; - } - } - if ($error) { - setEventMessages($langs->trans("Error"), null, 'errors'); - } + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + if ($error) { + setEventMessages($langs->trans("Error"), null, 'errors'); + } + + foreach ($list_binding as $constname) + { + $constvalue = GETPOST($constname, 'alpha'); + + if ($constname == 'ACCOUNTING_DATE_START_BINDING') { + $constvalue = dol_mktime(12, 0, 0, GETPOST($constname.'month', 'int'), GETPOST($constname.'day', 'int'), GETPOST($constname.'year', 'int')); + } + + if (!dolibarr_set_const($db, $constname, $constvalue, 'chaine', 0, '', $conf->entity)) { + $error++; + } + } + if ($error) { + setEventMessages($langs->trans("Error"), null, 'errors'); + } } - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } } if ($action == 'setlistsorttodo') { - $setlistsorttodo = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; + $setlistsorttodo = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_TODO", $setlistsorttodo, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setlistsortdone') { - $setlistsortdone = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + $setlistsortdone = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_LIST_SORT_VENTILATION_DONE", $setlistsortdone, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setmanagezero') { - $setmanagezero = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + $setmanagezero = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_MANAGE_ZERO", $setmanagezero, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } if ($action == 'setdisabledirectinput') { @@ -144,20 +162,57 @@ if ($action == 'setenabledraftexport') { } if ($action == 'setenablesubsidiarylist') { - $setenablesubsidiarylist = GETPOST('value', 'int'); - $res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity); - if (!$res > 0) - $error++; - if (!$error) { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } else { - setEventMessages($langs->trans("Error"), null, 'mesgs'); - } + $setenablesubsidiarylist = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTANCY_COMBO_FOR_AUX", $setenablesubsidiarylist, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + +if ($action == 'setdisablebindingonsales') { + $setdisablebindingonsales = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_SALES", $setdisablebindingonsales, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + +if ($action == 'setdisablebindingonpurchases') { + $setdisablebindingonpurchases = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_PURCHASES", $setdisablebindingonpurchases, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } +} + +if ($action == 'setdisablebindingonexpensereports') { + $setdisablebindingonexpensereports = GETPOST('value', 'int'); + $res = dolibarr_set_const($db, "ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS", $setdisablebindingonexpensereports, 'yesno', 0, '', $conf->entity); + if (!$res > 0) + $error++; + if (!$error) { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'mesgs'); + } } /* * View */ +$form = new Form($db); $title = $langs->trans('ConfigAccountingExpert'); llxHeader('', $title); @@ -170,155 +225,187 @@ print ''; print ''; print ''; -// Default mode for calculating turnover (parameter ACCOUNTING_MODE) -/* +// Params print '
'.$langs->trans("ThirdParties").' | '.$langs->trans("Users").'
'; - print $form->textwithpicto($label, $htmltext); - print ''; // Do not force class=right, or it align also the content of the select box - print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); - print '
'; + print $form->textwithpicto($label, $htmltext); + print ''; // Do not force class=right, or it align also the content of the select box + print $formaccounting->select_account($conf->global->$key, $key, 1, '', 1, 1); + print '
'.$langs->trans($reg[1]).'
'.img_object($langs->trans("ShowFiscalYear"), "technic").' '.$obj->rowid.''; + print $fiscalyearstatic->getNomUrl(1); + print ''.$obj->label.''.dol_print_date($db->jdate($obj->date_start), 'day').''.dol_print_date($db->jdate($obj->date_end), 'day').'
'; - print ''; -print ''; +print ''; print "\n"; -print ''; -print '\n"; -print ''; -print '\n"; -print "
' . $langs->trans('OptionMode') . '' . $langs->trans('Description') . ''.$langs->trans('Options').'
' . $langs->trans('OptionModeTrue') . '' . nl2br($langs->trans('OptionModeTrueDesc')); -// Write info on way to count VAT -// if (! empty($conf->global->MAIN_MODULE_COMPTABILITE)) -// { -// // print "
\n"; -// // print nl2br($langs->trans('OptionModeTrueInfoModuleComptabilite')); -// } -// else -// { -// // print "
\n"; -// // print nl2br($langs->trans('OptionModeTrueInfoExpert')); -// } -print "
' . $langs->trans('OptionModeVirtual') . '' . nl2br($langs->trans('OptionModeVirtualDesc')) . "
\n"; +// TO DO Mutualize code for yes/no constants - -print '
'; +/* Set this option as a hidden option but keep it for some needs. +print ''; +print ''.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").''; +if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; +} else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; +} +print ''; */ -// Others params - -print ''; -print ''; -print ''; -print "\n"; - -if (!empty($user->admin)) -{ - // TO DO Mutualize code for yes/no constants - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) { - print ''; - } else { - print ''; - } - print ''; - - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) { - print ''; - } else { - print ''; - } - print ''; - - /* Set this option as a hidden option but keep it for some needs. - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL)) { - print ''; - } else { - print ''; - } - print ''; - */ - - print ''; - print ''; - if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) { - print ''; - } else { - print ''; - } - print ''; - - print ''; - print ''; - if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { - print ''; - } else { - print ''; - } - print ''; - - print ''; - print ''; - if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) { - print ''; - } else { - print ''; - } - print ''; +print ''; +print ''; +if (!empty($conf->global->BANK_DISABLE_DIRECT_INPUT)) { + print ''; +} else { + print ''; } +print ''; +print ''; +print ''; +if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO)) { + print ''; +} else { + print ''; +} +print ''; // Param a user $user->rights->accounting->chartofaccount can access foreach ($list as $key) { - print ''; + print ''; - if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue; + if (!empty($conf->global->ACCOUNTING_MANAGE_ZERO) && ($key == 'ACCOUNTING_LENGTH_GACCOUNT' || $key == 'ACCOUNTING_LENGTH_AACCOUNT')) continue; - // Param - $label = $langs->trans($key); - print ''; - // Value - print ''; + // Param + $label = $langs->trans($key); + print ''; + // Value + print ''; + print ''; + print ''; +} +print '
'.$langs->trans('OtherOptions').'
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("ACCOUNTING_MANAGE_ZERO").''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print '
'.$langs->trans("BANK_DISABLE_DIRECT_INPUT").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTANCY_COMBO_FOR_AUX").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_MANAGE_ZERO").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$label.''; - print ''; - print ''.$label.''; + print ''; - print '
'; +print '
'; + +// Binding params +print ''; +print ''; +print ''; +print "\n"; + +// TO DO Mutualize code for yes/no constants +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_TODO)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_LIST_SORT_VENTILATION_DONE)) { + print ''; +} else { + print ''; +} +print ''; + +// Param a user $user->rights->accounting->chartofaccount can access +foreach ($list_binding as $key) +{ + print ''; + + // Param + $label = $langs->trans($key); + print ''; + // Value + print ''; + print ''; } +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) { + print ''; +} else { + print ''; +} +print ''; + +print ''; +print ''; +if (!empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) { + print ''; +} else { + print ''; +} +print ''; print '
'.$langs->trans('BindingOptions').'
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_TODO").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_LIST_SORT_VENTILATION_DONE").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$label.''; + if ($key == 'ACCOUNTING_DATE_START_BINDING') { + print $form->selectDate(($conf->global->$key ? $db->idate($conf->global->$key) : -1), $key, 0, 0, 1); + } elseif ($key == 'ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER') { + $array = array(0=>$langs->trans("PreviousMonth"), 1=>$langs->trans("CurrentMonth"), 2=>$langs->trans("Fiscalyear")); + print $form->selectarray($key, $array, (isset($conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER) ? $conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER : 0)); + } else { + print ''; + } + + print '
'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_SALES").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_PURCHASES").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'.$langs->trans("ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS").''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print '
'; print '
'; -print '
'; -print '
'; - -print '
'; print '
'; // End of page diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index e34ce8094dd..819160e7d23 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -22,6 +22,8 @@ * \brief Setup page to configure journals */ +if (!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET + require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; @@ -238,13 +240,10 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); $_POST = array('id'=>$id); // Clean $_POST array, we keep only - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { + } else { dol_print_error($db); } } @@ -253,8 +252,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) // Si verif ok et action modify, on modifie la ligne if ($ok && GETPOST('actionmodify', 'alpha')) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } // Modify entry $sql = "UPDATE ".$tabname[$id]." SET "; @@ -269,8 +267,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { $_POST[$listfieldvalue[$i]] = price2num($_POST[$listfieldvalue[$i]], 'MU'); - } - elseif ($field == 'entity') { + } elseif ($field == 'entity') { $_POST[$listfieldvalue[$i]] = $conf->entity; } if ($i) $sql .= ","; @@ -279,7 +276,7 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; $i++; } - $sql .= " WHERE ".$rowidcol." = '".$rowid."'"; + $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); $sql .= " AND entity = ".$conf->entity; dol_syslog("actionmodify", LOG_DEBUG); @@ -300,10 +297,9 @@ if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'"; + $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol." = ".((int) $rowid); $sql .= " AND entity = ".$conf->entity; dol_syslog("delete", LOG_DEBUG); @@ -313,9 +309,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') { setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { + } else { dol_print_error($db); } } @@ -324,14 +318,12 @@ if ($action == 'confirm_delete' && $confirm == 'yes') // delete // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".$db->escape($code)."'"; } $sql .= " AND entity = ".$conf->entity; @@ -345,14 +337,12 @@ if ($action == $acts[0]) // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'"; - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$code."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol." = ".((int) $rowid); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".$db->escape($code)."'"; } $sql .= " AND entity = ".$conf->entity; @@ -595,9 +585,7 @@ if ($id) print ''; print '
'; print ''; - } - else - { + } else { $tmpaction = 'view'; $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks @@ -614,12 +602,10 @@ if ($id) $valuetoshow = $obj->{$fieldlist[$field]}; if ($valuetoshow == 'all') { $valuetoshow = $langs->trans('All'); - } - elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { + } elseif ($fieldlist[$field] == 'nature' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { $key = $langs->trans("AccountingJournalType".strtoupper($obj->nature)); $valuetoshow = ($obj->nature && $key != "AccountingJournalType".strtoupper($langs->trans($obj->nature)) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'accounting_journal') { $valuetoshow = $langs->trans($obj->label); } @@ -652,23 +638,22 @@ if ($id) // Active print ''; - if ($canbedisabled) print ''.$actl[$obj->active].''; + if ($canbedisabled) print ''.$actl[$obj->active].''; else print $langs->trans("AlwaysActive"); print ""; // Modify link - if ($canbemodified) print ''.img_edit().''; + if ($canbemodified) print ''.img_edit().''; else print ' '; // Delete link if ($iserasable) { print ''; - if ($user->admin) print ''.img_delete().''; + if ($user->admin) print ''.img_delete().''; //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin print ''; - } - else print ' '; + } else print ' '; print ''; @@ -679,8 +664,7 @@ if ($id) $i++; } } - } - else { + } else { dol_print_error($db); } @@ -724,12 +708,9 @@ function fieldListJournal($fieldlist, $obj = '', $tabname = '', $context = '') print ''; print $form->selectarray('nature', $sourceList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; - } - else - { + } else { print ''; $size = ''; $class = ''; if ($fieldlist[$field] == 'code') $class = 'maxwidth100'; diff --git a/htdocs/accountancy/admin/productaccount.php b/htdocs/accountancy/admin/productaccount.php index e32e47b169d..d88800016a8 100644 --- a/htdocs/accountancy/admin/productaccount.php +++ b/htdocs/accountancy/admin/productaccount.php @@ -57,6 +57,7 @@ $changeaccount_sell = GETPOST('changeaccount_sell', 'array'); $search_ref = GETPOST('search_ref', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); $search_desc = GETPOST('search_desc', 'alpha'); +$search_vat = GETPOST('search_vat', 'alpha'); $search_current_account = GETPOST('search_current_account', 'alpha'); $search_current_account_valid = GETPOST('search_current_account_valid', 'alpha'); if ($search_current_account_valid == '') $search_current_account_valid = 'withoutvalidaccount'; @@ -102,6 +103,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_ref = ''; $search_label = ''; $search_desc = ''; + $search_vat = ''; $search_onsell = ''; $search_onpurchase = ''; $search_current_account = ''; @@ -136,7 +138,7 @@ if ($action == 'update') { if (!empty($chk_prod)) { $accounting = new AccountingAccount($db); - //$msg .= '
' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '
'; + //$msg .= '
' . count($chk_prod) . ' ' . $langs->trans("SelectedLines") . '
'; $arrayofdifferentselectedvalues = array(); $cpt = 0; $ok = 0; $ko = 0; @@ -152,7 +154,7 @@ if ($action == 'update') { } if ($result <= 0) { // setEventMessages(null, $accounting->errors, 'errors'); - $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'
'.$sql.'
'; + $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Product").' '.$productid.' '.$langs->trans("NotVentilatedinAccount").' : id='.$accounting_account_id.'
'.$sql.'
'; $ko++; } else { $db->begin(); @@ -176,7 +178,7 @@ if ($action == 'update') { if ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { $sql .= " SET accountancy_code_sell_export = ".$accounting->account_number; } - $sql .= " WHERE rowid = ".$productid; + $sql .= " WHERE rowid = ".((int) $productid); dol_syslog("/accountancy/admin/productaccount.php sql=".$sql, LOG_DEBUG); if ($db->query($sql)) @@ -243,7 +245,7 @@ $pcgverid = $conf->global->CHARTOFACCOUNTS; $pcgvercode = dol_getIdFromCode($db, $pcgverid, 'accounting_system', 'rowid', 'pcg_version'); if (empty($pcgvercode)) $pcgvercode = $pcgverid; -$sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy,"; +$sql = "SELECT p.rowid, p.ref, p.label, p.description, p.tosell, p.tobuy, p.tva_tx,"; $sql .= " p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export,"; $sql .= " p.accountancy_code_buy, p.accountancy_code_buy_intra, p.accountancy_code_buy_export,"; $sql .= " p.tms, p.fk_product_type as product_type,"; @@ -251,27 +253,21 @@ $sql .= " aa.rowid as aaid"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON"; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { - $sql .= " p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') + $sql .= " p.accountancy_code_buy = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; +} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { - $sql .= " p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') + $sql .= " p.accountancy_code_buy_intra = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; +} elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { - $sql .= " p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') + $sql .= " p.accountancy_code_buy_export = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; +} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL') { - $sql .= " p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') + $sql .= " p.accountancy_code_sell = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; +} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { - $sql .= " p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; -} -else -{ - $sql .= " p.accountancy_code_sell_export = aa.account_number AND aa.fk_pcg_version = '".$pcgvercode."'"; + $sql .= " p.accountancy_code_sell_intra = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; +} else { + $sql .= " p.accountancy_code_sell_export = aa.account_number AND aa.fk_pcg_version = '".$db->escape($pcgvercode)."'"; } $sql .= ' WHERE p.entity IN ('.getEntity('product').')'; if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { @@ -290,13 +286,11 @@ if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell", $search_current_account); } -} -elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { +} elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell_intra", $search_current_account); } -} -else { +} else { if (strlen(trim($search_current_account))) { $sql .= natural_search("p.accountancy_code_sell_export", $search_current_account); } @@ -319,6 +313,9 @@ if (strlen(trim($search_label))) { if (strlen(trim($search_desc))) { $sql .= natural_search("p.description", $search_desc); } +if (strlen(trim($search_vat))) { + $sql .= natural_search("p.tva_tx", price2num($search_vat), 1); +} if ($search_onsell != '' && $search_onsell != '-1') $sql .= natural_search('p.tosell', $search_onsell, 1); if ($search_onpurchase != '' && $search_onpurchase != '-1') $sql .= natural_search('p.tobuy', $search_onpurchase, 1); @@ -351,6 +348,7 @@ if ($result) if ($search_ref > 0) $param .= "&search_desc=".urlencode($search_ref); if ($search_label > 0) $param .= "&search_desc=".urlencode($search_label); if ($search_desc > 0) $param .= "&search_desc=".urlencode($search_desc); + if ($search_vat > 0) $param .= '&search_vat='.urlencode($search_vat); if ($search_current_account > 0) $param .= "&search_current_account=".urlencode($search_current_account); if ($search_current_account_valid && $search_current_account_valid != '-1') $param .= "&search_current_account_valid=".urlencode($search_current_account_valid); if ($accounting_product_mode) $param .= '&accounting_product_mode='.urlencode($accounting_product_mode); @@ -419,6 +417,8 @@ if ($result) print ''; print ''; print ''; + print ''; + if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print ''; // On sell if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { @@ -445,7 +445,8 @@ if ($result) print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder); if (!empty($conf->global->ACCOUNTANCY_SHOW_PROD_DESC)) print_liste_field_titre("Description", $_SERVER["PHP_SELF"], "p.description", "", $param, '', $sortfield, $sortorder); - // On sell / On purchase + print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "p.tva_tx", "", $param, '', $sortfield, $sortorder, 'right '); + // On sell / On purchase if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { print_liste_field_titre("OnSell", $_SERVER["PHP_SELF"], "p.tosell", "", $param, '', $sortfield, $sortorder, 'center '); $fieldtosortaccount = "p.accountancy_code_sell"; @@ -492,34 +493,27 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell_export; - } - else { + } else { $compta_prodsell = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_prodsell; } - } - else { + } else { if ($accounting_product_mode == 'ACCOUNTANCY_SELL') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell_export; - } - else { + } else { $compta_prodsell = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodsell_id = $aarowid_servsell; } @@ -530,34 +524,27 @@ if ($result) if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy_export; - } - else { + } else { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_prodbuy; } - } - else { + } else { if ($accounting_product_mode == 'ACCOUNTANCY_BUY') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy_intra; - } - elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy_export; - } - else { + } else { $compta_prodbuy = (!empty($conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_BUY_ACCOUNT : $langs->trans("CodeNotDef")); $compta_prodbuy_id = $aarowid_servbuy; } @@ -575,11 +562,16 @@ if ($result) { // TODO ADJUST DESCRIPTION SIZE // print '' . $obj->description . ''; - // TODO: we shoul set a user defined value to adjust user square / wide screen size - $trunclengh = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; - print ''.nl2br(dol_trunc($obj->description, $trunclengh)).''; + // TODO: we should set a user defined value to adjust user square / wide screen size + $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; + print ''.nl2br(dol_trunc($obj->description, $trunclength)).''; } + // VAT + print ''; + print vatrate($obj->tva_tx); + print ''; + if ($accounting_product_mode == 'ACCOUNTANCY_SELL' || $accounting_product_mode == 'ACCOUNTANCY_SELL_INTRA' || $accounting_product_mode == 'ACCOUNTANCY_SELL_EXPORT') print ''.$product_static->getLibStatut(3, 0).''; @@ -620,21 +612,21 @@ if ($result) if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; - } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_INTRA') { // Accounting account buy intra (In EEC) print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy_intra; + if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy; $codesell = length_accountg($obj->accountancy_code_buy_intra); //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid print $form->select_account($defaultvalue, 'codeventil_'.$product_static->id, 1, array(), 1); print ''; - } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { + } elseif ($accounting_product_mode == 'ACCOUNTANCY_BUY_EXPORT') { // Accounting account buy export (Out of EEC) print ''; //$defaultvalue=GETPOST('codeventil_' . $product_static->id,'alpha'); This is id and we need a code - if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy_export; + if (empty($defaultvalue)) $defaultvalue = $compta_prodbuy; $codesell = length_accountg($obj->accountancy_code_buy_export); //var_dump($defaultvalue.' - '.$codesell.' - '.$compta_prodsell); if (!empty($obj->aaid)) $defaultvalue = ''; // Do not suggest default new value is code is already valid diff --git a/htdocs/accountancy/admin/subaccount.php b/htdocs/accountancy/admin/subaccount.php new file mode 100644 index 00000000000..4b44bd35149 --- /dev/null +++ b/htdocs/accountancy/admin/subaccount.php @@ -0,0 +1,419 @@ + + * Copyright (C) 2013-2020 Alexandre Spangaro + * Copyright (C) 2016-2018 Laurent Destailleur + * + * 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 . + */ + +/** + * \file htdocs/accountancy/admin/subaccount.php + * \ingroup Accountancy (Double entries) + * \brief List of accounting sub-account (auxiliary accounts) + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array("compta", "bills", "admin", "accountancy", "salaries", "hrm", "errors")); + +$mesg = ''; +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'alpha'); +$id = GETPOST('id', 'int'); +$rowid = GETPOST('rowid', 'int'); +$massaction = GETPOST('massaction', 'aZ09'); +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'accountingsubaccountlist'; // To manage different context of search + +$search_subaccount = GETPOST('search_subaccount', 'alpha'); +$search_label = GETPOST('search_label', 'alpha'); +$search_type = GETPOST('search_type', 'int'); + +// Security check +if ($user->socid > 0) accessforbidden(); +if (!$user->rights->accounting->chartofaccount) accessforbidden(); + +// Load variable for pagination +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortfield) $sortfield = "label"; +if (!$sortorder) $sortorder = "ASC"; + +$arrayfields = array( + 'subaccount'=>array('label'=>$langs->trans("AccountNumber"), 'checked'=>1), + 'label'=>array('label'=>$langs->trans("Label"), 'checked'=>1), + 'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1), + 'reconcilable'=>array('label'=>$langs->trans("Reconcilable"), 'checked'=>1) +); + +if ($conf->global->MAIN_FEATURES_LEVEL < 2) unset($arrayfields['reconcilable']); + +/* + * Actions + */ + +if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } +if (!GETPOST('confirmmassaction', 'alpha')) { $massaction = ''; } + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) +{ + if (!empty($cancel)) $action = ''; + + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers + { + $search_subaccount = ""; + $search_label = ""; + $search_type = ""; + $search_array_options = array(); + } +} + + +/* + * View + */ + +$form = new Form($db); + +$title = $langs->trans('ChartOfIndividualAccountsOfSubsidiaryLedger'); + +llxHeader('', $title); + +// Customer +$sql = "SELECT sa.rowid, sa.nom as label, sa.code_compta as subaccount, '0' as type, sa.entity"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe sa"; +$sql .= " WHERE sa.entity IN (".getEntity('societe').")"; +$sql .= " AND sa.code_compta <> ''"; +//print $sql; +if (strlen(trim($search_subaccount))) { + $lengthpaddingaccount = 0; + if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) { + $lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT); + } + $search_subaccount_tmp = $search_subaccount; + $weremovedsomezero = 0; + if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) { + for ($i = 0; $i < $lengthpaddingaccount; $i++) { + if (preg_match('/0$/', $search_subaccount_tmp)) { + $weremovedsomezero++; + $search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp); + } + } + } + + //var_dump($search_subaccount); exit; + if ($search_subaccount_tmp) { + if ($weremovedsomezero) { + $search_subaccount_tmp_clean = $search_subaccount_tmp; + $search_subaccount_clean = $search_subaccount; + $startchar = '%'; + if (strpos($search_subaccount_tmp, '^') === 0) + { + $startchar = ''; + $search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp); + $search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount); + } + $sql .= " AND (sa.code_compta LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'"; + $sql .= " OR sa.code_compta LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')"; + } else $sql .= natural_search("sa.code_compta", $search_subaccount_tmp); + } +} +if (strlen(trim($search_label))) $sql .= natural_search("sa.nom", $search_label); +if (!empty($search_type) && $search_type >= 0) $sql .= " HAVING type LIKE '".$db->escape($search_type)."'"; + +// Supplier +$sql .= " UNION "; +$sql .= " SELECT sa.rowid, sa.nom as label, sa.code_compta_fournisseur as subaccount, '1' as type, sa.entity FROM ".MAIN_DB_PREFIX."societe sa"; +$sql .= " WHERE sa.entity IN (".getEntity('societe').")"; +$sql .= " AND sa.code_compta_fournisseur <> ''"; +//print $sql; +if (strlen(trim($search_subaccount))) { + $lengthpaddingaccount = 0; + if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) { + $lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT); + } + $search_subaccount_tmp = $search_subaccount; + $weremovedsomezero = 0; + if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) { + for ($i = 0; $i < $lengthpaddingaccount; $i++) { + if (preg_match('/0$/', $search_subaccount_tmp)) { + $weremovedsomezero++; + $search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp); + } + } + } + + //var_dump($search_subaccount); exit; + if ($search_subaccount_tmp) { + if ($weremovedsomezero) { + $search_subaccount_tmp_clean = $search_subaccount_tmp; + $search_subaccount_clean = $search_subaccount; + $startchar = '%'; + if (strpos($search_subaccount_tmp, '^') === 0) + { + $startchar = ''; + $search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp); + $search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount); + } + $sql .= " AND (sa.code_compta_fournisseur LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'"; + $sql .= " OR sa.code_compta_fournisseur LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')"; + } else $sql .= natural_search("sa.code_compta_fournisseur", $search_subaccount_tmp); + } +} +if (strlen(trim($search_label))) $sql .= natural_search("sa.nom", $search_label); +if (!empty($search_type) && $search_type >= 0) $sql .= " HAVING type LIKE '".$db->escape($search_type)."'"; + +// User +$sql .= " UNION "; +$sql .= " SELECT u.rowid, u.lastname as label, u.accountancy_code as subaccount, '2' as type, u.entity FROM ".MAIN_DB_PREFIX."user u"; +$sql .= " WHERE u.entity IN (".getEntity('user').")"; +$sql .= " AND u.accountancy_code <> ''"; +//print $sql; +if (strlen(trim($search_subaccount))) { + $lengthpaddingaccount = 0; + if ($conf->global->ACCOUNTING_LENGTH_AACCOUNT) { + $lengthpaddingaccount = max($conf->global->ACCOUNTING_LENGTH_AACCOUNT); + } + $search_subaccount_tmp = $search_subaccount; + $weremovedsomezero = 0; + if (strlen($search_subaccount_tmp) <= $lengthpaddingaccount) { + for ($i = 0; $i < $lengthpaddingaccount; $i++) { + if (preg_match('/0$/', $search_subaccount_tmp)) { + $weremovedsomezero++; + $search_subaccount_tmp = preg_replace('/0$/', '', $search_subaccount_tmp); + } + } + } + + //var_dump($search_subaccount); exit; + if ($search_subaccount_tmp) { + if ($weremovedsomezero) { + $search_subaccount_tmp_clean = $search_subaccount_tmp; + $search_subaccount_clean = $search_subaccount; + $startchar = '%'; + if (strpos($search_subaccount_tmp, '^') === 0) + { + $startchar = ''; + $search_subaccount_tmp_clean = preg_replace('/^\^/', '', $search_subaccount_tmp); + $search_subaccount_clean = preg_replace('/^\^/', '', $search_subaccount); + } + $sql .= " AND (u.accountancy_code LIKE '".$db->escape($startchar.$search_subaccount_tmp_clean)."'"; + $sql .= " OR u.accountancy_code LIKE '".$db->escape($startchar.$search_subaccount_clean)."%')"; + } else $sql .= natural_search("u.accountancy_code", $search_subaccount_tmp); + } +} +if (strlen(trim($search_label))) $sql .= natural_search("u.lastname", $search_label); +if (!empty($search_type) && $search_type >= 0) $sql .= " HAVING type LIKE '".$db->escape($search_type)."'"; + +$sql .= $db->order($sortfield, $sortorder); + +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) +{ + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } +} + +$sql .= $db->plimit($limit + 1, $offset); + +dol_syslog('accountancy/admin/subaccount.php:: $sql='.$sql); +$resql = $db->query($sql); + +if ($resql) +{ + $num = $db->num_rows($resql); + + $param = ''; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($search_subaccount) $param .= '&search_subaccount='.urlencode($search_subaccount); + if ($search_label) $param .= '&search_label='.urlencode($search_label); + if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + + print '
'; + if ($optioncss != '') print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, '', '', $limit, 0, 0, 1); + + print '
'.$langs->trans("WarningCreateSubAccounts").'
'; + + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + + $moreforfilter = ''; + $massactionbutton = ''; + + print '
'; + print ''."\n"; + + // Line for search fields + print ''; + if (!empty($arrayfields['subaccount']['checked'])) print ''; + if (!empty($arrayfields['label']['checked'])) print ''; + if (!empty($arrayfields['type']['checked'])) print ''; + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['reconcilable']['checked'])) print ''; } + print ''; + print ''; + + print ''; + if (!empty($arrayfields['subaccount']['checked'])) print_liste_field_titre($arrayfields['subaccount']['label'], $_SERVER["PHP_SELF"], "subaccount", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields['label']['checked'])) print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], "label", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields['type']['checked'])) print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'center '); + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { if (!empty($arrayfields['reconcilable']['checked'])) print_liste_field_titre($arrayfields['reconcilable']['label'], $_SERVER["PHP_SELF"], 'reconcilable', '', $param, '', $sortfield, $sortorder, 'center '); } + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); + print "\n"; + + $totalarray = array(); + $i = 0; + while ($i < min($num, $limit)) + { + $obj = $db->fetch_object($resql); + + print ''; + + // Account number + if (!empty($arrayfields['subaccount']['checked'])) + { + print "\n"; + if (!$i) $totalarray['nbfield']++; + } + + // Subaccount label + if (!empty($arrayfields['label']['checked'])) + { + print "\n"; + if (!$i) $totalarray['nbfield']++; + } + + // Type + if (!empty($arrayfields['type']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } + + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { + // Activated or not reconciliation on accounting account + if (!empty($arrayfields['reconcilable']['checked'])) { + print ''; + if (!$i) { + $totalarray['nbfield']++; + } + } + } + + // Action + print ''."\n"; + if (!$i) $totalarray['nbfield']++; + + print ''."\n"; + $i++; + } + + $db->free($resql); + + $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); + $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + print "
'.$form->selectarray('search_type', array('0'=>$langs->trans('Customer'), '1'=>$langs->trans('Supplier'), '2'=>$langs->trans('Employee')), $search_type, 1).' '; + $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + print $searchpicto; + print '
"; + print length_accounta($obj->subaccount); + print ""; + print $obj->label; + print "'; + $s = ''; + // Customer + if ($obj->type == 0) + { + $s .= ''.$langs->trans("Customer").''; + } + // Supplier + elseif ($obj->type == 1) + { + $s .= ''.$langs->trans("Supplier").''; + } + // User + elseif ($obj->type == 2) + { + $s .= ''.$langs->trans("Employee").''; + } + print $s; + print ''; + if (empty($obj->reconcilable)) { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } + print ''; + $e = ''; + // Customer + if ($obj->type == 0) + { + $e .= ''.img_edit().''; + } + // Supplier + elseif ($obj->type == 1) + { + $e .= ''.img_edit().''; + } + // User + elseif ($obj->type == 2) + { + $e .= ''.img_edit().''; + } + print $e; + print '
"; + print "
"; + + print '
'; +} else { + dol_print_error($db); +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/accountancy/bookkeeping/balance.php b/htdocs/accountancy/bookkeeping/balance.php index a9a1f1d12cf..c3e225e5399 100644 --- a/htdocs/accountancy/bookkeeping/balance.php +++ b/htdocs/accountancy/bookkeeping/balance.php @@ -1,7 +1,7 @@ * Copyright (C) 2016 Florian Henry - * Copyright (C) 2016-2019 Alexandre Spangaro + * Copyright (C) 2016-2020 Alexandre Spangaro * Copyright (C) 2018 Frédéric France * * This program is free software; you can redistribute it and/or modify @@ -31,6 +31,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/bookkeeping.class.php'; +require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancyexport.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -45,8 +46,8 @@ $action = GETPOST('action', 'aZ09'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -55,7 +56,7 @@ $pagenext = $page + 1; //if (! $sortfield) $sortfield="p.date_fin"; //if (! $sortorder) $sortorder="DESC"; - +$show_subgroup = GETPOST('show_subgroup', 'alpha'); $search_date_start = dol_mktime(0, 0, 0, GETPOST('date_startmonth', 'int'), GETPOST('date_startday', 'int'), GETPOST('date_startyear', 'int')); $search_date_end = dol_mktime(23, 59, 59, GETPOST('date_endmonth', 'int'), GETPOST('date_endday', 'int'), GETPOST('date_endyear', 'int')); @@ -130,10 +131,11 @@ if (!empty($search_accountancy_code_end)) { if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { - $search_accountancy_code_start = ''; - $search_accountancy_code_end = ''; + $show_subgroup = ''; $search_date_start = ''; $search_date_end = ''; + $search_accountancy_code_start = ''; + $search_accountancy_code_end = ''; $filter = array(); } @@ -223,6 +225,12 @@ if ($action != 'export_csv') $moreforfilter .= $form->selectDate($search_date_start ? $search_date_start : -1, 'date_start', 0, 0, 1, '', 1, 0); $moreforfilter .= $langs->trans('DateEnd').': '; $moreforfilter .= $form->selectDate($search_date_end ? $search_date_end : -1, 'date_end', 0, 0, 1, '', 1, 0); + + $moreforfilter .= ' - '; + $moreforfilter .= $langs->trans('ShowSubtotalByGroup').': '; + $moreforfilter .= ''; + + $moreforfilter .= '
'; if (!empty($moreforfilter)) { @@ -237,15 +245,15 @@ if ($action != 'export_csv') print ''; print ''; - print ''; - print ''; @@ -253,7 +261,6 @@ if ($action != 'export_csv') print ''; print_liste_field_titre("AccountAccounting", $_SERVER['PHP_SELF'], "t.numero_compte", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Label", $_SERVER['PHP_SELF'], "t.label_operation", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("OpeningBalance", $_SERVER['PHP_SELF'], "", $param, "", 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Debit", $_SERVER['PHP_SELF'], "t.debit", "", $param, 'class="right"', $sortfield, $sortorder); print_liste_field_titre("Credit", $_SERVER['PHP_SELF'], "t.credit", "", $param, 'class="right"', $sortfield, $sortorder); @@ -267,6 +274,8 @@ if ($action != 'export_csv') $sous_total_credit = 0; $displayed_account = ""; + $accountingaccountstatic = new AccountingAccount($db); + $sql = "SELECT t.numero_compte, (SUM(t.debit) - SUM(t.credit)) as opening_balance"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as t"; $sql .= " WHERE t.entity = ".$conf->entity; // Never do sharing into accounting features @@ -283,44 +292,54 @@ if ($action != 'export_csv') foreach ($object->lines as $line) { + $accountingaccountstatic->fetch(null, $line->numero_compte, true); + if (!empty($accountingaccountstatic->account_number)) { + $accounting_account = $accountingaccountstatic->getNomUrl(0, 1); + } else { + $accounting_account = length_accountg($line->numero_compte); + } + $link = ''; $total_debit += $line->debit; $total_credit += $line->credit; - $description = $object->get_compte_desc($line->numero_compte); // Search description of the account $root_account_description = $object->get_compte_racine($line->numero_compte); - if (empty($description)) { + if (empty($accountingaccountstatic->account_number)) { $link = ''.img_edit_add().''; } print ''; - // Display the accounting account - if (empty($displayed_account) || $root_account_description != $displayed_account) + if (!empty($show_subgroup)) { - // Display a sub-total per account - if ($displayed_account != "") { - print ''; - print "\n"; + // Show accounting account + if (empty($displayed_account) || $root_account_description != $displayed_account) { + // Show subtotal per accounting account + if ($displayed_account != "") { + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + print ''; + } + + // Show first line of a break + print ''; + print ''; print ''; + + $displayed_account = $root_account_description; + $sous_total_debit = 0; + $sous_total_credit = 0; } - - // Show first line of a break - print ''; - print ''; - print ''; - - $displayed_account = $root_account_description; - $sous_total_debit = 0; - $sous_total_credit = 0; } // $object->get_compte_racine($line->numero_compte); - - print ''; - print ''; + print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print "\n"; @@ -330,12 +349,15 @@ if ($action != 'export_csv') $sous_total_credit += $line->credit; } - print ''; - print "\n"; - print ''; + if (!empty($show_subgroup)) + { + print ''; + print "\n"; + print ''; + } - print ''; - print "\n"; + print ''; + print "\n"; print ''; print "
'; + print ''; print $langs->trans('From'); print $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, ''); print ' '; print $langs->trans('to'); print $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, ''); print ''; - $searchpicto = $form->showFilterAndCheckAddButtons(0); + print ''; + $searchpicto = $form->showFilterButtons(); print $searchpicto; print '
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).' 
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_credit - $sous_total_debit)).'
'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'
'.$line->numero_compte.($root_account_description ? ' - '.$root_account_description : '').'
'.length_accountg($line->numero_compte).''.$description.''.$accounting_account.''.price($opening_balances["'".$line->numero_compte."'"]).''.price($line->debit).''.price($line->credit).''.price($line->debit - $line->credit).''.price(price2num($line->debit - $line->credit, 'MT')).''.$link; print '
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).' 
'.$langs->trans("SubTotal").':'.price($sous_total_debit).''.price($sous_total_credit).''.price(price2num($sous_total_debit - $sous_total_credit)).'
'.$langs->trans("AccountBalance").':'.price($total_debit).''.price($total_credit).''.price(price2num($total_debit - $total_credit)).' 
'.$langs->trans("AccountBalance").':'.price($total_debit).''.price($total_credit).''.price(price2num($total_debit - $total_credit)).'
"; diff --git a/htdocs/accountancy/bookkeeping/card.php b/htdocs/accountancy/bookkeeping/card.php index ba4c7260519..8ca880de25f 100644 --- a/htdocs/accountancy/bookkeeping/card.php +++ b/htdocs/accountancy/bookkeeping/card.php @@ -114,11 +114,13 @@ if ($action == "confirm_update") { $object->credit = $credit; if (floatval($debit) != 0.0) { - $object->montant = $debit; + $object->montant = $debit; // deprecated + $object->amount = $debit; $object->sens = 'D'; } if (floatval($credit) != 0.0) { - $object->montant = $credit; + $object->montant = $credit; // deprecated + $object->amount = $credit; $object->sens = 'C'; } @@ -138,9 +140,7 @@ if ($action == "confirm_update") { } } } -} - -elseif ($action == "add") { +} elseif ($action == "add") { $error = 0; if ((floatval($debit) != 0.0) && (floatval($credit) != 0.0)) @@ -175,12 +175,14 @@ elseif ($action == "add") { $object->fk_docdet = (int) GETPOST('fk_docdet', 'int'); if (floatval($debit) != 0.0) { - $object->montant = $debit; + $object->montant = $debit; // deprecated + $object->amount = $debit; $object->sens = 'D'; } if (floatval($credit) != 0.0) { - $object->montant = $credit; + $object->montant = $credit; // deprecated + $object->amount = $credit; $object->sens = 'C'; } @@ -199,9 +201,7 @@ elseif ($action == "add") { $action = ''; } } -} - -elseif ($action == "confirm_delete") { +} elseif ($action == "confirm_delete") { $object = new BookKeeping($db); $result = $object->fetch($id, null, $mode); @@ -216,9 +216,7 @@ elseif ($action == "confirm_delete") { } } $action = ''; -} - -elseif ($action == "confirm_create") { +} elseif ($action == "confirm_create") { $error = 0; $object = new BookKeeping($db); @@ -247,7 +245,8 @@ elseif ($action == "confirm_create") { $object->journal_label = $journal_label; $object->fk_doc = 0; $object->fk_docdet = 0; - $object->montant = 0; + $object->montant = 0; // deprecated + $object->amount = 0; $result = $object->createStd($user, 0, $mode); if ($result < 0) { @@ -293,7 +292,7 @@ if ($action == 'setjournal') { } if ($action == 'setdocref') { - $refdoc = trim(GETPOST('doc_ref', 'alpha')); + $refdoc = GETPOST('doc_ref', 'alpha'); $result = $object->updateByMvt($piece_num, 'doc_ref', $refdoc, $mode); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); @@ -329,7 +328,7 @@ llxHeader('', $langs->trans("CreateMvts")); // Confirmation to delete the command if ($action == 'delete') { - $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"].'?id='.$id.'&mode='.$mode, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'confirm_delete', '', 0, 1); + $formconfirm = $html->formconfirm($_SERVER["PHP_SELF"].'?id='.$id.'&mode='.$mode, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt', $langs->transnoentitiesnoconv("RegistrationInAccounting")), 'confirm_delete', '', 0, 1); print $formconfirm; } @@ -628,9 +627,7 @@ if ($action == 'create') if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount((GETPOSTISSET("subledger_account") ? GETPOST("subledger_account", "alpha") : $line->subledger_account), 'subledger_account', 1); - } - else - { + } else { print 'subledger_account).'">'; } print ''; @@ -685,9 +682,7 @@ if ($action == 'create') if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount('', 'subledger_account', 1); - } - else - { + } else { print ''; } print ''; @@ -707,9 +702,7 @@ if ($action == 'create') if ($total_debit == $total_credit) { print ''.$langs->trans("ValidTransaction").''; - } - else - { + } else { print ''; } diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index 2889fbf4ef1..d89d0dca60c 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -91,8 +91,8 @@ $search_not_reconciled = GETPOST('search_reconciled_option', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0) { $page = 0; } $offset = $limit * $page; @@ -108,7 +108,7 @@ $hookmanager->initHooks(array('bookkeepinglist')); $formaccounting = new FormAccounting($db); $form = new Form($db); -if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !isset($_POST['begin']) && !isset($_GET['begin']) && !isset($_POST['formfilteraction']) && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->rights->accounting->mouvements->export) +if (!in_array($action, array('export_file', 'delmouv', 'delmouvconfirm')) && !GETPOSTISSET('begin') && !isset($_POST['formfilteraction']) && GETPOST('page', 'int') == '' && !GETPOST('noreset', 'int') && $user->rights->accounting->mouvements->export) { if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('restore_lastsearch_values')) { @@ -351,18 +351,14 @@ if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouveme $result = $object->deleteByYearAndJournal($delyear, $deljournal, '', ($delmonth > 0 ? $delmonth : 0)); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages("RecordDeleted", null, 'mesgs'); } // Make a redirect to avoid to launch the delete later after a back button header("Location: list.php".($param ? '?'.$param : '')); exit; - } - else - { + } else { setEventMessages("NoRecordDeleted", null, 'warnings'); } } @@ -373,9 +369,7 @@ if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->suppri $result = $object->deleteMvtNum($mvt_num); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); } @@ -418,7 +412,7 @@ $sql .= " t.label_operation,"; $sql .= " t.debit,"; $sql .= " t.credit,"; $sql .= " t.lettering_code,"; -$sql .= " t.montant,"; +$sql .= " t.montant as amount,"; $sql .= " t.sens,"; $sql .= " t.fk_user_author,"; $sql .= " t.import_key,"; @@ -480,9 +474,7 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { // Export files $accountancyexport = new AccountancyExport($db); $accountancyexport->export($object->lines, $formatexportset); @@ -490,9 +482,7 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { if (!empty($accountancyexport->errors)) { setEventMessages('', $accountancyexport->errors, 'errors'); - } - else - { + } else { // Specify as export : update field date_export $error = 0; $db->begin(); @@ -521,9 +511,7 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { { $db->commit(); // setEventMessages($langs->trans("AllExportedMovementsWereRecordedAsExported"), null, 'mesgs'); - } - else - { + } else { $error++; $db->rollback(); setEventMessages($langs->trans("NotAllExportedMovementsCouldBeRecordedAsExported"), null, 'errors'); @@ -541,7 +529,7 @@ if ($action == 'export_file' && $user->rights->accounting->mouvements->export) { $formother = new FormOther($db); $formfile = new FormFile($db); -$title_page = $langs->trans("Bookkeeping"); +$title_page = $langs->trans("Operations").' - '.$langs->trans("Journals"); // Count total nb of records $nbtotalofrecords = ''; @@ -559,9 +547,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; -} -else -{ +} else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -622,41 +608,43 @@ if ($action == 'delbookkeepingyear') { 'default' => $deljournal ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, '', 1, 300); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt', $langs->transnoentitiesnoconv("RegistrationInAccounting")), 'delbookkeepingyearconfirm', $form_question, '', 1, 300); print $formconfirm; } //$param=''; param started before -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); print '
'; print ''; print ''; -if ($optioncss != '') print ''; +if ($optioncss != '') print ''; print ''; -print ''; -print ''; -print ''; +print ''; +print ''; if (count($filter)) $buttonLabel = $langs->trans("ExportFilteredList"); else $buttonLabel = $langs->trans("ExportList"); // Button re-export if (!empty($conf->global->ACCOUNTING_REEXPORT)) { - $newcardbutton = ''.img_picto($langs->trans("Activated"), 'switch_on').' '; + $newcardbutton = ''.img_picto($langs->trans("Activated"), 'switch_on').' '; } else { - $newcardbutton = ''.img_picto($langs->trans("Disabled"), 'switch_off').' '; + $newcardbutton = ''.img_picto($langs->trans("Disabled"), 'switch_off').' '; } $newcardbutton .= ''.$langs->trans("IncludeDocsAlreadyExported").''; $newcardbutton .= dolGetButtonTitle($buttonLabel, $langs->trans("ExportFilteredList").' ('.$listofformat[$formatexportset].')', 'fa fa-file-export paddingleft', $_SERVER["PHP_SELF"].'?action=export_file'.($param ? '&'.$param : ''), $user->rights->accounting->mouvements->export); -$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param, '', 1, array('morecss'=>'marginleftonly btnTitleSelected')); +$newcardbutton .= dolGetButtonTitle($langs->trans('GroupByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss'=>'marginleftonly')); -$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create', '', $user->rights->accounting->mouvements->creer); +$url = './card.php?action=create'; +if (!empty($socid)) $url .= '&socid='.$socid; +$newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', $url, '', $user->rights->accounting->mouvements->creer); -print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit); +print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit, 0, 0, 1); $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields @@ -682,12 +670,10 @@ if (!empty($arrayfields['t.doc_date']['checked'])) { print ''; print '
'; - print $langs->trans('From').' '; - print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1); + print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); print '
'; print '
'; - print $langs->trans('to').' '; - print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1); + print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print '
'; print ''; } @@ -715,29 +701,25 @@ if (!empty($arrayfields['t.subledger_account']['checked'])) { print ''; print '
'; - print $langs->trans('From').' '; // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not // use setup of keypress to select thirdparty and this hang browser on large database. if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { + print $langs->trans('From').' '; print $formaccounting->select_auxaccount($search_accountancy_aux_code_start, 'search_accountancy_aux_code_start', 1); - } - else - { - print ''; + } else { + print ''; } print '
'; print '
'; - print $langs->trans('to').' '; // TODO For the moment we keep a free input text instead of a combo. The select_auxaccount has problem because it does not // use setup of keypress to select thirdparty and this hang browser on large database. if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { + print $langs->trans('to').' '; print $formaccounting->select_auxaccount($search_accountancy_aux_code_end, 'search_accountancy_aux_code_end', 1); - } - else - { - print ''; + } else { + print ''; } print '
'; print ''; @@ -787,12 +769,10 @@ if (!empty($arrayfields['t.date_creation']['checked'])) { print ''; print '
'; - print $langs->trans('From').' '; - print $form->selectDate($search_date_creation_start, 'date_creation_start', 0, 0, 1); + print $form->selectDate($search_date_creation_start, 'date_creation_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); print '
'; print '
'; - print $langs->trans('to').' '; - print $form->selectDate($search_date_creation_end, 'date_creation_end', 0, 0, 1); + print $form->selectDate($search_date_creation_end, 'date_creation_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print '
'; print ''; } @@ -801,12 +781,10 @@ if (!empty($arrayfields['t.tms']['checked'])) { print ''; print '
'; - print $langs->trans('From').' '; - print $form->selectDate($search_date_modification_start, 'date_modification_start', 0, 0, 1); + print $form->selectDate($search_date_modification_start, 'date_modification_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); print '
'; print '
'; - print $langs->trans('to').' '; - print $form->selectDate($search_date_modification_end, 'date_modification_end', 0, 0, 1); + print $form->selectDate($search_date_modification_end, 'date_modification_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); print '
'; print ''; } @@ -815,12 +793,10 @@ if (!empty($arrayfields['t.date_export']['checked'])) { print ''; print '
'; - print $langs->trans('From').' '; - print $form->selectDate($search_date_export_start, 'date_export_start', 0, 0, 1); + print $form->selectDate($search_date_export_start, 'date_export_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); print '
'; print '
'; - print $langs->trans('to').' '; - print $form->selectDate($search_date_export_end, 'date_export_end', 0, 0, 1); + print $form->selectDate($search_date_export_end, 'date_export_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print '
'; print ''; } @@ -878,7 +854,8 @@ while ($i < min($num, $limit)) $line->label_operation = $obj->label_operation; $line->debit = $obj->debit; $line->credit = $obj->credit; - $line->montant = $obj->montant; + $line->montant = $obj->amount; // deprecated + $line->amount = $obj->amount; $line->sens = $obj->sens; $line->lettering_code = $obj->lettering_code; $line->fk_user_author = $obj->fk_user_author; @@ -929,8 +906,7 @@ while ($i < min($num, $limit)) $filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - elseif ($line->doc_type == 'supplier_invoice') + } elseif ($line->doc_type == 'supplier_invoice') { $langs->loadLangs(array('bills')); @@ -943,8 +919,7 @@ while ($i < min($num, $limit)) $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir); - } - elseif ($line->doc_type == 'expense_report') + } elseif ($line->doc_type == 'expense_report') { $langs->loadLangs(array('trips')); @@ -957,9 +932,7 @@ while ($i < min($num, $limit)) $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - else - { + } else { // Other type } @@ -1068,10 +1041,10 @@ while ($i < min($num, $limit)) print ''; if (empty($line->date_export)) { if ($user->rights->accounting->mouvements->creer) { - print ''.img_edit().''; + print ''.img_edit().''; } if ($user->rights->accounting->mouvements->supprimer) { - print ' '.img_delete().''; + print ''.img_delete().''; } } print ''; diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 5a1056f8d50..4ed055be0b1 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -38,7 +38,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; // Load translation files required by the page $langs->loadLangs(array("accountancy")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); $search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); $search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int')); @@ -54,6 +54,7 @@ if ($search_accountancy_code_end == - 1) { } $search_doc_ref = GETPOST('search_doc_ref', 'alpha'); $search_label_operation = GETPOST('search_label_operation', 'alpha'); +$search_mvt_num = GETPOST('search_mvt_num', 'int'); $search_direction = GETPOST('search_direction', 'alpha'); $search_ledger_code = GETPOST('search_ledger_code', 'alpha'); $search_debit = GETPOST('search_debit', 'alpha'); @@ -67,8 +68,8 @@ if (GETPOST("button_delmvt_x") || GETPOST("button_delmvt.x") || GETPOST("button_ // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0) { $page = 0; } $offset = $limit * $page; @@ -79,12 +80,13 @@ if ($sortfield == "") $sortfield = "t.doc_date,t.rowid"; // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new BookKeeping($db); +$formfile = new FormFile($db); $hookmanager->initHooks(array('bookkeepingbyaccountlist')); $formaccounting = new FormAccounting($db); $form = new Form($db); -if (empty($search_date_start) && empty($search_date_end) && GETPOSTISSET('search_date_startday') && GETPOSTISSET('search_date_startmonth') && GETPOSTISSET('search_date_starthour')) { +if (empty($search_date_start) && empty($search_date_end) && !GETPOSTISSET('search_date_startday') && !GETPOSTISSET('search_date_startmonth') && !GETPOSTISSET('search_date_starthour')) { $sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; $sql .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'"; $sql .= $db->plimit(1); @@ -147,6 +149,7 @@ if (empty($reshook)) $search_label_account = ''; $search_doc_ref = ''; $search_label_operation = ''; + $search_mvt_num = ''; $search_direction = ''; $search_ledger_code = ''; $search_date_start = ''; @@ -191,6 +194,10 @@ if (empty($reshook)) $filter['t.label_compte'] = $search_label_account; $param .= '&search_label_compte=' . urlencode($search_label_account); } + if (!empty($search_mvt_num)) { + $filter['t.piece_num'] = $search_mvt_num; + $param .= '&search_mvt_num=' . urlencode($search_mvt_num); + } if (!empty($search_doc_ref)) { $filter['t.doc_ref'] = $search_doc_ref; $param .= '&search_doc_ref=' . urlencode($search_doc_ref); @@ -255,18 +262,14 @@ if ($action == 'delbookkeepingyearconfirm' && $user->rights->accounting->mouveme $result = $object->deleteByYearAndJournal($delyear, $deljournal, '', ($delmonth > 0 ? $delmonth : 0)); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages("RecordDeleted", null, 'mesgs'); } // Make a redirect to avoid to launch the delete later after a back button header("Location: listbyaccount.php".($param ? '?'.$param : '')); exit; - } - else - { + } else { setEventMessages("NoRecordDeleted", null, 'warnings'); } } @@ -277,9 +280,7 @@ if ($action == 'delmouvconfirm' && $user->rights->accounting->mouvements->suppri $result = $object->deleteMvtNum($mvt_num); if ($result < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); } @@ -298,7 +299,7 @@ $formfile = new FormFile($db); $formother = new FormOther($db); $form = new Form($db); -$title_page = $langs->trans("Bookkeeping").' '.strtolower($langs->trans("By")).' '.strtolower($langs->trans("AccountAccounting")); +$title_page = $langs->trans("Operations").' - '.$langs->trans("VueByAccountAccounting").' ('.$langs->trans("Bookkeeping").')'; llxHeader('', $title_page); @@ -362,7 +363,7 @@ if ($action == 'delbookkeepingyear') { 'default' => $deljournal ); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt'), 'delbookkeepingyearconfirm', $form_question, '', 1, 300); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?'.$param, $langs->trans('DeleteMvt'), $langs->trans('ConfirmDeleteMvt', $langs->transnoentitiesnoconv("RegistrationInAccounting")), 'delbookkeepingyearconfirm', $form_question, '', 1, 300); print $formconfirm; } @@ -374,16 +375,19 @@ if ($optioncss != '') print ''; print ''; print ''; -print ''; -$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param); +$newcardbutton .= dolGetButtonTitle($langs->trans('ViewFlatList'), '', 'fa fa-list paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/list.php?'.$param); +$newcardbutton .= dolGetButtonTitle($langs->trans('VueByAccountAccounting'), '', 'fa fa-stream paddingleft imgforviewmode', DOL_URL_ROOT.'/accountancy/bookkeeping/listbyaccount.php?'.$param, '', 1, array('morecss'=>'marginleftonly btnTitleSelected')); + +$newcardbutton .= '   '; + $newcardbutton .= dolGetButtonTitle($langs->trans('NewAccountingMvt'), '', 'fa fa-plus-circle paddingleft', './card.php?action=create'); if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); -print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$newcardbutton, '', $limit); +print_barre_liste($title_page, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $result, $nbtotalofrecords, 'title_accountancy', 0, $viewflat.$newcardbutton, '', $limit, 0, 0, 1); $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields @@ -398,10 +402,10 @@ $moreforfilter = ''; // Accountancy account $moreforfilter .= '
'; $moreforfilter .= $langs->trans('AccountAccounting').': '; -$moreforfilter .= '
'; +$moreforfilter .= '
'; $moreforfilter .= $langs->trans('From').' '; $moreforfilter .= $formaccounting->select_account($search_accountancy_code_start, 'search_accountancy_code_start', 1, array(), 1, 1, 'maxwidth200'); -$moreforfilter .= $langs->trans('to').' '; +$moreforfilter .= ' '.$langs->trans('to').' '; $moreforfilter .= $formaccounting->select_account($search_accountancy_code_end, 'search_accountancy_code_end', 1, array(), 1, 1, 'maxwidth200'); $moreforfilter .= '
'; $moreforfilter .= '
'; @@ -429,12 +433,10 @@ if (!empty($arrayfields['t.code_journal']['checked'])) { if (!empty($arrayfields['t.doc_date']['checked'])) { print ''; print '
'; - print $langs->trans('From') . ': '; - print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1); + print $form->selectDate($search_date_start, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("From")); print '
'; print '
'; - print $langs->trans('to') . ': '; - print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1); + print $form->selectDate($search_date_end, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to")); print '
'; print ''; } @@ -539,9 +541,7 @@ while ($i < min($num, $limit)) print price($sous_total_debit - $sous_total_credit); print ''; print ''; - } - else - { + } else { print ''; print ''; print price($sous_total_credit - $sous_total_debit); @@ -613,8 +613,7 @@ while ($i < min($num, $limit)) $filedir = $conf->facture->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - elseif ($line->doc_type == 'supplier_invoice') + } elseif ($line->doc_type == 'supplier_invoice') { $langs->loadLangs(array('bills')); @@ -627,8 +626,7 @@ while ($i < min($num, $limit)) $filedir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($line->fk_doc, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $subdir = get_exdir($objectstatic->id, 2, 0, 0, $objectstatic, $modulepart).dol_sanitizeFileName($line->doc_ref); $documentlink = $formfile->getDocumentsLink($objectstatic->element, $subdir, $filedir); - } - elseif ($line->doc_type == 'expense_report') + } elseif ($line->doc_type == 'expense_report') { $langs->loadLangs(array('trips')); @@ -641,9 +639,7 @@ while ($i < min($num, $limit)) $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); - } - else - { + } else { // Other type } @@ -707,10 +703,10 @@ while ($i < min($num, $limit)) print ''; if (empty($line->date_export)) { if ($user->rights->accounting->mouvements->creer) { - print ''.img_edit().''; + print ''.img_edit().''; } if ($user->rights->accounting->mouvements->supprimer) { - print ' '.img_delete().''; + print '   '.img_delete().''; } } print ''; @@ -744,9 +740,7 @@ if ($balance > 0 ) print price($sous_total_debit - $sous_total_credit); print ''; print ''; -} -else -{ +} else { print ''; print ''; print price($sous_total_credit - $sous_total_debit); diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php index 0b3d98a2742..321ef282dff 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_customer.php @@ -147,7 +147,7 @@ $sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, "; $sql .= " bk.subledger_account, bk.numero_compte , bk.label_compte, bk.debit, "; $sql .= " bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code "; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as bk"; -$sql .= " WHERE (bk.subledger_account = '".$object->code_compta."' AND bk.numero_compte = '".$conf->global->ACCOUNTING_ACCOUNT_CUSTOMER."' )"; +$sql .= " WHERE (bk.subledger_account = '".$db->escape($object->code_compta)."' AND bk.numero_compte = '".$db->escape($conf->global->ACCOUNTING_ACCOUNT_CUSTOMER)."' )"; /* if (dol_strlen($search_date_start) || dol_strlen($search_date_end)) { diff --git a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php index c6ab2fa81d6..144c2595d25 100644 --- a/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php +++ b/htdocs/accountancy/bookkeeping/thirdparty_lettering_supplier.php @@ -146,7 +146,7 @@ $sql = "SELECT bk.rowid, bk.doc_date, bk.doc_type, bk.doc_ref, "; $sql .= " bk.subledger_account, bk.numero_compte , bk.label_compte, bk.debit, "; $sql .= " bk.credit, bk.montant , bk.sens , bk.code_journal , bk.piece_num, bk.lettering_code, bk.date_validated "; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as bk"; -$sql .= " WHERE (bk.subledger_account = '".$object->code_compta_fournisseur."' AND bk.numero_compte = '".$conf->global->ACCOUNTING_ACCOUNT_SUPPLIER."' )"; +$sql .= " WHERE (bk.subledger_account = '".$db->escape($object->code_compta_fournisseur)."' AND bk.numero_compte = '".$db->escape($conf->global->ACCOUNTING_ACCOUNT_SUPPLIER)."' )"; if (dol_strlen($search_date_start) || dol_strlen($search_date_end)) { $sql .= " AND (bk.doc_date BETWEEN '".$db->idate($search_date_start)."' AND '".$db->idate($search_date_end)."' )"; } diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index cc93232dcdc..c7f7f8cf68c 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -209,9 +209,7 @@ class AccountancyCategory // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -241,8 +239,7 @@ class AccountancyCategory // extends CommonObject $sql .= " t.active"; $sql .= " FROM ".MAIN_DB_PREFIX."c_accounting_category as t"; if ($id) $sql .= " WHERE t.rowid = ".$id; - else - { + else { $sql .= " WHERE t.entity IN (".getEntity('c_accounting_category').")"; // Dont't use entity if you use rowid if ($code) $sql .= " AND t.code = '".$this->db->escape($code)."'"; elseif ($label) $sql .= " AND t.label = '".$this->db->escape($label)."'"; @@ -270,9 +267,7 @@ class AccountancyCategory // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -335,9 +330,7 @@ class AccountancyCategory // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -375,9 +368,7 @@ class AccountancyCategory // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -709,9 +700,7 @@ class AccountancyCategory // extends CommonObject $listofaccount .= "'".$cptcursor."'"; } $sql .= " AND t.numero_compte IN (".$listofaccount.")"; - } - else - { + } else { $sql .= " AND t.numero_compte = '".$this->db->escape($cpt)."'"; } if (!empty($date_start) && !empty($date_end) && (empty($month) || empty($year))) // If month/year provided, it is stronger than filter date_start/date_end @@ -833,9 +822,7 @@ class AccountancyCategory // extends CommonObject $sql .= " WHERE t.fk_accounting_category = ".$cat_id; $sql .= " AND t.entity = ".$conf->entity; $sql .= " ORDER BY t.account_number"; - } - else - { + } else { $sql = "SELECT t.rowid, t.account_number, t.label as account_label"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as t"; $sql .= " WHERE ".$predefinedgroupwhere; diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 9c23ccbf781..0204602438f 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -362,7 +362,7 @@ class AccountancyExport if ($line->sens == 'D') { print price($line->montant).$separator; print ''.$separator; - }elseif ($line->sens == 'C') { + } elseif ($line->sens == 'C') { print ''.$separator; print price($line->montant).$separator; } @@ -518,11 +518,12 @@ class AccountancyExport $Tab['contrepartie'] = str_repeat(' ', 8); // elarifr: date format must be fixed format : 6 char ddmmyy = %d%m%yand not defined by user / dolibarr setting - if (!empty($data->date_echeance)) + 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 - else + } else { $Tab['date_echeance'] = '000000'; + } //elarifr please keep quadra named field lettrage(2) + codestat(3) instead of fake lettrage(5) //$Tab['lettrage'] = str_repeat(' ', 5); @@ -597,12 +598,11 @@ class AccountancyExport $Tab['num_compte'] = str_pad(self::trunc($code_compta, 6), 6, '0'); - if($data->sens == 'D'){ + if ($data->sens == 'D') { $Tab['montant_debit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); $Tab['montant_crebit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); - } - else{ + } else { $Tab['montant_debit'] = str_pad(number_format(0, 2, ',', ''), 13, ' ', STR_PAD_LEFT); $Tab['montant_crebit'] = str_pad(number_format(abs($data->montant), 2, ',', ''), 13, ' ', STR_PAD_LEFT); @@ -616,11 +616,12 @@ class AccountancyExport $Tab['code_stat'] = str_repeat(' ', 4); - if (!empty($data->date_echeance)) + 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'); - else + } else { $Tab['date_echeance'] = dol_print_date($data->doc_date, '%d%m%Y'); + } $Tab['monnaie'] = '1'; @@ -897,12 +898,10 @@ class AccountancyExport if ($aIndex - 2 >= 0 && $objectLines[$aIndex - 2]->piece_num == $line->piece_num) { $sammelBuchung = true; - } - elseif ($aIndex + 2 < $aSize && $objectLines[$aIndex + 2]->piece_num == $line->piece_num) + } elseif ($aIndex + 2 < $aSize && $objectLines[$aIndex + 2]->piece_num == $line->piece_num) { $sammelBuchung = true; - } - elseif ($aIndex + 1 < $aSize + } elseif ($aIndex + 1 < $aSize && $objectLines[$aIndex + 1]->piece_num == $line->piece_num && $aIndex - 1 < $aSize && $objectLines[$aIndex - 1]->piece_num == $line->piece_num @@ -924,9 +923,7 @@ class AccountancyExport if ($line->sens == 'D') { print 'S'.$this->separator; - } - else - { + } else { print 'H'.$this->separator; } //Grp @@ -937,14 +934,10 @@ class AccountancyExport if ($line->piece_num == $thisPieceNum) { print length_accounta($thisPieceAccountNr).$this->separator; - } - else - { + } else { print "div".$this->separator; } - } - else - { + } else { print length_accounta($line->code_tiers).$this->separator; } //SId @@ -960,9 +953,7 @@ class AccountancyExport if ($sammelBuchung) { print "2".$this->separator; - } - else - { + } else { print "1".$this->separator; } // Code @@ -971,9 +962,7 @@ class AccountancyExport if ($line->montant >= 0) { print $line->montant.$this->separator; - } - else - { + } else { print ($line->montant * -1).$this->separator; } // Steuer @@ -1171,7 +1160,8 @@ class AccountancyExport // TYPE C if ($last_codeinvoice != $line->doc_ref) { //recherche societe en fonction de son code client - $sql = "SELECT code_client, fk_forme_juridique, nom, address, zip, town, fk_pays, phone, siret FROM ".MAIN_DB_PREFIX."societe WHERE code_client = '".$line->thirdparty_code."'"; + $sql = "SELECT code_client, fk_forme_juridique, nom, address, zip, town, fk_pays, phone, siret FROM ".MAIN_DB_PREFIX."societe"; + $sql .= " WHERE code_client = '".$this->db->escape($line->thirdparty_code)."'"; $resql = $this->db->query($sql); if ($resql && $this->db->num_rows($resql) > 0) @@ -1458,7 +1448,9 @@ class AccountancyExport print self::trunc($line->code_journal, 6).$separator; //Journal code if (!empty($line->subledger_account)) $account = $line->subledger_account; - else $account = $line->numero_compte; + else { + $account = $line->numero_compte; + } print self::trunc($account, 15).$separator; //Account number print self::trunc($line->label_compte, 60).$separator; //Account label diff --git a/htdocs/accountancy/class/accountancysystem.class.php b/htdocs/accountancy/class/accountancysystem.class.php index 719d33c8574..c2f3468016c 100644 --- a/htdocs/accountancy/class/accountancysystem.class.php +++ b/htdocs/accountancy/class/accountancysystem.class.php @@ -101,7 +101,7 @@ class AccountancySystem $sql .= " FROM ".MAIN_DB_PREFIX."accounting_system as a"; $sql .= " WHERE"; if ($rowid) { - $sql .= " a.rowid = '".$rowid."'"; + $sql .= " a.rowid = ".((int) $rowid); } elseif ($ref) { $sql .= " a.pcg_version = '".$this->db->escape($ref)."'"; } diff --git a/htdocs/accountancy/class/accountingaccount.class.php b/htdocs/accountancy/class/accountingaccount.class.php index 27d4fd115ea..199899f89d5 100644 --- a/htdocs/accountancy/class/accountingaccount.class.php +++ b/htdocs/accountancy/class/accountingaccount.class.php @@ -448,9 +448,10 @@ class AccountingAccount extends CommonObject * @param int $notooltip 1=Disable tooltip * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @param int $withcompletelabel 0=Short label (field short label), 1=Complete label (field label) + * @param string $option 'ledger', 'journals', 'accountcard' * @return string String with URL */ - public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0) + public function getNomUrl($withpicto = 0, $withlabel = 0, $nourl = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $withcompletelabel = 0, $option = '') { global $langs, $conf, $user; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -459,7 +460,16 @@ class AccountingAccount extends CommonObject $result = ''; - $url = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.$this->id; + if (empty($option) || $option == 'ledger') { + $url = DOL_URL_ROOT . '/accountancy/bookkeeping/listbyaccount.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number; + $labelurl = $langs->trans("ShowAccountingAccountInLedger"); + } elseif ($option == 'journals') { + $url = DOL_URL_ROOT . '/accountancy/bookkeeping/list.php?search_accountancy_code_start=' . $this->account_number . '&search_accountancy_code_end=' . $this->account_number; + $labelurl = $langs->trans("ShowAccountingAccountInJournals"); + } elseif ($option == 'accountcard') { + $url = DOL_URL_ROOT . '/accountancy/admin/card.php?id=' . $this->id; + $labelurl = $langs->trans("ShowAccountingAccount"); + } // Add param to save lastsearch_values or not $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); @@ -476,7 +486,7 @@ class AccountingAccount extends CommonObject $labeltoshow = $this->labelshort; } - $label = ''.$langs->trans("ShowAccountingAccount").''; + $label = ''.$labelurl.''; if (!empty($this->account_number)) $label .= '
'.$langs->trans('AccountAccounting').': '.length_accountg($this->account_number); if (!empty($labeltoshow)) @@ -488,7 +498,7 @@ class AccountingAccount extends CommonObject { if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - $label = $langs->trans("ShowAccountingAccount"); + $label = $labelurl; $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; @@ -609,8 +619,7 @@ class AccountingAccount extends CommonObject if ($mode == 0) { $fieldtouse = 'active'; - } - elseif ($mode == 1) + } elseif ($mode == 1) { $fieldtouse = 'reconcilable'; } @@ -661,28 +670,23 @@ class AccountingAccount extends CommonObject { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); diff --git a/htdocs/accountancy/class/accountingjournal.class.php b/htdocs/accountancy/class/accountingjournal.class.php index 727e68346fa..882eee71769 100644 --- a/htdocs/accountancy/class/accountingjournal.class.php +++ b/htdocs/accountancy/class/accountingjournal.class.php @@ -108,9 +108,8 @@ class AccountingJournal extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."accounting_journal"; $sql .= " WHERE"; if ($rowid) { - $sql .= " rowid = ".(int) $rowid; - } - elseif ($journal_code) + $sql .= " rowid = ".((int) $rowid); + } elseif ($journal_code) { $sql .= " code = '".$this->db->escape($journal_code)."'"; $sql .= " AND entity = ".$conf->entity; @@ -136,9 +135,7 @@ class AccountingJournal extends CommonObject } else { return 0; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror(); } @@ -311,8 +308,7 @@ class AccountingJournal extends CommonObject elseif ($nature == 3) return $langs->trans('AccountingJournalType3'); elseif ($nature == 2) return $langs->trans('AccountingJournalType2'); elseif ($nature == 1) return $langs->trans('AccountingJournalType1'); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($nature == 9) return $langs->trans('AccountingJournalType9'); elseif ($nature == 5) return $langs->trans('AccountingJournalType5'); diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index a700ebecb1b..f5f4bf80221 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -2,7 +2,7 @@ /* Copyright (C) 2014-2017 Olivier Geffroy * Copyright (C) 2015-2017 Alexandre Spangaro * Copyright (C) 2015-2017 Florian Henry - * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2018-2020 Frédéric France * * 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 @@ -57,109 +57,115 @@ class BookKeeping extends CommonObject */ public $id; - /** - * @var string Date of source document, in db date NOT NULL - */ + /** + * @var string Date of source document, in db date NOT NULL + */ public $doc_date; - /** - * @var int Deadline for payment - */ + /** + * @var int Deadline for payment + */ public $date_lim_reglement; - /** - * @var string doc_type - */ - public $doc_type; + /** + * @var string doc_type + */ + public $doc_type; - /** - * @var string doc_ref - */ + /** + * @var string doc_ref + */ public $doc_ref; /** - * @var int ID - */ + * @var int ID + */ public $fk_doc; /** - * @var int ID - */ + * @var int ID + */ public $fk_docdet; - /** - * @var string thirdparty code - */ - public $thirdparty_code; + /** + * @var string thirdparty code + */ + public $thirdparty_code; - /** - * @var string subledger account - */ + /** + * @var string subledger account + */ public $subledger_account; - /** - * @var string subledger label - */ + /** + * @var string subledger label + */ public $subledger_label; - /** - * @var string doc_type - */ + /** + * @var string doc_type + */ public $numero_compte; - /** - * @var string label compte - */ - public $label_compte; + /** + * @var string label compte + */ + public $label_compte; - /** - * @var string label operation - */ - public $label_operation; + /** + * @var string label operation + */ + public $label_operation; - /** - * @var float FEC:Debit - */ + /** + * @var float FEC:Debit + */ public $debit; - /** - * @var float FEC:Credit - */ + /** + * @var float FEC:Credit + */ public $credit; - /** - * @var float FEC:Amount (Not necessary) - */ + /** + * @var float FEC:Amount (Not necessary) + * @deprecated Use $amount + */ public $montant; - /** - * @var string FEC:Sens (Not necessary) - */ + /** + * @var float FEC:Amount (Not necessary) + */ + public $amount; + + /** + * @var string FEC:Sens (Not necessary) + */ public $sens; /** - * @var int ID - */ + * @var int ID + */ public $fk_user_author; - /** - * @var string key for import - */ + /** + * @var string key for import + */ public $import_key; - /** - * @var string code journal - */ + /** + * @var string code journal + */ public $code_journal; - /** - * @var string label journal - */ + /** + * @var string label journal + */ public $journal_label; - /** - * @var int accounting transaction id - */ + /** + * @var int accounting transaction id + */ public $piece_num; /** @@ -173,8 +179,8 @@ class BookKeeping extends CommonObject * * @param DoliDb $db Database handler */ - public function __construct(DoliDB $db) - { + public function __construct(DoliDB $db) + { $this->db = $db; } @@ -185,8 +191,8 @@ class BookKeeping extends CommonObject * @param bool $notrigger false=launch triggers after, true=disable triggers * @return int <0 if KO, Id of created object if OK */ - public function create(User $user, $notrigger = false) - { + public function create(User $user, $notrigger = false) + { global $conf, $langs; dol_syslog(__METHOD__, LOG_DEBUG); @@ -258,9 +264,7 @@ class BookKeeping extends CommonObject if (in_array($this->doc_type, array('bank', 'expense_report'))) { $this->errors[] = $langs->trans('ErrorFieldAccountNotDefinedForBankLine', $this->fk_docdet, $this->doc_type); - } - else - { + } else { //$this->errors[]=$langs->trans('ErrorFieldAccountNotDefinedForInvoiceLine', $this->doc_ref, $this->label_compte); $mesg = $this->doc_ref.', '.$langs->trans("AccountAccounting").': '.$this->numero_compte; if ($this->subledger_account && $this->subledger_account != $this->numero_compte) @@ -477,8 +481,7 @@ class BookKeeping extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -501,11 +504,11 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, Id of created object if OK */ - public function createStd(User $user, $notrigger = false, $mode = '') - { + public function createStd(User $user, $notrigger = false, $mode = '') + { global $conf, $langs; - $langs->loadLangs(array("accountancy", "bills", "compta")); + $langs->loadLangs(array("accountancy", "bills", "compta")); dol_syslog(__METHOD__, LOG_DEBUG); @@ -575,7 +578,7 @@ class BookKeeping extends CommonObject $now = dol_now(); // Check parameters - $this->journal_label = $langs->trans($this->journal_label); + $this->journal_label = $langs->trans($this->journal_label); // Insert request $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element.$mode.' ('; @@ -670,8 +673,8 @@ class BookKeeping extends CommonObject * * @return int <0 if KO, 0 if not found, >0 if OK */ - public function fetch($id, $ref = null, $mode = '') - { + public function fetch($id, $ref = null, $mode = '') + { global $conf; dol_syslog(__METHOD__, LOG_DEBUG); @@ -768,8 +771,8 @@ class BookKeeping extends CommonObject * * @return int <0 if KO, >=0 if OK */ - public function fetchAllByAccount($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') - { + public function fetchAllByAccount($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND') + { global $conf; dol_syslog(__METHOD__, LOG_DEBUG); @@ -901,11 +904,11 @@ class BookKeeping extends CommonObject * @param int $offset Offset limit * @param array $filter Filter array * @param string $filtermode Filter mode (AND or OR) - * @param int $showAlreadyExportMovements Show movements when field 'date_export' is not empty (0:No / 1:Yes (Default)) + * @param int $showAlreadyExportMovements Show movements when field 'date_export' is not empty (0:No / 1:Yes (Default)) * @return int <0 if KO, >0 if OK */ - public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND', $showAlreadyExportMovements = 1) - { + public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, array $filter = array(), $filtermode = 'AND', $showAlreadyExportMovements = 1) + { global $conf; dol_syslog(__METHOD__, LOG_DEBUG); @@ -937,7 +940,7 @@ class BookKeeping extends CommonObject $sql .= " t.date_creation,"; $sql .= " t.date_lim_reglement,"; $sql .= " t.tms as date_modification,"; - $sql .= " t.date_export"; + $sql .= " t.date_export"; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t'; // Manage filter $sqlwhere = array(); @@ -957,8 +960,8 @@ class BookKeeping extends CommonObject $sqlwhere[] = $key.'\''.$this->db->idate($value).'\''; } elseif ($key == 't.tms>=' || $key == 't.tms<=') { $sqlwhere[] = $key.'\''.$this->db->idate($value).'\''; - } elseif ($key == 't.date_export>=' || $key == 't.date_export<=') { - $sqlwhere[] = $key.'\''.$this->db->idate($value).'\''; + } elseif ($key == 't.date_export>=' || $key == 't.date_export<=') { + $sqlwhere[] = $key.'\''.$this->db->idate($value).'\''; } elseif ($key == 't.credit' || $key == 't.debit') { $sqlwhere[] = natural_search($key, $value, 1, 1); } else { @@ -967,9 +970,9 @@ class BookKeeping extends CommonObject } } $sql .= ' WHERE t.entity IN ('.getEntity('accountancy').')'; - if ($showAlreadyExportMovements == 0) { - $sql .= " AND t.date_export IS NULL"; - } + if ($showAlreadyExportMovements == 0) { + $sql .= " AND t.date_export IS NULL"; + } if (count($sqlwhere) > 0) { $sql .= ' AND '.implode(' '.$filtermode.' ', $sqlwhere); } @@ -1017,7 +1020,7 @@ class BookKeeping extends CommonObject $line->date_creation = $this->db->jdate($obj->date_creation); $line->date_lim_reglement = $this->db->jdate($obj->date_lim_reglement); $line->date_modification = $this->db->jdate($obj->date_modification); - $line->date_export = $this->db->jdate($obj->date_export); + $line->date_export = $this->db->jdate($obj->date_export); $this->lines[] = $line; @@ -1130,8 +1133,8 @@ class BookKeeping extends CommonObject * @param string $mode Mode ('' or _tmp') * @return int <0 if KO, >0 if OK */ - public function update(User $user, $notrigger = false, $mode = '') - { + public function update(User $user, $notrigger = false, $mode = '') + { $error = 0; dol_syslog(__METHOD__, LOG_DEBUG); @@ -1297,8 +1300,8 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function delete(User $user, $notrigger = false, $mode = '') - { + public function delete(User $user, $notrigger = false, $mode = '') + { dol_syslog(__METHOD__, LOG_DEBUG); $error = 0; @@ -1345,8 +1348,8 @@ class BookKeeping extends CommonObject * @param string $importkey Import key * @return int Result */ - public function deleteByImportkey($importkey) - { + public function deleteByImportkey($importkey) + { $this->db->begin(); // first check if line not yet in bookkeeping @@ -1376,11 +1379,11 @@ class BookKeeping extends CommonObject * @param int $delmonth Month * @return int <0 if KO, >0 if OK */ - public function deleteByYearAndJournal($delyear = 0, $journal = '', $mode = '', $delmonth = 0) - { - global $langs; + public function deleteByYearAndJournal($delyear = 0, $journal = '', $mode = '', $delmonth = 0) + { + global $langs; - if (empty($delyear) && empty($journal)) + if (empty($delyear) && empty($journal)) { $this->error = 'ErrorOneFieldRequired'; return -1; @@ -1425,8 +1428,8 @@ class BookKeeping extends CommonObject * @param int $piecenum Piecenum to delete * @return int Result */ - public function deleteMvtNum($piecenum) - { + public function deleteMvtNum($piecenum) + { global $conf; $this->db->begin(); @@ -1460,8 +1463,8 @@ class BookKeeping extends CommonObject * @param int $fromid Id of object to clone * @return int New id of clone */ - public function createFromClone(User $user, $fromid) - { + public function createFromClone(User $user, $fromid) + { dol_syslog(__METHOD__, LOG_DEBUG); $error = 0; @@ -1508,8 +1511,8 @@ class BookKeeping extends CommonObject * * @return void */ - public function initAsSpecimen() - { + public function initAsSpecimen() + { global $user; $now = dol_now(); @@ -1545,8 +1548,8 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function fetchPerMvt($piecenum, $mode = '') - { + public function fetchPerMvt($piecenum, $mode = '') + { global $conf; $sql = "SELECT piece_num,doc_date,code_journal,journal_label,doc_ref,doc_type,date_creation"; @@ -1610,8 +1613,8 @@ class BookKeeping extends CommonObject * @param string $mode Mode * @return int <0 if KO, >0 if OK */ - public function fetchAllPerMvt($piecenum, $mode = '') - { + public function fetchAllPerMvt($piecenum, $mode = '') + { global $conf; $sql = "SELECT rowid, doc_date, doc_type,"; @@ -1661,16 +1664,16 @@ class BookKeeping extends CommonObject return 1; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Export bookkeeping * * @param string $model Model * @return int Result */ - public function export_bookkeeping($model = 'ebp') - { - // phpcs:enable + public function export_bookkeeping($model = 'ebp') + { + // phpcs:enable global $conf; $sql = "SELECT rowid, doc_date, doc_type,"; @@ -1736,10 +1739,10 @@ class BookKeeping extends CommonObject $this->db->begin(); - if ($direction == 0) + if ($direction == 0) { $next_piecenum = $this->getNextNumMvt(); - $now = dol_now(); + $now = dol_now(); if ($next_piecenum < 0) { $error++; @@ -1752,14 +1755,14 @@ class BookKeeping extends CommonObject $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.", '".$this->db->idate($now)."'"; - $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.$this->db->escape($piece_num); + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num); $resql = $this->db->query($sql); if (!$resql) { $error++; $this->errors[] = 'Error '.$this->db->lasterror(); dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); } - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.$this->db->escape($piece_num); + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num); $resql = $this->db->query($sql); if (!$resql) { $error++; @@ -1767,7 +1770,7 @@ class BookKeeping extends CommonObject dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); } } elseif ($direction == 1) { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.$piece_num; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num); $resql = $this->db->query($sql); if (!$resql) { $error++; @@ -1782,14 +1785,14 @@ class BookKeeping extends CommonObject $sql .= ' doc_ref, fk_doc, fk_docdet, 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 .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE piece_num = '.$piece_num; + $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' WHERE piece_num = '.((int) $piece_num); $resql = $this->db->query($sql); if (!$resql) { $error++; $this->errors[] = 'Error '.$this->db->lasterror(); dol_syslog(__METHOD__.' '.join(',', $this->errors), LOG_ERR); } - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.$piece_num; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num); $resql = $this->db->query($sql); if (!$resql) { $error++; @@ -1816,22 +1819,22 @@ class BookKeeping extends CommonObject */ } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Return list of accounts with label by chart of accounts - * - * @param string $selectid Preselected chart of accounts - * @param string $htmlname Name of field in html form - * @param int $showempty Add an empty field - * @param array $event Event options - * @param int $select_in Value is a aa.rowid (0 default) or aa.account_number (1) - * @param int $select_out Set value returned by select 0=rowid (default), 1=account_number - * @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number - * @return string String with HTML select - */ - public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') - { - // phpcs:enable + * Return list of accounts with label by chart of accounts + * + * @param string $selectid Preselected chart of accounts + * @param string $htmlname Name of field in html form + * @param int $showempty Add an empty field + * @param array $event Event options + * @param int $select_in Value is a aa.rowid (0 default) or aa.account_number (1) + * @param int $select_out Set value returned by select 0=rowid (default), 1=account_number + * @param int $aabase Set accounting_account base class to display empty=all or from 1 to 8 will display only account beginning by this number + * @return string String with HTML select + */ + public function select_account($selectid, $htmlname = 'account', $showempty = 0, $event = array(), $select_in = 0, $select_out = 0, $aabase = '') + { + // phpcs:enable global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; @@ -1888,7 +1891,7 @@ class BookKeeping extends CommonObject return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Description of a root accounting account * @@ -1897,7 +1900,7 @@ class BookKeeping extends CommonObject */ public function get_compte_racine($account = null) { - // phpcs:enable + // phpcs:enable global $conf; $pcgver = $conf->global->CHARTOFACCOUNTS; @@ -1907,7 +1910,7 @@ class BookKeeping extends CommonObject $sql .= " AND asy.rowid = ".$pcgver; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as parent ON aa.account_parent = parent.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as root ON parent.account_parent = root.rowid"; - $sql .= " WHERE aa.account_number = '".$account."'"; + $sql .= " WHERE aa.account_number = '".$this->db->escape($account)."'"; $sql .= " AND parent.active = 1"; $sql .= " AND root.active = 1"; $sql .= " AND aa.entity IN (".getEntity('accountancy').")"; @@ -1929,24 +1932,24 @@ class BookKeeping extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Description of accounting account * * @param string $account Accounting account * @return string Account desc */ - public function get_compte_desc($account = null) - { - // phpcs:enable + public function get_compte_desc($account = null) + { + // phpcs:enable global $conf; $pcgver = $conf->global->CHARTOFACCOUNTS; $sql = "SELECT aa.account_number, aa.label, aa.rowid, aa.fk_pcg_version, cat.label as category"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_account as aa "; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version"; - $sql .= " AND aa.account_number = '".$account."'"; - $sql .= " AND asy.rowid = ".$pcgver; + $sql .= " AND aa.account_number = '".$this->db->escape($account)."'"; + $sql .= " AND asy.rowid = ".((int) $pcgver); $sql .= " AND aa.active = 1"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_accounting_category as cat ON aa.fk_accounting_category = cat.rowid"; $sql .= " WHERE aa.entity IN (".getEntity('accountancy').")"; @@ -1986,13 +1989,13 @@ class BookKeepingLine public $doc_ref; /** - * @var int ID - */ + * @var int ID + */ public $fk_doc; /** - * @var int ID - */ + * @var int ID + */ public $fk_docdet; public $thirdparty_code; @@ -2003,13 +2006,27 @@ class BookKeepingLine public $label_operation; public $debit; public $credit; - public $montant; - public $sens; - public $lettering_code; /** - * @var int ID - */ + * @var float Amount + * @deprecated see $amount + */ + public $montant; + + /** + * @var float Amount + */ + public $amount; + + /** + * @var string Sens + */ + public $sens; + public $lettering_code; + + /** + * @var int ID + */ public $fk_user_author; public $import_key; @@ -2018,17 +2035,17 @@ class BookKeepingLine public $piece_num; /** - * @var integer|string date_creation - */ + * @var integer|string date_creation + */ public $date_creation; /** * @var integer|string $date_modification; */ - public $date_modification; + public $date_modification; - /** - * @var integer|string $date_export; - */ - public $date_export; + /** + * @var integer|string $date_export; + */ + public $date_export; } diff --git a/htdocs/accountancy/class/lettering.class.php b/htdocs/accountancy/class/lettering.class.php index d663e0ec9c4..cfe9bf635ae 100644 --- a/htdocs/accountancy/class/lettering.class.php +++ b/htdocs/accountancy/class/lettering.class.php @@ -68,11 +68,11 @@ class Lettering extends BookKeeping $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON(bk.fk_doc = bu.fk_bank AND bu.type IN ('payment', 'payment_supplier') ) "; $sql .= " WHERE ( "; if ($object->code_compta != "") - $sql .= " bk.subledger_account = '".$object->code_compta."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta)."' "; if ($object->code_compta != "" && $object->code_compta_fournisseur != "") $sql .= " OR "; if ($object->code_compta_fournisseur != "") - $sql .= " bk.subledger_account = '".$object->code_compta_fournisseur."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta_fournisseur)."' "; $sql .= " ) AND (bk.date_lettering ='' OR bk.date_lettering IS NULL) "; $sql .= " AND (bk.lettering_code != '' OR bk.lettering_code IS NULL) "; @@ -95,19 +95,19 @@ class Lettering extends BookKeeping $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn facf "; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as payfacf ON payfacf.fk_facturefourn=facf.rowid"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."paiementfourn as payf ON payfacf.fk_paiementfourn=payf.rowid"; - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_bookkeeping as bk ON (bk.fk_doc = payf.fk_bank AND bk.code_journal='".$obj->code_journal."')"; - $sql .= " WHERE payfacf.fk_paiementfourn = '".$obj->url_id."' "; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_bookkeeping as bk ON (bk.fk_doc = payf.fk_bank AND bk.code_journal='".$this->db->escape($obj->code_journal)."')"; + $sql .= " WHERE payfacf.fk_paiementfourn = '".$this->db->escape($obj->url_id)."' "; $sql .= " AND facf.entity = ".$conf->entity; $sql .= " AND code_journal IN (SELECT code FROM ".MAIN_DB_PREFIX."accounting_journal WHERE nature=4 AND entity=".$conf->entity.") "; $sql .= " AND ( "; if ($object->code_compta != "") { - $sql .= " bk.subledger_account = '".$object->code_compta."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta)."' "; } if ($object->code_compta != "" && $object->code_compta_fournisseur != "") { $sql .= " OR "; } if ($object->code_compta_fournisseur != "") { - $sql .= " bk.subledger_account = '".$object->code_compta_fournisseur."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta_fournisseur)."' "; } $sql .= " ) "; @@ -129,13 +129,13 @@ class Lettering extends BookKeeping $sql .= " AND facf.entity = ".$conf->entity; $sql .= " AND ( "; if ($object->code_compta != "") { - $sql .= " bk.subledger_account = '".$object->code_compta."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta)."' "; } if ($object->code_compta != "" && $object->code_compta_fournisseur != "") { $sql .= " OR "; } if ($object->code_compta_fournisseur != "") { - $sql .= " bk.subledger_account = '".$object->code_compta_fournisseur."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta_fournisseur)."' "; } $sql .= ") "; @@ -154,19 +154,19 @@ class Lettering extends BookKeeping $sql .= " FROM ".MAIN_DB_PREFIX."facture fac "; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."paiement_facture as payfac ON payfac.fk_facture=fac.rowid"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."paiement as pay ON payfac.fk_paiement=pay.rowid"; - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_bookkeeping as bk ON (bk.fk_doc = pay.fk_bank AND bk.code_journal='".$obj->code_journal."')"; - $sql .= " WHERE payfac.fk_paiement = '".$obj->url_id."' "; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."accounting_bookkeeping as bk ON (bk.fk_doc = pay.fk_bank AND bk.code_journal='".$this->db->escape($obj->code_journal)."')"; + $sql .= " WHERE payfac.fk_paiement = '".$this->db->escape($obj->url_id)."' "; $sql .= " AND bk.code_journal IN (SELECT code FROM ".MAIN_DB_PREFIX."accounting_journal WHERE nature=4 AND entity=".$conf->entity.") "; $sql .= " AND fac.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND ( "; if ($object->code_compta != "") { - $sql .= " bk.subledger_account = '".$object->code_compta."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta)."' "; } if ($object->code_compta != "" && $object->code_compta_fournisseur != "") { $sql .= " OR "; } if ($object->code_compta_fournisseur != "") { - $sql .= " bk.subledger_account = '".$object->code_compta_fournisseur."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta_fournisseur)."' "; } $sql .= " )"; @@ -188,13 +188,13 @@ class Lettering extends BookKeeping $sql .= " AND fac.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND ( "; if ($object->code_compta != "") { - $sql .= " bk.subledger_account = '".$object->code_compta."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta)."' "; } if ($object->code_compta != "" && $object->code_compta_fournisseur != "") { $sql .= " OR "; } if ($object->code_compta_fournisseur != "") { - $sql .= " bk.subledger_account = '".$object->code_compta_fournisseur."' "; + $sql .= " bk.subledger_account = '".$this->db->escape($object->code_compta_fournisseur)."' "; } $sql .= " ) "; @@ -238,7 +238,7 @@ class Lettering extends BookKeeping $lettre = 'AAA'; $sql = "SELECT DISTINCT lettering_code FROM ".MAIN_DB_PREFIX."accounting_bookkeeping WHERE "; - $sql .= " lettering_code != '' ORDER BY lettering_code DESC limit 1; "; + $sql .= " lettering_code != '' ORDER BY lettering_code DESC limit 1"; $result = $this->db->query($sql); if ($result) { @@ -252,7 +252,7 @@ class Lettering extends BookKeeping } $sql = "SELECT SUM(ABS(debit)) as deb, SUM(ABS(credit)) as cred FROM ".MAIN_DB_PREFIX."accounting_bookkeeping WHERE "; - $sql .= " rowid IN (".implode(',', $ids).") AND date_validated IS NULL "; + $sql .= " rowid IN (".implode(',', $ids).") AND date_validated IS NULL"; $result = $this->db->query($sql); if ($result) { $obj = $this->db->fetch_object($result); @@ -272,7 +272,7 @@ class Lettering extends BookKeeping if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."accounting_bookkeeping SET"; - $sql .= " lettering_code='".$lettre."'"; + $sql .= " lettering_code='".$this->db->escape($lettre)."'"; $sql .= " , date_lettering = '".$this->db->idate($now)."'"; // todo correct date it's false $sql .= " WHERE rowid IN (".implode(',', $ids).") AND date_validated IS NULL "; $this->db->begin(); diff --git a/htdocs/accountancy/closure/index.php b/htdocs/accountancy/closure/index.php index 39ed325b5fe..ed8fc8ecc7e 100644 --- a/htdocs/accountancy/closure/index.php +++ b/htdocs/accountancy/closure/index.php @@ -42,8 +42,7 @@ if (!$user->rights->accounting->fiscalyear->write) $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); -else -{ +else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } diff --git a/htdocs/accountancy/closure/validate.php b/htdocs/accountancy/closure/validate.php index fe7fda5054f..808ccfba0ef 100644 --- a/htdocs/accountancy/closure/validate.php +++ b/htdocs/accountancy/closure/validate.php @@ -42,8 +42,7 @@ if ($user->socid > 0) $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); -else -{ +else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } diff --git a/htdocs/accountancy/customer/card.php b/htdocs/accountancy/customer/card.php index 591606a7e26..ed8f347a177 100644 --- a/htdocs/accountancy/customer/card.php +++ b/htdocs/accountancy/customer/card.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; // Load translation files required by the page $langs->loadLangs(array("bills", "accountancy")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -59,9 +59,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) $resql = $db->query($sql); if (!$resql) { setEventMessages($db->lasterror(), null, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); if ($backtopage) { diff --git a/htdocs/accountancy/customer/index.php b/htdocs/accountancy/customer/index.php index 06ad1cddfa5..1a5098bda38 100644 --- a/htdocs/accountancy/customer/index.php +++ b/htdocs/accountancy/customer/index.php @@ -47,8 +47,7 @@ if (!$user->rights->accounting->bind->write) $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); -else -{ +else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } @@ -132,9 +131,9 @@ if ($action == 'validatehistory') { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facturedet as l ON f.rowid = l.fk_facture"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$chartaccountcode."' AND aa2.entity = ".$conf->entity; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$chartaccountcode."' AND aa3.entity = ".$conf->entity; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity; $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; @@ -202,8 +201,7 @@ if ($action == 'validatehistory') { if ($error) { $db->rollback(); - } - else { + } else { $db->commit(); setEventMessages($langs->trans('AutomaticBindingDone'), null, 'mesgs'); } @@ -258,6 +256,10 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; +// Define begin binding date +if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; +} $sql .= " AND f.fk_statut > 0"; $sql .= " AND fd.product_type <= 2"; $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy @@ -279,15 +281,13 @@ if ($resql) { if ($row[0] == 'tobind') { print $langs->trans("Unknown"); - } - else print length_accountg($row[0]); + } else print length_accountg($row[0]); print ''; print ''; if ($row[0] == 'tobind') { print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind")); - } - else print $row[1]; + } else print $row[1]; print ''; for ($i = 2; $i <= 12; $i++) { print ''.price($row[$i]).''; @@ -334,6 +334,10 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = fd.fk_code_ventilation"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; +// Define begin binding date +if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; +} $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND f.fk_statut > 0"; $sql .= " AND fd.product_type <= 2"; @@ -355,16 +359,14 @@ if ($resql) { if ($row[0] == 'tobind') { print $langs->trans("Unknown"); - } - else print length_accountg($row[0]); + } else print length_accountg($row[0]); print ''; print ''; if ($row[0] == 'tobind') { print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/customer/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind")); - } - else print $row[1]; + } else print $row[1]; print ''; for ($i = 2; $i <= 12; $i++) { @@ -400,7 +402,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. } print ''.$langs->trans("Total").''; - $sql = "SELECT '".$langs->trans("TotalVente")."' AS total,"; + $sql = "SELECT '".$db->escape($langs->trans("TotalVente"))."' AS total,"; for ($i = 1; $i <= 12; $i++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; if ($j > 12) $j -= 12; @@ -411,6 +413,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; + // Define begin binding date + if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + } $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND f.fk_statut > 0"; $sql .= " AND fd.product_type <= 2"; @@ -453,7 +459,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. } print ''.$langs->trans("Total").''; - $sql = "SELECT '".$langs->trans("Vide")."' AS marge,"; + $sql = "SELECT '".$db->escape($langs->trans("Vide"))."' AS marge,"; for ($i = 1; $i <= 12; $i++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; if ($j > 12) $j -= 12; @@ -464,6 +470,10 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " WHERE f.datef >= '".$db->idate($search_date_start)."'"; $sql .= " AND f.datef <= '".$db->idate($search_date_end)."'"; + // Define begin binding date + if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + } $sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy $sql .= " AND f.fk_statut > 0"; $sql .= " AND fd.product_type <= 2"; diff --git a/htdocs/accountancy/customer/lines.php b/htdocs/accountancy/customer/lines.php index c45e7b27b0a..5d35040f6ab 100644 --- a/htdocs/accountancy/customer/lines.php +++ b/htdocs/accountancy/customer/lines.php @@ -61,8 +61,8 @@ $search_tvaintra = GETPOST('search_tvaintra', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0) $page = 0; $offset = $limit * $page; @@ -93,7 +93,7 @@ $formaccounting = new FormAccounting($db); if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { $search_societe = ''; - $search_lineid = ''; + $search_lineid = ''; $search_ref = ''; $search_invoice = ''; $search_label = ''; @@ -203,7 +203,7 @@ if ($search_societe) { $sql .= natural_search('s.nom', $search_societe); } if ($search_lineid) { - $sql .= natural_search("fd.rowid", $search_lineid, 1); + $sql .= natural_search("fd.rowid", $search_lineid, 1); } if (strlen(trim($search_invoice))) { $sql .= natural_search("f.ref", $search_invoice); @@ -251,13 +251,13 @@ $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { - $page = 0; - $offset = 0; - } + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql .= $db->plimit($limit + 1, $offset); @@ -309,9 +309,9 @@ if ($result) { print ''; print ''; print ''; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { - print ''; - } + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { + print ''; + } print ''; $formother->select_year($search_year, 'search_year', 1, 20, 5); print ''; @@ -344,22 +344,23 @@ if ($result) { print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("AccountAccounting", $_SERVER["PHP_SELF"], "aa.account_number", "", $param, '', $sortfield, $sortorder); $checkpicto = $form->showCheckAddButtons(); print_liste_field_titre($checkpicto, '', '', '', '', '', '', '', 'center '); print "\n"; - $thirdpartystatic = new Societe($db); - $facture_static = new Facture($db); - $product_static = new Product($db); + $thirdpartystatic = new Societe($db); + $facturestatic = new Facture($db); + $productstatic = new Product($db); $accountingaccountstatic = new AccountingAccount($db); + $i = 0; while ($i < min($num_lines, $limit)) { $objp = $db->fetch_object($result); - $facture_static->ref = $objp->ref; - $facture_static->id = $objp->facid; - $facture_static->type = $objp->ftype; + $facturestatic->ref = $objp->ref; + $facturestatic->id = $objp->facid; + $facturestatic->type = $objp->ftype; $thirdpartystatic->id = $objp->socid; $thirdpartystatic->name = $objp->name; @@ -372,10 +373,10 @@ if ($result) { $thirdpartystatic->email = $objp->email; $thirdpartystatic->country_code = $objp->country_code; - $product_static->ref = $objp->product_ref; - $product_static->id = $objp->product_id; - $product_static->label = $objp->product_label; - $product_static->type = $objp->line_type; + $productstatic->ref = $objp->product_ref; + $productstatic->id = $objp->product_id; + $productstatic->label = $objp->product_label; + $productstatic->type = $objp->line_type; $accountingaccountstatic->rowid = $objp->fk_compte; $accountingaccountstatic->label = $objp->label; @@ -388,15 +389,15 @@ if ($result) { print ''.$objp->rowid.''; // Ref Invoice - print ''.$facture_static->getNomUrl(1).''; + print ''.$facturestatic->getNomUrl(1).''; // Date invoice print ''.dol_print_date($db->jdate($objp->datef), 'day').''; // Ref Product print ''; - if ($product_static->id > 0) print $product_static->getNomUrl(1); - if ($product_static->id > 0 && $objp->product_label) print '
'; + if ($productstatic->id > 0) print $productstatic->getNomUrl(1); + if ($productstatic->id > 0 && $objp->product_label) print '
'; if ($objp->product_label) print ''.$objp->product_label.''; print ''; @@ -411,7 +412,7 @@ if ($result) { print ''.vatrate($objp->tva_tx.($objp->vat_src_code ? ' ('.$objp->vat_src_code.')' : '')).''; // Thirdparty - print '' . $thirdpartystatic->getNomUrl(1, 'customer') . ''; + print ''.$thirdpartystatic->getNomUrl(1, 'customer').''; // Country print ''; @@ -423,8 +424,9 @@ if ($result) { print ''.$objp->tva_intra.''; - print ''; - print $accountingaccountstatic->getNomUrl(0, 1, 1).'
'; + print ''; + print $accountingaccountstatic->getNomUrl(0, 1, 1, '', 1); + print ' '; print img_edit(); print ''; print ''; @@ -432,14 +434,14 @@ if ($result) { print ''; $i++; } - print ''; - print "
"; + print ''; + print ""; - if ($nbtotalofrecords > $limit) { - print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); - } + if ($nbtotalofrecords > $limit) { + print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num_lines, $nbtotalofrecords, '', 0, '', '', $limit, 1); + } - print '
'; + print ''; } else { print $db->lasterror(); } diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php index 1d93a0fea17..a06d2f25d8c 100644 --- a/htdocs/accountancy/customer/list.php +++ b/htdocs/accountancy/customer/list.php @@ -40,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; // Load translation files required by the page $langs->loadLangs(array("bills", "companies", "compta", "accountancy", "other", "productbatch")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -69,8 +69,8 @@ $btn_ventil = GETPOST('ventil', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0) { $page = 0; } $offset = $limit * $page; @@ -114,7 +114,7 @@ if (empty($reshook)) // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers { - $search_societe=''; + $search_societe = ''; $search_lineid = ''; $search_ref = ''; $search_invoice = ''; @@ -140,50 +140,48 @@ if (empty($reshook)) if ($massaction == 'ventil') { - $msg = ''; + $msg = ''; - //print '
' . $langs->trans("Processing") . '...
'; - if (!empty($mesCasesCochees)) { - $msg = '
'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'
'; - $msg .= '
'; - $cpt = 0; - $ok = 0; - $ko = 0; + //print '
' . $langs->trans("Processing") . '...
'; + if (!empty($mesCasesCochees)) { + $msg = '
'.$langs->trans("SelectedLines").': '.count($mesCasesCochees).'
'; + $msg .= '
'; + $cpt = 0; + $ok = 0; + $ko = 0; - foreach ($mesCasesCochees as $maLigneCochee) { - $maLigneCourante = explode("_", $maLigneCochee); - $monId = $maLigneCourante[0]; - $monCompte = GETPOST('codeventil'.$monId); + foreach ($mesCasesCochees as $maLigneCochee) { + $maLigneCourante = explode("_", $maLigneCochee); + $monId = $maLigneCourante[0]; + $monCompte = GETPOST('codeventil'.$monId); - if ($monCompte <= 0) - { - $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NoAccountSelected").'
'; - $ko++; - } - else - { - $sql = " UPDATE ".MAIN_DB_PREFIX."facturedet"; - $sql .= " SET fk_code_ventilation = ".$monCompte; - $sql .= " WHERE rowid = ".$monId; + if ($monCompte <= 0) + { + $msg .= '
'.$langs->trans("Lineofinvoice", $monId).' - '.$langs->trans("NoAccountSelected").'
'; + $ko++; + } else { + $sql = " UPDATE ".MAIN_DB_PREFIX."facturedet"; + $sql .= " SET fk_code_ventilation = ".((int) $monCompte); + $sql .= " WHERE rowid = ".((int) $monId); - $accountventilated = new AccountingAccount($db); - $accountventilated->fetch($monCompte, ''); + $accountventilated = new AccountingAccount($db); + $accountventilated->fetch($monCompte, '', 1); - dol_syslog("accountancy/customer/list.php sql=".$sql, LOG_DEBUG); - if ($db->query($sql)) { - $msg .= '
'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'; - $ok++; - } else { - $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
'; - $ko++; - } - } + dol_syslog("accountancy/customer/list.php sql=".$sql, LOG_DEBUG); + if ($db->query($sql)) { + $msg .= '
'.$langs->trans("Lineofinvoice", $monId).' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'; + $ok++; + } else { + $msg .= '
'.$langs->trans("ErrorDB").' : '.$langs->trans("Lineofinvoice", $monId).' - '.$langs->trans("NotVentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
'.$sql.'
'; + $ko++; + } + } - $cpt++; - } - $msg .= '
'; - $msg .= '
'.$langs->trans("EndProcessing").'
'; - } + $cpt++; + } + $msg .= '
'; + $msg .= '
'.$langs->trans("EndProcessing").'
'; + } } @@ -201,8 +199,8 @@ if (empty($chartaccountcode)) { print $langs->trans("ErrorChartOfAccountSystemNotSelected"); // End of page - llxFooter(); - $db->close(); + llxFooter(); + $db->close(); exit; } @@ -224,38 +222,42 @@ $sql .= " INNER JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays "; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."facturedet as l ON f.rowid = l.fk_facture"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$chartaccountcode."' AND aa.entity = ".$conf->entity; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$chartaccountcode."' AND aa2.entity = ".$conf->entity; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$chartaccountcode."' AND aa3.entity = ".$conf->entity; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON p.accountancy_code_sell = aa.account_number AND aa.active = 1 AND aa.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa.entity = ".$conf->entity; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa2 ON p.accountancy_code_sell_intra = aa2.account_number AND aa2.active = 1 AND aa2.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa2.entity = ".$conf->entity; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa3 ON p.accountancy_code_sell_export = aa3.account_number AND aa3.active = 1 AND aa3.fk_pcg_version = '".$db->escape($chartaccountcode)."' AND aa3.entity = ".$conf->entity; $sql .= " WHERE f.fk_statut > 0 AND l.fk_code_ventilation <= 0"; $sql .= " AND l.product_type <= 2"; +// Define begin binding date +if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND f.datef >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; +} // Add search filter like if ($search_societe) { $sql .= natural_search('s.nom', $search_societe); } if ($search_lineid) { - $sql .= natural_search("l.rowid", $search_lineid, 1); + $sql .= natural_search("l.rowid", $search_lineid, 1); } if (strlen(trim($search_invoice))) { - $sql .= natural_search("f.ref", $search_invoice); + $sql .= natural_search("f.ref", $search_invoice); } if (strlen(trim($search_ref))) { - $sql .= natural_search("p.ref", $search_ref); + $sql .= natural_search("p.ref", $search_ref); } if (strlen(trim($search_label))) { - $sql .= natural_search("p.label", $search_label); + $sql .= natural_search("p.label", $search_label); } if (strlen(trim($search_desc))) { - $sql .= natural_search("l.description", $search_desc); + $sql .= natural_search("l.description", $search_desc); } if (strlen(trim($search_amount))) { - $sql .= natural_search("l.total_ht", $search_amount, 1); + $sql .= natural_search("l.total_ht", $search_amount, 1); } if (strlen(trim($search_account))) { - $sql .= natural_search("aa.account_number", $search_account); + $sql .= natural_search("aa.account_number", $search_account); } if (strlen(trim($search_vat))) { - $sql .= natural_search("l.tva_tx", price2num($search_vat), 1); + $sql .= natural_search("l.tva_tx", price2num($search_vat), 1); } $sql .= dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year); if (strlen(trim($search_country))) { @@ -293,13 +295,13 @@ $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { - $page = 0; - $offset = 0; - } + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql .= $db->plimit($limit + 1, $offset); @@ -334,9 +336,9 @@ if ($result) { if ($search_tvaintra) $param .= "&search_tvaintra=".urlencode($search_tvaintra); $arrayofmassactions = array( - 'ventil'=>$langs->trans("Ventilate") - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), + 'ventil'=>$langs->trans("Ventilate") + //'presend'=>$langs->trans("SendByMail"), + //'builddoc'=>$langs->trans("PDFMerge"), ); //if ($user->rights->mymodule->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); //if (in_array($massaction, array('presend','predelete'))) $arrayofmassactions=array(); @@ -374,8 +376,8 @@ if ($result) { print ''; print ''; if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) { - print ''; - } + print ''; + } print ''; $formother->select_year($search_year, 'search_year', 1, 20, 5); print ''; @@ -384,9 +386,9 @@ if ($result) { print ''; print ''; print ''; - print ''; + print ''; print ''; - print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth150', 'code2', 1, 0, 1); + print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth125', 'code2', 1, 0, 1); //print ''; print ''; print ''; @@ -409,7 +411,7 @@ if ($result) { print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], "l.tva_tx", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("Country", $_SERVER["PHP_SELF"], "co.label", "", $param, '', $sortfield, $sortorder); - print_liste_field_titre("VATIntra", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder); + print_liste_field_titre("VATIntraShort", $_SERVER["PHP_SELF"], "s.tva_intra", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("AccountAccountingSuggest", '', '', '', '', '', '', '', 'nowraponall '); print_liste_field_titre("IntoAccount", '', '', '', '', '', '', '', 'center '); $checkpicto = ''; @@ -423,7 +425,7 @@ if ($result) { $isSellerInEEC = isInEEC($mysoc); - $accountingaccount_codetotid_cache = array(); + $accountingaccount_codetotid_cache = array(); while ($i < min($num_lines, $limit)) { $objp = $db->fetch_object($result); @@ -462,29 +464,29 @@ if ($result) { $code_sell_p_notset = ''; $objp->aarowid_suggest = ''; // Will be set later - $isBuyerInEEC = isInEEC($objp); + $isBuyerInEEC = isInEEC($objp); - // Search suggested default account for product/service - $suggestedaccountingaccountbydefaultfor = ''; - if ($objp->type_l == 1) { - if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = ''; - } else { - if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with a VAT + // Search suggested default account for product/service + $suggestedaccountingaccountbydefaultfor = ''; + if ($objp->type_l == 1) { + if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) + $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = ''; + } else { + if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with a VAT $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); $suggestedaccountingaccountbydefaultfor = 'eecwithvat'; - } elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number - $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber'; + } elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number + $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = 'eecwithoutvatnumber'; } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = 'eec'; - } else { // Foreign sale - $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : ''); - $suggestedaccountingaccountbydefaultfor = 'export'; - } - } + $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = 'eec'; + } else { // Foreign sale + $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT) ? $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT : ''); + $suggestedaccountingaccountbydefaultfor = 'export'; + } + } } elseif ($objp->type_l == 0) { if ($objp->country_code == $mysoc->country_code || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) $objp->code_sell_l = (!empty($conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT) ? $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT : ''); @@ -510,28 +512,36 @@ if ($result) { // Search suggested account for product/service (similar code exists in page index.php to make automatic binding) $suggestedaccountingaccountfor = ''; if (($objp->country_code == $mysoc->country_code) || empty($objp->country_code)) { // If buyer in same country than seller (if not defined, we assume it is same country) - $objp->code_sell_p = $objp->code_sell; - $objp->aarowid_suggest = $objp->aarowid; - $suggestedaccountingaccountfor = ''; - } else { - if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with VAT + $objp->code_sell_p = $objp->code_sell; + $objp->aarowid_suggest = $objp->aarowid; + $suggestedaccountingaccountfor = ''; + } else { + if ($isSellerInEEC && $isBuyerInEEC && $objp->tva_tx_line != 0) { // European intravat sale, but with VAT $objp->code_sell_p = $objp->code_sell; $objp->aarowid_suggest = $objp->aarowid; $suggestedaccountingaccountfor = 'eecwithvat'; - } elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number - $objp->code_sell_p = $objp->code_sell; - $objp->aarowid_suggest = $objp->aarowid; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ? - $suggestedaccountingaccountfor = 'eecwithoutvatnumber'; + } elseif ($isSellerInEEC && $isBuyerInEEC && empty($objp->tva_intra)) { // European intravat sale, without VAT intra community number + $objp->code_sell_p = $objp->code_sell; + $objp->aarowid_suggest = $objp->aarowid; // There is a doubt for this case. Is it an error on vat or we just forgot to fill vat number ? + $suggestedaccountingaccountfor = 'eecwithoutvatnumber'; } elseif ($isSellerInEEC && $isBuyerInEEC) { // European intravat sale - $objp->code_sell_p = $objp->code_sell_intra; - $objp->aarowid_suggest = $objp->aarowid_intra; - $suggestedaccountingaccountfor = 'eec'; - } else { // Foreign sale - $objp->code_sell_p = $objp->code_sell_export; - $objp->aarowid_suggest = $objp->aarowid_export; - $suggestedaccountingaccountfor = 'export'; - } - } + $objp->code_sell_p = $objp->code_sell_intra; + $objp->aarowid_suggest = $objp->aarowid_intra; + $suggestedaccountingaccountfor = 'eec'; + } else { // Foreign sale + $objp->code_sell_p = $objp->code_sell_export; + $objp->aarowid_suggest = $objp->aarowid_export; + $suggestedaccountingaccountfor = 'export'; + } + } + + // Manage Deposit + if ($objp->description == "(DEPOSIT)") { + $accountdeposittoventilated = new AccountingAccount($db); + $accountdeposittoventilated->fetch('', $conf->global->ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT, 1); + $objp->code_sell_l = $accountdeposittoventilated->ref; + $objp->aarowid_suggest = $accountdeposittoventilated->rowid; + } if (!empty($objp->code_sell_p)) { // Value was defined previously @@ -555,14 +565,14 @@ if ($result) { print ''.dol_print_date($db->jdate($objp->datef), 'day').''; // Ref Product - print ''; + print ''; if ($product_static->id > 0) { print $product_static->getNomUrl(1); } - if ($objp->product_label) print '
'.$objp->product_label.''; + if ($objp->product_label) print '
'.$objp->product_label.''; print ''; - print ''; + print ''; $text = dolGetFirstLineOfText(dol_string_nohtmltag($objp->description)); $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION) ? 32 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION; print $form->textwithtooltip(dol_trunc($text, $trunclength), $objp->description); @@ -580,35 +590,35 @@ if ($result) { print ''; // Thirdparty - print '' . $thirdpartystatic->getNomUrl(1, 'customer') . ''; + print ''.$thirdpartystatic->getNomUrl(1, 'customer').''; // Country - print ''; - $labelcountry = ($objp->country_code && ($langs->trans("Country".$objp->country_code) != "Country".$objp->country_code)) ? $langs->trans("Country".$objp->country_code) : $objp->country_label; - print $labelcountry; - print ''; + print ''; + $labelcountry = ($objp->country_code && ($langs->trans("Country".$objp->country_code) != "Country".$objp->country_code)) ? $langs->trans("Country".$objp->country_code) : $objp->country_label; + print $labelcountry; + print ''; print ''.$objp->tva_intra.''; // Found accounts print ''; - $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; - $shelp = ''; - if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC"); - elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport"); - $s .= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : ''.$langs->trans("NotDefined").''); - print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); - if ($objp->product_id > 0) + $s = ''.(($objp->type_l == 1) ? $langs->trans("DefaultForService") : $langs->trans("DefaultForProduct")).': '; + $shelp = ''; + if ($suggestedaccountingaccountbydefaultfor == 'eec') $shelp .= $langs->trans("SaleEEC"); + elseif ($suggestedaccountingaccountbydefaultfor == 'export') $shelp .= $langs->trans("SaleExport"); + $s .= ($objp->code_sell_l > 0 ? length_accountg($objp->code_sell_l) : ''.$langs->trans("NotDefined").''); + print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); + if ($objp->product_id > 0) { - print '
'; - $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; - $shelp = ''; - if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC"); - elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT"); - elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') $shelp = $langs->trans("SaleEECWithoutVATNumber"); - elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport"); - $s .= (empty($objp->code_sell_p) ? ''.$langs->trans("NotDefined").'' : length_accountg($objp->code_sell_p)); - print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); + print '
'; + $s = ''.(($objp->type_l == 1) ? $langs->trans("ThisService") : $langs->trans("ThisProduct")).': '; + $shelp = ''; + if ($suggestedaccountingaccountfor == 'eec') $shelp = $langs->trans("SaleEEC"); + elseif ($suggestedaccountingaccountfor == 'eecwithvat') $shelp = $langs->trans("SaleEECWithVAT"); + elseif ($suggestedaccountingaccountfor == 'eecwithoutvatnumber') $shelp = $langs->trans("SaleEECWithoutVATNumber"); + elseif ($suggestedaccountingaccountfor == 'export') $shelp = $langs->trans("SaleExport"); + $s .= (empty($objp->code_sell_p) ? ''.$langs->trans("NotDefined").'' : length_accountg($objp->code_sell_p)); + print $form->textwithpicto($s, $shelp, 1, 'help', '', 0, 2, '', 1); } print ''; @@ -629,8 +639,7 @@ if ($result) { $suggestedid = $tmpaccount->id; } $accountingaccount_codetotid_cache[$objp->code_sell_l] = $tmpaccount->id; - } - else { + } else { $suggestedid = $accountingaccount_codetotid_cache[$objp->code_sell_l]; } } diff --git a/htdocs/accountancy/expensereport/card.php b/htdocs/accountancy/expensereport/card.php index 9d7c504354f..ab02592f6b8 100644 --- a/htdocs/accountancy/expensereport/card.php +++ b/htdocs/accountancy/expensereport/card.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; // Load translation files required by the page $langs->loadLangs(array("bills", "accountancy", "trips")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -63,9 +63,7 @@ if ($action == 'ventil' && $user->rights->accounting->bind->write) $resql = $db->query($sql); if (!$resql) { setEventMessages($db->lasterror(), null, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); if ($backtopage) { diff --git a/htdocs/accountancy/expensereport/index.php b/htdocs/accountancy/expensereport/index.php index 387cfd0fb8e..6edb8d86a07 100644 --- a/htdocs/accountancy/expensereport/index.php +++ b/htdocs/accountancy/expensereport/index.php @@ -43,8 +43,7 @@ if (!$user->rights->accounting->bind->write) $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); if (GETPOST("year", 'int')) $year_start = GETPOST("year", 'int'); -else -{ +else { $year_start = dol_print_date(dol_now(), '%Y'); if (dol_print_date(dol_now(), '%m') < $month_start) $year_start--; // If current month is lower that starting fiscal month, we start last year } @@ -162,7 +161,7 @@ for ($i = 1; $i <= 12; $i++) { } print ''.$langs->trans("Total").''; -$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number')." AS codecomptable,"; +$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number')." AS codecomptable,"; $sql .= " ".$db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label')." AS intitule,"; for ($i = 1; $i <= 12; $i++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; @@ -175,6 +174,10 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport as er ON er.rowid = erd.fk_e $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = erd.fk_code_ventilation"; $sql .= " WHERE er.date_debut >= '".$db->idate($search_date_start)."'"; $sql .= " AND er.date_debut <= '".$db->idate($search_date_end)."'"; +// Define begin binding date +if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND er.date_debut >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; +} $sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")"; $sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy $sql .= " AND aa.account_number IS NULL"; @@ -190,26 +193,24 @@ if ($resql) { if ($row[0] == 'tobind') { print $langs->trans("Unknown"); - } - else print length_accountg($row[0]); + } else print length_accountg($row[0]); print ''; print ''; if ($row[0] == 'tobind') { print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind")); - } - else print $row[1]; + } else print $row[1]; print ''; - for ($i = 2; $i <= 12; $i++) { - print ''.price($row[$i]).''; - } - print ''.price($row[13]).''; - print ''.price($row[14]).''; - print ''; - } - $db->free($resql); + for ($i = 2; $i <= 12; $i++) { + print ''.price($row[$i]).''; + } + print ''.price($row[13]).''; + print ''.price($row[14]).''; + print ''; + } + $db->free($resql); } else { - print $db->lasterror(); // Show last sql error + print $db->lasterror(); // Show last sql error } print "\n"; print ''; @@ -233,7 +234,7 @@ for ($i = 1; $i <= 12; $i++) { } print ''.$langs->trans("Total").''; -$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number')." AS codecomptable,"; +$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number')." AS codecomptable,"; $sql .= " ".$db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label')." AS intitule,"; for ($i = 1; $i <= 12; $i++) { $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; @@ -246,6 +247,10 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport as er ON er.rowid = erd.fk_e $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON aa.rowid = erd.fk_code_ventilation"; $sql .= " WHERE er.date_debut >= '".$db->idate($search_date_start)."'"; $sql .= " AND er.date_debut <= '".$db->idate($search_date_end)."'"; +// Define begin binding date +if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND er.date_debut >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; +} $sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")"; $sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy $sql .= " AND aa.account_number IS NOT NULL"; @@ -261,27 +266,25 @@ if ($resql) { if ($row[0] == 'tobind') { print $langs->trans("Unknown"); - } - else print length_accountg($row[0]); + } else print length_accountg($row[0]); print ''; print ''; if ($row[0] == 'tobind') { print $langs->trans("UseMenuToSetBindindManualy", DOL_URL_ROOT.'/accountancy/expensereport/list.php?search_year='.$y, $langs->transnoentitiesnoconv("ToBind")); - } - else print $row[1]; + } else print $row[1]; print ''; - for ($i = 2; $i <= 12; $i++) { - print ''.price($row[$i]).''; - } - print ''.price($row[13]).''; - print ''.price($row[14]).''; - print ''; - } - $db->free($resql); + for ($i = 2; $i <= 12; $i++) { + print ''.price($row[$i]).''; + } + print ''.price($row[13]).''; + print ''.price($row[14]).''; + print ''; + } + $db->free($resql); } else { - print $db->lasterror(); // Show last sql error + print $db->lasterror(); // Show last sql error } print "\n"; print ''; @@ -290,56 +293,60 @@ print ''; if ($conf->global->MAIN_FEATURES_LEVEL > 0) // This part of code looks strange. Why showing a report where results depends on next step (so not yet available) ? { - print '
'; - print '
'; + print '
'; + print '
'; - print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1); - //print load_fiche_titre($langs->trans("OtherInfo"), '', ''); + print_barre_liste($langs->trans("OtherInfo"), '', '', '', '', '', '', -1, '', '', 0, '', '', 0, 1, 1); + //print load_fiche_titre($langs->trans("OtherInfo"), '', ''); print '
'; - print ''; - print ''; - for ($i = 1; $i <= 12; $i++) { - $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; - if ($j > 12) $j -= 12; - print ''; - } - print ''; + print '
'.$langs->trans("Total").''.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).''.$langs->trans("Total").'
'; + print ''; + for ($i = 1; $i <= 12; $i++) { + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; + if ($j > 12) $j -= 12; + print ''; + } + print ''; - $sql = "SELECT '".$langs->trans("TotalExpenseReport")."' AS label,"; - for ($i = 1; $i <= 12; $i++) { - $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; - if ($j > 12) $j -= 12; - $sql .= " SUM(".$db->ifsql('MONTH(er.date_create)='.$j, 'erd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).","; - } - $sql .= " SUM(erd.total_ht) as total"; - $sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport as er ON er.rowid = erd.fk_expensereport"; - $sql .= " WHERE er.date_debut >= '".$db->idate($search_date_start)."'"; - $sql .= " AND er.date_debut <= '".$db->idate($search_date_end)."'"; - $sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")"; - $sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy + $sql = "SELECT '".$db->escape($langs->trans("TotalExpenseReport"))."' AS label,"; + for ($i = 1; $i <= 12; $i++) { + $j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1; + if ($j > 12) $j -= 12; + $sql .= " SUM(".$db->ifsql('MONTH(er.date_create)='.$j, 'erd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).","; + } + $sql .= " SUM(erd.total_ht) as total"; + $sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport as er ON er.rowid = erd.fk_expensereport"; + $sql .= " WHERE er.date_debut >= '".$db->idate($search_date_start)."'"; + $sql .= " AND er.date_debut <= '".$db->idate($search_date_end)."'"; + // Define begin binding date + if (!empty($conf->global->ACCOUNTING_DATE_START_BINDING)) { + $sql .= " AND er.date_debut >= '".$db->idate($conf->global->ACCOUNTING_DATE_START_BINDING)."'"; + } + $sql .= " AND er.fk_statut IN (".ExpenseReport::STATUS_APPROVED.", ".ExpenseReport::STATUS_CLOSED.")"; + $sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy - dol_syslog('htdocs/accountancy/expensereport/index.php'); - $resql = $db->query($sql); - if ($resql) { - $num = $db->num_rows($resql); + dol_syslog('htdocs/accountancy/expensereport/index.php'); + $resql = $db->query($sql); + if ($resql) { + $num = $db->num_rows($resql); - while ($row = $db->fetch_row($resql)) { - print ''; - for ($i = 1; $i <= 12; $i++) { - print ''; - } - print ''; - print ''; - } + while ($row = $db->fetch_row($resql)) { + print ''; + for ($i = 1; $i <= 12; $i++) { + print ''; + } + print ''; + print ''; + } - $db->free($resql); - } else { - print $db->lasterror(); // Show last sql error - } - print "
'.$langs->trans("Total").''.$langs->trans('MonthShort'.str_pad($j, 2, '0', STR_PAD_LEFT)).''.$langs->trans("Total").'
'.$row[0].''.price($row[$i]).''.price($row[13]).'
'.$row[0].''.price($row[$i]).''.price($row[13]).'
\n"; - print '
'; + $db->free($resql); + } else { + print $db->lasterror(); // Show last sql error + } + print "\n"; + print ''; } // End of page diff --git a/htdocs/accountancy/expensereport/lines.php b/htdocs/accountancy/expensereport/lines.php index 7a45b70a4e4..f99f1148044 100644 --- a/htdocs/accountancy/expensereport/lines.php +++ b/htdocs/accountancy/expensereport/lines.php @@ -26,21 +26,23 @@ */ require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; // Load translation files required by the page -$langs->loadLangs(array("compta", "bills", "other", "accountancy", "trips", "productbatch")); +$langs->loadLangs(array("compta", "bills", "other", "accountancy", "trips", "productbatch", "hrm")); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $account_parent = GETPOST('account_parent', 'int'); $changeaccount = GETPOST('changeaccount'); // Search Getpost +$search_login = GETPOST('search_login', 'alpha'); $search_expensereport = GETPOST('search_expensereport', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); $search_desc = GETPOST('search_desc', 'alpha'); @@ -53,8 +55,8 @@ $search_year = GETPOST("search_year", "int"); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : (empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION) ? $conf->liste_limit : $conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0) $page = 0; $pageprev = $page - 1; @@ -84,6 +86,7 @@ $formaccounting = new FormAccounting($db); // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers { + $search_login = ''; $search_expensereport = ''; $search_label = ''; $search_desc = ''; @@ -162,14 +165,21 @@ print ''."\n"; } - if (is_object($objsoc) && $objsoc->id > 0) - { + if (is_object($objsoc) && $objsoc->id > 0) { $this->tpl['company'] = $objsoc->getNomUrl(1); $this->tpl['company_id'] = $objsoc->id; - } - else - { + } else { $this->tpl['company'] = $form->select_company($this->object->socid, 'socid', '', 1); } @@ -128,8 +122,7 @@ abstract class ActionsAdherentCardCommon $this->tpl['select_civility'] = $formcompany->select_civility($this->object->civility_id); // Predefined with third party - if ((isset($objsoc->typent_code) && $objsoc->typent_code == 'TE_PRIVATE')) - { + if ((isset($objsoc->typent_code) && $objsoc->typent_code == 'TE_PRIVATE')) { if (dol_strlen(trim($this->object->address)) == 0) $this->tpl['address'] = $objsoc->address; if (dol_strlen(trim($this->object->zip)) == 0) $this->object->zip = $objsoc->zip; if (dol_strlen(trim($this->object->town)) == 0) $this->object->town = $objsoc->town; @@ -161,38 +154,30 @@ abstract class ActionsAdherentCardCommon $this->tpl['select_morphy'] = $form->selectarray('morphy', $selectarray, $this->object->morphy, 0); } - if ($action == 'view' || $action == 'edit' || $action == 'delete') - { + if ($action == 'view' || $action == 'edit' || $action == 'delete') { // Emailing - if (!empty($conf->mailing->enabled)) - { + if (!empty($conf->mailing->enabled)) { $langs->load("mails"); $this->tpl['nb_emailing'] = $this->object->getNbOfEMailings(); } // Dolibarr user - if ($this->object->user_id) - { + if ($this->object->user_id) { $dolibarr_user = new User($this->db); $result = $dolibarr_user->fetch($this->object->user_id); $this->tpl['dolibarr_user'] = $dolibarr_user->getLoginUrl(1); - } - else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); + } else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); } - if ($action == 'view' || $action == 'delete') - { + if ($action == 'view' || $action == 'delete') { $this->tpl['showrefnav'] = $form->showrefnav($this->object, 'id'); - if ($this->object->socid > 0) - { + if ($this->object->socid > 0) { $objsoc = new Societe($this->db); $objsoc->fetch($this->object->socid); $this->tpl['company'] = $objsoc->getNomUrl(1); - } - else - { + } else { $this->tpl['company'] = $langs->trans("AdherentNotLinkedToThirdParty"); } @@ -214,8 +199,7 @@ abstract class ActionsAdherentCardCommon $this->tpl['note'] = nl2br($this->object->note); } - if ($action == 'create_user') - { + if ($action == 'create_user') { // Full firstname and lastname separated with a dot : firstname.lastname include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; @@ -263,19 +247,15 @@ abstract class ActionsAdherentCardCommon $this->object->canvas = $_POST["canvas"]; // We set country_id, and country_code label of the chosen country - if ($this->object->country_id) - { + if ($this->object->country_id) { $sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_country WHERE rowid = ".$this->object->country_id; $resql = $this->db->query($sql); - if ($resql) - { + if ($resql) { $obj = $this->db->fetch_object($resql); $this->object->country_code = $obj->code; $this->object->country = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->libelle; - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 60bb2ecd034..db2473c55d9 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -90,8 +90,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon $this->tpl['error'] = $this->error; $this->tpl['errors'] = $this->errors; - if ($action == 'view') - { + if ($action == 'view') { // Card header $head = member_prepare_head($this->object); $title = $this->getTitle($action); @@ -105,18 +104,14 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon $this->tpl['actionstodo'] = show_actions_todo($conf, $langs, $db, $objsoc, $this->object, 1); $this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1); - } - else - { + } else { // Confirm delete contact - if ($action == 'delete' && $user->rights->adherent->supprimer) - { + if ($action == 'delete' && $user->rights->adherent->supprimer) { $this->tpl['action_delete'] = $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$this->object->id, $langs->trans("DeleteAdherent"), $langs->trans("ConfirmDeleteAdherent"), "confirm_delete", '', 0, 1); } } - if ($action == 'list') - { + if ($action == 'list') { $this->LoadListDatas($limit, $offset, $sortfield, $sortorder); } } diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php index 92f1e11d7a2..b6c0b542d27 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php @@ -17,8 +17,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) -{ +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php index 36e2deab14c..92a4fbddd38 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php @@ -17,8 +17,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) -{ +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index b738f549247..8789b2fcb34 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -17,8 +17,7 @@ */ // Protection to avoid direct call of template -if (empty($conf) || !is_object($conf)) -{ +if (empty($conf) || !is_object($conf)) { print "Error, template page can't be called as URL"; exit; } diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 93c548cef62..d0a67153209 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -25,7 +25,7 @@ /** * \file htdocs/adherents/card.php * \ingroup member - * \brief Page of member + * \brief Page of a member */ require '../main.inc.php'; @@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Load translation files required by the page $langs->loadLangs(array("companies", "bills", "members", "users", "other", "paypal")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); @@ -55,8 +55,7 @@ $typeid = GETPOST('typeid', 'int'); $userid = GETPOST('userid', 'int'); $socid = GETPOST('socid', 'int'); -if (!empty($conf->mailmanspip->enabled)) -{ +if (!empty($conf->mailmanspip->enabled)) { include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php'; $langs->load('mailmanspip'); @@ -76,26 +75,23 @@ $socialnetworks = getArrayOfSocialNetworks(); $object->getCanvas($id); $canvas = $object->canvas ? $object->canvas : GETPOST("canvas"); $objcanvas = null; -if (!empty($canvas)) -{ +if (!empty($canvas)) { require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; $objcanvas = new Canvas($db, $action); $objcanvas->getCanvas('adherent', 'membercard', $canvas); } // Security check -$result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', $objcanvas); +$result = restrictedArea($user, 'adherent', $id, '', '', 'socid', 'rowid', 0); -if ($id > 0) -{ +if ($id > 0) { // Load member $result = $object->fetch($id); // Define variables to know what current user can do on users $canadduser = ($user->admin || $user->rights->user->user->creer); // Define variables to know what current user can do on properties of user linked to edited member - if ($object->user_id) - { + if ($object->user_id) { // $User is the user who edits, $object->user_id is the id of the related user in the edited member $caneditfielduser = ((($user->id == $object->user_id) && $user->rights->user->self->creer) || (($user->id != $object->user_id) && $user->rights->user->user->creer)); @@ -107,8 +103,7 @@ if ($id > 0) // Define variables to determine what the current user can do on the members $canaddmember = $user->rights->adherent->creer; // Define variables to determine what the current user can do on the properties of a member -if ($id) -{ +if ($id) { $caneditfieldmember = $user->rights->adherent->creer; } @@ -125,34 +120,26 @@ $parameters = array('id'=>$id, 'rowid'=>$id, 'objcanvas'=>$objcanvas, 'confirm'= $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) -{ - if ($cancel) - { - if (!empty($backtopage)) - { +if (empty($reshook)) { + if ($cancel) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } $action = ''; } - if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer)) - { + if ($action == 'setuserid' && ($user->rights->user->self->creer || $user->rights->user->user->creer)) { $error = 0; - if (empty($user->rights->user->user->creer)) // If can edit only itself user, we can link to itself only - { - if ($userid != $user->id && $userid != $object->user_id) - { + if (empty($user->rights->user->user->creer)) { // If can edit only itself user, we can link to itself only + if ($userid != $user->id && $userid != $object->user_id) { $error++; setEventMessages($langs->trans("ErrorUserPermissionAllowsToLinksToItselfOnly"), null, 'errors'); } } - if (!$error) - { - if ($userid != $object->user_id) // If link differs from currently in database - { + if (!$error) { + if ($userid != $object->user_id) { // If link differs from currently in database $result = $object->setUserId($userid); if ($result < 0) dol_print_error($object->db, $object->error); $action = ''; @@ -160,22 +147,17 @@ if (empty($reshook)) } } - if ($action == 'setsocid') - { + if ($action == 'setsocid') { $error = 0; - if (!$error) - { - if ($socid != $object->socid) // If link differs from currently in database - { + if (!$error) { + if ($socid != $object->socid) { // If link differs from currently in database $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent"; - $sql .= " WHERE socid = '".$socid."'"; + $sql .= " WHERE socid = ".((int) $socid); $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); - if ($resql) - { + if ($resql) { $obj = $db->fetch_object($resql); - if ($obj && $obj->rowid > 0) - { + if ($obj && $obj->rowid > 0) { $othermember = new Adherent($db); $othermember->fetch($obj->rowid); $thirdparty = new Societe($db); @@ -185,8 +167,7 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $result = $object->setThirdPartyId($socid); if ($result < 0) dol_print_error($object->db, $object->error); $action = ''; @@ -196,50 +177,39 @@ if (empty($reshook)) } // Create user from a member - if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) - { - if ($result > 0) - { + if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) { + if ($result > 0) { // Creation user $nuser = new User($db); $result = $nuser->create_from_member($object, GETPOST('login', 'alphanohtml')); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); setEventMessages($langs->trans($nuser->error), null, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } // Create third party from a member - if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) - { - if ($result > 0) - { + if ($action == 'confirm_create_thirdparty' && $confirm == 'yes' && $user->rights->societe->creer) { + if ($result > 0) { // User creation $company = new Societe($db); $result = $company->create_from_member($object, GETPOST('companyname', 'alpha'), GETPOST('companyalias', 'alpha')); - if ($result < 0) - { + if ($result < 0) { $langs->load("errors"); setEventMessages($langs->trans($company->error), null, 'errors'); setEventMessages($company->error, $company->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } - if ($action == 'update' && !$cancel && $user->rights->adherent->creer) - { + if ($action == 'update' && !$cancel && $user->rights->adherent->creer) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $birthdate = ''; @@ -269,16 +239,14 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Company")), null, 'errors'); } // Check if the login already exists - if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) - { + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($login)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors'); } } // Create new object - if ($result > 0 && !$error) - { + if ($result > 0 && !$error) { $object->oldcopy = clone $object; // Change values @@ -331,32 +299,27 @@ if (empty($reshook)) // Check if we need to also synchronize user information $nosyncuser = 0; - if ($object->user_id) // If linked to a user - { + if ($object->user_id) { // If linked to a user if ($user->id != $object->user_id && empty($user->rights->user->user->creer)) $nosyncuser = 1; // Disable synchronizing } // Check if we need to also synchronize password information $nosyncuserpass = 0; - if ($object->user_id) // If linked to a user - { + if ($object->user_id) { // If linked to a user if ($user->id != $object->user_id && empty($user->rights->user->user->password)) $nosyncuserpass = 1; // Disable synchronizing } $result = $object->update($user, 0, $nosyncuser, $nosyncuserpass); - if ($result >= 0 && !count($object->errors)) - { + if ($result >= 0 && !count($object->errors)) { $categories = GETPOST('memcats', 'array'); $object->setCategories($categories); // Logo/Photo save $dir = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos'; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); - if ($file_OK) - { - if (GETPOST('deletephoto')) - { + if ($file_OK) { + if (GETPOST('deletephoto')) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $fileimg = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos/'.$object->photo; $dirthumbs = $conf->adherent->dir_output.'/'.get_exdir(0, 0, 0, 1, $object, 'member').'/photos/thumbs'; @@ -364,33 +327,23 @@ if (empty($reshook)) dol_delete_dir_recursive($dirthumbs); } - if (image_format_supported($_FILES['photo']['name']) > 0) - { + if (image_format_supported($_FILES['photo']['name']) > 0) { dol_mkdir($dir); - if (@is_dir($dir)) - { + if (@is_dir($dir)) { $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); - if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0) - { + if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0) { setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); - } - else - { - // Create thumbs - $object->addThumbs($newfile); + } else { + // Create thumbs + $object->addThumbs($newfile); } } - } - else - { + } else { setEventMessages("ErrorBadImageFormat", null, 'errors'); } - } - else - { - switch ($_FILES['photo']['error']) - { + } else { + switch ($_FILES['photo']['error']) { case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form $errors[] = "ErrorFileSizeTooLarge"; @@ -401,41 +354,33 @@ if (empty($reshook)) } } - $rowid = $object->id; - $id = $object->id; + $rowid = $object->id; + $id = $object->id; $action = ''; - if (!empty($backtopage)) - { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } - else - { + } else { $action = 'edit'; } } - if ($action == 'add' && $user->rights->adherent->creer) - { + if ($action == 'add' && $user->rights->adherent->creer) { if ($canvas) $object->canvas = $canvas; $birthdate = ''; if (isset($_POST["birthday"]) && $_POST["birthday"] && isset($_POST["birthmonth"]) && $_POST["birthmonth"] - && isset($_POST["birthyear"]) && $_POST["birthyear"]) - { + && isset($_POST["birthyear"]) && $_POST["birthyear"]) { $birthdate = dol_mktime(12, 0, 0, $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]); } $datesubscription = ''; - if (isset($_POST["reday"]) && isset($_POST["remonth"]) && isset($_POST["reyear"])) - { + if (isset($_POST["reday"]) && isset($_POST["remonth"]) && isset($_POST["reyear"])) { $datesubscription = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); } @@ -457,12 +402,11 @@ if (empty($reshook)) // $skype=GETPOST("member_skype", 'alpha'); // $twitter=GETPOST("member_twitter", 'alpha'); // $facebook=GETPOST("member_facebook", 'alpha'); - // $linkedin=GETPOST("member_linkedin", 'alpha'); + // $linkedin=GETPOST("member_linkedin", 'alpha'); $email = preg_replace('/\s+/', '', GETPOST("member_email", 'alpha')); $login = GETPOST("member_login", 'alphanohtml'); $pass = GETPOST("password", 'alpha'); $photo = GETPOST("photo", 'alpha'); - //$comment=GETPOST("comment",'none'); $morphy = GETPOST("morphy", 'alphanohtml'); $public = GETPOST("public", 'alphanohtml'); @@ -519,13 +463,11 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MemberNature")), null, 'errors'); } // Tests if the login already exists - if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) - { + if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { if (empty($login)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Login")), null, 'errors'); - } - else { + } else { $sql = "SELECT login FROM ".MAIN_DB_PREFIX."adherent WHERE login='".$db->escape($login)."'"; $result = $db->query($sql); if ($result) { @@ -569,14 +511,12 @@ if (empty($reshook)) $public = 0; if (isset($public)) $public = 1; - if (!$error) - { + if (!$error) { $db->begin(); // Email about right and login does not exist $result = $object->create($user); - if ($result > 0) - { + if ($result > 0) { // Foundation categories $memcats = GETPOST('memcats', 'array'); $object->setCategories($memcats); @@ -585,9 +525,7 @@ if (empty($reshook)) $rowid = $object->id; $id = $object->id; $action = ''; - } - else - { + } else { $db->rollback(); if ($object->error) { @@ -598,36 +536,27 @@ if (empty($reshook)) $action = 'create'; } - } - else { + } else { $action = 'create'; } } - if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') - { + if ($user->rights->adherent->supprimer && $action == 'confirm_delete' && $confirm == 'yes') { $result = $object->delete($id, $user); - if ($result > 0) - { - if (!empty($backtopage)) - { + if ($result > 0) { + if (!empty($backtopage)) { header("Location: ".$backtopage); exit; - } - else - { + } else { header("Location: list.php"); exit; } - } - else - { + } else { $errmesg = $object->error; } } - if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == 'yes') - { + if ($user->rights->adherent->creer && $action == 'confirm_valid' && $confirm == 'yes') { $error = 0; $db->begin(); @@ -637,11 +566,9 @@ if (empty($reshook)) $result = $object->validate($user); - if ($result >= 0 && !count($object->errors)) - { + if ($result >= 0 && !count($object->errors)) { // Send confirmation email (according to parameters of member type. Otherwise generic) - if ($object->email && GETPOST("send_mail")) - { + if ($object->email && GETPOST("send_mail")) { $subject = ''; $msg = ''; @@ -659,8 +586,7 @@ if (empty($reshook)) if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); - if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) - { + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; $msg = $arraydefaultmessage->content; } @@ -669,8 +595,7 @@ if (empty($reshook)) //fallback on the old configuration. setEventMessages('WarningMandatorySetupNotComplete', null, 'errors'); $error++; - } - else { + } else { $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); @@ -679,16 +604,13 @@ if (empty($reshook)) $moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/card.php'."\r\n"; $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } - } - else - { + } else { $error++; if ($object->error) { setEventMessages($object->error, $object->errors, 'errors'); @@ -697,32 +619,25 @@ if (empty($reshook)) } } - if (!$error) - { + if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } $action = ''; } - if ($user->rights->adherent->supprimer && $action == 'confirm_resign') - { + if ($user->rights->adherent->supprimer && $action == 'confirm_resign') { $error = 0; - if ($confirm == 'yes') - { + if ($confirm == 'yes') { $adht = new AdherentType($db); $adht->fetch($object->typeid); $result = $object->resiliate($user); - if ($result >= 0 && !count($object->errors)) - { - if ($object->email && GETPOST("send_mail")) - { + if ($result >= 0 && !count($object->errors)) { + if ($object->email && GETPOST("send_mail")) { $subject = ''; $msg = ''; @@ -740,8 +655,7 @@ if (empty($reshook)) if (!empty($labeltouse)) $arraydefaultmessage = $formmail->getEMailTemplate($db, 'member', $user, $outputlangs, 0, 1, $labeltouse); - if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) - { + if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) { $subject = $arraydefaultmessage->topic; $msg = $arraydefaultmessage->content; } @@ -750,8 +664,7 @@ if (empty($reshook)) //fallback on the old configuration. setEventMessages('WarningMandatorySetupNotComplete', null, 'errors'); $error++; - } - else { + } else { $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $object); complete_substitutions_array($substitutionarray, $outputlangs, $object); $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs); @@ -760,16 +673,13 @@ if (empty($reshook)) $moreinheader = 'X-Dolibarr-Info: send_an_email by adherents/card.php'."\r\n"; $result = $object->send_an_email($texttosend, $subjecttosend, array(), array(), array(), "", "", 0, -1, '', $moreinheader); - if ($result < 0) - { + if ($result < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); } } } - } - else - { + } else { $error++; if ($object->error) { @@ -780,31 +690,24 @@ if (empty($reshook)) $action = ''; } } - if (!empty($backtopage) && !$error) - { + if (!empty($backtopage) && !$error) { header("Location: ".$backtopage); exit; } } // SPIP Management - if ($user->rights->adherent->supprimer && $action == 'confirm_del_spip' && $confirm == 'yes') - { - if (!count($object->errors)) - { - if (!$mailmanspip->del_to_spip($object)) - { + if ($user->rights->adherent->supprimer && $action == 'confirm_del_spip' && $confirm == 'yes') { + if (!count($object->errors)) { + if (!$mailmanspip->del_to_spip($object)) { setEventMessages($langs->trans('DeleteIntoSpipError').': '.$mailmanspip->error, null, 'errors'); } } } - if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm == 'yes') - { - if (!count($object->errors)) - { - if (!$mailmanspip->add_to_spip($object)) - { + if ($user->rights->adherent->creer && $action == 'confirm_add_spip' && $confirm == 'yes') { + if (!count($object->errors)) { + if (!$mailmanspip->add_to_spip($object)) { setEventMessages($langs->trans('AddIntoSpipError').': '.$mailmanspip->error, null, 'errors'); } } @@ -841,28 +744,23 @@ llxHeader('', $title, $help_url); $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; -if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) -{ +if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // ----------------------------------------- // When used with CANVAS // ----------------------------------------- - if (empty($object->error) && $id) - { + if (empty($object->error) && $id) { $object = new Adherent($db); $result = $object->fetch($id); if ($result <= 0) dol_print_error('', $object->error); } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates - $objcanvas->display_canvas($action); // Show template -} -else -{ + $objcanvas->display_canvas($action); // Show template +} else { // ----------------------------------------- // When used in standard mode // ----------------------------------------- - if ($action == 'create') - { + if ($action == 'create') { /* ************************************************************************** */ /* */ /* Creation mode */ @@ -873,31 +771,28 @@ else // We set country_id, country_code and country for the selected country $object->country_id = GETPOST('country_id', 'int') ?GETPOST('country_id', 'int') : $mysoc->country_id; - if ($object->country_id) - { + if ($object->country_id) { $tmparray = getCountry($object->country_id, 'all'); $object->country_code = $tmparray['code']; $object->country = $tmparray['label']; } - if (!empty($socid)) { - $object = new Societe($db); - if ($socid > 0) $object->fetch($socid); + if (!empty($socid)) { + $object = new Societe($db); + if ($socid > 0) $object->fetch($socid); - if (!($object->id > 0)) - { - $langs->load("errors"); - print($langs->trans('ErrorRecordNotFound')); - exit; - } - } + if (!($object->id > 0)) { + $langs->load("errors"); + print($langs->trans('ErrorRecordNotFound')); + exit; + } + } $adht = new AdherentType($db); print load_fiche_titre($langs->trans("NewMember"), '', 'members'); - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) { print "\n".' - - - global->MAIN_USE_METEO_WITH_PERCENTAGE)) { - print '
'; - print '
'; - print img_weather($text, 0, $options); - print '= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL0.' %'; - print '
'; - print img_weather($text, 1, $options); - print '<= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL1.' %'; - print '
'; - print img_weather($text, 2, $options); - print '<= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL2.' %'; - print '
'; - print img_weather($text, 3, $options); - print '<= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; - print '
'; - print img_weather($text, 4, $options); - print '> '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; - print '
'; - print '
'; + '; - print '
'; - print img_weather($text, 0, $options); - print '= '.$level0; - print '
'; - print img_weather($text, 1, $options); - print '<= '.$level1; - print '
'; - print img_weather($text, 2, $options); - print '<= '.$level2; - print '
'; - print img_weather($text, 3, $options); - print '<= '.$level3; - print '
'; - print img_weather($text, 4, $options); - print '> '.$level3; - print '
'; - print ''; + if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { + print '
'; + print '
'; + print img_weather($text, 0, $options); + print ' <= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL0.' %'; + print '
'; + print img_weather($text, 1, $options); + print ' <= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL1.' %'; + print '
'; + print img_weather($text, 2, $options); + print ' <= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL2.' %'; + print '
'; + print img_weather($text, 3, $options); + print ' <= '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; + print '
'; + print img_weather($text, 4, $options); + print ' > '.$conf->global->MAIN_METEO_PERCENTAGE_LEVEL3.' %'; + print '
'; + print '
'; + } else { + print '
'; + print '
'; + print img_weather($text, 0, $options); + print ' <= '.$level0; + print '
'; + print img_weather($text, 1, $options); + print ' <= '.$level1; + print '
'; + print img_weather($text, 2, $options); + print ' <= '.$level2; + print '
'; + print img_weather($text, 3, $options); + print ' <= '.$level3; + print '
'; + print img_weather($text, 4, $options); + print ' > '.$level3; + print '
'; + print '
'; + } } } -print ''; if ($action == 'edit') { print '
'; diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index cce441c4052..6e9c63ca6cf 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -12,6 +12,7 @@ * Copyright (C) 2015 Ferran Marcet * Copyright (C) 2016 Raphaël Doursenaud * Copyright (C) 2019 Frédéric France + * Copyright (C) 2020 Open-Dsi * * 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 @@ -90,7 +91,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, 38, 0, 5, 11, 0, 32, 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, 37, 0, 25, 0); +$taborder = array(9, 0, 4, 3, 2, 0, 1, 8, 19, 16, 39, 27, 40, 38, 0, 5, 11, 0, 32, 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, 37, 0, 25, 0); // Name of SQL tables of dictionaries $tabname = array(); @@ -128,11 +129,12 @@ $tabname[30] = MAIN_DB_PREFIX."c_format_cards"; $tabname[32] = MAIN_DB_PREFIX."c_hrm_public_holiday"; $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"; $tabname[38] = MAIN_DB_PREFIX."c_socialnetworks"; +$tabname[39] = MAIN_DB_PREFIX."c_prospectcontactlevel"; +$tabname[40] = MAIN_DB_PREFIX."c_stcommcontact"; // Dictionary labels $tablib = array(); @@ -174,6 +176,8 @@ $tablib[35] = "DictionaryExpenseTaxCat"; $tablib[36] = "DictionaryExpenseTaxRange"; $tablib[37] = "DictionaryMeasuringUnits"; $tablib[38] = "DictionarySocialNetworks"; +$tablib[39] = "DictionaryProspectContactLevel"; +$tablib[40] = "DictionaryProspectContactStatus"; // Requests to extract data $tabsql = array(); @@ -203,7 +207,7 @@ $tabsql[23] = "SELECT t.rowid as rowid, t.taux, t.revenuestamp_type, c.label as $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[27] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_stcomm"; +$tabsql[27] = "SELECT id as rowid, code, libelle, picto, 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"; $tabsql[30] = "SELECT rowid, code, name, paper_size, orientation, metric, leftmargin, topmargin, nx, ny, spacex, spacey, width, height, font_size, custom_x, custom_y, active FROM ".MAIN_DB_PREFIX."c_format_cards"; @@ -215,6 +219,8 @@ $tabsql[35] = "SELECT c.rowid, c.label, c.active, c.entity FROM ".MAIN_DB_PREFIX $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"; $tabsql[38] = "SELECT rowid, entity, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks"; +$tabsql[39] = "SELECT code, label as libelle, sortorder, active FROM ".MAIN_DB_PREFIX."c_prospectcontactlevel"; +$tabsql[40] = "SELECT id as rowid, code, libelle, picto, active FROM ".MAIN_DB_PREFIX."c_stcommcontact"; // Criteria to sort dictionaries $tabsqlsort = array(); @@ -256,6 +262,8 @@ $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"; $tabsqlsort[38] = "rowid, code ASC"; +$tabsqlsort[39] = "sortorder ASC"; +$tabsqlsort[40] = "code ASC"; // Field names in select result for dictionary display $tabfield = array(); @@ -285,7 +293,7 @@ $tabfield[23] = "country_id,country,taux,revenuestamp_type,accountancy_code_sell $tabfield[24] = "code,label"; $tabfield[25] = "code,label"; //$tabfield[26]= "code,label,short_label"; -$tabfield[27] = "code,libelle"; +$tabfield[27] = "code,libelle,picto"; $tabfield[28] = "code,label,affect,delay,newbymonth,country_id,country"; $tabfield[29] = "code,label,percent,position"; $tabfield[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y"; @@ -297,6 +305,8 @@ $tabfield[35] = "label"; $tabfield[36] = "range_ik,fk_c_exp_tax_cat"; $tabfield[37] = "code,label,short_label,unit_type,scale"; $tabfield[38] = "code,label,url,icon,entity"; +$tabfield[39] = "code,libelle,sortorder"; +$tabfield[40] = "code,libelle,picto"; // Edit field names for editing a record $tabfieldvalue = array(); @@ -326,7 +336,7 @@ $tabfieldvalue[23] = "country,taux,revenuestamp_type,accountancy_code_sell,accou $tabfieldvalue[24] = "code,label"; $tabfieldvalue[25] = "code,label"; //$tabfieldvalue[26]= "code,label,short_label"; -$tabfieldvalue[27] = "code,libelle"; +$tabfieldvalue[27] = "code,libelle,picto"; $tabfieldvalue[28] = "code,label,affect,delay,newbymonth,country"; $tabfieldvalue[29] = "code,label,percent,position"; $tabfieldvalue[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y"; @@ -338,6 +348,8 @@ $tabfieldvalue[35] = "label"; $tabfieldvalue[36] = "range_ik,fk_c_exp_tax_cat"; $tabfieldvalue[37] = "code,label,short_label,unit_type,scale"; $tabfieldvalue[38] = "code,label,url,icon"; +$tabfieldvalue[39] = "code,libelle,sortorder"; +$tabfieldvalue[40] = "code,libelle,picto"; // Field names in the table for inserting a record $tabfieldinsert = array(); @@ -367,7 +379,7 @@ $tabfieldinsert[23] = "fk_pays,taux,revenuestamp_type,accountancy_code_sell,acco $tabfieldinsert[24] = "code,label"; $tabfieldinsert[25] = "code,label"; //$tabfieldinsert[26]= "code,label,short_label"; -$tabfieldinsert[27] = "code,libelle"; +$tabfieldinsert[27] = "code,libelle,picto"; $tabfieldinsert[28] = "code,label,affect,delay,newbymonth,fk_country"; $tabfieldinsert[29] = "code,label,percent,position"; $tabfieldinsert[30] = "code,name,paper_size,orientation,metric,leftmargin,topmargin,nx,ny,spacex,spacey,width,height,font_size,custom_x,custom_y"; @@ -380,6 +392,8 @@ $tabfieldinsert[35] = "label"; $tabfieldinsert[36] = "range_ik,fk_c_exp_tax_cat"; $tabfieldinsert[37] = "code,label,short_label,unit_type,scale"; $tabfieldinsert[38] = "code,label,url,icon,entity"; +$tabfieldinsert[39] = "code,label,sortorder"; +$tabfieldinsert[40] = "code,libelle,picto"; // Rowid name of field depending if field is autoincrement on or off.. // Use "" if id field is "rowid" and has autoincrement on @@ -423,6 +437,8 @@ $tabrowid[35] = ""; $tabrowid[36] = ""; $tabrowid[37] = ""; $tabrowid[38] = ""; +$tabrowid[39] = "code"; +$tabrowid[40] = "id"; // Condition to show dictionary in setup page $tabcond = array(); @@ -464,6 +480,8 @@ $tabcond[35] = !empty($conf->expensereport->enabled); $tabcond[36] = !empty($conf->expensereport->enabled); $tabcond[37] = !empty($conf->product->enabled); $tabcond[38] = !empty($conf->socialnetworks->enabled); +$tabcond[39] = (!empty($conf->societe->enabled) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)); +$tabcond[40] = (!empty($conf->societe->enabled) && !empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)); // List of help for fields $tabhelp = array(); @@ -493,7 +511,7 @@ $tabhelp[23] = array('revenuestamp_type'=>'FixedOrPercent'); $tabhelp[24] = array('code'=>$langs->trans("EnterAnyCode")); $tabhelp[25] = array('code'=>$langs->trans('EnterAnyCode')); //$tabhelp[26] = array('code'=>$langs->trans("EnterAnyCode")); -$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode")); +$tabhelp[27] = array('code'=>$langs->trans("EnterAnyCode"), 'picto'=>$langs->trans("PictoHelp")); $tabhelp[28] = array('affect'=>$langs->trans("FollowedByACounter"), 'delay'=>$langs->trans("MinimumNoticePeriod"), 'newbymonth'=>$langs->trans("NbAddedAutomatically")); $tabhelp[29] = array('code'=>$langs->trans("EnterAnyCode"), 'percent'=>$langs->trans("OpportunityPercent"), 'position'=>$langs->trans("PositionIntoComboList")); $tabhelp[30] = array('code'=>$langs->trans("EnterAnyCode"), 'name'=>$langs->trans("LabelName"), 'paper_size'=>$langs->trans("LabelPaperSize")); @@ -505,6 +523,8 @@ $tabhelp[35] = array(); $tabhelp[36] = array('range_ik'=>$langs->trans('PrevRangeToThisRange')); $tabhelp[37] = array('code'=>$langs->trans("EnterAnyCode"), 'unit_type' => $langs->trans('MeasuringUnitTypeDesc'), 'scale' => $langs->trans('MeasuringScaleDesc')); $tabhelp[38] = array('code'=>$langs->trans("EnterAnyCode"), 'url' => $langs->trans('UrlSocialNetworksDesc'), 'icon' => $langs->trans('FafaIconSocialNetworksDesc')); +$tabhelp[39] = array('code'=>$langs->trans("EnterAnyCode")); +$tabhelp[40] = array('code'=>$langs->trans("EnterAnyCode"), 'picto'=>$langs->trans("PictoHelp")); // List of check for fields (NOT USED YET) $tabfieldcheck = array(); @@ -546,6 +566,8 @@ $tabfieldcheck[35] = array(); $tabfieldcheck[36] = array(); $tabfieldcheck[37] = array(); $tabfieldcheck[38] = array(); +$tabfieldcheck[39] = array(); +$tabfieldcheck[40] = 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); @@ -554,9 +576,9 @@ complete_dictionary_with_modules($taborder, $tabname, $tablib, $tabsql, $tabsqls // Defaut sortorder if (empty($sortfield)) { - $tmp1 = explode(',', $tabsqlsort[$id]); - $tmp2 = explode(' ', $tmp1[0]); - $sortfield = preg_replace('/^.*\./', '', $tmp2[0]); + $tmp1 = explode(',', $tabsqlsort[$id]); + $tmp2 = explode(' ', $tmp1[0]); + $sortfield = preg_replace('/^.*\./', '', $tmp2[0]); } // Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact") @@ -564,27 +586,27 @@ $elementList = array(); $sourceList = array(); if ($id == 11) { - $elementList = array( - '' => '', - 'societe' => $langs->trans('ThirdParty'), - // 'proposal' => $langs->trans('Proposal'), - // 'order' => $langs->trans('Order'), - // 'invoice' => $langs->trans('Bill'), - 'supplier_proposal' => $langs->trans('SupplierProposal'), - 'order_supplier' => $langs->trans('SupplierOrder'), - 'invoice_supplier' => $langs->trans('SupplierBill'), - // 'intervention' => $langs->trans('InterventionCard'), - // 'contract' => $langs->trans('Contract'), - 'project' => $langs->trans('Project'), - 'project_task' => $langs->trans('Task'), - 'agenda' => $langs->trans('Agenda'), - 'dolresource' => $langs->trans('Resource'), - // old deprecated - 'propal' => $langs->trans('Proposal'), - 'commande' => $langs->trans('Order'), - 'facture' => $langs->trans('Bill'), - 'fichinter' => $langs->trans('InterventionCard'), - 'contrat' => $langs->trans('Contract'), + $elementList = array( + '' => '', + 'societe' => $langs->trans('ThirdParty'), + // 'proposal' => $langs->trans('Proposal'), + // 'order' => $langs->trans('Order'), + // 'invoice' => $langs->trans('Bill'), + 'supplier_proposal' => $langs->trans('SupplierProposal'), + 'order_supplier' => $langs->trans('SupplierOrder'), + 'invoice_supplier' => $langs->trans('SupplierBill'), + // 'intervention' => $langs->trans('InterventionCard'), + // 'contract' => $langs->trans('Contract'), + 'project' => $langs->trans('Project'), + 'project_task' => $langs->trans('Task'), + 'agenda' => $langs->trans('Agenda'), + 'dolresource' => $langs->trans('Resource'), + // old deprecated + 'propal' => $langs->trans('Proposal'), + 'commande' => $langs->trans('Order'), + 'facture' => $langs->trans('Bill'), + 'fichinter' => $langs->trans('InterventionCard'), + 'contrat' => $langs->trans('Contract'), ); if (!empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty'); @@ -620,354 +642,329 @@ if ($id == 10) if (GETPOST('button_removefilter', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter_x', 'alpha')) { - $search_country_id = ''; - $search_code = ''; + $search_country_id = ''; + $search_code = ''; } // Actions add or modify an entry into a dictionary if (GETPOST('actionadd') || GETPOST('actionmodify')) { - $listfield = explode(',', str_replace(' ', '', $tabfield[$id])); - $listfieldinsert = explode(',', $tabfieldinsert[$id]); - $listfieldmodify = explode(',', $tabfieldinsert[$id]); - $listfieldvalue = explode(',', $tabfieldvalue[$id]); + $listfield = explode(',', str_replace(' ', '', $tabfield[$id])); + $listfieldinsert = explode(',', $tabfieldinsert[$id]); + $listfieldmodify = explode(',', $tabfieldinsert[$id]); + $listfieldvalue = explode(',', $tabfieldvalue[$id]); - // Check that all fields are filled - $ok = 1; - foreach ($listfield as $f => $value) - { - // Discard check of mandatory fields for country for some tables - if ($value == 'country_id' && in_array($tablib[$id], array('DictionaryPublicHolidays', 'DictionaryVAT', 'DictionaryRegion', 'DictionaryCompanyType', 'DictionaryHolidayTypes', 'DictionaryRevenueStamp', 'DictionaryAccountancysystem', 'DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory - if ($value == 'country' && in_array($tablib[$id], array('DictionaryPublicHolidays', 'DictionaryCanton', 'DictionaryCompanyType', 'DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory - // Discard check of mandatory fiedls for other fields - if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; - if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; - if ($value == 'color' && empty($_POST['color'])) continue; + // Check that all fields are filled + $ok = 1; + foreach ($listfield as $f => $value) + { + // Discard check of mandatory fields for country for some tables + if ($value == 'country_id' && in_array($tablib[$id], array('DictionaryPublicHolidays', 'DictionaryVAT', 'DictionaryRegion', 'DictionaryCompanyType', 'DictionaryHolidayTypes', 'DictionaryRevenueStamp', 'DictionaryAccountancysystem', 'DictionaryAccountancyCategory'))) continue; // For some pages, country is not mandatory + if ($value == 'country' && in_array($tablib[$id], array('DictionaryPublicHolidays', 'DictionaryCanton', 'DictionaryCompanyType', 'DictionaryRevenueStamp'))) continue; // For some pages, country is not mandatory + // Discard check of mandatory fiedls for other fields + if ($value == 'localtax1' && empty($_POST['localtax1_type'])) continue; + if ($value == 'localtax2' && empty($_POST['localtax2_type'])) continue; + if ($value == 'color' && empty($_POST['color'])) continue; if ($value == 'formula' && empty($_POST['formula'])) continue; if ($value == 'dayrule' && empty($_POST['dayrule'])) continue; if ($value == 'sortorder') continue; // For a column name 'sortorder', we use the field name 'position' if ((!isset($_POST[$value]) || $_POST[$value] == '') - && (!in_array($listfield[$f], array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking')) // Fields that are not mandatory - && (!($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10 - ) + && (!in_array($listfield[$f], array('decalage', 'module', 'accountancy_code', 'accountancy_code_sell', 'accountancy_code_buy', 'tracking', 'picto')) // Fields that are not mandatory + && (!($id == 10 && $listfield[$f] == 'code')) // Code is mandatory fir table 10 + ) ) { - $ok = 0; - $fieldnamekey = $listfield[$f]; - // We take translate key of field - if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey = 'Label'; - if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments'; - if ($fieldnamekey == 'nbjour') $fieldnamekey = 'NbOfDays'; - if ($fieldnamekey == 'decalage') $fieldnamekey = 'Offset'; - if ($fieldnamekey == 'module') $fieldnamekey = 'Module'; - if ($fieldnamekey == 'code') $fieldnamekey = 'Code'; - if ($fieldnamekey == 'note') $fieldnamekey = 'Note'; - if ($fieldnamekey == 'taux') $fieldnamekey = 'Rate'; - if ($fieldnamekey == 'type') $fieldnamekey = 'Type'; - if ($fieldnamekey == 'position') $fieldnamekey = 'Position'; - if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode'; - if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible'; - if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder'; + $ok = 0; + $fieldnamekey = $listfield[$f]; + // We take translate key of field + if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey = 'Label'; + if ($fieldnamekey == 'libelle_facture') $fieldnamekey = 'LabelOnDocuments'; + if ($fieldnamekey == 'nbjour') $fieldnamekey = 'NbOfDays'; + if ($fieldnamekey == 'decalage') $fieldnamekey = 'Offset'; + if ($fieldnamekey == 'module') $fieldnamekey = 'Module'; + if ($fieldnamekey == 'code') $fieldnamekey = 'Code'; + if ($fieldnamekey == 'note') $fieldnamekey = 'Note'; + if ($fieldnamekey == 'taux') $fieldnamekey = 'Rate'; + if ($fieldnamekey == 'type') $fieldnamekey = 'Type'; + if ($fieldnamekey == 'position') $fieldnamekey = 'Position'; + if ($fieldnamekey == 'unicode') $fieldnamekey = 'Unicode'; + if ($fieldnamekey == 'deductible') $fieldnamekey = 'Deductible'; + if ($fieldnamekey == 'sortorder') $fieldnamekey = 'SortOrder'; if ($fieldnamekey == 'category_type') $fieldnamekey = 'Calculated'; if ($fieldnamekey == 'revenuestamp_type') $fieldnamekey = 'TypeOfRevenueStamp'; if ($fieldnamekey == 'use_default') $fieldnamekey = 'UseByDefault'; - setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); - } - } - // Other checks - if (GETPOST('actionadd') && $tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"], array('system', 'systemauto'))) { - $ok = 0; - setEventMessages($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'), null, 'errors'); - } - if (GETPOSTISSET("code")) - { - if (GETPOST("code") == '0') - { - $ok = 0; - setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors'); - } - /*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base + setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); + } + } + // Other checks + if (GETPOST('actionadd') && $tabname[$id] == MAIN_DB_PREFIX."c_actioncomm" && isset($_POST["type"]) && in_array($_POST["type"], array('system', 'systemauto'))) { + $ok = 0; + setEventMessages($langs->transnoentities('ErrorReservedTypeSystemSystemAuto'), null, 'errors'); + } + if (GETPOSTISSET("code")) + { + if (GETPOST("code") == '0') + { + $ok = 0; + setEventMessages($langs->transnoentities('ErrorCodeCantContainZero'), null, 'errors'); + } + /*if (!is_numeric($_POST['code'])) // disabled, code may not be in numeric base { $ok = 0; $msg .= $langs->transnoentities('ErrorFieldFormat', $langs->transnoentities('Code')).'
'; }*/ - } - if (GETPOSTISSET("country") && ($_POST["country"] == '0') && ($id != 2)) - { - if (in_array($tablib[$id], array('DictionaryCompanyType', 'DictionaryHolidayTypes'))) // Field country is no mandatory for such dictionaries - { - $_POST["country"] = ''; - } - else - { - $ok = 0; - setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Country")), null, 'errors'); - } - } - if ($id == 3 && !is_numeric($_POST["code"])) - { - $ok = 0; - setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric", $langs->transnoentities("Code")), null, 'errors'); - } + } + if (GETPOSTISSET("country") && ($_POST["country"] == '0') && ($id != 2)) + { + if (in_array($tablib[$id], array('DictionaryCompanyType', 'DictionaryHolidayTypes'))) // Field country is no mandatory for such dictionaries + { + $_POST["country"] = ''; + } else { + $ok = 0; + setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities("Country")), null, 'errors'); + } + } + if ($id == 3 && !is_numeric($_POST["code"])) + { + $ok = 0; + setEventMessages($langs->transnoentities("ErrorFieldMustBeANumeric", $langs->transnoentities("Code")), null, 'errors'); + } // Clean some parameters - if ((!empty($_POST["localtax1_type"]) || ($_POST['localtax1_type'] == '0')) && empty($_POST["localtax1"])) $_POST["localtax1"] = '0'; // If empty, we force to 0 - if ((!empty($_POST["localtax2_type"]) || ($_POST['localtax2_type'] == '0')) && empty($_POST["localtax2"])) $_POST["localtax2"] = '0'; // If empty, we force to 0 + if ((!empty($_POST["localtax1_type"]) || ($_POST['localtax1_type'] == '0')) && empty($_POST["localtax1"])) $_POST["localtax1"] = '0'; // If empty, we force to 0 + if ((!empty($_POST["localtax2_type"]) || ($_POST['localtax2_type'] == '0')) && empty($_POST["localtax2"])) $_POST["localtax2"] = '0'; // If empty, we force to 0 if ($_POST["accountancy_code"] <= 0) $_POST["accountancy_code"] = ''; // If empty, we force to null if ($_POST["accountancy_code_sell"] <= 0) $_POST["accountancy_code_sell"] = ''; // If empty, we force to null if ($_POST["accountancy_code_buy"] <= 0) $_POST["accountancy_code_buy"] = ''; // If empty, we force to null - if ($id == 10 && isset($_POST["code"])) // Spaces are not allowed into code - { - $_POST["code"] = preg_replace('/\s/', '', $_POST["code"]); - } + if ($id == 10 && isset($_POST["code"])) // Spaces are not allowed into code + { + $_POST["code"] = preg_replace('/\s/', '', $_POST["code"]); + } - // If check ok and action add, add the line - if ($ok && GETPOST('actionadd')) - { - if ($tabrowid[$id]) - { - // Get free id for insert - $newid = 0; - $sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id]; - $result = $db->query($sql); - if ($result) - { - $obj = $db->fetch_object($result); - $newid = ($obj->newid + 1); - } else { - dol_print_error($db); - } - } + // If check ok and action add, add the line + if ($ok && GETPOST('actionadd')) + { + if ($tabrowid[$id]) + { + // Get free id for insert + $newid = 0; + $sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id]; + $result = $db->query($sql); + if ($result) + { + $obj = $db->fetch_object($result); + $newid = ($obj->newid + 1); + } else { + dol_print_error($db); + } + } - // Add new entry - $sql = "INSERT INTO ".$tabname[$id]." ("; - // List of fields - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) - $sql .= $tabrowid[$id].","; - $sql .= $tabfieldinsert[$id]; - $sql .= ",active)"; - $sql .= " VALUES("; + // Add new entry + $sql = "INSERT INTO ".$tabname[$id]." ("; + // List of fields + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) + $sql .= $tabrowid[$id].","; + $sql .= $tabfieldinsert[$id]; + $sql .= ",active)"; + $sql .= " VALUES("; - // List of values - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) - $sql .= $newid.","; - $i = 0; - foreach ($listfieldinsert as $f => $value) - { - $keycode = $listfieldvalue[$i]; - if (empty($keycode)) $keycode = $value; + // List of values + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) + $sql .= $newid.","; + $i = 0; + foreach ($listfieldinsert as $f => $value) + { + $keycode = $listfieldvalue[$i]; + if (empty($keycode)) $keycode = $value; - if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') { - $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); - } - elseif ($value == 'entity') { - $_POST[$keycode] = getEntity($tabname[$id]); - } + if ($value == 'price' || preg_match('/^amount/i', $value) || $value == 'taux') { + $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); + } elseif ($value == 'entity') { + $_POST[$keycode] = getEntity($tabname[$id]); + } - if ($i) $sql .= ","; + if ($i) $sql .= ","; - if ($keycode == 'sortorder') // For column name 'sortorder', we use the field name 'position' - { - $sql .= "'".(int) GETPOST('position', 'int')."'"; - } - elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = '' - elseif ($keycode == 'content') { - $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; - } - elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) { - $sql .= (int) GETPOST($keycode, 'int'); - } - else { - $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; - } + if ($keycode == 'sortorder') // For column name 'sortorder', we use the field name 'position' + { + $sql .= "'".(int) GETPOST('position', 'int')."'"; + } elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = '' + elseif ($keycode == 'content') { + $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; + } elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) { + $sql .= (int) GETPOST($keycode, 'int'); + } else { + $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; + } - $i++; - } - $sql .= ",1)"; + $i++; + } + $sql .= ",1)"; - dol_syslog("actionadd", LOG_DEBUG); - $result = $db->query($sql); - if ($result) // Add is ok - { - setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); - $_POST = array('id'=>$id); // Clean $_POST array, we keep only - } - else - { - if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { - dol_print_error($db); - } - } - } + dol_syslog("actionadd", LOG_DEBUG); + $result = $db->query($sql); + if ($result) // Add is ok + { + setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); + $_POST = array('id'=>$id); // Clean $_POST array, we keep only + } else { + if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); + } else { + dol_print_error($db); + } + } + } - // If verif ok and action modify, modify the line - if ($ok && GETPOST('actionmodify')) - { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + // If verif ok and action modify, modify the line + if ($ok && GETPOST('actionmodify')) + { + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - // Modify entry - $sql = "UPDATE ".$tabname[$id]." SET "; - // Modifie valeur des champs - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) - { - $sql .= $tabrowid[$id]."="; - $sql .= "'".$db->escape($rowid)."', "; - } - $i = 0; - foreach ($listfieldmodify as $field) - { - $keycode = $listfieldvalue[$i]; - if (empty($keycode)) $keycode = $field; + // Modify entry + $sql = "UPDATE ".$tabname[$id]." SET "; + // Modifie valeur des champs + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) + { + $sql .= $tabrowid[$id]."="; + $sql .= "'".$db->escape($rowid)."', "; + } + $i = 0; + foreach ($listfieldmodify as $field) + { + $keycode = $listfieldvalue[$i]; + if (empty($keycode)) $keycode = $field; - if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { - $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); - } - elseif ($field == 'entity') { - $_POST[$keycode] = getEntity($tabname[$id]); - } + if ($field == 'price' || preg_match('/^amount/i', $field) || $field == 'taux') { + $_POST[$keycode] = price2num($_POST[$keycode], 'MU'); + } elseif ($field == 'entity') { + $_POST[$keycode] = getEntity($tabname[$id]); + } - if ($i) $sql .= ","; - $sql .= $field."="; - if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position' - { - $sql .= (int) GETPOST('position', 'int'); - } - elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = '' - elseif ($keycode == 'content') { - $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; - } - elseif (in_array($keycode, array('private', 'position', 'scale'))) { - $sql .= (int) GETPOST($keycode, 'int'); - } - else { - $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; - } + if ($i) $sql .= ","; + $sql .= $field."="; + if ($listfieldvalue[$i] == 'sortorder') // For column name 'sortorder', we use the field name 'position' + { + $sql .= (int) GETPOST('position', 'int'); + } elseif ($_POST[$keycode] == '' && !($keycode == 'code' && $id == 10)) $sql .= "null"; // For vat, we want/accept code = '' + elseif ($keycode == 'content') { + $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; + } elseif (in_array($keycode, array('private', 'position', 'scale'))) { + $sql .= (int) GETPOST($keycode, 'int'); + } else { + $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; + } - $i++; - } - $sql .= " WHERE ".$rowidcol." = ".(int) $db->escape($rowid); - if (in_array('entity', $listfieldmodify)) $sql .= " AND entity = '".getEntity($tabname[$id])."'"; + $i++; + } + $sql .= " WHERE ".$rowidcol." = ".(int) $db->escape($rowid); + if (in_array('entity', $listfieldmodify)) $sql .= " AND entity = '".getEntity($tabname[$id])."'"; - dol_syslog("actionmodify", LOG_DEBUG); - //print $sql; - $resql = $db->query($sql); - if (!$resql) - { - setEventMessages($db->error(), null, 'errors'); - } - } - //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition + dol_syslog("actionmodify", LOG_DEBUG); + //print $sql; + $resql = $db->query($sql); + if (!$resql) + { + setEventMessages($db->error(), null, 'errors'); + } + } + //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition } if (GETPOST('actioncancel')) { - //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition + //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition } if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - $sql = "DELETE FROM ".$tabname[$id]." WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + $sql = "DELETE FROM ".$tabname[$id]." WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - dol_syslog("delete", LOG_DEBUG); - $result = $db->query($sql); - if (!$result) - { - if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') - { - setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { - dol_print_error($db); - } - } + dol_syslog("delete", LOG_DEBUG); + $result = $db->query($sql); + if (!$result) + { + if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') + { + setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); + } else { + dol_print_error($db); + } + } } // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } } // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } } // favorite if ($action == 'activate_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 1 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } } // disable favorite if ($action == 'disable_favorite') { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } - elseif ($code) { - $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); - } + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE ".$rowidcol."='".$db->escape($rowid)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } elseif ($code) { + $sql = "UPDATE ".$tabname[$id]." SET favorite = 0 WHERE code='".dol_escape_htmltag($code)."'".($entity != '' ? " AND entity = ".(int) $entity : ''); + } - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } } @@ -985,28 +982,28 @@ llxHeader('', $title); $linkback = ''; if ($id) { - $title .= ' - '.$langs->trans($tablib[$id]); - $linkback = ''.$langs->trans("BackToDictionaryList").''; + $title .= ' - '.$langs->trans($tablib[$id]); + $linkback = ''.$langs->trans("BackToDictionaryList").''; } $titlepicto = 'title_setup'; if ($id == 10 && GETPOST('from') == 'accountancy') { - $title = $langs->trans("MenuVatAccounts"); - $titlepicto = 'accountancy'; + $title = $langs->trans("MenuVatAccounts"); + $titlepicto = 'accountancy'; } if ($id == 7 && GETPOST('from') == 'accountancy') { - $title = $langs->trans("MenuTaxAccounts"); - $titlepicto = 'accountancy'; + $title = $langs->trans("MenuTaxAccounts"); + $titlepicto = 'accountancy'; } print load_fiche_titre($title, $linkback, $titlepicto); if (empty($id)) { - print ''.$langs->trans("DictionaryDesc"); - print " ".$langs->trans("OnlyActiveElementsAreShown")."
\n"; - print '

'; + print ''.$langs->trans("DictionaryDesc"); + print " ".$langs->trans("OnlyActiveElementsAreShown")."
\n"; + print '

'; } @@ -1023,7 +1020,7 @@ if (GETPOST('from')) $paramwithsearch .= '&from='.urlencode(GETPOST('from', 'alp // Confirmation of the deletion of the line if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'rowid='.urlencode($rowid).'&code='.urlencode($code).$paramwithsearch, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } //var_dump($elementList); @@ -1032,127 +1029,126 @@ if ($action == 'delete') */ if ($id) { - // Complete search values request with sort criteria - $sql = $tabsql[$id]; + // Complete search values request with sort criteria + $sql = $tabsql[$id]; - if (!preg_match('/ WHERE /', $sql)) $sql .= " WHERE 1 = 1"; - if ($search_country_id > 0) $sql .= " AND c.rowid = ".$search_country_id; - if ($search_code != '' && $id == 9) $sql .= natural_search("code_iso", $search_code); - elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code); - elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code); - elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code); - elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code); + if (!preg_match('/ WHERE /', $sql)) $sql .= " WHERE 1 = 1"; + if ($search_country_id > 0) $sql .= " AND c.rowid = ".$search_country_id; + if ($search_code != '' && $id == 9) $sql .= natural_search("code_iso", $search_code); + elseif ($search_code != '' && $id == 28) $sql .= natural_search("h.code", $search_code); + elseif ($search_code != '' && $id == 32) $sql .= natural_search("a.code", $search_code); + elseif ($search_code != '' && $id == 3) $sql .= natural_search("r.code_region", $search_code); + elseif ($search_code != '' && $id != 9) $sql .= natural_search("code", $search_code); - if ($sortfield) - { - // If sort order is "country", we use country_code instead - if ($sortfield == 'country') $sortfield = 'country_code'; - $sql .= " ORDER BY ".$db->escape($sortfield); - if ($sortorder) - { - $sql .= " ".strtoupper($db->escape($sortorder)); - } - $sql .= ", "; - // Clear the required sort criteria for the tabsqlsort to be able to force it with selected value - $tabsqlsort[$id] = preg_replace('/([a-z]+\.)?'.$sortfield.' '.$sortorder.',/i', '', $tabsqlsort[$id]); - $tabsqlsort[$id] = preg_replace('/([a-z]+\.)?'.$sortfield.',/i', '', $tabsqlsort[$id]); - } - else { - $sql .= " ORDER BY "; - } - $sql .= $tabsqlsort[$id]; - $sql .= $db->plimit($listlimit + 1, $offset); - //print $sql; + if ($sortfield) + { + // If sort order is "country", we use country_code instead + if ($sortfield == 'country') $sortfield = 'country_code'; + $sql .= " ORDER BY ".$db->escape($sortfield); + if ($sortorder) + { + $sql .= " ".strtoupper($db->escape($sortorder)); + } + $sql .= ", "; + // Clear the required sort criteria for the tabsqlsort to be able to force it with selected value + $tabsqlsort[$id] = preg_replace('/([a-z]+\.)?'.$sortfield.' '.$sortorder.',/i', '', $tabsqlsort[$id]); + $tabsqlsort[$id] = preg_replace('/([a-z]+\.)?'.$sortfield.',/i', '', $tabsqlsort[$id]); + } else { + $sql .= " ORDER BY "; + } + $sql .= $tabsqlsort[$id]; + $sql .= $db->plimit($listlimit + 1, $offset); + //print $sql; - if (empty($tabfield[$id])) - { - dol_print_error($db, 'The table with id '.$id.' has no array tabfield defined'); - exit; - } - $fieldlist = explode(',', $tabfield[$id]); + if (empty($tabfield[$id])) + { + dol_print_error($db, 'The table with id '.$id.' has no array tabfield defined'); + exit; + } + $fieldlist = explode(',', $tabfield[$id]); - print '
'; - print ''; - print ''; + print ''; + print ''; + print ''; - if ($id == 10 && empty($conf->global->FACTURE_TVAOPTION)) - { - print info_admin($langs->trans("VATIsUsedIsOff", $langs->transnoentities("Setup"), $langs->transnoentities("CompanyFoundation"))); - print "
\n"; - } + if ($id == 10 && empty($conf->global->FACTURE_TVAOPTION)) + { + print info_admin($langs->trans("VATIsUsedIsOff", $langs->transnoentities("Setup"), $langs->transnoentities("CompanyFoundation"))); + print "
\n"; + } - // Form to add a new line - if ($tabname[$id]) - { - $alabelisused = 0; - $withentity = null; + // Form to add a new line + if ($tabname[$id]) + { + $alabelisused = 0; + $withentity = null; - $fieldlist = explode(',', $tabfield[$id]); + $fieldlist = explode(',', $tabfield[$id]); - print '
'; - print ''; + print '
'; + print '
'; - // Line for title - print ''; - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'entity') { - $withentity = getEntity($tabname[$id]); - continue; - } + // Line for title + print ''; + foreach ($fieldlist as $field => $value) + { + if ($fieldlist[$field] == 'entity') { + $withentity = getEntity($tabname[$id]); + continue; + } - // Define field friendly name from its technical name - $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut - $valuetoshow = $langs->trans($valuetoshow); // try to translate - $class = ''; + // Define field friendly name from its technical name + $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow = $langs->trans($valuetoshow); // try to translate + $class = ''; - if ($fieldlist[$field] == 'pos') { $valuetoshow = $langs->trans("Position"); $class = 'maxwidth100'; } - if ($fieldlist[$field] == 'source') { $valuetoshow = $langs->trans("Contact"); } - if ($fieldlist[$field] == 'price') { $valuetoshow = $langs->trans("PriceUHT"); } - if ($fieldlist[$field] == 'taux') { + if ($fieldlist[$field] == 'pos') { $valuetoshow = $langs->trans("Position"); $class = 'maxwidth100'; } + if ($fieldlist[$field] == 'source') { $valuetoshow = $langs->trans("Contact"); } + if ($fieldlist[$field] == 'price') { $valuetoshow = $langs->trans("PriceUHT"); } + if ($fieldlist[$field] == 'taux') { if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow = $langs->trans("Rate"); else $valuetoshow = $langs->trans("Amount"); $class = 'center'; - } - if ($fieldlist[$field] == 'localtax1_type') { $valuetoshow = $langs->trans("UseLocalTax")." 2"; $class = "center"; $sortable = 0; } - if ($fieldlist[$field] == 'localtax1') { $valuetoshow = $langs->trans("Rate")." 2"; $class = "center"; } - if ($fieldlist[$field] == 'localtax2_type') { $valuetoshow = $langs->trans("UseLocalTax")." 3"; $class = "center"; $sortable = 0; } - if ($fieldlist[$field] == 'localtax2') { $valuetoshow = $langs->trans("Rate")." 3"; $class = "center"; } - if ($fieldlist[$field] == 'organization') { $valuetoshow = $langs->trans("Organization"); } - if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } - if ($fieldlist[$field] == 'type') { + } + if ($fieldlist[$field] == 'localtax1_type') { $valuetoshow = $langs->trans("UseLocalTax")." 2"; $class = "center"; $sortable = 0; } + if ($fieldlist[$field] == 'localtax1') { $valuetoshow = $langs->trans("Rate")." 2"; $class = "center"; } + if ($fieldlist[$field] == 'localtax2_type') { $valuetoshow = $langs->trans("UseLocalTax")." 3"; $class = "center"; $sortable = 0; } + if ($fieldlist[$field] == 'localtax2') { $valuetoshow = $langs->trans("Rate")." 3"; $class = "center"; } + if ($fieldlist[$field] == 'organization') { $valuetoshow = $langs->trans("Organization"); } + if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } + if ($fieldlist[$field] == 'type') { if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow = $form->textwithtooltip($langs->trans("Type"), $langs->trans("TypePaymentDesc"), 2, 1, img_help(1, '')); else $valuetoshow = $langs->trans("Type"); - } - if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); $class = 'maxwidth100'; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') - { - $valuetoshow = $form->textwithtooltip($langs->trans("Label"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); - } - if ($fieldlist[$field] == 'libelle_facture') { - $valuetoshow = $form->textwithtooltip($langs->trans("LabelOnDocuments"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); - } - if ($fieldlist[$field] == 'country') { - if (in_array('region_id', $fieldlist)) { print ''; continue; } // For region page, we do not show the country input - $valuetoshow = $langs->trans("Country"); - } - if ($fieldlist[$field] == 'recuperableonly') { $valuetoshow = $langs->trans("NPR"); $class = "center"; } - if ($fieldlist[$field] == 'nbjour') { $valuetoshow = $langs->trans("NbOfDays"); } - if ($fieldlist[$field] == 'type_cdr') { $valuetoshow = $langs->trans("AtEndOfMonth"); $class = "center"; } - if ($fieldlist[$field] == 'decalage') { $valuetoshow = $langs->trans("Offset"); } - if ($fieldlist[$field] == 'width' || $fieldlist[$field] == 'nx') { $valuetoshow = $langs->trans("Width"); } - if ($fieldlist[$field] == 'height' || $fieldlist[$field] == 'ny') { $valuetoshow = $langs->trans("Height"); } - if ($fieldlist[$field] == 'unit' || $fieldlist[$field] == 'metric') { $valuetoshow = $langs->trans("MeasuringUnit"); } - if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $valuetoshow = ''; } - if ($fieldlist[$field] == 'accountancy_code') { $valuetoshow = $langs->trans("AccountancyCode"); } - if ($fieldlist[$field] == 'accountancy_code_sell') { $valuetoshow = $langs->trans("AccountancyCodeSell"); } - if ($fieldlist[$field] == 'accountancy_code_buy') { $valuetoshow = $langs->trans("AccountancyCodeBuy"); } - if ($fieldlist[$field] == 'pcg_version' || $fieldlist[$field] == 'fk_pcg_version') { $valuetoshow = $langs->trans("Pcg_version"); } - if ($fieldlist[$field] == 'account_parent') { $valuetoshow = $langs->trans("Accountparent"); } - if ($fieldlist[$field] == 'pcg_type') { $valuetoshow = $langs->trans("Pcg_type"); } - if ($fieldlist[$field] == 'pcg_subtype') { $valuetoshow = $langs->trans("Pcg_subtype"); } - if ($fieldlist[$field] == 'sortorder') { $valuetoshow = $langs->trans("SortOrder"); } - if ($fieldlist[$field] == 'short_label') { $valuetoshow = $langs->trans("ShortLabel"); } + } + if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); $class = 'maxwidth100'; } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') + { + $valuetoshow = $form->textwithtooltip($langs->trans("Label"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); + } + if ($fieldlist[$field] == 'libelle_facture') { + $valuetoshow = $form->textwithtooltip($langs->trans("LabelOnDocuments"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, '')); + } + if ($fieldlist[$field] == 'country') { + if (in_array('region_id', $fieldlist)) { print ''; continue; } // For region page, we do not show the country input + $valuetoshow = $langs->trans("Country"); + } + if ($fieldlist[$field] == 'recuperableonly') { $valuetoshow = $langs->trans("NPR"); $class = "center"; } + if ($fieldlist[$field] == 'nbjour') { $valuetoshow = $langs->trans("NbOfDays"); } + if ($fieldlist[$field] == 'type_cdr') { $valuetoshow = $langs->trans("AtEndOfMonth"); $class = "center"; } + if ($fieldlist[$field] == 'decalage') { $valuetoshow = $langs->trans("Offset"); } + if ($fieldlist[$field] == 'width' || $fieldlist[$field] == 'nx') { $valuetoshow = $langs->trans("Width"); } + if ($fieldlist[$field] == 'height' || $fieldlist[$field] == 'ny') { $valuetoshow = $langs->trans("Height"); } + if ($fieldlist[$field] == 'unit' || $fieldlist[$field] == 'metric') { $valuetoshow = $langs->trans("MeasuringUnit"); } + if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $valuetoshow = ''; } + if ($fieldlist[$field] == 'accountancy_code') { $valuetoshow = $langs->trans("AccountancyCode"); } + if ($fieldlist[$field] == 'accountancy_code_sell') { $valuetoshow = $langs->trans("AccountancyCodeSell"); } + if ($fieldlist[$field] == 'accountancy_code_buy') { $valuetoshow = $langs->trans("AccountancyCodeBuy"); } + if ($fieldlist[$field] == 'pcg_version' || $fieldlist[$field] == 'fk_pcg_version') { $valuetoshow = $langs->trans("Pcg_version"); } + if ($fieldlist[$field] == 'account_parent') { $valuetoshow = $langs->trans("Accountparent"); } + if ($fieldlist[$field] == 'pcg_type') { $valuetoshow = $langs->trans("Pcg_type"); } + if ($fieldlist[$field] == 'pcg_subtype') { $valuetoshow = $langs->trans("Pcg_subtype"); } + if ($fieldlist[$field] == 'sortorder') { $valuetoshow = $langs->trans("SortOrder"); } + if ($fieldlist[$field] == 'short_label') { $valuetoshow = $langs->trans("ShortLabel"); } if ($fieldlist[$field] == 'range_account') { $valuetoshow = $langs->trans("Range"); } if ($fieldlist[$field] == 'sens') { $valuetoshow = $langs->trans("Sens"); } if ($fieldlist[$field] == 'category_type') { $valuetoshow = $langs->trans("Calculated"); } @@ -1176,200 +1172,197 @@ if ($id) if ($fieldlist[$field] == 'revenuestamp_type') { $valuetoshow = $langs->trans('TypeOfRevenueStamp'); } if ($fieldlist[$field] == 'use_default') { $valuetoshow = $langs->trans('Default'); } - if ($id == 2) // Special case for state page - { - if ($fieldlist[$field] == 'region_id') { $valuetoshow = ' '; $showfield = 1; } - if ($fieldlist[$field] == 'region') { $valuetoshow = $langs->trans("Country").'/'.$langs->trans("Region"); $showfield = 1; } - } + if ($id == 2) // Special case for state page + { + if ($fieldlist[$field] == 'region_id') { $valuetoshow = ' '; $showfield = 1; } + if ($fieldlist[$field] == 'region') { $valuetoshow = $langs->trans("Country").'/'.$langs->trans("Region"); $showfield = 1; } + } - if ($valuetoshow != '') - { - print ''; - if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; - elseif (!empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); - else print $valuetoshow; - print ''; - } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; - } + if ($valuetoshow != '') + { + print ''; + if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; + elseif (!empty($tabhelp[$id][$value])) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); + else print $valuetoshow; + print ''; + } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; + } - if ($id == 4) print ''; - print ''; - print ''; - print ''; - print ''; + if ($id == 4) print ''; + print ''; + print ''; + print ''; + print ''; - // Line to enter new values - print ''; - print ''; + // Line to enter new values + print ''; + print ''; - $obj = new stdClass(); - // If data was already input, we define them in obj to populate input fields. - if (GETPOST('actionadd')) - { - foreach ($fieldlist as $key=>$val) - { - if (GETPOST($val) != '') - $obj->$val = GETPOST($val); - } - } + $obj = new stdClass(); + // If data was already input, we define them in obj to populate input fields. + if (GETPOST('actionadd')) + { + foreach ($fieldlist as $key=>$val) + { + if (GETPOST($val) != '') + $obj->$val = GETPOST($val); + } + } - $tmpaction = 'create'; - $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); - $reshook = $hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; $errors = $hookmanager->errors; + $tmpaction = 'create'; + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook = $hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error = $hookmanager->error; $errors = $hookmanager->errors; - if ($id == 3) unset($fieldlist[2]); // Remove field ??? if dictionary Regions + if ($id == 3) unset($fieldlist[2]); // Remove field ??? if dictionary Regions - if (empty($reshook)) - { - fieldList($fieldlist, $obj, $tabname[$id], 'add'); - } + if (empty($reshook)) + { + fieldList($fieldlist, $obj, $tabname[$id], 'add'); + } - if ($id == 4) print ''; - print ''; - print ""; + if ($id == 4) print ''; + print ''; + print ""; - $colspan = count($fieldlist) + 3; - if ($id == 4) $colspan++; + $colspan = count($fieldlist) + 3; + if ($id == 4) $colspan++; - print '
  '; - print ''; - if (!is_null($withentity)) - print ''; - print '
'; + print ''; + if (!is_null($withentity)) + print ''; + print '
'; - if ($action != 'edit') - { - print ''; - } - print '
'; + if ($action != 'edit') + { + print ''; + } + print '
'; + print ''; print '
'; - } + } - print '
'; + print ''; - print '
'; + print '
'; - print '
'; - print ''; - print ''; + print ''; + print ''; + print ''; - // List of available record in database - dol_syslog("htdocs/admin/dict", LOG_DEBUG); + // List of available record in database + dol_syslog("htdocs/admin/dict", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; - // There is several pages - if ($num > $listlimit || $page) - { - print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), ''); - print '
'; - } + // There is several pages + if ($num > $listlimit || $page) + { + print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), ''); + print '
'; + } - print '
'; - print ''; + print '
'; + print '
'; - // Title line with search input fields - print ''; - $filterfound = 0; - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'entity') continue; + // Title line with search input fields + print ''; + $filterfound = 0; + foreach ($fieldlist as $field => $value) + { + if ($fieldlist[$field] == 'entity') continue; - $showfield = 1; // By default + $showfield = 1; // By default - if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $showfield = 0; } + if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $showfield = 0; } - if ($showfield) - { - if ($value == 'country') - { - print ''; - $filterfound++; - } - elseif ($value == 'code') - { - print ''; - $filterfound++; - } - else - { - print ''; - } - } - } - if ($id == 4) print ''; - print ''; - print ''; - print ''; + if ($showfield) + { + if ($value == 'country') + { + print ''; + $filterfound++; + } elseif ($value == 'code') + { + print ''; + $filterfound++; + } else { + print ''; + } + } + } + if ($id == 4) print ''; + print ''; + print ''; + print ''; - // Title of lines - print ''; - foreach ($fieldlist as $field => $value) - { - if ($fieldlist[$field] == 'entity') continue; + // Title of lines + print ''; + foreach ($fieldlist as $field => $value) + { + if ($fieldlist[$field] == 'entity') continue; - // Determines the name of the field in relation to the possible names - // in data dictionaries - $showfield = 1; // By defaut - $cssprefix = ''; - $sortable = 1; - $valuetoshow = ucfirst($fieldlist[$field]); // By defaut - $valuetoshow = $langs->trans($valuetoshow); // try to translate + // Determines the name of the field in relation to the possible names + // in data dictionaries + $showfield = 1; // By defaut + $cssprefix = ''; + $sortable = 1; + $valuetoshow = ucfirst($fieldlist[$field]); // By defaut + $valuetoshow = $langs->trans($valuetoshow); // try to translate - // Special cases - if ($fieldlist[$field] == 'source') { $valuetoshow = $langs->trans("Contact"); } - if ($fieldlist[$field] == 'price') { $valuetoshow = $langs->trans("PriceUHT"); } - if ($fieldlist[$field] == 'taux') { + // Special cases + if ($fieldlist[$field] == 'source') { $valuetoshow = $langs->trans("Contact"); } + if ($fieldlist[$field] == 'price') { $valuetoshow = $langs->trans("PriceUHT"); } + if ($fieldlist[$field] == 'taux') { if ($tabname[$id] != MAIN_DB_PREFIX."c_revenuestamp") $valuetoshow = $langs->trans("Rate"); else $valuetoshow = $langs->trans("Amount"); $cssprefix = 'center '; - } - if ($fieldlist[$field] == 'localtax1_type') { $valuetoshow = $langs->trans("UseLocalTax")." 2"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'localtax1') { $valuetoshow = $langs->trans("Rate")." 2"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'localtax2_type') { $valuetoshow = $langs->trans("UseLocalTax")." 3"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'localtax2') { $valuetoshow = $langs->trans("Rate")." 3"; $cssprefix = "center "; $sortable = 0; } - if ($fieldlist[$field] == 'organization') { $valuetoshow = $langs->trans("Organization"); } - if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } - if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } - if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); } - if ($fieldlist[$field] == 'position') { $cssprefix = 'right '; } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { $valuetoshow = $langs->trans("Label"); } - if ($fieldlist[$field] == 'libelle_facture') { $valuetoshow = $langs->trans("LabelOnDocuments"); } - if ($fieldlist[$field] == 'country') { $valuetoshow = $langs->trans("Country"); } - if ($fieldlist[$field] == 'recuperableonly') { $valuetoshow = $langs->trans("NPR"); $cssprefix = "center "; } - if ($fieldlist[$field] == 'nbjour') { $valuetoshow = $langs->trans("NbOfDays"); } - if ($fieldlist[$field] == 'type_cdr') { $valuetoshow = $langs->trans("AtEndOfMonth"); $cssprefix = "center "; } - if ($fieldlist[$field] == 'decalage') { $valuetoshow = $langs->trans("Offset"); } - if ($fieldlist[$field] == 'width' || $fieldlist[$field] == 'nx') { $valuetoshow = $langs->trans("Width"); } - if ($fieldlist[$field] == 'height' || $fieldlist[$field] == 'ny') { $valuetoshow = $langs->trans("Height"); } - if ($fieldlist[$field] == 'unit' || $fieldlist[$field] == 'metric') { $valuetoshow = $langs->trans("MeasuringUnit"); } - if ($fieldlist[$field] == 'accountancy_code') { $valuetoshow = $langs->trans("AccountancyCode"); } - if ($fieldlist[$field] == 'accountancy_code_sell') { $valuetoshow = $langs->trans("AccountancyCodeSell"); $sortable = 0; } - if ($fieldlist[$field] == 'accountancy_code_buy') { $valuetoshow = $langs->trans("AccountancyCodeBuy"); $sortable = 0; } + } + if ($fieldlist[$field] == 'localtax1_type') { $valuetoshow = $langs->trans("UseLocalTax")." 2"; $cssprefix = "center "; $sortable = 0; } + if ($fieldlist[$field] == 'localtax1') { $valuetoshow = $langs->trans("Rate")." 2"; $cssprefix = "center "; $sortable = 0; } + if ($fieldlist[$field] == 'localtax2_type') { $valuetoshow = $langs->trans("UseLocalTax")." 3"; $cssprefix = "center "; $sortable = 0; } + if ($fieldlist[$field] == 'localtax2') { $valuetoshow = $langs->trans("Rate")." 3"; $cssprefix = "center "; $sortable = 0; } + if ($fieldlist[$field] == 'organization') { $valuetoshow = $langs->trans("Organization"); } + if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } + if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } + if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); } + if ($fieldlist[$field] == 'position') { $cssprefix = 'right '; } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { $valuetoshow = $langs->trans("Label"); } + if ($fieldlist[$field] == 'libelle_facture') { $valuetoshow = $langs->trans("LabelOnDocuments"); } + if ($fieldlist[$field] == 'country') { $valuetoshow = $langs->trans("Country"); } + if ($fieldlist[$field] == 'recuperableonly') { $valuetoshow = $langs->trans("NPR"); $cssprefix = "center "; } + if ($fieldlist[$field] == 'nbjour') { $valuetoshow = $langs->trans("NbOfDays"); } + if ($fieldlist[$field] == 'type_cdr') { $valuetoshow = $langs->trans("AtEndOfMonth"); $cssprefix = "center "; } + if ($fieldlist[$field] == 'decalage') { $valuetoshow = $langs->trans("Offset"); } + if ($fieldlist[$field] == 'width' || $fieldlist[$field] == 'nx') { $valuetoshow = $langs->trans("Width"); } + if ($fieldlist[$field] == 'height' || $fieldlist[$field] == 'ny') { $valuetoshow = $langs->trans("Height"); } + if ($fieldlist[$field] == 'unit' || $fieldlist[$field] == 'metric') { $valuetoshow = $langs->trans("MeasuringUnit"); } + if ($fieldlist[$field] == 'accountancy_code') { $valuetoshow = $langs->trans("AccountancyCode"); } + if ($fieldlist[$field] == 'accountancy_code_sell') { $valuetoshow = $langs->trans("AccountancyCodeSell"); $sortable = 0; } + if ($fieldlist[$field] == 'accountancy_code_buy') { $valuetoshow = $langs->trans("AccountancyCodeBuy"); $sortable = 0; } if ($fieldlist[$field] == 'fk_pcg_version') { $valuetoshow = $langs->trans("Pcg_version"); } - if ($fieldlist[$field] == 'account_parent') { $valuetoshow = $langs->trans("Accountsparent"); } - if ($fieldlist[$field] == 'pcg_type') { $valuetoshow = $langs->trans("Pcg_type"); } - if ($fieldlist[$field] == 'pcg_subtype') { $valuetoshow = $langs->trans("Pcg_subtype"); } - if ($fieldlist[$field] == 'sortorder') { $valuetoshow = $langs->trans("SortOrder"); } - if ($fieldlist[$field] == 'short_label') { $valuetoshow = $langs->trans("ShortLabel"); } + if ($fieldlist[$field] == 'account_parent') { $valuetoshow = $langs->trans("Accountsparent"); } + if ($fieldlist[$field] == 'pcg_type') { $valuetoshow = $langs->trans("Pcg_type"); } + if ($fieldlist[$field] == 'pcg_subtype') { $valuetoshow = $langs->trans("Pcg_subtype"); } + if ($fieldlist[$field] == 'sortorder') { $valuetoshow = $langs->trans("SortOrder"); } + if ($fieldlist[$field] == 'short_label') { $valuetoshow = $langs->trans("ShortLabel"); } if ($fieldlist[$field] == 'range_account') { $valuetoshow = $langs->trans("Range"); } if ($fieldlist[$field] == 'sens') { $valuetoshow = $langs->trans("Sens"); } if ($fieldlist[$field] == 'category_type') { $valuetoshow = $langs->trans("Calculated"); } @@ -1395,237 +1388,198 @@ if ($id) if ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { $showfield = 0; } - // Show field title - if ($showfield) - { - print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, $cssprefix); - } - } + // Show field title + if ($showfield) + { + print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, '', $sortfield, $sortorder, $cssprefix); + } + } // Favorite - Only activated on country dictionary - if ($id == 4) print getTitleFieldOfList($langs->trans("Favorite"), 0, $_SERVER["PHP_SELF"], "favorite", ($page ? 'page='.$page.'&' : ''), $param, 'align="center"', $sortfield, $sortorder); + if ($id == 4) print getTitleFieldOfList($langs->trans("Favorite"), 0, $_SERVER["PHP_SELF"], "favorite", ($page ? 'page='.$page.'&' : ''), $param, 'align="center"', $sortfield, $sortorder); print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page ? 'page='.$page.'&' : ''), $param, 'align="center"', $sortfield, $sortorder); - print getTitleFieldOfList(''); - print getTitleFieldOfList(''); - print ''; + print getTitleFieldOfList(''); + print getTitleFieldOfList(''); + print ''; - if ($num) - { - // Lines with values - while ($i < $num) - { - $obj = $db->fetch_object($resql); - //print_r($obj); - print ''; - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) - { - $tmpaction = 'edit'; - $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); - $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; $errors = $hookmanager->errors; + if ($num) + { + // Lines with values + while ($i < $num) + { + $obj = $db->fetch_object($resql); + //print_r($obj); + print ''; + if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) + { + $tmpaction = 'edit'; + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook = $hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error = $hookmanager->error; $errors = $hookmanager->errors; - // Show fields - if (empty($reshook)) { - $withentity = fieldList($fieldlist, $obj, $tabname[$id], 'edit'); - } + // Show fields + if (empty($reshook)) { + $withentity = fieldList($fieldlist, $obj, $tabname[$id], 'edit'); + } - print ''; - } - else - { - $tmpaction = 'view'; - $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); - $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + print ''; + } else { + $tmpaction = 'view'; + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook = $hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; $errors = $hookmanager->errors; + $error = $hookmanager->error; $errors = $hookmanager->errors; - if (empty($reshook)) - { - $withentity = null; + if (empty($reshook)) + { + $withentity = null; - foreach ($fieldlist as $field => $value) - { - //var_dump($fieldlist); - $class = ''; - $showfield = 1; - $valuetoshow = $obj->{$fieldlist[$field]}; + foreach ($fieldlist as $field => $value) + { + //var_dump($fieldlist); + $class = ''; + $showfield = 1; + $valuetoshow = $obj->{$fieldlist[$field]}; - if ($fieldlist[$field] == 'entity') { - $withentity = $valuetoshow; - continue; - } - - if ($value == 'element') - { - $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; - } - elseif ($value == 'source') - { - $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow; - } - elseif ($valuetoshow == 'all') { - $valuetoshow = $langs->trans('All'); - } - elseif ($fieldlist[$field] == 'country') { - if (empty($obj->country_code)) - { - $valuetoshow = '-'; - } - else - { - $key = $langs->trans("Country".strtoupper($obj->country_code)); - $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); - } - } - elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { - $valuetoshow = yn($valuetoshow); - $class = "center"; - } - elseif ($fieldlist[$field] == 'type_cdr') { - if (empty($valuetoshow)) $valuetoshow = $langs->trans('None'); - elseif ($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth'); - elseif ($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext'); - $class = "center"; - } elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) { - $valuetoshow = price($valuetoshow); - } - if ($value == 'private') - { - $valuetoshow = yn($elementList[$valuetoshow]); - } - elseif ($fieldlist[$field] == 'libelle_facture') { - $langs->load("bills"); - $key = $langs->trans("PaymentCondition".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "PaymentCondition".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - $valuetoshow = nl2br($valuetoshow); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { - $key = $langs->trans("Country".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "Country".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { - $langs->load("propal"); - $key = $langs->trans("AvailabilityType".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "AvailabilityType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { - $key = $langs->trans("Action".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif (!empty($obj->code_iso) && $fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_currencies') { - $key = $langs->trans("Currency".strtoupper($obj->code_iso)); - $valuetoshow = ($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_typent') { - $key = $langs->trans(strtoupper($obj->code)); - $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_prospectlevel') { - $key = $langs->trans(strtoupper($obj->code)); - $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_civility') { - $key = $langs->trans("Civility".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "Civility".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_contact') { - $langs->load('agenda'); - $key = $langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_payment_term') { - $langs->load("bills"); - $key = $langs->trans("PaymentConditionShort".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { - $langs->load("bills"); - $key = $langs->trans("PaymentType".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "PaymentType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'type' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { - $payment_type_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); - $valuetoshow = $payment_type_list[$valuetoshow]; - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_reason') { - $key = $langs->trans("DemandReasonType".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "DemandReasonType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_method') { - $langs->load("orders"); - $key = $langs->trans($obj->code); - $valuetoshow = ($obj->code && $key != $obj->code) ? $key : $obj->{$fieldlist[$field]}; - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_shipment_mode') { - $langs->load("sendings"); - $key = $langs->trans("SendingMethod".strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != "SendingMethod".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paper_format') - { - $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') - { - $langs->load('trips'); - $key = $langs->trans(strtoupper($obj->code)); - $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { - $showfield = 0; - } - elseif ($fieldlist[$field] == 'unicode') { - $valuetoshow = $langs->getCurrencySymbol($obj->code, 1); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX.'c_units') { - $langs->load("products"); - $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'short_label' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX.'c_units') { - $langs->load("products"); - $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); - } - elseif (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) - { - $key = $langs->trans('SizeUnit'.strtolower($obj->unit)); - $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]}); - } - elseif ($fieldlist[$field] == 'localtax1' || $fieldlist[$field] == 'localtax2') { - $class = "center"; + if ($fieldlist[$field] == 'entity') { + $withentity = $valuetoshow; + continue; } - elseif ($fieldlist[$field] == 'localtax1_type') { - if ($obj->localtax1 != 0) - $valuetoshow = $localtax_typeList[$valuetoshow]; - else - $valuetoshow = ''; - $class = "center"; + + if ($value == 'element') + { + $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; + } elseif ($value == 'source') + { + $valuetoshow = isset($sourceList[$valuetoshow]) ? $sourceList[$valuetoshow] : $valuetoshow; + } elseif ($valuetoshow == 'all') { + $valuetoshow = $langs->trans('All'); + } elseif ($fieldlist[$field] == 'country') { + if (empty($obj->country_code)) + { + $valuetoshow = '-'; + } else { + $key = $langs->trans("Country".strtoupper($obj->country_code)); + $valuetoshow = ($key != "Country".strtoupper($obj->country_code) ? $obj->country_code." - ".$key : $obj->country); + } + } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { + $valuetoshow = yn($valuetoshow); + $class = "center"; + } elseif ($fieldlist[$field] == 'type_cdr') { + if (empty($valuetoshow)) $valuetoshow = $langs->trans('None'); + elseif ($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth'); + elseif ($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext'); + $class = "center"; + } elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) { + $valuetoshow = price($valuetoshow); } - elseif ($fieldlist[$field] == 'localtax2_type') { - if ($obj->localtax2 != 0) - $valuetoshow = $localtax_typeList[$valuetoshow]; - else - $valuetoshow = ''; - $class = "center"; - } - elseif ($fieldlist[$field] == 'taux') { - $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); - $class = "center"; + if ($value == 'private') + { + $valuetoshow = yn($elementList[$valuetoshow]); + } elseif ($fieldlist[$field] == 'libelle_facture') { + $langs->load("bills"); + $key = $langs->trans("PaymentCondition".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "PaymentCondition".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + $valuetoshow = nl2br($valuetoshow); + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_country') { + $key = $langs->trans("Country".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "Country".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_availability') { + $langs->load("propal"); + $key = $langs->trans("AvailabilityType".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "AvailabilityType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_actioncomm') { + $key = $langs->trans("Action".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "Action".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif (!empty($obj->code_iso) && $fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_currencies') { + $key = $langs->trans("Currency".strtoupper($obj->code_iso)); + $valuetoshow = ($obj->code_iso && $key != "Currency".strtoupper($obj->code_iso) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_typent') { + $key = $langs->trans(strtoupper($obj->code)); + $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_prospectlevel') { + $key = $langs->trans(strtoupper($obj->code)); + $valuetoshow = ($key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_civility') { + $key = $langs->trans("Civility".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "Civility".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_contact') { + $langs->load('agenda'); + $key = $langs->trans("TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "TypeContact_".$obj->element."_".$obj->source."_".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_payment_term') { + $langs->load("bills"); + $key = $langs->trans("PaymentConditionShort".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "PaymentConditionShort".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { + $langs->load("bills"); + $key = $langs->trans("PaymentType".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "PaymentType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'type' && $tabname[$id] == MAIN_DB_PREFIX.'c_paiement') { + $payment_type_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); + $valuetoshow = $payment_type_list[$valuetoshow]; + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_reason') { + $key = $langs->trans("DemandReasonType".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "DemandReasonType".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_input_method') { + $langs->load("orders"); + $key = $langs->trans($obj->code); + $valuetoshow = ($obj->code && $key != $obj->code) ? $key : $obj->{$fieldlist[$field]}; + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_shipment_mode') { + $langs->load("sendings"); + $key = $langs->trans("SendingMethod".strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != "SendingMethod".strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'libelle' && $tabname[$id] == MAIN_DB_PREFIX.'c_paper_format') + { + $key = $langs->trans('PaperFormat'.strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != 'PaperFormat'.strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_type_fees') + { + $langs->load('trips'); + $key = $langs->trans(strtoupper($obj->code)); + $valuetoshow = ($obj->code && $key != strtoupper($obj->code) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'region_id' || $fieldlist[$field] == 'country_id') { + $showfield = 0; + } elseif ($fieldlist[$field] == 'unicode') { + $valuetoshow = $langs->getCurrencySymbol($obj->code, 1); + } elseif ($fieldlist[$field] == 'label' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX.'c_units') { + $langs->load("products"); + $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'short_label' && $tabname[$_GET["id"]] == MAIN_DB_PREFIX.'c_units') { + $langs->load("products"); + $valuetoshow = $langs->trans($obj->{$fieldlist[$field]}); + } elseif (($fieldlist[$field] == 'unit') && ($tabname[$id] == MAIN_DB_PREFIX.'c_paper_format')) + { + $key = $langs->trans('SizeUnit'.strtolower($obj->unit)); + $valuetoshow = ($obj->code && $key != 'SizeUnit'.strtolower($obj->unit) ? $key : $obj->{$fieldlist[$field]}); + } elseif ($fieldlist[$field] == 'localtax1' || $fieldlist[$field] == 'localtax2') { + $class = "center"; + } elseif ($fieldlist[$field] == 'localtax1_type') { + if ($obj->localtax1 != 0) + $valuetoshow = $localtax_typeList[$valuetoshow]; + else $valuetoshow = ''; + $class = "center"; + } elseif ($fieldlist[$field] == 'localtax2_type') { + if ($obj->localtax2 != 0) + $valuetoshow = $localtax_typeList[$valuetoshow]; + else $valuetoshow = ''; + $class = "center"; + } elseif ($fieldlist[$field] == 'taux') { + $valuetoshow = price($valuetoshow, 0, $langs, 0, 0); + $class = "center"; } elseif (in_array($fieldlist[$field], array('recuperableonly'))) { $class = "center"; - } - elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') { - $valuetoshow = length_accountg($valuetoshow); - } - elseif ($fieldlist[$field] == 'fk_tva') + } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') { + $valuetoshow = length_accountg($valuetoshow); + } elseif ($fieldlist[$field] == 'fk_tva') { foreach ($form->cache_vatrates as $key => $Tab) { @@ -1635,70 +1589,64 @@ if ($id) break; } } - } - elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') + } elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') { $valuetoshow = getDictvalue(MAIN_DB_PREFIX.'c_exp_tax_cat', 'label', $valuetoshow); $valuetoshow = $langs->trans($valuetoshow); - } - elseif ($tabname[$id] == MAIN_DB_PREFIX.'c_exp_tax_cat') + } elseif ($tabname[$id] == MAIN_DB_PREFIX.'c_exp_tax_cat') { $valuetoshow = $langs->trans($valuetoshow); - } - elseif ($fieldlist[$field] == 'label' && $tabname[$id] == MAIN_DB_PREFIX.'c_units') + } 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]}); - } - elseif ($fieldlist[$field] == 'code' && $id == 3) { + } elseif ($fieldlist[$field] == 'code' && $id == 3) { $valuetoshow = $obj->state_code; } - $class .= ($class ? ' ' : '').'tddict'; - if ($fieldlist[$field] == 'note' && $id == 10) $class .= ' tdoverflowmax200'; - if ($fieldlist[$field] == 'tracking') $class .= ' tdoverflowauto'; - if ($fieldlist[$field] == 'position') $class .= ' right'; - if ($fieldlist[$field] == 'localtax1_type') $class .= ' nowrap'; - if ($fieldlist[$field] == 'localtax2_type') $class .= ' nowrap'; - // Show value for field + $class .= ($class ? ' ' : '').'tddict'; + if ($fieldlist[$field] == 'note' && $id == 10) $class .= ' tdoverflowmax200'; + if ($fieldlist[$field] == 'tracking') $class .= ' tdoverflowauto'; + if ($fieldlist[$field] == 'position') $class .= ' right'; + if ($fieldlist[$field] == 'localtax1_type') $class .= ' nowrap'; + if ($fieldlist[$field] == 'localtax2_type') $class .= ' nowrap'; + // Show value for field if ($showfield) print ''; - } - } + } + } - // Can an entry be erased or disabled ? - // all true by default - $iserasable = 1; - $canbedisabled = 1; - $canbemodified = 1; - if (isset($obj->code) && $id != 10) - { - if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; } - elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } - elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } - } + // Can an entry be erased or disabled ? + // all true by default + $iserasable = 1; + $canbedisabled = 1; + $canbemodified = 1; + if (isset($obj->code) && $id != 10) + { + if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; } elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; } elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; } + } if ($id == 25 && in_array($obj->code, array('banner', 'blogpost', 'other', 'page'))) { $iserasable = 0; $canbedisabled = 0; if (in_array($obj->code, array('banner'))) $canbedisabled = 1; } - if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable = 0; } - if (in_array($obj->code, array('AC_OTH', 'AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $canbedisabled = 0; $canbedisabled = 0; } - $canbemodified = $iserasable; - if ($obj->code == 'RECEP') $canbemodified = 1; - if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm") $canbemodified = 1; + if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) { $iserasable = 0; } + if (in_array($obj->code, array('AC_OTH', 'AC_OTH_AUTO')) || in_array($obj->type, array('systemauto'))) { $canbedisabled = 0; $canbedisabled = 0; } + $canbemodified = $iserasable; + if ($obj->code == 'RECEP') $canbemodified = 1; + if ($tabname[$id] == MAIN_DB_PREFIX."c_actioncomm") $canbemodified = 1; - // Build Url. The table is id=, the id of line is rowid= - $rowidcol = $tabrowid[$id]; - // If rowidcol not defined - if (empty($rowidcol) || in_array($id, array(6, 7, 8, 13, 17, 19, 27, 32))) $rowidcol = 'rowid'; - $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.((!empty($obj->{$rowidcol}) || $obj->{$rowidcol} == '0') ? $obj->{$rowidcol}:(!empty($obj->code) ?urlencode($obj->code) : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); - if (!empty($param)) $url .= '&'.$param; - if (!is_null($withentity)) $url .= '&entity='.$withentity; - $url .= '&'; + // Build Url. The table is id=, the id of line is rowid= + $rowidcol = $tabrowid[$id]; + // If rowidcol not defined + if (empty($rowidcol) || in_array($id, array(6, 7, 8, 13, 17, 19, 27, 32))) $rowidcol = 'rowid'; + $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.((!empty($obj->{$rowidcol}) || $obj->{$rowidcol} == '0') ? $obj->{$rowidcol}:(!empty($obj->code) ?urlencode($obj->code) : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); + if (!empty($param)) $url .= '&'.$param; + if (!is_null($withentity)) $url .= '&entity='.$withentity; + $url .= '&'; // Favorite // Only activated on country dictionary - if ($id == 4) + if ($id == 4) { print ''; } - // Active - print '"; + // Active + print '"; - // Modify link - if ($canbemodified) print ''; - else print ''; + // Modify link + if ($canbemodified) print ''; + else print ''; - // Delete link - if ($iserasable) - { - print ''; - } - else print ''; + // Delete link + if ($iserasable) + { + print ''; + } else print ''; - print "\n"; - } - $i++; - } - } + print "\n"; + } + $i++; + } + } - print '
'; - print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth150 maxwidthonsmartphone'); - print ''; - print ''; - print ''; - print ''; - if ($filterfound) - { - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; - } - print '
'; + print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth150 maxwidthonsmartphone'); + print ''; + print ''; + print ''; + print ''; + if ($filterfound) + { + $searchpicto = $form->showFilterAndCheckAddButtons(0); + print $searchpicto; + } + print '
'; - print '
'; - print ''; - print ''; - if (!is_null($withentity)) - print ''; - print ''; - print ''; - print '
'; + print '
'; + print ''; + print ''; + if (!is_null($withentity)) + print ''; + print ''; + print ''; + print '
'.$valuetoshow.''; if ($iserasable) print ''.$actl[$obj->favorite].''; @@ -1706,107 +1654,98 @@ if ($id) print ''; - if ($canbedisabled) print ''.$actl[$obj->active].''; - else - { - if (in_array($obj->code, array('AC_OTH', 'AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); - elseif (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); - elseif (isset($obj->type) && in_array($obj->type, array('system')) && !empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); - else print $langs->trans("AlwaysActive"); - } - print "'; + if ($canbedisabled) print ''.$actl[$obj->active].''; + else { + if (in_array($obj->code, array('AC_OTH', 'AC_OTH_AUTO'))) print $langs->trans("AlwaysActive"); + elseif (isset($obj->type) && in_array($obj->type, array('systemauto')) && empty($obj->active)) print $langs->trans("Deprecated"); + elseif (isset($obj->type) && in_array($obj->type, array('system')) && !empty($obj->active) && $obj->code != 'AC_OTH') print $langs->trans("UsedOnlyWithTypeOption"); + else print $langs->trans("AlwaysActive"); + } + print "'.img_edit().' '.img_edit().' '; - if ($user->admin) print ''.img_delete().''; - //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin - print ' '; + if ($user->admin) print ''.img_delete().''; + //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin + print ' 
'; - print '
'; - } - else { - dol_print_error($db); - } + print ''; + print ''; + } else { + dol_print_error($db); + } - print '
'; -} -else -{ - /* + print ''; +} else { + /* * Show list of dictionary to show */ - $lastlineisempty = false; + $lastlineisempty = false; print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; + print '
'.$langs->trans("Dictionary").''.$langs->trans("Table").'
'; + print ''; + print ''; + print ''; + print ''; - $showemptyline = ''; - foreach ($taborder as $i) - { - if (isset($tabname[$i]) && empty($tabcond[$i])) continue; + $showemptyline = ''; + foreach ($taborder as $i) + { + if (isset($tabname[$i]) && empty($tabcond[$i])) continue; - if ($i) - { - if ($showemptyline) - { - print ''; - $showemptyline = 0; - } + if ($i) + { + if ($showemptyline) + { + print ''; + $showemptyline = 0; + } - $value = $tabname[$i]; - print ''; - print ''; + print ''; - print ''; - $lastlineisempty = false; - } - else - { - if (!$lastlineisempty) - { - $showemptyline = 1; - $lastlineisempty = true; - } - } - } - print '
'.$langs->trans("Dictionary").''.$langs->trans("Table").'
   
   
'; - if (!empty($tabcond[$i])) - { - print ''.$langs->trans($tablib[$i]).''; - } - else - { - print $langs->trans($tablib[$i]); - } - print ''; - /*if (empty($tabcond[$i])) + $value = $tabname[$i]; + print '
'; + if (!empty($tabcond[$i])) + { + print ''.$langs->trans($tablib[$i]).''; + } else { + print $langs->trans($tablib[$i]); + } + print ''; + /*if (empty($tabcond[$i])) { print info_admin($langs->trans("DictionaryDisabledSinceNoModuleNeedIt"),1); }*/ - print ''.$tabname[$i].'
'; - print '
'; + print ''; + print ''.$tabname[$i].''; + $lastlineisempty = false; + } else { + if (!$lastlineisempty) + { + $showemptyline = 1; + $lastlineisempty = true; + } + } + } + print ''; + print ''; } print '
'; @@ -1845,15 +1784,14 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') continue; } - if (in_array($fieldlist[$field], array('code', 'libelle', 'type')) && $tabname == MAIN_DB_PREFIX."c_actioncomm" && in_array($obj->type, array('system', 'systemauto'))) - { - $hidden = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''); - print ''; - print ''; - print $langs->trans($hidden); - print ''; - } - elseif ($fieldlist[$field] == 'country') + if (in_array($fieldlist[$field], array('code', 'libelle', 'type')) && $tabname == MAIN_DB_PREFIX."c_actioncomm" && in_array($obj->type, array('system', 'systemauto'))) + { + $hidden = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''); + print ''; + print ''; + print $langs->trans($hidden); + print ''; + } elseif ($fieldlist[$field] == 'country') { if (in_array('region_id', $fieldlist)) { @@ -1865,8 +1803,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $fieldname = 'country'; print $form->select_country((!empty($obj->country_code) ? $obj->country_code : (!empty($obj->country) ? $obj->country : '')), $fieldname, '', 28, 'maxwidth150 maxwidthonsmartphone'); print ''; - } - elseif ($fieldlist[$field] == 'country_id') + } elseif ($fieldlist[$field] == 'country_id') { if (!in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate) { @@ -1875,21 +1812,18 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; print ''; } - } - elseif ($fieldlist[$field] == 'region') + } elseif ($fieldlist[$field] == 'region') { print ''; $formcompany->select_region($region_id, 'region'); print ''; - } - elseif ($fieldlist[$field] == 'region_id') + } elseif ($fieldlist[$field] == 'region_id') { $region_id = (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:0); print ''; print ''; print ''; - } - elseif ($fieldlist[$field] == 'lang') + } elseif ($fieldlist[$field] == 'lang') { print ''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); @@ -1908,75 +1842,65 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; print $form->selectarray('source', $sourceList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); print ''; - } - elseif ($fieldlist[$field] == 'private') + } elseif ($fieldlist[$field] == 'private') { print ''; print $form->selectyesno("private", (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); print ''; - } - elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") + } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX."c_actioncomm") { $type = (!empty($obj->type) ? $obj->type : 'user'); // Check if type is different of 'user' (external module) print ''; print $type.''; print ''; - } - elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') + } elseif ($fieldlist[$field] == 'type' && $tabname == MAIN_DB_PREFIX.'c_paiement') { print ''; $select_list = array(0=>$langs->trans('PaymentTypeCustomer'), 1=>$langs->trans('PaymentTypeSupplier'), 2=>$langs->trans('PaymentTypeBoth')); print $form->selectarray($fieldlist[$field], $select_list, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'2')); print ''; - } - elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { - if ($fieldlist[$field] == 'type_cdr') print ''; - else print ''; + } elseif ($fieldlist[$field] == 'recuperableonly' || $fieldlist[$field] == 'type_cdr' || $fieldlist[$field] == 'deductible' || $fieldlist[$field] == 'category_type') { + if ($fieldlist[$field] == 'type_cdr') print ''; + else print ''; if ($fieldlist[$field] == 'type_cdr') { print $form->selectarray($fieldlist[$field], array(0=>$langs->trans('None'), 1=>$langs->trans('AtEndOfMonth'), 2=>$langs->trans('CurrentNext')), (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); } else { print $form->selectyesno($fieldlist[$field], (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); } print ''; - } - elseif (in_array($fieldlist[$field], array('nbjour', 'decalage', 'taux', 'localtax1', 'localtax2'))) { + } elseif (in_array($fieldlist[$field], array('nbjour', 'decalage', 'taux', 'localtax1', 'localtax2'))) { $class = "left"; if (in_array($fieldlist[$field], array('taux', 'localtax1', 'localtax2'))) $class = "center"; // Fields aligned on right print ''; print ''; print ''; - } - elseif (in_array($fieldlist[$field], array('libelle_facture'))) { - print ''; - $transfound = 0; - $transkey = ''; - // Special case for labels - if ($tabname == MAIN_DB_PREFIX.'c_payment_term') - { - $langs->load("bills"); - $transkey = "PaymentCondition".strtoupper($obj->code); - if ($langs->trans($transkey) != $transkey) - { - $transfound = 1; - print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); - } - } - if (!$transfound) - { - print ''; - } - else { - print ''; - } - print ''; - } - elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) { + } elseif (in_array($fieldlist[$field], array('libelle_facture'))) { + print ''; + $transfound = 0; + $transkey = ''; + // Special case for labels + if ($tabname == MAIN_DB_PREFIX.'c_payment_term') + { + $langs->load("bills"); + $transkey = "PaymentCondition".strtoupper($obj->code); + if ($langs->trans($transkey) != $transkey) + { + $transfound = 1; + print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); + } + } + if (!$transfound) + { + print ''; + } else { + print ''; + } + print ''; + } elseif ($fieldlist[$field] == 'price' || preg_match('/^amount/i', $fieldlist[$field])) { print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->{$fieldlist[$field]})) { print ''; - } - elseif ($fieldlist[$field] == 'unit') { + } elseif ($fieldlist[$field] == 'unit') { print ''; $units = array( 'mm' => $langs->trans('SizeUnitmm'), @@ -1993,49 +1917,41 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; print $form->selectarray($fieldlist[$field], $localtax_typeList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:'')); print ''; - } - elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') + } elseif ($fieldlist[$field] == 'accountancy_code' || $fieldlist[$field] == 'accountancy_code_sell' || $fieldlist[$field] == 'accountancy_code_buy') { print ''; if (!empty($conf->accounting->enabled)) { - $fieldname = $fieldlist[$field]; + $fieldname = $fieldlist[$field]; $accountancy_account = (!empty($obj->$fieldname) ? $obj->$fieldname : 0); print $formaccounting->select_account($accountancy_account, '.'.$fieldlist[$field], 1, '', 1, 1, 'maxwidth200 maxwidthonsmartphone'); - } - else - { - $fieldname = $fieldlist[$field]; - print ''; + } else { + $fieldname = $fieldlist[$field]; + print ''; } print ''; - } - elseif ($fieldlist[$field] == 'fk_tva') + } elseif ($fieldlist[$field] == 'fk_tva') { print ''; print $form->load_tva('fk_tva', $obj->taux, $mysoc, new Societe($db), 0, 0, '', false, -1); print ''; - } - elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') + } elseif ($fieldlist[$field] == 'fk_c_exp_tax_cat') { print ''; print $form->selectExpenseCategories($obj->fk_c_exp_tax_cat); print ''; - } - elseif ($fieldlist[$field] == 'fk_range') + } elseif ($fieldlist[$field] == 'fk_range') { print ''; print $form->selectExpenseRanges($obj->fk_range); print ''; - } - else - { - $fieldValue = isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''; + } else { + $fieldValue = isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''; if ($fieldlist[$field] == 'sortorder') - { - $fieldlist[$field] = 'position'; - } + { + $fieldlist[$field] = 'position'; + } $classtd = ''; $class = ''; if ($fieldlist[$field] == 'code') $class = 'maxwidth100'; @@ -2043,30 +1959,29 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if (in_array($fieldlist[$field], array('libelle', 'label', 'tracking'))) $class = 'quatrevingtpercent'; print ''; $transfound = 0; - $transkey = ''; + $transkey = ''; if (in_array($fieldlist[$field], array('label', 'libelle'))) // For label { - // Special case for labels - if ($tabname == MAIN_DB_PREFIX.'c_civility') { - $transkey = "Civility".strtoupper($obj->code); - } - if ($tabname == MAIN_DB_PREFIX.'c_payment_term') { - $langs->load("bills"); - $transkey = "PaymentConditionShort".strtoupper($obj->code); - } - if ($transkey && $langs->trans($transkey) != $transkey) - { - $transfound = 1; - print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); - } + // Special case for labels + if ($tabname == MAIN_DB_PREFIX.'c_civility') { + $transkey = "Civility".strtoupper($obj->code); + } + if ($tabname == MAIN_DB_PREFIX.'c_payment_term') { + $langs->load("bills"); + $transkey = "PaymentConditionShort".strtoupper($obj->code); + } + if ($transkey && $langs->trans($transkey) != $transkey) + { + $transfound = 1; + print $form->textwithpicto($langs->trans($transkey), $langs->trans("GoIntoTranslationMenuToChangeThis")); + } } if (!$transfound) { - print ''; + print ''; + } else { + print ''; } - else { - print ''; - } print ''; } } diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index 3c735707c4a..0227db8d969 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -136,8 +136,9 @@ class PrestaShopWebservice { if (isset($curl_params[$defkey])) $curl_options[$defkey] = $curl_params[$defkey]; - else + else { $curl_options[$defkey] = $defaultParams[$defkey]; + } } foreach ($curl_params as $defkey => $defval) if (!isset($curl_options[$defkey])) @@ -236,9 +237,9 @@ class PrestaShopWebservice throw new PrestaShopWebserviceException('HTTP XML response is not parsable: '.$msg); } return $xml; - } - else + } else { throw new PrestaShopWebserviceException('HTTP response is empty'); + } } /** @@ -264,9 +265,7 @@ class PrestaShopWebservice $url .= '&id_shop='.$options['id_shop']; if (isset($options['id_group_shop'])) $url .= '&id_group_shop='.$options['id_group_shop']; - } - else - { + } else { throw new PrestaShopWebserviceException('Bad parameters given'); } $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_POSTFIELDS => $xml)); @@ -323,9 +322,9 @@ class PrestaShopWebservice $url_params[$k] = $options[$k]; if (count($url_params) > 0) $url .= '?'.http_build_query($url_params); - } - else + } else { throw new PrestaShopWebserviceException('Bad parameters given '); + } $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'GET')); self::checkStatusCode($request['status_code']); // check the response validity @@ -356,9 +355,9 @@ class PrestaShopWebservice $url_params[$k] = $options[$k]; if (count($url_params) > 0) $url .= '?'.http_build_query($url_params); - } - else + } else { throw new PrestaShopWebserviceException('Bad parameters given'); + } $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'HEAD', CURLOPT_NOBODY => true)); self::checkStatusCode($request['status_code']); // check the response validity return $request['header']; @@ -387,9 +386,9 @@ class PrestaShopWebservice $url .= '&id_shop='.$options['id_shop']; if (isset($options['id_group_shop'])) $url .= '&id_group_shop='.$options['id_group_shop']; - } - else + } else { throw new PrestaShopWebserviceException('Bad parameters given'); + } $request = self::executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml)); self::checkStatusCode($request['status_code']); // check the response validity diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index a229f3c985d..1d764a849be 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -101,8 +101,7 @@ class Dolistore $trace = $e->getTrace(); if ($trace[0]['args'][0] == 404) die('Bad ID'); elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); - else - { + else { print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'
'; print $e->getMessage(); } @@ -183,8 +182,7 @@ class Dolistore $trace = $e->getTrace(); if ($trace[0]['args'][0] == 404) die('Bad ID'); elseif ($trace[0]['args'][0] == 401) die('Bad auth key'); - else - { + else { print 'Can not access to '.$conf->global->MAIN_MODULE_DOLISTORE_API_SRV.'
'; print $e->getMessage(); } diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 0c348b25f60..e11434c45d6 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -23,6 +23,7 @@ */ require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page @@ -41,9 +42,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -55,9 +54,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -74,6 +71,10 @@ $linkback = ''; +$head = ecm_admin_prepare_head(); + +dol_fiche_head($head, 'ecm', $langs->trans("ECM"), -1, 'ecm'); + print ''; print ''; print ''; @@ -93,16 +94,13 @@ print ''; diff --git a/htdocs/admin/ecm_directories_extrafields.php b/htdocs/admin/ecm_directories_extrafields.php new file mode 100644 index 00000000000..77e21963e4c --- /dev/null +++ b/htdocs/admin/ecm_directories_extrafields.php @@ -0,0 +1,123 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Florian Henry + * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2015 Claudio Aschieri + * Copyright (C) 2020 Frédéric France + * + * 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 . + */ + +/** + * \file htdocs/admin/ecm_directories_extrafields.php + * \ingroup ecm + * \brief Page to setup extra fields of ecm + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + + +if (!$user->admin) + accessforbidden(); + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'ecm')); + + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$tmptype2label = ExtraFields::$type2label; +$type2label = array(''); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} + +$action = GETPOST('action', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'ecm_directories'; //Must be the $table_element of the class that manage extrafield + +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + +/* + * View + */ + +$textobject = $langs->transnoentitiesnoconv("ECM"); + +llxHeader('', $langs->trans("ECMSetup")); + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("ECMSetup"), $linkback, 'title_setup'); +print "
\n"; + +$head = ecm_admin_prepare_head(); + +dol_fiche_head($head, 'attributes_ecm_directories', $langs->trans("ECM"), -1, 'ecm'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') { + print '
'; + print "".$langs->trans("NewAttribute").""; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Creation of an optional field */ +/* */ +/* ************************************************************************** */ + +if ($action == 'create') { + print '
'; + print load_fiche_titre($langs->trans('NewAttribute')); + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edition of an optional field */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && !empty($attrname)) { + print "
"; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/ecm_files_extrafields.php b/htdocs/admin/ecm_files_extrafields.php new file mode 100644 index 00000000000..aaa507ca7c4 --- /dev/null +++ b/htdocs/admin/ecm_files_extrafields.php @@ -0,0 +1,123 @@ + + * Copyright (C) 2003 Jean-Louis Bergamo + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2012 Regis Houssin + * Copyright (C) 2012 Florian Henry + * Copyright (C) 2013 Philippe Grand + * Copyright (C) 2015 Claudio Aschieri + * Copyright (C) 2020 Frédéric France + * + * 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 . + */ + +/** + * \file htdocs/admin/ecm_files_extrafields.php + * \ingroup ecm + * \brief Page to setup extra fields of ecm + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/ecm.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + + +if (!$user->admin) + accessforbidden(); + +// Load translation files required by the page +$langs->loadLangs(array('admin', 'other', 'ecm')); + + +$extrafields = new ExtraFields($db); +$form = new Form($db); + +// List of supported format +$tmptype2label = ExtraFields::$type2label; +$type2label = array(''); +foreach ($tmptype2label as $key => $val) { + $type2label[$key] = $langs->transnoentitiesnoconv($val); +} + +$action = GETPOST('action', 'aZ09'); +$attrname = GETPOST('attrname', 'alpha'); +$elementtype = 'ecm_files'; //Must be the $table_element of the class that manage extrafield + +if (!$user->admin) { + accessforbidden(); +} + + +/* + * Actions + */ + +require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php'; + + +/* + * View + */ + +$textobject = $langs->transnoentitiesnoconv("ECM"); + +llxHeader('', $langs->trans("ECMSetup")); + +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans("ECMSetup"), $linkback, 'title_setup'); +print "
\n"; + +$head = ecm_admin_prepare_head(); + +dol_fiche_head($head, 'attributes_ecm_files', $langs->trans("ECM"), -1, 'ecm'); + +require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php'; + +dol_fiche_end(); + + +// Buttons +if ($action != 'create' && $action != 'edit') { + print '
'; + print "".$langs->trans("NewAttribute").""; + print "
"; +} + + +/* ************************************************************************** */ +/* */ +/* Creation of an optional field */ +/* */ +/* ************************************************************************** */ + +if ($action == 'create') { + print '
'; + print load_fiche_titre($langs->trans('NewAttribute')); + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; +} + +/* ************************************************************************** */ +/* */ +/* Edition of an optional field */ +/* */ +/* ************************************************************************** */ +if ($action == 'edit' && !empty($attrname)) { + print "
"; + print load_fiche_titre($langs->trans("FieldEdition", $attrname)); + require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 80161eaadc6..eb9ffb52831 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -45,7 +45,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'emailcollectorcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $operationid = GETPOST('operationid', 'int'); @@ -62,7 +62,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); @@ -126,9 +126,7 @@ if (GETPOST('addfilter', 'alpha')) if ($result > 0) { $object->fetchFilters(); - } - else - { + } else { setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors'); } } @@ -141,9 +139,7 @@ if ($action == 'deletefilter') if ($result > 0) { $object->fetchFilters(); - } - else - { + } else { setEventMessages($emailcollectorfilter->errors, $emailcollectorfilter->error, 'errors'); } } @@ -152,7 +148,7 @@ if (GETPOST('addoperation', 'alpha')) { $emailcollectoroperation = new EmailCollectorAction($db); $emailcollectoroperation->type = GETPOST('operationtype', 'aZ09'); - $emailcollectoroperation->actionparam = GETPOST('operationparam', 'none'); + $emailcollectoroperation->actionparam = GETPOST('operationparam', 'restricthtml'); $emailcollectoroperation->fk_emailcollector = $object->id; $emailcollectoroperation->status = 1; $emailcollectoroperation->position = 50; @@ -162,30 +158,26 @@ if (GETPOST('addoperation', 'alpha')) if ($result > 0) { $object->fetchActions(); - } - else - { + } else { setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors'); } } if ($action == 'updateoperation') { - $emailcollectoroperation = new EmailCollectorAction($db); - $emailcollectoroperation->fetch(GETPOST('rowidoperation2', 'int')); + $emailcollectoroperation = new EmailCollectorAction($db); + $emailcollectoroperation->fetch(GETPOST('rowidoperation2', 'int')); - $emailcollectoroperation->actionparam = GETPOST('operationparam2', 'none'); + $emailcollectoroperation->actionparam = GETPOST('operationparam2', 'restricthtml'); - $result = $emailcollectoroperation->update($user); + $result = $emailcollectoroperation->update($user); - if ($result > 0) - { - $object->fetchActions(); - } - else - { - setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors'); - } + if ($result > 0) + { + $object->fetchActions(); + } else { + setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors'); + } } if ($action == 'deleteoperation') { @@ -195,9 +187,7 @@ if ($action == 'deleteoperation') if ($result > 0) { $object->fetchActions(); - } - else - { + } else { setEventMessages($emailcollectoroperation->errors, $emailcollectoroperation->error, 'errors'); } } @@ -209,13 +199,11 @@ if ($action == 'confirm_collect') $res = $object->doCollectOneCollector(); if ($res > 0) { - $debuginfo = $object->debuginfo; - setEventMessages($object->lastresult, null, 'mesgs'); - } - else - { - $debuginfo = $object->debuginfo; - setEventMessages($object->error, null, 'errors'); + $debuginfo = $object->debuginfo; + setEventMessages($object->lastresult, null, 'mesgs'); + } else { + $debuginfo = $object->debuginfo; + setEventMessages($object->error, null, 'errors'); } $action = ''; @@ -325,7 +313,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $object->fetchActions(); $head = emailcollectorPrepareHead($object); - dol_fiche_head($head, 'card', $langs->trans("EmailCollector"), -1, 'emailcollector'); + dol_fiche_head($head, 'card', $langs->trans("EmailCollector"), -1, 'email'); $formconfirm = ''; @@ -432,25 +420,20 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } $connection = imap_open($connectstringsource, $object->login, $object->password); - } - catch (Exception $e) + } catch (Exception $e) { print $e->getMessage(); } $morehtml .= $form->textwithpicto('', 'connect string '.$connectstringserver); - } - else - { + } else { $morehtml .= 'IMAP functions not available on your PHP'; } if (!$connection) { $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; - } - else - { + } else { $morehtml .= imap_num_msg($connection); } @@ -483,6 +466,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; // Filters + print '
'; print '
'.$langs->trans("Description").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('ECM_AUTO_TREE_ENABLED'); -} -else -{ +} else { if (empty($conf->global->ECM_AUTO_TREE_ENABLED)) { - print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - elseif (!empty($conf->global->USER_MAIL_REQUIRED)) + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } elseif (!empty($conf->global->USER_MAIL_REQUIRED)) { - print ''.img_picto($langs->trans("Enabled"), 'on').''; + print ''.img_picto($langs->trans("Enabled"), 'on').''; } } print '
'; print ''; print ''; @@ -491,29 +475,34 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; + print '
'.$langs->trans("Filters").'
'; $arrayoftypes = array( - 'from'=>array('label'=>'MailFrom', 'data-placeholder'=>$langs->trans('SearchString')), - 'to'=>array('label'=>'MailTo', 'data-placeholder'=>$langs->trans('SearchString')), - 'cc'=>array('label'=>'Cc', 'data-placeholder'=>$langs->trans('SearchString')), - 'bcc'=>array('label'=>'Bcc', 'data-placeholder'=>$langs->trans('SearchString')), - 'subject'=>array('label'=>'Subject', 'data-placeholder'=>$langs->trans('SearchString')), - 'body'=>array('label'=>'Body', 'data-placeholder'=>$langs->trans('SearchString')), - // disabled because PHP imap_search is not compatible IMAPv4, only IMAPv2 - //'header'=>array('label'=>'Header', 'data-placeholder'=>'HeaderKey SearchString'), // HEADER key value - //'X1'=>'---', - //'notinsubject'=>array('label'=>'SubjectNotIn', 'data-placeholder'=>'SearchString'), - //'notinbody'=>array('label'=>'BodyNotIn', 'data-placeholder'=>'SearchString'), - 'X2'=>'---', - 'seen'=>array('label'=>'AlreadyRead', 'data-noparam'=>1), - 'unseen'=>array('label'=>'NotRead', 'data-noparam'=>1), - 'unanswered'=>array('label'=>'Unanswered', 'data-noparam'=>1), - 'answered'=>array('label'=>'Answered', 'data-noparam'=>1), - 'smaller'=>array('label'=>'SmallerThan', 'data-placeholder'=>$langs->trans('NumberOfBytes')), - 'larger'=>array('label'=>'LargerThan', 'data-placeholder'=>$langs->trans('NumberOfBytes')), - 'X3'=>'---', - 'withtrackingid'=>array('label'=>'WithDolTrackingID', 'data-noparam'=>1), - 'withouttrackingid'=>array('label'=>'WithoutDolTrackingID', 'data-noparam'=>1) + 'from'=>array('label'=>'MailFrom', 'data-placeholder'=>$langs->trans('SearchString')), + 'to'=>array('label'=>'MailTo', 'data-placeholder'=>$langs->trans('SearchString')), + 'cc'=>array('label'=>'Cc', 'data-placeholder'=>$langs->trans('SearchString')), + 'bcc'=>array('label'=>'Bcc', 'data-placeholder'=>$langs->trans('SearchString')), + 'subject'=>array('label'=>'Subject', 'data-placeholder'=>$langs->trans('SearchString')), + 'body'=>array('label'=>'Body', 'data-placeholder'=>$langs->trans('SearchString')), + // disabled because PHP imap_search is not compatible IMAPv4, only IMAPv2 + //'header'=>array('label'=>'Header', 'data-placeholder'=>'HeaderKey SearchString'), // HEADER key value + //'X1'=>'---', + //'notinsubject'=>array('label'=>'SubjectNotIn', 'data-placeholder'=>'SearchString'), + //'notinbody'=>array('label'=>'BodyNotIn', 'data-placeholder'=>'SearchString'), + 'X2'=>'---', + 'seen'=>array('label'=>'AlreadyRead', 'data-noparam'=>1), + 'unseen'=>array('label'=>'NotRead', 'data-noparam'=>1), + 'unanswered'=>array('label'=>'Unanswered', 'data-noparam'=>1), + 'answered'=>array('label'=>'Answered', 'data-noparam'=>1), + 'smaller'=>array('label'=>'SmallerThan', 'data-placeholder'=>$langs->trans('NumberOfBytes')), + 'larger'=>array('label'=>'LargerThan', 'data-placeholder'=>$langs->trans('NumberOfBytes')), + 'X3'=>'---', + 'withtrackingid'=>array('label'=>'WithDolTrackingID', 'data-noparam'=>1), + 'withouttrackingid'=>array('label'=>'WithoutDolTrackingID', 'data-noparam'=>1), + 'withtrackingidinmsgid'=>array('label'=>'WithDolTrackingIDInMsgId', 'data-noparam'=>1), + 'withouttrackingidinmsgid'=>array('label'=>'WithoutDolTrackingIDInMsgId', 'data-noparam'=>1), + 'X4'=>'---', + 'isnotanswer'=>array('label'=>'IsNotAnAnswer', 'data-noparam'=>1), + 'isanswer'=>array('label'=>'IsAnAnswer', 'data-noparam'=>1) ); - print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', '', 0, '', 2); + print $form->selectarray('filtertype', $arrayoftypes, '', 1, 0, 0, '', 1, 0, 0, '', 'maxwidth500', 0, '', 2); print "\n"; print ''."\n"; @@ -271,14 +280,12 @@ if ($action == 'edit') print ''; print '
'; - //Add user to select destinaries list - print ''.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''; - print $form->selectyesno('MAIN_MAIL_ENABLED_USER_DEST_SELECT', $conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT, 1); - print ''; + print '
'; - // Separator - print ' '; + print ''; + print ''; // Method print ''; // STARTTLS @@ -422,10 +413,19 @@ if ($action == 'edit') if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS', (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS) ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS : 0), 1); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print ''; + + // SMTP_ALLOW_SELF_SIGNED + print ''; // DKIM @@ -435,10 +435,8 @@ if ($action == 'edit') if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_DKIM_ENABLED', (!empty($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED) ? $conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED : 0), 1); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; // DKIM Domain @@ -456,8 +454,12 @@ if ($action == 'edit') print ''; - // Separator - print ''; + print '
'.$langs->trans("MAIN_MAIL_SENDMODE").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; @@ -287,9 +294,7 @@ if ($action == 'edit') if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { print $form->selectarray('MAIN_MAIL_SENDMODE', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE); - } - else - { + } else { $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; if (empty($text)) $text = $langs->trans("Undefined"); $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -305,9 +310,7 @@ if ($action == 'edit') print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { $mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER) ? $conf->global->MAIN_MAIL_SMTP_SERVER : ''); $smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined"); if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); @@ -319,9 +322,7 @@ if ($action == 'edit') print ''; print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { $text = !empty($mainserver) ? $mainserver : $smtpserver; $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); @@ -337,9 +338,7 @@ if ($action == 'edit') print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { $mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : ''); $smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined"); if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); @@ -351,9 +350,7 @@ if ($action == 'edit') print ''; print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { $text = (!empty($mainport) ? $mainport : $smtpport); $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); @@ -371,9 +368,7 @@ if ($action == 'edit') if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { print ''; - } - else - { + } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID, $htmltext, 1, 'superadmin'); print ''; @@ -392,9 +387,7 @@ if ($action == 'edit') if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { print ''; - } - else - { + } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW, $htmltext, 1, 'superadmin'); print ''; @@ -409,10 +402,8 @@ if ($action == 'edit') if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_TLS', (!empty($conf->global->MAIN_MAIL_EMAIL_TLS) ? $conf->global->MAIN_MAIL_EMAIL_TLS : 0), 1); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print '
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer')))) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED', (!empty($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED) ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED : 0), 1); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print '
'; print '
 
'; + + print '
'; + + print ''; + print ''; // From print ''; @@ -473,9 +475,6 @@ if ($action == 'edit') print $form->selectarray('MAIN_MAIL_DEFAULT_FROMTYPE', $liste, $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE, 0); print ''; - // Separator - print ''; - // From print ''; print ''; + // Add user to select destinaries list + print ''; + print '
'.$langs->trans("OtherOptions").'
'.$langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ?ini_get('sendmail_from') : $langs->transnoentities("Undefined")).'
 
'.$langs->trans("MAIN_MAIL_ERRORS_TO").'
'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''; + print $form->selectyesno('MAIN_MAIL_ENABLED_USER_DEST_SELECT', $conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT, 1); + print '
'; dol_fiche_end(); @@ -497,9 +501,7 @@ if ($action == 'edit') print ''; print ''; -} -else -{ +} else { dol_fiche_head($head, 'common', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; @@ -522,26 +524,30 @@ else } print ''; - //Add user to select destinaries list - print ''.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).''; + print ''; - // Separator - print ' '; + print '
'; + + print ''; + print ''; // Method print ''; // Host server if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { print ''; - } - else - { + } else { print ''; } @@ -549,9 +555,7 @@ else if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE) && $conf->global->MAIN_MAIL_SENDMODE == 'mail')) { print ''; - } - else - { + } else { print ''; } @@ -574,10 +578,8 @@ else if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_TLS); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; print ''; // STARTTLS @@ -587,10 +589,19 @@ else if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; + print ''; + + // SMTP_ALLOW_SELF_SIGNED + print ''; @@ -603,10 +614,8 @@ else if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_DKIM_ENABLED); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; // Domain @@ -625,8 +634,16 @@ else print ''; } - // Separator - print ''; + print '
'.$langs->trans("MAIN_MAIL_SENDMODE").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE]; if (empty($text)) $text = $langs->trans("Undefined").img_warning(); print $text; + + if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + print $form->textwithpicto('', $langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC"), 1, 'warning'); + } + print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER) ? $conf->global->MAIN_MAIL_SMTP_SERVER : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : '').'
'.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE) && in_array($conf->global->MAIN_MAIL_SENDMODE, array('smtps', 'swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print ''.yn(0).' ('.$langs->trans("NotSupported").')'; print '
 
'; + + if ($conf->global->MAIN_MAIL_SENDMODE == 'mail' && empty($conf->global->MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP)) { + print info_admin($langs->trans("WarningPHPMail").'
'.$langs->trans("WarningPHPMailA").'
'.$langs->trans("WarningPHPMailB").'
'.$langs->trans("WarningPHPMailC"), 0, 0, 'warning'); + } + + print '
'; + + print ''; + print ''; // From print ''; @@ -654,24 +671,20 @@ else } $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); print ''; print ''; - // Separator - print ''; - // Errors To print ''; print ''; + //Add user to select destinaries list + print ''; + print '
'.$langs->trans("OtherOptions").'
'.$langs->trans("MAIN_MAIL_EMAIL_FROM", ini_get('sendmail_from') ?ini_get('sendmail_from') : $langs->transnoentities("Undefined")).'
'.$langs->trans('MAIN_MAIL_DEFAULT_FROMTYPE').''; if ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'robot') { print $langs->trans('RobotEmail'); - } - elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') + } elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'user') { print $langs->trans('UserEmail'); - } - elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') + } elseif ($conf->global->MAIN_MAIL_DEFAULT_FROMTYPE === 'company') { print $langs->trans('CompanyEmail').' '.dol_escape_htmltag('<'.$mysoc->email.'>'); - } - else { + } else { $id = preg_replace('/senderprofile_/', '', $conf->global->MAIN_MAIL_DEFAULT_FROMTYPE); if ($id > 0) { @@ -683,9 +696,6 @@ else } print '
 
'.$langs->trans("MAIN_MAIL_ERRORS_TO").''.$conf->global->MAIN_MAIL_ERRORS_TO; @@ -699,13 +709,14 @@ else { print $conf->global->MAIN_MAIL_AUTOCOPY_TO; if (!isValidEmail($conf->global->MAIN_MAIL_AUTOCOPY_TO)) print img_warning($langs->trans("ErrorBadEMail")); - } - else - { + } else { print ' '; } print '
'.$langs->trans("MAIN_MAIL_ENABLED_USER_DEST_SELECT").''.yn($conf->global->MAIN_MAIL_ENABLED_USER_DEST_SELECT).'
'; dol_fiche_end(); @@ -722,9 +733,7 @@ else { print ''.$langs->trans("DoTestServerAvailability").''; } - } - else - { + } else { print ''.$langs->trans("DoTestServerAvailability").''; } @@ -759,7 +768,7 @@ else $text = ''; if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') { - $text .= $langs->trans("WarningPHPMail"); // To encourage to use SMTPS + //$text .= $langs->trans("WarningPHPMail"); // To encourage to use SMTPS } if ($conf->global->MAIN_MAIL_SENDMODE == 'mail') @@ -802,8 +811,7 @@ else $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); $result = $mail->check_server_port($server, $port); if ($result) print '
'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
'; - else - { + else { $errormsg = $langs->trans("ServerNotAvailableOnIPOrPort", $server, $port); if ($mail->error) { diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 84a0d2a0893..b97437216d6 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if (!$user->admin) accessforbidden(); @@ -68,6 +68,7 @@ if ($action == 'update' && empty($_POST["cancel"])) dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_EMAILING", GETPOST("MAIN_MAIL_SMTPS_PW_EMAILING"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_TLS_EMAILING"), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_EMAILING", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_EMAILING"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING", GETPOST("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING"), 'chaine', 0, '', $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; @@ -120,7 +121,7 @@ $listofmethods['default'] = $langs->trans('DefaultOutgoingEmailSetup'); $listofmethods['mail'] = 'PHP mail function'; //$listofmethods['simplemail']='Simplemail class'; $listofmethods['smtps'] = 'SMTP/SMTPS socket library'; -$listofmethods['swiftmailer'] = 'Swift Mailer socket library'; +if (version_compare(phpversion(), '7.0', '>=')) $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; if ($action == 'edit') @@ -147,6 +148,8 @@ if ($action == 'edit') jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").prop("disabled", true); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").val(0); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").prop("disabled", true); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(0); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").prop("disabled", true); '; if ($linuxlike) { @@ -156,9 +159,7 @@ if ($action == 'edit') jQuery("#smtp_server_mess").show(); jQuery("#smtp_port_mess").show(); '; - } - else - { + } else { print ' jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").prop("disabled", true); jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").prop("disabled", true); @@ -175,6 +176,8 @@ if ($action == 'edit') jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").val('.$conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING.'); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val('.$conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING.'); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").show(); @@ -189,6 +192,8 @@ if ($action == 'edit') jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").val('.$conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING.'); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").removeAttr("disabled"); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val('.$conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING.'); + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_PORT_EMAILING").removeAttr("disabled"); jQuery("#MAIN_MAIL_SMTP_SERVER_EMAILING").show(); @@ -201,13 +206,17 @@ if ($action == 'edit') jQuery("#MAIN_MAIL_SENDMODE_EMAILING").change(function() { initfields(); }); - jQuery("#MAIN_MAIL_EMAIL_TLS").change(function() { - if (jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").val() == 1) + jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").change(function() { + if (jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").val() == 1) jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").val(0); + else + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(0); }); jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").change(function() { - if (jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").val() == 1) + if (jQuery("#MAIN_MAIL_EMAIL_STARTTLS_EMAILING").val() == 1) jQuery("#MAIN_MAIL_EMAIL_TLS_EMAILING").val(0); + else + jQuery("#MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING").val(0); }); })'; print ''."\n"; @@ -236,9 +245,7 @@ if ($action == 'edit') if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) { print $form->selectarray('MAIN_MAIL_SENDMODE_EMAILING', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_EMAILING); - } - else - { + } else { $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_EMAILING]; if (empty($text)) $text = $langs->trans("Undefined"); $htmltext = $langs->trans("ContactSuperAdminForChange"); @@ -255,9 +262,7 @@ if ($action == 'edit') print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); print ''; print $langs->trans("SeeLocalSendMailSetup"); - } - else - { + } else { $mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : ''); $smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined"); if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); @@ -269,9 +274,7 @@ if ($action == 'edit') print ''; print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { $text = !empty($mainserver) ? $mainserver : $smtpserver; $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); @@ -288,9 +291,7 @@ if ($action == 'edit') print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); print ''; print $langs->trans("SeeLocalSendMailSetup"); - } - else - { + } else { $mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : ''); $smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined"); if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); @@ -302,9 +303,7 @@ if ($action == 'edit') print ''; print ''; print ''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { $text = (!empty($mainport) ? $mainport : $smtpport); $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); @@ -322,9 +321,7 @@ if ($action == 'edit') if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { print ''; - } - else - { + } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING, $htmltext, 1, 'superadmin'); print ''; @@ -341,9 +338,7 @@ if ($action == 'edit') if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) { print ''; - } - else - { + } else { $htmltext = $langs->trans("ContactSuperAdminForChange"); print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING, $htmltext, 1, 'superadmin'); print ''; @@ -359,10 +354,8 @@ if ($action == 'edit') if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_EMAILING', (!empty($conf->global->MAIN_MAIL_EMAIL_TLS_EMAILING) ? $conf->global->MAIN_MAIL_EMAIL_TLS_EMAILING : 0), 1); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; // STARTTLS @@ -373,10 +366,20 @@ if ($action == 'edit') if (function_exists('openssl_open')) { print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_EMAILING', (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING) ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING : 0), 1); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print ''; + + // SMTP_ALLOW_SELF_SIGNED_EMAILING + + print ''.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING', (!empty($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING) ? $conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING : 0), 1); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; print ''; @@ -390,9 +393,7 @@ if ($action == 'edit') print ''; print ''; -} -else -{ +} else { dol_fiche_head($head, 'common_emailing', '', -1); print ''.$langs->trans("EMailsDesc")."
\n"; @@ -414,9 +415,7 @@ else if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')) { print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { print ''.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_SERVER_EMAILING : '').''; } @@ -424,9 +423,7 @@ else if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && $conf->global->MAIN_MAIL_SENDMODE_EMAILING == 'mail')) { print ''.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").''; - } - else - { + } else { print ''.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '').''; } @@ -449,10 +446,8 @@ else if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_TLS_EMAILING); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; // STARTTLS @@ -462,10 +457,19 @@ else if (function_exists('openssl_open')) { print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS_EMAILING); - } - else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; - } - else print yn(0).' ('.$langs->trans("NotSupported").')'; + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print ''; + + // SMTP_ALLOW_SELF_SIGNED_EMAILING + print ''.$langs->trans("MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED_EMAILING); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; print ''; } @@ -506,9 +510,7 @@ else { print ''.$langs->trans("DoTestServerAvailability").''; } - } - else - { + } else { print ''.$langs->trans("DoTestServerAvailability").''; } @@ -539,8 +541,7 @@ else $result = $mail->check_server_port($server, $port); if ($result) print '
'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
'; - else - { + else { $errormsg = $langs->trans("ServerNotAvailableOnIPOrPort", $server, $port); if ($mail->error) { diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 1c50ebf0949..16ae12ffcc5 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -43,11 +43,12 @@ $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $id = GETPOST('id', 'int'); +$rowid = GETPOST('rowid', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -79,7 +80,7 @@ if ($user->socid > 0) // Protection if external user //$result = restrictedArea($user, 'mymodule', $id, ''); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -122,6 +123,10 @@ $permissiontoread = $user->admin; $permissiontoadd = $user->admin; $permissiontodelete = $user->admin; +if ($id > 0) { + $object->fetch($id); +} + /* * Actions @@ -171,8 +176,7 @@ if (empty($reshook)) $resql = $db->query($sql); if ($resql) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - } - else { + } else { setEventMessages($langs->trans("Error").' '.$db->lasterror(), null, 'errors'); } } @@ -192,7 +196,6 @@ $now = dol_now(); $help_url = ''; $title = $langs->trans("EMailsSetup"); - llxHeader('', $title); $linkback = ''; @@ -231,7 +234,7 @@ foreach ($search as $key => $val) { if ($key == 'status' && $search[$key] == -1) continue; $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); - if (strpos($object->fields[$key]['type'], 'integer:') === 0) { + if (strpos($object->fields[$key]['type'], 'integer:') === 0 || $key == 'active') { if ($search[$key] == '-1') $search[$key] = ''; $mode_search = 2; } @@ -281,9 +284,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; -} -else -{ +} else { if ($limit) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -350,15 +351,41 @@ print '
'; print ''; print ''; -print ''; +print ''; print ''; print ''; print ''; +print ''; print ''; $newcardbutton = ''; if ($action != 'create') { $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', $_SERVER['PHP_SELF'].'?action=create', '', $permissiontoadd); + + if ($action == 'edit') { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("Label").'
'.$langs->trans("Email").'
'.$langs->trans("Signature").''; + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor('signature', (GETPOSTISSET('signature') ? GETPOST('signature', 'restricthtml') : $object->signature), '', 138, 'dolibarr_notes', 'In', true, true, empty($conf->global->FCKEDITOR_ENABLE_USERSIGN) ? 0 : 1, ROWS_4, '90%'); + print $doleditor->Create(1); + print '
'.$langs->trans("User").''; + print $form->select_dolusers((GETPOSTISSET('private') ? GETPOST('private', 'int') : $object->private), 'private', 1, null, 0, ($user->admin ? '' : $user->id)); + print '
'.$langs->trans("Position").'
'.$langs->trans("Status").''; + print $form->selectarray('active', $object->fields['active']['arrayofkeyval'], (GETPOSTISSET('active') ? GETPOST('active', 'int') : $object->active), 0, 0, 0, '', 1); + print '
'; + print '
'; + print '
'; + print ''; + print '   '; + print ''; + print '
'; + } } else { /*print ''; if ($optioncss != '') print ''; @@ -370,7 +397,7 @@ if ($action != 'create') { print ''; */ print ''; - print ''; + print ''; print ''; print ''; } } @@ -535,7 +561,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) if (!empty($arrayfields['t.'.$key]['checked'])) { print ''; - if ($key == 'status') print $object->getLibStatut(5); + if ($key == 'status' || $key == 'active') print $object->getLibStatut(5); else print $object->showOutputField($val, $key, $object->$key, ''); print ''; if (!$i) $totalarray['nbfield']++; @@ -554,14 +580,14 @@ while ($i < ($limit ? min($num, $limit) : $num)) print $hookmanager->resPrint; // Action column print ''; // Keep   to have a line with enough height + print '
'.$langs->trans("Label").'
'.$langs->trans("Label").'
'.$langs->trans("Email").'
'.$langs->trans("Signature").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; @@ -450,8 +477,7 @@ foreach ($object->fields as $key => $val) if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } - elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; print ''; - $url = $_SERVER["PHP_SELF"].'?action=list&id='.$obj->rowid; + $url = $_SERVER["PHP_SELF"].'?id='.$obj->rowid; if ($limit) $url .= '&limit='.urlencode($limit); if ($page) $url .= '&page='.urlencode($page); if ($sortfield) $url .= '&sortfield='.urlencode($sortfield); if ($sortorder) $url .= '&page='.urlencode($sortorder); - //print ''.img_edit().''; + print ''.img_edit().''; //print '   '; - print ''.img_delete().'   '; + print ''.img_delete().'   '; if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected = 0; diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index a26e0801238..1158ee56655 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -45,7 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; // Load translation files required by the page $langs->loadLangs(array("errors", "admin", "mails", "languages")); -$action = GETPOST('action', 'alpha') ?GETPOST('action', 'alpha') : 'view'; +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $id = GETPOST('id', 'int'); @@ -113,31 +113,29 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { - $tmp = FormMail::getAvailableSubstitKey('formemail'); - $tmp['__(AnyTranslationKey)__'] = 'Translation'; - $helpsubstit = $langs->trans("AvailableVariables").':
'; - $helpsubstitforlines = $langs->trans("AvailableVariables").':
'; - foreach ($tmp as $key => $val) - { - $helpsubstit .= $key.' -> '.$val.'
'; - $helpsubstitforlines .= $key.' -> '.$val.'
'; - } -} -else -{ - $tmp = FormMail::getAvailableSubstitKey('formemailwithlines'); - $tmp['__(AnyTranslationKey)__'] = 'Translation'; - $helpsubstit = $langs->trans("AvailableVariables").':
'; - $helpsubstitforlines = $langs->trans("AvailableVariables").':
'; - foreach ($tmp as $key => $val) - { - $helpsubstit .= $key.' -> '.$val.'
'; - } - $tmp = FormMail::getAvailableSubstitKey('formemailforlines'); - foreach ($tmp as $key => $val) - { - $helpsubstitforlines .= $key.' -> '.$val.'
'; - } + $tmp = FormMail::getAvailableSubstitKey('formemail'); + $tmp['__(AnyTranslationKey)__'] = 'Translation'; + $helpsubstit = $langs->trans("AvailableVariables").':
'; + $helpsubstitforlines = $langs->trans("AvailableVariables").':
'; + foreach ($tmp as $key => $val) + { + $helpsubstit .= $key.' -> '.$val.'
'; + $helpsubstitforlines .= $key.' -> '.$val.'
'; + } +} else { + $tmp = FormMail::getAvailableSubstitKey('formemailwithlines'); + $tmp['__(AnyTranslationKey)__'] = 'Translation'; + $helpsubstit = $langs->trans("AvailableVariables").':
'; + $helpsubstitforlines = $langs->trans("AvailableVariables").':
'; + foreach ($tmp as $key => $val) + { + $helpsubstit .= $key.' -> '.$val.'
'; + } + $tmp = FormMail::getAvailableSubstitKey('formemailforlines'); + foreach ($tmp as $key => $val) + { + $helpsubstitforlines .= $key.' -> '.$val.'
'; + } } @@ -169,6 +167,8 @@ if ($conf->adherent->enabled && $user->rights->adherent->lire) $element if ($conf->contrat->enabled && $user->rights->contrat->lire) $elementList['contract'] = $langs->trans('MailToSendContract'); if ($conf->projet->enabled) $elementList['project'] = $langs->trans('MailToProject'); if ($conf->ticket->enabled && $user->rights->ticket->read) $elementList['ticket_send'] = $langs->trans('MailToTicket'); +if ($conf->recruitment->enabled && $user->rights->recruitment->recruitmentjobposition->read) $elementList['recruitmentcandidature_send'] = $langs->trans('RecruitmentCandidatures'); +if ($conf->agenda->enabled) $elementList['actioncomm_send'] = $langs->trans('MailToSendEventPush'); $elementList['user'] = $langs->trans('MailToUser'); $parameters = array('elementList'=>$elementList); @@ -201,217 +201,206 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - // Purge search criteria - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers - { - $search_label = ''; - $search_type_template = ''; - $search_lang = ''; - $search_fk_user = ''; - $search_topic = ''; - $toselect = ''; - $search_array_options = array(); - } + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers + { + $search_label = ''; + $search_type_template = ''; + $search_lang = ''; + $search_fk_user = ''; + $search_topic = ''; + $toselect = ''; + $search_array_options = array(); + } - // Actions add or modify an entry into a dictionary - if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) - { - $listfield = explode(',', str_replace(' ', '', $tabfield[$id])); - $listfieldinsert = explode(',', $tabfieldinsert[$id]); - $listfieldmodify = explode(',', $tabfieldinsert[$id]); - $listfieldvalue = explode(',', $tabfieldvalue[$id]); + // Actions add or modify an entry into a dictionary + if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) + { + $listfield = explode(',', str_replace(' ', '', $tabfield[$id])); + $listfieldinsert = explode(',', $tabfieldinsert[$id]); + $listfieldmodify = explode(',', $tabfieldinsert[$id]); + $listfieldvalue = explode(',', $tabfieldvalue[$id]); - // Check that all fields are filled - $ok = 1; - foreach ($listfield as $f => $value) - { - // Not mandatory fields - if ($value == 'joinfiles') continue; - if ($value == 'content') continue; - if ($value == 'content_lines') continue; + // Check that all fields are filled + $ok = 1; + foreach ($listfield as $f => $value) + { + // Not mandatory fields + if ($value == 'joinfiles') continue; + if ($value == 'content') continue; + if ($value == 'content_lines') continue; - if (GETPOST('actionmodify', 'alpha') && $value == 'topic') $_POST['topic'] = $_POST['topic-'.$rowid]; + if (GETPOST('actionmodify', 'alpha') && $value == 'topic') $_POST['topic'] = $_POST['topic-'.$rowid]; - if ((!isset($_POST[$value]) || $_POST[$value] == '' || $_POST[$value] == '-1') && $value != 'lang' && $value != 'fk_user' && $value != 'position') - { - $ok = 0; - $fieldnamekey = $listfield[$f]; - // We take translate key of field - if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey = 'Code'; - if ($fieldnamekey == 'code') $fieldnamekey = 'Code'; - if ($fieldnamekey == 'note') $fieldnamekey = 'Note'; - if ($fieldnamekey == 'type_template') $fieldnamekey = 'TypeOfTemplate'; - if ($fieldnamekey == 'fk_user') $fieldnamekey = 'Owner'; - if ($fieldnamekey == 'private') $fieldnamekey = 'Private'; - if ($fieldnamekey == 'position') $fieldnamekey = 'Position'; - if ($fieldnamekey == 'topic') $fieldnamekey = 'Topic'; + if ((!isset($_POST[$value]) || $_POST[$value] == '' || $_POST[$value] == '-1') && $value != 'lang' && $value != 'fk_user' && $value != 'position') + { + $ok = 0; + $fieldnamekey = $listfield[$f]; + // We take translate key of field + if ($fieldnamekey == 'libelle' || ($fieldnamekey == 'label')) $fieldnamekey = 'Code'; + if ($fieldnamekey == 'code') $fieldnamekey = 'Code'; + if ($fieldnamekey == 'note') $fieldnamekey = 'Note'; + if ($fieldnamekey == 'type_template') $fieldnamekey = 'TypeOfTemplate'; + if ($fieldnamekey == 'fk_user') $fieldnamekey = 'Owner'; + if ($fieldnamekey == 'private') $fieldnamekey = 'Private'; + if ($fieldnamekey == 'position') $fieldnamekey = 'Position'; + if ($fieldnamekey == 'topic') $fieldnamekey = 'Topic'; - setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); - } - } + setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); + } + } - // Si verif ok et action add, on ajoute la ligne - if ($ok && GETPOST('actionadd')) - { - // Add new entry - $sql = "INSERT INTO ".$tabname[$id]." ("; - // List of fields - $sql .= $tabfieldinsert[$id]; - $sql .= ",active)"; - $sql .= " VALUES("; + // Si verif ok et action add, on ajoute la ligne + if ($ok && GETPOST('actionadd')) + { + // Add new entry + $sql = "INSERT INTO ".$tabname[$id]." ("; + // List of fields + $sql .= $tabfieldinsert[$id]; + $sql .= ",active)"; + $sql .= " VALUES("; - // List of values - $i = 0; - foreach ($listfieldinsert as $f => $value) - { - $keycode = $listfieldvalue[$i]; - if ($value == 'lang') $keycode = 'langcode'; - if (empty($keycode)) $keycode = $value; + // List of values + $i = 0; + foreach ($listfieldinsert as $f => $value) + { + $keycode = $listfieldvalue[$i]; + if ($value == 'lang') $keycode = 'langcode'; + if (empty($keycode)) $keycode = $value; - if ($value == 'entity') $_POST[$keycode] = $conf->entity; - if ($value == 'fk_user' && !($_POST[$keycode] > 0)) $_POST[$keycode] = ''; - if ($value == 'private' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '0'; - if ($value == 'position' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '1'; - //var_dump($keycode.' '.$value); + if ($value == 'entity') $_POST[$keycode] = $conf->entity; + if ($value == 'fk_user' && !($_POST[$keycode] > 0)) $_POST[$keycode] = ''; + if ($value == 'private' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '0'; + if ($value == 'position' && !is_numeric($_POST[$keycode])) $_POST[$keycode] = '1'; + //var_dump($keycode.' '.$value); - if ($i) $sql .= ", "; - if (GETPOST($keycode) == '' && $keycode != 'langcode') $sql .= "null"; // langcode must be '' if not defined so the unique key that include lang will work - elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work - elseif ($keycode == 'content') { - $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; - } - elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) { - $sql .= (int) GETPOST($keycode, 'int'); - } - else { - $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; - } + if ($i) $sql .= ", "; + if (GETPOST($keycode) == '' && $keycode != 'langcode') $sql .= "null"; // langcode must be '' if not defined so the unique key that include lang will work + elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work + elseif ($keycode == 'content') { + $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; + } elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) { + $sql .= (int) GETPOST($keycode, 'int'); + } else { + $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; + } + $i++; + } + $sql .= ", 1)"; - $i++; - } - $sql .= ", 1)"; + dol_syslog("actionadd", LOG_DEBUG); + $result = $db->query($sql); + if ($result) // Add is ok + { + setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); + $_POST = array('id'=>$id); // Clean $_POST array, we keep only id + } else { + if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); + } else { + dol_print_error($db); + } + } + } - dol_syslog("actionadd", LOG_DEBUG); - $result = $db->query($sql); - if ($result) // Add is ok - { - setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); - $_POST = array('id'=>$id); // Clean $_POST array, we keep only id - } - else - { - if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { - dol_print_error($db); - } - } - } + // Si verif ok et action modify, on modifie la ligne + if ($ok && GETPOST('actionmodify')) + { + $rowidcol = "rowid"; - // Si verif ok et action modify, on modifie la ligne - if ($ok && GETPOST('actionmodify')) - { - $rowidcol = "rowid"; + // Modify entry + $sql = "UPDATE ".$tabname[$id]." SET "; + // Modifie valeur des champs + $i = 0; + foreach ($listfieldmodify as $field) + { + $keycode = $listfieldvalue[$i]; + if ($field == 'lang') $keycode = 'langcode'; + if (empty($keycode)) $keycode = $field; - // Modify entry - $sql = "UPDATE ".$tabname[$id]." SET "; - // Modifie valeur des champs - $i = 0; - foreach ($listfieldmodify as $field) - { - $keycode = $listfieldvalue[$i]; - if ($field == 'lang') $keycode = 'langcode'; - if (empty($keycode)) $keycode = $field; + if ($field == 'fk_user' && !($_POST['fk_user'] > 0)) $_POST['fk_user'] = ''; + if ($field == 'topic') $_POST['topic'] = $_POST['topic-'.$rowid]; + if ($field == 'joinfiles') $_POST['joinfiles'] = $_POST['joinfiles-'.$rowid]; + if ($field == 'content') $_POST['content'] = $_POST['content-'.$rowid]; + if ($field == 'content_lines') $_POST['content_lines'] = $_POST['content_lines-'.$rowid]; + if ($field == 'entity') $_POST[$keycode] = $conf->entity; - if ($field == 'fk_user' && !($_POST['fk_user'] > 0)) $_POST['fk_user'] = ''; - if ($field == 'topic') $_POST['topic'] = $_POST['topic-'.$rowid]; - if ($field == 'joinfiles') $_POST['joinfiles'] = $_POST['joinfiles-'.$rowid]; - if ($field == 'content') $_POST['content'] = $_POST['content-'.$rowid]; - if ($field == 'content_lines') $_POST['content_lines'] = $_POST['content_lines-'.$rowid]; - if ($field == 'entity') $_POST[$keycode] = $conf->entity; + if ($i) $sql .= ", "; + $sql .= $field."="; - if ($i) $sql .= ", "; - $sql .= $field."="; + if (GETPOST($keycode) == '' || ($keycode != 'langcode' && $keycode != 'position' && $keycode != 'private' && !GETPOST($keycode))) $sql .= "null"; // langcode,... must be '' if not defined so the unique key that include lang will work + elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work + elseif ($keycode == 'content') { + $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; + } elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) { + $sql .= (int) GETPOST($keycode, 'int'); + } else { + $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; + } - if (GETPOST($keycode) == '' || ($keycode != 'langcode' && $keycode != 'position' && $keycode != 'private' && !GETPOST($keycode))) $sql .= "null"; // langcode,... must be '' if not defined so the unique key that include lang will work - elseif (GETPOST($keycode) == '0' && $keycode == 'langcode') $sql .= "''"; // langcode must be '' if not defined so the unique key that include lang will work - elseif ($keycode == 'content') { - $sql .= "'".$db->escape(GETPOST($keycode, 'restricthtml'))."'"; - } - elseif (in_array($keycode, array('joinfile', 'private', 'position', 'scale'))) { - $sql .= (int) GETPOST($keycode, 'int'); - } - else { - $sql .= "'".$db->escape(GETPOST($keycode, 'nohtml'))."'"; - } + $i++; + } - $i++; - } - $sql .= " WHERE ".$rowidcol." = '".$rowid."'"; - //print $sql;exit; - dol_syslog("actionmodify", LOG_DEBUG); - //print $sql; - $resql = $db->query($sql); - if ($resql) - { - setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); - } - else - { - setEventMessages($db->error(), null, 'errors'); - } - } - } + $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); + //print $sql;exit; + dol_syslog("actionmodify", LOG_DEBUG); + //print $sql; + $resql = $db->query($sql); + if ($resql) + { + setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); + } else { + setEventMessages($db->error(), null, 'errors'); + } + } + } - if ($action == 'confirm_delete' && $confirm == 'yes') // delete - { - $rowidcol = "rowid"; + if ($action == 'confirm_delete' && $confirm == 'yes') // delete + { + $rowidcol = "rowid"; - $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."='".$rowid."'"; + $sql = "DELETE from ".$tabname[$id]." WHERE ".$rowidcol."=".((int) $rowid); - dol_syslog("delete", LOG_DEBUG); - $result = $db->query($sql); - if (!$result) - { - if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') - { - setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { - dol_print_error($db); - } - } - } + dol_syslog("delete", LOG_DEBUG); + $result = $db->query($sql); + if (!$result) + { + if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') + { + setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); + } else { + dol_print_error($db); + } + } + } - // activate - if ($action == $acts[0]) - { - $rowidcol = "rowid"; + // activate + if ($action == $acts[0]) + { + $rowidcol = "rowid"; - $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."='".$rowid."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 1 WHERE ".$rowidcol."=".((int) $rowid); - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } + } - // disable - if ($action == $acts[1]) - { - $rowidcol = "rowid"; + // disable + if ($action == $acts[1]) + { + $rowidcol = "rowid"; - $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."='".$rowid."'"; + $sql = "UPDATE ".$tabname[$id]." SET active = 0 WHERE ".$rowidcol."=".((int) $rowid); - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } + } } @@ -422,13 +411,15 @@ if (empty($reshook)) $form = new Form($db); $formadmin = new FormAdmin($db); -llxHeader(); +$help_url = ''; +$title = $langs->trans("EMailsSetup"); + +llxHeader('', $title); -$titre = $langs->trans("EMailsSetup"); $linkback = ''; $titlepicto = 'title_setup'; -print load_fiche_titre($titre, $linkback, $titlepicto); +print load_fiche_titre($title, $linkback, $titlepicto); $head = email_admin_prepare_head(); @@ -437,7 +428,7 @@ dol_fiche_head($head, 'templates', '', -1); // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$code.'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete', '', 0, 1); } //var_dump($elementList); @@ -452,7 +443,7 @@ if (!$user->admin) } if (empty($conf->global->MAIN_MULTILANGS)) { - $sql .= " AND (lang = '".$langs->defaultlang."' OR lang IS NULL OR lang = '')"; + $sql .= " AND (lang = '".$db->escape($langs->defaultlang)."' OR lang IS NULL OR lang = '')"; } if ($search_label) $sql .= natural_search('label', $search_label); if ($search_type_template != '' && $search_type_template != '-1') $sql .= natural_search('type_template', $search_type_template); @@ -467,154 +458,149 @@ $sql .= $db->plimit($listlimit + 1, $offset); $fieldlist = explode(',', $tabfield[$id]); -// Form to add a new line -print ''; -print ''; -print ''; +if ($action == 'view') { + // Form to add a new line + print ''; + print ''; + print ''; -print '
'; -print ''; + print '
'; + print '
'; -// Line to enter new values (title) -print ''; -foreach ($fieldlist as $field => $value) -{ - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees - $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut - $valuetoshow = $langs->trans($valuetoshow); // try to translate - $align = "left"; - if ($fieldlist[$field] == 'fk_user') { $valuetoshow = $langs->trans("Owner"); } - if ($fieldlist[$field] == 'lang') { $valuetoshow = (empty($conf->global->MAIN_MULTILANGS) ? ' ' : $langs->trans("Language")); } - if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } - if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { $valuetoshow = $langs->trans("Code"); } - if ($fieldlist[$field] == 'type_template') { $valuetoshow = $langs->trans("TypeOfTemplate"); } - if ($fieldlist[$field] == 'private') { $align = 'center'; } - if ($fieldlist[$field] == 'position') { $align = 'center'; } - - if ($fieldlist[$field] == 'topic') { $valuetoshow = ''; } - if ($fieldlist[$field] == 'joinfiles') { $valuetoshow = ''; } - if ($fieldlist[$field] == 'content') { $valuetoshow = ''; } - if ($fieldlist[$field] == 'content_lines') { $valuetoshow = ''; } - - if ($valuetoshow != '') + // Line to enter new values (title) + print ''; + foreach ($fieldlist as $field => $value) { - print ''; } - else print $valuetoshow; - print ''; } -} -print ''; -print ''; + print ''; + print ''; -$obj = new stdClass(); -// If data was already input, we define them in obj to populate input fields. -if (GETPOST('actionadd')) -{ - foreach ($fieldlist as $key => $val) { - if (GETPOST($val) != '') + $obj = new stdClass(); + // If data was already input, we define them in obj to populate input fields. + if (GETPOST('actionadd')) + { + foreach ($fieldlist as $key => $val) { + if (GETPOST($val) != '') $obj->$val = GETPOST($val); + } } -} -$tmpaction = 'create'; -$parameters = array( + $tmpaction = 'create'; + $parameters = array( 'fieldlist' => $fieldlist, 'tabname' => $tabname[$id] -); -$reshook = $hookmanager->executeHooks('createEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks -$error = $hookmanager->error; -$errors = $hookmanager->errors; + ); + $reshook = $hookmanager->executeHooks('createEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error = $hookmanager->error; + $errors = $hookmanager->errors; -// Line to enter new values (input fields) -print ''; + // Line to enter new values (input fields) + print ''; -if (empty($reshook)) -{ - if ($action == 'edit') { - fieldList($fieldlist, $obj, $tabname[$id], 'hide'); - } else { - fieldList($fieldlist, $obj, $tabname[$id], 'add'); - } -} - -print ''; -print ""; - -// Show fields for topic, join files and body -$fieldsforcontent = array('topic', 'joinfiles', 'content'); -if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('content', 'content_lines'); } -foreach ($fieldsforcontent as $tmpfieldlist) -{ - print ''; + print ""; + + // Show fields for topic, join files and body + $fieldsforcontent = array('topic', 'joinfiles', 'content'); + if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); } + foreach ($fieldsforcontent as $tmpfieldlist) { - print ''.$form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; - } - if ($tmpfieldlist == 'content') + print ''; - if ($tmpfieldlist == 'topic') { - print ''; + if ($tmpfieldlist == 'topic') { + print ''; + } + // else print ''; + print ''; } - // else print ''; - print ''; -} -$colspan = count($fieldlist) + 1; -//print ''; // Keep   to have a line with enough height - -print '
'; - if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; - elseif (!empty($tabhelp[$id][$value])) + // Determine le nom du champ par rapport aux noms possibles + // dans les dictionnaires de donnees + $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow = $langs->trans($valuetoshow); // try to translate + $align = "left"; + if ($fieldlist[$field] == 'fk_user') { $valuetoshow = $langs->trans("Owner"); } + if ($fieldlist[$field] == 'lang') { $valuetoshow = (empty($conf->global->MAIN_MULTILANGS) ? ' ' : $langs->trans("Language")); } + if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } + if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { $valuetoshow = $langs->trans("Code"); } + if ($fieldlist[$field] == 'type_template') { $valuetoshow = $langs->trans("TypeOfTemplate"); } + if ($fieldlist[$field] == 'private') { $align = 'center'; } + if ($fieldlist[$field] == 'position') { $align = 'center'; } + + if ($fieldlist[$field] == 'topic') { $valuetoshow = ''; } + if ($fieldlist[$field] == 'joinfiles') { $valuetoshow = ''; } + if ($fieldlist[$field] == 'content') { $valuetoshow = ''; } + if ($fieldlist[$field] == 'content_lines') { $valuetoshow = ''; } + + if ($valuetoshow != '') { - if (in_array($value, array('topic'))) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click - else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover + print ''; + if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; + elseif (!empty($tabhelp[$id][$value])) + { + if (in_array($value, array('topic'))) print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, $value); // Tooltip on click + else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2); // Tooltip on hover + } else print $valuetoshow; + print ''; -print ''; -print '
'; + print ''; + print '
'; -print '
'; - - // Label - if ($tmpfieldlist == 'topic') + if (empty($reshook)) { - print ''.$form->textwithpicto($langs->trans("Topic"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; + if ($action == 'edit') { + fieldList($fieldlist, $obj, $tabname[$id], 'hide'); + } else { + fieldList($fieldlist, $obj, $tabname[$id], 'add'); + } } - if ($tmpfieldlist == 'joinfiles') + + print ''; + print '
'; + + // Label + if ($tmpfieldlist == 'topic') + { + print ''.$form->textwithpicto($langs->trans("Topic"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; + } + if ($tmpfieldlist == 'joinfiles') + { + print ''.$form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; + } + if ($tmpfieldlist == 'content') print $form->textwithpicto($langs->trans("Content"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
'; - if ($tmpfieldlist == 'content_lines') + if ($tmpfieldlist == 'content_lines') print $form->textwithpicto($langs->trans("ContentForLines"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
'; - // Input field - if ($tmpfieldlist == 'topic') { - print ''; - } - elseif ($tmpfieldlist == 'joinfiles') { - print ''; - } - else - { - if ($context != 'hide') { - // print ''; - $okforextended = true; - if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) + // Input field + if ($tmpfieldlist == 'topic') { + print ''; + } elseif ($tmpfieldlist == 'joinfiles') { + print ''; + } else { + if ($context != 'hide') { + // print ''; + $okforextended = true; + if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended = false; - $doleditor = new DolEditor($tmpfieldlist, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 120, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_4, '90%'); - print $doleditor->Create(1); - } - else - print ' '; - } - print '
'; - if ($action != 'edit') { - print ''; + $doleditor = new DolEditor($tmpfieldlist, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 500, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_4, '90%'); + print $doleditor->Create(1); + } else print ' '; } print ''; + if ($action != 'edit') { + print ''; + } + print '
 
'; -print '
'; -print ''; -print '
'; + $colspan = count($fieldlist) + 1; + //print '
 
'; + print ''; + print ''; + print '
'; +} // END IF not edit print '
'; print ''; @@ -628,90 +614,90 @@ dol_syslog("htdocs/admin/dict", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { - $num = $db->num_rows($resql); - $i = 0; + $num = $db->num_rows($resql); + $i = 0; - $param = '&id='.$id; - if ($search_label) $param .= '&search_label='.urlencode($search_label); - if ($search_lang > 0) $param .= '&search_lang='.urlencode($search_lang); - if ($search_type_template != '-1') $param .= '&search_type_template='.urlencode($search_type_template); - if ($search_fk_user > 0) $param .= '&search_fk_user='.urlencode($search_fk_user); - if ($search_topic) $param .= '&search_topic='.urlencode($search_topic); + $param = '&id='.$id; + if ($search_label) $param .= '&search_label='.urlencode($search_label); + if ($search_lang > 0) $param .= '&search_lang='.urlencode($search_lang); + if ($search_type_template != '-1') $param .= '&search_type_template='.urlencode($search_type_template); + if ($search_fk_user > 0) $param .= '&search_fk_user='.urlencode($search_fk_user); + if ($search_topic) $param .= '&search_topic='.urlencode($search_topic); - $paramwithsearch = $param; - if ($sortorder) $paramwithsearch .= '&sortorder='.urlencode($sortorder); - if ($sortfield) $paramwithsearch .= '&sortfield='.urlencode($sortfield); - if (GETPOST('from', 'alpha')) $paramwithsearch .= '&from='.urlencode(GETPOST('from', 'alpha')); + $paramwithsearch = $param; + if ($sortorder) $paramwithsearch .= '&sortorder='.urlencode($sortorder); + if ($sortfield) $paramwithsearch .= '&sortfield='.urlencode($sortfield); + if (GETPOST('from', 'alpha')) $paramwithsearch .= '&from='.urlencode(GETPOST('from', 'alpha')); - // There is several pages - if ($num > $listlimit) - { - print ''; - print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), ''); - print ''; - } + // There is several pages + if ($num > $listlimit) + { + print ''; + print_fleche_navigation($page, $_SERVER["PHP_SELF"], $paramwithsearch, ($num > $listlimit), ''); + print ''; + } - // Title line with search boxes - print ''; + // Title line with search boxes + print ''; - $filterfound = 0; - foreach ($fieldlist as $field => $value) - { - if ($value == 'label') { - print ''; - } elseif ($value == 'lang') { - print ''; - print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth100'); - print ''; - } elseif ($value == 'fk_user') { - print ''; - $restrictid = array(); - if (!$user->admin) $restrictid = array($user->id); - //var_dump($restrictid); - print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, 'hierarchyme', null, 0, 0, 1, '', 0, '', 'maxwidth100'); - print ''; - } elseif ($value == 'topic') { - print ''; - } elseif ($value == 'type_template') { - print ''.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100 maxwidth100onsmartphone').''; - } elseif (!in_array($value, array('content', 'content_lines'))) { - print ''; - } - } + $filterfound = 0; + foreach ($fieldlist as $field => $value) + { + if ($value == 'label') { + print ''; + } elseif ($value == 'lang') { + print ''; + print $formadmin->select_language($search_lang, 'search_lang', 0, null, 1, 0, 0, 'maxwidth100'); + print ''; + } elseif ($value == 'fk_user') { + print ''; + $restrictid = array(); + if (!$user->admin) $restrictid = array($user->id); + //var_dump($restrictid); + print $form->select_dolusers($search_fk_user, 'search_fk_user', 1, null, 0, 'hierarchyme', null, 0, 0, 1, '', 0, '', 'maxwidth100'); + print ''; + } elseif ($value == 'topic') { + print ''; + } elseif ($value == 'type_template') { + print ''.$form->selectarray('search_type_template', $elementList, $search_type_template, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100 maxwidth100onsmartphone').''; + } elseif (!in_array($value, array('content', 'content_lines'))) { + print ''; + } + } - if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) print ''; + if (empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) print ''; - // Action column - print ''; - $searchpicto = $form->showFilterButtons(); - print $searchpicto; - print ''; - print ''; + // Action column + print ''; + $searchpicto = $form->showFilterButtons(); + print $searchpicto; + print ''; + print ''; - // Title of lines - print ''; - foreach ($fieldlist as $field => $value) - { - $showfield = 1; // By defaut - $align = "left"; - $sortable = 1; - $valuetoshow = ''; - $forcenowrap = 1; - /* + // Title of lines + print ''; + foreach ($fieldlist as $field => $value) + { + $showfield = 1; // By defaut + $align = "left"; + $sortable = 1; + $valuetoshow = ''; + $forcenowrap = 1; + /* $tmparray=getLabelOfField($fieldlist[$field]); $showfield=$tmp['showfield']; $valuetoshow=$tmp['valuetoshow']; $align=$tmp['align']; $sortable=$tmp['sortable']; */ - $valuetoshow = ucfirst($fieldlist[$field]); // By defaut - $valuetoshow = $langs->trans($valuetoshow); // try to translate - if ($fieldlist[$field] == 'fk_user') { $valuetoshow = $langs->trans("Owner"); } - if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } - if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { $valuetoshow = $langs->trans("Code"); } - if ($fieldlist[$field] == 'type_template') { $valuetoshow = $langs->trans("TypeOfTemplate"); } + $valuetoshow = ucfirst($fieldlist[$field]); // By defaut + $valuetoshow = $langs->trans($valuetoshow); // try to translate + if ($fieldlist[$field] == 'fk_user') { $valuetoshow = $langs->trans("Owner"); } + if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } + if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') { $valuetoshow = $langs->trans("Code"); } + if ($fieldlist[$field] == 'type_template') { $valuetoshow = $langs->trans("TypeOfTemplate"); } if ($fieldlist[$field] == 'private') { $align = 'center'; } if ($fieldlist[$field] == 'position') { $align = 'center'; } @@ -719,101 +705,99 @@ if ($resql) if ($fieldlist[$field] == 'content') { $valuetoshow = $langs->trans("Content"); $showfield = 0; } if ($fieldlist[$field] == 'content_lines') { $valuetoshow = $langs->trans("ContentLines"); $showfield = 0; } - // Show fields - if ($showfield) - { - if (!empty($tabhelp[$id][$value])) - { - if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltip'.$value, $forcenowrap); // Tooltip on click - else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, '', $forcenowrap); // Tooltip on hover - } - print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, "align=".$align, $sortfield, $sortorder); - } - } + // Show fields + if ($showfield) + { + if (!empty($tabhelp[$id][$value])) + { + if (in_array($value, array('topic'))) $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltip'.$value, $forcenowrap); // Tooltip on click + else $valuetoshow = $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, '', $forcenowrap); // Tooltip on hover + } + print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), $param, "align=".$align, $sortfield, $sortorder); + } + } - print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page ? 'page='.$page.'&' : ''), $param, 'align="center"', $sortfield, $sortorder); - print getTitleFieldOfList(''); - print ''; + print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page ? 'page='.$page.'&' : ''), $param, 'align="center"', $sortfield, $sortorder); + print getTitleFieldOfList(''); + print ''; - if ($num) - { - // Lines with values - while ($i < $num) - { - $obj = $db->fetch_object($resql); + if ($num) + { + // Lines with values + while ($i < $num) + { + $obj = $db->fetch_object($resql); - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) - { - print ''; + if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) + { + print ''; - $tmpaction = 'edit'; - $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); - $reshook = $hookmanager->executeHooks('editEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; $errors = $hookmanager->errors; + $tmpaction = 'edit'; + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook = $hookmanager->executeHooks('editEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error = $hookmanager->error; $errors = $hookmanager->errors; - // Show fields - if (empty($reshook)) fieldList($fieldlist, $obj, $tabname[$id], 'edit'); + // Show fields + if (empty($reshook)) fieldList($fieldlist, $obj, $tabname[$id], 'edit'); - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'; + print ''; + print ''; - $fieldsforcontent = array('topic', 'joinfiles', 'content'); - if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) - { - $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); - } - foreach ($fieldsforcontent as $tmpfieldlist) - { - $showfield = 1; - $align = "left"; - $valuetoshow = $obj->{$tmpfieldlist}; + $fieldsforcontent = array('topic', 'joinfiles', 'content'); + if (!empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) + { + $fieldsforcontent = array('topic', 'joinfiles', 'content', 'content_lines'); + } + foreach ($fieldsforcontent as $tmpfieldlist) + { + $showfield = 1; + $align = "left"; + $valuetoshow = $obj->{$tmpfieldlist}; - $class = 'tddict'; - // Show value for field - if ($showfield) { + $class = 'tddict'; + // Show value for field + if ($showfield) { // Show line for topic, joinfiles and content - print ''; - print ''; - if ($tmpfieldlist == 'topic') - { - print ''.$form->textwithpicto($langs->trans("Topic"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; - print ''; - } - if ($tmpfieldlist == 'joinfiles') - { - print ''.$form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; - print ''; - } - if ($tmpfieldlist == 'content') - { - print $form->textwithpicto($langs->trans("Content"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
'; - $okforextended = true; - if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended = false; - $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%'); - print $doleditor->Create(1); - } - print ''; - print ''; - print ''; - } - } + print ''; + print ''; + if ($tmpfieldlist == 'topic') + { + print ''.$form->textwithpicto($langs->trans("Topic"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; + print ''; + } + if ($tmpfieldlist == 'joinfiles') + { + print ''.$form->textwithpicto($langs->trans("FilesAttachedToEmail"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).' '; + print ''; + } + if ($tmpfieldlist == 'content') + { + print $form->textwithpicto($langs->trans("Content"), $tabhelp[$id][$tmpfieldlist], 1, 'help', '', 0, 2, $tmpfieldlist).'
'; + $okforextended = true; + if (empty($conf->global->FCKEDITOR_ENABLE_MAIL)) $okforextended = false; + $doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 500, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%'); + print $doleditor->Create(1); + } + print ''; + print ''; + print ''; + } + } - print "\n"; - } - else - { - $keyforobj = 'type_template'; - if (!in_array($obj->$keyforobj, array_keys($elementList))) - { - $i++; - continue; // It means this is a type of template not into elementList (may be because enabled condition of this type is false because module is not enabled) - } + print "\n"; + } else { + $keyforobj = 'type_template'; + if (!in_array($obj->$keyforobj, array_keys($elementList))) + { + $i++; + continue; // It means this is a type of template not into elementList (may be because enabled condition of this type is false because module is not enabled) + } // Test on 'enabled' if (!dol_eval($obj->enabled, 1)) { @@ -821,100 +805,100 @@ if ($resql) continue; // Email template not qualified } - print ''; + print ''; - $tmpaction = 'view'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); - $reshook = $hookmanager->executeHooks('viewEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $tmpaction = 'view'; + $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook = $hookmanager->executeHooks('viewEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; $errors = $hookmanager->errors; + $error = $hookmanager->error; $errors = $hookmanager->errors; - if (empty($reshook)) - { - foreach ($fieldlist as $field => $value) - { - if (in_array($fieldlist[$field], array('content', 'content_lines'))) continue; - $showfield = 1; - $align = "left"; - $valuetoshow = $obj->{$fieldlist[$field]}; - if ($value == 'label' || $value == 'topic') - { - $valuetoshow = dol_escape_htmltag($valuetoshow); - } - if ($value == 'type_template') - { - $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; - } - if ($value == 'lang' && $valuetoshow) - { - $valuetoshow = $valuetoshow.' - '.$langs->trans("Language_".$valuetoshow); - } - if ($value == 'fk_user') - { - if ($valuetoshow > 0) - { - $fuser = new User($db); - $fuser->fetch($valuetoshow); - $valuetoshow = $fuser->getNomUrl(1); - } - } - if ($value == 'private') - { - $align = "center"; - if ($valuetoshow) $valuetoshow = yn($valuetoshow); - else $valuetoshow = ''; - } - if ($value == 'position') - { - $align = "center"; - } - if ($value == 'joinfiles') - { - $align = "center"; - if ($valuetoshow) $valuetoshow = 1; - else $valuetoshow = ''; - } + if (empty($reshook)) + { + foreach ($fieldlist as $field => $value) + { + if (in_array($fieldlist[$field], array('content', 'content_lines'))) continue; + $showfield = 1; + $align = "left"; + $valuetoshow = $obj->{$fieldlist[$field]}; + if ($value == 'label' || $value == 'topic') + { + $valuetoshow = dol_escape_htmltag($valuetoshow); + } + if ($value == 'type_template') + { + $valuetoshow = isset($elementList[$valuetoshow]) ? $elementList[$valuetoshow] : $valuetoshow; + } + if ($value == 'lang' && $valuetoshow) + { + $valuetoshow = $valuetoshow.' - '.$langs->trans("Language_".$valuetoshow); + } + if ($value == 'fk_user') + { + if ($valuetoshow > 0) + { + $fuser = new User($db); + $fuser->fetch($valuetoshow); + $valuetoshow = $fuser->getNomUrl(1); + } + } + if ($value == 'private') + { + $align = "center"; + if ($valuetoshow) $valuetoshow = yn($valuetoshow); + else $valuetoshow = ''; + } + if ($value == 'position') + { + $align = "center"; + } + if ($value == 'joinfiles') + { + $align = "center"; + if ($valuetoshow) $valuetoshow = 1; + else $valuetoshow = ''; + } - $class = 'tddict'; + $class = 'tddict'; // Show value for field if ($showfield) { - print ''; - print ''.$valuetoshow.''; + print ''; + print ''.$valuetoshow.''; } - } - } + } + } - // Can an entry be erased or disabled ? - $iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default - if (!$user->admin && $obj->fk_user != $user->id) - { - $iserasable = 0; - $canbedisabled = 0; - $canbemodified = 0; - } + // Can an entry be erased or disabled ? + $iserasable = 1; $canbedisabled = 1; $canbemodified = 1; // true by default + if (!$user->admin && $obj->fk_user != $user->id) + { + $iserasable = 0; + $canbedisabled = 0; + $canbemodified = 0; + } - $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); - if ($param) $url .= '&'.$param; - $url .= '&'; + $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : ''); + if ($param) $url .= '&'.$param; + $url .= '&'; - // Status / Active - print ''; - if ($canbedisabled) print ''.$actl[$obj->active].''; - else print ''.$actl[$obj->active].''; - print ""; + // Status / Active + print ''; + if ($canbedisabled) print ''.$actl[$obj->active].''; + else print ''.$actl[$obj->active].''; + print ""; - // Modify link / Delete link - print ''; - if ($canbemodified) print ''.img_edit().''; - if ($iserasable) - { - print ''.img_delete().''; - //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin - } - print ''; + // Modify link / Delete link + print ''; + if ($canbemodified) print ''.img_edit().''; + if ($iserasable) + { + print ''.img_delete().''; + //else print ''.img_delete().''; // Some dictionary can be edited by other profile than admin + } + print ''; - /* + /* $fieldsforcontent = array('content'); if (! empty($conf->global->MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES)) { @@ -942,16 +926,15 @@ if ($resql) } }*/ - print "\n"; - } + print "\n"; + } - $i++; - } - } -} -else { - dol_print_error($db); + $i++; + } + } +} else { + dol_print_error($db); } print ''; @@ -992,25 +975,19 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if ($user->admin) { print $form->select_dolusers($obj->{$fieldlist[$field]}, 'fk_user', 1, null, 0, '', null, 0, 0, 1, '', 0, '', 'maxwidth200'); - } - else - { + } else { if ($context == 'add') // I am not admin and we show the add form { print $user->getNomUrl(1); // Me $forcedvalue = $user->id; - } - else - { + } else { if ($obj && !empty($obj->{$fieldlist[$field]}) && $obj->{$fieldlist[$field]} > 0) { $fuser = new User($db); $fuser->fetch($obj->{$fieldlist[$field]}); print $fuser->getNomUrl(1); $forcedvalue = $fuser->id; - } - else - { + } else { $forcedvalue = $obj->{$fieldlist[$field]}; } } @@ -1018,8 +995,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') print ''; } print ''; - } - elseif ($fieldlist[$field] == 'lang') + } elseif ($fieldlist[$field] == 'lang') { print ''; if (!empty($conf->global->MAIN_MULTILANGS)) @@ -1027,9 +1003,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') $selectedlang = GETPOSTISSET('langcode') ?GETPOST('langcode', 'aZ09') : $langs->defaultlang; if ($context == 'edit') $selectedlang = $obj->{$fieldlist[$field]}; print $formadmin->select_language($selectedlang, 'langcode', 0, null, 1, 0, 0, 'maxwidth150'); - } - else - { + } else { if (!empty($obj->{$fieldlist[$field]})) { print $obj->{$fieldlist[$field]}.' - '.$langs->trans('Language_'.$obj->{$fieldlist[$field]}); @@ -1049,21 +1023,17 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') // Current tempalte type is an unknown type, so we must keep it as it is. print ''; print $obj->{$fieldlist[$field]}; - } - else - { + } else { print $form->selectarray('type_template', $elementList, (!empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth150 maxwidth100onsmartphone'); } print ''; - } - elseif ($context == 'add' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue; + } elseif ($context == 'add' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue; elseif ($context == 'edit' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue; elseif ($context == 'hide' && in_array($fieldlist[$field], array('topic', 'joinfiles', 'content', 'content_lines'))) continue; - else - { + else { $size = ''; $class = ''; $classtd = ''; if ($fieldlist[$field] == 'code') $class = 'maxwidth100'; - if ($fieldlist[$field] == 'label') $class = 'maxwidth100'; + if ($fieldlist[$field] == 'label') $class = 'maxwidth200'; if ($fieldlist[$field] == 'private') { $class = 'maxwidth50'; $classtd = 'center'; } if ($fieldlist[$field] == 'position') { $class = 'maxwidth50'; $classtd = 'center'; } if ($fieldlist[$field] == 'libelle') $class = 'quatrevingtpercent'; @@ -1076,15 +1046,11 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '') if (empty($user->admin)) { print $form->selectyesno($fieldlist[$field], '1', 1); - } - else - { + } else { //print ''; print $form->selectyesno($fieldlist[$field], (isset($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]}:''), 1); } - } - else - { + } else { print ''; } print ''; diff --git a/htdocs/admin/mails_ticket.php b/htdocs/admin/mails_ticket.php new file mode 100644 index 00000000000..39e159535ba --- /dev/null +++ b/htdocs/admin/mails_ticket.php @@ -0,0 +1,574 @@ + + * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2016 Jonathan TISSEAU + * + * 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 . + */ + +/** + * \file htdocs/admin/mails_ticket.php + * \brief Page to setup mails for ticket + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors')); + +$action = GETPOST('action', 'aZ09'); + +if (!$user->admin) accessforbidden(); + +$usersignature = $user->signature; +// For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html. +if ($action == 'test' || $action == 'send') +{ + $usersignature = dol_string_nohtmltag($usersignature); +} + +$substitutionarrayfortest = array( +'__LOGIN__' => $user->login, +'__ID__' => 'TESTIdRecord', +'__EMAIL__' => 'TESTEMail', +'__LASTNAME__' => 'TESTLastname', +'__FIRSTNAME__' => 'TESTFirstname', +'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), +//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet +); +complete_substitutions_array($substitutionarrayfortest, $langs); + + + +/* + * Actions + */ + +if ($action == 'update' && empty($_POST["cancel"])) +{ + // Send mode parameters + dolibarr_set_const($db, "MAIN_MAIL_SENDMODE_TICKET", GETPOST("MAIN_MAIL_SENDMODE_TICKET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTP_PORT_TICKET", GETPOST("MAIN_MAIL_SMTP_PORT_TICKET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTP_SERVER_TICKET", GETPOST("MAIN_MAIL_SMTP_SERVER_TICKET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_ID_TICKET", GETPOST("MAIN_MAIL_SMTPS_ID_TICKET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_SMTPS_PW_TICKET", GETPOST("MAIN_MAIL_SMTPS_PW_TICKET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_TLS_TICKET", GETPOST("MAIN_MAIL_EMAIL_TLS_TICKET"), 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_MAIL_EMAIL_STARTTLS_TICKET", GETPOST("MAIN_MAIL_EMAIL_STARTTLS_TICKET"), 'chaine', 0, '', $conf->entity); + + header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); + exit; +} + + +// Actions to send emails +$id = 0; +$actiontypecode = ''; // Not an event for agenda +$triggersendname = ''; // Disable triggers +$paramname = 'id'; +$mode = 'emailfortest'; +$trackid = (($action == 'testhtml') ? "testhtml" : "test"); +$sendcontext = 'ticket'; // Force to use dedicated context of setup for ticket +include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; + +if ($action == 'presend' && GETPOST('trackid') == 'test') $action = 'test'; +if ($action == 'presend' && GETPOST('trackid') == 'testhtml') $action = 'testhtml'; + + + + +/* + * View + */ + +$form = new Form($db); + +$linuxlike = 1; +if (preg_match('/^win/i', PHP_OS)) $linuxlike = 0; +if (preg_match('/^mac/i', PHP_OS)) $linuxlike = 0; + +if (empty($conf->global->MAIN_MAIL_SENDMODE_TICKET)) $conf->global->MAIN_MAIL_SENDMODE_TICKET = 'default'; +$port = !empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : ini_get('smtp_port'); +if (!$port) $port = 25; +$server = !empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : ini_get('SMTP'); +if (!$server) $server = '127.0.0.1'; + + +$wikihelp = 'EN:Setup_EMails|FR:Paramétrage_EMails|ES:Configuración_EMails'; +llxHeader('', $langs->trans("Setup"), $wikihelp); + +print load_fiche_titre($langs->trans("EMailsSetup"), '', 'title_setup'); + +$head = email_admin_prepare_head(); + +// List of sending methods +$listofmethods = array(); +$listofmethods['default'] = $langs->trans('DefaultOutgoingEmailSetup'); +$listofmethods['mail'] = 'PHP mail function'; +//$listofmethods['simplemail']='Simplemail class'; +$listofmethods['smtps'] = 'SMTP/SMTPS socket library'; +if (version_compare(phpversion(), '7.0', '>=')) $listofmethods['swiftmailer'] = 'Swift Mailer socket library'; + + +if ($action == 'edit') +{ + if ($conf->use_javascript_ajax) + { + print "\n".''."\n"; + } + + print ''; + print ''; + print ''; + + dol_fiche_head($head, 'common_ticket', '', -1); + + print ''.$langs->trans("EMailsDesc")."
\n"; + print "
\n"; + + + clearstatcache(); + + print ''; + print ''; + + // Method + + print ''; + + // Host server + + print ''; + + // Port + + print ''; + + // ID + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + $mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_ID_TICKET : ''); + print ''; + } + + // PW + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + $mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_PW_TICKET : ''); + print ''; + } + + // TLS + + print ''; + + // STARTTLS + + print ''; + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; + + // SuperAdministrator access only + if ((empty($conf->global->MAIN_MODULE_MULTICOMPANY)) || ($user->admin && !$user->entity)) + { + print $form->selectarray('MAIN_MAIL_SENDMODE_TICKET', $listofmethods, $conf->global->MAIN_MAIL_SENDMODE_TICKET); + } else { + $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_TICKET]; + if (empty($text)) $text = $langs->trans("Undefined"); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + print '
'; + if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') + { + print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); + print ''; + print $langs->trans("SeeLocalSendMailSetup"); + } else { + $mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : ''); + $smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined"); + if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike"); + else print $langs->trans("MAIN_MAIL_SMTP_SERVER", $smtpserver); + print ''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + } else { + $text = !empty($mainserver) ? $mainserver : $smtpserver; + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + } + print '
'; + if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') + { + print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); + print ''; + print $langs->trans("SeeLocalSendMailSetup"); + } else { + $mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : ''); + $smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined"); + if ($linuxlike) print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike"); + else print $langs->trans("MAIN_MAIL_SMTP_PORT", $smtpport); + print ''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + print ''; + print ''.$langs->trans("SeeLocalSendMailSetup").''; + } else { + $text = (!empty($mainport) ? $mainport : $smtpport); + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($text, $htmltext, 1, 'superadmin'); + print ''; + } + } + print '
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + } else { + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_ID_TICKET, $htmltext, 1, 'superadmin'); + print ''; + } + print '
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''; + // SuperAdministrator access only + if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) + { + print ''; + } else { + $htmltext = $langs->trans("ContactSuperAdminForChange"); + print $form->textwithpicto($conf->global->MAIN_MAIL_SMTPS_PW_TICKET, $htmltext, 1, 'superadmin'); + print ''; + } + print '
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_TLS_TICKET', (!empty($conf->global->MAIN_MAIL_EMAIL_TLS_TICKET) ? $conf->global->MAIN_MAIL_EMAIL_TLS_TICKET : 0), 1); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) + { + if (function_exists('openssl_open')) + { + print $form->selectyesno('MAIN_MAIL_EMAIL_STARTTLS_TICKET', (!empty($conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET) ? $conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET : 0), 1); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'; + + dol_fiche_end(); + + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print ''; +} else { + dol_fiche_head($head, 'common_ticket', '', -1); + + print ''.$langs->trans("EMailsDesc")."
\n"; + print "
\n"; + + print ''; + print ''; + + // Method + print ''; + + if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') + { + // Host server + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail')) + { + print ''; + } else { + print ''; + } + + // Port + if ($linuxlike && (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail')) + { + print ''; + } else { + print ''; + } + + // SMTPS ID + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + print ''; + } + + // SMTPS PW + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + print ''; + } + + // TLS + print ''; + + // STARTTLS + print ''; + } + + print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_MAIL_SENDMODE").''; + $text = $listofmethods[$conf->global->MAIN_MAIL_SENDMODE_TICKET]; + if (empty($text)) $text = $langs->trans("Undefined").img_warning(); + print $text; + print '
'.$langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_SERVER", ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : '').'
'.$langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike").''.$langs->trans("SeeLocalSendMailSetup").'
'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).''.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '').'
'.$langs->trans("MAIN_MAIL_SMTPS_ID").''.$conf->global->MAIN_MAIL_SMTPS_ID_TICKET.'
'.$langs->trans("MAIN_MAIL_SMTPS_PW").''.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW_TICKET).'
'.$langs->trans("MAIN_MAIL_EMAIL_TLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_TLS_TICKET); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'.$langs->trans("MAIN_MAIL_EMAIL_STARTTLS").''; + if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) + { + if (function_exists('openssl_open')) + { + print yn($conf->global->MAIN_MAIL_EMAIL_STARTTLS_TICKET); + } else print yn(0).' ('.$langs->trans("YourPHPDoesNotHaveSSLSupport").')'; + } else print yn(0).' ('.$langs->trans("NotSupported").')'; + print '
'; + + dol_fiche_end(); + + + if ($conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail' && empty($conf->global->MAIN_FIX_FOR_BUGGED_MTA)) + { + print '
'; + /* + // Warning 1 + if ($linuxlike) + { + $sendmailoption=ini_get('mail.force_extra_parameters'); + if (empty($sendmailoption) || ! preg_match('/ba/',$sendmailoption)) + { + print info_admin($langs->trans("SendmailOptionNotComplete")); + } + }*/ + // Warning 2 + print info_admin($langs->trans("SendmailOptionMayHurtBuggedMTA")); + } + + + // Buttons for actions + + print '
'; + + print ''.$langs->trans("Modify").''; + + if (!empty($conf->global->MAIN_MAIL_SENDMODE_TICKET) && $conf->global->MAIN_MAIL_SENDMODE_TICKET != 'default') + { + if ($conf->global->MAIN_MAIL_SENDMODE_TICKET != 'mail' || !$linuxlike) + { + if (function_exists('fsockopen') && $port && $server) + { + print ''.$langs->trans("DoTestServerAvailability").''; + } + } else { + print ''.$langs->trans("DoTestServerAvailability").''; + } + + print ''.$langs->trans("DoTestSend").''; + + if (!empty($conf->fckeditor->enabled)) + { + print ''.$langs->trans("DoTestSendHTML").''; + } + } + + print '
'; + + + if ($conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail' && !in_array($action, array('testconnect', 'test', 'testhtml'))) + { + $text = $langs->trans("WarningPHPMail"); + print info_admin($text); + } + + // Run the test to connect + if ($action == 'testconnect') + { + print load_fiche_titre($langs->trans("DoTestServerAvailability")); + + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + $mail = new CMailFile('', '', '', '', array(), array(), array(), '', '', 0, '', '', '', '', $trackid, $sendcontext); + + $result = $mail->check_server_port($server, $port); + if ($result) print '
'.$langs->trans("ServerAvailableOnIPOrPort", $server, $port).'
'; + else { + $errormsg = $langs->trans("ServerNotAvailableOnIPOrPort", $server, $port); + + if ($mail->error) { + $errormsg .= ' - '.$mail->error; + } + + setEventMessages($errormsg, null, 'errors'); + } + print '
'; + } + + // Show email send test form + if ($action == 'test' || $action == 'testhtml') + { + print '
'; + print load_fiche_titre($action == 'testhtml' ? $langs->trans("DoTestSendHTML") : $langs->trans("DoTestSend")); + + dol_fiche_head(''); + + // Cree l'objet formulaire mail + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $formmail->fromname = (isset($_POST['fromname']) ? $_POST['fromname'] : $conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->frommail = (isset($_POST['frommail']) ? $_POST['frommail'] : $conf->global->MAIN_MAIL_EMAIL_FROM); + $formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test"); + $formmail->withfromreadonly = 0; + $formmail->withsubstit = 0; + $formmail->withfrom = 1; + $formmail->witherrorsto = 1; + $formmail->withto = (!empty($_POST['sendto']) ? $_POST['sendto'] : ($user->email ? $user->email : 1)); + $formmail->withtocc = (!empty($_POST['sendtocc']) ? $_POST['sendtocc'] : 1); // ! empty to keep field if empty + $formmail->withtoccc = (!empty($_POST['sendtoccc']) ? $_POST['sendtoccc'] : 1); // ! empty to keep field if empty + $formmail->withtopic = (isset($_POST['subject']) ? $_POST['subject'] : $langs->trans("Test")); + $formmail->withtopicreadonly = 0; + $formmail->withfile = 2; + $formmail->withbody = (isset($_POST['message']) ? $_POST['message'] : ($action == 'testhtml' ? $langs->transnoentities("PredefinedMailTestHtml") : $langs->transnoentities("PredefinedMailTest"))); + $formmail->withbodyreadonly = 0; + $formmail->withcancel = 1; + $formmail->withdeliveryreceipt = 1; + $formmail->withfckeditor = ($action == 'testhtml' ? 1 : 0); + $formmail->ckeditortoolbar = 'dolibarr_mailings'; + // Tableau des substitutions + $formmail->substit = $substitutionarrayfortest; + // Tableau des parametres complementaires du post + $formmail->param["action"] = "send"; + $formmail->param["models"] = "body"; + $formmail->param["mailid"] = 0; + $formmail->param["returnurl"] = $_SERVER["PHP_SELF"]; + + // Init list of files + if (GETPOST("mode") == 'init') + { + $formmail->clear_attached_files(); + } + + print $formmail->get_form('addfile', 'removefile'); + + dol_fiche_end(); + } +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 7e734a5b093..ff15bbdcd40 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -96,9 +96,7 @@ if ($action == 'update' && !$cancel) if ($result > 0) { $db->commit(); - } - else - { + } else { $error++; setEventMessages($langs->trans("FailedToInitializeMenu").' '.$key, null, 'errors'); $db->rollback(); diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index ef58c1042d4..31e0f896633 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -31,7 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php'; // Load translation files required by the page $langs->loadLangs(array("other", "admin")); -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button +$cancel = GETPOST('cancel', 'alphanohtml'); // We click on a Cancel button +$confirm = GETPOST('confirm'); if (!$user->admin) accessforbidden(); @@ -40,8 +41,8 @@ $dirsmartphone = array(); $dirmenus = array_merge(array("/core/menus/"), (array) $conf->modules_parts['menus']); foreach ($dirmenus as $dirmenu) { - $dirstandard[] = $dirmenu.'standard'; - $dirsmartphone[] = $dirmenu.'smartphone'; + $dirstandard[] = $dirmenu.'standard'; + $dirsmartphone[] = $dirmenu.'smartphone'; } $action = GETPOST('action', 'aZ09'); @@ -66,208 +67,193 @@ if (GETPOST("menu_handler")) $menu_handler = GETPOST("menu_handler"); if ($action == 'update') { - if (!$cancel) - { - $leftmenu = ''; $mainmenu = ''; - if (GETPOST('menuIdParent', 'alpha') && !is_numeric(GETPOST('menuIdParent', 'alpha'))) - { - $tmp = explode('&', GETPOST('menuIdParent', 'alpha')); - foreach ($tmp as $s) - { - if (preg_match('/fk_mainmenu=/', $s)) - { - $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); - } - if (preg_match('/fk_leftmenu=/', $s)) - { - $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); - } - } - } + if (!$cancel) + { + $leftmenu = ''; $mainmenu = ''; + if (GETPOST('menuIdParent', 'alphanohtml') && !is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) + { + $tmp = explode('&', GETPOST('menuIdParent', 'alphanohtml')); + foreach ($tmp as $s) + { + if (preg_match('/fk_mainmenu=/', $s)) + { + $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); + } + if (preg_match('/fk_leftmenu=/', $s)) + { + $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); + } + } + } - $menu = new Menubase($db); - $result = $menu->fetch(GETPOST('menuId', 'int')); - if ($result > 0) - { - $menu->titre = GETPOST('titre', 'alpha'); // deprecated - $menu->title = GETPOST('titre', 'alpha'); - $menu->leftmenu = GETPOST('leftmenu', 'aZ09'); - $menu->url = GETPOST('url', 'alpha'); - $menu->langs = GETPOST('langs', 'alpha'); - $menu->position = GETPOST('position', 'int'); - $menu->enabled = GETPOST('enabled', 'alpha'); - $menu->perms = GETPOST('perms', 'alpha'); - $menu->target = GETPOST('target', 'alpha'); - $menu->user = GETPOST('user', 'alpha'); - $menu->mainmenu = GETPOST('propertymainmenu', 'alpha'); - if (is_numeric(GETPOST('menuIdParent', 'alpha'))) - { - $menu->fk_menu = GETPOST('menuIdParent', 'alpha'); - } - else - { - if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0; - else $menu->fk_menu = -1; - $menu->fk_mainmenu = $mainmenu; - $menu->fk_leftmenu = $leftmenu; - } + $menu = new Menubase($db); + $result = $menu->fetch(GETPOST('menuId', 'int')); + if ($result > 0) + { + $menu->title = GETPOST('titre', 'alphanohtml'); + $menu->leftmenu = GETPOST('leftmenu', 'aZ09'); + $menu->url = GETPOST('url', 'alphanohtml'); + $menu->langs = GETPOST('langs', 'alphanohtml'); + $menu->position = GETPOST('position', 'int'); + $menu->enabled = GETPOST('enabled', 'alphanohtml'); + $menu->perms = GETPOST('perms', 'alphanohtml'); + $menu->target = GETPOST('target', 'alphanohtml'); + $menu->user = GETPOST('user', 'alphanohtml'); + $menu->mainmenu = GETPOST('propertymainmenu', 'alphanohtml'); + if (is_numeric(GETPOST('menuIdParent', 'alphanohtml'))) + { + $menu->fk_menu = GETPOST('menuIdParent', 'alphanohtml'); + } else { + if (GETPOST('type', 'alphanohtml') == 'top') $menu->fk_menu = 0; + else $menu->fk_menu = -1; + $menu->fk_mainmenu = $mainmenu; + $menu->fk_leftmenu = $leftmenu; + } - $result = $menu->update($user); - if ($result > 0) - { - setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); - } - else - { - setEventMessages($menu->error, $menu->errors, 'errors'); - } - } - else - { - setEventMessages($menu->error, $menu->errors, 'errors'); - } - $action = "edit"; + $result = $menu->update($user); + if ($result > 0) + { + setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); + } else { + setEventMessages($menu->error, $menu->errors, 'errors'); + } + } else { + setEventMessages($menu->error, $menu->errors, 'errors'); + } + $action = "edit"; - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } - else - { - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } else { + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } } if ($action == 'add') { - if ($cancel) - { - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); - exit; - } + if ($cancel) + { + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".$menu_handler); + exit; + } - $leftmenu = ''; $mainmenu = ''; - if (GETPOST('menuId', 'alpha', 3) && !is_numeric(GETPOST('menuId', 'alpha', 3))) - { - $tmp = explode('&', GETPOST('menuId', 'alpha', 3)); - foreach ($tmp as $s) - { - if (preg_match('/fk_mainmenu=/', $s)) - { + $leftmenu = ''; $mainmenu = ''; + if (GETPOST('menuId', 'alphanohtml', 3) && !is_numeric(GETPOST('menuId', 'alphanohtml', 3))) + { + $tmp = explode('&', GETPOST('menuId', 'alphanohtml', 3)); + foreach ($tmp as $s) + { + if (preg_match('/fk_mainmenu=/', $s)) + { $mainmenu = preg_replace('/fk_mainmenu=/', '', $s); - } - if (preg_match('/fk_leftmenu=/', $s)) - { - $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); - } - } - } + } + if (preg_match('/fk_leftmenu=/', $s)) + { + $leftmenu = preg_replace('/fk_leftmenu=/', '', $s); + } + } + } - $langs->load("errors"); + $langs->load("errors"); - $error = 0; - if (!$error && !$_POST['menu_handler']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MenuHandler")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['type']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['url']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("URL")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['titre']) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && $_POST['menuId'] && $_POST['type'] == 'top') - { - setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); - $action = 'create'; - $error++; - } - if (!$error && !$_POST['menuId'] && $_POST['type'] == 'left') - { - setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); - $action = 'create'; - $error++; - } + $error = 0; + if (!$error && !$_POST['menu_handler']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("MenuHandler")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['type']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['url']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("URL")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['titre']) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && $_POST['menuId'] && $_POST['type'] == 'top') + { + setEventMessages($langs->trans("ErrorTopMenuMustHaveAParentWithId0"), null, 'errors'); + $action = 'create'; + $error++; + } + if (!$error && !$_POST['menuId'] && $_POST['type'] == 'left') + { + setEventMessages($langs->trans("ErrorLeftMenuMustHaveAParentId"), null, 'errors'); + $action = 'create'; + $error++; + } - if (!$error) - { - $menu = new Menubase($db); - $menu->menu_handler = preg_replace('/_menu$/', '', GETPOST('menu_handler', 'aZ09')); - $menu->type = GETPOST('type', 'alpha'); - $menu->titre = GETPOST('titre', 'alpha'); // deprecated - $menu->title = GETPOST('titre', 'alpha'); - $menu->url = GETPOST('url', 'alpha'); - $menu->langs = GETPOST('langs', 'alpha'); - $menu->position = GETPOST('position', 'int'); - $menu->enabled = GETPOST('enabled', 'alpha'); - $menu->perms = GETPOST('perms', 'alpha'); - $menu->target = GETPOST('target', 'alpha'); - $menu->user = GETPOST('user', 'alpha'); - $menu->mainmenu = GETPOST('propertymainmenu', 'alpha'); - if (is_numeric(GETPOST('menuId', 'alpha', 3))) - { - $menu->fk_menu = GETPOST('menuId', 'alpha', 3); - } - else - { - if (GETPOST('type', 'alpha') == 'top') $menu->fk_menu = 0; - else $menu->fk_menu = -1; - $menu->fk_mainmenu = $mainmenu; - $menu->fk_leftmenu = $leftmenu; - } + if (!$error) + { + $menu = new Menubase($db); + $menu->menu_handler = preg_replace('/_menu$/', '', GETPOST('menu_handler', 'aZ09')); + $menu->type = GETPOST('type', 'alphanohtml'); + $menu->title = GETPOST('titre', 'alphanohtml'); + $menu->url = GETPOST('url', 'alphanohtml'); + $menu->langs = GETPOST('langs', 'alphanohtml'); + $menu->position = GETPOST('position', 'int'); + $menu->enabled = GETPOST('enabled', 'alphanohtml'); + $menu->perms = GETPOST('perms', 'alphanohtml'); + $menu->target = GETPOST('target', 'alphanohtml'); + $menu->user = GETPOST('user', 'alphanohtml'); + $menu->mainmenu = GETPOST('propertymainmenu', 'alphanohtml'); + if (is_numeric(GETPOST('menuId', 'alphanohtml', 3))) + { + $menu->fk_menu = GETPOST('menuId', 'alphanohtml', 3); + } else { + if (GETPOST('type', 'alphanohtml') == 'top') $menu->fk_menu = 0; + else $menu->fk_menu = -1; + $menu->fk_mainmenu = $mainmenu; + $menu->fk_leftmenu = $leftmenu; + } - $result = $menu->create($user); - if ($result > 0) - { - header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler', 'aZ09')); - exit; - } - else - { - $action = 'create'; - setEventMessages($menu->error, $menu->errors, 'errors'); - } - } + $result = $menu->create($user); + if ($result > 0) + { + header("Location: ".DOL_URL_ROOT."/admin/menus/index.php?menu_handler=".GETPOST('menu_handler', 'aZ09')); + exit; + } else { + $action = 'create'; + setEventMessages($menu->error, $menu->errors, 'errors'); + } + } } // delete -if ($action == 'confirm_delete' && $_POST["confirm"] == 'yes') +if ($action == 'confirm_delete' && $confirm == 'yes') { - $this->db->begin(); + $db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int'); - $result = $db->query($sql); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE rowid = ".GETPOST('menuId', 'int'); + $result = $db->query($sql); - if ($result == 0) - { - $this->db->commit(); + if ($result == 0) + { + $db->commit(); - llxHeader(); - setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs'); - llxFooter(); - exit; - } - else - { - $this->db->rollback(); + llxHeader(); + setEventMessages($langs->trans("MenuDeleted"), null, 'mesgs'); + llxFooter(); + exit; + } else { + $db->rollback(); - $reload = 0; - $_GET["action"] = ''; - } + $reload = 0; + $_GET["action"] = ''; + $action = ''; + } } @@ -284,7 +270,7 @@ llxHeader('', $langs->trans("Menu")); if ($action == 'create') { - print ''; - print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup'); + print load_fiche_titre($langs->trans("NewMenu"), '', 'title_setup'); - print '
'; - print ''; + print ''; + print ''; - dol_fiche_head(); + dol_fiche_head(); - print ''; + print '
'; - // Id - $parent_rowid = GETPOST('menuId', 'int'); - if (GETPOST('menuId', 'int')) - { - $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int'); - $res = $db->query($sql); - if ($res) - { - while ($menu = $db->fetch_array($res)) - { - $parent_rowid = $menu['rowid']; - $parent_mainmenu = $menu['mainmenu']; - $parent_leftmenu = $menu['leftmenu']; - $parent_langs = $menu['langs']; - $parent_level = $menu['level']; - } - } - } + // Id + $parent_rowid = GETPOST('menuId', 'int'); + if (GETPOST('menuId', 'int')) + { + $sql = "SELECT m.rowid, m.mainmenu, m.leftmenu, m.level, m.langs FROM ".MAIN_DB_PREFIX."menu as m WHERE m.rowid = ".GETPOST('menuId', 'int'); + $res = $db->query($sql); + if ($res) + { + while ($menu = $db->fetch_array($res)) + { + $parent_rowid = $menu['rowid']; + $parent_mainmenu = $menu['mainmenu']; + $parent_leftmenu = $menu['leftmenu']; + $parent_langs = $menu['langs']; + $parent_level = $menu['level']; + } + } + } - // Handler - print ''; - print ''; - print ''; + // Handler + print ''; + print ''; + print ''; - // User - print ''; - print ''; - print ''; + // User + print ''; + print ''; + print ''; - // Type - print ''; + // Type + print ''; - // Mainmenu code - print ''; - print ''; - print ''; + // Mainmenu code + print ''; + print ''; + print ''; - // MenuId Parent - print ''; - if ($parent_rowid) - { - print ''; - } - else - { - print ''; - } - print ''; + // MenuId Parent + print ''; + if ($parent_rowid) + { + print ''; + } else { + print ''; + } + print ''; - // Title - print ''; + // Title + print ''; - // URL - print ''; + // URL + print ''; - // Langs - print ''; + // Langs + print ''; - // Position - print ''; + // Position + print ''; - // Target - print ''; + // Target + print ''; - // Enabled - print ''; + // Enabled + print ''; - // Perms - print ''; + // Perms + print ''; - print '
'.$langs->trans('MenuHandler').''; - $formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler) ? '' : '_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone)); - print ''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuHandler').''; + $formadmin->select_menu_families($menu_handler.(preg_match('/_menu/', $menu_handler) ? '' : '_menu'), 'menu_handler', array_merge($dirstandard, $dirsmartphone)); + print ''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('Type').''; - if ($parent_rowid) - { - print $langs->trans('Left'); - print ''; - } - else - { - print ''; - } - print ''.$langs->trans('DetailType').'
'.$langs->trans('Type').''; + if ($parent_rowid) + { + print $langs->trans('Left'); + print ''; + } else { + print ''; + } + print ''.$langs->trans('DetailType').'
'.$langs->trans('MainMenuCode').''; - print $langs->trans("Example").': mytopmenukey'; - print '
'.$langs->trans('MainMenuCode').''; + print $langs->trans("Example").': mytopmenukey'; + print '
'.$langs->trans('MenuIdParent').''.$parent_rowid.''.$langs->trans('DetailMenuIdParent'); - print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; - print '
'.$langs->trans('MenuIdParent').''.$parent_rowid.''.$langs->trans('DetailMenuIdParent'); + print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; + print '
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled').'
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled').'
'.$langs->trans('Rights').''.$langs->trans('DetailRight').'
'.$langs->trans('Rights').''.$langs->trans('DetailRight').'
'; + print ''; - dol_fiche_end(); + dol_fiche_end(); - print '
'; + print '
'; print ''; - print '     '; - print ''; + print '     '; + print ''; print '
'; - print ''; -} -elseif ($action == 'edit') + print ''; +} elseif ($action == 'edit') { - print load_fiche_titre($langs->trans("ModifMenu"), '', 'title_setup'); - print '
'; + print load_fiche_titre($langs->trans("ModifMenu"), '', 'title_setup'); + print '
'; - print '
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - dol_fiche_head(); + dol_fiche_head(); - print ''; + print '
'; - $menu = new Menubase($db); - $result = $menu->fetch(GETPOST('menuId', 'int')); - //var_dump($menu); + $menu = new Menubase($db); + $result = $menu->fetch(GETPOST('menuId', 'int')); + //var_dump($menu); - // Id - print ''; + // Id + print ''; - // Module - print ''; + // Module + print ''; - // Handler - if ($menu->menu_handler == 'all') $handler = $langs->trans('AllMenus'); - else $handler = $menu->menu_handler; - print ''; + // Handler + if ($menu->menu_handler == 'all') $handler = $langs->trans('AllMenus'); + else $handler = $menu->menu_handler; + print ''; - // User - print ''; + // User + print ''; - // Type - print ''; + // Type + print ''; - // Mainmenu code - if ($menu->type == 'top') - { - print ''; - /*if ($parent_rowid) + // Mainmenu code + if ($menu->type == 'top') + { + print ''; + /*if ($parent_rowid) { print ''; } else {*/ - print ''; - //} - print ''; - } + print ''; + //} + print ''; + } - // MenuId Parent - print ''; - $valtouse = $menu->fk_menu; - if ($menu->fk_mainmenu) $valtouse = 'fk_mainmenu='.$menu->fk_mainmenu; - if ($menu->fk_leftmenu) $valtouse .= '&fk_leftmenu='.$menu->fk_leftmenu; - print ''; - print ''; + // MenuId Parent + print ''; + $valtouse = $menu->fk_menu; + if ($menu->fk_mainmenu) $valtouse = 'fk_mainmenu='.$menu->fk_mainmenu; + if ($menu->fk_leftmenu) $valtouse .= '&fk_leftmenu='.$menu->fk_leftmenu; + print ''; + print ''; - // Niveau - //print ''; + // Niveau + //print ''; - // Title - print ''; + // Title + print ''; - // Url - print ''; + // Url + print ''; - // Langs - print ''; + // Langs + print ''; - // Position - print ''; + // Position + print ''; - // Target - print ''; + // Target + print ''; - // Enabled - print ''; + // Enabled + print ''; - // Perms - print ''; + // Perms + print ''; - print '
'.$langs->trans('Id').''.$menu->id.''.$langs->trans('DetailId').'
'.$langs->trans('Id').''.$menu->id.''.$langs->trans('DetailId').'
'.$langs->trans('MenuModule').''.$menu->module.''.$langs->trans('DetailMenuModule').'
'.$langs->trans('MenuModule').''.$menu->module.''.$langs->trans('DetailMenuModule').'
'.$langs->trans('MenuHandler').''.$handler.''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuHandler').''.$handler.''.$langs->trans('DetailMenuHandler').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('MenuForUsers').''.$langs->trans('DetailUser').'
'.$langs->trans('Type').''.$langs->trans(ucfirst($menu->type)).''.$langs->trans('DetailType').'
'.$langs->trans('Type').''.$langs->trans(ucfirst($menu->type)).''.$langs->trans('DetailType').'
'.$langs->trans('MainMenuCode').'
'.$langs->trans('MainMenuCode').''.$parent_rowid.'mainmenu).'">'; - print $langs->trans("Example").': mytopmenukey'; - print '
mainmenu).'">'; + print $langs->trans("Example").': mytopmenukey'; + print '
'.$langs->trans('MenuIdParent'); - print ''.$langs->trans('DetailMenuIdParent'); - print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; - print '
'.$langs->trans('MenuIdParent'); + print ''.$langs->trans('DetailMenuIdParent'); + print ', '.$langs->trans("Example").': fk_mainmenu=abc&fk_leftmenu=def'; + print '
'.$langs->trans('Level').''.$menu->level.''.$langs->trans('DetailLevel').'
'.$langs->trans('Level').''.$menu->level.''.$langs->trans('DetailLevel').'
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('Title').''.$langs->trans('DetailTitre').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('URL').''.$langs->trans('DetailUrl').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('LangFile').''.$langs->trans('DetailLangs').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Position').''.$langs->trans('DetailPosition').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Target').''.$langs->trans('DetailTarget').'
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled'); - if (!empty($menu->enabled)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->enabled, 1)).')'; - print '
'.$langs->trans('Enabled').''.$langs->trans('DetailEnabled'); + if (!empty($menu->enabled)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->enabled, 1)).')'; + print '
'.$langs->trans('Rights').''.$langs->trans('DetailRight'); - if (!empty($menu->perms)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->perms, 1)).')'; - print '
'.$langs->trans('Rights').''.$langs->trans('DetailRight'); + if (!empty($menu->perms)) print ' ('.$langs->trans("ConditionIsCurrently").': '.yn(dol_eval($menu->perms, 1)).')'; + print '
'; + print ''; - dol_fiche_end(); + dol_fiche_end(); - // Bouton - print '
'; + // Bouton + print '
'; print ''; - print '     '; - print ''; + print '     '; + print ''; print '
'; - print ''; + print ''; - print '
'; + print '
'; } // End of page diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 0cb69efdf4a..f83507c37aa 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -2,7 +2,7 @@ /* Copyright (C) 2007 Patrick Raguin * Copyright (C) 2007-2012 Laurent Destailleur * Copyright (C) 2009-2012 Regis Houssin - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Frédéric France * * 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 @@ -42,7 +42,7 @@ foreach ($dirmenus as $dirmenu) $dirsmartphone[] = $dirmenu.'smartphone'; } -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $menu_handler_top = $conf->global->MAIN_MENU_STANDARD; @@ -118,9 +118,7 @@ if ($action == 'up') $sql .= " WHERE m.rowid = ".$previous['rowid']; // Descend celui du dessus dol_syslog("admin/menus/index.php ".$sql); $db->query($sql); -} - -elseif ($action == 'down') +} elseif ($action == 'down') { $current = array(); $next = array(); @@ -174,9 +172,7 @@ elseif ($action == 'down') $sql .= " WHERE m.rowid = ".$next['rowid']; dol_syslog("admin/menus/index.php ".$sql); $db->query($sql); -} - -elseif ($action == 'confirm_delete' && $confirm == 'yes') +} elseif ($action == 'confirm_delete' && $confirm == 'yes') { $db->begin(); @@ -191,9 +187,7 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes') header("Location: ".DOL_URL_ROOT.'/admin/menus/index.php?menu_handler='.$menu_handler); exit; - } - else - { + } else { $db->rollback(); $reload = 0; @@ -326,20 +320,20 @@ if ($conf->use_javascript_ajax) $titre = $langs->trans($menu['titre']); $entry = '
'; - $entry .= '   '.$titre.''; + $entry .= '   '.$titre.''; $entry .= ''; - $entry .= ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; - $entry .= ''.img_edit_add('default').' '; - $entry .= ''.img_delete('default').' '; + $entry .= ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $entry .= ''.img_edit_add('default').' '; + $entry .= ''.img_delete('default').' '; $entry .= '     '; - $entry .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $entry .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; $entry .= '
'; - $buttons = ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; - $buttons .= ''.img_edit_add('default').' '; - $buttons .= ''.img_delete('default').' '; - $buttons .= '     '; - $buttons .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; + $buttons = ''.img_edit('default', 0, 'class="menuEdit" id="edit'.$menu['rowid'].'"').' '; + $buttons .= ''.img_edit_add('default').' '; + $buttons .= ''.img_delete('default').' '; + $buttons .= '     '; + $buttons .= ''.img_picto("Up", "1uparrow").''.img_picto("Down", "1downarrow").''; $data[] = array( 'rowid'=>$menu['rowid'], @@ -408,9 +402,7 @@ if ($conf->use_javascript_ajax) } print '
'; -} -else -{ +} else { $langs->load("errors"); setEventMessages($langs->trans("ErrorFeatureNeedJavascript"), null, 'errors'); } diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index bed6c2a3b4e..cd8c7cccfa6 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -29,7 +29,7 @@ $langs->loadLangs(array("user", "other", "admin")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); /* @@ -41,8 +41,7 @@ if ($action == 'activate_hidemenu') dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", '1', 'chaine', 0, '', $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); exit; -} -elseif ($action == 'disable_hidemenu') +} elseif ($action == 'disable_hidemenu') { dolibarr_del_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", $conf->entity); header("Location: ".$_SERVER["PHP_SELF"]); @@ -94,9 +93,7 @@ print ''; if (empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) { print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; -} -else -{ +} else { print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; } print ""; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index ec0e5d8bb9b..c788eca01d3 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $langs->loadLangs(array('errors', 'admin', 'modulebuilder')); $mode = GETPOST('mode', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); if (empty($mode)) $mode = 'desc'; @@ -105,8 +105,7 @@ foreach ($modulesdir as $dir) continue; } - try - { + try { $res = include_once $dir.$file; if (class_exists($modName)) { @@ -140,9 +139,7 @@ foreach ($modulesdir as $dir) if ($publisher) { $arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher; - } - else - { + } else { $arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers"); } } @@ -180,20 +177,15 @@ foreach ($modulesdir as $dir) else $categ[$specialstring] = 1; $j++; $i++; - } - else dol_syslog("Module ".get_class($objMod)." not qualified"); - } - catch (Exception $e) + } else dol_syslog("Module ".get_class($objMod)." not qualified"); + } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } - } - else - { + } else { print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)
"; } - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } @@ -201,9 +193,7 @@ foreach ($modulesdir as $dir) } } closedir($handle); - } - else - { + } else { dol_syslog("htdocs/admin/modulehelp.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING); } } @@ -331,9 +321,7 @@ if ($mode == 'desc') if (!empty($objMod->editor_url) && !preg_match('/dolibarr\.org/i', $objMod->editor_url)) $textexternal .= ($objMod->editor_name != 'dolibarr' ? ' - ' : '').img_picto('', 'globe').' '.$objMod->editor_url.''; $text .= $textexternal; $text .= '
'; - } - else - { + } else { $text .= '
'.$langs->trans("Origin").': '.$langs->trans("Core").'
'; } @@ -353,7 +341,7 @@ if ($mode == 'feature') $text .= '

'; $text .= '
'.$langs->trans("AddDataTables").': '; - $sqlfiles = dol_dir_list(dol_buildpath($moduledir.'/sql/'), 'files', 0, 'llx.*\.sql', array('\.key\.sql')); + $sqlfiles = dol_dir_list(dol_buildpath($moduledir.'/sql/'), 'files', 0, 'llx.*\.sql', array('\.key\.sql', '\.sql\.back')); if (count($sqlfiles) > 0) { $text .= $langs->trans("Yes").' ('; @@ -364,8 +352,7 @@ if ($mode == 'feature') $i++; } $text .= ')'; - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -378,8 +365,7 @@ if ($mode == 'feature') $text .= ($i ? ', ' : '').$val; $i++; } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -388,8 +374,7 @@ if ($mode == 'feature') if (dol_is_file($filedata)) { $text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql)'; - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -407,8 +392,7 @@ if ($mode == 'feature') $i++; } } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -416,8 +400,7 @@ if ($mode == 'feature') if (isset($objMod->module_parts) && isset($objMod->module_parts['models']) && $objMod->module_parts['models']) { $text .= $langs->trans("Yes"); - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -425,8 +408,7 @@ if ($mode == 'feature') if (isset($objMod->module_parts) && isset($objMod->module_parts['substitutions']) && $objMod->module_parts['substitutions']) { $text .= $langs->trans("Yes"); - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -439,8 +421,7 @@ if ($mode == 'feature') $text .= ($i ? ', ' : '').($val['label']); $i++; } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -449,9 +430,7 @@ if ($mode == 'feature') if (isset($objMod->module_parts) && isset($objMod->module_parts['triggers']) && $objMod->module_parts['triggers']) { $yesno = 'Yes'; - } - else - { + } else { $yesno = 'No'; } require_once DOL_DOCUMENT_ROOT.'/core/class/interfaces.class.php'; @@ -479,8 +458,7 @@ if ($mode == 'feature') $text .= ($i ? ', ' : '').($val['file'] ? $val['file'] : $val[0]); $i++; } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -510,8 +488,7 @@ if ($mode == 'feature') $text .= ($i ? ', ' : '').($val); $i++; } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -524,8 +501,7 @@ if ($mode == 'feature') $text .= ($i ? ', ' : '').($val[1]); $i++; } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -533,8 +509,7 @@ if ($mode == 'feature') if (isset($objMod->menu) && !empty($objMod->menu)) // objMod can be an array or just an int 1 { $text .= $langs->trans("Yes"); - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -547,8 +522,7 @@ if ($mode == 'feature') $text .= ($i ? ', ' : '').($val); $i++; } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; @@ -561,8 +535,7 @@ if ($mode == 'feature') $text .= ($i ? ', ' : '').($val); $i++; } - } - else $text .= $langs->trans("No"); + } else $text .= $langs->trans("No"); $text .= '
'; diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index af689b1165d..c61e352aad8 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -40,7 +40,7 @@ $langs->loadLangs(array("errors", "admin", "modulebuilder")); $mode = GETPOSTISSET('mode') ? GETPOST('mode', 'alpha') : (empty($conf->global->MAIN_MODULE_SETUP_ON_LIST_BY_DEFAULT) ? 'commonkanban' : 'common'); if (empty($mode)) $mode = 'common'; -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); //var_dump($_POST);exit; $value = GETPOST('value', 'alpha'); $page_y = GETPOST('page_y', 'int'); @@ -126,9 +126,7 @@ if ($action == 'install') $langs->load("Error"); setEventMessages($langs->trans("ErrorModuleFileRequired"), null, 'warnings'); $error++; - } - else - { + } else { if (!$error && !preg_match('/\.zip$/i', $original_file)) { $langs->load("errors"); @@ -174,9 +172,7 @@ if ($action == 'install') $langs->load("errors"); setEventMessages($langs->trans($result['error'], $original_file), null, 'errors'); $error++; - } - else - { + } else { // Now we move the dir of the module $modulename = preg_replace('/module_/', '', $original_file); $modulename = preg_replace('/\-([0-9][0-9\.]*)\.zip$/i', '', $modulename); @@ -231,9 +227,7 @@ if ($action == 'install') } } } - } - else - { + } else { setEventMessages($langs->trans("ErrorFailToRenameFile", $_FILES['fileinstall']['tmp_name'], $newfile), null, 'errors'); $error++; } @@ -249,8 +243,7 @@ if ($action == 'set' && $user->admin) { $resarray = activateModule($value); if (!empty($resarray['errors'])) setEventMessages('', $resarray['errors'], 'errors'); - else - { + else { //var_dump($resarray);exit; if ($resarray['nbperms'] > 0) { @@ -265,14 +258,12 @@ if ($action == 'set' && $user->admin) $msg = $langs->trans('ModuleEnabledAdminMustCheckRights'); setEventMessages($msg, null, 'warnings'); } - } - else dol_print_error($db); + } else dol_print_error($db); } } header("Location: ".$_SERVER["PHP_SELF"]."?mode=".$mode.$param.($page_y ? '&page_y='.$page_y : '')); exit; -} -elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') +} elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') { $result = unActivateModule($value); if ($result) setEventMessages($result, null, 'errors'); @@ -342,8 +333,7 @@ foreach ($modulesdir as $dir) continue; } - try - { + try { $res = include_once $dir.$file; // A class already exists in a different file will send a non catchable fatal error. if (class_exists($modName)) { @@ -376,9 +366,7 @@ foreach ($modulesdir as $dir) if ($publisher) { $arrayofnatures['external_'.$publisher] = $langs->trans("External").' - '.$publisher; - } - else - { + } else { $arrayofnatures['external_'] = $langs->trans("External").' - '.$langs->trans("UnknownPublishers"); } } @@ -431,20 +419,15 @@ foreach ($modulesdir as $dir) else $categ[$specialstring] = 1; $j++; $i++; - } - else dol_syslog("Module ".get_class($objMod)." not qualified"); - } - catch (Exception $e) + } else dol_syslog("Module ".get_class($objMod)." not qualified"); + } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } - } - else - { + } else { print "Warning bad descriptor file : ".$dir.$file." (Class ".$modName." not found into file)
"; } - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog("Failed to load ".$dir.$file." ".$e->getMessage(), LOG_ERR); } @@ -452,9 +435,7 @@ foreach ($modulesdir as $dir) } } closedir($handle); - } - else - { + } else { dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING); } } @@ -479,8 +460,9 @@ asort($orders); //var_dump($modules); $nbofactivatedmodules = count($conf->modules); -$moreinfo = $langs->trans("TotalNumberOfActivatedModules", ($nbofactivatedmodules - 1), count($modules)); -if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule")); +$moreinfo = $langs->trans("TitleNumberOfActivatedModules"); +$moreinfo2 = ($nbofactivatedmodules - 1)." / ".count($modules); +if ($nbofactivatedmodules <= 1) $moreinfo2 .= ' '.img_warning($langs->trans("YouMustEnableOneModule")); print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup'); @@ -515,11 +497,19 @@ if ($mode == 'common' || $mode == 'commonkanban') dol_fiche_head($head, $newmode, '', -1); $moreforfilter = '
'; + + $moreforfilter .= ''; + + $moreforfilter .= '
'.$moreinfo.'
'.$moreinfo2.'
'; + $moreforfilter .= '
'; - $moreforfilter .= '
'; + $moreforfilter .= '
'; $moreforfilter .= $langs->trans('Keyword').': '; $moreforfilter .= '
'; - $moreforfilter .= '
'; + $moreforfilter .= '
'; $moreforfilter .= $langs->trans('Origin').': '.$form->selectarray('search_nature', $arrayofnatures, dol_escape_htmltag($search_nature), 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); $moreforfilter .= '
'; if (!empty($conf->global->MAIN_FEATURES_LEVEL)) @@ -528,11 +518,11 @@ if ($mode == 'common' || $mode == 'commonkanban') if ($conf->global->MAIN_FEATURES_LEVEL < 0) $array_version['deprecated'] = $langs->trans("Deprecated"); if ($conf->global->MAIN_FEATURES_LEVEL > 0) $array_version['experimental'] = $langs->trans("Experimental"); if ($conf->global->MAIN_FEATURES_LEVEL > 1) $array_version['development'] = $langs->trans("Development"); - $moreforfilter .= '
'; + $moreforfilter .= '
'; $moreforfilter .= $langs->trans('Version').': '.$form->selectarray('search_version', $array_version, $search_version, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); $moreforfilter .= '
'; } - $moreforfilter .= '
'; + $moreforfilter .= '
'; $moreforfilter .= $langs->trans('Status').': '.$form->selectarray('search_status', array('active'=>$langs->transnoentitiesnoconv("Enabled"), 'disabled'=>$langs->transnoentitiesnoconv("Disabled")), $search_status, 1, 0, 0, '', 0, 0, 0, '', 'maxwidth100'); $moreforfilter .= '
'; $moreforfilter .= ' '; @@ -543,13 +533,6 @@ if ($mode == 'common' || $mode == 'commonkanban') $moreforfilter .= '
'; $moreforfilter .= '
'; - $moreforfilter .= '
'; - $moreforfilter .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=commonkanban'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'common' ? '' : ' btnTitleSelected'))); - $moreforfilter .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-list-alt paddingleft imgforviewmode', $_SERVER["PHP_SELF"].'?mode=common'.$param, '', 1, array('morecss'=>'reposition'.($mode == 'commonkanban' ? '' : ' btnTitleSelected'))); - $moreforfilter .= '
'; - - $moreforfilter .= '
'.$moreinfo.'
'; - $moreforfilter .= '
'; if (!empty($moreforfilter)) @@ -708,8 +691,7 @@ if ($mode == 'common' || $mode == 'commonkanban') if (!empty($objMod->disabled)) { $codeenabledisable .= $langs->trans("Disabled"); - } - elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) + } elseif (!empty($objMod->always_enabled) || ((!empty($conf->multicompany->enabled) && $objMod->core_enabled) && ($user->entity || $conf->entity != 1))) { if (method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) $codeenabledisable .= $langs->trans("Used"); else { @@ -717,15 +699,12 @@ if ($mode == 'common' || $mode == 'commonkanban') //print $langs->trans("Required"); } if (!empty($conf->multicompany->enabled) && $user->entity) $disableSetup++; - } - else - { + } else { if (!empty($objMod->warnings_unactivation[$mysoc->country_code]) && method_exists($objMod, 'alreadyUsed') && $objMod->alreadyUsed()) { $codeenabledisable .= 'warnings_unactivation[$mysoc->country_code].'&value='.$modName.'&mode='.$mode.$param.'">'; $codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on'); $codeenabledisable .= ''; - } - else { + } else { $codeenabledisable .= ''; $codeenabledisable .= img_picto($langs->trans("Activated"), 'switch_on'); $codeenabledisable .= ''; @@ -753,49 +732,36 @@ if ($mode == 'common' || $mode == 'commonkanban') { $codetoconfig .= ''.img_picto(ucfirst($page), "setup").''; // print ''.ucfirst($page).' '; - } - else - { + } else { if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) { $urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1); $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; - } - else - { + } else { $urltouse = $urlpage; $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; } } } - } - elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) + } elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) { $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; - } - else - { + } else { $codetoconfig .= ''.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"', false, 0, 0, '', 'fa-15').''; } - } - else - { + } else { $codetoconfig .= img_picto($langs->trans("NothingToSetup"), "setup", 'class="opacitytransp" style="padding-right: 6px"', false, 0, 0, '', 'fa-15'); } - } - else // Module not yet activated + } else // Module not yet activated { // Set $codeenabledisable if (!empty($objMod->always_enabled)) { // Should never happened - } - elseif (!empty($objMod->disabled)) + } elseif (!empty($objMod->disabled)) { $codeenabledisable .= $langs->trans("Disabled"); - } - else - { + } else { // Module qualified for activation $warningmessage = ''; if (!empty($arrayofwarnings[$modName])) @@ -831,7 +797,7 @@ if ($mode == 'common' || $mode == 'commonkanban') } } $codeenabledisable .= ''."\n"; - $codeenabledisable .= 'trans("Disabled"), 'switch_off'); @@ -858,9 +824,7 @@ if ($mode == 'common' || $mode == 'commonkanban') { if (preg_match('/^\//i', $objMod->picto)) print img_picto($alttext, $objMod->picto, 'class="valignmiddle pictomodule paddingrightonly"', 1); else print img_object($alttext, $objMod->picto, 'class="valignmiddle pictomodule paddingrightonly"'); - } - else - { + } else { print img_object($alttext, 'generic', 'class="valignmiddle paddingrightonly"'); } print ' '.$objMod->getName().''; @@ -1029,9 +993,7 @@ if ($mode == 'deploy') { $message = info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT)); $allowfromweb = -1; - } - else - { + } else { if ($dirins_ok) { if (!is_writable(dol_osencode($dirins))) @@ -1040,16 +1002,12 @@ if ($mode == 'deploy') $message = info_admin($langs->trans("ErrorFailedToWriteInDir", $dirins), 0, 0, '1', 'warning'); $allowfromweb = 0; } - } - else - { + } else { $message = info_admin($langs->trans("NotExistsDirect", $dirins).$langs->trans("InfDirAlt").$langs->trans("InfDirExample")); $allowfromweb = 0; } } - } - else - { + } else { $message = info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock')); $allowfromweb = 0; } @@ -1069,9 +1027,7 @@ if ($mode == 'deploy') if ($allowfromweb == 1) { //print $langs->trans("ThisIsProcessToFollow").'
'; - } - else - { + } else { print $langs->trans("ThisIsAlternativeProcessToFollow").'
'; print ''.$langs->trans("StepNb", 1).': '; print $langs->trans("FindPackageFromWebSite", $fullurl).'
'; @@ -1151,9 +1107,7 @@ if ($mode == 'deploy') print ' '; print info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphptoshow, $maxphptoshowparam), 1); } - } - else - { + } else { print ' ('.$langs->trans("UploadDisabled").')'; } @@ -1163,9 +1117,7 @@ if ($mode == 'deploy') print '
'; print '
'; - } - else - { + } else { print $langs->trans("UnpackPackageInModulesRoot", $dirins).'
'; print ''.$langs->trans("StepNb", 4).': '; print $langs->trans("SetupIsReadyForUse").'
'; diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index 9c59b5cf6da..863633176bd 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('admin', 'errors', 'mrp', 'other')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -56,16 +56,12 @@ if ($action == 'updateMask') if (!$res > 0) $error++; if (!$error) - { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans("Error"), null, 'errors'); - } -} - -elseif ($action == 'specimen') + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); @@ -77,7 +73,7 @@ elseif ($action == 'specimen') $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); foreach ($dirmodels as $reldir) { - $file = dol_buildpath($reldir."core/modules/mrp/doc/pdf_".$modele.".modules.php", 0); + $file = dol_buildpath($reldir."core/modules/mrp/doc/pdf_".$modele.".modules.php", 0); if (file_exists($file)) { $filefound = 1; @@ -96,15 +92,11 @@ elseif ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=mrp&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, null, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -114,14 +106,12 @@ elseif ($action == 'specimen') elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { - if ($conf->global->MRP_MO_ADDON_PDF == "$value") dolibarr_del_const($db, 'MRP_MO_ADDON_PDF', $conf->entity); + if ($conf->global->MRP_MO_ADDON_PDF == "$value") dolibarr_del_const($db, 'MRP_MO_ADDON_PDF', $conf->entity); } } @@ -141,17 +131,13 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmod') +} elseif ($action == 'setmod') { // TODO Check if numbering module chosen can be activated // by calling method canBeActivated dolibarr_set_const($db, "MRP_MO_ADDON", $value, 'chaine', 0, '', $conf->entity); -} - -elseif ($action == 'set_MRP_MO_DRAFT_WATERMARK') +} elseif ($action == 'set_MRP_MO_DRAFT_WATERMARK') { $draft = GETPOST("MRP_MO_DRAFT_WATERMARK"); $res = dolibarr_set_const($db, "MRP_MO_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); @@ -159,31 +145,25 @@ elseif ($action == 'set_MRP_MO_DRAFT_WATERMARK') if (!$res > 0) $error++; if (!$error) - { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans("Error"), null, 'errors'); - } -} - -elseif ($action == 'set_MRP_MO_FREE_TEXT') + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } +} elseif ($action == 'set_MRP_MO_FREE_TEXT') { - $freetext = GETPOST("MRP_MO_FREE_TEXT", 'none'); // No alpha here, we want exact string + $freetext = GETPOST("MRP_MO_FREE_TEXT", 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "MRP_MO_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; if (!$error) - { - setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { - setEventMessages($langs->trans("Error"), null, 'errors'); - } + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } else { + setEventMessages($langs->trans("Error"), null, 'errors'); + } } @@ -232,7 +212,7 @@ foreach ($dirmodels as $reldir) { while (($file = readdir($handle)) !== false) { - if (substr($file, 0, 7) == 'mod_mo_' && substr($file, dol_strlen($file) - 3, 3) == 'php') + if (substr($file, 0, 7) == 'mod_mo_' && substr($file, dol_strlen($file) - 3, 3) == 'php') { $file = substr($file, 0, dol_strlen($file) - 4); @@ -250,22 +230,20 @@ foreach ($dirmodels as $reldir) print $module->info(); print ''; - // Show example of numbering model - print ''; - $tmp = $module->getExample(); - if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); - else print $tmp; - print ''."\n"; + // Show example of numbering model + print ''; + $tmp = $module->getExample(); + if (preg_match('/^Error/', $tmp)) print '
'.$langs->trans($tmp).'
'; + elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + else print $tmp; + print ''."\n"; print ''; if ($conf->global->MRP_MO_ADDON == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { - print '
'; + } else { + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } @@ -279,16 +257,16 @@ foreach ($dirmodels as $reldir) $htmltooltip .= ''.$langs->trans("Version").': '.$module->getVersion().'
'; $mrp->type = 0; $nextval = $module->getNextValue($mysoc, $mrp); - if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval - $htmltooltip .= ''.$langs->trans("NextValue").': '; - if ($nextval) { - if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') - $nextval = $langs->trans($nextval); - $htmltooltip .= $nextval.'
'; - } else { - $htmltooltip .= $langs->trans($module->error).'
'; - } - } + if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval + $htmltooltip .= ''.$langs->trans("NextValue").': '; + if ($nextval) { + if (preg_match('/^Error/', $nextval) || $nextval == 'NotConfigured') + $nextval = $langs->trans($nextval); + $htmltooltip .= $nextval.'
'; + } else { + $htmltooltip .= $langs->trans($module->error).'
'; + } + } print ''; print $form->textwithpicto('', $htmltooltip, 1, 0); @@ -315,7 +293,7 @@ print load_fiche_titre($langs->trans("MOsModelModule"), '', ''); $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql .= " WHERE type = '".$type."'"; +$sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -328,9 +306,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -349,114 +325,108 @@ clearstatcache(); foreach ($dirmodels as $reldir) { - foreach (array('', '/doc') as $valdir) - { - $realpath = $reldir."core/modules/mrp".$valdir; - $dir = dol_buildpath($realpath); + foreach (array('', '/doc') as $valdir) + { + $realpath = $reldir."core/modules/mrp".$valdir; + $dir = dol_buildpath($realpath); - if (is_dir($dir)) - { - $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - $filelist[] = $file; - } - closedir($handle); - arsort($filelist); + if (is_dir($dir)) + { + $handle = opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle)) !== false) + { + $filelist[] = $file; + } + closedir($handle); + arsort($filelist); - foreach ($filelist as $file) - { - if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) - { - if (file_exists($dir.'/'.$file)) - { - $name = substr($file, 4, dol_strlen($file) - 16); - $classname = substr($file, 0, dol_strlen($file) - 12); + foreach ($filelist as $file) + { + if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) + { + if (file_exists($dir.'/'.$file)) + { + $name = substr($file, 4, dol_strlen($file) - 16); + $classname = substr($file, 0, dol_strlen($file) - 12); - require_once $dir.'/'.$file; - $module = new $classname($db); + require_once $dir.'/'.$file; + $module = new $classname($db); - $modulequalified = 1; - if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0; - if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; + $modulequalified = 1; + if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0; + if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; - if ($modulequalified) - { - print ''; - print (empty($module->name) ? $name : $module->name); - print "\n"; - if (method_exists($module, 'info')) print $module->info($langs); - else print $module->description; - print ''; + if ($modulequalified) + { + print ''; + print (empty($module->name) ? $name : $module->name); + print "\n"; + if (method_exists($module, 'info')) print $module->info($langs); + else print $module->description; + print ''; - // Active - if (in_array($name, $def)) - { - print ''."\n"; - print ''; - print img_picto($langs->trans("Enabled"), 'switch_on'); - print ''; - print ''; - } - else - { - print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; - print ""; - } + // Active + if (in_array($name, $def)) + { + print ''."\n"; + print ''; + print img_picto($langs->trans("Enabled"), 'switch_on'); + print ''; + print ''; + } else { + print ''."\n"; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print ""; + } - // Default - print ''; - if ($conf->global->MRP_MO_ADDON_PDF == $name) - { - print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; - } - print ''; + // Default + print ''; + if ($conf->global->MRP_MO_ADDON_PDF == $name) + { + print img_picto($langs->trans("Default"), 'on'); + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } + print ''; - // Info - $htmltooltip = ''.$langs->trans("Name").': '.$module->name; - $htmltooltip .= '
'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); - if ($module->type == 'pdf') - { - $htmltooltip .= '
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; - } - $htmltooltip .= '
'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; + // Info + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; + $htmltooltip .= '
'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); + if ($module->type == 'pdf') + { + $htmltooltip .= '
'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; + } + $htmltooltip .= '
'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file; - $htmltooltip .= '

'.$langs->trans("FeaturesSupported").':'; - $htmltooltip .= '
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); - $htmltooltip .= '
'.$langs->trans("WatermarkOnDraftMOs").': '.yn($module->option_draft_watermark, 1, 1); + $htmltooltip .= '

'.$langs->trans("FeaturesSupported").':'; + $htmltooltip .= '
'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); + $htmltooltip .= '
'.$langs->trans("WatermarkOnDraftMOs").': '.yn($module->option_draft_watermark, 1, 1); - print ''; - print $form->textwithpicto('', $htmltooltip, 1, 0); - print ''; + print ''; + print $form->textwithpicto('', $htmltooltip, 1, 0); + print ''; - // Preview - print ''; - if ($module->type == 'pdf') - { - print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { - print img_object($langs->trans("PreviewNotAvailable"), 'generic'); - } - print ''; + // Preview + print ''; + if ($module->type == 'pdf') + { + print ''.img_object($langs->trans("Preview"), 'bill').''; + } else { + print img_object($langs->trans("PreviewNotAvailable"), 'generic'); + } + print ''; - print "\n"; - } - } - } - } - } - } - } + print "\n"; + } + } + } + } + } + } + } } print ''; @@ -488,13 +458,11 @@ print $form->textwithpicto($langs->trans("FreeLegalTextOnMOs"), $langs->trans("A $variablename = 'MRP_MO_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { - print ''; -} -else -{ - include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); - print $doleditor->Create(); + print ''; +} else { + include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); + print $doleditor->Create(); } print ''; print ''; diff --git a/htdocs/admin/mrp_extrafields.php b/htdocs/admin/mrp_extrafields.php index 55df2a065d0..b0bd0e522ab 100644 --- a/htdocs/admin/mrp_extrafields.php +++ b/htdocs/admin/mrp_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'mrp_mo'; @@ -68,7 +68,7 @@ $linkback = 'trans("ExtraFields"), -1, 'account'); diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 4ba581398ee..a447551b04e 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -38,7 +38,7 @@ if (!$user->admin) { } // Parameters -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); /* @@ -53,9 +53,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) if (dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity) > 0) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -66,9 +64,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) if (dolibarr_del_const($db, $code, 0) > 0) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -96,11 +92,9 @@ if ($action == 'add_currency') { if ($currency->addRate($rate)) setEventMessages($langs->trans('RecordSaved'), array()); else setEventMessages($langs->trans('ErrorAddRateFail'), array(), 'errors'); - } - else setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors'); + } else setEventMessages($langs->trans('ErrorAddCurrencyFail'), $currency->errors, 'errors'); } -} -elseif ($action == 'update_currency') +} elseif ($action == 'update_currency') { $error = 0; @@ -125,8 +119,7 @@ elseif ($action == 'update_currency') } } } - } - elseif (GETPOST('deletecurrency', 'alpha')) + } elseif (GETPOST('deletecurrency', 'alpha')) { $fk_multicurrency = GETPOST('fk_multicurrency', 'int'); $currency = new MultiCurrency($db); @@ -137,17 +130,14 @@ elseif ($action == 'update_currency') else setEventMessages($langs->trans('ErrorDeleteCurrencyFail'), array(), 'errors'); } } -} -elseif ($action == 'setapilayer') +} elseif ($action == 'setapilayer') { if (GETPOSTISSET('modify_apilayer')) { dolibarr_set_const($db, 'MULTICURRENCY_APP_ID', GETPOST('MULTICURRENCY_APP_ID', 'alpha')); dolibarr_set_const($db, 'MULTICURRENCY_APP_SOURCE', GETPOST('MULTICURRENCY_APP_SOURCE', 'alpha')); //dolibarr_set_const($db, 'MULTICURRENCY_ALTERNATE_SOURCE', GETPOST('MULTICURRENCY_ALTERNATE_SOURCE', 'alpha')); - } - else - { + } else { $result = MultiCurrency::syncRates($conf->global->MULTICURRENCY_APP_ID); if ($result > 0) { setEventMessages($langs->trans("CurrencyRateSyncSucceed"), null, "mesgs"); diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index ba92aa1ec21..b484e7acea9 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -84,9 +84,7 @@ if ($action == 'settemplates') $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); @@ -97,7 +95,7 @@ if ($action == 'setvalue' && $user->admin) { $db->begin(); - $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "none"), 'chaine', 0, '', $conf->entity); + $result = dolibarr_set_const($db, "NOTIFICATION_EMAIL_FROM", GETPOST("email_from", "restricthtml"), 'chaine', 0, '', $conf->entity); if ($result < 0) $error++; @@ -106,9 +104,7 @@ if ($action == 'setvalue' && $user->admin) $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); @@ -140,8 +136,7 @@ if ($action == 'setfixednotif' && $user->admin) $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); $newval = GETPOST($shortkey.'_key'); //print $newkey.' - '.$newval.'
'; - } - elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) + } elseif (preg_match('/^NOTIF_(.*)_new_key/', $key, $reg)) { // Add a new entry $newkey = 'NOTIFICATION_FIXEDEMAIL_'.$reg[1].'_THRESHOLD_HIGHER_'.((int) GETPOST($shortkey.'_amount')); @@ -160,9 +155,7 @@ if ($action == 'setfixednotif' && $user->admin) $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index 785a77ac043..8b0e9516abd 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -40,7 +40,7 @@ $langs->loadLangs(array('admin', 'oauth')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); /* @@ -119,9 +119,7 @@ foreach ($list as $key) print ''.$langs->trans("UseTheFollowingUrlAsRedirectURI").''; print ''; print ''; - } - else - { + } else { print ''; print ''.$langs->trans("UseTheFollowingUrlAsRedirectURI").''; print ''.$langs->trans("FeatureNotYetSupported").''; diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index d8c65f9a2c5..2c8f2070724 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -1,6 +1,7 @@ * Copyright (C) 2014-2018 Frederic France + * Copyright (C) 2020 Nicolas ZABOURI * * 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 @@ -33,7 +34,7 @@ $langs->loadLangs(array('admin', 'printing', 'oauth')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $mode = GETPOST('mode', 'alpha'); $value = GETPOST('value', 'alpha'); $varname = GETPOST('varname', 'alpha'); @@ -57,54 +58,50 @@ if (!$mode) $mode = 'setup'; if ($action == 'setconst' && $user->admin) { - $error = 0; - $db->begin(); + $error = 0; + $db->begin(); - $setupconstarray = GETPOST('setupdriver', 'array'); + $setupconstarray = GETPOST('setupdriver', 'array'); - foreach ($setupconstarray as $setupconst) { - //print '
'.print_r($setupconst, true).'
'; + foreach ($setupconstarray as $setupconst) { + //print '
'.print_r($setupconst, true).'
'; - $constname = dol_escape_htmltag($setupconst['varname']); - $constvalue = dol_escape_htmltag($setupconst['value']); - $consttype = dol_escape_htmltag($setupconst['type']); - $constnote = dol_escape_htmltag($setupconst['note']); + $constname = dol_escape_htmltag($setupconst['varname']); + $constvalue = dol_escape_htmltag($setupconst['value']); + $consttype = dol_escape_htmltag($setupconst['type']); + $constnote = dol_escape_htmltag($setupconst['note']); - $result = dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote, $conf->entity); - if (!$result > 0) $error++; - } + $result = dolibarr_set_const($db, $constname, $constvalue, $consttype, 0, $constnote, $conf->entity); + if (!$result > 0) $error++; + } - if (!$error) - { - $db->commit(); - setEventMessages($langs->trans("SetupSaved"), null); - } - else - { - $db->rollback(); - dol_print_error($db); - } - $action = ''; + if (!$error) + { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null); + } else { + $db->rollback(); + dol_print_error($db); + } + $action = ''; } if ($action == 'setvalue' && $user->admin) { - $db->begin(); + $db->begin(); - $result = dolibarr_set_const($db, $varname, $value, 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + $result = dolibarr_set_const($db, $varname, $value, 'chaine', 0, '', $conf->entity); + if (!$result > 0) $error++; - if (!$error) - { - $db->commit(); - setEventMessages($langs->trans("SetupSaved"), null); - } - else - { - $db->rollback(); - dol_print_error($db); - } - $action = ''; + if (!$error) + { + $db->commit(); + setEventMessages($langs->trans("SetupSaved"), null); + } else { + $db->rollback(); + dol_print_error($db); + } + $action = ''; } @@ -134,283 +131,275 @@ if (GETPOST('error')) { if ($mode == 'setup' && $user->admin) { - print ''.$langs->trans("OAuthSetupForLogin")."

\n"; + print ''.$langs->trans("OAuthSetupForLogin")."

\n"; - foreach ($list as $key) - { - $supported = 0; - if (in_array($key[0], array_keys($supportedoauth2array))) $supported = 1; - if (!$supported) continue; // show only supported + foreach ($list as $key) + { + $supported = 0; + if (in_array($key[0], array_keys($supportedoauth2array))) $supported = 1; + if (!$supported) continue; // show only supported - $OAUTH_SERVICENAME = 'Unknown'; - if ($key[0] == 'OAUTH_GITHUB_NAME') - { - $OAUTH_SERVICENAME = 'GitHub'; - // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). - // We pass this param list in to 'state' because we need it before and after the redirect. - $shortscope = 'user,public_repo'; - $urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltocheckperms = 'https://github.com/settings/applications/'; - } - elseif ($key[0] == 'OAUTH_GOOGLE_NAME') - { - $OAUTH_SERVICENAME = 'Google'; - // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). - // We pass this param list in to 'state' because we need it before and after the redirect. - $shortscope = 'userinfo_email,userinfo_profile,cloud_print'; - //$scope.=',gmail_full'; - $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltocheckperms = 'https://security.google.com/settings/security/permissions'; - } - elseif ($key[0] == 'OAUTH_STRIPE_TEST_NAME') - { - $OAUTH_SERVICENAME = 'StripeTest'; - $urltorenew = $urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltodelete = ''; - $urltocheckperms = ''; - } - elseif ($key[0] == 'OAUTH_STRIPE_LIVE_NAME') - { - $OAUTH_SERVICENAME = 'StripeLive'; - $urltorenew = $urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); - $urltodelete = ''; - $urltocheckperms = ''; - } - else + $OAUTH_SERVICENAME = 'Unknown'; + if ($key[0] == 'OAUTH_GITHUB_NAME') { + $OAUTH_SERVICENAME = 'GitHub'; + // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). + // We pass this param list in to 'state' because we need it before and after the redirect. + $shortscope = 'user,public_repo'; + $urltorenew = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete = $urlwithroot.'/core/modules/oauth/github_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltocheckperms = 'https://github.com/settings/applications/'; + } elseif ($key[0] == 'OAUTH_GOOGLE_NAME') + { + $OAUTH_SERVICENAME = 'Google'; + // List of keys that will be converted into scopes (from constants 'SCOPE_state_in_uppercase' in file of service). + // We pass this param list in to 'state' because we need it before and after the redirect. + $shortscope = 'userinfo_email,userinfo_profile,cloud_print'; + if (!empty($conf->global->OAUTH_GSUITE)){ + $shortscope .= ',admin_directory_user'; + } + //$scope.=',gmail_full'; + $urltorenew = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?shortscope='.$shortscope.'&state='.$shortscope.'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete = $urlwithroot.'/core/modules/oauth/google_oauthcallback.php?action=delete&token='.newToken().'&backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltocheckperms = 'https://security.google.com/settings/security/permissions'; + } elseif ($key[0] == 'OAUTH_STRIPE_TEST_NAME') + { + $OAUTH_SERVICENAME = 'StripeTest'; + $urltorenew = $urlwithroot.'/core/modules/oauth/stripetest_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete = ''; + $urltocheckperms = ''; + } elseif ($key[0] == 'OAUTH_STRIPE_LIVE_NAME') + { + $OAUTH_SERVICENAME = 'StripeLive'; + $urltorenew = $urlwithroot.'/core/modules/oauth/stripelive_oauthcallback.php?backtourl='.urlencode(DOL_URL_ROOT.'/admin/oauthlogintokens.php'); + $urltodelete = ''; + $urltocheckperms = ''; + } else { $urltorenew = ''; $urltodelete = ''; $urltocheckperms = ''; } - // Show value of token - $tokenobj = null; - // Token - require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; - require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; - // Dolibarr storage - $storage = new DoliStorage($db, $conf); - try - { - $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); - } - catch (Exception $e) - { - // Return an error if token not found - } + // Show value of token + $tokenobj = null; + // Token + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; + require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php'; + // Dolibarr storage + $storage = new DoliStorage($db, $conf); + try { + $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME); + } catch (Exception $e) + { + // Return an error if token not found + } - // Set other properties - $refreshtoken = false; - $expiredat = ''; + // Set other properties + $refreshtoken = false; + $expiredat = ''; - $expire = false; - // Is token expired or will token expire in the next 30 seconds - if (is_object($tokenobj)) { - $expire = ($tokenobj->getEndOfLife() !== $tokenobj::EOL_NEVER_EXPIRES && $tokenobj->getEndOfLife() !== $tokenobj::EOL_UNKNOWN && time() > ($tokenobj->getEndOfLife() - 30)); - } + $expire = false; + // Is token expired or will token expire in the next 30 seconds + if (is_object($tokenobj)) { + $expire = ($tokenobj->getEndOfLife() !== $tokenobj::EOL_NEVER_EXPIRES && $tokenobj->getEndOfLife() !== $tokenobj::EOL_UNKNOWN && time() > ($tokenobj->getEndOfLife() - 30)); + } - if ($key[1] != '' && $key[2] != '') { - if (is_object($tokenobj)) { - $refreshtoken = $tokenobj->getRefreshToken(); + if ($key[1] != '' && $key[2] != '') { + if (is_object($tokenobj)) { + $refreshtoken = $tokenobj->getRefreshToken(); - $endoflife = $tokenobj->getEndOfLife(); - if ($endoflife == $tokenobj::EOL_NEVER_EXPIRES) - { - $expiredat = $langs->trans("Never"); - } - elseif ($endoflife == $tokenobj::EOL_UNKNOWN) - { - $expiredat = $langs->trans("Unknown"); - } - else - { - $expiredat = dol_print_date($endoflife, "dayhour"); - } - } - } + $endoflife = $tokenobj->getEndOfLife(); + if ($endoflife == $tokenobj::EOL_NEVER_EXPIRES) + { + $expiredat = $langs->trans("Never"); + } elseif ($endoflife == $tokenobj::EOL_UNKNOWN) + { + $expiredat = $langs->trans("Unknown"); + } else { + $expiredat = dol_print_date($endoflife, "dayhour"); + } + } + } - $submit_enabled = 0; + $submit_enabled = 0; - print '
'; - print ''; - print ''; + print ''; + print ''; + print ''; - print ''."\n"; + print '
'."\n"; - print ''; - print ''; - print ''; - print ''; - print "\n"; + print ''; + print ''; + print ''; + print ''; + print "\n"; - print ''; - print ''; - //var_dump($key); - print $langs->trans("OAuthIDSecret").''; - print ''; - print ''; - print ''."\n"; + print ''; + print ''; + //var_dump($key); + print $langs->trans("OAuthIDSecret").''; + print ''; + print ''; + print ''."\n"; - print ''; - print ''; - //var_dump($key); - print $langs->trans("IsTokenGenerated"); - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + //var_dump($key); + print $langs->trans("IsTokenGenerated"); + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - //var_dump($key); - print $langs->trans("Token").''; - print ''; - print ''."\n"; + } + print ''; + print ''."\n"; - if (is_object($tokenobj)) - { - // Token refresh - print ''; - print ''; - //var_dump($key); - print $langs->trans("TOKEN_REFRESH").''; - print ''; - print ''; + if (is_object($tokenobj)) + { + // Token refresh + print ''; + print ''; + //var_dump($key); + print $langs->trans("TOKEN_REFRESH").''; + print ''; + print ''; - // Token expired - print ''; - print ''; - //var_dump($key); - print $langs->trans("TOKEN_EXPIRED").''; - print ''; - print ''; + // Token expired + print ''; + print ''; + //var_dump($key); + print $langs->trans("TOKEN_EXPIRED").''; + print ''; + print ''; - // Token expired at - print ''; - print ''; - //var_dump($key); - print $langs->trans("TOKEN_EXPIRE_AT").''; - print ''; - print ''; - } + // Token expired at + print ''; + print ''; + //var_dump($key); + print $langs->trans("TOKEN_EXPIRE_AT").''; + print ''; + print ''; + } - print '
'.$langs->trans($key[0]).'
'.$langs->trans($key[0]).'
'; - print $langs->trans("SeePreviousTab"); - print ''; - print '
'; + print $langs->trans("SeePreviousTab"); + print ''; + print '
'; - if (is_object($tokenobj)) print $langs->trans("HasAccessToken"); - else print $langs->trans("NoAccessToken"); - print ''; - // Links to delete/checks token - if (is_object($tokenobj)) - { - //test on $storage->hasAccessToken($OAUTH_SERVICENAME) ? - print ''.$langs->trans('DeleteAccess').'
'; - } - // Request remote token - if ($urltorenew) - { - print ''.$langs->trans('RequestAccess').'
'; - } - // Check remote access - if ($urltocheckperms) - { - print '
'.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; - } - print '
'; + if (is_object($tokenobj)) print $langs->trans("HasAccessToken"); + else print $langs->trans("NoAccessToken"); + print ''; + // Links to delete/checks token + if (is_object($tokenobj)) + { + //test on $storage->hasAccessToken($OAUTH_SERVICENAME) ? + print ''.$langs->trans('DeleteAccess').'
'; + } + // Request remote token + if ($urltorenew) + { + print ''.$langs->trans('RequestAccess').'
'; + } + // Check remote access + if ($urltocheckperms) + { + print '
'.$langs->trans("ToCheckDeleteTokenOnProvider", $OAUTH_SERVICENAME).': '.$urltocheckperms.''; + } + print '
'; - if (is_object($tokenobj)) - { - //var_dump($tokenobj); - print $tokenobj->getAccessToken().'
'; - //print 'Refresh: '.$tokenobj->getRefreshToken().'
'; - //print 'EndOfLife: '.$tokenobj->getEndOfLife().'
'; - //var_dump($tokenobj->getExtraParams()); - /*print '
Extra:
';*/ - } - print '
'; - print yn($refreshtoken); - print '
'; + print yn($refreshtoken); + print '
'; - print yn($expire); - print '
'; + print yn($expire); + print '
'; - print $expiredat; - print '
'; + print $expiredat; + print '
'; + print ''; - if (!empty($driver)) - { - if ($submit_enabled) { - print '
'; - } - } + if (!empty($driver)) + { + if ($submit_enabled) { + print '
'; + } + } - print '
'; - } + print ''; + } } if ($mode == 'test' && $user->admin) { - print $langs->trans('PrintTestDesc'.$driver)."

\n"; + print $langs->trans('PrintTestDesc'.$driver)."

\n"; - print ''; - if (!empty($driver)) - { - require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php'; - $classname = 'printing_'.$driver; - $langs->load($driver); - $printer = new $classname($db); - //print '
'.print_r($printer, true).'
'; - if (count($printer->getlistAvailablePrinters())) { - if ($printer->listAvailablePrinters() == 0) { - print $printer->resprint; - } else { - setEventMessages($printer->error, $printer->errors, 'errors'); - } - } - else { - print $langs->trans('PleaseConfigureDriverfromList'); - } - } + print '
'; + if (!empty($driver)) + { + require_once DOL_DOCUMENT_ROOT.'/core/modules/printing/'.$driver.'.modules.php'; + $classname = 'printing_'.$driver; + $langs->load($driver); + $printer = new $classname($db); + //print '
'.print_r($printer, true).'
'; + if (count($printer->getlistAvailablePrinters())) { + if ($printer->listAvailablePrinters() == 0) { + print $printer->resprint; + } else { + setEventMessages($printer->error, $printer->errors, 'errors'); + } + } else { + print $langs->trans('PleaseConfigureDriverfromList'); + } + } - print '
'; + print ''; } if ($mode == 'userconf' && $user->admin) { - print $langs->trans('PrintUserConfDesc'.$driver)."

\n"; + print $langs->trans('PrintUserConfDesc'.$driver)."

\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - $sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid'; - $resql = $db->query($sql); - while ($row = $db->fetch_array($resql)) { - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - } - print '
'.$langs->trans("User").''.$langs->trans("PrintModule").''.$langs->trans("PrintDriver").''.$langs->trans("Printer").''.$langs->trans("PrinterLocation").''.$langs->trans("PrinterId").''.$langs->trans("NumberOfCopy").''.$langs->trans("Delete").'
'.$row['login'].''.$row['module'].''.$row['driver'].''.$row['printer_name'].''.$row['printer_location'].''.$row['printer_id'].''.$row['copy'].''.img_picto($langs->trans("Delete"), 'delete').'
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + $sql = 'SELECT p.rowid, p.printer_name, p.printer_location, p.printer_id, p.copy, p.module, p.driver, p.userid, u.login FROM '.MAIN_DB_PREFIX.'printing as p, '.MAIN_DB_PREFIX.'user as u WHERE p.userid=u.rowid'; + $resql = $db->query($sql); + while ($row = $db->fetch_array($resql)) { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + } + print '
'.$langs->trans("User").''.$langs->trans("PrintModule").''.$langs->trans("PrintDriver").''.$langs->trans("Printer").''.$langs->trans("PrinterLocation").''.$langs->trans("PrinterId").''.$langs->trans("NumberOfCopy").''.$langs->trans("Delete").'
'.$row['login'].''.$row['module'].''.$row['driver'].''.$row['printer_name'].''.$row['printer_location'].''.$row['printer_id'].''.$row['copy'].''.img_picto($langs->trans("Delete"), 'delete').'
'; } dol_fiche_end(); diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 2c72c55697f..1b2bb0c0cd0 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -45,7 +45,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'commande'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 55732a40a51..1f645241646 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -46,7 +46,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'commandedet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index e740150e1d5..92b5c9511d5 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -1,5 +1,6 @@ + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -31,7 +32,7 @@ $langs->loadLangs(array("admin", "other", "errors", "bills")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -55,9 +56,7 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -69,12 +68,13 @@ if ($action == 'setmod') if ($action == 'setparams') { - $freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS', 'none'); // No alpha here, we want exact string - + $freetext = GETPOST('FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS", $freetext, 'chaine', 0, '', $conf->entity); - if (!$res > 0) $error++; + $res = dolibarr_set_const($db, "PAYMENTS_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + if ($error) { setEventMessages($langs->trans("Error"), null, 'errors'); @@ -181,10 +181,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->PAYMENT_ADDON == $file || $conf->global->PAYMENT_ADDON.'.php' == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { - print '
'.img_picto($langs->trans("Disabled"), 'switch_off').''; + } else { + print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; @@ -253,6 +251,14 @@ print $form->selectyesno("FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS", $co print ''; print "\n"; +// Allow to group payments by mod in rapports +print ''; +print $langs->trans("GroupPaymentsByModOnReports"); +print ''; +print $form->selectyesno("PAYMENTS_REPORT_GROUP_BY_MOD", $conf->global->PAYMENTS_REPORT_GROUP_BY_MOD, 1); +print ''; +print "\n"; + print ''; print '
'; diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index 3464a0857b7..718e64e6446 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -36,7 +36,7 @@ $langs->loadLangs(array("admin", "withdrawals")); // Security check if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $type = 'paymentorder'; @@ -210,7 +210,7 @@ print load_fiche_titre($langs->trans("OrdersModelModule"),'',''); $def = array(); $sql = "SELECT nom"; $sql.= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql.= " WHERE type = '".$type."'"; +$sql.= " WHERE type = '".$db->escape($type)."'"; $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); if ($resql) @@ -291,7 +291,7 @@ foreach ($dirmodels as $reldir) if (in_array($name, $def)) { print ''."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"),'switch_on'); print ''; print ''; @@ -299,7 +299,7 @@ foreach ($dirmodels as $reldir) else { print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; print ""; } @@ -311,7 +311,7 @@ foreach ($dirmodels as $reldir) } else { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; } print ''; @@ -465,7 +465,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''.dolGetFirstLastname($obj->firstname,$obj->lastname).''; $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); print ''.$label.''; - print 'rowid.'">'.img_delete().''; + print 'rowid.'">'.img_delete().''; print ''; $i++; } diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 496a32923f7..363edca6c80 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -37,7 +37,7 @@ $langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); @@ -72,6 +72,7 @@ if ($action == 'update') dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"], 'chaine', 0, '', $conf->entity); + dolibarr_set_const($db, "MAIN_DOCUMENTS_LOGO_HEIGHT", GETPOST("MAIN_DOCUMENTS_LOGO_HEIGHT", 'int'), 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_INVERT_SENDER_RECIPIENT", $_POST["MAIN_INVERT_SENDER_RECIPIENT"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_PDF_USE_ISO_LOCATION", $_POST["MAIN_PDF_USE_ISO_LOCATION"], 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS"], 'chaine', 0, '', $conf->entity); @@ -82,24 +83,12 @@ if ($action == 'update') dolibarr_set_const($db, "PDF_USE_ALSO_LANGUAGE_CODE", GETPOST('PDF_USE_ALSO_LANGUAGE_CODE', 'alpha'), 'chaine', 0, '', $conf->entity); + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); exit; } -if ($action == 'activate_pdfsecurity') -{ - dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1", 'chaine', 0, '', $conf->entity); - header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); - exit; -} -elseif ($action == 'disable_pdfsecurity') -{ - dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION", $conf->entity); - header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup"); - exit; -} - /* @@ -120,9 +109,41 @@ $arraydetailsforpdffoot = array( 3 => $langs->transnoentitiesnoconv('DisplayCompanyInfoAndManagers') ); +$s = $langs->trans("LibraryToBuildPDF")."
"; +$i = 0; +$pdf = pdf_getInstance('A4'); +if (class_exists('FPDF') && !class_exists('TCPDF')) +{ + if ($i) $s .= ' + '; + $s .= 'FPDF'; + $s .= ' ('.@constant('FPDF_PATH').')'; + $i++; +} +if (class_exists('TCPDF')) +{ + if ($i) $s .= ' + '; + $s .= 'TCPDF'; + $s .= ' ('.@constant('TCPDF_PATH').')'; + $i++; +} +if (class_exists('FPDI')) +{ + if ($i) $s .= ' + '; + $s .= 'FPDI'; + $s .= ' ('.@constant('FPDI_PATH').')'; + $i++; +} +if (class_exists('TCPDI')) +{ + if ($i) $s .= ' + '; + $s .= 'TCPDI'; + $s .= ' ('.@constant('TCPDI_PATH').')'; + $i++; +} + print load_fiche_titre($langs->trans("PDF"), '', 'title_setup'); -print ''.$langs->trans("PDFDesc")."
\n"; +print ''.$form->textwithpicto($langs->trans("PDFDesc"), $s)."
\n"; print "
\n"; $noCountryCode = (empty($mysoc->country_code) ? true : false); @@ -189,9 +210,7 @@ for ($i = 1; $i <= 6; $i++) { $pid = $langs->transcountry("ProfId".$i, $mysoc->country_code); if ($pid == '-') $pid = false; - } - else - { + } else { $pid = img_warning().' '.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("CompanyCountry")).''; } if ($pid) @@ -264,6 +283,12 @@ print '
'; print ''; print ''; +// Height of logo + +print ''; + //Desc print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("MAIN_DOCUMENTS_LOGO_HEIGHT").''; +print ''; +print '
'.$langs->trans("HideDescOnPDF").''; @@ -312,62 +337,6 @@ print '
'; print '
'; - -/* - * Library - */ - -print '
'; -print load_fiche_titre($langs->trans("Library"), '', ''); - -print '
'; -print ''."\n"; - -print ''."\n"; -print ''."\n"; -print ''."\n"; -print "\n"; - -print ''."\n"; -print ''."\n"; -print ''."\n"; -print ''."\n"; - -print "
'.$langs->trans("Name").''.$langs->trans("Value").'
'.$langs->trans("LibraryToBuildPDF").''; -$i = 0; -$pdf = pdf_getInstance('A4'); -if (class_exists('FPDF') && !class_exists('TCPDF')) -{ - if ($i) print ' + '; - print 'FPDF'; - print ' ('.@constant('FPDF_PATH').')'; - $i++; -} -if (class_exists('TCPDF')) -{ - if ($i) print ' + '; - print 'TCPDF'; - print ' ('.@constant('TCPDF_PATH').')'; - $i++; -} -if (class_exists('FPDI')) -{ - if ($i) print ' + '; - print 'FPDI'; - print ' ('.@constant('FPDI_PATH').')'; - $i++; -} -if (class_exists('TCPDI')) -{ - if ($i) print ' + '; - print 'TCPDI'; - print ' ('.@constant('TCPDI_PATH').')'; - $i++; -} -print '
\n"; -print '
'; - - print '
'; print ''; print '
'; diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 0486edebeec..cd9d290b828 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -116,7 +116,7 @@ $db->commit(); $head = security_prepare_head(); -dol_fiche_head($head, 'default', $langs->trans("Security"), -1); +dol_fiche_head($head, 'default', '', -1); // Show warning about external users @@ -128,9 +128,10 @@ print ''; print ''; print ''; -print ''; print ''; +print ''; print ''; +if ($user->admin) print ''; print ''."\n"; //print "xx".$conf->global->MAIN_USE_ADVANCED_PERMS; @@ -178,7 +179,6 @@ if ($result) $found = false; foreach ($modules[$obj->module]->rights as $key => $val) { - $rights_class = $objMod->rights_class; if ($val[4] == $obj->perms && (empty($val[5]) || $val[5] == $obj->subperms)) { $found = true; @@ -209,6 +209,8 @@ if ($result) print ''; print ''; print ''; + // Permission id + if ($user->admin) print ''; print ''."\n"; } @@ -223,17 +225,21 @@ if ($result) // Tick if ($obj->bydefault == 1) { - print ''; print ''; - } - else - { - print ''; print ''; + // Permission id + if ($user->admin) print ''; + print ''."\n"; $i++; } -} -else dol_print_error($db); +} else dol_print_error($db); print '
'.$langs->trans("Module").' '.$langs->trans("Default").' '.$langs->trans("Permissions").''.$langs->trans("ID").'
   
'; - print ''.img_edit_remove().''; + print ''; + print ''; + //print img_edit_remove(); + print img_picto('', 'switch_on'); + print ''; print ''; - print img_picto($langs->trans("Active"), 'tick'); + //print img_picto($langs->trans("Active"), 'tick'); print ''; - print ''.img_edit_add().''; + } else { + print ''; + print ''; + //print img_edit_add(); + print img_picto('', 'switch_off'); + print ''; print ''; print ' '; @@ -243,12 +249,14 @@ if ($result) // Permission and tick print ''.$perm_libelle.''.$obj->id.'
'; print '
'; diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 0cfd03b7148..50d01924364 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -36,7 +36,7 @@ $langs->loadLangs(array("admin", "withdrawals")); // Security check if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $type = 'paymentorder'; @@ -70,8 +70,7 @@ if ($action == "set") $res = dolibarr_set_const($db, "PRELEVEMENT_RAISON_SOCIALE", $account->proprio,'chaine',0,'',$conf->entity); if (! $res > 0) $error++; */ - } - else $error++; + } else $error++; $res = dolibarr_set_const($db, "PRELEVEMENT_ICS", GETPOST("PRELEVEMENT_ICS"), 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; @@ -100,9 +99,7 @@ if ($action == "set") { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } @@ -220,7 +217,7 @@ print load_fiche_titre($langs->trans("OrdersModelModule"),'',''); $def = array(); $sql = "SELECT nom"; $sql.= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql.= " WHERE type = '".$type."'"; +$sql.= " WHERE type = '".$db->escape($type)."'"; $sql.= " AND entity = ".$conf->entity; $resql=$db->query($sql); if ($resql) @@ -301,7 +298,7 @@ foreach ($dirmodels as $reldir) if (in_array($name, $def)) { print ''."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"),'switch_on'); print ''; print ''; @@ -309,7 +306,7 @@ foreach ($dirmodels as $reldir) else { print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"),'switch_off').''; print ""; } @@ -321,7 +318,7 @@ foreach ($dirmodels as $reldir) } else { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'off').''; } print ''; @@ -475,7 +472,7 @@ if (! empty($conf->global->MAIN_MODULE_NOTIFICATION)) print ''.dolGetFirstLastname($obj->firstname,$obj->lastname).''; $label=($langs->trans("Notify_".$obj->code)!="Notify_".$obj->code?$langs->trans("Notify_".$obj->code):$obj->label); print ''.$label.''; - print 'rowid.'">'.img_delete().''; + print 'rowid.'">'.img_delete().''; print ''; $i++; } diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 73703829b8c..3b574956cd0 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -39,7 +39,7 @@ $langs->loadLangs(array("admin", "other", "errors", "propal")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -52,8 +52,7 @@ $type = 'propal'; include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php'; $error = 0; -if ($action == 'updateMask') -{ +if ($action == 'updateMask') { $maskconstpropal = GETPOST('maskconstpropal', 'alpha'); $maskpropal = GETPOST('maskpropal', 'alpha'); if ($maskconstpropal) $res = dolibarr_set_const($db, $maskconstpropal, $maskpropal, 'chaine', 0, '', $conf->entity); @@ -63,14 +62,10 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'specimen') -{ +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); $propal = new Propal($db); @@ -90,8 +85,7 @@ elseif ($action == 'specimen') } } - if ($filefound) - { + if ($filefound) { require_once $file; $module = new $classname($db); @@ -100,21 +94,15 @@ elseif ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=propal&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } -} -elseif ($action == 'setribchq') -{ +} elseif ($action == 'setribchq') { $rib = GETPOST('rib', 'alpha'); $chq = GETPOST('chq', 'alpha'); @@ -126,14 +114,10 @@ elseif ($action == 'setribchq') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'set_PROPALE_DRAFT_WATERMARK') -{ +} elseif ($action == 'set_PROPALE_DRAFT_WATERMARK') { $draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha'); $res = dolibarr_set_const($db, "PROPALE_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity); @@ -142,15 +126,11 @@ elseif ($action == 'set_PROPALE_DRAFT_WATERMARK') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'set_PROPOSAL_FREE_TEXT') -{ - $freetext = GETPOST('PROPOSAL_FREE_TEXT', 'none'); // No alpha here, we want exact string +} elseif ($action == 'set_PROPOSAL_FREE_TEXT') { + $freetext = GETPOST('PROPOSAL_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); @@ -159,14 +139,10 @@ elseif ($action == 'set_PROPOSAL_FREE_TEXT') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -elseif ($action == 'setdefaultduration') -{ +} elseif ($action == 'setdefaultduration') { $res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; @@ -174,59 +150,38 @@ elseif ($action == 'setdefaultduration') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} - -elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') -{ +} elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL') { $res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity); if (!$res > 0) $error++; - if (!$error) - { + if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} -// Activate a model -elseif ($action == 'set') -{ +} elseif ($action == 'set') { + // Activate a model $ret = addDocumentModel($value, $type, $label, $scandir); -} -elseif ($action == 'del') -{ +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { if ($conf->global->PROPALE_ADDON_PDF == "$value") dolibarr_del_const($db, 'PROPALE_ADDON_PDF', $conf->entity); } -} - -elseif ($action == 'setdoc') -{ - if (dolibarr_set_const($db, "PROPALE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) - { +} elseif ($action == 'setdoc') { + if (dolibarr_set_const($db, "PROPALE_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { $conf->global->PROPALE_ADDON_PDF = $value; } // On active le modele $ret = delDocumentModel($value, $type); - if ($ret > 0) - { + if ($ret > 0) { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmod') -{ +} elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -310,10 +265,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->PROPALE_ADDON == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { - print ''; + } else { + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } @@ -363,7 +316,7 @@ print load_fiche_titre($langs->trans("ProposalsPDFModules"), '', ''); $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql .= " WHERE type = '".$type."'"; +$sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -376,9 +329,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -444,15 +395,13 @@ foreach ($dirmodels as $reldir) if (in_array($name, $def)) { print ''."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; - } - else - { + } else { print "\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; } @@ -461,10 +410,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->PROPALE_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -496,9 +443,7 @@ foreach ($dirmodels as $reldir) if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { + } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } print ''; @@ -571,19 +516,14 @@ if (empty($conf->facture->enabled)) $i++; } print ""; - } - else - { + } else { print "".$langs->trans("NoActiveBankAccountDefined").""; } } - } - else - { + } else { print ''.$langs->trans("BankModuleNotActive").''; } -} -else { +} else { print ''.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).''; } print ""; @@ -620,8 +560,7 @@ if (empty($conf->facture->enabled)) } } print ""; -} -else { +} else { print ''.$langs->trans("SeeSetupOfModule", $langs->transnoentitiesnoconv("Module30Name")).''; } print ""; @@ -685,9 +624,7 @@ $variablename = 'PROPOSAL_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); @@ -724,11 +661,11 @@ if ($conf->banque->enabled) { if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL)) { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; } else { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } } print ''; diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index bf1283daa6d..795cbec5ede 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -94,7 +94,7 @@ print ''; $head = security_prepare_head(); -dol_fiche_head($head, 'proxy', $langs->trans("Security"), -1); +dol_fiche_head($head, 'proxy', '', -1); if ($conf->use_javascript_ajax) diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index 3cb6c4d68d1..350d4a3dc15 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -36,7 +36,7 @@ $langs->loadLangs(array("admin", "receiptprinter")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $mode = GETPOST('mode', 'alpha'); $printername = GETPOST('printername', 'alpha'); @@ -53,16 +53,16 @@ if (!$mode) $mode = 'config'; // used in library escpos maybe useful if php doesn't support gzdecode if (!function_exists('gzdecode')) { - /** - * Gzdecode - * - * @param string $data data to deflate - * @return string data deflated - */ - function gzdecode($data) - { - return gzinflate(substr($data, 10, -8)); - } + /** + * Gzdecode + * + * @param string $data data to deflate + * @return string data deflated + */ + function gzdecode($data) + { + return gzinflate(substr($data, 10, -8)); + } } @@ -71,171 +71,167 @@ if (!function_exists('gzdecode')) { */ if ($action == 'addprinter' && $user->admin) { - $error = 0; - if (empty($printername)) { - $error++; - setEventMessages($langs->trans("PrinterNameEmpty"), null, 'errors'); - } + $error = 0; + if (empty($printername)) { + $error++; + setEventMessages($langs->trans("PrinterNameEmpty"), null, 'errors'); + } - if (empty($parameter)) { - setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings'); - } + if (empty($parameter)) { + setEventMessages($langs->trans("PrinterParameterEmpty"), null, 'warnings'); + } - if (!$error) { - $db->begin(); - $result = $printer->addPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter); - if ($result > 0) $error++; + if (!$error) { + $db->begin(); + $result = $printer->addPrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter); + if ($result > 0) $error++; - if (!$error) - { - $db->commit(); - setEventMessages($langs->trans("PrinterAdded", $printername), null); - } - else - { - $db->rollback(); - dol_print_error($db); - } - } - $action = ''; + if (!$error) + { + $db->commit(); + setEventMessages($langs->trans("PrinterAdded", $printername), null); + } else { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; } if ($action == 'deleteprinter' && $user->admin) { - $error = 0; - if (empty($printerid)) { - $error++; - setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); - } + $error = 0; + if (empty($printerid)) { + $error++; + setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); + } - if (!$error) { - $db->begin(); - $result = $printer->deletePrinter($printerid); - if ($result > 0) $error++; + if (!$error) { + $db->begin(); + $result = $printer->deletePrinter($printerid); + if ($result > 0) $error++; - if (!$error) - { - $db->commit(); - setEventMessages($langs->trans("PrinterDeleted", $printername), null); - } - else - { - $db->rollback(); - dol_print_error($db); - } - } - $action = ''; + if (!$error) + { + $db->commit(); + setEventMessages($langs->trans("PrinterDeleted", $printername), null); + } else { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; } if ($action == 'updateprinter' && $user->admin) { - $error = 0; - if (empty($printerid)) { - $error++; - setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); - } + $error = 0; + if (empty($printerid)) { + $error++; + setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); + } - if (!$error) { - $db->begin(); - $result = $printer->updatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid); - if ($result > 0) $error++; + if (!$error) { + $db->begin(); + $result = $printer->updatePrinter($printername, GETPOST('printertypeid', 'int'), GETPOST('printerprofileid', 'int'), $parameter, $printerid); + if ($result > 0) $error++; - if (!$error) { - $db->commit(); - setEventMessages($langs->trans("PrinterUpdated", $printername), null); - } else { - $db->rollback(); - dol_print_error($db); - } - } - $action = ''; + if (!$error) { + $db->commit(); + setEventMessages($langs->trans("PrinterUpdated", $printername), null); + } else { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; } if ($action == 'testprinter' && $user->admin) { - $error = 0; - if (empty($printerid)) { - $error++; - setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); - } + $error = 0; + if (empty($printerid)) { + $error++; + setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); + } - if (!$error) { - // test - $ret = $printer->sendTestToPrinter($printerid); - if ($ret == 0) { - setEventMessages($langs->trans("TestSentToPrinter", $printername), null); - } else { - setEventMessages($printer->error, $printer->errors, 'errors'); - } - } - $action = ''; + if (!$error) { + // test + $ret = $printer->sendTestToPrinter($printerid); + if ($ret == 0) { + setEventMessages($langs->trans("TestSentToPrinter", $printername), null); + } else { + setEventMessages($printer->error, $printer->errors, 'errors'); + } + } + $action = ''; } if ($action == 'testtemplate' && $user->admin) { - $error = 0; - // if (empty($printerid)) { - // $error++; - // setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); - // } + $error = 0; + // if (empty($printerid)) { + // $error++; + // setEventMessages($langs->trans("PrinterIdEmpty"), null, 'errors'); + // } - // if (! $error) { + // if (! $error) { // test require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object = new Facture($db); //$object->initAsSpecimen(); $object->fetch(18); //var_dump($object->lines); - $ret = $printer->sendToPrinter($object, $templateid, 1); - if ($ret == 0) { - setEventMessages($langs->trans("TestTemplateToPrinter", $printername), null); - } else { - setEventMessages($printer->error, $printer->errors, 'errors'); - } - //} - $action = ''; + $ret = $printer->sendToPrinter($object, $templateid, 1); + if ($ret == 0) { + setEventMessages($langs->trans("TestTemplateToPrinter", $printername), null); + } else { + setEventMessages($printer->error, $printer->errors, 'errors'); + } + //} + $action = ''; } if ($action == 'updatetemplate' && $user->admin) { - $error = 0; - if (empty($templateid)) { - $error++; - setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors'); - } + $error = 0; + if (empty($templateid)) { + $error++; + setEventMessages($langs->trans("TemplateIdEmpty"), null, 'errors'); + } - if (!$error) { - $db->begin(); - $result = $printer->updateTemplate($templatename, $template, $templateid); - if ($result > 0) $error++; + if (!$error) { + $db->begin(); + $result = $printer->updateTemplate($templatename, $template, $templateid); + if ($result > 0) $error++; - if (!$error) { - $db->commit(); - setEventMessages($langs->trans("TemplateUpdated", $templatename), null); - } else { - $db->rollback(); - dol_print_error($db); - } - } - $action = ''; + if (!$error) { + $db->commit(); + setEventMessages($langs->trans("TemplateUpdated", $templatename), null); + } else { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; } if ($action == 'addtemplate' && $user->admin) { - $error = 0; - if (empty($templatename)) { - $error++; - setEventMessages($langs->trans("TemplateNameEmpty"), null, 'errors'); - } + $error = 0; + if (empty($templatename)) { + $error++; + setEventMessages($langs->trans("TemplateNameEmpty"), null, 'errors'); + } - if (!$error) { - $db->begin(); - $result = $printer->addTemplate($templatename, $template); - if ($result > 0) $error++; + if (!$error) { + $db->begin(); + $result = $printer->addTemplate($templatename, $template); + if ($result > 0) $error++; - if (!$error) { - $db->commit(); - setEventMessages($langs->trans("TemplateAdded", $templatename), null); - } else { - $db->rollback(); - dol_print_error($db); - } - } - $action = ''; + if (!$error) { + $db->commit(); + setEventMessages($langs->trans("TemplateAdded", $templatename), null); + } else { + $db->rollback(); + dol_print_error($db); + } + } + $action = ''; } if ($action == 'deletetemplate' && $user->admin) { @@ -277,116 +273,116 @@ $head = receiptprinteradmin_prepare_head($mode); // mode = config if ($mode == 'config' && $user->admin) { - print '
'; - print ''; - if ($action != 'editprinter') { - print ''; - } else { - print ''; - } + print ''; + print ''; + if ($action != 'editprinter') { + print ''; + } else { + print ''; + } - dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); + dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); - print ''.$langs->trans("ReceiptPrinterDesc")."

\n"; + print ''.$langs->trans("ReceiptPrinterDesc")."

\n"; - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; - $ret = $printer->listprinters(); - $nbofprinters = count($printer->listprinters); + print '
'.$langs->trans("Name").''.$langs->trans("Type").''.$langs->trans("Profile").''.$langs->trans("Parameters").'
'."\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print "\n"; + $ret = $printer->listprinters(); + $nbofprinters = count($printer->listprinters); - if ($action != 'editprinter') { - print ''; - print ''; - $ret = $printer->selectTypePrinter(); - print ''; - $ret = $printer->selectProfilePrinter(); - print ''; - print ''; - print ''; - print ''; - } + if ($action != 'editprinter') { + print ''; + print ''; + $ret = $printer->selectTypePrinter(); + print ''; + $ret = $printer->selectProfilePrinter(); + print ''; + print ''; + print ''; + print ''; + } - if ($ret > 0) { - setEventMessages($printer->error, $printer->errors, 'errors'); - } else { - for ($line = 0; $line < $nbofprinters; $line++) { - print ''; - if ($action == 'editprinter' && $printer->listprinters[$line]['rowid'] == $printerid) { - print ''; - print ''; - $ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']); - print ''; - $ret = $printer->selectProfilePrinter($printer->listprinters[$line]['fk_profile']); - print ''; - print ''; - print ''; - print ''; - } else { - print ''; - print ''; - print ''; - print ''; - // edit icon - print ''; - print ''; - } - } - } + if ($ret > 0) { + setEventMessages($printer->error, $printer->errors, 'errors'); + } else { + for ($line = 0; $line < $nbofprinters; $line++) { + print ''; + if ($action == 'editprinter' && $printer->listprinters[$line]['rowid'] == $printerid) { + print ''; + print ''; + $ret = $printer->selectTypePrinter($printer->listprinters[$line]['fk_type']); + print ''; + $ret = $printer->selectProfilePrinter($printer->listprinters[$line]['fk_profile']); + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + print ''; + // edit icon + print ''; + print ''; + } + } + } - print '
'.$langs->trans("Name").''.$langs->trans("Type").''.$langs->trans("Profile").''.$langs->trans("Parameters").'
'.$printer->resprint.''.$printer->profileresprint.''; - if ($action != 'editprinter') { - print '
'; - } - print '
'.$printer->resprint.''.$printer->profileresprint.''; + if ($action != 'editprinter') { + print '
'; + } + print '
'.$printer->resprint.''.$printer->profileresprint.''; - print '
'; - print '
'.$printer->listprinters[$line]['name'].''.$langs->trans($printer->listprinters[$line]['fk_type_name']).''.$langs->trans($printer->listprinters[$line]['fk_profile_name']).''.$printer->listprinters[$line]['parameter'].''; - print img_picto($langs->trans("Edit"), 'edit'); - print ''; - // delete icon - print ''; - print img_picto($langs->trans("Delete"), 'delete'); - print ''; - // test icon - print ''; - print img_picto($langs->trans("TestPrinter"), 'printer'); - print '
'.$printer->resprint.''.$printer->profileresprint.''; + print '
'; + print '
'.$printer->listprinters[$line]['name'].''.$langs->trans($printer->listprinters[$line]['fk_type_name']).''.$langs->trans($printer->listprinters[$line]['fk_profile_name']).''.$printer->listprinters[$line]['parameter'].''; + print img_picto($langs->trans("Edit"), 'edit'); + print ''; + // delete icon + print ''; + print img_picto($langs->trans("Delete"), 'delete'); + print ''; + // test icon + print ''; + print img_picto($langs->trans("TestPrinter"), 'printer'); + print '
'; + print ''; - dol_fiche_end(); + dol_fiche_end(); - print '
'; + print ''; - print '
'; + print '
'; - print load_fiche_titre($langs->trans("ReceiptPrinterTypeDesc"), '', '')."\n"; + print load_fiche_titre($langs->trans("ReceiptPrinterTypeDesc"), '', '')."\n"; - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'.$langs->trans("CONNECTOR_DUMMY").':'.$langs->trans("CONNECTOR_DUMMY_HELP").'
'.$langs->trans("CONNECTOR_NETWORK_PRINT").':'.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").'
'.$langs->trans("CONNECTOR_FILE_PRINT").':'.$langs->trans("CONNECTOR_FILE_PRINT_HELP").'
'.$langs->trans("CONNECTOR_WINDOWS_PRINT").':'.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").'
'.$langs->trans("CONNECTOR_CUPS_PRINT").':'.$langs->trans("CONNECTOR_CUPS_PRINT_HELP").'
'; + print ''."\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("CONNECTOR_DUMMY").':'.$langs->trans("CONNECTOR_DUMMY_HELP").'
'.$langs->trans("CONNECTOR_NETWORK_PRINT").':'.$langs->trans("CONNECTOR_NETWORK_PRINT_HELP").'
'.$langs->trans("CONNECTOR_FILE_PRINT").':'.$langs->trans("CONNECTOR_FILE_PRINT_HELP").'
'.$langs->trans("CONNECTOR_WINDOWS_PRINT").':'.$langs->trans("CONNECTOR_WINDOWS_PRINT_HELP").'
'.$langs->trans("CONNECTOR_CUPS_PRINT").':'.$langs->trans("CONNECTOR_CUPS_PRINT_HELP").'
'; - print '
'; + print '
'; - print load_fiche_titre($langs->trans("ReceiptPrinterProfileDesc"), '', '')."\n"; + print load_fiche_titre($langs->trans("ReceiptPrinterProfileDesc"), '', '')."\n"; - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print ''; - print '
'.$langs->trans("PROFILE_DEFAULT").':'.$langs->trans("PROFILE_DEFAULT_HELP").'
'.$langs->trans("PROFILE_SIMPLE").':'.$langs->trans("PROFILE_SIMPLE_HELP").'
'.$langs->trans("PROFILE_EPOSTEP").':'.$langs->trans("PROFILE_EPOSTEP_HELP").'
'.$langs->trans("PROFILE_P822D").':'.$langs->trans("PROFILE_P822D_HELP").'
'.$langs->trans("PROFILE_STAR").':'.$langs->trans("PROFILE_STAR_HELP").'
'; + print ''."\n"; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans("PROFILE_DEFAULT").':'.$langs->trans("PROFILE_DEFAULT_HELP").'
'.$langs->trans("PROFILE_SIMPLE").':'.$langs->trans("PROFILE_SIMPLE_HELP").'
'.$langs->trans("PROFILE_EPOSTEP").':'.$langs->trans("PROFILE_EPOSTEP_HELP").'
'.$langs->trans("PROFILE_P822D").':'.$langs->trans("PROFILE_P822D_HELP").'
'.$langs->trans("PROFILE_STAR").':'.$langs->trans("PROFILE_STAR_HELP").'
'; } // mode = template @@ -394,56 +390,56 @@ if ($mode == 'template' && $user->admin) { dol_fiche_head($head, $mode, $langs->trans("ModuleSetup"), -1, 'technic'); print '
'; - print ''; - if ($action != 'edittemplate') { - print ''; - } else { - print ''; - } + print ''; + if ($action != 'edittemplate') { + print ''; + } else { + print ''; + } - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - print "\n"; - $ret = $printer->listPrintersTemplates(); - //print '
'.print_r($printer->listprinterstemplates, true).'
'; - if ($ret > 0) { - setEventMessages($printer->error, $printer->errors, 'errors'); - } else { - $max = count($printer->listprinterstemplates); - for ($line = 0; $line < $max; $line++) { - print ''; - if ($action == 'edittemplate' && $printer->listprinterstemplates[$line]['rowid'] == $templateid) { - print ''; - print ''; - print ''; - print ''; - } else { - print ''; - print ''; - // edit icon - print ''; - } - print ''; - } - } + print '
'.$langs->trans("Name").''.$langs->trans("Template").'
'; - print ''; - print ''.$printer->listprinterstemplates[$line]['name'].''.nl2br(htmlentities($printer->listprinterstemplates[$line]['template'])).''; - print img_picto($langs->trans("Edit"), 'edit'); - print ''; - // delete icon - print ''; - print img_picto($langs->trans("Delete"), 'delete'); - print ''; - // test icon - print ''; - print img_picto($langs->trans("TestPrinterTemplate"), 'printer'); - print '
'."\n"; + print ''; + print ''; + print ''; + print ''; + print "\n"; + $ret = $printer->listPrintersTemplates(); + //print '
'.print_r($printer->listprinterstemplates, true).'
'; + if ($ret > 0) { + setEventMessages($printer->error, $printer->errors, 'errors'); + } else { + $max = count($printer->listprinterstemplates); + for ($line = 0; $line < $max; $line++) { + print ''; + if ($action == 'edittemplate' && $printer->listprinterstemplates[$line]['rowid'] == $templateid) { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + // edit icon + print ''; + } + print ''; + } + } - if ($action != 'edittemplate') { - print ''; + if ($action != 'edittemplate') { + print ''; print ''; print ''."\n"; @@ -304,10 +283,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; + } else { + print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''; @@ -370,9 +347,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -429,17 +404,13 @@ foreach ($dirmodels as $reldir) print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; - } - else - { + } else { print img_picto($langs->trans("Enabled"), 'switch_on'); } print ""; - } - else - { + } else { print '"; } @@ -448,10 +419,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->COMMANDE_SUPPLIER_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -524,11 +493,11 @@ if ($conf->banque->enabled) { if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER)) { - print ''.img_picto($langs->trans("Disabled"),'switch_off').''; + print ''.img_picto($langs->trans("Disabled"),'switch_off').''; } else { - print ''.img_picto($langs->trans("Enabled"),'switch_on').''; + print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } } print ''; @@ -553,9 +522,7 @@ $variablename = 'SUPPLIER_ORDER_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); @@ -572,9 +539,7 @@ print ''; @@ -380,11 +380,9 @@ foreach ($dirmodels as $reldir) print img_picto($langs->trans("Enabled"),'switch_on'); }*/ print ""; - } - else - { + } else { print '"; } @@ -394,11 +392,9 @@ foreach ($dirmodels as $reldir) { //print img_picto($langs->trans("Default"),'on'); // Even if choice is the default value, we allow to disable it: For supplier invoice, we accept to have no doc generation at all - print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; - } - else - { - print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Disable").'">'.img_picto($langs->trans("Enabled"), 'on').''; + } else { + print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT"" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -428,8 +424,46 @@ foreach ($dirmodels as $reldir) print '
'.$langs->trans("Name").''.$langs->trans("Template").'
'; + print ''; + print ''.$printer->listprinterstemplates[$line]['name'].''.nl2br(htmlentities($printer->listprinterstemplates[$line]['template'])).''; + print img_picto($langs->trans("Edit"), 'edit'); + print ''; + // delete icon + print ''; + print img_picto($langs->trans("Delete"), 'delete'); + print ''; + // test icon + print ''; + print img_picto($langs->trans("TestPrinterTemplate"), 'printer'); + print '
'; print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index db9b3e257f6..9afa2bb2d1f 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -43,7 +43,7 @@ accessforbidden(); $type = GETPOST('type', 'alpha'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $scandir = GETPOST('scan_dir', 'alpha'); $specimenthirdparty = new Societe($db); @@ -68,14 +68,10 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -} - -elseif ($action == 'specimen') // For orders +} elseif ($action == 'specimen') // For orders { $modele = GETPOST('module', 'alpha'); @@ -107,15 +103,11 @@ elseif ($action == 'specimen') // For orders { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=commande_fournisseur&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -125,9 +117,7 @@ elseif ($action == 'specimen') // For orders elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -152,25 +142,19 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmod') +} elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated dolibarr_set_const($db, "COMMANDE_SUPPLIER_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity); -} - -elseif ($action == 'addcat') +} elseif ($action == 'addcat') { $fourn = new Fournisseur($db); $fourn->CreateCategory($user, GETPOST('cat', 'alphanohtml')); -} - -elseif ($action == 'set_SUPPLIER_ORDER_OTHER') +} elseif ($action == 'set_SUPPLIER_ORDER_OTHER') { - $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'none'); // No alpha here, we want exact string + $freetext = GETPOST('SUPPLIER_ORDER_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $doubleapproval = GETPOST('SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED', 'alpha'); $doubleapproval = price2num($doubleapproval); @@ -196,9 +180,7 @@ elseif ($action == 'set_SUPPLIER_ORDER_OTHER') // Insert $newmodule->insert_permissions(1); - } - else - { + } else { // Remove all rights with Permission1190 $newmodule->delete_permissions(); @@ -217,9 +199,7 @@ elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -295,8 +275,7 @@ foreach ($dirmodels as $reldir) $tmp = $module->getExample(); if (preg_match('/^Error/', $tmp)) { $langs->load("errors"); print '
'.$langs->trans($tmp).'
'; - } - elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); + } elseif ($tmp == 'NotConfigured') print $langs->trans($tmp); else print $tmp; print '
'."\n"; - print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'&type=order_supplier">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print "
'; if ($conf->reception->enabled) { print ''.$langs->trans("FeatureNotAvailableWithReceptionModule").''; -} -else -{ +} else { if ($conf->use_javascript_ajax) { print ajax_constantonoff('SUPPLIER_ORDER_USE_DISPATCH_STATUS'); } else { diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index d533ba0d8eb..003c0247f20 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -1,6 +1,7 @@ * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -32,10 +33,10 @@ $langs->loadLangs(array("admin", "errors", "other", "bills", "orders")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); -$scandir = GETPOST('scan_dir', 'alpha'); +$scandir = GETPOST('scandir', 'alpha'); $type = 'supplier_payment'; @@ -56,12 +57,10 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } -}elseif ($action == 'setmod') +} elseif ($action == 'setmod') { dolibarr_set_const($db, "SUPPLIER_PAYMENT_ADDON", $value, 'chaine', 0, '', $conf->entity); } @@ -70,9 +69,7 @@ if ($action == 'updateMask') elseif ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -97,9 +94,7 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'specimen') +} elseif ($action == 'specimen') { $modele = GETPOST('module', 'alpha'); @@ -130,18 +125,27 @@ elseif ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_payment&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, $module->errors, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } +} elseif ($action == 'setparams') +{ + $res = dolibarr_set_const($db, "PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", GETPOST('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD', 'int'), 'chaine', 0, '', $conf->entity); + if (!$res > 0) $error++; + + if ($error) + { + setEventMessages($langs->trans("Error"), null, 'errors'); + } + if (!$error) + { + setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); + } } /* @@ -175,7 +179,7 @@ print load_fiche_titre($langs->trans("PaymentsNumberingModule"), '', ''); $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql .= " WHERE type = '".$type."'"; +$sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -188,9 +192,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -264,10 +266,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->SUPPLIER_PAYMENT_ADDON == $file || $conf->global->SUPPLIER_PAYMENT_ADDON.'.php' == $file) { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; + } else { + print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; } print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'&type=SUPPLIER_PAYMENT">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print "
'; +/* + * Other Options + */ + +print "
"; + +print load_fiche_titre($langs->trans("OtherOptions"), '', ''); + +print ''; +print ''; +print ''; + +print '
'; +print ''; +print ''; +print ''; +print ''; +print ''; +print "\n"; + +// Allow to group payments by mod in rapports +print '\n"; + +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").' 
'; +print $langs->trans("GroupPaymentsByModOnReports"); +print ''; +print $form->selectyesno("PAYMENTS_FOURN_REPORT_GROUP_BY_MOD", $conf->global->PAYMENTS_FOURN_REPORT_GROUP_BY_MOD, 1); +print ''; +print "
'; + dol_fiche_end(); +print '
'; +print '
'; +print ''; +print '
'; +print '
'; + +print ''; + // End of page llxFooter(); $db->close(); diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index c1007623a54..7bf34fa669a 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -34,7 +34,7 @@ $langs->loadLangs(array("admin", "errors", "other", "supplier_proposal")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -60,9 +60,7 @@ if ($action == 'updateMask') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -98,15 +96,11 @@ if ($action == 'specimen') { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=supplier_proposal&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($module->error, null, 'errors'); dol_syslog($module->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -122,16 +116,14 @@ if ($action == 'set_SUPPLIER_PROPOSAL_DRAFT_WATERMARK') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') { - $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT', 'none'); // No alpha here, we want exact string + $freetext = GETPOST('SUPPLIER_PROPOSAL_FREE_TEXT', 'restricthtml'); // No alpha here, we want exact string $res = dolibarr_set_const($db, "SUPPLIER_PROPOSAL_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity); @@ -140,9 +132,7 @@ if ($action == 'set_SUPPLIER_PROPOSAL_FREE_TEXT') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -156,9 +146,7 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -167,18 +155,14 @@ if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL') if ($action == 'set') { $ret = addDocumentModel($value, $type, $label, $scandir); -} - -elseif ($action == 'del') +} elseif ($action == 'del') { $ret = delDocumentModel($value, $type); if ($ret > 0) { if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$value") dolibarr_del_const($db, 'SUPPLIER_PROPOSAL_ADDON_PDF', $conf->entity); } -} - -elseif ($action == 'setdoc') +} elseif ($action == 'setdoc') { if (dolibarr_set_const($db, "SUPPLIER_PROPOSAL_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity)) { @@ -191,9 +175,7 @@ elseif ($action == 'setdoc') { $ret = addDocumentModel($value, $type, $label, $scandir); } -} - -elseif ($action == 'setmod') +} elseif ($action == 'setmod') { // TODO Verifier si module numerotation choisi peut etre active // par appel methode canBeActivated @@ -278,10 +260,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->SUPPLIER_PROPOSAL_ADDON == "$file") { print img_picto($langs->trans("Activated"), 'switch_on'); - } - else - { - print ''; + } else { + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } @@ -330,7 +310,7 @@ print load_fiche_titre($langs->trans("SupplierProposalPDFModules"), '', ''); $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql .= " WHERE type = '".$type."'"; +$sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -343,9 +323,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -410,15 +388,13 @@ foreach ($dirmodels as $reldir) if (in_array($name, $def)) { print ''."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; - } - else - { + } else { print "\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; } @@ -427,10 +403,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF == "$name") { print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -462,9 +436,7 @@ foreach ($dirmodels as $reldir) if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'bill').''; - } - else - { + } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } print ''; @@ -511,9 +483,7 @@ $variablename = 'SUPPLIER_PROPOSAL_FREE_TEXT'; if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) { print ''; -} -else -{ +} else { include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes'); print $doleditor->Create(); @@ -543,22 +513,16 @@ if ($conf->banque->enabled) if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL'); - } - else - { + } else { if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL)) { - print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; + print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; } } print ''; -} -else -{ +} else { print ''; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").' '.$langs->trans('NotAvailable').''; } diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 172f243a22c..50e2fbbbb91 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -45,7 +45,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'facture_fourn'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index a9fa9c1b09d..15a96009392 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -47,7 +47,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'facture_fourn_det'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index c280e56ac86..17d866d8f94 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -45,7 +45,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'commande_fournisseur'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 59cc6783db8..1bcfcec05c4 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -46,7 +46,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'commande_fournisseurdet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 16b273cd6db..60de87d2d2e 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -126,9 +126,7 @@ if ($action == 'set') { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($error, $errors, 'errors'); } @@ -155,18 +153,17 @@ if ($action == 'setlevel') if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } + /* * View */ -llxHeader(); +llxHeader('', $langs->trans("SyslogSetup")); $form = new Form($db); @@ -174,8 +171,6 @@ $linkback = ''; -$def = array(); - $syslogfacility = $defaultsyslogfacility = dolibarr_get_const($db, "SYSLOG_FACILITY", 0); $syslogfile = $defaultsyslogfile = dolibarr_get_const($db, "SYSLOG_FILE", 0); @@ -192,7 +187,7 @@ if ($conf->global->MAIN_MODULE_MULTICOMPANY && $user->entity) //print "conf->global->MAIN_FEATURES_LEVEL = ".$conf->global->MAIN_FEATURES_LEVEL."

\n"; // Output mode -print load_fiche_titre($langs->trans("SyslogOutput")); +print load_fiche_titre($langs->trans("SyslogOutput"), '', ''); // Mode print '
'; @@ -217,6 +212,12 @@ foreach ($syslogModules as $moduleName) print ''; print ' '; print $module->getName(); + if ($moduleName == 'mod_syslog_syslog') { + if (! $module->isActive()) { + $langs->load("errors"); + print $form->textwithpicto('', $langs->trans("ErrorPHPNeedModule", 'SysLog')); + } + } print ''; print ''; @@ -230,8 +231,7 @@ foreach ($syslogModules as $moduleName) { if (isset($_POST[$tmpoption])) $value = $_POST[$tmpoption]; elseif (!empty($conf->global->$tmpoption)) $value = $conf->global->$tmpoption; - } - else $value = (isset($option['default']) ? $option['default'] : ''); + } else $value = (isset($option['default']) ? $option['default'] : ''); print $option['name'].': '; if (!empty($option['example'])) print '
'.$langs->trans("Example").': '.$option['example']; @@ -265,7 +265,7 @@ print "
\n"; print '
'."\n\n"; -print load_fiche_titre($langs->trans("SyslogLevel")); +print load_fiche_titre($langs->trans("SyslogLevel"), '', ''); // Level print '
'; diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index 3d0dddd6d10..bbac6bdfe0c 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page $langs->loadLangs(array("help", "members", "other", "admin")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if (!$user->admin) accessforbidden(); @@ -200,9 +200,7 @@ if ($showpromotemessage) print ''; - } - else - { + } else { print $langs->trans("TitleExampleForMaintenanceRelease").':
'; print '
'."\n"; - print '
'; + print '
'.$langs->trans("RunCommandSummary").':
'."\n"; + print '
'."\n"; + print '
'; - //print $paramclear; + //print $paramclear; - // Now show result - print ''.$langs->trans("BackupResult").': '; + // Now show result + print ''.$langs->trans("BackupResult").': '; print $_SESSION["commandbackupresult"]; $_SESSION["commandbackuplastdone"] = ''; @@ -578,21 +573,20 @@ $filecompression['zip'] = array('function' => 'dol_compress_dir', 'id' => 'radio $i = 0; foreach ($filecompression as $key => $val) { - if (!$val['function'] || function_exists($val['function'])) // Enabled export format - { - $checked = ''; - if ($key == 'gz') $checked = ' checked'; - print ''; - print ' '; - } - else // Disabled export format - { - print ''; - print ' '; - print ' ('.$langs->trans("NotAvailable").')'; - } - print '     '; - $i++; + if (!$val['function'] || function_exists($val['function'])) // Enabled export format + { + $checked = ''; + if ($key == 'gz') $checked = ' checked'; + print ''; + print ' '; + } else // Disabled export format + { + print ''; + print ' '; + print ' ('.$langs->trans("NotAvailable").')'; + } + print '     '; + $i++; } print '
'; diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index e9885e82bfe..224bbc14b56 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -105,8 +105,7 @@ print $langs->trans("RestoreDesc3", $dolibarr_main_db_name).'

';
@@ -114,9 +113,7 @@ print $langs->trans("RestoreDesc3", $dolibarr_main_db_name).'

';
@@ -161,8 +158,7 @@ if (in_array($type, array('mysql', 'mysqli'))) //else print '
'.$langs->trans("HidePassword").''; print '
'; print ''; -} -elseif (in_array($type, array('pgsql'))) +} elseif (in_array($type, array('pgsql'))) { print '
'; print 'Restore PostgreSQL'; diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index dc0f7a27f8a..7ab26f6f6e0 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -30,15 +30,15 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $langs->load("admin"); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $what = GETPOST('what', 'alpha'); $export_type = GETPOST('export_type', 'alpha'); $file = GETPOST('filename_template', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -122,7 +122,7 @@ $utils = new Utils($db); // MYSQL if ($what == 'mysql') { - $cmddump = GETPOST("mysqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg + $cmddump = GETPOST("mysqldump", 'none'); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg $cmddump = dol_sanitizePathName($cmddump); if (!empty($dolibarr_main_restrict_os_commands)) @@ -163,7 +163,7 @@ if ($what == 'mysqlnobin') // POSTGRESQL if ($what == 'postgresql') { - $cmddump = GETPOST("postgresqldump"); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg + $cmddump = GETPOST("postgresqldump", 'none'); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg $cmddump = dol_sanitizePathName($cmddump); /* Not required, the command is output on screen but not ran for pgsql @@ -203,9 +203,7 @@ if ($errormsg) $resultstring .= '
'.$langs->trans("Error")." : ".$errormsg.'
'; $_SESSION["commandbackupresult"] = $resultstring; -} -else -{ +} else { if ($what) { setEventMessages($langs->trans("BackupFileSuccessfullyCreated").'.
'.$langs->trans("YouCanDownloadBackupFile"), null, 'mesgs'); diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index de10759c92d..28eaa2d9d54 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -30,22 +30,21 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; $langs->load("admin"); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $what = GETPOST('what', 'alpha'); $export_type = GETPOST('export_type', 'alpha'); -$file = trim(GETPOST('zipfilename_template', 'alpha')); +$file = GETPOST('zipfilename_template', 'alpha'); $compression = GETPOST('compression'); $file = dol_sanitizeFileName($file); $file = preg_replace('/(\.zip|\.tar|\.tgz|\.gz|\.tar\.gz|\.bz2)$/i', '', $file); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (!$sortorder) $sortorder = "DESC"; if (!$sortfield) $sortfield = "date"; -if ($page < 0) { $page = 0; } -elseif (empty($page)) $page = 0; +if ($page < 0) { $page = 0; } elseif (empty($page)) $page = 0; $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $offset = $limit * $page; @@ -114,20 +113,18 @@ $utils = new Utils($db); if ($compression == 'zip') { $file .= '.zip'; - $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.log|\/temp\/|documents\/admin\/documents\/)/'); + $ret = dol_compress_dir(DOL_DATA_ROOT, $outputdir."/".$file, $compression, '/(\.back|\.old|\.log|[\\\/]temp[\\\/]|documents[\\\/]admin[\\\/]documents[\\\/])/i'); if ($ret < 0) { if ($ret == -2) { $langs->load("errors"); $errormsg = $langs->trans("ErrNoZipEngine"); - } - else { + } else { $langs->load("errors"); $errormsg = $langs->trans("ErrorFailedToWriteInDir", $outputdir); } } -} -elseif (in_array($compression, array('gz', 'bz'))) +} elseif (in_array($compression, array('gz', 'bz'))) { $userlogin = ($user->login ? $user->login : 'unknown'); @@ -145,9 +142,7 @@ elseif (in_array($compression, array('gz', 'bz'))) $langs->load("errors"); dol_syslog("Documents tar retval after exec=".$retval, LOG_ERR); $errormsg = 'Error tar generation return '.$retval; - } - else - { + } else { if ($compression == 'gz') { $cmd = "gzip -f ".$outputdir."/".$file; diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index f57a16332df..82111e0716d 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -1,8 +1,8 @@ +/* Copyright (C) 2004-2020 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2015 Bahfir Abbes - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018 Frédéric France * * 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 @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -46,8 +46,8 @@ $langs->loadLangs(array("companies", "admin", "users", "other")); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -60,8 +60,8 @@ $search_code = GETPOST("search_code", "alpha"); $search_ip = GETPOST("search_ip", "alpha"); $search_user = GETPOST("search_user", "alpha"); $search_desc = GETPOST("search_desc", "alpha"); -$search_ua = GETPOST("search_ua", "none"); -$search_prefix_session = GETPOST("search_prefix_session", "none"); +$search_ua = GETPOST("search_ua", "restricthtml"); +$search_prefix_session = GETPOST("search_prefix_session", "restricthtml"); if (GETPOST("date_startmonth") == '' || GETPOST("date_startmonth") > 0) $date_start = dol_mktime(0, 0, 0, GETPOST("date_startmonth"), GETPOST("date_startday"), GETPOST("date_startyear")); else $date_start = -1; @@ -146,9 +146,7 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin) { $db->commit(); dol_syslog($text, LOG_WARNING); - } - else - { + } else { $error++; dol_syslog($securityevent->error, LOG_ERR); $db->rollback(); @@ -169,7 +167,7 @@ $usefilter = 0; $sql = "SELECT e.rowid, e.type, e.ip, e.user_agent, e.dateevent,"; $sql .= " e.fk_user, e.description, e.prefix_session,"; -$sql .= " u.login"; +$sql .= " u.login, u.admin, u.entity, u.firstname, u.lastname, u.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."events as e"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = e.fk_user"; $sql .= " WHERE e.entity IN (".getEntity('event').")"; @@ -228,6 +226,7 @@ if ($result) } print ''; + print ''; print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $nbtotalofrecords, 'setup', 0, '', '', $limit); @@ -237,6 +236,20 @@ if ($result) print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeAuditEvents'), $langs->trans('ConfirmPurgeAuditEvents'), 'confirm_purge', $formquestion, 'no', 1); } + // Check some parameters + // TODO Add a tab with this and other information + /* + global $dolibarr_main_prod, $dolibarr_nocsrfcheck; + if (empty($dolibarr_main_prod)) { + print $langs->trans("Warning").' dolibarr_main_prod = '.$dolibarr_main_prod; + print ' '.img_warning($langs->trans('SwitchThisForABetterSecurity', 1)).'
'; + } + if (!empty($dolibarr_nocsrfcheck)) { + print $langs->trans("Warning").' dolibarr_nocsrfcheck = '.$dolibarr_nocsrfcheck; + print ' '.img_warning($langs->trans('SwitchThisForABetterSecurity', 0)).'
'; + } + */ + print '
'; print ''; @@ -324,9 +337,19 @@ if ($result) { $userstatic->id = $obj->fk_user; $userstatic->login = $obj->login; + $userstatic->admin = $obj->admin; + $userstatic->entity = $obj->entity; + $userstatic->status = $obj->status; + print $userstatic->getLoginUrl(1); - } - else print ' '; + if (!empty($conf->multicompany->enabled) && $userstatic->admin && !$userstatic->entity) + { + print img_picto($langs->trans("SuperAdministrator"), 'redstar', 'class="valignmiddle paddingleft"'); + } elseif ($userstatic->admin) + { + print img_picto($langs->trans("Administrator"), 'star', 'class="valignmiddle paddingleft"'); + } + } else print ' '; print ''; // Description @@ -379,9 +402,7 @@ if ($result) print ""; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 253f4919092..aedc41e0b23 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -31,7 +31,7 @@ $langs->loadLangs(array("companies", "install", "users", "other")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -115,8 +115,7 @@ if ($action == 'purge') { $formquestion = array(); print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('PurgeSessions'), $langs->trans('ConfirmPurgeSessions'), 'confirm_purge', $formquestion, 'no', 2); -} -elseif ($action == 'lock') +} elseif ($action == 'lock') { $formquestion = array(); print $form->formconfirm($_SERVER["PHP_SELF"].'?noparam=noparam', $langs->trans('LockNewSessions'), $langs->trans('ConfirmLockNewSessions', $user->login), 'confirm_lock', $formquestion, 'no', 1); @@ -171,9 +170,7 @@ if ($savehandler == 'files') print ''; } print "
'.$langs->trans("NoSessionFound", $savepath, $openbasedir).'
"; -} -else -{ +} else { print $langs->trans("NoSessionListWithThisHandler"); } @@ -187,9 +184,7 @@ print '
'; if (empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) { print ''.$langs->trans("LockNewSessions").''; -} -else -{ +} else { print ''.$langs->trans("UnlockNewSessions").''; } diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 9898e290ddc..c41b43b3b48 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -29,7 +29,7 @@ $langs->load("admin"); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $choice = GETPOST('choice', 'aZ09'); diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index 260b4afe2d0..27b53e8266e 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; // Load translation files required by the page $langs->loadLangs(array("admin", "other")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if (!$user->admin) accessforbidden(); @@ -98,14 +98,10 @@ if (function_exists('curl_init')) // Show version print $langs->trans("LastStableVersion").' : '.(($version != '0.0') ? $version : $langs->trans("Unknown")).'
'; - } - else - { + } else { print $langs->trans("LastStableVersion").' : '.$langs->trans("UpdateServerOffline").'
'; } - } - else - { + } else { print $langs->trans("LastStableVersion").' : '.$langs->trans("Check").'
'; } } diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 8f764a93b98..c962a9fb776 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -33,11 +33,11 @@ $langs->loadLangs(array("companies", "products", "admin", "sms", "other", "error if (!$user->admin) accessforbidden(); $id = GETPOST('rowid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $langcode = GETPOST('langcode', 'alphanohtml'); $transkey = GETPOST('transkey', 'alphanohtml'); -$transvalue = GETPOST('transvalue', 'none'); +$transvalue = GETPOST('transvalue', 'restricthtml'); $mode = GETPOST('mode', 'aZ09') ?GETPOST('mode', 'aZ09') : 'searchkey'; @@ -73,16 +73,16 @@ include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; // Purge search criteria if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { - $transkey = ''; - $transvalue = ''; - $toselect = ''; - $search_array_options = array(); + $transkey = ''; + $transvalue = ''; + $toselect = ''; + $search_array_options = array(); } if ($action == 'setMAIN_ENABLE_OVERWRITE_TRANSLATION') { - if (GETPOST('value')) dolibarr_set_const($db, 'MAIN_ENABLE_OVERWRITE_TRANSLATION', 1, 'chaine', 0, '', $conf->entity); - else dolibarr_set_const($db, 'MAIN_ENABLE_OVERWRITE_TRANSLATION', 0, 'chaine', 0, '', $conf->entity); + if (GETPOST('value')) dolibarr_set_const($db, 'MAIN_ENABLE_OVERWRITE_TRANSLATION', 1, 'chaine', 0, '', $conf->entity); + else dolibarr_set_const($db, 'MAIN_ENABLE_OVERWRITE_TRANSLATION', 0, 'chaine', 0, '', $conf->entity); } if ($action == 'update') @@ -105,16 +105,12 @@ if ($action == 'update') $action = ""; $transkey = ""; $transvalue = ""; - } - else - { + } else { $db->rollback(); if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("WarningAnEntryAlreadyExistForTransKey"), null, 'warnings'); - } - else - { + } else { setEventMessages($db->lasterror(), null, 'errors'); } $action = ''; @@ -143,29 +139,25 @@ if ($action == 'add') } if (!$error) { - $db->begin(); + $db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."', ".$db->escape($conf->entity).")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."overwrite_trans(lang, transkey, transvalue, entity) VALUES ('".$db->escape($langcode)."','".$db->escape($transkey)."','".$db->escape($transvalue)."', ".$db->escape($conf->entity).")"; $result = $db->query($sql); if ($result > 0) { - $db->commit(); - setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + $db->commit(); + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $action = ""; $transkey = ""; $transvalue = ""; - } - else - { - $db->rollback(); - if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { - setEventMessages($langs->trans("WarningAnEntryAlreadyExistForTransKey"), null, 'warnings'); - } - else - { - setEventMessages($db->lasterror(), null, 'errors'); - } + } else { + $db->rollback(); + if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + { + setEventMessages($langs->trans("WarningAnEntryAlreadyExistForTransKey"), null, 'warnings'); + } else { + setEventMessages($db->lasterror(), null, 'errors'); + } $action = ''; } } @@ -179,9 +171,7 @@ if ($action == 'delete') if ($result >= 0) { setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); - } - else - { + } else { dol_print_error($db); } } @@ -206,17 +196,15 @@ $enabledisablehtml = ''; $enabledisablehtml .= $langs->trans("EnableOverwriteTranslation").' '; if (empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) { - // Button off, click to enable - $enabledisablehtml .= ''; - $enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off'); - $enabledisablehtml .= ''; -} -else -{ - // Button on, click to disable - $enabledisablehtml .= ''; - $enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on'); - $enabledisablehtml .= ''; + // Button off, click to enable + $enabledisablehtml .= ''; + $enabledisablehtml .= img_picto($langs->trans("Disabled"), 'switch_off'); + $enabledisablehtml .= ''; +} else { + // Button on, click to disable + $enabledisablehtml .= ''; + $enabledisablehtml .= img_picto($langs->trans("Activated"), 'switch_on'); + $enabledisablehtml .= ''; } print load_fiche_titre($langs->trans("Translation"), $enabledisablehtml, 'title_setup'); @@ -259,43 +247,43 @@ if ($mode == 'overwrite') if ($action == 'edit' || empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) $disablededit = ' disabled'; print '
'; - print img_info().' '.$langs->trans("SomeTranslationAreUncomplete"); - $urlwikitranslatordoc = 'https://wiki.dolibarr.org/index.php/Translator_documentation'; - print ' ('.$langs->trans("SeeAlso", ''.$langs->trans("Here").'').')
'; - print $langs->trans("TranslationOverwriteDesc", $langs->transnoentitiesnoconv("Language"), $langs->transnoentitiesnoconv("Key"), $langs->transnoentitiesnoconv("NewTranslationStringToShow"))."\n"; - print ' ('.$langs->trans("TranslationOverwriteDesc2").').'."
\n"; - print '
'; + print img_info().' '.$langs->trans("SomeTranslationAreUncomplete"); + $urlwikitranslatordoc = 'https://wiki.dolibarr.org/index.php/Translator_documentation'; + print ' ('.$langs->trans("SeeAlso", ''.$langs->trans("Here").'').')
'; + print $langs->trans("TranslationOverwriteDesc", $langs->transnoentitiesnoconv("Language"), $langs->transnoentitiesnoconv("Key"), $langs->transnoentitiesnoconv("NewTranslationStringToShow"))."\n"; + print ' ('.$langs->trans("TranslationOverwriteDesc2").').'."
\n"; + print '
'; - print '
'; + print '
'; print ''; - print ''; + print ''; print '
'; - print ''; - print ''; - 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); - print ''; - print "\n"; + print '
'; + print ''; + 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); + print ''; + print "\n"; - // Line to add new record - print "\n"; + // Line to add new record + print "\n"; - print ''."\n"; - print ''; - // Limit to superadmin - /*if (! empty($conf->multicompany->enabled) && !$user->entity) + print ''."\n"; + print ''; + // Limit to superadmin + /*if (! empty($conf->multicompany->enabled) && !$user->entity) { print '\n"; - print ''; + print '\n"; + print ''; - // Show constants - $sql = "SELECT rowid, entity, lang, transkey, transvalue"; - $sql .= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; - $sql .= " WHERE 1 = 1"; - $sql .= " AND entity IN (".getEntity('overwrite_trans').")"; - $sql .= $db->order($sortfield, $sortorder); + // Show constants + $sql = "SELECT rowid, entity, lang, transkey, transvalue"; + $sql .= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; + $sql .= " WHERE 1 = 1"; + $sql .= " AND entity IN (".getEntity('overwrite_trans').")"; + $sql .= $db->order($sortfield, $sortorder); - dol_syslog("translation::select from table", LOG_DEBUG); - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows($result); - $i = 0; + dol_syslog("translation::select from table", LOG_DEBUG); + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); + $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($result); + while ($i < $num) + { + $obj = $db->fetch_object($result); - print "\n"; + print "\n"; - print ''; + print ''; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; - // Value - print ''; + if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) + { + print ''; + } else { + print dol_escape_htmltag($obj->transvalue); + } + print ''; - print ''; + print ''; + } else { + print ''.img_edit().''; + print '   '; + print ''.img_delete().''; + } + print ''; - print "\n"; - print "\n"; - $i++; - } - } + print "\n"; + print "\n"; + $i++; + } + } - print '
'; - print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit ? 1 : 0, 'maxwidthonsmartphone', 1); - print ''; - print ''; - print ''; - print ''; - print '
'; + print $formadmin->select_language(GETPOST('langcode'), 'langcode', 0, null, 1, 0, $disablededit ? 1 : 0, 'maxwidthonsmartphone', 1); + print ''; + print ''; + print ''; + print ''; + print ''; print ''; @@ -304,124 +292,118 @@ if ($mode == 'overwrite') } else {*/ - print ''; - print ''; - //} - print ''; - print "
'; + print ''; + //} + print ''; + print "
'.$obj->lang.''.$obj->transkey.''.$obj->lang.''.$obj->transkey.''; - /*print ''; + // Value + print ''; + /*print ''; print ''; print ''; print ''; */ - if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) - { - print ''; - } - else - { - print dol_escape_htmltag($obj->transvalue); - } - print ''; - if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) - { - print ''; - print ''; - print '   '; - print ''; - } - else - { - print ''.img_edit().''; + print ''; + if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) + { + print ''; + print ''; print '   '; - print ''.img_delete().''; - } - print '
'; - print '
'; + print ''; + print '
'; } if ($mode == 'searchkey') { - $langcode = GETPOST('langcode') ?GETPOST('langcode') : $langs->defaultlang; + $langcode = GETPOST('langcode') ?GETPOST('langcode') : $langs->defaultlang; - $newlang = new Translate('', $conf); - $newlang->setDefaultLang($langcode); + $newlang = new Translate('', $conf); + $newlang->setDefaultLang($langcode); - $newlangfileonly = new Translate('', $conf); - $newlangfileonly->setDefaultLang($langcode); + $newlangfileonly = new Translate('', $conf); + $newlangfileonly->setDefaultLang($langcode); - $recordtoshow = array(); + $recordtoshow = array(); - // Search modules dirs - $modulesdir = dolGetModulesDirs(); + // Search modules dirs + $modulesdir = dolGetModulesDirs(); - $nbtotaloffiles = 0; - $nbempty = 0; - /*var_dump($langcode); + $nbtotaloffiles = 0; + $nbempty = 0; + /*var_dump($langcode); var_dump($transkey); var_dump($transvalue);*/ - if (empty($langcode) || $langcode == '-1') $nbempty++; - if (empty($transkey)) $nbempty++; - if (empty($transvalue)) $nbempty++; - if ($action == 'search' && ($nbempty > 999)) // 999 to disable this - { - setEventMessages($langs->trans("WarningAtLeastKeyOrTranslationRequired"), null, 'warnings'); - } - else - { - // Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root) - $i = 0; - foreach ($modulesdir as $keydir => $tmpsearchdir) - { - $searchdir = $tmpsearchdir; // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/' + if (empty($langcode) || $langcode == '-1') $nbempty++; + if (empty($transkey)) $nbempty++; + if (empty($transvalue)) $nbempty++; + if ($action == 'search' && ($nbempty > 999)) // 999 to disable this + { + setEventMessages($langs->trans("WarningAtLeastKeyOrTranslationRequired"), null, 'warnings'); + } else { + // Search into dir of modules (the $modulesdir is already a list that loop on $conf->file->dol_document_root) + $i = 0; + foreach ($modulesdir as $keydir => $tmpsearchdir) + { + $searchdir = $tmpsearchdir; // $searchdir can be '.../htdocs/core/modules/' or '.../htdocs/custom/mymodule/core/modules/' - // Directory of translation files - $dir_lang = dirname(dirname($searchdir))."/langs/".$langcode; // The 2 dirname is to go up in dir for 2 levels - $dir_lang_osencoded = dol_osencode($dir_lang); + // Directory of translation files + $dir_lang = dirname(dirname($searchdir))."/langs/".$langcode; // The 2 dirname is to go up in dir for 2 levels + $dir_lang_osencoded = dol_osencode($dir_lang); - $filearray = dol_dir_list($dir_lang_osencoded, 'files', 0, '', '', $sortfield, (strtolower($sortorder) == 'asc' ?SORT_ASC:SORT_DESC), 1); - foreach ($filearray as $file) - { + $filearray = dol_dir_list($dir_lang_osencoded, 'files', 0, '', '', $sortfield, (strtolower($sortorder) == 'asc' ?SORT_ASC:SORT_DESC), 1); + foreach ($filearray as $file) + { $tmpfile = preg_replace('/.lang/i', '', basename($file['name'])); $moduledirname = (basename(dirname(dirname($dir_lang)))); @@ -434,138 +416,135 @@ if ($mode == 'searchkey') if ($result < 0) print 'Failed to load language file '.$tmpfile.'
'."\n"; else $nbtotaloffiles++; //print 'After loading lang '.$langkey.', newlang has '.count($newlang->tab_translate).' records
'."\n"; - } - $i++; - } + } + $i++; + } - // Now search into translation array - foreach ($newlang->tab_translate as $key => $val) - { - if ($transkey && !preg_match('/'.preg_quote($transkey, '/').'/i', $key)) continue; - if ($transvalue && !preg_match('/'.preg_quote($transvalue, '/').'/i', $val)) continue; - $recordtoshow[$key] = $val; - } - } + // Now search into translation array + foreach ($newlang->tab_translate as $key => $val) + { + if ($transkey && !preg_match('/'.preg_quote($transkey, '/').'/i', $key)) continue; + if ($transvalue && !preg_match('/'.preg_quote($transvalue, '/').'/i', $val)) continue; + $recordtoshow[$key] = $val; + } + } - //print '
'; - $nbtotalofrecordswithoutfilters = count($newlang->tab_translate); - $nbtotalofrecords = count($recordtoshow); - $num = $limit + 1; - if (($offset + $num) > $nbtotalofrecords) $num = $limit; + //print '
'; + $nbtotalofrecordswithoutfilters = count($newlang->tab_translate); + $nbtotalofrecords = count($recordtoshow); + $num = $limit + 1; + if (($offset + $num) > $nbtotalofrecords) $num = $limit; - //print 'param='.$param.' $_SERVER["PHP_SELF"]='.$_SERVER["PHP_SELF"].' num='.$num.' page='.$page.' nbtotalofrecords='.$nbtotalofrecords." sortfield=".$sortfield." sortorder=".$sortorder; - $title = $langs->trans("TranslationKeySearch"); - if ($nbtotalofrecords > 0) $title .= ' ('.$nbtotalofrecords.' / '.$nbtotalofrecordswithoutfilters.' - '.$nbtotaloffiles.' '.$langs->trans("Files").')'; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, '', '', $limit, 0, 0, 1); + //print 'param='.$param.' $_SERVER["PHP_SELF"]='.$_SERVER["PHP_SELF"].' num='.$num.' page='.$page.' nbtotalofrecords='.$nbtotalofrecords." sortfield=".$sortfield." sortorder=".$sortorder; + $title = $langs->trans("TranslationKeySearch"); + if ($nbtotalofrecords > 0) $title .= ' ('.$nbtotalofrecords.' / '.$nbtotalofrecordswithoutfilters.' - '.$nbtotaloffiles.' '.$langs->trans("Files").')'; + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, '', '', $limit, 0, 0, 1); - print ''; - print ''; + print ''; + print ''; print '
'; - print ''; - print ''; - 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("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); - print ''; - print "\n"; + print '
'; + print ''; + 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("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); + print ''; + print "\n"; - // Line to search new record - print "\n"; + // Line to search new record + print "\n"; - print ''."\n"; - print ''."\n"; + print ''; - // Action column - print ''; - print ''; + print ''; + //} + print ''; + // Action column + print ''; + print ''; - if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') ksort($recordtoshow); - if ($sortfield == 'transkey' && strtolower($sortorder) == 'desc') krsort($recordtoshow); - if ($sortfield == 'transvalue' && strtolower($sortorder) == 'asc') asort($recordtoshow); - if ($sortfield == 'transvalue' && strtolower($sortorder) == 'desc') arsort($recordtoshow); + if ($sortfield == 'transkey' && strtolower($sortorder) == 'asc') ksort($recordtoshow); + if ($sortfield == 'transkey' && strtolower($sortorder) == 'desc') krsort($recordtoshow); + if ($sortfield == 'transvalue' && strtolower($sortorder) == 'asc') asort($recordtoshow); + if ($sortfield == 'transvalue' && strtolower($sortorder) == 'desc') arsort($recordtoshow); - // Show result - $i = 0; - foreach ($recordtoshow as $key => $val) - { - $i++; - if ($i <= $offset) continue; - if ($i > ($offset + $limit)) break; - print ''; }*/ - print ''."\n"; - } + print ''."\n"; + } - print '
'; - //print $formadmin->select_language($langcode,'langcode',0,null,$langs->trans("All"),0,0,'',1); - print $formadmin->select_language($langcode, 'langcode', 0, null, 0, 0, 0, 'maxwidthonsmartphone', 1); - print ''; - print ''; - print ''; - print ''; - // Limit to superadmin - /*if (! empty($conf->multicompany->enabled) && !$user->entity) + print '
'; + //print $formadmin->select_language($langcode,'langcode',0,null,$langs->trans("All"),0,0,'',1); + print $formadmin->select_language($langcode, 'langcode', 0, null, 0, 0, 0, 'maxwidthonsmartphone', 1); + print ''; + print ''; + print ''; + print ''; + // Limit to superadmin + /*if (! empty($conf->multicompany->enabled) && !$user->entity) { print ''; print ''; } else {*/ - print ''; - //} - print ''; - $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); - print $searchpicto; - print '
'; + $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + print $searchpicto; + print '
'.$langcode.''.$key.''; - print dol_escape_htmltag($val); - print ''; - if (!empty($newlangfileonly->tab_translate[$key])) - { - if ($val != $newlangfileonly->tab_translate[$key]) - { - // retrieve rowid - $sql = "SELECT rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; - $sql .= " WHERE transkey = '".$key."'"; - $sql .= " AND entity IN (".getEntity('overwrite_trans').")"; - dol_syslog("translation::select from table", LOG_DEBUG); - $result = $db->query($sql); - if ($result) - { - $obj = $db->fetch_object($result); - } - print ''.img_edit().''; - print ' '; - print ''.img_delete().''; - print '  '; - $htmltext = $langs->trans("OriginalValueWas", ''.$newlangfileonly->tab_translate[$key].''); - print $form->textwithpicto('', $htmltext, 1, 'info'); - } - elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) - { - //print $key.'-'.$val; - print ''.img_edit_add($langs->trans("Overwrite")).''; - } + // Show result + $i = 0; + foreach ($recordtoshow as $key => $val) + { + $i++; + if ($i <= $offset) continue; + if ($i > ($offset + $limit)) break; + print '
'.$langcode.''.$key.''; + print dol_escape_htmltag($val); + print ''; + if (!empty($newlangfileonly->tab_translate[$key])) + { + if ($val != $newlangfileonly->tab_translate[$key]) + { + // retrieve rowid + $sql = "SELECT rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."overwrite_trans"; + $sql .= " WHERE transkey = '".$key."'"; + $sql .= " AND entity IN (".getEntity('overwrite_trans').")"; + dol_syslog("translation::select from table", LOG_DEBUG); + $result = $db->query($sql); + if ($result) + { + $obj = $db->fetch_object($result); + } + print ''.img_edit().''; + print ' '; + print ''.img_delete().''; + print '  '; + $htmltext = $langs->trans("OriginalValueWas", ''.$newlangfileonly->tab_translate[$key].''); + print $form->textwithpicto('', $htmltext, 1, 'info'); + } elseif (!empty($conf->global->MAIN_ENABLE_OVERWRITE_TRANSLATION)) + { + //print $key.'-'.$val; + print ''.img_edit_add($langs->trans("Overwrite")).''; + } - if (!empty($conf->global->MAIN_FEATURES_LEVEL)) - { - $transifexlangfile = '$'; // $ means 'All' - //$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key; - $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key; + if (!empty($conf->global->MAIN_FEATURES_LEVEL)) + { + $transifexlangfile = '$'; // $ means 'All' + //$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key; + $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key; - print '   '.img_picto($langs->trans('FixOnTransifex'), 'globe').''; - } - } - else - { - $htmltext = $langs->trans("TransKeyWithoutOriginalValue", $key); - print $form->textwithpicto('', $htmltext, 1, 'warning'); - } - /*if (! empty($conf->multicompany->enabled) && !$user->entity) + print '   '.img_picto($langs->trans('FixOnTransifex'), 'globe').''; + } + } else { + $htmltext = $langs->trans("TransKeyWithoutOriginalValue", $key); + print $form->textwithpicto('', $htmltext, 1, 'warning'); + } + /*if (! empty($conf->multicompany->enabled) && !$user->entity) { print ''.$val.'
'; - print '
'; + print ''; + print ''; } dol_fiche_end(); diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index 60cbadcdd3a..620efb0540e 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -38,7 +38,7 @@ if (!$user->admin) accessforbidden(); $extrafields = new ExtraFields($db); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); $value = GETPOST('value', 'alpha'); @@ -55,9 +55,7 @@ if ($action == 'set_default') { $ret = addDocumentModel($value, $type, $label, $scandir); $res = true; -} - -elseif ($action == 'del_default') +} elseif ($action == 'del_default') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -84,31 +82,24 @@ elseif ($action == 'setdoc') $ret = addDocumentModel($value, $type, $label, $scandir); } $res = true; -} -elseif (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) +} elseif (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } -} - -elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) +} elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -121,9 +112,7 @@ elseif ($action == 'sethideinactiveuser') { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -163,16 +152,12 @@ print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('USER_MAIL_REQUIRED'); -} -else -{ +} else { if (empty($conf->global->USER_MAIL_REQUIRED)) { - print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"), 'on').''; + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'on').''; } } print ''; @@ -187,15 +172,11 @@ print ''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('USER_HIDE_INACTIVE_IN_COMBOBOX'); -} -else -{ +} else { if (empty($conf->global->USER_HIDE_INACTIVE_IN_COMBOBOX)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"), 'on').''; } } @@ -211,7 +192,7 @@ $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql .= " WHERE type = '".$type."'"; +$sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -224,9 +205,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -290,15 +269,13 @@ foreach ($dirmodels as $reldir) if (in_array($name, $def)) { print ''."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; - } - else - { + } else { print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; } @@ -307,10 +284,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->USER_ADDON_PDF == $name) { print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -335,9 +310,7 @@ foreach ($dirmodels as $reldir) if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'contract').''; - } - else - { + } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index 4f556ff19b3..9ae01790bb2 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -38,7 +38,7 @@ if (!$user->admin) accessforbidden(); $extrafields = new ExtraFields($db); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $type = 'group'; @@ -52,9 +52,7 @@ if ($action == 'set_default') { $ret = addDocumentModel($value, $type, $label, $scandir); $res = true; -} - -elseif ($action == 'del_default') +} elseif ($action == 'del_default') { $ret = delDocumentModel($value, $type); if ($ret > 0) @@ -81,31 +79,24 @@ elseif ($action == 'setdoc') $ret = addDocumentModel($value, $type, $label, $scandir); } $res = true; -} -elseif (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) +} elseif (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; if (dolibarr_set_const($db, $code, 1, 'chaine', 0, '', $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } -} - -elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) +} elseif (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { $code = $reg[1]; if (dolibarr_del_const($db, $code, $conf->entity) > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -133,7 +124,7 @@ $form = new Form($db); $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql .= " WHERE type = '".$type."'"; +$sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -146,9 +137,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -212,15 +201,13 @@ foreach ($dirmodels as $reldir) if (in_array($name, $def)) { print ''."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; - } - else - { + } else { print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; } @@ -229,10 +216,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->USERGROUP_ADDON_PDF == $name) { print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -257,9 +242,7 @@ foreach ($dirmodels as $reldir) if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'contract').''; - } - else - { + } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } print ''; diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index dd7fd353ea2..19d71ebb1d9 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -49,18 +49,19 @@ $acts[1] = "disable"; $actl[0] = img_picto($langs->trans("Disabled"), 'switch_off'); $actl[1] = img_picto($langs->trans("Activated"), 'switch_on'); -$status = 1; - // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; +if (empty($sortfield)) $sortfield = 'position, ref'; +if (empty($sortorder)) $sortorder = 'ASC'; + // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('website')); @@ -74,7 +75,7 @@ $tablib[1] = "Websites"; // Requests to extract data $tabsql = array(); -$tabsql[1] = "SELECT f.rowid as rowid, f.entity, f.ref, f.description, f.virtualhost, f.status FROM ".MAIN_DB_PREFIX.'website as f WHERE f.entity IN ('.getEntity('website').')'; +$tabsql[1] = "SELECT f.rowid as rowid, f.entity, f.ref, f.description, f.virtualhost, f.position, f.status FROM ".MAIN_DB_PREFIX.'website as f WHERE f.entity IN ('.getEntity('website').')'; // Criteria to sort dictionaries $tabsqlsort = array(); @@ -82,15 +83,15 @@ $tabsqlsort[1] = "ref ASC"; // Nom des champs en resultat de select pour affichage du dictionnaire $tabfield = array(); -$tabfield[1] = "ref,description,virtualhost"; +$tabfield[1] = "ref,description,virtualhost,position"; // Nom des champs d'edition pour modification d'un enregistrement $tabfieldvalue = array(); -$tabfieldvalue[1] = "ref,description,virtualhost"; +$tabfieldvalue[1] = "ref,description,virtualhost,position"; // Nom des champs dans la table pour insertion d'un enregistrement $tabfieldinsert = array(); -$tabfieldinsert[1] = "ref,description,virtualhost,entity"; +$tabfieldinsert[1] = "ref,description,virtualhost,position,entity"; // Nom du rowid si le champ n'est pas de type autoincrement // Example: "" if id field is "rowid" and has autoincrement on @@ -123,270 +124,252 @@ $sourceList = array(); // Actions add or modify a website if (GETPOST('actionadd', 'alpha') || GETPOST('actionmodify', 'alpha')) { - $listfield = explode(',', $tabfield[$id]); - $listfieldinsert = explode(',', $tabfieldinsert[$id]); - $listfieldmodify = explode(',', $tabfieldinsert[$id]); - $listfieldvalue = explode(',', $tabfieldvalue[$id]); + $listfield = explode(',', $tabfield[$id]); + $listfieldinsert = explode(',', $tabfieldinsert[$id]); + $listfieldmodify = explode(',', $tabfieldinsert[$id]); + $listfieldvalue = explode(',', $tabfieldvalue[$id]); - // Check that all fields are filled - $ok = 1; - foreach ($listfield as $f => $value) - { - if ($value == 'ref' && (!GETPOSTISSET($value) || GETPOST($value) == '')) - { - $ok = 0; - $fieldnamekey = $listfield[$f]; - setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); - break; - } - elseif ($value == 'ref' && !preg_match('/^[a-z0-9_\-\.]+$/i', $_POST[$value])) - { + // Check that all fields are filled + $ok = 1; + foreach ($listfield as $f => $value) + { + if ($value == 'ref' && (!GETPOSTISSET($value) || GETPOST($value) == '')) + { $ok = 0; - $fieldnamekey = $listfield[$f]; + $fieldnamekey = $listfield[$f]; + setEventMessages($langs->transnoentities("ErrorFieldRequired", $langs->transnoentities($fieldnamekey)), null, 'errors'); + break; + } elseif ($value == 'ref' && !preg_match('/^[a-z0-9_\-\.]+$/i', $_POST[$value])) + { + $ok = 0; + $fieldnamekey = $listfield[$f]; setEventMessages($langs->transnoentities("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities($fieldnamekey)), null, 'errors'); break; - } - } + } + } - // Clean parameters - if (!empty($_POST['ref'])) - { - $websitekey = strtolower($_POST['ref']); - } + // Clean parameters + if (!empty($_POST['ref'])) + { + $websitekey = strtolower($_POST['ref']); + } - // Si verif ok et action add, on ajoute la ligne - if ($ok && GETPOST('actionadd', 'alpha')) - { - if ($tabrowid[$id]) - { - // Recupere id libre pour insertion - $newid = 0; - $sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id]; - $result = $db->query($sql); - if ($result) - { - $obj = $db->fetch_object($result); - $newid = ($obj->newid + 1); - } else { - dol_print_error($db); - } - } + // Si verif ok et action add, on ajoute la ligne + if ($ok && GETPOST('actionadd', 'alpha')) + { + if ($tabrowid[$id]) + { + // Recupere id libre pour insertion + $newid = 0; + $sql = "SELECT max(".$tabrowid[$id].") newid from ".$tabname[$id]; + $result = $db->query($sql); + if ($result) + { + $obj = $db->fetch_object($result); + $newid = ($obj->newid + 1); + } else { + dol_print_error($db); + } + } - /* $website=new Website($db); + /* $website=new Website($db); $website->ref= $website->description= $website->virtualhost= $website->create($user); */ - // Add new entry - $sql = "INSERT INTO ".$tabname[$id]." ("; - // List of fields - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) - $sql .= $tabrowid[$id].","; - $sql .= $tabfieldinsert[$id]; - $sql .= ",status)"; - $sql .= " VALUES("; + // Add new entry + $sql = "INSERT INTO ".$tabname[$id]." ("; + // List of fields + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) + $sql .= $tabrowid[$id].","; + $sql .= $tabfieldinsert[$id]; + $sql .= ",status)"; + $sql .= " VALUES("; - // List of values - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) - $sql .= $newid.","; - $i = 0; - foreach ($listfieldinsert as $f => $value) - { - if ($value == 'entity') { - $_POST[$listfieldvalue[$i]] = $conf->entity; - } - if ($value == 'ref') { - $_POST[$listfieldvalue[$i]] = strtolower($_POST[$listfieldvalue[$i]]); - } - if ($i) $sql .= ","; - if ($_POST[$listfieldvalue[$i]] == '') $sql .= "null"; - else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; - $i++; - } - $sql .= ",1)"; + // List of values + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldinsert)) + $sql .= $newid.","; + $i = 0; + foreach ($listfieldinsert as $f => $value) + { + if ($value == 'entity') { + $_POST[$listfieldvalue[$i]] = $conf->entity; + } + if ($value == 'ref') { + $_POST[$listfieldvalue[$i]] = strtolower($_POST[$listfieldvalue[$i]]); + } + if ($i) $sql .= ","; + if ($_POST[$listfieldvalue[$i]] == '') $sql .= "null"; + else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; + $i++; + } + $sql .= ",1)"; - dol_syslog("actionadd", LOG_DEBUG); - $result = $db->query($sql); - if ($result) // Add is ok - { - setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); - unset($_POST); // Clean $_POST array, we keep only - } - else - { - if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); - } - else { - dol_print_error($db); - } - } - } + dol_syslog("actionadd", LOG_DEBUG); + $result = $db->query($sql); + if ($result) // Add is ok + { + setEventMessages($langs->transnoentities("RecordSaved"), null, 'mesgs'); + unset($_POST); // Clean $_POST array, we keep only + } else { + if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + setEventMessages($langs->transnoentities("ErrorRecordAlreadyExists"), null, 'errors'); + } else { + dol_print_error($db); + } + } + } - // Si verif ok et action modify, on modifie la ligne - if ($ok && GETPOST('actionmodify', 'alpha')) - { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + // Si verif ok et action modify, on modifie la ligne + if ($ok && GETPOST('actionmodify', 'alpha')) + { + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - $db->begin(); + $db->begin(); - $website = new Website($db); - $rowid = GETPOST('rowid', 'int'); - $website->fetch($rowid); + $website = new Website($db); + $rowid = GETPOST('rowid', 'int'); + $website->fetch($rowid); - // Modify entry - $sql = "UPDATE ".$tabname[$id]." SET "; - // Modifie valeur des champs - if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) - { - $sql .= $tabrowid[$id]."="; - $sql .= "'".$db->escape($rowid)."', "; - } - $i = 0; - foreach ($listfieldmodify as $field) - { - if ($field == 'entity') { - $_POST[$listfieldvalue[$i]] = $conf->entity; - } - if ($i) $sql .= ","; - $sql .= $field."="; - if ($_POST[$listfieldvalue[$i]] == '') $sql .= "null"; - else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; - $i++; - } - $sql .= " WHERE ".$rowidcol." = '".$rowid."'"; + // Modify entry + $sql = "UPDATE ".$tabname[$id]." SET "; + // Modifie valeur des champs + if ($tabrowid[$id] && !in_array($tabrowid[$id], $listfieldmodify)) + { + $sql .= $tabrowid[$id]."="; + $sql .= "'".$db->escape($rowid)."', "; + } + $i = 0; + foreach ($listfieldmodify as $field) + { + if ($field == 'entity') { + $_POST[$listfieldvalue[$i]] = $conf->entity; + } + if ($i) $sql .= ","; + $sql .= $field."="; + if ($_POST[$listfieldvalue[$i]] == '') $sql .= "null"; + else $sql .= "'".$db->escape($_POST[$listfieldvalue[$i]])."'"; + $i++; + } + $sql .= " WHERE ".$rowidcol." = ".((int) $rowid); - dol_syslog("actionmodify", LOG_DEBUG); - //print $sql; - $resql = $db->query($sql); - if ($resql) - { - $newname = dol_sanitizeFileName(GETPOST('ref', 'aZ09')); - if ($newname != $website->ref) - { - $srcfile = DOL_DATA_ROOT.'/website/'.$website->ref; - $destfile = DOL_DATA_ROOT.'/website/'.$newname; + dol_syslog("actionmodify", LOG_DEBUG); + //print $sql; + $resql = $db->query($sql); + if ($resql) + { + $newname = dol_sanitizeFileName(GETPOST('ref', 'aZ09')); + if ($newname != $website->ref) + { + $srcfile = DOL_DATA_ROOT.'/website/'.$website->ref; + $destfile = DOL_DATA_ROOT.'/website/'.$newname; - if (dol_is_dir($destfile)) - { - $error++; - setEventMessages($langs->trans('ErrorDirAlreadyExists', $destfile), null, 'errors'); - } - else - { - @rename($srcfile, $destfile); + if (dol_is_dir($destfile)) + { + $error++; + setEventMessages($langs->trans('ErrorDirAlreadyExists', $destfile), null, 'errors'); + } else { + @rename($srcfile, $destfile); - // We must now rename $website->ref into $newname inside files - $arrayreplacement = array($website->ref.'/htmlheader.html' => $newname.'/htmlheader.html'); - $listofilestochange = dol_dir_list($destfile, 'files', 0, '\.php$'); + // We must now rename $website->ref into $newname inside files + $arrayreplacement = array($website->ref.'/htmlheader.html' => $newname.'/htmlheader.html'); + $listofilestochange = dol_dir_list($destfile, 'files', 0, '\.php$'); foreach ($listofilestochange as $key => $value) - { - dolReplaceInFile($value['fullname'], $arrayreplacement); - } - } - } - } - else - { - $error++; - setEventMessages($db->lasterror(), null, 'errors'); - } + { + dolReplaceInFile($value['fullname'], $arrayreplacement); + } + } + } + } else { + $error++; + setEventMessages($db->lasterror(), null, 'errors'); + } - if (!$error) - { - $db->commit(); - } - else - { - $db->rollback(); - } - } - //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition + if (!$error) + { + $db->commit(); + } else { + $db->rollback(); + } + } + //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition } if (GETPOST('actioncancel', 'alpha')) { - //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition + //$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition } if ($action == 'confirm_delete' && $confirm == 'yes') // delete { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - $website = new Website($db); - $website->fetch($rowid); + $website = new Website($db); + $website->fetch($rowid); - if ($website->id > 0) - { - $sql = "DELETE from ".MAIN_DB_PREFIX."website_account WHERE fk_website ='".$rowid."'"; - $result = $db->query($sql); + if ($website->id > 0) + { + $sql = "DELETE from ".MAIN_DB_PREFIX."website_account WHERE fk_website = ".((int) $rowid); + $result = $db->query($sql); - $sql = "DELETE from ".MAIN_DB_PREFIX."website_page WHERE fk_website ='".$rowid."'"; - $result = $db->query($sql); + $sql = "DELETE from ".MAIN_DB_PREFIX."website_page WHERE fk_website = ".((int) $rowid); + $result = $db->query($sql); - $sql = "DELETE from ".MAIN_DB_PREFIX."website_extrafields WHERE fk_object ='".$rowid."'"; - $result = $db->query($sql); + $sql = "DELETE from ".MAIN_DB_PREFIX."website_extrafields WHERE fk_object = ".((int) $rowid); + $result = $db->query($sql); - $sql = "DELETE from ".MAIN_DB_PREFIX."website WHERE rowid ='".$rowid."'"; - $result = $db->query($sql); - if (!$result) - { - if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') - { - setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); - } - else - { - dol_print_error($db); - } - } + $sql = "DELETE from ".MAIN_DB_PREFIX."website WHERE rowid = ".((int) $rowid); + $result = $db->query($sql); + if (!$result) + { + if ($db->errno() == 'DB_ERROR_CHILD_EXISTS') + { + setEventMessages($langs->transnoentities("ErrorRecordIsUsedByChild"), null, 'errors'); + } else { + dol_print_error($db); + } + } - if ($website->ref) - { - dol_delete_dir_recursive($conf->website->dir_output.'/'.$website->ref); - } - } - else - { - dol_print_error($db, 'Failed to load website with id '.$rowid); - } + if ($website->ref) + { + dol_delete_dir_recursive($conf->website->dir_output.'/'.$website->ref); + } + } else { + dol_print_error($db, 'Failed to load website with id '.$rowid); + } } // activate if ($action == $acts[0]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET status = 1 WHERE rowid ='".$rowid."'"; - } + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET status = 1 WHERE rowid = ".((int) $rowid); + } - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } } // disable if ($action == $acts[1]) { - if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } - else { $rowidcol = "rowid"; } + if ($tabrowid[$id]) { $rowidcol = $tabrowid[$id]; } else { $rowidcol = "rowid"; } - if ($rowid) { - $sql = "UPDATE ".$tabname[$id]." SET status = 0 WHERE rowid ='".$rowid."'"; - } + if ($rowid) { + $sql = "UPDATE ".$tabname[$id]." SET status = 0 WHERE rowid = ".((int) $rowid); + } - $result = $db->query($sql); - if (!$result) - { - dol_print_error($db); - } + $result = $db->query($sql); + if (!$result) + { + dol_print_error($db); + } } @@ -428,7 +411,7 @@ print "
\n"; // Confirmation de la suppression de la ligne if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid, $langs->trans('DeleteWebsite'), $langs->trans('ConfirmDeleteWebsite'), 'confirm_delete', '', 0, 1, 220); } //var_dump($elementList); @@ -437,209 +420,205 @@ if ($action == 'delete') */ if ($id) { - // Complete requete recherche valeurs avec critere de tri - $sql = $tabsql[$id]; - $sql .= $db->order($sortfield, $sortorder); - $sql .= $db->plimit($limit + 1, $offset); - //print $sql; + // Complete requete recherche valeurs avec critere de tri + $sql = $tabsql[$id]; + $sql .= $db->order($sortfield, $sortorder); + $sql .= $db->plimit($limit + 1, $offset); + //print $sql; - $fieldlist = explode(',', $tabfield[$id]); + $fieldlist = explode(',', $tabfield[$id]); - print '
'; - print ''; - print ''; + print ''; + print ''; + print '
'; - // Form to add a new line - if ($tabname[$id]) - { - $alabelisused = 0; - $var = false; + // Form to add a new line + if ($tabname[$id]) + { + $alabelisused = 0; + $var = false; - $fieldlist = explode(',', $tabfield[$id]); + $fieldlist = explode(',', $tabfield[$id]); - // Line for title - print ''; - foreach ($fieldlist as $field => $value) - { - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees - $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut - $valuetoshow = $langs->trans($valuetoshow); // try to translate - $align = ''; - if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } - if ($valuetoshow != '') - { - print ''; - } - if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; - } + // Line for title + print ''; + foreach ($fieldlist as $field => $value) + { + // Determine le nom du champ par rapport aux noms possibles + // dans les dictionnaires de donnees + $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow = $langs->trans($valuetoshow); // try to translate + $align = ''; + if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } + if ($valuetoshow != '') + { + print ''; + } + if ($fieldlist[$field] == 'libelle' || $fieldlist[$field] == 'label') $alabelisused = 1; + } - print ''; - print ''; + print ''; + print ''; - // Line to enter new values - print ""; + // Line to enter new values + print ""; - $obj = new stdClass(); - // If data was already input, we define them in obj to populate input fields. - if (GETPOST('actionadd', 'alpha')) - { - foreach ($fieldlist as $key=>$val) - { - if (GETPOST($val, 'alpha')) - $obj->$val = GETPOST($val); - } - } + $obj = new stdClass(); + // If data was already input, we define them in obj to populate input fields. + if (GETPOST('actionadd', 'alpha')) + { + foreach ($fieldlist as $key=>$val) + { + if (GETPOST($val, 'alpha')) + $obj->$val = GETPOST($val); + } + } - fieldListWebsites($fieldlist, $obj, $tabname[$id], 'add'); + fieldListWebsites($fieldlist, $obj, $tabname[$id], 'add'); - print ''; - print ""; + print ''; + print ""; - $colspan = count($fieldlist) + 2; - } + $colspan = count($fieldlist) + 2; + } - print '
'; - if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; - elseif (!empty($tabhelp[$id][$value])) - { - if ($value == 'virtualhost') print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltipvirtual'); - else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); - } - else print $valuetoshow; - print '
'; + if (!empty($tabhelp[$id][$value]) && preg_match('/^http(s*):/i', $tabhelp[$id][$value])) print ''.$valuetoshow.' '.img_help(1, $valuetoshow).''; + elseif (!empty($tabhelp[$id][$value])) + { + if ($value == 'virtualhost') print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value], 1, 'help', '', 0, 2, 'tooltipvirtual'); + else print $form->textwithpicto($valuetoshow, $tabhelp[$id][$value]); + } else print $valuetoshow; + print ''; - print '
'; + print '
'; - if ($action != 'edit') - { - print ''; - } - print '
'; + if ($action != 'edit') + { + print ''; + } + print '
'; - print '
'; + print ''; + print ''; - // List of websites in database - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - if ($num) - { - print '
'; + // List of websites in database + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + if ($num) + { + print '
'; - print '
'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; + print '
'; - // Title of lines - print ''; - foreach ($fieldlist as $field => $value) - { - // Determine le nom du champ par rapport aux noms possibles - // dans les dictionnaires de donnees - $showfield = 1; // Par defaut - $align = "left"; - $sortable = 1; - $valuetoshow = ''; - /* + // Title of lines + print ''; + foreach ($fieldlist as $field => $value) + { + // Determine le nom du champ par rapport aux noms possibles + // dans les dictionnaires de donnees + $showfield = 1; // Par defaut + $align = "left"; + $sortable = 1; + $valuetoshow = ''; + /* $tmparray=getLabelOfField($fieldlist[$field]); $showfield=$tmp['showfield']; $valuetoshow=$tmp['valuetoshow']; $align=$tmp['align']; $sortable=$tmp['sortable']; */ - $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut - $valuetoshow = $langs->trans($valuetoshow); // try to translate - if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } - if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } - if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); } + $valuetoshow = ucfirst($fieldlist[$field]); // Par defaut + $valuetoshow = $langs->trans($valuetoshow); // try to translate + if ($fieldlist[$field] == 'lang') { $valuetoshow = $langs->trans("Language"); } + if ($fieldlist[$field] == 'type') { $valuetoshow = $langs->trans("Type"); } + if ($fieldlist[$field] == 'code') { $valuetoshow = $langs->trans("Code"); } - // Affiche nom du champ - if ($showfield) - { - print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), "", "align=".$align, $sortfield, $sortorder); - } - } + // Affiche nom du champ + if ($showfield) + { + print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable ? $fieldlist[$field] : ''), ($page ? 'page='.$page.'&' : ''), "", "align=".$align, $sortfield, $sortorder); + } + } print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "status", ($page ? 'page='.$page.'&' : ''), "", 'align="center"', $sortfield, $sortorder); - print getTitleFieldOfList(''); - print getTitleFieldOfList(''); - print ''; + print getTitleFieldOfList(''); + print getTitleFieldOfList(''); + print ''; - // Lines with values - while ($i < $num) - { - $obj = $db->fetch_object($resql); - //print_r($obj); - print ''; - if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) - { - $tmpaction = 'edit'; - $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); - $reshook = $hookmanager->executeHooks('editWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; $errors = $hookmanager->errors; + // Lines with values + while ($i < $num) + { + $obj = $db->fetch_object($resql); + //print_r($obj); + print ''; + if ($action == 'edit' && ($rowid == (!empty($obj->rowid) ? $obj->rowid : $obj->code))) + { + $tmpaction = 'edit'; + $parameters = array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook = $hookmanager->executeHooks('editWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + $error = $hookmanager->error; $errors = $hookmanager->errors; - if (empty($reshook)) fieldListWebsites($fieldlist, $obj, $tabname[$id], 'edit'); + if (empty($reshook)) fieldListWebsites($fieldlist, $obj, $tabname[$id], 'edit'); - print ''; - } - else - { - $tmpaction = 'view'; - $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); - $reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks + print ''; + } else { + $tmpaction = 'view'; + $parameters = array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]); + $reshook = $hookmanager->executeHooks('viewWebsiteFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks - $error = $hookmanager->error; $errors = $hookmanager->errors; + $error = $hookmanager->error; $errors = $hookmanager->errors; - if (empty($reshook)) - { - foreach ($fieldlist as $field => $value) - { - $showfield = 1; - $align = "left"; - $fieldname = $fieldlist[$field]; - $valuetoshow = $obj->$fieldname; + if (empty($reshook)) + { + foreach ($fieldlist as $field => $value) + { + $showfield = 1; + $align = "left"; + $fieldname = $fieldlist[$field]; + $valuetoshow = $obj->$fieldname; // Show value for field if ($showfield) print ''; - } - } + } + } - // Can an entry be erased or disabled ? - $iserasable = 1; $isdisable = 1; // true by default - if ($obj->status) $iserasable = 0; // We can't delete a website on. Disable it first. + // Can an entry be erased or disabled ? + $iserasable = 1; $isdisable = 1; // true by default + if ($obj->status) $iserasable = 0; // We can't delete a website on. Disable it first. - $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '').'&'; + $url = $_SERVER["PHP_SELF"].'?'.($page ? 'page='.$page.'&' : '').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(!empty($obj->rowid) ? $obj->rowid : (!empty($obj->code) ? $obj->code : '')).'&code='.(!empty($obj->code) ?urlencode($obj->code) : '').'&'; - // Active - print '"; + // Active + print '"; - // Modify link - print ''; + // Modify link + print ''; - // Delete link - if ($iserasable) print ''; - else print ''; + // Delete link + if ($iserasable) print ''; + else print ''; - print "\n"; - } - $i++; - } + print "\n"; + } + $i++; + } - print '
 '; - print '  '; + print ' '.$valuetoshow.''; - print ''.$actl[($obj->status ? 1 : 0)].''; - print "'; + print ''.$actl[($obj->status ? 1 : 0)].''; + print "'.img_edit().''.img_edit().''.img_delete().''.img_delete($langs->trans("DisableSiteFirst"), 'class="opacitymedium"').''.img_delete().''.img_delete($langs->trans("DisableSiteFirst"), 'class="opacitymedium"').'
'; + print ''; - print '
'; - } - } - else { - dol_print_error($db); - } + print ''; + } + } else { + dol_print_error($db); + } } dol_fiche_end(); @@ -670,18 +649,15 @@ function fieldListWebsites($fieldlist, $obj = '', $tabname = '', $context = '') foreach ($fieldlist as $field => $value) { - $fieldname = $fieldlist[$field]; + $fieldname = $fieldlist[$field]; if ($fieldlist[$field] == 'lang') { print ''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'lang'); print ''; - } - elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldname)) { + } elseif ($fieldlist[$field] == 'code' && isset($obj->$fieldname)) { print ''; - } - else - { + } else { print ''; $size = ''; if ($fieldlist[$field] == 'code') $size = 'size="8" '; diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index 7d16aa3963b..1df7642b646 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -46,8 +46,8 @@ $status = 1; // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -121,9 +121,7 @@ if ($action == 'edit') print ''; print '
'; -} -else -{ +} else { print ''; print ''; diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 99185cce733..a8bcbcf8172 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -1,8 +1,8 @@ - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2016 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin +/* Copyright (C) 2004 Rodolphe Quiedeville + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2016 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin * * 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 @@ -19,177 +19,220 @@ */ /** - * \file htdocs/admin/workflow.php - * \ingroup company - * \brief Workflows setup page + * \file htdocs/admin/workflow.php + * \ingroup company + * \brief Workflows setup page */ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -// Load translation files required by the page -$langs->loadLangs(array("admin", "workflow", "propal", "workflow", "orders", "supplier_proposals", "receptions")); - +// security check if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +// Load translation files required by the page +$langs->loadLangs(array("admin", "workflow", "propal", "workflow", "orders", "supplier_proposal", "receptions", "errors")); + +$action = GETPOST('action', 'aZ09'); /* * Actions */ -if (preg_match('/set(.*)/', $action, $reg)) -{ - if (!dolibarr_set_const($db, $reg[1], '1', 'chaine', 0, '', $conf->entity) > 0) - { - dol_print_error($db); - } +if (preg_match('/set(.*)/', $action, $reg)) { + if (!dolibarr_set_const($db, $reg[1], '1', 'chaine', 0, '', $conf->entity) > 0) { + dol_print_error($db); + } } -if (preg_match('/del(.*)/', $action, $reg)) -{ - if (!dolibarr_set_const($db, $reg[1], '0', 'chaine', 0, '', $conf->entity) > 0) - { - dol_print_error($db); - } +if (preg_match('/del(.*)/', $action, $reg)) { + if (!dolibarr_set_const($db, $reg[1], '0', 'chaine', 0, '', $conf->entity) > 0) { + dol_print_error($db); + } } +// List of workflow we can enable +clearstatcache(); + +$workflowcodes = array( + // Automatic creation + 'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array( + 'family'=>'create', + 'position'=>10, + 'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)), + 'picto'=>'order' + ), + 'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array( + 'family'=>'create', + 'position'=>20, + 'enabled'=>(!empty($conf->commande->enabled) && !empty($conf->facture->enabled)), + 'picto'=>'bill' + ), + + 'separator1'=>array('family'=>'separator', 'position'=>25), + + // Automatic classification of proposal + 'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array( + 'family'=>'classify_proposal', + 'position'=>30, + 'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->commande->enabled)), + 'picto'=>'propal', + 'warning'=>'' + ), + 'WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL'=>array( + 'family'=>'classify_proposal', + 'position'=>31, + 'enabled'=>(!empty($conf->propal->enabled) && !empty($conf->facture->enabled)), + 'picto'=>'propal', + 'warning'=>'' + ), + + // Automatic classification of order + 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING'=>array( + 'family'=>'classify_order', + 'position'=>40, + 'enabled'=>(!empty($conf->expedition->enabled) && !empty($conf->commande->enabled)), + 'picto'=>'order' + ), + 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array( + 'family'=>'classify_order', + 'position'=>41, + 'enabled'=>(!empty($conf->facture->enabled) && !empty($conf->commande->enabled)), + 'picto'=>'order', + 'warning'=>'' + ), // For this option, if module invoice is disabled, it does not exists, so "Classify billed" for order must be done manually from order card. + + 'separator2'=>array('family'=>'separator', 'position'=>50), + + // Automatic classification supplier proposal + 'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array( + 'family'=>'classify_supplier_proposal', + 'position'=>60, + 'enabled'=>(!empty($conf->supplier_proposal->enabled) && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), + 'picto'=>'propal', + 'warning'=>'' + ), + + // Automatic classification supplier order + 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array( + 'family'=>'classify_supplier_order', + 'position'=>62, + 'enabled'=>(!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)), + 'picto'=>'order', + 'warning'=>'' + ), + + // Automatic classification reception + 'WORKFLOW_BILL_ON_RECEPTION'=>array( + 'family'=>'classify_reception', + 'position'=>64, + 'enabled'=>(!empty($conf->reception->enabled) && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))), + 'picto'=>'bill' + ), +); + +if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) { + foreach ($conf->modules_parts['workflow'] as $workflow) { + $workflowcodes = array_merge($workflowcodes, $workflow); + } +} + +// remove not available workflows (based on activated modules and global defined keys) +$workflowcodes = array_filter($workflowcodes, function ($var) { + return $var['enabled']; }); /* - * View + * View */ -llxHeader('', $langs->trans("WorkflowSetup"), ''); +llxHeader('', $langs->trans("WorkflowSetup"), "EN:Module_Workflow_En|FR:Module_Workflow|ES:Módulo_Workflow"); $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("WorkflowSetup"), $linkback, 'title_setup'); -print ''.$langs->trans("WorkflowDesc").'
'; -print "
"; +print ''.$langs->trans("WorkflowDesc").''; +print '
'; +print '
'; -// List of workflow we can enable +// current module setup don't support any automatic workflow of this module +if (count($workflowcodes) < 1) { + print $langs->trans("ThereIsNoWorkflowToModify"); -clearstatcache(); - -$workflowcodes = array( - // Automatic creation - 'WORKFLOW_PROPAL_AUTOCREATE_ORDER'=>array('family'=>'create', 'position'=>10, 'enabled'=>'! empty($conf->propal->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order'), - 'WORKFLOW_ORDER_AUTOCREATE_INVOICE'=>array('family'=>'create', 'position'=>20, 'enabled'=>'! empty($conf->commande->enabled) && ! empty($conf->facture->enabled)', 'picto'=>'bill'), - 'separator1'=>array('family'=>'separator', 'position'=>25), - // Automatic classification of proposal - 'WORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL'=>array('family'=>'classify_proposal', 'position'=>30, 'enabled'=>'! empty($conf->propal->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'propal', 'warning'=>''), - 'WORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL'=>array('family'=>'classify_proposal', 'position'=>31, 'enabled'=>'! empty($conf->propal->enabled) && ! empty($conf->facture->enabled)', 'picto'=>'propal', 'warning'=>''), - // Automatic classification of order - 'WORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING'=>array('family'=>'classify_order', 'position'=>40, 'enabled'=>'! empty($conf->expedition->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order'), - 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER'=>array('family'=>'classify_order', 'position'=>41, 'enabled'=>'! empty($conf->facture->enabled) && ! empty($conf->commande->enabled)', 'picto'=>'order', 'warning'=>''), // For this option, if module invoice is disabled, it does not exists, so "Classify billed" for order must be done manually from order card. - 'separator2'=>array('family'=>'separator', 'position'=>50), - // Automatic classification supplier proposal - 'WORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL'=>array('family'=>'classify_supplier_proposal', 'position'=>60, 'enabled'=>'! empty($conf->supplier_proposal->enabled) && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', 'picto'=>'propal', 'warning'=>''), - // Automatic classification supplier order - 'WORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER'=>array('family'=>'classify_supplier_order', 'position'=>62, 'enabled'=>'!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)', 'picto'=>'order', 'warning'=>''), - //Automatic classification reception - 'WORKFLOW_BILL_ON_RECEPTION'=>array('family'=>'classify_reception', 'position'=>64, 'enabled'=>'! empty($conf->reception->enabled) && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled))', 'picto'=>'bill'), -); - -if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['workflow'])) -{ - foreach ($conf->modules_parts['workflow'] as $workflow) - { - $workflowcodes = array_merge($workflowcodes, $workflow); - } + llxFooter(); + $db->close(); + return; } // Sort on position $workflowcodes = dol_sort_array($workflowcodes, 'position'); -$nbqualified = 0; +print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'; + $oldfamily = ''; -print '
'."\n"; - -foreach ($workflowcodes as $key => $params) -{ - $picto = $params['picto']; - $enabled = $params['enabled']; - $family = $params['family']; - - if ($family == 'separator') - { - print '

'; - print ''."\n"; +foreach ($workflowcodes as $key => $params) { + if ($params['family'] == 'separator') { + print '
'; + print '
'; + print ''; continue; } - if (!verifCond($enabled)) continue; - - $nbqualified++; - - - if ($oldfamily != $family) - { - print ''."\n"; - print ' '; - print ' '; - print "\n"; - $oldfamily = $family; - } - print "\n"; - print "\n"; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + + $oldfamily = $params['family']; + } + + print ''; + print ''; + + print ''; + print ''; } -if ($nbqualified == 0) -{ - print '
'; - if ($family == 'create') - { - print $langs->trans("AutomaticCreation"); + if ($oldfamily != $params['family']) { + if ($params['family'] == 'create') { + $header = $langs->trans("AutomaticCreation"); + } elseif (preg_match('/classify_(.*)/', $params['family'], $reg)) { + $header = $langs->trans("AutomaticClassification"); + if ($reg[1] == 'proposal') $header .= ' - '.$langs->trans('Proposal'); + if ($reg[1] == 'order') $header .= ' - '.$langs->trans('Order'); + if ($reg[1] == 'supplier_proposal') $header .= ' - '.$langs->trans('SupplierProposal'); + if ($reg[1] == 'supplier_order') $header .= ' - '.$langs->trans('SupplierOrder'); + if ($reg[1] == 'reception') $header .= ' - '.$langs->trans('Reception'); + } else { + $header = $langs->trans("Description"); } - elseif (preg_match('/classify_(.*)/', $family, $reg)) - { - print $langs->trans("AutomaticClassification"); - if ($reg[1] == 'proposal') print ' - '.$langs->trans('Proposal'); - if ($reg[1] == 'order') print ' - '.$langs->trans('Order'); - if ($reg[1] == 'supplier_proposal') print ' - '.$langs->trans('SupplierProposal'); - if ($reg[1] == 'supplier_order') print ' - '.$langs->trans('SupplierOrder'); - if ($reg[1] == 'reception') print ' - '.$langs->trans('Reception'); - } - else - { - print $langs->trans("Description"); - } - print ''.$langs->trans("Status").'
".img_object('', $picto).$langs->trans('desc'.$key); - if (!empty($params['warning'])) - { - $langs->load("errors"); - print ' '.img_warning($langs->transnoentitiesnoconv($params['warning'])); - } - print "'; - if (!empty($conf->use_javascript_ajax)) - { - print ajax_constantonoff($key); - } - else - { - if (!empty($conf->global->$key)) - { - print ''; - print img_picto($langs->trans("Activated"), 'switch_on'); - print ''; - } - else - { - print ''; - print img_picto($langs->trans("Disabled"), 'switch_off'); - print ''; - } - } - print '
'.$header.''.$langs->trans("Status").'
'; + print img_object('', $params['picto']); + print ' '.$langs->trans('desc'.$key); + + if (!empty($params['warning'])) { + print ' '.img_warning($langs->transnoentitiesnoconv($params['warning'])); + } + + print ''; + + if (!empty($conf->use_javascript_ajax)) { + print ajax_constantonoff($key); + } else { + if (!empty($conf->global->$key)) { + print ''; + print img_picto($langs->trans("Activated"), 'switch_on'); + print ''; + } else { + print ''; + print img_picto($langs->trans("Disabled"), 'switch_off'); + print ''; + } + } + + print '
'.$langs->trans("ThereIsNoWorkflowToModify"); -} print '
'; // End of page diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index d0a0e79c855..a7eab61211d 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -54,9 +54,7 @@ if ($action == 'setproductionmode') setEventMessages($langs->trans("ErrorFailedToCreateDir", $conf->api->dir_temp), null, 'errors'); $error++; } - } - else - { + } else { // Delete the cache file otherwise it does not update $result = dol_delete_file($conf->api->dir_temp.'/routes.php'); if ($result < 0) @@ -71,9 +69,7 @@ if ($action == 'setproductionmode') header("Location: ".$_SERVER["PHP_SELF"]); exit; } - } - else - { + } else { dol_print_error($db); } } @@ -116,13 +112,11 @@ print ''.$langs->trans("ApiProductionMode").''; $production_mode = (empty($conf->global->API_PRODUCTION_MODE) ?false:true); if ($production_mode) { - print ''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); print ''; -} -else -{ - print ''; +} else { + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } @@ -165,9 +159,7 @@ if (dol_is_dir(DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/e { $url = DOL_MAIN_URL_ROOT.'/api/index.php/explorer'; print img_picto('', 'globe').' '.$url."
\n"; -} -else -{ +} else { print $langs->trans("NotAvailableWithThisDistribution"); } diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 16e7fba5470..554edbb892e 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -250,8 +250,7 @@ class DolibarrApi $featuresarray = array($resource); if (preg_match('/&/', $resource)) { $featuresarray = explode("&", $resource); - } - elseif (preg_match('/\|/', $resource)) { + } elseif (preg_match('/\|/', $resource)) { $featuresarray = explode("|", $resource); } @@ -317,9 +316,7 @@ class DolibarrApi if (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) { $tmpescaped = "'".$db->escape($regbis[1])."'"; - } - else - { + } else { $tmpescaped = $db->escape($tmpescaped); } return $db->escape($tmp[0]).' '.strtoupper($db->escape($tmp[1]))." ".$tmpescaped; diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 339ddfd2ad6..84f7bf303e7 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -59,6 +59,16 @@ class DolibarrApiAccess implements iAuthenticate */ public static $user = ''; + + /** + * Constructor + */ + public function __construct() + { + global $db; + $this->db = $db; + } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName /** * Check access @@ -107,15 +117,15 @@ class DolibarrApiAccess implements iAuthenticate $sql = "SELECT u.login, u.datec, u.api_key, "; $sql .= " u.tms as date_modification, u.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE u.api_key = '".$db->escape($api_key)."'"; + $sql .= " WHERE u.api_key = '".$this->db->escape($api_key)."'"; // TODO Check if 2 users has same API key. - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { - if ($db->num_rows($result)) + if ($this->db->num_rows($result)) { - $obj = $db->fetch_object($result); + $obj = $this->db->fetch_object($result); $login = $obj->login; $stored_key = $obj->api_key; $userentity = $obj->entity; @@ -125,12 +135,11 @@ class DolibarrApiAccess implements iAuthenticate $conf->entity = ($obj->entity ? $obj->entity : 1); // We must also reload global conf to get params from the entity dol_syslog("Entity was not set on http header with HTTP_DOLAPIENTITY (recommanded for performance purpose), so we switch now on entity of user (".$conf->entity.") and we have to reload configuration.", LOG_WARNING); - $conf->setValues($db); + $conf->setValues($this->db); } } - } - else { - throw new RestException(503, 'Error when fetching user api_key :'.$db->error_msg); + } else { + throw new RestException(503, 'Error when fetching user api_key :'.$this->db->error_msg); } if ($stored_key != $api_key) { // This should not happen since we did a search on api_key @@ -142,7 +151,7 @@ class DolibarrApiAccess implements iAuthenticate { throw new RestException(503, 'Error when searching login user from api key'); } - $fuser = new User($db); + $fuser = new User($this->db); $result = $fuser->fetch('', $login, '', 0, (empty($userentity) ? -1 : $conf->entity)); // If user is not entity 0, we search in working entity $conf->entity (that may have been forced to a different value than user entity) if ($result <= 0) { throw new RestException(503, 'Error when fetching user :'.$fuser->error.' (conf->entity='.$conf->entity.')'); @@ -157,9 +166,7 @@ class DolibarrApiAccess implements iAuthenticate if ($fuser->admin) { static::$role = 'admin'; } - } - else - { + } else { throw new RestException(401, "Failed to login to API. No parameter 'HTTP_DOLAPIKEY' on HTTP header (and no parameter DOLAPIKEY in URL)."); } diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index ce734aadeb5..9605f46f219 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -196,7 +196,7 @@ class Documents extends DolibarrApi throw new RestException(404, 'Invoice not found'); } - $templateused = $doctemplate ? $doctemplate : $this->invoice->modelpdf; + $templateused = $doctemplate ? $doctemplate : $this->invoice->model_pdf; $result = $this->invoice->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { throw new RestException(500, 'Error generating document'); @@ -210,7 +210,7 @@ class Documents extends DolibarrApi if (!$result) { throw new RestException(404, 'Order not found'); } - $templateused = $doctemplate ? $doctemplate : $this->order->modelpdf; + $templateused = $doctemplate ? $doctemplate : $this->order->model_pdf; $result = $this->order->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { throw new RestException(500, 'Error generating document'); @@ -224,7 +224,7 @@ class Documents extends DolibarrApi if (!$result) { throw new RestException(404, 'Proposal not found'); } - $templateused = $doctemplate ? $doctemplate : $this->propal->modelpdf; + $templateused = $doctemplate ? $doctemplate : $this->propal->model_pdf; $result = $this->propal->generateDocument($templateused, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { throw new RestException(500, 'Error generating document'); @@ -419,8 +419,10 @@ class Documents extends DolibarrApi $object = new Product($this->db); $result = $object->fetch($id, $ref); - if (!$result) { + if ($result==0) { throw new RestException(404, 'Product not found'); + } elseif ($result<0) { + throw new RestException(500, 'Error while fetching object: '.$object->error); } $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); @@ -630,7 +632,7 @@ class Documents extends DolibarrApi } elseif ($result < 0) { - throw new RestException(500, 'Error while fetching object.'); + throw new RestException(500, 'Error while fetching object: '.$object->error); } } diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php index 74aeec42dc1..8627808a679 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -40,7 +40,7 @@ class Login * * Request the API token for a couple username / password. * Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass into server log file). - * Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: The API key (DOLAPIKEY) can be found/set on the user page. + * Both methods are provided for developer conveniance. Best is to not use at all the login API method and enter directly the "DOLAPIKEY" into field at the top right of page. Note: The API token (DOLAPIKEY) can be found/set on the user page. * * @param string $login User login * @param string $password User password @@ -122,9 +122,7 @@ class Login { throw new RestException(500, 'Error when updating api_key for user :'.$this->db->lasterror()); } - } - else - { + } else { $token = $tmpuser->api_key; } diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index fd6432b553f..8177fbf7e1e 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2017 Regis Houssin * Copyright (C) 2017 Neil Orley * Copyright (C) 2018 Frédéric France - * Copyright (C) 2018-2019 Thibault FOUCART + * Copyright (C) 2018-2020 Thibault FOUCART * * * This program is free software; you can redistribute it and/or modify @@ -24,6 +24,7 @@ use Luracast\Restler\RestException; require_once DOL_DOCUMENT_ROOT.'/main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/cstate.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php'; /** @@ -34,1744 +35,1865 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php'; */ class Setup extends DolibarrApi { - private $translations = null; - - /** - * Constructor - */ - public function __construct() - { - global $db; - $this->db = $db; - } - - /** - * Get the list of ordering methods. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number {@min 0} - * @param int $active Payment type is active or not {@min 0} {@max 1} - * @param string $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'OrderByWWW')" - * - * @url GET dictionary/ordering_methods - * - * @return array [List of ordering methods] - * - * @throws RestException 400 - */ - public function getOrderingMethods($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid, code, libelle as label, module"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_input_method as t"; - $sql .= " WHERE t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(400, $this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of payments types. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number {@min 0} - * @param int $active Payment type is active or not {@min 0} {@max 1} - * @param string $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'CHQ')" - * - * @url GET dictionary/payment_types - * - * @return array [List of payment types] - * - * @throws RestException 400 - */ - public function getPaymentTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT id, code, type, libelle as label, module"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_paiement as t"; - $sql .= " WHERE t.entity IN (".getEntity('c_paiement').")"; - $sql .= " AND t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(400, $this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of countries. - * - * The names of the countries will be translated to the given language if - * the $lang parameter is provided. The value of $lang must be a language - * code supported by Dolibarr, for example 'en_US' or 'fr_FR'. - * The returned list is sorted by country ID. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param string $filter To filter the countries by name - * @param string $lang Code of the language the label of the countries must be translated to - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of countries - * - * @url GET dictionary/countries - * - * @throws RestException - */ - public function getListOfCountries($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $filter = '', $lang = '', $sqlfilters = '') - { - $list = array(); - - // Note: The filter is not applied in the SQL request because it must - // be applied to the translated names, not to the names in database. - $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."c_country as t"; - $sql .= " WHERE 1 = 1"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $obj = $this->db->fetch_object($result); - $country = new Ccountry($this->db); - if ($country->fetch($obj->rowid) > 0) { - // Translate the name of the country if needed - // and then apply the filter if there is one. - $this->translateLabel($country, $lang, 'Country'); - - if (empty($filter) || stripos($country->label, $filter) !== false) { - $list[] = $this->_cleanObjectDatas($country); - } - } - } - } else { - throw new RestException(503, 'Error when retrieving list of countries'); - } - - return $list; - } - - /** - * Get country by ID. - * - * @param int $id ID of country - * @param string $lang Code of the language the name of the - * country must be translated to - * @return array Array of cleaned object properties - * - * @url GET dictionary/countries/{id} - * - * @throws RestException - */ - public function getCountryByID($id, $lang = '') - { - return $this->_fetchCcountry($id, '', '', $lang); - } - - /** - * Get country by Code. - * - * @param string $code Code of country - * @param string $lang Code of the language the name of the - * country must be translated to - * @return array Array of cleaned object properties - * - * @url GET dictionary/countries/byCode/{code} - * - * @throws RestException - */ - public function getCountryByCode($code, $lang = '') - { - return $this->_fetchCcountry('', $code, '', $lang); - } - - /** - * Get country by Iso. - * - * @param string $iso ISO of country - * @param string $lang Code of the language the name of the - * country must be translated to - * @return array Array of cleaned object properties - * - * @url GET dictionary/countries/byISO/{iso} - * - * @throws RestException - */ - public function getCountryByISO($iso, $lang = '') - { - return $this->_fetchCcountry('', '', $iso, $lang); - } - - /** - * Get country. - * - * @param int $id ID of country - * @param string $code Code of country - * @param string $iso ISO of country - * @param string $lang Code of the language the name of the - * country must be translated to - * @return array Array of cleaned object properties - * - * @throws RestException - */ - private function _fetchCcountry($id, $code = '', $iso = '', $lang = '') - { - $country = new Ccountry($this->db); - - $result = $country->fetch($id, $code, $iso); - if ($result < 0) { - throw new RestException(503, 'Error when retrieving country : '.$country->error); - } elseif ($result == 0) { - throw new RestException(404, 'country not found'); - } - - $this->translateLabel($country, $lang, 'Country'); - - return $this->_cleanObjectDatas($country); - } - - /** - * Get the list of delivery times. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number {@min 0} - * @param int $active Delivery times is active or not {@min 0} {@max 1} - * @param string $sqlfilters SQL criteria to filter with. - * - * @url GET dictionary/availability - * - * @return array [List of availability] - * - * @throws RestException 400 - */ - public function getAvailability($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid, code, label"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_availability as t"; - $sql .= " WHERE t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(400, $this->db->lasterror()); - } - - return $list; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore - /** - * Clean sensible object datas - * - * @param object $object Object to clean - * @return array Array of cleaned object properties - */ - protected function _cleanObjectDatas($object) - { - // phpcs:enable - $object = parent::_cleanObjectDatas($object); - - unset($object->error); - unset($object->errors); - - return $object; - } - - /** - * Translate the name of the object to the given language. - * - * @param object $object Object with label to translate - * @param string $lang Code of the language the name of the object must be translated to - * @param string $prefix Prefix for translation key - * - * @return void - */ - private function translateLabel($object, $lang, $prefix = 'Country') - { - if (!empty($lang)) { - // Load the translations if this is a new language. - if ($this->translations == null || $this->translations->getDefaultLang() !== $lang) { - global $conf; - $this->translations = new Translate('', $conf); - $this->translations->setDefaultLang($lang); - $this->translations->load('dict'); - } - if ($object->code) { - $key = $prefix.$object->code; - - $translation = $this->translations->trans($key); - if ($translation != $key) { - $object->label = html_entity_decode($translation); - } - } - } - } - - /** - * Get the list of shipment methods. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param int $active Payment term is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * - * @return array List of shipment methods - * - * @url GET dictionary/shipment_methods - * - * @throws RestException - */ - public function getListOfShipmentMethods($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - $sql = "SELECT t.rowid, t.code, t.libelle, t.description, t.tracking"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as t"; - $sql .= " WHERE t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of shipment methods : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of events types. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param string $type To filter on type of event - * @param string $module To filter on module events - * @param int $active Event's type is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of events types - * - * @url GET dictionary/event_types - * - * @throws RestException - */ - public function getListOfEventTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $type = '', $module = '', $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT id, code, type, libelle as label, module"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm as t"; - $sql .= " WHERE t.active = ".$active; - if ($type) $sql .= " AND t.type LIKE '%".$this->db->escape($type)."%'"; - if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of events types : '.$this->db->lasterror()); - } - - return $list; - } - - - /** - * Get the list of Expense Report types. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param string $module To filter on module - * @param int $active Event's type is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of expense report types - * - * @url GET dictionary/expensereport_types - * - * @throws RestException - */ - public function getListOfExpenseReportsTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $module = '', $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT id, code, label, accountancy_code, active, module, position"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_type_fees as t"; - $sql .= " WHERE t.active = ".$active; - if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of expense report types : '.$this->db->lasterror()); - } - - return $list; - } - - - /** - * Get the list of contacts types. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param string $type To filter on type of contact - * @param string $module To filter on module contacts - * @param int $active Contact's type is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of Contacts types - * - * @url GET dictionary/contact_types - * - * @throws RestException - */ - public function getListOfContactTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $type = '', $module = '', $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid, code, element as type, libelle as label, source, module, position"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_type_contact as t"; - $sql .= " WHERE t.active = ".$active; - if ($type) $sql .= " AND type LIKE '%".$this->db->escape($type)."%'"; - if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of contacts types : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of civilities. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param string $module To filter on module events - * @param int $active Civility is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of civility types - * - * @url GET dictionary/civilities - * - * @throws RestException - */ - public function getListOfCivilities($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $module = '', $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid, code, label, module"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_civility as t"; - $sql .= " WHERE t.active = ".$active; - if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of civility : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of currencies. - * - * @param int $multicurrency Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates) {@min 0} {@max 2} - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param int $active Payment term is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of currencies - * - * @url GET dictionary/currencies - * - * @throws RestException - */ - public function getListOfCurrencies($multicurrency = 0, $sortfield = "code_iso", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - $sql = "SELECT t.code_iso, t.label, t.unicode"; - if (!empty($multicurrency)) $sql .= " , cr.date_sync, cr.rate "; - $sql .= " FROM ".MAIN_DB_PREFIX."c_currencies as t"; - if (!empty($multicurrency)) { - $sql .= " JOIN ".MAIN_DB_PREFIX."multicurrency as m ON m.code=t.code_iso"; - $sql .= " JOIN ".MAIN_DB_PREFIX."multicurrency_rate as cr ON (m.rowid = cr.fk_multicurrency)"; - } - $sql .= " WHERE t.active = ".$active; - if (!empty($multicurrency)) { - $sql .= " AND m.entity IN (".getEntity('multicurrency').")"; - if (!empty($multicurrency) && $multicurrency != 2) { - $sql .= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; - } - } - - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of currency : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of extra fields. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param string $type Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...) - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')" - * @return array List of extra fields - * - * @url GET extrafields - * - * @throws RestException - */ - public function getListOfExtrafields($sortfield = "t.pos", $sortorder = 'ASC', $type = '', $sqlfilters = '') - { - $list = array(); - - if ($type == 'thirdparty') $type = 'societe'; - if ($type == 'contact') $type = 'socpeople'; - - $sql = "SELECT t.rowid, t.name, t.label, t.type, t.size, t.elementtype, t.fieldunique, t.fieldrequired, t.param, t.pos, t.alwayseditable, t.perms, t.list, t.fielddefault, t.fieldcomputed"; - $sql .= " FROM ".MAIN_DB_PREFIX."extrafields as t"; - $sql .= " WHERE t.entity IN (".getEntity('extrafields').")"; - if (!empty($type)) $sql .= " AND t.elementtype = '".$this->db->escape($type)."'"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - $sql .= $this->db->order($sortfield, $sortorder); - - $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { - while ($tab = $this->db->fetch_object($resql)) - { - // New usage - $list[$tab->elementtype][$tab->name]['type'] = $tab->type; - $list[$tab->elementtype][$tab->name]['label'] = $tab->label; - $list[$tab->elementtype][$tab->name]['size'] = $tab->size; - $list[$tab->elementtype][$tab->name]['elementtype'] = $tab->elementtype; - $list[$tab->elementtype][$tab->name]['default'] = $tab->fielddefault; - $list[$tab->elementtype][$tab->name]['computed'] = $tab->fieldcomputed; - $list[$tab->elementtype][$tab->name]['unique'] = $tab->fieldunique; - $list[$tab->elementtype][$tab->name]['required'] = $tab->fieldrequired; - $list[$tab->elementtype][$tab->name]['param'] = ($tab->param ? unserialize($tab->param) : ''); - $list[$tab->elementtype][$tab->name]['pos'] = $tab->pos; - $list[$tab->elementtype][$tab->name]['alwayseditable'] = $tab->alwayseditable; - $list[$tab->elementtype][$tab->name]['perms'] = $tab->perms; - $list[$tab->elementtype][$tab->name]['list'] = $tab->list; - } - } - } - else - { - throw new RestException(503, 'Error when retrieving list of extra fields : '.$this->db->lasterror()); - } - - if (!count($list)) - { - throw new RestException(404, 'No extrafield found'); - } - - return $list; - } - - - /** - * Get the list of towns. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param string $zipcode To filter on zipcode - * @param string $town To filter on city name - * @param int $active Payment term is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of towns - * - * @url GET dictionary/towns - * - * @throws RestException - */ - public function getListOfTowns($sortfield = "zip,town", $sortorder = 'ASC', $limit = 100, $page = 0, $zipcode = '', $town = '', $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid AS id, zip, town, fk_county, fk_pays AS fk_country"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_ziptown as t"; - $sql .= " AND t.active = ".$active; - if ($zipcode) $sql .= " AND t.zip LIKE '%".$this->db->escape($zipcode)."%'"; - if ($town) $sql .= " AND t.town LIKE '%".$this->db->escape($town)."%'"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of towns : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of payments terms. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number {@min 0} - * @param int $active Payment term is active or not {@min 0} {@max 1} - * @param string $sqlfilters SQL criteria to filter. Syntax example "(t.code:=:'CHQ')" - * - * @url GET dictionary/payment_terms - * - * @return array List of payment terms - * - * @throws RestException 400 - */ - public function getPaymentTerms($sortfield = "sortorder", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid as id, code, sortorder, libelle as label, libelle_facture as descr, type_cdr, nbjour, decalage, module"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; - $sql .= " WHERE t.entity IN (".getEntity('c_payment_term').")"; - $sql .= " AND t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(400, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(400, $this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of shipping methods. - * - * @param int $limit Number of items per page - * @param int $page Page number {@min 0} - * @param int $active Shipping methodsm is active or not {@min 0} {@max 1} - * @param string $sqlfilters SQL criteria to filter. Syntax example "(t.code:=:'CHQ')" - * - * @url GET dictionary/shipping_methods - * - * @return array List of shipping methods - * - * @throws RestException 400 - */ - public function getShippingModes($limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid as id, code, libelle as label, description, tracking, module"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as t"; - $sql .= " WHERE t.entity IN (".getEntity('c_shipment_mode').")"; - $sql .= " AND t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(400, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - //$sql.= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(400, $this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of measuring units. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param int $active Measuring unit is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of measuring unit - * - * @url GET dictionary/units - * - * @throws RestException - */ - public function getListOfMeasuringUnits($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - //TODO link with multicurrency module - $sql = "SELECT t.rowid, t.code, t.label,t.short_label, t.active, t.scale, t.unit_type"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_units as t"; - $sql .= " WHERE t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of measuring units: '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of social networks. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param int $active Social network is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of social networks - * - * @url GET dictionary/socialnetworks - * - * @throws RestException - */ - public function getListOfsocialNetworks($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - global $conf; - - if (empty($conf->socialnetworks->enabled)) { - throw new RestException(400, 'API not available: this dictionary is not enabled by setup'); - } + private $translations = null; + + /** + * Constructor + */ + public function __construct() + { + global $db; + $this->db = $db; + } + + /** + * Get the list of ordering methods. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number {@min 0} + * @param int $active Payment type is active or not {@min 0} {@max 1} + * @param string $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'OrderByWWW')" + * + * @url GET dictionary/ordering_methods + * + * @return array [List of ordering methods] + * + * @throws RestException 400 + */ + public function getOrderingMethods($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + if (!DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } + + $sql = "SELECT rowid, code, libelle as label, module"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_input_method as t"; + $sql .= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(400, $this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of payments types. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number {@min 0} + * @param int $active Payment type is active or not {@min 0} {@max 1} + * @param string $sqlfilters SQL criteria to filter with. Syntax example "(t.code:=:'CHQ')" + * + * @url GET dictionary/payment_types + * + * @return array [List of payment types] + * + * @throws RestException 400 + */ + public function getPaymentTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + if (!DolibarrApiAccess::$user->rights->propal->lire && !DolibarrApiAccess::$user->rights->commande->lire && !DolibarrApiAccess::$user->rights->facture->lire) { + throw new RestException(401); + } + + $sql = "SELECT id, code, type, libelle as label, module"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_paiement as t"; + $sql .= " WHERE t.entity IN (".getEntity('c_paiement').")"; + $sql .= " AND t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(400, $this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of states/provinces. + * + * The names of the states will be translated to the given language if + * the $lang parameter is provided. The value of $lang must be a language + * code supported by Dolibarr, for example 'en_US' or 'fr_FR'. + * The returned list is sorted by state ID. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $filter To filter the countries by name + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of countries + * + * @url GET dictionary/states + * + * @throws RestException + */ + public function getListOfStates($sortfield = "code_departement", $sortorder = 'ASC', $limit = 100, $page = 0, $filter = '', $sqlfilters = '') + { + $list = array(); + + // Note: The filter is not applied in the SQL request because it must + // be applied to the translated names, not to the names in database. + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."c_departements as t"; + $sql .= " WHERE 1 = 1"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $obj = $this->db->fetch_object($result); + $state = new Cstate($this->db); + if ($state->fetch($obj->rowid) > 0) { + if (empty($filter) || stripos($state->label, $filter) !== false) { + $list[] = $this->_cleanObjectDatas($state); + } + } + } + } else { + throw new RestException(503, 'Error when retrieving list of states'); + } + + return $list; + } + + /** + * Get state by ID. + * + * @param int $id ID of state + * @return array Array of cleaned object properties + * + * @url GET dictionary/states/{id} + * + * @throws RestException + */ + public function getStateByID($id) + { + return $this->_fetchCstate($id, ''); + } + + /** + * Get state by Code. + * + * @param string $code Code of state + * @return array Array of cleaned object properties + * + * @url GET dictionary/states/byCode/{code} + * + * @throws RestException + */ + public function getStateByCode($code) + { + return $this->_fetchCstate('', $code); + } + + /** + * Get the list of countries. + * + * The names of the countries will be translated to the given language if + * the $lang parameter is provided. The value of $lang must be a language + * code supported by Dolibarr, for example 'en_US' or 'fr_FR'. + * The returned list is sorted by country ID. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $filter To filter the countries by name + * @param string $lang Code of the language the label of the countries must be translated to + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of countries + * + * @url GET dictionary/countries + * + * @throws RestException + */ + public function getListOfCountries($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $filter = '', $lang = '', $sqlfilters = '') + { + $list = array(); + + // Note: The filter is not applied in the SQL request because it must + // be applied to the translated names, not to the names in database. + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."c_country as t"; + $sql .= " WHERE 1 = 1"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $obj = $this->db->fetch_object($result); + $country = new Ccountry($this->db); + if ($country->fetch($obj->rowid) > 0) { + // Translate the name of the country if needed + // and then apply the filter if there is one. + $this->translateLabel($country, $lang, 'Country'); + + if (empty($filter) || stripos($country->label, $filter) !== false) { + $list[] = $this->_cleanObjectDatas($country); + } + } + } + } else { + throw new RestException(503, 'Error when retrieving list of countries'); + } + + return $list; + } + + /** + * Get country by ID. + * + * @param int $id ID of country + * @param string $lang Code of the language the name of the + * country must be translated to + * @return array Array of cleaned object properties + * + * @url GET dictionary/countries/{id} + * + * @throws RestException + */ + public function getCountryByID($id, $lang = '') + { + return $this->_fetchCcountry($id, '', '', $lang); + } + + /** + * Get country by Code. + * + * @param string $code Code of country + * @param string $lang Code of the language the name of the + * country must be translated to + * @return array Array of cleaned object properties + * + * @url GET dictionary/countries/byCode/{code} + * + * @throws RestException + */ + public function getCountryByCode($code, $lang = '') + { + return $this->_fetchCcountry('', $code, '', $lang); + } + + /** + * Get country by Iso. + * + * @param string $iso ISO of country + * @param string $lang Code of the language the name of the + * country must be translated to + * @return array Array of cleaned object properties + * + * @url GET dictionary/countries/byISO/{iso} + * + * @throws RestException + */ + public function getCountryByISO($iso, $lang = '') + { + return $this->_fetchCcountry('', '', $iso, $lang); + } + + /** + * Get state. + * + * @param int $id ID of state + * @param string $code Code of state + * @return array Array of cleaned object properties + * + * @throws RestException + */ + private function _fetchCstate($id, $code = '') + { + $state = new Cstate($this->db); + + $result = $state->fetch($id, $code); + if ($result < 0) { + throw new RestException(503, 'Error when retrieving state : '.$state->error); + } elseif ($result == 0) { + throw new RestException(404, 'State not found'); + } + + return $this->_cleanObjectDatas($state); + } + + /** + * Get country. + * + * @param int $id ID of country + * @param string $code Code of country + * @param string $iso ISO of country + * @param string $lang Code of the language the name of the + * country must be translated to + * @return array Array of cleaned object properties + * + * @throws RestException + */ + private function _fetchCcountry($id, $code = '', $iso = '', $lang = '') + { + $country = new Ccountry($this->db); + + $result = $country->fetch($id, $code, $iso); + if ($result < 0) { + throw new RestException(503, 'Error when retrieving country : '.$country->error); + } elseif ($result == 0) { + throw new RestException(404, 'country not found'); + } + + $this->translateLabel($country, $lang, 'Country'); + + return $this->_cleanObjectDatas($country); + } + + /** + * Get the list of delivery times. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number {@min 0} + * @param int $active Delivery times is active or not {@min 0} {@max 1} + * @param string $sqlfilters SQL criteria to filter with. + * + * @url GET dictionary/availability + * + * @return array [List of availability] + * + * @throws RestException 400 + */ + public function getAvailability($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + if (!DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } + + $sql = "SELECT rowid, code, label"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_availability as t"; + $sql .= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(400, 'error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(400, $this->db->lasterror()); + } + + return $list; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Clean sensible object datas + * + * @param object $object Object to clean + * @return array Array of cleaned object properties + */ + protected function _cleanObjectDatas($object) + { + // phpcs:enable + $object = parent::_cleanObjectDatas($object); + + unset($object->error); + unset($object->errors); + + return $object; + } + + /** + * Translate the name of the object to the given language. + * + * @param object $object Object with label to translate + * @param string $lang Code of the language the name of the object must be translated to + * @param string $prefix Prefix for translation key + * + * @return void + */ + private function translateLabel($object, $lang, $prefix = 'Country') + { + if (!empty($lang)) { + // Load the translations if this is a new language. + if ($this->translations == null || $this->translations->getDefaultLang() !== $lang) { + global $conf; + $this->translations = new Translate('', $conf); + $this->translations->setDefaultLang($lang); + $this->translations->load('dict'); + } + if ($object->code) { + $key = $prefix.$object->code; + + $translation = $this->translations->trans($key); + if ($translation != $key) { + $object->label = html_entity_decode($translation); + } + } + } + } + + /** + * Get the list of shipment methods. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * + * @return array List of shipment methods + * + * @url GET dictionary/shipment_methods + * + * @throws RestException + */ + public function getListOfShipmentMethods($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + $sql = "SELECT t.rowid, t.code, t.libelle, t.description, t.tracking"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as t"; + $sql .= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of shipment methods : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of events types. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $type To filter on type of event + * @param string $module To filter on module events + * @param int $active Event's type is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of events types + * + * @url GET dictionary/event_types + * + * @throws RestException + */ + public function getListOfEventTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $type = '', $module = '', $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT id, code, type, libelle as label, module"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm as t"; + $sql .= " WHERE t.active = ".$active; + if ($type) $sql .= " AND t.type LIKE '%".$this->db->escape($type)."%'"; + if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of events types : '.$this->db->lasterror()); + } + + return $list; + } + + + /** + * Get the list of Expense Report types. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $module To filter on module + * @param int $active Event's type is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of expense report types + * + * @url GET dictionary/expensereport_types + * + * @throws RestException + */ + public function getListOfExpenseReportsTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $module = '', $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT id, code, label, accountancy_code, active, module, position"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_type_fees as t"; + $sql .= " WHERE t.active = ".$active; + if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of expense report types : '.$this->db->lasterror()); + } + + return $list; + } + + + /** + * Get the list of contacts types. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $type To filter on type of contact + * @param string $module To filter on module contacts + * @param int $active Contact's type is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of Contacts types + * + * @url GET dictionary/contact_types + * + * @throws RestException + */ + public function getListOfContactTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $type = '', $module = '', $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid, code, element as type, libelle as label, source, module, position"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_type_contact as t"; + $sql .= " WHERE t.active = ".$active; + if ($type) $sql .= " AND type LIKE '%".$this->db->escape($type)."%'"; + if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of contacts types : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of civilities. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $module To filter on module events + * @param int $active Civility is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of civility types + * + * @url GET dictionary/civilities + * + * @throws RestException + */ + public function getListOfCivilities($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $module = '', $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid, code, label, module"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_civility as t"; + $sql .= " WHERE t.active = ".$active; + if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of civility : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of currencies. + * + * @param int $multicurrency Multicurrency rates (0: no multicurrency, 1: last rate, 2: all rates) {@min 0} {@max 2} + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of currencies + * + * @url GET dictionary/currencies + * + * @throws RestException + */ + public function getListOfCurrencies($multicurrency = 0, $sortfield = "code_iso", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + $sql = "SELECT t.code_iso, t.label, t.unicode"; + if (!empty($multicurrency)) $sql .= " , cr.date_sync, cr.rate "; + $sql .= " FROM ".MAIN_DB_PREFIX."c_currencies as t"; + if (!empty($multicurrency)) { + $sql .= " JOIN ".MAIN_DB_PREFIX."multicurrency as m ON m.code=t.code_iso"; + $sql .= " JOIN ".MAIN_DB_PREFIX."multicurrency_rate as cr ON (m.rowid = cr.fk_multicurrency)"; + } + $sql .= " WHERE t.active = ".$active; + if (!empty($multicurrency)) { + $sql .= " AND m.entity IN (".getEntity('multicurrency').")"; + if (!empty($multicurrency) && $multicurrency != 2) { + $sql .= " AND cr.date_sync = (SELECT MAX(cr2.date_sync) FROM ".MAIN_DB_PREFIX."multicurrency_rate AS cr2 WHERE cr2.fk_multicurrency = m.rowid)"; + } + } + + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of currency : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of extra fields. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param string $type Type of element ('adherent', 'commande', 'thirdparty', 'facture', 'propal', 'product', ...) + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.label:like:'SO-%')" + * @return array List of extra fields + * + * @url GET extrafields + * + * @throws RestException + */ + public function getListOfExtrafields($sortfield = "t.pos", $sortorder = 'ASC', $type = '', $sqlfilters = '') + { + $list = array(); + + if (!DolibarrApiAccess::$user->admin) { + throw new RestException(401, 'Only an admin user can get list of extrafields'); + } + + if ($type == 'thirdparty') $type = 'societe'; + if ($type == 'contact') $type = 'socpeople'; + + $sql = "SELECT t.rowid, t.name, t.label, t.type, t.size, t.elementtype, t.fieldunique, t.fieldrequired, t.param, t.pos, t.alwayseditable, t.perms, t.list, t.fielddefault, t.fieldcomputed"; + $sql .= " FROM ".MAIN_DB_PREFIX."extrafields as t"; + $sql .= " WHERE t.entity IN (".getEntity('extrafields').")"; + if (!empty($type)) $sql .= " AND t.elementtype = '".$this->db->escape($type)."'"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + $sql .= $this->db->order($sortfield, $sortorder); + + $resql = $this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + while ($tab = $this->db->fetch_object($resql)) + { + // New usage + $list[$tab->elementtype][$tab->name]['type'] = $tab->type; + $list[$tab->elementtype][$tab->name]['label'] = $tab->label; + $list[$tab->elementtype][$tab->name]['size'] = $tab->size; + $list[$tab->elementtype][$tab->name]['elementtype'] = $tab->elementtype; + $list[$tab->elementtype][$tab->name]['default'] = $tab->fielddefault; + $list[$tab->elementtype][$tab->name]['computed'] = $tab->fieldcomputed; + $list[$tab->elementtype][$tab->name]['unique'] = $tab->fieldunique; + $list[$tab->elementtype][$tab->name]['required'] = $tab->fieldrequired; + $list[$tab->elementtype][$tab->name]['param'] = ($tab->param ? unserialize($tab->param) : ''); + $list[$tab->elementtype][$tab->name]['pos'] = $tab->pos; + $list[$tab->elementtype][$tab->name]['alwayseditable'] = $tab->alwayseditable; + $list[$tab->elementtype][$tab->name]['perms'] = $tab->perms; + $list[$tab->elementtype][$tab->name]['list'] = $tab->list; + } + } + } else { + throw new RestException(503, 'Error when retrieving list of extra fields : '.$this->db->lasterror()); + } + + if (!count($list)) + { + throw new RestException(404, 'No extrafield found'); + } + + return $list; + } + + + /** + * Get the list of towns. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param string $zipcode To filter on zipcode + * @param string $town To filter on city name + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of towns + * + * @url GET dictionary/towns + * + * @throws RestException + */ + public function getListOfTowns($sortfield = "zip,town", $sortorder = 'ASC', $limit = 100, $page = 0, $zipcode = '', $town = '', $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid AS id, zip, town, fk_county, fk_pays AS fk_country"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_ziptown as t"; + $sql .= " AND t.active = ".$active; + if ($zipcode) $sql .= " AND t.zip LIKE '%".$this->db->escape($zipcode)."%'"; + if ($town) $sql .= " AND t.town LIKE '%".$this->db->escape($town)."%'"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of towns : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of payments terms. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number {@min 0} + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters SQL criteria to filter. Syntax example "(t.code:=:'CHQ')" + * + * @url GET dictionary/payment_terms + * + * @return array List of payment terms + * + * @throws RestException 400 + */ + public function getPaymentTerms($sortfield = "sortorder", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + if (!DolibarrApiAccess::$user->rights->propal->lire && !DolibarrApiAccess::$user->rights->commande->lire && !DolibarrApiAccess::$user->rights->facture->lire) { + throw new RestException(401); + } + + $sql = "SELECT rowid as id, code, sortorder, libelle as label, libelle_facture as descr, type_cdr, nbjour, decalage, module"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_payment_term as t"; + $sql .= " WHERE t.entity IN (".getEntity('c_payment_term').")"; + $sql .= " AND t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(400, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(400, $this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of shipping methods. + * + * @param int $limit Number of items per page + * @param int $page Page number {@min 0} + * @param int $active Shipping methodsm is active or not {@min 0} {@max 1} + * @param string $sqlfilters SQL criteria to filter. Syntax example "(t.code:=:'CHQ')" + * + * @url GET dictionary/shipping_methods + * + * @return array List of shipping methods + * + * @throws RestException 400 + */ + public function getShippingModes($limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid as id, code, libelle as label, description, tracking, module"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as t"; + $sql .= " WHERE t.entity IN (".getEntity('c_shipment_mode').")"; + $sql .= " AND t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(400, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + //$sql.= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(400, $this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of measuring units. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Measuring unit is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of measuring unit + * + * @url GET dictionary/units + * + * @throws RestException + */ + public function getListOfMeasuringUnits($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + //TODO link with multicurrency module + $sql = "SELECT t.rowid, t.code, t.label,t.short_label, t.active, t.scale, t.unit_type"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_units as t"; + $sql .= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of measuring units: '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of social networks. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Social network is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of social networks + * + * @url GET dictionary/socialnetworks + * + * @throws RestException + */ + public function getListOfsocialNetworks($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + global $conf; + + if (empty($conf->socialnetworks->enabled)) { + throw new RestException(400, 'API not available: this dictionary is not enabled by setup'); + } $list = array(); - //TODO link with multicurrency module - $sql = "SELECT t.rowid, t.entity, t.code, t.label, t.url, t.icon, t.active"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_socialnetworks as t"; - $sql .= " WHERE t.entity IN (".getEntity('c_socialnetworks').")"; - $sql .= " AND t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of social networks: '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of tickets categories. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param int $active Payment term is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of ticket categories - * - * @url GET dictionary/ticket_categories - * - * @throws RestException - */ - public function getTicketsCategories($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid, code, pos, label, use_default, description"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as t"; - $sql .= " WHERE t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of ticket categories : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of tickets severity. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param int $active Payment term is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of ticket severities - * - * @url GET dictionary/ticket_severities - * - * @throws RestException - */ - public function getTicketsSeverities($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid, code, pos, label, use_default, color, description"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_severity as t"; - $sql .= " WHERE t.active = ".$active; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of ticket severities : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get the list of tickets types. - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Number of items per page - * @param int $page Page number (starting from zero) - * @param int $active Payment term is active or not {@min 0} {@max 1} - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" - * @return array List of ticket types - * - * @url GET dictionary/ticket_types - * - * @throws RestException - */ - public function getTicketsTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') - { - $list = array(); - - $sql = "SELECT rowid, code, pos, label, use_default, description"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_type as t"; - $sql .= " WHERE t.active = ".(int) $active; - // if ($type) $sql .= " AND t.type LIKE '%".$this->db->escape($type)."%'"; - // if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - - $sql .= $this->db->order($sortfield, $sortorder); - - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $this->db->plimit($limit, $offset); - } - - $result = $this->db->query($sql); - - if ($result) { - $num = $this->db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - for ($i = 0; $i < $min; $i++) { - $list[] = $this->db->fetch_object($result); - } - } else { - throw new RestException(503, 'Error when retrieving list of ticket types : '.$this->db->lasterror()); - } - - return $list; - } - - /** - * Get properties of company - * - * @url GET /company - * - * @return array|mixed Data without useless information - * - */ - public function getCompany() - { - global $mysoc; - - return $this->_cleanObjectDatas($mysoc); - } - - - /** - * Get value of a setup variables - * - * Note that conf variables that stores security key or password hashes can't be loaded with API. - * - * @param string $constantname Name of conf variable to get - * @return array|mixed Data without useless information - * - * @url GET conf/{constantname} - * - * @throws RestException 403 Forbidden - * @throws RestException 500 Error Bad or unknown value for constantname - */ - public function getConf($constantname) - { - global $conf; - - if (!DolibarrApiAccess::$user->admin - && (empty($conf->global->API_LOGIN_ALLOWED_FOR_ADMIN_CHECK) || DolibarrApiAccess::$user->login != $conf->global->API_LOGIN_ALLOWED_FOR_ADMIN_CHECK)) { - throw new RestException(403, 'Error API open to admin users only or to the login user defined with constant API_LOGIN_ALLOWED_FOR_ADMIN_CHECK'); - } - - if (!preg_match('/^[a-zA-Z0-9_]+$/', $constantname) || !isset($conf->global->$constantname)) { - throw new RestException(500, 'Error Bad or unknown value for constantname'); - } - if (preg_match('/(_pass|_pw|password|secret|_key|key$)/i', $constantname)) { - throw new RestException(403, 'Forbidden'); - } - - return $conf->global->$constantname; - } - - /** - * Do a test of integrity for files and setup. - * - * @param string $target Can be 'local' or 'default' or Url of the signatures file to use for the test. Must be reachable by the tested Dolibarr. - * @return array Result of file and setup integrity check - * - * @url GET checkintegrity - * - * @throws RestException 404 Signature file not found - * @throws RestException 500 Technical error - * @throws RestException 503 Forbidden - */ - public function getCheckIntegrity($target) - { - global $langs, $conf; - - if (!DolibarrApiAccess::$user->admin - && (empty($conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK) || DolibarrApiAccess::$user->login != $conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK)) - { - throw new RestException(503, 'Error API open to admin users only or to the login user defined with constant API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK'); - } - - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; - - $langs->load("admin"); - - $outexpectedchecksum = ''; - $outcurrentchecksum = ''; - - // Modified or missing files - $file_list = array('missing' => array(), 'updated' => array()); - - // Local file to compare to - $xmlshortfile = GETPOST('xmlshortfile') ?GETPOST('xmlshortfile') : '/install/filelist-'.DOL_VERSION.'.xml'; - $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; - // Remote file to compare to - $xmlremote = ($target == 'default' ? '' : $target); - if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) $xmlremote = $conf->global->MAIN_FILECHECK_URL; - $param = 'MAIN_FILECHECK_URL_'.DOL_VERSION; - if (empty($xmlremote) && !empty($conf->global->$param)) $xmlremote = $conf->global->$param; - if (empty($xmlremote)) $xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; - - if ($target == 'local') - { - if (dol_is_file($xmlfile)) - { - $xml = simplexml_load_file($xmlfile); - } - else - { - throw new RestException(500, $langs->trans('XmlNotFound').': '.$xmlfile); - } - } - else - { - $xmlarray = getURLContent($xmlremote); - - // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) - if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404') - { - $xmlfile = $xmlarray['content']; - //print "xmlfilestart".$xmlfile."endxmlfile"; - $xml = simplexml_load_string($xmlfile); - } - else - { - $errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg']; - throw new RestException(500, $errormsg); - } - } - - - - if ($xml) - { - $checksumconcat = array(); - $file_list = array(); - $out = ''; - - // Forced constants - if (is_object($xml->dolibarr_constants[0])) - { - $out .= load_fiche_titre($langs->trans("ForcedConstants")); - - $out .= '
'; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''."\n"; - - $i = 0; - foreach ($xml->dolibarr_constants[0]->constant as $constant) // $constant is a simpleXMLElement - { - $constname = $constant['name']; - $constvalue = (string) $constant; - $constvalue = (empty($constvalue) ? '0' : $constvalue); - // Value found - $value = ''; - if ($constname && $conf->global->$constname != '') $value = $conf->global->$constname; - $valueforchecksum = (empty($value) ? '0' : $value); - - $checksumconcat[] = $valueforchecksum; - - $i++; - $out .= ''; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= "\n"; - } - - if ($i == 0) - { - $out .= ''; - } - $out .= '
#'.$langs->trans("Constant").''.$langs->trans("ExpectedValue").''.$langs->trans("Value").'
'.$i.''.$constname.''.$constvalue.''.$valueforchecksum.'
'.$langs->trans("None").'
'; - $out .= '
'; - - $out .= '
'; - } - - // Scan htdocs - if (is_object($xml->dolibarr_htdocs_dir[0])) - { - //var_dump($xml->dolibarr_htdocs_dir[0]['includecustom']);exit; - $includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']); - - // Defined qualified files (must be same than into generate_filelist_xml.php) - $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$'; - $regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs - $scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude); - - // Fill file_list with files in signature, new files, modified files - $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list - // Complete with list of new files - foreach ($scanfiles as $keyfile => $valfile) - { - $tmprelativefilename = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $valfile['fullname']); - if (!in_array($tmprelativefilename, $file_list['insignature'])) - { - $md5newfile = @md5_file($valfile['fullname']); // Can fails if we don't have permission to open/read file - $file_list['added'][] = array('filename'=>$tmprelativefilename, 'md5'=>$md5newfile); - } - } - - // Files missings - $out .= load_fiche_titre($langs->trans("FilesMissing")); - - $out .= '
'; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''."\n"; - $tmpfilelist = dol_sort_array($file_list['missing'], 'filename'); - if (is_array($tmpfilelist) && count($tmpfilelist)) - { - $i = 0; - foreach ($tmpfilelist as $file) - { - $i++; - $out .= ''; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= "\n"; - } - } - else - { - $out .= ''; - } - $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").'
'.$i.''.$file['filename'].''.$file['expectedmd5'].'
'.$langs->trans("None").'
'; - $out .= '
'; - - $out .= '
'; - - // Files modified - $out .= load_fiche_titre($langs->trans("FilesModified")); - - $totalsize = 0; - $out .= '
'; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''."\n"; - $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); - if (is_array($tmpfilelist2) && count($tmpfilelist2)) - { - $i = 0; - foreach ($tmpfilelist2 as $file) - { - $i++; - $out .= ''; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); - $totalsize += $size; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= "\n"; - } - $out .= ''; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= "\n"; - } - else - { - $out .= ''; - } - $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").''.$langs->trans("CurrentChecksum").''.$langs->trans("Size").''.$langs->trans("DateModification").'
'.$i.''.$file['filename'].''.$file['expectedmd5'].''.$file['md5'].''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'
'.$langs->trans("Total").''.dol_print_size($totalsize).'
'.$langs->trans("None").'
'; - $out .= '
'; - - $out .= '
'; - - // Files added - $out .= load_fiche_titre($langs->trans("FilesAdded")); - - $totalsize = 0; - $out .= '
'; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''."\n"; - $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename'); - if (is_array($tmpfilelist3) && count($tmpfilelist3)) - { - $i = 0; - foreach ($tmpfilelist3 as $file) - { - $i++; - $out .= ''; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); - $totalsize += $size; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= "\n"; - } - $out .= ''; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= ''."\n"; - $out .= "\n"; - } - else - { - $out .= ''; - } - $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").''.$langs->trans("CurrentChecksum").''.$langs->trans("Size").''.$langs->trans("DateModification").'
'.$i.''.$file['filename'].''.$file['expectedmd5'].''.$file['md5'].''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'
'.$langs->trans("Total").''.dol_print_size($totalsize).'
'.$langs->trans("None").'
'; - $out .= '
'; - - - // Show warning - if (empty($tmpfilelist) && empty($tmpfilelist2) && empty($tmpfilelist3)) - { - //setEventMessages($langs->trans("FileIntegrityIsStrictlyConformedWithReference"), null, 'mesgs'); - } - else - { - //setEventMessages($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), null, 'warnings'); - } - } - else - { - throw new RestException(500, 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile); - } - - - // Scan scripts - - - asort($checksumconcat); // Sort list of checksum - //var_dump($checksumconcat); - $checksumget = md5(join(',', $checksumconcat)); - $checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum); - - $outexpectedchecksum = ($checksumtoget ? $checksumtoget : $langs->trans("Unknown")); - if ($checksumget == $checksumtoget) - { - if (count($file_list['added'])) - { - $resultcode = 'warning'; - $resultcomment = 'FileIntegrityIsOkButFilesWereAdded'; - //$outcurrentchecksum = $checksumget.' - '.$langs->trans("FileIntegrityIsOkButFilesWereAdded").''; - $outcurrentchecksum = $checksumget; - } - else - { - $resultcode = 'ok'; - $resultcomment = 'Success'; - //$outcurrentchecksum = ''.$checksumget.''; - $outcurrentchecksum = $checksumget; - } - } - else - { - $resultcode = 'error'; - $resultcomment = 'Error'; - //$outcurrentchecksum = ''.$checksumget.''; - $outcurrentchecksum = $checksumget; - } - } - else { - throw new RestException(404, 'No signature file known'); - } - - return array('resultcode'=>$resultcode, 'resultcomment'=>$resultcomment, 'expectedchecksum'=> $outexpectedchecksum, 'currentchecksum'=> $outcurrentchecksum, 'out'=>$out); - } + //TODO link with multicurrency module + $sql = "SELECT t.rowid, t.entity, t.code, t.label, t.url, t.icon, t.active"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_socialnetworks as t"; + $sql .= " WHERE t.entity IN (".getEntity('c_socialnetworks').")"; + $sql .= " AND t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of social networks: '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of tickets categories. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of ticket categories + * + * @url GET dictionary/ticket_categories + * + * @throws RestException + */ + public function getTicketsCategories($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid, code, pos, label, use_default, description"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as t"; + $sql .= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of ticket categories : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of tickets severity. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of ticket severities + * + * @url GET dictionary/ticket_severities + * + * @throws RestException + */ + public function getTicketsSeverities($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid, code, pos, label, use_default, color, description"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_severity as t"; + $sql .= " WHERE t.active = ".$active; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of ticket severities : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get the list of tickets types. + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Number of items per page + * @param int $page Page number (starting from zero) + * @param int $active Payment term is active or not {@min 0} {@max 1} + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.code:like:'A%') and (t.active:>=:0)" + * @return array List of ticket types + * + * @url GET dictionary/ticket_types + * + * @throws RestException + */ + public function getTicketsTypes($sortfield = "code", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') + { + $list = array(); + + $sql = "SELECT rowid, code, pos, label, use_default, description"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_type as t"; + $sql .= " WHERE t.active = ".(int) $active; + // if ($type) $sql .= " AND t.type LIKE '%".$this->db->escape($type)."%'"; + // if ($module) $sql .= " AND t.module LIKE '%".$this->db->escape($module)."%'"; + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + + $sql .= $this->db->order($sortfield, $sortorder); + + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + for ($i = 0; $i < $min; $i++) { + $list[] = $this->db->fetch_object($result); + } + } else { + throw new RestException(503, 'Error when retrieving list of ticket types : '.$this->db->lasterror()); + } + + return $list; + } + + /** + * Get properties of company + * + * @url GET /company + * + * @return array|mixed Data without useless information + * + */ + public function getCompany() + { + global $mysoc; + + return $this->_cleanObjectDatas($mysoc); + } + + + /** + * Get value of a setup variables + * + * Note that conf variables that stores security key or password hashes can't be loaded with API. + * + * @param string $constantname Name of conf variable to get + * @return array|mixed Data without useless information + * + * @url GET conf/{constantname} + * + * @throws RestException 403 Forbidden + * @throws RestException 404 Error Bad or unknown value for constantname + */ + public function getConf($constantname) + { + global $conf; + + if (!DolibarrApiAccess::$user->admin + && (empty($conf->global->API_LOGINS_ALLOWED_FOR_CONST_READ) || DolibarrApiAccess::$user->login != $conf->global->API_LOGINS_ALLOWED_FOR_CONST_READ)) { + throw new RestException(403, 'Error API open to admin users only or to the users with logins defined into constant API_LOGINS_ALLOWED_FOR_CONST_READ'); + } + + if (!preg_match('/^[a-zA-Z0-9_]+$/', $constantname) || !isset($conf->global->$constantname)) { + throw new RestException(404, 'Error Bad or unknown value for constantname'); + } + if (isASecretKey($constantname)) { + throw new RestException(403, 'Forbidden. This parameter cant be read with APIs'); + } + + return $conf->global->$constantname; + } + + /** + * Do a test of integrity for files and setup. + * + * @param string $target Can be 'local' or 'default' or Url of the signatures file to use for the test. Must be reachable by the tested Dolibarr. + * @return array Result of file and setup integrity check + * + * @url GET checkintegrity + * + * @throws RestException 404 Signature file not found + * @throws RestException 500 Technical error + * @throws RestException 503 Forbidden + */ + public function getCheckIntegrity($target) + { + global $langs, $conf; + + if (!DolibarrApiAccess::$user->admin + && (empty($conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK) || DolibarrApiAccess::$user->login != $conf->global->API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK)) + { + throw new RestException(503, 'Error API open to admin users only or to the users with logins defined into constant API_LOGIN_ALLOWED_FOR_INTEGRITY_CHECK'); + } + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php'; + + $langs->load("admin"); + + $outexpectedchecksum = ''; + $outcurrentchecksum = ''; + + // Modified or missing files + $file_list = array('missing' => array(), 'updated' => array()); + + // Local file to compare to + $xmlshortfile = GETPOST('xmlshortfile') ?GETPOST('xmlshortfile') : '/install/filelist-'.DOL_VERSION.'.xml'; + $xmlfile = DOL_DOCUMENT_ROOT.$xmlshortfile; + // Remote file to compare to + $xmlremote = ($target == 'default' ? '' : $target); + if (empty($xmlremote) && !empty($conf->global->MAIN_FILECHECK_URL)) $xmlremote = $conf->global->MAIN_FILECHECK_URL; + $param = 'MAIN_FILECHECK_URL_'.DOL_VERSION; + if (empty($xmlremote) && !empty($conf->global->$param)) $xmlremote = $conf->global->$param; + if (empty($xmlremote)) $xmlremote = 'https://www.dolibarr.org/files/stable/signatures/filelist-'.DOL_VERSION.'.xml'; + + if ($target == 'local') + { + if (dol_is_file($xmlfile)) + { + $xml = simplexml_load_file($xmlfile); + } else { + throw new RestException(500, $langs->trans('XmlNotFound').': '.$xmlfile); + } + } else { + $xmlarray = getURLContent($xmlremote); + + // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...) + if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '404') + { + $xmlfile = $xmlarray['content']; + //print "xmlfilestart".$xmlfile."endxmlfile"; + $xml = simplexml_load_string($xmlfile); + } else { + $errormsg = $langs->trans('XmlNotFound').': '.$xmlremote.' - '.$xmlarray['http_code'].' '.$xmlarray['curl_error_no'].' '.$xmlarray['curl_error_msg']; + throw new RestException(500, $errormsg); + } + } + + + + if ($xml) + { + $checksumconcat = array(); + $file_list = array(); + $out = ''; + + // Forced constants + if (is_object($xml->dolibarr_constants[0])) + { + $out .= load_fiche_titre($langs->trans("ForcedConstants")); + + $out .= '
'; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''."\n"; + + $i = 0; + foreach ($xml->dolibarr_constants[0]->constant as $constant) // $constant is a simpleXMLElement + { + $constname = $constant['name']; + $constvalue = (string) $constant; + $constvalue = (empty($constvalue) ? '0' : $constvalue); + // Value found + $value = ''; + if ($constname && $conf->global->$constname != '') $value = $conf->global->$constname; + $valueforchecksum = (empty($value) ? '0' : $value); + + $checksumconcat[] = $valueforchecksum; + + $i++; + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= "\n"; + } + + if ($i == 0) + { + $out .= ''; + } + $out .= '
#'.$langs->trans("Constant").''.$langs->trans("ExpectedValue").''.$langs->trans("Value").'
'.$i.''.$constname.''.$constvalue.''.$valueforchecksum.'
'.$langs->trans("None").'
'; + $out .= '
'; + + $out .= '
'; + } + + // Scan htdocs + if (is_object($xml->dolibarr_htdocs_dir[0])) + { + //var_dump($xml->dolibarr_htdocs_dir[0]['includecustom']);exit; + $includecustom = (empty($xml->dolibarr_htdocs_dir[0]['includecustom']) ? 0 : $xml->dolibarr_htdocs_dir[0]['includecustom']); + + // Defined qualified files (must be same than into generate_filelist_xml.php) + $regextoinclude = '\.(php|php3|php4|php5|phtml|phps|phar|inc|css|scss|html|xml|js|json|tpl|jpg|jpeg|png|gif|ico|sql|lang|txt|yml|bak|md|mp3|mp4|wav|mkv|z|gz|zip|rar|tar|less|svg|eot|woff|woff2|ttf|manifest)$'; + $regextoexclude = '('.($includecustom ? '' : 'custom|').'documents|conf|install|public\/test|Shared\/PCLZip|nusoap\/lib\/Mail|php\/example|php\/test|geoip\/sample.*\.php|ckeditor\/samples|ckeditor\/adapters)$'; // Exclude dirs + $scanfiles = dol_dir_list(DOL_DOCUMENT_ROOT, 'files', 1, $regextoinclude, $regextoexclude); + + // Fill file_list with files in signature, new files, modified files + $ret = getFilesUpdated($file_list, $xml->dolibarr_htdocs_dir[0], '', DOL_DOCUMENT_ROOT, $checksumconcat); // Fill array $file_list + // Complete with list of new files + foreach ($scanfiles as $keyfile => $valfile) + { + $tmprelativefilename = preg_replace('/^'.preg_quote(DOL_DOCUMENT_ROOT, '/').'/', '', $valfile['fullname']); + if (!in_array($tmprelativefilename, $file_list['insignature'])) + { + $md5newfile = @md5_file($valfile['fullname']); // Can fails if we don't have permission to open/read file + $file_list['added'][] = array('filename'=>$tmprelativefilename, 'md5'=>$md5newfile); + } + } + + // Files missings + $out .= load_fiche_titre($langs->trans("FilesMissing")); + + $out .= '
'; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''."\n"; + $tmpfilelist = dol_sort_array($file_list['missing'], 'filename'); + if (is_array($tmpfilelist) && count($tmpfilelist)) + { + $i = 0; + foreach ($tmpfilelist as $file) + { + $i++; + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= "\n"; + } + } else { + $out .= ''; + } + $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").'
'.$i.''.$file['filename'].''.$file['expectedmd5'].'
'.$langs->trans("None").'
'; + $out .= '
'; + + $out .= '
'; + + // Files modified + $out .= load_fiche_titre($langs->trans("FilesModified")); + + $totalsize = 0; + $out .= '
'; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''."\n"; + $tmpfilelist2 = dol_sort_array($file_list['updated'], 'filename'); + if (is_array($tmpfilelist2) && count($tmpfilelist2)) + { + $i = 0; + foreach ($tmpfilelist2 as $file) + { + $i++; + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); + $totalsize += $size; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= "\n"; + } + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= "\n"; + } else { + $out .= ''; + } + $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").''.$langs->trans("CurrentChecksum").''.$langs->trans("Size").''.$langs->trans("DateModification").'
'.$i.''.$file['filename'].''.$file['expectedmd5'].''.$file['md5'].''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'
'.$langs->trans("Total").''.dol_print_size($totalsize).'
'.$langs->trans("None").'
'; + $out .= '
'; + + $out .= '
'; + + // Files added + $out .= load_fiche_titre($langs->trans("FilesAdded")); + + $totalsize = 0; + $out .= '
'; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''."\n"; + $tmpfilelist3 = dol_sort_array($file_list['added'], 'filename'); + if (is_array($tmpfilelist3) && count($tmpfilelist3)) + { + $i = 0; + foreach ($tmpfilelist3 as $file) + { + $i++; + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $size = dol_filesize(DOL_DOCUMENT_ROOT.'/'.$file['filename']); + $totalsize += $size; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= "\n"; + } + $out .= ''; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= ''."\n"; + $out .= "\n"; + } else { + $out .= ''; + } + $out .= '
#'.$langs->trans("Filename").''.$langs->trans("ExpectedChecksum").''.$langs->trans("CurrentChecksum").''.$langs->trans("Size").''.$langs->trans("DateModification").'
'.$i.''.$file['filename'].''.$file['expectedmd5'].''.$file['md5'].''.dol_print_size($size).''.dol_print_date(dol_filemtime(DOL_DOCUMENT_ROOT.'/'.$file['filename']), 'dayhour').'
'.$langs->trans("Total").''.dol_print_size($totalsize).'
'.$langs->trans("None").'
'; + $out .= '
'; + + + // Show warning + if (empty($tmpfilelist) && empty($tmpfilelist2) && empty($tmpfilelist3)) + { + //setEventMessages($langs->trans("FileIntegrityIsStrictlyConformedWithReference"), null, 'mesgs'); + } else { + //setEventMessages($langs->trans("FileIntegritySomeFilesWereRemovedOrModified"), null, 'warnings'); + } + } else { + throw new RestException(500, 'Error: Failed to found dolibarr_htdocs_dir into XML file '.$xmlfile); + } + + + // Scan scripts + + + asort($checksumconcat); // Sort list of checksum + //var_dump($checksumconcat); + $checksumget = md5(join(',', $checksumconcat)); + $checksumtoget = trim((string) $xml->dolibarr_htdocs_dir_checksum); + + $outexpectedchecksum = ($checksumtoget ? $checksumtoget : $langs->trans("Unknown")); + if ($checksumget == $checksumtoget) + { + if (count($file_list['added'])) + { + $resultcode = 'warning'; + $resultcomment = 'FileIntegrityIsOkButFilesWereAdded'; + //$outcurrentchecksum = $checksumget.' - '.$langs->trans("FileIntegrityIsOkButFilesWereAdded").''; + $outcurrentchecksum = $checksumget; + } else { + $resultcode = 'ok'; + $resultcomment = 'Success'; + //$outcurrentchecksum = ''.$checksumget.''; + $outcurrentchecksum = $checksumget; + } + } else { + $resultcode = 'error'; + $resultcomment = 'Error'; + //$outcurrentchecksum = ''.$checksumget.''; + $outcurrentchecksum = $checksumget; + } + } else { + throw new RestException(404, 'No signature file known'); + } + + return array('resultcode'=>$resultcode, 'resultcomment'=>$resultcomment, 'expectedchecksum'=> $outexpectedchecksum, 'currentchecksum'=> $outcurrentchecksum, 'out'=>$out); + } } diff --git a/htdocs/api/index.php b/htdocs/api/index.php index b5b34658551..1ae504f523a 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -205,14 +205,11 @@ if (!empty($reg[1]) && $reg[1] == 'explorer' && ($reg[2] == '/swagger.json' || $ { //dol_syslog("Found API by index.php: classname=".$classname."Api for module ".$dir." into ".$dir_part.$file_searched); $listofapis[strtolower($classname.'Api')] = $classname.'Api'; - } - elseif (class_exists($classname)) + } elseif (class_exists($classname)) { //dol_syslog("Found API by index.php: classname=".$classname." for module ".$dir." into ".$dir_part.$file_searched); $listofapis[strtolower($classname)] = $classname; - } - else - { + } else { dol_syslog("We found an api_xxx file (".$file_searched.") but class ".$classname." does not exists after loading file", LOG_WARNING); } } diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php index be36482c295..0bdbff93569 100644 --- a/htdocs/asset/admin/assets_extrafields.php +++ b/htdocs/asset/admin/assets_extrafields.php @@ -37,7 +37,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'don'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php index 2f10938d356..ba42a3374dc 100644 --- a/htdocs/asset/admin/assets_type_extrafields.php +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -36,7 +36,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'adherent_type'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 752d569c7d1..64e2bc2b5ad 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -35,7 +35,7 @@ $langs->loadLangs(array("admin", "assets")); if (!$user->admin) accessforbidden(); // Parameters -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); $arrayofparameters = array('FIXEDASSETS_MYPARAM1'=>array('css'=>'minwidth200'), 'FIXEDASSETS_MYPARAM2'=>array('css'=>'minwidth500')); @@ -87,9 +87,7 @@ if ($action == 'edit') print ''; print '
'; -} -else -{ +} else { print ''; print ''; diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 110d662c9e8..7ef3d9c011e 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -37,7 +37,7 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'assetcard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); @@ -53,7 +53,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -65,6 +65,9 @@ if (empty($action) && empty($id) && empty($ref)) $action = 'view'; // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. +// Security check +if (!empty($user->socid)) $socid = $user->socid; +$result = restrictedArea($user, 'asset', $id); $permissiontoread = $user->rights->asset->read; $permissiontoadd = $user->rights->asset->write; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php @@ -314,18 +317,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($user->rights->asset->write) { print ''.$langs->trans("Modify").''."\n"; - } - else - { + } else { print ''.$langs->trans('Modify').''."\n"; } if ($user->rights->asset->delete) { - print ''.$langs->trans('Delete').''."\n"; - } - else - { + print ''.$langs->trans('Delete').''."\n"; + } else { print ''.$langs->trans('Delete').''."\n"; } } @@ -350,7 +349,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $urlsource = $_SERVER["PHP_SELF"] . "?id=" . $object->id; $genallowed = $user->rights->asset->read; // If you can read, you can build the PDF to read content $delallowed = $user->rights->asset->create; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); + print $formfile->showdocuments('asset', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); */ // Show links to link elements diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 21cd3b6393e..2cc48489f7f 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -55,6 +55,10 @@ class Asset extends CommonObject public $picto = 'asset'; + const STATUS_DRAFT = 0; + const STATUS_VALIDATED = 1; + + /** * 'type' if the field format. * 'label' the translation key. @@ -331,7 +335,7 @@ class Asset extends CommonObject $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; - $url = dol_buildpath('/assets/card.php', 1).'?id='.$this->id; + $url = dol_buildpath('/asset/card.php', 1).'?id='.$this->id; if ($option != 'nolink') { @@ -351,8 +355,7 @@ class Asset extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -391,36 +394,16 @@ class Asset extends CommonObject // phpcs:enable global $langs; - if ($mode == 0 || $mode == 1) - { - if ($status == 1) return $langs->trans('Enabled'); - elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 2) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 3) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 4) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 5) - { - if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 6) - { - if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); - } + $langs->load("contracts"); + $labelStatus[self::STATUS_DRAFT] = $langs->trans('Disabled'); + $labelStatus[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + $labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Disabled'); + $labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Enabled'); + + $statusType = 'status0'; + if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; + + return dolGetStatus($labelStatus[$status], $labelStatusShort[$status], '', $statusType, $mode); } /** @@ -469,9 +452,7 @@ class Asset extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index bfb0c7d073a..db2407a9376 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -154,16 +154,12 @@ class AssetType extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -223,16 +219,12 @@ class AssetType extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::update ".$this->error, LOG_ERR); return -$error; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -263,9 +255,7 @@ class AssetType extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; @@ -303,9 +293,7 @@ class AssetType extends CommonObject } return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -344,9 +332,7 @@ class AssetType extends CommonObject $i++; } } - } - else - { + } else { print $this->db->error(); } return $assettypes; @@ -390,8 +376,7 @@ class AssetType extends CommonObject $assetstatic->fetch($obj->rowid); } $ret[$obj->rowid] = $assetstatic; - } - else $ret[$obj->rowid] = $obj->rowid; + } else $ret[$obj->rowid] = $obj->rowid; } } @@ -400,9 +385,7 @@ class AssetType extends CommonObject $this->asset = $ret; return $ret; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index 4724173cd19..b43ec8d40cf 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -68,6 +68,10 @@ $extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals +// Security check +if (!empty($user->socid)) $socid = $user->socid; +$result = restrictedArea($user, 'asset', $id); + //if ($id > 0 || ! empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity] . "/packages/" . dol_sanitizeFileName($object->id); if ($id > 0 || !empty($ref)) $upload_dir = $conf->sellyoursaas->multidir_output[$object->entity]."/packages/".dol_sanitizeFileName($object->ref); @@ -144,9 +148,7 @@ if ($object->id) $relativepathwithnofile = 'asset/'.dol_sanitizeFileName($object->ref).'/'; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { accessforbidden('', 0, 1); } diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php index 900bbc61bf2..801a7c85b36 100644 --- a/htdocs/asset/info.php +++ b/htdocs/asset/info.php @@ -31,19 +31,21 @@ $langs->loadLangs(array("asset")); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'asset', $id, ''); +$result = restrictedArea($user, 'asset', $id); $object = new Asset($db); $object->fetch($id); + /* * Actions */ +// None /* diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index 39fd0e0761d..d9bfea71510 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -39,7 +39,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'assetslist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'assetlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') @@ -47,8 +47,8 @@ $id = GETPOST('id', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -73,15 +73,18 @@ if (!$sortorder) $sortorder = "ASC"; // Security check $socid = 0; +if ($user->socid) $socid = $user->socid; if ($user->socid > 0) // Protection if external user { //$socid = $user->socid; accessforbidden(); } -//$result = restrictedArea($user, 'asset', $id,''); +// Security check +$result = restrictedArea($user, 'asset', $id); + // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -253,9 +256,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; -} -else -{ +} else { if ($limit) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -273,7 +274,7 @@ if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $ { $obj = $db->fetch_object($resql); $id = $obj->rowid; - header("Location: ".DOL_URL_ROOT.'/assets/card.php?id='.$id); + header("Location: ".DOL_URL_ROOT.'/asset/card.php?id='.$id); exit; } @@ -388,8 +389,7 @@ foreach ($object->fields as $key => $val) if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } - elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; print ''; } } diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 7b92e1dab92..f19249ce1d2 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -32,7 +32,7 @@ $langs->loadLangs(array("asset", "companies")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -54,6 +54,10 @@ $extrafields->fetch_name_optionals_label($object->table_element); include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals if ($id > 0 || !empty($ref)) $upload_dir = $conf->asset->multidir_output[$object->entity]."/".$object->id; +// Security check +if (!empty($user->socid)) $socid = $user->socid; +$result = restrictedArea($user, 'asset', $id); + $permissionnote = 1; //$permissionnote=$user->rights->asset->creer; // Used by the include of actions_setnotes.inc.php diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 8df5ffe8c40..1045e9135ee 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -34,7 +34,7 @@ if (!empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/account $langs->load("assets"); $rowid = GETPOST('rowid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -77,6 +77,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x' // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('assettypecard', 'globalcard')); +$permissiontoadd = $user->rights->asset->setup_advance; /* * Actions @@ -107,8 +108,7 @@ if ($action == 'add' && $user->rights->asset->write) if (empty($object->label)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors'); - } - else { + } else { $sql = "SELECT label FROM ".MAIN_DB_PREFIX."asset_type WHERE label='".$db->escape($object->label)."'"; $result = $db->query($sql); if ($result) { @@ -128,15 +128,11 @@ if ($action == 'add' && $user->rights->asset->write) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; } - } - else - { + } else { $action = 'create'; } } @@ -162,9 +158,7 @@ if ($action == 'update' && $user->rights->asset->write) if ($ret >= 0 && !count($object->errors)) { setEventMessages($langs->trans("AssetsTypeModified"), null, 'mesgs'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } @@ -182,9 +176,7 @@ if ($action == 'confirm_delete' && $user->rights->asset->write) setEventMessages($langs->trans("AssetsTypeDeleted"), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { setEventMessages($langs->trans("AssetsTypeCanNotBeDeleted"), null, 'errors'); $action = ''; } @@ -220,14 +212,6 @@ if (!$rowid && $action != 'create' && $action != 'edit') $param = ''; - $newcardbutton = ''; - if ($user->rights->asset->configurer) - { - $newcardbutton = ''.$langs->trans('NewAssetType').''; - $newcardbutton .= ''; - $newcardbutton .= ''; - } - print ''; if ($optioncss != '') print ''; print ''; @@ -237,6 +221,8 @@ if (!$rowid && $action != 'create' && $action != 'edit') print ''; print ''; + $newcardbutton = dolGetButtonTitle($langs->trans('NewAssetType'), '', 'fa fa-plus-circle', dol_buildpath('/asset/type.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); + print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit); $moreforfilter = ''; @@ -247,9 +233,9 @@ if (!$rowid && $action != 'create' && $action != 'edit') print ''; print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print "\n"; @@ -276,7 +262,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objp->accountancy_code_asset, 1); - print $accountingaccount->getNomUrl(0, 0, 0, '', 0); + print $accountingaccount->getNomUrl(0, 1, 1, '', 0); } else { print $objp->accountancy_code_asset; } @@ -288,7 +274,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') $accountingaccount2 = new AccountingAccount($db); $accountingaccount2->fetch('', $objp->accountancy_code_depreciation_asset, 1); - print $accountingaccount2->getNomUrl(0, 0, 0, '', 0); + print $accountingaccount2->getNomUrl(0, 1, 1, '', 0); } else { print $objp->accountancy_code_depreciation_asset; } @@ -300,7 +286,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') $accountingaccount3 = new AccountingAccount($db); $accountingaccount3->fetch('', $objp->accountancy_code_depreciation_expense, 1); - print $accountingaccount3->getNomUrl(0, 0, 0, '', 0); + print $accountingaccount3->getNomUrl(0, 1, 1, '', 0); } else { print $objp->accountancy_code_depreciation_expense; } @@ -308,8 +294,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') if ($user->rights->asset->write) print ''; - else - print ''; + else print ''; print ""; $i++; } @@ -317,9 +302,7 @@ if (!$rowid && $action != 'create' && $action != 'edit') print ''; print ''; - } - else - { + } else { dol_print_error($db); } } @@ -367,8 +350,7 @@ if ($action == 'create') print ''; - } - else // For external software + } else // For external software { // Accountancy_code_asset print ''; @@ -525,7 +507,7 @@ if ($rowid > 0) // Delete if ($user->rights->asset->write) { - print ''; + print ''; } print ""; @@ -578,8 +560,7 @@ if ($rowid > 0) print ''; - } - else // For external software + } else // For external software { // Accountancy_code_asset print ''; diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index fd27abb6ceb..87aaeb6d46f 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -67,9 +67,7 @@ if ($resql) $found = $notfound; } $db->free($resql); -} -else -{ +} else { dol_print_error($db, 'Error'); $found = 'Error'; } diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index 5facd5d1bbf..ecc7c4fee6c 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -137,9 +137,7 @@ if ($resql) $found = $notfound; } $db->free($resql); -} -else -{ +} else { dol_print_error($db, 'Error'); $found = 'Error'; } @@ -164,9 +162,7 @@ if (!empty($number)) print $txt; dol_syslog($txt, LOG_ERR); print ''."\n"; - } - else - { + } else { $txt = "Call Asterisk dialer for caller: ".$caller.", called: ".$called." clicktodiallogin: ".$login; dol_syslog($txt); print ''."\n"; @@ -188,8 +184,7 @@ if (!empty($number)) print ''."\n"; } } -} -else { +} else { print 'Bad parameters in URL. Must be '.$_SERVER['PHP_SELF'].'?caller=99999&called=99999&login=xxxxx&password=xxxxx'; } diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index a75aaa5543d..52a11e78bdd 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -71,8 +71,7 @@ if (!empty($conf->global->BARCODE_PRODUCT_ADDON_NUM)) try { dol_include_once($dirroot.$file.'.php'); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } @@ -109,15 +108,11 @@ if ($action == 'initbarcodeproducts') if ($resql) { setEventMessages($langs->trans("AllBarcodeReset"), null, 'mesgs'); - } - else - { + } else { $error++; dol_print_error($db); } - } - else - { + } else { $sql = "SELECT rowid, ref, fk_product_type"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE barcode IS NULL or barcode = ''"; @@ -150,9 +145,7 @@ if ($action == 'initbarcodeproducts') $i++; } - } - else - { + } else { $error++; dol_print_error($db); } @@ -167,9 +160,7 @@ if ($action == 'initbarcodeproducts') { //$db->rollback(); $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -220,8 +211,7 @@ if ($conf->societe->enabled) { $obj = $db->fetch_object($resql); $nbno = $obj->nb; - } - else dol_print_error($db); + } else dol_print_error($db); $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."societe"; $resql = $db->query($sql); @@ -229,8 +219,7 @@ if ($conf->societe->enabled) { $obj = $db->fetch_object($resql); $nbtotal = $obj->nb; - } - else dol_print_error($db); + } else dol_print_error($db); print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ThirdParties")).'
'."\n"; @@ -274,8 +263,7 @@ if ($conf->product->enabled || $conf->product->service) $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); $sql = "SELECT count(rowid) as nb FROM ".MAIN_DB_PREFIX."product"; $resql = $db->query($sql); @@ -283,8 +271,7 @@ if ($conf->product->enabled || $conf->product->service) { $obj = $db->fetch_object($resql); $nbtotal = $obj->nb; - } - else dol_print_error($db); + } else dol_print_error($db); print $langs->trans("CurrentlyNWithoutBarCode", $nbno, $nbtotal, $langs->transnoentitiesnoconv("ProductsOrServices")).'
'."\n"; @@ -294,9 +281,7 @@ if ($conf->product->enabled || $conf->product->service) $objproduct = new Product($db); print ''.(isset($modBarCodeProduct->name) ? $modBarCodeProduct->name : $modBarCodeProduct->nom).' - '.$langs->trans("NextValue").': '.$modBarCodeProduct->getNextValue($objproduct).'
'; $disabled = 0; - } - else - { + } else { $disabled = 1; $titleno = $langs->trans("NoBarcodeNumberingTemplateDefined"); print ''.$langs->trans("NoBarcodeNumberingTemplateDefined").' ('.$langs->trans("ToGenerateCodeDefineAutomaticRuleFirst").')
'; diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index cf74a46bb2a..dabd05bf745 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -36,10 +36,10 @@ $now = dol_now(); $year = dol_print_date($now, '%Y'); $month = dol_print_date($now, '%m'); $day = dol_print_date($now, '%d'); -$forbarcode = GETPOST('forbarcode'); -$fk_barcode_type = GETPOST('fk_barcode_type'); -$mode = GETPOST('mode'); -$modellabel = GETPOST("modellabel"); // Doc template to use +$forbarcode = GETPOST('forbarcode', 'alphanohtml'); +$fk_barcode_type = GETPOST('fk_barcode_type', 'int'); +$mode = GETPOST('mode', 'aZ09'); +$modellabel = GETPOST("modellabel", 'aZ09'); // Doc template to use $numberofsticker = GETPOST('numberofsticker', 'int'); $mesg = ''; @@ -57,9 +57,11 @@ $thirdpartytmp = new Societe($db); if (GETPOST('submitproduct') && GETPOST('submitproduct')) { $action = ''; // We reset because we don't want to build doc - if (GETPOST('productid') > 0) - { - $producttmp->fetch(GETPOST('productid')); + if (GETPOST('productid', 'int') > 0) { + $result = $producttmp->fetch(GETPOST('productid', 'int')); + if ($result < 0) { + setEventMessage($producttmp->error, 'errors'); + } $forbarcode = $producttmp->barcode; $fk_barcode_type = $producttmp->barcode_type; @@ -74,9 +76,9 @@ if (GETPOST('submitproduct') && GETPOST('submitproduct')) if (GETPOST('submitthirdparty') && GETPOST('submitthirdparty')) { $action = ''; // We reset because we don't want to build doc - if (GETPOST('socid') > 0) + if (GETPOST('socid', 'int') > 0) { - $thirdpartytmp->fetch(GETPOST('socid')); + $thirdpartytmp->fetch(GETPOST('socid', 'int')); $forbarcode = $thirdpartytmp->barcode; $fk_barcode_type = $thirdpartytmp->barcode_type_code; @@ -161,9 +163,7 @@ if ($action == 'builddoc') setEventMessages('Failed to generate image file of barcode for code='.$code.' encoding='.$encoding.' file='.basename($barcodeimage), null, 'errors'); setEventMessages($module->error, null, 'errors'); } - } - else - { + } else { $error++; setEventMessages("Error, encoding ".$encoding." is not supported by encoder ".$generator.'. You must choose another barcode type or install a barcode generation engine that support '.$encoding, null, 'errors'); } @@ -381,7 +381,7 @@ if (!empty($user->rights->produit->lire) || !empty($user->rights->service->lire) print ' '.$langs->trans("FillBarCodeTypeAndValueFromProduct").'   '; print '
'; print '
'; - $form->select_produits(GETPOST('productid'), 'productid', '', '', 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth400imp', 1); + $form->select_produits(GETPOST('productid', 'int'), 'productid', '', '', 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth400imp', 1); print '   '; print '
'; } @@ -391,7 +391,7 @@ if (!empty($user->rights->societe->lire)) print ' '.$langs->trans("FillBarCodeTypeAndValueFromThirdParty").'   '; print '
'; print '
'; - print $form->select_company(GETPOST('socid'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); + print $form->select_company(GETPOST('socid', 'int'), 'socid', '', 'SelectThirdParty', 0, 0, array(), 0, 'minwidth300'); print '   '; print '
'; } diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index 1ef35942d1e..051f8bb049a 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -32,7 +32,7 @@ $langs->loadLangs(array("admin", "other", "blockedlog")); if (!$user->admin || empty($conf->blockedlog->enabled)) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -51,9 +51,7 @@ if (preg_match('/set_(.*)/', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -65,9 +63,7 @@ if (preg_match('/del_(.*)/', $action, $reg)) { Header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 66cc3b44848..d0bee7c613c 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -35,7 +35,7 @@ $langs->loadLangs(array("admin", "other", "blockedlog", "bills")); if ((!$user->admin && !$user->rights->blockedlog->read) || empty($conf->blockedlog->enabled)) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'blockedloglist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') @@ -56,8 +56,8 @@ if (($search_start == -1 || empty($search_start)) && !GETPOSTISSET('search_start // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -133,15 +133,11 @@ if ($action === 'downloadblockchain') { { $previoushash = $block_static->getPreviousHash(0, $obj->rowid); $firstid = $obj->rowid; - } - else - { // If not data found for filter, we do not need previoushash neither firstid + } else { // If not data found for filter, we do not need previoushash neither firstid $previoushash = 'nodata'; $firstid = ''; } - } - else - { + } else { $error++; setEventMessages($db->lasterror, null, 'errors'); } @@ -211,9 +207,7 @@ if ($action === 'downloadblockchain') { $statusofrecord = 'Valid'; if ($loweridinerror > 0) $statusofrecordnote = 'ValidButFoundAPreviousKO'; else $statusofrecordnote = ''; - } - else - { + } else { $statusofrecord = 'KO'; $statusofrecordnote = 'LineCorruptedOrNotMatchingPreviousOne'; $loweridinerror = $obj->rowid; @@ -245,9 +239,7 @@ if ($action === 'downloadblockchain') { } exit; - } - else - { + } else { setEventMessages($db->lasterror, null, 'errors'); } } @@ -263,9 +255,7 @@ $form = new Form($db); if (GETPOST('withtab', 'alpha')) { $title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog'); -} -else -{ +} else { $title = $langs->trans("BrowseBlockedLog"); } @@ -279,9 +269,7 @@ if (!is_array($blocks)) if ($blocks == -2) { setEventMessages($langs->trans("TooManyRecordToScanRestrictFilters", $MAXLINES), null, 'errors'); - } - else - { + } else { dol_print_error($block_static->db, $block_static->error, $block_static->errors); exit; } @@ -323,6 +311,7 @@ if (GETPOST('withtab', 'alpha')) $param .= '&withtab='.urlencode(GETPOST('withta //include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; print ''; +print ''; print '
'; print $langs->trans("RestrictYearToExport").': '; @@ -440,9 +429,7 @@ if (!empty($conf->global->BLOCKEDLOG_SCAN_ALL_FOR_LOWERIDINERROR)) { // TODO Make a full scan of table in reverse order of id of $block, so we can use the parameter $previoushash into checkSignature to save requests // to find the $loweridinerror. -} -else -{ +} else { // This is version that optimize the memory (but will not report errors that are outside the filter range) $loweridinerror = 0; $checkresult = array(); @@ -510,9 +497,7 @@ if (is_array($blocks)) { if ($checkresult[$block->id]) print img_picto($langs->trans('OkCheckFingerprintValidityButChainIsKo'), 'statut4'); else print img_picto($langs->trans('KoCheckFingerprintValidity'), 'statut8'); - } - else - { + } else { print img_picto($langs->trans('OkCheckFingerprintValidity'), 'statut4'); } diff --git a/htdocs/blockedlog/ajax/authority.php b/htdocs/blockedlog/ajax/authority.php index 936ad5edb9c..64992bb33d6 100644 --- a/htdocs/blockedlog/ajax/authority.php +++ b/htdocs/blockedlog/ajax/authority.php @@ -52,18 +52,15 @@ if ($auth->fetch(0, $signature) <= 0) { if (!empty($hash)) { echo $auth->checkBlockchain($hash) ? 'hashisok' : 'hashisjunk'; -} -elseif (!empty($newblock)) { +} elseif (!empty($newblock)) { if ($auth->checkBlock($newblock)) { $auth->addBlock($newblock); $auth->update($user); echo 'blockadded'; - } - else { + } else { echo 'blockalreadyadded'; } -} -else { +} else { echo 'idontunderstandwhatihavetodo'; } diff --git a/htdocs/blockedlog/ajax/block-add.php b/htdocs/blockedlog/ajax/block-add.php index 5aa344c0237..1102438f5b5 100644 --- a/htdocs/blockedlog/ajax/block-add.php +++ b/htdocs/blockedlog/ajax/block-add.php @@ -34,7 +34,7 @@ $res = require '../../main.inc.php'; $id = GETPOST('id', 'int'); $element = GETPOST('element', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if ($element === 'facture') { require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php'; diff --git a/htdocs/blockedlog/ajax/block-info.php b/htdocs/blockedlog/ajax/block-info.php index eaf1b17ed08..e83a71ea9b7 100644 --- a/htdocs/blockedlog/ajax/block-info.php +++ b/htdocs/blockedlog/ajax/block-info.php @@ -51,8 +51,7 @@ if ($block->fetch($id) > 0) { $objtoshow = $block->object_data; print formatObject($objtoshow, ''); -} -else { +} else { print 'Error, failed to get unalterable log with id '.$id; } @@ -94,18 +93,14 @@ function formatObject($objtoshow, $prefix) var_dump(@get_class($val)); var_dump($val);*/ $s .= dol_print_date($val, 'dayhour'); - } - else - { + } else { $s .= $val; } $s .= '
'; - } - elseif (is_array($val)) + } elseif (is_array($val)) { $s .= formatObject($val, ($prefix ? $prefix.' > ' : '').$key); - } - elseif (is_object($val)) + } elseif (is_object($val)) { $s .= formatObject($val, ($prefix ? $prefix.' > ' : '').$key); } diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 234aeceb2a6..69967d503a1 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -128,8 +128,7 @@ class BlockedLogAuthority if (!in_array($block, $blocks)) { return true; - } - else { + } else { return false; } } @@ -179,15 +178,11 @@ class BlockedLogAuthority $this->tms = $this->db->jdate($obj->tms); return 1; - } - else - { + } else { $this->error = $langs->trans("RecordNotFound"); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -232,15 +227,11 @@ class BlockedLogAuthority $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -276,9 +267,7 @@ class BlockedLogAuthority $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -316,8 +305,7 @@ class BlockedLogAuthority echo $block->signature.' '.$url.' '.$res.'
'; if ($res === 'blockalreadyadded' || $res === 'blockadded') { $block->setCertified(); - } - else { + } else { $this->error = $langs->trans('ImpossibleToContactAuthority ', $url); return -1; } diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index be017f22600..b8d0304c5eb 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -185,6 +185,13 @@ class BlockedLog // $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all POS modules $moduleposenabled = ($conf->cashdesk->enabled || $conf->takepos->enabled || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL)); if ($moduleposenabled) $this->trackedevents['CASHCONTROL_VALIDATE'] = 'logCASHCONTROL_VALIDATE'; + + if (!empty($conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED)) { + $tmparrayofmoresupportedevents = explode(',', $conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED); + foreach ($tmparrayofmoresupportedevents as $val) { + $this->trackedevents[$val] = 'log'.$val; + } + } } /** @@ -201,8 +208,7 @@ class BlockedLog $object = new Facture($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } } @@ -212,99 +218,80 @@ class BlockedLog $object = new FactureFournisseur($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->element === 'payment') { + } elseif ($this->element === 'payment') { require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; $object = new Paiement($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->element === 'payment_supplier') { + } elseif ($this->element === 'payment_supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; $object = new PaiementFourn($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->element === 'payment_donation') { + } elseif ($this->element === 'payment_donation') { require_once DOL_DOCUMENT_ROOT.'/don/class/paymentdonation.class.php'; $object = new PaymentDonation($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->element === 'payment_various') { + } elseif ($this->element === 'payment_various') { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; $object = new PaymentVarious($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->element === 'don' || $this->element === 'donation') { + } elseif ($this->element === 'don' || $this->element === 'donation') { require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; $object = new Don($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->element === 'subscription') { + } elseif ($this->element === 'subscription') { require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php'; $object = new Subscription($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->element === 'cashcontrol') { + } elseif ($this->element === 'cashcontrol') { require_once DOL_DOCUMENT_ROOT.'/compta/cashcontrol/class/cashcontrol.class.php'; $object = new CashControl($this->db); if ($object->fetch($this->fk_object) > 0) { return $object->getNomUrl(1); - } - else { + } else { $this->error++; } - } - elseif ($this->action == 'MODULE_SET') + } elseif ($this->action == 'MODULE_SET') { return 'System to track events into unalterable logs were enabled'; - } - elseif ($this->action == 'MODULE_RESET') + } elseif ($this->action == 'MODULE_RESET') { if ($this->signature == '0000000000') { return 'System to track events into unalterable logs were disabled after some recording were done. We saved a special Fingerprint to track the chain as broken.'; - } - else - { + } else { return 'System to track events into unalterable logs were disabled. This is possible because no record were done yet.'; } } @@ -361,24 +348,19 @@ class BlockedLog if ($object->element == 'payment' || $object->element == 'payment_supplier') { $this->date_object = $object->datepaye; - } - elseif ($object->element == 'payment_salary') + } elseif ($object->element == 'payment_salary') { $this->date_object = $object->datev; - } - elseif ($object->element == 'payment_donation' || $object->element == 'payment_various') + } elseif ($object->element == 'payment_donation' || $object->element == 'payment_various') { $this->date_object = $object->datepaid ? $object->datepaid : $object->datep; - } - elseif ($object->element == 'subscription') + } elseif ($object->element == 'subscription') { $this->date_object = $object->dateh; - } - elseif ($object->element == 'cashcontrol') + } elseif ($object->element == 'cashcontrol') { $this->date_object = $object->date_creation; - } - else { + } else { $this->date_object = $object->date; } // ref @@ -393,7 +375,7 @@ class BlockedLog $this->object_data = new stdClass(); // Add fields to exclude $arrayoffieldstoexclude = array( - 'table_element', 'fields', 'ref_previous', 'ref_next', 'origin', 'origin_id', 'oldcopy', 'picto', 'error', 'errors', 'modelpdf', 'last_main_doc', 'civility_id', 'contact', 'contact_id', + 'table_element', 'fields', 'ref_previous', 'ref_next', 'origin', 'origin_id', 'oldcopy', 'picto', 'error', 'errors', 'model_pdf', 'modelpdf', 'last_main_doc', 'civility_id', 'contact', 'contact_id', 'table_element_line', 'ismultientitymanaged', 'isextrafieldmanaged', 'linkedObjectsIds', 'linkedObjects', @@ -477,13 +459,11 @@ class BlockedLog $this->object_data->invoiceline[$lineid]->{$keyline} = $valueline; } } - } - elseif (!is_object($value)) $this->object_data->{$key} = $value; + } elseif (!is_object($value)) $this->object_data->{$key} = $value; } if (!empty($object->newref)) $this->object_data->ref = $object->newref; - } - elseif ($this->element == 'invoice_supplier') + } elseif ($this->element == 'invoice_supplier') { foreach ($object as $key=>$value) { @@ -495,8 +475,7 @@ class BlockedLog } if (!empty($object->newref)) $this->object_data->ref = $object->newref; - } - elseif ($this->element == 'payment' || $this->element == 'payment_supplier' || $this->element == 'payment_donation' || $this->element == 'payment_various') + } elseif ($this->element == 'payment' || $this->element == 'payment_supplier' || $this->element == 'payment_donation' || $this->element == 'payment_various') { $datepayment = $object->datepaye ? $object->datepaye : ($object->datepaid ? $object->datepaid : $object->datep); $paymenttypeid = $object->paiementid ? $object->paiementid : ($object->paymenttype ? $object->paymenttype : $object->type_payment); @@ -504,7 +483,7 @@ class BlockedLog $this->object_data->ref = $object->ref; $this->object_data->date = $datepayment; $this->object_data->type_code = dol_getIdFromCode($this->db, $paymenttypeid, 'c_paiement', 'id', 'code'); - $this->object_data->payment_num = ($object->num_paiement ? $object->num_paiement : $object->num_payment); + $this->object_data->payment_num = $object->num_payment; //$this->object_data->fk_account = $object->fk_account; $this->object_data->note = $object->note; //var_dump($this->object_data);exit; @@ -528,18 +507,15 @@ class BlockedLog { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $tmpobject = new FactureFournisseur($this->db); - } - elseif ($this->element == 'payment') + } elseif ($this->element == 'payment') { include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $tmpobject = new Facture($this->db); - } - elseif ($this->element == 'payment_donation') + } elseif ($this->element == 'payment_donation') { include_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; $tmpobject = new Don($this->db); - } - elseif ($this->element == 'payment_various') + } elseif ($this->element == 'payment_various') { include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; $tmpobject = new PaymentVarious($this->db); @@ -572,8 +548,7 @@ class BlockedLog $this->errors[] = $this->error; dol_syslog("Failed to fetch thirdparty for object with id ".$tmpobject->id, LOG_ERR); return -1; - } - elseif ($result < 0) + } elseif ($result < 0) { $this->error = $tmpobject->error; $this->errors = $tmpobject->errors; @@ -620,14 +595,12 @@ class BlockedLog $this->object_data->amount = $totalamount; if (!empty($object->newref)) $this->object_data->ref = $object->newref; - } - elseif ($this->element == 'payment_salary') + } elseif ($this->element == 'payment_salary') { $this->object_data->amounts = array($object->amount); if (!empty($object->newref)) $this->object_data->ref = $object->newref; - } - elseif ($this->element == 'subscription') + } elseif ($this->element == 'subscription') { foreach ($object as $key=>$value) { @@ -639,8 +612,7 @@ class BlockedLog } if (!empty($object->newref)) $this->object_data->ref = $object->newref; - } - else // Generic case + } else // Generic case { foreach ($object as $key=>$value) { @@ -713,15 +685,11 @@ class BlockedLog $this->certified = ($obj->certified == 1); return 1; - } - else - { + } else { $this->error = $langs->trans("RecordNotFound"); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -864,15 +832,11 @@ class BlockedLog $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -953,9 +917,7 @@ class BlockedLog { $previoussignature = $obj->signature; } - } - else - { + } else { dol_print_error($this->db); exit; } @@ -995,16 +957,13 @@ class BlockedLog if ($element == 'all') { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity; - } - elseif ($element == 'not_certified') { + } elseif ($element == 'not_certified') { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 0"; - } - elseif ($element == 'just_certified') { + } elseif ($element == 'just_certified') { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND certified = 1"; - } - else { + } else { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."blockedlog WHERE entity=".$conf->entity." AND element='".$element."' AND fk_object=".(int) $fk_object; } @@ -1097,8 +1056,7 @@ class BlockedLog { $obj = $this->db->fetch_object($res); if ($obj) $result = true; - } - else dol_print_error($this->db); + } else dol_print_error($this->db); dol_syslog("Module Blockedlog alreadyUsed with ignoresystem=".$ignoresystem." is ".$result); diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index e2386dcee0b..d8361d30258 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -37,7 +37,7 @@ $langs->loadLangs(array("mrp", "other")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -45,9 +45,7 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); @@ -216,9 +214,7 @@ if ($object->id > 0) if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print ''.$langs->trans("AddAction").''; - } - else - { + } else { print ''.$langs->trans("AddAction").''; } } diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 591e9a69d88..7daf29416c2 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -57,11 +57,11 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); + if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (empty($action) && empty($id) && empty($ref)) $action = 'view'; @@ -92,18 +92,18 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - $error = 0; + $error = 0; - $backurlforlist = DOL_URL_ROOT.'/bom/bom_list.php'; + $backurlforlist = DOL_URL_ROOT.'/bom/bom_list.php'; - if (empty($backtopage) || ($cancel && empty($id))) { - if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { - if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; - else $backtopage = dol_buildpath('/bom/bom_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); - } - } + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; + else $backtopage = dol_buildpath('/bom/bom_card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } + } - $triggermodname = 'BOM_MODIFY'; // Name of trigger action code to execute when we modify record + $triggermodname = 'BOM_MODIFY'; // Name of trigger action code to execute when we modify record // Actions cancel, add, update, delete or clone include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; @@ -149,43 +149,41 @@ if (empty($reshook)) } if ($object->fk_product == $idprod) { - setEventMessages($langs->trans('TheProductXIsAlreadyTheProductToProduce'), null, 'errors'); - $error++; + setEventMessages($langs->trans('TheProductXIsAlreadyTheProductToProduce'), null, 'errors'); + $error++; } if (!$error) { $lastposition = 0; - $bomline = new BOMLine($db); - $bomline->fk_bom = $id; - $bomline->fk_product = $idprod; - $bomline->qty = $qty; - $bomline->qty_frozen = (int) $qty_frozen; - $bomline->disable_stock_change = (int) $disable_stock_change; - $bomline->efficiency = $efficiency; + $bomline = new BOMLine($db); + $bomline->fk_bom = $id; + $bomline->fk_product = $idprod; + $bomline->qty = $qty; + $bomline->qty_frozen = (int) $qty_frozen; + $bomline->disable_stock_change = (int) $disable_stock_change; + $bomline->efficiency = $efficiency; - // Rang to use + // Rang to use $rangmax = $object->line_max(0); $ranktouse = $rangmax + 1; $bomline->position = ($ranktouse + 1); - $result = $bomline->create($user); - if ($result <= 0) - { - setEventMessages($bomline->error, $bomline->errors, 'errors'); - $action = ''; - } - else - { - unset($_POST['idprod']); - unset($_POST['qty']); - unset($_POST['qty_frozen']); - unset($_POST['disable_stock_change']); + $result = $bomline->create($user); + if ($result <= 0) + { + setEventMessages($bomline->error, $bomline->errors, 'errors'); + $action = ''; + } else { + unset($_POST['idprod']); + unset($_POST['qty']); + unset($_POST['qty_frozen']); + unset($_POST['disable_stock_change']); - $object->fetchLines(); - } + $object->fetchLines(); + } } } @@ -218,15 +216,13 @@ if (empty($reshook)) { setEventMessages($bomline->error, $bomline->errors, 'errors'); $action = ''; - } - else - { + } else { unset($_POST['idprod']); unset($_POST['qty']); unset($_POST['qty_frozen']); - unset($_POST['disable_stock_change']); + unset($_POST['disable_stock_change']); - $object->fetchLines(); + $object->fetchLines(); } } } @@ -296,7 +292,7 @@ if (($id || $ref) && $action == 'edit') print load_fiche_titre($langs->trans("BillOfMaterials"), '', 'cubes'); print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -327,7 +323,7 @@ if (($id || $ref) && $action == 'edit') // Part to show record if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { - $res = $object->fetch_optionals(); + $res = $object->fetch_optionals(); $head = bomPrepareHead($object); dol_fiche_head($head, 'card', $langs->trans("BillOfMaterials"), -1, 'bom'); @@ -337,7 +333,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation to delete if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBillOfMaterials'), $langs->trans('ConfirmDeleteBillOfMaterials'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBillOfMaterials'), $langs->trans('ConfirmDeleteBillOfMaterials'), 'confirm_delete', '', 0, 1); } // Confirmation to delete line if ($action == 'deleteline') @@ -457,7 +453,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $text = $langs->trans('ConfirmSetToDraft', $object->ref); $formquestion = array(); - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('SetToDraft'), $text, 'confirm_setdraft', $formquestion, 0, 1, 220); } // Call Hook formConfirm @@ -549,133 +545,129 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (!empty($object->table_element_line)) { - print ' + print ' '; - if (!empty($conf->use_javascript_ajax) && $object->status == 0) { - include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; - } + if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; + } - print '
'; - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) - { - print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.$langs->trans("Ref").''.$langs->trans("Label").''.$langs->trans("AccountancyCodeAsset").''.$langs->trans("AccountancyCodeDepreciationAsset").''.$langs->trans("AccountancyCodeDepreciationExpense").''.$langs->trans("AccountancyCodeAsset").''.$langs->trans("AccountancyCodeDepreciationAsset").''.$langs->trans("AccountancyCodeDepreciationExpense").' 
rowid.'">'.img_edit().'  
'; print $formaccounting->select_account($object->accountancy_code_depreciation_expense, 'accountancy_code_depreciation_expense', 1, '', 1, 1); print '
'.$langs->trans("AccountancyCodeAsset").''; print $formaccounting->select_account($object->accountancy_code_depreciation_expense, 'accountancy_code_depreciation_expense', 1, '', 1, 1); print '
'.$langs->trans("AccountancyCodeAsset").'
'; - } + print '
'; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) + { + print '
'; + } - if (!empty($object->lines)) - { - $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/bom/tpl'); - } + if (!empty($object->lines)) + { + $object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '/bom/tpl'); + } - // Form to add new line - if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') - { - if ($action != 'editline') - { - // Add products/services form - $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); + // Form to add new line + if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') + { + if ($action != 'editline') + { + // Add products/services form + $object->formAddObjectLine(1, $mysoc, null, '/bom/tpl'); - $parameters = array(); - $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - } - } + $parameters = array(); + $reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + } + } - if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) - { - print '
'; - } - print ''; + if (!empty($object->lines) || ($object->status == $object::STATUS_DRAFT && $permissiontoadd && $action != 'selectlines' && $action != 'editline')) + { + print ''; + } + print ''; - print "\n"; + print "\n"; } // Buttons for actions if ($action != 'presend' && $action != 'editline') { - print '
'."\n"; - $parameters = array(); - $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print '
'."\n"; + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) - { - // Send - //if (empty($user->socid)) { - // print '' . $langs->trans('SendMail') . ''."\n"; - //} + if (empty($reshook)) + { + // Send + //if (empty($user->socid)) { + // print '' . $langs->trans('SendMail') . ''."\n"; + //} - // Back to draft - if ($object->status == $object::STATUS_VALIDATED) - { - if ($permissiontoadd) - { - print ''.$langs->trans("SetToDraft").''; - } - } + // Back to draft + if ($object->status == $object::STATUS_VALIDATED) + { + if ($permissiontoadd) + { + print ''.$langs->trans("SetToDraft").''; + } + } - // Modify - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { - print ''.$langs->trans("Modify").''."\n"; - } - else - { - print ''.$langs->trans('Modify').''."\n"; - } - } + // Modify + if ($object->status == $object::STATUS_DRAFT) + { + if ($permissiontoadd) + { + print ''.$langs->trans("Modify").''."\n"; + } else { + print ''.$langs->trans('Modify').''."\n"; + } + } - // Validate - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { - if (is_array($object->lines) && count($object->lines) > 0) - { - print ''.$langs->trans("Validate").''; - } - else - { - $langs->load("errors"); - print ''.$langs->trans("Validate").''; - } - } - } + // Validate + if ($object->status == $object::STATUS_DRAFT) + { + if ($permissiontoadd) + { + if (is_array($object->lines) && count($object->lines) > 0) + { + print ''.$langs->trans("Validate").''; + } else { + $langs->load("errors"); + print ''.$langs->trans("Validate").''; + } + } + } - // Close / Cancel - if ($permissiontoadd && $object->status == $object::STATUS_VALIDATED) - { - print ''.$langs->trans("Disable").''; - } + // Close / Cancel + if ($permissiontoadd && $object->status == $object::STATUS_VALIDATED) + { + print ''.$langs->trans("Disable").''; + } - // Re-open - if ($permissiontoadd && $object->status == $object::STATUS_CANCELED) - { - print ''.$langs->trans("ReOpen").''; - } + // Re-open + if ($permissiontoadd && $object->status == $object::STATUS_CANCELED) + { + print ''.$langs->trans("ReOpen").''; + } - // Create MO - if ($conf->mrp->enabled) - { - if ($object->status == $object::STATUS_VALIDATED && !empty($user->rights->mrp->write)) - { - print ''.$langs->trans("CreateMO").''; - } - } + // Create MO + if ($conf->mrp->enabled) + { + if ($object->status == $object::STATUS_VALIDATED && !empty($user->rights->mrp->write)) + { + print ''.$langs->trans("CreateMO").''; + } + } - // Clone - if ($permissiontoadd) - { - print ''.$langs->trans("ToClone").''; - } + // Clone + if ($permissiontoadd) + { + print ''.$langs->trans("ToClone").''; + } - /* + /* if ($user->rights->bom->write) { if ($object->status == 1) @@ -689,16 +681,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } */ - if ($permissiontodelete) - { - print ''.$langs->trans('Delete').''."\n"; - } - else - { - print ''.$langs->trans('Delete').''."\n"; - } - } - print '
'."\n"; + if ($permissiontodelete) + { + print ''.$langs->trans('Delete').''."\n"; + } else { + print ''.$langs->trans('Delete').''."\n"; + } + } + print '
'."\n"; } @@ -709,41 +699,41 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($action != 'presend') { - print '
'; - print ''; // ancre + print '
'; + print ''; // ancre - // Documents - $objref = dol_sanitizeFileName($object->ref); - $relativepath = $objref.'/'.$objref.'.pdf'; - $filedir = $conf->bom->dir_output.'/'.$objref; - $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content - $delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); + // Documents + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->bom->dir_output.'/'.$objref; + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $user->rights->bom->read; // If you can read, you can build the PDF to read content + $delallowed = $user->rights->bom->write; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('bom', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $langs->defaultlang); - // Show links to link elements - $linktoelem = $form->showLinkToObjectBlock($object, null, array('bom')); - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('bom')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
'; + print '
'; - $MAXEVENT = 10; + $MAXEVENT = 10; - $morehtmlright = ''; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= ''; + $morehtmlright = ''; + $morehtmlright .= $langs->trans("SeeAll"); + $morehtmlright .= ''; - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'bom', $socid, 1, '', $MAXEVENT, '', $morehtmlright); + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'bom', $socid, 1, '', $MAXEVENT, '', $morehtmlright); - print '
'; + print '
'; } //Select mail models is same action as presend - if (GETPOST('modelselected')) $action = 'presend'; + if (GETPOST('modelselected')) $action = 'presend'; // Presend form $modelmail = 'bom'; diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php index a7dca41fff6..45aedbe8ee2 100644 --- a/htdocs/bom/bom_document.php +++ b/htdocs/bom/bom_document.php @@ -141,9 +141,7 @@ if ($object->id) $relativepathwithnofile = 'bom/'.dol_sanitizeFileName($object->ref).'/'; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { accessforbidden('', 0, 1); } diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index e2bafbecb48..121517b2544 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -45,8 +45,8 @@ $id = GETPOST('id', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -81,7 +81,7 @@ if ($user->socid > 0) // Protection if external user //$result = restrictedArea($user, 'bom', $id, ''); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -196,11 +196,8 @@ if (empty($reshook)) setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } - else $nbok++; - } - else - { + } else $nbok++; + } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; @@ -212,9 +209,7 @@ if (empty($reshook)) if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); } //var_dump($listofobjectthirdparties);exit; @@ -251,11 +246,8 @@ if (empty($reshook)) setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } - else $nbok++; - } - else - { + } else $nbok++; + } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; @@ -267,9 +259,7 @@ if (empty($reshook)) if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); } //var_dump($listofobjectthirdparties);exit; @@ -364,9 +354,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; -} -else -{ +} else { if ($limit) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -500,8 +488,7 @@ foreach ($object->fields as $key => $val) if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } - elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; print ''; } } diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index dce9bc82b06..df1693e84b0 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -33,7 +33,7 @@ $langs->loadLangs(array("mrp", "companies")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index 806b75cb9eb..b9123b8c226 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -99,7 +99,7 @@ class Boms extends DolibarrApi global $db, $conf; $obj_ret = array(); - $tmpobject = new BOM($db); + $tmpobject = new BOM($this->db); $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; @@ -139,7 +139,7 @@ class Boms extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { @@ -147,25 +147,24 @@ class Boms extends DolibarrApi } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $i = 0; while ($i < $num) { - $obj = $db->fetch_object($result); - $bom_static = new BOM($db); + $obj = $this->db->fetch_object($result); + $bom_static = new BOM($this->db); if ($bom_static->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($bom_static); } $i++; } - } - else { + } else { throw new RestException(503, 'Error when retrieve bom list'); } if (!count($obj_ret)) { @@ -228,9 +227,7 @@ class Boms extends DolibarrApi if ($this->bom->update($id, DolibarrApiAccess::$user) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $this->bom->error); } } diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index aea05d59a15..bd67f311d19 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -251,7 +251,7 @@ class BOM extends CommonObject if ($result > 0 && !empty($object->table_element_line)) $object->fetchLines(); // Get lines so they will be clone - //foreach($object->lines as $line) + //foreach ($object->lines as $line) // $line->fetch_optionals(); // Reset some properties @@ -383,14 +383,11 @@ class BOM extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; - } - elseif (strpos($key, 'date') !== false) { + } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; - } - elseif ($key == 'customsql') { + } elseif ($key == 'customsql') { $sqlwhere[] = $value; - } - else { + } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } @@ -515,16 +512,12 @@ class BOM extends CommonObject if ($numref != "") { return $numref; - } - else - { + } else { $this->error = $obj->error; //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); return ""; } - } - else - { + } else { print $langs->trans("Error")." ".$langs->trans("Error_BOM_ADDON_NotDefined"); return ""; } @@ -569,9 +562,7 @@ class BOM extends CommonObject { $this->fetch_product(); $num = $this->getNextNumRef($this->product); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -652,9 +643,7 @@ class BOM extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -756,7 +745,7 @@ class BOM extends CommonObject $result = ''; - $label = ''.$langs->trans("BillOfMaterials").''; + $label = img_picto('', $this->picto).' '.$langs->trans("BillOfMaterials").''; $label .= '
'; $label .= ''.$langs->trans('Ref').': '.$this->ref; if (isset($this->status)) { @@ -790,8 +779,7 @@ class BOM extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -897,9 +885,7 @@ class BOM extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -921,9 +907,7 @@ class BOM extends CommonObject $this->error = $this->error; $this->errors = $this->errors; return $result; - } - else - { + } else { $this->lines = $result; return $this->lines; } @@ -950,8 +934,8 @@ class BOM extends CommonObject if (!dol_strlen($modele)) { $modele = 'standard'; - if ($this->modelpdf) { - $modele = $this->modelpdf; + if ($this->model_pdf) { + $modele = $this->model_pdf; } elseif (!empty($conf->global->BOM_ADDON_PDF)) { $modele = $conf->global->BOM_ADDON_PDF; } @@ -1021,7 +1005,11 @@ class BOM extends CommonObject foreach ($this->lines as &$line) { $tmpproduct = new Product($this->db); - $tmpproduct->fetch($line->fk_product); + $result= $tmpproduct->fetch($line->fk_product); + if ($result < 0) { + $this->error=$tmpproduct->error; + return -1; + } $line->unit_cost = price2num((!empty($tmpproduct->cost_price)) ? $tmpproduct->cost_price : $tmpproduct->pmp); if (empty($line->unit_cost)) { if ($productFournisseur->find_min_price_product_fournisseur($line->fk_product) > 0) @@ -1225,14 +1213,11 @@ class BOMLine extends CommonObjectLine foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; - } - elseif (strpos($key, 'date') !== false) { + } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; - } - elseif ($key == 'customsql') { + } elseif ($key == 'customsql') { $sqlwhere[] = $value; - } - else { + } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } @@ -1346,8 +1331,7 @@ class BOMLine extends CommonObjectLine $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -1440,9 +1424,7 @@ class BOMLine extends CommonObjectLine } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/bom/tpl/linkedobjectblock.tpl.php b/htdocs/bom/tpl/linkedobjectblock.tpl.php index d6b8ebf9a7c..45340577228 100644 --- a/htdocs/bom/tpl/linkedobjectblock.tpl.php +++ b/htdocs/bom/tpl/linkedobjectblock.tpl.php @@ -52,8 +52,15 @@ foreach ($linkedObjectBlock as $key => $objectlink) } echo ''; echo ''.$objectlink->getNomUrl(1).''; - $product_static->fetch($objectlink->fk_product); - echo ''.$product_static->getNomUrl(1).''; + + echo ''; + $result=$product_static->fetch($objectlink->fk_product); + if ($result<0) { + setEventMessage($product_static->error, 'errors'); + } elseif ($result>0) { + $product_static->getNomUrl(1); + } + print ''; echo ''.dol_print_date($objectlink->date_creation, 'day').''; echo ''; if ($user->rights->commande->lire) { diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index eeffb625381..2a675cc60e1 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -31,8 +31,8 @@ // Protection to avoid direct call of template if (empty($object) || !is_object($object)) { - print "Error: this template page cannot be called directly as an URL"; - exit; + print "Error: this template page cannot be called directly as an URL"; + exit; } @@ -52,35 +52,34 @@ print "\n"; $nolinesbefore = (count($this->lines) == 0 || $forcetoshowtitlelines); if ($nolinesbefore) { - print ''; - if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - print ''; - } - print ''; + print ''; + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } + print ''; print '
'.$langs->trans('AddNewLine').''; - // echo $langs->trans("FreeZone"); print ''; print ''.$langs->trans('Qty').''; if ($conf->global->PRODUCT_USE_UNITS) { - print ''; - print ''; - print $langs->trans('Unit'); - print ''; + print ''; + print ''; + print $langs->trans('Unit'); + print ''; } print ''.$form->textwithpicto($langs->trans('QtyFrozen'), $langs->trans("QuantityConsumedInvariable")).''; print ''.$form->textwithpicto($langs->trans('DisableStockChange'), $langs->trans('DisableStockChangeHelp')).''; print ''.$form->textwithpicto($langs->trans('ManufacturingEfficiency'), $langs->trans('ValueOfMeansLoss')).''; print ' '; - print ''; + print ''; } print ''; $coldisplay = 0; // Adds a line numbering column if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { - $coldisplay++; - echo ''; + $coldisplay++; + echo ''; } $coldisplay++; @@ -99,9 +98,7 @@ if (!empty($conf->product->enabled) || !empty($conf->service->enabled)) { // hide products in closed warehouse, but show products for internal transfer $form->select_produits(GETPOST('idprod', 'int'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array')); - } - else - { + } else { $form->select_produits(GETPOST('idprod', 'int'), 'idprod', $filtertype, $conf->product->limit_size, $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, '1', 0, 'maxwidth500', 0, '', GETPOST('combinations', 'array')); } @@ -114,9 +111,9 @@ print ''; if ($conf->global->PRODUCT_USE_UNITS) { - $coldisplay++; + $coldisplay++; print ''; - print $form->selectUnits($line->fk_unit, "units"); + print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, "units"); print ''; } diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index e1e94dc2076..05682dc3da6 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -111,21 +111,21 @@ print ''; if ($this->status == 0 && ($object_rights->write) && $action != 'selectlines') { print ''; $coldisplay++; - if (($line->info_bits & 2) == 2 || !empty($disableedit)) { - } else { - print '
id.'">'.img_edit().''; - } - print ''; + if (($line->info_bits & 2) == 2 || !empty($disableedit)) { + } else { + print 'id.'">'.img_edit().''; + } + print ''; - print ''; - $coldisplay++; - if (($line->fk_prev_id == null) && empty($disableremove)) { - //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation - print 'id.'">'; - print img_delete(); - print ''; - } - print ''; + print ''; + $coldisplay++; + if (($line->fk_prev_id == null) && empty($disableremove)) { + //La suppression n'est autorisée que si il n'y a pas de ligne dans une précédente situation + print 'id.'">'; + print img_delete(); + print ''; + } + print ''; if ($num > 1 && $conf->browser->layout != 'phone' && empty($disablemove)) { print ''; @@ -146,14 +146,14 @@ if ($this->status == 0 && ($object_rights->write) && $action != 'selectlines') { $coldisplay++; } } else { - print ''; - $coldisplay = $coldisplay + 3; + print ''; + $coldisplay = $coldisplay + 3; } if ($action == 'selectlines') { - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; } print ''; diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index bc0c0c37fc2..9aa1989fa2e 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -31,7 +31,7 @@ $langs->load("admin"); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if ($action == 'setvalue') { @@ -44,9 +44,7 @@ if ($action == 'setvalue') { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 06f0b0e8fe7..994bf13c031 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -41,9 +41,7 @@ function printDropdownBookmarksList() if (!empty($_SERVER["QUERY_STRING"])) { $url .= (dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]) : ''); - } - else - { + } else { global $sortfield, $sortorder; $tmpurl = ''; // No urlencode, all param $url will be urlencoded later @@ -122,9 +120,7 @@ function printDropdownBookmarksList() } $searchForm .= ''; } - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 411c2c8175f..93926e4ba92 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -100,23 +100,17 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') if (empty($backtopage)) $backtopage = ($urlsource ? $urlsource : ((!empty($url) && !preg_match('/^http/i', $url)) ? $url : DOL_URL_ROOT.'/bookmarks/list.php')); header("Location: ".$backtopage); exit; - } - else - { + } else { if ($object->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->transnoentities("WarningBookmarkAlreadyExists"), null, 'warnings'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } $action = $invertedaction; } - } - else - { + } else { $action = $invertedaction; } } @@ -257,7 +251,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) print ''; } print ''; - if ($action == 'edit') print 'url).'">'; + if ($action == 'edit') print 'url).'">'; else print 'target ? ' target="_blank"' : '').'>'.$object->url.''; print ''; @@ -266,9 +260,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) { $liste = array(1=>$langs->trans("OpenANewWindow"), 0=>$langs->trans("ReplaceWindow")); print $form->selectarray('target', $liste, isset($_POST["target"]) ? $_POST["target"] : $object->target); - } - else - { + } else { if ($object->target == 0) print $langs->trans("ReplaceWindow"); if ($object->target == 1) print $langs->trans("OpenANewWindow"); } @@ -278,17 +270,13 @@ if ($id > 0 && !preg_match('/^add/i', $action)) if ($action == 'edit' && $user->admin) { print img_picto('', 'user').' '.$form->select_dolusers(isset($_POST['userid']) ? $_POST['userid'] : ($object->fk_user ? $object->fk_user : ''), 'userid', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); - } - else - { + } else { if ($object->fk_user > 0) { $fuser = new User($db); $fuser->fetch($object->fk_user); print $fuser->getNomUrl(1); - } - else - { + } else { print $langs->trans("Public"); } } @@ -323,13 +311,13 @@ if ($id > 0 && !preg_match('/^add/i', $action)) // Edit if ($user->rights->bookmark->creer && $action != 'edit') { - print " id."&action=edit\">".$langs->trans("Edit")."\n"; + print ''.$langs->trans("Edit").''."\n"; } // Remove if ($user->rights->bookmark->supprimer && $action != 'edit') { - print " id."&action=delete\">".$langs->trans("Delete")."\n"; + print ''.$langs->trans("Delete").''."\n"; } print ''; diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index 2667208fc44..5fab4496f6e 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -127,9 +127,7 @@ class Bookmark extends CommonObject $this->db->free($resql); return $this->id; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -174,17 +172,13 @@ class Bookmark extends CommonObject $this->id = $id; $this->db->commit(); return $id; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); $this->db->rollback(); @@ -218,9 +212,7 @@ class Bookmark extends CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -242,9 +234,7 @@ class Bookmark extends CommonObject if ($resql) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -320,8 +310,7 @@ class Bookmark extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 1cc6029dbc9..7f70d74f5d9 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -27,12 +27,12 @@ require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; // Load translation files required by the page $langs->loadLangs(array('bookmarks', 'admin')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search // Security check if (!$user->rights->bookmark->lire) { @@ -42,8 +42,8 @@ $optioncss = GETPOST('optioncss', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -72,9 +72,7 @@ if ($action == 'delete') { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -115,9 +113,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; -} -else -{ +} else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -230,9 +226,7 @@ while ($i < min($num, $limit)) } $tmpuser = $cacheOfUsers[$obj->fk_user]; print $tmpuser->getNomUrl(1); - } - else - { + } else { print $langs->trans("Public"); } print "\n"; @@ -247,14 +241,12 @@ while ($i < min($num, $limit)) print ''; if ($user->rights->bookmark->creer) { - print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().""; + print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().""; } if ($user->rights->bookmark->supprimer) { - print 'rowid.'">'.img_delete().''; - } - else - { + print 'rowid.'">'.img_delete().''; + } else { print " "; } print ""; diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index 7c72858387a..dfd6e99a9ea 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -68,9 +68,7 @@ if (GETPOST('action', 'alpha') == 'set') { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($langs->trans("Error"), null, 'errors'); } @@ -149,9 +147,7 @@ if (!empty($conf->stock->enabled)) print ''; if (empty($conf->productbatch->enabled)) { print $form->selectyesno('CASHDESK_NO_DECREASE_STOCK', $conf->global->CASHDESK_NO_DECREASE_STOCK, 1); - } - else - { + } else { if (!$conf->global->CASHDESK_NO_DECREASE_STOCK) { $res = dolibarr_set_const($db, "CASHDESK_NO_DECREASE_STOCK", 1, 'chaine', 0, '', $conf->entity); } @@ -169,9 +165,7 @@ if (!empty($conf->stock->enabled)) { print $formproduct->selectWarehouses($conf->global->CASHDESK_ID_WAREHOUSE, 'CASHDESK_ID_WAREHOUSE', '', 1, $disabled); print ' ('.$langs->trans("Create").')'; - } - else - { + } else { print ''.$langs->trans("StockDecreaseForPointOfSaleDisabled").''; } print ''; diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index 41ba5ffcb39..7b513ada33c 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -36,9 +36,7 @@ if (isset($_SESSION['serObjFacturation'])) { $obj_facturation = unserialize($_SESSION['serObjFacturation']); unset($_SESSION['serObjFacturation']); -} -else -{ +} else { // ... sinon, c'est une nouvelle vente $obj_facturation = new Facturation(); } @@ -47,7 +45,7 @@ else $obj_facturation->calculTotaux(); // Redefine prix_total_ttc, prix_total_ht et montant_tva from $_SESSION['poscart'] -$total_ttc = $obj_facturation->prixTotalTtc(); +$total_ttc = $obj_facturation->amountWithTax(); /*var_dump($obj_facturation); var_dump($_SESSION['poscart']); @@ -72,9 +70,7 @@ if (in_array( )) { include $page.'.php'; -} -else -{ +} else { dol_print_error('', 'menu param '.$page.' is not inside allowed list'); } diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php index 164d229cf8d..cc71d1c20d8 100644 --- a/htdocs/cashdesk/class/Auth.class.php +++ b/htdocs/cashdesk/class/Auth.class.php @@ -129,9 +129,7 @@ class Auth $this->login($aLogin); $this->passwd($aPasswd); $ret = 0; - } - else - { + } else { $ret = -1; } } diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 10573f9d917..f2223b0b45d 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -140,7 +140,7 @@ class Facturation $remise_percent = 0; } $montant_remise_ht = ($resultarray[6] - $resultarray[0]); - $this->montantRemise($montant_remise_ht); + $this->amountDiscount($montant_remise_ht); $newcartarray = $_SESSION['poscart']; @@ -256,7 +256,7 @@ class Facturation $this->qte('RESET'); $this->stock('RESET'); $this->remisePercent('RESET'); - $this->montantRemise('RESET'); + $this->amountDiscount('RESET'); $this->prix('RESET'); $this->tva('RESET'); } @@ -270,13 +270,13 @@ class Facturation { $this->numInvoice('RESET'); $this->getSetPaymentMode('RESET'); - $this->montantEncaisse('RESET'); - $this->montantRendu('RESET'); + $this->amountCollected('RESET'); + $this->amountReturned('RESET'); $this->paiementLe('RESET'); - $this->prixTotalHt('RESET'); - $this->montantTva('RESET'); - $this->prixTotalTtc('RESET'); + $this->amountWithoutTax('RESET'); + $this->amountVat('RESET'); + $this->amountWithTax('RESET'); } @@ -294,13 +294,10 @@ class Facturation if (!$aId) { return $this->id; - } - elseif ($aId == 'RESET') + } elseif ($aId == 'RESET') { $this->id = null; - } - else - { + } else { $this->id = $aId; } } @@ -317,13 +314,10 @@ class Facturation if (is_null($aRef)) { return $this->ref; - } - elseif ($aRef == 'RESET') + } elseif ($aRef == 'RESET') { $this->ref = null; - } - else - { + } else { $this->ref = $aRef; } } @@ -339,13 +333,10 @@ class Facturation if (is_null($aQte)) { return $this->qte; - } - elseif ($aQte == 'RESET') + } elseif ($aQte == 'RESET') { $this->qte = null; - } - else - { + } else { $this->qte = $aQte; } } @@ -362,13 +353,10 @@ class Facturation if (is_null($aStock)) { return $this->stock; - } - elseif ($aStock == 'RESET') + } elseif ($aStock == 'RESET') { $this->stock = null; - } - else - { + } else { $this->stock = $aStock; } } @@ -385,13 +373,10 @@ class Facturation if (is_null($aRemisePercent)) { return $this->remise_percent; - } - elseif ($aRemisePercent == 'RESET') + } elseif ($aRemisePercent == 'RESET') { $this->remise_percent = null; - } - else - { + } else { $this->remise_percent = $aRemisePercent; } } @@ -402,7 +387,7 @@ class Facturation * @param int $aMontantRemise Amount * @return string Amount */ - public function montantRemise($aMontantRemise = null) + public function amountDiscount($aMontantRemise = null) { if (is_null($aMontantRemise)) { @@ -490,7 +475,7 @@ class Facturation * @param int $aMontantEncaisse Amount * @return int Amount */ - public function montantEncaisse($aMontantEncaisse = null) + public function amountCollected($aMontantEncaisse = null) { if (is_null($aMontantEncaisse)) { @@ -508,7 +493,7 @@ class Facturation * @param int $aMontantRendu Amount * @return int Amount */ - public function montantRendu($aMontantRendu = null) + public function amountReturned($aMontantRendu = null) { if (is_null($aMontantRendu)) { @@ -543,7 +528,7 @@ class Facturation * @param int $aTotalHt Total amount * @return int Total amount */ - public function prixTotalHt($aTotalHt = null) + public function amountWithoutTax($aTotalHt = null) { if (is_null($aTotalHt)) { return $this->prix_total_ht; @@ -560,7 +545,7 @@ class Facturation * @param int $aMontantTva Amount vat * @return int Amount vat */ - public function montantTva($aMontantTva = null) + public function amountVat($aMontantTva = null) { if (is_null($aMontantTva)) { return $this->montant_tva; @@ -577,18 +562,15 @@ class Facturation * @param int $aTotalTtc Amount ttc * @return int Amount ttc */ - public function prixTotalTtc($aTotalTtc = null) + public function amountWithTax($aTotalTtc = null) { if (is_null($aTotalTtc)) { return $this->prix_total_ttc; - } - elseif ($aTotalTtc == 'RESET') + } elseif ($aTotalTtc == 'RESET') { $this->prix_total_ttc = null; - } - else - { + } else { $this->prix_total_ttc = $aTotalTtc; } } diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index 3c4a4dd6c7a..85347e4c7ff 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -42,7 +42,7 @@ if (GETPOST('filtre', 'alpha')) { $sql = "SELECT p.rowid, p.ref, p.label, p.tva_tx, p.fk_product_type"; if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= ", ps.reel"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; - if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'"; + if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$db->escape($conf_fkentrepot)."'"; $sql .= " WHERE p.entity IN (".getEntity('product').")"; $sql .= " AND p.tosell = 1"; if (!$conf->global->CASHDESK_SERVICES) $sql .= " AND p.fk_product_type = 0"; @@ -80,9 +80,7 @@ if (GETPOST('filtre', 'alpha')) { $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } $tab_designations = $ret; @@ -94,7 +92,7 @@ if (GETPOST('filtre', 'alpha')) { $sql = "SELECT p.rowid, ref, label, tva_tx, p.fk_product_type"; if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= ", ps.reel"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; - if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'"; + if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$db->escape($conf_fkentrepot)."'"; $sql .= " WHERE p.entity IN (".getEntity('product').")"; $sql .= " AND p.tosell = 1"; if (!$conf->global->CASHDESK_SERVICES) $sql .= " AND p.fk_product_type = 0"; @@ -115,9 +113,7 @@ if (GETPOST('filtre', 'alpha')) { $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } $tab_designations = $ret; @@ -130,18 +126,13 @@ if ($nbr_enreg > 1) if ($nbr_enreg > $conf_taille_listes) { $top_liste_produits = '----- '.$conf_taille_listes.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----'; - } - else - { + } else { $top_liste_produits = '----- '.$nbr_enreg.' '.$langs->transnoentitiesnoconv("CashDeskProducts").' '.$langs->trans("CashDeskOn").' '.$nbr_enreg.' -----'; } -} -elseif ($nbr_enreg == 1) +} elseif ($nbr_enreg == 1) { $top_liste_produits = '----- 1 '.$langs->transnoentitiesnoconv("ProductFound").' -----'; -} -else -{ +} else { $top_liste_produits = '----- '.$langs->transnoentitiesnoconv("NoProductFound").' -----'; } @@ -154,8 +145,8 @@ $i = 0; // Reinitialisation du mode de paiement, en cas de retour aux achats apres validation $obj_facturation->getSetPaymentMode('RESET'); -$obj_facturation->montantEncaisse('RESET'); -$obj_facturation->montantRendu('RESET'); +$obj_facturation->amountCollected('RESET'); +$obj_facturation->amountReturned('RESET'); $obj_facturation->paiementLe('RESET'); diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php index 98ed2bf0173..9ee4bdb856c 100644 --- a/htdocs/cashdesk/facturation_dhtml.php +++ b/htdocs/cashdesk/facturation_dhtml.php @@ -45,7 +45,7 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least $sql = "SELECT p.rowid, p.ref, p.label, p.tva_tx"; if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= ", ps.reel"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p"; - if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$conf_fkentrepot."'"; + if (!empty($conf->stock->enabled) && !empty($conf_fkentrepot)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '".$db->escape($conf_fkentrepot)."'"; $sql .= " WHERE p.entity IN (".getEntity('product').")"; $sql .= " AND p.tosell = 1"; $sql .= " AND p.fk_product_type = 0"; @@ -55,9 +55,7 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least $sql .= " AND (p.ref LIKE '".$db->escape($search)."%' OR p.label LIKE '".$db->escape($search)."%'"; if (!empty($conf->barcode->enabled)) $sql .= " OR p.barcode LIKE '".$db->escape($search)."%'"; $sql .= ")"; - } - else - { + } else { $sql .= " AND (p.ref LIKE '%".$db->escape($search)."%' OR p.label LIKE '%".$db->escape($search)."%'"; if (!empty($conf->barcode->enabled)) $sql .= " OR p.barcode LIKE '%".$db->escape($search)."%'"; $sql .= ")"; @@ -98,9 +96,7 @@ if (dol_strlen($search) >= 0) // If search criteria is on char length at least $resultat .= ''; print $resultat; - } - else - { + } else { $langs->load("cashdesk"); print '
    '; diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 6a7a9bae366..16b4bfec017 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Facturation.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $obj_facturation = unserialize($_SESSION['serObjFacturation']); unset($_SESSION['serObjFacturation']); @@ -50,8 +50,7 @@ switch ($action) if ($_POST['hdnSource'] == 'LISTE') { $sql .= " AND p.rowid = ".((int) GETPOST('selProduit', 'int')); - } - elseif ($_POST['hdnSource'] == 'REF') + } elseif ($_POST['hdnSource'] == 'REF') { $sql .= " AND p.ref = '".$db->escape(GETPOST('txtRef', 'alpha'))."'"; } @@ -101,8 +100,7 @@ switch ($action) if (isset($prod->multiprices_tva_tx[$societe->price_level])) $tva_tx = $prod->multiprices_tva_tx[$societe->price_level]; if (isset($prod->multiprices_recuperableonly[$societe->price_level])) $tva_npr = $prod->multiprices_recuperableonly[$societe->price_level]; } - } - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; @@ -123,9 +121,7 @@ switch ($action) $tva_npr = $prodcustprice->lines[0]->recuperableonly; if (empty($tva_tx)) $tva_npr = 0; } - } - else - { + } else { setEventMessages($prodcustprice->error, $prodcustprice->errors, 'errors'); } } @@ -162,35 +158,26 @@ switch ($action) if ($_POST['hdnSource'] == 'LISTE') { $filtre = $ret['ref']; - } - elseif ($_POST['hdnSource'] == 'REF') + } elseif ($_POST['hdnSource'] == 'REF') { $filtre = $_POST['txtRef']; } $redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&filtre='.$filtre; - } - else - { + } else { $obj_facturation->raz(); if ($_POST['hdnSource'] == 'REF') { $redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&filtre='.$_POST['txtRef']; - } - else - { + } else { $redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation'; } } - } - else - { + } else { dol_print_error($db); } - } - else - { + } else { $redirection = DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation'; } diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 6c74b268ec9..9d8bfc9b735 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -75,9 +75,7 @@ if (is_array($hookmanager->resArray) && !empty($hookmanager->resArray)) { if (!empty($mysoc->logo_small)) { print 'Logo company'; -} -else -{ +} else { print '
    '.$mysoc->name.'
    '; } ?> @@ -113,8 +111,7 @@ if (!empty($morelogincontent)) { echo $option; } } - } - else { + } else { echo ''; echo $morelogincontent; } @@ -203,9 +200,7 @@ if ($_GET['err'] < 0) echo (''); -} -else -{ +} else { echo (''); diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index 251b3f2e997..e8366e981cc 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -89,7 +89,7 @@ if ($retour >= 0) $sql = "SELECT rowid, lastname, firstname"; $sql .= " FROM ".MAIN_DB_PREFIX."user"; - $sql .= " WHERE login = '".$username."'"; + $sql .= " WHERE login = '".$db->escape($username)."'"; $sql .= " AND entity IN (0,".$conf->entity.")"; $result = $db->query($sql); @@ -116,14 +116,10 @@ if ($retour >= 0) header('Location: '.DOL_URL_ROOT.'/cashdesk/affIndex.php?menutpl=facturation&id=NOUV'); exit; - } - else - { + } else { dol_print_error($db); } -} -else -{ +} else { // Load translation files required by the page $langs->loadLangs(array("other", "errors")); $retour = $langs->trans("ErrorBadLoginPassword"); diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index f1e19b4df20..e1dc53ed6e8 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -149,7 +149,7 @@ for ($i = 0; $i < $nbtoshow; $i++) trans("TotalTicket"); ?>trans("Received"); ?>trans("Change"); ?> - + @@ -169,24 +169,21 @@ for ($i = 0; $i < $nbtoshow; $i++) { $langs->load("errors"); print 'transnoentitiesnoconv("CashDesk"))).'" />'; - } - else print ''; + } else print ''; print ''; print '
    '; if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CB']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] < 0) { $langs->load("errors"); print 'transnoentitiesnoconv("CashDesk"))).'" />'; - } - else print ''; + } else print ''; print '
    '; print '
    '; if (empty($_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE']) || $_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] < 0) { $langs->load("errors"); print 'transnoentitiesnoconv("CashDesk")).'" />'; - } - else print ''; + } else print ''; print '
    '; print '
    '; print '
    '; diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index 6fffbd3ed52..bd73954f6a0 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -49,8 +49,7 @@ $tab = (!empty($_SESSION['poscart']) ? $_SESSION['poscart'] : array()); $tab_size = count($tab); if ($tab_size <= 0) print '
    '.$langs->trans("NoArticle").'

    '; -else -{ +else { for ($i = 0; $i < $tab_size; $i++) { echo ('
    '."\n"); diff --git a/htdocs/cashdesk/tpl/ticket.tpl.php b/htdocs/cashdesk/tpl/ticket.tpl.php index 8c97796f430..b5994456252 100644 --- a/htdocs/cashdesk/tpl/ticket.tpl.php +++ b/htdocs/cashdesk/tpl/ticket.tpl.php @@ -102,13 +102,13 @@ $object->fetch($facid); - + - + - +
    trans("TotalHT"); ?>prixTotalHt(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>amountWithoutTax(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>
    trans("TotalVAT").''.price(price2num($obj_facturation->montantTva(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>trans("TotalVAT").''.price(price2num($obj_facturation->amountVat(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>
    trans("TotalTTC").''.price(price2num($obj_facturation->prixTotalTtc(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>trans("TotalTTC").''.price(price2num($obj_facturation->amountWithTax(), 'MT'), '', $langs, 0, -1, -1, $conf->currency)."\n"; ?>
    diff --git a/htdocs/cashdesk/tpl/validation1.tpl.php b/htdocs/cashdesk/tpl/validation1.tpl.php index 3b38aba3159..0434473d359 100644 --- a/htdocs/cashdesk/tpl/validation1.tpl.php +++ b/htdocs/cashdesk/tpl/validation1.tpl.php @@ -35,18 +35,16 @@ $langs->loadLangs(array("main", "bills", "banks")); - + montantTva()) { - echo (''); -} -else -{ +if ($obj_facturation->amountVat()) { + echo (''); +} else { echo (''); } ?> - + '); } else { - echo (''); + echo (''); } // Affichage du montant rendu (reglement en especes) -if ($obj_facturation->montantRendu()) { - echo (''); +if ($obj_facturation->amountReturned()) { + echo (''); } ?> diff --git a/htdocs/cashdesk/validation_verif.php b/htdocs/cashdesk/validation_verif.php index bc67350bbf1..6b8e9af94f1 100644 --- a/htdocs/cashdesk/validation_verif.php +++ b/htdocs/cashdesk/validation_verif.php @@ -83,22 +83,20 @@ switch ($action) // Si paiement autre qu'en especes, montant encaisse = prix total $mode_reglement = $obj_facturation->getSetPaymentMode(); if ($mode_reglement != 'ESP') { - $montant = $obj_facturation->prixTotalTtc(); + $montant = $obj_facturation->amountWithTax(); } else { $montant = $_POST['txtEncaisse']; } if ($mode_reglement != 'DIF') { - $obj_facturation->montantEncaisse($montant); + $obj_facturation->amountCollected($montant); //Determination de la somme rendue - $total = $obj_facturation->prixTotalTtc(); - $encaisse = $obj_facturation->montantEncaisse(); + $total = $obj_facturation->amountWithTax(); + $encaisse = $obj_facturation->amountCollected(); - $obj_facturation->montantRendu($encaisse - $total); - } - else - { + $obj_facturation->amountReturned($encaisse - $total); + } else { //$txtDatePaiement=$_POST['txtDatePaiement']; $datePaiement = dol_mktime(0, 0, 0, $_POST['txtDatePaiementmonth'], $_POST['txtDatePaiementday'], $_POST['txtDatePaiementyear']); $txtDatePaiement = dol_print_date($datePaiement, 'dayrfc'); @@ -139,8 +137,8 @@ switch ($action) $mode_reglement_id = dol_getIdFromCode($db, 'LIQ', 'c_paiement', 'code', 'id', 1); $cond_reglement_id = 0; $note .= $langs->trans("Cash")."\n"; - $note .= $langs->trans("Received").' : '.$obj_facturation->montantEncaisse()." ".$conf->currency."\n"; - $note .= $langs->trans("Rendu").' : '.$obj_facturation->montantRendu()." ".$conf->currency."\n"; + $note .= $langs->trans("Received").' : '.$obj_facturation->amountCollected()." ".$conf->currency."\n"; + $note .= $langs->trans("Rendu").' : '.$obj_facturation->amountReturned()." ".$conf->currency."\n"; $note .= "\n"; $note .= '--------------------------------------'."\n\n"; break; @@ -209,9 +207,9 @@ switch ($action) $invoice->date_creation = $now; $invoice->date = $now; $invoice->date_lim_reglement = 0; - $invoice->total_ht = $obj_facturation->prixTotalHt(); - $invoice->total_tva = $obj_facturation->montantTva(); - $invoice->total_ttc = $obj_facturation->prixTotalTtc(); + $invoice->total_ht = $obj_facturation->amountWithoutTax(); + $invoice->total_tva = $obj_facturation->amountVat(); + $invoice->total_ttc = $obj_facturation->amountWithTax(); $invoice->note_private = $note; $invoice->cond_reglement_id = $cond_reglement_id; $invoice->mode_reglement_id = $mode_reglement_id; @@ -252,17 +250,13 @@ switch ($action) } } } - } - else - { + } else { setEventMessages($invoice->error, $invoice->errors, 'errors'); $error++; } $id = $invoice->id; - } - else - { + } else { $resultcreate = $invoice->create($user, 0, 0); if ($resultcreate > 0) { @@ -300,9 +294,8 @@ switch ($action) // Add the payment $payment = new Paiement($db); $payment->datepaye = $now; - $payment->bank_account = $conf_fkaccount; - $payment->amounts[$invoice->id] = $obj_facturation->prixTotalTtc(); - $payment->note = $langs->trans("Payment").' '.$langs->trans("Invoice").' '.$obj_facturation->numInvoice(); + $payment->amounts[$invoice->id] = $obj_facturation->amountWithTax(); + $payment->note_public = $langs->trans("Payment").' '.$langs->trans("Invoice").' '.$obj_facturation->numInvoice(); $payment->paiementid = $invoice->mode_reglement_id; $payment->num_paiement = ''; $payment->num_payment = ''; @@ -322,7 +315,7 @@ switch ($action) if (!$error) { - if ($invoice->total_ttc == $obj_facturation->prixTotalTtc() + if ($invoice->total_ttc == $obj_facturation->amountWithTax() && $obj_facturation->getSetPaymentMode() != 'DIFF') { // We set status to payed @@ -330,15 +323,11 @@ switch ($action) //print 'set paid';exit; } } - } - else - { + } else { setEventMessages($invoice->error, $invoice->errors, 'errors'); $error++; } - } - else - { + } else { setEventMessages($invoice->error, $invoice->errors, 'errors'); $error++; } @@ -349,9 +338,7 @@ switch ($action) { $db->commit(); $redirection = 'affIndex.php?menutpl=validation_ok&facid='.$id; // Ajout de l'id de la facture, pour l'inclure dans un lien pointant directement vers celle-ci dans Dolibarr - } - else - { + } else { $db->rollback(); $redirection = 'affIndex.php?facid='.$id.'&error=1&mesg=ErrorFailedToCreateInvoice'; // Ajout de l'id de la facture, pour l'inclure dans un lien pointant directement vers celle-ci dans Dolibarr } diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php index 6dd313692db..eb8af1ee44a 100644 --- a/htdocs/categories/admin/categorie.php +++ b/htdocs/categories/admin/categorie.php @@ -47,9 +47,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { setEventMessages($db->lasterror(), null, 'errors'); } } @@ -61,9 +59,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { setEventMessages($db->lasterror(), null, 'errors'); } } @@ -107,15 +103,11 @@ print ''; - print ''; // Description print ''; diff --git a/htdocs/categories/class/api_categories.class.php b/htdocs/categories/class/api_categories.class.php index d6eff682908..5f0a28340f9 100644 --- a/htdocs/categories/class/api_categories.class.php +++ b/htdocs/categories/class/api_categories.class.php @@ -20,10 +20,12 @@ use Luracast\Restler\RestException; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php'; + require_once DOL_DOCUMENT_ROOT.'/adherents/class/api_members.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/api_products.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/api_contacts.class.php'; require_once DOL_DOCUMENT_ROOT.'/societe/class/api_thirdparties.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/api_projects.class.php'; /** * API class for categories @@ -33,727 +35,727 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/api_thirdparties.class.php'; */ class Categories extends DolibarrApi { - /** - * @var array $FIELDS Mandatory fields, checked when create and update object - */ - static $FIELDS = array( - 'label', - 'type' - ); - - static $TYPES = array( - 0 => 'product', - 1 => 'supplier', - 2 => 'customer', - 3 => 'member', - 4 => 'contact', - 5 => 'account', - //6 => 'project', - //7 => 'user', - //8 => 'bank_line', - //9 => 'warehouse', - //10 => 'actioncomm', - ); - - /** - * @var Categorie $category {@type Categorie} - */ - public $category; - - /** - * Constructor - */ - public function __construct() - { - global $db, $conf; - $this->db = $db; - $this->category = new Categorie($this->db); - } - - /** - * Get properties of a category object - * - * Return an array with category informations - * - * @param int $id ID of category - * @param bool $include_childs Include child categories list (true or false) - * @return array|mixed data without useless information - * - * @throws RestException - */ - public function get($id, $include_childs = false) - { - if (!DolibarrApiAccess::$user->rights->categorie->lire) { - throw new RestException(401); - } - - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } - - if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - if ($include_childs) { - $cats = $this->category->get_filles(); - if (!is_array($cats)) { - throw new RestException(500, 'Error when fetching child categories', array_merge(array($this->category->error), $this->category->errors)); - } - $this->category->childs = []; - foreach ($cats as $cat) { - $this->category->childs[] = $this->_cleanObjectDatas($cat); - } - } - - return $this->_cleanObjectDatas($this->category); - } - - /** - * List categories - * - * Get a list of categories - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" - * @return array Array of category objects - * - * @throws RestException - */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $type = '', $sqlfilters = '') - { - global $db, $conf; - - $obj_ret = array(); - - if (!DolibarrApiAccess::$user->rights->categorie->lire) { - throw new RestException(401); - } - - $sql = "SELECT t.rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."categorie as t"; - $sql .= ' WHERE t.entity IN ('.getEntity('category').')'; - if (!empty($type)) - { - $sql .= ' AND t.type='.array_search($type, Categories::$TYPES); - } - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - $sql .= $db->order($sortfield, $sortorder); - if ($limit) { - if ($page < 0) - { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $db->plimit($limit + 1, $offset); - } - - $result = $db->query($sql); - if ($result) - { - $i = 0; - $num = $db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { - $obj = $db->fetch_object($result); - $category_static = new Categorie($db); - if ($category_static->fetch($obj->rowid)) { - $obj_ret[] = $this->_cleanObjectDatas($category_static); - } - $i++; - } - } - else { - throw new RestException(503, 'Error when retrieve category list : '.$db->lasterror()); - } - if (!count($obj_ret)) { - throw new RestException(404, 'No category found'); - } - return $obj_ret; - } - - /** - * Create category object - * - * @param array $request_data Request data - * @return int ID of category - */ - public function post($request_data = null) - { - if (!DolibarrApiAccess::$user->rights->categorie->creer) { - throw new RestException(401); - } - - // Check mandatory fields - $result = $this->_validate($request_data); - - foreach ($request_data as $field => $value) { - $this->category->$field = $value; - } - if ($this->category->create(DolibarrApiAccess::$user) < 0) { - throw new RestException(500, 'Error when creating category', array_merge(array($this->category->error), $this->category->errors)); - } - return $this->category->id; - } - - /** - * Update category - * - * @param int $id Id of category to update - * @param array $request_data Datas - * @return int - */ - public function put($id, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->categorie->creer) { - throw new RestException(401); - } - - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } - - if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - foreach ($request_data as $field => $value) { - if ($field == 'id') continue; - $this->category->$field = $value; - } - - if ($this->category->update(DolibarrApiAccess::$user) > 0) - { - return $this->get($id); - } - else - { - throw new RestException(500, $this->category->error); - } - } - - /** - * Delete category - * - * @param int $id Category ID - * @return array - */ - public function delete($id) - { - if (!DolibarrApiAccess::$user->rights->categorie->supprimer) { - throw new RestException(401); - } - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } - - if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - if (!$this->category->delete(DolibarrApiAccess::$user)) { - throw new RestException(401, 'error when delete category'); - } - - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Category deleted' - ) - ); - } - - /** - * List categories of an object - * - * Get the list of categories linked to an object - * - * @param int $id Object ID - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @return array Array of category objects - * - * @throws RestException - * - * @url GET /object/{type}/{id} - */ - public function getListForObject($id, $type, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) - { - if (!in_array($type, [ - Categorie::TYPE_PRODUCT, - Categorie::TYPE_CONTACT, - Categorie::TYPE_CUSTOMER, - Categorie::TYPE_SUPPLIER, - Categorie::TYPE_MEMBER - ])) { - throw new RestException(401); - } - - if ($type == Categorie::TYPE_PRODUCT && !(DolibarrApiAccess::$user->rights->produit->lire || DolibarrApiAccess::$user->rights->service->lire)) { - throw new RestException(401); - } elseif ($type == Categorie::TYPE_CONTACT && !DolibarrApiAccess::$user->rights->contact->lire) { - throw new RestException(401); - } elseif ($type == Categorie::TYPE_CUSTOMER && !DolibarrApiAccess::$user->rights->societe->lire) { - throw new RestException(401); - } elseif ($type == Categorie::TYPE_SUPPLIER && !DolibarrApiAccess::$user->rights->fournisseur->lire) { - throw new RestException(401); - } elseif ($type == Categorie::TYPE_MEMBER && !DolibarrApiAccess::$user->rights->adherent->lire) { - throw new RestException(401); - } - - $categories = $this->category->getListForItem($id, $type, $sortfield, $sortorder, $limit, $page); - - if (!is_array($categories)) { - if ($categories == 0) { - throw new RestException(404, 'No category found for this object'); - } - throw new RestException(500, 'Error when fetching object categories', array_merge(array($this->category->error), $this->category->errors)); - } - return $categories; - } - - /** - * Link an object to a category by id - * - * @param int $id ID of category - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') - * @param int $object_id ID of object - * - * @return array - * @throws RestException - * - * @url POST {id}/objects/{type}/{object_id} - */ - public function linkObjectById($id, $type, $object_id) - { - if (empty($type) || empty($object_id)) { - throw new RestException(401); - } - - if (!DolibarrApiAccess::$user->rights->categorie->lire) { - throw new RestException(401); - } - - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } - - if ($type === Categorie::TYPE_PRODUCT) { - if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { - throw new RestException(401); - } - $object = new Product($this->db); - } elseif ($type === Categorie::TYPE_CUSTOMER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_SUPPLIER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_CONTACT) { - if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { - throw new RestException(401); - } - $object = new Contact($this->db); - } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { - throw new RestException(401); - } - $object = new Adherent($this->db); - } else { - throw new RestException(401, "this type is not recognized yet."); - } - - if (!empty($object)) { - $result = $object->fetch($object_id); - if ($result > 0) { - $result = $this->category->add_type($object, $type); - if ($result < 0) { - if ($this->category->error != 'DB_ERROR_RECORD_ALREADY_EXISTS') { - throw new RestException(500, 'Error when linking object', array_merge(array($this->category->error), $this->category->errors)); - } - } - } else { - throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); - } - - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Objects succefully linked to the category' - ) - ); - } - - throw new RestException(401); - } - - /** - * Link an object to a category by ref - * - * @param int $id ID of category - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') - * @param string $object_ref Reference of object - * - * @return array - * @throws RestException - * - * @url POST {id}/objects/{type}/ref/{object_ref} - */ - public function linkObjectByRef($id, $type, $object_ref) - { - if (empty($type) || empty($object_ref)) { - throw new RestException(401); - } - - if (!DolibarrApiAccess::$user->rights->categorie->lire) { - throw new RestException(401); - } - - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } - - if ($type === Categorie::TYPE_PRODUCT) { - if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { - throw new RestException(401); - } - $object = new Product($this->db); - } elseif ($type === Categorie::TYPE_CUSTOMER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_SUPPLIER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_CONTACT) { - if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { - throw new RestException(401); - } - $object = new Contact($this->db); - } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { - throw new RestException(401); - } - $object = new Adherent($this->db); - } else { - throw new RestException(401, "this type is not recognized yet."); - } - - if (!empty($object)) { - $result = $object->fetch('', $object_ref); - if ($result > 0) { - $result = $this->category->add_type($object, $type); - if ($result < 0) { - if ($this->category->error != 'DB_ERROR_RECORD_ALREADY_EXISTS') { - throw new RestException(500, 'Error when linking object', array_merge(array($this->category->error), $this->category->errors)); - } - } - } else { - throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); - } - - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Objects succefully linked to the category' - ) - ); - } - - throw new RestException(401); - } - - /** - * Unlink an object from a category by id - * - * @param int $id ID of category - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') - * @param int $object_id ID of the object - * - * @return array - * @throws RestException - * - * @url DELETE {id}/objects/{type}/{object_id} - */ - public function unlinkObjectById($id, $type, $object_id) - { - if (empty($type) || empty($object_id)) { - throw new RestException(401); - } - - if (!DolibarrApiAccess::$user->rights->categorie->lire) { - throw new RestException(401); - } - - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } - - if ($type === Categorie::TYPE_PRODUCT) { - if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { - throw new RestException(401); - } - $object = new Product($this->db); - } elseif ($type === Categorie::TYPE_CUSTOMER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_SUPPLIER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_CONTACT) { - if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { - throw new RestException(401); - } - $object = new Contact($this->db); - } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { - throw new RestException(401); - } - $object = new Adherent($this->db); - } else { - throw new RestException(401, "this type is not recognized yet."); - } - - if (!empty($object)) { - $result = $object->fetch((int) $object_id); - if ($result > 0) { - $result = $this->category->del_type($object, $type); - if ($result < 0) { - throw new RestException(500, 'Error when unlinking object', array_merge(array($this->category->error), $this->category->errors)); - } - } else { - throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); - } - - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Objects succefully unlinked from the category' - ) - ); - } - - throw new RestException(401); - } - - /** - * Unlink an object from a category by ref - * - * @param int $id ID of category - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') - * @param string $object_ref Reference of the object - * - * @return array - * @throws RestException - * - * @url DELETE {id}/objects/{type}/ref/{object_ref} - */ - public function unlinkObjectByRef($id, $type, $object_ref) - { - if (empty($type) || empty($object_ref)) { - throw new RestException(401); - } - - if (!DolibarrApiAccess::$user->rights->categorie->lire) { - throw new RestException(401); - } - - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } - - if ($type === Categorie::TYPE_PRODUCT) { - if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { - throw new RestException(401); - } - $object = new Product($this->db); - } elseif ($type === Categorie::TYPE_CUSTOMER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_SUPPLIER) { - if (!DolibarrApiAccess::$user->rights->societe->creer) { - throw new RestException(401); - } - $object = new Societe($this->db); - } elseif ($type === Categorie::TYPE_CONTACT) { - if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { - throw new RestException(401); - } - $object = new Contact($this->db); - } elseif ($type === Categorie::TYPE_MEMBER) { - if (!DolibarrApiAccess::$user->rights->adherent->creer) { - throw new RestException(401); - } - $object = new Adherent($this->db); - } else { - throw new RestException(401, "this type is not recognized yet."); - } - - if (!empty($object)) { - $result = $object->fetch('', (string) $object_ref); - if ($result > 0) { - $result = $this->category->del_type($object, $type); - if ($result < 0) { - throw new RestException(500, 'Error when unlinking object', array_merge(array($this->category->error), $this->category->errors)); - } - } else { - throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); - } - - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Objects succefully unlinked from the category' - ) - ); - } - - throw new RestException(401); - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore - /** - * Clean sensible object datas - * - * @param Categorie $object Object to clean - * @return array Array of cleaned object properties - */ - protected function _cleanObjectDatas($object) - { - // phpcs:enable - $object = parent::_cleanObjectDatas($object); - - // Remove fields not relevent to categories - unset($object->country); - unset($object->country_id); - unset($object->country_code); - unset($object->total_ht); - unset($object->total_ht); - unset($object->total_localtax1); - unset($object->total_localtax2); - unset($object->total_ttc); - unset($object->total_tva); - unset($object->lines); - unset($object->fk_incoterms); - unset($object->label_incoterms); - unset($object->location_incoterms); - unset($object->civility_id); - unset($object->name); - unset($object->lastname); - unset($object->firstname); - unset($object->shipping_method_id); - unset($object->fk_delivery_address); - unset($object->cond_reglement); - unset($object->cond_reglement_id); - unset($object->mode_reglement_id); - unset($object->barcode_type_coder); - unset($object->barcode_type_label); - unset($object->barcode_type_code); - unset($object->barcode_type); - unset($object->canvas); - unset($object->cats); - unset($object->motherof); - unset($object->context); - unset($object->socid); - unset($object->thirdparty); - unset($object->contact); - unset($object->contact_id); - unset($object->user); - unset($object->fk_account); - unset($object->fk_project); - unset($object->note); - unset($object->statut); - - return $object; - } - - /** - * Validate fields before create or update object - * - * @param array|null $data Data to validate - * @return array - * - * @throws RestException - */ - private function _validate($data) - { - $category = array(); - foreach (Categories::$FIELDS as $field) { - if (!isset($data[$field])) - throw new RestException(400, "$field field missing"); - $category[$field] = $data[$field]; - } - return $category; - } - - /** - * Get the list of objects in a category. - * - * @param int $id ID of category - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') - * @param int $onlyids Return only ids of objects (consume less memory) - * - * @return mixed - * - * @url GET {id}/objects - */ - public function getObjects($id, $type, $onlyids = 0) - { + /** + * @var array $FIELDS Mandatory fields, checked when create and update object + */ + static $FIELDS = array( + 'label', + 'type' + ); + + static $TYPES = array( + 0 => 'product', + 1 => 'supplier', + 2 => 'customer', + 3 => 'member', + 4 => 'contact', + 5 => 'account', + 6 => 'project', + //7 => 'user', + //8 => 'bank_line', + //9 => 'warehouse', + //10 => 'actioncomm', + ); + + /** + * @var Categorie $category {@type Categorie} + */ + public $category; + + /** + * Constructor + */ + public function __construct() + { + global $db, $conf; + $this->db = $db; + $this->category = new Categorie($this->db); + } + + /** + * Get properties of a category object + * + * Return an array with category informations + * + * @param int $id ID of category + * @param bool $include_childs Include child categories list (true or false) + * @return array|mixed data without useless information + * + * @throws RestException + */ + public function get($id, $include_childs = false) + { + if (!DolibarrApiAccess::$user->rights->categorie->lire) { + throw new RestException(401); + } + + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } + + if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + if ($include_childs) { + $cats = $this->category->get_filles(); + if (!is_array($cats)) { + throw new RestException(500, 'Error when fetching child categories', array_merge(array($this->category->error), $this->category->errors)); + } + $this->category->childs = []; + foreach ($cats as $cat) { + $this->category->childs[] = $this->_cleanObjectDatas($cat); + } + } + + return $this->_cleanObjectDatas($this->category); + } + + /** + * List categories + * + * Get a list of categories + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @return array Array of category objects + * + * @throws RestException + */ + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $type = '', $sqlfilters = '') + { + global $db, $conf; + + $obj_ret = array(); + + if (!DolibarrApiAccess::$user->rights->categorie->lire) { + throw new RestException(401); + } + + $sql = "SELECT t.rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."categorie as t"; + $sql .= ' WHERE t.entity IN ('.getEntity('category').')'; + if (!empty($type)) + { + $sql .= ' AND t.type='.array_search($type, Categories::$TYPES); + } + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + $sql .= $this->db->order($sortfield, $sortorder); + if ($limit) { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit + 1, $offset); + } + + $result = $this->db->query($sql); + if ($result) + { + $i = 0; + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + while ($i < $min) + { + $obj = $this->db->fetch_object($result); + $category_static = new Categorie($this->db); + if ($category_static->fetch($obj->rowid)) { + $obj_ret[] = $this->_cleanObjectDatas($category_static); + } + $i++; + } + } + else { + throw new RestException(503, 'Error when retrieve category list : '.$this->db->lasterror()); + } + if (!count($obj_ret)) { + throw new RestException(404, 'No category found'); + } + return $obj_ret; + } + + /** + * Create category object + * + * @param array $request_data Request data + * @return int ID of category + */ + public function post($request_data = null) + { + if (!DolibarrApiAccess::$user->rights->categorie->creer) { + throw new RestException(401); + } + + // Check mandatory fields + $result = $this->_validate($request_data); + + foreach ($request_data as $field => $value) { + $this->category->$field = $value; + } + if ($this->category->create(DolibarrApiAccess::$user) < 0) { + throw new RestException(500, 'Error when creating category', array_merge(array($this->category->error), $this->category->errors)); + } + return $this->category->id; + } + + /** + * Update category + * + * @param int $id Id of category to update + * @param array $request_data Datas + * @return int + */ + public function put($id, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->categorie->creer) { + throw new RestException(401); + } + + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } + + if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + foreach ($request_data as $field => $value) { + if ($field == 'id') continue; + $this->category->$field = $value; + } + + if ($this->category->update(DolibarrApiAccess::$user) > 0) { + return $this->get($id); + } else { + throw new RestException(500, $this->category->error); + } + } + + /** + * Delete category + * + * @param int $id Category ID + * @return array + */ + public function delete($id) + { + if (!DolibarrApiAccess::$user->rights->categorie->supprimer) { + throw new RestException(401); + } + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } + + if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + if (!$this->category->delete(DolibarrApiAccess::$user)) { + throw new RestException(401, 'error when delete category'); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Category deleted' + ) + ); + } + + /** + * List categories of an object + * + * Get the list of categories linked to an object + * + * @param int $id Object ID + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project') + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @return array Array of category objects + * + * @throws RestException + * + * @url GET /object/{type}/{id} + */ + public function getListForObject($id, $type, $sortfield = "s.rowid", $sortorder = 'ASC', $limit = 0, $page = 0) + { + if (!in_array($type, [ + Categorie::TYPE_PRODUCT, + Categorie::TYPE_CONTACT, + Categorie::TYPE_CUSTOMER, + Categorie::TYPE_SUPPLIER, + Categorie::TYPE_MEMBER, + Categorie::TYPE_PROJECT + ])) { + throw new RestException(401); + } + + if ($type == Categorie::TYPE_PRODUCT && !(DolibarrApiAccess::$user->rights->produit->lire || DolibarrApiAccess::$user->rights->service->lire)) { + throw new RestException(401); + } elseif ($type == Categorie::TYPE_CONTACT && !DolibarrApiAccess::$user->rights->contact->lire) { + throw new RestException(401); + } elseif ($type == Categorie::TYPE_CUSTOMER && !DolibarrApiAccess::$user->rights->societe->lire) { + throw new RestException(401); + } elseif ($type == Categorie::TYPE_SUPPLIER && !DolibarrApiAccess::$user->rights->fournisseur->lire) { + throw new RestException(401); + } elseif ($type == Categorie::TYPE_MEMBER && !DolibarrApiAccess::$user->rights->adherent->lire) { + throw new RestException(401); + } elseif ($type == Categorie::TYPE_PROJECT && !DolibarrApiAccess::$user->rights->projet->lire) { + throw new RestException(401); + } + + $categories = $this->category->getListForItem($id, $type, $sortfield, $sortorder, $limit, $page); + + if (!is_array($categories)) { + if ($categories == 0) { + throw new RestException(404, 'No category found for this object'); + } + throw new RestException(600, 'Error when fetching object categories', array_merge(array($this->category->error), $this->category->errors)); + } + return $categories; + } + + /** + * Link an object to a category by id + * + * @param int $id ID of category + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') + * @param int $object_id ID of object + * + * @return array + * @throws RestException + * + * @url POST {id}/objects/{type}/{object_id} + */ + public function linkObjectById($id, $type, $object_id) + { + if (empty($type) || empty($object_id)) { + throw new RestException(401); + } + + if (!DolibarrApiAccess::$user->rights->categorie->lire) { + throw new RestException(401); + } + + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } + + if ($type === Categorie::TYPE_PRODUCT) { + if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { + throw new RestException(401); + } + $object = new Product($this->db); + } elseif ($type === Categorie::TYPE_CUSTOMER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_SUPPLIER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_CONTACT) { + if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { + throw new RestException(401); + } + $object = new Contact($this->db); + } elseif ($type === Categorie::TYPE_MEMBER) { + if (!DolibarrApiAccess::$user->rights->adherent->creer) { + throw new RestException(401); + } + $object = new Adherent($this->db); + } else { + throw new RestException(401, "this type is not recognized yet."); + } + + if (!empty($object)) { + $result = $object->fetch($object_id); + if ($result > 0) { + $result = $this->category->add_type($object, $type); + if ($result < 0) { + if ($this->category->error != 'DB_ERROR_RECORD_ALREADY_EXISTS') { + throw new RestException(500, 'Error when linking object', array_merge(array($this->category->error), $this->category->errors)); + } + } + } else { + throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Objects succefully linked to the category' + ) + ); + } + + throw new RestException(401); + } + + /** + * Link an object to a category by ref + * + * @param int $id ID of category + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') + * @param string $object_ref Reference of object + * + * @return array + * @throws RestException + * + * @url POST {id}/objects/{type}/ref/{object_ref} + */ + public function linkObjectByRef($id, $type, $object_ref) + { + if (empty($type) || empty($object_ref)) { + throw new RestException(401); + } + + if (!DolibarrApiAccess::$user->rights->categorie->lire) { + throw new RestException(401); + } + + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } + + if ($type === Categorie::TYPE_PRODUCT) { + if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { + throw new RestException(401); + } + $object = new Product($this->db); + } elseif ($type === Categorie::TYPE_CUSTOMER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_SUPPLIER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_CONTACT) { + if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { + throw new RestException(401); + } + $object = new Contact($this->db); + } elseif ($type === Categorie::TYPE_MEMBER) { + if (!DolibarrApiAccess::$user->rights->adherent->creer) { + throw new RestException(401); + } + $object = new Adherent($this->db); + } else { + throw new RestException(401, "this type is not recognized yet."); + } + + if (!empty($object)) { + $result = $object->fetch('', $object_ref); + if ($result > 0) { + $result = $this->category->add_type($object, $type); + if ($result < 0) { + if ($this->category->error != 'DB_ERROR_RECORD_ALREADY_EXISTS') { + throw new RestException(500, 'Error when linking object', array_merge(array($this->category->error), $this->category->errors)); + } + } + } else { + throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Objects succefully linked to the category' + ) + ); + } + + throw new RestException(401); + } + + /** + * Unlink an object from a category by id + * + * @param int $id ID of category + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') + * @param int $object_id ID of the object + * + * @return array + * @throws RestException + * + * @url DELETE {id}/objects/{type}/{object_id} + */ + public function unlinkObjectById($id, $type, $object_id) + { + if (empty($type) || empty($object_id)) { + throw new RestException(401); + } + + if (!DolibarrApiAccess::$user->rights->categorie->lire) { + throw new RestException(401); + } + + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } + + if ($type === Categorie::TYPE_PRODUCT) { + if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { + throw new RestException(401); + } + $object = new Product($this->db); + } elseif ($type === Categorie::TYPE_CUSTOMER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_SUPPLIER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_CONTACT) { + if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { + throw new RestException(401); + } + $object = new Contact($this->db); + } elseif ($type === Categorie::TYPE_MEMBER) { + if (!DolibarrApiAccess::$user->rights->adherent->creer) { + throw new RestException(401); + } + $object = new Adherent($this->db); + } else { + throw new RestException(401, "this type is not recognized yet."); + } + + if (!empty($object)) { + $result = $object->fetch((int) $object_id); + if ($result > 0) { + $result = $this->category->del_type($object, $type); + if ($result < 0) { + throw new RestException(500, 'Error when unlinking object', array_merge(array($this->category->error), $this->category->errors)); + } + } else { + throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Objects succefully unlinked from the category' + ) + ); + } + + throw new RestException(401); + } + + /** + * Unlink an object from a category by ref + * + * @param int $id ID of category + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact') + * @param string $object_ref Reference of the object + * + * @return array + * @throws RestException + * + * @url DELETE {id}/objects/{type}/ref/{object_ref} + */ + public function unlinkObjectByRef($id, $type, $object_ref) + { + if (empty($type) || empty($object_ref)) { + throw new RestException(401); + } + + if (!DolibarrApiAccess::$user->rights->categorie->lire) { + throw new RestException(401); + } + + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } + + if ($type === Categorie::TYPE_PRODUCT) { + if (!(DolibarrApiAccess::$user->rights->produit->creer || DolibarrApiAccess::$user->rights->service->creer)) { + throw new RestException(401); + } + $object = new Product($this->db); + } elseif ($type === Categorie::TYPE_CUSTOMER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_SUPPLIER) { + if (!DolibarrApiAccess::$user->rights->societe->creer) { + throw new RestException(401); + } + $object = new Societe($this->db); + } elseif ($type === Categorie::TYPE_CONTACT) { + if (!DolibarrApiAccess::$user->rights->societe->contact->creer) { + throw new RestException(401); + } + $object = new Contact($this->db); + } elseif ($type === Categorie::TYPE_MEMBER) { + if (!DolibarrApiAccess::$user->rights->adherent->creer) { + throw new RestException(401); + } + $object = new Adherent($this->db); + } else { + throw new RestException(401, "this type is not recognized yet."); + } + + if (!empty($object)) { + $result = $object->fetch('', (string) $object_ref); + if ($result > 0) { + $result = $this->category->del_type($object, $type); + if ($result < 0) { + throw new RestException(500, 'Error when unlinking object', array_merge(array($this->category->error), $this->category->errors)); + } + } else { + throw new RestException(500, 'Error when fetching object', array_merge(array($object->error), $object->errors)); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Objects succefully unlinked from the category' + ) + ); + } + + throw new RestException(401); + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Clean sensible object datas + * + * @param Categorie $object Object to clean + * @return array Array of cleaned object properties + */ + protected function _cleanObjectDatas($object) + { + // phpcs:enable + $object = parent::_cleanObjectDatas($object); + + // Remove fields not relevent to categories + unset($object->country); + unset($object->country_id); + unset($object->country_code); + unset($object->total_ht); + unset($object->total_ht); + unset($object->total_localtax1); + unset($object->total_localtax2); + unset($object->total_ttc); + unset($object->total_tva); + unset($object->lines); + unset($object->fk_incoterms); + unset($object->label_incoterms); + unset($object->location_incoterms); + unset($object->civility_id); + unset($object->name); + unset($object->lastname); + unset($object->firstname); + unset($object->shipping_method_id); + unset($object->fk_delivery_address); + unset($object->cond_reglement); + unset($object->cond_reglement_id); + unset($object->mode_reglement_id); + unset($object->barcode_type_coder); + unset($object->barcode_type_label); + unset($object->barcode_type_code); + unset($object->barcode_type); + unset($object->canvas); + unset($object->cats); + unset($object->motherof); + unset($object->context); + unset($object->socid); + unset($object->thirdparty); + unset($object->contact); + unset($object->contact_id); + unset($object->user); + unset($object->fk_account); + unset($object->fk_project); + unset($object->note); + unset($object->statut); + + return $object; + } + + /** + * Validate fields before create or update object + * + * @param array|null $data Data to validate + * @return array + * + * @throws RestException + */ + private function _validate($data) + { + $category = array(); + foreach (Categories::$FIELDS as $field) { + if (!isset($data[$field])) + throw new RestException(400, "$field field missing"); + $category[$field] = $data[$field]; + } + return $category; + } + + /** + * Get the list of objects in a category. + * + * @param int $id ID of category + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact', 'project') + * @param int $onlyids Return only ids of objects (consume less memory) + * + * @return mixed + * + * @url GET {id}/objects + */ + public function getObjects($id, $type, $onlyids = 0) + { dol_syslog("getObjects($id, $type, $onlyids)", LOG_DEBUG); if (!DolibarrApiAccess::$user->rights->categorie->lire) { throw new RestException(401); } - if (empty($type)) - { + if (empty($type)) + { throw new RestException(500, 'The "type" parameter is required.'); - } + } - $result = $this->category->fetch($id); - if (!$result) { - throw new RestException(404, 'category not found'); - } + $result = $this->category->fetch($id); + if (!$result) { + throw new RestException(404, 'category not found'); + } if (!DolibarrApi::_checkAccessToResource('categorie', $this->category->id)) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); @@ -766,8 +768,8 @@ class Categories extends DolibarrApi } $objects = $result; - $cleaned_objects = array(); - if ($type == 'member') { + $cleaned_objects = array(); + if ($type == 'member') { $objects_api = new Members(); } elseif ($type == 'customer' || $type == 'supplier') { $objects_api = new Thirdparties(); @@ -775,14 +777,15 @@ class Categories extends DolibarrApi $objects_api = new Products(); } elseif ($type == 'contact') { $objects_api = new Contacts(); + } elseif ($type == 'project') { + $objects_api = new Projects(); } - if (is_object($objects_api)) - { - foreach ($objects as $obj) { - $cleaned_objects[] = $objects_api->_cleanObjectDatas($obj); - } + if (is_object($objects_api)) { + foreach ($objects as $obj) { + $cleaned_objects[] = $objects_api->_cleanObjectDatas($obj); + } } return $cleaned_objects; - } + } } diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 2dceee2831c..1bc9f47ded4 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -52,10 +52,10 @@ class Categorie extends CommonObject const TYPE_USER = 'user'; const TYPE_PROJECT = 'project'; const TYPE_ACCOUNT = 'bank_account'; - const TYPE_BANK_LINE = 'bank_line'; - const TYPE_WAREHOUSE = 'warehouse'; - const TYPE_ACTIONCOMM = 'actioncomm'; - const TYPE_WEBSITE_PAGE = 'website_page'; + const TYPE_BANK_LINE = 'bank_line'; + const TYPE_WAREHOUSE = 'warehouse'; + const TYPE_ACTIONCOMM = 'actioncomm'; + const TYPE_WEBSITE_PAGE = 'website_page'; /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png @@ -73,15 +73,15 @@ class Categorie extends CommonObject 'member' => 3, 'contact' => 4, 'bank_account' => 5, - 'project' => 6, + 'project' => 6, 'user' => 7, 'bank_line' => 8, 'warehouse' => 9, - 'actioncomm' => 10, + 'actioncomm' => 10, 'website_page' => 11 ); - /** + /** * @var array Code mapping from ID * * @note This array should be removed in future, once previous constants are moved to the string value. Deprecated @@ -97,7 +97,7 @@ class Categorie extends CommonObject 7 => 'user', 8 => 'bank_line', 9 => 'warehouse', - 10 => 'actioncomm', + 10 => 'actioncomm', ); /** @@ -109,10 +109,10 @@ class Categorie extends CommonObject 'customer' => 'soc', 'supplier' => 'soc', 'contact' => 'socpeople', - 'bank_account' => 'account', - ); + 'bank_account' => 'account', + ); - /** + /** * @var array Category tables mapping from type string (llx_categorie_...) when value does not match * * @note Move to const array when PHP 5.6 will be our minimum target @@ -120,10 +120,10 @@ class Categorie extends CommonObject protected $MAP_CAT_TABLE = array( 'customer' => 'societe', 'supplier' => 'fournisseur', - 'bank_account'=> 'account', + 'bank_account'=> 'account', ); - /** + /** * @var array Object class mapping from type string * * @note Move to const array when PHP 5.6 will be our minimum target @@ -137,33 +137,33 @@ class Categorie extends CommonObject 'user' => 'User', 'account' => 'Account', // old for bank account 'bank_account' => 'Account', - 'project' => 'Project', - 'warehouse'=> 'Entrepot', - 'actioncomm' => 'ActionComm', + 'project' => 'Project', + 'warehouse'=> 'Entrepot', + 'actioncomm' => 'ActionComm', 'website_page' => 'WebsitePage' ); - /** - * @var array Title Area mapping from type string - * - * @note Move to const array when PHP 5.6 will be our minimum target - */ - public static $MAP_TYPE_TITLE_AREA = array( - 'product' => 'ProductsCategoriesArea', - 'customer' => 'CustomersCategoriesArea', - 'supplier' => 'SuppliersCategoriesArea', - 'member' => 'MembersCategoriesArea', - 'contact' => 'ContactsCategoriesArea', - 'user' => 'UsersCategoriesArea', - 'account' => 'AccountsCategoriesArea', // old for bank account - 'bank_account' => 'AccountsCategoriesArea', - 'project' => 'ProjectsCategoriesArea', - 'warehouse'=> 'StocksCategoriesArea', - 'actioncomm' => 'ActioncommCategoriesArea', - 'website_page' => 'WebsitePageCategoriesArea' - ); + /** + * @var array Title Area mapping from type string + * + * @note Move to const array when PHP 5.6 will be our minimum target + */ + public static $MAP_TYPE_TITLE_AREA = array( + 'product' => 'ProductsCategoriesArea', + 'customer' => 'CustomersCategoriesArea', + 'supplier' => 'SuppliersCategoriesArea', + 'member' => 'MembersCategoriesArea', + 'contact' => 'ContactsCategoriesArea', + 'user' => 'UsersCategoriesArea', + 'account' => 'AccountsCategoriesArea', // old for bank account + 'bank_account' => 'AccountsCategoriesArea', + 'project' => 'ProjectsCategoriesArea', + 'warehouse'=> 'StocksCategoriesArea', + 'actioncomm' => 'ActioncommCategoriesArea', + 'website_page' => 'WebsitePageCategoriesArea' + ); - /** + /** * @var array Object table mapping from type string (table llx_...) when value of key does not match table name. * * @note Move to const array when PHP 5.6 will be our minimum target @@ -175,7 +175,7 @@ class Categorie extends CommonObject 'contact' => 'socpeople', 'account' => 'bank_account', // old for bank account 'project' => 'projet', - 'warehouse'=> 'entrepot' + 'warehouse'=> 'entrepot' ); /** @@ -189,13 +189,13 @@ class Categorie extends CommonObject public $table_element = 'categorie'; /** - * @var int ID - */ + * @var int ID + */ public $fk_parent; /** - * @var string Category label - */ + * @var string Category label + */ public $label; /** @@ -225,8 +225,8 @@ class Categorie extends CommonObject * @see Categorie::TYPE_USER * @see Categorie::TYPE_PROJECT * @see Categorie::TYPE_BANK_LINE - * @see Categorie::TYPE_WAREHOUSE - * @see Categorie::TYPE_ACTIONCOMM + * @see Categorie::TYPE_WAREHOUSE + * @see Categorie::TYPE_ACTIONCOMM */ public $type; @@ -235,7 +235,7 @@ class Categorie extends CommonObject */ public $cats = array(); - /** + /** * @var array Mother of table */ public $motherof = array(); @@ -315,13 +315,10 @@ class Categorie extends CommonObject if ($id > 0) { $sql .= " WHERE rowid = ".$id; - } - elseif (!empty($ref_ext)) + } elseif (!empty($ref_ext)) { $sql .= " WHERE ref_ext LIKE '".$this->db->escape($ref_ext)."'"; - } - else - { + } else { $sql .= " WHERE label = '".$this->db->escape($label)."' AND entity IN (".getEntity('category').")"; if (!is_null($type)) $sql .= " AND type = ".$this->db->escape($type); } @@ -360,14 +357,10 @@ class Categorie extends CommonObject if (!empty($conf->global->MAIN_MULTILANGS)) $this->getMultiLangs(); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -471,31 +464,25 @@ class Categorie extends CommonObject if (!$error) { - // Call trigger - $result = $this->call_trigger('CATEGORY_CREATE', $user); - if ($result < 0) { $error++; } - // End call triggers + // Call trigger + $result = $this->call_trigger('CATEGORY_CREATE', $user); + if ($result < 0) { $error++; } + // End call triggers } - if (!$error) - { - $this->db->commit(); - return $id; - } - else - { - $this->db->rollback(); - return -3; - } - } - else - { + if (!$error) + { + $this->db->commit(); + return $id; + } else { + $this->db->rollback(); + return -3; + } + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -563,18 +550,16 @@ class Categorie extends CommonObject if (!$error) { - // Call trigger - $result = $this->call_trigger('CATEGORY_MODIFY', $user); - if ($result < 0) { $error++; $this->db->rollback(); return -1; } - // End call triggers + // Call trigger + $result = $this->call_trigger('CATEGORY_MODIFY', $user); + if ($result < 0) { $error++; $this->db->rollback(); return -1; } + // End call triggers } $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_print_error($this->db); return -1; @@ -585,7 +570,7 @@ class Categorie extends CommonObject * Delete a category from database * * @param User $user Object user that ask to delete - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 KO >0 OK */ public function delete($user, $notrigger = 0) @@ -594,7 +579,7 @@ class Categorie extends CommonObject $error = 0; - // Clean parameters + // Clean parameters $this->fk_parent = ($this->fk_parent != "" ? intval($this->fk_parent) : 0); dol_syslog(get_class($this)."::remove"); @@ -603,10 +588,10 @@ class Categorie extends CommonObject if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('CATEGORY_DELETE', $user); - if ($result < 0) $error++; - // End call triggers + // Call trigger + $result = $this->call_trigger('CATEGORY_DELETE', $user); + if ($result < 0) $error++; + // End call triggers } /* FIX #1317 : Check for child category and move up 1 level*/ @@ -623,26 +608,26 @@ class Categorie extends CommonObject } } - $arraydelete = array( - 'categorie_societe' => 'fk_categorie', - 'categorie_fournisseur' => 'fk_categorie', - 'categorie_product' => 'fk_categorie', - 'categorie_member' => 'fk_categorie', - 'categorie_contact' => 'fk_categorie', - 'categorie_account' => 'fk_categorie', - 'bank_class' => 'fk_categ', - 'categorie_lang' => 'fk_category', - 'categorie' => 'rowid', - ); - foreach ($arraydelete as $key => $value) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX.$key; - $sql .= " WHERE ".$value." = ".$this->id; - if (!$this->db->query($sql)) { - $this->errors[] = $this->db->lasterror(); - dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); - $error++; - } - } + $arraydelete = array( + 'categorie_societe' => 'fk_categorie', + 'categorie_fournisseur' => 'fk_categorie', + 'categorie_product' => 'fk_categorie', + 'categorie_member' => 'fk_categorie', + 'categorie_contact' => 'fk_categorie', + 'categorie_account' => 'fk_categorie', + 'bank_class' => 'fk_categ', + 'categorie_lang' => 'fk_category', + 'categorie' => 'rowid', + ); + foreach ($arraydelete as $key => $value) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX.$key; + $sql .= " WHERE ".$value." = ".$this->id; + if (!$this->db->query($sql)) { + $this->errors[] = $this->db->lasterror(); + dol_syslog("Error sql=".$sql." ".$this->error, LOG_ERR); + $error++; + } + } // Removed extrafields if (!$error) @@ -659,34 +644,34 @@ class Categorie extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Link an object to the category * * @param CommonObject $obj Object to link to category - * @param string $type Type of category ('product', ...) + * @param string $type Type of category ('product', ...). Use '' to take $obj->element. * @return int 1 : OK, -1 : erreur SQL, -2 : id not defined, -3 : Already linked */ - public function add_type($obj, $type) + public function add_type($obj, $type = '') { - // phpcs:enable + // phpcs:enable global $user, $langs, $conf; $error = 0; if ($this->id == -1) return -2; - $this->db->begin(); + if (empty($type)) $type = $obj->element; - $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type]); + $this->db->begin(); + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type]); $sql .= " (fk_categorie, fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type]).")"; $sql .= " VALUES (".$this->id.", ".$obj->id.")"; @@ -704,7 +689,7 @@ class Categorie extends CommonObject { if ($this->db->num_rows($resql) > 0) { - $objparent = $this->db->fetch_object($resql); + $objparent = $this->db->fetch_object($resql); if (!empty($objparent->fk_parent)) { @@ -720,56 +705,48 @@ class Categorie extends CommonObject } } } - } - else - { + } else { $error++; $this->error = $this->db->lasterror(); } if ($error) { - $this->db->rollback(); + $this->db->rollback(); return -1; } } - // Call trigger + // Call trigger $this->context = array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger $result = $this->call_trigger('CATEGORY_LINK', $user); - if ($result < 0) { $error++; } - // End call triggers + if ($result < 0) { $error++; } + // End call triggers if (!$error) { - $this->db->commit(); - return 1; + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -2; } - else - { - $this->db->rollback(); - return -2; - } - } - else - { - $this->db->rollback(); + } else { + $this->db->rollback(); if ($this->db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error = $this->db->lasterrno(); return -3; - } - else - { + } else { $this->error = $this->db->lasterror(); } return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete object from category * @@ -780,7 +757,7 @@ class Categorie extends CommonObject */ public function del_type($obj, $type) { - // phpcs:enable + // phpcs:enable global $user, $langs, $conf; $error = 0; @@ -794,35 +771,31 @@ class Categorie extends CommonObject dol_syslog(get_class($this)."::del_type(): type 'fournisseur' is deprecated, please use 'supplier' instead", LOG_WARNING); } - $this->db->begin(); + $this->db->begin(); - $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type]); + $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type]); $sql .= " WHERE fk_categorie = ".$this->id; $sql .= " AND fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = ".$obj->id; dol_syslog(get_class($this).'::del_type', LOG_DEBUG); if ($this->db->query($sql)) { - // Call trigger + // Call trigger $this->context = array('unlinkoff'=>$obj); // Save object we want to link category to into category instance to provide information to trigger $result = $this->call_trigger('CATEGORY_UNLINK', $user); - if ($result < 0) { $error++; } - // End call triggers + if ($result < 0) { $error++; } + // End call triggers if (!$error) { - $this->db->commit(); - return 1; + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -2; } - else - { - $this->db->rollback(); - return -2; - } - } - else - { - $this->db->rollback(); + } else { + $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; } @@ -869,24 +842,19 @@ class Categorie extends CommonObject { while ($rec = $this->db->fetch_array($resql)) { - if ($onlyids) - { - $objs[] = $rec['fk_'.(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])]; - } - else - { - $classnameforobj = $this->MAP_OBJ_CLASS[$type]; + if ($onlyids) { + $objs[] = $rec['fk_'.(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])]; + } else { + $classnameforobj = $this->MAP_OBJ_CLASS[$type]; - $obj = new $classnameforobj($this->db); - $obj->fetch($rec['fk_'.(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])]); + $obj = new $classnameforobj($this->db); + $obj->fetch($rec['fk_'.(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])]); - $objs[] = $obj; - } + $objs[] = $obj; + } } return $objs; - } - else - { + } else { $this->error = $this->db->error().' sql='.$sql; return -1; } @@ -1011,8 +979,7 @@ class Categorie extends CommonObject } $i++; } - } - else { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1023,7 +990,7 @@ class Categorie extends CommonObject return $categories; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return direct childs id of a category into an array * @@ -1031,7 +998,7 @@ class Categorie extends CommonObject */ public function get_filles() { - // phpcs:enable + // phpcs:enable $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; $sql .= " WHERE fk_parent = ".$this->id; $sql .= " AND entity IN (".getEntity('category').")"; @@ -1047,15 +1014,13 @@ class Categorie extends CommonObject $cats[] = $cat; } return $cats; - } - else - { + } else { dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the array this->motherof that is array(id_son=>id_parent, ...) * @@ -1063,8 +1028,8 @@ class Categorie extends CommonObject */ protected function load_motherof() { - // phpcs:enable - $this->motherof = array(); + // phpcs:enable + $this->motherof = array(); // Load array[child]=parent $sql = "SELECT fk_parent as id_parent, rowid as id_son"; @@ -1081,15 +1046,13 @@ class Categorie extends CommonObject $this->motherof[$obj->id_son] = $obj->id_parent; } return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Rebuilding the category tree as an array * Return an array of table('id','id_mere',...) trie selon arbre et avec: @@ -1102,17 +1065,17 @@ class Categorie extends CommonObject * * @param string $type Type of categories ('customer', 'supplier', 'contact', 'product', 'member', ...) * @param int|string|array $markafterid Keep only or removed all categories including the leaf $markafterid in category tree (exclude) or Keep only of category is inside the leaf starting with this id. - * $markafterid can be an : - * - int (id of category) - * - string (categories ids separated by comma) - * - array (list of categories ids) - * @param int $include [=0] Removed or 1=Keep only + * $markafterid can be an : + * - int (id of category) + * - string (categories ids separated by comma) + * - array (list of categories ids) + * @param int $include [=0] Removed or 1=Keep only * @return array|int Array of categories. this->cats and this->motherof are set, -1 on error */ public function get_full_arbo($type, $markafterid = 0, $include = 0) { - // phpcs:enable - global $conf, $langs; + // phpcs:enable + global $conf, $langs; if (!is_numeric($type)) $type = $this->MAP_ID[$type]; if (is_null($type)) { @@ -1120,27 +1083,23 @@ class Categorie extends CommonObject return -1; } - if (is_string($markafterid)) - { - $markafterid = explode(',', $markafterid); - } - elseif (is_numeric($markafterid)) - { - if ($markafterid > 0) - { - $markafterid = array($markafterid); - } - else - { - $markafterid = array(); - } - } - elseif (!is_array($markafterid)) - { - $markafterid = array(); - } + if (is_string($markafterid)) + { + $markafterid = explode(',', $markafterid); + } elseif (is_numeric($markafterid)) + { + if ($markafterid > 0) + { + $markafterid = array($markafterid); + } else { + $markafterid = array(); + } + } elseif (!is_array($markafterid)) + { + $markafterid = array(); + } - $this->cats = array(); + $this->cats = array(); // Init this->motherof that is array(id_son=>id_parent, ...) $this->load_motherof(); @@ -1171,9 +1130,7 @@ class Categorie extends CommonObject $this->cats[$obj->rowid]['ref_ext'] = $obj->ref_ext; $i++; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1186,27 +1143,27 @@ class Categorie extends CommonObject $this->build_path_from_id_categ($key, 0); // Process a branch from the root category key (this category has no parent) } - // Include or exclude leaf including $markafterid from tree - if (count($markafterid) > 0) - { - $keyfiltercatid = '('.implode('|', $markafterid).')'; + // Include or exclude leaf including $markafterid from tree + if (count($markafterid) > 0) + { + $keyfiltercatid = '('.implode('|', $markafterid).')'; - //print "Look to discard category ".$markafterid."\n"; - $keyfilter1 = '^'.$keyfiltercatid.'$'; - $keyfilter2 = '_'.$keyfiltercatid.'$'; - $keyfilter3 = '^'.$keyfiltercatid.'_'; - $keyfilter4 = '_'.$keyfiltercatid.'_'; - foreach ($this->cats as $key => $val) - { - $test = (preg_match('/'.$keyfilter1.'/', $val['fullpath']) || preg_match('/'.$keyfilter2.'/', $val['fullpath']) - || preg_match('/'.$keyfilter3.'/', $val['fullpath']) || preg_match('/'.$keyfilter4.'/', $val['fullpath'])); + //print "Look to discard category ".$markafterid."\n"; + $keyfilter1 = '^'.$keyfiltercatid.'$'; + $keyfilter2 = '_'.$keyfiltercatid.'$'; + $keyfilter3 = '^'.$keyfiltercatid.'_'; + $keyfilter4 = '_'.$keyfiltercatid.'_'; + foreach ($this->cats as $key => $val) + { + $test = (preg_match('/'.$keyfilter1.'/', $val['fullpath']) || preg_match('/'.$keyfilter2.'/', $val['fullpath']) + || preg_match('/'.$keyfilter3.'/', $val['fullpath']) || preg_match('/'.$keyfilter4.'/', $val['fullpath'])); - if (($test && !$include) || (!$test && $include)) - { - unset($this->cats[$key]); - } - } - } + if (($test && !$include) || (!$test && $include)) + { + unset($this->cats[$key]); + } + } + } dol_syslog(get_class($this)."::get_full_arbo dol_sort_array", LOG_DEBUG); $this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', true, false); @@ -1216,7 +1173,7 @@ class Categorie extends CommonObject return $this->cats; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * For category id_categ and its childs available in this->cats, define property fullpath and fulllabel. * It is called by get_full_arbo() @@ -1227,10 +1184,10 @@ class Categorie extends CommonObject * @return void * @see get_full_arbo() */ - public function build_path_from_id_categ($id_categ, $protection = 1000) - { - // phpcs:enable - dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); + public function build_path_from_id_categ($id_categ, $protection = 1000) + { + // phpcs:enable + dol_syslog(get_class($this)."::build_path_from_id_categ id_categ=".$id_categ." protection=".$protection, LOG_DEBUG); if (!empty($this->cats[$id_categ]['fullpath'])) { @@ -1258,12 +1215,13 @@ class Categorie extends CommonObject //print 'Result for id_categ='.$id_categ.' : '.$this->cats[$id_categ]['fullpath'].'
    '."\n"; // We count number of _ to have level - $this->cats[$id_categ]['level'] = dol_strlen(preg_replace('/[^_]/i', '', $this->cats[$id_categ]['fullpath'])); + $nbunderscore = substr_count($this->cats[$id_categ]['fullpath'], '_'); + $this->cats[$id_categ]['level'] = ($nbunderscore ? $nbunderscore : null); - return; - } + return; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Display content of $this->cats * @@ -1271,7 +1229,7 @@ class Categorie extends CommonObject */ public function debug_cats() { - // phpcs:enable + // phpcs:enable // Display $this->cats foreach ($this->cats as $key => $val) { @@ -1286,7 +1244,7 @@ class Categorie extends CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns all categories * @@ -1296,7 +1254,7 @@ class Categorie extends CommonObject */ public function get_all_categories($type = null, $parent = false) { - // phpcs:enable + // phpcs:enable if (!is_numeric($type)) $type = $this->MAP_ID[$type]; $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; @@ -1317,9 +1275,7 @@ class Categorie extends CommonObject $cats[$rec['rowid']] = $cat; } return $cats; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1334,11 +1290,11 @@ class Categorie extends CommonObject */ public function get_main_categories($type = null) { - // phpcs:enable - return $this->get_all_categories($type, true); + // phpcs:enable + return $this->get_all_categories($type, true); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Check if no category with same label already exists for this cat's parent or root and for this cat's type * @@ -1346,7 +1302,7 @@ class Categorie extends CommonObject */ public function already_exists() { - // phpcs:enable + // phpcs:enable $type = $this->type; if (!is_numeric($type)) $type = $this->MAP_ID[$type]; @@ -1381,29 +1337,27 @@ class Categorie extends CommonObject } dol_syslog(get_class($this)."::already_exists no category with same name=".$this->label." and same parent ".$this->fk_parent." than category id=".$this->id, LOG_DEBUG); return 0; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns the path of the category, with the names of the categories * separated by $sep (" >> " by default) * * @param string $sep Separator - * @param string $url Url + * @param string $url Url ('', 'none' or 'urltouse') * @param int $nocolor 0 * @param string $addpicto Add picto into link * @return array */ public function print_all_ways($sep = ' >> ', $url = '', $nocolor = 0, $addpicto = 0) { - // phpcs:enable + // phpcs:enable $ways = array(); $allways = $this->get_all_ways(); // Load array of categories @@ -1414,31 +1368,32 @@ class Categorie extends CommonObject $forced_color = ''; foreach ($way as $cat) { - $i++; + $i++; - if (empty($nocolor)) - { - $forced_color = 'toreplace'; - if ($i == count($way)) - { - // Check contrast with background and correct text color - $forced_color = 'categtextwhite'; - if ($cat->color) - { - if (colorIsLight($cat->color)) $forced_color = 'categtextblack'; - } - } - } - - if ($url == '') + if (empty($nocolor)) { - $link = ''; - $linkend = ''; - $w[] = $link.($addpicto ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend; + $forced_color = 'toreplace'; + if ($i == count($way)) + { + // Check contrast with background and correct text color + $forced_color = 'categtextwhite'; + if ($cat->color) + { + if (colorIsLight($cat->color)) $forced_color = 'categtextblack'; + } + } } - else - { - $w[] = "".($addpicto ? img_object('', 'category') : '').$cat->label.""; + + if ($url == '') { + $link = ''; + $linkend = ''; + $w[] = $link.($addpicto ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend; + } elseif ($url == 'none') { + $link = ''; + $linkend = ''; + $w[] = $link.($addpicto ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend; + } else { + $w[] = ''.($addpicto ? img_object('', 'category') : '').$cat->label.''; } } $newcategwithpath = preg_replace('/toreplace/', $forced_color, implode($sep, $w)); @@ -1450,7 +1405,7 @@ class Categorie extends CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns an array containing the list of parent categories * @@ -1458,7 +1413,7 @@ class Categorie extends CommonObject */ public function get_meres() { - // phpcs:enable + // phpcs:enable $parents = array(); $sql = "SELECT fk_parent FROM ".MAIN_DB_PREFIX."categorie"; @@ -1478,15 +1433,13 @@ class Categorie extends CommonObject } } return $parents; - } - else - { + } else { dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns in a table all possible paths to get to the category * starting with the major categories represented by Tables of categories @@ -1495,7 +1448,7 @@ class Categorie extends CommonObject */ public function get_all_ways() { - // phpcs:enable + // phpcs:enable $ways = array(); $parents = $this->get_meres(); @@ -1537,66 +1490,60 @@ class Categorie extends CommonObject if ($type === Categorie::TYPE_BANK_LINE) // TODO Remove this with standard category code { - // Load bank groups - $sql = "SELECT c.label, c.rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."bank_class as a, ".MAIN_DB_PREFIX."bank_categ as c"; - $sql .= " WHERE a.lineid=".$id." AND a.fk_categ = c.rowid"; - $sql .= " ORDER BY c.label"; + // Load bank groups + $sql = "SELECT c.label, c.rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."bank_class as a, ".MAIN_DB_PREFIX."bank_categ as c"; + $sql .= " WHERE a.lineid=".$id." AND a.fk_categ = c.rowid"; + $sql .= " ORDER BY c.label"; - $res = $this->db->query($sql); - if ($res) - { - while ($obj = $this->db->fetch_object($res)) - { - if ($mode == 'id') { - $cats[] = $obj->rowid; - } elseif ($mode == 'label') { - $cats[] = $obj->label; - } else { - $cat = new Categorie($this->db); - $cat->id = $obj->rowid; - $cat->label = $obj->label; - $cats[] = $cat; - } - } - } - else - { - dol_print_error($this->db); - return -1; - } + $res = $this->db->query($sql); + if ($res) + { + while ($obj = $this->db->fetch_object($res)) + { + if ($mode == 'id') { + $cats[] = $obj->rowid; + } elseif ($mode == 'label') { + $cats[] = $obj->label; + } else { + $cat = new Categorie($this->db); + $cat->id = $obj->rowid; + $cat->label = $obj->label; + $cats[] = $cat; + } + } + } else { + dol_print_error($this->db); + return -1; + } + } else { + $sql = "SELECT ct.fk_categorie, c.label, c.rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type])." as ct, ".MAIN_DB_PREFIX."categorie as c"; + $sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = ".(int) $id." AND c.type = ".$this->MAP_ID[$type]; + $sql .= " AND c.entity IN (".getEntity('category').")"; + + $res = $this->db->query($sql); + if ($res) + { + while ($obj = $this->db->fetch_object($res)) + { + if ($mode == 'id') { + $cats[] = $obj->rowid; + } elseif ($mode == 'label') { + $cats[] = $obj->label; + } else { + $cat = new Categorie($this->db); + $cat->fetch($obj->fk_categorie); + $cats[] = $cat; + } + } + } else { + dol_print_error($this->db); + return -1; + } } - else - { - $sql = "SELECT ct.fk_categorie, c.label, c.rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."categorie_".(empty($this->MAP_CAT_TABLE[$type]) ? $type : $this->MAP_CAT_TABLE[$type])." as ct, ".MAIN_DB_PREFIX."categorie as c"; - $sql .= " WHERE ct.fk_categorie = c.rowid AND ct.fk_".(empty($this->MAP_CAT_FK[$type]) ? $type : $this->MAP_CAT_FK[$type])." = ".(int) $id." AND c.type = ".$this->MAP_ID[$type]; - $sql .= " AND c.entity IN (".getEntity('category').")"; - $res = $this->db->query($sql); - if ($res) - { - while ($obj = $this->db->fetch_object($res)) - { - if ($mode == 'id') { - $cats[] = $obj->rowid; - } elseif ($mode == 'label') { - $cats[] = $obj->label; - } else { - $cat = new Categorie($this->db); - $cat->fetch($obj->fk_categorie); - $cats[] = $cat; - } - } - } - else - { - dol_print_error($this->db); - return -1; - } - } - - return $cats; + return $cats; } @@ -1606,7 +1553,7 @@ class Categorie extends CommonObject * * @param int $id Id * @param string $nom Name - * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode (0, 1, 2, ...) is deprecated. + * @param string $type Type of category ('member', 'customer', 'supplier', 'product', 'contact'). Old mode (0, 1, 2, ...) is deprecated. * @param boolean $exact Exact string search (true/false) * @param boolean $case Case sensitive (true/false) * @return Categorie[]|int Array of Categorie, -1 if error @@ -1620,15 +1567,15 @@ class Categorie extends CommonObject $cats = array(); - // For backward compatibility - if (is_numeric($type)) { - // We want to reverse lookup - $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", LOG_WARNING); - } + // For backward compatibility + if (is_numeric($type)) { + // We want to reverse lookup + $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", LOG_WARNING); + } - // Generation requete recherche + // Generation requete recherche $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."categorie"; $sql .= " WHERE type = ".$this->MAP_ID[$type]; $sql .= " AND entity IN (".getEntity('category').")"; @@ -1638,8 +1585,7 @@ class Categorie extends CommonObject $nom = '%'.str_replace('*', '%', $nom).'%'; if (!$case) $sql .= " AND label LIKE '".$this->db->escape($nom)."'"; - else - $sql .= " AND label LIKE BINARY '".$this->db->escape($nom)."'"; + else $sql .= " AND label LIKE BINARY '".$this->db->escape($nom)."'"; } if ($id) { @@ -1657,9 +1603,7 @@ class Categorie extends CommonObject } return $cats; - } - else - { + } else { $this->error = $this->db->error().' sql='.$sql; return -1; } @@ -1672,9 +1616,10 @@ class Categorie extends CommonObject * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto * @param string $option Sur quoi pointe le lien ('', 'xyz') * @param int $maxlength Max length of text + * @param string $moreparam More param on URL link * @return string Chaine avec URL */ - public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0) + public function getNomUrl($withpicto = 0, $option = '', $maxlength = 0, $moreparam = '') { global $langs; @@ -1688,20 +1633,20 @@ class Categorie extends CommonObject if (colorIsLight($this->color)) $forced_color = 'categtextblack'; } - $link = ''; + $link = ''; $linkend = ''; $picto = 'category'; - if ($withpicto) $result .= ($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); + if ($withpicto) $result .= ($link.img_object($label, $picto, 'class="classfortooltip"').$linkend); if ($withpicto && $withpicto != 2) $result .= ' '; if ($withpicto != 2) $result .= $link.dol_trunc(($this->ref ? $this->ref : $this->label), $maxlength).$linkend; return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Deplace fichier uploade sous le nom $files dans le repertoire sdir * @@ -1711,7 +1656,7 @@ class Categorie extends CommonObject */ public function add_photo($sdir, $file) { - // phpcs:enable + // phpcs:enable require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $dir = $sdir.'/'.get_exdir($this->id, 2, 0, 0, $this, 'category').$this->id."/"; @@ -1751,7 +1696,7 @@ class Categorie extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return tableau de toutes les photos de la categorie * @@ -1761,7 +1706,7 @@ class Categorie extends CommonObject */ public function liste_photos($dir, $nbmax = 0) { - // phpcs:enable + // phpcs:enable include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $nbphoto = 0; @@ -1772,43 +1717,43 @@ class Categorie extends CommonObject if (file_exists($dir)) { $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (dol_is_file($dir.$file) && preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i', $dir.$file)) - { - $nbphoto++; - $photo = $file; + if (is_resource($handle)) + { + while (($file = readdir($handle)) !== false) + { + if (dol_is_file($dir.$file) && preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i', $dir.$file)) + { + $nbphoto++; + $photo = $file; - // On determine nom du fichier vignette - $photo_vignette = ''; - if (preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i', $photo, $regs)) - { - $photo_vignette = preg_replace('/'.$regs[0].'/i', '', $photo).'_small'.$regs[0]; - } + // On determine nom du fichier vignette + $photo_vignette = ''; + if (preg_match('/(\.jpeg|\.jpg|\.bmp|\.gif|\.png|\.tiff)$/i', $photo, $regs)) + { + $photo_vignette = preg_replace('/'.$regs[0].'/i', '', $photo).'_small'.$regs[0]; + } - // Objet - $obj = array(); - $obj['photo'] = $photo; - if ($photo_vignette && is_file($dirthumb.$photo_vignette)) $obj['photo_vignette'] = 'thumbs/'.$photo_vignette; - else $obj['photo_vignette'] = ""; + // Objet + $obj = array(); + $obj['photo'] = $photo; + if ($photo_vignette && is_file($dirthumb.$photo_vignette)) $obj['photo_vignette'] = 'thumbs/'.$photo_vignette; + else $obj['photo_vignette'] = ""; - $tabobj[$nbphoto - 1] = $obj; + $tabobj[$nbphoto - 1] = $obj; - // On continue ou on arrete de boucler - if ($nbmax && $nbphoto >= $nbmax) break; - } - } + // On continue ou on arrete de boucler + if ($nbmax && $nbphoto >= $nbmax) break; + } + } - closedir($handle); - } + closedir($handle); + } } return $tabobj; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Efface la photo de la categorie et sa vignette * @@ -1817,10 +1762,10 @@ class Categorie extends CommonObject */ public function delete_photo($file) { - // phpcs:enable - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + // phpcs:enable + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine + $dir = dirname($file).'/'; // Chemin du dossier contenant l'image d'origine $dirthumb = $dir.'/thumbs/'; // Chemin du dossier contenant la vignette $filename = preg_replace('/'.preg_quote($dir, '/').'/i', '', $file); // Nom du fichier @@ -1838,7 +1783,7 @@ class Categorie extends CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load size of image file * @@ -1847,7 +1792,7 @@ class Categorie extends CommonObject */ public function get_image_size($file) { - // phpcs:enable + // phpcs:enable $infoImg = getimagesize($file); // Recuperation des infos de l'image $this->imgWidth = $infoImg[0]; // Largeur de l'image $this->imgHeight = $infoImg[1]; // Hauteur de l'image @@ -1862,68 +1807,63 @@ class Categorie extends CommonObject */ public function setMultiLangs($user) { - global $langs; + global $langs; - $langs_available = $langs->get_available_languages(); - $current_lang = $langs->getDefaultLang(); + $langs_available = $langs->get_available_languages(); + $current_lang = $langs->getDefaultLang(); - foreach ($langs_available as $key => $value) - { - $sql = "SELECT rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."categorie_lang"; - $sql .= " WHERE fk_category=".$this->id; - $sql .= " AND lang='".$key."'"; + foreach ($langs_available as $key => $value) + { + $sql = "SELECT rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."categorie_lang"; + $sql .= " WHERE fk_category=".$this->id; + $sql .= " AND lang='".$key."'"; - $result = $this->db->query($sql); + $result = $this->db->query($sql); - if ($key == $current_lang) - { - if ($this->db->num_rows($result)) // si aucune ligne dans la base - { - $sql2 = "UPDATE ".MAIN_DB_PREFIX."categorie_lang"; - $sql2 .= " SET label='".$this->db->escape($this->label)."',"; - $sql2 .= " description='".$this->db->escape($this->description)."'"; - $sql2 .= " WHERE fk_category=".$this->id." AND lang='".$this->db->escape($key)."'"; - } - else - { - $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."categorie_lang (fk_category, lang, label, description)"; - $sql2 .= " VALUES(".$this->id.",'".$key."','".$this->db->escape($this->label); - $sql2 .= "','".$this->db->escape($this->multilangs["$key"]["description"])."')"; - } - dol_syslog(get_class($this).'::setMultiLangs', LOG_DEBUG); - if (!$this->db->query($sql2)) - { - $this->error = $this->db->lasterror(); - return -1; - } - } - elseif (isset($this->multilangs["$key"])) - { - if ($this->db->num_rows($result)) // si aucune ligne dans la base - { - $sql2 = "UPDATE ".MAIN_DB_PREFIX."categorie_lang"; - $sql2 .= " SET label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; - $sql2 .= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'"; - $sql2 .= " WHERE fk_category=".$this->id." AND lang='".$this->db->escape($key)."'"; - } - else - { - $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."categorie_lang (fk_category, lang, label, description)"; - $sql2 .= " VALUES(".$this->id.",'".$key."','".$this->db->escape($this->multilangs["$key"]["label"]); - $sql2 .= "','".$this->db->escape($this->multilangs["$key"]["description"])."')"; - } + if ($key == $current_lang) + { + if ($this->db->num_rows($result)) // si aucune ligne dans la base + { + $sql2 = "UPDATE ".MAIN_DB_PREFIX."categorie_lang"; + $sql2 .= " SET label='".$this->db->escape($this->label)."',"; + $sql2 .= " description='".$this->db->escape($this->description)."'"; + $sql2 .= " WHERE fk_category=".$this->id." AND lang='".$this->db->escape($key)."'"; + } else { + $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."categorie_lang (fk_category, lang, label, description)"; + $sql2 .= " VALUES(".$this->id.",'".$key."','".$this->db->escape($this->label); + $sql2 .= "','".$this->db->escape($this->multilangs["$key"]["description"])."')"; + } + dol_syslog(get_class($this).'::setMultiLangs', LOG_DEBUG); + if (!$this->db->query($sql2)) + { + $this->error = $this->db->lasterror(); + return -1; + } + } elseif (isset($this->multilangs["$key"])) + { + if ($this->db->num_rows($result)) // si aucune ligne dans la base + { + $sql2 = "UPDATE ".MAIN_DB_PREFIX."categorie_lang"; + $sql2 .= " SET label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; + $sql2 .= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'"; + $sql2 .= " WHERE fk_category=".$this->id." AND lang='".$this->db->escape($key)."'"; + } else { + $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."categorie_lang (fk_category, lang, label, description)"; + $sql2 .= " VALUES(".$this->id.",'".$key."','".$this->db->escape($this->multilangs["$key"]["label"]); + $sql2 .= "','".$this->db->escape($this->multilangs["$key"]["description"])."')"; + } - // on ne sauvegarde pas des champs vides - if ($this->multilangs["$key"]["label"] || $this->multilangs["$key"]["description"] || $this->multilangs["$key"]["note"]) - dol_syslog(get_class($this).'::setMultiLangs', LOG_DEBUG); - if (!$this->db->query($sql2)) - { - $this->error = $this->db->lasterror(); - return -1; - } - } - } + // on ne sauvegarde pas des champs vides + if ($this->multilangs["$key"]["label"] || $this->multilangs["$key"]["description"] || $this->multilangs["$key"]["note"]) + dol_syslog(get_class($this).'::setMultiLangs', LOG_DEBUG); + if (!$this->db->query($sql2)) + { + $this->error = $this->db->lasterror(); + return -1; + } + } + } // Call trigger $result = $this->call_trigger('CATEGORY_SET_MULTILANGS', $user); @@ -1933,7 +1873,7 @@ class Categorie extends CommonObject } // End call triggers - return 1; + return 1; } /** @@ -1943,35 +1883,33 @@ class Categorie extends CommonObject */ public function getMultiLangs() { - global $langs; + global $langs; - $current_lang = $langs->getDefaultLang(); + $current_lang = $langs->getDefaultLang(); - $sql = "SELECT lang, label, description"; - $sql .= " FROM ".MAIN_DB_PREFIX."categorie_lang"; - $sql .= " WHERE fk_category=".$this->id; + $sql = "SELECT lang, label, description"; + $sql .= " FROM ".MAIN_DB_PREFIX."categorie_lang"; + $sql .= " WHERE fk_category=".$this->id; - $result = $this->db->query($sql); - if ($result) - { - while ($obj = $this->db->fetch_object($result)) - { - //print 'lang='.$obj->lang.' current='.$current_lang.'
    '; - if ($obj->lang == $current_lang) // si on a les traduct. dans la langue courante on les charge en infos principales. - { - $this->label = $obj->label; - $this->description = $obj->description; - } - $this->multilangs["$obj->lang"]["label"] = $obj->label; - $this->multilangs["$obj->lang"]["description"] = $obj->description; - } - return 1; - } - else - { - $this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql; - return -1; - } + $result = $this->db->query($sql); + if ($result) + { + while ($obj = $this->db->fetch_object($result)) + { + //print 'lang='.$obj->lang.' current='.$current_lang.'
    '; + if ($obj->lang == $current_lang) // si on a les traduct. dans la langue courante on les charge en infos principales. + { + $this->label = $obj->label; + $this->description = $obj->description; + } + $this->multilangs["$obj->lang"]["label"] = $obj->label; + $this->multilangs["$obj->lang"]["description"] = $obj->description; + } + return 1; + } else { + $this->error = $langs->trans("Error")." : ".$this->db->error()." - ".$sql; + return -1; + } } /** @@ -1982,47 +1920,47 @@ class Categorie extends CommonObject */ public function getLibStatut($mode) { - return ''; + return ''; } - /** - * Initialise an instance with random values. - * Used to build previews or test instances. - * id must be 0 if object instance is a specimen. - * - * @return void - */ - public function initAsSpecimen() - { - dol_syslog(get_class($this)."::initAsSpecimen"); + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @return void + */ + public function initAsSpecimen() + { + dol_syslog(get_class($this)."::initAsSpecimen"); - // Initialise parametres - $this->id = 0; - $this->fk_parent = 0; - $this->label = 'SPECIMEN'; - $this->specimen = 1; - $this->description = 'This is a description'; - $this->socid = 1; - $this->type = self::TYPE_PRODUCT; - } + // Initialise parametres + $this->id = 0; + $this->fk_parent = 0; + $this->label = 'SPECIMEN'; + $this->specimen = 1; + $this->description = 'This is a description'; + $this->socid = 1; + $this->type = self::TYPE_PRODUCT; + } - /** - * Function used to replace a thirdparty id with another one. - * - * @param DoliDB $db Database handler - * @param int $origin_id Old thirdparty id - * @param int $dest_id New thirdparty id - * @return bool - */ - public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) - { - $tables = array( - 'categorie_societe' - ); + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old thirdparty id + * @param int $dest_id New thirdparty id + * @return bool + */ + public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) + { + $tables = array( + 'categorie_societe' + ); - return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables, 1); - } + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables, 1); + } /** * Return the addtional SQL JOIN query for filtering a list by a category @@ -2060,8 +1998,7 @@ class Categorie extends CommonObject if (intval($searchCategory) == -2) { $searchCategorySqlList[] = " cp.fk_categorie IS NULL"; - } - elseif (intval($searchCategory) > 0) + } elseif (intval($searchCategory) > 0) { $searchCategorySqlList[] = " ".$rowIdName ." IN (SELECT fk_".$type." FROM ".MAIN_DB_PREFIX."categorie_".$type @@ -2072,10 +2009,29 @@ class Categorie extends CommonObject if (!empty($searchCategorySqlList)) { return " AND (".implode(' AND ', $searchCategorySqlList).")"; - } - else - { + } else { return ""; } } + + /** + * Count all categories + * + * @return int Number of categories, -1 on error + */ + public function countNbOfCategories() + { + dol_syslog(get_class($this)."::count_all_categories", LOG_DEBUG); + $sql = "SELECT COUNT(rowid) FROM ".MAIN_DB_PREFIX."categorie"; + $sql .= " WHERE entity IN (".getEntity('category').")"; + + $res = $this->db->query($sql); + if ($res) { + $obj = $this->db->fetch_object($res); + return $obj->count; + } else { + dol_print_error($this->db); + return -1; + } + } } diff --git a/htdocs/categories/edit.php b/htdocs/categories/edit.php index 48bd82b9326..7c8c683bf18 100644 --- a/htdocs/categories/edit.php +++ b/htdocs/categories/edit.php @@ -33,16 +33,16 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load("categories"); $id = GETPOST('id', 'int'); -$ref = GETPOST('ref'); -$type = GETPOST('type'); +$ref = GETPOST('ref', 'alphanohtml'); +$type = GETPOST('type', 'alphanohtml'); $action = (GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'edit'); $confirm = GETPOST('confirm'); $cancel = GETPOST('cancel', 'alpha'); $socid = GETPOST('socid', 'int'); -$label = GETPOST('label'); -$description = GETPOST('description'); -$color = GETPOST('color', 'alpha'); +$label = GETPOST('label', 'alphanohtml'); +$description = GETPOST('description', 'restricthtml'); +$color = preg_replace('/[^0-9a-f#]/i', '', GETPOST('color', 'alphanohtml')); $visible = GETPOST('visible'); $parent = GETPOST('parent'); @@ -90,8 +90,7 @@ if ($action == 'update' && $user->rights->categorie->creer) if ($parent != "-1") $object->fk_parent = $parent; - else - $object->fk_parent = ""; + else $object->fk_parent = ""; if (empty($object->label)) @@ -109,14 +108,10 @@ if ($action == 'update' && $user->rights->categorie->creer) { header('Location: '.DOL_URL_ROOT.'/categories/viewcat.php?id='.$object->id.'&type='.$type); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php index db6f5a2eec4..35420759ded 100644 --- a/htdocs/categories/index.php +++ b/htdocs/categories/index.php @@ -39,6 +39,7 @@ if (!$user->rights->categorie->lire) accessforbidden(); $id = GETPOST('id', 'int'); $type = (GETPOST('type', 'aZ09') ? GETPOST('type', 'aZ09') : Categorie::TYPE_PRODUCT); $catname = GETPOST('catname', 'alpha'); +$nosearch = GETPOST('nosearch', 'int'); $categstatic = new Categorie($db); if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backward compatibility @@ -50,83 +51,85 @@ if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backwar $form = new Form($db); +$moreparam = ($nosearch ? '&nosearch=1' : ''); + $typetext = $type; if ($type == Categorie::TYPE_ACCOUNT) $title = $langs->trans('AccountsCategoriesArea'); elseif ($type == Categorie::TYPE_WAREHOUSE) $title = $langs->trans('StocksCategoriesArea'); elseif ($type == Categorie::TYPE_ACTIONCOMM) $title = $langs->trans('ActionCommCategoriesArea'); elseif ($type == Categorie::TYPE_WEBSITE_PAGE) $title = $langs->trans('WebsitePagesCategoriesArea'); -else $title = $langs->trans(ucfirst($type).'sCategoriesArea'); +else { + $title = $langs->trans(ucfirst($type).'sCategoriesArea'); +} $arrayofjs = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); $arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); llxHeader('', $title, '', '', 0, 0, $arrayofjs, $arrayofcss); - $newcardbutton = ''; if (!empty($user->rights->categorie->creer)) { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type)); + $newcardbutton .= dolGetButtonTitle($langs->trans('NewCategory'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/categories/card.php?action=create&type='.$type.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam).$moreparam); } print load_fiche_titre($title, $newcardbutton, 'object_category'); -print '
    '; +// Search categories +if (empty($nosearch)) { + print '
    '; -/* - * Zone recherche produit/service - */ -print '
    '; -print ''; -print ''; + print ''; + print ''; + print ''; + print ''; -print '
    trans("Invoice"); ?>numInvoice(); ?>
    trans("TotalHT"); ?>prixTotalHt(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?>
    trans("TotalHT"); ?>amountWithoutTax(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?>
    '.$langs->trans("VAT").''.price(price2num($obj_facturation->montantTva(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
    '.$langs->trans("VAT").''.price(price2num($obj_facturation->amountVat(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
    '.$langs->trans("VAT").''.$langs->trans("NoVAT").'
    trans("TotalTTC"); ?> prixTotalTtc(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?>
    trans("TotalTTC"); ?> amountWithTax(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency); ?>
    trans("PaymentMode"); ?> getSetPaymentMode()) @@ -87,12 +85,12 @@ else if ($obj_facturation->getsetPaymentMode() == 'DIF') { echo ('
    '.$langs->trans("DateDue").''.$obj_facturation->paiementLe().'
    '.$langs->trans("Received").''.price(price2num($obj_facturation->montantEncaisse(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
    '.$langs->trans("Received").''.price(price2num($obj_facturation->amountCollected(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
    '.$langs->trans("Change").''.price(price2num($obj_facturation->montantRendu(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
    '.$langs->trans("Change").''.price(price2num($obj_facturation->amountReturned(), 'MT'), 0, $langs, 0, 0, -1, $conf->currency).'
    '; if ($conf->use_javascript_ajax) { print ajax_constantonoff('CATEGORIE_RECURSIV_ADD'); -} -else -{ +} else { if (empty($conf->global->CATEGORIE_RECURSIV_ADD)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"), 'on').''; } } diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index bd285e5efaf..72151abdcdb 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -39,7 +39,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'categorie'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 67adacb5aae..096a5497efd 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -88,39 +88,35 @@ if ($action == 'add' && $user->rights->categorie->creer) { header("Location: ".$urlfrom); exit; - } - elseif ($idProdOrigin) + } elseif ($backtopage) + { + header("Location: ".$backtopage); + exit; + } elseif ($idProdOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type); exit; - } - elseif ($idCompanyOrigin) + } elseif ($idCompanyOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type); exit; - } - elseif ($idSupplierOrigin) + } elseif ($idSupplierOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type); exit; - } - elseif ($idMemberOrigin) + } elseif ($idMemberOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type); exit; - } - elseif ($idContactOrigin) + } elseif ($idContactOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type); exit; - } - elseif ($idProjectOrigin) + } elseif ($idProjectOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type); exit; - } - else - { + } else { header("Location: ".DOL_URL_ROOT.'/categories/index.php?leftmenu=cat&type='.$type); exit; } @@ -155,9 +151,7 @@ if ($action == 'add' && $user->rights->categorie->creer) { $action = 'confirmed'; $_POST["addcat"] = ''; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -173,38 +167,31 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr { header("Location: ".$urlfrom); exit; - } - elseif ($backtopage) + } elseif ($backtopage) { header("Location: ".$backtopage); exit; - } - elseif ($idProdOrigin) + } elseif ($idProdOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProdOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; - } - elseif ($idCompanyOrigin) + } elseif ($idCompanyOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idCompanyOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; - } - elseif ($idSupplierOrigin) + } elseif ($idSupplierOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idSupplierOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; - } - elseif ($idMemberOrigin) + } elseif ($idMemberOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idMemberOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; - } - elseif ($idContactOrigin) + } elseif ($idContactOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idContactOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; - } - elseif ($idProjectOrigin) + } elseif ($idProjectOrigin) { header("Location: ".DOL_URL_ROOT.'/categories/viewcat.php?id='.$idProjectOrigin.'&type='.$type.'&mesg='.urlencode($langs->trans("CatCreated"))); exit; @@ -252,13 +239,13 @@ if ($user->rights->categorie->creer) // Ref print '
    '.$langs->trans("Ref").''; + print ''.$langs->trans("Ref").''; print'
    '.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('description', $description, '', 200, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_6, '90%'); + $doleditor = new DolEditor('description', $description, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_5, '90%'); $doleditor->Create(); print '
    '; -print ''; -print ''; -print ''; -print ''; -print '
    '.$langs->trans("Search").'
    '; -print $langs->trans("Name").':
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print '
    '.$langs->trans("Search").'
    '; + print $langs->trans("Name").':
    '; -print '
    '; + print '
    '; -/* - * Categories found - */ -if ($catname || $id > 0) -{ - $cats = $categstatic->rechercher($id, $catname, $typetext); - - print ''; - print ''; - - foreach ($cats as $cat) + /* + * Categories found + */ + if ($catname || $id > 0) { - print "\t".''."\n"; - print "\t\t\n"; - print "\t\t\n"; - print "\t\n"; - } - print "
    '.$langs->trans("FoundCats").'
    "; - $categstatic->id = $cat->id; - $categstatic->ref = $cat->label; - $categstatic->label = $cat->label; - $categstatic->type = $cat->type; - $categstatic->color = $cat->color; - print 'color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'; - print $categstatic->getNomUrl(1, ''); - print ''; - print ""; - print dolGetFirstLineOfText($cat->description); - print "
    "; + $cats = $categstatic->rechercher($id, $catname, $typetext); + + print ''; + print ''; + + foreach ($cats as $cat) + { + print "\t".''."\n"; + print "\t\t\n"; + print "\t\t\n"; + print "\t\n"; + } + print "
    '.$langs->trans("FoundCats").'
    "; + $categstatic->id = $cat->id; + $categstatic->ref = $cat->label; + $categstatic->label = $cat->label; + $categstatic->type = $cat->type; + $categstatic->color = $cat->color; + print 'color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'; + print $categstatic->getNomUrl(1, ''); + print ''; + print ""; + print dolGetFirstLineOfText($cat->description); + print "
    "; + } else print ' '; + + print '
    '; } -else print ' '; - - -print '
    '; print '

    '; @@ -155,7 +158,7 @@ foreach ($fulltree as $key => $val) $categstatic->ref = $val['label']; $categstatic->color = $val['color']; $categstatic->type = $type; - $li = $categstatic->getNomUrl(1, '', 60); + $li = $categstatic->getNomUrl(1, '', 60, $moreparam.'&backtolist='.urlencode($_SERVER["PHP_SELF"].'?type='.$type.$moreparam)); $desc = dol_htmlcleanlastbr($val['description']); $counter = ''; @@ -171,7 +174,7 @@ foreach ($fulltree as $key => $val) 'rowid'=>$val['rowid'], 'fk_menu'=>$val['fk_parent'], 'entry'=>''.$counter. - '
    color ? ' style="background: #'.$categstatic->color.';"' : ' style="background: #aaa"').'>'.$li.''.img_view().'
    ' + ''.img_view().'' ); } @@ -193,9 +196,7 @@ if ($nbofentries > 0) print ''; tree_recur($data, $data[0], 0); print ''; -} -else -{ +} else { print ''; print ''; print ''; print "
    '.img_picto_common('', 'treemenu/branchbottom.gif').''; diff --git a/htdocs/categories/photos.php b/htdocs/categories/photos.php index 6b20105f797..866a98fd816 100644 --- a/htdocs/categories/photos.php +++ b/htdocs/categories/photos.php @@ -44,8 +44,8 @@ $confirm = GETPOST('confirm'); if ($id == '' && $label == '') { - dol_print_error('', 'Missing parameter id'); - exit(); + dol_print_error('', 'Missing parameter id'); + exit(); } // Security check @@ -70,34 +70,34 @@ if (is_numeric($type)) $type = Categorie::$MAP_ID_TO_CODE[$type]; // For backwar if (isset($_FILES['userfile']) && $_FILES['userfile']['size'] > 0 && $_POST["sendit"] && !empty($conf->global->MAIN_UPLOAD_DOC)) { - if ($object->id) { - $file = $_FILES['userfile']; - if (is_array($file['name']) && count($file['name']) > 0) - { - foreach ($file['name'] as $i => $name) - { - 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')); - unset($file['name'][$i], $file['type'][$i], $file['tmp_name'][$i], $file['error'][$i], $file['size'][$i]); - } - } - } + if ($object->id) { + $file = $_FILES['userfile']; + if (is_array($file['name']) && count($file['name']) > 0) + { + foreach ($file['name'] as $i => $name) + { + 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')); + unset($file['name'][$i], $file['type'][$i], $file['tmp_name'][$i], $file['error'][$i], $file['size'][$i]); + } + } + } - if (!empty($file['tmp_name'])) { - $object->add_photo($upload_dir, $file); - } - } + if (!empty($file['tmp_name'])) { + $object->add_photo($upload_dir, $file); + } + } } if ($action == 'confirm_delete' && $_GET["file"] && $confirm == 'yes' && $user->rights->categorie->creer) { - $object->delete_photo($upload_dir."/".$_GET["file"]); + $object->delete_photo($upload_dir."/".$_GET["file"]); } if ($action == 'addthumb' && $_GET["file"]) { - $object->addThumbs($upload_dir."/".$_GET["file"]); + $object->addThumbs($upload_dir."/".$_GET["file"]); } @@ -126,7 +126,7 @@ if ($object->id) $ways = $object->print_all_ways(" >> ", '', 1); foreach ($ways as $way) { - $morehtmlref .= $way."
    \n"; + $morehtmlref .= $way."
    \n"; } $morehtmlref .= ''; @@ -137,7 +137,7 @@ if ($object->id) */ if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&type='.$type.'&file='.$_GET["file"], $langs->trans('DeletePicture'), $langs->trans('ConfirmDeletePicture'), 'confirm_delete', '', 0, 1); } print '
    '; @@ -159,7 +159,7 @@ if ($object->id) print '
    \n"; - print '
    '; + print ''; dol_fiche_end(); @@ -179,9 +179,7 @@ if ($object->id) { print ''; print $langs->trans("AddPhoto").''; - } - else - { + } else { print ''; print $langs->trans("AddPhoto").''; } @@ -215,64 +213,62 @@ if ($object->id) if (is_array($listofphoto) && count($listofphoto)) { - print '
    '; - print ''; + print '
    '; + print '
    '; - foreach ($listofphoto as $key => $obj) - { - $nbphoto++; + foreach ($listofphoto as $key => $obj) + { + $nbphoto++; - if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print ''; - if ($nbbyrow) print ''; + if ($nbbyrow) print ''; - if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print ''; - } + // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites + if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight)) + { + print ''.img_picto($langs->trans('GenerateThumb'), 'refresh').'  '; + } + if ($user->rights->categorie->creer) + { + print ''; + print img_delete().''; + } + if ($nbbyrow) print ''; + if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print ''; + } - // Ferme tableau - while ($nbphoto % $nbbyrow) - { - print ''; - $nbphoto++; - } + // Ferme tableau + while ($nbphoto % $nbbyrow) + { + print ''; + $nbphoto++; + } - print '
    '; + if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print '
    '; - print ''; + print ''; - // Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine - if ($obj['photo_vignette']) - { - $filename = $obj['photo_vignette']; - } - else - { - $filename = $obj['photo']; - } + // Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine + if ($obj['photo_vignette']) + { + $filename = $obj['photo_vignette']; + } else { + $filename = $obj['photo']; + } - // Nom affiche - $viewfilename = $obj['photo']; + // Nom affiche + $viewfilename = $obj['photo']; - // Taille de l'image - $object->get_image_size($dir.$filename); - $imgWidth = ($object->imgWidth < $maxWidth) ? $object->imgWidth : $maxWidth; - $imgHeight = ($object->imgHeight < $maxHeight) ? $object->imgHeight : $maxHeight; + // Taille de l'image + $object->get_image_size($dir.$filename); + $imgWidth = ($object->imgWidth < $maxWidth) ? $object->imgWidth : $maxWidth; + $imgHeight = ($object->imgHeight < $maxHeight) ? $object->imgHeight : $maxHeight; - print ''; + print ''; - print ''; - print '
    '.$viewfilename; - print '
    '; + print ''; + print '
    '.$viewfilename; + print '
    '; - // On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites - if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight)) - { - print ''.img_picto($langs->trans('GenerateThumb'), 'refresh').'  '; - } - if ($user->rights->categorie->creer) - { - print ''; - print img_delete().''; - } - if ($nbbyrow) print '
      
    '; + print ''; } if ($nbphoto < 1) @@ -280,10 +276,8 @@ if ($object->id) print '
    '.$langs->trans("NoPhotoYet")."
    "; } } -} -else -{ - print $langs->trans("ErrorUnknown"); +} else { + print $langs->trans("ErrorUnknown"); } // End of page diff --git a/htdocs/categories/traduction.php b/htdocs/categories/traduction.php index b06a24c995f..f4e073c4e1c 100644 --- a/htdocs/categories/traduction.php +++ b/htdocs/categories/traduction.php @@ -37,7 +37,7 @@ $langs->loadLangs(array('categories', 'languages')); $id = GETPOST('id', 'int'); $label = GETPOST('label', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $type = GETPOST('type', 'aZ09'); @@ -83,43 +83,43 @@ $cancel != $langs->trans("Cancel") && $current_lang = $langs->getDefaultLang(); // check parameters - $forcelangprod = GETPOST('forcelangprod', 'alpha'); - $libelle = GETPOST('libelle', 'alpha'); - $desc = GETPOST('desc', 'none'); + $forcelangprod = GETPOST('forcelangprod', 'alpha'); + $libelle = GETPOST('libelle', 'alpha'); + $desc = GETPOST('desc', 'restricthtml'); - if (empty($forcelangprod)) { - $error++; - $object->errors[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Translation')); - } + if (empty($forcelangprod)) { + $error++; + $object->errors[] = $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Translation')); + } - if (!$error) { - if (empty($libelle)) { - $error++; - $object->errors[] = $langs->trans('Language_'.$forcelangprod).' : '.$langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label')); - } + if (!$error) { + if (empty($libelle)) { + $error++; + $object->errors[] = $langs->trans('Language_'.$forcelangprod).' : '.$langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label')); + } - if (!$error) { - // update de l'objet - if ($forcelangprod == $current_lang) { - $object->label = $libelle; - $object->description = dol_htmlcleanlastbr($desc); - } else { - $object->multilangs[$forcelangprod]["label"] = $libelle; - $object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr($desc); - } + if (!$error) { + // update de l'objet + if ($forcelangprod == $current_lang) { + $object->label = $libelle; + $object->description = dol_htmlcleanlastbr($desc); + } else { + $object->multilangs[$forcelangprod]["label"] = $libelle; + $object->multilangs[$forcelangprod]["description"] = dol_htmlcleanlastbr($desc); + } - // sauvegarde en base - $res = $object->setMultiLangs($user); - if ($res < 0) $error++; - } - } + // sauvegarde en base + $res = $object->setMultiLangs($user); + if ($res < 0) $error++; + } + } - if ($error) { - $action = 'add'; - setEventMessages($object->error, $object->errors, 'errors'); - } else { - $action = ''; - } + if ($error) { + $action = 'add'; + setEventMessages($object->error, $object->errors, 'errors'); + } else { + $action = ''; + } } // Validation de l'edition @@ -132,13 +132,13 @@ $cancel != $langs->trans("Cancel") && foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet { - $libelle = GETPOST('libelle-'.$key, 'alpha'); - $desc = GETPOST('desc-'.$key); + $libelle = GETPOST('libelle-'.$key, 'alpha'); + $desc = GETPOST('desc-'.$key); - if (empty($libelle)) { - $error++; - $object->errors[] = $langs->trans('Language_'.$key).' : '.$langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label')); - } + if (empty($libelle)) { + $error++; + $object->errors[] = $langs->trans('Language_'.$key).' : '.$langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label')); + } if ($key == $current_lang) { $object->label = $libelle; @@ -149,17 +149,17 @@ $cancel != $langs->trans("Cancel") && } } - if (!$error) { - $res = $object->setMultiLangs($user); - if ($res < 0) $error++; - } + if (!$error) { + $res = $object->setMultiLangs($user); + if ($res < 0) $error++; + } - if ($error) { - $action = 'edit'; - setEventMessages($object->error, $object->errors, 'errors'); - } else { - $action = ''; - } + if ($error) { + $action = 'edit'; + setEventMessages($object->error, $object->errors, 'errors'); + } else { + $action = ''; + } } @@ -181,10 +181,10 @@ $head = categories_prepare_head($object, $type); $cnt_trans = 0; if (!empty($object->multilangs)) { - foreach ($object->multilangs as $key => $value) - { - $cnt_trans++; - } + foreach ($object->multilangs as $key => $value) + { + $cnt_trans++; + } } dol_fiche_head($head, 'translation', $langs->trans($title), -1, 'category'); @@ -195,7 +195,7 @@ $object->ref = $object->label; $morehtmlref = '
    '.$langs->trans("Root").' >> '; $ways = $object->print_all_ways(" >> ", '', 1); foreach ($ways as $way) { - $morehtmlref .= $way."
    \n"; + $morehtmlref .= $way."
    \n"; } $morehtmlref .= '
    '; @@ -238,11 +238,11 @@ print "\n
    \n"; if ($action == '') { - if ($user->rights->produit->creer || $user->rights->service->creer) - { - print ''.$langs->trans('Add').''; - if ($cnt_trans > 0) print ''.$langs->trans('Update').''; - } + if ($user->rights->produit->creer || $user->rights->service->creer) + { + print ''.$langs->trans('Add').''; + if ($cnt_trans > 0) print ''.$langs->trans('Update').''; + } } print "\n
    \n"; @@ -258,20 +258,20 @@ if ($action == 'edit') print ''; print ''; print ''; - print ''; + print ''; if (!empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { - print "
    ".$langs->trans('Language_'.$key)." :
    "; + print "
    ".$langs->trans('Language_'.$key)." :
    "; print ''; // Label - $libelle = (GETPOST('libelle-'.$key, 'alpha') ? GETPOST('libelle-'.$key, 'alpha') : $object->multilangs[$key]['label']); + $libelle = (GETPOST('libelle-'.$key, 'alpha') ? GETPOST('libelle-'.$key, 'alpha') : $object->multilangs[$key]['label']); print ''; // Desc - $desc = (GETPOST('desc-'.$key) ? GETPOST('desc-'.$key) : $object->multilangs[$key]['description']); + $desc = (GETPOST('desc-'.$key) ? GETPOST('desc-'.$key) : $object->multilangs[$key]['description']); print ''; print "\n"; } - } - else - { + } else { print ''; } print "
    '.$langs->trans('Label').'
    '.$langs->trans('Description').''; $doleditor = new DolEditor("desc-$key", $desc, '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); @@ -291,23 +291,22 @@ if ($action == 'edit') print ''; print ''; -} -elseif ($action != 'add') +} elseif ($action != 'add') { - if ($cnt_trans) print '
    '; + if ($cnt_trans) print '
    '; - if (!empty($object->multilangs)) + if (!empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { - $s = picto_from_langcode($key); + $s = picto_from_langcode($key); print ''; - print ''; + print ''; print ''; print ''; if (!empty($conf->global->CATEGORY_USE_OTHER_FIELD_IN_TRANSLATION)) { - print ''; + print ''; } print '
    '.($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
    '.($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', '').'
    '.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
    '.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
    '.$langs->trans('Other').' ('.$langs->trans("NotUsed").')'.$object->multilangs[$key]["other"].'
    '.$langs->trans('Other').' ('.$langs->trans("NotUsed").')'.$object->multilangs[$key]["other"].'
    '; } @@ -330,16 +329,16 @@ if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; print ''; print ''; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 958b77e42e8..30b706a4b3a 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -47,14 +47,15 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'categorylist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -103,47 +104,40 @@ if ($id > 0 && $removeelem > 0) $tmpobject = new Product($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'product'; - } - elseif ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) + } elseif ($type == Categorie::TYPE_SUPPLIER && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'supplier'; - } - elseif ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) + } elseif ($type == Categorie::TYPE_CUSTOMER && $user->rights->societe->creer) { $tmpobject = new Societe($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'customer'; - } - elseif ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer) + } elseif ($type == Categorie::TYPE_MEMBER && $user->rights->adherent->creer) { require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; $tmpobject = new Adherent($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'member'; - } - elseif ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { + } elseif ($type == Categorie::TYPE_CONTACT && $user->rights->societe->creer) { require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; $tmpobject = new Contact($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'contact'; - } - elseif ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer) + } elseif ($type == Categorie::TYPE_ACCOUNT && $user->rights->banque->configurer) { require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $tmpobject = new Account($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'account'; - } - elseif ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) + } elseif ($type == Categorie::TYPE_PROJECT && $user->rights->projet->creer) { require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $tmpobject = new Project($db); $result = $tmpobject->fetch($removeelem); $elementtype = 'project'; - } - elseif ($type == Categorie::TYPE_USER && $user->rights->user->user->creer) + } elseif ($type == Categorie::TYPE_USER && $user->rights->user->user->creer) { require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $tmpobject = new User($db); @@ -161,9 +155,7 @@ if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confi { header("Location: ".DOL_URL_ROOT.'/categories/index.php?type='.$type); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -180,15 +172,11 @@ if ($type == Categorie::TYPE_PRODUCT && $elemid && $action == 'addintocategory' if ($result >= 0) { setEventMessages($langs->trans("WasAddedSuccessfully", $newobject->ref), null, 'mesgs'); - } - else - { + } else { if ($cat->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("ObjectAlreadyLinkedToCategory"), null, 'warnings'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -278,7 +266,7 @@ if ($user->rights->categorie->creer) if ($user->rights->categorie->supprimer) { - print "".$langs->trans("Delete").""; + print "".$langs->trans("Delete").""; } print ""; @@ -329,16 +317,13 @@ print ''; $cats = $object->get_filles(); if ($cats < 0) { - dol_print_error($db, $cats->error, $cats->errors); -} -elseif (count($cats) < 1) + dol_print_error($db, $object->error, $object->errors); +} elseif (count($cats) < 1) { print ''; print ''; print ''; -} -else -{ +} else { $categstatic = new Categorie($db); $fulltree = $categstatic->get_full_arbo($type, $object->id, 1); @@ -407,9 +392,7 @@ else print ''; print ''; - } - else - { + } else { print ''; print '\n"; } - } - else - { + } else { print ''; } print "
    '.$langs->trans('Translation').''; - print $formadmin->select_language(GETPOST('forcelangprod', 'alpha'), 'forcelangprod', 0, $object->multilangs); + print $formadmin->select_language(GETPOST('forcelangprod', 'alpha'), 'forcelangprod', 0, $object->multilangs); print '
    '.$langs->trans('Label').'
    '.$langs->trans('Description').''; - $doleditor = new DolEditor('desc', GETPOST('desc', 'none'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); + $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); $doleditor->Create(); print '
    '.$langs->trans("NoSubCat").'
    '; print ''; @@ -449,10 +432,8 @@ if ($type == Categorie::TYPE_PRODUCT) $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($prods < 0) { - dol_print_error($db, $prods->error, $prods->errors); - } - else - { + dol_print_error($db, $object->error, $object->errors); + } else { // Form to add record into a category $showclassifyform = 1; if ($showclassifyform) @@ -514,9 +495,7 @@ if ($type == Categorie::TYPE_PRODUCT) print ''; print "\n"; } - } - else - { + } else { print ''; } print "
    '.$langs->trans("ThisCategoryHasNoItems").'
    \n"; @@ -532,10 +511,8 @@ if ($type == Categorie::TYPE_SUPPLIER) $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($socs < 0) { - dol_print_error($db, $socs->error, $socs->errors); - } - else - { + dol_print_error($db, $object->error, $object->errors); + } else { print '
    '; print ''; print ''; @@ -575,9 +552,7 @@ if ($type == Categorie::TYPE_SUPPLIER) print "
    '.$langs->trans("ThisCategoryHasNoItems").'
    \n"; @@ -593,10 +568,8 @@ if ($type == Categorie::TYPE_CUSTOMER) $socs = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($socs < 0) { - dol_print_error($db, $socs->error, $socs->errors); - } - else - { + dol_print_error($db, $object->error, $object->errors); + } else { print ''; print ''; print ''; @@ -635,9 +608,7 @@ if ($type == Categorie::TYPE_CUSTOMER) print '
    '.$langs->trans("ThisCategoryHasNoItems").'
    \n"; @@ -656,10 +627,8 @@ if ($type == Categorie::TYPE_MEMBER) $prods = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($prods < 0) { - dol_print_error($db, $prods->error, $prods->errors); - } - else - { + dol_print_error($db, $object->error, $object->errors); + } else { print ''; print ''; print ''; @@ -700,9 +669,7 @@ if ($type == Categorie::TYPE_MEMBER) } print "\n"; } - } - else - { + } else { print ''.$langs->trans("ThisCategoryHasNoItems").''; } print "\n"; @@ -719,10 +686,8 @@ if ($type == Categorie::TYPE_CONTACT) $contacts = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($contacts < 0) { - dol_print_error($db, $contacts->error, $contacts->errors); - } - else - { + dol_print_error($db, $object->error, $object->errors); + } else { print ''; print ''; print ''; @@ -764,9 +729,7 @@ if ($type == Categorie::TYPE_CONTACT) print ''; print "\n"; } - } - else - { + } else { print ''.$langs->trans("ThisCategoryHasNoItems").''; } print "\n"; @@ -785,10 +748,8 @@ if ($type == Categorie::TYPE_ACCOUNT) $accounts = $object->getObjectsInCateg($type, 0, $limit, $offset); if ($accounts < 0) { - dol_print_error($db, $accounts->error, $accounts->errors); - } - else - { + dol_print_error($db, $object->error, $object->errors); + } else { print ''; print ''; print ''; @@ -828,9 +789,7 @@ if ($type == Categorie::TYPE_ACCOUNT) } print "\n"; } - } - else - { + } else { print ''.$langs->trans("ThisCategoryHasNoItems").''; } print "\n"; @@ -850,9 +809,7 @@ if ($type == Categorie::TYPE_PROJECT) if ($objects < 0) { dol_print_error($db, $object->error, $object->errors); - } - else - { + } else { print ''; print ''; print ''; @@ -893,9 +850,7 @@ if ($type == Categorie::TYPE_PROJECT) } print "\n"; } - } - else - { + } else { print ''.$langs->trans("ThisCategoryHasNoItems").''; } print "\n"; @@ -913,9 +868,7 @@ if ($type == Categorie::TYPE_USER) if ($users < 0) { dol_print_error($db, $object->error, $object->errors); - } - else - { + } else { print ''; print ''; print ''; @@ -924,12 +877,14 @@ if ($type == Categorie::TYPE_USER) print ''; print '
    '; - $param = '&limit='.$limit.'&id='.$id.'&type='.$type; $num = count($objects); $nbtotalofrecords = ''; $newcardbutton = ''; - print_barre_liste($langs->trans("Users"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'user', 0, $newcardbutton, '', $limit); + $param = '&limit='.$limit.'&id='.$id.'&type='.$type; + $num = count($users); + + print_barre_liste($langs->trans("Users"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, '', 'user', 0, '', '', $limit); print "\n"; - print ''."\n"; + print ''."\n"; if (count($users) > 0) { @@ -953,9 +908,7 @@ if ($type == Categorie::TYPE_USER) } print "\n"; } - } - else - { + } else { print ''; } print "
    '.$langs->trans("Users").' '.count($users).'
    '.$langs->trans("Users").' '.$num.'
    '.$langs->trans("ThisCategoryHasNoItems").'
    \n"; @@ -965,7 +918,7 @@ if ($type == Categorie::TYPE_USER) } -// List of Project +// List of warehouses if ($type == Categorie::TYPE_WAREHOUSE) { $permission = $user->rights->stock->creer; @@ -976,9 +929,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) if ($objects < 0) { dol_print_error($db, $object->error, $object->errors); - } - else - { + } else { print ''; print ''; print ''; @@ -1019,9 +970,7 @@ if ($type == Categorie::TYPE_WAREHOUSE) } print "\n"; } - } - else - { + } else { print ''.$langs->trans("ThisCategoryHasNoItems").''; } print "\n"; diff --git a/htdocs/collab/index.php b/htdocs/collab/index.php index c570e12ba31..7353ea881ee 100644 --- a/htdocs/collab/index.php +++ b/htdocs/collab/index.php @@ -39,7 +39,7 @@ $error = 0; $website = GETPOST('website', 'alpha'); $page = GETPOST('page', 'alpha'); $pageid = GETPOST('pageid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if (GETPOST('delete')) { $action = 'delete'; } if (GETPOST('preview')) $action = 'preview'; @@ -94,9 +94,7 @@ if ($action == 'add') $db->commit(); setEventMessages($langs->trans("PageAdded", $objectpage->pageurl), null, 'mesgs'); $action = ''; - } - else - { + } else { $db->rollback(); } @@ -129,14 +127,10 @@ if ($action == 'delete') header("Location: ".$_SERVER["PHP_SELF"].'?website='.$website); exit; - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 129696a60d9..3c8ed94c2bf 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncommreminder.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; @@ -47,9 +48,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; // Load translation files required by the page -$langs->loadLangs(array("companies", "other", "commercial", "bills", "orders", "agenda")); +$langs->loadLangs(array("companies", "other", "commercial", "bills", "orders", "agenda", "mails")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $socpeopleassigned = GETPOST('socpeopleassigned', 'array'); @@ -57,15 +58,23 @@ $origin = GETPOST('origin', 'alpha'); $originid = GETPOST('originid', 'int'); $confirm = GETPOST('confirm', 'alpha'); -$fulldayevent = GETPOST('fullday'); +$fulldayevent = GETPOST('fullday', 'alpha'); -$aphour = GETPOST('aphour'); -$apmin = GETPOST('apmin'); -$p2hour = GETPOST('p2hour'); -$p2min = GETPOST('p2min'); +$aphour = GETPOST('aphour', 'int'); +$apmin = GETPOST('apmin', 'int'); +$p2hour = GETPOST('p2hour', 'int'); +$p2min = GETPOST('p2min', 'int'); -$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth"), GETPOST("apday"), GETPOST("apyear")); -$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month"), GETPOST("p2day"), GETPOST("p2year")); +$addreminder = GETPOST('addreminder', 'alpha'); +$offsetvalue = GETPOST('offsetvalue', 'int'); +$offsetunit = GETPOST('offsetunittype_duration', 'aZ09'); +$remindertype = GETPOST('selectremindertype', 'aZ09'); +$modelmail = GETPOST('actioncommsendmodel_mail', 'int'); + +//var_dump($_POST); exit; + +$datep = dol_mktime($fulldayevent ? '00' : $aphour, $fulldayevent ? '00' : $apmin, 0, GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int')); +$datef = dol_mktime($fulldayevent ? '23' : $p2hour, $fulldayevent ? '59' : $p2min, $fulldayevent ? '59' : '0', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int')); // Security check $socid = GETPOST('socid', 'int'); @@ -111,6 +120,12 @@ $parameters = array('socid' => $socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +$TRemindTypes = array(); +if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail'); +if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush'); + +$TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes')); + /* * Actions @@ -173,14 +188,12 @@ if (empty($reshook) && $action == 'confirm_clone' && $confirm == 'yes') if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { + } else { if ($id > 0) { //$object->fetch($id); if (!empty($object->socpeopleassigned)) { reset($object->socpeopleassigned); - $object->contactid = key($object->socpeopleassigned); + $object->contact_id = key($object->socpeopleassigned); } $result = $object->createFromClone($user, GETPOST('socid', 'int')); if ($result > 0) { @@ -243,19 +256,17 @@ if (empty($reshook) && $action == 'add') $error++; $donotclearsession = 1; $action = 'create'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); - } - else - { + } else { $object->type_code = GETPOST('actioncode', 'aZ09'); } if (!$error) { // Initialisation objet actioncomm - $object->priority = GETPOST("priority") ?GETPOST("priority") : 0; + $object->priority = GETPOSTISSET("priority") ? GETPOST("priority", "int") : 0; $object->fulldayevent = (!empty($fulldayevent) ? 1 : 0); - $object->location = GETPOST("location"); - $object->label = trim(GETPOST('label')); + $object->location = GETPOST("location", 'alphanohtml'); + $object->label = GETPOST('label', 'alphanohtml'); $object->fk_element = GETPOST("fk_element", 'int'); $object->elementtype = GETPOST("elementtype", 'alpha'); if (!GETPOST('label')) @@ -263,14 +274,11 @@ if (empty($reshook) && $action == 'add') if (GETPOST('actioncode', 'aZ09') == 'AC_RDV' && $contact->getFullName($langs)) { $object->label = $langs->transnoentitiesnoconv("TaskRDVWith", $contact->getFullName($langs)); - } - else - { + } else { if ($langs->trans("Action".$object->type_code) != "Action".$object->type_code) { $object->label = $langs->transnoentitiesnoconv("Action".$object->type_code)."\n"; - } - else { + } else { $cactioncomm->fetch($object->type_code); $object->label = $cactioncomm->label; } @@ -318,7 +326,7 @@ if (empty($reshook) && $action == 'add') if (GETPOST("doneby") > 0) $object->userdoneid = GETPOST("doneby", "int"); } - $object->note_private = trim(GETPOST("note", "none")); + $object->note_private = trim(GETPOST("note", "restricthtml")); if (isset($_POST["contactid"])) $object->contact = $contact; @@ -358,7 +366,7 @@ if (empty($reshook) && $action == 'add') if (!empty($object->socpeopleassigned)) { reset($object->socpeopleassigned); - $object->contactid = key($object->socpeopleassigned); + $object->contact_id = key($object->socpeopleassigned); } // Fill array 'array_options' with data from add form @@ -385,24 +393,56 @@ if (empty($reshook) && $action == 'add') $moreparam = ''; if ($user->id != $object->userownerid) $moreparam = "filtert=-1"; // We force to remove filter so created record is visible when going back to per user view. - $db->commit(); + //Create reminders + if ($addreminder == 'on'){ + $actionCommReminder = new ActionCommReminder($db); + + $dateremind = dol_time_plus_duree($datep, -$offsetvalue, $offsetunit); + + $actionCommReminder->dateremind = $dateremind; + $actionCommReminder->typeremind = $remindertype; + $actionCommReminder->offsetunit = $offsetunit; + $actionCommReminder->offsetvalue = $offsetvalue; + $actionCommReminder->status = $actionCommReminder::STATUS_TODO; + $actionCommReminder->fk_actioncomm = $object->id; + if ($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail; + + // the notification must be created for every user assigned to the event + foreach ($object->userassigned as $userassigned) + { + $actionCommReminder->fk_user = $userassigned['id']; + $res = $actionCommReminder->create($user); + + if ($res <= 0){ + // If error + $db->rollback(); + $langs->load("errors"); + $error = $langs->trans('ErrorReminderActionCommCreation'); + setEventMessages($error, null, 'errors'); + $action = 'create'; $donotclearsession = 1; + break; + } + } + } + + if ($error) { + $db->rollback(); + } else { + $db->commit(); + } + if (!empty($backtopage)) { dol_syslog("Back to ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); header("Location: ".$backtopage.($moreparam ? (preg_match('/\?/', $backtopage) ? '&'.$moreparam : '?'.$moreparam) : '')); - } - elseif ($idaction) + } elseif ($idaction) { header("Location: ".DOL_URL_ROOT.'/comm/action/card.php?id='.$idaction.($moreparam ? '&'.$moreparam : '')); - } - else - { + } else { header("Location: ".DOL_URL_ROOT.'/comm/action/index.php'.($moreparam ? '?'.$moreparam : '')); } exit; - } - else - { + } else { // If error $db->rollback(); $langs->load("errors"); @@ -410,9 +450,7 @@ if (empty($reshook) && $action == 'add') setEventMessages($error, null, 'errors'); $action = 'create'; $donotclearsession = 1; } - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; $donotclearsession = 1; @@ -453,20 +491,20 @@ if (empty($reshook) && $action == 'update') $object->datep = $datep; $object->datef = $datef; $object->percentage = $percentage; - $object->priority = GETPOST("priority", "alphanohtml"); + $object->priority = GETPOST("priority", "int"); $object->fulldayevent = GETPOST("fullday") ? 1 : 0; $object->location = GETPOST('location', "alphanohtml"); $object->socid = GETPOST("socid", "int"); $socpeopleassigned = GETPOST("socpeopleassigned", 'array'); $object->socpeopleassigned = array(); foreach ($socpeopleassigned as $cid) $object->socpeopleassigned[$cid] = array('id' => $cid); - $object->contactid = GETPOST("contactid", 'int'); - if (empty($object->contactid) && !empty($object->socpeopleassigned)) { + $object->contact_id = GETPOST("contactid", 'int'); + if (empty($object->contact_id) && !empty($object->socpeopleassigned)) { reset($object->socpeopleassigned); - $object->contactid = key($object->socpeopleassigned); + $object->contact_id = key($object->socpeopleassigned); } $object->fk_project = GETPOST("projectid", 'int'); - $object->note_private = trim(GETPOST("note", "none")); + $object->note_private = trim(GETPOST("note", "restricthtml")); $object->fk_element = GETPOST("fk_element", "int"); $object->elementtype = GETPOST("elementtype", "alphanohtml"); @@ -489,8 +527,7 @@ if (empty($reshook) && $action == 'update') { if ($val['id'] > 0 && $val['id'] != $assignedtouser) $listofuserid[$val['id']] = $val; } - } - else { + } else { $assignedtouser = (!empty($object->userownerid) && $object->userownerid > 0 ? $object->userownerid : 0); if ($assignedtouser) $listofuserid[$assignedtouser] = array('id'=>$assignedtouser, 'mandatory'=>0, 'transparency'=>($user->id == $assignedtouser ? $transparency : '')); // Owner first } @@ -517,9 +554,7 @@ if (empty($reshook) && $action == 'update') $error++; $donotclearsession = 1; $action = 'edit'; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); - } - else - { + } else { $result = $cactioncomm->fetch(GETPOST('actioncode', 'aZ09')); } if (empty($object->userownerid)) @@ -604,12 +639,52 @@ if (empty($reshook) && $action == 'update') $categories = GETPOST('categories', 'array'); $object->setCategories($categories); + $object->loadReminders(); + if (!empty($object->reminders) && $object->datep > dol_now()) + { + foreach ($object->reminders as $reminder) + { + $reminder->delete($user); + } + $object->reminders = array(); + } + + //Create reminders + if ($addreminder == 'on' && $object->datep > dol_now()){ + $actionCommReminder = new ActionCommReminder($db); + + $dateremind = dol_time_plus_duree($datep, -$offsetvalue, $offsetunit); + + $actionCommReminder->dateremind = $dateremind; + $actionCommReminder->typeremind = $remindertype; + $actionCommReminder->offsetunit = $offsetunit; + $actionCommReminder->offsetvalue = $offsetvalue; + $actionCommReminder->status = $actionCommReminder::STATUS_TODO; + $actionCommReminder->fk_actioncomm = $object->id; + if ($remindertype == 'email') $actionCommReminder->fk_email_template = $modelmail; + + // the notification must be created for every user assigned to the event + foreach ($object->userassigned as $userassigned) + { + $actionCommReminder->fk_user = $userassigned['id']; + $res = $actionCommReminder->create($user); + + if ($res <= 0){ + // If error + $langs->load("errors"); + $error = $langs->trans('ErrorReminderActionCommCreation'); + setEventMessages($error, null, 'errors'); + $action = 'create'; $donotclearsession = 1; + break; + } + } + } + unset($_SESSION['assignedtouser']); - $db->commit(); - } - else - { + if (!$error) $db->commit(); + else $db->rollback(); + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -646,9 +721,7 @@ if (empty($reshook) && $action == 'confirm_delete' && GETPOST("confirm") == 'yes { header("Location: index.php"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -756,9 +829,7 @@ if (empty($reshook) && GETPOST('actionmove', 'alpha') == 'mupdate') { header("Location: ".$backtopage); exit; - } - else - { + } else { $action = ''; } } @@ -771,6 +842,7 @@ if (empty($reshook)) { } + /* * View */ @@ -778,6 +850,13 @@ if (empty($reshook)) { $form = new Form($db); $formproject = new FormProjets($db); +$arrayrecurrulefreq = array( + 'no'=>$langs->trans("OnceOnly"), + 'MONTHLY'=>$langs->trans("EveryMonth"), + 'WEEKLY'=>$langs->trans("EveryWeek"), + //'DAYLY'=>$langs->trans("EveryDay") +); + $help_url = 'EN:Module_Agenda_En|FR:Module_Agenda|ES:M&omodulodulo_Agenda'; llxHeader('', $langs->trans("Agenda"), $help_url); @@ -814,7 +893,6 @@ if ($action == 'create') $("#p2").removeAttr("disabled"); } } - setdatefields(); $("#fullday").change(function() { console.log("setdatefields"); setdatefields(); @@ -828,11 +906,25 @@ if ($action == 'create') { $("#doneby").val(-1); } - }); - $("#actioncode").change(function() { + }); + $("#actioncode").change(function() { if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired"); else $("#dateend").removeClass("fieldrequired"); - }); + }); + $("#aphour,#apmin").change(function() { + if ($("#actioncode").val() == \'AC_RDV\') { + console.log("Start date was changed, we modify end date "+(parseInt($("#aphour").val()))+" "+$("#apmin").val()+" -> "+("00" + (parseInt($("#aphour").val()) + 1)).substr(-2,2)); + $("#p2hour").val(("00" + (parseInt($("#aphour").val()) + 1)).substr(-2,2)); + $("#p2min").val($("#apmin").val()); + $("#p2day").val($("#apday").val()); + $("#p2month").val($("#apmonth").val()); + $("#p2year").val($("#apyear").val()); + $("#p2").val($("#ap").val()); + } + }); + if ($("#actioncode").val() == \'AC_RDV\') $("#dateend").addClass("fieldrequired"); + else $("#dateend").removeClass("fieldrequired"); + setdatefields(); })'; print ''."\n"; } @@ -855,8 +947,8 @@ if ($action == 'create') if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { print ''.$langs->trans("Type").''; - $default = (empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT) ? '' : $conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT); - $formactions->select_type_actions(GETPOST("actioncode", 'aZ09') ?GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default), "actioncode", "systemauto", 0, -1); + $default = (empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT) ? 'AC_RDV' : $conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT); + $formactions->select_type_actions(GETPOSTISSET("actioncode") ? GETPOST("actioncode", 'aZ09') : ($object->type_code ? $object->type_code : $default), "actioncode", "systemauto", 0, -1); print ''; } @@ -866,45 +958,56 @@ if ($action == 'create') // Full day print ''.$langs->trans("EventOnFullDay").''; - // Date start - $datep = ($datep ? $datep : $object->datep); - if (GETPOST('datep', 'int', 1)) $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0); - print ''.$langs->trans("DateActionStart").''; + $datep = ($datep ? $datep : $object->datep); + if (GETPOST('datep', 'int', 1)) $datep = dol_stringtotime(GETPOST('datep', 'int', 1), 0); + $datef = ($datef ? $datef : $object->datef); + if (GETPOST('datef', 'int', 1)) $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0); + if (empty($datef) && !empty($datep)) + { + if (GETPOST("actioncode", 'aZ09') == 'AC_RDV' || empty($conf->global->AGENDA_USE_EVENT_TYPE_DEFAULT)) { + $datef = dol_time_plus_duree($datep, (empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS) ? 1 : $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS), 'h'); + } + } + + // Date start + print ''; + print ''.$langs->trans("DateActionStart").''; + print ' - '; + print ''.$langs->trans("DateActionEnd").''; + print ''; if (GETPOST("afaire") == 1) { print $form->selectDate($datep, 'ap', 1, 1, 0, "action", 1, 2, 0, 'fulldaystart'); // Empty value not allowed for start date and hours if "todo" } else { print $form->selectDate($datep, 'ap', 1, 1, 1, "action", 1, 2, 0, 'fulldaystart'); } - print ''; + print '     -     '; + //print ' - '; + if (GETPOST("afaire") == 1) { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend'); + } else { + print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 0, 0, 'fulldayend'); + } + print ''; // Date end - $datef = ($datef ? $datef : $object->datef); - if (GETPOST('datef', 'int', 1)) $datef = dol_stringtotime(GETPOST('datef', 'int', 1), 0); - if (empty($datef) && !empty($datep) && !empty($conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS)) - { - $datef = dol_time_plus_duree($datep, $conf->global->AGENDA_AUTOSET_END_DATE_WITH_DELTA_HOURS, 'h'); - } - print ''.$langs->trans("DateActionEnd").''; + /*print ''; + print ''.$langs->trans("DateActionEnd").''; + print ''; + print ''; if (GETPOST("afaire") == 1) { print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); } else { print $form->selectDate($datef, 'p2', 1, 1, 1, "action", 1, 2, 0, 'fulldayend'); } - print ''; + print '';*/ // Dev in progress $userepeatevent = ($conf->global->MAIN_FEATURES_LEVEL == 2 ? 1 : 0); if ($userepeatevent) { // Repeat - print ''.$langs->trans("RepeatEvent").''; + print ''; print ''; - $arrayrecurrulefreq = array( - 'no'=>$langs->trans("No"), - 'MONTHLY'=>$langs->trans("EveryMonth"), - 'WEEKLY'=>$langs->trans("EveryWeek"), - //'DAYLY'=>$langs->trans("EveryDay") - ); $selectedrecurrulefreq = 'no'; $selectedrecurrulebymonthday = ''; $selectedrecurrulebyday = ''; @@ -955,8 +1058,7 @@ if ($action == 'create') $percent = -1; if (isset($_GET['status']) || isset($_POST['status'])) $percent = GETPOST('status'); elseif (isset($_GET['percentage']) || isset($_POST['percentage'])) $percent = GETPOST('percentage'); - else - { + else { if (GETPOST('complete') == '0' || GETPOST("afaire") == 1) $percent = '0'; elseif (GETPOST('complete') == 100 || GETPOST("afaire") == 2) $percent = 100; } @@ -966,7 +1068,7 @@ if ($action == 'create') // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { - print ''.$langs->trans("Location").''; + print ''.$langs->trans("Location").''; } // Assigned to @@ -978,9 +1080,7 @@ if ($action == 'create') if ($assignedtouser) $listofuserid[$assignedtouser] = array('id'=>$assignedtouser, 'mandatory'=>0, 'transparency'=>$object->transparency); // Owner first $listofuserid[$user->id]['transparency'] = GETPOSTISSET('transparency') ?GETPOST('transparency', 'alpha') : 1; // 1 by default at first init $_SESSION['assignedtouser'] = json_encode($listofuserid); - } - else - { + } else { if (!empty($_SESSION['assignedtouser'])) { $listofuserid = json_decode($_SESSION['assignedtouser'], true); @@ -998,7 +1098,7 @@ if ($action == 'create') }*/ print ''; - // Realised by + // Done by if (!empty($conf->global->AGENDA_ENABLE_DONEBY)) { print ''.$langs->trans("ActionDoneBy").''; @@ -1032,16 +1132,14 @@ if ($action == 'create') $societe->fetch(GETPOST('socid', 'int')); print $societe->getNomUrl(1); print ''; - } - else - { + } else { $events = array(); $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); //For external user force the company to user company if (!empty($user->socid)) { - print $form->select_company($user->socid, 'socid', '', 1, 1, 0, $events, 0, 'minwidth300'); + print img_picto('', 'company', 'class="paddingrightonly"').$form->select_company($user->socid, 'socid', '', 1, 1, 0, $events, 0, 'minwidth300'); } else { - print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth300'); + print img_picto('', 'company', 'class="paddingrightonly"').$form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth300'); } } print ''; @@ -1050,7 +1148,7 @@ if ($action == 'create') print ''.$langs->trans("ActionOnContact").''; $preselectedids = GETPOST('socpeopleassigned', 'array'); if (GETPOST('contactid', 'int')) $preselectedids[GETPOST('contactid', 'int')] = GETPOST('contactid', 'int'); - print $form->selectcontacts(GETPOST('socid', 'int'), $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'quatrevingtpercent', false, 0, array(), false, 'multiple', 'contactid'); + print img_picto('', 'contact', 'class="paddingrightonly"').$form->selectcontacts(GETPOST('socid', 'int'), $preselectedids, 'socpeopleassigned[]', 1, '', '', 0, 'quatrevingtpercent', false, 0, array(), false, 'multiple', 'contactid'); print ''; } @@ -1062,7 +1160,7 @@ if ($action == 'create') $projectid = GETPOST('projectid', 'int'); print ''.$langs->trans("Project").''; - + print img_picto('', 'project', 'class="paddingrightonly"'); $numproject = $formproject->select_projects((!empty($societe->id) ? $societe->id : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 0, 0, 'maxwidth500'); print ' '; @@ -1085,7 +1183,7 @@ if ($action == 'create') print ''; print ''.$langs->trans("Task").''; - + print img_picto('', 'projecttask', 'class="paddingrightonly"'); $projectsListId = false; if (!empty($projectid)) { $projectsListId = $projectid; } $tid = GETPOST("projecttaskid") ?GETPOST("projecttaskid") : ''; @@ -1112,14 +1210,16 @@ if ($action == 'create') } // Priority - print ''.$langs->trans("Priority").''; - print ''; - print ''; + if (! empty($conf->global->AGENDA_SUPPORT_PRIORITY_IN_EVENTS)) { + print ''.$langs->trans("Priority").''; + print ''; + print ''; + } // Description print ''.$langs->trans("Description").''; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('note', (GETPOST('note', 'none') ? GETPOST('note', 'none') : $object->note_private), '', 180, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); + $doleditor = new DolEditor('note', (GETPOSTISSET('note') ? GETPOST('note', 'restricthtml') : $object->note_private), '', 120, 'dolibarr_notes', 'In', true, true, $conf->fckeditor->enabled, ROWS_4, '90%'); $doleditor->Create(); print ''; @@ -1134,12 +1234,77 @@ if ($action == 'create') print ''; - dol_fiche_end(); + + if ($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER) + { + //checkbox create reminder + print '
    '; + print '
    '; + print '

    '; + + print ''; + + print "\n".''."\n"; + } + + dol_fiche_end(); print '
    '; - print ''; + print ''; print '     '; - print ''; + if (empty($backtopage)) { + print ''; + } else { + print ''; + } print '
    '; print ""; @@ -1182,10 +1347,10 @@ if ($id > 0) $object->socid = GETPOST("socid", "int"); $socpeopleassigned = GETPOST("socpeopleassigned", 'array'); foreach ($socpeopleassigned as $tmpid) $object->socpeopleassigned[$id] = array('id' => $tmpid); - $object->contactid = GETPOST("contactid", 'int'); + $object->contact_id = GETPOST("contactid", 'int'); $object->fk_project = GETPOST("projectid", 'int'); - $object_private = GETPOST("note", 'none'); + $object_private = GETPOST("note", 'restricthtml'); } if ($result2 < 0 || $result3 < 0 || $result4 < 0 || $result5 < 0) @@ -1263,9 +1428,7 @@ if ($id > 0) if ($object->type_code != 'AC_OTH_AUTO') { $formactions->select_type_actions(GETPOST("actioncode", 'aZ09') ?GETPOST("actioncode", 'aZ09') : $object->type_code, "actioncode", "systemauto"); - } - else - { + } else { print ''.$langs->trans("Action".$object->type_code); } print ''; @@ -1278,7 +1441,7 @@ if ($id > 0) print ''.$langs->trans("EventOnFullDay").'fulldayevent ? ' checked' : '').'>'; // Date start - print ''.$langs->trans("DateActionStart").''; + print ''.$langs->trans("DateActionStart").' - '.$langs->trans("DateActionEnd").''; if (GETPOST("afaire") == 1) { print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 0, "action", 1, 1, 0, 'fulldaystart'); } elseif (GETPOST("afaire") == 2) { @@ -1286,9 +1449,7 @@ if ($id > 0) } else { print $form->selectDate($datep ? $datep : $object->datep, 'ap', 1, 1, 1, "action", 1, 1, 0, 'fulldaystart'); } - print ''; - // Date end - print ''.$langs->trans("DateActionEnd").''; + print ' - '; if (GETPOST("afaire") == 1) { print $form->selectDate($datef ? $datef : $object->datef, 'p2', 1, 1, 1, "action", 1, 1, 0, 'fulldayend'); } elseif (GETPOST("afaire") == 2) { @@ -1303,14 +1464,8 @@ if ($id > 0) if ($userepeatevent) { // Repeat - print ''.$langs->trans("RepeatEvent").''; + print ''; print ''; - $arrayrecurrulefreq = array( - 'no'=>$langs->trans("No"), - 'MONTHLY'=>$langs->trans("EveryMonth"), - 'WEEKLY'=>$langs->trans("EveryWeek"), - //'DAYLY'=>$langs->trans("EveryDay"), - ); $selectedrecurrulefreq = 'no'; $selectedrecurrulebymonthday = ''; $selectedrecurrulebyday = ''; @@ -1358,7 +1513,7 @@ if ($id > 0) // Status print ''.$langs->trans("Status").' / '.$langs->trans("Percentage").''; $percent = GETPOST("percentage") ? GETPOST("percentage") : $object->percentage; - $formactions->form_select_status_action('formaction', $percent, 1); + $formactions->form_select_status_action('formaction', $percent, 1, 'complete', 0, 0, 'maxwidth200'); print ''; // Location @@ -1395,9 +1550,7 @@ if ($id > 0) } } $_SESSION['assignedtouser'] = json_encode($listofuserid); - } - else - { + } else { if (!empty($_SESSION['assignedtouser'])) { $listofuserid = json_decode($_SESSION['assignedtouser'], true); @@ -1445,7 +1598,7 @@ if ($id > 0) print '


    '; - print ''; + print '
    '; if ($conf->societe->enabled) { @@ -1457,14 +1610,14 @@ if ($id > 0) $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled')); // TODO Refresh also list of project if $conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY not defined with list linked to socid ? // FIXME If we change company, we may get a project that does not match - print $form->select_company($object->socid, 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth200'); + print img_picto('', 'company', 'class="paddingrightonly"').$form->select_company($object->socid, 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth200'); print ''; print ''; // related contact print ''; print ''; @@ -1476,6 +1629,7 @@ if ($id > 0) $langs->load("projects"); print ''; + if (! empty($conf->global->AGENDA_SUPPORT_PRIORITY_IN_EVENTS)) { + print ''; + } // Object linked if (!empty($object->fk_element) && !empty($object->elementtype)) @@ -1520,9 +1676,7 @@ if ($id > 0) print ''; print ''; - } - else - { + } else { print '
    '.$langs->trans("ActionOnContact").''; print '
    '; - print $form->selectcontacts($object->socid, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'quatrevingtpercent', false, 0, 0, array(), 'multiple', 'contactid'); + print img_picto('', 'contact', 'class="paddingrightonly"').$form->selectcontacts($object->socid, array_keys($object->socpeopleassigned), 'socpeopleassigned[]', 1, '', '', 1, 'quatrevingtpercent', false, 0, 0, array(), 'multiple', 'contactid'); print '
    '; print '
    '.$langs->trans("Project").''; + print img_picto('', 'project', 'class="paddingrightonly"'); $numprojet = $formproject->select_projects(($object->socid > 0 ? $object->socid : -1), $object->fk_project, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, 'maxwidth500'); if ($numprojet == 0) { @@ -1485,9 +1639,11 @@ if ($id > 0) } // Priority - print '
    '.$langs->trans("Priority").''; - print ''; - print '
    '.$langs->trans("Priority").''; + print ''; + print '
    '; print dolGetElementUrl($object->fk_element, $object->elementtype, 1); print ''; @@ -1552,6 +1706,86 @@ if ($id > 0) print '
    '; + // Reminders + if ($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER) + { + $filteruserid = $user->id; + if ($user->rights->agenda->allactions->read) $filteruserid = 0; + $object->loadReminders('', $filteruserid, false); + + print '
    '; + + if (count($object->reminders) > 0) { + $checked = 'checked'; + $keys = array_keys($object->reminders); + $firstreminderId = array_shift($keys); + + $actionCommReminder = $object->reminders[$firstreminderId]; + } else { + $checked = ''; + $actionCommReminder = new ActionCommReminder($db); + $actionCommReminder->offsetvalue = 10; + $actionCommReminder->offsetunit = 'i'; + $actionCommReminder->typeremind = 'email'; + } + + print ''.$langs->trans("AddReminder").''; + + print '
    '; + + print ''; + + //Reminder + print ''; + + //Time Type + print ''; + + //Reminder Type + $TRemindTypes = array(); + if (!empty($conf->global->AGENDA_REMINDER_EMAIL)) $TRemindTypes['email'] = $langs->trans('EMail'); + if (!empty($conf->global->AGENDA_REMINDER_BROWSER)) $TRemindTypes['browser'] = $langs->trans('BrowserPush'); + print ''; + + $hide = ''; + if ($actionCommReminder->typeremind == 'browser') $hide = 'style="display:none;"'; + + //Mail Model + print ''; + + print '
    '.$langs->trans("ReminderTime").''; + print ''; + print '
    '.$langs->trans("TimeType").''; + print $form->selectTypeDuration('offsetunit', $actionCommReminder->offsetunit); + print '
    '.$langs->trans("ReminderType").''; + print $form->selectarray('selectremindertype', $TRemindTypes, $actionCommReminder->typeremind); + print '
    '.$langs->trans("EMailTemplates").''; + print $form->selectModelMail('actioncommsend', 'actioncomm_send', 1); + print '
    '; + + print "\n".''."\n"; + } + dol_fiche_end(); print '
    '; @@ -1561,9 +1795,7 @@ if ($id > 0) print '
    '; print ''; - } - else - { + } else { dol_fiche_head($head, 'card', $langs->trans("Action"), -1, 'action'); @@ -1578,7 +1810,7 @@ if ($id > 0) $linkback = ''; // Link to other agenda views $linkback .= img_picto($langs->trans("BackToList"), 'object_list-alt', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("BackToList").''; + $linkback .= ''.$langs->trans("BackToList").''; $linkback .= ''; $linkback .= '
  • '; $linkback .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="hideonsmartphone pictoactionview"'); @@ -1643,6 +1875,7 @@ if ($id > 0) dol_banner_tab($object, 'id', $linkback, ($user->socid ? 0 : 1), 'id', 'ref', $morehtmlref); print '
    '; + print '
    '; print '
    '; @@ -1652,17 +1885,17 @@ if ($id > 0) // Type if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print ''.$langs->trans("Type").''.$langs->trans($object->type).''; + print ''.$langs->trans("Type").''.$langs->trans($object->type).''; } // Full day event - print ''.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).''; + print ''.$langs->trans("EventOnFullDay").''.yn($object->fulldayevent, 3).''; $rowspan = 4; if (empty($conf->global->AGENDA_DISABLE_LOCATION)) $rowspan++; // Date start - print ''.$langs->trans("DateActionStart").''; + print ''.$langs->trans("DateActionStart").''; if (!$object->fulldayevent) print dol_print_date($object->datep, 'dayhour'); else print dol_print_date($object->datep, 'day'); if ($object->percentage == 0 && $object->datep && $object->datep < ($now - $delay_warning)) print img_warning($langs->trans("Late")); @@ -1670,7 +1903,7 @@ if ($id > 0) print ''; // Date end - print ''.$langs->trans("DateActionEnd").''; + print ''.$langs->trans("DateActionEnd").''; if (!$object->fulldayevent) print dol_print_date($object->datef, 'dayhour'); else print dol_print_date($object->datef, 'day'); if ($object->percentage > 0 && $object->percentage < 100 && $object->datef && $object->datef < ($now - $delay_warning)) print img_warning($langs->trans("Late")); @@ -1679,11 +1912,11 @@ if ($id > 0) // Location if (empty($conf->global->AGENDA_DISABLE_LOCATION)) { - print ''.$langs->trans("Location").''.$object->location.''; + print ''.$langs->trans("Location").''.$object->location.''; } // Assigned to - print ''.$langs->trans("ActionAssignedTo").''; + print ''.$langs->trans("ActionAssignedTo").''; $listofuserid = array(); if (empty($donotclearsession)) { @@ -1706,9 +1939,7 @@ if ($id > 0) } } $_SESSION['assignedtouser'] = json_encode($listofuserid); - } - else - { + } else { if (!empty($_SESSION['assignedtouser'])) { $listofuserid = json_decode($_SESSION['assignedtouser'], true); @@ -1735,7 +1966,7 @@ if ($id > 0) // Done by if ($conf->global->AGENDA_ENABLE_DONEBY) { - print ''.$langs->trans("ActionDoneBy").''; + print ''.$langs->trans("ActionDoneBy").''; if ($object->userdoneid > 0) { $tmpuser = new User($db); @@ -1744,16 +1975,19 @@ if ($id > 0) } print ''; } + // Categories if ($conf->categorie->enabled) { - print ''.$langs->trans("Categories").''; + print ''.$langs->trans("Categories").''; print $form->showCategories($object->id, Categorie::TYPE_ACTIONCOMM, 1); print ""; } print ''; - print '
    '; + print '
    '; + + print '
    '; print '
    '; print ''; @@ -1761,7 +1995,7 @@ if ($id > 0) if ($conf->societe->enabled) { // Related company - print ''; - print ''; } // Priority - print ''; @@ -1814,24 +2046,60 @@ if ($id > 0) include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; print ''; $link = dolGetElementUrl($object->fk_element, $object->elementtype, 1); - print ''; } // Description - print ''; // Other attributes - $cols = 3; include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Reminders + if ($conf->global->AGENDA_REMINDER_EMAIL || $conf->global->AGENDA_REMINDER_BROWSER) + { + $filtreuserid = $user->id; + if ($user->rights->agenda->allactions->read) $filtreuserid = 0; + $object->loadReminders('', $filteruserid, false); + + print ''; + } + print '
    '.$langs->trans("ActionOnCompany").''.($object->thirdparty->id ? $object->thirdparty->getNomUrl(1) : (''.$langs->trans("None").'')); + print '
    '.$langs->trans("ActionOnCompany").''.($object->thirdparty->id ? $object->thirdparty->getNomUrl(1) : (''.$langs->trans("None").'')); if (is_object($object->thirdparty) && $object->thirdparty->id > 0 && $object->type_code == 'AC_TEL') { if ($object->thirdparty->fetch($object->thirdparty->id)) @@ -1773,7 +2007,7 @@ if ($id > 0) // Related contact print '
    '.$langs->trans("ActionOnContact").''; + print ''; if (!empty($object->socpeopleassigned)) { @@ -1794,16 +2028,14 @@ if ($id > 0) print '
    '; } } - } - else - { + } else { print ''.$langs->trans("None").''; } print '
    '.$langs->trans("Priority").''; + print '
    '.$langs->trans("Priority").''; print ($object->priority ? $object->priority : ''); print '
    '.$langs->trans("LinkedObject").''; + print ''; if (empty($link)) print ''.$langs->trans("ObjectDeleted").''; else print $link; print '
    '.$langs->trans("Description").''; + print '
    '.$langs->trans("Description").''; print dol_string_onlythesehtmltags(dol_htmlentitiesbr($object->note_private)); print '
    '.$langs->trans("Reminders").''; + + if (count($object->reminders) > 0) { + $tmpuserstatic = new User($db); + + foreach ($object->reminders as $actioncommreminderid => $actioncommreminder) { + print $TRemindTypes[$actioncommreminder->typeremind]; + if ($actioncommreminder->fk_user > 0) { + $tmpuserstatic->fetch($actioncommreminder->fk_user); + print ' ('.$tmpuserstatic->getNomUrl(0, '', 0, 0, 16).')'; + } + print ' - '.$actioncommreminder->offsetvalue.' '.$TDurationTypes[$actioncommreminder->offsetunit]; + if ($actioncommreminder->status == $actioncommreminder::STATUS_TODO) { + print ' - '; + print $langs->trans("NotSent"); + print ' '; + } elseif ($actioncommreminder->status == $actioncommreminder::STATUS_DONE) { + print ' - '; + print $langs->trans("Done"); + print ' '; + } + print '
    '; + } + } + + print '
    '; print '
    '; + print '
    '; + print '
    '; dol_fiche_end(); } @@ -1853,9 +2121,7 @@ if ($id > 0) (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create)) { print ''; - } - else - { + } else { print ''; } @@ -1863,19 +2129,15 @@ if ($id > 0) (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create)) { print ''; - } - else - { + } else { print ''; } if ($user->rights->agenda->allactions->delete || (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->delete)) { - print ''; - } - else - { + print ''; + } else { print ''; } } diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 3c060ffdc39..97896448a3f 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -28,6 +28,9 @@ */ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncommreminder.class.php'; /** @@ -35,492 +38,507 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class ActionComm extends CommonObject { - /** - * @var string ID to identify managed object - */ - public $element = 'action'; - - /** - * @var string Name of table without prefix where object is stored - */ - public $table_element = 'actioncomm'; - - /** - * @var string Name of id column - */ - public $table_rowid = 'id'; - - /** - * @var string Name of icon for actioncomm object. Filename of icon is object_action.png - */ - public $picto = 'action'; - - /** - * @var int 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - */ - public $ismultientitymanaged = 1; - - /** - * @var integer 0=Default - * 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user - * 2=Same than 1 but accept record if fksoc is empty - */ - public $restrictiononfksoc = 2; - - /** - * @var int Id of the event - */ - public $id; - - /** - * @var int Id of the event. Use $id as possible - */ - public $ref; - - /** - * @var int Id into parent table llx_c_actioncomm (used only if option to use type is set) - */ - public $type_id; - - /** - * @var string Code into parent table llx_c_actioncomm (used only if option to use type is set). With default setup, should be AC_OTH_AUTO or AC_OTH. - */ - public $type_code; - - /** - * @var string Type label - */ - public $type_label; - - /** - * @var string Label into parent table llx_c_actioncomm (used only if option to use type is set) - */ - public $type; - - /** - * @var string Color into parent table llx_c_actioncomm (used only if option to use type is set) - */ - public $type_color; - - /** - * @var string Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...) - */ - public $code; - - /** - * @var string Agenda event label - */ - public $label; - - /** - * @var integer Date creation record (datec) - */ - public $datec; - - /** - * @var integer Date end record (datef) - */ - public $datef; - - /** - * @var integer Duration (duree) - */ - public $duree; - - /** - * @var integer Date modification record (tms) - */ - public $datem; - - /** - * @var User Object user that create action - * @deprecated - * @see $authorid - */ - public $author; - - /** - * @var User Object user that modified action - * @deprecated - * @see $usermodid - */ - public $usermod; - - /** - * @var int Id user that create action - */ - public $authorid; - - /** - * @var int Id user that modified action - */ - public $usermodid; - - /** - * @var integer Date action start (datep) - */ - public $datep; - - /** - * @var integer Date action end (datep2) - */ - public $datep2; - - /** - * @var int -1=Unkown duration - * @deprecated - */ - public $durationp = -1; - - /** - * @var int 1=Event on full day - */ - public $fulldayevent = 0; - - /** - * @var integer Percentage - */ - public $percentage; - - /** - * @var string Location - */ - public $location; - - /** - * @var int Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events) - */ - public $transparency; - - /** - * @var int (0 By default) - */ - public $priority; - - /** - * @var int[] Array of user ids - */ - public $userassigned = array(); - - /** - * @var int Id of user owner = fk_user_action into table - */ - public $userownerid; - - /** - * @var int Id of user done (deprecated) - * @deprecated - */ - public $userdoneid; - - /** - * @var int[] Array of contact ids - */ - public $socpeopleassigned = array(); - - /** - * @var int[] Array of other contact emails (not user, not contact) - */ - public $otherassigned = array(); - - - /** - * @var User Object user of owner - * @deprecated - * @see $userownerid - */ - public $usertodo; - - /** - * @var User Object user that did action - * @deprecated - * @see $userdoneid - */ - public $userdone; - - /** - * @var int thirdparty id linked to action - */ - public $socid; - - /** - * @var int socpeople id linked to action - */ - public $contactid; - - /** - * @var Societe|null Company linked to action (optional) - * @deprecated - * @see $socid - */ - public $societe; - - /** - * @var Contact|null Contact linked to action (optional) - * @deprecated - * @see $contactid - */ - public $contact; - - // Properties for links to other objects - /** - * @var int Id of linked object - */ - public $fk_element; // Id of record - - /** - * @var int Id of record alternative for API - */ - public $elementid; - - /** - * @var string Type of record. This if property ->element of object linked to. - */ - public $elementtype; - - /** - * @var string Ical name - */ - public $icalname; - - /** - * @var string Ical color - */ - public $icalcolor; - - /** - * @var string Extraparam - */ - public $extraparams; - - /** - * @var array Actions - */ - public $actions = array(); - - /** - * @var string Email msgid - */ - public $email_msgid; - - /** - * @var string Email from - */ - public $email_from; - - /** - * @var string Email sender - */ - public $email_sender; - - /** - * @var string Email to - */ - public $email_to; - - /** - * @var string Email tocc - */ - public $email_tocc; - /** - * @var string Email tobcc - */ - public $email_tobcc; - - /** - * @var string Email subject - */ - public $email_subject; - - /** - * @var string Email errors to - */ - public $errors_to; - - - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct(DoliDB $db) - { - $this->db = $db; - } - - /** - * Add an action/event into database. - * $this->type_id OR $this->type_code must be set. - * - * @param User $user Object user making action - * @param int $notrigger 1 = disable triggers, 0 = enable triggers - * @return int Id of created event, < 0 if KO - */ - public function create(User $user, $notrigger = 0) - { - global $langs, $conf, $hookmanager; - - $error = 0; - $now = dol_now(); - - // Check parameters - if (!isset($this->userownerid) || $this->userownerid === '') // $this->userownerid may be 0 (anonymous event) of > 0 - { - dol_syslog("You tried to create an event but mandatory property ownerid was not defined", LOG_WARNING); - $this->errors[] = 'ErrorPropertyUserowneridNotDefined'; - return -1; - } - - // Clean parameters - $this->label = dol_trunc(trim($this->label), 128); - $this->location = dol_trunc(trim($this->location), 128); - $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); - if (empty($this->percentage)) $this->percentage = 0; - if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; - if (empty($this->fulldayevent)) $this->fulldayevent = 0; - if (empty($this->transparency)) $this->transparency = 0; - if ($this->percentage > 100) $this->percentage = 100; - //if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date; - if (!empty($this->datep) && !empty($this->datef)) $this->durationp = ($this->datef - $this->datep); // deprecated - //if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date); - if (!empty($this->datep) && !empty($this->datef) && $this->datep > $this->datef) $this->datef = $this->datep; - //if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date; - if (!isset($this->fk_project) || $this->fk_project < 0) $this->fk_project = 0; - // For backward compatibility - if ($this->elementtype == 'facture') $this->elementtype = 'invoice'; - if ($this->elementtype == 'commande') $this->elementtype = 'order'; - if ($this->elementtype == 'contrat') $this->elementtype = 'contract'; - - if (!is_array($this->userassigned) && !empty($this->userassigned)) // For backward compatibility when userassigned was an int instead fo array - { - $tmpid = $this->userassigned; - $this->userassigned = array(); - $this->userassigned[$tmpid] = array('id'=>$tmpid, 'transparency'=>$this->transparency); - } - - $userownerid = $this->userownerid; - $userdoneid = $this->userdoneid; - - // Be sure assigned user is defined as an array of array('id'=>,'mandatory'=>,...). - if (empty($this->userassigned) || count($this->userassigned) == 0 || !is_array($this->userassigned)) - $this->userassigned = array($userownerid=>array('id'=>$userownerid, 'transparency'=>$this->transparency)); - - if (!$this->type_id || !$this->type_code) - { - $key = empty($this->type_id) ? $this->type_code : $this->type_id; - - // Get id from code - $cactioncomm = new CActionComm($this->db); - $result = $cactioncomm->fetch($key); - - if ($result > 0) - { - $this->type_id = $cactioncomm->id; - $this->type_code = $cactioncomm->code; - } - elseif ($result == 0) - { - $this->error = 'Failed to get record with id '.$this->type_id.' code '.$this->type_code.' from dictionary "type of events"'; - return -1; - } - else + /** + * @var string ID to identify managed object + */ + public $element = 'action'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'actioncomm'; + + /** + * @var string Name of id column + */ + public $table_rowid = 'id'; + + /** + * @var string Name of icon for actioncomm object. Filename of icon is object_action.png + */ + public $picto = 'action'; + + /** + * @var int 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + */ + public $ismultientitymanaged = 1; + + /** + * @var integer 0=Default + * 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user + * 2=Same than 1 but accept record if fksoc is empty + */ + public $restrictiononfksoc = 2; + + /** + * @var int Id of the event + */ + public $id; + + /** + * @var int Id of the event. Use $id as possible + */ + public $ref; + + /** + * @var int Id into parent table llx_c_actioncomm (used only if option to use type is set) + */ + public $type_id; + + /** + * @var string Code into parent table llx_c_actioncomm (used only if option to use type is set). With default setup, should be AC_OTH_AUTO or AC_OTH. + */ + public $type_code; + + /** + * @var string Type label + */ + public $type_label; + + /** + * @var string Label into parent table llx_c_actioncomm (used only if option to use type is set) + */ + public $type; + + /** + * @var string Color into parent table llx_c_actioncomm (used only if option to use type is set) + */ + public $type_color; + + /** + * @var string Free code to identify action. Ie: Agenda trigger add here AC_TRIGGERNAME ('AC_COMPANY_CREATE', 'AC_PROPAL_VALIDATE', ...) + */ + public $code; + + /** + * @var string Agenda event label + */ + public $label; + + /** + * @var integer Date creation record (datec) + */ + public $datec; + + /** + * @var integer Date end record (datef) + */ + public $datef; + + /** + * @var integer Duration (duree) + */ + public $duree; + + /** + * @var integer Date modification record (tms) + */ + public $datem; + + /** + * @var User Object user that create action + * @deprecated + * @see $authorid + */ + public $author; + + /** + * @var User Object user that modified action + * @deprecated + * @see $usermodid + */ + public $usermod; + + /** + * @var int Id user that create action + */ + public $authorid; + + /** + * @var int Id user that modified action + */ + public $usermodid; + + /** + * @var integer Date action start (datep) + */ + public $datep; + + /** + * @var integer Date action end (datep2) + */ + public $datep2; + + /** + * @var int -1=Unkown duration + * @deprecated + */ + public $durationp = -1; + + /** + * @var int 1=Event on full day + */ + public $fulldayevent = 0; + + /** + * @var integer Percentage + */ + public $percentage; + + /** + * @var string Location + */ + public $location; + + /** + * @var int Transparency (ical standard). Used to say if people assigned to event are busy or not by event. 0=available, 1=busy, 2=busy (refused events) + */ + public $transparency; + + /** + * @var int (0 By default) + */ + public $priority; + + /** + * @var int[] Array of user ids + */ + public $userassigned = array(); + + /** + * @var int Id of user owner = fk_user_action into table + */ + public $userownerid; + + /** + * @var int Id of user done (deprecated) + * @deprecated + */ + public $userdoneid; + + /** + * @var int[] Array of contact ids + */ + public $socpeopleassigned = array(); + + /** + * @var int[] Array of other contact emails (not user, not contact) + */ + public $otherassigned = array(); + + /** + * @var array Array of reminders + */ + public $reminders = array(); + + /** + * @var User Object user of owner + * @deprecated + * @see $userownerid + */ + public $usertodo; + + /** + * @var User Object user that did action + * @deprecated + * @see $userdoneid + */ + public $userdone; + + /** + * @var int thirdparty id linked to action + */ + public $socid; + + /** + * @var int socpeople id linked to action + */ + public $contactid; + + /** + * @var Societe|null Company linked to action (optional) + * @deprecated + * @see $socid + */ + public $societe; + + /** + * @var Contact|null Contact linked to action (optional) + * @deprecated + * @see $contactid + */ + public $contact; + + // Properties for links to other objects + /** + * @var int Id of linked object + */ + public $fk_element; // Id of record + + /** + * @var int Id of record alternative for API + */ + public $elementid; + + /** + * @var string Type of record. This if property ->element of object linked to. + */ + public $elementtype; + + /** + * @var string Ical name + */ + public $icalname; + + /** + * @var string Ical color + */ + public $icalcolor; + + /** + * @var string Extraparam + */ + public $extraparams; + + /** + * @var array Actions + */ + public $actions = array(); + + /** + * @var string Email msgid + */ + public $email_msgid; + + /** + * @var string Email from + */ + public $email_from; + + /** + * @var string Email sender + */ + public $email_sender; + + /** + * @var string Email to + */ + public $email_to; + + /** + * @var string Email tocc + */ + public $email_tocc; + /** + * @var string Email tobcc + */ + public $email_tobcc; + + /** + * @var string Email subject + */ + public $email_subject; + + /** + * @var string Email errors to + */ + public $errors_to; + + /** + * Typical value for a event that is in a todo state + */ + const EVENT_TODO = 0; + + /** + * Typical value for a event that is in a progress state + */ + const EVENT_IN_PROGRESS = 50; + + /** + * Typical value for a event that is in a finished state + */ + const EVENT_FINISHED = 100; + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct(DoliDB $db) + { + $this->db = $db; + } + + /** + * Add an action/event into database. + * $this->type_id OR $this->type_code must be set. + * + * @param User $user Object user making action + * @param int $notrigger 1 = disable triggers, 0 = enable triggers + * @return int Id of created event, < 0 if KO + */ + public function create(User $user, $notrigger = 0) + { + global $langs, $conf, $hookmanager; + + $error = 0; + $now = dol_now(); + + // Check parameters + if (!isset($this->userownerid) || $this->userownerid === '') // $this->userownerid may be 0 (anonymous event) of > 0 + { + dol_syslog("You tried to create an event but mandatory property ownerid was not defined", LOG_WARNING); + $this->errors[] = 'ErrorPropertyUserowneridNotDefined'; + return -1; + } + + // Clean parameters + $this->label = dol_trunc(trim($this->label), 128); + $this->location = dol_trunc(trim($this->location), 128); + $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); + if (empty($this->percentage)) $this->percentage = 0; + if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; + if (empty($this->fulldayevent)) $this->fulldayevent = 0; + if (empty($this->transparency)) $this->transparency = 0; + if ($this->percentage > 100) $this->percentage = 100; + //if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date; + if (!empty($this->datep) && !empty($this->datef)) $this->durationp = ($this->datef - $this->datep); // deprecated + //if (! empty($this->date) && ! empty($this->dateend)) $this->durationa=($this->dateend - $this->date); + if (!empty($this->datep) && !empty($this->datef) && $this->datep > $this->datef) $this->datef = $this->datep; + //if (! empty($this->date) && ! empty($this->dateend) && $this->date > $this->dateend) $this->dateend=$this->date; + if (!isset($this->fk_project) || $this->fk_project < 0) $this->fk_project = 0; + // For backward compatibility + if ($this->elementtype == 'facture') $this->elementtype = 'invoice'; + if ($this->elementtype == 'commande') $this->elementtype = 'order'; + if ($this->elementtype == 'contrat') $this->elementtype = 'contract'; + + if (!is_array($this->userassigned) && !empty($this->userassigned)) // For backward compatibility when userassigned was an int instead fo array + { + $tmpid = $this->userassigned; + $this->userassigned = array(); + $this->userassigned[$tmpid] = array('id'=>$tmpid, 'transparency'=>$this->transparency); + } + + $userownerid = $this->userownerid; + $userdoneid = $this->userdoneid; + + // Be sure assigned user is defined as an array of array('id'=>,'mandatory'=>,...). + if (empty($this->userassigned) || count($this->userassigned) == 0 || !is_array($this->userassigned)) + $this->userassigned = array($userownerid=>array('id'=>$userownerid, 'transparency'=>$this->transparency)); + + if (!$this->type_id || !$this->type_code) + { + $key = empty($this->type_id) ? $this->type_code : $this->type_id; + + // Get id from code + $cactioncomm = new CActionComm($this->db); + $result = $cactioncomm->fetch($key); + + if ($result > 0) { - $this->error = $cactioncomm->error; - return -1; - } - } - $code = empty($this->code) ? $this->type_code : $this->code; + $this->type_id = $cactioncomm->id; + $this->type_code = $cactioncomm->code; + } elseif ($result == 0) + { + $this->error = 'Failed to get record with id '.$this->type_id.' code '.$this->type_code.' from dictionary "type of events"'; + return -1; + } else { + $this->error = $cactioncomm->error; + return -1; + } + } + $code = empty($this->code) ? $this->type_code : $this->code; - // Check parameters - if (!$this->type_id) - { - $this->error = "ErrorWrongParameters"; - return -1; - } + // Check parameters + if (!$this->type_id) + { + $this->error = "ErrorWrongParameters"; + return -1; + } - $this->db->begin(); + $this->db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm"; - $sql .= "(datec,"; - $sql .= "datep,"; - $sql .= "datep2,"; - $sql .= "durationp,"; // deprecated - $sql .= "fk_action,"; - $sql .= "code,"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm"; + $sql .= "(datec,"; + $sql .= "datep,"; + $sql .= "datep2,"; + $sql .= "durationp,"; // deprecated + $sql .= "fk_action,"; + $sql .= "code,"; $sql .= "ref_ext,"; - $sql .= "fk_soc,"; - $sql .= "fk_project,"; - $sql .= "note,"; - $sql .= "fk_contact,"; - $sql .= "fk_user_author,"; - $sql .= "fk_user_action,"; - $sql .= "fk_user_done,"; - $sql .= "label,percent,priority,fulldayevent,location,"; - $sql .= "transparency,"; - $sql .= "fk_element,"; - $sql .= "elementtype,"; - $sql .= "entity,"; - $sql .= "extraparams,"; + $sql .= "fk_soc,"; + $sql .= "fk_project,"; + $sql .= "note,"; + $sql .= "fk_contact,"; + $sql .= "fk_user_author,"; + $sql .= "fk_user_action,"; + $sql .= "fk_user_done,"; + $sql .= "label,percent,priority,fulldayevent,location,"; + $sql .= "transparency,"; + $sql .= "fk_element,"; + $sql .= "elementtype,"; + $sql .= "entity,"; + $sql .= "extraparams,"; // Fields emails - $sql .= "email_msgid,"; - $sql .= "email_from,"; - $sql .= "email_sender,"; - $sql .= "email_to,"; - $sql .= "email_tocc,"; - $sql .= "email_tobcc,"; - $sql .= "email_subject,"; - $sql .= "errors_to"; - $sql .= ") VALUES ("; - $sql .= "'".$this->db->idate($now)."', "; - $sql .= (strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : "null").", "; - $sql .= (strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : "null").", "; - $sql .= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '') ? "'".$this->db->escape($this->durationp)."'" : "null").", "; // deprecated - $sql .= (isset($this->type_id) ? $this->type_id : "null").","; - $sql .= ($code ? ("'".$this->db->escape($code)."'") : "null").", "; - $sql .= ($this->ref_ext ? ("'".$this->db->idate($this->ref_ext)."'") : "null").", "; - $sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", "; - $sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", "; - $sql .= " '".$this->db->escape($this->note_private)."', "; - $sql .= ((isset($this->contactid) && $this->contactid > 0) ? $this->contactid : "null").", "; - $sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", "; - $sql .= ($userownerid > 0 ? $userownerid : "null").", "; - $sql .= ($userdoneid > 0 ? $userdoneid : "null").", "; - $sql .= "'".$this->db->escape($this->label)."','".$this->db->escape($this->percentage)."','".$this->db->escape($this->priority)."','".$this->db->escape($this->fulldayevent)."','".$this->db->escape($this->location)."', "; - $sql .= "'".$this->db->escape($this->transparency)."', "; - $sql .= (!empty($this->fk_element) ? $this->fk_element : "null").", "; - $sql .= (!empty($this->elementtype) ? "'".$this->db->escape($this->elementtype)."'" : "null").", "; - $sql .= $conf->entity.","; - $sql .= (!empty($this->extraparams) ? "'".$this->db->escape($this->extraparams)."'" : "null").", "; - // Fields emails - $sql .= (!empty($this->email_msgid) ? "'".$this->db->escape($this->email_msgid)."'" : "null").", "; - $sql .= (!empty($this->email_from) ? "'".$this->db->escape($this->email_from)."'" : "null").", "; - $sql .= (!empty($this->email_sender) ? "'".$this->db->escape($this->email_sender)."'" : "null").", "; - $sql .= (!empty($this->email_to) ? "'".$this->db->escape($this->email_to)."'" : "null").", "; - $sql .= (!empty($this->email_tocc) ? "'".$this->db->escape($this->email_tocc)."'" : "null").", "; - $sql .= (!empty($this->email_tobcc) ? "'".$this->db->escape($this->email_tobcc)."'" : "null").", "; - $sql .= (!empty($this->email_subject) ? "'".$this->db->escape($this->email_subject)."'" : "null").", "; - $sql .= (!empty($this->errors_to) ? "'".$this->db->escape($this->errors_to)."'" : "null"); - $sql .= ")"; + $sql .= "email_msgid,"; + $sql .= "email_from,"; + $sql .= "email_sender,"; + $sql .= "email_to,"; + $sql .= "email_tocc,"; + $sql .= "email_tobcc,"; + $sql .= "email_subject,"; + $sql .= "errors_to"; + $sql .= ") VALUES ("; + $sql .= "'".$this->db->idate($now)."', "; + $sql .= (strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : "null").", "; + $sql .= (strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : "null").", "; + $sql .= ((isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '') ? "'".$this->db->escape($this->durationp)."'" : "null").", "; // deprecated + $sql .= (isset($this->type_id) ? $this->type_id : "null").","; + $sql .= ($code ? ("'".$this->db->escape($code)."'") : "null").", "; + $sql .= (!empty($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").", "; + $sql .= ((isset($this->socid) && $this->socid > 0) ? $this->socid : "null").", "; + $sql .= ((isset($this->fk_project) && $this->fk_project > 0) ? $this->fk_project : "null").", "; + $sql .= " '".$this->db->escape($this->note_private)."', "; + $sql .= ((isset($this->contact_id) && $this->contact_id > 0) ? $this->contact_id : "null").", "; // deprecated, use ->socpeopleassigned + $sql .= (isset($user->id) && $user->id > 0 ? $user->id : "null").", "; + $sql .= ($userownerid > 0 ? $userownerid : "null").", "; + $sql .= ($userdoneid > 0 ? $userdoneid : "null").", "; + $sql .= "'".$this->db->escape($this->label)."','".$this->db->escape($this->percentage)."','".$this->db->escape($this->priority)."','".$this->db->escape($this->fulldayevent)."','".$this->db->escape($this->location)."', "; + $sql .= "'".$this->db->escape($this->transparency)."', "; + $sql .= (!empty($this->fk_element) ? $this->fk_element : "null").", "; + $sql .= (!empty($this->elementtype) ? "'".$this->db->escape($this->elementtype)."'" : "null").", "; + $sql .= $conf->entity.","; + $sql .= (!empty($this->extraparams) ? "'".$this->db->escape($this->extraparams)."'" : "null").", "; + // Fields emails + $sql .= (!empty($this->email_msgid) ? "'".$this->db->escape($this->email_msgid)."'" : "null").", "; + $sql .= (!empty($this->email_from) ? "'".$this->db->escape($this->email_from)."'" : "null").", "; + $sql .= (!empty($this->email_sender) ? "'".$this->db->escape($this->email_sender)."'" : "null").", "; + $sql .= (!empty($this->email_to) ? "'".$this->db->escape($this->email_to)."'" : "null").", "; + $sql .= (!empty($this->email_tocc) ? "'".$this->db->escape($this->email_tocc)."'" : "null").", "; + $sql .= (!empty($this->email_tobcc) ? "'".$this->db->escape($this->email_tobcc)."'" : "null").", "; + $sql .= (!empty($this->email_subject) ? "'".$this->db->escape($this->email_subject)."'" : "null").", "; + $sql .= (!empty($this->errors_to) ? "'".$this->db->escape($this->errors_to)."'" : "null"); + $sql .= ")"; - dol_syslog(get_class($this)."::add", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."actioncomm", "id"); + dol_syslog(get_class($this)."::add", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."actioncomm", "id"); - // Now insert assigned users + // Now insert assigned users if (!$error) { //dol_syslog(var_export($this->userassigned, true)); foreach ($this->userassigned as $key => $val) { - if (!is_array($val)) // For backward compatibility when val=id - { - $val = array('id'=>$val); - } + if (!is_array($val)) // For backward compatibility when val=id + { + $val = array('id'=>$val); + } - if ($val['id'] > 0) - { + if ($val['id'] > 0) + { $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)"; $sql .= " VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory']) ? '0' : $val['mandatory']).", ".(empty($val['transparency']) ? '0' : $val['transparency']).", ".(empty($val['answer_status']) ? '0' : $val['answer_status']).")"; @@ -529,10 +547,10 @@ class ActionComm extends CommonObject { $error++; dol_syslog('Error to process userassigned: '.$this->db->lasterror(), LOG_ERR); - $this->errors[] = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); } //var_dump($sql);exit; - } + } } } @@ -556,58 +574,54 @@ class ActionComm extends CommonObject } } - if (!$error) - { - // Actions on extra fields - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + if (!$error) + { + // Actions on extra fields + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('ACTION_CREATE', $user); - if ($result < 0) { $error++; } - // End call triggers - } + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('ACTION_CREATE', $user); + if ($result < 0) { $error++; } + // End call triggers + } - if (!$error) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - return -1; - } - } + if (!$error) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + return -1; + } + } - /** - * Load an object from its id and create a new one in database - * - * @param User $fuser Object user making action + /** + * Load an object from its id and create a new one in database + * + * @param User $fuser Object user making action * @param int $socid Id of thirdparty - * @return int New id of clone - */ - public function createFromClone(User $fuser, $socid) - { - global $db, $conf, $hookmanager; + * @return int New id of clone + */ + public function createFromClone(User $fuser, $socid) + { + global $db, $conf, $hookmanager; - $error = 0; - $now = dol_now(); + $error = 0; + $now = dol_now(); - $this->db->begin(); + $this->db->begin(); // Load source object $objFrom = clone $this; @@ -619,174 +633,173 @@ class ActionComm extends CommonObject //$this->fetch_userassigned(); $this->fetchResources(); - $this->id = 0; + $this->id = 0; - // Create clone + // Create clone $this->context['createfromclone'] = 'createfromclone'; $result = $this->create($fuser); - if ($result < 0) $error++; + if ($result < 0) $error++; - if (!$error) - { - // Hook of thirdparty module - if (is_object($hookmanager)) - { - $parameters = array('objFrom'=>$objFrom); - $action = ''; - $reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; - } + if (!$error) + { + // Hook of thirdparty module + if (is_object($hookmanager)) + { + $parameters = array('objFrom'=>$objFrom); + $action = ''; + $reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook < 0) $error++; + } - // Call trigger - $result = $this->call_trigger('ACTION_CLONE', $fuser); - if ($result < 0) { $error++; } - // End call triggers - } + // Call trigger + $result = $this->call_trigger('ACTION_CLONE', $fuser); + if ($result < 0) { $error++; } + // End call triggers + } - unset($this->context['createfromclone']); + unset($this->context['createfromclone']); - // End - if (!$error) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } + // End + if (!$error) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1; + } + } - /** - * Load object from database - * - * @param int $id Id of action to get - * @param string $ref Ref of action to get - * @param string $ref_ext Ref ext to get - * @return int <0 if KO, >0 if OK - */ - public function fetch($id, $ref = '', $ref_ext = '') - { - global $langs; + /** + * Load object from database + * + * @param int $id Id of action to get + * @param string $ref Ref of action to get + * @param string $ref_ext Ref ext to get + * @param string $email_msgid Email msgid + * @return int <0 if KO, >0 if OK + */ + public function fetch($id, $ref = '', $ref_ext = '', $email_msgid = '') + { + global $langs; - $sql = "SELECT a.id,"; - $sql .= " a.id as ref,"; - $sql .= " a.entity,"; - $sql .= " a.ref_ext,"; - $sql .= " a.datep,"; - $sql .= " a.datep2,"; - $sql .= " a.durationp,"; // deprecated - $sql .= " a.datec,"; - $sql .= " a.tms as datem,"; - $sql .= " a.code, a.label, a.note,"; - $sql .= " a.fk_soc,"; - $sql .= " a.fk_project,"; - $sql .= " a.fk_user_author, a.fk_user_mod,"; - $sql .= " a.fk_user_action, a.fk_user_done,"; - $sql .= " a.fk_contact, a.percent as percentage,"; - $sql .= " a.fk_element as elementid, a.elementtype,"; - $sql .= " a.priority, a.fulldayevent, a.location, a.transparency,"; - $sql .= " c.id as type_id, c.code as type_code, c.libelle as type_label, c.color as type_color, c.picto as type_picto,"; - $sql .= " s.nom as socname,"; - $sql .= " u.firstname, u.lastname as lastname"; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a "; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action=c.id "; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; - $sql .= " WHERE "; - if ($ref) $sql .= " a.id=".$ref; // No field ref, we use id - elseif ($ref_ext) $sql .= " a.ref_ext='".$this->db->escape($ref_ext)."'"; - else $sql .= " a.id=".$id; + $sql = "SELECT a.id,"; + $sql .= " a.id as ref,"; + $sql .= " a.entity,"; + $sql .= " a.ref_ext,"; + $sql .= " a.datep,"; + $sql .= " a.datep2,"; + $sql .= " a.durationp,"; // deprecated + $sql .= " a.datec,"; + $sql .= " a.tms as datem,"; + $sql .= " a.code, a.label, a.note,"; + $sql .= " a.fk_soc,"; + $sql .= " a.fk_project,"; + $sql .= " a.fk_user_author, a.fk_user_mod,"; + $sql .= " a.fk_user_action, a.fk_user_done,"; + $sql .= " a.fk_contact, a.percent as percentage,"; + $sql .= " a.fk_element as elementid, a.elementtype,"; + $sql .= " a.priority, a.fulldayevent, a.location, a.transparency,"; + $sql .= " a.email_msgid, a.email_subject, a.email_from, a.email_to, a.email_tocc, a.email_tobcc, a.errors_to,"; + $sql .= " c.id as type_id, c.code as type_code, c.libelle as type_label, c.color as type_color, c.picto as type_picto,"; + $sql .= " s.nom as socname,"; + $sql .= " u.firstname, u.lastname as lastname"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a "; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action=c.id "; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; + $sql .= " WHERE "; + if ($ref) $sql .= " a.id = ".((int) $ref); // No field ref, we use id + elseif ($ref_ext) $sql .= " a.ref_ext = '".$this->db->escape($ref_ext)."'"; + elseif ($email_msgid) $sql .= " a.email_msgid = '".$this->db->escape($email_msgid)."'"; + else $sql .= " a.id = ".((int) $id); - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - if ($num) - { - $obj = $this->db->fetch_object($resql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + if ($num) + { + $obj = $this->db->fetch_object($resql); - $this->id = $obj->id; - $this->entity = $obj->entity; - $this->ref = $obj->ref; - $this->ref_ext = $obj->ref_ext; + $this->id = $obj->id; + $this->entity = $obj->entity; + $this->ref = $obj->ref; + $this->ref_ext = $obj->ref_ext; - // Properties of parent table llx_c_actioncomm - $this->type_id = $obj->type_id; - $this->type_code = $obj->type_code; - $this->type_color = $obj->type_color; - $this->type_picto = $obj->type_picto; - $transcode = $langs->trans("Action".$obj->type_code); - $this->type = (($transcode != "Action".$obj->type_code) ? $transcode : $obj->type_label); - $transcode = $langs->trans("Action".$obj->type_code.'Short'); - $this->type_short = (($transcode != "Action".$obj->type_code.'Short') ? $transcode : ''); + // Properties of parent table llx_c_actioncomm + $this->type_id = $obj->type_id; + $this->type_code = $obj->type_code; + $this->type_color = $obj->type_color; + $this->type_picto = $obj->type_picto; + $transcode = $langs->trans("Action".$obj->type_code); + $this->type = (($transcode != "Action".$obj->type_code) ? $transcode : $obj->type_label); + $transcode = $langs->trans("Action".$obj->type_code.'Short'); + $this->type_short = (($transcode != "Action".$obj->type_code.'Short') ? $transcode : ''); $this->code = $obj->code; - $this->label = $obj->label; - $this->datep = $this->db->jdate($obj->datep); - $this->datef = $this->db->jdate($obj->datep2); + $this->label = $obj->label; + $this->datep = $this->db->jdate($obj->datep); + $this->datef = $this->db->jdate($obj->datep2); - $this->datec = $this->db->jdate($obj->datec); - $this->datem = $this->db->jdate($obj->datem); + $this->datec = $this->db->jdate($obj->datec); + $this->datem = $this->db->jdate($obj->datem); - $this->note = $obj->note; // deprecated - $this->note_private = $obj->note; - $this->percentage = $obj->percentage; + $this->note = $obj->note; // deprecated + $this->note_private = $obj->note; + $this->percentage = $obj->percentage; - $this->authorid = $obj->fk_user_author; - $this->usermodid = $obj->fk_user_mod; + $this->authorid = $obj->fk_user_author; + $this->usermodid = $obj->fk_user_mod; - if (!is_object($this->author)) $this->author = new stdClass(); // To avoid warning - $this->author->id = $obj->fk_user_author; // deprecated - $this->author->firstname = $obj->firstname; // deprecated - $this->author->lastname = $obj->lastname; // deprecated - if (!is_object($this->usermod)) $this->usermod = new stdClass(); // To avoid warning - $this->usermod->id = $obj->fk_user_mod; // deprecated + if (!is_object($this->author)) $this->author = new stdClass(); // To avoid warning + $this->author->id = $obj->fk_user_author; // deprecated + $this->author->firstname = $obj->firstname; // deprecated + $this->author->lastname = $obj->lastname; // deprecated + if (!is_object($this->usermod)) $this->usermod = new stdClass(); // To avoid warning + $this->usermod->id = $obj->fk_user_mod; // deprecated - $this->userownerid = $obj->fk_user_action; - $this->userdoneid = $obj->fk_user_done; - $this->priority = $obj->priority; - $this->fulldayevent = $obj->fulldayevent; - $this->location = $obj->location; - $this->transparency = $obj->transparency; + $this->userownerid = $obj->fk_user_action; + $this->userdoneid = $obj->fk_user_done; + $this->priority = $obj->priority; + $this->fulldayevent = $obj->fulldayevent; + $this->location = $obj->location; + $this->transparency = $obj->transparency; - $this->socid = $obj->fk_soc; // To have fetch_thirdparty method working - $this->contactid = $obj->fk_contact; // To have fetch_contact method working - $this->fk_project = $obj->fk_project; // To have fetch_projet method working + $this->socid = $obj->fk_soc; // To have fetch_thirdparty method working + $this->contact_id = $obj->fk_contact; // To have fetch_contact method working + $this->fk_project = $obj->fk_project; // To have fetch_projet method working - //$this->societe->id = $obj->fk_soc; // deprecated - //$this->contact->id = $obj->fk_contact; // deprecated + //$this->societe->id = $obj->fk_soc; // deprecated + //$this->contact->id = $obj->fk_contact; // deprecated - $this->fk_element = $obj->elementid; - $this->elementid = $obj->elementid; - $this->elementtype = $obj->elementtype; + $this->fk_element = $obj->elementid; + $this->elementid = $obj->elementid; + $this->elementtype = $obj->elementtype; - $this->fetchResources(); - } - $this->db->free($resql); - } - else - { - $this->error = $this->db->lasterror(); - return -1; - } + $this->fetchResources(); + } + $this->db->free($resql); + } else { + $this->error = $this->db->lasterror(); + return -1; + } - return $num; - } + return $num; + } - /** - * Initialize $this->userassigned & this->socpeopleassigned array with list of id of user and contact assigned to event - * - * @return int <0 if KO, >0 if OK - */ - public function fetchResources() - { - $this->userassigned = array(); - $this->socpeopleassigned = array(); + /** + * Initialize $this->userassigned & this->socpeopleassigned array with list of id of user and contact assigned to event + * + * @return int <0 if KO, >0 if OK + */ + public function fetchResources() + { + $this->userassigned = array(); + $this->socpeopleassigned = array(); - $sql = 'SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency'; + $sql = 'SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency'; $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm_resources'; $sql .= ' WHERE fk_actioncomm = '.$this->id; $sql .= " AND element_type IN ('user', 'socpeople')"; @@ -796,9 +809,9 @@ class ActionComm extends CommonObject // If owner is known, we must but id first into list if ($this->userownerid > 0) $this->userassigned[$this->userownerid] = array('id'=>$this->userownerid); // Set first so will be first into list. - while ($obj = $this->db->fetch_object($resql)) - { - if ($obj->fk_element > 0) + while ($obj = $this->db->fetch_object($resql)) + { + if ($obj->fk_element > 0) { switch ($obj->element_type) { case 'user': @@ -810,90 +823,86 @@ class ActionComm extends CommonObject break; } } - } + } - return 1; - } - else - { + return 1; + } else { dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Initialize this->userassigned array with list of id of user assigned to event - * - * @param bool $override Override $this->userownerid when empty. TODO This should be false by default. True is here to fix corrupted data. - * @return int <0 if KO, >0 if OK - */ - public function fetch_userassigned($override = true) - { - // phpcs:enable - $sql = "SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency"; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm_resources"; - $sql .= " WHERE element_type = 'user' AND fk_actioncomm = ".$this->id; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Initialize this->userassigned array with list of id of user assigned to event + * + * @param bool $override Override $this->userownerid when empty. TODO This should be false by default. True is here to fix corrupted data. + * @return int <0 if KO, >0 if OK + */ + public function fetch_userassigned($override = true) + { + // phpcs:enable + $sql = "SELECT fk_actioncomm, element_type, fk_element, answer_status, mandatory, transparency"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm_resources"; + $sql .= " WHERE element_type = 'user' AND fk_actioncomm = ".$this->id; - $resql2 = $this->db->query($sql); - if ($resql2) - { - $this->userassigned = array(); + $resql2 = $this->db->query($sql); + if ($resql2) + { + $this->userassigned = array(); - // If owner is known, we must but id first into list - if ($this->userownerid > 0) - { - // Set first so will be first into list. - $this->userassigned[$this->userownerid] = array('id'=>$this->userownerid); - } + // If owner is known, we must but id first into list + if ($this->userownerid > 0) + { + // Set first so will be first into list. + $this->userassigned[$this->userownerid] = array('id'=>$this->userownerid); + } - while ($obj = $this->db->fetch_object($resql2)) - { - if ($obj->fk_element > 0) - { - $this->userassigned[$obj->fk_element] = array('id'=>$obj->fk_element, - 'mandatory'=>$obj->mandatory, - 'answer_status'=>$obj->answer_status, - 'transparency'=>$obj->transparency); - } + while ($obj = $this->db->fetch_object($resql2)) + { + if ($obj->fk_element > 0) + { + $this->userassigned[$obj->fk_element] = array('id'=>$obj->fk_element, + 'mandatory'=>$obj->mandatory, + 'answer_status'=>$obj->answer_status, + 'transparency'=>$obj->transparency); + } - if ($override === true) - { - // If not defined (should not happened, we fix this) - if (empty($this->userownerid)) - { - $this->userownerid = $obj->fk_element; - } - } - } + if ($override === true) + { + // If not defined (should not happened, we fix this) + if (empty($this->userownerid)) + { + $this->userownerid = $obj->fk_element; + } + } + } - return 1; - } - else - { - dol_print_error($this->db); - return -1; - } - } + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } - /** - * Delete event from database - * - * @param int $notrigger 1 = disable triggers, 0 = enable triggers - * @return int <0 if KO, >0 if OK - */ - public function delete($notrigger = 0) - { - global $user; + /** + * Delete event from database + * + * @param int $notrigger 1 = disable triggers, 0 = enable triggers + * @return int <0 if KO, >0 if OK + */ + public function delete($notrigger = 0) + { + global $user; - $error = 0; + $error = 0; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); + dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $this->db->begin(); + $this->db->begin(); - // remove categorie association - if (!$error) { + // remove categorie association + if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."categorie_actioncomm"; $sql .= " WHERE fk_actioncomm=".$this->id; @@ -902,152 +911,160 @@ class ActionComm extends CommonObject $this->error = $this->db->lasterror(); $error++; } - } + } - // remove actioncomm_resources - if (!$error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources"; - $sql .= " WHERE fk_actioncomm=".$this->id; + // remove actioncomm_resources + if (!$error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources"; + $sql .= " WHERE fk_actioncomm=".$this->id; - $res = $this->db->query($sql); - if (!$res) { - $this->error = $this->db->lasterror(); - $error++; - } - } + $res = $this->db->query($sql); + if (!$res) { + $this->error = $this->db->lasterror(); + $error++; + } + } - // Removed extrafields - if (!$error) { - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $error++; - dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); - } - } + if (!$error) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; + $sql .= " WHERE fk_actioncomm = ".$this->id; - // remove actioncomm - if (!$error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; - $sql .= " WHERE id=".$this->id; + $res = $this->db->query($sql); + if (!$res) { + $this->error = $this->db->lasterror(); + $error++; + } + } - $res = $this->db->query($sql); - if (!$res) { - $this->error = $this->db->lasterror(); - $error++; - } - } + // Removed extrafields + if (!$error) { + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error -3 ".$this->error, LOG_ERR); + } + } - if (!$error) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('ACTION_DELETE', $user); - if ($result < 0) { $error++; } - // End call triggers - } + // remove actioncomm + if (!$error) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm"; + $sql .= " WHERE id=".$this->id; - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -2; - } - } - else - { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - return -1; - } - } + $res = $this->db->query($sql); + if (!$res) { + $this->error = $this->db->lasterror(); + $error++; + } + } - /** - * Update action into database - * If percentage = 100, on met a jour date 100% - * - * @param User $user Object user making change - * @param int $notrigger 1 = disable triggers, 0 = enable triggers - * @return int <0 if KO, >0 if OK - */ - public function update($user, $notrigger = 0) - { - global $langs, $conf, $hookmanager; + if (!$error) + { + if (!$notrigger) + { + // Call trigger + $result = $this->call_trigger('ACTION_DELETE', $user); + if ($result < 0) { $error++; } + // End call triggers + } - $error = 0; + if (!$error) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -2; + } + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + return -1; + } + } - // Clean parameters - $this->label = trim($this->label); - $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); - if (empty($this->percentage)) $this->percentage = 0; - if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; - if (empty($this->transparency)) $this->transparency = 0; - if (empty($this->fulldayevent)) $this->fulldayevent = 0; - if ($this->percentage > 100) $this->percentage = 100; - //if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date; - if ($this->datep && $this->datef) $this->durationp = ($this->datef - $this->datep); // deprecated - //if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date); - if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef = $this->datep; - //if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date; - if ($this->fk_project < 0) $this->fk_project = 0; + /** + * Update action into database + * If percentage = 100, on met a jour date 100% + * + * @param User $user Object user making change + * @param int $notrigger 1 = disable triggers, 0 = enable triggers + * @return int <0 if KO, >0 if OK + */ + public function update($user, $notrigger = 0) + { + global $langs, $conf, $hookmanager; - // Check parameters - if ($this->percentage == 0 && $this->userdoneid > 0) - { - $this->error = "ErrorCantSaveADoneUserWithZeroPercentage"; - return -1; - } + $error = 0; - $socid = (($this->socid > 0) ? $this->socid : 0); - $contactid = (($this->contactid > 0) ? $this->contactid : 0); + // Clean parameters + $this->label = trim($this->label); + $this->note_private = dol_htmlcleanlastbr(trim(empty($this->note_private) ? $this->note : $this->note_private)); + if (empty($this->percentage)) $this->percentage = 0; + if (empty($this->priority) || !is_numeric($this->priority)) $this->priority = 0; + if (empty($this->transparency)) $this->transparency = 0; + if (empty($this->fulldayevent)) $this->fulldayevent = 0; + if ($this->percentage > 100) $this->percentage = 100; + //if ($this->percentage == 100 && ! $this->dateend) $this->dateend = $this->date; + if ($this->datep && $this->datef) $this->durationp = ($this->datef - $this->datep); // deprecated + //if ($this->date && $this->dateend) $this->durationa=($this->dateend - $this->date); + if ($this->datep && $this->datef && $this->datep > $this->datef) $this->datef = $this->datep; + //if ($this->date && $this->dateend && $this->date > $this->dateend) $this->dateend=$this->date; + if ($this->fk_project < 0) $this->fk_project = 0; + + // Check parameters + if ($this->percentage == 0 && $this->userdoneid > 0) + { + $this->error = "ErrorCantSaveADoneUserWithZeroPercentage"; + return -1; + } + + $socid = (($this->socid > 0) ? $this->socid : 0); + $contactid = (($this->contact_id > 0) ? $this->contact_id : 0); $userownerid = ($this->userownerid ? $this->userownerid : 0); $userdoneid = ($this->userdoneid ? $this->userdoneid : 0); - $this->db->begin(); + $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; - $sql .= " SET percent = '".$this->db->escape($this->percentage)."'"; - if ($this->type_id > 0) $sql .= ", fk_action = '".$this->db->escape($this->type_id)."'"; - $sql .= ", label = ".($this->label ? "'".$this->db->escape($this->label)."'" : "null"); - $sql .= ", datep = ".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null'); - $sql .= ", datep2 = ".(strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : 'null'); - $sql .= ", durationp = ".(isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '' ? "'".$this->db->escape($this->durationp)."'" : "null"); // deprecated - $sql .= ", note = '".$this->db->escape($this->note_private)."'"; - $sql .= ", fk_project =".($this->fk_project > 0 ? $this->fk_project : "null"); - $sql .= ", fk_soc =".($socid > 0 ? $socid : "null"); - $sql .= ", fk_contact =".($contactid > 0 ? $contactid : "null"); - $sql .= ", priority = '".$this->db->escape($this->priority)."'"; - $sql .= ", fulldayevent = '".$this->db->escape($this->fulldayevent)."'"; - $sql .= ", location = ".($this->location ? "'".$this->db->escape($this->location)."'" : "null"); - $sql .= ", transparency = '".$this->db->escape($this->transparency)."'"; - $sql .= ", fk_user_mod = ".$user->id; - $sql .= ", fk_user_action=".($userownerid > 0 ? "'".$userownerid."'" : "null"); - $sql .= ", fk_user_done=".($userdoneid > 0 ? "'".$userdoneid."'" : "null"); - if (!empty($this->fk_element)) $sql .= ", fk_element=".($this->fk_element ? $this->db->escape($this->fk_element) : "null"); - if (!empty($this->elementtype)) $sql .= ", elementtype=".($this->elementtype ? "'".$this->db->escape($this->elementtype)."'" : "null"); - $sql .= " WHERE id=".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; + $sql .= " SET percent = '".$this->db->escape($this->percentage)."'"; + if ($this->type_id > 0) $sql .= ", fk_action = '".$this->db->escape($this->type_id)."'"; + $sql .= ", label = ".($this->label ? "'".$this->db->escape($this->label)."'" : "null"); + $sql .= ", datep = ".(strval($this->datep) != '' ? "'".$this->db->idate($this->datep)."'" : 'null'); + $sql .= ", datep2 = ".(strval($this->datef) != '' ? "'".$this->db->idate($this->datef)."'" : 'null'); + $sql .= ", durationp = ".(isset($this->durationp) && $this->durationp >= 0 && $this->durationp != '' ? "'".$this->db->escape($this->durationp)."'" : "null"); // deprecated + $sql .= ", note = '".$this->db->escape($this->note_private)."'"; + $sql .= ", fk_project =".($this->fk_project > 0 ? $this->fk_project : "null"); + $sql .= ", fk_soc =".($socid > 0 ? $socid : "null"); + $sql .= ", fk_contact =".($contactid > 0 ? $contactid : "null"); + $sql .= ", priority = '".$this->db->escape($this->priority)."'"; + $sql .= ", fulldayevent = '".$this->db->escape($this->fulldayevent)."'"; + $sql .= ", location = ".($this->location ? "'".$this->db->escape($this->location)."'" : "null"); + $sql .= ", transparency = '".$this->db->escape($this->transparency)."'"; + $sql .= ", fk_user_mod = ".$user->id; + $sql .= ", fk_user_action = ".($userownerid > 0 ? "'".$this->db->escape($userownerid)."'" : "null"); + $sql .= ", fk_user_done = ".($userdoneid > 0 ? "'".$this->db->escape($userdoneid)."'" : "null"); + if (!empty($this->fk_element)) $sql .= ", fk_element=".($this->fk_element ? $this->db->escape($this->fk_element) : "null"); + if (!empty($this->elementtype)) $sql .= ", elementtype=".($this->elementtype ? "'".$this->db->escape($this->elementtype)."'" : "null"); + $sql .= " WHERE id=".$this->id; - dol_syslog(get_class($this)."::update", LOG_DEBUG); - if ($this->db->query($sql)) - { + dol_syslog(get_class($this)."::update", LOG_DEBUG); + if ($this->db->query($sql)) + { $action = 'update'; - // Actions on extra fields - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + // Actions on extra fields + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } - // Now insert assignedusers + // Now insert assignedusers if (!$error) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources where fk_actioncomm = ".$this->id." AND element_type = 'user'"; @@ -1055,10 +1072,10 @@ class ActionComm extends CommonObject foreach ($this->userassigned as $key => $val) { - if (!is_array($val)) // For backward compatibility when val=id - { - $val = array('id'=>$val); - } + if (!is_array($val)) // For backward compatibility when val=id + { + $val = array('id'=>$val); + } $sql = "INSERT INTO ".MAIN_DB_PREFIX."actioncomm_resources(fk_actioncomm, element_type, fk_element, mandatory, transparency, answer_status)"; $sql .= " VALUES(".$this->id.", 'user', ".$val['id'].", ".(empty($val['mandatory']) ? '0' : $val['mandatory']).", ".(empty($val['transparency']) ? '0' : $val['transparency']).", ".(empty($val['answer_status']) ? '0' : $val['answer_status']).")"; @@ -1066,7 +1083,7 @@ class ActionComm extends CommonObject if (!$resql) { $error++; - $this->errors[] = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); } //var_dump($sql);exit; } @@ -1094,273 +1111,272 @@ class ActionComm extends CommonObject } } - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('ACTION_MODIFY', $user); - if ($result < 0) { $error++; } - // End call triggers - } + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('ACTION_MODIFY', $user); + if ($result < 0) { $error++; } + // End call triggers + } - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - dol_syslog(get_class($this)."::update ".join(',', $this->errors), LOG_ERR); - return -2; - } - } - else - { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - return -1; - } - } + if (!$error) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + dol_syslog(get_class($this)."::update ".join(',', $this->errors), LOG_ERR); + return -2; + } + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + return -1; + } + } - /** - * Load all objects with filters. - * @todo WARNING: This make a fetch on all records instead of making one request with a join. - * - * @param DoliDb $db Database handler - * @param int $socid Filter by thirdparty - * @param int $fk_element Id of element action is linked to - * @param string $elementtype Type of element action is linked to - * @param string $filter Other filter - * @param string $sortfield Sort on this field - * @param string $sortorder ASC or DESC - * @param string $limit Limit number of answers - * @return array|string Error string if KO, array with actions if OK - */ - public static function getActions($db, $socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0) - { - global $conf, $langs; + /** + * Load all objects with filters. + * @todo WARNING: This make a fetch on all records instead of making one request with a join. + * + * @param DoliDb $db Not used + * @param int $socid Filter by thirdparty + * @param int $fk_element Id of element action is linked to + * @param string $elementtype Type of element action is linked to + * @param string $filter Other filter + * @param string $sortfield Sort on this field + * @param string $sortorder ASC or DESC + * @param string $limit Limit number of answers + * @return array|string Error string if KO, array with actions if OK + */ + public static function getActions($db, $socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0) + { + global $conf, $langs; - $resarray = array(); + $resarray = array(); - dol_syslog(get_class()."::getActions", LOG_DEBUG); + dol_syslog(get_class()."::getActions", LOG_DEBUG); - $sql = "SELECT a.id"; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; - $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; - if (!empty($socid)) $sql .= " AND a.fk_soc = ".$socid; - if (!empty($elementtype)) - { - if ($elementtype == 'project') $sql .= ' AND a.fk_project = '.$fk_element; - else $sql .= " AND a.fk_element = ".(int) $fk_element." AND a.elementtype = '".$elementtype."'"; - } - if (!empty($filter)) $sql .= $filter; + $sql = "SELECT a.id"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; + $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; + if (!empty($socid)) $sql .= " AND a.fk_soc = ".$socid; + if (!empty($elementtype)) + { + if ($elementtype == 'project') { + $sql .= ' AND a.fk_project = '.$fk_element; + } + elseif ($elementtype == 'contact') { + $sql .= ' AND a.id IN'; + $sql .= " (SELECT fk_actioncomm FROM ".MAIN_DB_PREFIX."actioncomm_resources WHERE"; + $sql .= " element_type = 'socpeople' AND fk_element = ".$fk_element.')'; + } + else { + $sql .= " AND a.fk_element = ".(int) $fk_element." AND a.elementtype = '".$db->escape($elementtype)."'"; + } + } + if (!empty($filter)) $sql .= $filter; if ($sortorder && $sortfield) $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($limit, 0); - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); - if ($num) - { - for ($i = 0; $i < $num; $i++) - { - $obj = $db->fetch_object($resql); - $actioncommstatic = new ActionComm($db); - $actioncommstatic->fetch($obj->id); - $resarray[$i] = $actioncommstatic; - } - } - $db->free($resql); - return $resarray; - } - else - { - return $db->lasterror(); - } - } + if ($num) + { + for ($i = 0; $i < $num; $i++) + { + $obj = $db->fetch_object($resql); + $actioncommstatic = new ActionComm($db); + $actioncommstatic->fetch($obj->id); + $resarray[$i] = $actioncommstatic; + } + } + $db->free($resql); + return $resarray; + } else { + return $db->lasterror(); + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Load indicators for dashboard (this->nbtodo and this->nbtodolate) - * - * @param User $user Objet user - * @param int $load_state_board Charge indicateurs this->nb de tableau de bord - * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK - */ - public function load_board($user, $load_state_board = 0) - { - // phpcs:enable - global $conf, $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Load indicators for dashboard (this->nbtodo and this->nbtodolate) + * + * @param User $user Objet user + * @param int $load_state_board Charge indicateurs this->nb de tableau de bord + * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK + */ + public function load_board($user, $load_state_board = 0) + { + // phpcs:enable + global $conf, $langs; - if (empty($load_state_board)) $sql = "SELECT a.id, a.datep as dp"; - else { - $this->nb = array(); - $sql = "SELECT count(a.id) as nb"; - } - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; - $sql .= " WHERE 1 = 1"; - if (empty($load_state_board)) $sql .= " AND a.percent >= 0 AND a.percent < 100"; - $sql .= " AND a.entity IN (".getEntity('agenda').")"; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")"; - if ($user->socid) $sql .= " AND a.fk_soc = ".$user->socid; - if (!$user->rights->agenda->allactions->read) $sql .= " AND (a.fk_user_author = ".$user->id." OR a.fk_user_action = ".$user->id." OR a.fk_user_done = ".$user->id.")"; + if (empty($load_state_board)) $sql = "SELECT a.id, a.datep as dp"; + else { + $this->nb = array(); + $sql = "SELECT count(a.id) as nb"; + } + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid"; + $sql .= " WHERE 1 = 1"; + if (empty($load_state_board)) $sql .= " AND a.percent >= 0 AND a.percent < 100"; + $sql .= " AND a.entity IN (".getEntity('agenda').")"; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND (a.fk_soc IS NULL OR sc.fk_user = ".$user->id.")"; + if ($user->socid) $sql .= " AND a.fk_soc = ".$user->socid; + if (!$user->rights->agenda->allactions->read) $sql .= " AND (a.fk_user_author = ".$user->id." OR a.fk_user_action = ".$user->id." OR a.fk_user_done = ".$user->id.")"; - $resql = $this->db->query($sql); - if ($resql) - { - if (empty($load_state_board)) { - $agenda_static = new ActionComm($this->db); - $response = new WorkboardResponse(); - $response->warning_delay = $conf->agenda->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("ActionsToDo"); - $response->labelShort = $langs->trans("ActionsToDoShort"); - $response->url = DOL_URL_ROOT.'/comm/action/list.php?actioncode=0&status=todo&mainmenu=agenda'; - if ($user->rights->agenda->allactions->read) $response->url .= '&filtert=-1'; - $response->img = img_object('', "action", 'class="inline-block valigntextmiddle"'); - } - // This assignment in condition is not a bug. It allows walking the results. - while ($obj = $this->db->fetch_object($resql)) - { - if (empty($load_state_board)) { - $response->nbtodo++; - $agenda_static->datep = $this->db->jdate($obj->dp); - if ($agenda_static->hasDelay()) $response->nbtodolate++; - } else $this->nb["actionscomm"] = $obj->nb; - } + $resql = $this->db->query($sql); + if ($resql) + { + if (empty($load_state_board)) { + $agenda_static = new ActionComm($this->db); + $response = new WorkboardResponse(); + $response->warning_delay = $conf->agenda->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("ActionsToDo"); + $response->labelShort = $langs->trans("ActionsToDoShort"); + $response->url = DOL_URL_ROOT.'/comm/action/list.php?action=show_list&actioncode=0&status=todo&mainmenu=agenda'; + if ($user->rights->agenda->allactions->read) $response->url .= '&filtert=-1'; + $response->img = img_object('', "action", 'class="inline-block valigntextmiddle"'); + } + // This assignment in condition is not a bug. It allows walking the results. + while ($obj = $this->db->fetch_object($resql)) + { + if (empty($load_state_board)) { + $response->nbtodo++; + $agenda_static->datep = $this->db->jdate($obj->dp); + if ($agenda_static->hasDelay()) $response->nbtodolate++; + } else $this->nb["actionscomm"] = $obj->nb; + } - $this->db->free($resql); - if (empty($load_state_board)) return $response; - else return 1; - } - else - { - dol_print_error($this->db); - $this->error = $this->db->error(); - return -1; - } - } + $this->db->free($resql); + if (empty($load_state_board)) return $response; + else return 1; + } else { + dol_print_error($this->db); + $this->error = $this->db->error(); + return -1; + } + } - /** - * Charge les informations d'ordre info dans l'objet facture - * - * @param int $id Id de la facture a charger - * @return void - */ - public function info($id) - { - $sql = 'SELECT '; - $sql .= ' a.id,'; - $sql .= ' datec,'; - $sql .= ' tms as datem,'; - $sql .= ' fk_user_author,'; - $sql .= ' fk_user_mod'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a'; - $sql .= ' WHERE a.id = '.$id; + /** + * Charge les informations d'ordre info dans l'objet facture + * + * @param int $id Id de la facture a charger + * @return void + */ + public function info($id) + { + $sql = 'SELECT '; + $sql .= ' a.id,'; + $sql .= ' datec,'; + $sql .= ' tms as datem,'; + $sql .= ' fk_user_author,'; + $sql .= ' fk_user_mod'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a'; + $sql .= ' WHERE a.id = '.$id; - dol_syslog(get_class($this)."::info", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { - $obj = $this->db->fetch_object($result); - $this->id = $obj->id; - if ($obj->fk_user_author) - { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_mod) - { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_mod); - $this->user_modification = $muser; - } + dol_syslog(get_class($this)."::info", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + $this->id = $obj->id; + if ($obj->fk_user_author) + { + $cuser = new User($this->db); + $cuser->fetch($obj->fk_user_author); + $this->user_creation = $cuser; + } + if ($obj->fk_user_mod) + { + $muser = new User($this->db); + $muser->fetch($obj->fk_user_mod); + $this->user_modification = $muser; + } - $this->date_creation = $this->db->jdate($obj->datec); - if (!empty($obj->fk_user_mod)) $this->date_modification = $this->db->jdate($obj->datem); - } - $this->db->free($result); - } - else - { - dol_print_error($this->db); - } - } + $this->date_creation = $this->db->jdate($obj->datec); + if (!empty($obj->fk_user_mod)) $this->date_modification = $this->db->jdate($obj->datem); + } + $this->db->free($result); + } else { + dol_print_error($this->db); + } + } - /** - * Return label of status - * - * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * @param int $hidenastatus 1=Show nothing if status is "Not applicable" - * @return string String with status - */ - public function getLibStatut($mode, $hidenastatus = 0) - { - return $this->LibStatut($this->percentage, $mode, $hidenastatus, $this->datep); - } + /** + * Return label of status + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @param int $hidenastatus 1=Show nothing if status is "Not applicable" + * @return string String with status + */ + public function getLibStatut($mode, $hidenastatus = 0) + { + return $this->LibStatut($this->percentage, $mode, $hidenastatus, $this->datep); + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return label of action status - * - * @param int $percent Percent - * @param int $mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Picto+Long label, 7=Very short label+Picto - * @param int $hidenastatus 1=Show nothing if status is "Not applicable" - * @param int $datestart Date start of event - * @return string Label - */ - public function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '') - { - // phpcs:enable - global $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return label of action status + * + * @param int $percent Percent + * @param int $mode 0=Long label, 1=Short label, 2=Picto+Short label, 3=Picto, 4=Picto+Short label, 5=Short label+Picto, 6=Picto+Long label, 7=Very short label+Picto + * @param int $hidenastatus 1=Show nothing if status is "Not applicable" + * @param int $datestart Date start of event + * @return string Label + */ + public function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '') + { + // phpcs:enable + global $langs; - $labelStatus = $langs->trans('StatusNotApplicable'); - if ($percent == -1 && !$hidenastatus) $labelStatus = $langs->trans('StatusNotApplicable'); - elseif ($percent == 0) $labelStatus = $langs->trans('StatusActionToDo').' (0%)'; - elseif ($percent > 0 && $percent < 100) $labelStatus = $langs->trans('StatusActionInProcess').' ('.$percent.'%)'; - elseif ($percent >= 100) $labelStatus = $langs->trans('StatusActionDone').' (100%)'; + $labelStatus = $langs->trans('StatusNotApplicable'); + if ($percent == -1 && !$hidenastatus) $labelStatus = $langs->trans('StatusNotApplicable'); + elseif ($percent == 0) $labelStatus = $langs->trans('StatusActionToDo').' (0%)'; + elseif ($percent > 0 && $percent < 100) $labelStatus = $langs->trans('StatusActionInProcess').' ('.$percent.'%)'; + elseif ($percent >= 100) $labelStatus = $langs->trans('StatusActionDone').' (100%)'; - $labelStatusShort = $langs->trans('StatusNotApplicable'); - if ($percent == -1 && !$hidenastatus) $labelStatusShort = $langs->trans('NA'); - elseif ($percent == 0) $labelStatusShort = '0%'; - elseif ($percent > 0 && $percent < 100) $labelStatusShort = $percent.'%'; - elseif ($percent >= 100) $labelStatusShort = '100%'; + $labelStatusShort = $langs->trans('StatusNotApplicable'); + if ($percent == -1 && !$hidenastatus) $labelStatusShort = $langs->trans('NA'); + elseif ($percent == 0) $labelStatusShort = '0%'; + elseif ($percent > 0 && $percent < 100) $labelStatusShort = $percent.'%'; + elseif ($percent >= 100) $labelStatusShort = '100%'; - $statusType = 'status9'; - if ($percent == -1 && !$hidenastatus) $statusType = 'status9'; - if ($percent == 0) $statusType = 'status1'; - if ($percent > 0 && $percent < 100) $statusType = 'status3'; - if ($percent >= 100) $statusType = 'status6'; + $statusType = 'status9'; + if ($percent == -1 && !$hidenastatus) $statusType = 'status9'; + if ($percent == 0) $statusType = 'status1'; + if ($percent > 0 && $percent < 100) $statusType = 'status3'; + if ($percent >= 100) $statusType = 'status6'; - return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); - } + return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode); + } - /** - * Return URL of event - * Use $this->id, $this->type_code, $this->label and $this->type_label - * - * @param int $withpicto 0 = No picto, 1 = Include picto into link, 2 = Only picto - * @param int $maxlength Max number of charaters into label. If negative, use the ref as label. - * @param string $classname Force style class on a link - * @param string $option '' = Link to action, 'birthday'= Link to contact, 'holiday' = Link to leave - * @param int $overwritepicto 1 = Overwrite picto - * @param int $notooltip 1 = Disable tooltip - * @param int $save_lastsearch_value -1 = Auto, 0 = No save of lastsearch_values when clicking, 1 = Save lastsearch_values whenclicking - * @return string Chaine avec URL - */ - public function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $option = '', $overwritepicto = 0, $notooltip = 0, $save_lastsearch_value = -1) - { - global $conf, $langs, $user, $hookmanager, $action; + /** + * Return URL of event + * Use $this->id, $this->type_code, $this->label and $this->type_label + * + * @param int $withpicto 0 = No picto, 1 = Include picto into link, 2 = Only picto + * @param int $maxlength Max number of charaters into label. If negative, use the ref as label. + * @param string $classname Force style class on a link + * @param string $option '' = Link to action, 'birthday'= Link to contact, 'holiday' = Link to leave + * @param int $overwritepicto 1 = Overwrite picto + * @param int $notooltip 1 = Disable tooltip + * @param int $save_lastsearch_value -1 = Auto, 0 = No save of lastsearch_values when clicking, 1 = Save lastsearch_values whenclicking + * @return string Chaine avec URL + */ + public function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $option = '', $overwritepicto = 0, $notooltip = 0, $save_lastsearch_value = -1) + { + global $conf, $langs, $user, $hookmanager, $action; - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $canread = 0; if ($user->rights->agenda->myactions->read && $this->authorid == $user->id) $canread = 1; // Can read my event @@ -1368,10 +1384,10 @@ class ActionComm extends CommonObject if ($user->rights->agenda->allactions->read) $canread = 1; // Can read all event of other if (!$canread) { - $option = 'nolink'; + $option = 'nolink'; } - $label = $this->label; + $label = $this->label; if (empty($label)) $label = $this->libelle; // For backward compatibility $result = ''; @@ -1384,10 +1400,10 @@ class ActionComm extends CommonObject } if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL'); + if ($this->type_code != 'AC_OTH_AUTO') $labeltype = $langs->trans('ActionAC_MANUAL'); } - $tooltip = ''.$langs->trans('Action').''; + $tooltip = img_picto('', $this->picto).' '.$langs->trans('Action').''; if (!empty($this->ref)) $tooltip .= '
    '.$langs->trans('Ref').': '.$this->ref; if (!empty($label)) @@ -1396,38 +1412,38 @@ class ActionComm extends CommonObject $tooltip .= '
    '.$langs->trans('Type').': '.$labeltype; if (!empty($this->location)) $tooltip .= '
    '.$langs->trans('Location').': '.$this->location; + if (isset($this->transparency)) + $tooltip .= '
    '.$langs->trans('Busy').': '.yn($this->transparency); if (!empty($this->note_private)) - $tooltip .= '
    '.$langs->trans('Note').': '.(dol_textishtml($this->note_private) ? str_replace(array("\r", "\n"), "", $this->note_private) : str_replace(array("\r", "\n"), '
    ', $this->note_private)); + $tooltip .= '
    '.$langs->trans('Note').': '.(dol_textishtml($this->note_private) ? str_replace(array("\r", "\n"), "", $this->note_private) : str_replace(array("\r", "\n"), '
    ', $this->note_private)); $linkclose = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && $this->type_color) $linkclose = ' style="background-color:#'.$this->type_color.'"'; if (empty($notooltip)) { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label = $langs->trans("ShowAction"); - $linkclose .= ' alt="'.dol_escape_htmltag($tooltip, 1).'"'; - } - $linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1).'"'; - $linkclose .= ' class="'.$classname.' classfortooltip"'; + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label = $langs->trans("ShowAction"); + $linkclose .= ' alt="'.dol_escape_htmltag($tooltip, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($tooltip, 1).'"'; + $linkclose .= ' class="'.$classname.' classfortooltip"'; - /* + /* $hookmanager->initHooks(array('actiondao')); $parameters=array('id'=>$this->id); $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks $linkclose = ($hookmanager->resPrint ? $hookmanager->resPrint : $linkclose); */ - } - else $linkclose .= ' class="'.$classname.'"'; + } else $linkclose .= ' class="'.$classname.'"'; $url = ''; if ($option == 'birthday') $url = DOL_URL_ROOT.'/contact/perso.php?id='.$this->id; elseif ($option == 'holiday') - $url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id; - else - $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id; + $url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id; + else $url = DOL_URL_ROOT.'/comm/action/card.php?id='.$this->id; if ($option !== 'nolink') { // Add param to save lastsearch_values or not @@ -1445,172 +1461,170 @@ class ActionComm extends CommonObject $linkend = ''; } - if ($withpicto == 2) - { - $libelle = $label; - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) $libelle = $labeltype; - $libelleshort = ''; - } - else - { - $libelle = (empty($this->libelle) ? $label : $this->libelle.(($label && $label != $this->libelle) ? ' '.$label : '')); - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($libelle)) $libelle = $labeltype; - if ($maxlength < 0) $libelleshort = $this->ref; - else $libelleshort = dol_trunc($libelle, $maxlength); - } + if ($withpicto == 2) + { + $libelle = $label; + if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) $libelle = $labeltype; + $libelleshort = ''; + } else { + $libelle = (empty($this->libelle) ? $label : $this->libelle.(($label && $label != $this->libelle) ? ' '.$label : '')); + if (!empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($libelle)) $libelle = $labeltype; + if ($maxlength < 0) $libelleshort = $this->ref; + else $libelleshort = dol_trunc($libelle, $maxlength); + } - if ($withpicto) - { - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) // Add code into () - { - if ($labeltype) - { - $libelle .= (preg_match('/'.preg_quote($labeltype, '/').'/', $libelle) ? '' : ' ('.$langs->transnoentities("Action".$this->type_code).')'); - } - } - } + if ($withpicto) + { + if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) // Add code into () + { + if ($labeltype) + { + $libelle .= (preg_match('/'.preg_quote($labeltype, '/').'/', $libelle) ? '' : ' ('.$langs->transnoentities("Action".$this->type_code).')'); + } + } + } - $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$libelle), ($overwritepicto ? $overwritepicto : 'action'), ($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - $result .= $libelleshort; - $result .= $linkend; + $result .= $linkstart; + if ($withpicto) $result .= img_object(($notooltip ? '' : $langs->trans("ShowAction").': '.$libelle), ($overwritepicto ? $overwritepicto : 'action'), ($notooltip ? 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'"' : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + $result .= $libelleshort; + $result .= $linkend; - global $action; - $hookmanager->initHooks(array('actiondao')); - $parameters = array('id'=>$this->id, 'getnomurl'=>$result); - $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) $result = $hookmanager->resPrint; - else $result .= $hookmanager->resPrint; + global $action; + $hookmanager->initHooks(array('actiondao')); + $parameters = array('id'=>$this->id, 'getnomurl'=>$result); + $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) $result = $hookmanager->resPrint; + else $result .= $hookmanager->resPrint; - return $result; - } + return $result; + } - /** - * Sets object to supplied categories. - * - * Deletes object from existing categories not supplied. - * Adds it to non existing supplied categories. - * Existing categories are left untouch. - * - * @param int[]|int $categories Category or categories IDs - * @return void - */ - public function setCategories($categories) - { - // Handle single category - if (!is_array($categories)) { - $categories = array($categories); - } + /** + * Sets object to supplied categories. + * + * Deletes object from existing categories not supplied. + * Adds it to non existing supplied categories. + * Existing categories are left untouch. + * + * @param int[]|int $categories Category or categories IDs + * @return void + */ + public function setCategories($categories) + { + // Handle single category + if (!is_array($categories)) { + $categories = array($categories); + } - // Get current categories - include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $c = new Categorie($this->db); - $existing = $c->containing($this->id, Categorie::TYPE_ACTIONCOMM, 'id'); + // Get current categories + include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + $c = new Categorie($this->db); + $existing = $c->containing($this->id, Categorie::TYPE_ACTIONCOMM, 'id'); - // Diff - if (is_array($existing)) { - $to_del = array_diff($existing, $categories); - $to_add = array_diff($categories, $existing); - } else { - $to_del = array(); // Nothing to delete - $to_add = $categories; - } + // Diff + if (is_array($existing)) { + $to_del = array_diff($existing, $categories); + $to_add = array_diff($categories, $existing); + } else { + $to_del = array(); // Nothing to delete + $to_add = $categories; + } - // Process - foreach ($to_del as $del) { - if ($c->fetch($del) > 0) { - $c->del_type($this, Categorie::TYPE_ACTIONCOMM); - } - } - foreach ($to_add as $add) { - if ($c->fetch($add) > 0) { - $c->add_type($this, Categorie::TYPE_ACTIONCOMM); - } - } - return; - } + // Process + foreach ($to_del as $del) { + if ($c->fetch($del) > 0) { + $c->del_type($this, Categorie::TYPE_ACTIONCOMM); + } + } + foreach ($to_add as $add) { + if ($c->fetch($add) > 0) { + $c->add_type($this, Categorie::TYPE_ACTIONCOMM); + } + } + return; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Export events from database into a cal file. - * - * @param string $format The format of the export 'vcal', 'ical/ics' or 'rss' - * @param string $type The type of the export 'event' or 'journal' - * @param integer $cachedelay Do not rebuild file if date older than cachedelay seconds - * @param string $filename The name for the exported file. - * @param array $filters Array of filters. Example array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...) - * @param integer $exportholiday 0 = don't integrate holidays into the export, 1 = integrate holidays into the export - * @return integer -1 = error on build export file, 0 = export okay - */ - public function build_exportfile($format, $type, $cachedelay, $filename, $filters, $exportholiday = 0) - { - global $hookmanager; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Export events from database into a cal file. + * + * @param string $format The format of the export 'vcal', 'ical/ics' or 'rss' + * @param string $type The type of the export 'event' or 'journal' + * @param integer $cachedelay Do not rebuild file if date older than cachedelay seconds + * @param string $filename The name for the exported file. + * @param array $filters Array of filters. Example array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...) + * @param integer $exportholiday 0 = don't integrate holidays into the export, 1 = integrate holidays into the export + * @return integer -1 = error on build export file, 0 = export okay + */ + public function build_exportfile($format, $type, $cachedelay, $filename, $filters, $exportholiday = 0) + { + global $hookmanager; - // phpcs:enable - global $conf, $langs, $dolibarr_main_url_root, $mysoc; + // phpcs:enable + global $conf, $langs, $dolibarr_main_url_root, $mysoc; - require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; - require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; - require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/xcal.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/date.lib.php"; + require_once DOL_DOCUMENT_ROOT."/core/lib/files.lib.php"; - dol_syslog(get_class($this)."::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); + dol_syslog(get_class($this)."::build_exportfile Build export file format=".$format.", type=".$type.", cachedelay=".$cachedelay.", filename=".$filename.", filters size=".count($filters), LOG_DEBUG); - // Check parameters - if (empty($format)) return -1; + // Check parameters + if (empty($format)) return -1; - // Clean parameters - if (!$filename) - { - $extension = 'vcs'; - if ($format == 'ical') $extension = 'ics'; - $filename = $format.'.'.$extension; - } + // Clean parameters + if (!$filename) + { + $extension = 'vcs'; + if ($format == 'ical') $extension = 'ics'; + $filename = $format.'.'.$extension; + } - // Create dir and define output file (definitive and temporary) - $result = dol_mkdir($conf->agenda->dir_temp); - $outputfile = $conf->agenda->dir_temp.'/'.$filename; + // Create dir and define output file (definitive and temporary) + $result = dol_mkdir($conf->agenda->dir_temp); + $outputfile = $conf->agenda->dir_temp.'/'.$filename; - $result = 0; + $result = 0; - $buildfile = true; - $login = ''; $logina = ''; $logind = ''; $logint = ''; + $buildfile = true; + $login = ''; $logina = ''; $logind = ''; $logint = ''; - $now = dol_now(); + $now = dol_now(); - if ($cachedelay) - { - $nowgmt = dol_now(); - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) - { - dol_syslog(get_class($this)."::build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); - $buildfile = false; - } - } + if ($cachedelay) + { + $nowgmt = dol_now(); + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if (dol_filemtime($outputfile) > ($nowgmt - $cachedelay)) + { + dol_syslog(get_class($this)."::build_exportfile file ".$outputfile." is not older than now - cachedelay (".$nowgmt." - ".$cachedelay."). Build is canceled"); + $buildfile = false; + } + } - if ($buildfile) - { - // Build event array - $eventarray = array(); + if ($buildfile) + { + // Build event array + $eventarray = array(); - $sql = "SELECT a.id,"; - $sql .= " a.datep,"; // Start - $sql .= " a.datep2,"; // End - $sql .= " a.durationp,"; // deprecated - $sql .= " a.datec, a.tms as datem,"; - $sql .= " a.label, a.code, a.note, a.fk_action as type_id,"; - $sql .= " a.fk_soc,"; - $sql .= " a.fk_user_author, a.fk_user_mod,"; - $sql .= " a.fk_user_action,"; - $sql .= " a.fk_contact, a.percent as percentage,"; - $sql .= " a.fk_element, a.elementtype,"; - $sql .= " a.priority, a.fulldayevent, a.location, a.transparency,"; - $sql .= " u.firstname, u.lastname, u.email,"; - $sql .= " s.nom as socname,"; - $sql .= " c.id as type_id, c.code as type_code, c.libelle as type_label"; - $sql .= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; + $sql = "SELECT a.id,"; + $sql .= " a.datep,"; // Start + $sql .= " a.datep2,"; // End + $sql .= " a.durationp,"; // deprecated + $sql .= " a.datec, a.tms as datem,"; + $sql .= " a.label, a.code, a.note, a.fk_action as type_id,"; + $sql .= " a.fk_soc,"; + $sql .= " a.fk_user_author, a.fk_user_mod,"; + $sql .= " a.fk_user_action,"; + $sql .= " a.fk_contact, a.percent as percentage,"; + $sql .= " a.fk_element, a.elementtype,"; + $sql .= " a.priority, a.fulldayevent, a.location, a.transparency,"; + $sql .= " u.firstname, u.lastname, u.email,"; + $sql .= " s.nom as socname,"; + $sql .= " c.id as type_id, c.code as type_code, c.libelle as type_label"; + $sql .= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc"; $parameters = array('filters' => $filters); $reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook @@ -1619,131 +1633,129 @@ class ActionComm extends CommonObject // We must filter on assignement table if ($filters['logint']) $sql .= ", ".MAIN_DB_PREFIX."actioncomm_resources as ar"; $sql .= " WHERE a.fk_action=c.id"; - $sql .= " AND a.entity IN (".getEntity('agenda').")"; - foreach ($filters as $key => $value) - { - if ($key == 'notolderthan' && $value != '') $sql .= " AND a.datep >= '".$this->db->idate($now - ($value * 24 * 60 * 60))."'"; - if ($key == 'year') $sql .= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value, 1))."' AND '".$this->db->idate(dol_get_last_day($value, 12))."'"; - if ($key == 'id') $sql .= " AND a.id=".(is_numeric($value) ? $value : 0); - if ($key == 'idfrom') $sql .= " AND a.id >= ".(is_numeric($value) ? $value : 0); - if ($key == 'idto') $sql .= " AND a.id <= ".(is_numeric($value) ? $value : 0); - if ($key == 'project') $sql .= " AND a.fk_project=".(is_numeric($value) ? $value : 0); - if ($key == 'actiontype') $sql .= " AND c.type = '".$this->db->escape($value)."'"; - if ($key == 'notactiontype') $sql .= " AND c.type <> '".$this->db->escape($value)."'"; - // We must filter on assignement table + $sql .= " AND a.entity IN (".getEntity('agenda').")"; + foreach ($filters as $key => $value) + { + if ($key == 'notolderthan' && $value != '') $sql .= " AND a.datep >= '".$this->db->idate($now - ($value * 24 * 60 * 60))."'"; + if ($key == 'year') $sql .= " AND a.datep BETWEEN '".$this->db->idate(dol_get_first_day($value, 1))."' AND '".$this->db->idate(dol_get_last_day($value, 12))."'"; + if ($key == 'id') $sql .= " AND a.id=".(is_numeric($value) ? $value : 0); + if ($key == 'idfrom') $sql .= " AND a.id >= ".(is_numeric($value) ? $value : 0); + if ($key == 'idto') $sql .= " AND a.id <= ".(is_numeric($value) ? $value : 0); + if ($key == 'project') $sql .= " AND a.fk_project=".(is_numeric($value) ? $value : 0); + if ($key == 'actiontype') $sql .= " AND c.type = '".$this->db->escape($value)."'"; + if ($key == 'notactiontype') $sql .= " AND c.type <> '".$this->db->escape($value)."'"; + // We must filter on assignement table if ($key == 'logint') $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; - if ($key == 'logina') - { - $logina = $value; - $condition = '='; - if (preg_match('/^!/', $logina)) - { - $logina = preg_replace('/^!/', '', $logina); - $condition = '<>'; - } - $userforfilter = new User($this->db); - $result = $userforfilter->fetch('', $logina); - if ($result > 0) $sql .= " AND a.fk_user_author ".$condition." ".$userforfilter->id; - elseif ($result < 0 || $condition == '=') $sql .= " AND a.fk_user_author = 0"; - } - if ($key == 'logint') - { - $logint = $value; - $condition = '='; - if (preg_match('/^!/', $logint)) - { - $logint = preg_replace('/^!/', '', $logint); - $condition = '<>'; - } - $userforfilter = new User($this->db); - $result = $userforfilter->fetch('', $logint); - if ($result > 0) $sql .= " AND ar.fk_element = ".$userforfilter->id; - elseif ($result < 0 || $condition == '=') $sql .= " AND ar.fk_element = 0"; - } - } + if ($key == 'logina') + { + $logina = $value; + $condition = '='; + if (preg_match('/^!/', $logina)) + { + $logina = preg_replace('/^!/', '', $logina); + $condition = '<>'; + } + $userforfilter = new User($this->db); + $result = $userforfilter->fetch('', $logina); + if ($result > 0) $sql .= " AND a.fk_user_author ".$condition." ".$userforfilter->id; + elseif ($result < 0 || $condition == '=') $sql .= " AND a.fk_user_author = 0"; + } + if ($key == 'logint') + { + $logint = $value; + $condition = '='; + if (preg_match('/^!/', $logint)) + { + $logint = preg_replace('/^!/', '', $logint); + $condition = '<>'; + } + $userforfilter = new User($this->db); + $result = $userforfilter->fetch('', $logint); + if ($result > 0) $sql .= " AND ar.fk_element = ".$userforfilter->id; + elseif ($result < 0 || $condition == '=') $sql .= " AND ar.fk_element = 0"; + } + } - $sql .= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import + $sql .= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import $parameters = array('filters' => $filters); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; - $sql .= " ORDER by datep"; - //print $sql;exit; + $sql .= " ORDER by datep"; + //print $sql;exit; - dol_syslog(get_class($this)."::build_exportfile select events", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - // Note: Output of sql request is encoded in $conf->file->character_set_client - // This assignment in condition is not a bug. It allows walking the results. + dol_syslog(get_class($this)."::build_exportfile select events", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + // Note: Output of sql request is encoded in $conf->file->character_set_client + // This assignment in condition is not a bug. It allows walking the results. $diff = 0; - while ($obj = $this->db->fetch_object($resql)) - { - $qualified = true; + while ($obj = $this->db->fetch_object($resql)) + { + $qualified = true; - // 'eid','startdate','duration','enddate','title','summary','category','email','url','desc','author' - $event = array(); - $event['uid'] = 'dolibarragenda-'.$this->db->database_name.'-'.$obj->id."@".$_SERVER["SERVER_NAME"]; - $event['type'] = $type; - $datestart = $this->db->jdate($obj->datep) - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); + // 'eid','startdate','duration','enddate','title','summary','category','email','url','desc','author' + $event = array(); + $event['uid'] = 'dolibarragenda-'.$this->db->database_name.'-'.$obj->id."@".$_SERVER["SERVER_NAME"]; + $event['type'] = $type; + $datestart = $this->db->jdate($obj->datep) - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); - // fix for -> Warning: A non-numeric value encountered - if (is_numeric($this->db->jdate($obj->datep2))) - { - $dateend = $this->db->jdate($obj->datep2) - - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); - } - else - { - // use start date as fall-back to avoid import erros on empty end date - $dateend = $datestart; - } + // fix for -> Warning: A non-numeric value encountered + if (is_numeric($this->db->jdate($obj->datep2))) + { + $dateend = $this->db->jdate($obj->datep2) + - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); + } else { + // use start date as fall-back to avoid import erros on empty end date + $dateend = $datestart; + } - $duration = ($datestart && $dateend) ? ($dateend - $datestart) : 0; - $event['summary'] = $obj->label.($obj->socname ? " (".$obj->socname.")" : ""); - $event['desc'] = $obj->note; - $event['startdate'] = $datestart; - $event['enddate'] = $dateend; // Not required with type 'journal' - $event['duration'] = $duration; // Not required with type 'journal' - $event['author'] = dolGetFirstLastname($obj->firstname, $obj->lastname); - $event['priority'] = $obj->priority; - $event['fulldayevent'] = $obj->fulldayevent; - $event['location'] = $obj->location; - $event['transparency'] = (($obj->transparency > 0) ? 'OPAQUE' : 'TRANSPARENT'); // OPAQUE (busy) or TRANSPARENT (not busy) - $event['category'] = $obj->type_label; - $event['email'] = $obj->email; + $duration = ($datestart && $dateend) ? ($dateend - $datestart) : 0; + $event['summary'] = $obj->label.($obj->socname ? " (".$obj->socname.")" : ""); + $event['desc'] = $obj->note; + $event['startdate'] = $datestart; + $event['enddate'] = $dateend; // Not required with type 'journal' + $event['duration'] = $duration; // Not required with type 'journal' + $event['author'] = dolGetFirstLastname($obj->firstname, $obj->lastname); + $event['priority'] = $obj->priority; + $event['fulldayevent'] = $obj->fulldayevent; + $event['location'] = $obj->location; + $event['transparency'] = (($obj->transparency > 0) ? 'OPAQUE' : 'TRANSPARENT'); // OPAQUE (busy) or TRANSPARENT (not busy) + $event['category'] = $obj->type_label; + $event['email'] = $obj->email; // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - $url = $urlwithroot.'/comm/action/card.php?id='.$obj->id; - $event['url'] = $url; - $event['created'] = $this->db->jdate($obj->datec) - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); - $event['modified'] = $this->db->jdate($obj->datem) - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); + $url = $urlwithroot.'/comm/action/card.php?id='.$obj->id; + $event['url'] = $url; + $event['created'] = $this->db->jdate($obj->datec) - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); + $event['modified'] = $this->db->jdate($obj->datem) - (empty($conf->global->AGENDA_EXPORT_FIX_TZ) ? 0 : ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600)); - // TODO: find a way to call "$this->fetch_userassigned();" without override "$this" properties - $this->id = $obj->id; - $this->fetch_userassigned(false); + // TODO: find a way to call "$this->fetch_userassigned();" without override "$this" properties + $this->id = $obj->id; + $this->fetch_userassigned(false); - $assignedUserArray = array(); + $assignedUserArray = array(); - foreach ($this->userassigned as $key => $value) - { - $assignedUser = new User($this->db); - $assignedUser->fetch($value['id']); + foreach ($this->userassigned as $key => $value) + { + $assignedUser = new User($this->db); + $assignedUser->fetch($value['id']); - $assignedUserArray[$key] = $assignedUser; - } + $assignedUserArray[$key] = $assignedUser; + } - $event['assignedUsers'] = $assignedUserArray; + $event['assignedUsers'] = $assignedUserArray; - if ($qualified && $datestart) - { - $eventarray[] = $event; - } - $diff++; - } + if ($qualified && $datestart) + { + $eventarray[] = $event; + } + $diff++; + } $parameters = array('filters' => $filters, 'eventarray' => &$eventarray); $reshook = $hookmanager->executeHooks('addMoreEventsExport', $parameters); // Note that $action and $object may have been modified by hook @@ -1751,187 +1763,175 @@ class ActionComm extends CommonObject { $eventarray = $hookmanager->resArray; } - } - else - { - $this->error = $this->db->lasterror(); - return -1; - } + } else { + $this->error = $this->db->lasterror(); + return -1; + } if ($exportholiday == 1) - { - $langs->load("holidays"); - $title = $langs->trans("Holidays"); + { + $langs->load("holidays"); + $title = $langs->trans("Holidays"); - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.email, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; - $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE u.rowid = x.fk_user"; - $sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user) - $sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved) + $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.email, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; + $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; + $sql .= " WHERE u.rowid = x.fk_user"; + $sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user) + $sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved) - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - $i = 0; + $resql = $this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + $i = 0; - while ($i < $num) - { - $obj = $this->db->fetch_object($resql); - $event = array(); + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $event = array(); - if ($obj->halfday == -1) - { - $event['fulldayevent'] = false; + if ($obj->halfday == -1) + { + $event['fulldayevent'] = false; - $timestampStart = dol_stringtotime($obj->date_start." 00:00:00", 0); - $timestampEnd = dol_stringtotime($obj->date_end." 12:00:00", 0); - } - elseif ($obj->halfday == 1) - { - $event['fulldayevent'] = false; + $timestampStart = dol_stringtotime($obj->date_start." 00:00:00", 0); + $timestampEnd = dol_stringtotime($obj->date_end." 12:00:00", 0); + } elseif ($obj->halfday == 1) + { + $event['fulldayevent'] = false; - $timestampStart = dol_stringtotime($obj->date_start." 12:00:00", 0); - $timestampEnd = dol_stringtotime($obj->date_end." 23:59:59", 0); - } - else - { - $event['fulldayevent'] = true; + $timestampStart = dol_stringtotime($obj->date_start." 12:00:00", 0); + $timestampEnd = dol_stringtotime($obj->date_end." 23:59:59", 0); + } else { + $event['fulldayevent'] = true; - $timestampStart = dol_stringtotime($obj->date_start." 00:00:00", 0); - $timestampEnd = dol_stringtotime($obj->date_end." 23:59:59", 0); - } + $timestampStart = dol_stringtotime($obj->date_start." 00:00:00", 0); + $timestampEnd = dol_stringtotime($obj->date_end." 23:59:59", 0); + } - if (!empty($conf->global->AGENDA_EXPORT_FIX_TZ)) - { - $timestampStart = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); - $timestampEnd = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); - } + if (!empty($conf->global->AGENDA_EXPORT_FIX_TZ)) + { + $timestampStart = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); + $timestampEnd = - ($conf->global->AGENDA_EXPORT_FIX_TZ * 3600); + } - $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); - $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; - $url = $urlwithroot.'/holiday/card.php?id='.$obj->rowid; + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; + $url = $urlwithroot.'/holiday/card.php?id='.$obj->rowid; - $event['uid'] = 'dolibarrholiday-'.$this->db->database_name.'-'.$obj->rowid."@".$_SERVER["SERVER_NAME"]; - $event['author'] = dolGetFirstLastname($obj->firstname, $obj->lastname); - $event['type'] = 'event'; - $event['category'] = "Holiday"; - $event['transparency'] = 'OPAQUE'; - $event['email'] = $obj->email; - $event['created'] = $timestampStart; - $event['modified'] = $timestampStart; - $event['startdate'] = $timestampStart; - $event['enddate'] = $timestampEnd; - $event['duration'] = $timestampEnd - $timestampStart; - $event['url'] = $url; + $event['uid'] = 'dolibarrholiday-'.$this->db->database_name.'-'.$obj->rowid."@".$_SERVER["SERVER_NAME"]; + $event['author'] = dolGetFirstLastname($obj->firstname, $obj->lastname); + $event['type'] = 'event'; + $event['category'] = "Holiday"; + $event['transparency'] = 'OPAQUE'; + $event['email'] = $obj->email; + $event['created'] = $timestampStart; + $event['modified'] = $timestampStart; + $event['startdate'] = $timestampStart; + $event['enddate'] = $timestampEnd; + $event['duration'] = $timestampEnd - $timestampStart; + $event['url'] = $url; - if ($obj->status == 2) - { - // 2 = leave wait for approval - $event['summary'] = $title." - ".$obj->lastname." (wait for approval)"; - } - else - { - // 3 = leave approved - $event['summary'] = $title." - ".$obj->lastname; - } + if ($obj->status == 2) + { + // 2 = leave wait for approval + $event['summary'] = $title." - ".$obj->lastname." (wait for approval)"; + } else { + // 3 = leave approved + $event['summary'] = $title." - ".$obj->lastname; + } - $eventarray[] = $event; + $eventarray[] = $event; - $i++; - } - } - } + $i++; + } + } + } - $langs->load("agenda"); + $langs->load("agenda"); - // Define title and desc - $more = ''; - if ($login) $more = $langs->transnoentities("User").' '.$login; - if ($logina) $more = $langs->transnoentities("ActionsAskedBy").' '.$logina; - if ($logint) $more = $langs->transnoentities("ActionsToDoBy").' '.$logint; - if ($logind) $more = $langs->transnoentities("ActionsDoneBy").' '.$logind; - if ($more) - { - $title = 'Dolibarr actions '.$mysoc->name.' - '.$more; - $desc = $more; - $desc .= ' ('.$mysoc->name.' - built by Dolibarr)'; - } - else - { - $title = 'Dolibarr actions '.$mysoc->name; - $desc = $langs->transnoentities('ListOfActions'); - $desc .= ' ('.$mysoc->name.' - built by Dolibarr)'; - } + // Define title and desc + $more = ''; + if ($login) $more = $langs->transnoentities("User").' '.$login; + if ($logina) $more = $langs->transnoentities("ActionsAskedBy").' '.$logina; + if ($logint) $more = $langs->transnoentities("ActionsToDoBy").' '.$logint; + if ($logind) $more = $langs->transnoentities("ActionsDoneBy").' '.$logind; + if ($more) + { + $title = 'Dolibarr actions '.$mysoc->name.' - '.$more; + $desc = $more; + $desc .= ' ('.$mysoc->name.' - built by Dolibarr)'; + } else { + $title = 'Dolibarr actions '.$mysoc->name; + $desc = $langs->transnoentities('ListOfActions'); + $desc .= ' ('.$mysoc->name.' - built by Dolibarr)'; + } - // Create temp file - $outputfiletmp = tempnam($conf->agenda->dir_temp, 'tmp'); // Temporary file (allow call of function by different threads - @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); + // Create temp file + $outputfiletmp = tempnam($conf->agenda->dir_temp, 'tmp'); // Temporary file (allow call of function by different threads + @chmod($outputfiletmp, octdec($conf->global->MAIN_UMASK)); - // Write file - if ($format == 'vcal') $result = build_calfile($format, $title, $desc, $eventarray, $outputfiletmp); - elseif ($format == 'ical') $result = build_calfile($format, $title, $desc, $eventarray, $outputfiletmp); - elseif ($format == 'rss') $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp); + // Write file + if ($format == 'vcal') $result = build_calfile($format, $title, $desc, $eventarray, $outputfiletmp); + elseif ($format == 'ical') $result = build_calfile($format, $title, $desc, $eventarray, $outputfiletmp); + elseif ($format == 'rss') $result = build_rssfile($format, $title, $desc, $eventarray, $outputfiletmp); - if ($result >= 0) - { - if (dol_move($outputfiletmp, $outputfile, 0, 1)) $result = 1; - else - { - $this->error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; - dol_syslog(get_class($this)."::build_exportfile ".$this->error, LOG_ERR); - dol_delete_file($outputfiletmp, 0, 1); - $result = -1; - } - } - else - { - dol_syslog(get_class($this)."::build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); - dol_delete_file($outputfiletmp, 0, 1); - $langs->load("errors"); - $this->error = $langs->trans("ErrorFailToCreateFile", $outputfile); - } - } + if ($result >= 0) + { + if (dol_move($outputfiletmp, $outputfile, 0, 1)) $result = 1; + else { + $this->error = 'Failed to rename '.$outputfiletmp.' into '.$outputfile; + dol_syslog(get_class($this)."::build_exportfile ".$this->error, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $result = -1; + } + } else { + dol_syslog(get_class($this)."::build_exportfile build_xxxfile function fails to for format=".$format." outputfiletmp=".$outputfile, LOG_ERR); + dol_delete_file($outputfiletmp, 0, 1); + $langs->load("errors"); + $this->error = $langs->trans("ErrorFailToCreateFile", $outputfile); + } + } - return $result; - } + return $result; + } - /** - * Initialise an instance with random values. - * Used to build previews or test instances. - * id must be 0 if object instance is a specimen. - * - * @return int >0 if ok - */ - public function initAsSpecimen() - { - global $user; + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @return int >0 if ok + */ + public function initAsSpecimen() + { + global $user; - $now = dol_now(); + $now = dol_now(); - // Initialise parametres - $this->id = 0; - $this->specimen = 1; + // Initialise parametres + $this->id = 0; + $this->specimen = 1; - $this->type_code = 'AC_OTH'; - $this->code = 'AC_SPECIMEN_CODE'; - $this->label = 'Label of event Specimen'; - $this->datec = $now; - $this->datem = $now; - $this->datep = $now; - $this->datef = $now; - $this->fulldayevent = 0; - $this->percentage = 0; - $this->location = 'Location'; - $this->transparency = 1; // 1 means opaque - $this->priority = 1; - //$this->note_public = "This is a 'public' note."; + $this->type_code = 'AC_OTH'; + $this->code = 'AC_SPECIMEN_CODE'; + $this->label = 'Label of event Specimen'; + $this->datec = $now; + $this->datem = $now; + $this->datep = $now; + $this->datef = $now; + $this->fulldayevent = 0; + $this->percentage = 0; + $this->location = 'Location'; + $this->transparency = 1; // 1 means opaque + $this->priority = 1; + //$this->note_public = "This is a 'public' note."; $this->note_private = "This is a 'private' note."; - $this->userownerid = $user->id; - $this->userassigned[$user->id] = array('id'=>$user->id, 'transparency'=> 1); - return 1; - } + $this->userownerid = $user->id; + $this->userassigned[$user->id] = array('id'=>$user->id, 'transparency'=> 1); + return 1; + } /** * Function used to replace a thirdparty id with another one. @@ -1950,62 +1950,249 @@ class ActionComm extends CommonObject return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } - /** - * Is the action delayed? - * - * @return bool - */ - public function hasDelay() - { - global $conf; + /** + * Is the action delayed? + * + * @return bool + */ + public function hasDelay() + { + global $conf; - $now = dol_now(); + $now = dol_now(); - return $this->datep && ($this->datep < ($now - $conf->agenda->warning_delay)); - } + return $this->datep && ($this->datep < ($now - $conf->agenda->warning_delay)); + } - /** - * Send reminders by emails - * CAN BE A CRON TASK - * - * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) - */ - public function sendEmailsReminder() - { - global $conf, $langs; + /** + * Load event reminder of events + * + * @param string $type Type of reminder 'browser' or 'email' + * @param int $fk_user Id of user + * @param bool $onlypast true = get only past reminder, false = get all reminders linked to this + * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) + */ + public function loadReminders($type = '', $fk_user = 0, $onlypast = true) + { + global $conf, $langs, $user; - $error = 0; - $this->output = ''; + $error = 0; + + $this->reminders = array(); + + //Select all action comm reminders for event + $sql = "SELECT rowid as id, typeremind, dateremind, status, offsetvalue, offsetunit, fk_user"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; + $sql .= " WHERE fk_actioncomm = ".$this->id; + if ($onlypast) { + $sql .= " AND dateremind <= '".$this->db->idate(dol_now())."'"; + } + if ($type) { + $sql .= " AND typeremind ='".$this->db->escape($type)."'"; + } + if ($fk_user > 0) { + $sql .= " AND fk_user = ".((int) $fk_user); + } + if (empty($conf->global->AGENDA_REMINDER_EMAIL)) $sql .= " AND typeremind != 'email'"; + if (empty($conf->global->AGENDA_REMINDER_BROWSER)) $sql .= " AND typeremind != 'browser'"; + + $sql .= $this->db->order("dateremind", "ASC"); + $resql = $this->db->query($sql); + + if ($resql) { + while ($obj = $this->db->fetch_object($resql)) { + $tmpactioncommreminder = new ActionCommReminder($this->db); + $tmpactioncommreminder->id = $obj->id; + $tmpactioncommreminder->typeremind = $obj->typeremind; + $tmpactioncommreminder->dateremind = $obj->dateremind; + $tmpactioncommreminder->offsetvalue = $obj->offsetvalue; + $tmpactioncommreminder->offsetunit = $obj->offsetunit; + $tmpactioncommreminder->status = $obj->status; + $tmpactioncommreminder->fk_user = $obj->fk_user; + + $this->reminders[$obj->id] = $tmpactioncommreminder; + } + } else { + $this->error = $this->db->lasterror(); + $error++; + } + + return count($this->reminders); + } + + + /** + * Send reminders by emails + * CAN BE A CRON TASK + * + * @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK) + */ + public function sendEmailsReminder() + { + global $conf, $langs, $user; + + $error = 0; + $this->output = ''; $this->error = ''; + $nbMailSend = 0; + $errorsMsg = array(); - if (empty($conf->agenda->enabled)) // Should not happen. If module disabled, cron job should not be visible. + if (empty($conf->agenda->enabled)) // Should not happen. If module disabled, cron job should not be visible. { $langs->load("agenda"); $this->output = $langs->trans('ModuleNotEnabled', $langs->transnoentitiesnoconv("Agenda")); return 0; } if (empty($conf->global->AGENDA_REMINDER_EMAIL)) - { - $langs->load("agenda"); - $this->output = $langs->trans('EventRemindersByEmailNotEnabled', $langs->transnoentitiesnoconv("Agenda")); - return 0; - } + { + $langs->load("agenda"); + $this->output = $langs->trans('EventRemindersByEmailNotEnabled', $langs->transnoentitiesnoconv("Agenda")); + return 0; + } - $now = dol_now(); + $now = dol_now(); - dol_syslog(__METHOD__, LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); - $this->db->begin(); + $this->db->begin(); - // TODO Scan events of type 'email' into table llx_actioncomm_reminder with status todo, send email, then set status to done + //Select all action comm reminder + $sql = "SELECT rowid as id FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; + $sql .= " WHERE typeremind = 'email' AND status = 0"; + $sql .= " AND dateremind <= '".$this->db->idate(dol_now())."'"; + $sql .= $this->db->order("dateremind", "ASC"); + $resql = $this->db->query($sql); - // Delete also very old past events (we do not keep more than 1 month record in past) - $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder WHERE dateremind < '".$this->db->jdate($now - (3600 * 24 * 32))."'"; - $this->db->query($sql); + if ($resql) { + $formmail = new FormMail($this->db); + $actionCommReminder = new ActionCommReminder($this->db); - $this->db->commit(); + while ($obj = $this->db->fetch_object($resql)) { + $res = $actionCommReminder->fetch($obj->id); + if ($res < 0) { + $error++; + $errorsMsg[] = "Failed to load invoice ActionComm Reminder"; + } - return $error; - } + if (!$error) + { + //Select email template + $arraymessage = $formmail->getEMailTemplate($this->db, 'actioncomm_send', $user, $langs, (!empty($actionCommReminder->fk_email_template)) ? $actionCommReminder->fk_email_template : -1, 1); + + // Load event + $res = $this->fetch($actionCommReminder->fk_actioncomm); + if ($res > 0) + { + // PREPARE EMAIL + + // Make substitution in email content + $substitutionarray = getCommonSubstitutionArray($langs, 0, '', $this); + + complete_substitutions_array($substitutionarray, $langs, $this); + + // Content + $sendContent = make_substitutions($langs->trans($arraymessage->content), $substitutionarray); + + //Topic + $sendTopic = (!empty($arraymessage->topic)) ? $arraymessage->topic : html_entity_decode($langs->trans('EventReminder')); + + // Recipient + $recipient = new User($this->db); + $res = $recipient->fetch($actionCommReminder->fk_user); + if ($res > 0 && !empty($recipient->email)) $to = $recipient->email; + else { + $errorsMsg[] = "Failed to load recipient"; + $error++; + } + + // Sender + $from = $conf->global->MAIN_MAIL_EMAIL_FROM; + if (empty($from)) { + $errorsMsg[] = "Failed to load recipient"; + $error++; + } + + // Errors Recipient + $errors_to = $conf->global->MAIN_MAIL_ERRORS_TO; + + // Mail Creation + $cMailFile = new CMailFile($sendTopic, $to, $from, $sendContent, array(), array(), array(), '', "", 0, 1, $errors_to, '', '', '', '', ''); + + // Sending Mail + if ($cMailFile->sendfile()) + { + $actionCommReminder->status = $actionCommReminder::STATUS_DONE; + $res = $actionCommReminder->update($user); + if ($res < 0) + { + $errorsMsg[] = "Failed to update status of ActionComm Reminder"; + $error++; + break; // This is to avoid to have this error on all the selected email. If we fails here for one record, it may fails for others. We must solve first. + } else { + $nbMailSend++; + } + } else { + $errorsMsg[] = $cMailFile->error.' : '.$to; + $error++; + } + } else { + $error++; + } + } + } + } else { + $error++; + } + + if (!$error) + { + // Delete also very old past events (we do not keep more than 1 month record in past) + $sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_reminder"; + $sql .= " WHERE dateremind < '".$this->db->idate($now - (3600 * 24 * 32))."'"; + $resql = $this->db->query($sql); + + if (!$resql) { + $errorsMsg[] = 'Failed to delete old reminders'; + //$error++; // If this fails, we must not rollback other SQL requests already done. Never mind. + } + } + + if (!$error) { + $this->output = 'Nb of emails sent : '.$nbMailSend; + $this->db->commit(); + return 0; + } + else { + $this->db->rollback(); + $this->error = 'Nb of emails sent : '.$nbMailSend.', '.(!empty($errorsMsg)) ? join(', ', $errorsMsg) : $error; + return $error; + } + } + + /** + * Udpate the percent value of a event with the given id + * + * @param int $id The id of the event + * @param int $percent The new percent value for the event + * @return int 1 when update of the event was suscessfull, otherwise -1 + */ + public function updatePercent($id, $percent) + { + $this->db->begin(); + + $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm "; + $sql .= " SET percent = ".(int) $percent; + $sql .= " WHERE id=".$id; + + if ($this->db->query($sql)) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + return -1; + } + } } diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index f987d551766..16384edfcde 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -50,6 +50,9 @@ class ActionCommReminder extends CommonObject */ public $picto = 'generic'; + const STATUS_TODO = 0; + const STATUS_DONE = 1; + /** * 'type' if the field format. @@ -74,12 +77,15 @@ class ActionCommReminder extends CommonObject */ public $fields = array( 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'visible'=>-1, 'enabled'=>1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",), - 'dateremind' => array('type'=>'datetime', 'label'=>'DateRemind', 'visible'=>1, 'enabled'=>1, 'position'=>60, 'notnull'=>1, 'index'=>1,), + 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>0, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), + 'dateremind' => array('type'=>'datetime', 'label'=>'DateRemind', 'visible'=>1, 'enabled'=>1, 'position'=>60, 'notnull'=>1, 'index'=>1,), 'typeremind' => array('type'=>'varchar(32)', 'label'=>'TypeRemind', 'visible'=>-1, 'enabled'=>1, 'position'=>55, 'notnull'=>1, 'comment'=>"email, browser, sms",), 'fk_user' => array('type'=>'integer', 'label'=>'User', 'visible'=>-1, 'enabled'=>1, 'position'=>65, 'notnull'=>1, 'index'=>1,), 'offsetvalue' => array('type'=>'integer', 'label'=>'OffsetValue', 'visible'=>1, 'enabled'=>1, 'position'=>56, 'notnull'=>1,), - 'offsetunit' => array('type'=>'varchar(1)', 'label'=>'OffsetUnit', 'visible'=>1, 'enabled'=>1, 'position'=>57, 'notnull'=>1, 'comment'=>"m, h, d, w",), - 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>0, 'arrayofkeyval'=>array('0'=>'ToDo', '1'=>'Done')), + 'offsetunit' => array('type'=>'varchar(1)', 'label'=>'OffsetUnit', 'visible'=>1, 'enabled'=>1, 'position'=>57, 'notnull'=>1, 'comment'=>"y, m, d, w, h, i",), + 'status' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'position'=>58, 'notnull'=>1, 'default'=>0, 'index'=>0, 'arrayofkeyval'=>array('0'=>'ToDo', '1'=>'Done')), + 'fk_actioncomm' => array('type'=>'integer', 'label'=>'Project', 'visible'=>1, 'enabled'=>1, 'position'=>59, 'notnull'=>1, 'index'=>1,), + 'fk_email_template' => array('type'=>'integer', 'label'=>'EmailTemplate', 'visible'=>1, 'enabled'=>1, 'position'=>60, 'notnull'=>0), ); /** @@ -87,6 +93,11 @@ class ActionCommReminder extends CommonObject */ public $rowid; + /** + * @var int Entity + */ + public $entity; + public $dateremind; public $typeremind; @@ -103,6 +114,16 @@ class ActionCommReminder extends CommonObject */ public $status; + /** + * @var int Project + */ + public $fk_actioncomm; + + /** + * @var int Template Mail + */ + public $fk_email_template; + // END MODULEBUILDER PROPERTIES @@ -200,28 +221,23 @@ class ActionCommReminder extends CommonObject { if ($status == 1) return $langs->trans('Done'); elseif ($status == 0) return $langs->trans('ToDo'); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 1) return img_picto($langs->trans('Done'), 'statut4').' '.$langs->trans('Done'); elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5').' '.$langs->trans('ToDo'); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 1) return img_picto($langs->trans('Done'), 'statut4'); elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 1) return img_picto($langs->trans('Done'), 'statut4').' '.$langs->trans('Done'); elseif ($status == 0) return img_picto($langs->trans('ToDo'), 'statut5').' '.$langs->trans('ToDo'); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'), 'statut4'); elseif ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'), 'statut5'); - } - elseif ($mode == 6) + } elseif ($mode == 6) { if ($status == 1) return $langs->trans('Done').' '.img_picto($langs->trans('Done'), 'statut4'); elseif ($status == 0) return $langs->trans('ToDo').' '.img_picto($langs->trans('ToDo'), 'statut5'); diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index e09bc905b96..473c87e22a0 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -148,7 +148,7 @@ class AgendaEvents extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { @@ -156,28 +156,27 @@ class AgendaEvents extends DolibarrApi } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { $i = 0; - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); while ($i < $min) { - $obj = $db->fetch_object($result); - $actioncomm_static = new ActionComm($db); + $obj = $this->db->fetch_object($result); + $actioncomm_static = new ActionComm($this->db); if ($actioncomm_static->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($actioncomm_static); } $i++; } - } - else { - throw new RestException(503, 'Error when retrieve Agenda Event list : '.$db->lasterror()); + } else { + throw new RestException(503, 'Error when retrieve Agenda Event list : '.$this->db->lasterror()); } if (!count($obj_ret)) { throw new RestException(404, 'No Agenda Event found'); diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index c8041c4ea16..6e86a556a1a 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -104,15 +104,11 @@ class CActionComm $this->db->free($resql); return 1; - } - else - { + } else { $this->db->free($resql); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -143,7 +139,7 @@ class CActionComm $sql .= " FROM ".MAIN_DB_PREFIX."c_actioncomm"; $sql .= " WHERE 1=1"; if ($active != '') $sql .= " AND active=".$active; - if (!empty($excludetype)) $sql .= " AND type <> '".$excludetype."'"; + if (!empty($excludetype)) $sql .= " AND type <> '".$this->db->escape($excludetype)."'"; if ($morefilter) $sql .= " AND ".$morefilter; $sql .= " ORDER BY module, position, type"; @@ -208,9 +204,7 @@ class CActionComm if ($idorcode == 'id') $this->liste_array = $repid; if ($idorcode == 'code') $this->liste_array = $repcode; return $this->liste_array; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php index e985b8ea09e..b806dde94f9 100644 --- a/htdocs/comm/action/class/ical.class.php +++ b/htdocs/comm/action/class/ical.class.php @@ -179,16 +179,13 @@ class ICal $tmpkey = ''; $tmpvalue = ''; } - } - elseif (preg_match('/^ENCODING=QUOTED-PRINTABLE:/i', $value)) + } elseif (preg_match('/^ENCODING=QUOTED-PRINTABLE:/i', $value)) { if (preg_match('/=$/', $value)) { $tmpkey = $key; $tmpvalue = $tmpvalue.preg_replace('/=$/', "", $value); // We must wait to have next line to have complete message - } - else - { + } else { $value = quotedPrintDecode(preg_replace('/^ENCODING=QUOTED-PRINTABLE:/i', '', $tmpvalue.$value)); } } //$value=quotedPrintDecode($tmpvalue.$value); @@ -236,9 +233,7 @@ class ICal if (stristr($key, "DTSTART;VALUE=DATE") || stristr($key, "DTEND;VALUE=DATE")) { list($key, $value) = array($key, $value); - } - else - { + } else { list($key, $value) = $this->ical_dt_date($key, $value); } } @@ -377,9 +372,7 @@ class ICal { usort($temp, array(&$this, "ical_dtstart_compare")); return $temp; - } - else - { + } else { return false; } } diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 9e770f70a93..bed4054e018 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -40,7 +40,7 @@ if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/clas $langs->loadLangs(array('companies', 'commercial', 'other', 'bills')); $id = GETPOST('id', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -123,7 +123,7 @@ if ($object->id > 0) dol_fiche_head($head, 'documents', $langs->trans("Action"), -1, 'action'); $linkback = img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"'); - $linkback .= ''.$langs->trans("BackToList").''; + $linkback .= ''.$langs->trans("BackToList").''; // Link to other agenda views $out = ''; @@ -215,9 +215,7 @@ if ($object->id > 0) } } $_SESSION['assignedtouser'] = json_encode($listofuserid); - } - else - { + } else { if (!empty($_SESSION['assignedtouser'])) { $listofuserid = json_decode($_SESSION['assignedtouser'], true); @@ -263,9 +261,7 @@ if ($object->id > 0) $permission = $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index f35c17d375d..a48dc03aea2 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -76,10 +76,10 @@ if (!$user->rights->agenda->myactions->read) accessforbidden(); if (!$user->rights->agenda->allactions->read) $canedit = 0; if (!$user->rights->agenda->allactions->read || $filter == 'mine') // If no permission to see all, we show only affected to me { - $filtert = $user->id; + $filtert = $user->id; } -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $resourceid = GETPOST("search_resourceid", "int"); $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y"); $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m"); @@ -90,14 +90,21 @@ $status = GETPOST("search_status", 'aZ09') ?GETPOST("search_status", 'aZ09') : G $type = GETPOST("search_type", 'aZ09') ?GETPOST("search_type", 'aZ09') : GETPOST("type", 'aZ09'); $maxprint = (isset($_GET["maxprint"]) ?GETPOST("maxprint") : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + +$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); +if ($dateselect > 0) +{ + $day = GETPOST('dateselectday', 'int'); + $month = GETPOST('dateselectmonth', 'int'); + $year = GETPOST('dateselectyear', 'int'); +} + // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('search_actioncode', 'array')) { - $actioncode = GETPOST('search_actioncode', 'array', 3); - if (!count($actioncode)) $actioncode = '0'; -} -else -{ + $actioncode = GETPOST('search_actioncode', 'array', 3); + if (!count($actioncode)) $actioncode = '0'; +} else { $actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE)); } if ($actioncode == '' && empty($actioncodearray)) $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE); @@ -111,14 +118,14 @@ if ($action == 'default') // When action is default, we want a calendar view and { $action = (($defaultview != 'show_list') ? $defaultview : 'show_month'); } -if (GETPOST('viewcal', 'none') && GETPOST('action', 'alpha') != 'show_day' && GETPOST('action', 'alpha') != 'show_week') { - $action = 'show_month'; $day = ''; +if (GETPOST('viewcal', 'restricthtml') && GETPOST('action', 'alpha') != 'show_day' && GETPOST('action', 'alpha') != 'show_week') { + $action = 'show_month'; $day = ''; } // View by month -if (GETPOST('viewweek', 'none') || GETPOST('action', 'alpha') == 'show_week') { - $action = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); +if (GETPOST('viewweek', 'restricthtml') || GETPOST('action', 'alpha') == 'show_week') { + $action = 'show_week'; $week = ($week ? $week : date("W")); $day = ($day ? $day : date("d")); } // View by week -if (GETPOST('viewday', 'none') || GETPOST('action', 'alpha') == 'show_day') { - $action = 'show_day'; $day = ($day ? $day : date("d")); +if (GETPOST('viewday', 'restricthtml') || GETPOST('action', 'alpha') == 'show_day') { + $action = 'show_day'; $day = ($day ? $day : date("d")); } // View by day // Load translation files required by the page @@ -134,45 +141,46 @@ $hookmanager->initHooks(array('agenda')); if (GETPOST("viewlist", 'alpha') || $action == 'show_list') { - $param = ''; - if (is_array($_POST)) - { - foreach ($_POST as $key => $val) - { - if ($key == 'token') continue; - $param .= '&'.$key.'='.urlencode($val); - } - } - //print $param; - header("Location: ".DOL_URL_ROOT.'/comm/action/list.php?'.$param); - exit; + $param = ''; + if (is_array($_POST)) + { + foreach ($_POST as $key => $val) + { + if ($key == 'token') continue; + $param .= '&'.$key.'='.urlencode($val); + } + } + if (!preg_match('/action=/', $param)) $param .= ($param ? '&' : '').'action=show_list'; + //print $param; + header("Location: ".DOL_URL_ROOT.'/comm/action/list.php?'.$param); + exit; } if (GETPOST("viewperuser", 'alpha') || $action == 'show_peruser') { - $param = ''; - if (is_array($_POST)) - { - foreach ($_POST as $key => $val) - { - if ($key == 'token') continue; - $param .= '&'.$key.'='.urlencode($val); - } - } - //print $param; - header("Location: ".DOL_URL_ROOT.'/comm/action/peruser.php?'.$param); - exit; + $param = ''; + if (is_array($_POST)) + { + foreach ($_POST as $key => $val) + { + if ($key == 'token') continue; + $param .= '&'.$key.'='.urlencode($val); + } + } + //print $param; + header("Location: ".DOL_URL_ROOT.'/comm/action/peruser.php?'.$param); + exit; } if ($action == 'delete_action') { - $event = new ActionComm($db); - $event->fetch($actionid); - $event->fetch_optionals(); - $event->fetch_userassigned(); - $event->oldcopy = clone $event; + $event = new ActionComm($db); + $event->fetch($actionid); + $event->fetch_optionals(); + $event->fetch_userassigned(); + $event->oldcopy = clone $event; - $result = $event->delete(); + $result = $event->delete(); } @@ -218,21 +226,21 @@ $listofextcals = array(); // Define list of external calendars (global admin setup) if (empty($conf->global->AGENDA_DISABLE_EXT)) { - $i = 0; - while ($i < $MAXAGENDA) - { - $i++; - $source = 'AGENDA_EXT_SRC'.$i; - $name = 'AGENDA_EXT_NAME'.$i; - $offsettz = 'AGENDA_EXT_OFFSETTZ'.$i; - $color = 'AGENDA_EXT_COLOR'.$i; - $buggedfile = 'AGENDA_EXT_BUGGEDFILE'.$i; - if (!empty($conf->global->$source) && !empty($conf->global->$name)) - { - // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' - $listofextcals[] = array('src'=>$conf->global->$source, 'name'=>$conf->global->$name, 'offsettz'=>$conf->global->$offsettz, 'color'=>$conf->global->$color, 'buggedfile'=>(isset($conf->global->buggedfile) ? $conf->global->buggedfile : 0)); - } - } + $i = 0; + while ($i < $MAXAGENDA) + { + $i++; + $source = 'AGENDA_EXT_SRC'.$i; + $name = 'AGENDA_EXT_NAME'.$i; + $offsettz = 'AGENDA_EXT_OFFSETTZ'.$i; + $color = 'AGENDA_EXT_COLOR'.$i; + $buggedfile = 'AGENDA_EXT_BUGGEDFILE'.$i; + if (!empty($conf->global->$source) && !empty($conf->global->$name)) + { + // Note: $conf->global->buggedfile can be empty or 'uselocalandtznodaylight' or 'uselocalandtzdaylight' + $listofextcals[] = array('src'=>$conf->global->$source, 'name'=>$conf->global->$name, 'offsettz'=>$conf->global->$offsettz, 'color'=>$conf->global->$color, 'buggedfile'=>(isset($conf->global->buggedfile) ? $conf->global->buggedfile : 0)); + } + } } // Define list of external calendars (user setup) if (empty($user->conf->AGENDA_DISABLE_EXT)) @@ -243,7 +251,7 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) $i++; $source = 'AGENDA_EXT_SRC_'.$user->id.'_'.$i; $name = 'AGENDA_EXT_NAME_'.$user->id.'_'.$i; - $offsettz = 'AGENDA_EXT_OFFSETTZ_'.$user->id.'_'.$i; + $offsettz = 'AGENDA_EXT_OFFSETTZ_'.$user->id.'_'.$i; $color = 'AGENDA_EXT_COLOR_'.$user->id.'_'.$i; $enabled = 'AGENDA_EXT_ENABLED_'.$user->id.'_'.$i; $buggedfile = 'AGENDA_EXT_BUGGEDFILE_'.$user->id.'_'.$i; @@ -257,74 +265,75 @@ if (empty($user->conf->AGENDA_DISABLE_EXT)) if (empty($action) || $action == 'show_month') { - $prev = dol_get_prev_month($month, $year); - $prev_year = $prev['year']; - $prev_month = $prev['month']; - $next = dol_get_next_month($month, $year); - $next_year = $next['year']; - $next_month = $next['month']; + $prev = dol_get_prev_month($month, $year); + $prev_year = $prev['year']; + $prev_month = $prev['month']; + $next = dol_get_next_month($month, $year); + $next_year = $next['year']; + $next_month = $next['month']; - $max_day_in_prev_month = date("t", dol_mktime(0, 0, 0, $prev_month, 1, $prev_year)); // Nb of days in previous month - $max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year)); // Nb of days in next month - // tmpday is a negative or null cursor to know how many days before the 1st to show on month view (if tmpday=0, 1st is monday) - $tmpday = -date("w", dol_mktime(12, 0, 0, $month, 1, $year, true)) + 2; // date('w') is 0 fo sunday - $tmpday += ((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1) - 1); - if ($tmpday >= 1) $tmpday -= 7; // If tmpday is 0 we start with sunday, if -6, we start with monday of previous week. - // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) - $firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $max_day_in_prev_month + $tmpday, $prev_year); - $next_day = 7 - ($max_day_in_month + 1 - $tmpday) % 7; - if ($next_day < 6) $next_day += 7; - $lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year); + $max_day_in_prev_month = date("t", dol_mktime(0, 0, 0, $prev_month, 1, $prev_year)); // Nb of days in previous month + $max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year)); // Nb of days in next month + // tmpday is a negative or null cursor to know how many days before the 1st to show on month view (if tmpday=0, 1st is monday) + $tmpday = -date("w", dol_mktime(12, 0, 0, $month, 1, $year, true)) + 2; // date('w') is 0 fo sunday + $tmpday += ((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1) - 1); + if ($tmpday >= 1) $tmpday -= 7; // If tmpday is 0 we start with sunday, if -6, we start with monday of previous week. + // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) + $firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $max_day_in_prev_month + $tmpday, $prev_year); + $next_day = 7 - ($max_day_in_month + 1 - $tmpday) % 7; + if ($next_day < 6) $next_day += 7; + $lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year); } if ($action == 'show_week') { - $prev = dol_get_first_day_week($day, $month, $year); - $prev_year = $prev['prev_year']; - $prev_month = $prev['prev_month']; - $prev_day = $prev['prev_day']; - $first_day = $prev['first_day']; - $first_month = $prev['first_month']; - $first_year = $prev['first_year']; + $prev = dol_get_first_day_week($day, $month, $year); + $prev_year = $prev['prev_year']; + $prev_month = $prev['prev_month']; + $prev_day = $prev['prev_day']; + $first_day = $prev['first_day']; + $first_month = $prev['first_month']; + $first_year = $prev['first_year']; - $week = $prev['week']; + $week = $prev['week']; - $day = (int) $day; - $next = dol_get_next_week($first_day, $week, $first_month, $first_year); - $next_year = $next['year']; - $next_month = $next['month']; - $next_day = $next['day']; + $day = (int) $day; + $next = dol_get_next_week($first_day, $week, $first_month, $first_year); + $next_year = $next['year']; + $next_month = $next['month']; + $next_day = $next['day']; - // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) - $firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year); + // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) + $firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year); $lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd'); - $max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year)); + $max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year)); - $tmpday = $first_day; + $tmpday = $first_day; } if ($action == 'show_day') { - $prev = dol_get_prev_day($day, $month, $year); - $prev_year = $prev['year']; - $prev_month = $prev['month']; - $prev_day = $prev['day']; - $next = dol_get_next_day($day, $month, $year); - $next_year = $next['year']; - $next_month = $next['month']; - $next_day = $next['day']; + $prev = dol_get_prev_day($day, $month, $year); + $prev_year = $prev['year']; + $prev_month = $prev['month']; + $prev_day = $prev['day']; + $next = dol_get_next_day($day, $month, $year); + $next_year = $next['year']; + $next_month = $next['month']; + $next_day = $next['day']; - // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) - $firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $prev_day, $prev_year); - $lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year); + // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) + $firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $prev_day, $prev_year); + $lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year); } //print 'xx'.$prev_year.'-'.$prev_month.'-'.$prev_day; //print 'xx'.$next_year.'-'.$next_month.'-'.$next_day; //print dol_print_date($firstdaytoshow,'day'); //print dol_print_date($lastdaytoshow,'day'); -$title = $langs->trans("DoneAndToDoActions"); +/*$title = $langs->trans("DoneAndToDoActions"); if ($status == 'done') $title = $langs->trans("DoneActions"); if ($status == 'todo') $title = $langs->trans("ToDoActions"); +*/ $param = ''; if ($actioncode || isset($_GET['search_actioncode']) || isset($_POST['search_actioncode'])) { @@ -333,7 +342,7 @@ if ($actioncode || isset($_GET['search_actioncode']) || isset($_POST['search_act } else $param .= "&search_actioncode=".urlencode($actioncode); } if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid); -if ($status || isset($_GET['status']) || isset($_POST['status'])) $param .= "&search_status=".urlencode($status); +if ($status || GETPOSTISSET('status')) $param .= "&search_status=".urlencode($status); if ($filter) $param .= "&search_filter=".urlencode($filter); if ($filtert) $param .= "&search_filtert=".urlencode($filtert); if ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup); @@ -347,32 +356,36 @@ $param .= "&maxprint=".urlencode($maxprint); // Show navigation bar if (empty($action) || $action == 'show_month') { - $nav = "  \n"; - $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%b %Y"); - $nav .= " \n"; - $nav .= "   \n"; - $nav .= "   (".$langs->trans("Today").")"; - $picto = 'calendar'; + $nav = "  \n"; + $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $month, 1, $year), "%b %Y"); + $nav .= " \n"; + $nav .= "   \n"; + $nav .= "   ".$langs->trans("Today")." "; + $picto = 'calendar'; } if ($action == 'show_week') { - $nav = "trans("Previous"))."\">  \n"; - $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("Week")." ".$week; - $nav .= " \n"; - $nav .= "   trans("Next"))."\">\n"; - $nav .= "   (".$langs->trans("Today").")"; - $picto = 'calendarweek'; + $nav = "trans("Previous"))."\">  \n"; + $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y").", ".$langs->trans("Week")." ".$week; + $nav .= " \n"; + $nav .= "   trans("Next"))."\">\n"; + $nav .= "   ".$langs->trans("Today")." "; + $picto = 'calendarweek'; } if ($action == 'show_day') { - $nav = "  \n"; - $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "daytextshort"); - $nav .= " \n"; - $nav .= "   \n"; - $nav .= "   (".$langs->trans("Today").")"; - $picto = 'calendarday'; + $nav = "  \n"; + $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $month, $day, $year), "daytextshort"); + $nav .= " \n"; + $nav .= "   \n"; + $nav .= "   ".$langs->trans("Today")." "; + $picto = 'calendarday'; } +$nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); +//$nav .= ' '; +$nav .= ''; + // Must be after the nav definition $param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : ''); //print 'x'.$param; @@ -385,6 +398,8 @@ if ($action == 'show_month') $tabactive = 'cardmonth'; if ($action == 'show_week') $tabactive = 'cardweek'; if ($action == 'show_day') $tabactive = 'cardday'; if ($action == 'show_list') $tabactive = 'cardlist'; +if ($action == 'show_pertuser') $tabactive = 'cardperuser'; +if ($action == 'show_pertype') $tabactive = 'cardpertype'; $paramnoaction = preg_replace('/action=[a-z_]+/', '', $param); @@ -394,10 +409,55 @@ print '
    '; print ''; -dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); -print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup, '', $resourceid); -dol_fiche_end(); +//dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); +//print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup, '', $resourceid); +//dol_fiche_end(); +$viewmode = ''; +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewList").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewCal").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewWeek").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewDay").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewPerUser").''; + +$viewmode .= ''; + + +$newcardbutton = ''; +if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) +{ + $tmpforcreatebutton = dol_getdate(dol_now(), true); + + $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + + //$param='month='.$monthshown.'&year='.$year; + $hourminsec = '100000'; + $newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : ''))); +} // Define the legend/list of calendard to show $s = ''; $link = ''; @@ -409,28 +469,28 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on $s .= "\n".''."\n"; $s .= ''."\n"; + $s .= '});'."\n"; + } + $s .= '});'."\n"; + $s .= ''."\n"; // Local calendar - $s .= '
    '.$langs->trans("LocalAgenda").'  
    '; + $s .= '
    '.$langs->trans("LocalAgenda").'  
    '; // External calendars if (is_array($showextcals) && count($showextcals) > 0) @@ -452,36 +512,31 @@ if (!empty($conf->use_javascript_ajax)) // If javascript on } // Birthdays - $s .= '
    '.$langs->trans("AgendaShowBirthdayEvents").'  
    '; + $s .= '
    '.$langs->trans("AgendaShowBirthdayEvents").'  
    '; // Calendars from hooks - $parameters = array(); $object = null; + $parameters = array(); $object = null; $reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action); - if (empty($reshook)) - { - $s .= $hookmanager->resPrint; - } - elseif ($reshook > 1) + if (empty($reshook)) { - $s = $hookmanager->resPrint; - } -} -else // If javascript off + $s .= $hookmanager->resPrint; + } elseif ($reshook > 1) + { + $s = $hookmanager->resPrint; + } +} else // If javascript off { $newparam = $param; // newparam is for birthday links - $newparam = preg_replace('/showbirthday=[0-1]/i', 'showbirthday='.(empty($showbirthday) ? 1 : 0), $newparam); - if (!preg_match('/showbirthday=/i', $newparam)) $newparam .= '&showbirthday=1'; - $link = ''; - if (empty($showbirthday)) $link .= $langs->trans("AgendaShowBirthdayEvents"); - else $link .= $langs->trans("AgendaHideBirthdayEvents"); - $link .= ''; + $newparam = preg_replace('/showbirthday=[0-1]/i', 'showbirthday='.(empty($showbirthday) ? 1 : 0), $newparam); + if (!preg_match('/showbirthday=/i', $newparam)) $newparam .= '&showbirthday=1'; + $link = ''; + if (empty($showbirthday)) $link .= $langs->trans("AgendaShowBirthdayEvents"); + else $link .= $langs->trans("AgendaHideBirthdayEvents"); + $link .= ''; } -print load_fiche_titre($s, $link.'     '.$nav, '', 0, 0, 'tablelistofcalendars'); - - // Load events from database into $eventarray $eventarray = array(); @@ -508,32 +563,26 @@ $sql .= ' AND a.entity IN ('.getEntity('agenda').')'; // Condition on actioncode if (!empty($actioncode)) { - if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { - if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'"; - elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'"; - else - { - if ($actioncode == 'AC_OTH') $sql .= " AND ca.type != 'systemauto'"; - if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND ca.type = 'systemauto'"; - } - } - else - { - if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'"; - elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'"; - else - { - if (is_array($actioncode)) - { - $sql .= " AND ca.code IN ('".implode("','", $actioncode)."')"; - } - else - { - $sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; - } - } - } + if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'"; + else { + if ($actioncode == 'AC_OTH') $sql .= " AND ca.type != 'systemauto'"; + if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND ca.type = 'systemauto'"; + } + } else { + if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'"; + else { + if (is_array($actioncode)) + { + $sql .= " AND ca.code IN ('".implode("','", $actioncode)."')"; + } else { + $sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + } + } + } } if ($resourceid > 0) $sql .= " AND r.element_type = 'action' AND r.element_id = a.id AND r.resource_id = ".$db->escape($resourceid); if ($pid) $sql .= " AND a.fk_project=".$db->escape($pid); @@ -543,30 +592,28 @@ if ($socid > 0) $sql .= ' AND a.fk_soc = '.$socid; if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; if ($action == 'show_day') { - $sql .= " AND ("; - $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; - $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; - $sql .= " OR "; - $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; - $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; - $sql .= " OR "; - $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; - $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; - $sql .= ')'; -} -else -{ - // To limit array - $sql .= " AND ("; - $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, 1, $year) - (60 * 60 * 24 * 7))."'"; // Start 7 days before - $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, 28, $year) + (60 * 60 * 24 * 10))."')"; // End 7 days after + 3 to go from 28 to 31 - $sql .= " OR "; - $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, 1, $year) - (60 * 60 * 24 * 7))."'"; - $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, 28, $year) + (60 * 60 * 24 * 10))."')"; - $sql .= " OR "; - $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, 1, $year) - (60 * 60 * 24 * 7))."'"; - $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, 28, $year) + (60 * 60 * 24 * 10))."')"; - $sql .= ')'; + $sql .= " AND ("; + $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; + $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; + $sql .= " OR "; + $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; + $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; + $sql .= " OR "; + $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; + $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; + $sql .= ')'; +} else { + // To limit array + $sql .= " AND ("; + $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, 1, $year) - (60 * 60 * 24 * 7))."'"; // Start 7 days before + $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, 28, $year) + (60 * 60 * 24 * 10))."')"; // End 7 days after + 3 to go from 28 to 31 + $sql .= " OR "; + $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, 1, $year) - (60 * 60 * 24 * 7))."'"; + $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, 28, $year) + (60 * 60 * 24 * 10))."')"; + $sql .= " OR "; + $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, 1, $year) - (60 * 60 * 24 * 7))."'"; + $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, 28, $year) + (60 * 60 * 24 * 10))."')"; + $sql .= ')'; } if ($type) $sql .= " AND ca.id = ".$type; if ($status == '0') { $sql .= " AND a.percent = 0"; } @@ -577,10 +624,10 @@ if ($status == 'todo') { $sql .= " AND (a.percent >= 0 AND a.percent < 100)"; } // We must filter on assignement table if ($filtert > 0 || $usergroup > 0) { - $sql .= " AND ("; - if ($filtert > 0) $sql .= "ar.fk_element = ".$filtert; - if ($usergroup > 0) $sql .= ($filtert > 0 ? " OR " : "")." ugu.fk_usergroup = ".$usergroup; - $sql .= ")"; + $sql .= " AND ("; + if ($filtert > 0) $sql .= "ar.fk_element = ".$filtert; + if ($usergroup > 0) $sql .= ($filtert > 0 ? " OR " : "")." ugu.fk_usergroup = ".$usergroup; + $sql .= ")"; } // Sort on date $sql .= ' ORDER BY datep'; @@ -591,521 +638,518 @@ dol_syslog("comm/action/index.php", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { - $num = $db->num_rows($resql); + $num = $db->num_rows($resql); - $MAXONSAMEPAGE = 10000; // Useless to have more. Protection to avoid memory overload when high number of event (for example after a mass import) - $i = 0; - while ($i < $num && $i < $MAXONSAMEPAGE) - { - $obj = $db->fetch_object($resql); + $MAXONSAMEPAGE = 10000; // Useless to have more. Protection to avoid memory overload when high number of event (for example after a mass import) + $i = 0; + while ($i < $num && $i < $MAXONSAMEPAGE) + { + $obj = $db->fetch_object($resql); - // Discard auto action if option is on - if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->type_code == 'AC_OTH_AUTO') - { - $i++; - continue; - } + // Discard auto action if option is on + if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO) && $obj->type_code == 'AC_OTH_AUTO') + { + $i++; + continue; + } - // Create a new object action - $event = new ActionComm($db); + // Create a new object action + $event = new ActionComm($db); - $event->id = $obj->id; - $event->ref = $event->id; + $event->id = $obj->id; + $event->ref = $event->id; - $event->datep = $db->jdate($obj->datep); // datep and datef are GMT date. Example: 1970-01-01 01:00:00, jdate will return 0 if TZ of PHP server is Europe/Berlin - $event->datef = $db->jdate($obj->datep2); + $event->datep = $db->jdate($obj->datep); // datep and datef are GMT date. Example: 1970-01-01 01:00:00, jdate will return 0 if TZ of PHP server is Europe/Berlin + $event->datef = $db->jdate($obj->datep2); //var_dump($obj->datep); - //var_dump($event->datep); + //var_dump($event->datep); - $event->type_code = $obj->type_code; - $event->type_label = $obj->type_label; - $event->type_color = $obj->type_color; + $event->type_code = $obj->type_code; + $event->type_label = $obj->type_label; + $event->type_color = $obj->type_color; - $event->libelle = $obj->label; // deprecated - $event->label = $obj->label; - $event->percentage = $obj->percent; - $event->authorid = $obj->fk_user_author; // user id of creator - $event->userownerid = $obj->fk_user_action; // user id of owner - $event->fetch_userassigned(); // This load $event->userassigned - $event->priority = $obj->priority; - $event->fulldayevent = $obj->fulldayevent; - $event->location = $obj->location; - $event->transparency = $obj->transparency; - $event->fk_element = $obj->fk_element; - $event->elementtype = $obj->elementtype; + $event->libelle = $obj->label; // deprecated + $event->label = $obj->label; + $event->percentage = $obj->percent; + $event->authorid = $obj->fk_user_author; // user id of creator + $event->userownerid = $obj->fk_user_action; // user id of owner + $event->fetch_userassigned(); // This load $event->userassigned + $event->priority = $obj->priority; + $event->fulldayevent = $obj->fulldayevent; + $event->location = $obj->location; + $event->transparency = $obj->transparency; + $event->fk_element = $obj->fk_element; + $event->elementtype = $obj->elementtype; - $event->fk_project = $obj->fk_project; + $event->fk_project = $obj->fk_project; - $event->thirdparty_id = $obj->fk_soc; - $event->contact_id = $obj->fk_contact; + $event->thirdparty_id = $obj->fk_soc; + $event->contact_id = $obj->fk_contact; - // Defined date_start_in_calendar and date_end_in_calendar property - // They are date start and end of action but modified to not be outside calendar view. - $event->date_start_in_calendar = $event->datep; - if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar = $event->datef; - else $event->date_end_in_calendar = $event->datep; - // Define ponctual property - if ($event->date_start_in_calendar == $event->date_end_in_calendar) - { - $event->ponctuel = 1; - } + // Defined date_start_in_calendar and date_end_in_calendar property + // They are date start and end of action but modified to not be outside calendar view. + $event->date_start_in_calendar = $event->datep; + if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar = $event->datef; + else $event->date_end_in_calendar = $event->datep; + // Define ponctual property + if ($event->date_start_in_calendar == $event->date_end_in_calendar) + { + $event->ponctuel = 1; + } - // Check values - if ($event->date_end_in_calendar < $firstdaytoshow || - $event->date_start_in_calendar >= $lastdaytoshow) - { - // This record is out of visible range - } - else - { - if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar = $firstdaytoshow; - if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar = ($lastdaytoshow - 1); + // Check values + if ($event->date_end_in_calendar < $firstdaytoshow || + $event->date_start_in_calendar >= $lastdaytoshow) + { + // This record is out of visible range + } else { + if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar = $firstdaytoshow; + if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar = ($lastdaytoshow - 1); - // Add an entry in actionarray for each day - $daycursor = $event->date_start_in_calendar; - $annee = date('Y', $daycursor); - $mois = date('m', $daycursor); - $jour = date('d', $daycursor); + // Add an entry in actionarray for each day + $daycursor = $event->date_start_in_calendar; + $annee = date('Y', $daycursor); + $mois = date('m', $daycursor); + $jour = date('d', $daycursor); - // Loop on each day covered by action to prepare an index to show on calendar - $loop = true; $j = 0; - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); - do - { - //if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
    '; + // Loop on each day covered by action to prepare an index to show on calendar + $loop = true; $j = 0; + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); + do { + //if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
    '; - $eventarray[$daykey][] = $event; - $j++; + $eventarray[$daykey][] = $event; + $j++; - $daykey += 60 * 60 * 24; - if ($daykey > $event->date_end_in_calendar) $loop = false; - } - while ($loop); + $daykey += 60 * 60 * 24; + if ($daykey > $event->date_end_in_calendar) $loop = false; + } while ($loop); - //print 'Event '.$i.' id='.$event->id.' (start='.dol_print_date($event->datep).'-end='.dol_print_date($event->datef); - //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
    '; - } - $i++; - } -} -else -{ - dol_print_error($db); + //print 'Event '.$i.' id='.$event->id.' (start='.dol_print_date($event->datep).'-end='.dol_print_date($event->datef); + //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
    '; + } + $i++; + } +} else { + dol_print_error($db); } // Complete $eventarray with birthdates if ($showbirthday) { - // Add events in array - $sql = 'SELECT sp.rowid, sp.lastname, sp.firstname, sp.birthday'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'socpeople as sp'; - $sql .= ' WHERE (priv=0 OR (priv=1 AND fk_user_creat='.$user->id.'))'; - $sql .= " AND sp.entity IN (".getEntity('socpeople').")"; - if ($action == 'show_day') - { - $sql .= ' AND MONTH(birthday) = '.$month; - $sql .= ' AND DAY(birthday) = '.$day; - } - else - { - $sql .= ' AND MONTH(birthday) = '.$month; - } - $sql .= ' ORDER BY birthday'; + // Add events in array + $sql = 'SELECT sp.rowid, sp.lastname, sp.firstname, sp.birthday'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'socpeople as sp'; + $sql .= ' WHERE (priv=0 OR (priv=1 AND fk_user_creat='.$user->id.'))'; + $sql .= " AND sp.entity IN (".getEntity('socpeople').")"; + if ($action == 'show_day') + { + $sql .= ' AND MONTH(birthday) = '.$month; + $sql .= ' AND DAY(birthday) = '.$day; + } else { + $sql .= ' AND MONTH(birthday) = '.$month; + } + $sql .= ' ORDER BY birthday'; - dol_syslog("comm/action/index.php", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $event = new ActionComm($db); + dol_syslog("comm/action/index.php", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $event = new ActionComm($db); - $event->id = $obj->rowid; // We put contact id in action id for birthdays events - $event->ref = $event->id; + $event->id = $obj->rowid; // We put contact id in action id for birthdays events + $event->ref = $event->id; - $datebirth = dol_stringtotime($obj->birthday, 1); - //print 'ee'.$obj->birthday.'-'.$datebirth; - $datearray = dol_getdate($datebirth, true); - $event->datep = dol_mktime(0, 0, 0, $datearray['mon'], $datearray['mday'], $year, true); // For full day events, date are also GMT but they wont but converted during output - $event->datef = $event->datep; - $event->type_code = 'BIRTHDAY'; - $event->label = $langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname); - $event->percentage = 100; - $event->fulldayevent = 1; + $datebirth = dol_stringtotime($obj->birthday, 1); + //print 'ee'.$obj->birthday.'-'.$datebirth; + $datearray = dol_getdate($datebirth, true); + $event->datep = dol_mktime(0, 0, 0, $datearray['mon'], $datearray['mday'], $year, true); // For full day events, date are also GMT but they wont but converted during output + $event->datef = $event->datep; + $event->type_code = 'BIRTHDAY'; + $event->label = $langs->trans("Birthday").' '.dolGetFirstLastname($obj->firstname, $obj->lastname); + $event->percentage = 100; + $event->fulldayevent = 1; - $event->date_start_in_calendar = $event->datep; - $event->date_end_in_calendar = $event->datef; - $event->ponctuel = 0; + $event->date_start_in_calendar = $event->datep; + $event->date_end_in_calendar = $event->datef; + $event->ponctuel = 0; - // Add an entry in actionarray for each day - $daycursor = $event->date_start_in_calendar; - $annee = date('Y', $daycursor); - $mois = date('m', $daycursor); - $jour = date('d', $daycursor); + // Add an entry in actionarray for each day + $daycursor = $event->date_start_in_calendar; + $annee = date('Y', $daycursor); + $mois = date('m', $daycursor); + $jour = date('d', $daycursor); - $loop = true; - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); - do - { - $eventarray[$daykey][] = $event; - $daykey += 60 * 60 * 24; - if ($daykey > $event->date_end_in_calendar) $loop = false; - } - while ($loop); - $i++; - } - } - else - { - dol_print_error($db); - } + $loop = true; + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); + do { + $eventarray[$daykey][] = $event; + $daykey += 60 * 60 * 24; + if ($daykey > $event->date_end_in_calendar) $loop = false; + } while ($loop); + $i++; + } + } else { + dol_print_error($db); + } } if ($conf->global->AGENDA_SHOW_HOLIDAYS) { - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; - $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE u.rowid = x.fk_user"; - $sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user) - $sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved) + $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; + $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; + $sql .= " WHERE u.rowid = x.fk_user"; + $sql .= " AND u.statut = '1'"; // Show only active users (0 = inactive user, 1 = active user) + $sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2 = leave wait for approval, 3 = leave approved) - if ($action == 'show_day') - { - // Request only leaves for the current selected day - $sql .= " AND '".$year."-".$month."-".$day."' BETWEEN x.date_debut AND x.date_fin"; - } - elseif ($action == 'show_week') - { - // TODO: Add filter to reduce database request - } - elseif ($action == 'show_month') - { - // TODO: Add filter to reduce database request - } + if ($action == 'show_day') + { + // Request only leaves for the current selected day + $sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; + } elseif ($action == 'show_week') + { + // TODO: Add filter to reduce database request + } elseif ($action == 'show_month') + { + // TODO: Add filter to reduce database request + } - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); + while ($i < $num) + { + $obj = $db->fetch_object($resql); - $dateStartArray = dol_getdate(dol_stringtotime($obj->date_start, 1), true); - $dateEndArray = dol_getdate(dol_stringtotime($obj->date_end, 1), true); + $dateStartArray = dol_getdate(dol_stringtotime($obj->date_start, 1), true); + $dateEndArray = dol_getdate(dol_stringtotime($obj->date_end, 1), true); - $event = new ActionComm($db); + $event = new ActionComm($db); - // Need the id of the leave object for link to it - $event->id = $obj->rowid; - $event->ref = $event->id; + // Need the id of the leave object for link to it + $event->id = $obj->rowid; + $event->ref = $event->id; - $event->type_code = 'HOLIDAY'; - $event->datep = dol_mktime(0, 0, 0, $dateStartArray['mon'], $dateStartArray['mday'], $dateStartArray['year'], true); - $event->datef = dol_mktime(0, 0, 0, $dateEndArray['mon'], $dateEndArray['mday'], $dateEndArray['year'], true); - $event->date_start_in_calendar = $event->datep; - $event->date_end_in_calendar = $event->datef; + $event->type_code = 'HOLIDAY'; + $event->datep = dol_mktime(0, 0, 0, $dateStartArray['mon'], $dateStartArray['mday'], $dateStartArray['year'], true); + $event->datef = dol_mktime(0, 0, 0, $dateEndArray['mon'], $dateEndArray['mday'], $dateEndArray['year'], true); + $event->date_start_in_calendar = $event->datep; + $event->date_end_in_calendar = $event->datef; - if ($obj->status == 3) - { - // Show no symbol for leave with state "leave approved" - $event->percentage = -1; - } - elseif ($obj->status == 2) - { - // Show TO-DO symbol for leave with state "leave wait for approval" - $event->percentage = 0; - } + if ($obj->status == 3) + { + // Show no symbol for leave with state "leave approved" + $event->percentage = -1; + } elseif ($obj->status == 2) + { + // Show TO-DO symbol for leave with state "leave wait for approval" + $event->percentage = 0; + } - if ($obj->halfday == 1) - { - $event->label = $obj->lastname.' ('.$langs->trans("Morning").')'; - } - elseif ($obj->halfday == -1) - { - $event->label = $obj->lastname.' ('.$langs->trans("Afternoon").')'; - } - else - { - $event->label = $obj->lastname; - } + if ($obj->halfday == 1) + { + $event->label = $obj->lastname.' ('.$langs->trans("Morning").')'; + } elseif ($obj->halfday == -1) + { + $event->label = $obj->lastname.' ('.$langs->trans("Afternoon").')'; + } else { + $event->label = $obj->lastname; + } - $annee = date('Y', $event->date_start_in_calendar); - $mois = date('m', $event->date_start_in_calendar); - $jour = date('d', $event->date_start_in_calendar); - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); + $annee = date('Y', $event->date_start_in_calendar); + $mois = date('m', $event->date_start_in_calendar); + $jour = date('d', $event->date_start_in_calendar); + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); - do - { - $eventarray[$daykey][] = $event; + do { + $eventarray[$daykey][] = $event; - $daykey += 60 * 60 * 24; - } + $daykey += 60 * 60 * 24; + } while ($daykey <= $event->date_end_in_calendar); - while ($daykey <= $event->date_end_in_calendar); - - $i++; - } - } + $i++; + } + } } // Complete $eventarray with external import Ical if (count($listofextcals)) { - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/ical.class.php'; - foreach ($listofextcals as $extcal) - { - $url = $extcal['src']; // Example: https://www.google.com/calendar/ical/eldy10%40gmail.com/private-cde92aa7d7e0ef6110010a821a2aaeb/basic.ics - $namecal = $extcal['name']; - $offsettz = $extcal['offsettz']; - $colorcal = $extcal['color']; - $buggedfile = $extcal['buggedfile']; - //print "url=".$url." namecal=".$namecal." colorcal=".$colorcal." buggedfile=".$buggedfile; - $ical = new ICal(); - $ical->parse($url); + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/ical.class.php'; + foreach ($listofextcals as $extcal) + { + $url = $extcal['src']; // Example: https://www.google.com/calendar/ical/eldy10%40gmail.com/private-cde92aa7d7e0ef6110010a821a2aaeb/basic.ics + $namecal = $extcal['name']; + $offsettz = $extcal['offsettz']; + $colorcal = $extcal['color']; + $buggedfile = $extcal['buggedfile']; + //print "url=".$url." namecal=".$namecal." colorcal=".$colorcal." buggedfile=".$buggedfile; + $ical = new ICal(); + $ical->parse($url); - // After this $ical->cal['VEVENT'] contains array of events, $ical->cal['DAYLIGHT'] contains daylight info, $ical->cal['STANDARD'] contains non daylight info, ... - //var_dump($ical->cal); exit; - $icalevents = array(); - if (is_array($ical->get_event_list())) $icalevents = array_merge($icalevents, $ical->get_event_list()); // Add $ical->cal['VEVENT'] - if (is_array($ical->get_freebusy_list())) $icalevents = array_merge($icalevents, $ical->get_freebusy_list()); // Add $ical->cal['VFREEBUSY'] + // After this $ical->cal['VEVENT'] contains array of events, $ical->cal['DAYLIGHT'] contains daylight info, $ical->cal['STANDARD'] contains non daylight info, ... + //var_dump($ical->cal); exit; + $icalevents = array(); + if (is_array($ical->get_event_list())) $icalevents = array_merge($icalevents, $ical->get_event_list()); // Add $ical->cal['VEVENT'] + if (is_array($ical->get_freebusy_list())) $icalevents = array_merge($icalevents, $ical->get_freebusy_list()); // Add $ical->cal['VFREEBUSY'] - if (count($icalevents) > 0) - { - // Duplicate all repeatable events into new entries - $moreicalevents = array(); - foreach ($icalevents as $icalevent) - { - if (isset($icalevent['RRULE']) && is_array($icalevent['RRULE'])) //repeatable event - { - //if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow; - //if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=($lastdaytoshow-1); - if ($icalevent['DTSTART;VALUE=DATE']) //fullday event - { - $datecurstart = dol_stringtotime($icalevent['DTSTART;VALUE=DATE'], 1); - $datecurend = dol_stringtotime($icalevent['DTEND;VALUE=DATE'], 1) - 1; // We remove one second to get last second of day - } - elseif (is_array($icalevent['DTSTART']) && !empty($icalevent['DTSTART']['unixtime'])) - { - $datecurstart = $icalevent['DTSTART']['unixtime']; - $datecurend = $icalevent['DTEND']['unixtime']; - if (!empty($ical->cal['DAYLIGHT']['DTSTART']) && $datecurstart) - { - //var_dump($ical->cal); - $tmpcurstart = $datecurstart; - $tmpcurend = $datecurend; - $tmpdaylightstart = dol_mktime(0, 0, 0, 1, 1, 1970, 1) + (int) $ical->cal['DAYLIGHT']['DTSTART']; - $tmpdaylightend = dol_mktime(0, 0, 0, 1, 1, 1970, 1) + (int) $ical->cal['STANDARD']['DTSTART']; - //var_dump($tmpcurstart);var_dump($tmpcurend); var_dump($ical->cal['DAYLIGHT']['DTSTART']);var_dump($ical->cal['STANDARD']['DTSTART']); - // Edit datecurstart and datecurend - if ($tmpcurstart >= $tmpdaylightstart && $tmpcurstart < $tmpdaylightend) $datecurstart -= ((int) $ical->cal['DAYLIGHT']['TZOFFSETTO']) * 36; - else $datecurstart -= ((int) $ical->cal['STANDARD']['TZOFFSETTO']) * 36; - if ($tmpcurend >= $tmpdaylightstart && $tmpcurstart < $tmpdaylightend) $datecurend -= ((int) $ical->cal['DAYLIGHT']['TZOFFSETTO']) * 36; - else $datecurend -= ((int) $ical->cal['STANDARD']['TZOFFSETTO']) * 36; - } - // datecurstart and datecurend are now GMT date - //var_dump($datecurstart); var_dump($datecurend); exit; - } - else - { - // Not a recongized record - dol_syslog("Found a not recognized repeatable record with unknown date start", LOG_ERR); - continue; - } - //print 'xx'.$datecurstart;exit; + if (count($icalevents) > 0) + { + // Duplicate all repeatable events into new entries + $moreicalevents = array(); + foreach ($icalevents as $icalevent) + { + if (isset($icalevent['RRULE']) && is_array($icalevent['RRULE'])) //repeatable event + { + //if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar=$firstdaytoshow; + //if ($event->date_end_in_calendar > $lastdaytoshow) $event->date_end_in_calendar=($lastdaytoshow-1); + if ($icalevent['DTSTART;VALUE=DATE']) //fullday event + { + $datecurstart = dol_stringtotime($icalevent['DTSTART;VALUE=DATE'], 1); + $datecurend = dol_stringtotime($icalevent['DTEND;VALUE=DATE'], 1) - 1; // We remove one second to get last second of day + } elseif (is_array($icalevent['DTSTART']) && !empty($icalevent['DTSTART']['unixtime'])) + { + $datecurstart = $icalevent['DTSTART']['unixtime']; + $datecurend = $icalevent['DTEND']['unixtime']; + if (!empty($ical->cal['DAYLIGHT']['DTSTART']) && $datecurstart) + { + //var_dump($ical->cal); + $tmpcurstart = $datecurstart; + $tmpcurend = $datecurend; + $tmpdaylightstart = dol_mktime(0, 0, 0, 1, 1, 1970, 1) + (int) $ical->cal['DAYLIGHT']['DTSTART']; + $tmpdaylightend = dol_mktime(0, 0, 0, 1, 1, 1970, 1) + (int) $ical->cal['STANDARD']['DTSTART']; + //var_dump($tmpcurstart);var_dump($tmpcurend); var_dump($ical->cal['DAYLIGHT']['DTSTART']);var_dump($ical->cal['STANDARD']['DTSTART']); + // Edit datecurstart and datecurend + if ($tmpcurstart >= $tmpdaylightstart && $tmpcurstart < $tmpdaylightend) $datecurstart -= ((int) $ical->cal['DAYLIGHT']['TZOFFSETTO']) * 36; + else $datecurstart -= ((int) $ical->cal['STANDARD']['TZOFFSETTO']) * 36; + if ($tmpcurend >= $tmpdaylightstart && $tmpcurstart < $tmpdaylightend) $datecurend -= ((int) $ical->cal['DAYLIGHT']['TZOFFSETTO']) * 36; + else $datecurend -= ((int) $ical->cal['STANDARD']['TZOFFSETTO']) * 36; + } + // datecurstart and datecurend are now GMT date + //var_dump($datecurstart); var_dump($datecurend); exit; + } else { + // Not a recongized record + dol_syslog("Found a not recognized repeatable record with unknown date start", LOG_ERR); + continue; + } + //print 'xx'.$datecurstart;exit; - $interval = (empty($icalevent['RRULE']['INTERVAL']) ? 1 : $icalevent['RRULE']['INTERVAL']); - $until = empty($icalevent['RRULE']['UNTIL']) ? 0 : dol_stringtotime($icalevent['RRULE']['UNTIL'], 1); - $maxrepeat = empty($icalevent['RRULE']['COUNT']) ? 0 : $icalevent['RRULE']['COUNT']; - if ($until && ($until + ($datecurend - $datecurstart)) < $firstdaytoshow) continue; // We discard repeatable event that end before start date to show - if ($datecurstart >= $lastdaytoshow) continue; // We discard repeatable event that start after end date to show + $interval = (empty($icalevent['RRULE']['INTERVAL']) ? 1 : $icalevent['RRULE']['INTERVAL']); + $until = empty($icalevent['RRULE']['UNTIL']) ? 0 : dol_stringtotime($icalevent['RRULE']['UNTIL'], 1); + $maxrepeat = empty($icalevent['RRULE']['COUNT']) ? 0 : $icalevent['RRULE']['COUNT']; + if ($until && ($until + ($datecurend - $datecurstart)) < $firstdaytoshow) continue; // We discard repeatable event that end before start date to show + if ($datecurstart >= $lastdaytoshow) continue; // We discard repeatable event that start after end date to show - $numofevent = 0; - while (($datecurstart < $lastdaytoshow) && (empty($maxrepeat) || ($numofevent < $maxrepeat))) - { - if ($datecurend >= $firstdaytoshow) // We add event - { - $newevent = $icalevent; - unset($newevent['RRULE']); - if ($icalevent['DTSTART;VALUE=DATE']) - { - $newevent['DTSTART;VALUE=DATE'] = dol_print_date($datecurstart, '%Y%m%d'); - $newevent['DTEND;VALUE=DATE'] = dol_print_date($datecurend + 1, '%Y%m%d'); - } - else - { - $newevent['DTSTART'] = $datecurstart; - $newevent['DTEND'] = $datecurend; - } - $moreicalevents[] = $newevent; - } - // Jump on next occurence - $numofevent++; - $savdatecurstart = $datecurstart; - if ($icalevent['RRULE']['FREQ'] == 'DAILY') - { - $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'd'); - $datecurend = dol_time_plus_duree($datecurend, $interval, 'd'); - } - if ($icalevent['RRULE']['FREQ'] == 'WEEKLY') - { - $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'w'); - $datecurend = dol_time_plus_duree($datecurend, $interval, 'w'); - } - elseif ($icalevent['RRULE']['FREQ'] == 'MONTHLY') - { - $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'm'); - $datecurend = dol_time_plus_duree($datecurend, $interval, 'm'); - } - elseif ($icalevent['RRULE']['FREQ'] == 'YEARLY') - { - $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'y'); - $datecurend = dol_time_plus_duree($datecurend, $interval, 'y'); - } - // Test to avoid infinite loop ($datecurstart must increase) - if ($savdatecurstart >= $datecurstart) - { - dol_syslog("Found a rule freq ".$icalevent['RRULE']['FREQ']." not managed by dolibarr code. Assume 1 week frequency.", LOG_ERR); - $datecurstart += 3600 * 24 * 7; - $datecurend += 3600 * 24 * 7; - } - } - } - } - $icalevents = array_merge($icalevents, $moreicalevents); + $numofevent = 0; + while (($datecurstart < $lastdaytoshow) && (empty($maxrepeat) || ($numofevent < $maxrepeat))) + { + if ($datecurend >= $firstdaytoshow) // We add event + { + $newevent = $icalevent; + unset($newevent['RRULE']); + if ($icalevent['DTSTART;VALUE=DATE']) + { + $newevent['DTSTART;VALUE=DATE'] = dol_print_date($datecurstart, '%Y%m%d'); + $newevent['DTEND;VALUE=DATE'] = dol_print_date($datecurend + 1, '%Y%m%d'); + } else { + $newevent['DTSTART'] = $datecurstart; + $newevent['DTEND'] = $datecurend; + } + $moreicalevents[] = $newevent; + } + // Jump on next occurence + $numofevent++; + $savdatecurstart = $datecurstart; + if ($icalevent['RRULE']['FREQ'] == 'DAILY') + { + $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'd'); + $datecurend = dol_time_plus_duree($datecurend, $interval, 'd'); + } + if ($icalevent['RRULE']['FREQ'] == 'WEEKLY') + { + $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'w'); + $datecurend = dol_time_plus_duree($datecurend, $interval, 'w'); + } elseif ($icalevent['RRULE']['FREQ'] == 'MONTHLY') + { + $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'm'); + $datecurend = dol_time_plus_duree($datecurend, $interval, 'm'); + } elseif ($icalevent['RRULE']['FREQ'] == 'YEARLY') + { + $datecurstart = dol_time_plus_duree($datecurstart, $interval, 'y'); + $datecurend = dol_time_plus_duree($datecurend, $interval, 'y'); + } + // Test to avoid infinite loop ($datecurstart must increase) + if ($savdatecurstart >= $datecurstart) + { + dol_syslog("Found a rule freq ".$icalevent['RRULE']['FREQ']." not managed by dolibarr code. Assume 1 week frequency.", LOG_ERR); + $datecurstart += 3600 * 24 * 7; + $datecurend += 3600 * 24 * 7; + } + } + } + } + $icalevents = array_merge($icalevents, $moreicalevents); - // Loop on each entry into cal file to know if entry is qualified and add an ActionComm into $eventarray - foreach ($icalevents as $icalevent) - { - //var_dump($icalevent); + // Loop on each entry into cal file to know if entry is qualified and add an ActionComm into $eventarray + foreach ($icalevents as $icalevent) + { + //var_dump($icalevent); - //print $icalevent['SUMMARY'].'->'.var_dump($icalevent).'
    ';exit; - if (!empty($icalevent['RRULE'])) continue; // We found a repeatable event. It was already split into unitary events, so we discard general rule. + //print $icalevent['SUMMARY'].'->'.var_dump($icalevent).'
    ';exit; + if (!empty($icalevent['RRULE'])) continue; // We found a repeatable event. It was already split into unitary events, so we discard general rule. - // Create a new object action - $event = new ActionComm($db); - $addevent = false; - if (isset($icalevent['DTSTART;VALUE=DATE'])) // fullday event - { - // For full day events, date are also GMT but they wont but converted using tz during output - $datestart = dol_stringtotime($icalevent['DTSTART;VALUE=DATE'], 1); - $dateend = dol_stringtotime($icalevent['DTEND;VALUE=DATE'], 1) - 1; // We remove one second to get last second of day - //print 'x'.$datestart.'-'.$dateend;exit; - //print dol_print_date($dateend,'dayhour','gmt'); - $event->fulldayevent = 1; - $addevent = true; - } - elseif (!is_array($icalevent['DTSTART'])) // not fullday event (DTSTART is not array. It is a value like '19700101T000000Z' for 00:00 in greenwitch) - { - $datestart = $icalevent['DTSTART']; - $dateend = $icalevent['DTEND']; + // Create a new object action + $event = new ActionComm($db); + $addevent = false; + if (isset($icalevent['DTSTART;VALUE=DATE'])) // fullday event + { + // For full day events, date are also GMT but they wont but converted using tz during output + $datestart = dol_stringtotime($icalevent['DTSTART;VALUE=DATE'], 1); + $dateend = dol_stringtotime($icalevent['DTEND;VALUE=DATE'], 1) - 1; // We remove one second to get last second of day + //print 'x'.$datestart.'-'.$dateend;exit; + //print dol_print_date($dateend,'dayhour','gmt'); + $event->fulldayevent = 1; + $addevent = true; + } elseif (!is_array($icalevent['DTSTART'])) // not fullday event (DTSTART is not array. It is a value like '19700101T000000Z' for 00:00 in greenwitch) + { + $datestart = $icalevent['DTSTART']; + $dateend = $icalevent['DTEND']; - $datestart += +($offsettz * 3600); - $dateend += +($offsettz * 3600); + $datestart += +($offsettz * 3600); + $dateend += +($offsettz * 3600); - $addevent = true; - //var_dump($offsettz); - //var_dump(dol_print_date($datestart, 'dayhour', 'gmt')); - } - elseif (isset($icalevent['DTSTART']['unixtime'])) // File contains a local timezone + a TZ (for example when using bluemind) - { - $datestart = $icalevent['DTSTART']['unixtime']; - $dateend = $icalevent['DTEND']['unixtime']; + $addevent = true; + //var_dump($offsettz); + //var_dump(dol_print_date($datestart, 'dayhour', 'gmt')); + } elseif (isset($icalevent['DTSTART']['unixtime'])) // File contains a local timezone + a TZ (for example when using bluemind) + { + $datestart = $icalevent['DTSTART']['unixtime']; + $dateend = $icalevent['DTEND']['unixtime']; - $datestart += +($offsettz * 3600); - $dateend += +($offsettz * 3600); + $datestart += +($offsettz * 3600); + $dateend += +($offsettz * 3600); - // $buggedfile is set to uselocalandtznodaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtznodaylight' - if ($buggedfile === 'uselocalandtznodaylight') // unixtime is a local date that does not take daylight into account, TZID is +1 for example for 'Europe/Paris' in summer instead of 2 - { - // TODO - } - // $buggedfile is set to uselocalandtzdaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtzdaylight' (for example with bluemind) - if ($buggedfile === 'uselocalandtzdaylight') // unixtime is a local date that does take daylight into account, TZID is +2 for example for 'Europe/Paris' in summer - { - $localtzs = new DateTimeZone(preg_replace('/"/', '', $icalevent['DTSTART']['TZID'])); - $localtze = new DateTimeZone(preg_replace('/"/', '', $icalevent['DTEND']['TZID'])); - $localdts = new DateTime(dol_print_date($datestart, 'dayrfc', 'gmt'), $localtzs); - $localdte = new DateTime(dol_print_date($dateend, 'dayrfc', 'gmt'), $localtze); + // $buggedfile is set to uselocalandtznodaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtznodaylight' + if ($buggedfile === 'uselocalandtznodaylight') // unixtime is a local date that does not take daylight into account, TZID is +1 for example for 'Europe/Paris' in summer instead of 2 + { + // TODO + } + // $buggedfile is set to uselocalandtzdaylight if conf->global->AGENDA_EXT_BUGGEDFILEx = 'uselocalandtzdaylight' (for example with bluemind) + if ($buggedfile === 'uselocalandtzdaylight') // unixtime is a local date that does take daylight into account, TZID is +2 for example for 'Europe/Paris' in summer + { + $localtzs = new DateTimeZone(preg_replace('/"/', '', $icalevent['DTSTART']['TZID'])); + $localtze = new DateTimeZone(preg_replace('/"/', '', $icalevent['DTEND']['TZID'])); + $localdts = new DateTime(dol_print_date($datestart, 'dayrfc', 'gmt'), $localtzs); + $localdte = new DateTime(dol_print_date($dateend, 'dayrfc', 'gmt'), $localtze); $tmps = -1 * $localtzs->getOffset($localdts); $tmpe = -1 * $localtze->getOffset($localdte); $datestart += $tmps; $dateend += $tmpe; //var_dump($datestart); - } - $addevent = true; - } + } + $addevent = true; + } - if ($addevent) - { - $event->id = $icalevent['UID']; - $event->ref = $event->id; + if ($addevent) + { + $event->id = $icalevent['UID']; + $event->ref = $event->id; - $event->icalname = $namecal; - $event->icalcolor = $colorcal; - $usertime = 0; // We dont modify date because we want to have date into memory datep and datef stored as GMT date. Compensation will be done during output. - $event->datep = $datestart + $usertime; - $event->datef = $dateend + $usertime; - $event->type_code = "ICALEVENT"; + $userId = $userstatic->findUserIdByEmail($namecal); + if (!empty($userId) && $userId > 0) + { + $event->userassigned[$userId] = $userId; + $event->percentage = -1; + } + else { + $event->type_code = "ICALEVENT"; + } - if ($icalevent['SUMMARY']) $event->label = $icalevent['SUMMARY']; - elseif ($icalevent['DESCRIPTION']) $event->label = dol_nl2br($icalevent['DESCRIPTION'], 1); - else $event->label = $langs->trans("ExtSiteNoLabel"); + $event->icalname = $namecal; + $event->icalcolor = $colorcal; + $usertime = 0; // We dont modify date because we want to have date into memory datep and datef stored as GMT date. Compensation will be done during output. + $event->datep = $datestart + $usertime; + $event->datef = $dateend + $usertime; - $event->date_start_in_calendar = $event->datep; + if ($icalevent['SUMMARY']) $event->label = $icalevent['SUMMARY']; + elseif ($icalevent['DESCRIPTION']) $event->label = dol_nl2br($icalevent['DESCRIPTION'], 1); + else $event->label = $langs->trans("ExtSiteNoLabel"); - if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar = $event->datef; - else $event->date_end_in_calendar = $event->datep; + // Priority (see https://www.kanzaki.com/docs/ical/priority.html) + // LOW = 0 to 4 + // MEDIUM = 5 + // HIGH = 6 to 9 + if ($icalevent['PRIORITY']) $event->priority = $icalevent['PRIORITY']; - // Define ponctual property - if ($event->date_start_in_calendar == $event->date_end_in_calendar) - { - $event->ponctuel = 1; - //print 'x'.$datestart.'-'.$dateend;exit; - } + // Transparency (see https://www.kanzaki.com/docs/ical/transp.html) + if ($icalevent['TRANSP']) + { + if ($icalevent['TRANSP'] == "TRANSPARENT") $event->transparency = 0; // 0 = available / free + if ($icalevent['TRANSP'] == "OPAQUE") $event->transparency = 1; // 1 = busy - // Add event into $eventarray if date range are ok. - if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar >= $lastdaytoshow) - { - //print 'x'.$datestart.'-'.$dateend;exit; - //print 'x'.$datestart.'-'.$dateend;exit; - //print 'x'.$datestart.'-'.$dateend;exit; - // This record is out of visible range - } - else - { - if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar = $firstdaytoshow; - if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar = ($lastdaytoshow - 1); + // TODO: MS outlook states + // X-MICROSOFT-CDO-BUSYSTATUS:FREE + TRANSP:TRANSPARENT => Available / Free + // X-MICROSOFT-CDO-BUSYSTATUS:FREE + TRANSP:OPAQUE => Work another place + // X-MICROSOFT-CDO-BUSYSTATUS:TENTATIVE + TRANSP:OPAQUE => With reservations + // X-MICROSOFT-CDO-BUSYSTATUS:BUSY + TRANSP:OPAQUE => Busy + // X-MICROSOFT-CDO-BUSYSTATUS:OOF + TRANSP:OPAQUE => Away from the office / off-site + } - // Add an entry in actionarray for each day - $daycursor = $event->date_start_in_calendar; - $annee = date('Y', $daycursor); - $mois = date('m', $daycursor); - $jour = date('d', $daycursor); + if ($icalevent['LOCATION']) $event->location = $icalevent['LOCATION']; - // Loop on each day covered by action to prepare an index to show on calendar - $loop = true; $j = 0; - // daykey must be date that represent day box in calendar so must be a user time - $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); - $daykeygmt = dol_mktime(0, 0, 0, $mois, $jour, $annee, true, 0); - do - { - //if ($event->fulldayevent) print dol_print_date($daykeygmt,'dayhour','gmt').'-'.dol_print_date($daykey,'dayhour','gmt').'-'.dol_print_date($event->date_end_in_calendar,'dayhour','gmt').' '; - $eventarray[$daykey][] = $event; - $daykey += 60 * 60 * 24; $daykeygmt += 60 * 60 * 24; // Add one day - if (($event->fulldayevent ? $daykeygmt : $daykey) > $event->date_end_in_calendar) $loop = false; - } - while ($loop); - } - } - } - } - } + $event->date_start_in_calendar = $event->datep; + + if ($event->datef != '' && $event->datef >= $event->datep) $event->date_end_in_calendar = $event->datef; + else $event->date_end_in_calendar = $event->datep; + + // Define ponctual property + if ($event->date_start_in_calendar == $event->date_end_in_calendar) + { + $event->ponctuel = 1; + //print 'x'.$datestart.'-'.$dateend;exit; + } + + // Add event into $eventarray if date range are ok. + if ($event->date_end_in_calendar < $firstdaytoshow || $event->date_start_in_calendar >= $lastdaytoshow) + { + //print 'x'.$datestart.'-'.$dateend;exit; + //print 'x'.$datestart.'-'.$dateend;exit; + //print 'x'.$datestart.'-'.$dateend;exit; + // This record is out of visible range + } else { + if ($event->date_start_in_calendar < $firstdaytoshow) $event->date_start_in_calendar = $firstdaytoshow; + if ($event->date_end_in_calendar >= $lastdaytoshow) $event->date_end_in_calendar = ($lastdaytoshow - 1); + + // Add an entry in actionarray for each day + $daycursor = $event->date_start_in_calendar; + $annee = date('Y', $daycursor); + $mois = date('m', $daycursor); + $jour = date('d', $daycursor); + + // Loop on each day covered by action to prepare an index to show on calendar + $loop = true; $j = 0; + // daykey must be date that represent day box in calendar so must be a user time + $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); + $daykeygmt = dol_mktime(0, 0, 0, $mois, $jour, $annee, true, 0); + do { + //if ($event->fulldayevent) print dol_print_date($daykeygmt,'dayhour','gmt').'-'.dol_print_date($daykey,'dayhour','gmt').'-'.dol_print_date($event->date_end_in_calendar,'dayhour','gmt').' '; + $eventarray[$daykey][] = $event; + $daykey += 60 * 60 * 24; $daykeygmt += 60 * 60 * 24; // Add one day + if (($event->fulldayevent ? $daykeygmt : $daykey) > $event->date_end_in_calendar) $loop = false; + } while ($loop); + } + } + } + } + } } @@ -1114,12 +1158,12 @@ if (count($listofextcals)) $parameters = array(); $object = null; $reshook = $hookmanager->executeHooks('getCalendarEvents', $parameters, $object, $action); if (!empty($hookmanager->resArray['eventarray'])) { - foreach ($hookmanager->resArray['eventarray'] as $keyDate => $events) { - if (!isset($eventarray[$keyDate])) { - $eventarray[$keyDate] = array(); - } - $eventarray[$keyDate] = array_merge($eventarray[$keyDate], $events); - } + foreach ($hookmanager->resArray['eventarray'] as $keyDate => $events) { + if (!isset($eventarray[$keyDate])) { + $eventarray[$keyDate] = array(); + } + $eventarray[$keyDate] = array_merge($eventarray[$keyDate], $events); + } } // Sort events @@ -1138,179 +1182,202 @@ $cacheusers = array(); $color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php"; if (is_readable($color_file)) { - include_once $color_file; + include_once $color_file; } if (!is_array($theme_datacolor)) $theme_datacolor = array(array(120, 130, 150), array(200, 160, 180), array(190, 190, 220)); +print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.''.$newcardbutton, '', $limit, 1, 0, 1, $viewmode); + +print $s; + + if (empty($action) || $action == 'show_month') // View by month { - $newparam = $param; // newparam is for birthday links - $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done - $newparam = preg_replace('/action=show_month&?/i', '', $newparam); - $newparam = preg_replace('/action=show_week&?/i', '', $newparam); - $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/viewcal=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter - $newparam .= '&viewcal=1'; + $newparam = $param; // newparam is for birthday links + $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done + $newparam = preg_replace('/action=show_month&?/i', '', $newparam); + $newparam = preg_replace('/action=show_week&?/i', '', $newparam); + $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/viewcal=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter + $newparam .= '&viewcal=1'; + print '
    '; + print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); + print '
    '; - print '
    '; - print ''; - print ' '; - $i = 0; - while ($i < 7) - { - print ' '."\n"; - $i++; - } - echo ' '."\n"; + print '
    '; + print '
    '; - $numdayinweek = (($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7); - if (!empty($conf->dol_optimize_smallscreen)) - { - $labelshort = array(0=>'SundayMin', 1=>'MondayMin', 2=>'TuesdayMin', 3=>'WednesdayMin', 4=>'ThursdayMin', 5=>'FridayMin', 6=>'SaturdayMin'); - print $langs->trans($labelshort[$numdayinweek]); - } - else print $langs->trans("Day".$numdayinweek); - print '
    '; + print ' '; + // Column title of weeks numbers + echo ' '; + $i = 0; + while ($i < 7) + { + print ' '."\n"; + $i++; + } + echo ' '."\n"; - $todayarray = dol_getdate($now, 'fast'); - $todaytms = dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']); + $todayarray = dol_getdate($now, 'fast'); + $todaytms = dol_mktime(0, 0, 0, $todayarray['mon'], $todayarray['mday'], $todayarray['year']); - // In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month) - //var_dump($eventarray); - for ($iter_week = 0; $iter_week < 6; $iter_week++) - { - echo " \n"; - for ($iter_day = 0; $iter_day < 7; $iter_day++) - { - /* Show days before the beginning of the current month (previous month) */ - if ($tmpday <= 0) - { - $style = 'cal_other_month cal_past'; - if ($iter_day == 6) $style .= ' cal_other_month_right'; - echo ' \n"; - } - /* Show days of the current month */ - elseif ($tmpday <= $max_day_in_month) - { - $curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year); - $style = 'cal_current_month'; - if ($iter_day == 6) $style .= ' cal_current_month_right'; - $today = 0; - if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $month && $todayarray['year'] == $year) $today = 1; - if ($today) $style = 'cal_today'; - if ($curtime < $todaytms) $style .= ' cal_past'; + // In loops, tmpday contains day nb in current month (can be zero or negative for days of previous month) + //var_dump($eventarray); + for ($iter_week = 0; $iter_week < 6; $iter_week++) { + echo " \n"; + // Get date of the current day, format 'yyyy-mm-dd' + if ($tmpday <= 0) // If number of the current day is in previous month + { + $currdate0 = sprintf("%04d", $prev_year).sprintf("%02d", $prev_month).sprintf("%02d", $max_day_in_prev_month + $tmpday); + } + elseif ($tmpday <= $max_day_in_month) // If number of the current day is in current month + { + $currdate0 = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $tmpday); + } + else // If number of the current day is in next month + { + $currdate0 = sprintf("%04d", $next_year).sprintf("%02d", $next_month).sprintf("%02d", $tmpday - $max_day_in_month); + } + // Get week number for the targeted date '$currdate0' + $numweek0 = date("W", strtotime(date($currdate0))); + // Show the week number, and define column width + echo ' '; + + for ($iter_day = 0; $iter_day < 7; $iter_day++) { + if ($tmpday <= 0) { + /* Show days before the beginning of the current month (previous month) */ + $style = 'cal_other_month cal_past'; + if ($iter_day == 6) $style .= ' cal_other_month_right'; + echo ' \n"; + } elseif ($tmpday <= $max_day_in_month) { + /* Show days of the current month */ + $curtime = dol_mktime(0, 0, 0, $month, $tmpday, $year); + $style = 'cal_current_month'; + if ($iter_day == 6) $style .= ' cal_current_month_right'; + $today = 0; + if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $month && $todayarray['year'] == $year) $today = 1; + if ($today) $style = 'cal_today'; + if ($curtime < $todaytms) $style .= ' cal_past'; //var_dump($todayarray['mday']."==".$tmpday." && ".$todayarray['mon']."==".$month." && ".$todayarray['year']."==".$year.' -> '.$style); - echo ' \n"; - } - /* Show days after the current month (next month) */ - else - { - $style = 'cal_other_month'; - if ($iter_day == 6) $style .= ' cal_other_month_right'; - echo ' \n"; - } - $tmpday++; - } - echo " \n"; - } - print "
    #'; + $numdayinweek = (($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7); + if (!empty($conf->dol_optimize_smallscreen)) + { + $labelshort = array(0=>'SundayMin', 1=>'MondayMin', 2=>'TuesdayMin', 3=>'WednesdayMin', 4=>'ThursdayMin', 5=>'FridayMin', 6=>'SaturdayMin'); + print $langs->trans($labelshort[$numdayinweek]); + } else print $langs->trans("Day".$numdayinweek); + print '
    '; - show_day_events($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); - echo "
    '.$numweek0.''; + show_day_events($db, $max_day_in_prev_month + $tmpday, $prev_month, $prev_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); + echo " '; - show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); - echo " '; - show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); - echo "
    \n"; + echo ' '; + show_day_events($db, $tmpday, $month, $year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); + echo " \n"; + } else { + /* Show days after the current month (next month) */ + $style = 'cal_other_month'; + if ($iter_day == 6) $style .= ' cal_other_month_right'; + echo ' '; + show_day_events($db, $tmpday - $max_day_in_month, $next_month, $next_year, $month, $style, $eventarray, $maxprint, $maxnbofchar, $newparam); + echo "\n"; + } + $tmpday++; + } + echo " \n"; + } + print "\n"; print '
    '; print ''; print ''; print ''; -} -elseif ($action == 'show_week') // View by week -{ - $newparam = $param; // newparam is for birthday links - $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done - $newparam = preg_replace('/action=show_month&?/i', '', $newparam); - $newparam = preg_replace('/action=show_week&?/i', '', $newparam); - $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/viewweek=[0-9]+&?/i', '', $newparam); - $newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter - $newparam .= '&viewweek=1'; +} elseif ($action == 'show_week') { + // View by week + $newparam = $param; // newparam is for birthday links + $newparam = preg_replace('/showbirthday=/i', 'showbirthday_=', $newparam); // To avoid replacement when replace day= is done + $newparam = preg_replace('/action=show_month&?/i', '', $newparam); + $newparam = preg_replace('/action=show_week&?/i', '', $newparam); + $newparam = preg_replace('/day=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/month=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/year=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/viewweek=[0-9]+&?/i', '', $newparam); + $newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter + $newparam .= '&viewweek=1'; - print '
    '; - print ''; - print ' '; - $i = 0; - while ($i < 7) - { - echo ' \n"; - $i++; - } - echo " \n"; + print '
    '; + print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); + print '
    '; - echo " \n"; + print '
    '; + print '
    '.$langs->trans("Day".(($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7))."
    '; + print ' '; + $i = 0; + while ($i < 7) { + echo ' \n"; + $i++; + } + echo " \n"; - for ($iter_day = 0; $iter_day < 7; $iter_day++) - { - // Show days of the current week + echo " \n"; + + for ($iter_day = 0; $iter_day < 7; $iter_day++) { + // Show days of the current week $curtime = dol_time_plus_duree($firstdaytoshow, $iter_day, 'd'); $tmparray = dol_getdate($curtime, true); $tmpday = $tmparray['mday']; $tmpmonth = $tmparray['mon']; $tmpyear = $tmparray['year']; - $style = 'cal_current_month'; - if ($iter_day == 6) $style .= ' cal_other_month_right'; - $today = 0; - $todayarray = dol_getdate($now, 'fast'); - if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) $today = 1; - if ($today) $style = 'cal_today'; + $style = 'cal_current_month'; + if ($iter_day == 6) $style .= ' cal_other_month_right'; + $today = 0; + $todayarray = dol_getdate($now, 'fast'); + if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) $today = 1; + if ($today) $style = 'cal_today'; - echo ' \n"; - } - echo " \n"; + echo ' \n"; + } + echo " \n"; - print "
    '.$langs->trans("Day".(($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7))."
    '; - show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300); - echo "
    '; + show_day_events($db, $tmpday, $tmpmonth, $tmpyear, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300); + echo "
    \n"; + print "\n"; print '
    '; - echo ''; - echo ''; - echo ''; -} -else // View by day + echo ''; + echo ''; + echo ''; +} else // View by day { - $newparam = $param; // newparam is for birthday links - $newparam = preg_replace('/action=show_month&?/i', '', $newparam); - $newparam = preg_replace('/action=show_week&?/i', '', $newparam); - $newparam = preg_replace('/viewday=[0-9]+&?/i', '', $newparam); - $newparam .= '&viewday=1'; - // Code to show just one day - $style = 'cal_current_month cal_current_month_oneday'; - $today = 0; - $todayarray = dol_getdate($now, 'fast'); - if ($todayarray['mday'] == $day && $todayarray['mon'] == $month && $todayarray['year'] == $year) $today = 1; - //if ($today) $style='cal_today'; + $newparam = $param; // newparam is for birthday links + $newparam = preg_replace('/action=show_month&?/i', '', $newparam); + $newparam = preg_replace('/action=show_week&?/i', '', $newparam); + $newparam = preg_replace('/viewday=[0-9]+&?/i', '', $newparam); + $newparam .= '&viewday=1'; + // Code to show just one day + $style = 'cal_current_month cal_current_month_oneday'; + $today = 0; + $todayarray = dol_getdate($now, 'fast'); + if ($todayarray['mday'] == $day && $todayarray['mon'] == $month && $todayarray['year'] == $year) $today = 1; + //if ($today) $style='cal_today'; - $timestamp = dol_mktime(12, 0, 0, $month, $day, $year); - $arraytimestamp = dol_getdate($timestamp); + $timestamp = dol_mktime(12, 0, 0, $month, $day, $year); + $arraytimestamp = dol_getdate($timestamp); - //echo ''; - echo '
    '; + print '
    '; + print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); + print '
    '; - echo ' '; - echo ' '; - echo ' \n"; - echo " \n"; + print '
    '; + echo '
    '.$langs->trans("Day".$arraytimestamp['wday'])."
    '; - /* + echo ' '; + echo ' \n"; + echo " \n"; + + /* echo '
    '; echo '
    '; echo '
    '; @@ -1319,39 +1386,39 @@ else // View by day echo "
    \n"; */ - echo '
    '.$langs->trans("Day".$arraytimestamp['wday'])."
    '; + echo ''; + print '
  • '; - /* WIP View per hour */ - $useviewhour = 0; - if ($useviewhour) - { - print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table + /* WIP View per hour */ + $useviewhour = 0; + if ($useviewhour) + { + print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table - $maxheightwin = (isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 500) ? ($_SESSION["dol_screenheight"] - 200) : 660; // Also into index.php file + $maxheightwin = (isset($_SESSION["dol_screenheight"]) && $_SESSION["dol_screenheight"] > 500) ? ($_SESSION["dol_screenheight"] - 200) : 660; // Also into index.php file - echo '
    '; + echo '
    '; echo '
    '; - $maxnbofchar = 80; + $maxnbofchar = 80; - $tmp = explode('-', $conf->global->MAIN_DEFAULT_WORKING_HOURS); - $minhour = round($tmp[0], 0); - $maxhour = round($tmp[1], 0); - if ($minhour > 23) $minhour = 23; - if ($maxhour < 1) $maxhour = 1; - if ($maxhour <= $minhour) { $maxhour = $minhour + 1; } + $tmp = explode('-', $conf->global->MAIN_DEFAULT_WORKING_HOURS); + $minhour = round($tmp[0], 0); + $maxhour = round($tmp[1], 0); + if ($minhour > 23) $minhour = 23; + if ($maxhour < 1) $maxhour = 1; + if ($maxhour <= $minhour) { $maxhour = $minhour + 1; } - $i = 0; - $j = 0; + $i = 0; + $j = 0; while ($i < 24) { - echo '
    '."\n"; - echo '
    '.dol_print_date($i * 3600, 'hour', 'gmt').'
    '; - echo '
    '; - echo "
    \n"; - echo "
    \n"; - $i++; - $j++; + echo '
    '."\n"; + echo '
    '.dol_print_date($i * 3600, 'hour', 'gmt').'
    '; + echo '
    '."\n"; + echo '
    '."\n"; + $i++; + $j++; } echo '
    '; @@ -1359,15 +1426,13 @@ else // View by day show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, 1); print '
    '; - } - else - { - print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table + } else { + print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table - show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, 0); + show_day_events($db, $day, $month, $year, $month, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, 0); - print '
    '; - } + print '
    '; + } } print "\n".''; @@ -1397,417 +1462,401 @@ $db->close(); */ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $nonew = 0) { - global $user, $conf, $langs; - global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form - global $theme_datacolor; - global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused; + global $user, $conf, $langs; + global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form + global $theme_datacolor; + global $cachethirdparties, $cachecontacts, $cacheusers, $colorindexused; - $dateint = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day); + $dateint = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day); - print "\n"; + print "\n"; - // Line with title of day - $curtime = dol_mktime(0, 0, 0, $month, $day, $year); - print '
    '."\n"; + // Line with title of day + $curtime = dol_mktime(0, 0, 0, $month, $day, $year); + print '
    '."\n"; - if ($nonew <= 0) - { - print '
    '; - if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) - { - $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; + if ($nonew <= 0) + { + print '
    '; + if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) + { + $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year; - //$param='month='.$monthshown.'&year='.$year; - $hourminsec = '100000'; - print ''; - print img_picto($langs->trans("NewAction"), 'edit_add.png'); - print ''; - } - print '
    '."\n"; - } + //$param='month='.$monthshown.'&year='.$year; + $hourminsec = '100000'; + print ''; + print img_picto($langs->trans("NewAction"), 'edit_add.png'); + print ''; + } + print '
    '."\n"; + } - if ($nonew < 0) - { - print '
    '; - return; - } + if ($nonew < 0) + { + print '
    '; + return; + } - // Line with td contains all div of each events - print '
    '; - print '
    '; + // Line with td contains all div of each events + print '
    '; + print '
    '; - //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); - $i = 0; $numother = 0; $numbirthday = 0; $numical = 0; $numicals = array(); - $ymd = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day); + //$curtime = dol_mktime (0, 0, 0, $month, $day, $year); + $i = 0; $numother = 0; $numbirthday = 0; $numical = 0; $numicals = array(); + $ymd = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day); - $colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0 - $nextindextouse = is_array($colorindexused) ?count($colorindexused) : 0; // At first run this is 0, so fist user has 0, next 1, ... + $colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0 + $nextindextouse = is_array($colorindexused) ?count($colorindexused) : 0; // At first run this is 0, so fist user has 0, next 1, ... //var_dump($colorindexused); - foreach ($eventarray as $daykey => $notused) - { - $annee = date('Y', $daykey); - $mois = date('m', $daykey); - $jour = date('d', $daykey); - if ($day == $jour && $month == $mois && $year == $annee) - { - foreach ($eventarray[$daykey] as $index => $event) - { - if ($i < $maxprint || $maxprint == 0 || !empty($conf->global->MAIN_JS_SWITCH_AGENDA)) - { - $keysofuserassigned = array_keys($event->userassigned); - $ponct = ($event->date_start_in_calendar == $event->date_end_in_calendar); + foreach ($eventarray as $daykey => $notused) + { + $annee = date('Y', $daykey); + $mois = date('m', $daykey); + $jour = date('d', $daykey); + if ($day == $jour && $month == $mois && $year == $annee) + { + foreach ($eventarray[$daykey] as $index => $event) + { + if ($i < $maxprint || $maxprint == 0 || !empty($conf->global->MAIN_JS_SWITCH_AGENDA)) + { + $keysofuserassigned = array_keys($event->userassigned); + $ponct = ($event->date_start_in_calendar == $event->date_end_in_calendar); - // Define $color (Hex string like '0088FF') and $cssclass of event - $color = -1; $cssclass = ''; $colorindex = -1; - if (in_array($user->id, $keysofuserassigned)) - { - $cssclass = 'family_mytasks'; + // Define $color (Hex string like '0088FF') and $cssclass of event + $color = -1; $cssclass = ''; $colorindex = -1; + if (in_array($user->id, $keysofuserassigned)) + { + $cssclass = 'family_mytasks'; - if (empty($cacheusers[$event->userownerid])) - { - $newuser = new User($db); - $newuser->fetch($event->userownerid); - $cacheusers[$event->userownerid] = $newuser; - } - //var_dump($cacheusers[$event->userownerid]->color); - - // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) - if (!empty($cacheusers[$event->userownerid]->color)) $color = $cacheusers[$event->userownerid]->color; - } - elseif ($event->type_code == 'ICALEVENT') // Event come from external ical file - { - $numical++; - if (!empty($event->icalname)) { - if (!isset($numicals[dol_string_nospecial($event->icalname)])) { - $numicals[dol_string_nospecial($event->icalname)] = 0; - } - $numicals[dol_string_nospecial($event->icalname)]++; - } - - $color = ($event->icalcolor ? $event->icalcolor : -1); - $cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other'); - } - elseif ($event->type_code == 'BIRTHDAY') - { - $numbirthday++; $colorindex = 2; $cssclass = 'family_birthday unmovable'; $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]); - } - else - { - $numother++; - $color = ($event->icalcolor ? $event->icalcolor : -1); - $cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other'); - - if (empty($cacheusers[$event->userownerid])) - { - $newuser = new User($db); - $newuser->fetch($event->userownerid); - $cacheusers[$event->userownerid] = $newuser; - } - //var_dump($cacheusers[$event->userownerid]->color); - - // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) - if (!empty($cacheusers[$event->userownerid]->color)) $color = $cacheusers[$event->userownerid]->color; - } - - if ($color < 0) // Color was not set on user card. Set color according to color index. - { - // Define color index if not yet defined - $idusertouse = ($event->userownerid ? $event->userownerid : 0); - if (isset($colorindexused[$idusertouse])) - { - $colorindex = $colorindexused[$idusertouse]; // Color already assigned to this user - } - else - { - $colorindex = $nextindextouse; - $colorindexused[$idusertouse] = $colorindex; - if (!empty($theme_datacolor[$nextindextouse + 1])) $nextindextouse++; // Prepare to use next color - } - //print '|'.($color).'='.($idusertouse?$idusertouse:0).'='.$colorindex.'
    '; - // Define color - $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]); - } - $cssclass = $cssclass.' '.$cssclass.'_day_'.$ymd; - - // Defined style to disable drag and drop feature - if ($event->type_code == 'AC_OTH_AUTO') - { - $cssclass .= " unmovable"; - } - elseif ($event->type_code == 'ICALEVENT') - { - $cssclass .= " unmovable"; - } elseif ($event->date_end_in_calendar && date('Ymd', $event->date_start_in_calendar) != date('Ymd', $event->date_end_in_calendar)) { - $tmpyearend = date('Y', $event->date_end_in_calendar); - $tmpmonthend = date('m', $event->date_end_in_calendar); - $tmpdayend = date('d', $event->date_end_in_calendar); - if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) - { - $cssclass .= " unmovable"; - } - } - else { - if ($user->rights->agenda->allactions->create || - (($event->authorid == $user->id || $event->userownerid == $user->id) && $user->rights->agenda->myactions->create)) - { - $cssclass .= " movable cursormove"; - } else { - $cssclass .= " unmovable"; - } - } - - $h = ''; $nowrapontd = 1; - if ($action == 'show_day') { $h = 'height: 100%; '; $nowrapontd = 0; } - if ($action == 'show_week') { $h = 'height: 100%; '; $nowrapontd = 0; } - - // Show rect of event - print "\n"; - print ''."\n"; - print '
    '; - - //var_dump($event->userassigned); - //var_dump($event->transparency); - print ''; - print ''; - print ''; + // Status - Percent + $withstatus = 0; + if ($event->type_code != 'BIRTHDAY' && $event->type_code != 'ICALEVENT') + { + $withstatus = 1; + if ($event->percentage >= 0) $withstatus = 2; + } + print '
    '; - - $daterange = ''; - - if ($event->type_code == 'BIRTHDAY') // It's a birthday - { - print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'birthday', 'contact'); - } - elseif ($event->type_code == 'HOLIDAY') - { - print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'holiday', 'user'); - } - elseif ($event->type_code != 'BIRTHDAY' && $event->type_code != 'HOLIDAY') - { - // Picto - if (empty($event->fulldayevent)) - { - //print $event->getNomUrl(2).' '; - } - - // Date - if (empty($event->fulldayevent)) - { - // Show hours (start ... end) - $tmpyearstart = date('Y', $event->date_start_in_calendar); - $tmpmonthstart = date('m', $event->date_start_in_calendar); - $tmpdaystart = date('d', $event->date_start_in_calendar); - $tmpyearend = date('Y', $event->date_end_in_calendar); - $tmpmonthend = date('m', $event->date_end_in_calendar); - $tmpdayend = date('d', $event->date_end_in_calendar); - // Hour start - if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) - { - $daterange .= dol_print_date($event->date_start_in_calendar, 'hour'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user - if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) - { - if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend) - $daterange .= '-'; - //else - //print '...'; - } - } - if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) - { - if ($tmpyearstart != $tmpyearend || $tmpmonthstart != $tmpmonthend || $tmpdaystart != $tmpdayend) - { - $daterange .= '...'; - } - } - // Hour end - if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) - { - if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) - $daterange .= dol_print_date($event->date_end_in_calendar, 'hour'); // Il faudrait utiliser ici tzuser, mais si on ne peut pas car qd on rentre un date dans fiche action, en input la conversion local->gmt se base sur le TZ server et non user - } - } - else + if (empty($cacheusers[$event->userownerid])) { - if ($showinfo) - { - print $langs->trans("EventOnFullDay")."
    \n"; - } - } + $newuser = new User($db); + $newuser->fetch($event->userownerid); + $cacheusers[$event->userownerid] = $newuser; + } + //var_dump($cacheusers[$event->userownerid]->color); - // Show title - $titletoshow = $daterange; - $titletoshow .= ($titletoshow ? ' ' : '').($event->label ? $event->label : $event->libelle); + // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) + if (!empty($cacheusers[$event->userownerid]->color)) $color = $cacheusers[$event->userownerid]->color; + } elseif ($event->type_code == 'ICALEVENT') // Event come from external ical file + { + $numical++; + if (!empty($event->icalname)) { + if (!isset($numicals[dol_string_nospecial($event->icalname)])) { + $numicals[dol_string_nospecial($event->icalname)] = 0; + } + $numicals[dol_string_nospecial($event->icalname)]++; + } - if ($event->type_code != 'ICALEVENT') { - $savlabel = $event->label ? $event->label : $event->libelle; - $event->label = $titletoshow; - $event->libelle = $titletoshow; - // Note: List of users are inside $event->userassigned. Link may be clickable depending on permissions of user. - $titletoshow = $event->getNomUrl(0, $maxnbofchar, 'cal_event', '', 0, 0); - $event->label = $savlabel; - $event->libelle = $savlabel; - } + $color = ($event->icalcolor ? $event->icalcolor : -1); + $cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other'); + } elseif ($event->type_code == 'BIRTHDAY') + { + $numbirthday++; $colorindex = 2; $cssclass = 'family_birthday unmovable'; $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]); + } else { + $numother++; + $color = ($event->icalcolor ? $event->icalcolor : -1); + $cssclass = (!empty($event->icalname) ? 'family_ext'.md5($event->icalname) : 'family_other'); - // Loop on each assigned user - $listofusertoshow = ''; - $posuserassigned = 0; - foreach ($event->userassigned as $tmpid => $tmpdata) - { - if (!$posuserassigned && $titletoshow) $listofusertoshow .= '
    '; - $posuserassigned++; - if (empty($cacheusers[$tmpid])) - { - $newuser = new User($db); - $newuser->fetch($tmpid); - $cacheusers[$tmpid] = $newuser; - } + if (empty($cacheusers[$event->userownerid])) + { + $newuser = new User($db); + $newuser->fetch($event->userownerid); + $cacheusers[$event->userownerid] = $newuser; + } + //var_dump($cacheusers[$event->userownerid]->color); - $listofusertoshow .= $cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'paddingright valigntextbottom'); - } + // We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event) + if (!empty($cacheusers[$event->userownerid]->color)) $color = $cacheusers[$event->userownerid]->color; + } - print $titletoshow; - print $listofusertoshow; + if ($color < 0) // Color was not set on user card. Set color according to color index. + { + // Define color index if not yet defined + $idusertouse = ($event->userownerid ? $event->userownerid : 0); + if (isset($colorindexused[$idusertouse])) + { + $colorindex = $colorindexused[$idusertouse]; // Color already assigned to this user + } else { + $colorindex = $nextindextouse; + $colorindexused[$idusertouse] = $colorindex; + if (!empty($theme_datacolor[$nextindextouse + 1])) $nextindextouse++; // Prepare to use next color + } + //print '|'.($color).'='.($idusertouse?$idusertouse:0).'='.$colorindex.'
    '; + // Define color + $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]); + } + $cssclass = $cssclass.' '.$cssclass.'_day_'.$ymd; - if ($event->type_code == 'ICALEVENT') print '
    ('.dol_trunc($event->icalname, $maxnbofchar).')'; + // Defined style to disable drag and drop feature + if ($event->type_code == 'AC_OTH_AUTO') + { + $cssclass .= " unmovable"; + } elseif ($event->type_code == 'ICALEVENT') + { + $cssclass .= " unmovable"; + } elseif ($event->date_end_in_calendar && date('Ymd', $event->date_start_in_calendar) != date('Ymd', $event->date_end_in_calendar)) { + $tmpyearend = date('Y', $event->date_end_in_calendar); + $tmpmonthend = date('m', $event->date_end_in_calendar); + $tmpdayend = date('d', $event->date_end_in_calendar); + if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) + { + $cssclass .= " unmovable"; + } + } else { + if ($user->rights->agenda->allactions->create || + (($event->authorid == $user->id || $event->userownerid == $user->id) && $user->rights->agenda->myactions->create)) + { + $cssclass .= " movable cursormove"; + } else { + $cssclass .= " unmovable"; + } + } - $thirdparty_id = ($event->thirdparty_id > 0 ? $event->thirdparty_id : ((is_object($event->societe) && $event->societe->id > 0) ? $event->societe->id : 0)); - $contact_id = ($event->contact_id > 0 ? $event->contact_id : ((is_object($event->contact) && $event->contact->id > 0) ? $event->contact->id : 0)); + $h = ''; $nowrapontd = 1; + if ($action == 'show_day') { $h = 'height: 100%; '; $nowrapontd = 0; } + if ($action == 'show_week') { $h = 'height: 100%; '; $nowrapontd = 0; } - // If action related to company / contact - $linerelatedto = ''; - if ($thirdparty_id > 0) - { - if (!isset($cachethirdparties[$thirdparty_id]) || !is_object($cachethirdparties[$thirdparty_id])) - { - $thirdparty = new Societe($db); - $thirdparty->fetch($thirdparty_id); - $cachethirdparties[$thirdparty_id] = $thirdparty; - } - else $thirdparty = $cachethirdparties[$thirdparty_id]; - if (!empty($thirdparty->id)) $linerelatedto .= $thirdparty->getNomUrl(1, '', 0); - } - if (!empty($contact_id) && $contact_id > 0) - { - if (!is_object($cachecontacts[$contact_id])) - { - $contact = new Contact($db); - $contact->fetch($contact_id); - $cachecontacts[$contact_id] = $contact; - } - else $contact = $cachecontacts[$contact_id]; - if ($linerelatedto) $linerelatedto .= ' '; - if (!empty($contact->id)) $linerelatedto .= $contact->getNomUrl(1, '', 0); - } - if (!empty($event->fk_element) && $event->fk_element > 0 && !empty($event->elementtype) && !empty($conf->global->AGENDA_SHOW_LINKED_OBJECT)) - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - if ($linerelatedto) $linerelatedto .= '
    '; - $linerelatedto .= dolGetElementUrl($event->fk_element, $event->elementtype, 1); - } - if ($linerelatedto) print '
    '.$linerelatedto; - } + // Show rect of event + print "\n"; + print ''."\n"; + print '
    '; - // Show location - if ($showinfo) - { - if ($event->location) - { - print '
    '; - print $langs->trans("Location").': '.$event->location; - } - } + //var_dump($event->userassigned); + //var_dump($event->transparency); + print ''; + print ''; + print ''; - // Status - Percent - $withstatus = 0; - if ($event->type_code != 'BIRTHDAY' && $event->type_code != 'ICALEVENT') - { - $withstatus = 1; - if ($event->percentage >= 0) $withstatus = 2; - } - print '
    '; - print ''; - if ($withstatus) print $event->getLibStatut(3, 1); - else print ' '; - print '
    '; - print '
    '."\n"; - $i++; - } - else - { - print ''.img_picto("all", "1downarrow_selected.png").' ...'; - print ' +'.(count($eventarray[$daykey]) - $maxprint); - print ''; - break; - //$ok=false; // To avoid to show twice the link - } - } + $daterange = ''; - break; - } - } - if (!$i) print ' '; + if ($event->type_code == 'BIRTHDAY') // It's a birthday + { + print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'birthday', 'contact'); + } elseif ($event->type_code == 'HOLIDAY') + { + print $event->getNomUrl(1, $maxnbofchar, 'cal_event', 'holiday', 'user'); + } elseif ($event->type_code != 'BIRTHDAY' && $event->type_code != 'HOLIDAY') + { + // Picto + if (empty($event->fulldayevent)) + { + //print $event->getNomUrl(2).' '; + } - if (!empty($conf->global->MAIN_JS_SWITCH_AGENDA) && $i > $maxprint && $maxprint) - { - print '
    '.img_picto("all", "1downarrow_selected.png").' +'.$langs->trans("More").'...
    '; - //print ' +'.(count($eventarray[$daykey])-$maxprint); - print ''."\n"; - } + // Loop on each assigned user + $listofusertoshow = ''; + $posuserassigned = 0; + foreach ($event->userassigned as $tmpid => $tmpdata) + { + if (!$posuserassigned && $titletoshow) $listofusertoshow .= '
    '; + $posuserassigned++; + if (empty($cacheusers[$tmpid])) + { + $newuser = new User($db); + $newuser->fetch($tmpid); + $cacheusers[$tmpid] = $newuser; + } - print ''; // td tr + $listofusertoshow .= $cacheusers[$tmpid]->getNomUrl(-3, '', 0, 0, 0, 0, '', 'paddingright valigntextbottom'); + } - print ''; // table - print "\n"; + print $titletoshow; + print $listofusertoshow; + + if ($event->type_code == 'ICALEVENT') print '
    ('.dol_trunc($event->icalname, $maxnbofchar).')'; + + $thirdparty_id = ($event->thirdparty_id > 0 ? $event->thirdparty_id : ((is_object($event->societe) && $event->societe->id > 0) ? $event->societe->id : 0)); + $contact_id = ($event->contact_id > 0 ? $event->contact_id : ((is_object($event->contact) && $event->contact->id > 0) ? $event->contact->id : 0)); + + // If action related to company / contact + $linerelatedto = ''; + if ($thirdparty_id > 0) + { + if (!isset($cachethirdparties[$thirdparty_id]) || !is_object($cachethirdparties[$thirdparty_id])) + { + $thirdparty = new Societe($db); + $thirdparty->fetch($thirdparty_id); + $cachethirdparties[$thirdparty_id] = $thirdparty; + } else $thirdparty = $cachethirdparties[$thirdparty_id]; + if (!empty($thirdparty->id)) $linerelatedto .= $thirdparty->getNomUrl(1, '', 0); + } + if (!empty($contact_id) && $contact_id > 0) + { + if (!is_object($cachecontacts[$contact_id])) + { + $contact = new Contact($db); + $contact->fetch($contact_id); + $cachecontacts[$contact_id] = $contact; + } else $contact = $cachecontacts[$contact_id]; + if ($linerelatedto) $linerelatedto .= ' '; + if (!empty($contact->id)) $linerelatedto .= $contact->getNomUrl(1, '', 0); + } + if (!empty($event->fk_element) && $event->fk_element > 0 && !empty($event->elementtype) && !empty($conf->global->AGENDA_SHOW_LINKED_OBJECT)) + { + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + if ($linerelatedto) $linerelatedto .= '
    '; + $linerelatedto .= dolGetElementUrl($event->fk_element, $event->elementtype, 1); + } + if ($linerelatedto) print '
    '.$linerelatedto; + } + + // Show location + if ($showinfo) + { + if ($event->location) + { + print '
    '; + print $langs->trans("Location").': '.$event->location; + } + } + + print '
    '; + if ($withstatus) print $event->getLibStatut(3, 1); + else print ' '; + print '
    '; + print '
    '."\n"; + $i++; + } else { + print ''.img_picto("all", "1downarrow_selected.png").' ...'; + print ' +'.(count($eventarray[$daykey]) - $maxprint); + print ''; + break; + //$ok=false; // To avoid to show twice the link + } + } + + break; + } + } + if (!$i) print ' '; + + if (!empty($conf->global->MAIN_JS_SWITCH_AGENDA) && $i > $maxprint && $maxprint) + { + print '
    '.img_picto("all", "1downarrow_selected.png").' +'.$langs->trans("More").'...
    '; + //print ' +'.(count($eventarray[$daykey])-$maxprint); + print ''."\n"; + } + + print '
    '; // td tr + + print '
    '; // table + print "\n"; } @@ -1824,13 +1873,11 @@ function dol_color_minus($color, $minus, $minusunit = 16) $newcolor = $color; if ($minusunit == 16) { - $newcolor[0] = dechex(max(min(hexdec($newcolor[0]) - $minus, 15), 0)); - $newcolor[2] = dechex(max(min(hexdec($newcolor[2]) - $minus, 15), 0)); - $newcolor[4] = dechex(max(min(hexdec($newcolor[4]) - $minus, 15), 0)); - } - else - { - // Not yet implemented + $newcolor[0] = dechex(max(min(hexdec($newcolor[0]) - $minus, 15), 0)); + $newcolor[2] = dechex(max(min(hexdec($newcolor[2]) - $minus, 15), 0)); + $newcolor[4] = dechex(max(min(hexdec($newcolor[4]) - $minus, 15), 0)); + } else { + // Not yet implemented } return $newcolor; } @@ -1845,39 +1892,39 @@ function dol_color_minus($color, $minus, $minusunit = 16) function sort_events_by_date($a, $b) { // Sort holidays at first - if ($a->type_code === 'HOLIDAY') - { - return -1; - } + if ($a->type_code === 'HOLIDAY') + { + return -1; + } - if ($b->type_code === 'HOLIDAY') - { - return 1; - } + if ($b->type_code === 'HOLIDAY') + { + return 1; + } - // datep => Event start time - // datef => Event end time + // datep => Event start time + // datef => Event end time - // Events have different start time - if ($a->datep !== $b->datep) - { - return $a->datep - $b->datep; - } + // Events have different start time + if ($a->datep !== $b->datep) + { + return $a->datep - $b->datep; + } - // Events have same start time and no end time - if ((!is_numeric($b->datef)) || (!is_numeric($a->datef))) - { - return sort_events_by_percentage($a, $b); - } + // Events have same start time and no end time + if ((!is_numeric($b->datef)) || (!is_numeric($a->datef))) + { + return sort_events_by_percentage($a, $b); + } - // Events have the same start time and same end time - if ($b->datef === $a->datef) - { - return sort_events_by_percentage($a, $b); - } + // Events have the same start time and same end time + if ($b->datef === $a->datef) + { + return sort_events_by_percentage($a, $b); + } - // Events have the same start time, but have different end time -> longest event first - return $b->datef - $a->datef; + // Events have the same start time, but have different end time -> longest event first + return $b->datef - $a->datef; } /** @@ -1889,18 +1936,18 @@ function sort_events_by_date($a, $b) */ function sort_events_by_percentage($a, $b) { - // Sort events with no percentage before each other - // (usefull to sort holidays, sick days or similar on the top) + // Sort events with no percentage before each other + // (usefull to sort holidays, sick days or similar on the top) - if ($a->percentage < 0) - { - return -1; - } + if ($a->percentage < 0) + { + return -1; + } - if ($b->percentage < 0) - { - return 1; - } + if ($b->percentage < 0) + { + return 1; + } - return $b->percentage - $a->percentage; + return $b->percentage - $a->percentage; } diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 2391f9ca491..92975aafec0 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -5,6 +5,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2017 Open-DSI * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -39,7 +40,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array("users", "companies", "agenda", "commercial", "other")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$massaction = GETPOST('massaction', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'actioncommlist'; // To manage different context of search $resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); $pid = GETPOST("search_projectid", 'int', 3) ?GETPOST("search_projectid", 'int', 3) : GETPOST("projectid", 'int', 3); @@ -49,14 +51,15 @@ $optioncss = GETPOST('optioncss', 'alpha'); $year = GETPOST("year", 'int'); $month = GETPOST("month", 'int'); $day = GETPOST("day", 'int'); +$toselect = GETPOST('toselect', 'array'); +$confirm = GETPOST('confirm', 'alpha'); + // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) if (GETPOST('search_actioncode', 'array')) { $actioncode = GETPOST('search_actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE)); } if ($actioncode == '' && empty($actioncodearray)) $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE); @@ -131,8 +134,8 @@ $arrayfields = array( 'a.datep'=>array('label'=>"DateStart", 'checked'=>1), 'a.datep2'=>array('label'=>"DateEnd", 'checked'=>1), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), - 'a.fk_contact'=>array('label'=>"Contact", 'checked'=>1), - 'a.fk_element'=>array('label'=>"LinkedObject", 'checked'=>0, 'enabled'=>(!empty($conf->global->AGENDA_SHOW_LINKED_OBJECT))), + 'a.fk_contact'=>array('label'=>"Contact", 'checked'=>0), + 'a.fk_element'=>array('label'=>"LinkedObject", 'checked'=>1, 'enabled'=>(!empty($conf->global->AGENDA_SHOW_LINKED_OBJECT))), 'a.percent'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), 'a.datec'=>array('label'=>'DateCreation', 'checked'=>0), 'a.tms'=>array('label'=>'DateModification', 'checked'=>0) @@ -149,11 +152,17 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count $object->fields = dol_sort_array($object->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); +//var_dump($_POST);exit; /* * Actions */ +if (GETPOST('cancel', 'alpha')) +{ + $action = 'list'; $massaction = ''; +} + if (GETPOST("viewcal") || GETPOST("viewweek") || GETPOST("viewday")) { $param = ''; @@ -185,9 +194,53 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $datestart = ''; $dateend = ''; $search_status = ''; + $toselect = ''; $search_array_options = array(); } +if (empty($reshook) && !empty($massaction)) +{ + unset($percent); + + switch ($massaction) + { + case 'set_all_events_to_todo': + $percent = ActionComm::EVENT_TODO; + break; + + case 'set_all_events_to_in_progress': + $percent = ActionComm::EVENT_IN_PROGRESS; + break; + + case 'set_all_events_to_finished': + $percent = ActionComm::EVENT_FINISHED; + break; + } + + if (isset($percent)) + { + foreach ($toselect as $toselectid) + { + $result = $object->updatePercent($toselectid, $percent); + if ($result < 0) + { + dol_print_error($db); + break; + } + } + } +} + +// As mass deletion happens with a confirm step, $massaction is not use for the final step (deletion). +if (empty($reshook)) +{ + $objectclass = 'ActionComm'; + $objectlabel = 'Events'; + $uploaddir = true; + // Only users that can delete any event can remove records. + $permissiontodelete = $user->rights->agenda->allactions->delete; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; +} /* * View @@ -239,6 +292,19 @@ if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; +// List of mass actions available +$arrayofmassactions = array( + 'set_all_events_to_todo' => $langs->trans("SetAllEventsToTodo"), + 'set_all_events_to_in_progress' => $langs->trans("SetAllEventsToInProgress"), + 'set_all_events_to_finished' => $langs->trans("SetAllEventsToFinished"), +); +if ($user->rights->agenda->allactions->delete) +{ + $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); +} +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + $sql = "SELECT"; if ($usergroup > 0) $sql .= " DISTINCT"; $sql .= " s.nom as societe, s.rowid as socid, s.client, s.email as socemail,"; @@ -279,24 +345,18 @@ if (!empty($actioncode)) { if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; - else - { + else { if ($actioncode == 'AC_OTH') $sql .= " AND c.type != 'systemauto'"; if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND c.type = 'systemauto'"; } - } - else - { + } else { if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; - else - { + else { if (is_array($actioncode)) { $sql .= " AND c.code IN ('".implode("','", $actioncode)."')"; - } - else - { + } else { $sql .= " AND c.code IN ('".implode("','", explode(',', $actioncode))."')"; } } @@ -366,8 +426,12 @@ if ($resql) $num = $db->num_rows($resql); + $arrayofselected = is_array($toselect) ? $toselect : array(); + // Local calendar - $newtitle = '
    '.$langs->trans("LocalAgenda").'  
    '; + $newtitle = '
    '; + $newtitle .= ' '.$langs->trans("LocalAgenda").'   '; + $newtitle .= '
    '; //$newtitle=$langs->trans($title); $tabactive = 'cardlist'; @@ -378,7 +442,6 @@ if ($resql) if ($optioncss != '') print ''; print ''; - print ''; print ''; print ''; print ''; @@ -389,9 +452,9 @@ if ($resql) if ($showbirthday) $nav .= ''; print $nav; - dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); - print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); - dol_fiche_end(); + //dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); + //print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); + //dol_fiche_end(); // Add link to show birthdays $link = ''; @@ -418,25 +481,64 @@ if ($resql) if (empty($reshook)) { $s .= $hookmanager->resPrint; - } - elseif ($reshook > 1) + } elseif ($reshook > 1) { $s = $hookmanager->resPrint; } - $newcardbutton = ''; - if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) - { - $tmpforcreatebutton = dol_getdate(dol_now(), true); + $viewmode = ''; + $viewmode .= ''; + //$viewmode .= ''; + $viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"'); + //$viewmode .= ''; + $viewmode .= ''.$langs->trans("ViewList").''; - $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + $viewmode .= ''; + //$viewmode .= ''; + $viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"'); + //$viewmode .= ''; + $viewmode .= ''.$langs->trans("ViewCal").''; - //$param='month='.$monthshown.'&year='.$year; - $hourminsec = '100000'; - $newcardbutton .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : ''))); - } + $viewmode .= ''; + //$viewmode .= ''; + $viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); + //$viewmode .= ''; + $viewmode .= ''.$langs->trans("ViewWeek").''; - print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, -1 * $nbtotalofrecords, '', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1); + $viewmode .= ''; + //$viewmode .= ''; + $viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); + //$viewmode .= ''; + $viewmode .= ''.$langs->trans("ViewDay").''; + + $viewmode .= ''; + //$viewmode .= ''; + $viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); + //$viewmode .= ''; + $viewmode .= ''.$langs->trans("ViewPerUser").''; + + $viewmode .= ''; + + $tmpforcreatebutton = dol_getdate(dol_now(), true); + + $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + + //$param='month='.$monthshown.'&year='.$year; + $hourminsec = '100000'; + + $url = DOL_URL_ROOT.'/comm/action/card.php?action=create'; + $url .= '&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec; + $url .= '&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : '')); + + $newcardbutton = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, '', $user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create); + + $param .= '&action='.$action; + + print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1 * $nbtotalofrecords, 'object_action', 0, $nav.$newcardbutton, '', $limit, 0, 0, 1, $viewmode); + + print $s; + + include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; $moreforfilter = ''; @@ -444,6 +546,11 @@ if ($resql) $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); $i = 0; + + print '
    '; + print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); + print '
    '; + print '
    '; print ''."\n"; @@ -569,8 +676,7 @@ if ($resql) { $userstatic->fetch($obj->fk_user_action); print $userstatic->getNomUrl(-1); - } - else print ' '; + } else print ' '; print ''; } @@ -585,12 +691,11 @@ if ($resql) { if ($actioncomm->type_picto) { $imgpicto = img_picto('', $actioncomm->type_picto); - } - else { + } else { if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_EMAIL' || $actioncomm->type_code == 'AC_EMAIL_IN') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_other', '', false, 0, 0, '', 'paddingright').' '; @@ -602,14 +707,17 @@ if ($resql) if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH'; if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') { $labeltype = $langs->trans("Message"); - } elseif (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; + } else { + if (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; + if ($obj->type_code == 'AC_OTH_AUTO' && ($obj->type_code != $obj->code) && $labeltype && !empty($arraylist[$obj->code])) $labeltype .= ' - '.$arraylist[$obj->code]; // Use code in priority on type_code + } print dol_trunc($labeltype, 28); print ''; } // Label if (!empty($arrayfields['a.label']['checked'])) { - print ''; } @@ -623,6 +731,7 @@ if ($resql) } $formatToUse = $obj->fulldayevent ? 'day' : 'dayhour'; + // Start date if (!empty($arrayfields['a.datep']['checked'])) { print ''; } @@ -677,8 +785,7 @@ if ($resql) $contactListCache[$socpeopleassigned['id']] = $contact->getNomUrl(1, '', 0); $contactList[] = $contact->getNomUrl(1, '', 0); } - } - else { + } else { // use cache $contactList[] = $contactListCache[$socpeopleassigned['id']]; } @@ -686,8 +793,7 @@ if ($resql) if (!empty($contactList)) { print implode(', ', $contactList); } - } - elseif ($obj->fk_contact > 0) //keep for retrocompatibility with faraway event + } elseif ($obj->fk_contact > 0) //keep for retrocompatibility with faraway event { $contactstatic->id = $obj->fk_contact; $contactstatic->email = $obj->email; @@ -698,9 +804,7 @@ if ($resql) $contactstatic->phone_perso = $obj->phone_perso; $contactstatic->country_id = $obj->country_id; print $contactstatic->getNomUrl(1, '', 0); - } - else - { + } else { print " "; } print ''; @@ -740,7 +844,15 @@ if ($resql) $datep = $db->jdate($obj->datep); print ''; } - print ''; + // Action column + print ''; print "\n"; $i++; @@ -750,9 +862,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index 6dfbc6c7f9c..72b25c9d731 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -41,9 +41,9 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (!isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW = 3; -$filter = GETPOST("filter", 'alpha', 3); -$filtert = GETPOST("filtert", "int", 3); -$usergroup = GETPOST("usergroup", "int", 3); +$filter = GETPOST("search_filter", 'alpha', 3) ? GETPOST("search_filter", 'alpha', 3) : GETPOST("filter", 'alpha', 3); +$filtert = GETPOST("search_filtert", "int", 3) ? GETPOST("search_filtert", "int", 3) : GETPOST("filtert", "int", 3); +$usergroup = GETPOST("search_usergroup", "int", 3) ? GETPOST("search_usergroup", "int", 3) : GETPOST("usergroup", "int", 3); //if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id; //$showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; $showbirthday = 0; @@ -64,7 +64,7 @@ if (!$sortorder) $sortorder = "ASC"; if (!$sortfield) $sortfield = "a.datec"; // Security check -$socid = GETPOST("socid", "int"); +$socid = GETPOST("search_socid", "int") ?GETPOST("search_socid", "int") : GETPOST("socid", "int"); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'agenda', 0, '', 'myactions'); if ($socid < 0) $socid = ''; @@ -79,24 +79,23 @@ if (!$user->rights->agenda->allactions->read || $filter == 'mine') // If no per //$action=GETPOST('action','alpha'); $action = 'show_pertype'; -$resourceid = GETPOST("resourceid", "int"); +$resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int"); $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y"); $month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m"); $week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W"); $day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d"); -$pid = GETPOST("projectid", "int", 3); -$status = GETPOST("status", 'alpha'); -$type = GETPOST("type", 'alpha'); +$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3); +$status = GETPOST("search_status", 'alpha') ?GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha'); +$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha'); $maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW); +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') // Set actioncode (this code must be same for setting actioncode into peruser, listacton and index) -if (GETPOST('actioncode', 'array')) +if (GETPOST('search_actioncode', 'array')) { - $actioncode = GETPOST('actioncode', 'array', 3); + $actioncode = GETPOST('search_actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ - $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode", "alpha") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE)); +} else { + $actioncode = GETPOST("search_actioncode", "alpha", 3) ?GETPOST("search_actioncode", "alpha", 3) : (GETPOST("search_actioncode", "alpha") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE)); } if ($actioncode == '' && empty($actioncodearray)) $actioncode = (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE); @@ -109,6 +108,7 @@ if ($dateselect > 0) } $tmp = empty($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? '9-18' : $conf->global->MAIN_DEFAULT_WORKING_HOURS; +$tmp = str_replace(' ', '', $tmp); // FIX 7533 $tmparray = explode('-', $tmp); $begin_h = GETPOST('begin_h', 'int') != '' ?GETPOST('begin_h', 'int') : ($tmparray[0] != '' ? $tmparray[0] : 9); $end_h = GETPOST('end_h', 'int') ?GETPOST('end_h', 'int') : ($tmparray[1] != '' ? $tmparray[1] : 18); @@ -117,14 +117,15 @@ if ($end_h < 1 || $end_h > 24) $end_h = 18; if ($end_h <= $begin_h) $end_h = $begin_h + 1; $tmp = empty($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? '1-5' : $conf->global->MAIN_DEFAULT_WORKING_DAYS; +$tmp = str_replace(' ', '', $tmp); // FIX 7533 $tmparray = explode('-', $tmp); $begin_d = 1; -$end_d = 53; +$end_d = 53; if ($status == '' && !isset($_GET['status']) && !isset($_POST['status'])) $status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); if (empty($action) && !isset($_GET['action']) && !isset($_POST['action'])) $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); -if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week' && $action != 'show_peruser') { +if (GETPOST('viewcal', 'alpha') && $action != 'show_day' && $action != 'show_week' && $action != 'show_peruser') { $action = 'show_month'; $day = ''; } // View by month if (GETPOST('viewweek', 'alpha') || $action == 'show_week') { @@ -152,6 +153,10 @@ if ($action == 'delete_action') { $event = new ActionComm($db); $event->fetch($actionid); + $event->fetch_optionals(); + $event->fetch_userassigned(); + $event->oldcopy = clone $event; + $result = $event->delete(); } @@ -161,6 +166,27 @@ if ($action == 'delete_action') * View */ +$parameters = array( + 'socid' => $socid, + 'status' => $status, + 'year' => $year, + 'month' => $month, + 'day' => $day, + 'type' => $type, + 'maxprint' => $maxprint, + 'filter' => $filter, + 'filtert' => $filtert, + 'showbirthday' => $showbirthday, + 'canedit' => $canedit, + 'optioncss' => $optioncss, + 'actioncode' => $actioncode, + 'pid' => $pid, + 'resourceid' => $resourceid, + 'usergroup' => $usergroup, +); +$reshook = $hookmanager->executeHooks('beforeAgendaPerType', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + $form = new Form($db); $companystatic = new Societe($db); @@ -201,18 +227,26 @@ if ($status == 'done') $title = $langs->trans("DoneActions"); if ($status == 'todo') $title = $langs->trans("ToDoActions"); $param = ''; -if ($actioncode || isset($_GET['actioncode']) || isset($_POST['actioncode'])) $param .= "&actioncode=".$actioncode; -if ($resourceid > 0) $param .= "&resourceid=".$resourceid; -if ($status || isset($_GET['status']) || isset($_POST['status'])) $param .= "&status=".$status; -if ($filter) $param .= "&filter=".$filter; -if ($filtert) $param .= "&filtert=".$filtert; -if ($usergroup) $param .= "&usergroup=".$usergroup; -if ($socid) $param .= "&socid=".$socid; -if ($showbirthday) $param .= "&showbirthday=1"; -if ($pid) $param .= "&projectid=".$pid; -if ($type) $param .= "&type=".$type; -if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month' || $action != 'show_peruser' || $action != 'show_pertype') $param .= '&action='.$action; -$param .= "&maxprint=".$maxprint; +if ($actioncode || isset($_GET['search_actioncode']) || isset($_POST['search_actioncode'])) { + if (is_array($actioncode)) { + foreach ($actioncode as $str_action) $param .= "&search_actioncode[]=".urlencode($str_action); + } else $param .= "&search_actioncode=".urlencode($actioncode); +} +if ($resourceid > 0) $param .= "&search_resourceid=".urlencode($resourceid); +if ($status || isset($_GET['status']) || isset($_POST['status'])) $param .= "&search_status=".urlencode($status); +if ($filter) $param .= "&search_filter=".urlencode($filter); +if ($filtert) $param .= "&search_filtert=".urlencode($filtert); +if ($usergroup) $param .= "&search_usergroup=".urlencode($usergroup); +if ($socid) $param .= "&search_socid=".urlencode($socid); +if ($showbirthday) $param .= "&search_showbirthday=1"; +if ($pid) $param .= "&search_projectid=".urlencode($pid); +if ($type) $param .= "&search_type=".urlencode($type); +if ($action == 'show_day' || $action == 'show_week' || $action == 'show_month' || $action != 'show_peruser') $param .= '&action='.urlencode($action); +if ($begin_h != '') $param .= '&begin_h='.urlencode($begin_h); +if ($end_h != '') $param .= '&end_h='.urlencode($end_h); +if ($begin_d != '') $param .= '&begin_d='.urlencode($begin_d); +if ($end_d != '') $param .= '&end_d='.urlencode($end_d); +$param .= "&maxprint=".urlencode($maxprint); $prev = dol_get_first_day($year, 1); $prev_year = $year - 1; @@ -240,6 +274,7 @@ $lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd'); $max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year)); $tmpday = $first_day; +$picto = 'calendartype'; $nav = "".img_previous($langs->trans("Previous"))."\n"; $nav .= " ".dol_print_date(dol_mktime(0, 0, 0, $first_month, $first_day, $first_year), "%Y")." \n"; @@ -247,7 +282,7 @@ $nav .= "".$langs->trans("Today").")"; $picto = 'calendarweek'; -$nav .= '   '; +/*$nav .= '   '; $nav .= ''; $nav .= ''; $nav .= ''; @@ -262,27 +297,30 @@ $nav .= ''; $nav .= ''; $nav .= ''; $nav .= ''; - +*/ $nav .= $form->selectDate($dateselect, 'dateselect', 0, 0, 1, '', 1, 0); -$nav .= ' '; -$nav .= ''; +//$nav .= ' '; +$nav .= ' '; +//$nav .= ''; // Must be after the nav definition -$param .= '&year='.$year.'&month='.$month.($day ? '&day='.$day : ''); +$param .= '&year='.urlencode($year).'&month='.urlencode($month).($day ? '&day='.urlencode($day) : ''); //print 'x'.$param; - - -$tabactive = 'cardpertype'; +$tabactive = ''; +if ($action == 'show_month') $tabactive = 'cardmonth'; +if ($action == 'show_week') $tabactive = 'cardweek'; +if ($action == 'show_day') $tabactive = 'cardday'; +if ($action == 'show_list') $tabactive = 'cardlist'; +if ($action == 'show_peruser') $tabactive = 'cardperuser'; +if ($action == 'show_pertype') $tabactive = 'cardpertype'; $paramnoaction = preg_replace('/action=[a-z_]+/', '', $param); $head = calendars_prepare_head($paramnoaction); -dol_fiche_head($head, $tabactive, $langs->trans('Agenda'), 0, 'action'); -print_actions_filter($form, $canedit, $status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, $listofextcals, $actioncode, $usergroup, '', $resourceid); -dol_fiche_end(); +print ''."\n"; $showextcals = $listofextcals; // Legend @@ -329,18 +367,80 @@ if ($conf->use_javascript_ajax) if (empty($reshook)) { $s .= $hookmanager->resPrint; - } - elseif ($reshook > 1) + } elseif ($reshook > 1) { $s = $hookmanager->resPrint; } } } +$massactionbutton = ''; + +$viewmode = ''; +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("List"), 'object_list-alt', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewList").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewCal").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewWeek").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewDay").''; + +$viewmode .= ''; +//$viewmode .= ''; +$viewmode .= img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="pictoactionview block"'); +//$viewmode .= ''; +$viewmode .= ''.$langs->trans("ViewPerUser").''; + +$viewmode .= ''; + + +$newcardbutton = ''; +if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create) +{ + $tmpforcreatebutton = dol_getdate(dol_now(), true); + + $newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; + + //$param='month='.$monthshown.'&year='.$year; + $hourminsec = '100000'; + $newcardbutton .= dolGetButtonTitle($langs->trans("AddAction"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.sprintf("%04d%02d%02d", $tmpforcreatebutton['year'], $tmpforcreatebutton['mon'], $tmpforcreatebutton['mday']).$hourminsec.'&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : ''))); +} + +print_barre_liste($langs->trans("Agenda"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, -1, 'object_action', 0, $nav.''.$newcardbutton, '', $limit, 1, 0, 1, $viewmode); $link = ''; -print load_fiche_titre($s, $link.'     '.$nav, ''); +//print load_fiche_titre('', $link.'     '.$nav.' '.$newcardbutton, ''); + +// Local calendar +$newtitle = '
    '; +$newtitle .= ' '.$langs->trans("LocalAgenda").'   '; +$newtitle .= '
    '; +//$newtitle=$langs->trans($title); + +$s = $newtitle; + +print $s; + +print '
    '; +print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid); +print '
    '; // Get event in an array @@ -372,19 +472,20 @@ if (!empty($actioncode)) { if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'"; elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'"; - else - { + else { if ($actioncode == 'AC_OTH') $sql .= " AND ca.type != 'systemauto'"; if ($actioncode == 'AC_OTH_AUTO') $sql .= " AND ca.type = 'systemauto'"; } - } - else - { + } else { if ($actioncode == 'AC_NON_AUTO') $sql .= " AND ca.type != 'systemauto'"; elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND ca.type = 'systemauto'"; - else - { - $sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + else { + if (is_array($actioncode)) + { + $sql .= " AND ca.code IN ('".implode("','", $actioncode)."')"; + } else { + $sql .= " AND ca.code IN ('".implode("','", explode(',', $actioncode))."')"; + } } } } @@ -406,9 +507,7 @@ if ($action == 'show_day') $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= ')'; -} -else -{ +} else { // To limit array $sql .= " AND ("; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, 1, 1, $year) - (60 * 60 * 24 * 7))."'"; // Start 7 days before @@ -439,7 +538,7 @@ if ($filtert > 0 || $usergroup > 0) $sql .= ' ORDER BY fk_user_action, datep'; //fk_user_action //print $sql; -dol_syslog("comm/action/index.php", LOG_DEBUG); +dol_syslog("comm/action/pertype.php", LOG_DEBUG); $resql = $db->query($sql); if ($resql) { @@ -478,7 +577,7 @@ if ($resql) $event->fk_project = $obj->fk_project; $event->socid = $obj->fk_soc; - $event->contactid = $obj->fk_contact; + $event->contact_id = $obj->fk_contact; $event->fk_element = $obj->fk_element; $event->elementtype = $obj->elementtype; @@ -490,9 +589,7 @@ if ($resql) $event->date_start_in_calendar = $datep; if ($datep2 != '' && $datep2 >= $datep) $event->date_end_in_calendar = $datep2; else $event->date_end_in_calendar = $datep; - } - else - { + } else { $event->date_start_in_calendar = $datep; if ($datep2 != '' && $datep2 >= $datep) $event->date_end_in_calendar = $datep2; else $event->date_end_in_calendar = $datep; @@ -509,9 +606,7 @@ if ($resql) { // This record is out of visible range unset($event); - } - else - { + } else { //print $i.' - '.dol_print_date($this->date_start_in_calendar, 'dayhour').' - '.dol_print_date($this->date_end_in_calendar, 'dayhour').'
    '."\n"; $event->fetch_userassigned(); // This load $event->userassigned @@ -527,8 +622,7 @@ if ($resql) // Loop on each day covered by action to prepare an index to show on calendar $loop = true; $j = 0; $daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee); - do - { + do { //if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.'
    '; $eventarray[$daykey][] = $event; @@ -536,23 +630,22 @@ if ($resql) $daykey += 60 * 60 * 24; if ($daykey > $event->date_end_in_calendar) $loop = false; - } - while ($loop); + } while ($loop); //print 'Event '.$i.' id='.$event->id.' (start='.dol_print_date($event->datep).'-end='.dol_print_date($event->datef); //print ' startincalendar='.dol_print_date($event->date_start_in_calendar).'-endincalendar='.dol_print_date($event->date_end_in_calendar).') was added in '.$j.' different index key of array
    '; } $i++; } -} -else -{ + $db->free($resql); +} else { dol_print_error($db); } $maxnbofchar = 18; $cachethirdparties = array(); $cachecontacts = array(); +$cacheusers = array(); // Define theme_datacolor array $color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/theme_vars.inc.php"; @@ -574,11 +667,10 @@ $newparam = preg_replace('/viewweek=[0-9]+&?/i', '', $newparam); $newparam = preg_replace('/showbirthday_=/i', 'showbirthday=', $newparam); // Restore correct parameter $newparam .= '&viewweek=1'; -echo ''; +print ''; echo ''; echo ''; echo ''; -echo ''; // Line header with list of days @@ -620,6 +712,7 @@ $sql = "SELECT code, color, libelle as label FROM ".MAIN_DB_PREFIX."c_actioncomm $resql = $db->query($sql); while ($obj = $db->fetch_object($resql)) { + $typeofevents[$obj->code] = $obj->code; $colorsbytype[$obj->code] = $obj->color; $labelbytype[$obj->code] = $obj->label; } @@ -633,7 +726,7 @@ foreach ($typeofevents as $typeofevent) { $var = !$var; echo ""; - echo ''; + echo ''; $tmpday = $sav; // Lopp on each day of week @@ -659,7 +752,7 @@ foreach ($typeofevents as $typeofevent) if ($todayarray['mday'] == $tmpday && $todayarray['mon'] == $tmpmonth && $todayarray['year'] == $tmpyear) $today = 1; if ($today) $style = 'cal_today_peruser'; - show_day_events_pertype($username, $tmpday, $tmpmonth, $tmpyear, $monthshown, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype, $var); + show_day_events_pertype($typeofevent, $tmpday, $tmpmonth, $tmpyear, $mont, $style, $eventarray, 0, $maxnbofchar, $newparam, 1, 300, $showheader, $colorsbytype, $var); $i++; } @@ -668,7 +761,7 @@ foreach ($typeofevents as $typeofevent) } echo "
    '; + print ''; print $actionstatic->label; print ''; @@ -654,8 +763,7 @@ if ($resql) $societestatic->email = $obj->socemail; print $societestatic->getNomUrl(1, '', 28); - } - else print ' '; + } else print ' '; print ''.$actionstatic->LibStatut($obj->percent, 5, 0, $datep).''; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected = 0; + if (in_array($obj->id, $arrayofselected)) $selected = 1; + print ''; + } + print '
    '.$username->getNomUrl(1).''.$typeofevent.'
    \n"; - +echo "
    "; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { @@ -695,6 +788,9 @@ if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) */ } +print "\n".''; +print "\n"; + // Add js code to manage click on a box print ''; + } + print '
    '; print ''."\n"; @@ -635,37 +652,37 @@ if ($resql) if (!empty($arrayfields['c.ref']['checked'])) { print ''; } // Ref customer if (!empty($arrayfields['c.ref_client']['checked'])) { print ''; } // Project ref if (!empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; } // Project title if (!empty($arrayfields['p.title']['checked'])) { - print ''; + print ''; } // Thirpdarty if (!empty($arrayfields['s.nom']['checked'])) { print ''; } // Town - if (!empty($arrayfields['s.town']['checked'])) print ''; + if (!empty($arrayfields['s.town']['checked'])) print ''; // Zip - if (!empty($arrayfields['s.zip']['checked'])) print ''; + if (!empty($arrayfields['s.zip']['checked'])) print ''; // State if (!empty($arrayfields['state.nom']['checked'])) { @@ -692,12 +709,10 @@ if ($resql) { print ''; } @@ -705,12 +720,10 @@ if ($resql) { print ''; } @@ -718,14 +731,14 @@ if ($resql) { // Amount print ''; } if (!empty($arrayfields['c.total_vat']['checked'])) { // Amount print ''; } if (!empty($arrayfields['c.total_ttc']['checked'])) @@ -797,6 +810,24 @@ if ($resql) } // Date cloture if (!empty($arrayfields['c.date_cloture']['checked'])) + { + print ''; + } + // Note public + if (!empty($arrayfields['c.note_public']['checked'])) + { + print ''; + } + // Note private + if (!empty($arrayfields['c.note_private']['checked'])) { print ''; @@ -864,6 +895,8 @@ if ($resql) 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.date_cloture']['checked'])) print_liste_field_titre($arrayfields['c.date_cloture']['label'], $_SERVER["PHP_SELF"], "c.date_cloture", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + if (!empty($arrayfields['c.note_public']['checked'])) print_liste_field_titre($arrayfields['c.note_public']['label'], $_SERVER["PHP_SELF"], "c.note_public", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['c.note_private']['checked'])) print_liste_field_titre($arrayfields['c.note_private']['label'], $_SERVER["PHP_SELF"], "c.note_private", "", $param, '', $sortfield, $sortorder, 'right '); 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 '); @@ -872,6 +905,7 @@ if ($resql) $total = 0; $subtotal = 0; $productstat_cache = array(); + $productstat_cachevirtual = array(); $getNomUrl_cache = array(); $generic_commande = new Commande($db); @@ -929,7 +963,6 @@ if ($resql) // Show shippable Icon (create subloop, so may be slow) if ($conf->stock->enabled) { - $langs->load("stocks"); if (($obj->fk_statut > 0) && ($obj->fk_statut < 3)) { $numlines = count($generic_commande->lines); // Loop on each line of order @@ -953,17 +986,16 @@ if ($resql) if (empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) // Default code. Default is when this option is not set, setting it create strange result { - $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); - $text_info .= ' - '.$langs->trans("Stock").': '.$generic_product->stock_reel; - $text_info .= ' - '.$langs->trans("VirtualStock").': '.$generic_product->stock_theorique; + $text_info .= $generic_commande->lines[$lig]->qty.' X '.$generic_commande->lines[$lig]->product_ref.' '.dol_trunc($generic_commande->lines[$lig]->product_label, 25); + $text_info .= ' - '.$langs->trans("Stock").': '.$generic_product->stock_reel.''; + $text_info .= ' - '.$langs->trans("VirtualStock").': '.$generic_product->stock_theorique.''; $text_info .= '
    '; if ($generic_commande->lines[$lig]->qty > $generic_product->stock_reel) { $notshippable++; } - } - else { // Detailed code, looks bugged + } else { // Detailed virtual stock, looks bugged, uncomplete and need heavy load. // stock order and stock order_supplier $stock_order = 0; $stock_order_supplier = 0; @@ -1086,7 +1118,7 @@ if ($resql) { if (($obj->fk_statut > 0 && $obj->fk_statut < 3) || ($obj->fk_statut == 3 && $obj->billed == 0)) { - print ' '; + print ' '; print img_picto($langs->trans("CreateInvoiceForThisCustomer").' : '.$companystatic->name, 'object_bill', 'hideonsmartphone').''; } } @@ -1129,7 +1161,7 @@ if ($resql) if (!empty($arrayfields['typent.code']['checked'])) { print ''; if (!$i) $totalarray['nbfield']++; @@ -1147,7 +1179,7 @@ if ($resql) if (!empty($arrayfields['c.date_delivery']['checked'])) { print ''; if (!$i) $totalarray['nbfield']++; } @@ -1253,6 +1285,22 @@ if ($resql) print ''; if (!$i) $totalarray['nbfield']++; } + // Note public + if (!empty($arrayfields['c.note_public']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } + // Note private + if (!empty($arrayfields['c.note_private']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } // Status if (!empty($arrayfields['c.fk_statut']['checked'])) { @@ -1267,7 +1315,7 @@ if ($resql) } // Action column - print ''; - print "
    '; - print ''; + print ''; print ''; - print ''; + print ''; print ''; - print ''; + print ''; print ''; print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start', 0, 0, 1); + print $form->selectDate($search_dateorder_start ? $search_dateorder_start : -1, 'search_dateorder_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
    '; print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end', 0, 0, 1); + print $form->selectDate($search_dateorder_end ? $search_dateorder_end : -1, 'search_dateorder_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
    '; print '
    '; print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start', 0, 0, 1); + print $form->selectDate($search_datedelivery_start ? $search_datedelivery_start : -1, 'search_datedelivery_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
    '; print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end', 0, 0, 1); + print $form->selectDate($search_datedelivery_end ? $search_datedelivery_end : -1, 'search_datedelivery_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
    '; print '
    '; - print ''; + print ''; print ''; - print ''; + print ''; print ''; + print '
    '; + print $form->selectDate($search_datecloture_start ? $search_datecloture_start : -1, 'search_datecloture_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search_datecloture_end ? $search_datecloture_end : -1, 'search_datecloture_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; + print '
    '; + print ''; print ''; - if (count($typenArray) == 0) $typenArray = $formcompany->typent_array(1); + if (empty($typenArray)) $typenArray = $formcompany->typent_array(1); print $typenArray[$obj->typent_code]; print ''; - print dol_print_date($db->jdate($obj->date_delivery), 'day'); + print dol_print_date($db->jdate($obj->date_delivery), 'dayhour'); print ''; + print dol_escape_htmltag($obj->note_public); + print ''; + print dol_escape_htmltag($obj->note_private); + print ''; + print ''; if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { $selected = 0; @@ -1310,9 +1358,7 @@ if ($resql) $delallowed = $user->rights->commande->creer; print $formfile->showdocuments('massfilesarea_orders', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 9054252e6d9..9922d3b0e3e 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -38,7 +38,7 @@ $langs->loadLangs(array('companies', 'bills', 'orders')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check $socid = 0; diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php deleted file mode 100644 index f230f7935a5..00000000000 --- a/htdocs/commande/orderstoinvoice.php +++ /dev/null @@ -1,741 +0,0 @@ - - * Copyright (C) 2004-2019 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Andreu Bisquerra Gaya - * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012-2018 Juanjo Menent - * Copyright (C) 2015 Ferran Marcet - * Copyright (C) 2018 Frédéric France - * - * 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 . - */ - -/** - * \file htdocs/commande/orderstoinvoice.php - * \ingroup commande - * \brief Page to invoice multiple orders - */ - -require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; -if (!empty($conf->projet->enabled)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; -} - -// Load translation files required by the page -$langs->loadLangs(array("orders", "deliveries", "companies")); - -if (!$user->rights->facture->creer) - accessforbidden(); - -$id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST("facid", "int")); // For backward compatibility -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); -$sref = GETPOST('sref', 'alpha'); -$sref_client = GETPOST('sref_client', 'alpha'); -$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$socid = GETPOST('socid', 'int'); -$selected = GETPOST('orders_to_invoice'); -$sortfield = GETPOST("sortfield", 'alpha'); -$sortorder = GETPOST("sortorder", 'alpha'); -$search_status = GETPOST('search_status', 'alpha'); - -$error = 0; - -if (!$sortfield) $sortfield = 'c.rowid'; -if (!$sortorder) $sortorder = 'DESC'; - -$now = dol_now(); -$date_start = dol_mktime(0, 0, 0, $_REQUEST["date_startmonth"], $_REQUEST["date_startday"], $_REQUEST["date_startyear"]); // Date for local PHP server -$date_end = dol_mktime(23, 59, 59, $_REQUEST["date_endmonth"], $_REQUEST["date_endday"], $_REQUEST["date_endyear"]); -$date_starty = dol_mktime(0, 0, 0, $_REQUEST["date_start_delymonth"], $_REQUEST["date_start_delyday"], $_REQUEST["date_start_delyyear"]); // Date for local PHP server -$date_endy = dol_mktime(23, 59, 59, $_REQUEST["date_end_delymonth"], $_REQUEST["date_end_delyday"], $_REQUEST["date_end_delyyear"]); - -$extrafields = new ExtraFields($db); - -$object = new Facture($db); - -// fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label($object->table_element); - -if ($action == 'create') -{ - if (!is_array($selected)) - { - $error++; - setEventMessages($langs->trans('Error_OrderNotChecked'), null, 'errors'); - } - else - { - $origin = GETPOST('origin'); - $originid = GETPOST('originid'); - } -} - -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -$hookmanager = new HookManager($db); -$hookmanager->initHooks(array('orderstoinvoice')); - - -/* - * Actions - */ - -if (($action == 'create' || $action == 'add') && !$error) -{ - require_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; - if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - - $langs->load('bills'); - $langs->load('products'); - $langs->load('main'); - if (isset($_GET['orders_to_invoice'])) - { - $orders_id = GETPOST('orders_to_invoice', '', 1); - $n = count($orders_id); - $i = 0; - - $originid = $orders_id[0]; - $_GET['originid'] = $orders_id[0]; - } - if (isset($_POST['orders_to_invoice'])) - { - $orders_id = GETPOST('orders_to_invoice', '', 2); - $nn = count($orders_id); - $ii = 0; - - $originid = $orders_id[0]; - $_POST['originid'] = $orders_id[0]; - } - - $projectid = GETPOST('projectid', 'int') ?GETPOST('projectid', 'int') : 0; - $lineid = GETPOST('lineid', 'int'); - $userid = GETPOST('userid', 'int'); - $search_ref = GETPOST('sf_ref') ?GETPOST('sf_ref') : GETPOST('search_ref'); - $closeOrders = GETPOST('autocloseorders') ? true : false; - - // Security check - $fieldid = GETPOST('ref', 'alpha') ? 'ref' : 'rowid'; - if ($user->socid) $socid = $user->socid; - $result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid); - - $usehm = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE; - - // Insert new invoice in database - if ($action == 'add' && $user->rights->facture->creer) - { - $object->socid = GETPOST('socid'); - $db->begin(); - $error = 0; - - // Standard or deposit or proforma invoice - if ($_POST['type'] == 0) - { - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - if (empty($datefacture)) - { - $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); - } - if (!$error) - { - // Si facture standard - $object->socid = $_POST['socid']; - $object->type = $_POST['type']; - $object->number = $_POST['ref']; - $object->date = $datefacture; - $object->note_public = trim($_POST['note_public']); - $object->note = trim($_POST['note']); - $object->ref_client = $_POST['ref_client']; - $object->modelpdf = $_POST['model']; - $object->fk_project = $_POST['projectid']; - $object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']); - $object->mode_reglement_id = $_POST['mode_reglement_id']; - $object->amount = $_POST['amount']; - $object->remise_absolue = $_POST['remise_absolue']; - $object->remise_percent = $_POST['remise_percent']; - - $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; - - if ($_POST['origin'] && $_POST['originid']) - { - $object->origin = $_POST['origin']; - $object->origin_id = $orders_id[$ii]; - $object->linked_objects = $orders_id; - $id = $object->create($user); - $object->fetch_thirdparty(); - - if ($id > 0) - { - foreach ($orders_id as $origin => $origin_id) - { - $origin_id = (!empty($origin_id) ? $origin_id : $object->origin_id); - $db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; - $sql .= "fk_source"; - $sql .= ", sourcetype"; - $sql .= ", fk_target"; - $sql .= ", targettype"; - $sql .= ") VALUES ("; - $sql .= $origin_id; - $sql .= ", '".$object->origin."'"; - $sql .= ", ".$id; - $sql .= ", '".$object->element."'"; - $sql .= ")"; - - if ($db->query($sql)) - { - $db->commit(); - } - else - { - $db->rollback(); - } - } - - while ($ii < $nn) - { - include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - $objectsrc = new Commande($db); - dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); - $result = $objectsrc->fetch($orders_id[$ii]); - if ($result > 0) - { - if ($closeOrders) - { - $objectsrc->classifyBilled($user); - $objectsrc->setStatut(3); - } - $lines = $objectsrc->lines; - if (empty($lines) && method_exists($objectsrc, 'fetch_lines')) - { - $objectsrc->fetch_lines(); - $lines = $objectsrc->lines; - } - $fk_parent_line = 0; - $num = count($lines); - for ($i = 0; $i < $num; $i++) - { - $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); - if ($lines[$i]->subprice < 0) - { - // Negative line, we create a discount line - $discount = new DiscountAbsolute($db); - $discount->fk_soc = $object->socid; - $discount->amount_ht = abs($lines[$i]->total_ht); - $discount->amount_tva = abs($lines[$i]->total_tva); - $discount->amount_ttc = abs($lines[$i]->total_ttc); - $discount->tva_tx = $lines[$i]->tva_tx; - $discount->fk_user = $user->id; - $discount->description = $desc; - $discountid = $discount->create($user); - if ($discountid > 0) - { - $result = $object->insert_discount($discountid); - //$result=$discount->link_to_invoice($lineid,$id); - } - else - { - setEventMessages($discount->error, $discount->errors, 'errors'); - $error++; - break; - } - } - else - { - // Positive line - $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); - // Date start - $date_start = false; - if ($lines[$i]->date_debut_prevue) $date_start = $lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) $date_start = $lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) $date_start = $lines[$i]->date_start; - //Date end - $date_end = false; - if ($lines[$i]->date_fin_prevue) $date_end = $lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) $date_end = $lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) $date_end = $lines[$i]->date_end; - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) - { - $fk_parent_line = 0; - } - - // Extrafields - if (method_exists($lines[$i], 'fetch_optionals')) { - $lines[$i]->fetch_optionals(); - $array_options = $lines[$i]->array_options; - } - - $result = $object->addline( - $desc, - $lines[$i]->subprice, - $lines[$i]->qty, - $lines[$i]->tva_tx, - $lines[$i]->localtax1_tx, - $lines[$i]->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, - $ii, - $lines[$i]->special_code, - $object->origin, - $lines[$i]->rowid, - $fk_parent_line, - $lines[$i]->fk_fournprice, - $lines[$i]->pa_ht, - $lines[$i]->label, - $array_options - ); - if ($result > 0) - { - $lineid = $result; - } - else - { - $lineid = 0; - $error++; - break; - } - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) - { - $fk_parent_line = $result; - } - } - } - } - else - { - setEventMessages($objectsrc->error, $objectsrc->errors, 'errors'); - $error++; - } - $ii++; - } - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - } - } - } - } - - // End of object creation, we show it - if ($id > 0 && !$error) - { - $db->commit(); - header('Location: '.DOL_URL_ROOT.'/compta/facture/card.php?facid='.$id); - exit; - } - else - { - $db->rollback(); - $action = 'create'; - $_GET["origin"] = $_POST["origin"]; - $_GET["originid"] = $_POST["originid"]; - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - } - } -} - - -/* - * View - */ - -$html = new Form($db); -$htmlother = new FormOther($db); -$formfile = new FormFile($db); -$companystatic = new Societe($db); - -// Mode creation -if ($action == 'create' && !$error) -{ - $facturestatic = new Facture($db); - - llxHeader(); - print load_fiche_titre($langs->trans('NewBill')); - - $soc = new Societe($db); - if ($socid) $res = $soc->fetch($socid); - if ($res) - { - $cond_reglement_id = $soc->cond_reglement_id; - $mode_reglement_id = $soc->mode_reglement_id; - $remise_percent = $soc->remise_percent; - } - $remise_absolue = 0; - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ?-1 : ''; - - $absolute_discount = $soc->getAvailableDiscounts(); - print '
    '; - print ''; - print ''; - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - - dol_fiche_head(); - - print ''; - - // Ref - print ''; - - // Third party - print ''; - print ''."\n"; - - // Type - print ''; - // Payment term - print ''; - // Payment mode - print ''; - // Project - if (!empty($conf->projet->enabled)) - { - $formproject = new FormProjets($db); - - $langs->load('projects'); - print ''; - } - - include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - $objectsrc = new Commande($db); - $listoforders = array(); - foreach ($selected as $sel) - { - $result = $objectsrc->fetch($sel); - if ($result > 0) - { - $listoforders[] = $objectsrc->ref; - } - } - - // Other attributes - $parameters = array('objectsrc' => $objectsrc, 'idsrc' => $listoforders); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - $object = new Facture($db); - print $object->showOptionals($extrafields, 'edit'); - } - - // Modele PDF - print ''; - print '"; - - // Public note - print ''; - print ''; - print ''; - // Private note - if (empty($user->socid)) - { - print ''; - print ''; - print ''; - } - - print '
    '.$langs->trans('Ref').''.$langs->trans('Draft').'
    '.$langs->trans('Customer').''; - print $soc->getNomUrl(1); - print ''; - print '
    '.$langs->trans('Type').''; - print ''."\n"; - - // Standard invoice - print ''."\n"; - print '
    '; - print ''; - print ''; - $desc = $html->textwithpicto($langs->trans("InvoiceStandardAsk"), $langs->transnoentities("InvoiceStandardDesc"), 1); - print $desc; - print '
    '; - - // Date invoice - print '
    '.$langs->trans('Date').''; - print $html->selectDate('', '', '', '', '', "add", 1, 1); - print '
    '.$langs->trans('PaymentConditionsShort').''; - $html->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id'); - print '
    '.$langs->trans('PaymentMode').''; - $html->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id'); - print '
    '.$langs->trans('Project').''; - $formproject->select_projects($soc->id, $projectid, 'projectid'); - print '
    '.$langs->trans('Model').''; - include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; - $liste = ModelePDFFactures::liste_modeles($db); - print $html->selectarray('model', $liste, $conf->global->FACTURE_ADDON_PDF); - print "
    '.$langs->trans('NotePublic').''; - print '
    '.$langs->trans('NotePrivate').''; - print '
    '; - - while ($i < $n) - { - print ''; - - $i++; - } - - dol_fiche_end(); - - // Button "Create Draft" - print '
    '; - print "
    \n"; - - print '
    \n"; -} - -// Mode liste -if (($action != 'create' && $action != 'add') || ($action == 'create' && $error)) -{ - llxHeader(); - ?> - - rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= ' WHERE c.entity IN ('.getEntity('commande').')'; - $sql .= ' AND c.fk_soc = s.rowid'; - - // Show orders with status validated, shipping started and delivered (well any order we can bill) - $sql .= " AND ((c.fk_statut IN (1,2)) OR (c.fk_statut = 3 AND c.facture = 0))"; - - if ($socid) $sql .= ' AND s.rowid = '.$socid; - if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($sref) - { - $sql .= " AND c.ref LIKE '%".$db->escape($sref)."%'"; - } - if ($sall) - { - $sql .= " AND (c.ref LIKE '%".$db->escape($sall)."%' OR c.note LIKE '%".$db->escape($sall)."%')"; - } - - //Date filter - if ($date_start && $date_end) $sql .= " AND c.date_commande >= '".$db->idate($date_start)."' AND c.date_commande <= '".$db->idate($date_end)."'"; - if ($date_starty && $date_endy) $sql .= " AND c.date_livraison >= '".$db->idate($date_starty)."' AND c.date_livraison <= '".$db->idate($date_endy)."'"; - - if (!empty($sref_client)) - { - $sql .= ' AND c.ref_client LIKE \'%'.$db->escape($sref_client).'%\''; - } - $sql .= $db->order($sortfield, $sortorder); - - $resql = $db->query($sql); - if ($resql) - { - if ($socid) - { - $soc = new Societe($db); - $soc->fetch($socid); - } - $title = $langs->trans('ListOfOrders'); - $title .= ' - '.$langs->trans('StatusOrderValidated').', '.$langs->trans("StatusOrderSent").', '.$langs->trans('StatusOrderToBill'); - $num = $db->num_rows($resql); - print load_fiche_titre($title); - $i = 0; - $period = $html->selectDate($date_start, 'date_start', 0, 0, 1, '', 1, 0).' - '.$html->selectDate($date_end, 'date_end', 0, 0, 1, '', 1, 0); - $periodely = $html->selectDate($date_starty, 'date_start_dely', 0, 0, 1, '', 1, 0).' - '.$html->selectDate($date_endy, 'date_end_dely', 0, 0, 1, '', 1, 0); - - if (!empty($socid)) - { - // Company - $companystatic->id = $socid; - $companystatic->name = $soc->name; - print '

    '.$companystatic->getNomUrl(1, 'customer').'

    '; - } - - print '
    '; - print ''; - print ''; - print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'c.ref', '', '&socid='.$socid, '', $sortfield, $sortorder); - print_liste_field_titre('RefCustomerOrder', $_SERVER["PHP_SELF"], 'c.ref_client', '', '&socid='.$socid, '', $sortfield, $sortorder); - print_liste_field_titre('OrderDate', $_SERVER["PHP_SELF"], 'c.date_commande', '', '&socid='.$socid, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre('DeliveryDate', $_SERVER["PHP_SELF"], 'c.date_livraison', '', '&socid='.$socid, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre('Status', '', '', '', '', 'class="right"'); - print_liste_field_titre('GenerateBill', '', '', '', '', 'align="center"'); - print ''; - - // Fields title search - print ''; - print ''; - print ''; - - //REF - print ''; - - print ''; - - //DATE ORDER - print ''; - - //DATE DELIVERY - print ''; - - //SEARCH BUTTON - print ''; - - //ALL/NONE - print ''; - - print ''; - print ''; - - print ''; - - $generic_commande = new Commande($db); - - while ($i < $num) - { - $objp = $db->fetch_object($resql); - - print ''; - print ''; - - print ''; - - // Order date - print ''; - - //Delivery date - print ''; - - // Statut - print ''; - - // Checkbox - print ''; - - print ''; - - $total = $total + $objp->price; - $subtotal = $subtotal + $objp->price; - $i++; - } - print '
    '; - print ''; - print ''; - print ''; - print ''; - print $period; - print ''; - print $periodely; - print ''; - print ''; - print ''; - if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").''; - print '
    '; - - $generic_commande->id = $objp->rowid; - $generic_commande->ref = $objp->ref; - $generic_commande->statut = $objp->fk_statut; - $generic_commande->date_commande = $db->jdate($objp->date_commande); - $generic_commande->date_livraison = $db->jdate($objp->date_livraison); - - print ''; - print ''; - - print ''; - - print '
    '; - print $generic_commande->getNomUrl(1, 0); - print ''; - if ($generic_commande->hasDelay()) { - print img_picto($langs->trans("Late"), "warning"); - } - print ''; - $filename = dol_sanitizeFileName($objp->ref); - $filedir = $conf->commande->multidir_output[$objp->entity].'/'.dol_sanitizeFileName($objp->ref); - $urlsource = $_SERVER['PHP_SELF'].'?id='.$objp->rowid; - print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir); - print '
    '; - print '
    '.$objp->ref_client.''; - print dol_print_date($db->jdate($objp->date_commande), 'day'); - print ''; - print dol_print_date($db->jdate($objp->date_livraison), 'day'); - print ''.$generic_commande->LibStatut($objp->fk_statut, $objp->billed, 5).''; - print ''; - print '
    '; - print '
    '; - - // Buttons actions - print '
    global->INVOICE_CLOSE_ORDERS_OFF_BY_DEFAULT_FORMASSINVOICE) ? ' checked="checked"' : '').' name="autocloseorders"> '.$langs->trans("CloseProcessedOrdersAutomatically"); - print '
    '; - print ''; - print ''; - print '
    '; - //print ''.$langs->trans("GoBack").''; - print ''; - print '
    '; - print '
    '; - - print ''; - - $db->free($resql); - } - else - { - dol_print_error($db); - } -} - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 4e7ed481882..346b5549bfd 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -94,11 +94,11 @@ dol_mkdir($dir); $stats = new CommandeStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0)); if ($mode == 'customer') { - if ($object_status != '' && $object_status >= -1) $stats->where .= ' AND c.fk_statut IN ('.$db->escape($object_status).')'; + if ($object_status != '' && $object_status >= -1) $stats->where .= ' AND c.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; } if ($mode == 'supplier') { - if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND c.fk_statut IN ('.$db->escape($object_status).')'; + if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND c.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; } @@ -114,9 +114,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filenamenb = $dir.'/ordersnbinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenamenb = $dir.'/ordersnbinyear-'.$year.'.png'; if ($mode == 'customer') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersnbinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersnbinyear-'.$year.'.png'; @@ -157,9 +155,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filenameamount = $dir.'/ordersamountinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenameamount = $dir.'/ordersamountinyear-'.$year.'.png'; if ($mode == 'customer') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersamountinyear-'.$year.'.png'; if ($mode == 'supplier') $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersamountinyear-'.$year.'.png'; @@ -198,9 +194,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/ordersaverage-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png'; @@ -381,8 +375,7 @@ print '
    '; // Show graphs print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; print ''; + if ($conf->multicurrency->enabled) print ''; print ''; if ($result) { @@ -624,10 +621,12 @@ if (!empty($date_start) && !empty($date_stop)) if (empty($TData)) { - print ''; - } - else - { + print ''; + if (! empty($conf->multicurrency->enabled)) { + print ''; + } + print ''; + } else { // Sort array by date ASC to calculate balance $totalET_debit = 0; @@ -653,7 +652,7 @@ if (!empty($date_start) && !empty($date_stop)) print dol_print_date($data['date'], 'day'); print "\n"; - // Date + // Date due print '\n"; @@ -664,10 +663,18 @@ if (!empty($date_start) && !empty($date_stop)) if ($data['item'] == 'Invoice') { $invoice->id = $data['id']; $invoice->ref = $data['ref']; + $invoice->total_ht = $data['amount_ht']; + $invoice->total_ttc = $data['amount_ttc']; + $invoice->total_tva = $data['amount_vat']; + $invoice->multicurrency_code = $data['currency']; print $invoice->getNomUrl(1, '', 0, 0, '', 0, 0, 0); } elseif ($data['item'] == 'SupplierInvoice') { $supplier_invoice->id = $data['id']; $supplier_invoice->ref = $data['ref']; + $supplier_invoice->total_ht = $data['amount_ht']; + $supplier_invoice->total_ttc = $data['amount_ttc']; + $supplier_invoice->total_tva = $data['amount_vat']; + $supplier_invoice->multicurrency_code = $data['currency']; print $supplier_invoice->getNomUrl(1, '', 0, 0, '', 0, 0, 0); } elseif ($data['item'] == 'ExpenseReport') { $expensereport->id = $data['id']; @@ -712,13 +719,13 @@ if (!empty($date_start) && !empty($date_stop)) print ''; // Total ET - print '\n"; + print '\n"; // Total IT - print '\n"; + print '\n"; // Total VAT - print '\n"; + print '\n"; - print '\n"; + print '\n"; print '\n"; @@ -736,6 +743,10 @@ if (!empty($date_start) && !empty($date_stop)) $totalVAT_debit -= $data['amount_vat']; } + if (! empty($conf->multicurrency->enabled)) { + print '\n"; + } + print "\n"; } @@ -746,6 +757,9 @@ if (!empty($date_start) && !empty($date_stop)) print ''; print ''; print ''; + if (! empty($conf->multicurrency->enabled)) { + print ''; + } print "\n"; // Total debits print ''; @@ -754,14 +768,20 @@ if (!empty($date_start) && !empty($date_stop)) print ''; print ''; print ''; + if (! empty($conf->multicurrency->enabled)) { + print ''; + } print "\n"; // Balance print ''; print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; print ''; + if (! empty($conf->multicurrency->enabled)) { + print ''; + } print "\n"; } } diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index f380d8b4ee5..0129d1e5f43 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -81,13 +81,11 @@ if ($currentInvId) // Here to breakdown $remainAmount = $currentRemain - $currentAmount; // To keep value between curRemain and curAmount $result += $remainAmount; // result must be deduced by $currentAmount += $remainAmount; // curAmount put to curRemain - } else - { + } else { $currentAmount = $currentRemain; $result += $currentRemain; } - } else - { + } else { // Reset the substraction for this amount $result += price2num($currentAmount); $currentAmount = 0; diff --git a/htdocs/compta/bank/account_statement_document.php b/htdocs/compta/bank/account_statement_document.php index 05f89e1bc6f..3b8423b68dc 100644 --- a/htdocs/compta/bank/account_statement_document.php +++ b/htdocs/compta/bank/account_statement_document.php @@ -38,15 +38,9 @@ $langs->loadLangs(array('banks', 'companies', 'other')); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$num = (GETPOST('num', 'alpha') ? GETPOST('num', 'alpha') : GETPOST('sectionid', 'alpha')); - -$mesg = ''; -if (isset($_SESSION['DolMessage'])) { - $mesg = $_SESSION['DolMessage']; - unset($_SESSION['DolMessage']); -} +$numref = (GETPOST('num', 'alpha') ? GETPOST('num', 'alpha') : GETPOST('sectionid', 'alpha')); // Security check if ($user->socid) { @@ -71,21 +65,74 @@ if (!$sortfield) $sortfield = "name"; $object = new Account($db); -if ($id > 0 || !empty($ref)) $object->fetch($id, $ref); +if ($id > 0 || !empty($ref)) +{ + $result = $object->fetch($id, $ref); + $account = $object->id; // Force the search field on id of account +} $result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', ''); +// Define number of receipt to show (current, previous or next one ?) +$found = false; +if ($_GET["rel"] == 'prev') +{ + // Recherche valeur pour num = numero releve precedent + $sql = "SELECT DISTINCT(b.num_releve) as num"; + $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; + $sql .= " WHERE b.num_releve < '".$db->escape($numref)."'"; + $sql .= " AND b.fk_account = ".$id; + $sql .= " ORDER BY b.num_releve DESC"; + + dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $numrows = $db->num_rows($resql); + if ($numrows > 0) + { + $obj = $db->fetch_object($resql); + $numref = $obj->num; + $found = true; + } + } +} elseif ($_GET["rel"] == 'next') +{ + // Recherche valeur pour num = numero releve precedent + $sql = "SELECT DISTINCT(b.num_releve) as num"; + $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; + $sql .= " WHERE b.num_releve > '".$db->escape($numref)."'"; + $sql .= " AND b.fk_account = ".$id; + $sql .= " ORDER BY b.num_releve ASC"; + + dol_syslog("htdocs/compta/bank/releve.php", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $numrows = $db->num_rows($resql); + if ($numrows > 0) + { + $obj = $db->fetch_object($resql); + $numref = $obj->num; + $found = true; + } + } +} else { + // On veut le releve num + $found = true; +} + /* * Actions */ -if (!empty($num)) +if (!empty($numref)) { $object->fetch_thirdparty(); - $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num); + $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($numref); } -$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$num; +$backtopage = $_SERVER['PHP_SELF']."?account=".$id."&num=".$numref; include_once DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; @@ -101,10 +148,10 @@ llxHeader('', $title, $helpurl); if ($id > 0 || !empty($ref)) { if ($object->fetch($id, $ref)) { - $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($num); + $upload_dir = $conf->bank->dir_output."/".$id."/statement/".dol_sanitizeFileName($numref); // Onglets - $head = account_statement_prepare_head($object, $num); + $head = account_statement_prepare_head($object, $numref); dol_fiche_head($head, 'document', $langs->trans("AccountStatement"), -1, 'account'); @@ -115,8 +162,15 @@ if ($id > 0 || !empty($ref)) { $totalsize += $file['size']; } - $title = $langs->trans("AccountStatement").' '.$num.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); - print load_fiche_titre($title, '', ''); + $morehtmlright = ''; + $morehtmlright .= ''; + + $title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); + print load_fiche_titre($title, $morehtmlright, ''); print '
    '; print '
    '; @@ -134,16 +188,14 @@ if ($id > 0 || !empty($ref)) { $modulepart = 'bank'; $permission = $user->rights->banque->modifier; $permtoedit = $user->rights->banque->modifier; - $param = '&id='.$object->id.'&num='.urlencode($num); - $moreparam = '&num='.urlencode($num); ; - $relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($num)."/"; + $param = '&id='.$object->id.'&num='.urlencode($numref); + $moreparam = '&num='.urlencode($numref); ; + $relativepathwithnofile = $id."/statement/".dol_sanitizeFileName($numref)."/"; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; - } - else { + } else { dol_print_error($db); } -} -else { +} else { Header('Location: index.php'); exit; } diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 1f6e5e6620c..cd82da0e1bd 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -50,9 +50,7 @@ if (!$year_start) { $year_start = $year_current - 2; $year_end = $year_current; -} -else -{ +} else { $year_end = $year_start + 2; } @@ -93,7 +91,7 @@ $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; $sql .= " AND b.amount >= 0"; if (!empty($id)) - $sql .= " AND b.fk_account IN (".$db->escape($id).")"; + $sql .= " AND b.fk_account IN (".$db->sanitize($db->escape($id)).")"; $sql .= " GROUP BY dm"; $resql = $db->query($sql); @@ -107,9 +105,7 @@ if ($resql) $encaiss[$row[1]] = $row[0]; $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -121,7 +117,7 @@ $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; $sql .= " AND b.amount <= 0"; if (!empty($id)) - $sql .= " AND b.fk_account IN (".$db->escape($id).")"; + $sql .= " AND b.fk_account IN (".$db->sanitize($db->escape($id)).")"; $sql .= " GROUP BY dm"; $resql = $db->query($sql); @@ -135,9 +131,7 @@ if ($resql) $decaiss[$row[1]] = -$row[0]; $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -157,9 +151,7 @@ if (!empty($id)) if (!preg_match('/,/', $id)) { dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); - } - else - { + } else { $bankaccount = new Account($db); $listid = explode(',', $id); foreach ($listid as $key => $aId) @@ -170,9 +162,7 @@ if (!empty($id)) if ($key < (count($listid) - 1)) print ', '; } } -} -else -{ +} else { print $langs->trans("AllAccounts"); } @@ -250,15 +240,14 @@ $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; if (!empty($id)) - $sql .= " AND b.fk_account IN (".$db->escape($id).")"; + $sql .= " AND b.fk_account IN (".$db->sanitize($db->escape($id)).")"; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); if ($obj) $balance = $obj->total; -} -else { +} else { dol_print_error($db); } @@ -280,9 +269,7 @@ if ($result < 0) $langs->load("errors"); $error++; setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); -} -else -{ +} else { // Calcul de $min et $max $sql = "SELECT MIN(b.datev) as min, MAX(b.datev) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -298,9 +285,7 @@ else $obj = $db->fetch_object($resql); $min = $db->jdate($obj->min); $max = $db->jdate($obj->max); - } - else - { + } else { dol_print_error($db); } $log = "graph.php: min=".$min." max=".$max; @@ -338,9 +323,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -425,9 +408,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index 7d059734126..e77f4386de9 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -56,7 +56,7 @@ $langs->loadLangs(array("banks", "bills", "categories", "companies", "margins", $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $contextpage = 'banktransactionlist'.(empty($object->ref) ? '' : '-'.$object->id); @@ -68,9 +68,7 @@ if ($fielvalue) { if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'banque', $fieldvalue, 'bank_account&bank_account', '', '', $fieldtype); -} -else -{ +} else { if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'banque'); } @@ -111,15 +109,15 @@ if (!$sortfield) $sortfield = 'b.datev,b.dateo,b.rowid'; $object = new Account($db); if ($id > 0 || !empty($ref)) { - $result = $object->fetch($id, $ref); - $search_account = $object->id; // Force the search field on id of account + $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; + } } $mode_balance_ok = false; @@ -139,20 +137,20 @@ $extrafields->fetch_name_optionals_label('banktransaction'); $search_array_options = $extrafields->getOptionalsFromPost('banktransaction', '', 'search_'); $arrayfields = array( - 'b.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'b.label'=>array('label'=>$langs->trans("Description"), 'checked'=>1), - 'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1), - 'b.datev'=>array('label'=>$langs->trans("DateValueShort"), 'checked'=>1), - 'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1), - 'b.num_chq'=>array('label'=>$langs->trans("Numero"), 'checked'=>1), - 'bu.label'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>500), - 'ba.ref'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>(($id > 0 || !empty($ref)) ? 0 : 1), 'position'=>1000), - 'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>600), - 'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>605), + 'b.rowid'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), + 'b.label'=>array('label'=>$langs->trans("Description"), 'checked'=>1), + 'b.dateo'=>array('label'=>$langs->trans("DateOperationShort"), 'checked'=>1), + 'b.datev'=>array('label'=>$langs->trans("DateValueShort"), 'checked'=>1), + 'type'=>array('label'=>$langs->trans("Type"), 'checked'=>1), + 'b.num_chq'=>array('label'=>$langs->trans("Numero"), 'checked'=>1), + 'bu.label'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1, 'position'=>500), + 'ba.ref'=>array('label'=>$langs->trans("BankAccount"), 'checked'=>(($id > 0 || !empty($ref)) ? 0 : 1), 'position'=>1000), + 'b.debit'=>array('label'=>$langs->trans("Debit"), 'checked'=>1, 'position'=>600), + 'b.credit'=>array('label'=>$langs->trans("Credit"), 'checked'=>1, 'position'=>605), 'balancebefore'=>array('label'=>$langs->trans("BalanceBefore"), 'checked'=>0, 'position'=>1000), 'balance'=>array('label'=>$langs->trans("Balance"), 'checked'=>1, 'position'=>1001), 'b.num_releve'=>array('label'=>$langs->trans("AccountStatement"), 'checked'=>1, 'position'=>1010), - 'b.conciliated'=>array('label'=>$langs->trans("Conciliated"), 'enabled'=> $object->rappro, 'checked'=>($action == 'reconcile' ? 1 : 0), 'position'=>1020), + 'b.conciliated'=>array('label'=>$langs->trans("Conciliated"), 'enabled'=> $object->rappro, 'checked'=>($action == 'reconcile' ? 1 : 0), 'position'=>1020), ); // Extra fields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) @@ -183,10 +181,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { - $search_dt_start = ''; - $search_dt_end = ''; - $search_dv_start = ''; - $search_dv_end = ''; + $search_dt_start = ''; + $search_dt_end = ''; + $search_dv_start = ''; + $search_dv_end = ''; $search_type = ""; $search_debit = ""; $search_credit = ""; @@ -205,60 +203,57 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' if (empty($reshook)) { - $objectclass = 'Account'; - $objectlabel = 'BankTransaction'; - $permissiontoread = $user->rights->banque->lire; - $permissiontodelete = $user->rights->banque->supprimer; - $uploaddir = $conf->bank->dir_output; - include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + $objectclass = 'Account'; + $objectlabel = 'BankTransaction'; + $permissiontoread = $user->rights->banque->lire; + $permissiontodelete = $user->rights->banque->supprimer; + $uploaddir = $conf->bank->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; } // Conciliation -if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && $user->rights->banque->consolidate) +if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', 'alpha')) && $user->rights->banque->consolidate + && (!GETPOSTISSET('pageplusone') || (GETPOST('pageplusone') == GETPOST('pageplusoneold')))) { - $error = 0; + $error = 0; - // Definition, nettoyage parametres - $num_releve = trim(GETPOST("num_releve", "alpha")); + // Definition, nettoyage parametres + $num_releve = GETPOST("num_releve", "alpha"); - if ($num_releve) - { - $bankline = new AccountLine($db); - if (isset($_POST['rowid']) && is_array($_POST['rowid'])) - { - foreach ($_POST['rowid'] as $row) - { - if ($row > 0) - { - $result = $bankline->fetch($row); - $bankline->num_releve = $num_releve; //$_POST["num_releve"]; - $result = $bankline->update_conciliation($user, GETPOST("cat"), GETPOST('confirm_reconcile', 'alpha') ? 1 : 0); // If we confirm_reconcile, we set flag 'rappro' to 1. - if ($result < 0) - { - setEventMessages($bankline->error, $bankline->errors, 'errors'); - $error++; - break; - } - } - } - } - else - { - $error++; - $langs->load("errors"); - setEventMessages($langs->trans("NoRecordSelected"), null, 'errors'); - } - } - else - { - $error++; - $langs->load("errors"); - setEventMessages($langs->trans("ErrorPleaseTypeBankTransactionReportName"), null, 'errors'); - } + if ($num_releve) + { + $bankline = new AccountLine($db); + if (isset($_POST['rowid']) && is_array($_POST['rowid'])) + { + foreach ($_POST['rowid'] as $row) + { + if ($row > 0) + { + $result = $bankline->fetch($row); + $bankline->num_releve = $num_releve; //$_POST["num_releve"]; + $result = $bankline->update_conciliation($user, GETPOST("cat"), GETPOST('confirm_reconcile', 'alpha') ? 1 : 0); // If we confirm_reconcile, we set flag 'rappro' to 1. + if ($result < 0) + { + setEventMessages($bankline->error, $bankline->errors, 'errors'); + $error++; + break; + } + } + } + } else { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("NoRecordSelected"), null, 'errors'); + } + } else { + $error++; + $langs->load("errors"); + setEventMessages($langs->trans("ErrorPleaseTypeBankTransactionReportName"), null, 'errors'); + } - if (!$error) - { - $param = 'action=reconcile&contextpage=banktransactionlist&id='.$id.'&search_account='.$id; + if (!$error) + { + $param = 'action=reconcile&contextpage=banktransactionlist&id='.$id.'&search_account='.$id; $param .= '&search_conciliated='.urlencode($search_conciliated); if ($page) $param .= '&page='.urlencode($page); if ($offset) $param .= '&offset='.urlencode($offset); @@ -274,91 +269,85 @@ if ((GETPOST('confirm_savestatement', 'alpha') || GETPOST('confirm_reconcile', ' if ($search_credit) $param .= '&search_credit='.urlencode($search_credit); $param .= '&sortfield='.urlencode($sortfield).'&sortorder='.urlencode($sortorder); header('Location: '.$_SERVER["PHP_SELF"].'?'.$param); // To avoid to submit twice and allow the back button - exit; - } + exit; + } } if (GETPOST('save') && !$cancel && $user->rights->banque->modifier) { - $error = 0; + $error = 0; - if (price2num($_POST["addcredit"]) > 0) - { - $amount = price2num($_POST["addcredit"]); - } - else - { - $amount = - price2num($_POST["adddebit"]); - } + if (price2num(GETPOST("addcredit")) > 0) + { + $amount = price2num(GETPOST("addcredit")); + } else { + $amount = - price2num(GETPOST("adddebit")); + } - $operation = GETPOST("operation", 'alpha'); - $num_chq = GETPOST("num_chq", 'alpha'); - $label = GETPOST("label", 'alpha'); - $cat1 = GETPOST("cat1", 'alpha'); + $operation = GETPOST("operation", 'alpha'); + $num_chq = GETPOST("num_chq", 'alpha'); + $label = GETPOST("label", 'alpha'); + $cat1 = GETPOST("cat1", 'alpha'); - $bankaccountid = $id; - if (GETPOST('add_account', 'int') > 0) $bankaccountid = GETPOST('add_account', 'int'); + $bankaccountid = $id; + if (GETPOST('add_account', 'int') > 0) $bankaccountid = GETPOST('add_account', 'int'); - if (!$dateop) { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); - } - if (!$operation) { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); - } - if (!$label) { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); - } - if (!$amount) { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); - } - if (!$bankaccountid > 0) - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors'); - } - /*if (! empty($conf->accounting->enabled) && (empty($search_accountancy_code) || $search_accountancy_code == '-1')) + if (!$dateop) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); + } + if (!$operation) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); + } + if (!$label) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); + } + if (!$amount) { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Amount")), null, 'errors'); + } + if (!$bankaccountid > 0) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("BankAccount")), null, 'errors'); + } + /*if (! empty($conf->accounting->enabled) && (empty($search_accountancy_code) || $search_accountancy_code == '-1')) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("AccountAccounting")), null, 'errors'); $error++; }*/ - if (!$error && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) - { - $objecttmp = new Account($db); - $objecttmp->fetch($bankaccountid); - $insertid = $objecttmp->addline($dateop, $operation, $label, $amount, $num_chq, ($cat1 > 0 ? $cat1 : 0), $user, '', '', $search_accountancy_code); - if ($insertid > 0) - { - setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); - header("Location: ".$_SERVER['PHP_SELF'].($id ? "?id=".$id : '')); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } - else - { - $action = 'addline'; - } + if (!$error && !empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) + { + $objecttmp = new Account($db); + $objecttmp->fetch($bankaccountid); + $insertid = $objecttmp->addline($dateop, $operation, $label, $amount, $num_chq, ($cat1 > 0 ? $cat1 : 0), $user, '', '', $search_accountancy_code); + if ($insertid > 0) + { + setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); + header("Location: ".$_SERVER['PHP_SELF'].($id ? "?id=".$id : '')); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + $action = 'addline'; + } } if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->modifier) { - $accline = new AccountLine($db); - $result = $accline->fetch(GETPOST("rowid", "int")); - $result = $accline->delete($user); - if ($result <= 0) { - setEventMessages($accline->error, $accline->errors, 'errors'); - } else { - setEventMessages('RecordDeleted', null, 'mesgs'); - } + $accline = new AccountLine($db); + $result = $accline->fetch(GETPOST("rowid", "int")); + $result = $accline->delete($user); + if ($result <= 0) { + setEventMessages($accline->error, $accline->errors, 'errors'); + } else { + setEventMessages('RecordDeleted', null, 'mesgs'); + } } @@ -431,46 +420,44 @@ if ($id > 0 || !empty($ref)) $helpurl = ""; llxHeader('', $title, $helpurl); - // Load bank groups - require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php'; - $bankcateg = new BankCateg($db); + // Load bank groups + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php'; + $bankcateg = new BankCateg($db); - foreach ($bankcateg->fetchAll() as $bankcategory) { - $options[$bankcategory->id] = $bankcategory->label; - } + foreach ($bankcateg->fetchAll() as $bankcategory) { + $options[$bankcategory->id] = $bankcategory->label; + } - // Bank card - $head = bank_prepare_head($object); - dol_fiche_head($head, 'journal', $langs->trans("FinancialAccount"), 0, 'account'); + // Bank card + $head = bank_prepare_head($object); + dol_fiche_head($head, 'journal', $langs->trans("FinancialAccount"), 0, 'account'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); - dol_fiche_end(); + dol_fiche_end(); - /* + /* * Buttons actions */ - if ($action != 'reconcile') - { - if ($object->canBeConciliated() > 0) - { - // If not cash account and can be reconciliate - if ($user->rights->banque->consolidate) { - $newparam = $param; - $newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam); - $buttonreconcile = ''.$langs->trans("Conciliate").''; - } else { - $buttonreconcile = ''.$langs->trans("Conciliate").''; - } - } - } -} -else -{ + if ($action != 'reconcile') + { + if ($object->canBeConciliated() > 0) + { + // If not cash account and can be reconciliate + if ($user->rights->banque->consolidate) { + $newparam = $param; + $newparam = preg_replace('/search_conciliated=\d+/i', '', $newparam); + $buttonreconcile = ''.$langs->trans("Conciliate").''; + } else { + $buttonreconcile = ''.$langs->trans("Conciliate").''; + } + } + } +} else { llxHeader('', $langs->trans("BankTransactions"), '', '', 0, 0, array(), array(), $param); } @@ -552,25 +539,25 @@ $nbtotalofrecords = ''; $nbtotalofpages = 0; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - $nbtotalofpages = ceil($nbtotalofrecords / $limit); + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + $nbtotalofpages = ceil($nbtotalofrecords / $limit); } if (($id > 0 || !empty($ref)) && ((string) $page == '')) { - // We open a list of transaction of a dedicated account and no page was set by defaut - // We force on last page. - $page = ($nbtotalofpages - 1); - $offset = $limit * $page; - if ($page < 0) $page = 0; + // We open a list of transaction of a dedicated account and no page was set by defaut + // We force on last page. + $page = ($nbtotalofpages - 1); + $offset = $limit * $page; + if ($page < 0) $page = 0; } if ($page >= $nbtotalofpages) { - // If we made a search and result has low page than the page number we were on - $page = ($nbtotalofpages - 1); - $offset = $limit * $page; - if ($page < 0) $page = 0; + // If we made a search and result has low page than the page number we were on + $page = ($nbtotalofpages - 1); + $offset = $limit * $page; + if ($page < 0) $page = 0; } @@ -596,23 +583,23 @@ if ($resql) $arrayofselected = is_array($toselect) ? $toselect : array(); - // List of mass actions available - $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), - ); - //if ($user->rights->bank->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); - $massactionbutton = $form->selectMassAction('', $arrayofmassactions); + // List of mass actions available + $arrayofmassactions = array( + //'presend'=>$langs->trans("SendByMail"), + //'builddoc'=>$langs->trans("PDFMerge"), + ); + //if ($user->rights->bank->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); + if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); + $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - // Confirmation delete - if ($action == 'delete') - { - $text = $langs->trans('ConfirmDeleteTransaction'); - print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"), $langs->trans('DeleteTransaction'), $text, 'confirm_delete', null, '', 1); - } + // Confirmation delete + if ($action == 'delete') + { + $text = $langs->trans('ConfirmDeleteTransaction'); + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.'&rowid='.GETPOST("rowid"), $langs->trans('DeleteTransaction'), $text, 'confirm_delete', null, '', 1); + } - // Lines of title fields + // Lines of title fields print '
    '."\n"; if ($optioncss != '') print ''; print ''; @@ -621,7 +608,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; if (GETPOST('bid')) print ''; @@ -629,56 +616,54 @@ if ($resql) // Form to reconcile if ($user->rights->banque->consolidate && $action == 'reconcile') { - print '
    '; - print ''.$langs->trans("InputReceiptNumber").': '; - print ''; // The only default value is value we just entered - print '
    '; - if (is_array($options) && count($options)) - { - print $langs->trans("EventualyAddCategory").': '; - print Form::selectarray('cat', $options, GETPOST('cat'), 1); - } - print '
    '.$langs->trans("ThenCheckLinesAndConciliate").' '; - print ''; - print ' '.$langs->trans("or").' '; - print ''; - print ' '.$langs->trans("or").' '; - print ''; + print '
    '; + print ''.$langs->trans("InputReceiptNumber").': '; + print ''; // The only default value is value we just entered + print '
    '; + if (is_array($options) && count($options)) + { + print $langs->trans("EventualyAddCategory").': '; + print Form::selectarray('cat', $options, GETPOST('cat'), 1); + } + print '
    '.$langs->trans("ThenCheckLinesAndConciliate").' '; + print ''; + print ' '.$langs->trans("or").' '; + print ''; + print ' '.$langs->trans("or").' '; + print ''; print '
    '; - // Show last bank statements - $nbmax = 15; // We accept to show last 15 receipts (so we can have more than one year) - $liste = ""; - $sql = "SELECT DISTINCT num_releve FROM ".MAIN_DB_PREFIX."bank"; - $sql .= " WHERE fk_account=".$object->id." AND num_releve IS NOT NULL"; - $sql .= $db->order("num_releve", "DESC"); - $sql .= $db->plimit($nbmax + 1); - print '
    '; - print $langs->trans("LastAccountStatements").' : '; - $resqlr = $db->query($sql); - if ($resqlr) - { - $numr = $db->num_rows($resqlr); - $i = 0; - $last_ok = 0; - while (($i < $numr) && ($i < $nbmax)) - { - $objr = $db->fetch_object($resqlr); - if (!$last_ok) { - $last_releve = $objr->num_releve; - $last_ok = 1; - } - $i++; - $liste = ''.$objr->num_releve.'   '.$liste; - } - if ($numr >= $nbmax) $liste = "...   ".$liste; - print $liste; - if ($numr <= 0) print ''.$langs->trans("None").''; - } - else - { - dol_print_error($db); - } + // Show last bank statements + $nbmax = 12; // We show last 12 receipts (so we can have more than one year) + $liste = ""; + $sql = "SELECT DISTINCT num_releve FROM ".MAIN_DB_PREFIX."bank"; + $sql .= " WHERE fk_account=".$object->id." AND num_releve IS NOT NULL"; + $sql .= $db->order("num_releve", "DESC"); + $sql .= $db->plimit($nbmax + 1); + print '
    '; + print $langs->trans("LastAccountStatements").' : '; + $resqlr = $db->query($sql); + if ($resqlr) + { + $numr = $db->num_rows($resqlr); + $i = 0; + $last_ok = 0; + while (($i < $numr) && ($i < $nbmax)) + { + $objr = $db->fetch_object($resqlr); + if (!$last_ok) { + $last_releve = $objr->num_releve; + $last_ok = 1; + } + $i++; + $liste = ''.$objr->num_releve.'   '.$liste; + } + if ($numr >= $nbmax) $liste = "...   ".$liste; + print $liste; + if ($numr <= 0) print ''.$langs->trans("None").''; + } else { + dol_print_error($db); + } // Using BANK_REPORT_LAST_NUM_RELEVE to automatically report last num (or not) if (!empty($conf->global->BANK_REPORT_LAST_NUM_RELEVE)) @@ -791,24 +776,22 @@ if ($resql) { if (empty($conf->global->BANK_USE_OLD_VARIOUS_PAYMENT)) // If direct entries is done using miscellaneous payments { - $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier); - } - else // If direct entries is not done using miscellaneous payments + $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&accountid='.$search_account.'&backtopage='.urlencode($_SERVER['PHP_SELF'].'?id='.urlencode($search_account)), '', $user->rights->banque->modifier); + } else // If direct entries is not done using miscellaneous payments { - $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', $user->rights->banque->modifier); + $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', $user->rights->banque->modifier); } - } - else - { - $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', -1); + } else { + $newcardbutton = dolGetButtonTitle($langs->trans('AddBankRecord'), '', 'fa fa-plus-circle', $_SERVER["PHP_SELF"].'?action=addline&page='.$page.$param, '', -1); } } - $morehtml = '
    '; + /*$morehtml = '
    '; $morehtml .= ' "; // ' Page '; $morehtml .= ''; $morehtml .= '/'.$nbtotalofpages.' '; $morehtml .= '
    '; + */ if ($action != 'addline' && $action != 'reconcile') { @@ -820,7 +803,7 @@ if ($resql) $picto = 'bank_account'; if ($id > 0 || !empty($ref)) $picto = ''; - print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit); + print_barre_liste($langs->trans("BankTransactions"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, $picto, 0, $morehtml, '', $limit, 0, 0, 1); // We can add page now to param if ($page != '') $param .= '&page='.urlencode($page); @@ -830,19 +813,19 @@ if ($resql) $moreforfilter .= '
    '; $moreforfilter .= $langs->trans('DateOperationShort').' :'; $moreforfilter .= ($conf->browser->layout == 'phone' ? '
    ' : ' '); - $moreforfilter .= '
    '.$langs->trans('From').' '; - $moreforfilter .= $form->selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0).'
    '; + $moreforfilter .= '
    '; + $moreforfilter .= $form->selectDate($search_dt_start, 'search_start_dt', 0, 0, 1, "search_form", 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')).'
    '; //$moreforfilter .= ' - '; - $moreforfilter .= '
    '.$langs->trans('to').' '.$form->selectDate($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0).'
    '; + $moreforfilter .= '
    '.$form->selectDate($search_dt_end, 'search_end_dt', 0, 0, 1, "search_form", 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')).'
    '; $moreforfilter .= '
    '; $moreforfilter .= '
    '; $moreforfilter .= $langs->trans('DateValueShort').' : '; $moreforfilter .= ($conf->browser->layout == 'phone' ? '
    ' : ' '); - $moreforfilter .= '
    '.$langs->trans('From').' '; - $moreforfilter .= $form->selectDate($search_dv_start, 'search_start_dv', 0, 0, 1, "search_form", 1, 0).'
    '; + $moreforfilter .= '
    '; + $moreforfilter .= $form->selectDate($search_dv_start, 'search_start_dv', 0, 0, 1, "search_form", 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')).'
    '; //$moreforfilter .= ' - '; - $moreforfilter .= '
    '.$langs->trans('to').' '.$form->selectDate($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0).'
    '; + $moreforfilter .= '
    '.$form->selectDate($search_dv_end, 'search_end_dv', 0, 0, 1, "search_form", 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')).'
    '; $moreforfilter .= '
    '; if (!empty($conf->categorie->enabled)) @@ -873,66 +856,66 @@ if ($resql) print '
    '."\n"; } - $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - print '
    '; - print '
    '; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
    \n"; print $px2->show(); diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index 7d8b819b75c..020b85bf06c 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -60,15 +60,15 @@ $date_stopMonth = GETPOST('date_stopmonth', 'int'); $date_stopYear = GETPOST('date_stopyear', 'int'); //FIXME doldate $date_stop = ($date_stopDay) ?dol_mktime(23, 59, 59, $date_stopMonth, $date_stopDay, $date_stopYear) : strtotime($date_stop); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('comptafileslist', 'globallist')); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -149,7 +149,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Customer invoices if (GETPOST('selectinvoices')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total as total_ht, t.total_ttc, t.tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_CREDIT." as sens"; + $sql .= "SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total as total_ht, t.total_ttc, t.tva as total_vat, t.multicurrency_code as currency, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'Invoice' as item, s.nom as thirdparty_name, s.code_client as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_CREDIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."facture as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays"; $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -158,7 +158,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Vendor invoices if (GETPOST('selectsupplierinvoices')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_DEBIT." as sens"; + $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paye as paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.multicurrency_code as currency, t.fk_soc, t.datef as date, t.date_lim_reglement as date_due, 'SupplierInvoice' as item, s.nom as thirdparty_name, s.code_fournisseur as thirdparty_code, c.code as country_code, s.tva_intra as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as t LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = t.fk_soc LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = s.fk_pays"; $sql .= " WHERE datef between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -167,7 +167,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Expense reports if (GETPOST('selectexpensereports')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.fk_user_author as fk_soc, t.date_fin as date, t.date_fin as date_due, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; + $sql .= " SELECT t.rowid as id, t.entity, t.ref, t.paid, t.total_ht, t.total_ttc, t.total_tva as total_vat, t.multicurrency_code as currency, t.fk_user_author as fk_soc, t.date_fin as date, t.date_fin as date_due, 'ExpenseReport' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user_author LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country"; $sql .= " WHERE date_fin between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -176,16 +176,16 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Donations if (GETPOST('selectdonations')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, 0 as fk_soc, t.datedon as date, t.datedon as date_due, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_CREDIT." as sens"; + $sql .= " SELECT t.rowid as id, t.entity, t.ref, paid, amount as total_ht, amount as total_ttc, 0 as total_vat, '".$db->escape($conf->currency)."' as currency, 0 as fk_soc, t.datedon as date, t.datedon as date_due, 'Donation' as item, t.societe as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_CREDIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."don as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = t.fk_country"; $sql .= " WHERE datedon between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; $sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT; } - // Paiements of salaries + // Payments of salaries if (GETPOST('selectpaymentsofsalaries')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, t.fk_user as fk_soc, t.datep as date, t.dateep as date_due, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; + $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, amount as total_ht, amount as total_ttc, 0 as total_vat, '".$db->escape($conf->currency)."' as currency, t.fk_user as fk_soc, t.datep as date, t.dateep as date_due, 'SalaryPayment' as item, CONCAT(CONCAT(u.lastname, ' '), u.firstname) as thirdparty_name, '' as thirdparty_code, c.code as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_salary as t LEFT JOIN ".MAIN_DB_PREFIX."user as u ON u.rowid = t.fk_user LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON c.rowid = u.fk_country"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -194,7 +194,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Social contributions if (GETPOST('selectsocialcontributions')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, t.paye as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.date_ech as date, t.periode as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; + $sql .= " SELECT t.rowid as id, t.entity, t.libelle as ref, t.paye as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_vat, '".$db->escape($conf->currency)."' as currency, 0 as fk_soc, t.date_ech as date, t.periode as date_due, 'SocialContributions' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."chargesociales as t"; $sql .= " WHERE t.date_ech between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -203,7 +203,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Various payments if (GETPOST('selectvariouspayment')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, t.entity, t.label as ref, 1 as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_tva, 0 as fk_soc, t.datep as date, t.datep as date_due, 'VariousPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, sens"; + $sql .= " SELECT t.rowid as id, t.entity, t.ref, 1 as paid, t.amount as total_ht, t.amount as total_ttc, 0 as total_vat, '".$db->escape($conf->currency)."' as currency, 0 as fk_soc, t.datep as date, t.datep as date_due, 'VariousPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, sens"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND t.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -211,7 +211,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { // Loan payments if (GETPOST('selectloanspayment')) { if (!empty($sql)) $sql .= " UNION ALL"; - $sql .= " SELECT t.rowid as id, l.entity, l.label as ref, 1 as paid, (t.amount_capital+t.amount_insurance+t.amount_interest) as total_ht, (t.amount_capital+t.amount_insurance+t.amount_interest) as total_ttc, 0 as total_tva, 0 as fk_soc, t.datep as date, t.datep as date_due, 'LoanPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; + $sql .= " SELECT t.rowid as id, l.entity, l.label as ref, 1 as paid, (t.amount_capital+t.amount_insurance+t.amount_interest) as total_ht, (t.amount_capital+t.amount_insurance+t.amount_interest) as total_ttc, 0 as total_vat, '".$db->escape($conf->currency)."' as currency, 0 as fk_soc, t.datep as date, t.datep as date_due, 'LoanPayment' as item, '' as thirdparty_name, '' as thirdparty_code, '' as country_code, '' as vatnum, ".PAY_DEBIT." as sens"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_loan as t LEFT JOIN ".MAIN_DB_PREFIX."loan as l ON l.rowid = t.fk_loan"; $sql .= " WHERE datep between ".$wheretail; $sql .= " AND l.entity IN (".($entity == 1 ? '0,1' : $entity).')'; @@ -334,9 +334,7 @@ if (($action == 'searchfiles' || $action == 'dl')) { $nofile['sens'] = $objd->sens; $filesarray[$nofile['item'].'_'.$nofile['id']] = $nofile; - } - else - { + } else { foreach ($files as $key => $file) { $file['id'] = $objd->id; @@ -383,15 +381,12 @@ if (($action == 'searchfiles' || $action == 'dl')) { $i++; } - } - else - { + } else { dol_print_error($db); } $db->free($resd); - } - else { + } else { setEventMessages($langs->trans("ErrorSelectAtLeastOne"), null, 'errors'); $error++; } @@ -491,9 +486,7 @@ if ($result && $action == "dl" && !$error) dol_delete_file($zipname); exit(); - } - else - { + } else { setEventMessages($langs->trans("FailedToOpenFile", $zipname), null, 'errors'); } } @@ -532,6 +525,9 @@ dol_fiche_head($head, 'AccountancyFiles'); print '
    '."\n"; print ''; +print ''.$langs->trans("ExportAccountingSourceDocHelp", $langs->transnoentitiesnoconv("Accounting"), $langs->transnoentitiesnoconv("Journals")).'
    '; +print '
    '; + 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"; @@ -585,7 +581,7 @@ if (!empty($date_start) && !empty($date_stop)) foreach ($listofchoices as $choice => $val) { $param .= '&'.$choice.'='.(GETPOST($choice, 'int') ? 1 : 0); } - print ''."\n"; + print ''."\n"; print ''; echo dol_print_date($date_start, 'day')." - ".dol_print_date($date_stop, 'day'); @@ -596,7 +592,7 @@ if (!empty($date_start) && !empty($date_stop)) print ''; } - print ''; + print ''; print '
    '."\n"; print '
    '; @@ -610,13 +606,14 @@ if (!empty($date_start) && !empty($date_stop)) print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'nowraponall '); print '
    '.$langs->trans("Document").''.$langs->trans("Paid").''.$langs->trans("TotalHT").''.$langs->trans("TotalTTC").''.$langs->trans("TotalVAT").''.$langs->trans("TotalHT").($conf->multicurrency->enabled ? ' ('.$conf->currency.')' : '').''.$langs->trans("TotalTTC").($conf->multicurrency->enabled ? ' ('.$conf->currency.')' : '').''.$langs->trans("TotalVAT").($conf->multicurrency->enabled ? ' ('.$conf->currency.')' : '').''.$langs->trans("ThirdParty").''.$langs->trans("Code").''.$langs->trans("Country").''.$langs->trans("VATIntra").''.$langs->trans("Currency").'
    '.$langs->trans("NoItem").'
    '.$langs->trans("NoItem").'
    '; print dol_print_date($data['date_due'], 'day'); print "'.$data['paid'].''.price($data['sens']?$data['amount_ht']:-$data['amount_ht'])."'.price($data['sens'] ? $data['amount_ht'] : -$data['amount_ht'])."'.price($data['sens']?$data['amount_ttc']:-$data['amount_ttc'])."'.price($data['sens'] ? $data['amount_ttc'] : -$data['amount_ttc'])."'.price($data['sens']?$data['amount_vat']:-$data['amount_vat'])."'.price($data['sens'] ? $data['amount_vat'] : -$data['amount_vat'])."'.$data['thirdparty_name']."'.$data['thirdparty_name']."'.$data['thirdparty_code']."'.$data['currency']."
    '.price(price2num($totalIT_credit, 'MT')).''.price(price2num($totalVAT_credit, 'MT')).'
    '.price(price2num($totalIT_debit, 'MT')).''.price(price2num($totalVAT_debit, 'MT')).'
    '.$langs->trans('Total').''.price(price2num($totalET_credit+$totalET_debit, 'MT')).''.price(price2num($totalIT_credit+$totalIT_debit, 'MT')).''.price(price2num($totalVAT_credit+$totalVAT_debit, 'MT')).''.price(price2num($totalET_credit + $totalET_debit, 'MT')).''.price(price2num($totalIT_credit + $totalIT_debit, 'MT')).''.price(price2num($totalVAT_credit + $totalVAT_debit, 'MT')).'
    '."\n"; + print '
    '; + print '
    '."\n"; print ''; if (!empty($arrayfields['b.rowid']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['b.label']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['b.dateo']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['b.datev']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['type']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['b.num_chq']['checked'])) { - // Numero - print ''; + // Numero + print ''; } if (!empty($arrayfields['bu.label']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['ba.ref']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['b.debit']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['b.credit']['checked'])) { - print ''; + print ''; } if (!empty($arrayfields['balancebefore']['checked'])) { @@ -951,21 +934,21 @@ if ($resql) // Numero statement if (!empty($arrayfields['b.num_releve']['checked'])) { - print ''; + print ''; } // Conciliated if (!empty($arrayfields['b.conciliated']['checked'])) { - print ''; + print ''; } print ''; print ''; + print ''; print "\n"; // Fields title @@ -1003,110 +986,107 @@ if ($resql) // Loop on each record $sign = 1; - $totalarray = array(); - while ($i < min($num, $limit)) - { - $objp = $db->fetch_object($resql); + $totalarray = array(); + while ($i < min($num, $limit)) + { + $objp = $db->fetch_object($resql); - // If we are in a situation where we need/can show balance, we calculate the start of balance - if (!$balancecalculated && (!empty($arrayfields['balancebefore']['checked']) || !empty($arrayfields['balance']['checked'])) && $mode_balance_ok) - { - if (!$search_account) - { - dol_print_error('', 'account is not defined but $mode_balance_ok is true'); - exit; - } + // If we are in a situation where we need/can show balance, we calculate the start of balance + if (!$balancecalculated && (!empty($arrayfields['balancebefore']['checked']) || !empty($arrayfields['balance']['checked'])) && $mode_balance_ok) + { + if (!$search_account) + { + dol_print_error('', 'account is not defined but $mode_balance_ok is true'); + exit; + } - // Loop on each record before - $sign = 1; - $i = 0; - $sqlforbalance = 'SELECT SUM(b.amount) as previoustotal'; - $sqlforbalance .= " FROM "; - $sqlforbalance .= " ".MAIN_DB_PREFIX."bank_account as ba,"; - $sqlforbalance .= " ".MAIN_DB_PREFIX."bank as b"; - $sqlforbalance .= " WHERE b.fk_account = ba.rowid"; - $sqlforbalance .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sqlforbalance .= " AND b.fk_account = ".$search_account; - $sqlforbalance .= " AND (b.datev < '".$db->idate($db->jdate($objp->dv))."' OR (b.datev = '".$db->idate($db->jdate($objp->dv))."' AND (b.dateo < '".$db->idate($db->jdate($objp->do))."' OR (b.dateo = '".$db->idate($db->jdate($objp->do))."' AND b.rowid < ".$objp->rowid."))))"; - $resqlforbalance = $db->query($sqlforbalance); - //print $sqlforbalance; - if ($resqlforbalance) - { - $objforbalance = $db->fetch_object($resqlforbalance); - if ($objforbalance) - { - // If sort is desc,desc,desc then total of previous date + amount is the balancebefore of the previous line before the line to show - if ($sortfield == 'b.datev,b.dateo,b.rowid' && $sortorder == 'desc,desc,desc') - { - $balancebefore = $objforbalance->previoustotal + ($sign * $objp->amount); - } - // If sort is asc,asc,asc then total of previous date is balance of line before the next line to show - else - { - $balance = $objforbalance->previoustotal; - } - } - } - else dol_print_error($db); + // Loop on each record before + $sign = 1; + $i = 0; + $sqlforbalance = 'SELECT SUM(b.amount) as previoustotal'; + $sqlforbalance .= " FROM "; + $sqlforbalance .= " ".MAIN_DB_PREFIX."bank_account as ba,"; + $sqlforbalance .= " ".MAIN_DB_PREFIX."bank as b"; + $sqlforbalance .= " WHERE b.fk_account = ba.rowid"; + $sqlforbalance .= " AND ba.entity IN (".getEntity('bank_account').")"; + $sqlforbalance .= " AND b.fk_account = ".$search_account; + $sqlforbalance .= " AND (b.datev < '".$db->idate($db->jdate($objp->dv))."' OR (b.datev = '".$db->idate($db->jdate($objp->dv))."' AND (b.dateo < '".$db->idate($db->jdate($objp->do))."' OR (b.dateo = '".$db->idate($db->jdate($objp->do))."' AND b.rowid < ".$objp->rowid."))))"; + $resqlforbalance = $db->query($sqlforbalance); + //print $sqlforbalance; + if ($resqlforbalance) + { + $objforbalance = $db->fetch_object($resqlforbalance); + if ($objforbalance) + { + // If sort is desc,desc,desc then total of previous date + amount is the balancebefore of the previous line before the line to show + if ($sortfield == 'b.datev,b.dateo,b.rowid' && $sortorder == 'desc,desc,desc') + { + $balancebefore = $objforbalance->previoustotal + ($sign * $objp->amount); + } // If sort is asc,asc,asc then total of previous date is balance of line before the next line to show + else { + $balance = $objforbalance->previoustotal; + } + } + } else dol_print_error($db); - $balancecalculated = true; + $balancecalculated = true; - // Output a line with start balance - if ($user->rights->banque->consolidate && $action == 'reconcile') - { - $tmpnbfieldbeforebalance = 0; - $tmpnbfieldafterbalance = 0; - $balancefieldfound = 0; - foreach ($arrayfields as $key => $val) - { - if ($key == 'balancebefore' || $key == 'balance') - { - $balancefieldfound++; - continue; - } - if (!empty($arrayfields[$key]['checked'])) - { - if (!$balancefieldfound) $tmpnbfieldbeforebalance++; - else $tmpnbfieldafterbalance++; - } - } - // Extra fields - $element = 'banktransaction'; - if (is_array($extrafields->attributes[$element]['label']) && count($extrafields->attributes[$element]['label'])) - { - foreach ($extrafields->attributes[$element]['label'] as $key => $val) - { - if (!empty($arrayfields["ef.".$key]['checked'])) - { - if (!empty($arrayfields[$key]['checked'])) - { - if (!$balancefieldfound) $tmpnbfieldbeforebalance++; - else $tmpnbfieldafterbalance++; - } - } - } - } + // Output a line with start balance + if ($user->rights->banque->consolidate && $action == 'reconcile') + { + $tmpnbfieldbeforebalance = 0; + $tmpnbfieldafterbalance = 0; + $balancefieldfound = 0; + foreach ($arrayfields as $key => $val) + { + if ($key == 'balancebefore' || $key == 'balance') + { + $balancefieldfound++; + continue; + } + if (!empty($arrayfields[$key]['checked'])) + { + if (!$balancefieldfound) $tmpnbfieldbeforebalance++; + else $tmpnbfieldafterbalance++; + } + } + // Extra fields + $element = 'banktransaction'; + if (is_array($extrafields->attributes[$element]['label']) && count($extrafields->attributes[$element]['label'])) + { + foreach ($extrafields->attributes[$element]['label'] as $key => $val) + { + if (!empty($arrayfields["ef.".$key]['checked'])) + { + if (!empty($arrayfields[$key]['checked'])) + { + if (!$balancefieldfound) $tmpnbfieldbeforebalance++; + else $tmpnbfieldafterbalance++; + } + } + } + } - print ''; - if ($tmpnbfieldbeforebalance) - { - print ''; - } + print ''; + if ($tmpnbfieldbeforebalance) + { + print ''; + } - if (!empty($arrayfields['balancebefore']['checked'])) - { - print ''; - } - if (!empty($arrayfields['balance']['checked'])) - { - print ''; - } + } + if (!empty($arrayfields['balance']['checked'])) + { + print ''; + } print ''; - print ''; - } - } + print ''; + } + } - if ($sortfield == 'b.datev,b.dateo,b.rowid' && $sortorder == 'desc,desc,desc') - { - $balance = price2num($balancebefore, 'MT'); // balance = balancebefore of previous line (sort is desc) - $balancebefore = price2num($balancebefore - ($sign * $objp->amount), 'MT'); - } - else + if ($sortfield == 'b.datev,b.dateo,b.rowid' && $sortorder == 'desc,desc,desc') { + $balance = price2num($balancebefore, 'MT'); // balance = balancebefore of previous line (sort is desc) + $balancebefore = price2num($balancebefore - ($sign * $objp->amount), 'MT'); + } else { $balancebefore = price2num($balance, 'MT'); // balancebefore = balance of previous line (sort is asc) $balance = price2num($balance + ($sign * $objp->amount), 'MT'); } - if (empty($cachebankaccount[$objp->bankid])) - { - $bankaccounttmp = new Account($db); - $bankaccounttmp->fetch($objp->bankid); - $cachebankaccount[$objp->bankid] = $bankaccounttmp; - $bankaccount = $bankaccounttmp; - } - else - { - $bankaccount = $cachebankaccount[$objp->bankid]; - } + if (empty($cachebankaccount[$objp->bankid])) + { + $bankaccounttmp = new Account($db); + $bankaccounttmp->fetch($objp->bankid); + $cachebankaccount[$objp->bankid] = $bankaccounttmp; + $bankaccount = $bankaccounttmp; + } else { + $bankaccount = $cachebankaccount[$objp->bankid]; + } - if (empty($conf->global->BANK_COLORIZE_MOVEMENT)) { - $backgroundcolor = "class='oddeven'"; - } else { - if ($objp->amount < 0) - { - if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR1)) { - $color = '#fca955'; - } else { - $color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1; - } - $backgroundcolor = 'style="background: '.$color.';"'; - } else { - if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) { - $color = '#7fdb86'; - } else { - $color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2; - } - $backgroundcolor = 'style="background: '.$color.';"'; - } - } - print ''; + if (empty($conf->global->BANK_COLORIZE_MOVEMENT)) { + $backgroundcolor = "class='oddeven'"; + } else { + if ($objp->amount < 0) + { + if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR1)) { + $color = '#fca955'; + } else { + $color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR1; + } + $backgroundcolor = 'style="background: '.$color.';"'; + } else { + if (empty($conf->global->BANK_COLORIZE_MOVEMENT_COLOR2)) { + $color = '#7fdb86'; + } else { + $color = '#'.$conf->global->BANK_COLORIZE_MOVEMENT_COLOR2; + } + $backgroundcolor = 'style="background: '.$color.';"'; + } + } - // Ref - if (!empty($arrayfields['b.rowid']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } + $banklinestatic->id = $objp->rowid; + $banklinestatic->ref = $objp->rowid; - // Description - if (!empty($arrayfields['b.label']['checked'])) - { - print "'; - //print "rowid."&account=".$objp->fk_account."\">"; - $reg = array(); - preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthee on tente recherche de traduction - if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) print $langs->trans($reg[1]); - else { - if ($objp->label == '(payment_salary)') { - print dol_trunc($langs->trans("SalaryPayment", 40)); - } else { - print dol_trunc($objp->label, 40); - } - } - //print " "; + // Ref + if (!empty($arrayfields['b.rowid']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } - // Add links after description - $links = $bankaccountstatic->get_url($objp->rowid); - $cachebankaccount = array(); - foreach ($links as $key=>$val) - { - print ''; - if ($links[$key]['type'] == 'withdraw') - { - $banktransferstatic->id = $links[$key]['url_id']; - $banktransferstatic->ref = $links[$key]['label']; - print ' '.$banktransferstatic->getNomUrl(0); - } - elseif ($links[$key]['type'] == 'payment') - { - $paymentstatic->id = $links[$key]['url_id']; - $paymentstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment - print ' '.$paymentstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_supplier') - { - $paymentsupplierstatic->id = $links[$key]['url_id']; - $paymentsupplierstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment - print ' '.$paymentsupplierstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_sc') - { - print ''; - print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; - //print $langs->trans("SocialContributionPayment"); - print ''; - } - elseif ($links[$key]['type'] == 'payment_vat') - { - $paymentvatstatic->id = $links[$key]['url_id']; - $paymentvatstatic->ref = $links[$key]['url_id']; - print ' '.$paymentvatstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_salary') - { - $paymentsalstatic->id = $links[$key]['url_id']; - $paymentsalstatic->ref = $links[$key]['url_id']; - print ' '.$paymentsalstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_loan') - { - print ''; - print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; - print ''; - } - elseif ($links[$key]['type'] == 'payment_donation') - { - print ''; - print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; - print ''; - } - elseif ($links[$key]['type'] == 'payment_expensereport') - { - $paymentexpensereportstatic->id = $links[$key]['url_id']; - $paymentexpensereportstatic->ref = $links[$key]['url_id']; - print ' '.$paymentexpensereportstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'payment_various') - { - $paymentvariousstatic->id = $links[$key]['url_id']; - $paymentvariousstatic->ref = $links[$key]['url_id']; - print ' '.$paymentvariousstatic->getNomUrl(2); - } - elseif ($links[$key]['type'] == 'banktransfert') - { - // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. - if ($objp->amount > 0) - { - $banklinestatic->fetch($links[$key]['url_id']); - $bankstatic->id = $banklinestatic->fk_account; - $bankstatic->label = $banklinestatic->bank_account_ref; - print ' ('.$langs->trans("TransferFrom").' '; - print $bankstatic->getNomUrl(1, 'transactions'); - print ' '.$langs->trans("toward").' '; - $bankstatic->id = $objp->bankid; - $bankstatic->label = $objp->bankref; - print $bankstatic->getNomUrl(1, ''); - print ')'; - } - else - { - $bankstatic->id = $objp->bankid; - $bankstatic->label = $objp->bankref; - print ' ('.$langs->trans("TransferFrom").' '; - print $bankstatic->getNomUrl(1, ''); - print ' '.$langs->trans("toward").' '; - $banklinestatic->fetch($links[$key]['url_id']); - $bankstatic->id = $banklinestatic->fk_account; - $bankstatic->label = $banklinestatic->bank_account_ref; - print $bankstatic->getNomUrl(1, 'transactions'); - print ')'; - } - //var_dump($links); - } - elseif ($links[$key]['type'] == 'company') - { - } - elseif ($links[$key]['type'] == 'user') - { - } - elseif ($links[$key]['type'] == 'member') - { - } - elseif ($links[$key]['type'] == 'sc') - { - } - else - { - // Show link with label $links[$key]['label'] - if (!empty($objp->label) && !empty($links[$key]['label'])) print ' - '; - print ''; - if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) - { - // Label generique car entre parentheses. On l'affiche en le traduisant - if ($reg[1] == 'paiement') $reg[1] = 'Payment'; - print ' '.$langs->trans($reg[1]); - } - else - { - print ' '.$links[$key]['label']; - } - print ''; - } - } - print ''; - if (!$i) $totalarray['nbfield']++; - } + // Description + if (!empty($arrayfields['b.label']['checked'])) + { + print "\n"; - if (!$i) $totalarray['nbfield']++; - } + //print "rowid."&account=".$objp->fk_account."\">"; + $reg = array(); + preg_match('/\((.+)\)/i', $objp->label, $reg); // Si texte entoure de parenthee on tente recherche de traduction + if ($reg[1] && $langs->trans($reg[1]) != $reg[1]) print $langs->trans($reg[1]); + else { + if ($objp->label == '(payment_salary)') { + print dol_trunc($langs->trans("SalaryPayment", 40)); + } else { + print dol_trunc($objp->label, 40); + } + } + //print " "; - // Date value - if (!empty($arrayfields['b.datev']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - } + // Add links after description + $links = $bankaccountstatic->get_url($objp->rowid); + $cachebankaccount = array(); + foreach ($links as $key=>$val) + { + print ''; + if ($links[$key]['type'] == 'withdraw') + { + $banktransferstatic->id = $links[$key]['url_id']; + $banktransferstatic->ref = $links[$key]['label']; + print ' '.$banktransferstatic->getNomUrl(0); + } elseif ($links[$key]['type'] == 'payment') + { + $paymentstatic->id = $links[$key]['url_id']; + $paymentstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment + print ' '.$paymentstatic->getNomUrl(2); + } elseif ($links[$key]['type'] == 'payment_supplier') + { + $paymentsupplierstatic->id = $links[$key]['url_id']; + $paymentsupplierstatic->ref = $links[$key]['url_id']; // FIXME This is id, not ref of payment + print ' '.$paymentsupplierstatic->getNomUrl(2); + } elseif ($links[$key]['type'] == 'payment_sc') + { + print ''; + print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; + //print $langs->trans("SocialContributionPayment"); + print ''; + } elseif ($links[$key]['type'] == 'payment_vat') + { + $paymentvatstatic->id = $links[$key]['url_id']; + $paymentvatstatic->ref = $links[$key]['url_id']; + print ' '.$paymentvatstatic->getNomUrl(2); + } elseif ($links[$key]['type'] == 'payment_salary') + { + $paymentsalstatic->id = $links[$key]['url_id']; + $paymentsalstatic->ref = $links[$key]['url_id']; + print ' '.$paymentsalstatic->getNomUrl(2); + } elseif ($links[$key]['type'] == 'payment_loan') + { + print ''; + print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; + print ''; + } elseif ($links[$key]['type'] == 'payment_donation') + { + print ''; + print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; + print ''; + } elseif ($links[$key]['type'] == 'payment_expensereport') + { + $paymentexpensereportstatic->id = $links[$key]['url_id']; + $paymentexpensereportstatic->ref = $links[$key]['url_id']; + print ' '.$paymentexpensereportstatic->getNomUrl(2); + } elseif ($links[$key]['type'] == 'payment_various') + { + $paymentvariousstatic->id = $links[$key]['url_id']; + $paymentvariousstatic->ref = $links[$key]['url_id']; + print ' '.$paymentvariousstatic->getNomUrl(2); + } elseif ($links[$key]['type'] == 'banktransfert') + { + // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. + if ($objp->amount > 0) + { + $banklinestatic->fetch($links[$key]['url_id']); + $bankstatic->id = $banklinestatic->fk_account; + $bankstatic->label = $banklinestatic->bank_account_ref; + print ' ('.$langs->trans("TransferFrom").' '; + print $bankstatic->getNomUrl(1, 'transactions'); + print ' '.$langs->trans("toward").' '; + $bankstatic->id = $objp->bankid; + $bankstatic->label = $objp->bankref; + print $bankstatic->getNomUrl(1, ''); + print ')'; + } else { + $bankstatic->id = $objp->bankid; + $bankstatic->label = $objp->bankref; + print ' ('.$langs->trans("TransferFrom").' '; + print $bankstatic->getNomUrl(1, ''); + print ' '.$langs->trans("toward").' '; + $banklinestatic->fetch($links[$key]['url_id']); + $bankstatic->id = $banklinestatic->fk_account; + $bankstatic->label = $banklinestatic->bank_account_ref; + print $bankstatic->getNomUrl(1, 'transactions'); + print ')'; + } + //var_dump($links); + } elseif ($links[$key]['type'] == 'company') + { + } elseif ($links[$key]['type'] == 'user') + { + } elseif ($links[$key]['type'] == 'member') + { + } elseif ($links[$key]['type'] == 'sc') + { + } else { + // Show link with label $links[$key]['label'] + if (!empty($objp->label) && !empty($links[$key]['label'])) print ' - '; + print ''; + if (preg_match('/^\((.*)\)$/i', $links[$key]['label'], $reg)) + { + // Label generique car entre parentheses. On l'affiche en le traduisant + if ($reg[1] == 'paiement') $reg[1] = 'Payment'; + print ' '.$langs->trans($reg[1]); + } else { + print ' '.$links[$key]['label']; + } + print ''; + } + } + print ''; + if (!$i) $totalarray['nbfield']++; + } - // Payment type - if (!empty($arrayfields['type']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - } + // Date ope + if (!empty($arrayfields['b.dateo']['checked'])) + { + print '\n"; + if (!$i) $totalarray['nbfield']++; + } - // Num cheque - if (!empty($arrayfields['b.num_chq']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - } + // Date value + if (!empty($arrayfields['b.datev']['checked'])) + { + print '\n"; + if (!$i) $totalarray['nbfield']++; + } + + // Payment type + if (!empty($arrayfields['type']['checked'])) + { + print '\n"; + if (!$i) $totalarray['nbfield']++; + } + + // Num cheque + if (!empty($arrayfields['b.num_chq']['checked'])) + { + print '\n"; + if (!$i) $totalarray['nbfield']++; + } // Third party - if (!empty($arrayfields['bu.label']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } + if (!$i) $totalarray['nbfield']++; + } - // Bank account - if (!empty($arrayfields['ba.ref']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - } + if (!$i) $totalarray['nbfield']++; + } - // Debit - if (!empty($arrayfields['b.debit']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['totaldebfield'] = $totalarray['nbfield']; - } + // Debit + if (!empty($arrayfields['b.debit']['checked'])) + { + print '\n"; + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['totaldebfield'] = $totalarray['nbfield']; + } - // Credit - if (!empty($arrayfields['b.credit']['checked'])) - { - print '\n"; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['totalcredfield'] = $totalarray['nbfield']; - } + $totalarray['totalcred'] += $objp->amount; + } + print "\n"; + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['totalcredfield'] = $totalarray['nbfield']; + } - // Balance before - if (!empty($arrayfields['balancebefore']['checked'])) - { - if ($mode_balance_ok) - { - if ($balancebefore >= 0) - { - print ''; - } - else - { - print ''; - } - } - else - { - print ''; - } - if (!$i) $totalarray['nbfield']++; - } - // Balance - if (!empty($arrayfields['balance']['checked'])) - { - if ($mode_balance_ok) - { - if ($balance >= 0) - { - print ''; - } - else - { - print ''; - } - } - else - { - print ''; - } - if (!$i) $totalarray['nbfield']++; - } + // Balance before + if (!empty($arrayfields['balancebefore']['checked'])) + { + if ($mode_balance_ok) + { + if ($balancebefore >= 0) + { + print ''; + } else { + print ''; + } + } else { + print ''; + } + if (!$i) $totalarray['nbfield']++; + } + // Balance + if (!empty($arrayfields['balance']['checked'])) + { + if ($mode_balance_ok) + { + if ($balance >= 0) + { + print ''; + } else { + print ''; + } + } else { + print ''; + } + if (!$i) $totalarray['nbfield']++; + } - if (!empty($arrayfields['b.num_releve']['checked'])) - { - print ''; - if (!$i) - { - $totalarray['nbfield']++; - $posconciliatecol = $totalarray['nbfield']; - } - } + if (!empty($arrayfields['b.num_releve']['checked'])) + { + print ''; + if (!$i) + { + $totalarray['nbfield']++; + $posconciliatecol = $totalarray['nbfield']; + } + } - if (!empty($arrayfields['b.conciliated']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } + if (!empty($arrayfields['b.conciliated']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } - // Action edit/delete - print ''; - if (!$i) $totalarray['nbfield']++; + // Action edit/delete + print ''; + if (!$i) $totalarray['nbfield']++; - // Action column - print ''; - if (!$i) $totalarray['nbfield']++; + // Action column + print ''; + if (!$i) $totalarray['nbfield']++; print ""; @@ -1573,27 +1519,25 @@ if ($resql) // Show total line if (isset($totalarray['totaldebfield']) || isset($totalarray['totalcredfield'])) { - print ''; - $i = 0; - while ($i < $totalarray['nbfield']) - { - $i++; - if ($i == 1) - { - if ($num < $limit && empty($offset)) print ''; - else print ''; - } - elseif ($totalarray['totaldebfield'] == $i) print ''; - elseif ($totalarray['totalcredfield'] == $i) print ''; - elseif ($i == $posconciliatecol) - { - print ''; - } - else print ''; - } - print ''; + print ''; + $i = 0; + while ($i < $totalarray['nbfield']) + { + $i++; + if ($i == 1) + { + if ($num < $limit && empty($offset)) print ''; + else print ''; + } elseif ($totalarray['totaldebfield'] == $i) print ''; + elseif ($totalarray['totalcredfield'] == $i) print ''; + elseif ($i == $posconciliatecol) + { + print ''; + } else print ''; + } + print ''; } // If no record found @@ -1607,11 +1551,9 @@ if ($resql) print "
    '; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print '    '; - $form->select_types_paiements(empty($search_type) ? '' : $search_type, 'search_type', '', 2, 1, 1, 0, 1, 'maxwidth100'); - print ''; + $form->select_types_paiements(empty($search_type) ? '' : $search_type, 'search_type', '', 2, 1, 1, 0, 1, 'maxwidth100'); + print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1, ($id > 0 || !empty($ref) ? ' disabled="disabled"' : ''), 0, 'maxwidth100'); - print ''; + $form->select_comptes($search_account, 'search_account', 0, '', 1, ($id > 0 || !empty($ref) ? ' disabled="disabled"' : ''), 0, 'maxwidth100'); + print ''; - print ''; - print ''; + print ''; + print ''; - print ''; - print ''; + print ''; + print ''; - print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1); - print ''; + print $form->selectyesno('search_conciliated', $search_conciliated, 1, false, 1); + print ''; print ''; $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); print $searchpicto; - print '
    '; - print ' '; - print '
    '; + print ' '; + print ''; - print price(price2num($balance, 'MT'), 1, $langs); - print ''; + if (!empty($arrayfields['balancebefore']['checked'])) + { + print ''; print price(price2num($balance, 'MT'), 1, $langs); print ''; + print price(price2num($balance, 'MT'), 1, $langs); + print ''; print ''; @@ -1119,269 +1099,249 @@ if ($resql) print ''; print ' '; print '
    '; - print "rowid.'&save_lastsearch_values=1">'.img_object($langs->trans("ShowPayment").': '.$objp->rowid, 'account', 'class="classfortooltip"').' '.$objp->rowid."   "; - print '"; + print '
    '; + print $banklinestatic->getNomUrl(1); + print '"; - // Date ope - if (!empty($arrayfields['b.dateo']['checked'])) - { - print ''; - print ''.dol_print_date($db->jdate($objp->do), "day").""; - print ' '; - print ''; - print ''; - print img_edit_remove()." "; - print ''; - print img_edit_add().""; - print ''; - print "'; - print ''.dol_print_date($db->jdate($objp->dv), "day").""; - print ' '; - print ''; - print ''; - print img_edit_remove()." "; - print ''; - print img_edit_add().""; - print ''; - print "'; - $labeltype = ($langs->trans("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->trans("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1); - if ($labeltype == 'SOLD') print ' '; //$langs->trans("InitialBankBalance"); - else print $labeltype; - print "'; + print ''.dol_print_date($db->jdate($objp->do), "day").""; + print ' '; + print ''; + print ''; + print img_edit_remove()." "; + print ''; + print img_edit_add().""; + print ''; + print "'.($objp->num_chq ? $objp->num_chq : "")."'; + print ''.dol_print_date($db->jdate($objp->dv), "day").""; + print ' '; + print ''; + print ''; + print img_edit_remove()." "; + print ''; + print img_edit_add().""; + print ''; + print "'; + $labeltype = ($langs->trans("PaymentTypeShort".$objp->fk_type) != "PaymentTypeShort".$objp->fk_type) ? $langs->trans("PaymentTypeShort".$objp->fk_type) : $langs->getLabelFromKey($db, $objp->fk_type, 'c_paiement', 'code', 'libelle', '', 1); + if ($labeltype == 'SOLD') print ' '; //$langs->trans("InitialBankBalance"); + else print $labeltype; + print "'.($objp->num_chq ? $objp->num_chq : "")."'; + if (!empty($arrayfields['bu.label']['checked'])) + { + print ''; if ($objp->url_id) { $companystatic->id = $objp->url_id; @@ -1395,175 +1355,161 @@ if ($resql) $companystatic->code_compta = $objp->code_compta; $companystatic->code_compta_fournisseur = $objp->code_compta_fournisseur; print $companystatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; + // Bank account + if (!empty($arrayfields['ba.ref']['checked'])) + { + print ''; print $bankaccount->getNomUrl(1); print "'; - if ($objp->amount < 0) - { - print price($objp->amount * -1); - $totalarray['totaldeb'] += $objp->amount; - } - print "'; + if ($objp->amount < 0) + { + print price($objp->amount * -1); + $totalarray['totaldeb'] += $objp->amount; + } + print "'; - if ($objp->amount > 0) - { + // Credit + if (!empty($arrayfields['b.credit']['checked'])) + { + print ''; + if ($objp->amount > 0) + { print price($objp->amount); - $totalarray['totalcred'] += $objp->amount; - } - print " '.price($balancebefore).' '.price($balancebefore).'- '.price($balance).' '.price($balance).'- '.price($balancebefore).' '.price($balancebefore).'- '.price($balance).' '.price($balance).'-'; - // Transaction reconciliated or edit link - if ($bankaccount->canBeConciliated() > 0) - { - if ($objp->num_releve) - { - print ''.$objp->num_releve.''; - } - if (!$objp->conciliated && $action == 'reconcile') - { - if ($objp->num_releve) print ' '; - print 'rowid]) ? ' checked' : '').'>'; - } - } - print ''; + // Transaction reconciliated or edit link + if ($bankaccount->canBeConciliated() > 0) + { + if ($objp->num_releve) + { + print ''.$objp->num_releve.''; + } + if (!$objp->conciliated && $action == 'reconcile') + { + if ($objp->num_releve) print ' '; + print 'rowid]) ? ' checked' : '').'>'; + } + } + print ''; - print $objp->conciliated ? $langs->trans("Yes") : $langs->trans("No"); - print ''; + print $objp->conciliated ? $langs->trans("Yes") : $langs->trans("No"); + print ''; - // Transaction reconciliated or edit link - if ($objp->conciliated && $bankaccount->canBeConciliated() > 0) // If line not conciliated and account can be conciliated - { - print ''; - print img_edit(); - print ''; - } - else - { - if ($user->rights->banque->modifier || $user->rights->banque->consolidate) - { - print ''; - print img_edit(); - print ''; - } - else - { - print ''; - print img_view(); - print ''; - } - if ($bankaccount->canBeConciliated() > 0 && empty($objp->conciliated)) - { - if ($db->jdate($objp->dv) < ($now - $conf->bank->rappro->warning_delay)) - { - print ' '.img_warning($langs->trans("ReconciliationLate")); - } - } - if ($user->rights->banque->modifier) - { - print 'rowid.'&id='.$objp->bankid.'&page='.$page.'">'; - print img_delete('', 'class="marginleftonly"'); - print ''; - } - } - print ''; + // Transaction reconciliated or edit link + if ($objp->conciliated && $bankaccount->canBeConciliated() > 0) // If line not conciliated and account can be conciliated + { + print ''; + print img_edit(); + print ''; + } else { + if ($user->rights->banque->modifier || $user->rights->banque->consolidate) + { + print ''; + print img_edit(); + print ''; + } else { + print ''; + print img_view(); + print ''; + } + if ($bankaccount->canBeConciliated() > 0 && empty($objp->conciliated)) + { + if ($db->jdate($objp->dv) < ($now - $conf->bank->rappro->warning_delay)) + { + print ' '.img_warning($langs->trans("ReconciliationLate")); + } + } + if ($user->rights->banque->modifier) + { + print 'rowid.'&id='.$objp->bankid.'&page='.$page.'">'; + print img_delete('', 'class="marginleftonly"'); + print ''; + } + } + print ''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; - print ''; - } - print ''; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected = 0; + if (in_array($obj->rowid, $arrayofselected)) $selected = 1; + print ''; + } + print '
    '.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price(-1 * $totalarray['totaldeb']).''.price($totalarray['totalcred']).''; - if ($user->rights->banque->consolidate && $action == 'reconcile') print ''; - print '
    '.$langs->trans("Total").''.$langs->trans("Totalforthispage").''.price(-1 * $totalarray['totaldeb']).''.price($totalarray['totalcred']).''; + if ($user->rights->banque->consolidate && $action == 'reconcile') print ''; + print '
    "; print "
    "; - print ''; + print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 042117808d5..8559096477d 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -89,9 +89,7 @@ if ($result) print ''.$langs->trans("Total").''; print ''.price($total).''; print ''.price($totalnb ?price2num($total / $totalnb, 'MT') : 0).''; -} -else -{ +} else { dol_print_error($db); } print ""; diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 593893878e0..bac2f974def 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -99,9 +99,7 @@ if ($action == 'add') if (empty($account_number) || $account_number == '-1') { $object->account_number = ''; - } - else - { + } else { $object->account_number = $account_number; } $fk_accountancy_journal = GETPOST('fk_accountancy_journal', 'int'); @@ -117,7 +115,7 @@ if ($action == 'add') $object->min_allowed = GETPOST("account_min_allowed", 'int'); $object->min_desired = GETPOST("account_min_desired", 'int'); - $object->comment = trim(GETPOST("account_comment", 'none')); + $object->comment = trim(GETPOST("account_comment", 'restricthtml')); $object->fk_user_author = $user->id; @@ -155,8 +153,7 @@ if ($action == 'add') $_GET["id"] = $id; // Force chargement page en mode visu $action = ''; - } - else { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); @@ -167,9 +164,7 @@ if ($action == 'add') if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -205,9 +200,7 @@ if ($action == 'update') if (empty($account_number) || $account_number == '-1') { $object->account_number = ''; - } - else - { + } else { $object->account_number = $account_number; } $fk_accountancy_journal = GETPOST('fk_accountancy_journal', 'int'); @@ -220,7 +213,7 @@ if ($action == 'update') $object->min_allowed = GETPOST("account_min_allowed", 'int'); $object->min_desired = GETPOST("account_min_desired", 'int'); - $object->comment = trim(GETPOST("account_comment", 'none')); + $object->comment = trim(GETPOST("account_comment", 'restricthtml')); if ($conf->global->MAIN_BANK_ACCOUNTANCY_CODE_ALWAYS_REQUIRED && empty($object->account_number)) { @@ -259,9 +252,7 @@ if ($action == 'update') $object->setCategories($categories); $_GET["id"] = $_POST["id"]; // Force chargement page en mode visu - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit'; // Force chargement page edition @@ -271,9 +262,7 @@ if ($action == 'update') if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -290,9 +279,7 @@ if ($action == 'confirm_delete' && $_POST["confirm"] == "yes" && $user->rights-> setEventMessages($langs->trans("RecordDeleted"), null, 'mesgs'); header("Location: ".DOL_URL_ROOT."/compta/bank/list.php"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } @@ -383,8 +370,7 @@ if ($action == 'create') if (isset($_POST["account_country_id"])) { $selectedcode = $_POST["account_country_id"] ? $_POST["account_country_id"] : $object->country_code; - } - elseif (empty($selectedcode)) $selectedcode = $mysoc->country_code; + } elseif (empty($selectedcode)) $selectedcode = $mysoc->country_code; $object->country_code = getCountry($selectedcode, 2); // Force country code on account to have following field on bank fields matching country rules print ''.$langs->trans("BankAccountCountry").''; @@ -398,9 +384,7 @@ if ($action == 'create') if ($selectedcode) { $formcompany->select_departement(isset($_POST["account_state_id"]) ? $_POST["account_state_id"] : '', $selectedcode, 'account_state_id'); - } - else - { + } else { print $countrynotdefined; } print ''; @@ -544,9 +528,7 @@ if ($action == 'create') print ''; print $formaccounting->select_account($object->account_number, 'account_number', 1, '', 1, 1); print ''; - } - else - { + } else { print ''.$langs->trans("AccountancyCode").''; print 'account_number).'">'; } @@ -571,16 +553,14 @@ if ($action == 'create') print '
    '; print ''; -} -/* ************************************************************************** */ -/* */ -/* Visu et edition */ -/* */ -/* ************************************************************************** */ -else -{ - if (($_GET["id"] || $_GET["ref"]) && $action != 'edit') - { +} else { + /* ************************************************************************** */ + /* */ + /* Visu et edition */ + /* */ + /* ************************************************************************** */ + + if (($_GET["id"] || $_GET["ref"]) && $action != 'edit') { $object = new Account($db); if ($_GET["id"]) { @@ -781,13 +761,13 @@ else if ($user->rights->banque->configurer) { - print 'id.'">'.$langs->trans("Modify").''; + print 'id.'">'.$langs->trans("Modify").''; } $canbedeleted = $object->can_be_deleted(); // Renvoi vrai si compte sans mouvements if ($user->rights->banque->configurer && $canbedeleted) { - print 'id.'">'.$langs->trans("Delete").''; + print 'id.'">'.$langs->trans("Delete").''; } print '
    '; @@ -886,9 +866,7 @@ else if ($selectedcode) { print $formcompany->select_state(isset($_POST["account_state_id"]) ? $_POST["account_state_id"] : $object->state_id, $selectedcode, 'account_state_id'); - } - else - { + } else { print $countrynotdefined; } print ''; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index 308dad5dbca..18b75bdea9b 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -132,13 +132,11 @@ if ($result) print ''; print ''; print ""; - } - else - { + } else { print "".$objp->label.""; print ''; - print ''.img_edit().''; - print ''.img_delete().''; + print ''.img_edit().''; + print ''.img_delete().''; print ''; } print ""; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 31d7749a430..dffd62dc5a3 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -342,9 +342,9 @@ class Account extends CommonObject $string .= $this->code_guichet.' '; } elseif ($val == 'BankAccountNumberKey') { $string .= $this->cle_rib.' '; - }elseif ($val == 'BIC') { + } elseif ($val == 'BIC') { $string .= $this->bic.' '; - }elseif ($val == 'IBAN') { + } elseif ($val == 'IBAN') { $string .= $this->iban.' '; } } @@ -390,11 +390,11 @@ class Account extends CommonObject $sql .= ", label"; $sql .= ", type"; $sql .= ") VALUES ("; - $sql .= "'".$line_id."'"; - $sql .= ", '".$url_id."'"; - $sql .= ", '".$url."'"; + $sql .= " ".((int) $line_id); + $sql .= ", '".$this->db->escape($url_id)."'"; + $sql .= ", '".$this->db->escape($url)."'"; $sql .= ", '".$this->db->escape($label)."'"; - $sql .= ", '".$type."'"; + $sql .= ", '".$this->db->escape($type)."'"; $sql .= ")"; dol_syslog(get_class($this)."::add_url_line", LOG_DEBUG); @@ -402,9 +402,7 @@ class Account extends CommonObject { $rowid = $this->db->last_insert_id(MAIN_DB_PREFIX."bank_url"); return $rowid; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -436,8 +434,7 @@ class Account extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."bank_url"; if ($fk_bank > 0) { $sql .= " WHERE fk_bank = ".$fk_bank; - } - else { $sql .= " WHERE url_id = ".$url_id." AND type = '".$type."'"; + } else { $sql .= " WHERE url_id = ".$url_id." AND type = '".$this->db->escape($type)."'"; } $sql .= " ORDER BY type, label"; @@ -463,8 +460,7 @@ class Account extends CommonObject $lines[$i]['fk_bank'] = $obj->fk_bank; $i++; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return $lines; } @@ -473,7 +469,7 @@ class Account extends CommonObject * Add an entry into table ".MAIN_DB_PREFIX."bank * * @param int $date Date operation - * @param string $oper 1,2,3,4... (deprecated) or 'TYP','VIR','PRE','LIQ','VAD','CB','CHQ'... + * @param string $oper 'VIR','PRE','LIQ','VAD','CB','CHQ'... * @param string $label Descripton * @param float $amount Amount * @param string $num_chq Numero cheque or transfer @@ -508,9 +504,7 @@ class Account extends CommonObject { $obj = $this->db->fetch_object($resql); $oper = $obj->code; - } - else - { + } else { dol_print_error($this->db, 'Failed to get payment type code'); return -1; } @@ -722,20 +716,15 @@ class Account extends CommonObject if ($result < 0) $error++; // End call triggers } - } - else - { + } else { $error++; } - } - else - { + } else { if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error = $langs->trans("ErrorBankLabelAlreadyExists"); $error++; - } - else { + } else { $this->error = $this->db->error()." sql=".$sql; $error++; } @@ -745,9 +734,7 @@ class Account extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1 * $error; } @@ -838,9 +825,7 @@ class Account extends CommonObject if ($result < 0) $error++; // End call triggers } - } - else - { + } else { $error++; $this->error = $this->db->lasterror(); dol_print_error($this->db); @@ -850,9 +835,7 @@ class Account extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1 * $error; } @@ -909,9 +892,7 @@ class Account extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_print_error($this->db); return -1; @@ -1008,14 +989,10 @@ class Account extends CommonObject $this->fetch_optionals(); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = $this->db->lasterror; $this->errors[] = $this->error; return -1; @@ -1115,9 +1092,7 @@ class Account extends CommonObject dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); } } - } - else - { + } else { $error++; $this->error = "Error ".$this->db->lasterror(); } @@ -1127,9 +1102,7 @@ class Account extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1194,8 +1167,7 @@ class Account extends CommonObject if ($resql) { $obj = $this->db->fetch_object($resql); if ($obj->nb <= 1) $can_be_deleted = true; // Juste le solde - } - else { + } else { dol_print_error($this->db); } return $can_be_deleted; @@ -1293,9 +1265,7 @@ class Account extends CommonObject } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -1332,9 +1302,7 @@ class Account extends CommonObject $this->nb["banklines"] = $obj->nb; } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -1347,7 +1315,7 @@ class Account extends CommonObject * * @return int Nb of account we can reconciliate */ - public static function countAccountToReconcile() + public function countAccountToReconcile() { global $db, $conf, $user; @@ -1363,13 +1331,12 @@ class Account extends CommonObject $sql .= " WHERE ba.rappro > 0 and ba.clos = 0"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; if (empty($conf->global->BANK_CAN_RECONCILIATE_CASHACCOUNT)) $sql .= " AND ba.courant != 2"; - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { - $obj = $db->fetch_object($resql); + $obj = $this->db->fetch_object($resql); $nb = $obj->nb; - } - else dol_print_error($db); + } else dol_print_error($this->db); return $nb; } @@ -1389,7 +1356,7 @@ class Account extends CommonObject global $conf, $langs, $user; $result = ''; - $label = ''.$langs->trans("BankAccount").''; + $label = img_picto('', $this->picto).' '.$langs->trans("BankAccount").''; $label .= '
    '.$langs->trans('Label').': '.$this->label; $label .= '
    '.$langs->trans('AccountNumber').': '.$this->number; $label .= '
    '.$langs->trans('IBAN').': '.$this->iban; @@ -1418,8 +1385,7 @@ class Account extends CommonObject if ($mode == 'transactions') { $url = DOL_URL_ROOT.'/compta/bank/bankentries_list.php?id='.$this->id; - } - elseif ($mode == 'receipts') + } elseif ($mode == 'receipts') { $url = DOL_URL_ROOT.'/compta/bank/releve.php?account='.$this->id; } @@ -1479,9 +1445,7 @@ class Account extends CommonObject if ($this->error_number == 0) { return 1; - } - else - { + } else { return 0; } } @@ -1742,7 +1706,7 @@ class AccountLine extends CommonObject /** * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png */ - public $picto = 'generic'; + public $picto = 'accountline'; /** * @var int ID @@ -1861,7 +1825,7 @@ class AccountLine extends CommonObject $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; if ($num) $sql .= " AND b.num_chq='".$this->db->escape($num)."'"; elseif ($ref) $sql .= " AND b.rowid='".$this->db->escape($ref)."'"; - else $sql .= " AND b.rowid=".$rowid; + else $sql .= " AND b.rowid = ".((int) $rowid); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); @@ -1902,9 +1866,7 @@ class AccountLine extends CommonObject } $this->db->free($result); return $ret; - } - else - { + } else { return -1; } } @@ -1991,8 +1953,7 @@ class AccountLine extends CommonObject $this->db->rollback(); return -1; } - } - else { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -2020,9 +1981,7 @@ class AccountLine extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -$nbko; } @@ -2059,9 +2018,7 @@ class AccountLine extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -$nbko; } @@ -2091,9 +2048,7 @@ class AccountLine extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error(); return -1; @@ -2157,9 +2112,7 @@ class AccountLine extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -2195,14 +2148,11 @@ class AccountLine extends CommonObject { return 1; } - } - else - { + } else { dol_print_error($this->db); return 0; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return 0; } @@ -2262,14 +2212,11 @@ class AccountLine extends CommonObject { return 1; } - } - else - { + } else { dol_print_error($this->db); return 0; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return 0; } @@ -2339,9 +2286,7 @@ class AccountLine extends CommonObject //$this->date_rappro = $obj->daterappro; // Not yet managed } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -2361,13 +2306,16 @@ class AccountLine extends CommonObject global $langs; $result = ''; - $label = $langs->trans("ShowTransaction").': '.$this->rowid; - $linkstart = ''; + + $label = img_picto('', $this->picto).' '.$langs->trans("Transaction").':
    '; + $label .= ''.$langs->trans("Ref").': '.$this->ref; + + $linkstart = '
    '; $linkend = ''; $result .= $linkstart; if ($withpicto) $result .= img_object(($notooltip ? '' : $label), ($this->picto ? $this->picto : 'account'), ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= ($this->ref ? $this->ref : $this->rowid); + if ($withpicto != 2) $result .= ($this->ref ? $this->ref : $this->id); $result .= $linkend; if ($option == 'showall' || $option == 'showconciliated' || $option == 'showconciliatedandaccounted') $result .= ' ('; @@ -2473,7 +2421,7 @@ class AccountLine extends CommonObject $type = 'bank'; - $sql = " SELECT COUNT(ab.rowid) as nb FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='".$type."' AND ab.fk_doc = ".$this->id; + $sql = " SELECT COUNT(ab.rowid) as nb FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='".$this->db->escape($type)."' AND ab.fk_doc = ".$this->id; $resql = $this->db->query($sql); if ($resql) { @@ -2482,9 +2430,7 @@ class AccountLine extends CommonObject { $alreadydispatched = $obj->nb; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php index ad75559b362..3293f746033 100644 --- a/htdocs/compta/bank/class/api_bankaccounts.class.php +++ b/htdocs/compta/bank/class/api_bankaccounts.class.php @@ -225,9 +225,7 @@ class BankAccounts extends DolibarrApi if ($accountto->currency_code == $accountfrom->currency_code) { $amount_to = $amount; - } - else - { + } else { if (!$amount_to || empty($amount_to)) { throw new RestException(422, 'You must provide amount_to value since bankaccount_from and bankaccount_to does not share the same currency.'); @@ -303,9 +301,7 @@ class BankAccounts extends DolibarrApi 'message' => 'Internal wire transfer created successfully.' ) ); - } - else - { + } else { $this->db->rollback(); throw new RestException(500, $accountfrom->error.' '.$accountto->error); } @@ -338,9 +334,7 @@ class BankAccounts extends DolibarrApi if ($account->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $account->error); } } diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index aec104028c0..157a7096eb8 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -95,6 +95,37 @@ class PaymentVarious extends CommonObject public $fk_user_modif; + /** + * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM) + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * '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_...). + * '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). + * 'css' is the CSS style to use on field. For example: 'maxwidth200' + * 'help' is a string visible as a tooltip on field + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel") + * 'autofocusoncreate' to have field having the focus on a create form. Only 1 field should have this property set to 1. + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. + */ + + // BEGIN MODULEBUILDER PROPERTIES + public $fields = array( + // TODO: fill this array + ); + // END MODULEBUILDER PROPERTIES + /** * Constructor * @@ -169,9 +200,7 @@ class PaymentVarious extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -244,9 +273,7 @@ class PaymentVarious extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -311,6 +338,24 @@ class PaymentVarious extends CommonObject $this->fk_user_modif = ''; } + /** + * Check if a miscellaneous payment can be created into database + * + * @return boolean True or false + */ + public function check() + { + $newamount = price2num($this->amount, 'MT'); + + // Validation of parameters + if (!($newamount) > 0 || empty($this->datep)) + { + return false; + } + + return true; + } + /** * Create in database * @@ -434,9 +479,7 @@ class PaymentVarious extends CommonObject if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); - } - else - { + } else { $this->error = $acc->error; $error++; } @@ -465,22 +508,17 @@ class PaymentVarious extends CommonObject $result = $this->call_trigger('PAYMENT_VARIOUS_CREATE', $user); if ($result < 0) $error++; // End call triggers - } - else $error++; + } else $error++; if (!$error) { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -503,9 +541,7 @@ class PaymentVarious extends CommonObject if ($result) { return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -539,30 +575,25 @@ class PaymentVarious extends CommonObject if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) + } elseif ($mode == 1) { return $langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 0 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); @@ -620,8 +651,7 @@ class PaymentVarious extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -680,9 +710,7 @@ class PaymentVarious extends CommonObject $this->date_modif = $this->db->jdate($obj->tms); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -700,7 +728,7 @@ class PaymentVarious extends CommonObject $type = 'bank'; - $sql = " SELECT COUNT(ab.rowid) as nb FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='".$type."' AND ab.fk_doc = ".$banklineid; + $sql = " SELECT COUNT(ab.rowid) as nb FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as ab WHERE ab.doc_type='".$this->db->escape($type)."' AND ab.fk_doc = ".$banklineid; $resql = $this->db->query($sql); if ($resql) { @@ -709,9 +737,7 @@ class PaymentVarious extends CommonObject { $alreadydispatched = $obj->nb; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index d003463e5af..2bd95409827 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -36,15 +36,9 @@ $langs->loadLangs(array('banks', 'companies', 'other')); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); -$mesg = ''; -if (isset($_SESSION['DolMessage'])) { - $mesg = $_SESSION['DolMessage']; - unset($_SESSION['DolMessage']); -} - // Security check if ($user->socid) { $action = ''; @@ -137,12 +131,10 @@ if ($id > 0 || !empty($ref)) { $permtoedit = $user->rights->banque->modifier; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; - } - else { + } else { dol_print_error($db); } -} -else { +} else { Header('Location: index.php'); exit; } diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index 347353be84f..686122f4d56 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -84,9 +84,7 @@ if ($result < 0) $langs->load("errors"); $error++; setEventMessages($langs->trans("ErrorFailedToCreateDir"), null, 'errors'); -} -else -{ +} else { // Calcul $min and $max $sql = "SELECT MIN(b.datev) as min, MAX(b.datev) as max"; $sql .= " FROM ".MAIN_DB_PREFIX."bank as b"; @@ -102,9 +100,7 @@ else $obj = $db->fetch_object($resql); $min = $db->jdate($obj->min); $max = $db->jdate($obj->max); - } - else - { + } else { dol_print_error($db); } if (empty($min)) $min = dol_now() - 3600 * 24; @@ -134,8 +130,8 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev >= '".$year."-".$month."-01 00:00:00'"; - $sql .= " AND b.datev < '".$yearnext."-".$monthnext."-01 00:00:00'"; + $sql .= " AND b.datev >= '".$db->escape($year)."-".$db->escape($month)."-01 00:00:00'"; + $sql .= " AND b.datev < '".$db->escape($yearnext)."-".$db->escape($monthnext)."-01 00:00:00'"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $sql .= " GROUP BY date_format(b.datev,'%Y%m%d')"; @@ -151,9 +147,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -165,7 +159,7 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev < '".$year."-".sprintf("%02s", $month)."-01'"; + $sql .= " AND b.datev < '".$db->escape($year)."-".sprintf("%02s", $month)."-01'"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $resql = $db->query($sql); @@ -174,9 +168,7 @@ else $row = $db->fetch_row($resql); $solde = $row[0]; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -199,9 +191,7 @@ else if ($day > time()) { $datas[$i] = ''; // Valeur speciale permettant de ne pas tracer le graph - } - else - { + } else { $datas[$i] = $solde + $subtotal; } $datamin[$i] = $object->min_desired; @@ -277,8 +267,8 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev >= '".$year."-01-01 00:00:00'"; - $sql .= " AND b.datev <= '".$year."-12-31 23:59:59'"; + $sql .= " AND b.datev >= '".$db->escape($year)."-01-01 00:00:00'"; + $sql .= " AND b.datev <= '".$db->escape($year)."-12-31 23:59:59'"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $sql .= " GROUP BY date_format(b.datev,'%Y%m%d')"; @@ -294,9 +284,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -308,7 +296,7 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev < '".$year."-01-01'"; + $sql .= " AND b.datev < '".$db->escape($year)."-01-01'"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $resql = $db->query($sql); @@ -317,9 +305,7 @@ else $row = $db->fetch_row($resql); $solde = $row[0]; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -343,9 +329,7 @@ else if ($day > $now) { $datas[$i] = ''; // Valeur speciale permettant de ne pas tracer le graph - } - else - { + } else { $datas[$i] = $solde + $subtotal; } $datamin[$i] = $object->min_desired; @@ -431,9 +415,7 @@ else $amounts[$row[0]] = $row[1]; $i++; } - } - else - { + } else { dol_print_error($db); } @@ -459,9 +441,7 @@ else if ($day > ($max + 86400)) { $datas[$i] = ''; // Valeur speciale permettant de ne pas tracer le graph - } - else - { + } else { $datas[$i] = 0 + $solde + $subtotal; } $datamin[$i] = $object->min_desired; @@ -539,8 +519,8 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev >= '".$year."-".$month."-01 00:00:00'"; - $sql .= " AND b.datev < '".$yearnext."-".$monthnext."-01 00:00:00'"; + $sql .= " AND b.datev >= '".$db->escape($year)."-".$db->escape($month)."-01 00:00:00'"; + $sql .= " AND b.datev < '".$db->escape($yearnext)."-".$db->escape($monthnext)."-01 00:00:00'"; $sql .= " AND b.amount > 0"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $sql .= " GROUP BY date_format(b.datev,'%d')"; @@ -557,9 +537,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -577,8 +555,8 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev >= '".$year."-".$month."-01 00:00:00'"; - $sql .= " AND b.datev < '".$yearnext."-".$monthnext."-01 00:00:00'"; + $sql .= " AND b.datev >= '".$db->escape($year)."-".$db->escape($month)."-01 00:00:00'"; + $sql .= " AND b.datev < '".$db->escape($yearnext)."-".$db->escape($monthnext)."-01 00:00:00'"; $sql .= " AND b.amount < 0"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $sql .= " GROUP BY date_format(b.datev,'%d')"; @@ -591,9 +569,7 @@ else $debits[$row[0]] = abs($row[1]); } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -656,8 +632,8 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev >= '".$year."-01-01 00:00:00'"; - $sql .= " AND b.datev <= '".$year."-12-31 23:59:59'"; + $sql .= " AND b.datev >= '".$db->escape($year)."-01-01 00:00:00'"; + $sql .= " AND b.datev <= '".$db->escape($year)."-12-31 23:59:59'"; $sql .= " AND b.amount > 0"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $sql .= " GROUP BY date_format(b.datev,'%m');"; @@ -674,9 +650,7 @@ else $i++; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } $sql = "SELECT date_format(b.datev,'%m')"; @@ -685,8 +659,8 @@ else $sql .= ", ".MAIN_DB_PREFIX."bank_account as ba"; $sql .= " WHERE b.fk_account = ba.rowid"; $sql .= " AND ba.entity IN (".getEntity('bank_account').")"; - $sql .= " AND b.datev >= '".$year."-01-01 00:00:00'"; - $sql .= " AND b.datev <= '".$year."-12-31 23:59:59'"; + $sql .= " AND b.datev >= '".$db->escape($year)."-01-01 00:00:00'"; + $sql .= " AND b.datev <= '".$db->escape($year)."-12-31 23:59:59'"; $sql .= " AND b.amount < 0"; if ($account && $_GET["option"] != 'all') $sql .= " AND b.fk_account IN (".$account.")"; $sql .= " GROUP BY date_format(b.datev,'%m')"; @@ -699,9 +673,7 @@ else $debits[$row[0]] = abs($row[1]); } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -770,16 +742,12 @@ if ($account) { $morehtml = ''.$langs->trans("ShowAllAccounts").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', '', $moreparam, 0, '', '', 1); - } - else - { + } else { $morehtml = ''.$langs->trans("BackToAccount").''; print $langs->trans("AllAccounts"); //print $morehtml; } - } - else - { + } else { $bankaccount = new Account($db); $listid = explode(',', $account); foreach ($listid as $key => $id) @@ -790,9 +758,7 @@ if ($account) if ($key < (count($listid) - 1)) print ', '; } } -} -else -{ +} else { print $langs->trans("AllAccounts"); } @@ -808,9 +774,7 @@ if ($mode == 'showalltime') print ''; print $langs->trans("GoBack"); print ''; -} -else -{ +} else { print ''; print $langs->trans("ShowAllTimeBalance"); print ''; diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index 6f6d7236f15..e1adb0b5e41 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'companies')); -$id = GETPOST("rowid"); +$id = GETPOST("rowid", 'int'); /* @@ -55,7 +55,7 @@ $hselected = $h; $h++; -dol_fiche_head($head, $hselected, $langs->trans("LineRecord"), -1, 'account'); +dol_fiche_head($head, $hselected, $langs->trans("LineRecord"), -1, 'accountline'); $linkback = ''.$langs->trans("BackToList").''; diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index bf8dc6f5649..4e2998792d8 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -32,6 +32,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'compta', 'bills', 'other')); @@ -43,7 +44,7 @@ if (!empty($conf->salaries->enabled)) $langs->load("salaries"); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int')); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $rowid = GETPOST("rowid", 'int'); $orig_account = GETPOST("orig_account"); @@ -76,15 +77,15 @@ if ($user->rights->banque->consolidate && $action == 'donext') { $al = new AccountLine($db); $al->dateo_next($_GET["rowid"]); -}elseif ($user->rights->banque->consolidate && $action == 'doprev') +} elseif ($user->rights->banque->consolidate && $action == 'doprev') { $al = new AccountLine($db); $al->dateo_previous($_GET["rowid"]); -}elseif ($user->rights->banque->consolidate && $action == 'dvnext') +} elseif ($user->rights->banque->consolidate && $action == 'dvnext') { $al = new AccountLine($db); $al->datev_next($_GET["rowid"]); -}elseif ($user->rights->banque->consolidate && $action == 'dvprev') +} elseif ($user->rights->banque->consolidate && $action == 'dvprev') { $al = new AccountLine($db); $al->datev_previous($_GET["rowid"]); @@ -99,9 +100,7 @@ if ($action == 'confirm_delete_categ' && $confirm == "yes" && $user->rights->ban { dol_print_error($db); } - } - else - { + } else { setEventMessages($langs->trans("MissingIds"), null, 'errors'); } } @@ -120,9 +119,7 @@ if ($user->rights->banque->modifier && $action == "update") if (GETPOST('accountid', 'int') > 0 && !$acline->rappro && !$acline->getVentilExportCompta()) // We ask to change bank account { $actarget->fetch(GETPOST('accountid', 'int')); - } - else - { + } else { $actarget->fetch($id); } @@ -142,15 +139,15 @@ if ($user->rights->banque->modifier && $action == "update") $sql = "UPDATE ".MAIN_DB_PREFIX."bank"; $sql .= " SET "; // Always opened - if (isset($_POST['value'])) $sql .= " fk_type='".$db->escape($_POST['value'])."',"; - if (isset($_POST['num_chq'])) $sql .= " num_chq='".$db->escape($_POST["num_chq"])."',"; - if (isset($_POST['banque'])) $sql .= " banque='".$db->escape($_POST["banque"])."',"; - if (isset($_POST['emetteur'])) $sql .= " emetteur='".$db->escape($_POST["emetteur"])."',"; + if (isset($_POST['value'])) $sql .= " fk_type='".$db->escape(GETPOST('value'))."',"; + if (isset($_POST['num_chq'])) $sql .= " num_chq='".$db->escape(GETPOST("num_chq"))."',"; + if (isset($_POST['banque'])) $sql .= " banque='".$db->escape(GETPOST("banque"))."',"; + if (isset($_POST['emetteur'])) $sql .= " emetteur='".$db->escape(GETPOST("emetteur"))."',"; // Blocked when conciliated if (!$acline->rappro) { - if (isset($_POST['label'])) $sql .= " label='".$db->escape($_POST["label"])."',"; - if (isset($_POST['amount'])) $sql .= " amount='".$amount."',"; + if (isset($_POST['label'])) $sql .= " label = '".$db->escape(GETPOST("label"))."',"; + if (isset($_POST['amount'])) $sql .= " amount= '".$db->escape($amount)."',"; if (isset($_POST['dateomonth'])) $sql .= " dateo = '".$db->idate($dateop)."',"; if (isset($_POST['datevmonth'])) $sql .= " datev = '".$db->idate($dateval)."',"; } @@ -191,9 +188,7 @@ if ($user->rights->banque->modifier && $action == "update") { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -218,7 +213,7 @@ if ($user->rights->banque->consolidate && ($action == 'num_releve' || $action == $db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."bank"; - $sql .= " SET num_releve=".($num_rel ? "'".$num_rel."'" : "null"); + $sql .= " SET num_releve=".($num_rel ? "'".$db->escape($num_rel)."'" : "null"); if (empty($num_rel)) $sql .= ", rappro = 0"; else $sql .= ", rappro = ".$rappro; $sql .= " WHERE rowid = ".$rowid; @@ -229,9 +224,7 @@ if ($user->rights->banque->consolidate && ($action == 'num_releve' || $action == { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -254,16 +247,7 @@ foreach ($cats as $cat) { $arrayselected[] = $cat->id; } -$tabs = array( - array( - DOL_URL_ROOT.'/compta/bank/line.php?rowid='.$rowid, - $langs->trans('BankTransaction') - ), - array( - DOL_URL_ROOT.'/compta/bank/info.php?rowid='.$rowid, - $langs->trans('Info') - ) -); +$head = bankline_prepare_head($rowid); $sql = "SELECT b.rowid,b.dateo as do,b.datev as dv, b.amount, b.label, b.rappro,"; @@ -304,7 +288,7 @@ if ($result) print ''; print ''; - dol_fiche_head($tabs, 0, $langs->trans('LineRecord'), 0, 'account', 0); + dol_fiche_head($head, 'bankline', $langs->trans('LineRecord'), 0, 'accountline', 0); $linkback = ''.$langs->trans("BackToList").''; @@ -314,7 +298,7 @@ if ($result) print '
    '; print '
    '; - print ''; + print '
    '; $i++; @@ -324,9 +308,7 @@ if ($result) if (!$objp->rappro && !$bankline->getVentilExportCompta()) { $form->select_comptes($acct->id, 'accountid', 0, '', 0); - } - else - { + } else { print $acct->getNomUrl(1, 'transactions', 'reflabel'); } print ''; @@ -350,8 +332,7 @@ if ($result) print $langs->trans("Payment"); print '';*/ print $paymenttmp->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'payment_supplier') { + } elseif ($links[$key]['type'] == 'payment_supplier') { require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; $paymenttmp = new PaiementFourn($db); $paymenttmp->fetch($links[$key]['url_id']); @@ -361,79 +342,66 @@ if ($result) print $langs->trans("Payment"); print '';*/ print $paymenttmp->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'company') { + } elseif ($links[$key]['type'] == 'company') { $societe = new Societe($db); $societe->fetch($links[$key]['url_id']); print $societe->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'sc') { + } elseif ($links[$key]['type'] == 'sc') { print ''; print img_object($langs->trans('SocialContribution'), 'bill').' '; print $langs->trans("SocialContribution").($links[$key]['label'] ? ' - '.$links[$key]['label'] : ''); print ''; - } - elseif ($links[$key]['type'] == 'payment_sc') { + } elseif ($links[$key]['type'] == 'payment_sc') { print ''; print img_object($langs->trans('Payment'), 'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; - } - elseif ($links[$key]['type'] == 'payment_vat') { + } elseif ($links[$key]['type'] == 'payment_vat') { print ''; print img_object($langs->trans('VAT'), 'payment').' '; print $langs->trans("VATPayment"); print ''; - } - elseif ($links[$key]['type'] == 'payment_salary') { + } elseif ($links[$key]['type'] == 'payment_salary') { print ''; print img_object($langs->trans('PaymentSalary'), 'payment').' '; print $langs->trans("SalaryPayment"); print ''; - } - elseif ($links[$key]['type'] == 'payment_loan') { + } elseif ($links[$key]['type'] == 'payment_loan') { print ''; print img_object($langs->trans('LoanPayment'), 'payment').' '; print $langs->trans("PaymentLoan"); print ''; - } - elseif ($links[$key]['type'] == 'loan') { + } elseif ($links[$key]['type'] == 'loan') { print ''; print img_object($langs->trans('Loan'), 'bill').' '; print $langs->trans("Loan"); print ''; - } - elseif ($links[$key]['type'] == 'member') { + } elseif ($links[$key]['type'] == 'member') { print ''; print img_object($langs->trans('Member'), 'user').' '; print $links[$key]['label']; print ''; - } - elseif ($links[$key]['type'] == 'payment_donation') { + } elseif ($links[$key]['type'] == 'payment_donation') { print ''; print img_object($langs->trans('Donation'), 'payment').' '; print $langs->trans("DonationPayment"); print ''; - } - elseif ($links[$key]['type'] == 'banktransfert') { + } elseif ($links[$key]['type'] == 'banktransfert') { print ''; print img_object($langs->trans('Transaction'), 'payment').' '; print $langs->trans("TransactionOnTheOtherAccount"); print ''; - } - elseif ($links[$key]['type'] == 'user') { + } elseif ($links[$key]['type'] == 'user') { print ''; print img_object($langs->trans('User'), 'user').' '; print $langs->trans("User"); print ''; - } - elseif ($links[$key]['type'] == 'payment_various') { + } elseif ($links[$key]['type'] == 'payment_various') { print ''; print img_object($langs->trans('VariousPayment'), 'payment').' '; print $langs->trans("VariousPayment"); print ''; - } - else { + } else { print ''; print img_object('', 'generic').' '; print $links[$key]['label']; @@ -463,9 +431,7 @@ if ($result) print '     '.$langs->trans("CheckReceipt").': '.$receipt->getNomUrl(2); } print ''; - } - else - { + } else { print ''; } print ""; @@ -479,9 +445,7 @@ if ($result) print ''; - } - else - { + } else { print ''; } print ""; @@ -495,9 +459,7 @@ if ($result) print ''; - } - else - { + } else { print ''; } print ""; @@ -517,9 +479,7 @@ if ($result) print img_edit_add().""; } print ''; - } - else - { + } else { print ''; @@ -541,9 +501,7 @@ if ($result) print img_edit_add().""; } print ''; - } - else - { + } else { print ''; @@ -560,24 +518,18 @@ if ($result) { // Label generique car entre parentheses. On l'affiche en le traduisant print $langs->trans($reg[1]); - } - else - { + } else { print $objp->label; } print '">'; print ''; - } - else - { + } else { print ''; @@ -591,9 +543,7 @@ if ($result) print ''; - } - else - { + } else { print ''; @@ -649,16 +599,12 @@ if ($result) { print $langs->trans("AccountStatement").' rappro ? ' disabled' : '').'>'; print ''; - } - else - { + } else { print $langs->trans("AccountStatement").' rappro ? ' disabled' : '').'>'; } if ($objp->num_releve) print '   ('.$langs->trans("AccountStatement").' '.$objp->num_releve.')'; print ''; - } - else - { + } else { print ''; } print ''; @@ -669,9 +615,7 @@ if ($result) print ''; - } - else - { + } else { print ''; } print ''; @@ -694,8 +638,7 @@ if ($result) } $db->free($result); -} -else dol_print_error($db); +} else dol_print_error($db); // End of page llxFooter(); diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index b1c76c529ad..9c67897e18d 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -39,7 +39,7 @@ if (!empty($conf->categorie->enabled)) require_once DOL_DOCUMENT_ROOT.'/categori // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'accountancy', 'compta')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -212,8 +212,7 @@ if ($resql) $i++; } $db->free($resql); -} -else dol_print_error($db); +} else dol_print_error($db); @@ -248,12 +247,7 @@ if ($user->rights->banque->supprimer) $arrayofmassactions['predelete'] = 'selectMassAction('', $arrayofmassactions); -$newcardbutton = ''; -if ($user->rights->banque->configurer) -{ - $newcardbutton .= dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create'); -} - +$newcardbutton = dolGetButtonTitle($langs->trans('NewFinancialAccount'), '', 'fa fa-plus-circle', 'card.php?action=create', '', $user->rights->banque->configurer); // Lines of title fields print '
    '; @@ -282,7 +276,7 @@ if ($sall) $moreforfilter = ''; -if (!empty($conf->categorie->enabled)) +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { $moreforfilter .= $form->getFilterBox(Categorie::TYPE_ACCOUNT, $search_category_list); } @@ -487,9 +481,7 @@ foreach ($accounts as $key=>$type) $accountingaccount = new AccountingAccount($db); $accountingaccount->fetch('', $objecttmp->account_number, 1); print $accountingaccount->getNomUrl(0, 1, 1, '', 1); - } - else - { + } else { print $objecttmp->account_number; } print ''; @@ -505,9 +497,7 @@ foreach ($accounts as $key=>$type) $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($objecttmp->fk_accountancy_journal); print $accountingjournal->getNomUrl(0, 1, 1, '', 1); - } - else - { + } else { print ''; } print ''; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index ee02e6a6e8e..ba5e20c11c1 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -48,7 +48,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; // Load translation files required by the page $langs->loadLangs(array("banks", "categories", "companies", "bills", "trips", "donations", "loan")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $id = GETPOST('account', 'int') ? GETPOST('account', 'int') : GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $dvid = GETPOST('dvid', 'alpha'); @@ -125,8 +125,7 @@ if ($_GET["rel"] == 'prev') $found = true; } } -} -elseif ($_GET["rel"] == 'next') +} elseif ($_GET["rel"] == 'next') { // Recherche valeur pour num = numero releve precedent $sql = "SELECT DISTINCT(b.num_releve) as num"; @@ -147,8 +146,7 @@ elseif ($_GET["rel"] == 'next') $found = true; } } -} -else { +} else { // On veut le releve num $found = true; } @@ -249,6 +247,8 @@ if (empty($numref)) $linkback = ''.$langs->trans("BackToList").''; + $morehtmlref = ''; + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); dol_fiche_end(); @@ -295,17 +295,13 @@ if (empty($numref)) if (!isset($objp->numr)) { // - } - else - { + } else { print '
    '; print '\n"; - } - else - { + } else { $totalc = $totalc + abs($objp->amount); print '\n"; } @@ -649,12 +620,10 @@ else if ($user->rights->banque->modifier || $user->rights->banque->consolidate) { - print '"; - } - else - { + } else { print ""; } print ""; diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index aa4c39e55ee..70903f9120f 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -37,7 +37,7 @@ $langs->loadLangs(array("banks", "categories", "multicurrency")); if (!$user->rights->banque->transfer) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $error = 0; @@ -87,9 +87,7 @@ if ($action == 'add') if ($accountto->currency_code == $accountfrom->currency_code) { $amountto = $amount; - } - else - { + } else { if (!$amountto) { $error++; @@ -130,15 +128,11 @@ if ($action == 'add') $mesgs = $langs->trans("TransferFromToDone", ''.$accountfrom->label."", ''.$accountto->label."", $amount, $langs->transnoentities("Currency".$conf->currency)); setEventMessages($mesgs, null, 'mesgs'); $db->commit(); - } - else - { + } else { setEventMessages($accountfrom->error.' '.$accountto->error, null, 'errors'); $db->rollback(); } - } - else - { + } else { $error++; setEventMessages($langs->trans("ErrorFromToAccountsMustDiffers"), null, 'errors'); } diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index b8d259cdc8d..cf494b77a90 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -72,9 +72,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) if ($vline) { $viewline = $vline; - } - else - { + } else { $viewline = 20; } @@ -290,8 +288,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) if ($obj->family == 'invoice') { $mc->getInfo($obj->entity); print ""; - } - else { + } else { print ""; } } @@ -304,9 +301,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) $i++; } - } - else - { + } else { dol_print_error($db); } @@ -326,9 +321,7 @@ if ($_REQUEST["account"] || $_REQUEST["ref"]) print "
    '.$objp->fk_type.' '.$objp->num_chq.'
    '; print ''; print ''.$objp->emetteur.'
    '; print ''; print ''.$objp->banque.'
    '; print dol_print_date($db->jdate($objp->do), "day"); print ''; print dol_print_date($db->jdate($objp->dv), "day"); print ''; if (preg_match('/^\((.*)\)$/i', $objp->label, $reg)) { // Label generique car entre parentheses. On l'affiche en le traduisant print $langs->trans($reg[1]); - } - else - { + } else { print $objp->label; } print ''; print 'rappro ? ' disabled' : '').' value="'.price($objp->amount).'"> '.$langs->trans("Currency".$acct->currency_code); print ''; print price($objp->amount); print ''.$objp->num_releve.' 
    '; print 'rappro ? ' checked="checked"' : '')).'">'; print ''.yn($objp->rappro).'
    '; if ($action != 'editbankreceipt' || $objp->numr != $brref) { print ''.$objp->numr.''; - } - else - { + } else { print ''; print ''; print ''; @@ -355,14 +351,10 @@ if (empty($numref)) print ''; print "\n\n"; - } - else - { + } else { dol_print_error($db); } -} -else -{ +} else { /** * Show list of record into a bank statement */ @@ -372,17 +364,15 @@ else dol_fiche_head($head, 'statement', $langs->trans("AccountStatement"), -1, 'account'); - $mesprevnext = ''; - $mesprevnext .= ''; + $morehtmlright = ''; + $morehtmlright .= ''; $title = $langs->trans("AccountStatement").' '.$numref.' - '.$langs->trans("BankAccount").' '.$object->getNomUrl(1, 'receipts'); - print load_fiche_titre($title, $mesprevnext, ''); + print load_fiche_titre($title, $morehtmlright, ''); //print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, 0, $nbtotalofrecords, 'bank_account', 0, '', '', 0, 1); print "
    "; @@ -488,58 +478,50 @@ else $paymentstatic->ref = $langs->trans("Payment"); print ' '.$paymentstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_supplier') + } elseif ($links[$key]['type'] == 'payment_supplier') { $paymentsupplierstatic->id = $links[$key]['url_id']; $paymentsupplierstatic->ref = $langs->trans("Payment"); print ' '.$paymentsupplierstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_sc') + } elseif ($links[$key]['type'] == 'payment_sc') { print ''; print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; print $langs->trans("SocialContributionPayment"); print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_vat') + } elseif ($links[$key]['type'] == 'payment_vat') { $paymentvatstatic->id = $links[$key]['url_id']; $paymentvatstatic->ref = $langs->trans("Payment"); print ' '.$paymentvatstatic->getNomUrl(1); - } - elseif ($links[$key]['type'] == 'payment_salary') + } elseif ($links[$key]['type'] == 'payment_salary') { print ''; print ' '.img_object($langs->trans('ShowPayment'), 'payment').' '; print $langs->trans("Payment"); print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_donation') + } elseif ($links[$key]['type'] == 'payment_donation') { $paymentdonationstatic->id = $links[$key]['url_id']; $paymentdonationstatic->ref = $langs->trans("Payment"); print ' '.$paymentdonationstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_loan') + } elseif ($links[$key]['type'] == 'payment_loan') { $paymentloanstatic->id = $links[$key]['url_id']; $paymentloanstatic->ref = $langs->trans("Payment"); print ' '.$paymentloanstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'payment_various') + } elseif ($links[$key]['type'] == 'payment_various') { $paymentvariousstatic->id = $links[$key]['url_id']; $paymentvariousstatic->ref = $langs->trans("Payment"); print ' '.$paymentvariousstatic->getNomUrl(1); $newline = 0; - } - elseif ($links[$key]['type'] == 'banktransfert') { + } elseif ($links[$key]['type'] == 'banktransfert') { // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. if ($objp->amount > 0) { @@ -553,9 +535,7 @@ else $bankstatic->label = $objp->bankref; print $bankstatic->getNomUrl(1, ''); print ')'; - } - else - { + } else { $bankstatic->id = $objp->bankid; $bankstatic->label = $objp->bankref; print ' ('.$langs->trans("from").' '; @@ -567,35 +547,30 @@ else print $bankstatic->getNomUrl(1, 'transactions'); print ')'; } - } - elseif ($links[$key]['type'] == 'company') { + } elseif ($links[$key]['type'] == 'company') { $societestatic->id = $links[$key]['url_id']; $societestatic->name = $links[$key]['label']; print $societestatic->getNomUrl(1, 'company', 24); $newline = 0; - } - elseif ($links[$key]['type'] == 'member') { + } elseif ($links[$key]['type'] == 'member') { print ''; print img_object($langs->trans('ShowMember'), 'user').' '; print $links[$key]['label']; print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'user') { + } elseif ($links[$key]['type'] == 'user') { print ''; print img_object($langs->trans('ShowUser'), 'user').' '; print $links[$key]['label']; print ''; $newline = 0; - } - elseif ($links[$key]['type'] == 'sc') { + } elseif ($links[$key]['type'] == 'sc') { print ''; print img_object($langs->trans('ShowBill'), 'bill').' '; print $langs->trans("SocialContribution"); print ''; $newline = 0; - } - else { + } else { print ''; print $links[$key]['label']; print ''; @@ -625,9 +600,7 @@ else print "
    ".$objc->label.""; $ii++; } - } - else - { + } else { dol_print_error($db); } } @@ -638,9 +611,7 @@ else { $totald = $totald + abs($objp->amount); print '
    '.price($objp->amount * -1)."  '.price($objp->amount)."'; + print ''; print img_edit(); print " 
    ".$mc->label."
    "; print "
    "; -} -else -{ +} else { print $langs->trans("ErrorBankAccountNotFound"); } diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index c4fdc3be56a..56843c9032f 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -41,8 +41,9 @@ $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy", "cat // Get parameters $id = GETPOST('id', 'int'); -$action = GETPOST('action', 'alpha'); -$cancel = GETPOST('cancel', 'aZ09'); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm'); +$cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); $accountid = GETPOST("accountid") > 0 ? GETPOST("accountid", "int") : 0; @@ -107,8 +108,8 @@ if (empty($reshook)) $object->datev = $datev; $object->datep = $datep; $object->amount = price2num(GETPOST("amount", 'alpha')); - $object->label = GETPOST("label", 'none'); - $object->note = GETPOST("note", 'none'); + $object->label = GETPOST("label", 'restricthtml'); + $object->note = GETPOST("note", 'restricthtml'); $object->type_payment = GETPOST("paymenttype", 'int') > 0 ? GETPOST("paymenttype", "int") : 0; $object->num_payment = GETPOST("num_payment", 'alpha'); $object->fk_user_author = $user->id; @@ -163,9 +164,7 @@ if (empty($reshook)) $urltogo = ($backtopage ? $backtopage : DOL_URL_ROOT.'/compta/bank/various_payment/list.php'); header("Location: ".$urltogo); exit; - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); $action = "create"; @@ -198,22 +197,16 @@ if (empty($reshook)) $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/bank/various_payment/list.php'); exit; - } - else - { + } else { $object->error = $accountline->error; $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages('Error try do delete a line linked to a conciliated bank transaction', null, 'errors'); } } @@ -233,6 +226,64 @@ if (empty($reshook)) } } +// Action clone object +if ($action == 'confirm_clone' && $confirm != 'yes') { $action = ''; } + +if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->banque->modifier)) +{ + $db->begin(); + + $originalId = $id; + + $object->fetch($id); + + if ($object->id > 0) + { + $object->id = $object->ref = null; + + if (GETPOST('clone_label', 'alphanohtml')) { + $object->label = GETPOST('clone_label', 'alphanohtml'); + } else { + $object->label = $langs->trans("CopyOf").' '.$object->label; + } + + $newdatepayment = dol_mktime(0, 0, 0, GETPOST('clone_date_paymentmonth', 'int'), GETPOST('clone_date_paymentday', 'int'), GETPOST('clone_date_paymentyear', 'int')); + $newdatevalue = dol_mktime(0, 0, 0, GETPOST('clone_date_valuemonth', 'int'), GETPOST('clone_date_valueday', 'int'), GETPOST('clone_date_valueyear', 'int')); + if ($newdatepayment) $object->datep = $newdatepayment; + if (!empty($newdatevalue)) { + $object->datev = $newdatevalue; + } else { + $object->datev = $newdatepayment; + } + + if ($object->check()) + { + $id = $object->create($user); + if ($id > 0) + { + $db->commit(); + $db->close(); + + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { + $id = $originalId; + $db->rollback(); + + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + $id = $originalId; + $db->rollback(); + + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + $db->rollback(); + dol_print_error($db, $object->error); + } +} + /* * View @@ -375,8 +426,7 @@ if ($action == 'create') print ''; print $formaccounting->select_account($accountancy_code, 'accountancy_code', 1, null, 1, 1); print ''; - } - else // For external software + } else // For external software { print ''.$langs->trans("AccountAccounting").''; print ''; @@ -391,14 +441,11 @@ if ($action == 'create') if (!empty($conf->global->ACCOUNTANCY_COMBO_FOR_AUX)) { print $formaccounting->select_auxaccount($subledger_account, 'subledger_account', 1, ''); - } - else - { + } else { print ''; } print ''; - } - else // For external software + } else // For external software { print ''.$langs->trans("SubledgerAccount").''; print ''; @@ -431,6 +478,19 @@ if ($id) $head = various_payment_prepare_head($object); + // Clone confirmation + if ($action === 'clone') + { + $formquestion = array( + array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label), + ); + $formquestion[] = array('type' => 'date', 'tdclass'=>'fieldrequired', 'name' => 'clone_date_payment', 'label' => $langs->trans("DatePayment"), 'value' => -1); + $formquestion[] = array('type' => 'date', 'name' => 'clone_date_value', 'label' => $langs->trans("DateValue"), 'value' => -1); + $formquestion[] = array('type' => 'other', 'tdclass'=>'fieldrequired', 'name' => 'accountid', 'label' => $langs->trans("BankAccount"), 'value' => $form->select_comptes($accountid, "accountid", 0, '', 1)); + + print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneVariousPayment', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 300); + } + dol_fiche_head($head, 'card', $langs->trans("VariousPayment"), -1, $object->picto); $morehtmlref = '
    '; @@ -554,6 +614,12 @@ if ($id) // TODO // Add button modify + // Clone + if ($user->rights->banque->modifier) + { + print '"; + } + // Delete if (empty($object->rappro)) { @@ -562,16 +628,12 @@ if ($id) if ($alreadyaccounted) { print ''; } else { - print ''; + print ''; } - } - else - { + } else { print ''; } - } - else - { + } else { print ''; } diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index d81b9bdd41a..744daa939d5 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -34,7 +34,7 @@ $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy")); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -44,8 +44,8 @@ $result = restrictedArea($user, 'banque', '', '', ''); // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -149,9 +149,7 @@ if ($object->id) $permission = $user->rights->banque->modifier; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 4e836f10af0..2fb2c56fc46 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -2,6 +2,7 @@ /* Copyright (C) 2017-2019 Alexandre Spangaro * Copyright (C) 2017 Laurent Destailleur * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -29,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; +require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; // Load translation files required by the page $langs->loadLangs(array("compta", "banks", "bills", "accountancy")); @@ -44,11 +46,14 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $search_ref = GETPOST('search_ref', 'int'); $search_user = GETPOST('search_user', 'alpha'); $search_label = GETPOST('search_label', 'alpha'); -$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); -$search_date_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); +$search_datep_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int')); +$search_datep_end = dol_mktime(23, 59, 59, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int')); +$search_datev_start = dol_mktime(0, 0, 0, GETPOST('search_date_value_startmonth', 'int'), GETPOST('search_date_value_startday', 'int'), GETPOST('search_date_value_startyear', 'int')); +$search_datev_end = dol_mktime(23, 59, 59, GETPOST('search_date_value_endmonth', 'int'), GETPOST('search_date_value_endday', 'int'), GETPOST('search_date_value_endyear', 'int')); $search_amount_deb = GETPOST('search_amount_deb', 'alpha'); $search_amount_cred = GETPOST('search_amount_cred', 'alpha'); -$search_account = GETPOST('search_account', 'int'); +$search_bank_account = GETPOST('search_account', 'int'); +$search_bank_entry = GETPOST('search_bank_entry', 'int'); $search_accountancy_account = GETPOST("search_accountancy_account"); if ($search_accountancy_account == - 1) $search_accountancy_account = ''; $search_accountancy_subledger = GETPOST("search_accountancy_subledger"); @@ -75,39 +80,103 @@ if (!GETPOST('typeid')) $part = explode(':', $val); if ($part[0] == 'v.fk_typepayment') $typeid = $part[1]; } -} -else -{ +} else { $typeid = GETPOST('typeid'); } if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers { - $search_ref = ""; - $search_label = ""; - $search_date_start = ''; - $search_date_end = ''; - $search_amount_deb = ""; - $search_amount_cred = ""; - $search_account = ''; + $search_ref = ''; + $search_label = ''; + $search_datep_start = ''; + $search_datep_end = ''; + $search_datev_start = ''; + $search_datev_end = ''; + $search_amount_deb = ''; + $search_amount_cred = ''; + $search_bank_account = ''; + $search_bank_entry = ''; $search_accountancy_account = ''; $search_accountancy_subledger = ''; - $typeid = ""; + $typeid = ''; } +$search_all = GETPOSTISSET("search_all") ? trim(GETPOST("search_all", 'alpha')) : trim(GETPOST('sall')); + +/* +* TODO: fill array "$fields" in "/compta/bank/class/paymentvarious.class.php" and use +* +* +* $object = new PaymentVarious($db); +* +* $search = array(); +* foreach ($object->fields as $key => $val) +* { +* if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); +* } + +* $fieldstosearchall = array(); +* foreach ($object->fields as $key => $val) +* { +* if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; +* } +* +*/ + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'v.rowid'=>"Ref", + 'v.label'=>"Label", + 'v.datep'=>"DatePayment", + 'v.datev'=>"DateValue", + 'v.amount'=>$langs->trans("Debit").", ".$langs->trans("Credit"), +); + +// Definition of fields for lists +$arrayfields = array( + 'ref' =>array('label'=>"Ref", 'checked'=>1, 'position'=>100), + 'label' =>array('label'=>"Label", 'checked'=>1, 'position'=>110), + 'datep' =>array('label'=>"DatePayment", 'checked'=>1, 'position'=>120), + 'datev' =>array('label'=>"DateValue", 'checked'=>1, 'position'=>130), + 'type' =>array('label'=>"PaymentMode", 'checked'=>1, 'position'=>140), + 'project' =>array('label'=>"Project", 'checked'=>1, 'position'=>200, "enabled"=>!empty($conf->projet->enabled)), + 'bank' =>array('label'=>"BankAccount", 'checked'=>1, 'position'=>300, "enabled"=>!empty($conf->banque->enabled)), + 'entry' =>array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>310, "enabled"=>!empty($conf->banque->enabled)), + 'account' =>array('label'=>"AccountAccountingShort", 'checked'=>1, 'position'=>400, "enabled"=>!empty($conf->accounting->enabled)), + 'subledger' =>array('label'=>"SubledgerAccount", 'checked'=>1, 'position'=>410, "enabled"=>!empty($conf->accounting->enabled)), + 'debit' =>array('label'=>"Debit", 'checked'=>1, 'position'=>500), + 'credit' =>array('label'=>"Credit", 'checked'=>1, 'position'=>510), +); + +$arrayfields = dol_sort_array($arrayfields, 'position'); + +/* + * Actions + */ + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) { + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; +} /* * View */ -llxHeader(); - $form = new Form($db); -$formaccounting = new FormAccounting($db); -$variousstatic = new PaymentVarious($db); -$accountstatic = new Account($db); +if ($arrayfields['account']['checked'] || $arrayfields['subledger']['checked']) $formaccounting = new FormAccounting($db); +if ($arrayfields['bank']['checked'] && !empty($conf->accounting->enabled)) $accountingjournal = new AccountingJournal($db); +if ($arrayfields['ref']['checked']) $variousstatic = new PaymentVarious($db); +if ($arrayfields['bank']['checked']) $accountstatic = new Account($db); +if ($arrayfields['project']['checked']) $proj = new Project($db); +if ($arrayfields['entry']['checked']) $bankline = new AccountLine($db); +if ($arrayfields['account']['checked']) $accountingaccount = new AccountingAccount($db); -$sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code, v.subledger_account,"; +$sql = "SELECT v.rowid, v.sens, v.amount, v.label, v.datep as datep, v.datev as datev, v.fk_typepayment as type, v.num_payment, v.fk_bank, v.accountancy_code, v.subledger_account, v.fk_projet as fk_project,"; $sql .= " ba.rowid as bid, ba.ref as bref, ba.number as bnumber, ba.account_number as bank_account_number, ba.fk_accountancy_journal as accountancy_journal, ba.label as blabel,"; $sql .= " pst.code as payment_code"; $sql .= " FROM ".MAIN_DB_PREFIX."payment_various as v"; @@ -119,11 +188,14 @@ $sql .= " WHERE v.entity IN (".getEntity('payment_various').")"; // Search criteria if ($search_ref) $sql .= " AND v.rowid=".$db->escape($search_ref); if ($search_label) $sql .= natural_search(array('v.label'), $search_label); -if ($search_date_start) $sql .= " AND v.datep >= '".$db->idate($search_date_start)."'"; -if ($search_date_end) $sql .= " AND v.datep <= '".$db->idate($search_date_end)."'"; +if ($search_datep_start) $sql .= " AND v.datep >= '".$db->idate($search_datep_start)."'"; +if ($search_datep_end) $sql .= " AND v.datep <= '".$db->idate($search_datep_end)."'"; +if ($search_datev_start) $sql .= " AND v.datev >= '".$db->idate($search_datev_start)."'"; +if ($search_datev_end) $sql .= " AND v.datev <= '".$db->idate($search_datev_end)."'"; if ($search_amount_deb) $sql .= natural_search("v.amount", $search_amount_deb, 1); if ($search_amount_cred) $sql .= natural_search("v.amount", $search_amount_cred, 1); -if ($search_account > 0) $sql .= " AND b.fk_account=".$db->escape($search_account); +if ($search_bank_account > 0) $sql .= " AND b.fk_account=".$db->escape($search_bank_account); +if ($search_bank_entry > 0) $sql .= " AND b.fk_account=".$db->escape($search_bank_account); if ($search_accountancy_account > 0) $sql .= " AND v.accountancy_code=".$db->escape($search_accountancy_account); if ($search_accountancy_subledger > 0) $sql .= " AND v.subledger_account=".$db->escape($search_accountancy_subledger); if ($typeid > 0) $sql .= " AND v.fk_typepayment=".$typeid; @@ -131,6 +203,7 @@ if ($filtre) { $filtre = str_replace(":", "=", $filtre); $sql .= " AND ".$filtre; } +if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); $sql .= $db->order($sortfield, $sortorder); @@ -146,6 +219,19 @@ $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); + + // Direct jump if only one record found + if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all) + { + $obj = $db->fetch_object($result); + $id = $obj->rowid; + header("Location: ".DOL_URL_ROOT.'/compta/bank/various_payment/card.php?id='.$id); + exit; + } + + // must be place behind the last "header(...)" call + llxHeader(); + $i = 0; $total = 0; @@ -154,22 +240,22 @@ if ($result) if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); if ($search_label) $param .= '&search_label='.urlencode($search_label); - if ($search_date_start) $param .= '&search_date_start='.urlencode($search_date_start); - if ($search_date_end) $param .= '&search_date_end='.urlencode($search_date_end); - if ($typeid > 0) $param .= '&typeid='.urlencode($typeid); - if ($search_amount_deb) $param .= '&search_amount_deb='.urlencode($search_amount_deb); - if ($search_amount_cred) $param .= '&search_amount_cred='.urlencode($search_amount_cred); - if ($search_account > 0) $param .= '&search_amount='.urlencode($search_account); + if ($search_datep_start) $param .= '&search_datep_start='.urlencode($search_datep_start); + if ($search_datep_end) $param .= '&search_datep_end='.urlencode($search_datep_end); + if ($search_datev_start) $param .= '&search_datev_start='.urlencode($search_datev_start); + if ($search_datev_end) $param .= '&search_datev_end='.urlencode($search_datev_end); + if ($typeid > 0) $param .= '&typeid='.urlencode($typeid); + if ($search_amount_deb) $param .= '&search_amount_deb='.urlencode($search_amount_deb); + if ($search_amount_cred) $param .= '&search_amount_cred='.urlencode($search_amount_cred); + if ($search_bank_account > 0) $param .= '&search_amount='.urlencode($search_bank_account); if ($search_accountancy_account > 0) $param .= '&search_accountancy_account='.urlencode($search_accountancy_account); if ($search_accountancy_subledger > 0) $param .= '&search_accountancy_subledger='.urlencode($search_accountancy_subledger); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - $newcardbutton = ''; - if ($user->rights->banque->modifier) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create'); - } + $url = DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('MenuNewVariousPayment'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->modifier); print ''; @@ -179,59 +265,106 @@ if ($result) print ''; print ''; print ''; + print ''; print_barre_liste($langs->trans("MenuVariousPayment"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $newcardbutton, '', $limit, 0, 0, 1); + if ($search_all) + { + foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '; + } + + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + print '
    '; - print ''."\n"; + print '
    '; print ''; + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print ''; + } + // Ref - print ''; + if ($arrayfields['ref']['checked']) { + print ''; + } // Label - print ''; - - // Date - print ''; - - // Type - print ''; - - // Account - if (!empty($conf->banque->enabled)) - { + if ($arrayfields['label']['checked']) { print ''; + } + + // Payment date + if ($arrayfields['datep']['checked']) { + print ''; + } + + // Value date + if ($arrayfields['datev']['checked']) { + print ''; + } + + // Payment type + if ($arrayfields['type']['checked']) { + print ''; + } + + // Project + if ($arrayfields['project']['checked']) { + print ''; + } + + // Bank account + if ($arrayfields['bank']['checked']) { + print ''; + } + + // Bank entry + if ($arrayfields['entry']['checked']) { + print ''; } // Accounting account - if (!empty($conf->accounting->enabled)) - { - // Accounting account + if ($arrayfields['account']['checked']) { print ''; + } - // Subledger account + // Subledger account + if ($arrayfields['subledger']['checked']) { print ''; + if ($arrayfields['debit']['checked']) { + print ''; + } // Credit - print ''; + if ($arrayfields['credit']['checked']) { + print ''; + } print ''; - print "\n"; - + print ''; print ''; - print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "v.rowid", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "v.label", "", $param, '', $sortfield, $sortorder, 'left '); - print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "v.datep,v.rowid", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "type", "", $param, '', $sortfield, $sortorder, 'left '); - if (!empty($conf->banque->enabled)) print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); - if (!empty($conf->accounting->enabled)) print_liste_field_titre("AccountAccountingShort", $_SERVER["PHP_SELF"], "v.accountancy_code", "", $param, '', $sortfield, $sortorder, 'left '); - if (!empty($conf->accounting->enabled)) print_liste_field_titre("SubledgerAccount", $_SERVER["PHP_SELF"], "v.subledger_account", "", $param, '', $sortfield, $sortorder, 'left '); - print_liste_field_titre("Debit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Credit", $_SERVER["PHP_SELF"], "v.amount", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); - print "\n"; + + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); + + if ($arrayfields['ref']['checked']) print_liste_field_titre($arrayfields['ref']['label'], $_SERVER["PHP_SELF"], 'v.rowid', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['label']['checked']) print_liste_field_titre($arrayfields['label']['label'], $_SERVER["PHP_SELF"], 'v.label', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['datep']['checked']) print_liste_field_titre($arrayfields['datep']['label'], $_SERVER["PHP_SELF"], 'v.datep,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); + if ($arrayfields['datev']['checked']) print_liste_field_titre($arrayfields['datev']['label'], $_SERVER["PHP_SELF"], 'v.datev,v.rowid', '', $param, '', $sortfield, $sortorder, 'center '); + if ($arrayfields['type']['checked']) print_liste_field_titre($arrayfields['type']['label'], $_SERVER["PHP_SELF"], 'type', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['project']['checked']) print_liste_field_titre($arrayfields['project']['label'], $_SERVER["PHP_SELF"], 'fk_project', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['bank']['checked']) print_liste_field_titre($arrayfields['bank']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['entry']['checked']) print_liste_field_titre($arrayfields['entry']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); + if ($arrayfields['account']['checked']) print_liste_field_titre($arrayfields['account']['label'], $_SERVER["PHP_SELF"], 'v.accountancy_code', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['subledger']['checked']) print_liste_field_titre($arrayfields['subledger']['label'], $_SERVER["PHP_SELF"], 'v.subledger_account', '', $param, '', $sortfield, $sortorder, 'left '); + if ($arrayfields['debit']['checked']) print_liste_field_titre($arrayfields['debit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); + if ($arrayfields['credit']['checked']) print_liste_field_titre($arrayfields['credit']['label'], $_SERVER["PHP_SELF"], 'v.amount', '', $param, '', $sortfield, $sortorder, 'right '); + + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); + print ''; $totalarray = array(); @@ -274,28 +426,53 @@ if ($result) print ''; - $variousstatic->id = $obj->rowid; - $variousstatic->ref = $obj->rowid; + // No + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print ''; + } // Ref - print "\n"; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['ref']['checked']) { + $variousstatic->id = $obj->rowid; + $variousstatic->ref = $obj->rowid; + print ""; + if (!$i) $totalarray['nbfield']++; + } // Label payment - print "\n"; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['label']['checked']) { + print ""; + if (!$i) $totalarray['nbfield']++; + } // Date payment - print '\n"; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['datep']['checked']) { + print '"; + if (!$i) $totalarray['nbfield']++; + } + + + // Date value + if ($arrayfields['datev']['checked']) { + print '"; + if (!$i) $totalarray['nbfield']++; + } // Type - print ''; - if (!$i) $totalarray['nbfield']++; + if ($arrayfields['type']['checked']) { + print ''; + if (!$i) $totalarray['nbfield']++; + } - // Account - if (!empty($conf->banque->enabled)) - { + // Project + if ($arrayfields['project']['checked']) { + $proj->fetch($obj->fk_project); + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Bank account + if ($arrayfields['bank']['checked']) { print ''; if (!$i) $totalarray['nbfield']++; } + // Bank entry + if ($arrayfields['entry']['checked']) { + $bankline->fetch($obj->fk_bank); + print ''; + if (!$i) $totalarray['nbfield']++; + } + // Accounting account - if (!empty($conf->accounting->enabled)) { - $accountingaccount = new AccountingAccount($db); + if ($arrayfields['account']['checked']) { $accountingaccount->fetch('', $obj->accountancy_code, 1); print ''; @@ -329,38 +511,42 @@ if ($result) } // Accounting subledger account - if (!empty($conf->accounting->enabled)) - { + if ($arrayfields['subledger']['checked']) { print ''; if (!$i) $totalarray['nbfield']++; } // Debit - print ''; } - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_deb'; - print ''; // Credit - print ''; } - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_cred'; - print ''; + print ''; if (!$i) $totalarray['nbfield']++; - print "\n"; + print ""; $i++; } @@ -373,9 +559,7 @@ if ($result) print ''; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 3780fbc1afe..b14b77d5264 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -107,8 +107,7 @@ if (GETPOST('cancel', 'alpha')) { if ($action == 'valid') { $action = 'view'; - } - else { + } else { $action = 'create'; } } @@ -144,8 +143,7 @@ if ($action == "start") $action = 'create'; $error++; } -} -elseif ($action == "add") +} elseif ($action == "add") { if (GETPOST('opening', 'alpha') == '') { @@ -177,9 +175,7 @@ elseif ($action == "add") { $db->commit(); $action = "view"; - } - else - { + } else { $db->rollback; $action = "view"; } @@ -217,9 +213,7 @@ if ($action == "valid") // validate = close { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); - } - else - { + } else { setEventMessages($langs->trans("CashFenceDone"), null); $db->commit(); } @@ -253,9 +247,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) setEventMessages("RecordDeleted", null, 'mesgs'); header("Location: ".$backurlforlist); exit; - } - else - { + } else { if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); else setEventMessages($object->error, null, 'errors'); } @@ -282,8 +274,7 @@ if ($action == "create" || $action == "start" || $action == 'close') $syear = $object->year_close; $smonth = $object->month_close; $sday = $object->day_close; - } - elseif (GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '-1') + } elseif (GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '' && GETPOST('posnumber', 'alpha') != '-1') { $posmodule = GETPOST('posmodule', 'alpha'); $terminalid = GETPOST('posnumber', 'alpha'); @@ -327,11 +318,8 @@ if ($action == "create" || $action == "start" || $action == 'close') { $obj = $db->fetch_object($resql); if ($obj) $initialbalanceforterminal[$terminalid][$key] = $obj->total; - } - else dol_print_error($db); - } - else - { + } else dol_print_error($db); + } else { setEventMessages($langs->trans("SetupOfTerminalNotComplete", $terminaltouse), null, 'errors'); $error++; } @@ -350,8 +338,7 @@ if ($action == "create" || $action == "start" || $action == 'close') if ($key == 'cash') $sql .= " AND cp.code = 'LIQ'"; elseif ($key == 'cheque') $sql .= " AND cp.code = 'CHQ'"; elseif ($key == 'card') $sql .= " AND cp.code = 'CB'"; - else - { + else { dol_print_error('Value for key = '.$key.' not supported'); exit; } @@ -371,8 +358,7 @@ if ($action == "create" || $action == "start" || $action == 'close') $theoricalamountforterminal[$terminalid][$key] = price2num($theoricalamountforterminal[$terminalid][$key] + $obj->total); $theoricalnbofinvoiceforterminal[$terminalid][$key] = $obj->nb; } - } - else dol_print_error($db); + } else dol_print_error($db); } } @@ -388,14 +374,11 @@ if ($action == "create" || $action == "start" || $action == 'close') if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') { print ''; - } - elseif ($action == 'close') + } elseif ($action == 'close') { print ''; print ''; - } - else - { + } else { print ''; } @@ -469,9 +452,7 @@ if ($action == "create" || $action == "start" || $action == 'close') if ($action == 'start' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '' && GETPOST('posnumber') != '-1') { print ''; - } - else - { + } else { print ''; } print ''; @@ -569,8 +550,7 @@ if ($action == "create" || $action == "start" || $action == 'close') { $object->fetch($id); print $object->opening; - } - else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); + } else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); print '">'; print ''; // Amount per payment type @@ -608,8 +588,7 @@ if (empty($action) || $action == "view" || $action == "close") if ($result <= 0) { print $langs->trans("ErrorRecordNotFound"); - } - else { + } else { $head = array(); $head[0][0] = DOL_URL_ROOT.'/compta/cashcontrol/cashcontrol_card.php?id='.$object->id; $head[0][1] = $langs->trans("CashControl"); @@ -706,14 +685,11 @@ if (empty($action) || $action == "view" || $action == "close") if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') { print ''; - } - elseif ($action == 'close') + } elseif ($action == 'close') { print ''; print ''; - } - else - { + } else { print ''; } @@ -860,8 +836,7 @@ if (empty($action) || $action == "view" || $action == "close") { $object->fetch($id); print $object->opening; - } - else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); + } else print (GETPOSTISSET('opening') ?price2num(GETPOST('opening', 'alpha')) : price($initialbalanceforterminal[$terminalid]['cash'])); print '">'; print ''; // Amount per payment type diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index a98c9ea83f5..2adf3a01a83 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -63,8 +63,8 @@ $id = GETPOST('id', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -98,7 +98,7 @@ if ($user->socid > 0) // Protection if external user //$result = restrictedArea($user, 'monmodule', $id, ''); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -259,9 +259,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; -} -else -{ +} else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 81a19389244..0f60be3c3a8 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -404,8 +404,7 @@ class CashControl extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index 1ea06eba9e9..02299788794 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -172,9 +172,7 @@ if ($resql) $bankaccounttmp->fetch($objp->bankid); $cachebankaccount[$objp->bankid] = $bankaccounttmp; $bankaccount = $bankaccounttmp; - } - else - { + } else { $bankaccount = $cachebankaccount[$objp->bankid]; } @@ -208,8 +206,7 @@ if ($resql) print $bankaccount->getNomUrl(1); if ($cashcontrol->posmodule == "takepos") { $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'.$cashcontrol->posnumber; - } - else { + } else { $var1 = 'CASHDESK_ID_BANKACCOUNT_CASH'; } if ($objp->code == 'CHQ') { @@ -300,8 +297,8 @@ if ($resql) /* $sql = "UPDATE ".MAIN_DB_PREFIX."pos_cash_fence "; $sql .= "SET"; - $sql .= " cash='".$cash."'"; - $sql .= ", card='".$bank."'"; + $sql .= " cash='".$db->escape($cash)."'"; + $sql .= ", card='".$db->escape($bank)."'"; $sql .= " where rowid=".$id; $db->query($sql); */ @@ -311,9 +308,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 1f69a6aa1c8..dae7ca358ac 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -106,9 +106,7 @@ if ($mode != 'sconly') { $nav = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."" : ""); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1); -} -else -{ +} else { print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 0); } @@ -220,8 +218,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $accountstatic->accountancy_journal = $obj->accountancy_journal; $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); - } - else print ' '; + } else print ' '; print ''; } // Paid @@ -243,9 +240,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) if (!empty($conf->banque->enabled)) print ''; print '"; print ""; - } - else - { + } else { dol_print_error($db); } print '
    '; + print ''; - print ''; - print ''; + print ''; + print ''; - print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1); - print '
    '; - print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1); - - print '
    '; - print '
    '; - $form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16); - print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1); + print ''; + print ''; + print '
    '; + print $form->selectDate($search_datep_start ? $search_datep_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search_datep_end ? $search_datep_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; + print '
    '; + print '
    '; + print $form->selectDate($search_datev_start ? $search_datev_start : -1, 'search_date_value_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); + print '
    '; + print '
    '; + print $form->selectDate($search_datev_end ? $search_datev_end : -1, 'search_date_value_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); + print '
    '; + print '
    '; + $form->select_types_paiements($typeid, 'typeid', '', 0, 1, 1, 16, 1, 'maxwidth100'); + print ''; + // TODO + print ''; + $form->select_comptes($search_bank_account, 'search_account', 0, '', 1, '', 0, 'maxwidth100'); + print ''; + print ''; print ''; print '
    '; print $formaccounting->select_account($search_accountancy_account, 'search_accountancy_account', 1, array(), 1, 1, 'maxwidth200'); print '
    '; print '
    '; print '
    '; print $formaccounting->select_auxaccount($search_accountancy_subledger, 'search_accountancy_subledger', 1, 'maxwidth200'); @@ -240,31 +373,50 @@ if ($result) } // Debit - print '
    '; + print ''; + print ''; + print ''; + print ''; $searchpicto = $form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
    '.(($offset * $limit) + $i).'".$variousstatic->getNomUrl(1)."".$variousstatic->getNomUrl(1)."".dol_trunc($obj->label, 40)."".dol_trunc($obj->label, 40)."'.dol_print_date($db->jdate($obj->datep), 'day')."'.dol_print_date($obj->datep, 'day')."'.dol_print_date($obj->datev, 'day')."'.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''.$proj->getNomUrl(1).''; if ($obj->bid > 0) { @@ -305,23 +482,28 @@ if ($result) if (!empty($conf->accounting->enabled)) { $accountstatic->account_number = $obj->bank_account_number; - - $accountingjournal = new AccountingJournal($db); $accountingjournal->fetch($obj->accountancy_journal); $accountstatic->accountancy_journal = $accountingjournal->getNomUrl(0, 1, 1, '', 1); } $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); + } else { + print ' '; } - else print ' '; print ''.$bankline->getNomUrl(1).''.$accountingaccount->getNomUrl(0, 1, 1, '', 1).''.length_accounta($obj->subledger_account).''; - if ($obj->sens == 0) - { - print price($obj->amount); - $totalarray['val']['total_deb'] += $obj->amount; + if ($arrayfields['debit']['checked']) { + print ''; + if ($obj->sens == 0) + { + print price($obj->amount); + $totalarray['val']['total_deb'] += $obj->amount; + } + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_deb'; + print ''; - if ($obj->sens == 1) - { - print price($obj->amount); - $totalarray['val']['total_cred'] += $obj->amount; + if ($arrayfields['credit']['checked']) { + print ''; + if ($obj->sens == 1) + { + print price($obj->amount); + $totalarray['val']['total_cred'] += $obj->amount; + } + if (!$i) $totalarray['nbfield']++; + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'total_cred'; + print '
    '.price($totalpaye)."
    '; @@ -337,8 +332,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $accountstatic->accountancy_journal = $obj->accountancy_journal; $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); - } - else print ' '; + } else print ' '; print ''; } @@ -359,9 +353,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -372,19 +364,15 @@ if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { $j = 1; $numlt = 3; -} -elseif ($mysoc->localtax1_assuj == "1") +} elseif ($mysoc->localtax1_assuj == "1") { $j = 1; $numlt = 2; -} -elseif ($mysoc->localtax2_assuj == "1") +} elseif ($mysoc->localtax2_assuj == "1") { $j = 2; $numlt = 3; -} -else -{ +} else { $j = 0; $numlt = 0; } @@ -454,9 +442,7 @@ while ($j < $numlt) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -550,8 +536,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) $accountstatic->accountancy_journal = $obj->accountancy_journal; $accountstatic->label = $obj->blabel; print $accountstatic->getNomUrl(1); - } - else print ' '; + } else print ' '; print ''; } @@ -569,9 +554,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) $db->free($result); print "
    "; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 6c1439d5466..1b4e86bbb4c 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -66,7 +66,7 @@ $thirdpartystatic = new Societe($db); if ($action == 'note') { - $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$note."' WHERE rowid=".$socid; + $sql = "UPDATE ".MAIN_DB_PREFIX."societe SET note='".$db->escape($note)."' WHERE rowid=".$socid; $result = $db->query($sql); } @@ -196,9 +196,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 463d9ea699f..fcd7c542eb2 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php' require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; if (!empty($conf->projet->enabled)) { - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; } // Load translation files required by the page @@ -43,7 +43,7 @@ $id = GETPOST('id', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'deplacement', $id, ''); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $object = new Deplacement($db); @@ -62,167 +62,138 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, if ($action == 'validate' && $user->rights->deplacement->creer) { - $object->fetch($id); - if ($object->statut == Deplacement::STATUS_DRAFT) - { - $result = $object->setStatut(1); - if ($result > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } -} - -elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) + $object->fetch($id); + if ($object->statut == Deplacement::STATUS_DRAFT) + { + $result = $object->setStatut(1); + if ($result > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} elseif ($action == 'classifyrefunded' && $user->rights->deplacement->creer) { - $object->fetch($id); - if ($object->statut == Deplacement::STATUS_VALIDATED) - { - $result = $object->setStatut(Deplacement::STATUS_REFUNDED); - if ($result > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } -} - -elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) + $object->fetch($id); + if ($object->statut == Deplacement::STATUS_VALIDATED) + { + $result = $object->setStatut(Deplacement::STATUS_REFUNDED); + if ($result > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } +} elseif ($action == 'confirm_delete' && $confirm == "yes" && $user->rights->deplacement->supprimer) { - $result = $object->delete($id); - if ($result >= 0) - { - header("Location: index.php"); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } -} - -elseif ($action == 'add' && $user->rights->deplacement->creer) + $result = $object->delete($id); + if ($result >= 0) + { + header("Location: index.php"); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } +} elseif ($action == 'add' && $user->rights->deplacement->creer) { - if (!GETPOST('cancel', 'alpha')) - { - $error = 0; + if (!GETPOST('cancel', 'alpha')) + { + $error = 0; - $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount - $object->type = GETPOST('type', 'alpha'); - $object->socid = (int) GETPOST('socid', 'int'); - $object->fk_user = (int) GETPOST('fk_user', 'int'); - $object->note_private = GETPOST('note_private', 'alpha'); - $object->note_public = GETPOST('note_public', 'alpha'); - $object->statut = Deplacement::STATUS_DRAFT; + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount + $object->type = GETPOST('type', 'alpha'); + $object->socid = (int) GETPOST('socid', 'int'); + $object->fk_user = (int) GETPOST('fk_user', 'int'); + $object->note_private = GETPOST('note_private', 'alpha'); + $object->note_public = GETPOST('note_public', 'alpha'); + $object->statut = Deplacement::STATUS_DRAFT; - if (!$object->date) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); - $error++; - } - if ($object->type == '-1') - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); - $error++; - } - if (!($object->fk_user > 0)) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Person")), null, 'errors'); - $error++; - } + if (!$object->date) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); + $error++; + } + if ($object->type == '-1') + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); + $error++; + } + if (!($object->fk_user > 0)) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Person")), null, 'errors'); + $error++; + } - if (!$error) - { - $id = $object->create($user); + if (!$error) + { + $id = $object->create($user); - if ($id > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - $action = 'create'; - } - } - else - { - $action = 'create'; - } - } - else - { - header("Location: index.php"); - exit; - } -} - -// Update record + if ($id > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'create'; + } + } else { + $action = 'create'; + } + } else { + header("Location: index.php"); + exit; + } +} // Update record elseif ($action == 'update' && $user->rights->deplacement->creer) { - if (!GETPOST('cancel', 'alpha')) - { - $result = $object->fetch($id); + if (!GETPOST('cancel', 'alpha')) + { + $result = $object->fetch($id); - $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount - $object->type = GETPOST('type', 'alpha'); - $object->socid = (int) GETPOST('socid', 'int'); - $object->fk_user = (int) GETPOST('fk_user', 'int'); - $object->note_private = GETPOST('note_private', 'alpha'); - $object->note_public = GETPOST('note_public', 'alpha'); + $object->date = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $object->km = price2num(GETPOST('km', 'alpha'), 'MU'); // Not 'int', it may be a formated amount + $object->type = GETPOST('type', 'alpha'); + $object->socid = (int) GETPOST('socid', 'int'); + $object->fk_user = (int) GETPOST('fk_user', 'int'); + $object->note_private = GETPOST('note_private', 'alpha'); + $object->note_public = GETPOST('note_public', 'alpha'); - $result = $object->update($user); + $result = $object->update($user); - if ($result > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } - else - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } -} - -// Set into a project + if ($result > 0) + { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } else { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } +} // Set into a project elseif ($action == 'classin' && $user->rights->deplacement->creer) { - $object->fetch($id); - $result = $object->setProject(GETPOST('projectid', 'int')); - if ($result < 0) dol_print_error($db, $object->error); -} - -// Set fields + $object->fetch($id); + $result = $object->setProject(GETPOST('projectid', 'int')); + if ($result < 0) dol_print_error($db, $object->error); +} // Set fields elseif ($action == 'setdated' && $user->rights->deplacement->creer) { - $dated = dol_mktime(GETPOST('datedhour', 'int'), GETPOST('datedmin', 'int'), GETPOST('datedsec', 'int'), GETPOST('datedmonth', 'int'), GETPOST('datedday', 'int'), GETPOST('datedyear', 'int')); - $object->fetch($id); - $result = $object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY'); - if ($result < 0) dol_print_error($db, $object->error); -} -elseif ($action == 'setkm' && $user->rights->deplacement->creer) + $dated = dol_mktime(GETPOST('datedhour', 'int'), GETPOST('datedmin', 'int'), GETPOST('datedsec', 'int'), GETPOST('datedmonth', 'int'), GETPOST('datedday', 'int'), GETPOST('datedyear', 'int')); + $object->fetch($id); + $result = $object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY'); + if ($result < 0) dol_print_error($db, $object->error); +} elseif ($action == 'setkm' && $user->rights->deplacement->creer) { - $object->fetch($id); - $result = $object->setValueFrom('km', GETPOST('km', 'int'), '', null, 'text', '', $user, 'DEPLACEMENT_MODIFY'); - if ($result < 0) dol_print_error($db, $object->error); + $object->fetch($id); + $result = $object->setValueFrom('km', GETPOST('km', 'int'), '', null, 'text', '', $user, 'DEPLACEMENT_MODIFY'); + if ($result < 0) dol_print_error($db, $object->error); } @@ -239,342 +210,327 @@ $form = new Form($db); */ if ($action == 'create') { - //WYSIWYG Editor - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + //WYSIWYG Editor + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - print load_fiche_titre($langs->trans("NewTrip")); + print load_fiche_titre($langs->trans("NewTrip")); - $datec = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + $datec = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - print '
    '."\n"; - print ''; - print ''; + print ''."\n"; + print ''; + print ''; - print ''; + print '
    '; - print ""; - print ''; + print ""; + print ''; - print ""; - print ''; + print ""; + print ''; - print ""; - print ''; + print ""; + print ''; - // Km - print ''; + // Km + print ''; - // Company - print ""; - print ''; + // Company + print ""; + print ''; - // Public note - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; - // Private note - if (empty($user->socid)) - { - print ''; - print ''; - print ''; + print ''; + print ''; - } + print ''; + } - // Other attributes - $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + // Other attributes + $parameters = array(); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; - print '
    '.$langs->trans("Type").''; - $form->select_type_fees(GETPOST('type', 'int'), 'type', 1); - print '
    '.$langs->trans("Type").''; + $form->select_type_fees(GETPOST('type', 'int'), 'type', 1); + print '
    '.$langs->trans("Person").''; - print $form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); - print '
    '.$langs->trans("Person").''; + print $form->select_dolusers(GETPOST('fk_user', 'int'), 'fk_user', 1, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print '
    '.$langs->trans("Date").''; - print $form->selectDate($datec ? $datec : -1, '', '', '', '', 'add', 1, 1); - print '
    '.$langs->trans("Date").''; + print $form->selectDate($datec ? $datec : -1, '', '', '', '', 'add', 1, 1); + print '
    '.$langs->trans("FeesKilometersOrAmout").'
    '.$langs->trans("FeesKilometersOrAmout").'
    '.$langs->trans("CompanyVisited").''; - print $form->select_company(GETPOST('socid', 'int'), 'socid', '', 1); - print '
    '.$langs->trans("CompanyVisited").''; + print $form->select_company(GETPOST('socid', 'int'), 'socid', '', 1); + print '
    '.$langs->trans('NotePublic').''; + // Public note + print '
    '.$langs->trans('NotePublic').''; - $doleditor = new DolEditor('note_public', GETPOST('note_public', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); - print $doleditor->Create(1); + $doleditor = new DolEditor('note_public', GETPOST('note_public', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); + print $doleditor->Create(1); - print '
    '.$langs->trans('NotePrivate').''; + // Private note + if (empty($user->socid)) + { + print '
    '.$langs->trans('NotePrivate').''; - $doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); - print $doleditor->Create(1); + $doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); + print $doleditor->Create(1); - print '
    '; + print ''; - print '
    '; + print '
    '; print ''; print '     '; - print ''; + print ''; print '
    '; - print ''; -} -elseif ($id) + print ''; +} elseif ($id) { - $result = $object->fetch($id); - if ($result > 0) - { - $head = trip_prepare_head($object); + $result = $object->fetch($id); + if ($result > 0) + { + $head = trip_prepare_head($object); - dol_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip'); + dol_fiche_head($head, 'card', $langs->trans("TripCard"), 0, 'trip'); - if ($action == 'edit' && $user->rights->deplacement->creer) - { - //WYSIWYG Editor - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + if ($action == 'edit' && $user->rights->deplacement->creer) + { + //WYSIWYG Editor + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $soc = new Societe($db); - if ($object->socid) - { - $soc->fetch($object->socid); - } + $soc = new Societe($db); + if ($object->socid) + { + $soc->fetch($object->socid); + } - print '
    '."\n"; - print ''; - print ''; - print ''; + print ''."\n"; + print ''; + print ''; + print ''; - print ''; + print '
    '; - // Ref - print ""; - print ''; + // Ref + print ""; + print ''; - // Type - print ""; - print ''; + // Type + print ""; + print ''; - // Who - print ""; - print ''; + // Who + print ""; + print ''; - // Date - print ''; + // Date + print ''; - // Km - print ''; + // Km + print ''; - // Where - print ""; - print ''; + // Where + print ""; + print ''; - // Public note - print ''; - print ''; + print '"; + print ""; - // Private note - if (empty($user->socid)) - { - print ''; - print ''; + print '"; - } + print ""; + } - // Other attributes - $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + // Other attributes + $parameters = array(); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; - print '
    '.$langs->trans("Ref").''; - print $object->ref; - print '
    '.$langs->trans("Ref").''; + print $object->ref; + print '
    '.$langs->trans("Type").''; - $form->select_type_fees(GETPOST('type', 'int') ?GETPOST('type', 'int') : $object->type, 'type', 0); - print '
    '.$langs->trans("Type").''; + $form->select_type_fees(GETPOST('type', 'int') ?GETPOST('type', 'int') : $object->type, 'type', 0); + print '
    '.$langs->trans("Person").''; - print $form->select_dolusers(GETPOST('fk_user', 'int') ?GETPOST('fk_user', 'int') : $object->fk_user, 'fk_user', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); - print '
    '.$langs->trans("Person").''; + print $form->select_dolusers(GETPOST('fk_user', 'int') ?GETPOST('fk_user', 'int') : $object->fk_user, 'fk_user', 0, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth300'); + print '
    '.$langs->trans("Date").''; - print $form->selectDate($object->date, '', 0, 0, 0, 'update', 1, 0); - print '
    '.$langs->trans("Date").''; + print $form->selectDate($object->date, '', 0, 0, 0, 'update', 1, 0); + print '
    '.$langs->trans("FeesKilometersOrAmout").''; - print ''; - print '
    '.$langs->trans("FeesKilometersOrAmout").''; + print ''; + print '
    '.$langs->trans("CompanyVisited").''; - print $form->select_company($soc->id, 'socid', '', 1); - print '
    '.$langs->trans("CompanyVisited").''; + print $form->select_company($soc->id, 'socid', '', 1); + print '
    '.$langs->trans("NotePublic").''; + // Public note + print '
    '.$langs->trans("NotePublic").''; - $doleditor = new DolEditor('note_public', $object->note_public, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); - print $doleditor->Create(1); + $doleditor = new DolEditor('note_public', $object->note_public, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); + print $doleditor->Create(1); - print "
    '.$langs->trans("NotePrivate").''; + // Private note + if (empty($user->socid)) + { + print '
    '.$langs->trans("NotePrivate").''; - $doleditor = new DolEditor('note_private', $object->note_private, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); - print $doleditor->Create(1); + $doleditor = new DolEditor('note_private', $object->note_private, '', 200, 'dolibarr_notes', 'In', false, true, true, ROWS_8, '90%'); + print $doleditor->Create(1); - print "
    '; + print ''; - print '
    '; + print '
    '; print ''; print '     '; - print ''; - print '
    '; + print ''; + print '
    '; - print '
    '; + print ''; - print '
    '; - } - else - { - /* + print '
    '; + } else { + /* * Confirm delete trip */ - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteTrip"), $langs->trans("ConfirmDeleteTrip"), "confirm_delete"); - } + if ($action == 'delete') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteTrip"), $langs->trans("ConfirmDeleteTrip"), "confirm_delete"); + } - $soc = new Societe($db); - if ($object->socid) $soc->fetch($object->socid); + $soc = new Societe($db); + if ($object->socid) $soc->fetch($object->socid); - print ''; + print '
    '; - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; - // Ref - print ''; + // Ref + print ''; - $form->load_cache_types_fees(); + $form->load_cache_types_fees(); - // Type - print ''; + // Type + print ''; - // Who - print ''; + // Who + print ''; - // Date - print ''; + // Date + print ''; - // Km/Price - print '"; + // Km/Price + print '"; - // Where - print ''; - print ''; + // Where + print ''; + print ''; - // Project - if (!empty($conf->projet->enabled)) - { - $langs->load('projects'); - print ''; - print ''; + print ''; - print ''; - } + print '
    '.$langs->trans("Ref").''; - print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); - print '
    '.$langs->trans("Ref").''; + print $form->showrefnav($object, 'id', $linkback, 1, 'rowid', 'ref', ''); + print '
    '; - print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $user->rights->deplacement->creer, 'select:types_fees'); - print ''; - print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $user->rights->deplacement->creer, 'select:types_fees'); - print '
    '; + print $form->editfieldkey("Type", 'type', $langs->trans($object->type), $object, $user->rights->deplacement->creer, 'select:types_fees'); + print ''; + print $form->editfieldval("Type", 'type', $form->cache_types_fees[$object->type], $object, $user->rights->deplacement->creer, 'select:types_fees'); + print '
    '.$langs->trans("Person").''; - $userfee = new User($db); - $userfee->fetch($object->fk_user); - print $userfee->getNomUrl(1); - print '
    '.$langs->trans("Person").''; + $userfee = new User($db); + $userfee->fetch($object->fk_user); + print $userfee->getNomUrl(1); + print '
    '; - print $form->editfieldkey("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker'); - print ''; - print $form->editfieldval("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker'); - print '
    '; + print $form->editfieldkey("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker'); + print ''; + print $form->editfieldval("Date", 'dated', $object->date, $object, $user->rights->deplacement->creer, 'datepicker'); + print '
    '; - print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6'); - print ''; - print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6'); - print "
    '; + print $form->editfieldkey("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6'); + print ''; + print $form->editfieldval("FeesKilometersOrAmout", 'km', $object->km, $object, $user->rights->deplacement->creer, 'numeric:6'); + print "
    '.$langs->trans("CompanyVisited").''; - if ($soc->id) print $soc->getNomUrl(1); - print '
    '.$langs->trans("CompanyVisited").''; + if ($soc->id) print $soc->getNomUrl(1); + print '
    '; + // Project + if (!empty($conf->projet->enabled)) + { + $langs->load('projects'); + print '
    '; - print ''; - if ($action != 'classify' && $user->rights->deplacement->creer) - { - print ''; - } - print '
    '; - print $langs->trans('Project'); - print 'id.'">'; - print img_edit($langs->trans('SetProject'), 1); - print '
    '; - print '
    '; - if ($action == 'classify') - { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); - } - else - { - $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0); - } - print '
    '; + if ($action != 'classify' && $user->rights->deplacement->creer) + { + print ''; + } + print '
    '; + print $langs->trans('Project'); + print 'id.'">'; + print img_edit($langs->trans('SetProject'), 1); + print '
    '; + print ''; + if ($action == 'classify') + { + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1); + } else { + $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0); + } + print ''; + print ''; + } - // Statut - print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; + // Statut + print ''.$langs->trans("Status").''.$object->getLibStatut(4).''; - // Other attributes - $parameters = array('socid'=>$object->id); - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + $parameters = array('socid'=>$object->id); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - print "
    "; + print "
    "; - // Notes - $blocname = 'notes'; - $title = $langs->trans('Notes'); - include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; + // Notes + $blocname = 'notes'; + $title = $langs->trans('Notes'); + include DOL_DOCUMENT_ROOT.'/core/tpl/bloc_showhide.tpl.php'; - print '
    '; + print '
    '; - /* + /* * Barre d'actions */ - print '
    '; + print '
    '; - if ($object->statut < Deplacement::STATUS_REFUNDED) // if not refunded - { - if ($user->rights->deplacement->creer) - { - print ''.$langs->trans('Modify').''; - } - else - { - print ''.$langs->trans('Modify').''; - } - } + if ($object->statut < Deplacement::STATUS_REFUNDED) // if not refunded + { + if ($user->rights->deplacement->creer) + { + print ''.$langs->trans('Modify').''; + } else { + print ''.$langs->trans('Modify').''; + } + } - if ($object->statut == Deplacement::STATUS_DRAFT) // if draft - { - if ($user->rights->deplacement->creer) - { - print ''.$langs->trans('Validate').''; - } - else - { - print ''.$langs->trans('Validate').''; - } - } + if ($object->statut == Deplacement::STATUS_DRAFT) // if draft + { + if ($user->rights->deplacement->creer) + { + print ''.$langs->trans('Validate').''; + } else { + print ''.$langs->trans('Validate').''; + } + } - if ($object->statut == Deplacement::STATUS_VALIDATED) // if validated - { - if ($user->rights->deplacement->creer) - { - print ''.$langs->trans('ClassifyRefunded').''; - } - else - { - print ''.$langs->trans('ClassifyRefunded').''; - } - } + if ($object->statut == Deplacement::STATUS_VALIDATED) // if validated + { + if ($user->rights->deplacement->creer) + { + print ''.$langs->trans('ClassifyRefunded').''; + } else { + print ''.$langs->trans('ClassifyRefunded').''; + } + } - if ($user->rights->deplacement->supprimer) - { - print ''.$langs->trans('Delete').''; - } - else - { - print ''.$langs->trans('Delete').''; - } + if ($user->rights->deplacement->supprimer) + { + print ''.$langs->trans('Delete').''; + } else { + print ''.$langs->trans('Delete').''; + } - print '
    '; - } - } - else - { - dol_print_error($db); - } + print '
    '; + } + } else { + dol_print_error($db); + } } // End of page diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index ec4610179e2..69baf710b95 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -199,16 +199,12 @@ class Deplacement extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return $result; } - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; @@ -267,9 +263,7 @@ class Deplacement extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -312,9 +306,7 @@ class Deplacement extends CommonObject $this->extraparams = (array) json_decode($obj->extraparams, true); return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -338,9 +330,7 @@ class Deplacement extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -375,30 +365,25 @@ class Deplacement extends CommonObject if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) + } elseif ($mode == 1) { return $langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); elseif ($status == 2) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); elseif ($status == 2 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 0 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut0'); elseif ($status == 1 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); @@ -460,9 +445,7 @@ class Deplacement extends CommonObject $ret[$obj->code] = (($langs->trans($obj->code) != $obj->code) ? $langs->trans($obj->code) : $obj->label); $i++; } - } - else - { + } else { dol_print_error($this->db); } @@ -507,9 +490,7 @@ class Deplacement extends CommonObject $this->date_modification = $this->db->jdate($obj->tms); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index 6fdd54095a2..953ee78a3d6 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -122,7 +122,7 @@ class DeplacementStats extends Stats { $sql = "SELECT date_format(dated,'%m') as dm, sum(".$this->field.")"; $sql .= " FROM ".$this->from; - $sql .= " WHERE date_format(dated,'%Y') = '".$year."'"; + $sql .= " WHERE date_format(dated,'%Y') = '".$this->db->escape($year)."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); @@ -142,7 +142,7 @@ class DeplacementStats extends Stats { $sql = "SELECT date_format(dated,'%m') as dm, avg(".$this->field.")"; $sql .= " FROM ".$this->from; - $sql .= " WHERE date_format(dated,'%Y') = '".$year."'"; + $sql .= " WHERE date_format(dated,'%Y') = '".$this->db->escape($year)."'"; $sql .= " AND ".$this->where; $sql .= " GROUP BY dm"; $sql .= $this->db->order('dm', 'DESC'); diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 2cef0b3e6cd..47b1709ff60 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -39,7 +39,7 @@ $langs->loadLangs(array('other', 'trips', 'companies', 'interventions')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -49,8 +49,8 @@ $result = restrictedArea($user, 'deplacement', $id, ''); // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -123,9 +123,7 @@ if ($object->id) $permission = $user->rights->deplacement->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index 9d45bafd20f..0cea847f9ce 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -192,14 +192,11 @@ if ($result) $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } print '
    '; -} -else dol_print_error($db); +} else dol_print_error($db); print '
    '; diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index a4cc8f24019..78c1f32556d 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -196,9 +196,7 @@ if ($resql) print ""; print "\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index cf745b784fc..7707cb40786 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -167,9 +167,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/ordersaverage-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png'; @@ -294,8 +292,7 @@ print '
    '; // Show graphs print ''; print ''; - $note_public = GETPOST('note_public', 'none') ?GETPOST('note_public', 'none') : $object->note_public; - $note_private = GETPOST('note_private', 'none') ?GETPOST('note_private', 'none') : $object->note_private; + $note_public = GETPOSTISSET('note_public') ? GETPOST('note_public', 'restricthtml') : $object->note_public; + $note_private = GETPOSTISSET('note_private') ? GETPOST('note_private', 'restricthtml') : $object->note_private; // Help of substitution key $substitutionarray = getCommonSubstitutionArray($langs, 2, null, $object); @@ -1144,9 +1096,7 @@ if ($action == 'create') $select = array('0'=>$langs->trans('DoNotGenerateDoc'), '1'=>$langs->trans('AutoGenerateDoc')); print $form->selectarray('generate_pdf', $select, GETPOST('generate_pdf')); print ""; - } - else - { + } else { print ''; } @@ -1198,14 +1148,10 @@ if ($action == 'create') print ''; print ''; print "\n"; - } - else - { + } else { dol_print_error('', "Error, no invoice ".$object->id); } -} -else -{ +} else { /* * View mode */ @@ -1328,9 +1274,7 @@ else if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->cond_reglement_id, 'none'); } } else { @@ -1350,9 +1294,7 @@ else if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -1423,6 +1365,8 @@ else // Only on template invoices $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen").' ('.$langs->trans("Example").': '.dol_print_date(($object->date_when ? $object->date_when : dol_now()), 'dayhour').')'; $substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen").' ('.$langs->trans("Example").': '.dol_print_date(dol_time_plus_duree(($object->date_when ? $object->date_when : dol_now()), $object->frequency, $object->unit_frequency), 'dayhour').')'; + $substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $object->nb_gen_done; + $substitutionarray['__INVOICE_COUNTER_MAX__'] = $object->nb_gen_max; $htmltext = ''.$langs->trans("FollowingConstantsWillBeSubstituted").':
    '; foreach ($substitutionarray as $key => $val) @@ -1459,9 +1403,7 @@ else if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } - else - { + } else { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } print ""; @@ -1485,11 +1427,9 @@ else $list[] = str_replace(':', '|', $k).':'.$model; } $select = 'select;'.implode(',', $list); - print $form->editfieldval($langs->trans("Model"), 'modelpdf', $object->modelpdf, $object, $user->rights->facture->creer, $select); - } - else - { - print $object->modelpdf; + print $form->editfieldval($langs->trans("Model"), 'modelpdf', $object->model_pdf, $object, $user->rights->facture->creer, $select); + } else { + print $object->model_pdf; } print ""; print ''; @@ -1536,15 +1476,11 @@ else print ''; print '
    '; print '
    '; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
    \n"; print $px2->show(); diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index 55d4141fc07..df5cb39f9e4 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -40,7 +40,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'facture'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php index feeca2046d6..a8d073958ad 100644 --- a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'facture_rec'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index 87467f0dba6..ebe2a437a92 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'facturedet'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index 32a7a8cb75a..a09b0380f59 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'facturedet_rec'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php index cad443940f4..3ab212a62bd 100644 --- a/htdocs/compta/facture/card-rec.php +++ b/htdocs/compta/facture/card-rec.php @@ -188,11 +188,11 @@ if (empty($reshook)) if (!$error) { - $object->titre = GETPOST('titre', 'nohtml'); // deprecated - $object->title = GETPOST('titre', 'nohtml'); - $object->note_private = GETPOST('note_private', 'none'); - $object->note_public = GETPOST('note_public', 'none'); - $object->modelpdf = GETPOST('modelpdf', 'alpha'); + $object->titre = GETPOST('title', 'nohtml'); // deprecated + $object->title = GETPOST('title', 'nohtml'); + $object->note_private = GETPOST('note_private', 'restricthtml'); + $object->note_public = GETPOST('note_public', 'restricthtml'); + $object->model_pdf = GETPOST('modelpdf', 'alpha'); $object->usenewprice = GETPOST('usenewprice', 'alpha'); $object->frequency = $frequency; @@ -238,9 +238,7 @@ if (empty($reshook)) setEventMessages($oldinvoice->error, $oldinvoice->errors, 'errors'); $action = "create"; } - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); $action = "create"; @@ -252,9 +250,7 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF'].'?facid='.$object->id); exit; - } - else - { + } else { $db->rollback(); $error++; @@ -279,18 +275,15 @@ if (empty($reshook)) if ($action == 'setconditions' && $user->rights->facture->creer) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); - } - // Set mode + } // Set mode elseif ($action == 'setmode' && $user->rights->facture->creer) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); - } - // Set project + } // Set project elseif ($action == 'classin' && $user->rights->facture->creer) { $object->setProject(GETPOST('projectid', 'int')); - } - // Set bank account + } // Set bank account elseif ($action == 'setref' && $user->rights->facture->creer) { //var_dump(GETPOST('ref', 'alpha'));exit; @@ -300,47 +293,37 @@ if (empty($reshook)) $object->titre = GETPOST('ref', 'alpha'); // deprecated $object->title = GETPOST('ref', 'alpha'); $object->ref = $object->title; - } - else dol_print_error($db, $object->error, $object->errors); - } - // Set bank account + } else dol_print_error($db, $object->error, $object->errors); + } // Set bank account elseif ($action == 'setbankaccount' && $user->rights->facture->creer) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); - } - // Set frequency and unit frequency + } // Set frequency and unit frequency elseif ($action == 'setfrequency' && $user->rights->facture->creer) { $object->setFrequencyAndUnit(GETPOST('frequency', 'int'), GETPOST('unit_frequency', 'alpha')); - } - // Set next date of execution + } // Set next date of execution elseif ($action == 'setdate_when' && $user->rights->facture->creer) { $date = dol_mktime(GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')); if (!empty($date)) $object->setNextDate($date); - } - // Set max period + } // Set max period elseif ($action == 'setnb_gen_max' && $user->rights->facture->creer) { $object->setMaxPeriod(GETPOST('nb_gen_max', 'int')); - } - // Set auto validate + } // Set auto validate elseif ($action == 'setauto_validate' && $user->rights->facture->creer) { $object->setAutoValidate(GETPOST('auto_validate', 'int')); - } - // Set generate pdf + } // Set generate pdf elseif ($action == 'setgenerate_pdf' && $user->rights->facture->creer) { $object->setGeneratepdf(GETPOST('generate_pdf', 'int')); - } - // Set model pdf + } // Set model pdf elseif ($action == 'setmodelpdf' && $user->rights->facture->creer) { $object->setModelpdf(GETPOST('modelpdf', 'alpha')); - } - - // Set status disabled + } // Set status disabled elseif ($action == 'disable' && $user->rights->facture->creer) { $db->begin(); @@ -356,15 +339,11 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Set status enabled + } // Set status enabled elseif ($action == 'enable' && $user->rights->facture->creer) { $db->begin(); @@ -380,19 +359,14 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - // Multicurrency Code + } // Multicurrency Code elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate + } // Multicurrency rate elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); } @@ -418,25 +392,20 @@ if (empty($reshook)) { $db->commit(); $object->fetch($object->id); // Reload lines - } - else - { + } else { $db->rollback(); setEventMessages($db->lasterror(), null, 'errors'); } - } - else - { + } else { $db->rollback(); setEventMessages($line->error, $line->errors, 'errors'); } - } - elseif ($action == 'update_extras') + } elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) @@ -466,9 +435,7 @@ if (empty($reshook)) { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -570,17 +537,14 @@ if (empty($reshook)) { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); - } - // On reevalue prix selon taux tva car taux tva transaction peut etre different + } // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). elseif ($tmpvat != $tmpprodvat) { if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); - } - else - { + } else { $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); } } @@ -603,9 +567,7 @@ if (empty($reshook)) } $desc = (!empty($prod->multilangs [$outputlangs->defaultlang] ["description"])) ? $prod->multilangs [$outputlangs->defaultlang] ["description"] : $prod->description; - } - else - { + } else { $desc = $prod->description; } @@ -640,9 +602,7 @@ if (empty($reshook)) $type = $prod->type; $fk_unit = $prod->fk_unit; - } - else - { + } else { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); @@ -672,9 +632,7 @@ if (empty($reshook)) if ($usercanproductignorepricemin && (!empty($price_min) && (price2num($pu_ht) * (1 - price2num($remise_percent) / 100) < price2num($price_min)))) { $mesg = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)); setEventMessages($mesg, null, 'errors'); - } - else - { + } else { // Insert line $result = $object->addline($desc, $pu_ht, $qty, $tva_tx, $localtax1_tx, $localtax2_tx, $idprod, $remise_percent, $price_base_type, $info_bits, '', $pu_ttc, $type, - 1, $special_code, $label, $fk_unit, 0, $date_start_fill, $date_end_fill, $fournprice, $buyingprice); @@ -692,7 +650,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model=$object->modelpdf; + $model=$object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -738,18 +696,14 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } $action = ''; } } - } - - elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) + } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { if (!$object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); @@ -759,7 +713,7 @@ if (empty($reshook)) $date_end = ''; //$date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); //$date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'none') ? GETPOST('product_desc', 'none') : GETPOST('desc', 'none')); + $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'restricthtml') ? GETPOST('product_desc', 'restricthtml') : GETPOST('desc', 'restricthtml')); $pu_ht = GETPOST('price_ht'); $vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); $qty = GETPOST('qty'); @@ -907,7 +861,7 @@ if (empty($reshook)) } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); }*/ $object->fetch($object->id); // Reload lines @@ -947,9 +901,7 @@ if (empty($reshook)) unset($_POST['situations']); unset($_POST['progress']); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1012,8 +964,8 @@ if ($action == 'create') print '
    '.$langs->trans("Customer").''.$object->thirdparty->getNomUrl(1, 'customer').'
    '; - } - else - { + } else { if ($object->frequency > 0) { print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency); - } - else - { + } else { print $langs->trans("NotARecurringInvoiceTemplate"); } } @@ -1555,9 +1491,7 @@ else if ($action == 'date_when' || $object->frequency > 0) { print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); - } - else - { + } else { print $langs->trans("NextDateToExecution"); } print ''; @@ -1569,9 +1503,7 @@ else if (!$object->isMaxNbGenReached()) { if (!$object->suspended && $action != 'editdate_when' && $object->frequency > 0 && $object->date_when && $object->date_when < $now) print img_warning($langs->trans("Late")); - } - else - { + } else { print img_info($langs->trans("MaxNumberOfGenerationReached")); } print ''; @@ -1582,18 +1514,14 @@ else if ($action == 'nb_gen_max' || $object->frequency > 0) { print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); - } - else - { + } else { print $langs->trans("MaxPeriodNumber"); } print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max ? $object->nb_gen_max : '', $object, $user->rights->facture->creer); - } - else - { + } else { print ''; } print ''; @@ -1603,8 +1531,7 @@ else print ''; if ($action == 'auto_validate' || $object->frequency > 0) print $form->editfieldkey($langs->trans("StatusOfGeneratedInvoices"), 'auto_validate', $object->auto_validate, $object, $user->rights->facture->creer); - else - print $langs->trans("StatusOfGeneratedInvoices"); + else print $langs->trans("StatusOfGeneratedInvoices"); print ''; $select = 'select;0:'.$langs->trans('BillStatusDraft').',1:'.$langs->trans('BillStatusValidated'); if ($action == 'auto_validate' || $object->frequency > 0) @@ -1619,8 +1546,7 @@ else print ''; if ($action == 'generate_pdf' || $object->frequency > 0) print $form->editfieldkey($langs->trans("StatusOfGeneratedDocuments"), 'generate_pdf', $object->generate_pdf, $object, $user->rights->facture->creer); - else - print $langs->trans("StatusOfGeneratedDocuments"); + else print $langs->trans("StatusOfGeneratedDocuments"); print ''; print ''; $select = 'select;0:'.$langs->trans('DoNotGenerateDoc').',1:'.$langs->trans('AutogenerateDoc'); @@ -1630,9 +1556,7 @@ else } print ''; print ''; - } - else - { + } else { print ''; } @@ -1695,13 +1619,12 @@ else // Show object lines if (!empty($object->lines)) { - //$disableedit=1; - //$disablemove=1; + $canchangeproduct = 1; $ret = $object->printObjectLines($action, $mysoc, $object->thirdparty, $lineid, 0); // No date selector for template invoice } // Form to add new line - if ($object->statut == 0 && $user->rights->facture->creer && $action != 'valid' && $action != 'editline') + if ($object->statut == $object::STATUS_DRAFT && $user->rights->facture->creer && $action != 'valid' && $action != 'editline') { if ($action != 'editline') { @@ -1733,21 +1656,15 @@ else if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) { print ''; - } - else - { + } else { if (empty($object->frequency) || $object->date_when <= $today) { print ''; - } - else - { + } else { print ''; } } - } - else - { + } else { print ''; } } @@ -1757,9 +1674,7 @@ else if (empty($object->suspended)) { print ''; - } - else - { + } else { print ''; } } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 2038fea438c..8a2b5b150e4 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -75,7 +75,7 @@ $projectid = (GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : 0); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $lineid = GETPOST('lineid', 'int'); @@ -188,9 +188,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } - - // Change status of invoice + } // Change status of invoice elseif ($action == 'reopen' && $usercancreate) { $result = $object->fetch($id); @@ -203,9 +201,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Delete invoice + } // Delete invoice elseif ($action == 'confirm_delete' && $confirm == 'yes') { $result = $object->fetch($id); $object->fetch_thirdparty(); @@ -233,9 +229,7 @@ if (empty($reshook)) $action = ''; } } - } - - // Delete line + } // Delete line elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); @@ -257,7 +251,7 @@ if (empty($reshook)) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } if ($result >= 0) { header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); @@ -267,17 +261,13 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } - } - - // Delete link of credit note to invoice + } // Delete link of credit note to invoice elseif ($action == 'unlinkdiscount' && $usercancreate) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); $discount->unlink_invoice(); - } - - // Validation + } // Validation elseif ($action == 'valid' && $usercancreate) { $object->fetch($id); @@ -343,32 +333,24 @@ if (empty($reshook)) } } } - } - - elseif ($action == 'set_thirdparty' && $usercancreate) + } elseif ($action == 'set_thirdparty' && $usercancreate) { $object->fetch($id); $object->setValueFrom('fk_soc', $socid, '', null, 'int', '', $user, 'BILL_MODIFY'); header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit(); - } - - elseif ($action == 'classin' && $usercancreate) + } elseif ($action == 'classin' && $usercancreate) { $object->fetch($id); $object->setProject($_POST['projectid']); - } - - elseif ($action == 'setmode' && $usercancreate) + } elseif ($action == 'setmode' && $usercancreate) { $object->fetch($id); $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); if ($result < 0) dol_print_error($db, $object->error); - } - - elseif ($action == 'setretainedwarrantyconditions' && $user->rights->facture->creer) + } elseif ($action == 'setretainedwarrantyconditions' && $user->rights->facture->creer) { $object->fetch($id); $object->retained_warranty_fk_cond_reglement = 0; // To clean property @@ -381,36 +363,25 @@ if (empty($reshook)) if ($object->retained_warranty_date_limit < $object->date) $object->retained_warranty_date_limit = $object->date; $result = $object->update($user); if ($result < 0) dol_print_error($db, $object->error); - } - - elseif ($action == 'setretainedwarranty' && $user->rights->facture->creer) + } elseif ($action == 'setretainedwarranty' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->setRetainedWarranty(GETPOST('retained_warranty', 'float')); if ($result < 0) dol_print_error($db, $object->error); - } - - elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) + } elseif ($action == 'setretainedwarrantydatelimit' && $user->rights->facture->creer) { $object->fetch($id); $result = $object->setRetainedWarrantyDateLimit(GETPOST('retained_warranty_date_limit', 'float')); if ($result < 0) dol_print_error($db, $object->error); - } - - - // Multicurrency Code + } // Multicurrency Code elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); - } - - // Multicurrency rate + } // Multicurrency rate elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx')), GETPOST('calculation_mode', 'int')); - } - - elseif ($action == 'setinvoicedate' && $usercancreate) + } elseif ($action == 'setinvoicedate' && $usercancreate) { $object->fetch($id); $old_date_lim_reglement = $object->date_lim_reglement; @@ -429,9 +400,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setdate_pointoftax' && $usercancreate) + } elseif ($action == 'setdate_pointoftax' && $usercancreate) { $object->fetch($id); $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); @@ -440,9 +409,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setconditions' && $usercancreate) + } elseif ($action == 'setconditions' && $usercancreate) { $object->fetch($id); $object->cond_reglement_code = 0; // To clean property @@ -458,9 +425,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setpaymentterm' && $usercancreate) + } elseif ($action == 'setpaymentterm' && $usercancreate) { $object->fetch($id); $object->date_lim_reglement = dol_mktime(12, 0, 0, $_POST['paymenttermmonth'], $_POST['paymenttermday'], $_POST['paymenttermyear']); @@ -472,9 +437,7 @@ if (empty($reshook)) if ($result < 0) { dol_print_error($db, $object->error); } - } - - elseif ($action == 'setrevenuestamp' && $usercancreate) + } elseif ($action == 'setrevenuestamp' && $usercancreate) { $object->fetch($id); $object->revenuestamp = GETPOST('revenuestamp'); @@ -495,34 +458,26 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Set incoterm + } // Set incoterm elseif ($action == 'set_incoterms' && !empty($conf->incoterm->enabled)) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); - } - - // bank account + } // bank account elseif ($action == 'setbankaccount' && $usercancreate) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); - } - - elseif ($action == 'setremisepercent' && $usercancreate) + } elseif ($action == 'setremisepercent' && $usercancreate) { $object->fetch($id); $result = $object->set_remise($user, $_POST['remise_percent']); - } - - elseif ($action == "setabsolutediscount" && $usercancreate) + } elseif ($action == "setabsolutediscount" && $usercancreate) { // POST[remise_id] or POST[remise_id_for_payment] @@ -575,24 +530,18 @@ if (empty($reshook)) } $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'setref' && $usercancreate) + } elseif ($action == 'setref' && $usercancreate) { $object->fetch($id); $object->setValueFrom('ref', GETPOST('ref'), '', null, '', '', $user, 'BILL_MODIFY'); - } - - elseif ($action == 'setref_client' && $usercancreate) + } elseif ($action == 'setref_client' && $usercancreate) { $object->fetch($id); $object->set_ref_client(GETPOST('ref_client')); - } - - // Classify to validated + } // Classify to validated elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse', 'int'); @@ -626,9 +575,7 @@ if (empty($reshook)) } } } - } - else - { + } else { //var_dump($conf->global->SOCIETE_EMAIL_MANDATORY); if ($key == 'EMAIL') { @@ -697,22 +644,18 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { if (count($object->errors)) setEventMessages(null, $object->errors, 'errors'); else setEventMessages($object->error, $object->errors, 'errors'); } } - } - - // Go back to draft status (unvalidate) + } // Go back to draft status (unvalidate) elseif ($action == 'confirm_modif' && $usercanunvalidate) { $idwarehouse = GETPOST('idwarehouse', 'int'); @@ -785,7 +728,7 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -793,9 +736,7 @@ if (empty($reshook)) } } } - } - - // Classify "paid" + } // Classify "paid" elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); @@ -805,8 +746,8 @@ if (empty($reshook)) elseif ($action == 'confirm_paid_partially' && $confirm == 'yes' && $usercanissuepayment) { $object->fetch($id); - $close_code = GETPOST("close_code", 'none'); - $close_note = GETPOST("close_note", 'none'); + $close_code = GETPOST("close_code", 'restricthtml'); + $close_note = GETPOST("close_note", 'restricthtml'); if ($close_code) { $result = $object->set_paid($user, $close_code, $close_note); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); @@ -816,17 +757,15 @@ if (empty($reshook)) } // Classify "abandoned" elseif ($action == 'confirm_canceled' && $confirm == 'yes') { $object->fetch($id); - $close_code = GETPOST("close_code", 'none'); - $close_note = GETPOST("close_note", 'none'); + $close_code = GETPOST("close_code", 'restricthtml'); + $close_note = GETPOST("close_note", 'restricthtml'); if ($close_code) { $result = $object->set_canceled($user, $close_code, $close_note); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Reason")), null, 'errors'); } - } - - // Convertir en reduc + } // Convertir en reduc elseif ($action == 'confirm_converttoreduc' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); @@ -979,25 +918,19 @@ if (empty($reshook)) if ($result >= 0) { $db->commit(); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } else { $db->commit(); } - } - else - { + } else { setEventMessages($discount->error, $discount->errors, 'errors'); $db->rollback(); } } - } - - // Delete payment + } // Delete payment elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); @@ -1013,9 +946,7 @@ if (empty($reshook)) setEventMessages($paiement->error, $paiement->errors, 'errors'); } } - } - - /* + } /* * Insert new invoice in database */ elseif ($action == 'add' && $usercancreate) @@ -1056,11 +987,11 @@ if (empty($reshook)) $object->date = $dateinvoice; $object->date_pointoftax = $date_pointoftax; - $object->note_public = trim(GETPOST('note_public', 'none')); + $object->note_public = trim(GETPOST('note_public', 'restricthtml')); // We do not copy the private note $object->ref_client = $_POST['ref_client']; $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; + $object->model_pdf = $_POST['model']; $object->fk_project = $_POST['projectid']; $object->cond_reglement_id = $_POST['cond_reglement_id']; $object->mode_reglement_id = $_POST['mode_reglement_id']; @@ -1084,7 +1015,7 @@ if (empty($reshook)) } // Credit note invoice - if ($_POST['type'] == Facture::TYPE_CREDIT_NOTE) + if (GETPOST('type') == Facture::TYPE_CREDIT_NOTE) { $sourceinvoice = GETPOST('fac_avoir'); if (!($sourceinvoice > 0) && empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) @@ -1102,7 +1033,7 @@ if (empty($reshook)) $action = 'create'; } - $date_pointoftax = dol_mktime(12, 0, 0, $_POST['date_pointoftaxmonth'], $_POST['date_pointoftaxday'], $_POST['date_pointoftaxyear']); + $date_pointoftax = dol_mktime(12, 0, 0, GETPOST('date_pointoftaxmonth', 'int'), GETPOST('date_pointoftaxday', 'int'), GETPOST('date_pointoftaxyear', 'int')); if (!$error) { @@ -1110,20 +1041,19 @@ if (empty($reshook)) $object->entity = $originentity; } $object->socid = GETPOST('socid', 'int'); - $object->ref = $_POST['ref']; + $object->ref = GETPOST('ref'); $object->date = $dateinvoice; $object->date_pointoftax = $date_pointoftax; - $object->note_public = trim(GETPOST('note_public', 'none')); + $object->note_public = trim(GETPOST('note_public', 'restricthtml')); // We do not copy the private note - $object->ref_client = $_POST['ref_client']; - $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; - $object->fk_project = $_POST['projectid']; + $object->ref_client = GETPOST('ref_client'); + $object->model_pdf = GETPOST('model'); + $object->fk_project = GETPOST('projectid', 'int'); $object->cond_reglement_id = 0; - $object->mode_reglement_id = $_POST['mode_reglement_id']; + $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); - $object->remise_absolue = $_POST['remise_absolue']; - $object->remise_percent = $_POST['remise_percent']; + $object->remise_absolue = GETPOST('remise_absolue'); + $object->remise_percent = GETPOST('remise_percent'); $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); @@ -1188,9 +1118,7 @@ if (empty($reshook)) { $searchPreviousInvoice = false; // find, exit; break; - } - else - { + } else { if ($facture_source->tab_previous_situation_invoice[$lineIndex]->type == Facture::TYPE_CREDIT_NOTE) { $tab_jumped_credit_notes[$lineIndex] = $facture_source->tab_previous_situation_invoice[$lineIndex]->id; } @@ -1327,22 +1255,21 @@ if (empty($reshook)) if (!$error) { $object->socid = GETPOST('socid', 'int'); - $object->type = $_POST['type']; - $object->ref = $_POST['ref']; + $object->type = GETPOST('type'); + $object->ref = GETPOST('ref'); $object->date = $dateinvoice; $object->date_pointoftax = $date_pointoftax; - $object->note_public = trim(GETPOST('note_public', 'none')); - $object->note_private = trim(GETPOST('note_private', 'none')); - $object->ref_client = $_POST['ref_client']; - $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; - $object->fk_project = $_POST['projectid']; - $object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']); - $object->mode_reglement_id = $_POST['mode_reglement_id']; + $object->note_public = trim(GETPOST('note_public', 'restricthtml')); + $object->note_private = trim(GETPOST('note_private', 'restricthtml')); + $object->ref_client = GETPOST('ref_client'); + $object->model_pdf = GETPOST('model'); + $object->fk_project = GETPOST('projectid', 'int'); + $object->cond_reglement_id = (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id')); + $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); $object->fk_account = GETPOST('fk_account', 'int'); - $object->amount = $_POST['amount']; - $object->remise_absolue = $_POST['remise_absolue']; - $object->remise_percent = $_POST['remise_percent']; + $object->amount = price2num(GETPOST('amount')); + $object->remise_absolue = GETPOST('remise_absolue'); + $object->remise_percent = GETPOST('remise_percent'); $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); @@ -1380,21 +1307,20 @@ if (empty($reshook)) // Si facture standard $object->socid = GETPOST('socid', 'int'); $object->type = GETPOST('type'); - $object->ref = $_POST['ref']; + $object->ref = GETPOST('ref'); $object->date = $dateinvoice; $object->date_pointoftax = $date_pointoftax; - $object->note_public = trim(GETPOST('note_public', 'none')); - $object->note_private = trim(GETPOST('note_private', 'none')); - $object->ref_client = $_POST['ref_client']; - $object->ref_int = $_POST['ref_int']; - $object->modelpdf = $_POST['model']; - $object->fk_project = $_POST['projectid']; - $object->cond_reglement_id = ($_POST['type'] == 3 ? 1 : $_POST['cond_reglement_id']); - $object->mode_reglement_id = $_POST['mode_reglement_id']; + $object->note_public = trim(GETPOST('note_public', 'restricthtml')); + $object->note_private = trim(GETPOST('note_private', 'restricthtml')); + $object->ref_client = GETPOST('ref_client'); + $object->model_pdf = GETPOST('model'); + $object->fk_project = GETPOST('projectid'); + $object->cond_reglement_id = (GETPOST('type') == 3 ? 1 : GETPOST('cond_reglement_id')); + $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); - $object->amount = $_POST['amount']; - $object->remise_absolue = $_POST['remise_absolue']; - $object->remise_percent = $_POST['remise_percent']; + $object->amount = price2num(GETPOST('amount')); + $object->remise_absolue = GETPOST('remise_absolue'); + $object->remise_percent = GETPOST('remise_percent'); $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); $object->multicurrency_code = GETPOST('multicurrency_code', 'alpha'); @@ -1410,8 +1336,7 @@ if (empty($reshook)) if (in_array($object->type, $retainedWarrantyInvoiceAvailableType)) { $object->retained_warranty = GETPOST('retained_warranty', 'int'); $object->retained_warranty_fk_cond_reglement = GETPOST('retained_warranty_fk_cond_reglement', 'int'); - } - else { + } else { $object->retained_warranty = 0; $object->retained_warranty_fk_cond_reglement = 0; } @@ -1514,14 +1439,11 @@ if (empty($reshook)) $amount_ttc_diff += $am; $amountdeposit[$tva] += $am / (1 + $tva / 100); // Convert into HT for the addline } - } - else - { + } else { if ($typeamount == 'amount') { $amountdeposit[0] = $valuedeposit; - } - elseif ($typeamount == 'variable') + } elseif ($typeamount == 'variable') { if ($result > 0) { @@ -1742,7 +1664,7 @@ if (empty($reshook)) $originidforcontact=$srcobject->origin_id; } $sqlcontact = "SELECT code, fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; + $sqlcontact.= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$db->escape($originforcontact)."'"; $resqlcontact = $db->query($sqlcontact); if ($resqlcontact) @@ -1769,9 +1691,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } - else - { // If some invoice's lines coming from page + } else { // If some invoice's lines coming from page $id = $object->create($user); for ($i = 1; $i <= $NBLINES; $i++) { @@ -1878,12 +1798,11 @@ if (empty($reshook)) $object->fetch_thirdparty(); $object->date = $datefacture; $object->date_pointoftax = $date_pointoftax; - $object->note_public = trim(GETPOST('note_public', 'none')); - $object->note = trim(GETPOST('note', 'none')); - $object->note_private = trim(GETPOST('note', 'none')); + $object->note_public = trim(GETPOST('note_public', 'restricthtml')); + $object->note = trim(GETPOST('note', 'restricthtml')); + $object->note_private = trim(GETPOST('note', 'restricthtml')); $object->ref_client = GETPOST('ref_client', 'alpha'); - $object->ref_int = GETPOST('ref_int', 'alpha'); - $object->modelpdf = GETPOST('model', 'alpha'); + $object->model_pdf = GETPOST('model', 'alpha'); $object->fk_project = GETPOST('projectid', 'int'); $object->cond_reglement_id = GETPOST('cond_reglement_id', 'int'); $object->mode_reglement_id = GETPOST('mode_reglement_id', 'int'); @@ -1897,9 +1816,7 @@ if (empty($reshook)) if ($id <= 0) { $mesg = $object->error; - } - else - { + } else { $nextSituationInvoice = new Facture($db); $nextSituationInvoice->fetch($id); @@ -1930,7 +1847,7 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -1939,36 +1856,38 @@ if (empty($reshook)) header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); exit(); - } - else - { + } else { $db->rollback(); $action = 'create'; $_GET["origin"] = $_POST["origin"]; $_GET["originid"] = $_POST["originid"]; setEventMessages($object->error, $object->errors, 'errors'); } - } - - // Add a new line - elseif ($action == 'addline' && $usercancreate) + } elseif ($action == 'addline' && GETPOST('submitforalllines', 'aZ09') && GETPOST('vatforalllines', 'alpha')) { + // Define vat_rate + $vat_rate = (GETPOST('vatforalllines') ? GETPOST('vatforalllines') : 0); + $vat_rate = str_replace('*', '', $vat_rate); + $localtax1_rate = get_localtax($vat_rate, 1, $object->thirdparty, $mysoc); + $localtax2_rate = get_localtax($vat_rate, 2, $object->thirdparty, $mysoc); + foreach ($object->lines as $line) { + $result = $object->updateline($line->id, $line->desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $vat_rate, $localtax1_rate, $localtax2_rate, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit, $line->multicurrency_subprice); + } + } elseif ($action == 'addline' && $usercancreate) // Add a new line { $langs->load('errors'); $error = 0; // Set if we used free entry or predefined product $predef = ''; - $product_desc = (GETPOST('dp_desc', 'none') ?GETPOST('dp_desc', 'none') : ''); - $price_ht = GETPOST('price_ht'); - $price_ht_devise = GETPOST('multicurrency_price_ht'); + $product_desc = (GETPOST('dp_desc', 'none') ?GETPOST('dp_desc', 'restricthtml') : ''); + $price_ht = price2num(GETPOST('price_ht')); + $price_ht_devise = price2num(GETPOST('multicurrency_price_ht')); $prod_entry_mode = GETPOST('prod_entry_mode', 'alpha'); if ($prod_entry_mode == 'free') { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -2015,9 +1934,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldCantBeNegativeOnInvoice", $langs->transnoentitiesnoconv("UnitPriceHT"), $langs->transnoentitiesnoconv("CustomerAbsoluteDiscountShort")), null, 'errors'); } $error++; - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -2043,9 +1960,7 @@ if (empty($reshook)) if ($res = $prodcomb->fetchByProductCombination2ValuePairs($idprod, $combinations)) { $idprod = $res->fk_product_child; - } - else - { + } else { setEventMessages($langs->trans('ErrorProductCombinationNotFound'), null, 'errors'); $error++; } @@ -2097,21 +2012,18 @@ if (empty($reshook)) $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); // if price ht was forced (ie: from gui when calculated by margin rate and cost price). TODO Why this ? - if (!empty($price_ht)) + if (!empty($price_ht) || $price_ht === '0') { $pu_ht = price2num($price_ht, 'MU'); $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); - } - // On reevalue prix selon taux tva car taux tva transaction peut etre different + } // On reevalue prix selon taux tva car taux tva transaction peut etre different // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). elseif ($tmpvat != $tmpprodvat) { if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); - } - else - { + } else { $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); } } @@ -2229,7 +2141,7 @@ if (empty($reshook)) $outputlangs->setDefaultLang($newlang); $outputlangs->load('products'); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -2278,9 +2190,7 @@ if (empty($reshook)) $action = ''; } } - } - - elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) + } elseif ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { if (!$object->fetch($id) > 0) dol_print_error($db); $object->fetch_thirdparty(); @@ -2290,7 +2200,7 @@ if (empty($reshook)) $date_end = ''; $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'none') ? GETPOST('product_desc', 'none') : GETPOST('desc', 'none')); + $description = dol_htmlcleanlastbr(GETPOST('product_desc', 'restricthtml') ? GETPOST('product_desc', 'restricthtml') : GETPOST('desc', 'restricthtml')); $pu_ht = GETPOST('price_ht'); $vat_rate = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); $qty = GETPOST('qty'); @@ -2337,16 +2247,14 @@ if (empty($reshook)) setEventMessages($mesg, null, 'warnings'); $error++; $result = -1; - } - elseif (GETPOST('progress') < $line->situation_percent) // TODO : use a modified $line->get_prev_progress($object->id) result + } elseif (GETPOST('progress') < $line->situation_percent) // TODO : use a modified $line->get_prev_progress($object->id) result { $mesg = $langs->trans("CantBeLessThanMinPercent"); setEventMessages($mesg, null, 'warnings'); $error++; $result = -1; } - } - elseif (GETPOST('progress') < $percent) + } elseif (GETPOST('progress') < $percent) { $mesg = '
    '.$langs->trans("CantBeLessThanMinPercent").'
    '; setEventMessages($mesg, null, 'warnings'); @@ -2401,9 +2309,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldCantBeNegativeOnInvoice", $langs->transnoentitiesnoconv("UnitPriceHT"), $langs->transnoentitiesnoconv("CustomerAbsoluteDiscountShort")), null, 'errors'); } $error++; - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("UnitPriceHT")), null, 'errors'); $error++; } @@ -2425,10 +2331,10 @@ if (empty($reshook)) } } - $result = $object->updateline(GETPOST('lineid'), $description, $pu_ht, $qty, GETPOST('remise_percent'), + $result = $object->updateline(GETPOST('lineid', 'int'), $description, $pu_ht, $qty, price2num(GETPOST('remise_percent', 'alpha')), $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); + GETPOST('fk_parent_line', 'int'), 0, $fournprice, $buyingprice, $label, $special_code, $array_options, price2num(GETPOST('progress', 'alpha')), + GETPOST('units', 'alpha'), $pu_ht_devise); if ($result >= 0) { if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { @@ -2446,7 +2352,7 @@ if (empty($reshook)) } $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['qty']); @@ -2488,9 +2394,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); } } - } - - elseif ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) // Update all lines of situation invoice + } elseif ($action == 'updatealllines' && $usercancreate && $_POST['all_percent'] == $langs->trans('Modifier')) // Update all lines of situation invoice { if (!$object->fetch($id) > 0) dol_print_error($db); if (GETPOST('all_progress') != "") @@ -2503,18 +2407,13 @@ if (empty($reshook)) $mesg = $langs->trans("Line").' '.$i.' : '.$langs->trans("CantBeLessThanMinPercent"); setEventMessages($mesg, null, 'warnings'); $result = -1; - } else - $object->update_percent($line, $_POST['all_progress']); + } else $object->update_percent($line, $_POST['all_progress']); } } - } - - elseif ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { + } elseif ($action == 'updateline' && $usercancreate && $_POST['cancel'] == $langs->trans('Cancel')) { header('Location: '.$_SERVER["PHP_SELF"].'?facid='.$id); // To show again edited page exit(); - } - - // Outing situation invoice from cycle + } // Outing situation invoice from cycle elseif ($action == 'confirm_situationout' && $confirm == 'yes' && $usercancreate) { $object->fetch($id, '', '', '', true); @@ -2584,9 +2483,7 @@ if (empty($reshook)) { $searchPreviousInvoice = false; // find, exit; break; - } - else - { + } else { $lineIndex--; // go to previous invoice in cycle } } @@ -2613,25 +2510,17 @@ if (empty($reshook)) { setEventMessages($langs->trans('Updated'), '', 'mesgs'); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); - } - else - { + } else { setEventMessages($langs->trans('ErrorOutingSituationInvoiceCreditNote'), array(), 'errors'); } - } - else - { + } else { setEventMessages($langs->trans('ErrorOutingSituationInvoiceOnUpdate'), array(), 'errors'); } - } - else - { + } else { setEventMessages($langs->trans('ErrorFindNextSituationInvoice'), array(), 'errors'); } } - } - - // add lines from objectlinked + } // add lines from objectlinked elseif ($action == 'import_lines_from_object' && $usercancreate && $object->statut == Facture::STATUS_DRAFT @@ -2647,8 +2536,7 @@ if (empty($reshook)) { dol_include_once('/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'OrderLine'; - } - elseif ($fromElement == 'propal') + } elseif ($fromElement == 'propal') { dol_include_once('/comm/'.$fromElement.'/class/'.$fromElement.'.class.php'); $lineClassName = 'PropaleLigne'; @@ -2690,8 +2578,7 @@ if (empty($reshook)) $array_options = $originLine->array_options; if ($object->type == Facture::TYPE_SITUATION) { $situation_percent = 0; - } - else { + } else { $situation_percent = 100; } $fk_prev_id = ''; @@ -2705,8 +2592,7 @@ if (empty($reshook)) } else { $error++; } - } - else { + } else { $error++; } } @@ -2739,7 +2625,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) @@ -2919,9 +2805,7 @@ if ($action == 'create') //Replicate extrafields $expesrc->fetch_optionals(); $object->array_options = $expesrc->array_options; - } - else - { + } else { $cond_reglement_id = (!empty($objectsrc->cond_reglement_id) ? $objectsrc->cond_reglement_id : (!empty($soc->cond_reglement_id) ? $soc->cond_reglement_id : 0)); $mode_reglement_id = (!empty($objectsrc->mode_reglement_id) ? $objectsrc->mode_reglement_id : (!empty($soc->mode_reglement_id) ? $soc->mode_reglement_id : 0)); $fk_account = (!empty($objectsrc->fk_account) ? $objectsrc->fk_account : (!empty($soc->fk_account) ? $soc->fk_account : 0)); @@ -2939,9 +2823,7 @@ if ($action == 'create') $object->array_options = $objectsrc->array_options; } } - } - else - { + } else { $cond_reglement_id = $soc->cond_reglement_id; $mode_reglement_id = $soc->mode_reglement_id; $fk_account = $soc->fk_account; @@ -2952,12 +2834,21 @@ if ($action == 'create') if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } + // when payment condition is empty (means not override by payment condition form a other object, like third-party), try to use default value + if (empty($cond_reglement_id)) { + $cond_reglement_id = GETPOST("cond_reglement_id"); + } + + // when payment mode is empty (means not override by payment mode form a other object, like third-party), try to use default value + if (empty($mode_reglement_id)) { + $mode_reglement_id = GETPOST("mode_reglement_id"); + } + if (!empty($soc->id)) $absolute_discount = $soc->getAvailableDiscounts(); $note_public = $object->getDefaultCreateValueFor('note_public', ((!empty($origin) && !empty($originid) && is_object($objectsrc) && !empty($conf->global->FACTURE_REUSE_NOTES_ON_CREATE_FROM)) ? $objectsrc->note_public : null)); $note_private = $object->getDefaultCreateValueFor('note_private', ((!empty($origin) && !empty($originid) && is_object($objectsrc) && !empty($conf->global->FACTURE_REUSE_NOTES_ON_CREATE_FROM)) ? $objectsrc->note_private : null)); - if (!empty($conf->use_javascript_ajax)) - { + if (!empty($conf->use_javascript_ajax)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; print ajax_combobox('fac_replacement'); print ajax_combobox('fac_avoir'); @@ -3023,9 +2914,7 @@ if ($action == 'create') print ')'; print ''; print ''."\n"; - } - else - { + } else { print ''.$langs->trans('Customer').''; print ''; print $form->select_company($soc->id, 'socid', '((s.client = 1 OR s.client = 3) AND s.status=1)', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); @@ -3179,10 +3068,10 @@ if ($action == 'create') print '
    '; // Next situation invoice - $opt = $form->selectSituationInvoices(GETPOST('originid'), $socid); + $opt = $form->selectSituationInvoices(GETPOST('originid', 'int'), $socid); print '
    '; - $tmp = ''.$langs->trans('NoSituations').'') || (GETPOST('origin') && GETPOST('origin') != 'facture' && GETPOST('origin') != 'commande')) $tmp .= ' disabled'; $tmp .= '> '; @@ -3248,9 +3137,7 @@ if ($action == 'create') print $desc; print '
    '; } - } - else - { + } else { if (!empty($conf->global->INVOICE_USE_SITUATION)) { print '
    '; @@ -3355,9 +3242,7 @@ if ($action == 'create') print '
    '; } - } - else - { + } else { print '
    '; if (empty($conf->global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp = ' '; else $tmp = ' '; @@ -3508,13 +3393,16 @@ if ($action == 'create') print ''; // Bank Account - if (GETPOSTISSET('fk_account')) { - $fk_account = GETPOST('fk_account'); - } + if (!empty($conf->banque->enabled)) + { + if (GETPOSTISSET('fk_account')) { + $fk_account = GETPOST('fk_account'); + } - print ''.$langs->trans('BankAccount').''; - $form->select_comptes($fk_account, 'fk_account', 0, '', 1); - print ''; + print ''.$langs->trans('BankAccount').''; + $form->select_comptes($fk_account, 'fk_account', 0, '', 1); + print ''; + } // Project if (!empty($conf->projet->enabled)) @@ -3733,8 +3621,7 @@ if ($action == 'create') } print '
    '; -} -elseif ($id > 0 || !empty($ref)) +} elseif ($id > 0 || !empty($ref)) { /* * Show object in view mode @@ -3843,9 +3730,7 @@ elseif ($id > 0 || !empty($ref)) array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse') ?GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1, 0, 0, $langs->trans("NoStockAction"), 0, $forcecombo)) ); $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', $formquestion, "yes", 1); - } - else - { + } else { $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'].'?facid='.$object->id, $langs->trans('DeleteBill'), $text, 'confirm_delete', '', 'no', 1); } } else { @@ -4050,7 +3935,7 @@ elseif ($id > 0 || !empty($ref)) } } - if ($action == 'deletepaiement') + if ($action == 'deletepayment') { $payment_id = GETPOST('paiement_id'); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 'no', 1); @@ -4182,8 +4067,7 @@ elseif ($id > 0 || !empty($ref)) foreach ($facidavoir as $id) { if ($i == 0) print ' '; - else - print ','; + else print ','; $facavoir = new Facture($db); $facavoir->fetch($id); print $facavoir->getNomUrl(1); @@ -4234,17 +4118,13 @@ elseif ($id > 0 || !empty($ref)) print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE && $action != 'editinvoicedate' && !empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) + if ($action != 'editinvoicedate' && !empty($object->brouillon) && $usercancreate && empty($conf->global->FAC_FORCE_DATE_VALIDATION)) print ''; print '
    '; print $langs->trans('DateInvoice'); print 'id.'">'.img_edit($langs->trans('SetDate'), 1).'
    '; print ''; - if ($object->type != Facture::TYPE_CREDIT_NOTE) { - if ($action == 'editinvoicedate') { - $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); - } else { - print dol_print_date($object->date, 'day'); - } + if ($action == 'editinvoicedate') { + $form->form_date($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->date, 'invoicedate'); } else { print dol_print_date($object->date, 'day'); } @@ -4327,9 +4207,7 @@ elseif ($id > 0 || !empty($ref)) if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'CRDT', 1, 1); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->mode_reglement_id, 'none', 'CRDT'); } print ''; @@ -4381,24 +4259,25 @@ elseif ($id > 0 || !empty($ref)) } // Bank Account - print ''; - print ''; - print '
    '; - print $langs->trans('BankAccount'); - print ''; - if (($action != 'editbankaccount') && $usercancreate) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
    '; - print ''; - if ($action == 'editbankaccount') + if (!empty($conf->banque->enabled)) { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + print ''; + print ''; + print '
    '; + print $langs->trans('BankAccount'); + print ''; + if (($action != 'editbankaccount') && $usercancreate) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
    '; + print ''; + if ($action == 'editbankaccount') + { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ""; + print ''; } - else - { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); - } - print ""; - print ''; // Incoterms if (!empty($conf->incoterm->enabled)) @@ -4415,9 +4294,7 @@ elseif ($id > 0 || !empty($ref)) if ($action != 'editincoterm') { print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } - else - { + } else { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); } print ''; @@ -4431,7 +4308,7 @@ elseif ($id > 0 || !empty($ref)) $displayWarranty = false; } - if($displayWarranty) { + if ($displayWarranty) { // Retained Warranty print ''; print ''; @@ -4486,9 +4361,7 @@ elseif ($id > 0 || !empty($ref)) $form->select_conditions_paiements($retained_warranty_fk_cond_reglement, 'retained_warranty_fk_cond_reglement', -1, 1); print ''; print ''; - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?facid='.$object->id, $object->retained_warranty_fk_cond_reglement, 'none'); if (!$displayWarranty) { print img_picto($langs->trans('RetainedWarrantyNeed100Percent'), 'warning.png', 'class="pictowarning valignmiddle" '); @@ -4521,9 +4394,7 @@ elseif ($id > 0 || !empty($ref)) print ''; print ''; print ''; - } - else - { + } else { print dol_print_date($object->retained_warranty_date_limit, 'day'); } print ''; @@ -4541,44 +4412,50 @@ elseif ($id > 0 || !empty($ref)) print '
    '; print '
    '; + print ''."\n"; print '
    '; @@ -4451,9 +4328,7 @@ elseif ($id > 0 || !empty($ref)) print ''; print ''; print ''; - } - else - { + } else { print price($object->retained_warranty).'%'; } print '
    '; + $sign = 1; + if (!empty($conf->global->INVOICE_POSITIVE_CREDIT_NOTE_SCREEN) && $object->type == $object::TYPE_CREDIT_NOTE) { + $sign = -1; // We invert sign for output + } + if (!empty($conf->multicurrency->enabled) && ($object->multicurrency_code != $conf->currency)) { // Multicurrency Amount HT print ''; - print ''; + print ''; print ''; // Multicurrency Amount VAT print ''; - print ''; + print ''; print ''; // Multicurrency Amount TTC print ''; - print ''; + print ''; print ''; } // Amount print ''; - print ''; + print ''; // Vat - print ''; + print ''; print ''; // Amount Local Taxes if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) // Localtax1 { print ''; - print ''; + print ''; } if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) // Localtax2 { print ''; - print ''; + print ''; } // Revenue stamp @@ -4636,13 +4513,11 @@ elseif ($id > 0 || !empty($ref)) } // Total with tax - print ''; + print ''; print '
    '.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).''.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).''.price($sign * $object->multicurrency_total_ht, '', $langs, 0, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'
    '.$form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0).''.price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).''.price($sign * $object->multicurrency_total_tva, '', $langs, 0, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'
    '.$form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0).''.price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).''.price($sign * $object->multicurrency_total_ttc, '', $langs, 0, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).'
    '.$langs->trans('AmountHT').''.price($object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).'
    '.price($sign * $object->total_ht, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->trans('AmountVAT').''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->trans('AmountVAT').''.price($sign * $object->total_tva, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency).'
    '.price($sign * $object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->transcountry("AmountLT2", $mysoc->country_code).''.price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency).'
    '.price($sign * $object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->trans('AmountTTC').''.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'
    '.$langs->trans('AmountTTC').''.price($sign * $object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency).'
    '; - $sign = 1; - if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = - 1; $nbrows = 8; $nbcols = 3; if (!empty($conf->projet->enabled)) @@ -4785,6 +4660,8 @@ elseif ($id > 0 || !empty($ref)) print ''; } + $sign = 1; + if ($object->type == $object::TYPE_CREDIT_NOTE) $sign = -1; // List of payments already done @@ -4862,7 +4739,7 @@ elseif ($id > 0 || !empty($ref)) print ''; if ($object->statut == Facture::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; } @@ -4885,8 +4762,7 @@ elseif ($id > 0 || !empty($ref)) print ''; if ($object->type != Facture::TYPE_DEPOSIT) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); - else - print $langs->trans('AlreadyPaid'); + else print $langs->trans('AlreadyPaid'); print ' :'.price($totalpaye).' '; $resteapayeraffiche = $resteapayer; @@ -4981,9 +4857,7 @@ elseif ($id > 0 || !empty($ref)) if ($object->type == Facture::TYPE_SITUATION) { $retainedWarranty = $total_global_ttc * $object->retained_warranty / 100; - } - else - { + } else { // Because one day retained warranty could be used on standard invoices $retainedWarranty = $object->total_ttc * $object->retained_warranty / 100; } @@ -4998,8 +4872,7 @@ elseif ($id > 0 || !empty($ref)) print !empty($object->retained_warranty_date_limit) ? ' '.$langs->trans("ToPayOn", dol_print_date($object->retained_warranty_date_limit, 'day')) : ''; print ' :'.price($retainedWarranty).' '; } - } - else // Credit note + } else // Credit note { $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -5172,9 +5045,7 @@ elseif ($id > 0 || !empty($ref)) print ''.$langs->trans('Modify').''; } } - } - else - { + } else { print ''.$langs->trans('Modify').''; } } @@ -5213,8 +5084,7 @@ elseif ($id > 0 || !empty($ref)) } else { if ($usercansend) { print ''.$langs->trans('SendMail').''; - } else - print ''.$langs->trans('SendMail').''; + } else print ''.$langs->trans('SendMail').''; } } } @@ -5232,14 +5102,10 @@ elseif ($id > 0 || !empty($ref)) } else { print ''.$langs->trans('MakeWithdrawRequest').''; } - } - else - { + } else { //print ''.$langs->trans("MakeWithdrawRequest").''; } - } - else - { + } else { //print ''.$langs->trans("MakeWithdrawRequest").''; } } @@ -5273,9 +5139,7 @@ elseif ($id > 0 || !empty($ref)) if ($resteapayer == 0) { print ''.$langs->trans('DoPaymentBack').''; - } - else - { + } else { print ''.$langs->trans('DoPaymentBack').''; } } @@ -5314,17 +5178,13 @@ elseif ($id > 0 || !empty($ref)) { // If one payment or one credit note was linked to this invoice print ''.$langs->trans('ClassifyPaidPartially').''; - } - else - { + } else { if (empty($conf->global->INVOICE_CAN_NEVER_BE_CANCELED)) { if ($objectidnext) { print ''.$langs->trans('ClassifyCanceled').''; - } - else - { + } else { print ''.$langs->trans('ClassifyCanceled').''; } } @@ -5336,7 +5196,7 @@ elseif ($id > 0 || !empty($ref)) { if (!$objectidnext) { - print ''.$langs->trans("CreateCreditNote").''; + print ''.$langs->trans("CreateCreditNote").''; } } @@ -5386,9 +5246,7 @@ elseif ($id > 0 || !empty($ref)) if (($object->total_ttc - $totalcreditnotes) == 0) { print ''.$langs->trans("RemoveSituationFromCycle").''; - } - else - { + } else { print ''.$langs->trans("RemoveSituationFromCycle").''; } } @@ -5411,27 +5269,20 @@ elseif ($id > 0 || !empty($ref)) //var_dump($isErasable); if ($isErasable == -4) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable == -3) { + } elseif ($isErasable == -3) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable == -2) { + } elseif ($isErasable == -2) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable == -1) { + } elseif ($isErasable == -1) { print ''.$langs->trans('Delete').''; - } - elseif ($isErasable <= 0) // Any other cases + } elseif ($isErasable <= 0) // Any other cases { print ''.$langs->trans('Delete').''; - } - elseif ($objectidnext) + } elseif ($objectidnext) { print ''.$langs->trans('Delete').''; - } - else - { - print ''.$langs->trans('Delete').''; + } else { + print ''.$langs->trans('Delete').''; } } else { print ''.$langs->trans('Delete').''; @@ -5458,7 +5309,7 @@ elseif ($id > 0 || !empty($ref)) print $formfile->showdocuments( 'facture', $filename, $filedir, $urlsource, $genallowed, - $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', + $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang, '', $object, 0, 'remove_file_comfirm'); $somethingshown = $formfile->numoffiles; diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 85da9cd5c37..0ab4974ce7f 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -28,96 +28,96 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; */ class Invoices extends DolibarrApi { - /** - * - * @var array $FIELDS Mandatory fields, checked when create and update object - */ - static $FIELDS = array( - 'socid', - ); + /** + * + * @var array $FIELDS Mandatory fields, checked when create and update object + */ + static $FIELDS = array( + 'socid', + ); - /** - * @var Facture $invoice {@type Facture} - */ - public $invoice; + /** + * @var Facture $invoice {@type Facture} + */ + public $invoice; - /** - * Constructor - */ - public function __construct() - { - global $db, $conf; - $this->db = $db; - $this->invoice = new Facture($this->db); - } - - /** - * Get properties of a invoice object - * - * Return an array with invoice informations - * - * @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 - */ - public function get($id, $contact_list = 1) + /** + * Constructor + */ + public function __construct() { - return $this->_fetch($id, '', '', $contact_list); + global $db, $conf; + $this->db = $db; + $this->invoice = new Facture($this->db); } - /** - * Get properties of an invoice object by ref - * - * Return an array with invoice informations - * - * @param string $ref Ref of object - * @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 - * - * @url GET ref/{ref} - * - * @throws RestException - */ - public function getByRef($ref, $contact_list = 1) - { - return $this->_fetch('', $ref, '', $contact_list); - } + /** + * Get properties of a invoice object + * + * Return an array with invoice informations + * + * @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 + */ + public function get($id, $contact_list = 1) + { + return $this->_fetch($id, '', '', $contact_list); + } - /** - * Get properties of an invoice object by ref_ext - * - * Return an array with invoice informations - * - * @param string $ref_ext External reference of object - * @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 - * - * @url GET ref_ext/{ref_ext} - * - * @throws RestException - */ - public function getByRefExt($ref_ext, $contact_list = 1) - { - return $this->_fetch('', '', $ref_ext, $contact_list); - } + /** + * Get properties of an invoice object by ref + * + * Return an array with invoice informations + * + * @param string $ref Ref of object + * @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 + * + * @url GET ref/{ref} + * + * @throws RestException + */ + public function getByRef($ref, $contact_list = 1) + { + return $this->_fetch('', $ref, '', $contact_list); + } - /** - * Get properties of an invoice object - * - * Return an array with invoice informations - * - * @param int $id ID of order + /** + * Get properties of an invoice object by ref_ext + * + * Return an array with invoice informations + * + * @param string $ref_ext External reference of object + * @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 + * + * @url GET ref_ext/{ref_ext} + * + * @throws RestException + */ + public function getByRefExt($ref_ext, $contact_list = 1) + { + return $this->_fetch('', '', $ref_ext, $contact_list); + } + + /** + * Get properties of an invoice object + * + * Return an array with invoice informations + * + * @param int $id ID of order * @param string $ref Ref of object * @param string $ref_ext External reference of object - * @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 - */ - private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) - { + * @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 + */ + private function _fetch($id, $ref = '', $ref_ext = '', $contact_list = 1) + { if (!DolibarrApiAccess::$user->rights->facture->lire) { throw new RestException(401); } @@ -142,139 +142,138 @@ class Invoices extends DolibarrApi $this->invoice->fetchObjectLinked(); return $this->_cleanObjectDatas($this->invoice); - } + } - /** - * List invoices - * - * Get a list of invoices - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} - * @param string $status Filter by invoice status : draft | unpaid | paid | cancelled - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" - * @return array Array of invoice objects - * + /** + * List invoices + * + * Get a list of invoices + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $thirdparty_ids Thirdparty ids to filter orders of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} + * @param string $status Filter by invoice status : draft | unpaid | paid | cancelled + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')" + * @return array Array of invoice objects + * * @throws RestException 404 Not found * @throws RestException 503 Error - */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') - { - global $db, $conf; + */ + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') + { + global $db, $conf; - $obj_ret = array(); + $obj_ret = array(); - // case of external user, $thirdparty_ids param is ignored and replaced by user's socid - $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; + // case of external user, $thirdparty_ids param is ignored and replaced by user's socid + $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; - // If the internal user must only see his customers, force searching by him - $search_sale = 0; - if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; + // If the internal user must only see his customers, force searching by him + $search_sale = 0; + if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) $search_sale = DolibarrApiAccess::$user->id; - $sql = "SELECT t.rowid"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) - $sql .= " FROM ".MAIN_DB_PREFIX."facture as t"; + $sql = "SELECT t.rowid"; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; // We need these fields in order to filter by sale (including the case where the user can only see his prospects) + $sql .= " FROM ".MAIN_DB_PREFIX."facture as t"; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; // We need this table joined to the select in order to filter by sale - $sql .= ' WHERE t.entity IN ('.getEntity('invoice').')'; - if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; - if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; + $sql .= ' WHERE t.entity IN ('.getEntity('invoice').')'; + if ((!DolibarrApiAccess::$user->rights->societe->client->voir && !$socids) || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; + if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; - if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale // Filter by status - if ($status == 'draft') $sql .= " AND t.fk_statut IN (0)"; - if ($status == 'unpaid') $sql .= " AND t.fk_statut IN (1)"; - if ($status == 'paid') $sql .= " AND t.fk_statut IN (2)"; - if ($status == 'cancelled') $sql .= " AND t.fk_statut IN (3)"; - // Insert sale filter - if ($search_sale > 0) - { - $sql .= " AND sc.fk_user = ".$search_sale; - } - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } + if ($status == 'draft') $sql .= " AND t.fk_statut IN (0)"; + if ($status == 'unpaid') $sql .= " AND t.fk_statut IN (1)"; + if ($status == 'paid') $sql .= " AND t.fk_statut IN (2)"; + if ($status == 'cancelled') $sql .= " AND t.fk_statut IN (3)"; + // Insert sale filter + if ($search_sale > 0) + { + $sql .= " AND sc.fk_user = ".$search_sale; + } + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } - $sql .= $db->order($sortfield, $sortorder); - if ($limit) - { - if ($page < 0) - { - $page = 0; - } - $offset = $limit * $page; + $sql .= $this->db->order($sortfield, $sortorder); + if ($limit) + { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); - } + $sql .= $this->db->plimit($limit + 1, $offset); + } - $result = $db->query($sql); - if ($result) - { - $i = 0; - $num = $db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { - $obj = $db->fetch_object($result); - $invoice_static = new Facture($db); - if ($invoice_static->fetch($obj->rowid)) - { - // Get payment details - $invoice_static->totalpaid = $invoice_static->getSommePaiement(); - $invoice_static->totalcreditnotes = $invoice_static->getSumCreditNotesUsed(); - $invoice_static->totaldeposits = $invoice_static->getSumDepositsUsed(); - $invoice_static->remaintopay = price2num($invoice_static->total_ttc - $invoice_static->totalpaid - $invoice_static->totalcreditnotes - $invoice_static->totaldeposits, 'MT'); + $result = $this->db->query($sql); + if ($result) + { + $i = 0; + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + while ($i < $min) + { + $obj = $this->db->fetch_object($result); + $invoice_static = new Facture($this->db); + if ($invoice_static->fetch($obj->rowid)) + { + // Get payment details + $invoice_static->totalpaid = $invoice_static->getSommePaiement(); + $invoice_static->totalcreditnotes = $invoice_static->getSumCreditNotesUsed(); + $invoice_static->totaldeposits = $invoice_static->getSumDepositsUsed(); + $invoice_static->remaintopay = price2num($invoice_static->total_ttc - $invoice_static->totalpaid - $invoice_static->totalcreditnotes - $invoice_static->totaldeposits, 'MT'); // Add external contacts ids $invoice_static->contacts_ids = $invoice_static->liste_contact(-1, 'external', 1); - $obj_ret[] = $this->_cleanObjectDatas($invoice_static); - } - $i++; - } - } - else { - throw new RestException(503, 'Error when retrieve invoice list : '.$db->lasterror()); - } - if (!count($obj_ret)) { - throw new RestException(404, 'No invoice found'); - } + $obj_ret[] = $this->_cleanObjectDatas($invoice_static); + } + $i++; + } + } else { + throw new RestException(503, 'Error when retrieve invoice list : '.$this->db->lasterror()); + } + if (!count($obj_ret)) { + throw new RestException(404, 'No invoice found'); + } return $obj_ret; - } + } - /** - * Create invoice object - * - * @param array $request_data Request datas - * @return int ID of invoice - */ - public function post($request_data = null) - { - if (!DolibarrApiAccess::$user->rights->facture->creer) { + /** + * Create invoice object + * + * @param array $request_data Request datas + * @return int ID of invoice + */ + public function post($request_data = null) + { + if (!DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401, "Insuffisant rights"); } - // Check mandatory fields - $result = $this->_validate($request_data); + // Check mandatory fields + $result = $this->_validate($request_data); - foreach ($request_data as $field => $value) { - $this->invoice->$field = $value; - } - if (!array_key_exists('date', $request_data)) { - $this->invoice->date = dol_now(); - } - /* We keep lines as an array + foreach ($request_data as $field => $value) { + $this->invoice->$field = $value; + } + if (!array_key_exists('date', $request_data)) { + $this->invoice->date = dol_now(); + } + /* We keep lines as an array if (isset($request_data["lines"])) { $lines = array(); foreach ($request_data["lines"] as $line) { @@ -283,152 +282,154 @@ class Invoices extends DolibarrApi $this->invoice->lines = $lines; }*/ - if ($this->invoice->create(DolibarrApiAccess::$user, 0, (empty($request_data["date_lim_reglement"]) ? 0 : $request_data["date_lim_reglement"])) < 0) { - throw new RestException(500, "Error creating invoice", array_merge(array($this->invoice->error), $this->invoice->errors)); - } - return $this->invoice->id; - } + if ($this->invoice->create(DolibarrApiAccess::$user, 0, (empty($request_data["date_lim_reglement"]) ? 0 : $request_data["date_lim_reglement"])) < 0) { + throw new RestException(500, "Error creating invoice", array_merge(array($this->invoice->error), $this->invoice->errors)); + } + return $this->invoice->id; + } - /** - * Create an invoice using an existing order. - * - * - * @param int $orderid Id of the order - * - * @url POST /createfromorder/{orderid} - * - * @return int - * @throws RestException 400 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 405 - */ - public function createInvoiceFromOrder($orderid) - { + /** + * Create an invoice using an existing order. + * + * + * @param int $orderid Id of the order + * + * @url POST /createfromorder/{orderid} + * + * @return int + * @throws RestException 400 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 405 + */ + public function createInvoiceFromOrder($orderid) + { - require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - if (!DolibarrApiAccess::$user->rights->commande->lire) { - throw new RestException(401); - } - if (!DolibarrApiAccess::$user->rights->facture->creer) { - throw new RestException(401); - } - if (empty($orderid)) { - throw new RestException(400, 'Order ID is mandatory'); - } + if (!DolibarrApiAccess::$user->rights->commande->lire) { + throw new RestException(401); + } + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } + if (empty($orderid)) { + throw new RestException(400, 'Order ID is mandatory'); + } - $order = new Commande($this->db); - $result = $order->fetch($orderid); - if (!$result) { - throw new RestException(404, 'Order not found'); - } + $order = new Commande($this->db); + $result = $order->fetch($orderid); + if (!$result) { + throw new RestException(404, 'Order not found'); + } - $result = $this->invoice->createFromOrder($order, DolibarrApiAccess::$user); - if ($result < 0) { - throw new RestException(405, $this->invoice->error); - } - $this->invoice->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->invoice); - } + $result = $this->invoice->createFromOrder($order, DolibarrApiAccess::$user); + if ($result < 0) { + throw new RestException(405, $this->invoice->error); + } + $this->invoice->fetchObjectLinked(); + return $this->_cleanObjectDatas($this->invoice); + } - /** - * Get lines of an invoice - * - * @param int $id Id of invoice - * - * @url GET {id}/lines - * - * @return int - */ - public function getLines($id) - { - if (!DolibarrApiAccess::$user->rights->facture->lire) { - throw new RestException(401); - } + /** + * Get lines of an invoice + * + * @param int $id Id of invoice + * + * @url GET {id}/lines + * + * @return int + */ + public function getLines($id) + { + if (!DolibarrApiAccess::$user->rights->facture->lire) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Invoice not found'); + } - if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->invoice->getLinesArray(); - $result = array(); - foreach ($this->invoice->lines as $line) { - array_push($result, $this->_cleanObjectDatas($line)); - } - return $result; - } + if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->invoice->getLinesArray(); + $result = array(); + foreach ($this->invoice->lines as $line) { + array_push($result, $this->_cleanObjectDatas($line)); + } + return $result; + } - /** - * Update a line to a given invoice - * - * @param int $id Id of invoice to update - * @param int $lineid Id of line to update - * @param array $request_data InvoiceLine data - * - * @url PUT {id}/lines/{lineid} - * - * @return array - * - * @throws RestException 304 - * @throws RestException 401 - * @throws RestException 404 Invoice not found - */ - public function putLine($id, $lineid, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->facture->creer) { - throw new RestException(401); - } + /** + * Update a line to a given invoice + * + * @param int $id Id of invoice to update + * @param int $lineid Id of line to update + * @param array $request_data InvoiceLine data + * + * @url PUT {id}/lines/{lineid} + * + * @return array + * + * @throws RestException 304 + * @throws RestException 401 + * @throws RestException 404 Invoice not found + */ + public function putLine($id, $lineid, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Invoice not found'); + } - if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->invoice->updateline( - $lineid, - $request_data->desc, - $request_data->subprice, - $request_data->qty, - $request_data->remise_percent, - $request_data->date_start, - $request_data->date_end, - $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - 'HT', - $request_data->info_bits, - $request_data->product_type, - $request_data->fk_parent_line, - 0, - $request_data->fk_fournprice, - $request_data->pa_ht, - $request_data->label, - $request_data->special_code, - $request_data->array_options, - $request_data->situation_percent, - $request_data->fk_unit, - $request_data->multicurrency_subprice - ); + if (!DolibarrApi::_checkAccessToResource('facture', $this->invoice->id)) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $request_data = (object) $request_data; + $updateRes = $this->invoice->updateline( + $lineid, + $request_data->desc, + $request_data->subprice, + $request_data->qty, + $request_data->remise_percent, + $request_data->date_start, + $request_data->date_end, + $request_data->tva_tx, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + 'HT', + $request_data->info_bits, + $request_data->product_type, + $request_data->fk_parent_line, + 0, + $request_data->fk_fournprice, + $request_data->pa_ht, + $request_data->label, + $request_data->special_code, + $request_data->array_options, + $request_data->situation_percent, + $request_data->fk_unit, + $request_data->multicurrency_subprice, + 0, + $request_data->ref_ext + ); - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } else { - throw new RestException(304, $this->invoice->error); - } - } + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } else { + throw new RestException(304, $this->invoice->error); + } + } - /** + /** * Add a contact type of given invoice * * @param int $id Id of invoice to update @@ -439,45 +440,46 @@ class Invoices extends DolibarrApi * * @return int * - * @throws RestException 401 - * @throws RestException 404 + * @throws RestException 401 + * @throws RestException 404 */ - public function postContact($id, $contactid, $type) - { - if (!DolibarrApiAccess::$user->rights->facture->creer) { - throw new RestException(401); - } + public function postContact($id, $contactid, $type) + { + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); + $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 (!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)) { + 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'); + $result = $this->invoice->add_contact($contactid, $type, 'external'); - if (!$result) { - throw new RestException(500, 'Error when added the contact'); - } + if (!$result) { + throw new RestException(500, 'Error when added the contact'); + } - return $this->_cleanObjectDatas($this->invoice); - } + 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. + * @param int $contactid Row key of the contact in the array contact_ids. + * @param string $type Type of the contact (BILLING, SHIPPING, CUSTOMER). * - * @url DELETE {id}/contact/{rowid} + * @url DELETE {id}/contact/{contactid}/{type} * * @return array * @@ -485,7 +487,7 @@ class Invoices extends DolibarrApi * @throws RestException 404 * @throws RestException 500 */ - public function deleteContact($id, $rowid) + public function deleteContact($id, $contactid, $type) { if (!DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); @@ -501,10 +503,17 @@ class Invoices extends DolibarrApi throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->invoice->delete_contact($rowid); - if ($result < 0) { - throw new RestException(500, 'Error when deleted the contact'); - } + $contacts = $this->invoice->liste_contact(); + + foreach ($contacts as $contact) { + if ($contact['id'] == $contactid && $contact['code'] == $type) { + $result = $this->invoice->delete_contact($contact['rowid']); + + if (!$result) { + throw new RestException(500, 'Error when deleted the contact'); + } + } + } return $this->_cleanObjectDatas($this->invoice); } @@ -548,9 +557,7 @@ class Invoices extends DolibarrApi $updateRes = $this->invoice->deleteline($lineid); if ($updateRes > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(405, $this->invoice->error); } } @@ -707,7 +714,9 @@ class Invoices extends DolibarrApi $request_data->array_options, $request_data->situation_percent, $request_data->fk_prev_id, - $request_data->fk_unit + $request_data->fk_unit, + 0, + $request_data->ref_ext ); if ($updateRes < 0) { @@ -875,8 +884,8 @@ class Invoices extends DolibarrApi * Sets an invoice as paid * * @param int $id Order ID - * @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet (cas escompte par exemple) - * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) + * @param string $close_code Code filled if we classify to 'Paid completely' when payment is not complete (for escompte for example) + * @param string $close_note Comment defined if we classify to 'Paid' when payment is not complete (for escompte for example) * * @url POST {id}/settopaid * @@ -987,6 +996,8 @@ class Invoices extends DolibarrApi */ public function markAsCreditAvailable($id) { + require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; + if (!DolibarrApiAccess::$user->rights->facture->creer) { throw new RestException(401); } @@ -1041,14 +1052,11 @@ class Invoices extends DolibarrApi $discount = new DiscountAbsolute($this->db); if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { $discount->description = '(CREDIT_NOTE)'; - } - elseif ($this->invoice->type == Facture::TYPE_DEPOSIT) { + } elseif ($this->invoice->type == Facture::TYPE_DEPOSIT) { $discount->description = '(DEPOSIT)'; - } - elseif ($this->invoice->type == Facture::TYPE_STANDARD || $this->invoice->type == Facture::TYPE_REPLACEMENT || $this->invoice->type == Facture::TYPE_SITUATION) { + } elseif ($this->invoice->type == Facture::TYPE_STANDARD || $this->invoice->type == Facture::TYPE_REPLACEMENT || $this->invoice->type == Facture::TYPE_SITUATION) { $discount->description = '(EXCESS RECEIVED)'; - } - else { + } else { throw new RestException(500, 'Cant convert to reduc an Invoice of this type'); } @@ -1062,7 +1070,7 @@ class Invoices extends DolibarrApi // If we're on a standard invoice, we have to get excess received to create a discount in TTC without VAT // Total payments - $sql = 'SELECT SUM(pf.amount) as total_paiements'; + $sql = 'SELECT SUM(pf.amount) as total_payments'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf, '.MAIN_DB_PREFIX.'paiement as p'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql .= ' WHERE pf.fk_facture = '.$this->invoice->id; @@ -1072,7 +1080,7 @@ class Invoices extends DolibarrApi if (!$resql) dol_print_error($this->db); $res = $this->db->fetch_object($resql); - $total_paiements = $res->total_paiements; + $total_payments = $res->total_payments; // Total credit note and deposit $total_creditnote_and_deposit = 0; @@ -1085,7 +1093,7 @@ class Invoices extends DolibarrApi while ($obj = $this->db->fetch_object($resql)) $total_creditnote_and_deposit += $obj->amount_ttc; } else dol_print_error($this->db); - $discount->amount_ht = $discount->amount_ttc = $total_paiements + $total_creditnote_and_deposit - $this->invoice->total_ttc; + $discount->amount_ht = $discount->amount_ttc = $total_payments + $total_creditnote_and_deposit - $this->invoice->total_ttc; $discount->amount_tva = 0; $discount->tva_tx = 0; @@ -1124,18 +1132,14 @@ class Invoices extends DolibarrApi if ($result >= 0) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); throw new RestException(500, 'Could not set paid'); } } else { $this->db->commit(); } - } - else - { + } else { $this->db->rollback(); throw new RestException(500, 'Discount creation error'); } @@ -1287,12 +1291,12 @@ class Invoices extends DolibarrApi * * @param int $id Id of invoice * @param string $datepaye {@from body} Payment date {@type timestamp} - * @param int $paiementid {@from body} Payment mode Id {@min 1} + * @param int $paymentid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} - * @param string $num_paiement {@from body} Payment number (optional) - * @param string $comment {@from body} Note (optional) - * @param string $chqemetteur {@from body} Payment issuer (mandatory if paiementcode = 'CHQ') + * @param string $num_payment {@from body} Payment number (optional) + * @param string $comment {@from body} Note private (optional) + * @param string $chqemetteur {@from body} Payment issuer (mandatory if paymentcode = 'CHQ') * @param string $chqbank {@from body} Issuer bank name (optional) * * @url POST {id}/payments @@ -1303,7 +1307,7 @@ class Invoices extends DolibarrApi * @throws RestException 401 * @throws RestException 404 */ - public function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') + public function addPayment($id, $datepaye, $paymentid, $closepaidinvoices, $accountid, $num_payment = '', $comment = '', $chqemetteur = '', $chqbank = '') { global $conf; @@ -1326,8 +1330,8 @@ class Invoices extends DolibarrApi } } - if (empty($paiementid)) { - throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); + if (empty($paymentid)) { + throw new RestException(400, 'Payment ID or Payment Code is mandatory'); } @@ -1364,67 +1368,68 @@ class Invoices extends DolibarrApi // Creation of payment line - $paiement = new Paiement($this->db); - $paiement->datepaye = $datepaye; - $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id - $paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching - $paiement->paiementid = $paiementid; - $paiement->paiementcode = dol_getIdFromCode($this->db, $paiementid, 'c_paiement', 'id', 'code', 1); - $paiement->num_paiement = $num_paiement; - $paiement->note = $comment; + $paymentobj = new Paiement($this->db); + $paymentobj->datepaye = $datepaye; + $paymentobj->amounts = $amounts; // Array with all payments dispatching with invoice id + $paymentobj->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching + $paymentobj->paiementid = $paymentid; + $paymentobj->paiementcode = dol_getIdFromCode($this->db, $paymentid, 'c_paiement', 'id', 'code', 1); + $paymentobj->num_payment = $num_payment; + $paymentobj->note_private = $comment; - $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices - if ($paiement_id < 0) + $payment_id = $paymentobj->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices + if ($payment_id < 0) { $this->db->rollback(); - throw new RestException(400, 'Payment error : '.$paiement->error); + throw new RestException(400, 'Payment error : '.$paymentobj->error); } if (!empty($conf->banque->enabled)) { $label = '(CustomerInvoicePayment)'; - if ($paiement->paiementcode == 'CHQ' && empty($chqemetteur)) { - throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paiement->paiementcode); + if ($paymentobj->paiementcode == 'CHQ' && empty($chqemetteur)) { + throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paymentobj->paiementcode); } if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note - $result = $paiement->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); + $result = $paymentobj->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); if ($result < 0) { $this->db->rollback(); - throw new RestException(400, 'Add payment to bank error : '.$paiement->error); + throw new RestException(400, 'Add payment to bank error : '.$paymentobj->error); } } $this->db->commit(); - return $paiement_id; + return $payment_id; } /** * Add a payment to pay partially or completely one or several invoices. * Warning: Take care that all invoices are owned by the same customer. - * Example of value for parameter arrayofamounts: {"1": "99.99", "2": "10"} + * Example of value for parameter arrayofamounts: {"1": {"amount": "99.99", "multicurrency_amount": ""}, "2": {"amount": "", "multicurrency_amount": "10"}} * * @param array $arrayofamounts {@from body} Array with id of invoices with amount to pay for each invoice * @param string $datepaye {@from body} Payment date {@type timestamp} - * @param int $paiementid {@from body} Payment mode Id {@min 1} - * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} - * @param int $accountid {@from body} Account Id {@min 1} - * @param string $num_paiement {@from body} Payment number (optional) - * @param string $comment {@from body} Note (optional) - * @param string $chqemetteur {@from body} Payment issuer (mandatory if paiementcode = 'CHQ') - * @param string $chqbank {@from body} Issuer bank name (optional) + * @param int $paymentid {@from body} Payment mode Id {@min 1} + * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} + * @param int $accountid {@from body} Account Id {@min 1} + * @param string $num_payment {@from body} Payment number (optional) + * @param string $comment {@from body} Note private (optional) + * @param string $chqemetteur {@from body} Payment issuer (mandatory if paiementcode = 'CHQ') + * @param string $chqbank {@from body} Issuer bank name (optional) + * @param string $ref_ext {@from body} External reference (optional) + * @param bool $accepthigherpayment {@from body} Accept higher payments that it remains to be paid (optional) * * @url POST /paymentsdistributed * * @return int Payment ID - * * @throws RestException 400 * @throws RestException 401 * @throws RestException 403 * @throws RestException 404 */ - public function addPaymentDistributed($arrayofamounts, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_paiement = '', $comment = '', $chqemetteur = '', $chqbank = '') + public function addPaymentDistributed($arrayofamounts, $datepaye, $paymentid, $closepaidinvoices, $accountid, $num_payment = '', $comment = '', $chqemetteur = '', $chqbank = '', $ref_ext = '', $accepthigherpayment = false) { global $conf; @@ -1447,8 +1452,8 @@ class Invoices extends DolibarrApi throw new RestException(400, 'Account ID is mandatory'); } } - if (empty($paiementid)) { - throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); + if (empty($paymentid)) { + throw new RestException(400, 'Payment ID or Payment Code is mandatory'); } $this->db->begin(); @@ -1457,7 +1462,7 @@ class Invoices extends DolibarrApi $multicurrency_amounts = array(); // Loop on each invoice to pay - foreach ($arrayofamounts as $id => $amount) + foreach ($arrayofamounts as $id => $amountarray) { $result = $this->invoice->fetch($id); if (!$result) { @@ -1465,68 +1470,134 @@ class Invoices extends DolibarrApi throw new RestException(404, 'Invoice ID '.$id.' not found'); } - // Calculate amount to pay - $totalpaye = $this->invoice->getSommePaiement(); - $totalcreditnotes = $this->invoice->getSumCreditNotesUsed(); - $totaldeposits = $this->invoice->getSumDepositsUsed(); - $resteapayer = price2num($this->invoice->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); - if ($amount != 'remain') - { - if ($amount > $resteapayer) - { - $this->db->rollback(); - throw new RestException(400, 'Payment amount on invoice ID '.$id.' ('.$amount.') is higher than remain to pay ('.$resteapayer.')'); - } - $resteapayer = $amount; + if (($amountarray["amount"] == "remain" || $amountarray["amount"] > 0) && ($amountarray["multicurrency_amount"] == "remain" || $amountarray["multicurrency_amount"] > 0)) { + $this->db->rollback(); + throw new RestException(400, 'Payment in both currency '.$id.' ( amount: '.$amountarray["amount"].', multicurrency_amount: '.$amountarray["multicurrency_amount"].')'); } - // Clean parameters amount if payment is for a credit note - if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { - $resteapayer = price2num($resteapayer, 'MT'); - $amounts[$id] = -$resteapayer; + + $is_multicurrency = 0; + $total_ttc = $this->invoice->total_ttc; + + if ($amountarray["multicurrency_amount"] > 0 || $amountarray["multicurrency_amount"] == "remain") { + $is_multicurrency = 1; + $total_ttc = $this->invoice->multicurrency_total_ttc; + } + + // Calculate amount to pay + $totalpaye = $this->invoice->getSommePaiement($is_multicurrency); + $totalcreditnotes = $this->invoice->getSumCreditNotesUsed($is_multicurrency); + $totaldeposits = $this->invoice->getSumDepositsUsed($is_multicurrency); + $remainstopay = $amount = price2num($total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits, 'MT'); + + if (!$is_multicurrency && $amountarray["amount"] != 'remain') + { + $amount = price2num($amountarray["amount"], 'MT'); + } + + if ($is_multicurrency && $amountarray["multicurrency_amount"] != 'remain') + { + $amount = price2num($amountarray["multicurrency_amount"], 'MT'); + } + + if ($amount > $remainstopay && !$accepthigherpayment) { + $this->db->rollback(); + throw new RestException(400, 'Payment amount on invoice ID '.$id.' ('.$amount.') is higher than remain to pay ('.$remainstopay.')'); + } + + if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { + $amount = -$amount; + } + + if ($is_multicurrency) { + $amounts[$id] = null; // Multicurrency - $newvalue = price2num($this->invoice->multicurrency_total_ttc, 'MT'); - $multicurrency_amounts[$id] = -$newvalue; + $multicurrency_amounts[$id] = $amount; } else { - $resteapayer = price2num($resteapayer, 'MT'); - $amounts[$id] = $resteapayer; + $amounts[$id] = $amount; // Multicurrency - $newvalue = price2num($this->invoice->multicurrency_total_ttc, 'MT'); - $multicurrency_amounts[$id] = $newvalue; + $multicurrency_amounts[$id] = null; } } // Creation of payment line - $paiement = new Paiement($this->db); - $paiement->datepaye = $datepaye; - $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id - $paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching - $paiement->paiementid = $paiementid; - $paiement->paiementcode = dol_getIdFromCode($this->db, $paiementid, 'c_paiement', 'id', 'code', 1); - $paiement->num_paiement = $num_paiement; - $paiement->note = $comment; - $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices - if ($paiement_id < 0) + $paymentobj = new Paiement($this->db); + $paymentobj->datepaye = $datepaye; + $paymentobj->amounts = $amounts; // Array with all payments dispatching with invoice id + $paymentobj->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching + $paymentobj->paiementid = $paymentid; + $paymentobj->paiementcode = dol_getIdFromCode($this->db, $paymentid, 'c_paiement', 'id', 'code', 1); + $paymentobj->num_payment = $num_payment; + $paymentobj->note_private = $comment; + $paymentobj->ref_ext = $ref_ext; + $payment_id = $paymentobj->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices + if ($payment_id < 0) { $this->db->rollback(); - throw new RestException(400, 'Payment error : '.$paiement->error); + throw new RestException(400, 'Payment error : '.$paymentobj->error); } if (!empty($conf->banque->enabled)) { $label = '(CustomerInvoicePayment)'; - if ($paiement->paiementcode == 'CHQ' && empty($chqemetteur)) { - throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paiement->paiementcode); + if ($paymentobj->paiementcode == 'CHQ' && empty($chqemetteur)) { + throw new RestException(400, 'Emetteur is mandatory when payment code is '.$paymentobj->paiementcode); } if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note - $result = $paiement->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); + $result = $paymentobj->addPaymentToBank(DolibarrApiAccess::$user, 'payment', $label, $accountid, $chqemetteur, $chqbank); if ($result < 0) { $this->db->rollback(); - throw new RestException(400, 'Add payment to bank error : '.$paiement->error); + throw new RestException(400, 'Add payment to bank error : '.$paymentobj->error); } } $this->db->commit(); - return $paiement_id; + return $payment_id; + } + + /** + * Update a payment + * + * @param int $id Id of payment + * @param string $num_payment Payment number + * + * @url PUT payments/{id} + * + * @return array + * @throws RestException 400 Bad parameters + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + */ + public function putPayment($id, $num_payment = '') + { + require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; + + if (!DolibarrApiAccess::$user->rights->facture->creer) { + throw new RestException(401); + } + if (empty($id)) { + throw new RestException(400, 'Payment ID is mandatory'); + } + + $paymentobj = new Paiement($this->db); + $result = $paymentobj->fetch($id); + + if (!$result) { + throw new RestException(404, 'Payment not found'); + } + + if (!empty($num_payment)) { + $result = $paymentobj->update_num($num_payment); + if ($result < 0) { + throw new RestException(500, 'Error when updating the payment num'); + } + } + + return [ + 'success' => [ + 'code' => 200, + 'message' => 'Payment updated' + ] + ]; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index c5bd8a987ac..d1a6abcdec3 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -74,6 +74,11 @@ class FactureRec extends CommonInvoice */ protected $table_ref_field = 'titre'; + /** + * @var string The label of recurring invoice + */ + public $title; + public $number; public $date; public $remise; @@ -199,9 +204,10 @@ class FactureRec extends CommonInvoice * * @param User $user User object * @param int $facid Id of source invoice + * @param int $notrigger No trigger * @return int <0 if KO, id of invoice created if OK */ - public function create($user, $facid) + public function create($user, $facid, $notrigger = 0) { global $conf; @@ -221,7 +227,6 @@ class FactureRec extends CommonInvoice $this->date_when = null; } - $this->frequency = abs($this->frequency); $this->nb_gen_done = 0; $this->nb_gen_max = empty($this->nb_gen_max) ? 0 : $this->nb_gen_max; @@ -277,8 +282,8 @@ class FactureRec extends CommonInvoice $sql .= ", ".(!empty($this->note_public) ? ("'".$this->db->escape($this->note_public)."'") : "NULL"); $sql .= ", ".(!empty($this->modelpdf) ? ("'".$this->db->escape($this->modelpdf)."'") : "NULL"); $sql .= ", '".$this->db->escape($user->id)."'"; - $sql .= ", ".(!empty($facsrc->fk_project) ? "'".$facsrc->fk_project."'" : "null"); - $sql .= ", ".(!empty($facsrc->fk_account) ? "'".$facsrc->fk_account."'" : "null"); + $sql .= ", ".(!empty($facsrc->fk_project) ? "'".$this->db->escape($facsrc->fk_project)."'" : "null"); + $sql .= ", ".(!empty($facsrc->fk_account) ? "'".$this->db->escape($facsrc->fk_account)."'" : "null"); $sql .= ", ".($facsrc->cond_reglement_id > 0 ? $this->db->escape($facsrc->cond_reglement_id) : "null"); $sql .= ", ".($facsrc->mode_reglement_id > 0 ? $this->db->escape($facsrc->mode_reglement_id) : "null"); $sql .= ", ".$this->usenewprice; @@ -336,8 +341,7 @@ class FactureRec extends CommonInvoice if ($result_insert < 0) { $error++; - } - else { + } else { $objectline = new FactureLigneRec($this->db); if ($objectline->fetch($result_insert)) { @@ -377,8 +381,7 @@ class FactureRec extends CommonInvoice $error++; } } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); @@ -391,25 +394,39 @@ class FactureRec extends CommonInvoice } } + if (!$error) { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } + + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('BILLREC_CREATE', $user); + if ($result < 0) + { + $this->db->rollback(); + return -2; + } + // End call triggers + } + if ($error) { $this->db->rollback(); - } - else - { + } else { $this->db->commit(); return $this->id; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; } - } - else - { + } else { $this->db->rollback(); return -1; } @@ -460,9 +477,7 @@ class FactureRec extends CommonInvoice } $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; @@ -584,16 +599,12 @@ class FactureRec extends CommonInvoice return -3; } return 1; - } - else - { + } else { $this->error = 'Bill with id '.$rowid.' or ref '.$ref.' not found sql='.$sql; dol_syslog('Facture::Fetch Error '.$this->error, LOG_ERR); return -2; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -722,9 +733,7 @@ class FactureRec extends CommonInvoice $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -3; } @@ -766,15 +775,11 @@ class FactureRec extends CommonInvoice // Delete extrafields $res = $this->deleteExtraFields(); if ($res < 0) $error = -4; - } - else - { + } else { $this->error = $this->db->lasterror(); $error = -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $error = -2; } @@ -783,9 +788,7 @@ class FactureRec extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return $error; } @@ -860,9 +863,7 @@ class FactureRec extends CommonInvoice if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -925,7 +926,7 @@ class FactureRec extends CommonInvoice $sql .= ", fk_unit"; $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; $sql .= ") VALUES ("; - $sql .= "'".$facid."'"; + $sql .= " ".((int) $facid); $sql .= ", ".(!empty($label) ? "'".$this->db->escape($label)."'" : "null"); $sql .= ", '".$this->db->escape($desc)."'"; $sql .= ", ".price2num($pu_ht); @@ -936,7 +937,7 @@ class FactureRec extends CommonInvoice $sql .= ", '".$this->db->escape($localtaxes_type[0])."'"; $sql .= ", ".price2num($txlocaltax2); $sql .= ", '".$this->db->escape($localtaxes_type[2])."'"; - $sql .= ", ".(!empty($fk_product) ? "'".$fk_product."'" : "null"); + $sql .= ", ".(!empty($fk_product) ? "'".$this->db->escape($fk_product)."'" : "null"); $sql .= ", ".$product_type; $sql .= ", ".price2num($remise_percent); $sql .= ", ".price2num($pu_ht); @@ -969,9 +970,7 @@ class FactureRec extends CommonInvoice $this->id = $facid; $this->update_price(); return $lineId; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1045,9 +1044,7 @@ class FactureRec extends CommonInvoice if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -1091,7 +1088,7 @@ class FactureRec extends CommonInvoice } $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet_rec SET "; - $sql .= "fk_facture = '".$facid."'"; + $sql .= "fk_facture = ".((int) $facid); $sql .= ", label=".(!empty($label) ? "'".$this->db->escape($label)."'" : "null"); $sql .= ", description='".$this->db->escape($desc)."'"; $sql .= ", price=".price2num($pu_ht); @@ -1102,7 +1099,7 @@ class FactureRec extends CommonInvoice $sql .= ", localtax1_type='".$this->db->escape($localtaxes_type[0])."'"; $sql .= ", localtax2_tx=".$txlocaltax2; $sql .= ", localtax2_type='".$this->db->escape($localtaxes_type[2])."'"; - $sql .= ", fk_product=".(!empty($fk_product) ? "'".$fk_product."'" : "null"); + $sql .= ", fk_product=".(!empty($fk_product) ? "'".$this->db->escape($fk_product)."'" : "null"); $sql .= ", product_type=".$product_type; $sql .= ", remise_percent='".price2num($remise_percent)."'"; $sql .= ", subprice='".price2num($pu_ht)."'"; @@ -1131,9 +1128,7 @@ class FactureRec extends CommonInvoice $this->id = $facid; $this->update_price(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1204,13 +1199,13 @@ class FactureRec extends CommonInvoice $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture_rec'; $sql .= ' WHERE frequency > 0'; // A recurring invoice is an invoice with a frequency - $sql .= " AND (date_when IS NULL OR date_when <= '".$db->idate($today)."')"; + $sql .= " AND (date_when IS NULL OR date_when <= '".$this->db->idate($today)."')"; $sql .= ' AND (nb_gen_done < nb_gen_max OR nb_gen_max = 0)'; $sql .= ' AND suspended = 0'; $sql .= ' AND entity = '.$conf->entity; // MUST STAY = $conf->entity here if ($restrictioninvoiceid > 0) $sql .= ' AND rowid = '.$restrictioninvoiceid; - $sql .= $db->order('entity', 'ASC'); + $sql .= $this->db->order('entity', 'ASC'); //print $sql;exit; $parameters = array( 'restrictioninvoiceid' => $restrictioninvoiceid, @@ -1218,29 +1213,28 @@ class FactureRec extends CommonInvoice ); $reshook = $hookmanager->executeHooks('beforeCreationOfRecurringInvoices', $parameters, $sql); // note that $sql might be modified by hooks - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { $i = 0; - $num = $db->num_rows($resql); + $num = $this->db->num_rows($resql); if ($num) $this->output .= $langs->trans("FoundXQualifiedRecurringInvoiceTemplate", $num)."\n"; - else - $this->output .= $langs->trans("NoQualifiedRecurringInvoiceTemplateFound"); + else $this->output .= $langs->trans("NoQualifiedRecurringInvoiceTemplateFound"); $saventity = $conf->entity; while ($i < $num) // Loop on each template invoice. If $num = 0, test is false at first pass. { - $line = $db->fetch_object($resql); + $line = $this->db->fetch_object($resql); - $db->begin(); + $this->db->begin(); $invoiceidgenerated = 0; $facture = null; - $facturerec = new FactureRec($db); + $facturerec = new FactureRec($this->db); $facturerec->fetch($line->rowid); if ($facturerec->id > 0) @@ -1250,7 +1244,7 @@ class FactureRec extends CommonInvoice dol_syslog("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref.", entity=".$facturerec->entity); - $facture = new Facture($db); + $facture = new Facture($this->db); $facture->fac_rec = $facturerec->id; // We will create $facture from this recurring invoice $facture->fk_fac_rec_source = $facturerec->id; // We will create $facture from this recurring invoice @@ -1288,9 +1282,7 @@ class FactureRec extends CommonInvoice $error++; } } - } - else - { + } else { $error++; $this->error = "Failed to load invoice template with id=".$line->rowid.", entity=".$conf->entity."\n"; $this->errors[] = "Failed to load invoice template with id=".$line->rowid.", entity=".$conf->entity; @@ -1299,14 +1291,12 @@ class FactureRec extends CommonInvoice if (!$error && $invoiceidgenerated >= 0) { - $db->commit("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref); + $this->db->commit("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref); dol_syslog("createRecurringInvoices Process invoice template ".$facturerec->ref." is finished with a success generation"); $nb_create++; $this->output .= $langs->trans("InvoiceGeneratedFromTemplate", $facture->ref, $facturerec->ref)."\n"; - } - else - { - $db->rollback("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref); + } else { + $this->db->rollback("createRecurringInvoices Process invoice template id=".$facturerec->id.", ref=".$facturerec->ref); } $parameters = array( @@ -1323,8 +1313,7 @@ class FactureRec extends CommonInvoice } $conf->entity = $saventity; // Restore entity context - } - else dol_print_error($db); + } else dol_print_error($this->db); $this->output = trim($this->output); @@ -1430,69 +1419,54 @@ class FactureRec extends CommonInvoice { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans("Draft"); } } - } - elseif ($mode == 1) + } elseif ($mode == 1) { $prefix = 'Short'; if ($recur) { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $labelStatus = $langs->trans("Draft"); } } - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($recur) { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } } - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($recur) { @@ -1500,25 +1474,20 @@ class FactureRec extends CommonInvoice if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } } - } - elseif ($mode == 4) + } elseif ($mode == 4) { $prefix = ''; if ($recur) @@ -1526,25 +1495,20 @@ class FactureRec extends CommonInvoice if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } } - } - elseif ($mode == 5 || $mode == 6) + } elseif ($mode == 5 || $mode == 6) { $prefix = ''; if ($mode == 5) $prefix = 'Short'; @@ -1553,19 +1517,15 @@ class FactureRec extends CommonInvoice if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status4'; $labelStatus = $langs->trans('Active'); } - } - else - { + } else { if ($status == self::STATUS_SUSPENDED) { $statusType = 'status6'; $labelStatus = $langs->trans('Disabled'); - } - else { + } else { $statusType = 'status0'; $labelStatus = $langs->trans('Draft'); } @@ -1600,6 +1560,8 @@ class FactureRec extends CommonInvoice $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -1654,16 +1616,14 @@ class FactureRec extends CommonInvoice $line->total_ht = -100; $line->total_ttc = -119.6; $line->total_tva = -19.6; - } - elseif ($xnbp == 2) // UP is negative (free line) + } elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice = -100; $line->total_ht = -100; $line->total_ttc = -119.6; $line->total_tva = -19.6; $line->remise_percent = 0; - } - elseif ($xnbp == 3) // Discount is 50% (product line) + } elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -1671,8 +1631,7 @@ class FactureRec extends CommonInvoice $line->total_ttc = 59.8; $line->total_tva = 9.8; $line->remise_percent = 50; - } - else // (product line) + } else // (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -1761,9 +1720,7 @@ class FactureRec extends CommonInvoice $this->frequency = $frequency; if (!empty($unit)) $this->unit_frequency = $unit; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1794,9 +1751,7 @@ class FactureRec extends CommonInvoice $this->date_when = $date; if ($increment_nb_gen_done > 0) $this->nb_gen_done++; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1827,9 +1782,7 @@ class FactureRec extends CommonInvoice { $this->nb_gen_max = $nb; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1858,9 +1811,7 @@ class FactureRec extends CommonInvoice { $this->auto_validate = $validate; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1889,9 +1840,7 @@ class FactureRec extends CommonInvoice { $this->generate_pdf = $validate; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1920,9 +1869,7 @@ class FactureRec extends CommonInvoice { $this->modelpdf = $model; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -2067,9 +2014,7 @@ class FactureLigneRec extends CommonInvoiceLine $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -3; } @@ -2149,9 +2094,7 @@ class FactureLigneRec extends CommonInvoiceLine } $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 2e66cd0d240..8ec349c79f4 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -100,13 +100,13 @@ class Facture extends CommonInvoice public $author; /** - * @var int ID - */ + * @var int ID + */ public $fk_user_author; /** - * @var int ID - */ + * @var int ID + */ public $fk_user_valid; public $date; // Date invoice @@ -153,8 +153,8 @@ class Facture extends CommonInvoice public $mode_reglement_code; // Code in llx_c_paiement /** - * @var int ID Field to store bank id to use when payment mode is withdraw - */ + * @var int ID Field to store bank id to use when payment mode is withdraw + */ public $fk_bank; /** @@ -175,8 +175,8 @@ class Facture extends CommonInvoice // Multicurrency /** - * @var int ID - */ + * @var int ID + */ public $fk_multicurrency; public $multicurrency_code; @@ -323,30 +323,30 @@ class Facture extends CommonInvoice ); // END MODULEBUILDER PROPERTIES - /** - * Standard invoice - */ - const TYPE_STANDARD = 0; + /** + * Standard invoice + */ + const TYPE_STANDARD = 0; - /** - * Replacement invoice - */ - const TYPE_REPLACEMENT = 1; + /** + * Replacement invoice + */ + const TYPE_REPLACEMENT = 1; - /** - * Credit note invoice - */ - const TYPE_CREDIT_NOTE = 2; + /** + * Credit note invoice + */ + const TYPE_CREDIT_NOTE = 2; - /** - * Deposit invoice - */ - const TYPE_DEPOSIT = 3; + /** + * Deposit invoice + */ + const TYPE_DEPOSIT = 3; - /** - * Proforma invoice (should not be used. a proforma is an order) - */ - const TYPE_PROFORMA = 4; + /** + * Proforma invoice (should not be used. a proforma is an order) + */ + const TYPE_PROFORMA = 4; /** * Situation invoice @@ -407,7 +407,7 @@ class Facture extends CommonInvoice * @param int $forceduedate If set, do not recalculate due date from payment condition but force it with value * @return int <0 if KO, >0 if OK */ - public function create(User $user, $notrigger = 0, $forceduedate = 0) + public function create(User $user, $notrigger = 0, $forceduedate = 0) { global $langs, $conf, $mysoc, $hookmanager; $error = 0; @@ -458,10 +458,10 @@ class Facture extends CommonInvoice $nextdatewhen = null; $previousdaynextdatewhen = null; - // Create invoice from a template invoice + // Create invoice from a template recurring invoice if ($this->fac_rec > 0) { - $this->fk_fac_rec_source = $this->fac_rec; + $this->fk_fac_rec_source = $this->fac_rec; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture-rec.class.php'; $_facrec = new FactureRec($this->db); @@ -481,8 +481,8 @@ class Facture extends CommonInvoice // Fields coming from GUI (priority on template). TODO Value of template should be used as default value on GUI so we can use here always value from GUI $this->fk_project = GETPOST('projectid', 'int') > 0 ? ((int) GETPOST('projectid', 'int')) : $_facrec->fk_project; - $this->note_public = GETPOST('note_public', 'none') ? GETPOST('note_public', 'none') : $_facrec->note_public; - $this->note_private = GETPOST('note_private', 'none') ? GETPOST('note_private', 'none') : $_facrec->note_private; + $this->note_public = GETPOST('note_public', 'none') ? GETPOST('note_public', 'restricthtml') : $_facrec->note_public; + $this->note_private = GETPOST('note_private', 'none') ? GETPOST('note_private', 'restricthtml') : $_facrec->note_private; $this->modelpdf = GETPOST('model', 'alpha') ? GETPOST('model', 'alpha') : $_facrec->modelpdf; $this->cond_reglement_id = GETPOST('cond_reglement_id', 'int') > 0 ? ((int) GETPOST('cond_reglement_id', 'int')) : $_facrec->cond_reglement_id; $this->mode_reglement_id = GETPOST('mode_reglement_id', 'int') > 0 ? ((int) GETPOST('mode_reglement_id', 'int')) : $_facrec->mode_reglement_id; @@ -503,9 +503,9 @@ class Facture extends CommonInvoice $this->ref_client = trim($this->ref_client); $this->note_public = trim($this->note_public); $this->note_private = trim($this->note_private); - $this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->ref)); + $this->note_private = dol_concatdesc($this->note_private, $langs->trans("GeneratedFromRecurringInvoice", $_facrec->ref)); - $this->array_options = $_facrec->array_options; + $this->array_options = $_facrec->array_options; //if (! $this->remise) $this->remise = 0; if (!$this->mode_reglement_id) $this->mode_reglement_id = 0; @@ -520,12 +520,12 @@ class Facture extends CommonInvoice // For recurring invoices, update date and number of last generation of recurring template invoice, before inserting new invoice if ($_facrec->frequency > 0) { - dol_syslog("This is a recurring invoice so we set date_last_gen and next date_when"); - if (empty($_facrec->date_when)) $_facrec->date_when = $now; - $next_date = $_facrec->getNextDate(); // Calculate next date - $result = $_facrec->setValueFrom('date_last_gen', $now, '', null, 'date', '', $user, ''); - //$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1. - $result = $_facrec->setNextDate($next_date, 1); + dol_syslog("This is a recurring invoice so we set date_last_gen and next date_when"); + if (empty($_facrec->date_when)) $_facrec->date_when = $now; + $next_date = $_facrec->getNextDate(); // Calculate next date + $result = $_facrec->setValueFrom('date_last_gen', $now, '', null, 'date', '', $user, ''); + //$_facrec->setValueFrom('nb_gen_done', $_facrec->nb_gen_done + 1); // Not required, +1 already included into setNextDate when second param is 1. + $result = $_facrec->setNextDate($next_date, 1); } // Define lang of customer @@ -536,8 +536,8 @@ class Facture extends CommonInvoice if ($conf->global->MAIN_MULTILANGS && empty($newlang) && isset($this->default_lang)) $newlang = $this->default_lang; // for thirdparty if (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); } // Array of possible substitutions (See also file mailing-send.php that should manage same substitutions) @@ -567,16 +567,16 @@ class Facture extends CommonInvoice } // Define due date if not already defined - if (empty($forceduedate)) { - $duedate = $this->calculate_date_lim_reglement(); - /*if ($duedate < 0) { Regression, a date can be negative if before 1970. + if (empty($forceduedate)) { + $duedate = $this->calculate_date_lim_reglement(); + /*if ($duedate < 0) { Regression, a date can be negative if before 1970. dol_syslog(__METHOD__ . ' Error in calculate_date_lim_reglement. We got ' . $duedate, LOG_ERR); return -1; }*/ - $this->date_lim_reglement = $duedate; - } else { - $this->date_lim_reglement = $forceduedate; - } + $this->date_lim_reglement = $duedate; + } else { + $this->date_lim_reglement = $forceduedate; + } // Insert into database $socid = $this->socid; @@ -595,24 +595,24 @@ class Facture extends CommonInvoice $sql .= ", note_private"; $sql .= ", note_public"; $sql .= ", ref_client, ref_int"; - $sql .= ", fk_account"; + $sql .= ", fk_account"; $sql .= ", module_source, pos_source, fk_fac_rec_source, fk_facture_source, fk_user_author, fk_projet"; $sql .= ", fk_cond_reglement, fk_mode_reglement, date_lim_reglement, model_pdf"; $sql .= ", situation_cycle_ref, situation_counter, situation_final"; $sql .= ", fk_incoterms, location_incoterms"; - $sql .= ", fk_multicurrency"; - $sql .= ", multicurrency_code"; - $sql .= ", multicurrency_tx"; - $sql .= ", retained_warranty"; - $sql .= ", retained_warranty_date_limit"; - $sql .= ", retained_warranty_fk_cond_reglement"; + $sql .= ", fk_multicurrency"; + $sql .= ", multicurrency_code"; + $sql .= ", multicurrency_tx"; + $sql .= ", retained_warranty"; + $sql .= ", retained_warranty_date_limit"; + $sql .= ", retained_warranty_fk_cond_reglement"; $sql .= ")"; $sql .= " VALUES ("; $sql .= "'(PROV)'"; $sql .= ", ".setEntity($this); $sql .= ", ".($this->ref_ext ? "'".$this->db->escape($this->ref_ext)."'" : "null"); $sql .= ", '".$this->db->escape($this->type)."'"; - $sql .= ", '".$socid."'"; + $sql .= ", ".((int) $socid); $sql .= ", '".$this->db->idate($now)."'"; $sql .= ", ".($this->remise_absolue > 0 ? $this->remise_absolue : 'NULL'); $sql .= ", ".($this->remise_percent > 0 ? $this->remise_percent : 'NULL'); @@ -627,7 +627,7 @@ class Facture extends CommonInvoice $sql .= ", ".($this->pos_source != '' ? "'".$this->db->escape($this->pos_source)."'" : "null"); $sql .= ", ".($this->fk_fac_rec_source ? "'".$this->db->escape($this->fk_fac_rec_source)."'" : "null"); $sql .= ", ".($this->fk_facture_source ? "'".$this->db->escape($this->fk_facture_source)."'" : "null"); - $sql .= ", ".($user->id > 0 ? "'".$user->id."'" : "null"); + $sql .= ", ".($user->id > 0 ? (int) $user->id : "null"); $sql .= ", ".($this->fk_project ? $this->fk_project : "null"); $sql .= ", ".$this->cond_reglement_id; $sql .= ", ".$this->mode_reglement_id; @@ -636,7 +636,7 @@ class Facture extends CommonInvoice $sql .= ", ".($this->situation_counter ? "'".$this->db->escape($this->situation_counter)."'" : "null"); $sql .= ", ".($this->situation_final ? $this->situation_final : 0); $sql .= ", ".(int) $this->fk_incoterms; - $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; + $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; $sql .= ", ".(int) $this->fk_multicurrency; $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; $sql .= ", ".(double) $this->multicurrency_tx; @@ -667,28 +667,27 @@ class Facture extends CommonInvoice { foreach ($this->linked_objects as $origin => $tmp_origin_id) { - if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) - { - foreach ($tmp_origin_id as $origin_id) - { - $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { - $this->error = $this->db->lasterror(); - $error++; - } - } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) - { - $origin_id = $tmp_origin_id; - $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { - $this->error = $this->db->lasterror(); - $error++; - } - } + if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) + { + foreach ($tmp_origin_id as $origin_id) + { + $ret = $this->add_object_linked($origin, $origin_id); + if (!$ret) + { + $this->error = $this->db->lasterror(); + $error++; + } + } + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + { + $origin_id = $tmp_origin_id; + $ret = $this->add_object_linked($origin, $origin_id); + if (!$ret) + { + $this->error = $this->db->lasterror(); + $error++; + } + } } } @@ -699,35 +698,34 @@ class Facture extends CommonInvoice $originidforcontact = $this->origin_id; if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order { - require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; - $exp = new Expedition($this->db); - $exp->fetch($this->origin_id); - $exp->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0); - if (count($exp->linkedObjectsIds['commande']) > 0) - { - foreach ($exp->linkedObjectsIds['commande'] as $key => $value) - { - $originforcontact = 'commande'; - if (is_object($value)) $originidforcontact = $value->id; - else $originidforcontact = $value; - break; // We take first one - } - } + require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; + $exp = new Expedition($this->db); + $exp->fetch($this->origin_id); + $exp->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0); + if (count($exp->linkedObjectsIds['commande']) > 0) + { + foreach ($exp->linkedObjectsIds['commande'] as $key => $value) + { + $originforcontact = 'commande'; + if (is_object($value)) $originidforcontact = $value->id; + else $originidforcontact = $value; + break; // We take first one + } + } } $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sqlcontact .= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; + $sqlcontact .= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$this->db->escape($originforcontact)."'"; $resqlcontact = $this->db->query($sqlcontact); if ($resqlcontact) { - while ($objcontact = $this->db->fetch_object($resqlcontact)) - { - //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; - $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object - } - } - else dol_print_error($resqlcontact); + while ($objcontact = $this->db->fetch_object($resqlcontact)) + { + //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; + $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object + } + } else dol_print_error($resqlcontact); } /* @@ -766,12 +764,12 @@ class Facture extends CommonInvoice $newinvoiceline->fk_parent_line = $fk_parent_line; if ($this->type === Facture::TYPE_REPLACEMENT && $newinvoiceline->fk_remise_except) { - $discount = new DiscountAbsolute($this->db); - $discount->fetch($newinvoiceline->fk_remise_except); + $discount = new DiscountAbsolute($this->db); + $discount->fetch($newinvoiceline->fk_remise_except); - $discountId = $soc->set_remise_except($discount->amount_ht, $user, $discount->description, $discount->tva_tx); - $newinvoiceline->fk_remise_except = $discountId; - } + $discountId = $soc->set_remise_except($discount->amount_ht, $user, $discount->description, $discount->tva_tx); + $newinvoiceline->fk_remise_except = $discountId; + } $result = $newinvoiceline->insert(); @@ -787,8 +785,7 @@ class Facture extends CommonInvoice break; } } - } - elseif (!$error && empty($this->fac_rec)) // If this->lines is an array of invoice line arrays + } elseif (!$error && empty($this->fac_rec)) // If this->lines is an array of invoice line arrays { $fk_parent_line = 0; @@ -796,13 +793,13 @@ class Facture extends CommonInvoice foreach ($this->lines as $i => $val) { - $line = $this->lines[$i]; + $line = $this->lines[$i]; - // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array - //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. - if (!is_object($line)) $line = (object) $line; + // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array + //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. + if (!is_object($line)) $line = (object) $line; - if ($result >= 0) + if ($result >= 0) { // Reset fk_parent_line for no child products and special product if (($line->product_type != 9 && empty($line->fk_parent_line)) || $line->product_type == 9) { @@ -821,7 +818,12 @@ class Facture extends CommonInvoice $origintype = $this->element; } - $result = $this->addline( + // init ref_ext + if (empty($line->ref_ext)) { + $line->ref_ext = ''; + } + + $result = $this->addline( $line->desc, $line->subprice, $line->qty, @@ -840,8 +842,8 @@ class Facture extends CommonInvoice $line->product_type, $line->rang, $line->special_code, - $origintype, - $originid, + $origintype, + $originid, $fk_parent_line, $line->fk_fournprice, $line->pa_ht, @@ -850,7 +852,8 @@ class Facture extends CommonInvoice $line->situation_percent, $line->fk_prev_id, $line->fk_unit, - $line->pu_ht_devise + $line->pu_ht_devise, + $line->ref_ext ); if ($result < 0) { @@ -899,26 +902,26 @@ class Facture extends CommonInvoice $buyprice = empty($_facrec->lines[$i]->buyprice) ? 0 : $_facrec->lines[$i]->buyprice; // If buyprice not defined from template invoice, we try to guess the best value if (!$buyprice && $_facrec->lines[$i]->fk_product > 0) - { - require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $producttmp = new ProductFournisseur($this->db); - $producttmp->fetch($_facrec->lines[$i]->fk_product); + { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + $producttmp = new ProductFournisseur($this->db); + $producttmp->fetch($_facrec->lines[$i]->fk_product); - // If margin module defined on costprice, we try the costprice - // If not defined or if module margin defined and pmp and stock module enabled, we try pmp price - // else we get the best supplier price - if ($conf->global->MARGIN_TYPE == 'costprice' && !empty($producttmp->cost_price)) $buyprice = $producttmp->cost_price; - elseif (!empty($conf->stock->enabled) && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && !empty($producttmp->pmp)) $buyprice = $producttmp->pmp; - else { - if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0) - { - if ($producttmp->product_fourn_price_id > 0) - { - $buyprice = price2num($producttmp->fourn_unitprice * (1 - $producttmp->fourn_remise_percent / 100) + $producttmp->fourn_remise, 'MU'); - } - } - } - } + // If margin module defined on costprice, we try the costprice + // If not defined or if module margin defined and pmp and stock module enabled, we try pmp price + // else we get the best supplier price + if ($conf->global->MARGIN_TYPE == 'costprice' && !empty($producttmp->cost_price)) $buyprice = $producttmp->cost_price; + elseif (!empty($conf->stock->enabled) && ($conf->global->MARGIN_TYPE == 'costprice' || $conf->global->MARGIN_TYPE == 'pmp') && !empty($producttmp->pmp)) $buyprice = $producttmp->pmp; + else { + if ($producttmp->find_min_price_product_fournisseur($_facrec->lines[$i]->fk_product) > 0) + { + if ($producttmp->product_fourn_price_id > 0) + { + $buyprice = price2num($producttmp->fourn_unitprice * (1 - $producttmp->fourn_remise_percent / 100) + $producttmp->fourn_remise, 'MU'); + } + } + } + } $result_insert = $this->addline( $_facrec->lines[$i]->desc, @@ -942,7 +945,7 @@ class Facture extends CommonInvoice '', 0, 0, - $fk_product_fournisseur_price, + $fk_product_fournisseur_price, $buyprice, $_facrec->lines[$i]->label, empty($_facrec->lines[$i]->array_options) ?null:$_facrec->lines[$i]->array_options, @@ -971,45 +974,37 @@ class Facture extends CommonInvoice // Actions on extra fields if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) $error++; + $result = $this->insertExtraFields(); + if ($result < 0) $error++; } - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('BILL_CREATE', $user); - if ($result < 0) $error++; - // End call triggers - } + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('BILL_CREATE', $user); + if ($result < 0) $error++; + // End call triggers + } if (!$error) { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -4; } - } - else - { + } else { $this->error = $langs->trans('FailedToUpdatePrice'); $this->db->rollback(); return -3; } - } - else - { + } else { dol_syslog(get_class($this)."::create error ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -1024,7 +1019,7 @@ class Facture extends CommonInvoice * @param int $invertdetail Reverse sign of amounts for lines * @return int <0 if KO, >0 if OK */ - public function createFromCurrent(User $user, $invertdetail = 0) + public function createFromCurrent(User $user, $invertdetail = 0) { global $conf; @@ -1035,13 +1030,13 @@ class Facture extends CommonInvoice // fetch optionals attributes and labels $this->fetch_optionals(); - if (!empty($this->array_options)) { - $facture->array_options = $this->array_options; - } + if (!empty($this->array_options)) { + $facture->array_options = $this->array_options; + } - foreach ($this->lines as &$line) { - $line->fetch_optionals(); //fetch extrafields - } + foreach ($this->lines as &$line) { + $line->fetch_optionals(); //fetch extrafields + } $facture->fk_facture_source = $this->fk_facture_source; $facture->type = $this->type; @@ -1067,9 +1062,9 @@ class Facture extends CommonInvoice $facture->situation_cycle_ref = $this->situation_cycle_ref; $facture->situation_final = $this->situation_final; - $facture->retained_warranty = $this->retained_warranty; - $facture->retained_warranty_fk_cond_reglement = $this->retained_warranty_fk_cond_reglement; - $facture->retained_warranty_date_limit = $this->retained_warranty_date_limit; + $facture->retained_warranty = $this->retained_warranty; + $facture->retained_warranty_fk_cond_reglement = $this->retained_warranty_fk_cond_reglement; + $facture->retained_warranty_date_limit = $this->retained_warranty_date_limit; // Loop on each line of new invoice @@ -1084,6 +1079,7 @@ class Facture extends CommonInvoice $facture->lines[$i]->total_localtax1 = -$facture->lines[$i]->total_localtax1; $facture->lines[$i]->total_localtax2 = -$facture->lines[$i]->total_localtax2; $facture->lines[$i]->total_ttc = -$facture->lines[$i]->total_ttc; + $facture->lines[$i]->ref_ext = ''; } } @@ -1094,8 +1090,7 @@ class Facture extends CommonInvoice { $this->error = $facture->error; $this->errors = $facture->errors; - } - elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) + } elseif ($this->type == self::TYPE_SITUATION && !empty($conf->global->INVOICE_USE_SITUATION)) { $this->fetchObjectLinked('', '', $this->id, 'facture'); @@ -1117,7 +1112,7 @@ class Facture extends CommonInvoice /** * Load an object from its id and create a new one in database * - * @param User $user User that clone + * @param User $user User that clone * @param int $fromid Id of object to clone * @return int New id of clone */ @@ -1140,11 +1135,11 @@ class Facture extends CommonInvoice if ($objsoc->fetch($this->socid) > 0) { - $object->socid = $objsoc->id; - $object->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); - $object->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); - $object->fk_project = ''; - $object->fk_delivery_address = ''; + $object->socid = $objsoc->id; + $object->cond_reglement_id = (!empty($objsoc->cond_reglement_id) ? $objsoc->cond_reglement_id : 0); + $object->mode_reglement_id = (!empty($objsoc->mode_reglement_id) ? $objsoc->mode_reglement_id : 0); + $object->fk_project = ''; + $object->fk_delivery_address = ''; } // TODO Change product price if multi-prices @@ -1173,14 +1168,14 @@ class Facture extends CommonInvoice // Loop on each line of new invoice foreach ($object->lines as $i => $line) { - if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts + if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts { - unset($object->lines[$i]); - unset($object->products[$i]); // Tant que products encore utilise + unset($object->lines[$i]); + unset($object->products[$i]); // Tant que products encore utilise } // Bloc to update dates of service (month by month only if previously filled at 1d near start or end of month) // If it's a service with start and end dates - if (!empty($line->date_start) && !empty($line->date_end) ) { + if (!empty($line->date_start) && !empty($line->date_end)) { // Get the dates $start = dol_getdate($line->date_start); $end = dol_getdate($line->date_end); @@ -1202,6 +1197,8 @@ class Facture extends CommonInvoice $object->lines[$i]->date_end = $newLast; } } + + $object->lines[$i]->ref_ext = ''; // Do not clone ref_ext } // Create clone @@ -1210,13 +1207,13 @@ class Facture extends CommonInvoice if ($result < 0) $error++; else { // copy internal contacts - if ($object->copy_linked_contact($this, 'internal') < 0) + if ($object->copy_linked_contact($this, 'internal') < 0) $error++; // copy external contacts if same company elseif ($this->socid == $object->socid) { - if ($object->copy_linked_contact($this, 'external') < 0) + if ($object->copy_linked_contact($this, 'external') < 0) $error++; } } @@ -1240,9 +1237,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1255,7 +1250,7 @@ class Facture extends CommonInvoice * @param User $user Object user * @return int <0 if KO, 0 if nothing done, 1 if OK */ - public function createFromOrder($object, User $user) + public function createFromOrder($object, User $user) { global $conf, $hookmanager; @@ -1308,7 +1303,7 @@ class Facture extends CommonInvoice $marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht); $line->pa_ht = $marginInfos[0]; - // get extrafields from original line + // get extrafields from original line $object->lines[$i]->fetch_optionals(); foreach ($object->lines[$i]->array_options as $options_key => $value) $line->array_options[$options_key] = $value; @@ -1325,22 +1320,22 @@ class Facture extends CommonInvoice $this->demand_reason_id = $object->demand_reason_id; $this->date_livraison = $object->date_livraison; $this->fk_delivery_address = $object->fk_delivery_address; // deprecated - $this->contact_id = $object->contactid; + $this->contact_id = $object->contact_id; $this->ref_client = $object->ref_client; if (empty($conf->global->MAIN_DISABLE_PROPAGATE_NOTES_FROM_ORIGIN)) { - $this->note_private = $object->note_private; - $this->note_public = $object->note_public; + $this->note_private = $object->note_private; + $this->note_public = $object->note_public; } - $this->module_source = $object->module_source; + $this->module_source = $object->module_source; $this->pos_source = $object->pos_source; $this->origin = $object->element; $this->origin_id = $object->id; - // get extrafields from original line + // get extrafields from original line $object->fetch_optionals(); foreach ($object->array_options as $options_key => $value) $this->array_options[$options_key] = $value; @@ -1367,10 +1362,8 @@ class Facture extends CommonInvoice if (!$error) { return 1; - } - else return -1; - } - else return -1; + } else return -1; + } else return -1; } /** @@ -1381,13 +1374,13 @@ class Facture extends CommonInvoice * @param int $max Maxlength of ref * @param int $short 1=Return just URL * @param string $moretitle Add more text to title tooltip - * @param int $notooltip 1=Disable tooltip - * @param int $addlinktonotes 1=Add link to notes - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @param string $target Target of link ('', '_self', '_blank', '_parent', '_backoffice', ...) + * @param int $notooltip 1=Disable tooltip + * @param int $addlinktonotes 1=Add link to notes + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param string $target Target of link ('', '_self', '_blank', '_parent', '_backoffice', ...) * @return string String with URL */ - public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1, $target = '') + public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $addlinktonotes = 0, $save_lastsearch_value = -1, $target = '') { global $langs, $conf, $user, $mysoc; @@ -1398,8 +1391,8 @@ class Facture extends CommonInvoice if ($option == 'withdraw') $url = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$this->id; else $url = DOL_URL_ROOT.'/compta/facture/card.php?facid='.$this->id; - if (!$user->rights->facture->lire) - $option = 'nolink'; + if (!$user->rights->facture->lire) + $option = 'nolink'; if ($option !== 'nolink') { @@ -1415,56 +1408,56 @@ class Facture extends CommonInvoice if ($this->type == self::TYPE_REPLACEMENT) $picto .= 'r'; // Replacement invoice if ($this->type == self::TYPE_CREDIT_NOTE) $picto .= 'a'; // Credit note if ($this->type == self::TYPE_DEPOSIT) $picto .= 'd'; // Deposit invoice - $label = ''; + $label = ''; - if ($user->rights->facture->lire) { - $label = ''.$langs->trans("Invoice").''; - if ($this->type == self::TYPE_REPLACEMENT) $label = ''.$langs->transnoentitiesnoconv("ReplacementInvoice").''; - if ($this->type == self::TYPE_CREDIT_NOTE) $label = ''.$langs->transnoentitiesnoconv("CreditNote").''; - if ($this->type == self::TYPE_DEPOSIT) $label = ''.$langs->transnoentitiesnoconv("Deposit").''; - if ($this->type == self::TYPE_SITUATION) $label = ''.$langs->transnoentitiesnoconv("InvoiceSituation").''; - if (!empty($this->ref)) - $label .= '
    '.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->ref_client)) - $label .= '
    '.$langs->trans('RefCustomer').': '.$this->ref_client; - if (!empty($this->date)) - $label .= '
    '.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); - if (!empty($this->total_ht)) - $label .= '
    '.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_tva)) - $label .= '
    '.$langs->trans('AmountVAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_localtax1) && $this->total_localtax1 != 0) // We keep test != 0 because $this->total_localtax1 can be '0.00000000' - $label .= '
    '.$langs->transcountry('AmountLT1', $mysoc->country_code).': '.price($this->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_localtax2) && $this->total_localtax2 != 0) - $label .= '
    '.$langs->transcountry('AmountLT2', $mysoc->country_code).': '.price($this->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_ttc)) - $label .= '
    '.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); - if ($moretitle) $label .= ' - '.$moretitle; - if (isset($this->statut) && isset($this->alreadypaid)) { - $label .= '
    '.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid); - } - } + if ($user->rights->facture->lire) { + $label = img_picto('', $this->picto).' '.$langs->trans("Invoice").''; + if ($this->type == self::TYPE_REPLACEMENT) $label = ''.$langs->transnoentitiesnoconv("ReplacementInvoice").''; + if ($this->type == self::TYPE_CREDIT_NOTE) $label = ''.$langs->transnoentitiesnoconv("CreditNote").''; + if ($this->type == self::TYPE_DEPOSIT) $label = ''.$langs->transnoentitiesnoconv("Deposit").''; + if ($this->type == self::TYPE_SITUATION) $label = ''.$langs->transnoentitiesnoconv("InvoiceSituation").''; + if (!empty($this->ref)) + $label .= '
    '.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->ref_client)) + $label .= '
    '.$langs->trans('RefCustomer').': '.$this->ref_client; + if (!empty($this->date)) + $label .= '
    '.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); + if (!empty($this->total_ht)) + $label .= '
    '.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_tva)) + $label .= '
    '.$langs->trans('AmountVAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_localtax1) && $this->total_localtax1 != 0) // We keep test != 0 because $this->total_localtax1 can be '0.00000000' + $label .= '
    '.$langs->transcountry('AmountLT1', $mysoc->country_code).': '.price($this->total_localtax1, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_localtax2) && $this->total_localtax2 != 0) + $label .= '
    '.$langs->transcountry('AmountLT2', $mysoc->country_code).': '.price($this->total_localtax2, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_ttc)) + $label .= '
    '.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); + if ($moretitle) $label .= ' - '.$moretitle; + if (isset($this->statut) && isset($this->alreadypaid)) { + $label .= '
    '.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid); + } + } $linkclose = ($target ? ' target="'.$target.'"' : ''); if (empty($notooltip) && $user->rights->facture->lire) { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label = $langs->trans("Invoice"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip"'; + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label = $langs->trans("Invoice"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip"'; } - $linkstart = ''; + $linkstart = ''; $linkend = ''; - if ($option == 'nolink') { - $linkstart = ''; - $linkend = ''; - } + if ($option == 'nolink') { + $linkstart = ''; + $linkend = ''; + } $result .= $linkstart; if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); @@ -1473,19 +1466,19 @@ class Facture extends CommonInvoice if ($addlinktonotes) { - $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { - //$notetoshow = $langs->trans("ViewPrivateNote").':
    '.dol_string_nohtmltag($txttoshow, 1); - $notetoshow = $langs->trans("ViewPrivateNote").':
    '.$txttoshow; - $result .= ' '; - $result .= ''; - $result .= img_picto('', 'note'); - $result .= ''; - //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); - //$result.=''; - $result .= ''; - } + $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); + if ($txttoshow) + { + //$notetoshow = $langs->trans("ViewPrivateNote").':
    '.dol_string_nohtmltag($txttoshow, 1); + $notetoshow = $langs->trans("ViewPrivateNote").':
    '.$txttoshow; + $result .= ' '; + $result .= ''; + $result .= img_picto('', 'note'); + $result .= ''; + //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); + //$result.=''; + $result .= ''; + } } return $result; @@ -1523,10 +1516,10 @@ class Facture extends CommonInvoice $sql .= ", f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc"; $sql .= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql .= ', c.code as cond_reglement_code, c.libelle as cond_reglement_libelle, c.libelle_facture as cond_reglement_libelle_doc'; - $sql .= ', f.fk_incoterms, f.location_incoterms'; - $sql .= ', f.module_source, f.pos_source'; - $sql .= ", i.libelle as label_incoterms"; - $sql .= ", f.retained_warranty as retained_warranty, f.retained_warranty_date_limit as retained_warranty_date_limit, f.retained_warranty_fk_cond_reglement as retained_warranty_fk_cond_reglement"; + $sql .= ', f.fk_incoterms, f.location_incoterms'; + $sql .= ', f.module_source, f.pos_source'; + $sql .= ", i.libelle as label_incoterms"; + $sql .= ", f.retained_warranty as retained_warranty, f.retained_warranty_date_limit as retained_warranty_date_limit, f.retained_warranty_fk_cond_reglement as retained_warranty_fk_cond_reglement"; $sql .= ' FROM '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_payment_term as c ON f.fk_cond_reglement = c.rowid'; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as p ON f.fk_mode_reglement = p.id'; @@ -1597,7 +1590,8 @@ class Facture extends CommonInvoice $this->note_public = $obj->note_public; $this->user_author = $obj->fk_user_author; $this->user_valid = $obj->fk_user_valid; - $this->modelpdf = $obj->model_pdf; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated $this->last_main_doc = $obj->last_main_doc; $this->situation_cycle_ref = $obj->situation_cycle_ref; $this->situation_counter = $obj->situation_counter; @@ -1645,23 +1639,19 @@ class Facture extends CommonInvoice return -3; } return 1; - } - else - { + } else { $this->error = 'Invoice with id='.$rowid.' or ref='.$ref.' or ref_ext='.$ref_ext.' not found'; dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load all detailed lines into this->lines * @@ -1673,11 +1663,11 @@ class Facture extends CommonInvoice public function fetch_lines($only_product = 0, $loadalsotranslation = 0) { global $langs, $conf; - // phpcs:enable + // phpcs:enable $this->lines = array(); $sql = 'SELECT l.rowid, l.fk_facture, l.fk_product, l.fk_parent_line, l.label as custom_label, l.description, l.product_type, l.price, l.qty, l.vat_src_code, l.tva_tx,'; - $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice,'; + $sql .= ' l.localtax1_tx, l.localtax2_tx, l.localtax1_type, l.localtax2_type, l.remise_percent, l.fk_remise_except, l.subprice, l.ref_ext,'; $sql .= ' l.situation_percent, l.fk_prev_id,'; $sql .= ' l.rang, l.special_code,'; $sql .= ' l.date_start as date_start, l.date_end as date_end,'; @@ -1716,8 +1706,9 @@ class Facture extends CommonInvoice $line->fk_product_type = $objp->fk_product_type; // Type of product $line->qty = $objp->qty; $line->subprice = $objp->subprice; + $line->ref_ext = $objp->ref_ext; // line external ref - $line->vat_src_code = $objp->vat_src_code; + $line->vat_src_code = $objp->vat_src_code; $line->tva_tx = $objp->tva_tx; $line->localtax1_tx = $objp->localtax1_tx; $line->localtax2_tx = $objp->localtax2_tx; @@ -1760,14 +1751,14 @@ class Facture extends CommonInvoice $line->multicurrency_total_tva = $objp->multicurrency_total_tva; $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; - $line->fetch_optionals(); + $line->fetch_optionals(); // multilangs - if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { - $line = new Product($this->db); - $line->fetch($objp->fk_product); - $line->getMultiLangs(); - } + if (!empty($conf->global->MAIN_MULTILANGS) && !empty($objp->fk_product) && !empty($loadalsotranslation)) { + $line = new Product($this->db); + $line->fetch($objp->fk_product); + $line->getMultiLangs(); + } $this->lines[$i] = $line; @@ -1775,9 +1766,7 @@ class Facture extends CommonInvoice } $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->error(); return -3; } @@ -1789,7 +1778,7 @@ class Facture extends CommonInvoice * * @return void */ - public function fetchPreviousNextSituationInvoice() + public function fetchPreviousNextSituationInvoice() { global $conf; @@ -1811,15 +1800,13 @@ class Facture extends CommonInvoice $invoice = new Facture($this->db); if ($invoice->fetch($objp->rowid) > 0) { - if ($objp->situation_counter < $this->situation_counter - || ($objp->situation_counter == $this->situation_counter && $objp->rowid < $this->id) // This case appear when there are credit notes - ) + if ($objp->situation_counter < $this->situation_counter + || ($objp->situation_counter == $this->situation_counter && $objp->rowid < $this->id) // This case appear when there are credit notes + ) { - $this->tab_previous_situation_invoice[] = $invoice; - } - else - { - $this->tab_next_situation_invoice[] = $invoice; + $this->tab_previous_situation_invoice[] = $invoice; + } else { + $this->tab_next_situation_invoice[] = $invoice; } } } @@ -1833,7 +1820,7 @@ class Facture extends CommonInvoice * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int <0 if KO, >0 if OK */ - public function update(User $user, $notrigger = 0) + public function update(User $user, $notrigger = 0) { global $conf; @@ -1842,6 +1829,7 @@ class Facture extends CommonInvoice // Clean parameters if (empty($this->type)) $this->type = self::TYPE_STANDARD; if (isset($this->ref)) $this->ref = trim($this->ref); + if (isset($this->ref_ext)) $this->ref_ext = trim($this->ref_ext); if (isset($this->ref_client)) $this->ref_client = trim($this->ref_client); if (isset($this->increment)) $this->increment = trim($this->increment); if (isset($this->close_code)) $this->close_code = trim($this->close_code); @@ -1849,7 +1837,7 @@ class Facture extends CommonInvoice if (isset($this->note) || isset($this->note_private)) $this->note = (isset($this->note) ? trim($this->note) : trim($this->note_private)); // deprecated if (isset($this->note) || isset($this->note_private)) $this->note_private = (isset($this->note_private) ? trim($this->note_private) : trim($this->note)); if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->modelpdf)) $this->modelpdf = trim($this->modelpdf); + if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf); if (isset($this->import_key)) $this->import_key = trim($this->import_key); if (isset($this->retained_warranty)) $this->retained_warranty = floatval($this->retained_warranty); @@ -1860,6 +1848,7 @@ class Facture extends CommonInvoice // Update request $sql = "UPDATE ".MAIN_DB_PREFIX."facture SET"; $sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; + $sql .= " ref_ext=".(isset($this->ref_ext) ? "'".$this->db->escape($this->ref_ext)."'" : "null").","; $sql .= " type=".(isset($this->type) ? $this->db->escape($this->type) : "null").","; $sql .= " ref_client=".(isset($this->ref_client) ? "'".$this->db->escape($this->ref_client)."'" : "null").","; $sql .= " increment=".(isset($this->increment) ? "'".$this->db->escape($this->increment)."'" : "null").","; @@ -1934,25 +1923,23 @@ class Facture extends CommonInvoice } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add a discount line into an invoice (as an invoice line) using an existing absolute discount (Consume the discount) * * @param int $idremise Id of absolute discount * @return int >0 if OK, <0 if KO */ - public function insert_discount($idremise) + public function insert_discount($idremise) { - // phpcs:enable + // phpcs:enable global $langs; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -1988,12 +1975,12 @@ class Facture extends CommonInvoice // Get buy/cost price of invoice that is source of discount if ($remise->fk_facture_source > 0) { - $srcinvoice = new Facture($this->db); - $srcinvoice->fetch($remise->fk_facture_source); - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; // TODO Move this into commonobject - $formmargin = new FormMargin($this->db); - $arraytmp = $formmargin->getMarginInfosArray($srcinvoice, false); - $facligne->pa_ht = $arraytmp['pa_total']; + $srcinvoice = new Facture($this->db); + $srcinvoice->fetch($remise->fk_facture_source); + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; // TODO Move this into commonobject + $formmargin = new FormMargin($this->db); + $arraytmp = $formmargin->getMarginInfosArray($srcinvoice, false); + $facligne->pa_ht = $arraytmp['pa_total']; } $facligne->total_ht = -$remise->amount_ht; @@ -2022,29 +2009,23 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { $this->error = $facligne->error; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $facligne->error; $this->db->rollback(); return -2; } - } - else - { + } else { $this->db->rollback(); return -3; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set customer ref * @@ -2052,10 +2033,10 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function set_ref_client($ref_client, $notrigger = 0) + public function set_ref_client($ref_client, $notrigger = 0) { - // phpcs:enable - global $user; + // phpcs:enable + global $user; $error = 0; @@ -2064,8 +2045,7 @@ class Facture extends CommonInvoice $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture'; if (empty($ref_client)) $sql .= ' SET ref_client = NULL'; - else - $sql .= ' SET ref_client = \''.$this->db->escape($ref_client).'\''; + else $sql .= ' SET ref_client = \''.$this->db->escape($ref_client).'\''; $sql .= ' WHERE rowid = '.$this->id; dol_syslog(__METHOD__.' this->id='.$this->id.', ref_client='.$ref_client, LOG_DEBUG); @@ -2095,9 +2075,7 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -2116,7 +2094,7 @@ class Facture extends CommonInvoice * @param int $idwarehouse Id warehouse to use for stock change. * @return int <0 if KO, 0=Refused, >0 if OK */ - public function delete($user, $notrigger = 0, $idwarehouse = -1) + public function delete($user, $notrigger = 0, $idwarehouse = -1) { global $langs, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2136,10 +2114,10 @@ class Facture extends CommonInvoice if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('BILL_DELETE', $user); - if ($result < 0) $error++; - // End call triggers + // Call trigger + $result = $this->call_trigger('BILL_DELETE', $user); + if ($result < 0) $error++; + // End call triggers } // Removed extrafields @@ -2211,7 +2189,7 @@ class Facture extends CommonInvoice } } - // Invoice line extrafileds + // Invoice line extrafileds $main = MAIN_DB_PREFIX.'facturedet'; $ef = $main."_extrafields"; $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_facture = $rowid)"; @@ -2264,29 +2242,23 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror()." sql=".$sql; $this->db->rollback(); return -6; } - } - else - { + } else { $this->error = $this->db->lasterror()." sql=".$sql; $this->db->rollback(); return -4; } - } - else - { + } else { $this->db->rollback(); return -2; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Tag the invoice as paid completely (if close_code is filled) => this->fk_statut=2, this->paye=1 * or partialy (if close_code filled) + appel trigger BILL_PAYED => this->fk_statut=2, this->paye stay 0 @@ -2296,9 +2268,9 @@ class Facture extends CommonInvoice * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet (cas escompte par exemple) * @return int <0 if KO, >0 if OK */ - public function set_paid($user, $close_code = '', $close_note = '') + public function set_paid($user, $close_code = '', $close_note = '') { - // phpcs:enable + // phpcs:enable $error = 0; if ($this->paye != 1) @@ -2321,13 +2293,11 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Call trigger - $result = $this->call_trigger('BILL_PAYED', $user); - if ($result < 0) $error++; - // End call triggers - } - else - { + // Call trigger + $result = $this->call_trigger('BILL_PAYED', $user); + if ($result < 0) $error++; + // End call triggers + } else { $error++; $this->error = $this->db->lasterror(); } @@ -2336,21 +2306,17 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Tag la facture comme non payee completement + appel trigger BILL_UNPAYED * Fonction utilisee quand un paiement prelevement est refuse, @@ -2359,9 +2325,9 @@ class Facture extends CommonInvoice * @param User $user Object user that change status * @return int <0 if KO, >0 if OK */ - public function set_unpaid($user) + public function set_unpaid($user) { - // phpcs:enable + // phpcs:enable $error = 0; $this->db->begin(); @@ -2376,13 +2342,11 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Call trigger - $result = $this->call_trigger('BILL_UNPAYED', $user); - if ($result < 0) $error++; - // End call triggers - } - else - { + // Call trigger + $result = $this->call_trigger('BILL_UNPAYED', $user); + if ($result < 0) $error++; + // End call triggers + } else { $error++; $this->error = $this->db->error(); dol_print_error($this->db); @@ -2392,16 +2356,14 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Tag invoice as canceled, with no payment on it (example for replacement invoice or payment never received) + call trigger BILL_CANCEL * Warning, if option to decrease stock on invoice was set, this function does not change stock (it might be a cancel because @@ -2412,9 +2374,9 @@ class Facture extends CommonInvoice * @param string $close_note Comment * @return int <0 if KO, >0 if OK */ - public function set_canceled($user, $close_code = '', $close_note = '') + public function set_canceled($user, $close_code = '', $close_note = '') { - // phpcs:enable + // phpcs:enable dol_syslog(get_class($this)."::set_canceled rowid=".$this->id, LOG_DEBUG); @@ -2438,27 +2400,23 @@ class Facture extends CommonInvoice $resql = $this->db->query($sql); if ($resql) { - // Call trigger - $result = $this->call_trigger('BILL_CANCEL', $user); - if ($result < 0) - { + // Call trigger + $result = $this->call_trigger('BILL_CANCEL', $user); + if ($result < 0) + { $this->db->rollback(); return -1; } - // End call triggers + // End call triggers $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -2; @@ -2473,11 +2431,11 @@ class Facture extends CommonInvoice * @param string $force_number Reference to force on invoice * @param int $idwarehouse Id of warehouse to use for stock decrease if option to decreasenon stock is on (0=no decrease) * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @param int $batch_rule [=0] 0 not decrement batch, else batch rule to use + * @param int $batch_rule 0=do not decrement batch, else batch rule to use * 1=take in batches ordered by sellby and eatby dates - * @return int <0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK + * @return int <0 if KO, 0=Nothing done because invoice is not a draft, >0 if OK */ - public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0, $batch_rule = 0) + public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0, $batch_rule = 0) { global $conf, $langs; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -2508,12 +2466,12 @@ class Facture extends CommonInvoice } if (count($this->lines) <= 0) { - $langs->load("errors"); + $langs->load("errors"); $this->error = $langs->trans("ErrorObjectMustHaveLinesToBeValidated", $this->ref); return -1; } if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->invoice_advance->validate))) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->facture->invoice_advance->validate))) { $this->error = 'Permission denied'; dol_syslog(get_class($this)."::validate ".$this->error.' MAIN_USE_ADVANCED_PERMS='.$conf->global->MAIN_USE_ADVANCED_PERMS, LOG_ERR); @@ -2567,8 +2525,7 @@ class Facture extends CommonInvoice if ($force_number) { $num = $force_number; - } - elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life + } elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { if (!empty($conf->global->FAC_FORCE_DATE_VALIDATION)) // If option enabled, we force invoice date { @@ -2576,9 +2533,7 @@ class Facture extends CommonInvoice $this->date_lim_reglement = $this->calculate_date_lim_reglement(); } $num = $this->getNextNumRef($this->thirdparty); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -2728,10 +2683,10 @@ class Facture extends CommonInvoice // Trigger calls if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('BILL_VALIDATE', $user); - if ($result < 0) $error++; - // End call triggers + // Call trigger + $result = $this->call_trigger('BILL_VALIDATE', $user); + if ($result < 0) $error++; + // End call triggers } if (!$error) @@ -2759,16 +2714,16 @@ class Facture extends CommonInvoice if (@rename($dirsource, $dirdest)) { dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles = dol_dir_list($conf->facture->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { - $dirsource = $fileentry['name']; - $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); - $dirsource = $fileentry['path'].'/'.$dirsource; - $dirdest = $fileentry['path'].'/'.$dirdest; - @rename($dirsource, $dirdest); - } + // Rename docs starting with $oldref with $newref + $listoffiles = dol_dir_list($conf->facture->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + foreach ($listoffiles as $fileentry) + { + $dirsource = $fileentry['name']; + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirsource = $fileentry['path'].'/'.$dirsource; + $dirdest = $fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } } } } @@ -2792,24 +2747,22 @@ class Facture extends CommonInvoice $this->date_validation = $now; $i = 0; - if (!empty($conf->global->INVOICE_USE_SITUATION)) - { - $final = true; - $nboflines = count($this->lines); - while (($i < $nboflines) && $final) { - $final = ($this->lines[$i]->situation_percent == 100); - $i++; - } + if (!empty($conf->global->INVOICE_USE_SITUATION)) + { + $final = true; + $nboflines = count($this->lines); + while (($i < $nboflines) && $final) { + $final = ($this->lines[$i]->situation_percent == 100); + $i++; + } - if (empty($final)) $this->situation_final = 0; - else $this->situation_final = 1; + if (empty($final)) $this->situation_final = 0; + else $this->situation_final = 1; - $this->setFinal($user); - } + $this->setFinal($user); + } } - } - else - { + } else { $error++; } @@ -2817,9 +2770,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -2831,7 +2782,7 @@ class Facture extends CommonInvoice * @param Translate $langs Translate object * @return bool false if KO, true if OK */ - public function updatePriceNextInvoice(&$langs) + public function updatePriceNextInvoice(&$langs) { foreach ($this->tab_next_situation_invoice as $next_invoice) { @@ -2875,7 +2826,7 @@ class Facture extends CommonInvoice */ public function setDraft($user, $idwarehouse = -1) { - // phpcs:enable + // phpcs:enable global $conf, $langs; $error = 0; @@ -2946,15 +2897,11 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -2998,39 +2945,41 @@ class Facture extends CommonInvoice * @param int $fk_prev_id Previous situation line id reference * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Unit price in currency + * @param string $ref_ext External reference of the line * @return int <0 if KO, Id of line if OK */ - public function addline( - $desc, - $pu_ht, - $qty, - $txtva, - $txlocaltax1 = 0, - $txlocaltax2 = 0, - $fk_product = 0, - $remise_percent = 0, - $date_start = '', - $date_end = '', - $ventil = 0, - $info_bits = 0, - $fk_remise_except = '', - $price_base_type = 'HT', - $pu_ttc = 0, - $type = self::TYPE_STANDARD, - $rang = -1, - $special_code = 0, - $origin = '', - $origin_id = 0, - $fk_parent_line = 0, - $fk_fournprice = null, - $pa_ht = 0, - $label = '', - $array_options = 0, - $situation_percent = 100, - $fk_prev_id = 0, - $fk_unit = null, - $pu_ht_devise = 0 - ) { + public function addline( + $desc, + $pu_ht, + $qty, + $txtva, + $txlocaltax1 = 0, + $txlocaltax2 = 0, + $fk_product = 0, + $remise_percent = 0, + $date_start = '', + $date_end = '', + $ventil = 0, + $info_bits = 0, + $fk_remise_except = '', + $price_base_type = 'HT', + $pu_ttc = 0, + $type = self::TYPE_STANDARD, + $rang = -1, + $special_code = 0, + $origin = '', + $origin_id = 0, + $fk_parent_line = 0, + $fk_fournprice = null, + $pa_ht = 0, + $label = '', + $array_options = 0, + $situation_percent = 100, + $fk_prev_id = 0, + $fk_unit = null, + $pu_ht_devise = 0, + $ref_ext = '' + ) { // Deprecation warning if ($label) { dol_syslog(__METHOD__.": using line label is deprecated", LOG_WARNING); @@ -3057,6 +3006,7 @@ class Facture extends CommonInvoice if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; if (empty($fk_prev_id)) $fk_prev_id = 'null'; if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100; + if (empty($ref_ext)) $ref_ext = ''; $remise_percent = price2num($remise_percent); $qty = price2num($qty); @@ -3073,9 +3023,7 @@ class Facture extends CommonInvoice if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -3098,8 +3046,8 @@ class Facture extends CommonInvoice $product_type = $product->type; if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) { - $langs->load("errors"); - $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); + $langs->load("errors"); + $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); $this->db->rollback(); return -3; } @@ -3132,8 +3080,8 @@ class Facture extends CommonInvoice // MultiCurrency $multicurrency_total_ht = $tabprice[16]; - $multicurrency_total_tva = $tabprice[17]; - $multicurrency_total_ttc = $tabprice[18]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; // Rank to use @@ -3152,6 +3100,7 @@ class Facture extends CommonInvoice $this->line->fk_facture = $this->id; $this->line->label = $label; // deprecated $this->line->desc = $desc; + $this->line->ref_ext = $ref_ext; $this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative $this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise @@ -3196,8 +3145,8 @@ class Facture extends CommonInvoice $this->line->multicurrency_code = $this->multicurrency_code; $this->line->multicurrency_subprice = $pu_ht_devise; $this->line->multicurrency_total_ht = $multicurrency_total_ht; - $this->line->multicurrency_total_tva = $multicurrency_total_tva; - $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; if (is_array($array_options) && count($array_options) > 0) { $this->line->array_options = $array_options; @@ -3216,23 +3165,17 @@ class Facture extends CommonInvoice { $this->db->commit(); return $this->line->id; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->line->error; $this->db->rollback(); return -2; } - } - else - { + } else { dol_syslog(get_class($this)."::addline status of invoice must be Draft to allow use of ->addline()", LOG_ERR); return -3; } @@ -3260,14 +3203,15 @@ class Facture extends CommonInvoice * @param int $pa_ht Price (without tax) of product when it was bought * @param string $label Label of the line (deprecated, do not use) * @param int $special_code Special code (also used by externals modules!) - * @param array $array_options extrafields array + * @param array $array_options extrafields array * @param int $situation_percent Situation advance percentage * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Unit price in currency * @param int $notrigger disable line update trigger + * @param string $ref_ext External reference of the line * @return int < 0 if KO, > 0 if OK */ - public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0) + public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_start, $date_end, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = self::TYPE_STANDARD, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = 0, $situation_percent = 100, $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $ref_ext = '') { global $conf, $user; // Deprecation warning @@ -3305,11 +3249,12 @@ class Facture extends CommonInvoice if (empty($fk_parent_line) || $fk_parent_line < 0) $fk_parent_line = 0; if (empty($special_code) || $special_code == 3) $special_code = 0; if (!isset($situation_percent) || $situation_percent > 100 || (string) $situation_percent == '') $situation_percent = 100; + if (empty($ref_ext)) $ref_ext = ''; $remise_percent = price2num($remise_percent); $qty = price2num($qty); $pu = price2num($pu); - $pu_ht_devise = price2num($pu_ht_devise); + $pu_ht_devise = price2num($pu_ht_devise); $pa_ht = price2num($pa_ht); $txtva = price2num($txtva); $txlocaltax1 = price2num($txlocaltax1); @@ -3325,12 +3270,12 @@ class Facture extends CommonInvoice $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $this->thirdparty, $mysoc); // Clean vat code - $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { - $vat_src_code = $reg[1]; - $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. - } + $vat_src_code = ''; + if (preg_match('/\((.*)\)/', $txtva, $reg)) + { + $vat_src_code = $reg[1]; + $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. + } $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $mysoc, $localtaxes_type, $situation_percent, $this->multicurrency_tx, $pu_ht_devise); @@ -3345,8 +3290,8 @@ class Facture extends CommonInvoice // MultiCurrency $multicurrency_total_ht = $tabprice[16]; - $multicurrency_total_tva = $tabprice[17]; - $multicurrency_total_ttc = $tabprice[18]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; // Old properties: $price, $remise (deprecated) @@ -3371,8 +3316,8 @@ class Facture extends CommonInvoice $product_type = $product->type; if (!empty($conf->global->STOCK_MUST_BE_ENOUGH_FOR_INVOICE) && $product_type == 0 && $product->stock_reel < $qty) { - $langs->load("errors"); - $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); + $langs->load("errors"); + $this->error = $langs->trans('ErrorStockIsNotEnoughToAddProductOnInvoice', $product->ref); $this->db->rollback(); return -3; } @@ -3382,7 +3327,7 @@ class Facture extends CommonInvoice $line->oldline = $staticline; $this->line = $line; - $this->line->context = $this->context; + $this->line->context = $this->context; // Reorder if fk_parent_line change if (!empty($fk_parent_line) && !empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line) @@ -3395,6 +3340,7 @@ class Facture extends CommonInvoice $this->line->rowid = $rowid; $this->line->label = $label; $this->line->desc = $desc; + $this->line->ref_ext = $ref_ext; $this->line->qty = ($this->type == self::TYPE_CREDIT_NOTE ?abs($qty) : $qty); // For credit note, quantity is always positive and unit price negative $this->line->vat_src_code = $vat_src_code; @@ -3405,7 +3351,7 @@ class Facture extends CommonInvoice $this->line->localtax2_type = $localtaxes_type[2]; $this->line->remise_percent = $remise_percent; - $this->line->subprice = ($this->type == 2 ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise + $this->line->subprice = ($this->type == self::TYPE_CREDIT_NOTE ?-abs($pu_ht) : $pu_ht); // For credit note, unit price always negative, always positive otherwise $this->line->date_start = $date_start; $this->line->date_end = $date_end; $this->line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); // For credit note and if qty is negative, total is negative @@ -3447,16 +3393,12 @@ class Facture extends CommonInvoice $this->update_price(1); $this->db->commit(); return $result; - } - else - { - $this->error = $this->line->error; + } else { + $this->error = $this->line->error; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = "Invoice statut makes operation forbidden"; return -2; } @@ -3469,7 +3411,7 @@ class Facture extends CommonInvoice * @param float $situation_percent progress percentage need to be test * @return false if KO, true if OK */ - public function checkProgressLine($idline, $situation_percent) + public function checkProgressLine($idline, $situation_percent) { $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd INNER JOIN '.MAIN_DB_PREFIX.'facture f ON (fd.fk_facture = f.rowid) @@ -3489,7 +3431,7 @@ class Facture extends CommonInvoice else return $situation_percent < $obj->situation_percent; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update invoice line with percentage * @@ -3497,16 +3439,16 @@ class Facture extends CommonInvoice * @param int $percent Percentage * @return void */ - public function update_percent($line, $percent) + public function update_percent($line, $percent) { - // phpcs:enable - global $mysoc, $user; + // phpcs:enable + global $mysoc, $user; - // Progress should never be changed for discount lines - if (($line->info_bits & 2) == 2) - { - return; - } + // Progress should never be changed for discount lines + if (($line->info_bits & 2) == 2) + { + return; + } include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; @@ -3532,9 +3474,9 @@ class Facture extends CommonInvoice * @param int $rowid Id of line to delete * @return int <0 if KO, >0 if OK */ - public function deleteline($rowid) + public function deleteline($rowid) { - global $user; + global $user; dol_syslog(get_class($this)."::deleteline rowid=".$rowid, LOG_DEBUG); @@ -3562,7 +3504,7 @@ class Facture extends CommonInvoice $line = new FactureLigne($this->db); - $line->context = $this->context; + $line->context = $this->context; // For triggers $result = $line->fetch($rowid); @@ -3576,23 +3518,19 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { $this->db->rollback(); $this->error = $line->error; return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set percent discount * @@ -3601,9 +3539,9 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if ko, >0 if ok */ - public function set_remise($user, $remise, $notrigger = 0) + public function set_remise($user, $remise, $notrigger = 0) { - // phpcs:enable + // phpcs:enable // Clean parameters if (empty($remise)) $remise = 0; @@ -3643,9 +3581,7 @@ class Facture extends CommonInvoice $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -3658,7 +3594,7 @@ class Facture extends CommonInvoice } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Set absolute discount * @@ -3667,9 +3603,9 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function set_remise_absolue($user, $remise, $notrigger = 0) + public function set_remise_absolue($user, $remise, $notrigger = 0) { - // phpcs:enable + // phpcs:enable if (empty($remise)) $remise = 0; if ($user->rights->facture->creer) @@ -3712,9 +3648,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -3734,7 +3668,7 @@ class Facture extends CommonInvoice * @param string $mode 'next' for next value or 'last' for last value * @return string free ref or last ref */ - public function getNextNumRef($soc, $mode = 'next') + public function getNextNumRef($soc, $mode = 'next') { global $conf, $langs; @@ -3832,7 +3766,7 @@ class Facture extends CommonInvoice * @param int $id Id of object to load * @return void */ - public function info($id) + public function info($id) { $sql = 'SELECT c.rowid, datec, date_valid as datev, tms as datem,'; $sql .= ' date_closing as dateclosing,'; @@ -3872,15 +3806,13 @@ class Facture extends CommonInvoice $this->date_closing = $this->db->jdate($obj->dateclosing); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of invoices (eventually filtered on a user) into an array * @@ -3894,9 +3826,9 @@ class Facture extends CommonInvoice * @param string $sortorder Sort order * @return array|int -1 if KO, array with result if OK */ - public function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC') + public function liste_array($shortlist = 0, $draft = 0, $excluser = '', $socid = 0, $limit = 0, $offset = 0, $sortfield = 'f.datef,f.rowid', $sortorder = 'DESC') { - // phpcs:enable + // phpcs:enable global $conf, $user; $ga = array(); @@ -3932,13 +3864,10 @@ class Facture extends CommonInvoice if ($shortlist == 1) { $ga[$obj->fid] = $obj->ref; - } - elseif ($shortlist == 2) + } elseif ($shortlist == 2) { $ga[$obj->fid] = $obj->ref.' ('.$obj->name.')'; - } - else - { + } else { $ga[$i]['id'] = $obj->fid; $ga[$i]['ref'] = $obj->ref; $ga[$i]['name'] = $obj->name; @@ -3947,16 +3876,14 @@ class Facture extends CommonInvoice } } return $ga; - } - else - { + } else { dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of invoices qualified to be replaced by another invoice. * Invoices matching the following rules are returned: @@ -3965,9 +3892,9 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array|int Array of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) */ - public function list_replacable_invoices($socid = 0) + public function list_replacable_invoices($socid = 0) { - // phpcs:enable + // phpcs:enable global $conf; $return = array(); @@ -3997,16 +3924,14 @@ class Facture extends CommonInvoice } //print_r($return); return $return; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of invoices qualified to be corrected by a credit note. * Invoices matching the following rules are returned: @@ -4015,9 +3940,9 @@ class Facture extends CommonInvoice * @param int $socid Id thirdparty * @return array Array of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) */ - public function list_qualified_avoir_invoices($socid = 0) + public function list_qualified_avoir_invoices($socid = 0) { - // phpcs:enable + // phpcs:enable global $conf; $return = array(); @@ -4036,19 +3961,17 @@ class Facture extends CommonInvoice $sql .= " AND f.type != ".self::TYPE_CREDIT_NOTE; // Type non 2 si facture non avoir if (!empty($conf->global->INVOICE_USE_SITUATION_CREDIT_NOTE)) { - // Select the last situation invoice - $sqlSit = 'SELECT MAX(fs.rowid)'; - $sqlSit .= " FROM ".MAIN_DB_PREFIX."facture as fs"; - $sqlSit .= " WHERE fs.entity IN (".getEntity('invoice').")"; - $sqlSit .= " AND fs.type = ".self::TYPE_SITUATION; - $sqlSit .= " AND fs.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")"; - $sqlSit .= " GROUP BY fs.situation_cycle_ref"; - $sqlSit .= " ORDER BY fs.situation_counter"; - $sql .= " AND ( f.type != ".self::TYPE_SITUATION." OR f.rowid IN (".$sqlSit.") )"; // Type non 5 si facture non avoir - } - else - { - $sql .= " AND f.type != ".self::TYPE_SITUATION; // Type non 5 si facture non avoir + // Select the last situation invoice + $sqlSit = 'SELECT MAX(fs.rowid)'; + $sqlSit .= " FROM ".MAIN_DB_PREFIX."facture as fs"; + $sqlSit .= " WHERE fs.entity IN (".getEntity('invoice').")"; + $sqlSit .= " AND fs.type = ".self::TYPE_SITUATION; + $sqlSit .= " AND fs.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")"; + $sqlSit .= " GROUP BY fs.situation_cycle_ref"; + $sqlSit .= " ORDER BY fs.situation_counter"; + $sql .= " AND ( f.type != ".self::TYPE_SITUATION." OR f.rowid IN (".$sqlSit.") )"; // Type non 5 si facture non avoir + } else { + $sql .= " AND f.type != ".self::TYPE_SITUATION; // Type non 5 si facture non avoir } if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; @@ -4072,25 +3995,23 @@ class Facture extends CommonInvoice } return $return; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @param User $user Object user * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - public function load_board($user) + public function load_board($user) { - // phpcs:enable + // phpcs:enable global $conf, $langs; $clause = " WHERE"; @@ -4138,9 +4059,7 @@ class Facture extends CommonInvoice } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -4155,7 +4074,7 @@ class Facture extends CommonInvoice * * @return array Liste des id contacts facturation */ - public function getIdBillingContact() + public function getIdBillingContact() { return $this->getIdContact('external', 'BILLING'); } @@ -4165,7 +4084,7 @@ class Facture extends CommonInvoice * * @return array Liste des id contacts livraison */ - public function getIdShippingContact() + public function getIdShippingContact() { return $this->getIdContact('external', 'SHIPPING'); } @@ -4179,7 +4098,7 @@ class Facture extends CommonInvoice * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines * @return void */ - public function initAsSpecimen($option = '') + public function initAsSpecimen($option = '') { global $conf, $langs; @@ -4187,12 +4106,14 @@ class Facture extends CommonInvoice $arraynow = dol_getdate($now); $nownotime = dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']); - // Load array of products prodids + // Load array of products prodids $num_prods = 0; $prodids = array(); $sql = "SELECT rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -4260,8 +4181,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ht = -200; $line->multicurrency_total_ttc = -239.2; $line->multicurrency_total_tva = -39.2; - } - elseif ($xnbp == 2) // UP is negative (free line) + } elseif ($xnbp == 2) // UP is negative (free line) { $line->subprice = -100; $line->total_ht = -100; @@ -4271,8 +4191,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ht = -200; $line->multicurrency_total_ttc = -239.2; $line->multicurrency_total_tva = -39.2; - } - elseif ($xnbp == 3) // Discount is 50% (product line) + } elseif ($xnbp == 3) // Discount is 50% (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -4283,8 +4202,7 @@ class Facture extends CommonInvoice $line->multicurrency_total_ttc = 119.6; $line->multicurrency_total_tva = 19.6; $line->remise_percent = 50; - } - else // (product line) + } else // (product line) { $prodid = mt_rand(1, $num_prods); $line->fk_product = $prodids[$prodid]; @@ -4335,15 +4253,15 @@ class Facture extends CommonInvoice } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @return int <0 if KO, >0 if OK */ - public function load_state_board() + public function load_state_board() { - // phpcs:enable + // phpcs:enable global $conf, $user; $this->nb = array(); @@ -4368,11 +4286,9 @@ class Facture extends CommonInvoice { $this->nb["invoices"] = $obj->nb; } - $this->db->free($resql); + $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -4384,9 +4300,9 @@ class Facture extends CommonInvoice * * @return int >0 if OK, <0 if KO */ - public function getLinesArray() + public function getLinesArray() { - return $this->fetch_lines(); + return $this->fetch_lines(); } /** @@ -4431,7 +4347,7 @@ class Facture extends CommonInvoice * * @return int >= 1 if OK, -1 if error */ - public function newCycle() + public function newCycle() { $sql = 'SELECT max(situation_cycle_ref) FROM '.MAIN_DB_PREFIX.'facture as f'; $sql .= " WHERE f.entity IN (".getEntity('invoice', 0).")"; @@ -4454,27 +4370,27 @@ class Facture extends CommonInvoice } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Checks if the invoice is the first of a cycle * * @return boolean */ - public function is_first() + public function is_first() { - // phpcs:enable + // phpcs:enable return ($this->situation_counter == 1); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns an array containing the previous situations as Facture objects * * @return mixed -1 if error, array of previous situations */ - public function get_prev_sits() + public function get_prev_sits() { - // phpcs:enable + // phpcs:enable global $conf; $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture'; @@ -4506,7 +4422,7 @@ class Facture extends CommonInvoice * @param int $notrigger 1=Does not execute triggers, 0= execute triggers * @return int <0 if KO, >0 if OK */ - public function setFinal(User $user, $notrigger = 0) + public function setFinal(User $user, $notrigger = 0) { $error = 0; @@ -4534,9 +4450,7 @@ class Facture extends CommonInvoice { $this->db->commit(); return 1; - } - else - { + } else { foreach ($this->errors as $errmsg) { dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); @@ -4547,15 +4461,15 @@ class Facture extends CommonInvoice } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Checks if the invoice is the last in its cycle * * @return bool Last of the cycle status */ - public function is_last_in_cycle() + public function is_last_in_cycle() { - // phpcs:enable + // phpcs:enable global $conf; if (!empty($this->situation_cycle_ref)) { @@ -4613,24 +4527,21 @@ class Facture extends CommonInvoice $hasDelay = $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay); if ($hasDelay && !empty($this->retained_warranty) && !empty($this->retained_warranty_date_limit)) { - $totalpaye = $this->getSommePaiement(); - $totalpaye = floatval($totalpaye); - $RetainedWarrantyAmount = $this->getRetainedWarrantyAmount(); - if ($totalpaye >= 0 && $RetainedWarrantyAmount >= 0) - { - if (($totalpaye < $this->total_ttc - $RetainedWarrantyAmount) && $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay)) - { - $hasDelay = 1; - } - elseif ($totalpaye < $this->total_ttc && $this->retained_warranty_date_limit < ($now - $conf->facture->client->warning_delay)) - { - $hasDelay = 1; - } - else - { - $hasDelay = 0; - } - } + $totalpaye = $this->getSommePaiement(); + $totalpaye = floatval($totalpaye); + $RetainedWarrantyAmount = $this->getRetainedWarrantyAmount(); + if ($totalpaye >= 0 && $RetainedWarrantyAmount >= 0) + { + if (($totalpaye < $this->total_ttc - $RetainedWarrantyAmount) && $this->date_lim_reglement < ($now - $conf->facture->client->warning_delay)) + { + $hasDelay = 1; + } elseif ($totalpaye < $this->total_ttc && $this->retained_warranty_date_limit < ($now - $conf->facture->client->warning_delay)) + { + $hasDelay = 1; + } else { + $hasDelay = 0; + } + } } return $hasDelay; @@ -4681,48 +4592,45 @@ class Facture extends CommonInvoice public function getRetainedWarrantyAmount($rounding = -1) { global $conf; - if (empty($this->retained_warranty)) { - return -1; - } + if (empty($this->retained_warranty)) { + return -1; + } - $retainedWarrantyAmount = 0; + $retainedWarrantyAmount = 0; - // Billed - retained warranty - if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) - { - $displayWarranty = true; - // Check if this situation invoice is 100% for real - if (!empty($this->lines)) { - foreach ($this->lines as $i => $line) { - if ($line->product_type < 2 && $line->situation_percent < 100) { - $displayWarranty = false; - break; - } - } - } + // Billed - retained warranty + if ($this->type == Facture::TYPE_SITUATION && !empty($conf->global->INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION)) + { + $displayWarranty = true; + // Check if this situation invoice is 100% for real + if (!empty($this->lines)) { + foreach ($this->lines as $i => $line) { + if ($line->product_type < 2 && $line->situation_percent < 100) { + $displayWarranty = false; + break; + } + } + } - if ($displayWarranty && !empty($this->situation_final)) - { - $this->fetchPreviousNextSituationInvoice(); - $TPreviousIncoice = $this->tab_previous_situation_invoice; + if ($displayWarranty && !empty($this->situation_final)) + { + $this->fetchPreviousNextSituationInvoice(); + $TPreviousIncoice = $this->tab_previous_situation_invoice; - $total2BillWT = 0; - foreach ($TPreviousIncoice as &$fac) { - $total2BillWT += $fac->total_ttc; - } - $total2BillWT += $this->total_ttc; + $total2BillWT = 0; + foreach ($TPreviousIncoice as &$fac) { + $total2BillWT += $fac->total_ttc; + } + $total2BillWT += $this->total_ttc; - $retainedWarrantyAmount = $total2BillWT * $this->retained_warranty / 100; - } - else { - return -1; - } - } - else - { - // Because one day retained warranty could be used on standard invoices - $retainedWarrantyAmount = $this->total_ttc * $this->retained_warranty / 100; - } + $retainedWarrantyAmount = $total2BillWT * $this->retained_warranty / 100; + } else { + return -1; + } + } else { + // Because one day retained warranty could be used on standard invoices + $retainedWarrantyAmount = $this->total_ttc * $this->retained_warranty / 100; + } if ($rounding < 0) { $rounding = min($conf->global->MAIN_MAX_DECIMALS_UNIT, $conf->global->MAIN_MAX_DECIMALS_TOT); @@ -4732,7 +4640,7 @@ class Facture extends CommonInvoice return round($retainedWarrantyAmount, $rounding); } - return $retainedWarrantyAmount; + return $retainedWarrantyAmount; } /** @@ -4743,32 +4651,28 @@ class Facture extends CommonInvoice */ public function setRetainedWarranty($value) { - dol_syslog(get_class($this).'::setRetainedWarranty('.$value.')'); - if ($this->statut >= 0) - { - $fieldname = 'retained_warranty'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET '.$fieldname.' = '.floatval($value); - $sql .= ' WHERE rowid='.$this->id; + dol_syslog(get_class($this).'::setRetainedWarranty('.$value.')'); + if ($this->statut >= 0) + { + $fieldname = 'retained_warranty'; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = '.floatval($value); + $sql .= ' WHERE rowid='.$this->id; - if ($this->db->query($sql)) - { - $this->retained_warranty = floatval($value); - return 1; - } - else - { - dol_syslog(get_class($this).'::setRetainedWarranty Erreur '.$sql.' - '.$this->db->error()); - $this->error = $this->db->error(); - return -1; - } - } - else - { - dol_syslog(get_class($this).'::setRetainedWarranty, status of the object is incompatible'); - $this->error = 'Status of the object is incompatible '.$this->statut; - return -2; - } + if ($this->db->query($sql)) + { + $this->retained_warranty = floatval($value); + return 1; + } else { + dol_syslog(get_class($this).'::setRetainedWarranty Erreur '.$sql.' - '.$this->db->error()); + $this->error = $this->db->error(); + return -1; + } + } else { + dol_syslog(get_class($this).'::setRetainedWarranty, status of the object is incompatible'); + $this->error = 'Status of the object is incompatible '.$this->statut; + return -2; + } } @@ -4781,37 +4685,33 @@ class Facture extends CommonInvoice */ public function setRetainedWarrantyDateLimit($timestamp, $dateYmd = false) { - if (!$timestamp && $dateYmd) { - $timestamp = $this->db->jdate($dateYmd); - } + if (!$timestamp && $dateYmd) { + $timestamp = $this->db->jdate($dateYmd); + } - dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit('.$timestamp.')'); - if ($this->statut >= 0) - { - $fieldname = 'retained_warranty_date_limit'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET '.$fieldname.' = '.(strval($timestamp) != '' ? '\''.$this->db->idate($timestamp).'\'' : 'null'); - $sql .= ' WHERE rowid='.$this->id; + dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit('.$timestamp.')'); + if ($this->statut >= 0) + { + $fieldname = 'retained_warranty_date_limit'; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = '.(strval($timestamp) != '' ? '\''.$this->db->idate($timestamp).'\'' : 'null'); + $sql .= ' WHERE rowid='.$this->id; - if ($this->db->query($sql)) - { - $this->retained_warranty_date_limit = $timestamp; - return 1; - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit Erreur '.$sql.' - '.$this->db->error()); - $this->error = $this->db->error(); - return -1; - } - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit, status of the object is incompatible'); - $this->error = 'Status of the object is incompatible '.$this->statut; - return -2; - } + if ($this->db->query($sql)) + { + $this->retained_warranty_date_limit = $timestamp; + return 1; + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit Erreur '.$sql.' - '.$this->db->error()); + $this->error = $this->db->error(); + return -1; + } + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyDateLimit, status of the object is incompatible'); + $this->error = 'Status of the object is incompatible '.$this->statut; + return -2; + } } } @@ -4821,12 +4721,12 @@ class Facture extends CommonInvoice */ class FactureLigne extends CommonInvoiceLine { - /** + /** * @var string ID to identify managed object */ public $element = 'facturedet'; - /** + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'facturedet'; @@ -4844,6 +4744,7 @@ class FactureLigne extends CommonInvoiceLine public $label; //! Description ligne public $desc; + public $ref_ext; // External reference of the line public $localtax1_type; // Local tax 1 type public $localtax2_type; // Local tax 2 type @@ -4911,10 +4812,10 @@ class FactureLigne extends CommonInvoiceLine * @param int $rowid id of invoice line to get * @return int <0 if KO, >0 if OK */ - public function fetch($rowid) + public function fetch($rowid) { $sql = 'SELECT fd.rowid, fd.fk_facture, fd.fk_parent_line, fd.fk_product, fd.product_type, fd.label as custom_label, fd.description, fd.price, fd.qty, fd.vat_src_code, fd.tva_tx,'; - $sql .= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice,'; + $sql .= ' fd.localtax1_tx, fd. localtax2_tx, fd.remise, fd.remise_percent, fd.fk_remise_except, fd.subprice, fd.ref_ext,'; $sql .= ' fd.date_start as date_start, fd.date_end as date_end, fd.fk_product_fournisseur_price as fk_fournprice, fd.buy_price_ht as pa_ht,'; $sql .= ' fd.info_bits, fd.special_code, fd.total_ht, fd.total_tva, fd.total_ttc, fd.total_localtax1, fd.total_localtax2, fd.rang,'; $sql .= ' fd.fk_code_ventilation,'; @@ -4942,6 +4843,7 @@ class FactureLigne extends CommonInvoiceLine $this->desc = $objp->description; $this->qty = $objp->qty; $this->subprice = $objp->subprice; + $this->ref_ext = $objp->ref_ext; $this->vat_src_code = $objp->vat_src_code; $this->tva_tx = $objp->tva_tx; $this->localtax1_tx = $objp->localtax1_tx; @@ -4988,10 +4890,8 @@ class FactureLigne extends CommonInvoiceLine $this->db->free($result); return 1; - } - else - { - $this->error = $this->db->lasterror(); + } else { + $this->error = $this->db->lasterror(); return -1; } } @@ -5003,15 +4903,15 @@ class FactureLigne extends CommonInvoiceLine * @param int $noerrorifdiscountalreadylinked 1=Do not make error if lines is linked to a discount and discount already linked to another * @return int <0 if KO, >0 if OK */ - public function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) + public function insert($notrigger = 0, $noerrorifdiscountalreadylinked = 0) { global $langs, $user, $conf; $error = 0; - $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. + $pa_ht_isemptystring = (empty($this->pa_ht) && $this->pa_ht == ''); // If true, we can use a default value. If this->pa_ht = '0', we must use '0'. - dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); + dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); // Clean parameters $this->desc = trim($this->desc); @@ -5026,6 +4926,7 @@ class FactureLigne extends CommonInvoiceLine if (empty($this->remise_percent)) $this->remise_percent = 0; if (empty($this->info_bits)) $this->info_bits = 0; if (empty($this->subprice)) $this->subprice = 0; + if (empty($this->ref_ext)) $this->ref_ext = ''; if (empty($this->special_code)) $this->special_code = 0; if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; if (empty($this->fk_prev_id)) $this->fk_prev_id = 0; @@ -5043,9 +4944,7 @@ class FactureLigne extends CommonInvoiceLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -5074,7 +4973,7 @@ class FactureLigne extends CommonInvoiceLine $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facturedet'; $sql .= ' (fk_facture, fk_parent_line, label, description, qty,'; $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; - $sql .= ' fk_product, product_type, remise_percent, subprice, fk_remise_except,'; + $sql .= ' fk_product, product_type, remise_percent, subprice, ref_ext, fk_remise_except,'; $sql .= ' date_start, date_end, fk_code_ventilation, '; $sql .= ' rang, special_code, fk_product_fournisseur_price, buy_price_ht,'; $sql .= ' info_bits, total_ht, total_tva, total_ttc, total_localtax1, total_localtax2,'; @@ -5087,7 +4986,7 @@ class FactureLigne extends CommonInvoiceLine $sql .= " ".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; $sql .= " '".$this->db->escape($this->desc)."',"; $sql .= " ".price2num($this->qty).","; - $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; + $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; $sql .= " ".price2num($this->tva_tx).","; $sql .= " ".price2num($this->localtax1_tx).","; $sql .= " ".price2num($this->localtax2_tx).","; @@ -5097,6 +4996,7 @@ class FactureLigne extends CommonInvoiceLine $sql .= " ".((int) $this->product_type).","; $sql .= " ".price2num($this->remise_percent).","; $sql .= " ".price2num($this->subprice).","; + $sql .= " '".$this->db->escape($this->ref_ext)."',"; $sql .= ' '.(!empty($this->fk_remise_except) ? $this->fk_remise_except : "null").','; $sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").","; $sql .= " ".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null").","; @@ -5131,14 +5031,14 @@ class FactureLigne extends CommonInvoiceLine $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'facturedet'); $this->rowid = $this->id; // For backward compatibility - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } // Si fk_remise_except defini, on lie la remise a la facture // ce qui la flague comme "consommee". @@ -5151,19 +5051,17 @@ class FactureLigne extends CommonInvoiceLine // Check if discount was found if ($result > 0) { - // Check if discount not already affected to another invoice + // Check if discount not already affected to another invoice if ($discount->fk_facture_line > 0) { - if (empty($noerrorifdiscountalreadylinked)) - { - $this->error = $langs->trans("ErrorDiscountAlreadyUsed", $discount->id); - dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); - $this->db->rollback(); - return -3; - } - } - else - { + if (empty($noerrorifdiscountalreadylinked)) + { + $this->error = $langs->trans("ErrorDiscountAlreadyUsed", $discount->id); + dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); + $this->db->rollback(); + return -3; + } + } else { $result = $discount->link_to_invoice($this->rowid, 0); if ($result < 0) { @@ -5173,17 +5071,13 @@ class FactureLigne extends CommonInvoiceLine return -3; } } - } - else - { + } else { $this->error = $langs->trans("ErrorADiscountThatHasBeenRemovedIsIncluded"); dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); $this->db->rollback(); return -3; } - } - else - { + } else { $this->error = $discount->error; dol_syslog(get_class($this)."::insert Error ".$this->error, LOG_ERR); $this->db->rollback(); @@ -5193,21 +5087,19 @@ class FactureLigne extends CommonInvoiceLine if (!$notrigger) { - // Call trigger - $result = $this->call_trigger('LINEBILL_INSERT', $user); - if ($result < 0) - { + // Call trigger + $result = $this->call_trigger('LINEBILL_INSERT', $user); + if ($result < 0) + { $this->db->rollback(); return -2; } - // End call triggers + // End call triggers } $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; @@ -5221,7 +5113,7 @@ class FactureLigne extends CommonInvoiceLine * @param int $notrigger Disable triggers * @return int <0 if KO, >0 if OK */ - public function update($user = '', $notrigger = 0) + public function update($user = '', $notrigger = 0) { global $user, $conf; @@ -5231,6 +5123,7 @@ class FactureLigne extends CommonInvoiceLine // Clean parameters $this->desc = trim($this->desc); + if (empty($this->ref_ext)) $this->ref_ext = ''; if (empty($this->tva_tx)) $this->tva_tx = 0; if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; @@ -5260,43 +5153,42 @@ class FactureLigne extends CommonInvoiceLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } $this->db->begin(); - // Mise a jour ligne en base - $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET"; - $sql .= " description='".$this->db->escape($this->desc)."'"; - $sql .= ", label=".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null"); - $sql .= ", subprice=".price2num($this->subprice).""; - $sql .= ", remise_percent=".price2num($this->remise_percent).""; - if ($this->fk_remise_except) $sql .= ", fk_remise_except=".$this->fk_remise_except; - else $sql .= ", fk_remise_except=null"; + // Update line in database + $sql = "UPDATE ".MAIN_DB_PREFIX."facturedet SET"; + $sql .= " description='".$this->db->escape($this->desc)."'"; + $sql .= ", ref_ext='".$this->db->escape($this->ref_ext)."'"; + $sql .= ", label=".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null"); + $sql .= ", subprice=".price2num($this->subprice).""; + $sql .= ", remise_percent=".price2num($this->remise_percent).""; + if ($this->fk_remise_except) $sql .= ", fk_remise_except=".$this->fk_remise_except; + else $sql .= ", fk_remise_except=null"; $sql .= ", vat_src_code = '".(empty($this->vat_src_code) ? '' : $this->db->escape($this->vat_src_code))."'"; - $sql .= ", tva_tx=".price2num($this->tva_tx).""; - $sql .= ", localtax1_tx=".price2num($this->localtax1_tx).""; - $sql .= ", localtax2_tx=".price2num($this->localtax2_tx).""; + $sql .= ", tva_tx=".price2num($this->tva_tx).""; + $sql .= ", localtax1_tx=".price2num($this->localtax1_tx).""; + $sql .= ", localtax2_tx=".price2num($this->localtax2_tx).""; $sql .= ", localtax1_type='".$this->db->escape($this->localtax1_type)."'"; $sql .= ", localtax2_type='".$this->db->escape($this->localtax2_type)."'"; - $sql .= ", qty=".price2num($this->qty); - $sql .= ", date_start=".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null"); - $sql .= ", date_end=".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null"); - $sql .= ", product_type=".$this->product_type; - $sql .= ", info_bits='".$this->db->escape($this->info_bits)."'"; - $sql .= ", special_code='".$this->db->escape($this->special_code)."'"; - if (empty($this->skip_update_total)) - { - $sql .= ", total_ht=".price2num($this->total_ht); - $sql .= ", total_tva=".price2num($this->total_tva); - $sql .= ", total_ttc=".price2num($this->total_ttc); - $sql .= ", total_localtax1=".price2num($this->total_localtax1); - $sql .= ", total_localtax2=".price2num($this->total_localtax2); - } + $sql .= ", qty=".price2num($this->qty); + $sql .= ", date_start=".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null"); + $sql .= ", date_end=".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null"); + $sql .= ", product_type=".$this->product_type; + $sql .= ", info_bits='".$this->db->escape($this->info_bits)."'"; + $sql .= ", special_code='".$this->db->escape($this->special_code)."'"; + if (empty($this->skip_update_total)) + { + $sql .= ", total_ht=".price2num($this->total_ht); + $sql .= ", total_tva=".price2num($this->total_tva); + $sql .= ", total_ttc=".price2num($this->total_ttc); + $sql .= ", total_localtax1=".price2num($this->total_localtax1); + $sql .= ", total_localtax2=".price2num($this->total_localtax2); + } $sql .= ", fk_product_fournisseur_price=".(!empty($this->fk_fournprice) ? "'".$this->db->escape($this->fk_fournprice)."'" : "null"); $sql .= ", buy_price_ht='".price2num($this->pa_ht)."'"; $sql .= ", fk_parent_line=".($this->fk_parent_line > 0 ? $this->fk_parent_line : "null"); @@ -5307,9 +5199,9 @@ class FactureLigne extends CommonInvoiceLine // Multicurrency $sql .= ", multicurrency_subprice=".price2num($this->multicurrency_subprice).""; - $sql .= ", multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; - $sql .= ", multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; - $sql .= ", multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; + $sql .= ", multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; + $sql .= ", multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; + $sql .= ", multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; $sql .= " WHERE rowid = ".$this->rowid; @@ -5317,32 +5209,30 @@ class FactureLigne extends CommonInvoiceLine $resql = $this->db->query($sql); if ($resql) { - if (!$error) - { - $this->id = $this->rowid; - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + if (!$error) + { + $this->id = $this->rowid; + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } if (!$error && !$notrigger) { - // Call trigger - $result = $this->call_trigger('LINEBILL_UPDATE', $user); - if ($result < 0) + // Call trigger + $result = $this->call_trigger('LINEBILL_UPDATE', $user); + if ($result < 0) { $this->db->rollback(); return -2; } - // End call triggers + // End call triggers } $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -5352,10 +5242,10 @@ class FactureLigne extends CommonInvoiceLine /** * Delete line in database * TODO Add param User $user and notrigger (see skeleton) - * + * * @return int <0 if KO, >0 if OK */ - public function delete() + public function delete() { global $user; @@ -5370,13 +5260,13 @@ class FactureLigne extends CommonInvoiceLine } // End call triggers - // extrafields - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } + // extrafields + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } $sql = "DELETE FROM ".MAIN_DB_PREFIX."facturedet WHERE rowid = ".$this->rowid; dol_syslog(get_class($this)."::delete", LOG_DEBUG); @@ -5384,25 +5274,23 @@ class FactureLigne extends CommonInvoiceLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Update DB line fields total_xxx + * Update DB line fields total_xxx * Used by migration * * @return int <0 if KO, >0 if OK */ - public function update_total() + public function update_total() { - // phpcs:enable + // phpcs:enable $this->db->begin(); dol_syslog(get_class($this)."::update_total", LOG_DEBUG); @@ -5426,16 +5314,14 @@ class FactureLigne extends CommonInvoiceLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns situation_percent of the previous line. * Warning: If invoice is a replacement invoice, this->fk_prev_id is id of the replaced line. @@ -5444,14 +5330,14 @@ class FactureLigne extends CommonInvoiceLine * @param bool $include_credit_note Include credit note or not * @return int >= 0 */ - public function get_prev_progress($invoiceid, $include_credit_note = true) + public function get_prev_progress($invoiceid, $include_credit_note = true) { - // phpcs:enable + // phpcs:enable global $invoicecache; if (is_null($this->fk_prev_id) || empty($this->fk_prev_id) || $this->fk_prev_id == "") { return 0; } else { - // If invoice is not a situation invoice, this->fk_prev_id is used for something else + // If invoice is not a situation invoice, this->fk_prev_id is used for something else if (!isset($invoicecache[$invoiceid])) { $invoicecache[$invoiceid] = new Facture($this->db); $invoicecache[$invoiceid]->fetch($invoiceid); @@ -5466,20 +5352,20 @@ class FactureLigne extends CommonInvoiceLine $returnPercent = floatval($res['situation_percent']); if ($include_credit_note) { - $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd'; - $sql .= ' JOIN '.MAIN_DB_PREFIX.'facture f ON (f.rowid = fd.fk_facture) '; - $sql .= ' WHERE fd.fk_prev_id ='.$this->fk_prev_id; - $sql .= ' AND f.situation_cycle_ref = '.$invoicecache[$invoiceid]->situation_cycle_ref; // Prevent cycle outed - $sql .= ' AND f.type = '.Facture::TYPE_CREDIT_NOTE; + $sql = 'SELECT fd.situation_percent FROM '.MAIN_DB_PREFIX.'facturedet fd'; + $sql .= ' JOIN '.MAIN_DB_PREFIX.'facture f ON (f.rowid = fd.fk_facture) '; + $sql .= ' WHERE fd.fk_prev_id ='.$this->fk_prev_id; + $sql .= ' AND f.situation_cycle_ref = '.$invoicecache[$invoiceid]->situation_cycle_ref; // Prevent cycle outed + $sql .= ' AND f.type = '.Facture::TYPE_CREDIT_NOTE; - $res = $this->db->query($sql); - if ($res) { - while ($obj = $this->db->fetch_object($res)) { - $returnPercent = $returnPercent + floatval($obj->situation_percent); - } - } else { - dol_print_error($this->db); - } + $res = $this->db->query($sql); + if ($res) { + while ($obj = $this->db->fetch_object($res)) { + $returnPercent = $returnPercent + floatval($obj->situation_percent); + } + } else { + dol_print_error($this->db); + } } return $returnPercent; diff --git a/htdocs/compta/facture/class/paymentterm.class.php b/htdocs/compta/facture/class/paymentterm.class.php index 427daf445c5..9888bd23d13 100644 --- a/htdocs/compta/facture/class/paymentterm.class.php +++ b/htdocs/compta/facture/class/paymentterm.class.php @@ -145,9 +145,7 @@ class PaymentTerm // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -202,9 +200,7 @@ class PaymentTerm // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -239,9 +235,7 @@ class PaymentTerm // extends CommonObject } $this->db->free($resql); return $ret; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -305,9 +299,7 @@ class PaymentTerm // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -345,9 +337,7 @@ class PaymentTerm // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -396,9 +386,7 @@ class PaymentTerm // extends CommonObject { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } diff --git a/htdocs/compta/facture/contact.php b/htdocs/compta/facture/contact.php index 8eb47268186..459543dfc74 100644 --- a/htdocs/compta/facture/contact.php +++ b/htdocs/compta/facture/contact.php @@ -42,7 +42,7 @@ $id = (GETPOST('id') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // Fo $ref = GETPOST('ref', 'alpha'); $lineid = GETPOST('lineid', 'int'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; @@ -69,35 +69,25 @@ if ($action == 'addcontact' && $user->rights->facture->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } -} - -// Toggle the status of a contact +} // Toggle the status of a contact elseif ($action == 'swapstatut' && $user->rights->facture->creer) { if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db); } -} - -// Deletes a contact +} // Deletes a contact elseif ($action == 'deletecontact' && $user->rights->facture->creer) { $object->fetch($id); @@ -107,8 +97,7 @@ elseif ($action == 'deletecontact' && $user->rights->facture->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -207,9 +196,7 @@ if ($id > 0 || !empty($ref)) $res = @include dol_buildpath($reldir.'/contacts.tpl.php'); if ($res) break; } - } - else - { + } else { // Record not found print "ErrorRecordNotFound"; } diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index a901b985342..722286044cc 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -45,7 +45,7 @@ $langs->loadLangs(array('propal', 'compta', 'other', 'bills', 'companies')); $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -181,14 +181,10 @@ if ($id > 0 || !empty($ref)) $permtoedit = $user->rights->facture->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; - } - else - { + } else { dol_print_error($db); } -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/facture/index.php b/htdocs/compta/facture/index.php new file mode 100644 index 00000000000..fb044280a21 --- /dev/null +++ b/htdocs/compta/facture/index.php @@ -0,0 +1,534 @@ + + * + * 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 . + */ + +/** + * \file htdocs/compat/facture/index.php +* \ingroup facture + * \brief Home page of customer invoices area + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; + +// Security check +restrictedArea($user, 'facture'); + +// Load translation files required by the page +$langs->load('bills'); + +// Filter to show only result of one customer +$socid = GETPOST('socid', 'int'); +if (isset($user->socid) && $user->socid > 0) +{ + $action = ''; + $socid = $user->socid; +} + +// Maximum elements of the tables +$maxDraftCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD; +$maxLatestEditCount = 5; +$maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD; + +/* +* View +*/ + +llxHeader("", $langs->trans("CustomersInvoicesArea"), "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"); + +print load_fiche_titre($langs->trans("CustomersInvoicesArea"), '', 'bill'); + +print '
    '; + +print '
    '; + +// This is useless due to the global search combo +if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) +{ + print getAreaSearchFrom(); + print '
    '; +} + +print getPieChart($socid); +print '
    '; +print getDraftTable($maxDraftCount, $socid); + +print '
    '; + +print '
    '; +print '
    '; + +print getLatestEditTable($maxLatestEditCount, $socid); +print '
    '; +print getOpenTable($maxOpenCount, $socid); + +print '
    '; +print '
    '; + +print '
    '; + +// End of page +llxFooter(); +$db->close(); + +/** + * Return a HTML string that contains a additional search form + * + * @return string A HTML string that contains a additional search form + */ +function getAreaSearchFrom() +{ + global $langs; + + $result = '
    '; + $result .= '
    '; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= "
    '.$langs->trans("Search").'
    '.$langs->trans("Invoice").':
    "; + $result .= "
    "; + $result .= "
    "; + + return $result; +} + +/** + * Return a HTML table that contains a pie chart of customer invoices + * + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that contains a pie chart of customer invoices + */ +function getPieChart($socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT count(f.rowid), f.fk_statut"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", ".MAIN_DB_PREFIX."facture as f"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + if ($user->socid) $sql .= ' AND f.fk_soc = '.$user->socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= " GROUP BY f.fk_statut"; + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + $i = 0; + + $total = 0; + $vals = []; + + while ($i < $num) + { + $row = $db->fetch_row($resql); + if ($row) + { + $vals[$row[1]] = $row[0]; + $total += $row[0]; + } + + $i++; + } + + $db->free($resql); + + $result = '
    '; + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $objectstatic = new Facture($db); + $array = [Facture::STATUS_DRAFT, Facture::STATUS_VALIDATED, Facture::STATUS_CLOSED, Facture::STATUS_ABANDONED]; + $dataseries = []; + + foreach ($array as $status) + { + $objectstatic->statut = $status; + $objectstatic->paye = $status == Facture::STATUS_CLOSED ? -1 : 0; + + $dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)]; + if (!$conf->use_javascript_ajax) + { + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + } + } + + if ($conf->use_javascript_ajax) + { + $dolgraph = new DolGraph(); + $dolgraph->SetData($dataseries); + $dolgraph->setShowLegend(1); + $dolgraph->setShowPercent(1); + $dolgraph->SetType(['pie']); + $dolgraph->setWidth('100%'); + $dolgraph->draw('idgraphthirdparties'); + + $result .= ''; + $result .= ''; + $result .= ''; + } + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= '
    '.$langs->trans("Statistics").' - '.$langs->trans("CustomerInvoice").'
    '.$objectstatic->getLibStatut(0).''.(isset($vals[$status]) ? $vals[$status] : 0).'
    '.$dolgraph->show($total ? 0 : 1).'
    '.$langs->trans("Total").''.$total.'
    '; + $result .= '
    '; + return $result; +} + +/** + * Return a HTML table that contains a list with customer invoice drafts + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that contains a list with customer invoice drafts + */ +function getDraftTable($maxCount = 500, $socid = 0) +{ + global $db, $langs, $user; + + $sql = "SELECT f.rowid, f.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client, f.total as total_ttc"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + $sql .= " AND f.fk_statut = ".Facture::STATUS_DRAFT; + if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + + $result = '
    '; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
    '; + $result .= $langs->trans("CustomersDraftInvoices"); + $result .= ' '; + $result .= ''.$num.''; + $result .= ''; + $result .= '
    '; + $result .= '
    '; + return $result; + } + + $objectstatic = new Facture($db); + $companystatic = new Societe($db); + $nbofloop = min($num, $maxCount); + $total = 0; + $i = 0; + + while ($i < $nbofloop) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id = $obj->rowid; + $objectstatic->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $result .= ''; + $result .= ''.$objectstatic->getNomUrl(1).''; + $result .= ''.$companystatic->getNomUrl(1, 'customer', 24).''; + $result .= ''.price($obj->total_ttc).''; + $result .= ''; + + $i++; + $total += $obj->total_ttc; + } + + if ($num > $nbofloop) + { + $result .= ''; + $result .= ''.$langs->trans("XMoreLines", ($num - $nbofloop)).''; + $result .= ''; + } + elseif ($total > 0) + { + $result .= ''; + $result .= ''.$langs->trans("Total").''; + $result .= ''.price($total).''; + $result .= ''; + } + + $result .= ''; + $result .= '
    '; + return $result; +} + +/** + * Return a HTML table that contains a list with latest edited customer invoices + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that contains a list with latest edited customer invoices + */ +function getLatestEditTable($maxCount = 5, $socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT f.rowid, f.entity, f.ref, f.fk_statut as status, f.paye, s.nom as socname, s.rowid as socid, s.canvas, s.client,"; + $sql .= " f.datec"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture as f"; + $sql .= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= " ORDER BY f.tms DESC"; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + } + + $num = $db->num_rows($resql); + + $result = '
    '; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
    '.$langs->trans("LastCustomersBills", $maxCount).'
    '; + $result .= '
    '; + return $result; + } + + $formfile = new FormFile($db); + $objectstatic = new Facture($db); + $companystatic = new Societe($db); + $i = 0; + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id = $obj->rowid; + $objectstatic->ref = $obj->ref; + $objectstatic->paye = $obj->paye; + $objectstatic->statut = $obj->status; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $filename = dol_sanitizeFileName($obj->ref); + $filedir = $conf->propal->multidir_output[$obj->entity].'/'.$filename; + + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= '
    '.$objectstatic->getNomUrl(1).' '.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'
    '; + $result .= ''; + + $result .= ''.$companystatic->getNomUrl(1, 'customer').''; + $result .= ''.dol_print_date($db->jdate($obj->datec), 'day').''; + $result .= ''.$objectstatic->getLibStatut(5).''; + + $result .= ''; + + $i++; + } + + $result .= ''; + $result .= '
    '; + return $result; +} + +/** + * Return a HTML table that contains a list with open (unpaid) customer invoices + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the customer with this id + * @return string A HTML table that conatins a list with open (unpaid) customer invoices + */ +function getOpenTable($maxCount = 500, $socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client"; + $sql .= ", f.rowid as id, f.entity, f.total as total_ttc, f.total as total_ht, f.ref, f.fk_statut"; + $sql .= ", f.datef as df, f.date_lim_reglement as datelimite"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", ".MAIN_DB_PREFIX."facture as f"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture').")"; + $sql .= " AND f.fk_statut = ".Facture::STATUS_VALIDATED; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($socid) $sql .= " AND s.rowid = ".$socid; + $sql .= " ORDER BY f.rowid DESC"; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + } + + $num = $db->num_rows($resql); + + $result = '
    '; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
    '; + $result .= $langs->trans("BillsCustomersUnpaid"); + $result .= ' '; + $result .= ''.$num.''; + $result .= ''; + $result .= '
    '; + $result .= '
    '; + return $result; + } + + $objectstatic = new Facture($db); + $companystatic = new Societe($db); + $formfile = new FormFile($db); + $nbofloop = min($num, $maxCount); + $now = dol_now(); + $total = 0; + $i = 0; + + while ($i < $nbofloop) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id= $obj->id; + $objectstatic->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $filename = dol_sanitizeFileName($obj->ref); + $filedir = $conf->propal->multidir_output[$obj->entity].'/'.dol_sanitizeFileName($obj->ref); + + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + + $result .= ''; + + $result .= ''; + + $result .= ''; + $result .= '
    '.$objectstatic->getNomUrl(1).''; + + if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) + { + $result .= img_warning($langs->trans("Late")); + } + + $result .= ''.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'
    '; + $result .= ''; + + $result .= ''.$companystatic->getNomUrl(1, 'customer', 44).''; + $result .= ''.dol_print_date($db->jdate($obj->df), 'day').''; + $result .= ''.price($obj->total_ttc).''; + + $result .= ''; + + $i++; + $total += $obj->total_ttc; + } + + if ($num > $nbofloop) + { + $result .= ''; + $result .= ''.$langs->trans("XMoreLines", ($num - $nbofloop)).''; + $result .= ''; + } + elseif ($total > 0) + { + $result .= ''; + $result .= ''.$langs->trans("Total").''; + $result .= ''.price($total).''; + $result .= ' '; + $result .= ''; + } + + $result .= ''; + $result .= ''; + return $result; +} diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index f6da540f735..16d163c4fe6 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -357,7 +357,7 @@ if ($resql) if (!empty($arrayfields['f.titre']['checked'])) { print ''; - print ''; + print ''; print ''; } // Thirpdarty @@ -529,7 +529,7 @@ if ($resql) if (!empty($arrayfields['f.titre']['checked'])) { - print ''; + print ''; print $invoicerectmp->getNomUrl(1); print ""; print "\n"; @@ -616,9 +616,7 @@ if ($resql) if (!$invoicerectmp->isMaxNbGenReached()) { if (!$objp->suspended && $objp->frequency > 0 && $db->jdate($objp->date_when) && $db->jdate($objp->date_when) < $now) print img_warning($langs->trans("Late")); - } - else - { + } else { print img_info($langs->trans("MaxNumberOfGenerationReached")); } print ''; @@ -661,19 +659,14 @@ if ($resql) if ($invoicerectmp->isMaxNbGenReached()) { print $langs->trans("MaxNumberOfGenerationReached"); - } - elseif (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) + } elseif (empty($objp->frequency) || $db->jdate($objp->date_when) <= $today) { print ''; print $langs->trans("CreateBill").''; - } - else - { + } else { print $form->textwithpicto('', $langs->trans("DateIsNotEnough")); } - } - else - { + } else { print " "; } if (!$i) $totalarray['nbfield']++; @@ -683,9 +676,7 @@ if ($resql) $i++; } - } - else - { + } else { $colspan = 1; foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } print ''.$langs->trans("NoRecordFound").''; @@ -700,9 +691,7 @@ if ($resql) print ""; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 71184d905b3..e12e21e70b4 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -61,7 +61,7 @@ $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -100,7 +100,7 @@ $search_module_source = GETPOST('search_module_source', 'alpha'); $search_pos_source = GETPOST('search_pos_source', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state")); +$search_state = GETPOST("search_state"); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); $search_user = GETPOST('search_user', 'int'); @@ -111,7 +111,7 @@ $search_date_valid_start = dol_mktime(0, 0, 0, GETPOST('search_date_valid_startm $search_date_valid_end = dol_mktime(23, 59, 59, GETPOST('search_date_valid_endmonth', 'int'), GETPOST('search_date_valid_endday', 'int'), GETPOST('search_date_valid_endyear', 'int')); $search_datelimit_start = dol_mktime(0, 0, 0, GETPOST('search_datelimit_startmonth', 'int'), GETPOST('search_datelimit_startday', 'int'), GETPOST('search_datelimit_startyear', 'int')); $search_datelimit_end = dol_mktime(23, 59, 59, GETPOST('search_datelimit_endmonth', 'int'), GETPOST('search_datelimit_endday', 'int'), GETPOST('search_datelimit_endyear', 'int')); -$search_categ_cus = trim(GETPOST("search_categ_cus", 'int')); +$search_categ_cus = GETPOST("search_categ_cus", 'int'); $search_btn = GETPOST('button_search', 'alpha'); $search_remove_btn = GETPOST('button_removefilter', 'alpha'); @@ -205,6 +205,8 @@ $arrayfields = array( 'multicurrency_rtp'=>array('label'=>'MulticurrencyRemainderToPay', 'checked'=>0, 'enabled'=>(empty($conf->multicurrency->enabled) ? 0 : 1), 'position'=>220), // Not enabled by default because slow 'f.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), + 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), 'f.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); @@ -304,8 +306,7 @@ if ($massaction == 'makepayment'){ header('Location: '.$loc); exit; -} -elseif ($massaction == 'withdrawrequest') +} elseif ($massaction == 'withdrawrequest') { $langs->load("withdrawals"); @@ -313,9 +314,7 @@ elseif ($massaction == 'withdrawrequest') { $error++; setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); - } - else - { + } else { //Checking error $error = 0; @@ -363,12 +362,10 @@ elseif ($massaction == 'withdrawrequest') if ($numprlv > 0) { $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'); - } - else { + } else { $listofbills[] = $objecttmp; // $listofbills will only contains invoices with good payment method and no request already done } } @@ -386,9 +383,7 @@ elseif ($massaction == 'withdrawrequest') { $db->commit(); $nbwithdrawrequestok++; - } - else - { + } else { $db->rollback(); setEventMessages($aBill->error, $aBill->errors, 'errors'); } @@ -485,15 +480,15 @@ if ($filtre) } if ($search_ref) $sql .= natural_search('f.ref', $search_ref); if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcustomer); -if ($search_type != '' && $search_type != '-1') $sql .= " AND f.type IN (".$db->escape($search_type).")"; +if ($search_type != '' && $search_type != '-1') $sql .= " AND f.type IN (".$db->sanitize($db->escape($search_type)).")"; if ($search_project_ref) $sql .= natural_search('p.ref', $search_project_ref); if ($search_project) $sql .= natural_search('p.title', $search_project); if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_town) $sql .= natural_search('s.town', $search_town); if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_state) $sql .= natural_search("state.nom", $search_state); -if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')'; +if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')'; +if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_montant_ht != '') $sql .= natural_search('f.total', $search_montant_ht, 1); if ($search_montant_vat != '') $sql .= natural_search('f.tva', $search_montant_vat, 1); @@ -516,10 +511,8 @@ if ($search_status != '-1' && $search_status != '') if ($search_status == '1') $sql .= " AND f.fk_statut = 1"; // unpayed if ($search_status == '2') $sql .= " AND f.fk_statut = 2"; // payed Not that some corrupted data may contains f.fk_statut = 1 AND f.paye = 1 (it means payed too but should not happend. If yes, reopen and reclassify billed) if ($search_status == '3') $sql .= " AND f.fk_statut = 3"; // abandonned - } - else - { - $sql .= " AND f.fk_statut IN (".$db->escape($search_status).")"; // When search_status is '1,2' for example + } else { + $sql .= " AND f.fk_statut IN (".$db->sanitize($db->escape($search_status)).")"; // When search_status is '1,2' for example } } @@ -567,9 +560,7 @@ if (!$sall) if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key : ''); } -} -else -{ +} else { $sql .= natural_search(array_keys($fieldstosearchall), $sall); } @@ -678,18 +669,19 @@ if ($resql) if ($user->rights->facture->supprimer) { if (!empty($conf->global->INVOICE_CAN_REMOVE_DRAFT_ONLY)) { $arrayofmassactions['predeletedraft'] = $langs->trans("Deletedraft"); - } - elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation + } elseif (!empty($conf->global->INVOICE_CAN_ALWAYS_BE_REMOVED)) { // mass deletion never possible on invoices on such situation $arrayofmassactions['predelete'] = $langs->trans("Delete"); } } if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - if ($user->rights->facture->creer && $contextpage != 'poslist') + // Show the new button only when this page is not opend from the Extended POS + if ($contextpage != 'poslist') { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/facture/card.php?action=create'); + $url = DOL_URL_ROOT.'/compta/facture/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->facture->creer); } $i = 0; @@ -737,7 +729,7 @@ if ($resql) $moreforfilter .= ''; } // If the user can view prospects other than his' - if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; @@ -746,7 +738,7 @@ if ($resql) $moreforfilter .= $form->selectarray('search_product_category', $cate_arbo, $search_product_category, 1, 0, 0, '', 0, 0, 0, 0, 'maxwidth300', 1); $moreforfilter .= '
    '; } - if (!empty($conf->categorie->enabled)) + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; @@ -768,6 +760,7 @@ if ($resql) $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + // Show the massaction checkboxes only when this page is not opend from the Extended POS if ($massactionbutton && $contextpage != 'poslist') $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); print '
    '; @@ -816,12 +809,10 @@ if ($resql) { print ''; print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1); + print $form->selectDate($search_date_start ? $search_date_start : -1, 'search_date_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
    '; print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1); + print $form->selectDate($search_date_end ? $search_date_end : -1, 'search_date_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
    '; print ''; } @@ -830,12 +821,10 @@ if ($resql) { print ''; print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_date_valid_start ? $search_date_valid_start : -1, 'search_date_valid_start', 0, 0, 1); + print $form->selectDate($search_date_valid_start ? $search_date_valid_start : -1, 'search_date_valid_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
    '; print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_date_valid_end ? $search_date_valid_end : -1, 'search_date_valid_end', 0, 0, 1); + print $form->selectDate($search_date_valid_end ? $search_date_valid_end : -1, 'search_date_valid_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
    '; print ''; } @@ -850,8 +839,7 @@ if ($resql) print '
    '; print '
    '; print $langs->trans('to').' ';*/ - print $langs->trans("Before").' '; - print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1); + print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before")); print '
    '.$langs->trans("Alert"); print '
    '; print ''; @@ -1051,6 +1039,18 @@ if ($resql) print ''; print ''; } + if (!empty($arrayfields['f.note_public']['checked'])) + { + // Note public + print ''; + print ''; + } + if (!empty($arrayfields['f.note_private']['checked'])) + { + // Note private + print ''; + print ''; + } // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { @@ -1111,6 +1111,8 @@ if ($resql) 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.date_closing']['checked'])) print_liste_field_titre($arrayfields['f.date_closing']['label'], $_SERVER["PHP_SELF"], "f.date_closing", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder); + if (!empty($arrayfields['f.note_public']['checked'])) print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + if (!empty($arrayfields['f.note_private']['checked'])) print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); 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 "\n"; @@ -1218,7 +1220,7 @@ if ($resql) // Ref if (!empty($arrayfields['f.ref']['checked'])) { - print ''; + print ''; print ''; @@ -1226,9 +1228,7 @@ if ($resql) if ($contextpage == 'poslist') { print $obj->ref; - } - else - { + } else { print $facturestatic->getNomUrl(1, '', 200, 0, '', 0, 1); } @@ -1256,7 +1256,7 @@ if ($resql) // Type if (!empty($arrayfields['f.type']['checked'])) { - print '"; if (!$i) $totalarray['nbfield']++; @@ -1265,7 +1265,7 @@ if ($resql) // Date if (!empty($arrayfields['f.date']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1274,7 +1274,7 @@ if ($resql) // Date if (!empty($arrayfields['f.date_valid']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1283,7 +1283,7 @@ if ($resql) // Date limit if (!empty($arrayfields['f.date_lim_reglement']['checked'])) { - print ''; @@ -1342,7 +1340,7 @@ if ($resql) // Zip if (!empty($arrayfields['s.zip']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1384,7 +1382,7 @@ if ($resql) // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { - print ''; if (!$i) $totalarray['nbfield']++; @@ -1420,7 +1418,7 @@ if ($resql) // Amount HT if (!empty($arrayfields['f.total_ht']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ht'; $totalarray['val']['f.total_ht'] += $obj->total_ht; @@ -1428,7 +1426,7 @@ if ($resql) // Amount VAT if (!empty($arrayfields['f.total_vat']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_vat'; $totalarray['val']['f.total_vat'] += $obj->total_vat; @@ -1436,7 +1434,7 @@ if ($resql) // Amount LocalTax1 if (!empty($arrayfields['f.total_localtax1']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax1'; $totalarray['val']['f.total_localtax1'] += $obj->total_localtax1; @@ -1444,7 +1442,7 @@ if ($resql) // Amount LocalTax2 if (!empty($arrayfields['f.total_localtax2']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_localtax2'; $totalarray['val']['f.total_localtax2'] += $obj->total_localtax2; @@ -1452,7 +1450,7 @@ if ($resql) // Amount TTC if (!empty($arrayfields['f.total_ttc']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'f.total_ttc'; $totalarray['val']['f.total_ttc'] += $obj->total_ttc; @@ -1477,7 +1475,7 @@ if ($resql) if (!empty($arrayfields['dynamount_payed']['checked'])) { - print ''; // TODO Use a denormalized field + print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'totalam'; $totalarray['val']['totalam'] += $totalpay; @@ -1486,7 +1484,7 @@ if ($resql) // Pending amount if (!empty($arrayfields['rtp']['checked'])) { - print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; @@ -1498,14 +1496,14 @@ if ($resql) // Currency if (!empty($arrayfields['f.multicurrency_code']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } // Currency rate if (!empty($arrayfields['f.multicurrency_tx']['checked'])) { - print '\n"; if (!$i) $totalarray['nbfield']++; @@ -1513,31 +1511,31 @@ if ($resql) // Amount HT if (!empty($arrayfields['f.multicurrency_total_ht']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } // Amount VAT if (!empty($arrayfields['f.multicurrency_total_vat']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } // Amount TTC if (!empty($arrayfields['f.multicurrency_total_ttc']['checked'])) { - print '\n"; + print '\n"; if (!$i) $totalarray['nbfield']++; } if (!empty($arrayfields['multicurrency_dynamount_payed']['checked'])) { - print ''; // TODO Use a denormalized field + print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; } // Pending amount if (!empty($arrayfields['multicurrency_rtp']['checked'])) { - print ''; // TODO Use a denormalized field if (!$i) $totalarray['nbfield']++; @@ -1573,6 +1571,22 @@ if ($resql) print ''; if (!$i) $totalarray['nbfield']++; } + // Note public + if (!empty($arrayfields['f.note_public']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } + // Note private + if (!empty($arrayfields['f.note_private']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { @@ -1582,7 +1596,7 @@ if ($resql) if (!$i) $totalarray['nbfield']++; } - // Action column + // Action column (Show the massaction button only when this page is not opend from the Extended POS) print ''; @@ -409,14 +403,10 @@ if ($object->id > 0) if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none'); } - } - else - { + } else { print ' '; } print ''; @@ -439,17 +429,13 @@ if ($object->id > 0) if ($action == 'editpaymentterm') { $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $duedate, 'paymentterm'); - } - else - { + } else { print dol_print_date($duedate, 'day'); if ($object->hasDelay()) { print img_warning($langs->trans('Late')); } } - } - else - { + } else { print ' '; } print ''; @@ -465,9 +451,7 @@ if ($object->id > 0) if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id'); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -484,9 +468,7 @@ if ($object->id > 0) if ($action == 'editbankaccount') { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } - else - { + } else { $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); } print ""; @@ -617,9 +599,7 @@ if ($object->id > 0) { $num = $db->num_rows($result_sql); $numopen = $num; - } - else - { + } else { dol_print_error($db); } @@ -640,9 +620,7 @@ if ($object->id > 0) { $obj = $db->fetch_object($result_sql); if ($obj) $pending = $obj->amount; - } - else - { + } else { dol_print_error($db); } @@ -676,25 +654,20 @@ if ($object->id > 0) print ''; print ''; print ''; - } - else - { + } else { print ''.$buttonlabel.''; } - } - else - { + } else { print ''.$buttonlabel.''; } - } - else - { + } else { if ($num == 0) { if ($object->statut > $object::STATUS_DRAFT) print ''.$buttonlabel.''; else print ''.$buttonlabel.''; + } else { + print ''.$buttonlabel.''; } - else print ''.$buttonlabel.''; } print "
    \n"; @@ -779,7 +752,7 @@ if ($object->id > 0) print ''; print ''; @@ -788,9 +761,7 @@ if ($object->id > 0) } $db->free($result_sql); - } - else - { + } else { dol_print_error($db); } @@ -867,9 +838,7 @@ if ($object->id > 0) print ''; $db->free($result); - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/compta/facture/stats/index.php b/htdocs/compta/facture/stats/index.php index 284186b73ce..81466651856 100644 --- a/htdocs/compta/facture/stats/index.php +++ b/htdocs/compta/facture/stats/index.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facturestats.class.php'; -if(!empty($conf->category->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; +if (!empty($conf->category->enabled)) require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); @@ -60,7 +60,7 @@ if ($user->socid > 0) $nowyear = strftime("%Y", dol_now()); $year = GETPOST('year') > 0 ?GETPOST('year') : $nowyear; -if(!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2; +if (!empty($conf->global->INVOICE_STATS_GRAPHS_SHOW_2_YEARS)) $startyear=$year-2; else $startyear=$year-1; $endyear = $year; @@ -68,7 +68,7 @@ $endyear = $year; /* * View */ -if(!empty($conf->category->enabled)) $langs->load('categories'); +if (!empty($conf->category->enabled)) $langs->load('categories'); $form = new Form($db); $formcompany = new FormCompany($db); $formother = new FormOther($db); @@ -94,7 +94,7 @@ dol_mkdir($dir); $stats = new FactureStats($db, $socid, $mode, ($userid > 0 ? $userid : 0), ($typent_id > 0 ? $typent_id : 0), ($categ_id > 0 ? $categ_id : 0)); if ($mode == 'customer') { - if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')'; + if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; if (is_array($custcats) && !empty($custcats)) { $stats->from .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_societe as cat ON (f.fk_soc = cat.fk_soc)'; $stats->where .= ' AND cat.fk_categorie IN ('.implode(',', $custcats).')'; @@ -102,7 +102,7 @@ if ($mode == 'customer') } if ($mode == 'supplier') { - if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->escape($object_status).')'; + if ($object_status != '' && $object_status >= 0) $stats->where .= ' AND f.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; } // Build graphic number of object @@ -180,9 +180,7 @@ if (!$user->rights->societe->client->voir || $user->socid) $filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$user->id.'-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/ordersaverage-'.$year.'.png'; if ($mode == 'customer') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstats&file=ordersaverage-'.$year.'.png'; if ($mode == 'supplier') $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=orderstatssupplier&file=ordersaverage-'.$year.'.png'; @@ -369,8 +367,7 @@ print '
    '; // Show graphs print '
    '; + print ''; print $facturestatic->getLibType(); print "'; + print ''; print dol_print_date($db->jdate($obj->df), 'day'); print ''; + print ''; print dol_print_date($db->jdate($obj->date_valid), 'day'); print ''.dol_print_date($datelimit, 'day'); + print ''.dol_print_date($datelimit, 'day'); if ($facturestatic->hasDelay()) { print img_warning($langs->trans('Alert').' - '.$langs->trans('Late')); @@ -1295,7 +1295,7 @@ if ($resql) // Project ref if (!empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { print $projectstatic->getNomUrl(1); @@ -1307,7 +1307,7 @@ if ($resql) // Project title if (!empty($arrayfields['p.title']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { print $projectstatic->title; @@ -1323,9 +1323,7 @@ if ($resql) if ($contextpage == 'poslist') { print $thirdpartystatic->name; - } - else - { + } else { print $thirdpartystatic->getNomUrl(1, 'customer'); } print ''; + print ''; print $obj->zip; print ''; + print ''; $form->form_modes_reglement($_SERVER['PHP_SELF'], $obj->fk_mode_reglement, 'none', '', -1); print ''.price($obj->total_ht)."'.price($obj->total_ht)."'.price($obj->total_vat)."'.price($obj->total_vat)."'.price($obj->total_localtax1)."'.price($obj->total_localtax1)."'.price($obj->total_localtax2)."'.price($obj->total_localtax2)."'.price($obj->total_ttc)."'.price($obj->total_ttc)."'.(!empty($totalpay) ?price($totalpay, 0, $langs) : ' ').''.(!empty($totalpay) ?price($totalpay, 0, $langs) : ' ').''; + print ''; print (!empty($remaintopay) ? price($remaintopay, 0, $langs) : ' '); print ''.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."'.$obj->multicurrency_code.' - '.$langs->trans('Currency'.$obj->multicurrency_code)."'; + print ''; $form->form_multicurrency_rate($_SERVER['PHP_SELF'].'?id='.$obj->rowid, $obj->multicurrency_tx, 'none', $obj->multicurrency_code); print "'.price($obj->multicurrency_total_ht)."'.price($obj->multicurrency_total_ht)."'.price($obj->multicurrency_total_vat)."'.price($obj->multicurrency_total_vat)."'.price($obj->multicurrency_total_ttc)."'.price($obj->multicurrency_total_ttc)."'.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : ' ').''.(!empty($multicurrency_totalpay) ?price($multicurrency_totalpay, 0, $langs) : ' ').''; + print ''; print (!empty($multicurrency_remaintopay) ? price($multicurrency_remaintopay, 0, $langs) : ' '); print ''; + print dol_escape_htmltag($obj->note_public); + print ''; + print dol_escape_htmltag($obj->note_private); + print ''; if (($massactionbutton || $massaction) && $contextpage != 'poslist') // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined { @@ -1613,22 +1627,23 @@ if ($resql) print "\n"; - $hidegeneratedfilelistifempty = 1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + // Show the file area only when this page is not opend from the Extended POS + if ($contextpage != 'poslist') { + $hidegeneratedfilelistifempty = 1; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; - // Show list of available documents - $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; - $urlsource .= str_replace('&', '&', $param); + // Show list of available documents + $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource .= str_replace('&', '&', $param); - $filedir = $diroutputmassaction; - $genallowed = $user->rights->facture->lire; - $delallowed = $user->rights->facture->creer; - $title = ''; + $filedir = $diroutputmassaction; + $genallowed = $user->rights->facture->lire; + $delallowed = $user->rights->facture->creer; + $title = ''; - print $formfile->showdocuments('massfilesarea_invoices', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ + print $formfile->showdocuments('massfilesarea_invoices', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); + } +} else { dol_print_error($db); } diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 954c48ec0c9..249d2dd9b8c 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -39,7 +39,7 @@ $langs->loadLangs(array('companies', 'bills')); $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check $socid = 0; diff --git a/htdocs/compta/facture/prelevement.php b/htdocs/compta/facture/prelevement.php index cfe6cd51a22..f69517c1037 100644 --- a/htdocs/compta/facture/prelevement.php +++ b/htdocs/compta/facture/prelevement.php @@ -44,7 +44,7 @@ $langs->loadLangs(array('bills', 'banks', 'withdrawals', 'companies')); $id = (GETPOST('id', 'int') ?GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $type = GETPOST('type', 'aZ09'); $fieldid = (!empty($ref) ? 'ref' : 'rowid'); @@ -107,9 +107,7 @@ if (empty($reshook)) $db->commit(); setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } @@ -383,14 +381,10 @@ if ($object->id > 0) if ($action == 'editinvoicedate') { $form->form_date($_SERVER['PHP_SELF'].'?id='.$object->id, $object->date, 'invoicedate'); - } - else - { + } else { print dol_print_date($object->date, 'day'); } - } - else - { + } else { print dol_print_date($object->date, 'day'); } print '
    '.$langs->trans("OrderWaiting").''; - print ''; + print ''; print img_delete(); print '
    '.$langs->trans("None").'
    '; - print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -537,17 +566,21 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $totalam += $obj->am; $i++; } - } - else - { + + if ($othernb) { + print ''; + print ''; + print "\n"; + } + } else { $colspan = 5; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } print '
    '; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
    \n"; print $px2->show(); diff --git a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php index a02a0fc1682..ef35c03eb54 100644 --- a/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/compta/facture/tpl/linkedobjectblock.tpl.php @@ -78,9 +78,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) // If not abandonned $total = $total + $sign * $objectlink->total_ht; echo price($objectlink->total_ht); - } - else - { + } else { echo ''.price($objectlink->total_ht).''; } } diff --git a/htdocs/compta/index.php b/htdocs/compta/index.php index 23ef5b6d0d9..0591d75d5a3 100644 --- a/htdocs/compta/index.php +++ b/htdocs/compta/index.php @@ -7,6 +7,7 @@ * Copyright (C) 2015 Raphaël Doursenaud * Copyright (C) 2016 Marcos García * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -32,12 +33,9 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -if (!empty($conf->commande->enabled)) - require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; -if (!empty($conf->commande->enabled)) - require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; -if (!empty($conf->tax->enabled)) - require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; +require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; // L'espace compta/treso doit toujours etre actif car c'est un espace partage // par de nombreux modules (banque, facture, commande a facturer, etc...) independamment @@ -51,7 +49,7 @@ $langs->loadLangs(array('compta', 'bills')); if (!empty($conf->commande->enabled)) $langs->load("orders"); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $bid = GETPOST('bid', 'int'); // Security check @@ -62,7 +60,7 @@ if ($user->socid > 0) $socid = $user->socid; } -$max = 3; +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array $hookmanager->initHooks(array('invoiceindex')); @@ -148,7 +146,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) if (!$user->rights->societe->client->voir && !$socid) $sql .= ", sc.fk_soc, sc.fk_user "; $sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = 0"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = ".Facture::STATUS_DRAFT; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; @@ -161,8 +159,8 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $reshook = $hookmanager->executeHooks('printFieldListWhereCustomerDraft', $parameters); $sql .= $hookmanager->resPrint; - $sql.= " GROUP BY f.rowid, f.ref, f.datef, f.total, f.tva, f.total_ttc, f.ref_client, f.type, "; - $sql.= "s.email, s.nom, s.rowid, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur"; + $sql .= " GROUP BY f.rowid, f.ref, f.datef, f.total, f.tva, f.total_ttc, f.ref_client, f.type, "; + $sql .= "s.email, s.nom, s.rowid, s.code_client, s.code_compta, s.code_fournisseur, s.code_compta_fournisseur"; // Add Group from hooks $parameters = array(); @@ -175,10 +173,18 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $num = $db->num_rows($resql); - print '
    '; + print '
    '; print ''; + print ''; - print ''; + print ''; + print ''; + if ($num) { $companystatic = new Societe($db); @@ -207,11 +213,11 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $companystatic->code_compta = $obj->code_compta; $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - print ''; - print ''; print ''; print ''; @@ -222,16 +228,12 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) print ''; print ''; print ''; - } - else - { + } else { print ''; } print "
    '.$langs->trans("CustomersDraftInvoices").($num ? ''.$num.'' : '').'
    '; + print $langs->trans("CustomersDraftInvoices").' '; + print ''; + print ''.$num.''; + print ''; + print '
    '; + print '
    '; print $facturestatic->getNomUrl(1, ''); print ''; - print $companystatic->getNomUrl(1, 'customer', 16); + print ''; + print $companystatic->getNomUrl(1, 'customer'); print ''.price($obj->total_ttc).'
    '.$langs->trans("Total").''.price($tot_ttc).'
    '.$langs->trans("NoInvoice").'

    "; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -248,7 +250,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= ", cc.rowid as country_id, cc.code as country_code"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f, ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = 0"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.fk_statut = ".FactureFournisseur::STATUS_DRAFT; $sql .= " AND f.entity IN (".getEntity('invoice').')'; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; @@ -262,10 +264,18 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU { $num = $db->num_rows($resql); - print '
    '; + print '
    '; print ''; + print ''; - print ''; + print ''; + print ''; + if ($num) { $companystatic = new Societe($db); @@ -295,11 +305,11 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $companystatic->code_compta = $obj->code_compta; $companystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - print ''; - print ''; print ''; print ''; @@ -310,16 +320,12 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU print ''; print ''; print ''; - } - else - { + } else { print ''; } print "
    '.$langs->trans("SuppliersDraftInvoices").($num ? ''.$num.'' : '').'
    '; + print $langs->trans("SuppliersDraftInvoices").' '; + print ''; + print ''.$num.''; + print ''; + print '
    '; - print $facturesupplierstatic->getNomUrl(1, '', 16); + print '
    '; + print $facturesupplierstatic->getNomUrl(1, ''); print ''; - print $companystatic->getNomUrl(1, 'supplier', 16); + print ''; + print $companystatic->getNomUrl(1, 'supplier'); print ''.price($obj->total_ttc).'
    '.$langs->trans("Total").''.price($tot_ttc).'
    '.$langs->trans("NoInvoice").'

    "; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -364,6 +370,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $num = $db->num_rows($resql); $i = 0; + $othernb = 0; print '
    '; print ''; @@ -380,6 +387,14 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + $facturestatic->ref = $obj->ref; $facturestatic->id = $obj->rowid; $facturestatic->total_ht = $obj->total_ht; @@ -436,18 +451,22 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $i++; } - } - else - { + + if ($othernb) { + print ''; + print ''; + print "\n"; + } + } else { $colspan = 5; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } print '
    '; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print '
    '.$langs->trans("NoInvoice").'

    '; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -499,10 +518,20 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU { $i = 0; $total = $total_ttc = $totalam = 0; + $othernb = 0; + while ($i < $num) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + $facstatic->ref = $obj->ref; $facstatic->id = $obj->rowid; $facstatic->total_ht = $obj->total_ht; @@ -521,11 +550,11 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $thirdpartystatic->code_compta = ''; $thirdpartystatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - print '
    '; + print '
    '; print $facstatic->getNomUrl(1, ''); print ''; - print $thirdpartystatic->getNomUrl(1, 'supplier', 44); + print ''; + print $thirdpartystatic->getNomUrl(1, 'supplier'); print ''.price($obj->total_ht).''.price($obj->total_ttc).'
    '; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print '
    '.$langs->trans("NoInvoice").'

    '; - } - else - { + } else { dol_print_error($db); } } @@ -576,10 +609,10 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire) $result = $db->query($sql); if ($result) { - $var = false; $num = $db->num_rows($result); $i = 0; + $othernb = 0; print '
    '; print ''; @@ -598,6 +631,14 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire) { $objp = $db->fetch_object($result); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + $donationstatic->id = $objp->rowid; $donationstatic->ref = $objp->rowid; $donationstatic->lastname = $objp->lastname; @@ -606,7 +647,7 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire) $label = $donationstatic->getFullName($langs); if ($objp->societe) $label .= ($label ? ' - ' : '').$objp->societe; - print ''; + print ''; print ''; print ''; print ''; @@ -616,14 +657,19 @@ if (!empty($conf->don->enabled) && $user->rights->don->lire) $i++; } - } - else - { + + if ($othernb) { + print ''; + print ''; + print "\n"; + } + } else { print ''; } print '
    '.$donationstatic->getNomUrl(1).''.$label.''.price($objp->amount).'
    '; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print '
    '.$langs->trans("None").'

    '; - } - else dol_print_error($db); + } else dol_print_error($db); } /** @@ -668,17 +714,27 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) { $i = 0; $tot_ttc = 0; + $othernb = 0; + while ($i < $num) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + $chargestatic->id = $obj->rowid; $chargestatic->ref = $obj->rowid; $chargestatic->label = $obj->label; $chargestatic->paye = $obj->paye; print ''; - print ''.$chargestatic->getNomUrl(1).''; + print ''.$chargestatic->getNomUrl(1).''; print ''.dol_print_date($db->jdate($obj->date_ech), 'day').''; print ''.price($obj->amount).''; print ''.price($obj->sumpaid).''; @@ -689,21 +745,25 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) $i++; } + if ($othernb) { + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + print ''.$langs->trans("Total").''; print ''.price($tot_ttc).''; print ''; print ' '; print ''; - } - else - { + } else { print ''.$langs->trans("None").''; } print "
    "; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -732,7 +792,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user $sql .= " AND c.entity = ".$conf->entity; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND c.fk_soc = ".$socid; - $sql .= " AND c.fk_statut = 3"; + $sql .= " AND c.fk_statut = ".Commande::STATUS_CLOSED; $sql .= " AND c.facture = 0"; // Add where from hooks $parameters = array(); @@ -749,11 +809,19 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user if ($num) { $i = 0; + $othernb = 0; print '
    '; print ''; + print ""; - print ''; + print ''; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; @@ -766,6 +834,14 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + $societestatic->id = $obj->socid; $societestatic->name = $obj->name; $societestatic->email = $obj->email; @@ -799,8 +875,8 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user print ''; - print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -814,6 +890,14 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user $i++; } + if ($othernb) { + print ''; + print ''; + print "\n"; + } + print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -823,9 +907,7 @@ if (!empty($conf->facture->enabled) && !empty($conf->commande->enabled) && $user print '
    '.$langs->trans("OrdersDeliveredToBill").' '.$num.''; + print $langs->trans("OrdersDeliveredToBill").' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").''.$langs->trans("ToBill").''; - print $societestatic->getNomUrl(1, 'customer', 44); + print ''; + print $societestatic->getNomUrl(1, 'customer'); print ''.price($obj->total_ht).''.price($obj->total_ttc).'
    '; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print '
    '.$langs->trans("Total").'   ('.$langs->trans("RemainderToBill").': '.price($tot_tobill).') '.price($tot_ht).''.price($tot_ttc).'

    '; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -847,7 +929,7 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $sql .= " FROM ".MAIN_DB_PREFIX."societe as s LEFT JOIN ".MAIN_DB_PREFIX."c_country as cc ON cc.rowid = s.fk_pays,".MAIN_DB_PREFIX."facture as f"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf on f.rowid=pf.fk_facture"; if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = 1"; + $sql .= " WHERE s.rowid = f.fk_soc AND f.paye = 0 AND f.fk_statut = ".Facture::STATUS_VALIDATED; $sql .= " AND f.entity IN (".getEntity('invoice').')'; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND f.fk_soc = ".$socid; @@ -865,10 +947,19 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $num = $db->num_rows($resql); $i = 0; + $othernb = 0; print '
    '; print ''; - print ''; + + print ''; + print ''; + print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -883,6 +974,14 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + $facturestatic->ref = $obj->ref; $facturestatic->id = $obj->rowid; $facturestatic->total_ht = $obj->total_ht; @@ -923,14 +1022,14 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) print '
    '.$langs->trans("BillsCustomersUnpaid", $num).' '.$num.'
    '; + print $langs->trans("BillsCustomersUnpaid", $num).' '; + print ''; + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").'
    '; print ''; - print ''; - print $societestatic->getNomUrl(1, 'customer', 44); + print ''; + print $societestatic->getNomUrl(1, 'customer'); print ''; print ''.dol_print_date($db->jdate($obj->datelimite), 'day').''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($obj->total_ht).''; print ''.price($obj->total_ttc).''; print ''.price($obj->am).''; - print ''.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3, $obj->am).''; + print ''.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3, $obj->am, $obj->type).''; print ''; $total_ttc += $obj->total_ttc; @@ -940,6 +1039,16 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) $i++; } + if ($othernb) { + $colspan = 6; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; + print ''; + print ''; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print ''; + print "\n"; + } + print ''.$langs->trans("Total").'   ('.$langs->trans("RemainderToTake").': '.price($total_ttc - $totalam).') '; print ' '; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''.price($total).''; @@ -947,18 +1056,14 @@ if (!empty($conf->facture->enabled) && $user->rights->facture->lire) print ''.price($totalam).''; print ' '; print ''; - } - else - { + } else { $colspan = 6; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''.$langs->trans("NoInvoice").''; } print '

    '; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -970,7 +1075,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU { $facstatic = new FactureFournisseur($db); - $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.libelle as label, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye"; + $sql = "SELECT ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle as label, ff.total_ht, ff.total_tva, ff.total_ttc, ff.paye"; $sql .= ", ff.date_lim_reglement"; $sql .= ", s.nom as name"; $sql .= ", s.rowid as socid, s.email"; @@ -983,7 +1088,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $sql .= " WHERE s.rowid = ff.fk_soc"; $sql .= " AND ff.entity = ".$conf->entity; $sql .= " AND ff.paye = 0"; - $sql .= " AND ff.fk_statut = 1"; + $sql .= " AND ff.fk_statut = ".FactureFournisseur::STATUS_VALIDATED; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; if ($socid) $sql .= " AND ff.fk_soc = ".$socid; // Add where from hooks @@ -991,7 +1096,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $reshook = $hookmanager->executeHooks('printFieldListWhereSupplierUnpaid', $parameters); $sql .= $hookmanager->resPrint; - $sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,"; + $sql .= " GROUP BY ff.rowid, ff.ref, ff.fk_statut, ff.type, ff.libelle, ff.total_ht, ff.tva, ff.total_tva, ff.total_ttc, ff.paye, ff.date_lim_reglement,"; $sql .= " s.nom, s.rowid, s.email, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur"; $sql .= " ORDER BY ff.date_lim_reglement ASC"; @@ -999,10 +1104,21 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU if ($resql) { $num = $db->num_rows($resql); + $othernb = 0; print '
    '; print ''; - print ''; + + print ''; + print ''; + print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; @@ -1018,8 +1134,17 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU { $obj = $db->fetch_object($resql); + if ($i >= $max) { + $othernb += 1; + $i++; + $total += $obj->total_ht; + $total_ttc += $obj->total_ttc; + continue; + } + $facstatic->ref = $obj->ref; $facstatic->id = $obj->rowid; + $facstatic->type = $obj->type; $facstatic->total_ht = $obj->total_ht; $facstatic->total_tva = $obj->total_tva; $facstatic->total_ttc = $obj->total_ttc; @@ -1034,15 +1159,15 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $societestatic->code_compta = $obj->code_compta; $societestatic->code_compta_fournisseur = $obj->code_compta_fournisseur; - print ''; - print ''; + print ''; print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; print ''; print ''; - print ''; + print ''; print ''; $total += $obj->total_ht; $total_ttc += $obj->total_ttc; @@ -1050,6 +1175,16 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU $i++; } + if ($othernb) { + $colspan = 6; + if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; + print ''; + print ''; + print "\n"; + } + print ''; print ''; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) print ''; @@ -1057,17 +1192,13 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU print ''; print ''; print ''; - } - else - { + } else { $colspan = 6; if (!empty($conf->global->MAIN_SHOW_HT_ON_SUMMARY)) $colspan++; print ''; } print '
    '.$langs->trans("BillsSuppliersUnpaid", $num).' '.$num.'
    '; + print $langs->trans("BillsSuppliersUnpaid", $num).' '; + print ''; + // TODO: "impayees.php" looks very outdatetd and should be set to deprecated or directly remove in the next version + // + print ''.$num.''; + print ''; + print ''.$langs->trans("DateDue").''.$langs->trans("AmountHT").''.$langs->trans("AmountTTC").'
    '; + print '
    '; print $facstatic->getNomUrl(1, ''); print ''.$societestatic->getNomUrl(1, 'supplier', 44).''.$societestatic->getNomUrl(1, 'supplier').''.dol_print_date($db->jdate($obj->date_lim_reglement), 'day').''.price($obj->total_ht).''.price($obj->total_ttc).''.price($obj->am).''.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3).''.$facstatic->LibStatut($obj->paye, $obj->fk_statut, 3, $obj->am, $obj->type).'
    '; + print ''.$langs->trans("More").'... ('.$othernb.')'; + print '
    '.$langs->trans("Total").'   ('.$langs->trans("RemainderToPay").': '.price($total_ttc - $totalam).')  '.price($total).''.price($totalam).' 
    '.$langs->trans("NoInvoice").'

    '; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php index 1459bbf2402..d754760dd57 100644 --- a/htdocs/compta/journal/purchasesjournal.php +++ b/htdocs/compta/journal/purchasesjournal.php @@ -91,7 +91,7 @@ $exportlink = ''; $builddate = dol_now(); $description = $langs->trans("DescPurchasesJournal").'
    '; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); -else $description .= $langs->trans("DepositsAreIncluded"); +else $description .= $langs->trans("DepositsAreIncluded"); $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink); @@ -106,7 +106,7 @@ $sql .= " s.rowid as socid, s.nom as name, s.code_compta_fournisseur,"; $sql .= " p.rowid as pid, p.ref as ref, p.accountancy_code_buy,"; $sql .= " ct.accountancy_code_buy as account_tva, ct.recuperableonly"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as fd"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva as ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva as ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = ".((int) $idpays); $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; $sql .= " JOIN ".MAIN_DB_PREFIX."facture_fourn as f ON f.rowid = fd.fk_facture_fourn"; $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; @@ -168,8 +168,7 @@ if ($result) $i++; } -} -else { +} else { dol_print_error($db); } @@ -238,9 +237,7 @@ foreach ($tabfac as $key => $val) { print ''.($mt < 0 ?price(-$mt) : '').""; print ''.($mt >= 0 ?price($mt) : '').""; - } - else - { + } else { print ''.($mt >= 0 ?price($mt) : '').""; print ''.($mt < 0 ?price(-$mt) : '').""; } diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php index 98bd5e989f7..62e8c77a133 100644 --- a/htdocs/compta/journal/sellsjournal.php +++ b/htdocs/compta/journal/sellsjournal.php @@ -93,7 +93,7 @@ $exportlink = ''; $builddate = dol_now(); $description = $langs->trans("DescSellsJournal").'
    '; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); -else $description .= $langs->trans("DepositsAreIncluded"); +else $description .= $langs->trans("DepositsAreIncluded"); $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); report_header($name, '', $period, $periodlink, $description, $builddate, $exportlink); @@ -109,13 +109,12 @@ $sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = fd.fk_product"; $sql .= " JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = fd.fk_facture"; $sql .= " JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = f.fk_soc"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = '".$idpays."'"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_tva ct ON fd.tva_tx = ct.taux AND fd.info_bits = ct.recuperableonly AND ct.fk_pays = ".((int) $idpays); $sql .= " WHERE f.entity IN (".getEntity('invoice').")"; $sql .= " AND f.fk_statut > 0"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) { $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_REPLACEMENT.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_SITUATION.")"; -} -else { +} else { $sql .= " AND f.type IN (".Facture::TYPE_STANDARD.",".Facture::TYPE_STANDARD.",".Facture::TYPE_CREDIT_NOTE.",".Facture::TYPE_DEPOSIT.",".Facture::TYPE_SITUATION.")"; } @@ -195,8 +194,7 @@ if ($result) $tabcompany[$obj->rowid] = array('id'=>$obj->socid, 'name'=>$obj->name, 'client'=>$obj->client); $i++; } -} -else { +} else { dol_print_error($db); } @@ -268,9 +266,7 @@ foreach ($tabfac as $key => $val) { print ''.($mt >= 0 ?price($mt) : '').""; print ''.($mt < 0 ?price(-$mt) : '').""; - } - else - { + } else { print ''.($mt < 0 ?price(-$mt) : '').""; print ''.($mt >= 0 ?price($mt) : '').""; } diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 51275c7159f..6353d394f20 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -80,9 +80,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $db->commit(); header("Location: list.php?localTaxType=".$lttype); exit; - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); $_GET["action"] = "create"; @@ -113,22 +111,16 @@ if ($action == 'delete') $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/localtax/list.php?localTaxType='.$object->ltt); exit; - } - else - { + } else { $object->error = $accountline->error; $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $mesg = 'Error try do delete a line linked to a conciliated bank transaction'; setEventMessages($mesg, null, 'errors'); } @@ -288,10 +280,8 @@ if ($id) print "
    \n"; if ($object->rappro == 0) { - print ''.$langs->trans("Delete").''; - } - else - { + print ''.$langs->trans("Delete").''; + } else { print ''.$langs->trans("Delete").''; } print "
    "; diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 6aa7c2b1a87..1dfeb0b8930 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -137,15 +137,11 @@ class Localtax extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); $this->db->rollback(); return -1; @@ -206,9 +202,7 @@ class Localtax extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -270,9 +264,7 @@ class Localtax extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -377,15 +369,11 @@ class Localtax extends CommonObject $ret = $obj->amount; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -418,15 +406,11 @@ class Localtax extends CommonObject $ret = $obj->total_localtax; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -461,15 +445,11 @@ class Localtax extends CommonObject $ret = $obj->amount; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -547,9 +527,7 @@ class Localtax extends CommonObject if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); - } - else - { + } else { $this->error = $acc->error; $ok = 0; } @@ -567,22 +545,16 @@ class Localtax extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -3; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -604,9 +576,7 @@ class Localtax extends CommonObject $result = $this->db->query($sql); if ($result) { return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } diff --git a/htdocs/compta/localtax/clients.php b/htdocs/compta/localtax/clients.php index 61a11a042f2..1b1ad5351d3 100644 --- a/htdocs/compta/localtax/clients.php +++ b/htdocs/compta/localtax/clients.php @@ -53,17 +53,13 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $q = GETPOST("q"); if (empty($q)) { - if (GETPOST("month")) { $date_start = dol_get_first_day($year_start, GETPOST("month"), false); $date_end = dol_get_last_day($year_start, GETPOST("month"), false); } - else - { + if (GETPOST("month")) { $date_start = dol_get_first_day($year_start, GETPOST("month"), false); $date_end = dol_get_last_day($year_start, GETPOST("month"), false); } else { $date_start = dol_get_first_day($year_start, empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; } - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -92,7 +88,7 @@ if (empty($local)) } - +$calc = 0; /* * View */ @@ -124,11 +120,11 @@ $calc = $conf->global->MAIN_INFO_LOCALTAX_CALC.$local; if ($calc == 0 || $calc == 1) // Calculate on invoice for goods and services { $calcmode = $calc == 0 ? $langs->trans("CalcModeLT".$local) : $langs->trans("CalcModeLT".$local."Rec"); - $calcmode .= '
    ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; + $calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); if (!empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description .= '
    '.$langs->trans("WarningDepositsNotIncluded"); $description .= $fsearch; - $description .= '
    ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; + $description .= ' ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; $builddate = dol_now(); $elementcust = $langs->trans("CustomersInvoices"); @@ -141,11 +137,11 @@ if ($calc == 0 || $calc == 1) // Calculate on invoice for goods and services if ($calc == 2) // Invoice for goods, payment for services { $calcmode = $langs->trans("CalcModeLT2Debt"); - $calcmode .= '
    ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; + $calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); if (!empty($conf->global->MAIN_MODULE_COMPTABILITE)) $description .= '
    '.$langs->trans("WarningDepositsNotIncluded"); $description .= $fsearch; - $description .= '
    ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; + $description .= '('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; $builddate = dol_now(); $elementcust = $langs->trans("CustomersInvoices"); @@ -161,10 +157,12 @@ report_header($name, '', $period, $periodlink, $description, $builddate, $export $vatcust = $langs->transcountry($local == 1 ? "LT1" : "LT2", $mysoc->country_code); $vatsup = $langs->transcountry($local == 1 ? "LT1" : "LT2", $mysoc->country_code); +print '
    '; +print ''; + // IRPF that the customer has retained me if ($calc == 0 || $calc == 2) { - print '
    '; print ''; print ''; print ''; @@ -201,9 +199,7 @@ if ($calc == 0 || $calc == 2) if ($coll->assuj == '1') { $intra = $langs->trans('Unknown'); - } - else - { + } else { $intra = ''; } } @@ -229,22 +225,18 @@ if ($calc == 0 || $calc == 2) print ''; print ''; print ''; - } - else - { + } else { $langs->load("errors"); if ($coll_list == -1) print ''; elseif ($coll_list == -2) print ''; - else - print ''; + else print ''; } } // IRPF I retained my supplier if ($calc == 0 || $calc == 1) { - print '
    '.$langs->trans("Num").''.$langs->trans("Customer").''.price($totalamount).''.price($total).'
    '.$langs->trans("ErrorNoAccountancyModuleLoaded").'
    '.$langs->trans("FeatureNotYetAvailable").'
    '.$langs->trans("Error").'
    '.$langs->trans("Error").'
    '; print ''; print '"; print '"; @@ -274,9 +266,7 @@ if ($calc == 0 || $calc == 1) { if ($coll->assuj == '1') { $intra = $langs->trans('Unknown'); - } - else - { + } else { $intra = ''; } } @@ -302,32 +292,30 @@ if ($calc == 0 || $calc == 1) { print ''; print ''; print ''; - - print '
    '.$langs->trans("Num")."'.$langs->trans("Supplier")."'.price($totalamount).''.price($total).'
    '; - } - else - { + } else { $langs->load("errors"); if ($coll_list == -1) print ''.$langs->trans("ErrorNoAccountancyModuleLoaded").''; elseif ($coll_list == -2) print ''.$langs->trans("FeatureNotYetAvailable").''; - else - print ''.$langs->trans("Error").''; + else print ''.$langs->trans("Error").''; } } if ($calc == 0) { // Total to pay - print '

    '; - print ''; + print ''; + $diff = $x_coll_sum - $x_paye_sum; print ''; print ''; print '\n"; print "\n"; } + print '
    '.$langs->trans("TotalToPay").($q ? ', '.$langs->trans("Quadri").' '.$q : '').''.price(price2num($diff, 'MT'))."
    '; +print '
    '; + // End of page llxFooter(); diff --git a/htdocs/compta/localtax/index.php b/htdocs/compta/localtax/index.php index a08ac99d6bd..e8bcc89821b 100644 --- a/htdocs/compta/localtax/index.php +++ b/htdocs/compta/localtax/index.php @@ -52,15 +52,11 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $q = GETPOST("q", "int"); if (empty($q)) { - if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } - else - { + if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } else { $date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false); $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; } - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -152,9 +148,7 @@ function pt($db, $sql, $date) $amountpaid = 0; $previousmode = ''; $previousmonth = ''; - } - else - { + } else { $previousmode = $obj->mode; $previousmonth = $obj->dm; } @@ -182,8 +176,7 @@ function pt($db, $sql, $date) print ""; $db->free($result); - } - else { + } else { dol_print_error($db); } } @@ -234,10 +227,10 @@ $fsearch .= ''; $description = $fsearch; // Show report header -$name = $langs->trans("ReportByMonth"); +$name = $langs->transcountry($localTaxType == 1 ? "LT1ReportByMonth" : "LT2ReportByMonth", $mysoc->country_code); $description .= $langs->trans($LT); $calcmode = $langs->trans("LTReportBuildWithOptionDefinedInModule").' '; -$calcmode .= '('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')
    '; +$calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRulesLT", DOL_URL_ROOT.'/admin/company.php').')'; //if (! empty($conf->global->MAIN_MODULE_ACCOUNTING)) $description.='
    '.$langs->trans("ThisIsAnEstimatedValue"); @@ -388,9 +381,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc 'localtax2' =>$x_paye[$my_paye_rate]['localtax2_list'][$id], //'link' =>$expensereport->getNomUrl(1) ); - } - else - { + } else { //$invoice_supplier->id=$x_paye[$my_paye_rate]['facid'][$id]; //$invoice_supplier->ref=$x_paye[$my_paye_rate]['facnum'][$id]; //$invoice_supplier->type=$x_paye[$my_paye_rate]['type'][$id]; diff --git a/htdocs/compta/localtax/list.php b/htdocs/compta/localtax/list.php index 47a0f44be47..2702a962281 100644 --- a/htdocs/compta/localtax/list.php +++ b/htdocs/compta/localtax/list.php @@ -31,7 +31,7 @@ $langs->load("compta"); $socid = GETPOST('socid', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'tax', '', '', 'charges'); -$ltt = GETPOST("localTaxType"); +$ltt = GETPOST("localTaxType", 'int'); /* @@ -42,17 +42,15 @@ llxHeader(); $localtax_static = new Localtax($db); -$newcardbutton = ''; -if ($user->rights->tax->charges->creer) -{ - $newcardbutton .= dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt + 1)), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt); -} +$url = DOL_URL_ROOT.'/compta/localtax/card.php?action=create&localTaxType='.$ltt; +if (!empty($socid)) $url .= '&socid='.$socid; +$newcardbutton = dolGetButtonTitle($langs->trans('NewLocalTaxPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer); print load_fiche_titre($langs->transcountry($ltt == 2 ? "LT2Payments" : "LT1Payments", $mysoc->country_code), $newcardbutton, 'title_accountancy'); $sql = "SELECT rowid, amount, label, f.datev, f.datep"; $sql .= " FROM ".MAIN_DB_PREFIX."localtax as f "; -$sql .= " WHERE f.entity = ".$conf->entity." AND localtaxtype=".$db->escape($ltt); +$sql .= " WHERE f.entity = ".$conf->entity." AND localtaxtype = ".$db->escape($ltt); $sql .= " ORDER BY datev DESC"; $result = $db->query($sql); @@ -95,9 +93,7 @@ if ($result) print ""; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/localtax/quadri_detail.php b/htdocs/compta/localtax/quadri_detail.php index 8e2e871251f..ebb66778df7 100644 --- a/htdocs/compta/localtax/quadri_detail.php +++ b/htdocs/compta/localtax/quadri_detail.php @@ -63,17 +63,13 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $q = GETPOST("q", "int"); if (empty($q)) { - if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } - else - { + if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } else { $date_start = dol_get_first_day($year_start, empty($conf->global->SOCIETE_FISCAL_MONTH_START) ? 1 : $conf->global->SOCIETE_FISCAL_MONTH_START, false); if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; } - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -138,7 +134,7 @@ $calcmode = ''; if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); -$calcmode .= '
    ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; +$calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; // Set period $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $prevyear = $year_start; @@ -204,12 +200,13 @@ if ($local == 1) { } // VAT Received and paid +print '
    '; echo ''; $y = $year_current; $total = 0; $i = 0; -$columns = 5; +$columns = 4; // Load arrays of datas $x_coll = tax_by_rate('localtax'.$local, $db, 0, 0, $date_start, $date_end, $modetax, 'sell'); @@ -222,11 +219,8 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; elseif ($x_coll == -2) print ''; - else - print ''; -} -else -{ + else print ''; +} else { $x_both = array(); //now, from these two arrays, get another array with one rate per line @@ -317,8 +311,9 @@ else $x_paye_sum = 0; $x_paye_ht = 0; - $span = $columns; - if ($modetax != 1) $span += 2; + $span = $columns - 1; + if ($modetax != 2) $span += 1; + if ($modetax != 1) $span += 1; // Customers invoices print ''; @@ -372,9 +367,7 @@ else $product_static->type = $fields['ptype']; print $product_static->getNomUrl(1); if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 16); - } - else - { + } else { if ($type) $text = img_object($langs->trans('Service'), 'service'); else $text = img_object($langs->trans('Product'), 'product'); if (preg_match('/^\((.*)\)$/', $fields['descr'], $reg)) @@ -416,8 +409,7 @@ else if ($type == 0) { print $langs->trans("NotUsedForGoods"); - } - else { + } else { print price($fields['payment_amount']); if (isset($fields['payment_amount'])) print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; } @@ -477,10 +469,10 @@ else // Blank line print ''; - print '
    '.$langs->trans("ErrorNoAccountancyModuleLoaded").'
    '.$langs->trans("FeatureNotYetAvailable").'
    '.$langs->trans("Error").'
    '.$langs->trans("Error").'
     
    '; + //print ''; $diff = $x_coll_sum; - echo ''; + //echo '
    '; //print table headers for this quadri - expenses now print ''; print ''; @@ -532,9 +524,7 @@ else $product_static->type = $fields['ptype']; print $product_static->getNomUrl(1); if (dol_string_nohtmltag($fields['descr'])) print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 16); - } - else - { + } else { if ($type) $text = img_object($langs->trans('Service'), 'service'); else $text = img_object($langs->trans('Product'), 'product'); print $text.' '.dol_trunc(dol_string_nohtmltag($fields['descr']), 16); @@ -572,9 +562,7 @@ else if ($type == 0) { print $langs->trans("NA"); - } - else - { + } else { print price(price2num($fields['payment_amount'], 'MT')); if (isset($fields['payment_amount'])) { print ' ('.round($ratiopaymentinvoice * 100, 2).'%)'; @@ -631,11 +619,7 @@ else print ''; } - print '
    '.$elementsup.'
    '; - // Total to pay - print '

    '; - print ''; $diff = $x_coll_sum - $x_paye_sum; print ''; print ''; @@ -644,7 +628,9 @@ else $i++; } + print '
    '.$langs->trans("TotalToPay").($q ? ', '.$langs->trans("Quadri").' '.$q : '').'
    '; +print '
    '; // End of page llxFooter(); diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 4a7e387987c..9d86cff65dd 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -47,7 +47,7 @@ $accountid = GETPOST('accountid', 'int'); $paymentnum = GETPOST('num_paiement', 'alpha'); $socid = GETPOST('socid', 'int'); -$sortfield = GETPOST('sortfield', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); $sortorder = GETPOST('sortorder', 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); @@ -107,7 +107,7 @@ if (empty($reshook)) if (substr($key, 0, 7) == 'amount_' && GETPOST($key) != '') { $cursorfacid = substr($key, 7); - $amounts[$cursorfacid] = price2num(trim(GETPOST($key))); + $amounts[$cursorfacid] = price2num(GETPOST($key)); $totalpayment = $totalpayment + $amounts[$cursorfacid]; if (!empty($amounts[$cursorfacid])) $atleastonepaymentnotnull++; $result = $tmpinvoice->fetch($cursorfacid); @@ -131,11 +131,10 @@ if (empty($reshook)) } $formquestion[$i++] = array('type' => 'hidden', 'name' => $key, 'value' => $_POST[$key]); - } - elseif (substr($key, 0, 21) == 'multicurrency_amount_') + } elseif (substr($key, 0, 21) == 'multicurrency_amount_') { $cursorfacid = substr($key, 21); - $multicurrency_amounts[$cursorfacid] = price2num(trim(GETPOST($key))); + $multicurrency_amounts[$cursorfacid] = price2num(GETPOST($key)); $multicurrency_totalpayment += $multicurrency_amounts[$cursorfacid]; if (!empty($multicurrency_amounts[$cursorfacid])) $atleastonepaymentnotnull++; $result = $tmpinvoice->fetch($cursorfacid); @@ -266,8 +265,6 @@ if (empty($reshook)) $paiement->paiementid = dol_getIdFromCode($db, GETPOST('paiementcode'), 'c_paiement', 'code', 'id', 1); $paiement->num_payment = GETPOST('num_paiement', 'alpha'); $paiement->note_private = GETPOST('comment', 'alpha'); - $paiement->num_paiement = $paiement->num_payment; // For bacward compatibility - $paiement->note = $paiement->note_private; // For bacward compatibility if (!$error) { @@ -312,9 +309,7 @@ if (empty($reshook)) else $loc = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$paiement_id; header('Location: '.$loc); exit; - } - else - { + } else { $db->rollback(); } } @@ -503,9 +498,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; $form->select_comptes($accountid, 'accountid', 0, '', 2); print ''; - } - else - { + } else { print ' '; } print "\n"; @@ -531,7 +524,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie // Comments print ''.$langs->trans('Comments').''; print ''; - print ''; + print ''; print ''; @@ -560,9 +553,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($facture->type != Facture::TYPE_CREDIT_NOTE) { $sql .= ' AND type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation - } - else - { + } else { $sql .= ' AND type = 2'; // If paying back a credit note, we show all credit notes } // Sort invoices by date and serial number: the older one comes first @@ -665,9 +656,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } print ''; - } - else - { + } else { print ''; } @@ -710,9 +699,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'"); print ''; print ''; - } - else - { + } else { print ''; print ''; } @@ -746,9 +733,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'"); print ''; print ''; - } - else - { + } else { print ''; print ''; } @@ -803,9 +788,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie //print "\n"; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -866,7 +849,7 @@ if (!GETPOST('action', 'aZ09')) if (!$sortfield) $sortfield = 'p.datep'; $sql = 'SELECT p.datep as dp, p.amount, f.total_ttc as fa_amount, f.ref'; - $sql .= ', f.rowid as facid, c.libelle as paiement_type, p.num_paiement'; + $sql .= ', f.rowid as facid, c.libelle as paiement_type, p.num_paiement as num_payment'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement as p LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement as c ON p.fk_paiement = c.id'; $sql .= ', '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE p.fk_facture = f.rowid'; @@ -902,7 +885,7 @@ if (!GETPOST('action', 'aZ09')) print ''; print ''.$objp->ref."\n"; print ''.dol_print_date($db->jdate($objp->dp))."\n"; - print ''.$objp->paiement_type.' '.$objp->num_paiement."\n"; + print ''.$objp->paiement_type.' '.$objp->num_payment."\n"; print ''.price($objp->amount).''; print ' '; print ''; diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index d3dec6fde82..dd7651a6147 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -39,7 +39,7 @@ $langs->loadLangs(array('bills', 'banks', 'companies')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -60,14 +60,12 @@ if ($action == 'setnote' && $user->rights->facture->paiement) $db->begin(); $object->fetch($id); - $result = $object->update_note(GETPOST('note', 'none')); + $result = $object->update_note(GETPOST('note', 'restricthtml')); if ($result > 0) { $db->commit(); $action = ''; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -87,15 +85,11 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->facture-> { header("Location: ".$backtopage); exit; - } - else - { + } else { header("Location: list.php"); exit; } - } - else - { + } else { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); @@ -131,9 +125,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->facture-> header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); exit; - } - else - { + } else { $langs->load("errors"); setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); @@ -147,9 +139,7 @@ if ($action == 'setnum_paiement' && !empty($_POST['num_paiement'])) if ($res === 0) { setEventMessages($langs->trans('PaymentNumberUpdateSucceeded'), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans('PaymentNumberUpdateFailed'), null, 'errors'); } } @@ -162,9 +152,7 @@ if ($action == 'setdatep' && !empty($_POST['datepday'])) if ($res === 0) { setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans('PaymentDateUpdateFailed'), null, 'errors'); } } @@ -413,9 +401,7 @@ if ($resql) print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -445,9 +431,7 @@ if ($user->socid == 0 && $action == '') if (!$disable_delete) { print ''.$langs->trans('Delete').''; - } - else - { + } else { print ''.$langs->trans('Delete').''; } } diff --git a/htdocs/compta/paiement/cheque/card.php b/htdocs/compta/paiement/cheque/card.php index 2fd885c5201..71cd900f915 100644 --- a/htdocs/compta/paiement/cheque/card.php +++ b/htdocs/compta/paiement/cheque/card.php @@ -38,7 +38,7 @@ $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'compta')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -46,8 +46,8 @@ $fieldname = (!empty($ref) ? 'ref' : 'rowid'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'cheque', $id, 'bordereau_cheque', '', 'fk_user_author', $fieldname); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (!$sortorder) $sortorder = "ASC"; if (!$sortfield) $sortfield = "b.dateo,b.rowid"; @@ -57,7 +57,7 @@ $offset = $limit * $page; $dir = $conf->bank->dir_output.'/checkdeposits/'; $filterdate = dol_mktime(0, 0, 0, GETPOST('fdmonth'), GETPOST('fdday'), GETPOST('fdyear')); -$filteraccountid = GETPOST('accountid'); +$filteraccountid = GETPOST('accountid', 'int'); $object = new RemiseCheque($db); @@ -79,9 +79,7 @@ if ($action == 'setdate' && $user->rights->banque->cheque) { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -98,9 +96,7 @@ if ($action == 'setrefext' && $user->rights->banque->cheque) { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -117,9 +113,7 @@ if ($action == 'setref' && $user->rights->banque->cheque) { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -149,30 +143,24 @@ if ($action == 'create' && $_POST["accountid"] > 0 && $user->rights->banque->che header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($langs->trans("ErrorSelectAtLeastOne"), null, 'mesgs'); $action = 'new'; } } -if ($action == 'remove' && $id > 0 && $_GET["lineid"] > 0 && $user->rights->banque->cheque) +if ($action == 'remove' && $id > 0 && GETPOST("lineid", 'int') > 0 && $user->rights->banque->cheque) { $object->id = $id; - $result = $object->removeCheck($_GET["lineid"]); + $result = $object->removeCheck(GETPOST("lineid", "int")); if ($result === 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -185,9 +173,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->banque->c { header("Location: index.php"); exit; - } - else - { + } else { setEventMessages($paiement->error, $paiement->errors, 'errors'); } } @@ -212,9 +198,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->banque->c header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -222,7 +206,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->banque->c if ($action == 'confirm_reject_check' && $confirm == 'yes' && $user->rights->banque->cheque) { $reject_date = dol_mktime(0, 0, 0, GETPOST('rejectdate_month'), GETPOST('rejectdate_day'), GETPOST('rejectdate_year')); - $rejected_check = GETPOST('bankid'); + $rejected_check = GETPOST('bankid', 'int'); $object->fetch($id); $paiement_id = $object->rejectCheck($rejected_check, $reject_date); @@ -232,9 +216,7 @@ if ($action == 'confirm_reject_check' && $confirm == 'yes' && $user->rights->ban //header("Location: ".DOL_URL_ROOT.'/compta/paiement/card.php?id='.$paiement_id); //exit; $action = ''; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; } @@ -261,15 +243,11 @@ if ($action == 'builddoc' && $user->rights->banque->cheque) { dol_print_error($db, $object->error); exit; - } - else - { + } else { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.(empty($conf->global->MAIN_JUMP_TAG) ? '' : '#builddoc')); exit; } -} - -// Remove file in doc form +} // Remove file in doc form elseif ($action == 'remove_file' && $user->rights->banque->cheque) { if ($object->fetch($id) > 0) @@ -314,9 +292,7 @@ if ($action == 'new') $h++; print load_fiche_titre($langs->trans("Cheques"), '', 'bank_account'); -} -else -{ +} else { $result = $object->fetch($id, $ref); if ($result < 0) { @@ -357,7 +333,7 @@ else if ($action == 'reject_check') { $formquestion = array( - array('type' => 'hidden', 'name' => 'bankid', 'value' => GETPOST('lineid')), + array('type' => 'hidden', 'name' => 'bankid', 'value' => GETPOST('lineid', 'int')), array('type' => 'date', 'name' => 'rejectdate_', 'label' => $langs->trans("RejectCheckDate"), 'value' => dol_now()) ); print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans("RejectCheck"), $langs->trans("ConfirmRejectCheck"), 'confirm_reject_check', $formquestion, '', 1); @@ -418,7 +394,7 @@ if ($action == 'new') $sql .= " AND b.fk_bordereau = 0"; $sql .= " AND b.amount > 0"; if ($filterdate) $sql .= " AND b.dateo = '".$db->idate($filterdate)."'"; - if ($filteraccountid > 0) $sql .= " AND ba.rowid= '".$filteraccountid."'"; + if ($filteraccountid > 0) $sql .= " AND ba.rowid = ".((int) $filteraccountid); $sql .= $db->order("b.dateo,b.rowid", "ASC"); $resql = $db->query($sql); @@ -510,9 +486,7 @@ if ($action == 'new') if ($paymentstatic->id) { print $paymentstatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -522,9 +496,7 @@ if ($action == 'new') if ($accountlinestatic->rowid) { print $accountlinestatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -544,17 +516,13 @@ if ($action == 'new') if ($user->rights->banque->cheque) { print ''; - } - else - { + } else { print ''.$langs->trans('NewCheckDepositOn', $account_label).''; } print '
    '; print ''; } -} -else -{ +} else { $paymentstatic = new Paiement($db); $accountlinestatic = new AccountLine($db); $accountstatic = new Account($db); @@ -588,9 +556,7 @@ else print $form->selectDate($object->date_bordereau, 'datecreate_', '', '', '', "setdate"); print ''; print ''; - } - else - { + } else { print $object->date_bordereau ? dol_print_date($object->date_bordereau, 'day') : ' '; } @@ -700,9 +666,7 @@ else if ($paymentstatic->id) { print $paymentstatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -712,9 +676,7 @@ else if ($accountlinestatic->rowid) { print $accountlinestatic->getNomUrl(1); - } - else - { + } else { print ' '; } print ''; @@ -737,9 +699,7 @@ else $i++; } - } - else - { + } else { print ''; print $langs->trans("None"); print ''; @@ -756,9 +716,7 @@ else } print ""; - } - else - { + } else { dol_print_error($db); } @@ -776,12 +734,12 @@ print '
    '; if ($user->socid == 0 && !empty($object->id) && $object->statut == 0 && $user->rights->banque->cheque) { - print ''.$langs->trans('Validate').''; + print ''.$langs->trans('Validate').''; } if ($user->socid == 0 && !empty($object->id) && $user->rights->banque->cheque) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print '
    '; diff --git a/htdocs/compta/paiement/cheque/class/remisecheque.class.php b/htdocs/compta/paiement/cheque/class/remisecheque.class.php index 746065647d5..00815c90f7d 100644 --- a/htdocs/compta/paiement/cheque/class/remisecheque.class.php +++ b/htdocs/compta/paiement/cheque/class/remisecheque.class.php @@ -120,18 +120,14 @@ class RemiseCheque extends CommonObject if ($this->statut == 0) { $this->ref = "(PROV".$this->id.")"; - } - else - { + } else { $this->ref = $obj->ref; } } $this->db->free($resql); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -215,7 +211,7 @@ class RemiseCheque extends CommonObject $sql .= " WHERE b.fk_type = 'CHQ'"; $sql .= " AND b.amount > 0"; $sql .= " AND b.fk_bordereau = 0"; - $sql .= " AND b.fk_account='".$account_id."'"; + $sql .= " AND b.fk_account = ".((int) $account_id); if ($limit) $sql .= $this->db->plimit($limit); dol_syslog("RemiseCheque::Create", LOG_DEBUG); @@ -227,9 +223,7 @@ class RemiseCheque extends CommonObject array_push($lines, $row[0]); } $this->db->free($resql); - } - else - { + } else { $this->errno = -1026; dol_syslog("RemiseCheque::Create Error ".$this->errno, LOG_ERR); } @@ -269,9 +263,7 @@ class RemiseCheque extends CommonObject dol_syslog("RemiseCheque::Create Error update amount ".$this->errno, LOG_ERR); } } - } - else - { + } else { $this->errno = -1; $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); @@ -288,9 +280,7 @@ class RemiseCheque extends CommonObject $this->db->commit(); dol_syslog("RemiseCheque::Create end", LOG_DEBUG); return $this->id; - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::Create end", LOG_DEBUG); return $this->errno; @@ -341,9 +331,7 @@ class RemiseCheque extends CommonObject if ($this->errno === 0) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::Delete ROLLBACK ($this->errno)"); } @@ -370,7 +358,7 @@ class RemiseCheque extends CommonObject if ($this->errno == 0 && $numref) { $sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque"; - $sql .= " SET statut = 1, ref = '".$numref."'"; + $sql .= " SET statut = 1, ref = '".$this->db->escape($numref)."'"; $sql .= " WHERE rowid = ".$this->id; $sql .= " AND entity = ".$conf->entity; $sql .= " AND statut = 0"; @@ -385,15 +373,11 @@ class RemiseCheque extends CommonObject { $this->ref = $numref; $this->statut = 1; - } - else - { + } else { $this->errno = -1029; dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); } - } - else - { + } else { $this->errno = -1033; dol_syslog("Remisecheque::Validate Error ".$this->errno, LOG_ERR); } @@ -404,9 +388,7 @@ class RemiseCheque extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::Validate ".$this->errno, LOG_ERR); return $this->errno; @@ -488,9 +470,7 @@ class RemiseCheque extends CommonObject } return $numref; - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Bank")); return ""; @@ -544,9 +524,7 @@ class RemiseCheque extends CommonObject } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -584,9 +562,7 @@ class RemiseCheque extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -664,17 +640,13 @@ class RemiseCheque extends CommonObject { //$outputlangs->charset_output=$sav_charset_output; return 1; - } - else - { + } else { //$outputlangs->charset_output=$sav_charset_output; dol_syslog("Error"); dol_print_error($this->db, $docmodel->error); return 0; } - } - else - { + } else { $this->error = $langs->trans("ErrorFileDoesNotExists", $dir.$file); return -1; } @@ -690,6 +662,7 @@ class RemiseCheque extends CommonObject global $conf; $this->errno = 0; + $this->db->begin(); $total = 0; $nb = 0; @@ -709,8 +682,8 @@ class RemiseCheque extends CommonObject $this->db->free($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."bordereau_cheque"; - $sql .= " SET amount = '".price2num($total)."'"; - $sql .= ", nbcheque = ".$nb; + $sql .= " SET amount = ".price2num($total); + $sql .= ", nbcheque = ".((int) $nb); $sql .= " WHERE rowid = ".$this->id; $sql .= " AND entity = ".$conf->entity; @@ -720,9 +693,7 @@ class RemiseCheque extends CommonObject $this->errno = -1030; dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)"); } - } - else - { + } else { $this->errno = -1031; dol_syslog("RemiseCheque::updateAmount ERREUR SELECT ($this->errno)"); } @@ -730,9 +701,7 @@ class RemiseCheque extends CommonObject if ($this->errno === 0) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); dol_syslog("RemiseCheque::updateAmount ROLLBACK ($this->errno)"); } @@ -754,16 +723,14 @@ class RemiseCheque extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."bank"; $sql .= " SET fk_bordereau = 0"; - $sql .= " WHERE rowid = '".$account_id."'"; - $sql .= " AND fk_bordereau = ".$this->id; + $sql .= " WHERE rowid = ".((int) $account_id); + $sql .= " AND fk_bordereau = ".((int) $this->id); $resql = $this->db->query($sql); if ($resql) { $this->updateAmount(); - } - else - { + } else { $this->errno = -1032; dol_syslog("RemiseCheque::removeCheck ERREUR UPDATE ($this->errno)"); } @@ -808,18 +775,18 @@ class RemiseCheque extends CommonObject $sql .= ' FROM '.MAIN_DB_PREFIX.'paiement_facture as pf'; $sql .= ' WHERE pf.fk_paiement = '.$payment->id; - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { - $rejectedPayment = new Paiement($db); + $rejectedPayment = new Paiement($this->db); $rejectedPayment->amounts = array(); $rejectedPayment->datepaye = $rejection_date; $rejectedPayment->paiementid = dol_getIdFromCode($this->db, 'CHQ', 'c_paiement', 'code', 'id', 1); $rejectedPayment->num_payment = $payment->num_payment; - while ($obj = $db->fetch_object($resql)) + while ($obj = $this->db->fetch_object($resql)) { - $invoice = new Facture($db); + $invoice = new Facture($this->db); $invoice->fetch($obj->fk_facture); $invoice->set_unpaid($user); @@ -838,31 +805,23 @@ class RemiseCheque extends CommonObject { $this->db->commit(); return $rejectedPayment->id; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $rejectedPayment->error; $this->errors = $rejectedPayment->errors; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $rejectedPayment->error; $this->errors = $rejectedPayment->errors; $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -935,15 +894,11 @@ class RemiseCheque extends CommonObject { $this->date_bordereau = $date; return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } - } - else - { + } else { return -2; } } @@ -970,15 +925,11 @@ class RemiseCheque extends CommonObject if ($resql) { return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } - } - else - { + } else { return -2; } } @@ -1046,8 +997,7 @@ class RemiseCheque extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; diff --git a/htdocs/compta/paiement/cheque/index.php b/htdocs/compta/paiement/cheque/index.php index c85553d59a8..1ee79aeafd9 100644 --- a/htdocs/compta/paiement/cheque/index.php +++ b/htdocs/compta/paiement/cheque/index.php @@ -76,9 +76,7 @@ if ($resql) { print ''.$num.''; print ''; print "\n"; -} -else -{ +} else { dol_print_error($db); } @@ -140,9 +138,7 @@ if ($resql) print ""; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/paiement/cheque/list.php b/htdocs/compta/paiement/cheque/list.php index fe1f7c31050..3bb45c4e312 100644 --- a/htdocs/compta/paiement/cheque/list.php +++ b/htdocs/compta/paiement/cheque/list.php @@ -124,11 +124,9 @@ if ($resql) if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; - $newcardbutton = ''; - if ($user->rights->banque->cheque) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new'); - } + $url = DOL_URL_ROOT.'/compta/paiement/cheque/card.php?action=new'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewCheckDeposit'), '', 'fa fa-plus-circle', $url, '', $user->rights->banque->cheque); print '
    '; if ($optioncss != '') print ''; @@ -221,9 +219,7 @@ if ($resql) print "\n"; $i++; } - } - else - { + } else { print ''; print ''.$langs->trans("None").""; print ''; @@ -231,9 +227,7 @@ if ($resql) print ""; print ""; print "
    \n"; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 7a759dde543..5cb16bdcbe3 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -9,6 +9,7 @@ * Copyright (C) 2018 Ferran Marcet * Copyright (C) 2018 Thibault FOUCART * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Andreu Bisquerra Gaya * * 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 @@ -73,6 +74,8 @@ class Paiement extends CommonObject public $amounts = array(); // array: invoice ID => amount for that invoice (in the main currency)> public $multicurrency_amounts = array(); // array: invoice ID => amount for that invoice (in the invoice's currency)> + public $pos_change = 0; // Excess received in TakePOS cash payment + public $author; public $paiementid; // Type of payment. Id saved into fields fk_paiement on llx_paiement public $paiementcode; // Code of payment. @@ -87,13 +90,6 @@ class Paiement extends CommonObject */ public $type_code; - /** - * @var string Numero du CHQ, VIR, etc... - * @deprecated - * @see $num_payment - */ - public $numero; - /** * @var string Numero du CHQ, VIR, etc... * @deprecated @@ -140,6 +136,10 @@ class Paiement extends CommonObject */ public $fk_paiement; // Type of payment + /** + * @var string payment external reference + */ + public $ref_ext; /** * Constructor @@ -161,7 +161,7 @@ class Paiement extends CommonObject */ public function fetch($id, $ref = '', $fk_bank = '') { - $sql = 'SELECT p.rowid, p.ref, p.datep as dp, p.amount, p.statut, p.ext_payment_id, p.ext_payment_site, p.fk_bank, p.multicurrency_amount,'; + $sql = 'SELECT p.rowid, p.ref, p.ref_ext, p.datep as dp, p.amount, p.statut, p.ext_payment_id, p.ext_payment_site, p.fk_bank, p.multicurrency_amount,'; $sql .= ' c.code as type_code, c.libelle as type_label,'; $sql .= ' p.num_paiement as num_payment, p.note,'; $sql .= ' b.fk_account'; @@ -184,9 +184,9 @@ class Paiement extends CommonObject $this->id = $obj->rowid; $this->ref = $obj->ref ? $obj->ref : $obj->rowid; + $this->ref_ext = $obj->ref_ext; $this->date = $this->db->jdate($obj->dp); $this->datepaye = $this->db->jdate($obj->dp); - $this->num_paiement = $obj->num_payment; // deprecated $this->num_payment = $obj->num_payment; $this->montant = $obj->amount; // deprecated $this->amount = $obj->amount; @@ -204,15 +204,11 @@ class Paiement extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->db->free($resql); return 0; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -246,9 +242,7 @@ class Paiement extends CommonObject { $amounts = &$this->amounts; $amounts_to_update = &$this->multicurrency_amounts; - } - else - { + } else { $amounts = &$this->multicurrency_amounts; $amounts_to_update = &$this->amounts; } @@ -282,22 +276,25 @@ class Paiement extends CommonObject $this->ref = $this->getNextNumRef(is_object($thirdparty) ? $thirdparty : ''); + if (empty($this->ref_ext)) { + $this->ref_ext = ''; + } + if ($way == 'dolibarr') { $total = $totalamount; $mtotal = $totalamount_converted; // Maybe use price2num with MT for the converted value - } - else - { + } else { $total = $totalamount_converted; // Maybe use price2num with MT for the converted value $mtotal = $totalamount; } - $num_payment = ($this->num_payment ? $this->num_payment : $this->num_paiement); - $note = ($this->note_public ? $this->note_public : $this->note); + $num_payment = $this->num_payment; + $note = ($this->note_private ? $this->note_private : $this->note); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat)"; - $sql .= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", '".$this->db->escape($num_payment)."', '".$this->db->escape($note)."', ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").", ".$user->id.")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."paiement (entity, ref, ref_ext, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, ext_payment_id, ext_payment_site, fk_user_creat, pos_change)"; + $sql .= " VALUES (".$conf->entity.", '".$this->db->escape($this->ref)."', '".$this->db->escape($this->ref_ext)."', '".$this->db->idate($now)."', '".$this->db->idate($this->datepaye)."', ".$total.", ".$mtotal.", ".$this->paiementid.", "; + $sql .= "'".$this->db->escape($num_payment)."', '".$this->db->escape($note)."', ".($this->ext_payment_id ? "'".$this->db->escape($this->ext_payment_id)."'" : "null").", ".($this->ext_payment_site ? "'".$this->db->escape($this->ext_payment_site)."'" : "null").", ".$user->id.", ".((int) $this->pos_change).")"; $resql = $this->db->query($sql); if ($resql) @@ -344,8 +341,7 @@ class Paiement extends CommonObject if (!in_array($invoice->type, $affected_types)) dol_syslog("Invoice ".$facid." is not a standard, nor replacement invoice, nor credit note, nor deposit invoice, nor situation invoice. We do nothing more."); elseif ($remaintopay) dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing more."); //else if ($mustwait) dol_syslog("There is ".$mustwait." differed payment to process, we do nothing more."); - else - { + else { // If invoice is a down payment, we also convert down payment to discount if ($invoice->type == Facture::TYPE_DEPOSIT) { @@ -433,15 +429,11 @@ class Paiement extends CommonObject $error++; } } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } - } - else - { + } else { dol_syslog(get_class($this).'::Create Amount line '.$key.' not a number. We discard it.'); } } @@ -453,9 +445,7 @@ class Paiement extends CommonObject if ($result < 0) { $error++; } // Fin appel triggers } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } @@ -467,9 +457,7 @@ class Paiement extends CommonObject $this->multicurrency_amount = $mtotal; $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -505,9 +493,7 @@ class Paiement extends CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->db->rollback(); return -2; } @@ -573,9 +559,7 @@ class Paiement extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error; $this->db->rollback(); return -5; @@ -724,7 +708,7 @@ class Paiement extends CommonObject $bank_line_id, $this->id_prelevement, DOL_URL_ROOT.'/compta/prelevement/card.php?id=', - $this->num_paiement, + $this->num_payment, 'withdraw' ); } @@ -736,9 +720,7 @@ class Paiement extends CommonObject if ($result < 0) { $error++; } // Fin appel triggers } - } - else - { + } else { $this->error = $acc->error; $error++; } @@ -746,9 +728,7 @@ class Paiement extends CommonObject if (!$error) { $this->db->commit(); - } - else - { + } else { $this->db->rollback(); } } @@ -756,9 +736,7 @@ class Paiement extends CommonObject if (!$error) { return $bank_line_id; - } - else - { + } else { return -1; } } @@ -782,9 +760,7 @@ class Paiement extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::update_fk_bank '.$this->error); return -1; @@ -824,7 +800,7 @@ class Paiement extends CommonObject $sql = "UPDATE ".MAIN_DB_PREFIX.'bank'; $sql .= " SET dateo = '".$this->db->idate($date)."', datev = '".$this->db->idate($date)."'"; - $sql .= " WHERE rowid IN (SELECT fk_bank FROM ".MAIN_DB_PREFIX."bank_url WHERE type = '".$type."' AND url_id = ".$this->id.")"; + $sql .= " WHERE rowid IN (SELECT fk_bank FROM ".MAIN_DB_PREFIX."bank_url WHERE type = '".$this->db->escape($type)."' AND url_id = ".$this->id.")"; $sql .= " AND rappro = 0"; $result = $this->db->query($sql); @@ -845,9 +821,7 @@ class Paiement extends CommonObject $this->db->commit(); return 0; - } - else - { + } else { $this->db->rollback(); return -2; } @@ -876,9 +850,7 @@ class Paiement extends CommonObject { $this->num_payment = $this->db->escape($num); return 0; - } - else - { + } else { $this->error = 'Error -1 '.$this->db->error(); return -2; } @@ -901,9 +873,7 @@ class Paiement extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::valide '.$this->error); return -1; @@ -925,9 +895,7 @@ class Paiement extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this).'::reject '.$this->error); return -1; @@ -971,9 +939,7 @@ class Paiement extends CommonObject $this->date_modification = $this->db->jdate($obj->tms); } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -1005,9 +971,7 @@ class Paiement extends CommonObject } return $billsarray; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog(get_class($this).'::getBillsArray Error '.$this->error.' -', LOG_DEBUG); return -1; @@ -1039,9 +1003,7 @@ class Paiement extends CommonObject } return $amounts; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog(get_class($this).'::getAmountsArray Error '.$this->error.' -', LOG_DEBUG); return -1; @@ -1124,9 +1086,7 @@ class Paiement extends CommonObject } return $numref; - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Invoice")); return ""; @@ -1199,7 +1159,7 @@ class Paiement extends CommonObject if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips $result = ''; - $label = ''.$langs->trans("ShowPayment").'
    '; + $label = img_picto('', $this->picto).' '.$langs->trans("Payment").'
    '; $label .= ''.$langs->trans("Ref").': '.$this->ref; if ($this->datepaye ? $this->datepaye : $this->date) $label .= '
    '.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); if ($mode == 'withlistofinvoices') @@ -1212,7 +1172,7 @@ class Paiement extends CommonObject foreach ($arraybill as $billid) { $facturestatic->fetch($billid); - $label .= '
    '.$facturestatic->getNomUrl(1).' '.$facturestatic->getLibStatut(2, 1); + $label .= '
    '.$facturestatic->getNomUrl(1, '', 0, 0, '', 1).' '.$facturestatic->getLibStatut(2, 1); } } } @@ -1227,8 +1187,7 @@ class Paiement extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $url = DOL_URL_ROOT.'/compta/paiement/card.php?id='.$this->id; diff --git a/htdocs/compta/paiement/info.php b/htdocs/compta/paiement/info.php index 00c3440b868..68d987b06ff 100644 --- a/htdocs/compta/paiement/info.php +++ b/htdocs/compta/paiement/info.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('bills', 'companies')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); /* diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 20401d81a1a..f3ea57ea084 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -1,13 +1,14 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2015 Jean-François Ferry - * Copyright (C) 2015 Juanjo Menent - * Copyright (C) 2017 Alexandre Spangaro - * Copyright (C) 2018 Ferran Marcet - * Copyright (C) 2018 Charlene Benke +/* Copyright (C) 2001-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Juanjo Menent + * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2018 Ferran Marcet + * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -30,6 +31,11 @@ */ require '../../main.inc.php'; + +// Security check +if ($user->socid) $socid = $user->socid; +$result = restrictedArea($user, 'facture', $facid, ''); + require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -39,138 +45,169 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php'; // Load translation files required by the page $langs->loadLangs(array('bills', 'banks', 'compta', 'companies')); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); -$optioncss = GETPOST('optioncss', 'alpha'); +$action = GETPOST('action', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); +$optioncss = GETPOST('optioncss', 'alpha'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'paymentlist'; -$facid = GETPOST('facid', 'int'); -$socid = GETPOST('socid', 'int'); -$userid = GETPOST('userid', 'int'); -$day = GETPOST('day', 'int'); -$month = GETPOST('month', 'int'); -$year = GETPOST('year', 'int'); +$facid = GETPOST('facid', 'int'); +$socid = GETPOST('socid', 'int'); +$userid = GETPOST('userid', 'int'); +$day = GETPOST('day', 'int'); +$month = GETPOST('month', 'int'); +$year = GETPOST('year', 'int'); -// Security check -if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'facture', $facid, ''); +$search_ref = GETPOST("search_ref", "alpha"); +$search_company = GETPOST("search_company", 'alpha'); +$search_paymenttype = GETPOST("search_paymenttype"); +$search_account = GETPOST("search_account", "int"); +$search_payment_num = GETPOST('search_payment_num', 'alpha'); +$search_amount = GETPOST("search_amount", 'alpha'); // alpha because we must be able to search on "< x" -$paymentstatic = new Paiement($db); -$accountstatic = new Account($db); -$companystatic = new Societe($db); +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST("sortfield", 'alpha'); +$sortorder = GETPOST("sortorder", 'alpha'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -$search_ref = GETPOST("search_ref", "alpha"); -$search_account = GETPOST("search_account", "int"); -$search_paymenttype = GETPOST("search_paymenttype"); -$search_amount = GETPOST("search_amount", 'alpha'); // alpha because we must be able to search on "< x" -$search_company = GETPOST("search_company", 'alpha'); -$search_payment_num = GETPOST('search_payment_num', 'alpha'); - -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST("sortfield", 'alpha'); -$sortorder = GETPOST("sortorder", 'alpha'); -$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +if (empty($page) || $page == -1) $page = 0; // If $page is not defined, or '' or -1 $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; + if (!$sortorder) $sortorder = "DESC"; -if (!$sortfield) $sortfield = "p.rowid"; +if (!$sortfield) $sortfield = "p.ref"; + +$search_all = trim(GETPOSTISSET("search_all") ? GETPOSTISSET("search_all", 'alpha') : GETPOST('sall')); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'p.ref'=>"RefPayment", + 's.nom'=>"ThirdParty", + 'p.num_paiement'=>"Numero", + 'p.amount'=>"Amount", +); + +$arrayfields = array( + 'p.ref' => array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), + 'p.datep' => array('label'=>"Date", 'checked'=>1, 'position'=>20), + 's.nom' => array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), + 'c.libelle' => array('label'=>"Type", 'checked'=>1, 'position'=>40), + 'transaction' => array('label'=>"BankTransactionLine", 'checked'=>1, 'position'=>50, 'enabled'=>(!empty($conf->banque->enabled))), + 'ba.label' => array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enabled'=>(!empty($conf->banque->enabled))), + 'p.num_paiement' => array('label'=>"Numero", 'checked'=>1, 'position'=>70, 'tooltip'=>"ChequeOrTransferNumber"), + 'p.amount' => array('label'=>"Amount", 'checked'=>1, 'position'=>80), + 'p.statut' => array('label'=>"Status", 'checked'=>1, 'position'=>90, 'enabled'=>(!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION))), +); +$arrayfields = dol_sort_array($arrayfields, 'position'); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('paymentlist')); -$extrafields = new ExtraFields($db); - -$arrayfields = array(); - +$object = new Paiement($db); /* * Actions */ -if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers -{ - $search_ref = ""; - $search_account = ""; - $search_amount = ""; - $search_paymenttype = ""; - $search_payment_num = ""; - $search_company = ""; - $day = ''; - $year = ''; - $month = ''; - $search_array_options = array(); +$parameters = array('socid'=>$socid); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + + +if (empty($reshook)) { + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + // All tests are required to be compatible with all browsers + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { + $search_ref = ''; + $search_account = ''; + $search_amount = ''; + $search_paymenttype = ''; + $search_payment_num = ''; + $search_company = ''; + $day = ''; + $year = ''; + $month = ''; + $option = ''; + $toselect = ''; + $search_array_options = array(); + } } - /* - * View + * View */ $form = new Form($db); $formother = new FormOther($db); +$accountstatic = new Account($db); +$companystatic = new Societe($db); +$bankline = new AccountLine($db); llxHeader('', $langs->trans('ListPayment')); -if (GETPOST("orphelins", "alpha")) -{ - // Payments not linked to an invoice. Should not happend. For debug only. - $sql = "SELECT p.rowid, p.ref, p.datep as dp, p.amount,"; - $sql .= " p.statut, p.num_paiement as num_payment,"; - $sql .= " c.code as paiement_code"; +if (GETPOST("orphelins", "alpha")) { + // Payments not linked to an invoice. Should not happend. For debug only. + $sql = "SELECT p.ref, p.datep, p.amount, p.statut, p.num_paiement"; + $sql .= ", c.code as paiement_code"; + // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; - $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement"; - $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; - $sql .= " AND pf.fk_facture IS NULL"; + $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement"; + $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; + $sql .= " AND pf.fk_facture IS NULL"; + // Add where from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; -} -else -{ - $sql = "SELECT DISTINCT p.rowid, p.ref, p.datep as dp, p.amount,"; // DISTINCT is to avoid duplicate when there is a link to sales representatives - $sql .= " p.statut, p.num_paiement as num_payment,"; - $sql .= " c.code as paiement_code,"; - $sql .= " ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal,"; - $sql .= " s.rowid as socid, s.nom as name, s.email"; +} else { + // DISTINCT is to avoid duplicate when there is a link to sales representatives + $sql = "SELECT DISTINCT p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement"; + $sql .= ", c.code as paiement_code"; + $sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal"; + $sql .= ", s.rowid as socid, s.nom as name, s.email"; + // Add fields from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; - $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON p.fk_bank = b.rowid"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON pf.fk_facture = f.rowid"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$socid) - { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; - } - $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; - if (!$user->rights->societe->client->voir && !$socid) - { - $sql .= " AND sc.fk_user = ".$user->id; - } - if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; - if ($userid) - { - if ($userid == -1) $sql .= " AND f.fk_user_author IS NULL"; - else $sql .= " AND f.fk_user_author = ".$userid; - } - // Search criteria - $sql .= dolSqlDateFilter("p.datep", $day, $month, $year); - if ($search_ref) $sql .= natural_search('p.ref', $search_ref); - if ($search_account > 0) $sql .= " AND b.fk_account=".$search_account; - if ($search_paymenttype != "") $sql .= " AND c.code='".$db->escape($search_paymenttype)."'"; - if ($search_payment_num != '') $sql .= natural_search('p.num_paiement', $search_payment_num); - if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1); - if ($search_company) $sql .= natural_search('s.nom', $search_company); + $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as c ON p.fk_paiement = c.id"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank as b ON p.fk_bank = b.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON b.fk_account = ba.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiement_facture as pf ON p.rowid = pf.fk_paiement"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."facture as f ON pf.fk_facture = f.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON f.fk_soc = s.rowid"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; + } + $sql .= " WHERE p.entity IN (".getEntity('invoice').")"; + if (!$user->rights->societe->client->voir && !$socid) { + $sql .= " AND sc.fk_user = ".$user->id; + } + if ($socid > 0) { + $sql .= " AND f.fk_soc = ".$socid; + } + if ($userid) { + if ($userid == -1) $sql .= " AND f.fk_user_author IS NULL"; + else $sql .= " AND f.fk_user_author = ".$userid; + } + + // Search criteria + $sql .= dolSqlDateFilter("p.datep", $day, $month, $year); + if ($search_ref) $sql .= natural_search('p.ref', $search_ref); + if ($search_account > 0) $sql .= " AND b.fk_account=".$search_account; + if ($search_paymenttype != '') $sql .= " AND c.code='".$db->escape($search_paymenttype)."'"; + if ($search_payment_num != '') $sql .= natural_search('p.num_paiement', $search_payment_num); + if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1); + if ($search_company) $sql .= natural_search('s.nom', $search_company); + + if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); + // Add where from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook @@ -179,211 +216,291 @@ else $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; -if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) -{ +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { $result = $db->query($sql); $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { + + // if total resultset is smaller then paging size (filtering), goto and load page 0 + if (($page * $limit) > $nbtotalofrecords) { $page = 0; $offset = 0; } } $sql .= $db->plimit($limit + 1, $offset); -//print "$sql"; $resql = $db->query($sql); -if ($resql) +if (!$resql) { + dol_print_error($db); + llxFooter(); + $db->close(); + exit; +} + +$num = $db->num_rows($resql); + +$param = ''; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +$param .= (GETPOST("orphelins") ? "&orphelins=1" : ''); +$param .= ($search_ref ? "&search_ref=".urlencode($search_ref) : ''); +$param .= ($search_company ? "&search_company=".urlencode($search_company) : ''); +$param .= ($search_amount ? "&search_amount=".urlencode($search_amount) : ''); +$param .= ($search_payment_num ? "&search_payment_num=".urlencode($search_payment_num) : ''); +if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + +print '
    '; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1); + +if ($search_all) { - $num = $db->num_rows($resql); + foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '; +} - $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - $param .= (GETPOST("orphelins") ? "&orphelins=1" : ""); - $param .= ($search_ref ? "&search_ref=".urlencode($search_ref) : ""); - $param .= ($search_company ? "&search_company=".urlencode($search_company) : ""); - $param .= ($search_amount ? "&search_amount=".urlencode($search_amount) : ""); - $param .= ($search_payment_num ? "&search_payment_num=".urlencode($search_payment_num) : ""); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); - print ''; - if ($optioncss != '') print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; +print '
    '; +print ''; - print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit, 0, 0, 1); +print ''; - print '
    '; - print '
    '."\n"; - - // Lines for filters fields - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if (!empty($conf->banque->enabled)) - { - print ''; - } - print ''; +if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print ''; - print ''; - if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) - { - print ''; - } - print "\n"; +} - print ''; - print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "p.rowid", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "dp", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "c.libelle", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "p.num_paiement", "", $param, "", $sortfield, $sortorder); - if (!empty($conf->banque->enabled)) - { - print_liste_field_titre("Account", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder); - } - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], "p.amount", "", $param, 'class="right"', $sortfield, $sortorder); - //print_liste_field_titre("Invoices"),"","","",$param,'class="left"',$sortfield,$sortorder); +// Filter: Ref +if (!empty($arrayfields['p.ref']['checked'])) { + print ''; +} - $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; +// Filter: Date +if (!empty($arrayfields['p.datep']['checked'])) { + print ''; +} - 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 "\n"; +// Filter: Thirdparty +if (!empty($arrayfields['s.nom']['checked'])) { + print ''; +} - $i = 0; - $totalarray = array(); - while ($i < min($num, $limit)) - { - $objp = $db->fetch_object($resql); +// Filter: Payment type +if (!empty($arrayfields['c.libelle']['checked'])) { + print ''; +} - $paymentstatic->id = $objp->rowid; - $paymentstatic->ref = $objp->ref; +// Filter: Bank transaction number +if (!empty($arrayfields['transaction']['checked'])) { + print ''; +} - $companystatic->id = $objp->socid; - $companystatic->name = $objp->name; - $companystatic->email = $objp->email; +// Filter: Cheque number (fund transfer) +if (!empty($arrayfields['p.num_paiement']['checked'])) { + print ''; +} - print ''; +// Filter: Bank account +if (!empty($arrayfields['ba.label']['checked'])) { + print ''; +} - print ''; - if (!$i) $totalarray['nbfield']++; +// Filter: Amount +if (!empty($arrayfields['p.amount']['checked'])) { + print ''; +} - // Date - $dateformatforpayment = 'day'; - if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour'; - print ''; - if (!$i) $totalarray['nbfield']++; +// Filter: Status (only placeholder) +if (!empty($arrayfields['p.statut']['checked'])) { + print ''; +} - // Thirdparty - print ''; - if (!$i) $totalarray['nbfield']++; +// Fields from hook +$parameters = array('arrayfields'=>$arrayfields); +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; - // Type - print ''; - if (!$i) $totalarray['nbfield']++; +print ''; - // Payment number - print ''; - if (!$i) $totalarray['nbfield']++; +print ""; - // Account - if (!empty($conf->banque->enabled)) - { - print ''; +if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.datep']['checked'])) print_liste_field_titre($arrayfields['p.datep']['label'], $_SERVER["PHP_SELF"], "p.datep", '', $param, '', $sortfield, $sortorder, 'center '); +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['c.libelle']['checked'])) print_liste_field_titre($arrayfields['c.libelle']['label'], $_SERVER["PHP_SELF"], "c.libelle", '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.num_paiement']['checked'])) print_liste_field_titre($arrayfields['p.num_paiement']['label'], $_SERVER["PHP_SELF"], "p.num_paiement", '', $param, '', $sortfield, $sortorder, '', $arrayfields['p.num_paiement']['tooltip']); +if (!empty($arrayfields['transaction']['checked'])) print_liste_field_titre($arrayfields['transaction']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['ba.label']['checked'])) print_liste_field_titre($arrayfields['ba.label']['label'], $_SERVER["PHP_SELF"], "ba.label", '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.amount']['checked'])) print_liste_field_titre($arrayfields['p.amount']['label'], $_SERVER["PHP_SELF"], "p.amount", '', $param, 'class="right"', $sortfield, $sortorder); +if (!empty($arrayfields['p.statut']['checked'])) print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", '', $param, 'class="right"', $sortfield, $sortorder); - $accountingjournal = new AccountingJournal($db); - $accountingjournal->fetch($objp->accountancy_journal); - $accountstatic->accountancy_journal = $accountingjournal->code; +// 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; - print $accountstatic->getNomUrl(1); - } - print ''; - if (!$i) $totalarray['nbfield']++; - } +print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); +print ""; - // Amount - print ''; - if (!$i) $totalarray['nbfield']++; - $totalarray['pos'][7] = 'amount'; - $totalarray['val']['amount'] += $objp->amount; +$checkedCount = 0; +foreach ($arrayfields as $column) { + if ($column['checked']) { + $checkedCount++; + } +} - if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } +$i = 0; +$totalarray = array(); +while ($i < min($num, $limit)) { + $objp = $db->fetch_object($resql); - print ''; + $object->id = $objp->rowid; + $object->ref = $objp->ref; + + $companystatic->id = $objp->socid; + $companystatic->name = $objp->name; + $companystatic->email = $objp->email; + + print ''; + + // No + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print ''; if (!$i) $totalarray['nbfield']++; + } - print ''; + // Ref + if (!empty($arrayfields['p.ref']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + } - $i++; - } + // Date + if (!empty($arrayfields['p.datep']['checked'])) { + $dateformatforpayment = 'day'; + if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour'; + print ''; + if (!$i) $totalarray['nbfield']++; + } - // Show total line - include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + // Thirdparty + if (!empty($arrayfields['s.nom']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + } + // Payment type + if (!empty($arrayfields['c.libelle']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + } - print "
    '; - print ''; - print ''; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; - $formother->select_year($year ? $year : -1, 'year', 1, 20, 5); - print ''; - print ''; - print ''; - $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1); - print ''; - print ''; - print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1); - print ''; - print ''; +// Filters: Lines (placeholder) +print '
    '; print ''; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print ''; - print '
    '; + print ''; + print ''; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + $formother->select_year($year ? $year : -1, 'year', 1, 20, 5); + print '
    '; + print ''; + print ''; + $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1); + print ''; + print ''; + print ''; + print '
    '; + $form->select_comptes($search_account, 'search_account', 0, '', 1); + print ''; - print $paymentstatic->getNomUrl(1); - print ''; + print ''; + print ''.dol_print_date($db->jdate($objp->dp), $dateformatforpayment).''; + print ''; - if ($objp->socid > 0) - { - print $companystatic->getNomUrl(1, '', 24); - } - print ''.$langs->trans("PaymentTypeShort".$objp->paiement_code).''; +print $form->showFilterAndCheckAddButtons(0); +print ''.$objp->num_payment.'
    '; - if ($objp->bid > 0) - { - $accountstatic->id = $objp->bid; - $accountstatic->ref = $objp->bref; - $accountstatic->label = $objp->blabel; - $accountstatic->number = $objp->number; - $accountstatic->account_number = $objp->account_number; +print '
    '.price($objp->amount).''; - if ($objp->statut == 0) print ''; - print $paymentstatic->LibStatut($objp->statut, 5); - if ($objp->statut == 0) print ''; - print '
    '.(($offset * $limit) + $i).'
    '.$object->getNomUrl(1).''.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).''; + if ($objp->socid > 0) { + print $companystatic->getNomUrl(1, '', 24); + } + print ''.$langs->trans("PaymentTypeShort".$objp->paiement_code).'
    \n"; - print "
    "; - print "
    \n"; -} -else -{ - dol_print_error($db); + // Filter: Cheque number (fund transfer) + if (!empty($arrayfields['p.num_paiement']['checked'])) { + print ''.$objp->num_paiement.''; + if (!$i) $totalarray['nbfield']++; + } + + // Bank transaction + if (!empty($arrayfields['transaction']['checked'])) { + $bankline->fetch($objp->fk_bank); + print ''.$bankline->getNomUrl(1, 0).''; + if (!$i) $totalarray['nbfield']++; + } + + // Bank account + if (!empty($arrayfields['ba.label']['checked'])) { + print ''; + if ($objp->bid > 0) { + $accountstatic->id = $objp->bid; + $accountstatic->ref = $objp->bref; + $accountstatic->label = $objp->blabel; + $accountstatic->number = $objp->number; + $accountstatic->account_number = $objp->account_number; + + $accountingjournal = new AccountingJournal($db); + $accountingjournal->fetch($objp->accountancy_journal); + $accountstatic->accountancy_journal = $accountingjournal->code; + + print $accountstatic->getNomUrl(1); + } + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Amount + if (!empty($arrayfields['p.amount']['checked'])) { + print ''.price($objp->amount).''; + if (!$i) $totalarray['nbfield']++; + $totalarray['pos'][$checkedCount] = 'amount'; + $totalarray['val']['amount'] += $objp->amount; + } + + // Status + if (!empty($arrayfields['p.statut']['checked'])) { + print ''; + if ($objp->statut == 0) print ''; + print $object->LibStatut($objp->statut, 5); + if ($objp->statut == 0) print ''; + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Buttons + print ''; + if (!$i) $totalarray['nbfield']++; + + print ''; + + $i++; } +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +print ""; +print ""; +print ""; + // End of page llxFooter(); $db->close(); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index 80013d3d865..9d3bae3140d 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2006 Rodolphe Quiedeville * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -26,6 +27,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/rapport/pdf_paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Security check @@ -68,9 +70,7 @@ if ($action == 'builddoc') if ($rap->write_file($dir, $_POST["remonth"], $_POST["reyear"], $outputlangs) > 0) { $outputlangs->charset_output = $sav_charset_output; - } - else - { + } else { $outputlangs->charset_output = $sav_charset_output; dol_print_error($db, $obj->error); } @@ -84,6 +84,7 @@ if ($action == 'builddoc') */ $formother = new FormOther($db); +$formfile = new FormFile($db); llxHeader(); @@ -155,7 +156,7 @@ if ($year) $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; print ''; - print ''.img_pdf().' '.$file.''; + print ''.img_pdf().' '.$file.''.$formfile->showPreview($file, 'facture_paiement', $relativepath, 0).''; print ''.dol_print_size(dol_filesize($tfile)).''; print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; print ''; diff --git a/htdocs/compta/paiement/tovalidate.php b/htdocs/compta/paiement/tovalidate.php index 91ef2c215e6..00e9a0c4074 100644 --- a/htdocs/compta/paiement/tovalidate.php +++ b/htdocs/compta/paiement/tovalidate.php @@ -40,8 +40,8 @@ if ($user->socid > 0) $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -126,9 +126,7 @@ if ($resql) if ($objp->statut == 0) { print ''.$langs->trans("PaymentStatusToValidShort").''; - } - else - { + } else { print "-"; } diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index 509e20f3613..5f442ab0b18 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; $langs->load("bills"); $chid = GETPOST("id", 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $amounts = array(); // Security check @@ -41,6 +41,8 @@ if ($user->socid > 0) $socid = $user->socid; } +$charge = new ChargeSociales($db); + /* * Actions @@ -110,8 +112,8 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y $paiement->amounts = $amounts; // Tableau de montant $paiement->paiementtype = GETPOST("paiementtype", 'alphanohtml'); $paiement->num_payment = GETPOST("num_payment", 'alphanohtml'); - $paiement->note = GETPOST("note", 'none'); - $paiement->note_private = GETPOST("note", 'none'); + $paiement->note = GETPOST("note", 'restricthtml'); + $paiement->note_private = GETPOST("note", 'restricthtml'); if (!$error) { @@ -141,9 +143,7 @@ if ($action == 'add_payment' || ($action == 'confirm_paiement' && $confirm == 'y $loc = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$chid; header('Location: '.$loc); exit; - } - else - { + } else { $db->rollback(); } } @@ -163,7 +163,6 @@ $form = new Form($db); // Formulaire de creation d'un paiement de charge if ($action == 'create') { - $charge = new ChargeSociales($db); $charge->fetch($chid); $charge->accountid = $charge->fk_account ? $charge->fk_account : $charge->accountid; $charge->paiementtype = $charge->mode_reglement_id ? $charge->mode_reglement_id : $charge->paiementtype; @@ -225,7 +224,7 @@ if ($action == 'create') print ''.$langs->trans("Date").''; $datepaye = dol_mktime(12, 0, 0, $_POST["remonth"], $_POST["reday"], $_POST["reyear"]); $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : 0; - print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); + print $form->selectDate($datepayment, '', '', '', 0, "add_payment", 1, 1, 0, '', '', $charge->date_ech, '', 1, $langs->trans("DateOfSocialContribution")); print ""; print ''; @@ -283,9 +282,7 @@ if ($action == 'create') if ($objp->date_ech > 0) { print ''.dol_print_date($objp->date_ech, 'day').''."\n"; - } - else - { + } else { print "!!!\n"; } @@ -305,9 +302,7 @@ if ($action == 'create') $remaintopay = $objp->amount - $sumpaid; print ''; print ''; - } - else - { + } else { print '-'; } print ""; diff --git a/htdocs/compta/payment_sc/card.php b/htdocs/compta/payment_sc/card.php index 5fdfe327056..0e71c83f6cb 100644 --- a/htdocs/compta/payment_sc/card.php +++ b/htdocs/compta/payment_sc/card.php @@ -66,9 +66,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->tax->char $db->commit(); header("Location: ".DOL_URL_ROOT."/compta/sociales/payments.php?mode=sconly"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -184,7 +182,7 @@ print ''.$langs->trans('Date').''.dol_print_date($o print ''.$langs->trans('Mode').''.$langs->trans("PaymentType".$object->type_code).''; // Numero -print ''.$langs->trans('Numero').''.$object->num_paiement.''; +print ''.$langs->trans('Numero').''.$object->num_payment.''; // Montant print ''.$langs->trans('Amount').''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).''; @@ -283,9 +281,7 @@ if ($resql) print "\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -315,10 +311,8 @@ if ($action == '') { if (!$disable_delete) { - print ''.$langs->trans('Delete').''; - } - else - { + print ''.$langs->trans('Delete').''; + } else { print ''.$langs->trans('Delete').''; } } diff --git a/htdocs/compta/paymentbybanktransfer/index.php b/htdocs/compta/paymentbybanktransfer/index.php index fb1432a18f1..e2477d86544 100644 --- a/htdocs/compta/paymentbybanktransfer/index.php +++ b/htdocs/compta/paymentbybanktransfer/index.php @@ -162,15 +162,11 @@ if ($resql) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("NoSupplierInvoiceToWithdraw", $langs->transnoentitiesnoconv("BankTransfer")).''; } print "
    "; -} -else -{ +} else { dol_print_error($db); } @@ -231,9 +227,7 @@ if ($result) print "
    "; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/card.php b/htdocs/compta/prelevement/card.php index 00bcd088e27..2691e14504d 100644 --- a/htdocs/compta/prelevement/card.php +++ b/htdocs/compta/prelevement/card.php @@ -37,7 +37,7 @@ $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawal if ($user->socid > 0) accessforbidden(); // Get supervariables -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $socid = GETPOST('socid', 'int'); @@ -45,8 +45,8 @@ $type = GETPOST('type', 'aZ09'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -81,38 +81,38 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - if ($action == 'confirm_delete') - { - $res = $object->delete($user); - if ($res > 0) - { - if ($object->type == 'bank-transfer') { - header("Location: ".DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php'); - } else { - header("Location: ".DOL_URL_ROOT.'/compta/prelevement/index.php'); - } - exit; - } - } + if ($action == 'confirm_delete') + { + $res = $object->delete($user); + if ($res > 0) + { + if ($object->type == 'bank-transfer') { + header("Location: ".DOL_URL_ROOT.'/compta/paymentbybanktransfer/index.php'); + } else { + header("Location: ".DOL_URL_ROOT.'/compta/prelevement/index.php'); + } + exit; + } + } - // Seems to no be used and replaced with $action == 'infocredit' - if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') - { - $res = $object->set_credite(); - if ($res >= 0) - { - header("Location: card.php?id=".$id); - exit; - } - } + // Seems to no be used and replaced with $action == 'infocredit' + if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') + { + $res = $object->set_credite(); + if ($res >= 0) + { + header("Location: card.php?id=".$id); + exit; + } + } - if ($action == 'infotrans' && $user->rights->prelevement->bons->send) - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + if ($action == 'infotrans' && $user->rights->prelevement->bons->send) + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - /* + /* if ($_FILES['userfile']['name'] && basename($_FILES['userfile']['name'],".ps") == $object->ref) { $dir = $conf->prelevement->dir_output.'/receipts'; @@ -133,24 +133,24 @@ if (empty($reshook)) $error = $object->set_infotrans($user, $dt, GETPOST('methode', 'alpha')); - if ($error) - { - header("Location: card.php?id=".$id."&error=$error"); - exit; - } - } + if ($error) + { + header("Location: card.php?id=".$id."&error=$error"); + exit; + } + } // Set direct debit order to credited, create payment and close invoices if ($action == 'infocredit' && $user->rights->prelevement->bons->credit) { $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - $error = $object->set_infocredit($user, $dt); - if ($error) - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } + $error = $object->set_infocredit($user, $dt); + if ($error) + { + setEventMessages($object->error, $object->errors, 'errors'); + } + } } @@ -179,7 +179,7 @@ if ($id > 0 || $ref) }*/ - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -317,15 +317,15 @@ if ($id > 0 || $ref) if (empty($object->date_trans) && $user->rights->prelevement->bons->send) { - print "id."\">".$langs->trans("SetToStatusSent").""; + print "id."\">".$langs->trans("SetToStatusSent").""; } if (!empty($object->date_trans) && $object->date_credit == 0) { - print "id."\">".$langs->trans("ClassCredited").""; + print "id."\">".$langs->trans("ClassCredited").""; } - print "id."\">".$langs->trans("Delete").""; + print "id."\">".$langs->trans("Delete").""; print ""; } @@ -421,9 +421,7 @@ if ($id > 0 || $ref) if ($obj->statut == 3) { print ''.$langs->trans("StatusRefused").''; - } - else - { + } else { if ($object->statut == BonPrelevement::STATUS_CREDITED) { if ($obj->statut == 2) { @@ -431,15 +429,11 @@ if ($id > 0 || $ref) { //print ''.$langs->trans("StandingOrderReject").''; print ''.$langs->trans("StandingOrderReject").''; - } - else - { + } else { //print ''.$langs->trans("StandingOrderReject").''; } } - } - else - { + } else { //print ''.$langs->trans("StandingOrderReject").''; } } @@ -472,9 +466,7 @@ if ($id > 0 || $ref) print ''; $db->free($result); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php index b1e7e29a698..9d3c5bef7a8 100644 --- a/htdocs/compta/prelevement/class/bonprelevement.class.php +++ b/htdocs/compta/prelevement/class/bonprelevement.class.php @@ -162,21 +162,15 @@ class BonPrelevement extends CommonObject if ($this->db->query($sql)) { $result = 0; - } - else - { + } else { $result = -1; dol_syslog(get_class($this)."::AddFacture Error $result"); } - } - else - { + } else { $result = -2; dol_syslog(get_class($this)."::AddFacture Error $result"); } - } - else - { + } else { $result = -3; dol_syslog(get_class($this)."::AddFacture Error $result"); } @@ -211,22 +205,18 @@ class BonPrelevement extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."prelevement_lignes"; $sql .= " WHERE fk_prelevement_bons = ".$this->id; $sql .= " AND fk_soc =".$client_id; - $sql .= " AND code_banque ='".$code_banque."'"; - $sql .= " AND code_guichet ='".$code_guichet."'"; - $sql .= " AND number ='".$number."'"; + $sql .= " AND code_banque = '".$this->db->escape($code_banque)."'"; + $sql .= " AND code_guichet = '".$this->db->escape($code_guichet)."'"; + $sql .= " AND number = '".$this->db->escape($number)."'"; $resql = $this->db->query($sql); if ($resql) { $num = $this->db->num_rows($resql); - } - else - { + } else { $result = -1; } - } - else - { + } else { /* * No aggregate */ @@ -244,19 +234,17 @@ class BonPrelevement extends CommonObject $sql .= ", ".$client_id; $sql .= ", '".$this->db->escape($client_nom)."'"; $sql .= ", '".price2num($amount)."'"; - $sql .= ", '".$code_banque."'"; - $sql .= ", '".$code_guichet."'"; - $sql .= ", '".$number."'"; - $sql .= ", '".$number_key."'"; + $sql .= ", '".$this->db->escape($code_banque)."'"; + $sql .= ", '".$this->db->escape($code_guichet)."'"; + $sql .= ", '".$this->db->escape($number)."'"; + $sql .= ", '".$this->db->escape($number_key)."'"; $sql .= ")"; if ($this->db->query($sql)) { $line_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_lignes"); $result = 0; - } - else - { + } else { dol_syslog(get_class($this)."::addline Error -2"); $result = -2; } @@ -330,20 +318,16 @@ class BonPrelevement extends CommonObject $this->type = $obj->type; $this->status = $obj->status; - $this->statut = $obj->status; // For backward compatibility + $this->statut = $obj->status; // For backward compatibility $this->fetched = 1; return 1; - } - else - { + } else { dol_syslog(get_class($this)."::Fetch Erreur aucune ligne retournee"); return -1; } - } - else - { + } else { return -2; } } @@ -411,17 +395,13 @@ class BonPrelevement extends CommonObject { $this->db->commit(); return 0; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::set_credite ROLLBACK "); return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::set_credite Ouverture transaction SQL impossible "); return -2; } @@ -527,19 +507,16 @@ class BonPrelevement extends CommonObject } $paiement->num_payment = $this->ref; // Set ref of direct debit note - $paiement->num_paiement = $this->ref; // For backward compatibility $paiement->id_prelevement = $this->id; - $paiement_id = $paiement->create($user); // This use ->paiementid, that is ID of payment mode + $paiement_id = $paiement->create($user); // This use ->paiementid, that is ID of payment mode if ($paiement_id < 0) { $error++; $this->error = $paiement->error; $this->errors = $paiement->errors; dol_syslog(get_class($this)."::set_infocredit AddPayment Error ".$this->error); - } - else - { + } else { if ($this->type == 'bank-transfer') { $modeforaddpayment = 'payment_supplier'; } else { @@ -562,20 +539,17 @@ class BonPrelevement extends CommonObject // Update withdrawal line // TODO: Translate to ligneprelevement.class.php - if (! $error) { + if (!$error) { $sql = " UPDATE ".MAIN_DB_PREFIX."prelevement_lignes"; $sql .= " SET statut = 2"; $sql .= " WHERE fk_prelevement_bons = ".$this->id; - if (!$this->db->query($sql)) - { + if (!$this->db->query($sql)) { dol_syslog(get_class($this)."::set_infocredit Update lines Error"); $error++; } } - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::set_infocredit Update Bons Error"); $error++; @@ -591,15 +565,11 @@ class BonPrelevement extends CommonObject $this->db->commit(); return 0; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { return -1026; } } @@ -641,9 +611,7 @@ class BonPrelevement extends CommonObject $message .= $langs->trans("InfoTransData", price($this->amount), $this->methodes_trans[$this->method_trans], dol_print_date($date, 'day')); // TODO Call trigger to create a notification using notification module - } - else - { + } else { $error++; } @@ -655,17 +623,13 @@ class BonPrelevement extends CommonObject $this->db->commit(); return 0; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::set_infotrans ROLLBACK", LOG_ERR); return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::set_infotrans Ouverture transaction SQL impossible", LOG_CRIT); return -2; } @@ -720,8 +684,7 @@ class BonPrelevement extends CommonObject { $row = $this->db->fetch_row($resql); if (!$amounts) $arr[$i] = $row[0]; - else - { + else { $arr[$i] = array( $row[0], $row[1] @@ -731,9 +694,7 @@ class BonPrelevement extends CommonObject } } $this->db->free($resql); - } - else - { + } else { dol_syslog(get_class($this)."::getListInvoices Erreur"); } @@ -782,9 +743,7 @@ class BonPrelevement extends CommonObject $this->db->free($resql); return $obj->nb; - } - else - { + } else { $error = 1; dol_syslog(get_class($this)."::SommeAPrelever Erreur -1"); dol_syslog($this->db->error()); @@ -847,9 +806,7 @@ class BonPrelevement extends CommonObject $this->db->free($resql); return $obj->nb; - } - else - { + } else { $this->error = get_class($this)."::NbFactureAPrelever Erreur -1 sql=".$this->db->error(); return -1; } @@ -926,7 +883,7 @@ class BonPrelevement extends CommonObject $sql .= " AND f.rowid = pfd.fk_facture_fourn"; } $sql .= " AND s.rowid = f.fk_soc"; - $sql .= " AND f.fk_statut = 1"; // Invoice validated + $sql .= " AND f.fk_statut = 1"; // Invoice validated $sql .= " AND f.paye = 0"; $sql .= " AND pfd.traite = 0"; $sql .= " AND f.total_ttc > 0"; @@ -954,9 +911,7 @@ class BonPrelevement extends CommonObject } $this->db->free($resql); dol_syslog(__METHOD__."::Read invoices, ".$i." invoices to withdraw", LOG_DEBUG); - } - else - { + } else { $error++; dol_syslog(__METHOD__."::Read invoices error ".$this->db->error(), LOG_ERR); } @@ -1006,27 +961,19 @@ class BonPrelevement extends CommonObject $factures_prev_id[$i] = $fac[0]; $i++; //dol_syslog(__METHOD__."::RIB is ok", LOG_DEBUG); - } - else - { + } else { dol_syslog(__METHOD__."::Check BAN Error on default bank number IBAN/BIC for thirdparty reported by verif() ".$tmpinvoice->socid." ".$soc->name, LOG_WARNING); $this->invoice_in_error[$fac[0]] = "Error on default bank number IBAN/BIC for invoice ".$tmpinvoice->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0); $this->thirdparty_in_error[$soc->id] = "Error on default bank number IBAN/BIC for invoice ".$tmpinvoice->getNomUrl(0)." for thirdparty ".$soc->getNomUrl(0); } - } - else - { + } else { dol_syslog(__METHOD__."::Check BAN Failed to read company", LOG_WARNING); } - } - else - { + } else { dol_syslog(__METHOD__."::Check BAN Failed to read invoice", LOG_WARNING); } } - } - else - { + } else { dol_syslog(__METHOD__."::Check BAN No invoice to process", LOG_WARNING); } } @@ -1112,15 +1059,11 @@ class BonPrelevement extends CommonObject $prev_id = $this->db->last_insert_id(MAIN_DB_PREFIX."prelevement_bons"); $this->id = $prev_id; $this->ref = $ref; - } - else - { + } else { $error++; dol_syslog(__METHOD__."::Create withdraw receipt ".$this->db->lasterror(), LOG_ERR); } - } - else - { + } else { $error++; dol_syslog(__METHOD__."::Get last withdraw receipt ".$this->db->lasterror(), LOG_ERR); } @@ -1235,7 +1178,7 @@ class BonPrelevement extends CommonObject /* * Update total defined after generation of file */ - if (! $error) { + if (!$error) { $sql = "UPDATE ".MAIN_DB_PREFIX."prelevement_bons"; $sql .= " SET amount = ".price2num($this->total); $sql .= " WHERE rowid = ".$this->id; @@ -1334,9 +1277,7 @@ class BonPrelevement extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1361,7 +1302,7 @@ class BonPrelevement extends CommonObject $result = ''; - $labeltoshow = 'Withdraw'; + $labeltoshow = 'PaymentByDirectDebit'; if ($this->type == 'bank-transfer') { $labeltoshow = 'PaymentByBankTransfer'; } @@ -1403,8 +1344,7 @@ class BonPrelevement extends CommonObject $reshook=$hookmanager->executeHooks('getnomurltooltip',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $linkclose = $hookmanager->resPrint; */ - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -1440,14 +1380,12 @@ class BonPrelevement extends CommonObject $result = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def"; - $sql .= " WHERE rowid = '".$rowid."'"; + $sql .= " WHERE rowid = ".((int) $rowid); if ($this->db->query($sql)) { return 0; - } - else - { + } else { return -1; } } @@ -1466,14 +1404,12 @@ class BonPrelevement extends CommonObject $result = 0; $sql = "DELETE FROM ".MAIN_DB_PREFIX."notify_def"; - $sql .= " WHERE fk_user=".$user." AND fk_action='".$action."'"; + $sql .= " WHERE fk_user=".$user." AND fk_action='".$this->db->escape($action)."'"; if ($this->db->query($sql)) { return 0; - } - else - { + } else { return -1; } } @@ -1497,15 +1433,13 @@ class BonPrelevement extends CommonObject $now = dol_now(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."notify_def (datec,fk_user, fk_soc, fk_contact, fk_action)"; - $sql .= " VALUES (".$db->idate($now).",".$user.", 'NULL', 'NULL', '".$action."')"; + $sql .= " VALUES ('".$this->db->idate($now)."', ".$user.", 'NULL', 'NULL', '".$this->db->escape($action)."')"; dol_syslog("adnotiff: ".$sql); if ($this->db->query($sql)) { $result = 0; - } - else - { + } else { $result = -1; dol_syslog(get_class($this)."::AddNotification Error $result"); } @@ -1607,7 +1541,7 @@ class BonPrelevement extends CommonObject { $obj = $this->db->fetch_object($resql); - if (! empty($cachearraytotestduplicate[$obj->idfac])) { + if (!empty($cachearraytotestduplicate[$obj->idfac])) { $this->error = $langs->trans('ErrorCompanyHasDuplicateDefaultBAN', $obj->socid); $this->invoice_in_error[$obj->idfac] = $this->error; $result = -2; @@ -1722,7 +1656,7 @@ class BonPrelevement extends CommonObject { $obj = $this->db->fetch_object($resql); - if (! empty($cachearraytotestduplicate[$obj->idfac])) { + if (!empty($cachearraytotestduplicate[$obj->idfac])) { $this->error = $langs->trans('ErrorCompanyHasDuplicateDefaultBAN', $obj->socid); $this->invoice_in_error[$obj->idfac] = $this->error; $result = -2; @@ -1743,8 +1677,7 @@ class BonPrelevement extends CommonObject } // Define $fileEmetteurSection. Start of bloc PmtInf. Will contains all $nbtotalDrctDbtTxInf - if ($result != -2) - { + if ($result != -2) { $fileEmetteurSection .= $this->EnregEmetteurSEPA($conf, $date_actu, $nbtotalDrctDbtTxInf, $this->total, $CrLf, $format, $type); } @@ -1813,9 +1746,7 @@ class BonPrelevement extends CommonObject // TODO Write record into file $i++; } - } - else - { + } else { $result = -2; } } else { @@ -1843,9 +1774,7 @@ class BonPrelevement extends CommonObject // TODO Write record into file $i++; } - } - else - { + } else { $result = -2; } } @@ -2262,7 +2191,7 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf;*/ - $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV + $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2324,7 +2253,7 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$conf->global->MAIN_INFO_SOCIETE_ZIP.' '.$conf->global->MAIN_INFO_SOCIETE_TOWN.''.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf;*/ - $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV + $XML_SEPA_INFO .= ' SLEV'.$CrLf; // Field "Responsible of fees". Must be SLEV /*$XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf; @@ -2338,11 +2267,8 @@ class BonPrelevement extends CommonObject $XML_SEPA_INFO .= ' '.$CrLf; $XML_SEPA_INFO .= ' '.$CrLf;*/ } - } - else - { + } else { fputs($this->file, 'INCORRECT EMETTEUR '.$XML_SEPA_INFO.$CrLf); - $result = -2; } return $XML_SEPA_INFO; } diff --git a/htdocs/compta/prelevement/class/ligneprelevement.class.php b/htdocs/compta/prelevement/class/ligneprelevement.class.php index 10f3c05c25a..a645d2bb078 100644 --- a/htdocs/compta/prelevement/class/ligneprelevement.class.php +++ b/htdocs/compta/prelevement/class/ligneprelevement.class.php @@ -96,17 +96,13 @@ class LignePrelevement $this->statut = $obj->statut; $this->bon_ref = $obj->ref; $this->bon_rowid = $obj->bon_rowid; - } - else - { + } else { $error++; dol_syslog("LignePrelevement::Fetch rowid=$rowid numrows=0"); } $this->db->free($resql); - } - else - { + } else { $error++; dol_syslog("LignePrelevement::Fetch rowid=$rowid"); dol_syslog($this->db->error()); @@ -142,20 +138,17 @@ class LignePrelevement if ($mode == 0) { return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut1').' '.$langs->trans($this->statuts[$status]); // Waiting elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut6').' '.$langs->trans($this->statuts[$status]); // Credited elseif ($status == 3) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); // Refused - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut1'); elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut6'); elseif ($status == 3) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 0) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut1'); elseif ($status == 2) return $langs->trans($this->statuts[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut6'); diff --git a/htdocs/compta/prelevement/class/rejetprelevement.class.php b/htdocs/compta/prelevement/class/rejetprelevement.class.php index 8c033353637..20d600bf9b4 100644 --- a/htdocs/compta/prelevement/class/rejetprelevement.class.php +++ b/htdocs/compta/prelevement/class/rejetprelevement.class.php @@ -153,16 +153,13 @@ class RejetPrelevement $pai->amounts[$facs[$i][0]] = price2num($facs[$i][1] * -1); $pai->datepaye = $date_rejet; $pai->paiementid = 3; // type of payment: withdrawal - $pai->num_paiement = $fac->ref; $pai->num_payment = $fac->ref; if ($pai->create($this->user) < 0) // we call with no_commit { $error++; dol_syslog("RejetPrelevement::Create Error creation payment invoice ".$facs[$i][0]); - } - else - { + } else { $result = $pai->addPaymentToBank($user, 'payment', '(InvoiceRefused)', $bankaccount, '', ''); if ($result < 0) { @@ -191,9 +188,7 @@ class RejetPrelevement { dol_syslog("RejetPrelevement::Create Commit"); $this->db->commit(); - } - else - { + } else { dol_syslog("RejetPrelevement::Create Rollback"); $this->db->rollback(); } @@ -227,9 +222,7 @@ class RejetPrelevement $row = $this->db->fetch_row($resql); $userid = $row[0]; } - } - else - { + } else { dol_syslog("RejetPrelevement::_send_email Erreur lecture user"); } @@ -265,14 +258,10 @@ class RejetPrelevement if ($result) { dol_syslog("RejetPrelevement::_send_email email envoye"); - } - else - { + } else { dol_syslog("RejetPrelevement::_send_email Erreur envoi email"); } - } - else - { + } else { dol_syslog("RejetPrelevement::_send_email Userid invalide"); } } @@ -310,8 +299,7 @@ class RejetPrelevement { $row = $this->db->fetch_row($resql); if (!$amounts) $arr[$i] = $row[0]; - else - { + else { $arr[$i] = array( $row[0], $row[1] @@ -321,9 +309,7 @@ class RejetPrelevement } } $this->db->free($resql); - } - else - { + } else { dol_syslog("getListInvoices", LOG_ERR); } @@ -358,15 +344,11 @@ class RejetPrelevement $this->db->free($resql); return 0; - } - else - { + } else { dol_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid numrows=0"); return -1; } - } - else - { + } else { dol_syslog("RejetPrelevement::Fetch Erreur rowid=$rowid"); return -2; } diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php index b8cac653dc4..8c8dc01a22c 100644 --- a/htdocs/compta/prelevement/create.php +++ b/htdocs/compta/prelevement/create.php @@ -46,7 +46,7 @@ $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); // Get supervariables -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $mode = GETPOST('mode', 'alpha') ?GETPOST('mode', 'alpha') : 'real'; $format = GETPOST('format', 'aZ09'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -84,10 +84,10 @@ if (empty($reshook)) $conf->global->PAYMENTBYBANKTRANSFER_ADDDAYS; } $bprev = new BonPrelevement($db); - $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), (GETPOST('reday', 'int') + $delayindays), GETPOST('reyear', 'int')); + $executiondate = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), (GETPOST('reday', 'int') + $delayindays), GETPOST('reyear', 'int')); - // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty (we don't use them anymore) - $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate, 0, $type); + // $conf->global->PRELEVEMENT_CODE_BANQUE and $conf->global->PRELEVEMENT_CODE_GUICHET should be empty (we don't use them anymore) + $result = $bprev->create($conf->global->PRELEVEMENT_CODE_BANQUE, $conf->global->PRELEVEMENT_CODE_GUICHET, $mode, $format, $executiondate, 0, $type); if ($result < 0) { setEventMessages($bprev->error, $bprev->errors, 'errors'); } elseif ($result == 0) { @@ -185,37 +185,35 @@ if ($mesg) print $mesg; print '
    '."\n"; print '
    '; -print ''; +print ''; print ''; if ($nb) { - if ($pricetowithdraw) { - print $langs->trans('ExecutionDate').' '; - $datere = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - print $form->selectDate($datere, 're'); + if ($pricetowithdraw) { + print $langs->trans('ExecutionDate').' '; + $datere = dol_mktime(0, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); + print $form->selectDate($datere, 're'); - if ($mysoc->isInEEC()) { - $title = $langs->trans("CreateForSepa"); - if ($type == 'bank-transfer') { - $title = $langs->trans("CreateSepaFileForPaymentByBankTransfer"); - } + if ($mysoc->isInEEC()) { + $title = $langs->trans("CreateForSepa"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreateSepaFileForPaymentByBankTransfer"); + } - if ($type != 'bank-transfer') { - print ''; - } - print ''; - } else { - $title = $langs->trans("CreateAll"); - if ($type == 'bank-transfer') { - $title = $langs->trans("CreateFileForPaymentByBankTransfer"); - } - print ''.$title."\n"; + if ($type != 'bank-transfer') { + print ''; + } + print ''; + } else { + $title = $langs->trans("CreateAll"); + if ($type == 'bank-transfer') { + $title = $langs->trans("CreateFileForPaymentByBankTransfer"); + } + print ''.$title."\n"; } - } - else - { + } else { if ($mysoc->isInEEC()) { $title = $langs->trans("CreateForSepaFRST"); @@ -228,9 +226,7 @@ if ($nb) { $title = $langs->trans("CreateForSepaRCUR"); print ''.$title."\n"; } - } - else - { + } else { $title = $langs->trans("CreateAll"); if ($type == 'bank-transfer') { $title = $langs->trans("CreateFileForPaymentByBankTransfer"); @@ -238,9 +234,7 @@ if ($nb) { print ''.$title."\n"; } } -} -else -{ +} else { $titlefortab = $langs->transnoentitiesnoconv("StandingOrders"); $title = $langs->trans("CreateAll"); if ($type == 'bank-transfer') { @@ -307,12 +301,12 @@ if ($resql) $num = $db->num_rows($resql); $i = 0; - $param = ''; + $param = ''; if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); if ($socid) $param .= '&socid='.urlencode($socid); - if ($option) $param .= "&option=".urlencode($option); + if ($option) $param .= "&option=".urlencode($option); - print ''; + print ''; print ''; print ''; if (!empty($limit)) { @@ -323,12 +317,12 @@ if ($resql) if ($type == 'bank-transfer') { $title = $langs->trans("InvoiceWaitingPaymentByBankTransfer"); } - print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); + print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, '', '', '', $num, $nbtotalofrecords, 'bill', 0, '', '', $limit); - $tradinvoice = "Invoice"; - if ($type == 'bank-transfer') { - $tradinvoice = "SupplierInvoice"; - } + $tradinvoice = "Invoice"; + if ($type == 'bank-transfer') { + $tradinvoice = "SupplierInvoice"; + } print ''; print ''; @@ -396,17 +390,13 @@ if ($resql) print ''; $i++; } - } - else - { + } else { print ''; } print "
    '.$langs->trans("None").'
    "; print "
    "; print "
    \n"; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/demandes.php b/htdocs/compta/prelevement/demandes.php index a83a6a2938c..94c8c0639e1 100644 --- a/htdocs/compta/prelevement/demandes.php +++ b/htdocs/compta/prelevement/demandes.php @@ -40,14 +40,14 @@ $status = GETPOST('status', 'int'); if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'prelevement', '', '', 'bons'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') $type = GETPOST('type', 'aZ09'); $search_facture = GETPOST('search_facture', 'alpha'); -$search_societe = trim(GETPOST('search_societe', 'alpha')); +$search_societe = GETPOST('search_societe', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -89,15 +89,13 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' */ if ($type != 'bank-transfer') { - if (!$status) - { + if (!$status) { $title = $langs->trans("RequestStandingOrderToTreat"); } else { $title = $langs->trans("RequestStandingOrderTreated"); } } else { - if (!$status) - { + if (!$status) { $title = $langs->trans("RequestPaymentsByBankTransferToTreat"); } else { $title = $langs->trans("RequestPaymentsByBankTransferTreated"); diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php index 0e4ff799ba6..4e3d191fdfa 100644 --- a/htdocs/compta/prelevement/factures.php +++ b/htdocs/compta/prelevement/factures.php @@ -45,8 +45,8 @@ $type = GETPOST('type', 'aZ09'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -82,11 +82,11 @@ llxHeader('', $langs->trans("WithdrawalsReceipts")); if ($id > 0 || $ref) { if ($object->fetch($id, $ref) >= 0) - { - $head = prelevement_prepare_head($object); + { + $head = prelevement_prepare_head($object); dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -151,11 +151,9 @@ if ($id > 0 || $ref) print '
    '; dol_fiche_end(); - } - else - { - dol_print_error($db); - } + } else { + dol_print_error($db); + } } @@ -193,13 +191,13 @@ $sql .= $db->order($sortfield, $sortorder); $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $resql = $db->query($sql); - $nbtotalofrecords = $db->num_rows($resql); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { - $page = 0; - $offset = 0; - } + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } } $sql .= $db->plimit($limit + 1, $offset); @@ -214,13 +212,13 @@ if ($resql) // Lines of title fields print '
    '; - if ($optioncss != '') print ''; + if ($optioncss != '') print ''; print ''; print ''; print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; @@ -247,90 +245,83 @@ if ($resql) $invoicetmpsupplier = new FactureFournisseur($db); while ($i < min($num, $limit)) - { - $obj = $db->fetch_object($resql); + { + $obj = $db->fetch_object($resql); - if ($obj->type == 'bank-transfer') { - $invoicetmp = $invoicetmpsupplier; - } else { - $invoicetmp = $invoicetmpcustomer; - } - $invoicetmp->fetch($obj->facid); + if ($obj->type == 'bank-transfer') { + $invoicetmp = $invoicetmpsupplier; + } else { + $invoicetmp = $invoicetmpcustomer; + } + $invoicetmp->fetch($obj->facid); - $thirdpartytmp->fetch($obj->socid); + $thirdpartytmp->fetch($obj->socid); - print ''; + print ''; - print ""; - print $invoicetmp->getNomUrl(1); - print "\n"; + print ""; + print $invoicetmp->getNomUrl(1); + print "\n"; - print ''; - print $thirdpartytmp->getNomUrl(1); - print "\n"; + print ''; + print $thirdpartytmp->getNomUrl(1); + print "\n"; - // Amount of invoice - print ''.price($obj->total_ttc)."\n"; + // Amount of invoice + print ''.price($obj->total_ttc)."\n"; - // Amount requested - print ''.price($obj->amount_requested)."\n"; + // Amount requested + print ''.price($obj->amount_requested)."\n"; - // Status of requests - print ''; + // Status of requests + print ''; - if ($obj->statut == 0) - { + if ($obj->statut == 0) { print '-'; - } - elseif ($obj->statut == 2) - { + } elseif ($obj->statut == 2) { if ($obj->type == 'bank-transfer') { print $langs->trans("StatusDebited"); } else { print $langs->trans("StatusCredited"); } - } - elseif ($obj->statut == 3) - { + } elseif ($obj->statut == 3) { print ''.$langs->trans("StatusRefused").''; } - print ""; + print ""; - print ""; + print ""; - print "\n"; + print "\n"; - $totalinvoices += $obj->total_ttc; - $totalamount_requested += $obj->amount_requested; + $totalinvoices += $obj->total_ttc; + $totalamount_requested += $obj->amount_requested; - $i++; - } + $i++; + } if ($num > 0) - { - print ''; - print ''.$langs->trans("Total").''; - print ' '; - print ''; + { + print ''; + print ''.$langs->trans("Total").''; + print ' '; + print ''; //if ($totalinvoices != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices"); // It is normal to have total that differs. For an amount of invoice of 100, request to pay may be 50 only. - if ($totalamount_requested != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices"); + if ($totalamount_requested != $object->amount) print img_warning("AmountOfFileDiffersFromSumOfInvoices"); print "\n"; - print ''; + print ''; print price($totalamount_requested); - print "\n"; - print ' '; - print ' '; - print "\n"; - } + print "\n"; + print ' '; + print ' '; + print "\n"; + } print ""; print ''; - $db->free($resql); -} -else -{ + $db->free($result); +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/fiche-rejet.php b/htdocs/compta/prelevement/fiche-rejet.php index cbc1a666def..7783edd4673 100644 --- a/htdocs/compta/prelevement/fiche-rejet.php +++ b/htdocs/compta/prelevement/fiche-rejet.php @@ -45,8 +45,8 @@ $type = GETPOST('type', 'aZ09'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -76,11 +76,11 @@ llxHeader('', $langs->trans("WithdrawalsReceipts")); if ($prev_id > 0 || $ref) { if ($object->fetch($prev_id, $ref) >= 0) - { - $head = prelevement_prepare_head($object); + { + $head = prelevement_prepare_head($object); dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -145,11 +145,9 @@ if ($prev_id > 0 || $ref) print ''; dol_fiche_end(); - } - else - { - dol_print_error($db); - } + } else { + dol_print_error($db); + } } @@ -207,51 +205,47 @@ if ($resql) if ($num > 0) { - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); - print ''; + print ''; - print ''; - print img_picto('', 'statut'.$obj->statut).' '; - print substr('000000'.$obj->rowid, -6); - print ''; - print ''.$obj->name."\n"; + print ''; + print img_picto('', 'statut'.$obj->statut).' '; + print substr('000000'.$obj->rowid, -6); + print ''; + print ''.$obj->name."\n"; - print ''.price($obj->amount)."\n"; - print ''.$rej->motifs[$obj->motif].''; + print ''.price($obj->amount)."\n"; + print ''.$rej->motifs[$obj->motif].''; - print ''.yn($obj->afacturer).''; - print ''.$obj->fk_facture.''; - print "\n"; + print ''.yn($obj->afacturer).''; + print ''.$obj->fk_facture.''; + print "\n"; - $total += $obj->amount; + $total += $obj->amount; - $i++; - } - } - else - { - print ''.$langs->trans("None").''; + $i++; + } + } else { + print ''.$langs->trans("None").''; } if ($num > 0) - { - print ' '; - print ''.$langs->trans("Total").''; - print ''.price($total)."\n"; - print ' '; - print "\n"; - } - print "\n"; - print ''; + { + print ' '; + print ''.$langs->trans("Total").''; + print ''.price($total)."\n"; + print ' '; + print "\n"; + } + print "\n"; + print ''; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/fiche-stat.php b/htdocs/compta/prelevement/fiche-stat.php index d94edfa5107..df5118df0cf 100644 --- a/htdocs/compta/prelevement/fiche-stat.php +++ b/htdocs/compta/prelevement/fiche-stat.php @@ -43,8 +43,8 @@ $type = GETPOST('type', 'aZ09'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -79,7 +79,7 @@ if ($prev_id > 0 || $ref) $head = prelevement_prepare_head($object); dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), -1, 'payment'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); @@ -144,9 +144,7 @@ if ($prev_id > 0 || $ref) print ''; dol_fiche_end(); - } - else - { + } else { dol_print_error($db); } @@ -196,9 +194,7 @@ if ($prev_id > 0 || $ref) print ""; $db->free($resql); - } - else - { + } else { print $db->error().' '.$sql; } } diff --git a/htdocs/compta/prelevement/index.php b/htdocs/compta/prelevement/index.php index e68e753d83b..4104249df5c 100644 --- a/htdocs/compta/prelevement/index.php +++ b/htdocs/compta/prelevement/index.php @@ -161,15 +161,11 @@ if ($resql) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("NoInvoiceToWithdraw", $langs->transnoentitiesnoconv("StandingOrders")).''; } print "
    "; -} -else -{ +} else { dol_print_error($db); } @@ -232,9 +228,7 @@ if ($result) print "
    "; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/line.php b/htdocs/compta/prelevement/line.php index d6124113321..3c8d80d4931 100644 --- a/htdocs/compta/prelevement/line.php +++ b/htdocs/compta/prelevement/line.php @@ -39,15 +39,15 @@ $langs->loadlangs(array('banks', 'categories', 'bills', 'withdrawals')); if ($user->socid > 0) accessforbidden(); // Get supervariables -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); $socid = GETPOST('socid', 'int'); $type = GETPOST('type', 'aZ09'); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortorder = GETPOST('sortorder', 'alpha'); -$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if ($page == -1 || $page == null) { $page = 0; } $offset = $limit * $page; @@ -75,9 +75,7 @@ if ($action == 'confirm_rejet') { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); - } - - elseif ($daterej > dol_now()) + } elseif ($daterej > dol_now()) { $error++; $langs->load("error"); @@ -104,14 +102,10 @@ if ($action == 'confirm_rejet') header("Location: line.php?id=".$id); exit; } - } - else - { + } else { $action = "rejet"; } - } - else - { + } else { header("Location: line.php?id=".$id); exit; } @@ -174,25 +168,19 @@ if ($id) { /* Historique pour certaines install */ print $langs->trans("Unknown"); - } - else - { + } else { print dol_print_date($rej->date_rejet, 'day'); } print ''; print ''.$langs->trans("RefusedInvoicing").''.$rej->invoicing.''; - } - else - { + } else { print ''.$resf.''; } } print ''; dol_fiche_end(); - } - else - { + } else { dol_print_error($db); } @@ -259,15 +247,11 @@ if ($id) if ($user->rights->prelevement->bons->credit) { print ''.$langs->trans("StandingOrderReject").''; - } - else - { + } else { print ''.$langs->trans("StandingOrderReject").''; } } - } - else - { + } else { print ''.$langs->trans("StandingOrderReject").''; } } @@ -344,9 +328,7 @@ if ($id) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php index 72960c9c15b..36aa4bb8e5c 100644 --- a/htdocs/compta/prelevement/list.php +++ b/htdocs/compta/prelevement/list.php @@ -38,7 +38,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlinelist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') @@ -50,8 +50,8 @@ $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); $limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -263,9 +263,7 @@ if ($result) print '
    '; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/bons.php b/htdocs/compta/prelevement/orders_list.php similarity index 96% rename from htdocs/compta/prelevement/bons.php rename to htdocs/compta/prelevement/orders_list.php index 5a1ce4e7024..d4f16eab7f6 100644 --- a/htdocs/compta/prelevement/bons.php +++ b/htdocs/compta/prelevement/orders_list.php @@ -19,9 +19,9 @@ */ /** - * \file htdocs/compta/prelevement/bons.php + * \file htdocs/compta/prelevement/orders_list.php * \ingroup prelevement - * \brief Page liste des bons de prelevements + * \brief Page to list direct debit orders or credit transfer orders */ require '../../main.inc.php'; @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Load translation files required by the page $langs->loadLangs(array('banks', 'categories', 'widthdrawals')); -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search // Security check $socid = GETPOST('socid', 'int'); @@ -41,8 +41,8 @@ $result = restrictedArea($user, 'prelevement', '', '', 'bons'); $type = GETPOST('type', 'aZ09'); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -214,9 +214,7 @@ if ($result) print ''; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/rejets.php b/htdocs/compta/prelevement/rejets.php index 81f17dc784b..da2420aed3f 100644 --- a/htdocs/compta/prelevement/rejets.php +++ b/htdocs/compta/prelevement/rejets.php @@ -42,8 +42,8 @@ $type = GETPOST('type', 'aZ09'); // Get supervariables $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortorder = GETPOST('sortorder', 'alpha'); -$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -137,9 +137,7 @@ if ($result) print ""; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/prelevement/stats.php b/htdocs/compta/prelevement/stats.php index 87fd3917a56..1d6e1c2a183 100644 --- a/htdocs/compta/prelevement/stats.php +++ b/htdocs/compta/prelevement/stats.php @@ -142,9 +142,7 @@ if ($resql) print ' '; print ""; $db->free(); -} -else -{ +} else { dol_print_error($db); } @@ -247,9 +245,7 @@ if ($resql) print ' '; print ""; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php index 3f2112537b1..63368fa94e8 100644 --- a/htdocs/compta/recap-compta.php +++ b/htdocs/compta/recap-compta.php @@ -46,8 +46,8 @@ $hookmanager->initHooks(array('recapcomptacard', 'globalcard')); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -211,15 +211,11 @@ if ($id > 0) } $db->free($resqlp); - } - else - { + } else { dol_print_error($db); } } - } - else - { + } else { dol_print_error($db); } @@ -288,9 +284,7 @@ if ($id > 0) print ""; } -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/resultat/clientfourn.php b/htdocs/compta/resultat/clientfourn.php index 27bc4526a3e..671921506d5 100644 --- a/htdocs/compta/resultat/clientfourn.php +++ b/htdocs/compta/resultat/clientfourn.php @@ -99,8 +99,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; else $year_end++; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -151,11 +150,10 @@ if ($modecompta == "CREANCES-DETTES") $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $description = $langs->trans("RulesResultDue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -166,8 +164,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesResultInOut"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPredefinedAccountGroups"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -212,9 +209,7 @@ print_liste_field_titre(''); if ($modecompta == 'BOOKKEEPING') { print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'amount', '', $param, 'class="right"', $sortfield, $sortorder); -} -else -{ +} else { if ($modecompta == 'CREANCES-DETTES') { print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], 'amount_ht', '', $param, 'class="right"', $sortfield, $sortorder); @@ -312,16 +307,11 @@ if ($modecompta == 'BOOKKEEPING') $i++; } - } - else - { + } else { print ''.$langs->trans("NoRecordFound").''; } - } - else dol_print_error($db); -} -else -{ + } else dol_print_error($db); +} else { /* * Factures clients */ @@ -336,12 +326,10 @@ else $sql .= " AND f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2,5)"; - else - $sql .= " AND f.type IN (0,1,2,3,5)"; + else $sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -463,12 +451,10 @@ else $sql .= " AND f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2)"; - else - $sql .= " AND f.type IN (0,1,2,3)"; + else $sql .= " AND f.type IN (0,1,2,3)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT s.nom as name, s.rowid as socid, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn as p"; @@ -517,9 +503,7 @@ else print "\n"; $i++; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; @@ -552,8 +536,7 @@ else $sql .= " AND c.deductible = 0"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT c.id, c.libelle as label, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -597,8 +580,7 @@ else print ''; $i++; } - } - else { + } else { print ' '; print ''.$langs->trans("None").''; print ''; @@ -629,8 +611,7 @@ else if (!empty($date_start) && !empty($date_end)) $sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; $sql .= " AND cs.entity = ".$conf->entity; - } - elseif ($modecompta == 'RECETTES-DEPENSES') + } elseif ($modecompta == 'RECETTES-DEPENSES') { $sql = "SELECT c.id, c.libelle as label, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -674,8 +655,7 @@ else print ''; $i++; } - } - else { + } else { print ' '; print ''.$langs->trans("None").''; print ''; @@ -767,16 +747,12 @@ else print ''; $i++; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; } - } - else - { + } else { dol_print_error($db); } print ''; @@ -853,16 +829,12 @@ else print ''.price(-$obj->amount_ttc).''; print ''; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; } - } - else - { + } else { dol_print_error($db); } print ''; @@ -887,9 +859,7 @@ else $sql .= " FROM ".MAIN_DB_PREFIX."don as p"; $sql .= " WHERE p.entity IN (".getEntity('donation').")"; $sql .= " AND fk_statut in (1,2)"; - } - else - { + } else { $sql = "SELECT p.societe as nom, p.firstname, p.lastname, date_format(p.datedon,'%Y-%m') as dm, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."don as p"; $sql .= " INNER JOIN ".MAIN_DB_PREFIX."payment_donation as pe ON pe.fk_donation = p.rowid"; @@ -935,16 +905,12 @@ else print ''; $i++; } - } - else - { + } else { print ' '; print ''.$langs->trans("None").''; print ''; } - } - else - { + } else { dol_print_error($db); } print ''; @@ -1011,8 +977,7 @@ else print ''.price($subtotal_ht).''; print ''.price($subtotal_ttc).''; print ''; - } - else dol_print_error($db); + } else dol_print_error($db); } /* @@ -1060,8 +1025,7 @@ else print ''.price($subtotal_ht).''; print ''.price($subtotal_ttc).''; print ''; - } - else dol_print_error($db); + } else dol_print_error($db); } /* @@ -1083,8 +1047,7 @@ else $sql .= " WHERE f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2,5)"; - else - $sql .= " AND f.type IN (0,1,2,3,5)"; + else $sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; @@ -1131,8 +1094,7 @@ else $sql .= " WHERE f.fk_statut IN (1,2)"; if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $sql .= " AND f.type IN (0,1,2)"; - else - $sql .= " AND f.type IN (0,1,2,3)"; + else $sql .= " AND f.type IN (0,1,2,3)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND f.entity = ".$conf->entity; @@ -1172,9 +1134,7 @@ else print ' '."\n"; print ''.price($amount)."\n"; print "\n"; - } - else - { + } else { // VAT really already paid $amount = 0; $sql = "SELECT date_format(t.datev,'%Y-%m') as dm, sum(t.amount) as amount"; @@ -1253,9 +1213,7 @@ else } } $db->free($result); - } - else - { + } else { dol_print_error($db); } print ' '; diff --git a/htdocs/compta/resultat/index.php b/htdocs/compta/resultat/index.php index b912723adfc..9ae666cb01a 100644 --- a/htdocs/compta/resultat/index.php +++ b/htdocs/compta/resultat/index.php @@ -78,8 +78,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; else $year_end++; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -131,11 +130,10 @@ if ($modecompta == 'CREANCES-DETTES') $description = $langs->trans("RulesAmountWithTaxIncluded"); $description .= '
    '.$langs->trans("RulesResultDue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= "
    ".$langs->trans("DepositsAreNotIncluded"); - else $description .= "
    ".$langs->trans("DepositsAreIncluded"); + else $description .= "
    ".$langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") { +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode = $langs->trans("CalcModeEngagement"); $calcmode .= '
    ('.$langs->trans("SeeReportInDueDebtMode", '', '').')'; @@ -146,8 +144,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") { $description .= '
    '.$langs->trans("RulesResultInOut"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByYear"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -191,8 +188,7 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod else $sql .= " AND f.type IN (0,1,2,3,5)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -228,12 +224,10 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $i++; } $db->free($result); - } - else { + } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -274,17 +268,14 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $i++; } - } - else { + } else { dol_print_error($db); } - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { // Nothing from this table } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -307,8 +298,7 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod else $sql .= " AND f.type IN (0,1,2,3)"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT sum(pf.amount) as amount_ttc, date_format(p.datep,'%Y-%m') as dm"; $sql .= " FROM ".MAIN_DB_PREFIX."paiementfourn as p"; @@ -343,12 +333,10 @@ if (!empty($conf->facture->enabled) && ($modecompta == 'CREANCES-DETTES' || $mod $i++; } $db->free($result); - } - else { + } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -429,8 +417,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom } else { dol_print_error($db); } - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { // TVA really already paid $sql = "SELECT sum(t.amount) as amount, date_format(t.datev,'%Y-%m') as dm"; @@ -493,8 +480,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom dol_print_error($db); } } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -515,8 +501,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $sql .= " WHERE cs.fk_type = c.id"; if (!empty($date_start) && !empty($date_end)) $sql .= " AND cs.date_ech >= '".$db->idate($date_start)."' AND cs.date_ech <= '".$db->idate($date_end)."'"; - } - elseif ($modecompta == "RECETTES-DEPENSES") + } elseif ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT c.libelle as nom, date_format(p.datep,'%Y-%m') as dm, sum(p.amount) as amount"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c"; @@ -552,8 +537,7 @@ if (!empty($conf->tax->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -600,8 +584,7 @@ if (!empty($conf->salaries->enabled) && ($modecompta == 'CREANCES-DETTES' || $mo } else { dol_print_error($db); } -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Nothing from this table } @@ -659,13 +642,10 @@ if (!empty($conf->expensereport->enabled) && ($modecompta == 'CREANCES-DETTES' | $decaiss_ttc[$obj->dm] += $obj->amount_ttc; } } - } - else - { + } else { dol_print_error($db); } -} -elseif ($modecompta == 'BOOKKEEPING') { +} elseif ($modecompta == 'BOOKKEEPING') { // Nothing from this table } @@ -721,13 +701,10 @@ if (!empty($conf->don->enabled) && ($modecompta == 'CREANCES-DETTES' || $modecom $i++; } } - } - else - { + } else { dol_print_error($db); } -} -elseif ($modecompta == 'BOOKKEEPING') { +} elseif ($modecompta == 'BOOKKEEPING') { // Nothing from this table } @@ -761,9 +738,7 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba $i++; } } - } - else - { + } else { dol_print_error($db); } @@ -791,9 +766,7 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_VARPAY) && !empty($conf->ba $i++; } } - } - else - { + } else { dol_print_error($db); } } @@ -829,9 +802,7 @@ if (!empty($conf->global->ACCOUNTING_REPORTS_INCLUDE_LOAN) && !empty($conf->loan $i++; } } - } - else - { + } else { dol_print_error($db); } } @@ -896,9 +867,7 @@ if (!empty($conf->accounting->enabled) && ($modecompta == 'BOOKKEEPING')) $i++; } } - } - else - { + } else { dol_print_error($db); } } @@ -977,9 +946,7 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if (!isset($totsorties[$annee])) $totsorties[$annee] = 0; $totsorties[$annee] += $decaiss[$case]; } - } - else - { + } else { if (isset($decaiss_ttc[$case]) && $decaiss_ttc[$case] != 0) { print ''.price(price2num($decaiss_ttc[$case], 'MT')).''; @@ -998,9 +965,7 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if (!isset($totentrees[$annee])) $totentrees[$annee] = 0; $totentrees[$annee] += $encaiss[$case]; } - } - else - { + } else { if (isset($encaiss_ttc[$case])) { print ''.price(price2num($encaiss_ttc[$case], 'MT')).''; diff --git a/htdocs/compta/resultat/result.php b/htdocs/compta/resultat/result.php index 66adea3371f..48cb8b1154e 100644 --- a/htdocs/compta/resultat/result.php +++ b/htdocs/compta/resultat/result.php @@ -90,8 +90,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; else $year_end++; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -178,11 +177,10 @@ if ($modecompta == "CREANCES-DETTES") //$periodlink=''.img_previous().' '.img_next().''; $description = $langs->trans("RulesResultDue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") { +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("AnnualByAccountInputOutputMode"); $calcmode = $langs->trans("CalcModeEngagement"); $calcmode .= '
    ('.$langs->trans("SeeReportInDueDebtMode", '', '').')'; @@ -192,8 +190,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") { $description = $langs->trans("RulesResultInOut"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("ReportInOut").', '.$langs->trans("ByPersonalizedAccountGroups"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -248,13 +245,11 @@ if ($modecompta == 'CREANCES-DETTES') { //if (! empty($date_start) && ! empty($date_end)) // $sql.= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { //if (! empty($date_start) && ! empty($date_end)) // $sql.= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // Get array of all report groups that are active $cats = $AccCat->getCats(); // WARNING: Computed groups must be after group they include @@ -375,7 +370,7 @@ elseif ($modecompta == "BOOKKEEPING") print "\n"; //var_dump($sommes); - } else // normal category + } else // normal category { $code = $cat['code']; // Category code we process diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index d7f20622a43..c744bcc90e8 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -128,9 +128,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes') { header("Location: list.php"); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -145,29 +143,23 @@ if ($action == 'add' && $user->rights->tax->charges->creer) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $action = 'create'; - } - elseif (!$dateperiod) + } elseif (!$dateperiod) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Period")), null, 'errors'); $action = 'create'; - } - elseif (!$actioncode > 0) + } elseif (!$actioncode > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Type")), null, 'errors'); $action = 'create'; - } - elseif (empty($amount)) + } elseif (empty($amount)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; - } - elseif (!is_numeric($amount)) + } elseif (!is_numeric($amount)) { setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; - } - else - { + } else { $object->type = $actioncode; $object->label = GETPOST('label', 'alpha'); $object->date_ech = $dateech; @@ -195,24 +187,19 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->tax->charges->cre { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Date")), null, 'errors'); $action = 'edit'; - } - elseif (!$dateperiod) + } elseif (!$dateperiod) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Period")), null, 'errors'); $action = 'edit'; - } - elseif (empty($amount)) + } elseif (empty($amount)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Amount")), null, 'errors'); $action = 'edit'; - } - elseif (!is_numeric($amount)) + } elseif (!is_numeric($amount)) { setEventMessages($langs->trans("ErrorFieldMustBeANumeric", $langs->transnoentities("Amount")), null, 'errors'); $action = 'create'; - } - else - { + } else { $result = $object->fetch($id); $object->date_ech = $dateech; @@ -245,16 +232,14 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char if (GETPOST('clone_label', 'alphanohtml')) { $object->label = GETPOST('clone_label', 'alphanohtml'); - } - else { + } else { $object->label = $langs->trans("CopyOf").' '.$object->label; } if (GETPOST('clone_for_next_month', 'int')) { $object->periode = dol_time_plus_duree($object->periode, 1, 'm'); $object->date_ech = dol_time_plus_duree($object->date_ech, 1, 'm'); - } - else { + } else { $newdateperiod = dol_mktime(0, 0, 0, GETPOST('clone_periodmonth', 'int'), GETPOST('clone_periodday', 'int'), GETPOST('clone_periodyear', 'int')); $newdateech = dol_mktime(0, 0, 0, GETPOST('clone_date_echmonth', 'int'), GETPOST('clone_date_echday', 'int'), GETPOST('clone_date_echyear', 'int')); if ($newdateperiod) $object->periode = $newdateperiod; @@ -271,18 +256,14 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && ($user->rights->tax->char header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } - else - { + } else { $id = $originalId; $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } } - } - else - { + } else { $db->rollback(); dol_print_error($db, $object->error); } @@ -431,9 +412,7 @@ if ($id > 0) if (!empty($conf->global->TAX_ADD_CLON_FOR_NEXT_MONTH_CHECKBOX)) { $formquestion[] = array('type' => 'checkbox', 'name' => 'clone_for_next_month', 'label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1); - } - else - { + } else { $formquestion[] = array('type' => 'date', 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1); $formquestion[] = array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), 'value' => -1); } @@ -502,6 +481,8 @@ if ($id > 0) } $morehtmlref .= ''; + $morehtmlright = ''; + $linkback = ''.$langs->trans("BackToList").''; $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status @@ -535,9 +516,7 @@ if ($id > 0) if ($action == 'edit') { print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1); - } - else - { + } else { print dol_print_date($object->periode, "day"); } print ""; @@ -548,8 +527,7 @@ if ($id > 0) print ''.$langs->trans("AmountTTC").""; print ''; print ""; - } - else { + } else { print ''.$langs->trans("AmountTTC").''.price($object->amount, 0, $outputlangs, 1, -1, -1, $conf->currency).''; } @@ -674,9 +652,7 @@ if ($id > 0) $totalpaye += $objp->amount; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; print ''; print ''; @@ -695,9 +671,7 @@ if ($id > 0) print ''; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -732,13 +706,13 @@ if ($id > 0) // Reopen if ($object->paye && $user->rights->tax->charges->creer) { - print ""; + print ''; } // Edit if ($object->paye == 0 && $user->rights->tax->charges->creer) { - print ""; + print ''; } // Emit payment @@ -750,26 +724,24 @@ if ($id > 0) // Classify 'paid' if ($object->paye == 0 && round($resteapayer) <= 0 && $user->rights->tax->charges->creer) { - print ""; + print ''; } // Clone if ($user->rights->tax->charges->creer) { - print ""; + print '"; } // Delete if ($user->rights->tax->charges->supprimer) { - print ""; + print ''; } print ""; } - } - else - { + } else { /* Social contribution not found */ dol_print_error('', $object->error); } diff --git a/htdocs/compta/sociales/class/cchargesociales.class.php b/htdocs/compta/sociales/class/cchargesociales.class.php index b91d9ca31ee..cc66b56aabd 100644 --- a/htdocs/compta/sociales/class/cchargesociales.class.php +++ b/htdocs/compta/sociales/class/cchargesociales.class.php @@ -459,28 +459,23 @@ class Cchargesociales { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 1) + } elseif ($mode == 1) { if ($status == 1) return $langs->trans('Enabled'); elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 2) + } elseif ($mode == 2) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 3) + } elseif ($mode == 3) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 4) + } elseif ($mode == 4) { if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 5) + } elseif ($mode == 5) { if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); diff --git a/htdocs/compta/sociales/class/chargesociales.class.php b/htdocs/compta/sociales/class/chargesociales.class.php index 6d3f4dffa4a..81ae1e28f20 100644 --- a/htdocs/compta/sociales/class/chargesociales.class.php +++ b/htdocs/compta/sociales/class/chargesociales.class.php @@ -171,14 +171,10 @@ class ChargeSociales extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -252,14 +248,11 @@ class ChargeSociales extends CommonObject if (empty($error)) { $this->db->commit(); return $this->id; - } - else { + } else { $this->db->rollback(); return -1 * $error; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -328,9 +321,7 @@ class ChargeSociales extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -386,9 +377,7 @@ class ChargeSociales extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -421,14 +410,10 @@ class ChargeSociales extends CommonObject $obj = $this->db->fetch_object($result); $this->db->free($result); return $obj->amount; - } - else - { + } else { return 0; } - } - else - { + } else { print $this->db->error(); return -1; } @@ -612,9 +597,7 @@ class ChargeSociales extends CommonObject $this->db->free($resql); return $amount; - } - else - { + } else { return -1; } } @@ -667,9 +650,7 @@ class ChargeSociales extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php index c771a664d5f..62b02860f08 100644 --- a/htdocs/compta/sociales/class/paymentsocialcontribution.class.php +++ b/htdocs/compta/sociales/class/paymentsocialcontribution.class.php @@ -134,9 +134,8 @@ class PaymentSocialContribution extends CommonObject if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge; if (isset($this->amount)) $this->amount = trim($this->amount); if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement; - if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note)) $this->note = trim($this->note); + if (isset($this->note_private)) $this->note_private = trim($this->note_private); if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; @@ -194,14 +193,11 @@ class PaymentSocialContribution extends CommonObject if ($remaintopay == 0) { $result = $contrib->set_paid($user); - } - else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); + } else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); } } } - } - else - { + } else { $error++; } } @@ -215,9 +211,7 @@ class PaymentSocialContribution extends CommonObject $this->total = $totalamount; // deprecated $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -270,9 +264,8 @@ class PaymentSocialContribution extends CommonObject $this->datep = $this->db->jdate($obj->datep); $this->amount = $obj->amount; $this->fk_typepaiement = $obj->fk_typepaiement; - $this->num_paiement = $obj->num_payment; $this->num_payment = $obj->num_payment; - $this->note = $obj->note; + $this->note_private = $obj->note; $this->fk_bank = $obj->fk_bank; $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_modif = $obj->fk_user_modif; @@ -286,9 +279,7 @@ class PaymentSocialContribution extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -312,9 +303,8 @@ class PaymentSocialContribution extends CommonObject if (isset($this->fk_charge)) $this->fk_charge = (int) $this->fk_charge; if (isset($this->amount)) $this->amount = trim($this->amount); if (isset($this->fk_typepaiement)) $this->fk_typepaiement = (int) $this->fk_typepaiement; - if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note)) $this->note = trim($this->note); + if (isset($this->note_private)) $this->note_private = trim($this->note_private); if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank; if (isset($this->fk_user_creat)) $this->fk_user_creat = (int) $this->fk_user_creat; if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif; @@ -333,7 +323,7 @@ class PaymentSocialContribution extends CommonObject $sql .= " datep=".(dol_strlen($this->datep) != 0 ? "'".$this->db->idate($this->datep)."'" : 'null').","; $sql .= " amount=".(isset($this->amount) ? $this->amount : "null").","; $sql .= " fk_typepaiement=".(isset($this->fk_typepaiement) ? $this->fk_typepaiement : "null").","; - $sql .= " num_paiement=".(isset($this->num_paiement) ? "'".$this->db->escape($this->num_paiement)."'" : "null").","; + $sql .= " num_paiement=".(isset($this->num_payment) ? "'".$this->db->escape($this->num_payment)."'" : "null").","; $sql .= " note=".(isset($this->note) ? "'".$this->db->escape($this->note)."'" : "null").","; $sql .= " fk_bank=".(isset($this->fk_bank) ? $this->fk_bank : "null").","; $sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? $this->fk_user_creat : "null").","; @@ -358,9 +348,7 @@ class PaymentSocialContribution extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -414,9 +402,7 @@ class PaymentSocialContribution extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -465,9 +451,7 @@ class PaymentSocialContribution extends CommonObject { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -517,7 +501,7 @@ class PaymentSocialContribution extends CommonObject global $conf; // Clean data - $this->num_payment = trim($this->num_payment ? $this->num_payment : $this->num_paiement); + $this->num_payment = trim($this->num_payment); $error = 0; @@ -580,9 +564,7 @@ class PaymentSocialContribution extends CommonObject if ($result <= 0) dol_print_error($this->db); } } - } - else - { + } else { $this->error = $acc->error; $error++; } @@ -591,9 +573,7 @@ class PaymentSocialContribution extends CommonObject if (!$error) { return 1; - } - else - { + } else { return -1; } } @@ -616,9 +596,7 @@ class PaymentSocialContribution extends CommonObject if ($result) { return 1; - } - else - { + } else { $this->error = $this->db->error(); return 0; } @@ -702,7 +680,7 @@ class PaymentSocialContribution extends CommonObject $result = ''; if (empty($this->ref)) $this->ref = $this->lib; - $label = $langs->trans("ShowPayment").': '.$this->ref; + $label = $langs->trans("Payment").': '.$this->ref; if (!empty($this->id)) { $link = ''; diff --git a/htdocs/compta/sociales/document.php b/htdocs/compta/sociales/document.php index 3c73c8e6614..e7d76b94a76 100644 --- a/htdocs/compta/sociales/document.php +++ b/htdocs/compta/sociales/document.php @@ -163,9 +163,7 @@ if ($object->id) $permtoedit = $user->rights->fournisseur->facture->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index 8ccd8aa35aa..bd7f6147f2d 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -35,7 +35,7 @@ if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/clas // Load translation files required by the page $langs->loadLangs(array('compta', 'banks', 'bills')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -80,9 +80,7 @@ if (!GETPOSTISSET('search_typeid')) $part = explode(':', $val); if ($part[0] == 'cs.fk_type') $search_typeid = $part[1]; } -} -else -{ +} else { $search_typeid = GETPOST('search_typeid', 'int'); } @@ -140,8 +138,8 @@ if ($year > 0) $sql .= " AND ("; // Si period renseignee on l'utilise comme critere de date, sinon on prend date echeance, // ceci afin d'etre compatible avec les cas ou la periode n'etait pas obligatoire - $sql .= " (cs.periode IS NOT NULL AND date_format(cs.periode, '%Y') = '".$year."') "; - $sql .= "OR (cs.periode IS NULL AND date_format(cs.date_ech, '%Y') = '".$year."')"; + $sql .= " (cs.periode IS NOT NULL AND date_format(cs.periode, '%Y') = '".$db->escape($year)."') "; + $sql .= "OR (cs.periode IS NULL AND date_format(cs.date_ech, '%Y') = '".$db->escape($year)."')"; $sql .= ")"; } if ($filtre) { @@ -209,9 +207,7 @@ if ($resql) $countrynotdefined = $langs->trans("ErrorSetACountryFirst"); print $countrynotdefined; print ''; - } - else - { + } else { print '
    '; print ''."\n"; @@ -224,7 +220,7 @@ if ($resql) print ''; // Type print ''; // Ref Project if (!empty($conf->projet->enabled)) print ''; @@ -314,9 +310,7 @@ if ($resql) if ($obj->periode) { print 'jdate($obj->periode)).'">'.dol_print_date($db->jdate($obj->periode), 'day').''; - } - else - { + } else { print ' '; } print "\n"; @@ -346,9 +340,7 @@ if ($resql) print ''; } print ''; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/sociales/payments.php b/htdocs/compta/sociales/payments.php index 5cfa5df06ed..fc1f66d5e2c 100644 --- a/htdocs/compta/sociales/payments.php +++ b/htdocs/compta/sociales/payments.php @@ -92,9 +92,7 @@ if ($mode != 'sconly') { $center = ($year ? ''.img_previous($langs->trans("Previous"), 'class="valignbottom"')." ".$langs->trans("Year").' '.$year.' '.img_next($langs->trans("Next"), 'class="valignbottom"')."" : ""); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit, 1); -} -else -{ +} else { print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $center, $num, $totalnboflines, 'title_accountancy', 0, '', '', $limit); } @@ -208,9 +206,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ''; print '"; print ""; - } - else - { + } else { dol_print_error($db); } print '
    '; - $formsocialcontrib->select_type_socialcontrib($search_typeid, 'search_typeid', 1, 0, 0, 'maxwidth100onsmartphone'); + $formsocialcontrib->select_type_socialcontrib($search_typeid, 'search_typeid', 1, 0, 0, 'maxwidth100onsmartphone', 1); print ' '.price($totalpaye)."
    '; @@ -287,9 +283,7 @@ if (!empty($conf->tax->enabled) && $user->rights->tax->charges->lire) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -300,19 +294,15 @@ if ($mysoc->localtax1_assuj == "1" && $mysoc->localtax2_assuj == "1") { $j = 1; $numlt = 3; -} -elseif ($mysoc->localtax1_assuj == "1") +} elseif ($mysoc->localtax1_assuj == "1") { $j = 1; $numlt = 2; -} -elseif ($mysoc->localtax2_assuj == "1") +} elseif ($mysoc->localtax2_assuj == "1") { $j = 2; $numlt = 3; -} -else -{ +} else { $j = 0; $numlt = 0; } @@ -388,9 +378,7 @@ while ($j < $numlt) print ""; $db->free($result); - } - else - { + } else { dol_print_error($db); } } @@ -472,9 +460,7 @@ if (!empty($conf->salaries->enabled) && !empty($user->rights->salaries->read)) $db->free($result); print "
    "; - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/compta/stats/byratecountry.php b/htdocs/compta/stats/byratecountry.php index 1e2890f57fa..ee859965552 100644 --- a/htdocs/compta/stats/byratecountry.php +++ b/htdocs/compta/stats/byratecountry.php @@ -77,9 +77,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end else $year_end++; } $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -209,8 +207,7 @@ if ($modecompta == "CREANCES-DETTES") { } $builddate = dol_now(); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByVatRate"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -220,11 +217,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); diff --git a/htdocs/compta/stats/cabyprodserv.php b/htdocs/compta/stats/cabyprodserv.php index 5831467ce63..fbecc1df335 100644 --- a/htdocs/compta/stats/cabyprodserv.php +++ b/htdocs/compta/stats/cabyprodserv.php @@ -60,6 +60,9 @@ if (GETPOST('subcat', 'alpha') === 'yes') { $selected_type = GETPOST('search_type', 'int'); if ($selected_type == '') $selected_type = -1; +// Hook +$hookmanager->initHooks(array('cabyprodservlist')); + // Date range $year = GETPOST("year"); $month = GETPOST("month"); @@ -103,9 +106,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end else $year_end++; } $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -181,8 +182,7 @@ if ($modecompta == "CREANCES-DETTES") { } $builddate = dol_now(); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByProductsAndServices"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -192,11 +192,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } @@ -232,8 +230,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } @@ -255,8 +252,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " AND cp.fk_product is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/stats/cabyuser.php b/htdocs/compta/stats/cabyuser.php index 4d4f56a1354..8b6caa89a8f 100644 --- a/htdocs/compta/stats/cabyuser.php +++ b/htdocs/compta/stats/cabyuser.php @@ -96,9 +96,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } -} -else -{ +} else { // TODO We define q } // $date_start and $date_end are defined. We force $year_start and $nbofyear @@ -154,11 +152,10 @@ if ($modecompta == "CREANCES-DETTES") { //$calcmode.='
    ('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $description = $langs->trans("RulesCADue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByUserAuthorOfInvoice"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -167,12 +164,10 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { // TODO -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { // TODO } @@ -396,8 +391,7 @@ if (count($amount)) { } else { //print ''; } - } - elseif ($modecompta == 'CREANCES-DETTES') { + } elseif ($modecompta == 'CREANCES-DETTES') { if ($key > 0) { print ''; } else { @@ -416,8 +410,7 @@ if (count($amount)) { } else { //print ''; } - } - elseif ($modecompta == 'CREANCES-DETTES') { + } elseif ($modecompta == 'CREANCES-DETTES') { if ($key > 0) { print ''; } else { @@ -431,8 +424,7 @@ if (count($amount)) { } else { //print ''; } - } - elseif ($modecompta == 'CREANCES-DETTES') { + } elseif ($modecompta == 'CREANCES-DETTES') { if ($key > 0) { print ''; } diff --git a/htdocs/compta/stats/casoc.php b/htdocs/compta/stats/casoc.php index bec20998cfa..a02d87a8392 100644 --- a/htdocs/compta/stats/casoc.php +++ b/htdocs/compta/stats/casoc.php @@ -61,6 +61,9 @@ if ($user->socid > 0) $socid = $user->socid; if (!empty($conf->comptabilite->enabled)) $result = restrictedArea($user, 'compta', '', '', 'resultat'); if (!empty($conf->accounting->enabled)) $result = restrictedArea($user, 'accounting', '', '', 'comptarapport'); +// Hook +$hookmanager->initHooks(array('casoclist')); + // Date range $year = GETPOST("year", 'int'); $month = GETPOST("month", 'int'); @@ -113,9 +116,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } -} -else -{ +} else { // TODO We define q } @@ -180,11 +181,10 @@ if ($modecompta == "CREANCES-DETTES") //$calcmode.='
    ('.$langs->trans("SeeReportInInputOutputMode",'','').')'; $description = $langs->trans("RulesCADue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected").', '.$langs->trans("ByThirdParties"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -193,11 +193,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -223,8 +221,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -241,8 +238,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$db->escape($selected_cat); if ($subcat) $sql .= " OR c.fk_parent = ".$db->escape($selected_cat); $sql .= ")"; @@ -261,8 +257,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -275,8 +270,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/stats/index.php b/htdocs/compta/stats/index.php index d1a64e218d2..796ce2cc6a6 100644 --- a/htdocs/compta/stats/index.php +++ b/htdocs/compta/stats/index.php @@ -73,8 +73,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -124,11 +123,10 @@ if ($modecompta == "CREANCES-DETTES") $periodlink = ($year_start ? "".img_previous()." ".img_next()."" : ""); $description = $langs->trans("RulesCADue"); if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) $description .= $langs->trans("DepositsAreNotIncluded"); - else $description .= $langs->trans("DepositsAreIncluded"); + else $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("TurnoverCollected"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -140,8 +138,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description .= $langs->trans("DepositsAreIncluded"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("Turnover"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -173,8 +170,7 @@ if ($modecompta == 'CREANCES-DETTES') else $sql .= " AND f.type IN (0,1,2,3,5)"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { /* * Liste des paiements (les anciens paiements ne sont pas vus par cette requete car, sur les @@ -188,8 +184,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $sql .= " AND pf.fk_facture = f.rowid"; $sql .= " AND f.entity IN (".getEntity('invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.credit) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj"; @@ -223,8 +218,7 @@ if ($result) $i++; } $db->free($result); -} -else { +} else { dol_print_error($db); } @@ -259,9 +253,7 @@ if ($modecompta == 'RECETTES-DEPENSES') } $i++; } - } - else - { + } else { dol_print_error($db); } } @@ -339,11 +331,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. print ''.price($cum_ht[$case], 1).''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; } @@ -356,11 +345,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if ($modecompta != 'BOOKKEEPING') print ''; print price($cum[$case], 1); if ($modecompta != 'BOOKKEEPING') print ''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; @@ -390,12 +376,9 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { print '-'; } - } - else - { + } else { print ''; - if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } - else { print ' '; } + if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } else { print ' '; } print ''; } @@ -483,9 +466,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total_ht[$annee] ?price($total_ht[$annee]) : "0").""; - } - else - { + } else { print ' '; } } @@ -494,9 +475,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total[$annee] ?price($total[$annee]) : "0").""; - } - else - { + } else { print ' '; } @@ -519,12 +498,9 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) { print '+0%'; } - } - else - { + } else { print ''; - if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } - else { print ' '; } + if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } else { print ' '; } print ''; } diff --git a/htdocs/compta/stats/supplier_turnover.php b/htdocs/compta/stats/supplier_turnover.php index 3ff41f4d114..c257d5d1f73 100644 --- a/htdocs/compta/stats/supplier_turnover.php +++ b/htdocs/compta/stats/supplier_turnover.php @@ -69,8 +69,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $month_end = $month_start - 1; if ($month_end < 1) $month_end = 12; - } - else $month_end = $month_start; + } else $month_end = $month_start; $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); } if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } @@ -121,8 +120,7 @@ if ($modecompta == "CREANCES-DETTES") $description = $langs->trans("RulesPurchaseTurnoverDue"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("PurchaseTurnoverCollected"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -133,8 +131,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $name = $langs->trans("PurchaseTurnover"); $calcmode = $langs->trans("CalcModeBookkeeping"); @@ -165,8 +162,7 @@ if ($modecompta == 'CREANCES-DETTES') $sql .= " AND f.type IN (0,2)"; $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $sql = "SELECT date_format(p.datep,'%Y-%m') as dm, sum(pf.amount) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; @@ -176,8 +172,7 @@ elseif ($modecompta == "RECETTES-DEPENSES") $sql .= " AND pf.fk_facturefourn = f.rowid"; $sql .= " AND f.entity IN (".getEntity('supplier_invoice').")"; if ($socid) $sql .= " AND f.fk_soc = ".$socid; -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { $sql = "SELECT date_format(b.doc_date,'%Y-%m') as dm, sum(b.debit) as amount_ttc"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b, ".MAIN_DB_PREFIX."accounting_journal as aj"; @@ -211,8 +206,7 @@ if ($result) $i++; } $db->free($result); -} -else { +} else { dol_print_error($db); } @@ -289,11 +283,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { $now_show_delta = 1; // On a trouve le premier mois de la premiere annee generant du chiffre. print ''.price($cum_ht[$case], 1).''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; } @@ -306,11 +297,8 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) if ($modecompta != 'BOOKKEEPING') print ''; print price($cum[$case], 1); if ($modecompta != 'BOOKKEEPING') print ''; - } - else - { - if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } - else { print ' '; } + } else { + if ($minyearmonth < $case && $case <= max($maxyearmonth, $nowyearmonth)) { print '0'; } else { print ' '; } } print ""; @@ -340,12 +328,9 @@ for ($mois = 1 + $nb_mois_decalage; $mois <= 12 + $nb_mois_decalage; $mois++) { print '-'; } - } - else - { + } else { print ''; - if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } - else { print ' '; } + if ($minyearmonth <= $case && $case <= $maxyearmonth) { print '-'; } else { print ' '; } print ''; } @@ -368,9 +353,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total_ht[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total_ht[$annee] ?price($total_ht[$annee]) : "0").""; - } - else - { + } else { print ' '; } } @@ -379,9 +362,7 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) if ($total[$annee] || ($annee >= $minyear && $annee <= max($nowyear, $maxyear))) { print ''.($total[$annee] ?price($total[$annee]) : "0").""; - } - else - { + } else { print ' '; } @@ -404,12 +385,9 @@ for ($annee = $year_start; $annee <= $year_end; $annee++) { print '+0%'; } - } - else - { + } else { print ''; - if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } - else { print ' '; } + if ($total[$annee] || ($minyear <= $annee && $annee <= max($nowyear, $maxyear))) { print '-'; } else { print ' '; } print ''; } diff --git a/htdocs/compta/stats/supplier_turnover_by_prodserv.php b/htdocs/compta/stats/supplier_turnover_by_prodserv.php index fafb967ace1..83a3cb70a00 100644 --- a/htdocs/compta/stats/supplier_turnover_by_prodserv.php +++ b/htdocs/compta/stats/supplier_turnover_by_prodserv.php @@ -57,6 +57,9 @@ if (GETPOST('subcat', 'alpha') === 'yes') { $selected_type = GETPOST('search_type', 'int'); if ($selected_type == '') $selected_type = -1; +// Hook +$hookmanager->initHooks(array('supplierturnoverbyprodservlist')); + // Date range $year = GETPOST("year"); $month = GETPOST("month"); @@ -100,9 +103,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end else $year_end++; } $date_start = dol_get_first_day($year_start, $month_start, false); $date_end = dol_get_last_day($year_end, $month_end, false); - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -172,8 +173,7 @@ if ($modecompta == "CREANCES-DETTES") { $description = $langs->trans("RulesPurchaseTurnoverDue"); $builddate = dol_now(); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("PurchaseTurnoverCollected").', '.$langs->trans("ByProductsAndServices"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -181,11 +181,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } @@ -221,8 +219,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON p.rowid = cp.fk_product"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_product as cp"; } @@ -240,8 +237,7 @@ if ($modecompta == 'CREANCES-DETTES') if ($selected_cat === -2) // Without any category { $sql .= " AND cp.fk_product is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php index fcae12f744b..7a624284cdf 100644 --- a/htdocs/compta/stats/supplier_turnover_by_thirdparty.php +++ b/htdocs/compta/stats/supplier_turnover_by_thirdparty.php @@ -50,6 +50,9 @@ if (GETPOST('subcat', 'alpha') === 'yes') { $subcat = true; } +// Hook +$hookmanager->initHooks(array('supplierturnoverbythirdpartylist')); + // Security check if ($user->socid > 0) $socid = $user->socid; if (!empty($conf->comptabilite->enabled)) $result = restrictedArea($user, 'compta', '', '', 'resultat'); @@ -107,9 +110,7 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } if ($q == 4) { $date_start = dol_get_first_day($year_start, 10, false); $date_end = dol_get_last_day($year_start, 12, false); } -} -else -{ +} else { // TODO We define q } @@ -175,8 +176,7 @@ if ($modecompta == "CREANCES-DETTES") $description = $langs->trans("RulesPurchaseTurnoverDue"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "RECETTES-DEPENSES") +} elseif ($modecompta == "RECETTES-DEPENSES") { $name = $langs->trans("PurchaseTurnoverCollected").', '.$langs->trans("ByThirdParties"); $calcmode = $langs->trans("CalcModeEngagement"); @@ -184,11 +184,9 @@ elseif ($modecompta == "RECETTES-DEPENSES") $description = $langs->trans("RulesPurchaseTurnoverIn"); $builddate = dol_now(); //$exportlink=$langs->trans("NotYetAvailable"); -} -elseif ($modecompta == "BOOKKEEPING") +} elseif ($modecompta == "BOOKKEEPING") { -} -elseif ($modecompta == "BOOKKEEPINGCOLLECTED") +} elseif ($modecompta == "BOOKKEEPINGCOLLECTED") { } $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); @@ -215,8 +213,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -229,8 +226,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$db->escape($selected_cat); if ($subcat) $sql .= " OR c.fk_parent = ".$db->escape($selected_cat); $sql .= ")"; @@ -245,8 +241,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " LEFT OUTER JOIN ".MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; - } - elseif ($selected_cat) // Into a specific category + } elseif ($selected_cat) // Into a specific category { $sql .= ", ".MAIN_DB_PREFIX."categorie as c, ".MAIN_DB_PREFIX."categorie_societe as cs"; } @@ -259,8 +254,7 @@ if ($modecompta == 'CREANCES-DETTES') { if ($selected_cat === -2) // Without any category { $sql .= " AND cs.fk_soc is null"; - } - elseif ($selected_cat) { // Into a specific category + } elseif ($selected_cat) { // Into a specific category $sql .= " AND (c.rowid = ".$selected_cat; if ($subcat) $sql .= " OR c.fk_parent = ".$selected_cat; $sql .= ")"; diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 6d7c5935418..a39e14466eb 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -98,7 +98,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) } $object->amount = $amount; $object->label = GETPOST("label", 'alpha'); - $object->note = GETPOST("note", 'none'); + $object->note_private = GETPOST("note", 'restricthtml'); if (empty($object->datep)) { @@ -131,9 +131,7 @@ if ($action == 'add' && $_POST["cancel"] <> $langs->trans("Cancel")) $db->commit(); header("Location: list.php"); exit; - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); $action = "create"; @@ -166,22 +164,16 @@ if ($action == 'delete') $db->commit(); header("Location: ".DOL_URL_ROOT.'/compta/tva/list.php'); exit; - } - else - { + } else { $object->error = $accountline->error; $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $mesg = 'Error try do delete a line linked to a conciliated bank transaction'; setEventMessages($mesg, null, 'errors'); } @@ -247,7 +239,7 @@ if ($action == 'create') print ''; print '
    '; print "
    \n"; @@ -387,15 +379,11 @@ if ($id) { if (!empty($user->rights->tax->charges->supprimer)) { - print ''; - } - else - { + print ''; + } else { print ''; } - } - else - { + } else { print ''; } print ""; diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 668a58c4f77..5f661609e52 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -150,15 +150,11 @@ class Tva extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); $this->db->rollback(); return -1; @@ -224,9 +220,7 @@ class Tva extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -293,9 +287,7 @@ class Tva extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -392,7 +384,7 @@ class Tva extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1"; if ($year) { - $sql .= " AND f.datef >= '".$year."-01-01' AND f.datef <= '".$year."-12-31' "; + $sql .= " AND f.datef >= '".$this->db->escape($year)."-01-01' AND f.datef <= '".$this->db->escape($year)."-12-31' "; } $result = $this->db->query($sql); @@ -404,15 +396,11 @@ class Tva extends CommonObject $ret = $obj->amount; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -433,7 +421,7 @@ class Tva extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; if ($year) { - $sql .= " WHERE f.datef >= '".$year."-01-01' AND f.datef <= '".$year."-12-31' "; + $sql .= " WHERE f.datef >= '".$this->db->escape($year)."-01-01' AND f.datef <= '".$this->db->escape($year)."-12-31' "; } $result = $this->db->query($sql); @@ -445,15 +433,11 @@ class Tva extends CommonObject $ret = $obj->total_tva; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -476,7 +460,7 @@ class Tva extends CommonObject if ($year) { - $sql .= " WHERE f.datev >= '".$year."-01-01' AND f.datev <= '".$year."-12-31' "; + $sql .= " WHERE f.datev >= '".$this->db->escape($year)."-01-01' AND f.datev <= '".$this->db->escape($year)."-12-31' "; } $result = $this->db->query($sql); @@ -488,15 +472,11 @@ class Tva extends CommonObject $ret = $obj->amount; $this->db->free($result); return $ret; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { print $this->db->lasterror(); return -1; } @@ -613,9 +593,7 @@ class Tva extends CommonObject if ($bank_line_id > 0) { $this->update_fk_bank($bank_line_id); - } - else - { + } else { $this->error = $acc->error; $ok = 0; } @@ -633,21 +611,15 @@ class Tva extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -3; } - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -670,9 +642,7 @@ class Tva extends CommonObject if ($result) { return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -711,8 +681,7 @@ class Tva extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -753,9 +722,7 @@ class Tva extends CommonObject $this->db->free($resql); return $amount; - } - else - { + } else { return -1; } } @@ -800,9 +767,7 @@ class Tva extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/compta/tva/clients.php b/htdocs/compta/tva/clients.php index bcedba7a074..a91d637c39d 100644 --- a/htdocs/compta/tva/clients.php +++ b/htdocs/compta/tva/clients.php @@ -66,14 +66,11 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $q = GETPOST("q", "int"); if (empty($q)) { - if (GETPOST("month", 'int')) { $date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), false); $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), false); } - else - { + if (GETPOST("month", 'int')) { $date_start = dol_get_first_day($year_start, GETPOST("month", 'int'), false); $date_end = dol_get_last_day($year_start, GETPOST("month", 'int'), false); } else { if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm'); $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) { if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year $year_start--; @@ -85,15 +82,12 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false); $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm'); $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; } } - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -130,6 +124,7 @@ $product_static = new Product($db); $payment_static = new Paiement($db); $paymentfourn_static = new PaiementFourn($db); $paymentexpensereport_static = new PaymentExpenseReport($db); +$user_static = new User($db); $morequerystring = ''; $listofparams = array('date_startmonth', 'date_startyear', 'date_startday', 'date_endmonth', 'date_endyear', 'date_endday'); @@ -157,7 +152,7 @@ $calcmode = ''; if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); -$calcmode .= '
    ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; +$calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; // Set period $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $prevyear = $year_start; @@ -222,7 +217,7 @@ $vatsup = $langs->trans("VATPaid"); // VAT Received - +print '
    '; print ""; $y = $year_current; @@ -321,9 +316,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'vat' =>$x_paye[$my_paye_thirdpartyid]['vat_list'][$id], 'link' =>$expensereport->getNomUrl(1) ); - } - else - { + } else { $invoice_supplier->id = $x_paye[$my_paye_thirdpartyid]['facid'][$id]; $invoice_supplier->ref = $x_paye[$my_paye_thirdpartyid]['facnum'][$id]; $invoice_supplier->type = $x_paye[$my_paye_thirdpartyid]['type'][$id]; @@ -693,9 +686,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { print $langs->trans("NA"); - } - else - { + } else { if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); } @@ -753,14 +744,12 @@ if (!is_array($x_coll) || !is_array($x_paye)) print ''; } - print '
    '; - // Total to pay - print '

    '; - print ''; + print ''; + $diff = $x_coll_sum - $x_paye_sum; print ''; - print ''; + print ''; print '\n"; print "\n"; @@ -768,7 +757,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) } print '
    '.$langs->trans("TotalToPay").($q ? ', '.$langs->trans("Quadri").' '.$q : '').''.$langs->trans("TotalToPay").($q ? ', '.$langs->trans("Quadri").' '.$q : '').''.price(price2num($diff, 'MT'))."
    '; - +print '
    '; llxFooter(); diff --git a/htdocs/compta/tva/document.php b/htdocs/compta/tva/document.php index 0a464c47b54..830dfb78d3a 100644 --- a/htdocs/compta/tva/document.php +++ b/htdocs/compta/tva/document.php @@ -148,9 +148,7 @@ if ($object->id) $permtoedit = $user->rights->fournisseur->facture->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/compta/tva/index.php b/htdocs/compta/tva/index.php index 0a785aa78cd..a4fd1293b4d 100644 --- a/htdocs/compta/tva/index.php +++ b/htdocs/compta/tva/index.php @@ -57,14 +57,11 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $q = GETPOST("q", "int"); if (empty($q)) { - if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } - else - { + if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } else { if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm'); $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) { if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year $year_start--; @@ -76,15 +73,12 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false); $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm'); $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; } } - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -176,9 +170,7 @@ function pt($db, $sql, $date) $amountpaid = 0; $previousmode = ''; $previousmonth = ''; - } - else - { + } else { $previousmode = $obj->mode; $previousmonth = $obj->dm; } @@ -207,8 +199,7 @@ function pt($db, $sql, $date) print ""; $db->free($result); - } - else { + } else { dol_print_error($db); } } @@ -229,12 +220,12 @@ $fsearch .= ''; $description = $fsearch; // Show report header -$name = $langs->trans("ReportByMonth"); +$name = $langs->trans("VATReportByMonth"); $calcmode = ''; if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); -$calcmode .= '
    ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; +$calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; $description .= $langs->trans("VATSummary").'
    '; if ($conf->global->TAX_MODE_SELL_PRODUCT == 'invoice') $description .= $langs->trans("RulesVATDueProducts"); @@ -371,9 +362,7 @@ while ((($y < $yend) || ($y == $yend && $m <= $mend)) && $mcursor < 1000) // $mc 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], //'link' =>$expensereport->getNomUrl(1) ); - } - else - { + } else { //$invoice_supplier->id=$x_paye[$my_paye_rate]['facid'][$id]; //$invoice_supplier->ref=$x_paye[$my_paye_rate]['facnum'][$id]; //$invoice_supplier->type=$x_paye[$my_paye_rate]['type'][$id]; diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 003a7eabcad..82829fca12e 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -72,9 +72,7 @@ if (empty($_REQUEST['typeid'])) $part = explode(':', $val); if ($part[0] == 't.fk_typepayment') $typeid = $part[1]; } -} -else -{ +} else { $typeid = $_REQUEST['typeid']; } @@ -148,11 +146,9 @@ if ($result) if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; if ($typeid) $param .= '&typeid='.$typeid; - $newcardbutton = ''; - if ($user->rights->tax->charges->creer) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/compta/tva/card.php?action=create'); - } + $url = DOL_URL_ROOT.'/compta/tva/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewVATPayment', ($ltt + 1)), '', 'fa fa-plus-circle', $url, '', $user->rights->tax->charges->creer); print '
    '; if ($optioncss != '') print ''; @@ -174,22 +170,18 @@ if ($result) // Date end period print ''; print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_dateend_start ? $search_dateend_start : -1, 'search_dateend_start', 0, 0, 1); + print $form->selectDate($search_dateend_start ? $search_dateend_start : -1, 'search_dateend_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
    '; print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_dateend_end ? $search_dateend_end : -1, 'search_dateend_end', 0, 0, 1); + print $form->selectDate($search_dateend_end ? $search_dateend_end : -1, 'search_dateend_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
    '; // Date payment print ''; print '
    '; - print $langs->trans('From').' '; - print $form->selectDate($search_datepayment_start ? $search_datepayment_start : -1, 'search_datepayment_start', 0, 0, 1); + print $form->selectDate($search_datepayment_start ? $search_datepayment_start : -1, 'search_datepayment_start', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('From')); print '
    '; print '
    '; - print $langs->trans('to').' '; - print $form->selectDate($search_datepayment_end ? $search_datepayment_end : -1, 'search_datepayment_end', 0, 0, 1); + print $form->selectDate($search_datepayment_end ? $search_datepayment_end : -1, 'search_datepayment_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans('to')); print '
    '; // Type print ''; @@ -228,9 +220,7 @@ if ($result) if ($obj->payment_code <> '') { $type = ''.$langs->trans("PaymentTypeShort".$obj->payment_code).' '.$obj->num_payment.''; - } - else - { + } else { $type = ' '; } @@ -266,8 +256,7 @@ if ($result) $bankstatic->label = $obj->blabel; print $bankstatic->getNomUrl(1); - } - else print ' '; + } else print ' '; print ''; } // Amount @@ -291,9 +280,7 @@ if ($result) print '
    '; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/compta/tva/quadri_detail.php b/htdocs/compta/tva/quadri_detail.php index 79ee69a030c..8fb4c32bf72 100644 --- a/htdocs/compta/tva/quadri_detail.php +++ b/htdocs/compta/tva/quadri_detail.php @@ -66,14 +66,11 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end $q = GETPOST("q", "int"); if (empty($q)) { - if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } - else - { + if (GETPOST("month", "int")) { $date_start = dol_get_first_day($year_start, GETPOST("month", "int"), false); $date_end = dol_get_last_day($year_start, GETPOST("month", "int"), false); } else { if (empty($conf->global->MAIN_INFO_VAT_RETURN) || $conf->global->MAIN_INFO_VAT_RETURN == 2) { // quaterly vat, we take last past complete quarter $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -3 - (($current_date['mon'] - $conf->global->SOCIETE_FISCAL_MONTH_START) % 3), 'm'); $date_end = dol_time_plus_duree($date_start, 3, 'm') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 3) { // yearly vat if ($current_date['mon'] < $conf->global->SOCIETE_FISCAL_MONTH_START) { if (($conf->global->SOCIETE_FISCAL_MONTH_START - $current_date['mon']) > 6) { // If period started from less than 6 years, we show past year $year_start--; @@ -85,15 +82,12 @@ if (empty($date_start) || empty($date_end)) // We define date_start and date_end } $date_start = dol_get_first_day($year_start, $conf->global->SOCIETE_FISCAL_MONTH_START, false); $date_end = dol_time_plus_duree($date_start, 1, 'y') - 1; - } - elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month + } elseif ($conf->global->MAIN_INFO_VAT_RETURN == 1) { // monthly vat, we take last past complete month $date_start = dol_time_plus_duree(dol_get_first_day($year_start, $current_date['mon'], false), -1, 'm'); $date_end = dol_time_plus_duree($date_start, 1, 'm') - 1; } } - } - else - { + } else { if ($q == 1) { $date_start = dol_get_first_day($year_start, 1, false); $date_end = dol_get_last_day($year_start, 3, false); } if ($q == 2) { $date_start = dol_get_first_day($year_start, 4, false); $date_end = dol_get_last_day($year_start, 6, false); } if ($q == 3) { $date_start = dol_get_first_day($year_start, 7, false); $date_end = dol_get_last_day($year_start, 9, false); } @@ -158,7 +152,7 @@ $calcmode = ''; if ($modetax == 0) $calcmode = $langs->trans('OptionVATDefault'); if ($modetax == 1) $calcmode = $langs->trans('OptionVATDebitOption'); if ($modetax == 2) $calcmode = $langs->trans('OptionPaymentForProductAndServices'); -$calcmode .= '
    ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; +$calcmode .= ' ('.$langs->trans("TaxModuleSetupToModifyRules", DOL_URL_ROOT.'/admin/taxes.php').')'; // Set period $period = $form->selectDate($date_start, 'date_start', 0, 0, 0, '', 1, 0).' - '.$form->selectDate($date_end, 'date_end', 0, 0, 0, '', 1, 0); $prevyear = $year_start; $prevquarter = $q; @@ -219,6 +213,7 @@ $vatexpensereport = $langs->trans("VATPaid"); // VAT Received and paid +print '
    '; print ''; $y = $year_current; @@ -315,9 +310,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) 'vat' =>$x_paye[$my_paye_rate]['vat_list'][$id], 'link' =>$expensereport->getNomUrl(1) ); - } - else - { + } else { $invoice_supplier->id = $x_paye[$my_paye_rate]['facid'][$id]; $invoice_supplier->ref = $x_paye[$my_paye_rate]['facnum'][$id]; $invoice_supplier->type = $x_paye[$my_paye_rate]['type'][$id]; @@ -439,9 +432,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) if (dol_string_nohtmltag($fields['descr'])) { print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); } - } - else - { + } else { if ($type) { $text = img_object($langs->trans('Service'), 'service'); } else { @@ -620,9 +611,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) if (dol_string_nohtmltag($fields['descr'])) { print ' - '.dol_trunc(dol_string_nohtmltag($fields['descr']), 24); } - } - else - { + } else { if ($type) { $text = img_object($langs->trans('Service'), 'service'); } else { @@ -673,9 +662,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) || ($type == 1 && $conf->global->TAX_MODE_BUY_SERVICE == 'invoice')) { print $langs->trans("NA"); - } - else - { + } else { if (isset($fields['payment_amount']) && $fields['ftotal_ttc']) { $ratiopaymentinvoice = ($fields['payment_amount'] / $fields['ftotal_ttc']); } @@ -733,6 +720,7 @@ if (!is_array($x_coll) || !is_array($x_paye)) } print '
    '; + print '
    '; // Total to pay print '

    '; diff --git a/htdocs/conf/conf.php.example b/htdocs/conf/conf.php.example index 32c37301a0e..02cc5bae399 100644 --- a/htdocs/conf/conf.php.example +++ b/htdocs/conf/conf.php.example @@ -219,10 +219,10 @@ $dolibarr_main_authentication='dolibarr'; // 1 = Force redirect to https, until SCRIPT_URI start with https into response // 2 = Force redirect to https, until SERVER["HTTPS"] is 'on' into response // 'https://my.domain.com' = Force redirect to https using this domain name. -// Warning: If you enable this parameter, your web server must be configured to -// respond URL with https protocol. -// According to your web server setup, some values may works and other not. Try -// different values (1,2 or 'https://my.domain.com') if you experience problems. +// Warning: If you enable this parameter, your web server must be configured to respond URL with https protocol. +// According to your web server setup, some values may works and other not. Try different values (1,2 or 'https://my.domain.com') if you experience problems. +// Even if a redirect to HTTPS is forced by the webserver, it is recommanded to set this value to another value than 0, so your session cookies will be +// flagged as secured. // Default value: 0 // Possible values: 0, 1, 2 or 'https://my.domain.com' // Examples: @@ -233,12 +233,12 @@ $dolibarr_main_force_https='0'; // dolibarr_main_prod // When this parameter is defined, all errors messages are not reported. // This feature exists for production usage to avoid to give any information to hackers. -// Default value: 0 +// Default value: 1 // Possible values: 0 or 1 // Examples: -// $dolibarr_main_prod='0'; +// $dolibarr_main_prod='1'; // -$dolibarr_main_prod='0'; +$dolibarr_main_prod='1'; // $dolibarr_main_restrict_os_commands // To restrict commands you can execute by the backup feature, enter allowed command here. @@ -260,8 +260,8 @@ $dolibarr_main_restrict_ip=''; // dolibarr_nocsrfcheck // This parameter can be used to disable CSRF protection. -// This might be required if you access Dolibarr behind a proxy that make -// URL rewriting, to avoid false alarms. +// This might be required if you access Dolibarr behind a proxy that make bad URL rewriting, to avoid false alarms. +// In most cases, you should always keep this to 0. // Default value: 0 // Possible values: 0 or 1 // Examples: @@ -269,6 +269,12 @@ $dolibarr_main_restrict_ip=''; // $dolibarr_nocsrfcheck='0'; +// dolibarr_cron_allow_cli +// If set to 1, you will be able to define some command line in the internale Job scheduler module. +// Default value: '0' +// Examples: '1' +$dolibarr_cron_allow_cli='0'; + // dolibarr_mailing_limit_sendbyweb // Can set a limit for mailing send by web. This overwrite database value. Can be used to restrict on OS level. // Default value: '25' @@ -281,6 +287,18 @@ $dolibarr_nocsrfcheck='0'; // Examples: '-1' (sending by cli is forbidden) // $dolibarr_mailing_limit_sendbycli='0'; +// MAIN_ANTIVIRUS_COMMAND (as a constant) +// Force a value for the antivirus command line tool so setup for admin user interface has no effect. +// Default value: '' +// Example: '/usr/bin/clamdscan'; +// define('MAIN_ANTIVIRUS_COMMAND', '/usr/bin/clamdscan'); + +// MAIN_ANTIVIRUS_PARAM (as a constant) +// Force a value for the antivirus parameters on command line so setup for admin user interface has no effect. +// Default value: '' +// Example: '--fdpass'; +// define('MAIN_ANTIVIRUS_PARAM', '--fdpass'); + //################## // Other diff --git a/htdocs/contact/agenda.php b/htdocs/contact/agenda.php index 625cf524169..23a6042fbf9 100644 --- a/htdocs/contact/agenda.php +++ b/htdocs/contact/agenda.php @@ -76,16 +76,14 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); // Security check if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); @@ -159,9 +157,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates $objcanvas->display_canvas($action); // Show template -} -else -{ +} else { // ----------------------------------------- // When used in standard mode // ----------------------------------------- @@ -244,18 +240,11 @@ else $permok = $user->rights->agenda->myactions->create; if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { - //$out.='
    trans("AddAnAction"),'filenew'); - //$out.=""; + if (is_object($objthirdparty) && get_class($objthirdparty) == 'Societe') $out .= '&originid='.$objthirdparty->id.($objthirdparty->id > 0 ? '&socid='.$objthirdparty->id : ''); + $out .= (!empty($objcon->id) ? '&contactid='.$objcon->id : '').'&origin=contact&originid='.$object->id.'&percentage=-1&backtopage='.urlencode($_SERVER['PHP_SELF'].($objcon->id > 0 ? '?id='.$objcon->id : '')); + $out .= '&datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog')); } - - //print '
    '; - //print '
    '; - $newcardbutton = ''; if (!empty($conf->agenda->enabled)) { diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index fbd31812fe8..415d9e47790 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -119,9 +119,7 @@ abstract class ActionsContactCardCommon { $this->tpl['company'] = $objsoc->getNomUrl(1); $this->tpl['company_id'] = $objsoc->id; - } - else - { + } else { $this->tpl['company'] = $form->select_company($this->object->socid, 'socid', '', 1); } @@ -208,8 +206,7 @@ abstract class ActionsContactCardCommon $dolibarr_user = new User($this->db); $result = $dolibarr_user->fetch($this->object->user_id); $this->tpl['dolibarr_user'] = $dolibarr_user->getLoginUrl(1); - } - else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); + } else $this->tpl['dolibarr_user'] = $langs->trans("NoDolibarrAccess"); } if ($action == 'view' || $action == 'delete') @@ -222,9 +219,7 @@ abstract class ActionsContactCardCommon $objsoc->fetch($this->object->socid); $this->tpl['company'] = $objsoc->getNomUrl(1); - } - else - { + } else { $this->tpl['company'] = $langs->trans("ContactNotLinkedToCompany"); } @@ -309,9 +304,7 @@ abstract class ActionsContactCardCommon if ($resql) { $obj = $this->db->fetch_object($resql); - } - else - { + } else { dol_print_error($this->db); } $this->object->country_id = $langs->trans("Country".$obj->code) ? $langs->trans("Country".$obj->code) : $obj->label; diff --git a/htdocs/contact/canvas/default/actions_contactcard_default.class.php b/htdocs/contact/canvas/default/actions_contactcard_default.class.php index 54b3f137967..099c973b0a4 100644 --- a/htdocs/contact/canvas/default/actions_contactcard_default.class.php +++ b/htdocs/contact/canvas/default/actions_contactcard_default.class.php @@ -104,9 +104,7 @@ class ActionsContactCardDefault extends ActionsContactCardCommon $this->tpl['actionstodo'] = show_actions_todo($conf, $langs, $db, $objsoc, $this->object, 1); $this->tpl['actionsdone'] = show_actions_done($conf, $langs, $db, $objsoc, $this->object, 1); - } - else - { + } else { // Confirm delete contact if ($action == 'delete' && $user->rights->societe->contact->supprimer) { diff --git a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php index bd0808aa8b5..43fd48e3ef0 100644 --- a/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php +++ b/htdocs/contact/canvas/default/tpl/contactcard_view.tpl.php @@ -144,7 +144,7 @@ if (empty($user->socid)) { } if ($user->rights->societe->contact->supprimer) { - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print '
    '; diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 7bd88436e31..e4e7ecaf5fb 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -10,6 +10,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2019 Frédéric France * Copyright (C) 2019 Josep Lluís Amador + * Copyright (C) 2020 Open-Dsi * * 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 @@ -70,14 +71,14 @@ $objcanvas = null; $canvas = (!empty($object->canvas) ? $object->canvas : GETPOST("canvas")); if (!empty($canvas)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; - $objcanvas = new Canvas($db, $action); - $objcanvas->getCanvas('contact', 'contactcard', $canvas); + require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; + $objcanvas = new Canvas($db, $action); + $objcanvas->getCanvas('contact', 'contactcard', $canvas); } // Security check if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('contactcard', 'globalcard')); @@ -101,51 +102,45 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - // Cancel - if (GETPOST('cancel', 'alpha') && !empty($backtopage)) - { - header("Location: ".$backtopage); - exit; - } + // Cancel + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } // Creation utilisateur depuis contact - if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) - { - // Recuperation contact actuel - $result = $object->fetch($id); + if ($action == 'confirm_create_user' && $confirm == 'yes' && $user->rights->user->user->creer) + { + // Recuperation contact actuel + $result = $object->fetch($id); - if ($result > 0) - { - $db->begin(); + if ($result > 0) + { + $db->begin(); - // Creation user - $nuser = new User($db); - $result = $nuser->create_from_contact($object, GETPOST("login")); // Do not use GETPOST(alpha) + // Creation user + $nuser = new User($db); + $result = $nuser->create_from_contact($object, GETPOST("login")); // Do not use GETPOST(alpha) - if ($result > 0) - { - $result2 = $nuser->setPassword($user, GETPOST("password"), 0, 0, 1); // Do not use GETPOST(alpha) - if ($result2) - { - $db->commit(); - } - else - { - $error = $nuser->error; $errors = $nuser->errors; - $db->rollback(); - } - } - else - { - $error = $nuser->error; $errors = $nuser->errors; - $db->rollback(); - } - } - else - { - $error = $object->error; $errors = $object->errors; - } - } + if ($result > 0) + { + $result2 = $nuser->setPassword($user, GETPOST("password"), 0, 0, 1); // Do not use GETPOST(alpha) + if ($result2) + { + $db->commit(); + } else { + $error = $nuser->error; $errors = $nuser->errors; + $db->rollback(); + } + } else { + $error = $nuser->error; $errors = $nuser->errors; + $db->rollback(); + } + } else { + $error = $object->error; $errors = $object->errors; + } + } // Confirmation desactivation @@ -155,9 +150,7 @@ if (empty($reshook)) if ($object->setstatus(0) < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } @@ -170,9 +163,7 @@ if (empty($reshook)) if ($object->setstatus(1) < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$id); exit; } @@ -183,50 +174,50 @@ if (empty($reshook)) { $db->begin(); - if ($canvas) $object->canvas = $canvas; + if ($canvas) $object->canvas = $canvas; - $object->entity = (GETPOSTISSET('entity') ?GETPOST('entity', 'int') : $conf->entity); - $object->socid = GETPOST("socid", 'int'); - $object->lastname = GETPOST("lastname", 'alpha'); - $object->firstname = GETPOST("firstname", 'alpha'); - $object->civility_code = GETPOST("civility_code", 'alpha'); - $object->poste = GETPOST("poste", 'alpha'); - $object->address = GETPOST("address", 'alpha'); - $object->zip = GETPOST("zipcode", 'alpha'); - $object->town = GETPOST("town", 'alpha'); - $object->country_id = GETPOST("country_id", 'int'); - $object->state_id = GETPOST("state_id", 'int'); - //$object->jabberid = GETPOST("jabberid", 'alpha'); - //$object->skype = GETPOST("skype", 'alpha'); - //$object->twitter = GETPOST("twitter", 'alpha'); - //$object->facebook = GETPOST("facebook", 'alpha'); - //$object->linkedin = GETPOST("linkedin", 'alpha'); - $object->socialnetworks = array(); - if (!empty($conf->socialnetworks->enabled)) { - foreach ($socialnetworks as $key => $value) { - if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { - $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); - } - } - } - $object->email = GETPOST("email", 'alpha'); - $object->no_email = GETPOST("no_email", "int"); - $object->phone_pro = GETPOST("phone_pro", 'alpha'); - $object->phone_perso = GETPOST("phone_perso", 'alpha'); - $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); - $object->fax = GETPOST("fax", 'alpha'); - $object->priv = GETPOST("priv", 'int'); - $object->note_public = GETPOST("note_public", 'none'); - $object->note_private = GETPOST("note_private", 'none'); - $object->roles = GETPOST("roles", 'array'); + $object->entity = (GETPOSTISSET('entity') ?GETPOST('entity', 'int') : $conf->entity); + $object->socid = GETPOST("socid", 'int'); + $object->lastname = GETPOST("lastname", 'alpha'); + $object->firstname = GETPOST("firstname", 'alpha'); + $object->civility_code = GETPOST("civility_code", 'alpha'); + $object->poste = GETPOST("poste", 'alpha'); + $object->address = GETPOST("address", 'alpha'); + $object->zip = GETPOST("zipcode", 'alpha'); + $object->town = GETPOST("town", 'alpha'); + $object->country_id = GETPOST("country_id", 'int'); + $object->state_id = GETPOST("state_id", 'int'); + //$object->jabberid = GETPOST("jabberid", 'alpha'); + //$object->skype = GETPOST("skype", 'alpha'); + //$object->twitter = GETPOST("twitter", 'alpha'); + //$object->facebook = GETPOST("facebook", 'alpha'); + //$object->linkedin = GETPOST("linkedin", 'alpha'); + $object->socialnetworks = array(); + if (!empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } + $object->email = GETPOST("email", 'alpha'); + $object->no_email = GETPOST("no_email", "int"); + $object->phone_pro = GETPOST("phone_pro", 'alpha'); + $object->phone_perso = GETPOST("phone_perso", 'alpha'); + $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); + $object->fax = GETPOST("fax", 'alpha'); + $object->priv = GETPOST("priv", 'int'); + $object->note_public = GETPOST("note_public", 'restricthtml'); + $object->note_private = GETPOST("note_private", 'restricthtml'); + $object->roles = GETPOST("roles", 'array'); - $object->statut = 1; //Defult status to Actif + $object->statut = 1; //Defult status to Actif - // Note: Correct date should be completed with location to have exact GM time of birth. - $object->birthday = dol_mktime(0, 0, 0, GETPOST("birthdaymonth", 'int'), GETPOST("birthdayday", 'int'), GETPOST("birthdayyear", 'int')); - $object->birthday_alert = GETPOST("birthday_alert", 'alpha'); + // Note: Correct date should be completed with location to have exact GM time of birth. + $object->birthday = dol_mktime(0, 0, 0, GETPOST("birthdaymonth", 'int'), GETPOST("birthdayday", 'int'), GETPOST("birthdayyear", 'int')); + $object->birthday_alert = GETPOST("birthday_alert", 'alpha'); - // Fill array 'array_options' with data from add form + // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) { @@ -234,19 +225,19 @@ if (empty($reshook)) $action = 'create'; } - if (!GETPOST("lastname")) - { - $error++; $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label")); - $action = 'create'; - } + if (!GETPOST("lastname")) + { + $error++; $errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname").' / '.$langs->transnoentities("Label")); + $action = 'create'; + } - if (!$error) - { - $id = $object->create($user); - if ($id <= 0) - { - $error++; $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); - $action = 'create'; + if (!$error) + { + $id = $object->create($user); + if ($id <= 0) + { + $error++; $errors = array_merge($errors, ($object->error ? array($object->error) : $object->errors)); + $action = 'create'; } else { // Categories association $contcats = GETPOST('contcats', 'array'); @@ -268,57 +259,51 @@ if (empty($reshook)) } } } - } + } - if (!$error && $id > 0) - { - $db->commit(); - if (!empty($backtopage)) $url = $backtopage; - else $url = 'card.php?id='.$id; - header("Location: ".$url); - exit; - } - else - { - $db->rollback(); - } - } + if (!$error && $id > 0) + { + $db->commit(); + if (!empty($backtopage)) $url = $backtopage; + else $url = 'card.php?id='.$id; + header("Location: ".$url); + exit; + } else { + $db->rollback(); + } + } - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) - { - $result = $object->fetch($id); + if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->contact->supprimer) + { + $result = $object->fetch($id); $object->oldcopy = clone $object; - $object->old_lastname = GETPOST("old_lastname"); - $object->old_firstname = GETPOST("old_firstname"); + $object->old_lastname = GETPOST("old_lastname"); + $object->old_firstname = GETPOST("old_firstname"); - $result = $object->delete(); - if ($result > 0) - { - if ($backtopage) - { - header("Location: ".$backtopage); - exit; - } - else - { - header("Location: ".DOL_URL_ROOT.'/contact/list.php'); - exit; - } - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } + $result = $object->delete(); + if ($result > 0) + { + if ($backtopage) + { + header("Location: ".$backtopage); + exit; + } else { + header("Location: ".DOL_URL_ROOT.'/contact/list.php'); + exit; + } + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } - if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) - { - if (empty($_POST["lastname"])) - { - $error++; $errors = array($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); - $action = 'edit'; - } + if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact->creer) + { + if (empty($_POST["lastname"])) + { + $error++; $errors = array($langs->trans("ErrorFieldRequired", $langs->transnoentities("Name").' / '.$langs->transnoentities("Label"))); + $action = 'edit'; + } if (!$error) { @@ -327,164 +312,171 @@ if (empty($reshook)) // Photo save $dir = $conf->societe->multidir_output[$object->entity]."/contact/".$object->id."/photos"; - $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); - if (GETPOST('deletephoto') && $object->photo) - { - $fileimg = $dir.'/'.$object->photo; - $dirthumbs = $dir.'/thumbs'; - dol_delete_file($fileimg); - dol_delete_dir_recursive($dirthumbs); - $object->photo = ''; - } - if ($file_OK) - { - if (image_format_supported($_FILES['photo']['name']) > 0) - { - dol_mkdir($dir); + $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']); + if (GETPOST('deletephoto') && $object->photo) + { + $fileimg = $dir.'/'.$object->photo; + $dirthumbs = $dir.'/thumbs'; + dol_delete_file($fileimg); + dol_delete_dir_recursive($dirthumbs); + $object->photo = ''; + } + if ($file_OK) + { + if (image_format_supported($_FILES['photo']['name']) > 0) + { + dol_mkdir($dir); - if (@is_dir($dir)) - { - $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); - $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); + if (@is_dir($dir)) + { + $newfile = $dir.'/'.dol_sanitizeFileName($_FILES['photo']['name']); + $result = dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1); - if (!$result > 0) - { - $errors[] = "ErrorFailedToSaveFile"; - } - else - { - $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); + if (!$result > 0) + { + $errors[] = "ErrorFailedToSaveFile"; + } else { + $object->photo = dol_sanitizeFileName($_FILES['photo']['name']); - // Create thumbs - $object->addThumbs($newfile); - } - } - } - else - { - $errors[] = "ErrorBadImageFormat"; - } - } - else - { - switch ($_FILES['photo']['error']) - { - case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini - case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form - $errors[] = "ErrorFileSizeTooLarge"; - break; - case 3: //uploaded file was only partially uploaded - $errors[] = "ErrorFilePartiallyUploaded"; - break; - } - } + // Create thumbs + $object->addThumbs($newfile); + } + } + } else { + $errors[] = "ErrorBadImageFormat"; + } + } else { + switch ($_FILES['photo']['error']) + { + case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini + case 2: //uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form + $errors[] = "ErrorFileSizeTooLarge"; + break; + case 3: //uploaded file was only partially uploaded + $errors[] = "ErrorFilePartiallyUploaded"; + break; + } + } $object->oldcopy = clone $object; $object->old_lastname = GETPOST("old_lastname", 'alpha'); $object->old_firstname = GETPOST("old_firstname", 'alpha'); - $object->socid = GETPOST("socid", 'int'); - $object->lastname = GETPOST("lastname", 'alpha'); - $object->firstname = GETPOST("firstname", 'alpha'); - $object->civility_code = GETPOST("civility_code", 'alpha'); - $object->poste = GETPOST("poste", 'alpha'); + $object->socid = GETPOST("socid", 'int'); + $object->lastname = GETPOST("lastname", 'alpha'); + $object->firstname = GETPOST("firstname", 'alpha'); + $object->civility_code = GETPOST("civility_code", 'alpha'); + $object->poste = GETPOST("poste", 'alpha'); - $object->address = GETPOST("address", 'alpha'); - $object->zip = GETPOST("zipcode", 'alpha'); - $object->town = GETPOST("town", 'alpha'); - $object->state_id = GETPOST("state_id", 'int'); - $object->country_id = GETPOST("country_id", 'int'); + $object->address = GETPOST("address", 'alpha'); + $object->zip = GETPOST("zipcode", 'alpha'); + $object->town = GETPOST("town", 'alpha'); + $object->state_id = GETPOST("state_id", 'int'); + $object->country_id = GETPOST("country_id", 'int'); - $object->email = GETPOST("email", 'alpha'); - $object->no_email = GETPOST("no_email", "int"); - //$object->jabberid = GETPOST("jabberid", 'alpha'); - //$object->skype = GETPOST("skype", 'alpha'); - //$object->twitter = GETPOST("twitter", 'alpha'); - //$object->facebook = GETPOST("facebook", 'alpha'); - //$object->linkedin = GETPOST("linkedin", 'alpha'); + $object->email = GETPOST("email", 'alpha'); + $object->no_email = GETPOST("no_email", "int"); + //$object->jabberid = GETPOST("jabberid", 'alpha'); + //$object->skype = GETPOST("skype", 'alpha'); + //$object->twitter = GETPOST("twitter", 'alpha'); + //$object->facebook = GETPOST("facebook", 'alpha'); + //$object->linkedin = GETPOST("linkedin", 'alpha'); $object->socialnetworks = array(); - if (!empty($conf->socialnetworks->enabled)) { - foreach ($socialnetworks as $key => $value) { - if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { - $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); - } - } - } - $object->phone_pro = GETPOST("phone_pro", 'alpha'); - $object->phone_perso = GETPOST("phone_perso", 'alpha'); - $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); - $object->fax = GETPOST("fax", 'alpha'); - $object->priv = GETPOST("priv", 'int'); - $object->note_public = GETPOST("note_public", 'none'); - $object->note_private = GETPOST("note_private", 'none'); - $object->roles = GETPOST("roles", 'array'); + if (!empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if (GETPOSTISSET($key) && GETPOST($key, 'alphanohtml') != '') { + $object->socialnetworks[$key] = GETPOST($key, 'alphanohtml'); + } + } + } + $object->phone_pro = GETPOST("phone_pro", 'alpha'); + $object->phone_perso = GETPOST("phone_perso", 'alpha'); + $object->phone_mobile = GETPOST("phone_mobile", 'alpha'); + $object->fax = GETPOST("fax", 'alpha'); + $object->priv = GETPOST("priv", 'int'); + $object->note_public = GETPOST("note_public", 'restricthtml'); + $object->note_private = GETPOST("note_private", 'restricthtml'); + $object->roles = GETPOST("roles", 'array'); - // Fill array 'array_options' with data from add form + // Fill array 'array_options' with data from add form $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if (!$error) { - $result = $object->update($contactid, $user); + $result = $object->update($contactid, $user); - if ($result > 0) { - // Categories association - $categories = GETPOST('contcats', 'array'); - $object->setCategories($categories); + if ($result > 0) { + // Categories association + $categories = GETPOST('contcats', 'array'); + $object->setCategories($categories); - $no_email = GETPOST('no_email', 'int'); + $no_email = GETPOST('no_email', 'int'); - // Update mass emailing flag into table mailing_unsubscribe - if (GETPOSTISSET('no_email') && $object->email) - { - if ($no_email) - { - $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$db->escape($object->email)."'"; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $noemail = $obj->nb; - if (empty($noemail)) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$db->escape($object->email)."', ".$db->escape(getEntity('mailing', 0)).", '".$db->idate(dol_now())."')"; - $resql = $db->query($sql); - } - } - } - else - { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = '".$db->escape($object->email)."' AND entity = ".$db->escape(getEntity('mailing', 0)); - $resql = $db->query($sql); - } + // Update mass emailing flag into table mailing_unsubscribe + if (GETPOSTISSET('no_email') && $object->email) + { + if ($no_email) + { + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing', 0).") AND email = '".$db->escape($object->email)."'"; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $noemail = $obj->nb; + if (empty($noemail)) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_unsubscribe(email, entity, date_creat) VALUES ('".$db->escape($object->email)."', ".$db->escape(getEntity('mailing', 0)).", '".$db->idate(dol_now())."')"; + $resql = $db->query($sql); + } + } + } else { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE email = '".$db->escape($object->email)."' AND entity = ".$db->escape(getEntity('mailing', 0)); + $resql = $db->query($sql); + } - $object->no_email = $no_email; - } + $object->no_email = $no_email; + } - $object->old_lastname = ''; - $object->old_firstname = ''; - $action = 'view'; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - $action = 'edit'; - } + $object->old_lastname = ''; + $object->old_firstname = ''; + $action = 'view'; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit'; + } } - } + } - if (!$error && empty($errors)) - { - if (!empty($backtopage)) - { - header("Location: ".$backtopage); - exit; - } - } - } + if (!$error && empty($errors)) + { + if (!empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } + } + } - // Actions to send emails + if ($action == 'setprospectcontactlevel' && $user->rights->societe->contact->creer) + { + $object->fetch($id); + $object->fk_prospectlevel = GETPOST('prospect_contact_level_id', 'alpha'); + $result = $object->update($object->id, $user); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + } + + // set communication status + if ($action == 'setstcomm') + { + $object->fetch($id); + $object->stcomm_id = dol_getIdFromCode($db, GETPOST('stcomm', 'alpha'), 'c_stcommcontact'); + $result = $object->update($object->id, $user); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + } + + // Actions to send emails $triggersendname = 'CONTACT_SENTBYMAIL'; $paramname = 'id'; $mode = 'emailfromcontact'; @@ -509,89 +501,87 @@ $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans(" if ($socid > 0) { - $objsoc = new Societe($db); - $objsoc->fetch($socid); + $objsoc = new Societe($db); + $objsoc->fetch($socid); } if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { - // ----------------------------------------- - // When used with CANVAS - // ----------------------------------------- - if (empty($object->error) && $id) + // ----------------------------------------- + // When used with CANVAS + // ----------------------------------------- + if (empty($object->error) && $id) { $object = new Contact($db); $result = $object->fetch($id); if ($result <= 0) dol_print_error('', $object->error); } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates - $objcanvas->display_canvas($action); // Show template -} -else -{ - // ----------------------------------------- - // When used in standard mode - // ----------------------------------------- + $objcanvas->display_canvas($action); // Show template +} else { + // ----------------------------------------- + // When used in standard mode + // ----------------------------------------- - // Confirm deleting contact - if ($user->rights->societe->contact->supprimer) - { - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage ? '&backtopage='.$backtopage : ''), $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1); - } - } + // Confirm deleting contact + if ($user->rights->societe->contact->supprimer) + { + if ($action == 'delete') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id.($backtopage ? '&backtopage='.$backtopage : ''), $langs->trans("DeleteContact"), $langs->trans("ConfirmDeleteContact"), "confirm_delete", '', 0, 1); + } + } - /* + /* * Onglets */ - $head = array(); - if ($id > 0) - { - // Si edition contact deja existant - $object = new Contact($db); - $res = $object->fetch($id, $user); - if ($res < 0) { - setEventMessages($object->error, $object->errors, 'errors'); - } + $head = array(); + if ($id > 0) + { + // Si edition contact deja existant + $object = new Contact($db); + $res = $object->fetch($id, $user); + if ($res < 0) { + setEventMessages($object->error, $object->errors, 'errors'); + } - $object->fetchRoles(); + $object->fetchRoles(); - // Show tabs - $head = contact_prepare_head($object); + // Show tabs + $head = contact_prepare_head($object); - $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); - } + $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); + } - if ($user->rights->societe->contact->creer) - { - if ($action == 'create') - { - /* + if ($user->rights->societe->contact->creer) + { + if ($action == 'create') + { + /* * Fiche en mode creation */ - $object->canvas = $canvas; + $object->canvas = $canvas; - $object->state_id = GETPOST("state_id"); + $object->state_id = GETPOST("state_id"); - // We set country_id, country_code and label for the selected country - $object->country_id = $_POST["country_id"] ?GETPOST("country_id") : (empty($objsoc->country_id) ? $mysoc->country_id : $objsoc->country_id); - if ($object->country_id) - { - $tmparray = getCountry($object->country_id, 'all'); - $object->country_code = $tmparray['code']; - $object->country = $tmparray['label']; - } + // We set country_id, country_code and label for the selected country + $object->country_id = $_POST["country_id"] ?GETPOST("country_id") : (empty($objsoc->country_id) ? $mysoc->country_id : $objsoc->country_id); + if ($object->country_id) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } - $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); - $linkback = ''; - print load_fiche_titre($title, $linkback, 'address'); + $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); + $linkback = ''; + print load_fiche_titre($title, $linkback, 'address'); - // Show errors - dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); + // Show errors + dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) + { print "\n".''."\n"; - } + } - print '
    '; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; if (!empty($objsoc)) { print ''; - } + } - dol_fiche_head($head, 'card', '', 0, ''); + dol_fiche_head($head, 'card', '', 0, ''); - print ''; + print '
    '; - // Name - print ''; - print ''; - print ''; - - print ''; - print ''; - print ''; - print ''; - - // Company - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - if ($socid > 0) - { - print ''; - print ''; - print ''; - print ''; - } - else { - print ''; - } - } - - // Civility - print ''; - - print ''; - print ''; - - $colspan = 3; - if ($conf->use_javascript_ajax && $socid > 0) $colspan = 2; - - // Address - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party - print ''; - print ''; - - if ($conf->use_javascript_ajax && $socid > 0) - { - $rowspan = 3; - if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; - - print ''; - } - print ''; - - // Zip / Town - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party - print ''; - - // Country - print ''; - - // State - if (empty($conf->global->SOCIETE_DISABLE_STATE)) - { - if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) - { - print ''; - } - - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party - - // Phone / Fax - print ''; - print ''; - if ($conf->browser->layout == 'phone') print ''; - print ''; - print ''; - - print ''; - print ''; - if ($conf->browser->layout == 'phone') print ''; - print ''; - print ''; - print ''; - - if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party - - // Email - print ''; - print ''; + // Name + print ''; + print ''; print ''; - if (!empty($conf->mailing->enabled)) - { - $noemail = ''; - if (empty($noemail) && !empty($object->email)) - { - $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; - //print $sql; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $noemail = $obj->nb; - } - } + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; - } - print ''; + // Company + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + if ($socid > 0) + { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + } + } - if (!empty($conf->socialnetworks->enabled)) { - foreach ($socialnetworks as $key => $value) { - if ($value['active']) { - print ''; - print ''; - print ''; - print ''; - } elseif (!empty($object->socialnetworks[$key])) { - print ''; - } - } - } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Jabber - // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) - // { - // print ''; - // print ''; - // } - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''; - // print ''; - // } - // } + // Civility + print ''; - // Visibility - print ''; + print ''; + print ''; + + $colspan = 3; + if ($conf->use_javascript_ajax && $socid > 0) $colspan = 2; + + // Address + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->address)) == 0) $object->address = $objsoc->address; // Predefined with third party + print ''; + print ''; + + if ($conf->use_javascript_ajax && $socid > 0) + { + $rowspan = 3; + if (empty($conf->global->SOCIETE_DISABLE_STATE)) $rowspan++; + + print ''; + } + print ''; + + // Zip / Town + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->zip)) == 0) $object->zip = $objsoc->zip; // Predefined with third party + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->town)) == 0) $object->town = $objsoc->town; // Predefined with third party + print ''; + + // Country + print ''; + + // State + if (empty($conf->global->SOCIETE_DISABLE_STATE)) + { + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) + { + print ''; + } + + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->phone_pro)) == 0) $object->phone_pro = $objsoc->phone; // Predefined with third party + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->fax)) == 0) $object->fax = $objsoc->fax; // Predefined with third party + + // Phone / Fax + print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''; + print ''; + + print ''; + print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''; + print ''; + print ''; + + if (($objsoc->typent_code == 'TE_PRIVATE' || !empty($conf->global->CONTACT_USE_COMPANY_ADDRESS)) && dol_strlen(trim($object->email)) == 0) $object->email = $objsoc->email; // Predefined with third party + + // Email + print ''; + print ''; + print ''; + + if (!empty($conf->mailing->enabled)) + { + $noemail = ''; + if (empty($noemail) && !empty($object->email)) + { + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; + //print $sql; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $noemail = $obj->nb; + } + } + + print ''; + print ''; + print ''; + print ''; + } + print ''; + + if (!empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + print ''; + print ''; + print ''; + print ''; + } elseif (!empty($object->socialnetworks[$key])) { + print ''; + } + } + } + // if (! empty($conf->socialnetworks->enabled)) + // { + // // Jabber + // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) + // { + // print ''; + // print ''; + // } + // // Skype + // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) + // { + // print ''; + // print ''; + // } + // // Twitter + // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) + // { + // print ''; + // print ''; + // } + // // Facebook + // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) + // { + // print ''; + // print ''; + // } + // // LinkedIn + // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) + // { + // print ''; + // print ''; + // } + // } + + // Visibility + print ''; // Categories if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { @@ -838,91 +823,84 @@ else print ""; } - // Contact by default - if (!empty($socid)) { - print ''; - print ''; - } + // Contact by default + if (!empty($socid)) { + print ''; + print ''; + } - // Other attributes - $parameters = array('socid' => $socid, 'objsoc' => $objsoc, 'colspan' => ' colspan="3"', 'cols' => 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', $parameters); - } + // Other attributes + $parameters = array('socid' => $socid, 'objsoc' => $objsoc, 'colspan' => ' colspan="3"', 'cols' => 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', $parameters); + } - print "
    lastname).'" autofocus="autofocus">
    firstname).'">
    '; - print $objsoc->getNomUrl(1, 'contact'); - print '
    '; - print $form->select_company($socid, 'socid', '', 'SelectThirdParty'); - print '
    '; - print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'alpha') : $object->civility_code, 'civility_code'); - print '
    poste).'">
    '; - print ''.$langs->trans('CopyAddressFromSoc').''; - print '
    / '; - print $formcompany->select_ziptown((GETPOST("zipcode", 'alpha') ? GETPOST("zipcode", 'alpha') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' '; - print $formcompany->select_ziptown((GETPOST("town", 'alpha') ? GETPOST("town", 'alpha') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); - print '
    '; - print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country((GETPOST("country_id", 'alpha') ? GETPOST("country_id", 'alpha') : $object->country_id), 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
    '; - } - else - { - print '
    '; - } - - if ($object->country_id) - { - print $formcompany->select_state(GETPOST("state_id", 'alpha') ? GETPOST("state_id", 'alpha') : $object->state_id, $object->country_code, 'state_id'); - } - else - { - print $countrynotdefined; - } - print '
    '.$form->editfieldkey('PhonePro', 'phone_pro', '', $object, 0).''; - print img_picto('', 'object_phoning'); - print '
    '.$form->editfieldkey('PhonePerso', 'phone_perso', '', $object, 0).''; - print img_picto('', 'object_phoning'); - print '
    '.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).''; - print img_picto('', 'object_phoning_mobile'); - print '
    '.$form->editfieldkey('Fax', 'fax', '', $object, 0).''; - print img_picto('', 'object_phoning_fax'); - print '
    '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '').''; - print img_picto('', 'object_email'); - print '
    lastname).'" autofocus="autofocus">
    firstname).'">
    '.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'alpha') : $noemail), 1).'
    '; + print $objsoc->getNomUrl(1, 'contact'); + print '
    '; + print $form->select_company($socid, 'socid', '', 'SelectThirdParty'); + print '
    '; - print ''; - print '
    jabberid).'">
    skype).'">
    twitter).'">
    facebook).'">
    linkedin).'">
    '; + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", 'alpha') : $object->civility_code, 'civility_code'); + print '
    '; - $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('priv', $selectarray, (GETPOST("priv", 'alpha') ?GETPOST("priv", 'alpha') : $object->priv), 0); - print '
    poste).'">
    '; + print ''.$langs->trans('CopyAddressFromSoc').''; + print '
    / '; + print $formcompany->select_ziptown((GETPOST("zipcode", 'alpha') ? GETPOST("zipcode", 'alpha') : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' '; + print $formcompany->select_ziptown((GETPOST("town", 'alpha') ? GETPOST("town", 'alpha') : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); + print '
    '; + print img_picto('', 'globe-americas', 'class="paddingrightonly"'); + print $form->select_country((GETPOST("country_id", 'alpha') ? GETPOST("country_id", 'alpha') : $object->country_id), 'country_id'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print '
    '; + } else { + print '
    '; + } + + if ($object->country_id) + { + print $formcompany->select_state(GETPOST("state_id", 'alpha') ? GETPOST("state_id", 'alpha') : $object->state_id, $object->country_code, 'state_id'); + } else { + print $countrynotdefined; + } + print '
    '.$form->editfieldkey('PhonePro', 'phone_pro', '', $object, 0).''; + print img_picto('', 'object_phoning'); + print '
    '.$form->editfieldkey('PhonePerso', 'phone_perso', '', $object, 0).''; + print img_picto('', 'object_phoning'); + print '
    '.$form->editfieldkey('PhoneMobile', 'phone_mobile', '', $object, 0).''; + print img_picto('', 'object_phoning_mobile'); + print '
    '.$form->editfieldkey('Fax', 'fax', '', $object, 0).''; + print img_picto('', 'object_phoning_fax'); + print '
    '.$form->editfieldkey('EMail', 'email', '', $object, 0, 'string', '').''; + print img_picto('', 'object_email'); + print '
    '.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ? GETPOST("no_email", 'alpha') : $noemail), 1).'
    '; + print ''; + print '
    jabberid).'">
    skype).'">
    twitter).'">
    facebook).'">
    linkedin).'">
    '; + $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('priv', $selectarray, (GETPOST("priv", 'alpha') ?GETPOST("priv", 'alpha') : $object->priv), 0); + print '
    '.$langs->trans("ContactByDefaultFor").''; - $contactType = $object->listeTypeContacts('external', '', 1); - print $form->multiselectarray('roles', $contactType); - print '
    '.$langs->trans("ContactByDefaultFor").''; + $contactType = $object->listeTypeContacts('external', '', 1); + print $form->multiselectarray('roles', $contactType); + print '

    "; + print "
    "; print '
    '; - // Add personnal information - print load_fiche_titre('
    '.$langs->trans("PersonalInformations").'
    ', '', ''); + // Add personnal information + print load_fiche_titre('
    '.$langs->trans("PersonalInformations").'
    ', '', ''); - print ''; + print '
    '; - // Date To Birth - print ''; + // Date To Birth + print ''; - print ''; - print ''; + print ''; + print ''; - print "
    '; - $form = new Form($db); - if ($object->birthday) - { - print $form->selectDate($object->birthday, 'birthday', 0, 0, 0, "perso", 1, 0); - } - else - { - print $form->selectDate('', 'birthday', 0, 0, 1, "perso", 1, 0); - } - print '
    '; + $form = new Form($db); + if ($object->birthday) + { + print $form->selectDate($object->birthday, 'birthday', 0, 0, 0, "perso", 1, 0); + } else { + print $form->selectDate('', 'birthday', 0, 0, 1, "perso", 1, 0); + } + print ': '; - if ($object->birthday_alert) - { - print ''; - } - else - { - print ''; - } - print '
    : '; + if ($object->birthday_alert) + { + print ''; + } else { + print ''; + } + print '
    "; + print ""; - dol_fiche_end(); + dol_fiche_end(); - print '
    '; - print ''; - if (!empty($backtopage)) - { - print '     '; - print ''; - } - else - { - print '     '; - print ''; - } - print '
    '; + print '
    '; + print ''; + if (!empty($backtopage)) + { + print '     '; + print ''; + } else { + print '     '; + print ''; + } + print '
    '; - print "
    "; - } - elseif ($action == 'edit' && !empty($id)) - { - /* + print ""; + } elseif ($action == 'edit' && !empty($id)) + { + /* * Fiche en mode edition */ - // We set country_id, and country_code label of the chosen country - if (isset($_POST["country_id"]) || $object->country_id) - { - $tmparray = getCountry($object->country_id, 'all'); - $object->country_code = $tmparray['code']; - $object->country = $tmparray['label']; - } + // We set country_id, and country_code label of the chosen country + if (isset($_POST["country_id"]) || $object->country_id) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } $objsoc = new Societe($db); $objsoc->fetch($object->socid); @@ -930,8 +908,8 @@ else // Show errors dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); - if ($conf->use_javascript_ajax) - { + if ($conf->use_javascript_ajax) + { print "\n".''."\n"; - } + } - print '
    '; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if (!empty($backtopage)) print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + if (!empty($backtopage)) print ''; - dol_fiche_head($head, 'card', $title, 0, 'contact'); + dol_fiche_head($head, 'card', $title, 0, 'contact'); - print ''; + print '
    '; - // Ref/ID - if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) - { - print ''; - } + // Ref/ID + if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) + { + print ''; + } - // Lastname - print ''; - print ''; - print ''; - print ''; - // Firstname - print ''; - print ''; - print ''; + // Lastname + print ''; + print ''; + print ''; + print ''; + // Firstname + print ''; + print ''; + print ''; - // Company - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - print ''; - print ''; - print ''; - } - - // Civility - print ''; - - print ''; - print ''; - - // Address - print ''; - print ''; - - // Zip / Town - print ''; - - // Country - print ''; - - // State - if (empty($conf->global->SOCIETE_DISABLE_STATE)) - { - if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) - { - print ''; - } - - // Phone - print ''; - print ''; - print ''; - print ''; - - print ''; - print ''; - print ''; - print ''; - - // EMail - print ''; - print ''; - if (!empty($conf->mailing->enabled)) - { - $langs->load("mails"); - print ''; - print ''; - } - else + // Company + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { - print ''; - } - print ''; + print ''; + print ''; + print ''; + } - // Unsubscribe - print ''; - if (!empty($conf->mailing->enabled)) - { - $noemail = ''; - if (empty($noemail) && !empty($object->email)) - { - $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; - //print $sql; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $noemail = $obj->nb; - } - } + // Civility + print ''; - print ''; - print ''; - } - else + print ''; + print ''; + + // Address + print ''; + print ''; + + // Zip / Town + print ''; + + // Country + print ''; + + // State + if (empty($conf->global->SOCIETE_DISABLE_STATE)) { + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) + { + print ''; + } + + // Phone + print ''; + print ''; + print ''; + print ''; + + print ''; + print ''; + print ''; + print ''; + + // EMail + print ''; + print ''; + if (!empty($conf->mailing->enabled)) + { + $langs->load("mails"); + print ''; + print ''; + } else { print ''; } - print ''; + print ''; - if (!empty($conf->socialnetworks->enabled)) { - foreach ($socialnetworks as $key => $value) { - if ($value['active']) { - print ''; - print ''; - print ''; - print ''; - } elseif (!empty($object->socialnetworks[$key])) { - print ''; - } - } - } - // if (! empty($conf->socialnetworks->enabled)) - // { - // // Jabber ID - // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) - // { - // print ''; - // print ''; - // } - // // Skype - // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) - // { - // print ''; - // print ''; - // } - // // Twitter - // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) - // { - // print ''; - // print ''; - // } - // // Facebook - // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) - // { - // print ''; - // print ''; - // } - // // LinkedIn - // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) - // { - // print ''; - // print ''; - // } - // } + // Unsubscribe + print ''; + if (!empty($conf->mailing->enabled)) + { + $noemail = ''; + if (empty($noemail) && !empty($object->email)) + { + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; + //print $sql; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $noemail = $obj->nb; + } + } - // Visibility - print ''; + print ''; + print ''; + } else { + print ''; + } + print ''; - // Note Public - print ''; + if (!empty($conf->socialnetworks->enabled)) { + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + print ''; + print ''; + print ''; + print ''; + } elseif (!empty($object->socialnetworks[$key])) { + print ''; + } + } + } + // if (! empty($conf->socialnetworks->enabled)) + // { + // // Jabber ID + // if (! empty($conf->global->SOCIALNETWORKS_JABBER)) + // { + // print ''; + // print ''; + // } + // // Skype + // if (! empty($conf->global->SOCIALNETWORKS_SKYPE)) + // { + // print ''; + // print ''; + // } + // // Twitter + // if (! empty($conf->global->SOCIALNETWORKS_TWITTER)) + // { + // print ''; + // print ''; + // } + // // Facebook + // if (! empty($conf->global->SOCIALNETWORKS_FACEBOOK)) + // { + // print ''; + // print ''; + // } + // // LinkedIn + // if (! empty($conf->global->SOCIALNETWORKS_LINKEDIN)) + // { + // print ''; + // print ''; + // } + // } - // Note Private - print ''; + // Visibility + print ''; - // Status - print ''; - print ''; + // Note Public + print ''; + + // Note Private + print ''; + + // Status + print ''; + print ''; // Categories if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { @@ -1190,93 +1162,92 @@ else } // Contact by default - if (!empty($object->socid)) { - print ''; - print ''; - } + if (!empty($object->socid)) { + print ''; + print ''; + } - // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols'=> '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', $parameters); - } + // Other attributes + $parameters = array('colspan' => ' colspan="3"', 'cols'=> '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', $parameters); + } - $object->load_ref_elements(); + $object->load_ref_elements(); - if (!empty($conf->commande->enabled)) - { - print ''; - } + if (!empty($conf->commande->enabled)) + { + print ''; + } - if (!empty($conf->propal->enabled)) - { - print ''; - } + if (!empty($conf->propal->enabled)) + { + print ''; + } - if (!empty($conf->contrat->enabled)) - { - print ''; - } + if (!empty($conf->contrat->enabled)) + { + print ''; + } - if (!empty($conf->facture->enabled)) - { - print ''; - } + if (!empty($conf->facture->enabled)) + { + print ''; + } - // Login Dolibarr - print ''; + // Login Dolibarr + print ''; - // Photo - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; + print ''; + print ''; - print '
    '.$langs->trans("ID").''; - print $object->ref; - print '
    '.$langs->trans("ID").''; + print $object->ref; + print '
    lastname).'" autofocus="autofocus">
    firstname).'">
    lastname).'" autofocus="autofocus">
    firstname).'">
    '; - print $form->select_company(GETPOST('socid', 'int') ?GETPOST('socid', 'int') : ($object->socid ? $object->socid : -1), 'socid', '', $langs->trans("SelectThirdParty")); - print '
    '; - print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", "aZ09") : $object->civility_code, 'civility_code'); - print '
    poste).'">
    '; - print '
    '; - print ''; - print '
    '; - if ($conf->use_javascript_ajax) print ''.$langs->trans('CopyAddressFromSoc').'
    '; - print '
    '; - print '
    / '; - print $formcompany->select_ziptown((GETPOSTISSET("zipcode") ? GETPOST("zipcode") : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' '; - print $formcompany->select_ziptown((GETPOSTISSET("town") ? GETPOST("town") : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); - print '
    '; - print img_picto('', 'globe-americas', 'class="paddingrightonly"'); - print $form->select_country(GETPOSTISSET("country_id") ? GETPOST("country_id") : $object->country_id, 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
    '; - } - else - { - print '
    '; - } - - print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : $object->state_id, $object->country_code, 'state_id'); - print '
    '.$form->editfieldkey('PhonePro', 'phone_pro', GETPOST('phone_pro', 'alpha'), $object, 0).''; - print img_picto('', 'object_phoning'); - print ''.$form->editfieldkey('PhonePerso', 'fax', GETPOST('phone_perso', 'alpha'), $object, 0).''; - print img_picto('', 'object_phoning'); - print '
    '.$form->editfieldkey('PhoneMobile', 'phone_mobile', GETPOST('phone_mobile', 'alpha'), $object, 0, 'string', '').''; - print img_picto('', 'object_phoning_mobile'); - print ''.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).''; - print img_picto('', 'object_phoning_fax'); - print '
    '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).''; - print img_picto('', 'object_email'); - print ''.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
    '; + print $form->select_company(GETPOST('socid', 'int') ?GETPOST('socid', 'int') : ($object->socid ? $object->socid : -1), 'socid', '', $langs->trans("SelectThirdParty")); + print '
    '; + print $formcompany->select_civility(GETPOSTISSET("civility_code") ? GETPOST("civility_code", "aZ09") : $object->civility_code, 'civility_code'); + print '
    '.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ?GETPOST("no_email", 'alpha') : $noemail), 1).'
    poste).'">
    '; + print '
    '; + print ''; + print '
    '; + if ($conf->use_javascript_ajax) print ''.$langs->trans('CopyAddressFromSoc').'
    '; + print '
    '; + print '
    / '; + print $formcompany->select_ziptown((GETPOSTISSET("zipcode") ? GETPOST("zipcode") : $object->zip), 'zipcode', array('town', 'selectcountry_id', 'state_id'), 6).' '; + print $formcompany->select_ziptown((GETPOSTISSET("town") ? GETPOST("town") : $object->town), 'town', array('zipcode', 'selectcountry_id', 'state_id')); + print '
    '; + print img_picto('', 'globe-americas', 'class="paddingrightonly"'); + print $form->select_country(GETPOSTISSET("country_id") ? GETPOST("country_id") : $object->country_id, 'country_id'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print '
    '; + } else { + print '
    '; + } + + print $formcompany->select_state(GETPOSTISSET('state_id') ? GETPOST('state_id', 'alpha') : $object->state_id, $object->country_code, 'state_id'); + print '
    '.$form->editfieldkey('PhonePro', 'phone_pro', GETPOST('phone_pro', 'alpha'), $object, 0).''; + print img_picto('', 'object_phoning'); + print ''.$form->editfieldkey('PhonePerso', 'fax', GETPOST('phone_perso', 'alpha'), $object, 0).''; + print img_picto('', 'object_phoning'); + print '
    '.$form->editfieldkey('PhoneMobile', 'phone_mobile', GETPOST('phone_mobile', 'alpha'), $object, 0, 'string', '').''; + print img_picto('', 'object_phoning_mobile'); + print ''.$form->editfieldkey('Fax', 'fax', GETPOST('fax', 'alpha'), $object, 0).''; + print img_picto('', 'object_phoning_fax'); + print '
    '.$form->editfieldkey('EMail', 'email', GETPOST('email', 'alpha'), $object, 0, 'string', '', (!empty($conf->global->SOCIETE_EMAIL_MANDATORY))).''; + print img_picto('', 'object_email'); + print ''.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
    '; - print ''; - print '
    jabberid).'">
    skype).'">
    twitter).'">
    facebook).'">
    linkedin).'">
    '; - $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('priv', $selectarray, $object->priv, 0); - print '
    '.$form->selectyesno('no_email', (GETPOSTISSET("no_email") ?GETPOST("no_email", 'alpha') : $noemail), 1).'
    '; - $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - print '
    '; + print ''; + print '
    jabberid).'">
    skype).'">
    twitter).'">
    facebook).'">
    linkedin).'">
    '; - $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - print '
    '; + $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('priv', $selectarray, $object->priv, 0); + print '
    '.$langs->trans("Status").''; - print $object->getLibStatut(4); - print '
    '; + $doleditor = new DolEditor('note_public', $object->note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + print '
    '; + $doleditor = new DolEditor('note_private', $object->note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + print '
    '.$langs->trans("Status").''; + print $object->getLibStatut(4); + print '
    '.$langs->trans("ContactByDefaultFor").''; - print $formcompany->showRoles("roles", $object, 'edit', $object->roles); - print '
    '.$langs->trans("ContactByDefaultFor").''; + print $formcompany->showRoles("roles", $object, 'edit', $object->roles); + print '
    '.$langs->trans("ContactForOrders").''; - print $object->ref_commande ? $object->ref_commande : $langs->trans("NoContactForAnyOrder"); - print '
    '.$langs->trans("ContactForOrders").''; + print $object->ref_commande ? $object->ref_commande : $langs->trans("NoContactForAnyOrder"); + print '
    '.$langs->trans("ContactForProposals").''; - print $object->ref_propal ? $object->ref_propal : $langs->trans("NoContactForAnyProposal"); - print '
    '.$langs->trans("ContactForProposals").''; + print $object->ref_propal ? $object->ref_propal : $langs->trans("NoContactForAnyProposal"); + print '
    '.$langs->trans("ContactForContracts").''; - print $object->ref_contrat ? $object->ref_contrat : $langs->trans("NoContactForAnyContract"); - print '
    '.$langs->trans("ContactForContracts").''; + print $object->ref_contrat ? $object->ref_contrat : $langs->trans("NoContactForAnyContract"); + print '
    '.$langs->trans("ContactForInvoices").''; - print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); - print '
    '.$langs->trans("ContactForInvoices").''; + print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); + print '
    '.$langs->trans("DolibarrLogin").''; - if ($object->user_id) - { - $dolibarr_user = new User($db); - $result = $dolibarr_user->fetch($object->user_id); - print $dolibarr_user->getLoginUrl(1); - } - else print $langs->trans("NoDolibarrAccess"); - print '
    '.$langs->trans("DolibarrLogin").''; + if ($object->user_id) + { + $dolibarr_user = new User($db); + $result = $dolibarr_user->fetch($object->user_id); + print $dolibarr_user->getLoginUrl(1); + } else print $langs->trans("NoDolibarrAccess"); + print '
    '.$langs->trans("PhotoFile").''; - if ($object->photo) { - print $form->showphoto('contact', $object); - print "
    \n"; - } - print ''; - if ($object->photo) print ''; - //print ''; - print ''; - print '
    '.$langs->trans("Delete").'

    '.$langs->trans("PhotoFile").'
    '; + // Photo + print '
    '.$langs->trans("PhotoFile").''; + if ($object->photo) { + print $form->showphoto('contact', $object); + print "
    \n"; + } + print ''; + if ($object->photo) print ''; + //print ''; + print ''; + print '
    '.$langs->trans("Delete").'

    '.$langs->trans("PhotoFile").'
    '; - print '
    '; + print ''; - dol_fiche_end(); + dol_fiche_end(); - print '
    '; - print ''; - print '     '; - print ''; - print '
    '; + print '
    '; + print ''; + print '     '; + print ''; + print '
    '; - print "
    "; - } - } + print ""; + } + } // Select mail models is same action as presend if (GETPOST('modelselected', 'alpha')) { @@ -1287,110 +1258,153 @@ else { $objsoc = new Societe($db); - // View mode + // View mode - // Show errors - dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); + // Show errors + dol_htmloutput_errors(is_numeric($error) ? '' : $error, $errors); - dol_fiche_head($head, 'card', $title, -1, 'contact'); + dol_fiche_head($head, 'card', $title, -1, 'contact'); - if ($action == 'create_user') - { - // Full firstname and lastname separated with a dot : firstname.lastname - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - $login = dol_buildlogin($object->lastname, $object->firstname); + if ($action == 'create_user') + { + // Full firstname and lastname separated with a dot : firstname.lastname + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + $login = dol_buildlogin($object->lastname, $object->firstname); - $generated_password = ''; - if (!$ldap_sid) // TODO ldap_sid ? - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $generated_password = getRandomPassword(false); - } - $password = $generated_password; + $generated_password = ''; + if (!$ldap_sid) // TODO ldap_sid ? + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + $generated_password = getRandomPassword(false); + } + $password = $generated_password; - // Create a form array - $formquestion = array( - array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), - array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password), - //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External'))) - ); - $text = $langs->trans("ConfirmCreateContact").'
    '; - if (!empty($conf->societe->enabled)) - { - if ($object->socid > 0) $text .= $langs->trans("UserWillBeExternalUser"); - else $text .= $langs->trans("UserWillBeInternalUser"); - } - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CreateDolibarrLogin"), $text, "confirm_create_user", $formquestion, 'yes'); - } + // Create a form array + $formquestion = array( + array('label' => $langs->trans("LoginToCreate"), 'type' => 'text', 'name' => 'login', 'value' => $login), + array('label' => $langs->trans("Password"), 'type' => 'text', 'name' => 'password', 'value' => $password), + //array('label' => $form->textwithpicto($langs->trans("Type"),$langs->trans("InternalExternalDesc")), 'type' => 'select', 'name' => 'intern', 'default' => 1, 'values' => array(0=>$langs->trans('Internal'),1=>$langs->trans('External'))) + ); + $text = $langs->trans("ConfirmCreateContact").'
    '; + if (!empty($conf->societe->enabled)) + { + if ($object->socid > 0) $text .= $langs->trans("UserWillBeExternalUser"); + else $text .= $langs->trans("UserWillBeInternalUser"); + } + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("CreateDolibarrLogin"), $text, "confirm_create_user", $formquestion, 'yes'); + } - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; - $morehtmlref = '
    '; - if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) - { - $objsoc->fetch($object->socid); - // Thirdparty - $morehtmlref .= $langs->trans('ThirdParty').' : '; - if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1, 'contact'); - else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); - } - $morehtmlref .= '
    '; + $morehtmlref = '
    '; + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) + { + $objsoc->fetch($object->socid); + // Thirdparty + $morehtmlref .= $langs->trans('ThirdParty').' : '; + if ($objsoc->id > 0) $morehtmlref .= $objsoc->getNomUrl(1, 'contact'); + else $morehtmlref .= $langs->trans("ContactNotLinkedToCompany"); + } + $morehtmlref .= '
    '; - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref); - print '
    '; - print '
    '; + print '
    '; + print '
    '; - print '
    '; - print ''; + print '
    '; + print '
    '; - // Civility - print ''; + // Civility + print ''; - // Job / position - print ''; + // Job / position + print ''; - // Email - if (!empty($conf->mailing->enabled)) - { - $langs->load("mails"); - print ''; - print ''; - } + // Email + if (!empty($conf->mailing->enabled)) + { + $langs->load("mails"); + print ''; + print ''; + } - // Unsubscribe opt-out - if (!empty($conf->mailing->enabled)) - { - //print 'eee'.$object->email; - $noemail = $object->no_email; - if (empty($noemail) && !empty($object->email)) - { - $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; - //print $sql; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $noemail = $obj->nb; - } - } - print ''; - } + // Unsubscribe opt-out + if (!empty($conf->mailing->enabled)) + { + //print 'eee'.$object->email; + $noemail = $object->no_email; + if (empty($noemail) && !empty($object->email)) + { + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."mailing_unsubscribe WHERE entity IN (".getEntity('mailing').") AND email = '".$db->escape($object->email)."'"; + //print $sql; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $noemail = $obj->nb; + } + } + print ''; + } - print ''; + print ''; - print '
    '.$langs->trans("UserTitle").''; - print $object->getCivilityLabel(); - print '
    '.$langs->trans("UserTitle").''; + print $object->getCivilityLabel(); + print '
    '.$langs->trans("PostOrFunction").''.$object->poste.'
    '.$langs->trans("PostOrFunction").''.$object->poste.'
    '.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
    '.$langs->trans("NbOfEMailingsSend").''.$object->getNbOfEMailings().'
    '.$langs->trans("No_Email").''.yn($noemail).'
    '.$langs->trans("No_Email").''.yn($noemail).'
    '.$langs->trans("ContactVisibility").''; - print $object->LibPubPriv($object->priv); - print '
    '.$langs->trans("ContactVisibility").''; + print $object->LibPubPriv($object->priv); + print '
    '; + print ''; + print '
    '; - print '
    '; - print '
    '; + $object->fetch_thirdparty(); - print '
    '; - print ''; + if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { + if ($object->thirdparty->client == 2 || $object->thirdparty->client == 3) + { + print '
    '; + + print '
    '; + print '
    '; + + // Level of prospect + print '"; + print ''; + + // Status of prospection + $object->loadCacheOfProspStatus(); + print ''; + + print "
    '; + print ''; + print '
    '; + print $langs->trans('ProspectLevel'); + print ''; + if ($action != 'editlevel' && $user->rights->societe->contact->creer) print 'id.'">'.img_edit($langs->trans('Modify'), 1).'
    '; + print '
    '; + if ($action == 'editlevel') { + $formcompany->formProspectContactLevel($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_prospectlevel, 'prospect_contact_level_id', 1); + } else { + print $object->getLibProspLevel(); + } + print "
    '.$langs->trans("StatusProsp").''.$object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']); + print '     '; + print '
    '; + foreach ($object->cacheprospectstatus as $key => $val) { + $titlealt = 'default'; + if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label']; + if ($object->stcomm_id != $val['id']) print ''.img_action($titlealt, $val['code'], $val['picto']).''; + } + print '
    "; + print '
    '; + } + } + + print '
    '; + + print '
    '; + print ''; // Categories if (!empty($conf->categorie->enabled) && !empty($user->rights->categorie->lire)) { @@ -1400,80 +1414,78 @@ else print ''; } - if (!empty($object->socid)) { - print ''; - print ''; - } + if (!empty($object->socid)) { + print ''; + print ''; + } - // Other attributes - $cols = 3; - $parameters = array('socid'=>$socid); - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + $cols = 3; + $parameters = array('socid'=>$socid); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - $object->load_ref_elements(); + $object->load_ref_elements(); - if (!empty($conf->propal->enabled)) - { - print ''; - } + if (!empty($conf->propal->enabled)) + { + print ''; + } - if (!empty($conf->commande->enabled) || !empty($conf->expedition->enabled)) - { - print ''; - } + if (!empty($conf->commande->enabled) || !empty($conf->expedition->enabled)) + { + print ''; + } - if (!empty($conf->contrat->enabled)) - { - print ''; - } + if (!empty($conf->contrat->enabled)) + { + print ''; + } - if (!empty($conf->facture->enabled)) - { - print ''; - } + if (!empty($conf->facture->enabled)) + { + print ''; + } - print ''; + print ''; - print ''; + print ''; - print "
    '.$langs->trans("ContactByDefaultFor").''; - print $formcompany->showRoles("roles", $object, 'view'); - print '
    '.$langs->trans("ContactByDefaultFor").''; + print $formcompany->showRoles("roles", $object, 'view'); + print '
    '.$langs->trans("ContactForProposals").''; - print $object->ref_propal ? $object->ref_propal : $langs->trans("NoContactForAnyProposal"); - print '
    '.$langs->trans("ContactForProposals").''; + print $object->ref_propal ? $object->ref_propal : $langs->trans("NoContactForAnyProposal"); + print '
    '; - if (!empty($conf->expedition->enabled)) { print $langs->trans("ContactForOrdersOrShipments"); } - else print $langs->trans("ContactForOrders"); - print ''; - $none = $langs->trans("NoContactForAnyOrder"); - if (!empty($conf->expedition->enabled)) { $none = $langs->trans("NoContactForAnyOrderOrShipments"); } - print $object->ref_commande ? $object->ref_commande : $none; - print '
    '; + if (!empty($conf->expedition->enabled)) { print $langs->trans("ContactForOrdersOrShipments"); } else print $langs->trans("ContactForOrders"); + print ''; + $none = $langs->trans("NoContactForAnyOrder"); + if (!empty($conf->expedition->enabled)) { $none = $langs->trans("NoContactForAnyOrderOrShipments"); } + print $object->ref_commande ? $object->ref_commande : $none; + print '
    '.$langs->trans("ContactForContracts").''; - print $object->ref_contrat ? $object->ref_contrat : $langs->trans("NoContactForAnyContract"); - print '
    '.$langs->trans("ContactForContracts").''; + print $object->ref_contrat ? $object->ref_contrat : $langs->trans("NoContactForAnyContract"); + print '
    '.$langs->trans("ContactForInvoices").''; - print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); - print '
    '.$langs->trans("ContactForInvoices").''; + print $object->ref_facturation ? $object->ref_facturation : $langs->trans("NoContactForAnyInvoice"); + print '
    '.$langs->trans("DolibarrLogin").''; - if ($object->user_id) - { - $dolibarr_user = new User($db); - $result = $dolibarr_user->fetch($object->user_id); - print $dolibarr_user->getLoginUrl(1); - } - else print $langs->trans("NoDolibarrAccess"); - print '
    '.$langs->trans("DolibarrLogin").''; + if ($object->user_id) + { + $dolibarr_user = new User($db); + $result = $dolibarr_user->fetch($object->user_id); + print $dolibarr_user->getLoginUrl(1); + } else print $langs->trans("NoDolibarrAccess"); + print '
    '; - print $langs->trans("VCard").''; + print '
    '; + print $langs->trans("VCard").''; print ''; print img_picto($langs->trans("Download"), 'vcard.png', 'class="paddingrightonly"'); print $langs->trans("Download"); print ''; - print '
    "; + print ""; - print '
    '; - print '
    '; + print '
    '; + print '
    '; - dol_fiche_end(); + dol_fiche_end(); - // Barre d'actions - print '
    '; + // Barre d'actions + print '
    '; $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook @@ -1484,52 +1496,73 @@ else { $langs->load("mails"); print ''; - } - else - { + } else { $langs->load("mails"); print ''; } } if ($user->rights->societe->contact->creer) - { - print ''.$langs->trans('Modify').''; - } + { + print ''.$langs->trans('Modify').''; + } - if (!$object->user_id && $user->rights->user->user->creer) - { - print ''.$langs->trans("CreateDolibarrLogin").''; - } + if (!$object->user_id && $user->rights->user->user->creer) + { + print ''.$langs->trans("CreateDolibarrLogin").''; + } - // Activer - if ($object->statut == 0 && $user->rights->societe->contact->creer) - { - print ''.$langs->trans("Reactivate").''; - } - // Desactiver - if ($object->statut == 1 && $user->rights->societe->contact->creer) - { - print ''.$langs->trans("DisableUser").''; - } + // Activer + if ($object->statut == 0 && $user->rights->societe->contact->creer) + { + print ''.$langs->trans("Reactivate").''; + } + // Desactiver + if ($object->statut == 1 && $user->rights->societe->contact->creer) + { + print ''.$langs->trans("DisableUser").''; + } - // Delete - if ($user->rights->societe->contact->supprimer) - { - print ''.$langs->trans('Delete').''; - } - } + // Delete + if ($user->rights->societe->contact->supprimer) + { + print ''.$langs->trans('Delete').''; + } + } - print "
    "; + print "
    "; - // Presend form - $modelmail = 'contact'; - $defaulttopic = 'Information'; - $diroutput = $conf->contact->dir_output; - $trackid = 'con'.$object->id; + //Select mail models is same action as presend + if (GETPOST('modelselected')) { + $action = 'presend'; + } - include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; - } + if ($action != 'presend') + { + print '
    '; + + print '
    '; + + $MAXEVENT = 10; + + $morehtmlright = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-list-alt imgforviewmode', DOL_URL_ROOT.'/contact/agenda.php?id='.$object->id); + + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'contact', $object->socid, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for thirdparty + + print '
    '; + } + + // Presend form + $modelmail = 'contact'; + $defaulttopic = 'Information'; + $diroutput = $conf->contact->dir_output; + $trackid = 'con'.$object->id; + + include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php'; + } } diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 4a95c4000de..8ea6ebea0d4 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -10,6 +10,7 @@ * Copyright (C) 2013 Juanjo Menent * Copyright (C) 2015 Marcos García * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2020 Open-Dsi * * 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 @@ -59,6 +60,29 @@ class Contact extends CommonObject */ public $picto = 'contact'; + /** + * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" + * 'label' the translation key. + * 'enabled' is a condition when the field must be managed. + * 'position' is the sort order of field. + * 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0). + * '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, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). 5=Visible on list and view only (not create/not update). Using a negative value means field is not shown by default on list but can be selected for viewing) + * 'noteditable' says if field is not editable (1 or 0) + * 'default' is a default value for creation (can still be overwrote by the Setup of Default Values if field is editable in creation form). Note: If default is set to '(PROV)' and field is 'ref', the default value will be set to '(PROVid)' where id is rowid when a new record is created. + * '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_...). + * '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). + * 'css' is the CSS style to use on field. For example: 'maxwidth200' + * 'help' is a string visible as a tooltip on field + * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record + * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. + * 'arraykeyval' to set list of value if type is a list of predefined values. For example: array("0"=>"Draft","1"=>"Active","-1"=>"Cancel") + * 'comment' is not used. You can store here any text of your choice. It is not used by application. + * + * Note: To have value dynamic, you can set value to 0 in definition and edit the value on the fly into the constructor. + */ // BEGIN MODULEBUILDER PROPERTIES /** @@ -68,36 +92,38 @@ class Contact extends CommonObject 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>15), 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20), - 'fk_soc' =>array('type'=>'integer', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'position'=>25), - 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>30, 'index'=>1), - 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35), - 'civility' =>array('type'=>'varchar(6)', 'label'=>'Civility', 'enabled'=>1, 'visible'=>-1, 'position'=>40), - 'lastname' =>array('type'=>'varchar(50)', 'label'=>'Lastname', 'enabled'=>1, 'visible'=>-1, 'position'=>45, 'showoncombobox'=>1), - 'firstname' =>array('type'=>'varchar(50)', 'label'=>'Firstname', 'enabled'=>1, 'visible'=>-1, 'position'=>50, 'showoncombobox'=>1), + 'fk_soc' =>array('type'=>'integer', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>1, 'position'=>25, 'searchall'=>1), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>3, 'notnull'=>1, 'position'=>30, 'index'=>1), + 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>3, 'position'=>35), + 'civility' =>array('type'=>'varchar(6)', 'label'=>'Civility', 'enabled'=>1, 'visible'=>3, 'position'=>40), + 'lastname' =>array('type'=>'varchar(50)', 'label'=>'Lastname', 'enabled'=>1, 'visible'=>1, 'position'=>45, 'showoncombobox'=>1, 'searchall'=>1), + 'firstname' =>array('type'=>'varchar(50)', 'label'=>'Firstname', 'enabled'=>1, 'visible'=>1, 'position'=>50, 'showoncombobox'=>1, 'searchall'=>1), 'address' =>array('type'=>'varchar(255)', 'label'=>'Address', 'enabled'=>1, 'visible'=>-1, 'position'=>55), - 'zip' =>array('type'=>'varchar(25)', 'label'=>'Zip', 'enabled'=>1, 'visible'=>-1, 'position'=>60), - 'town' =>array('type'=>'text', 'label'=>'Town', 'enabled'=>1, 'visible'=>-1, 'position'=>65), - 'fk_departement' =>array('type'=>'integer', 'label'=>'Fk departement', 'enabled'=>1, 'visible'=>-1, 'position'=>70), - 'fk_pays' =>array('type'=>'integer', 'label'=>'Fk pays', 'enabled'=>1, 'visible'=>-1, 'position'=>75), - 'birthday' =>array('type'=>'date', 'label'=>'Birthday', 'enabled'=>1, 'visible'=>-1, 'position'=>80), + 'zip' =>array('type'=>'varchar(25)', 'label'=>'Zip', 'enabled'=>1, 'visible'=>1, 'position'=>60), + 'town' =>array('type'=>'text', 'label'=>'Town', 'enabled'=>1, 'visible'=>1, 'position'=>65), + 'fk_departement' =>array('type'=>'integer', 'label'=>'Fk departement', 'enabled'=>1, 'visible'=>3, 'position'=>70), + 'fk_pays' =>array('type'=>'integer', 'label'=>'Fk pays', 'enabled'=>1, 'visible'=>3, 'position'=>75), + 'birthday' =>array('type'=>'date', 'label'=>'Birthday', 'enabled'=>1, 'visible'=>3, 'position'=>80), 'poste' =>array('type'=>'varchar(80)', 'label'=>'PostOrFunction', 'enabled'=>1, 'visible'=>-1, 'position'=>85), - 'phone' =>array('type'=>'varchar(30)', 'label'=>'Phone', 'enabled'=>1, 'visible'=>-1, 'position'=>90), - 'phone_perso' =>array('type'=>'varchar(30)', 'label'=>'Phone perso', 'enabled'=>1, 'visible'=>-1, 'position'=>95), - 'phone_mobile' =>array('type'=>'varchar(30)', 'label'=>'Phone mobile', 'enabled'=>1, 'visible'=>-1, 'position'=>100), - 'fax' =>array('type'=>'varchar(30)', 'label'=>'Fax', 'enabled'=>1, 'visible'=>-1, 'position'=>105), - 'email' =>array('type'=>'varchar(255)', 'label'=>'Email', 'enabled'=>1, 'visible'=>-1, 'position'=>110), - 'socialnetworks' =>array('type'=>'text', 'label'=>'SocialNetworks', 'enabled'=>1, 'visible'=>-1, 'position'=>115), - 'photo' =>array('type'=>'varchar(255)', 'label'=>'Photo', 'enabled'=>1, 'visible'=>-1, 'position'=>170), - 'priv' =>array('type'=>'smallint(6)', 'label'=>'Private', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>175), - 'no_email' =>array('type'=>'smallint(6)', 'label'=>'No email', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>180), - 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>185), - 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-1, 'position'=>190), - 'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>195), - 'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>200), - 'default_lang' =>array('type'=>'varchar(6)', 'label'=>'Default lang', 'enabled'=>1, 'visible'=>-1, 'position'=>205), - 'canvas' =>array('type'=>'varchar(32)', 'label'=>'Canvas', 'enabled'=>1, 'visible'=>-1, 'position'=>210), - 'statut' =>array('type'=>'tinyint(4)', 'label'=>'Statut', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500), - 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000), + 'phone' =>array('type'=>'varchar(30)', 'label'=>'Phone', 'enabled'=>1, 'visible'=>1, 'position'=>90, 'searchall'=>1), + 'phone_perso' =>array('type'=>'varchar(30)', 'label'=>'PhonePerso', 'enabled'=>1, 'visible'=>1, 'position'=>95, 'searchall'=>1), + 'phone_mobile' =>array('type'=>'varchar(30)', 'label'=>'PhoneMobile', 'enabled'=>1, 'visible'=>1, 'position'=>100, 'searchall'=>1), + 'fax' =>array('type'=>'varchar(30)', 'label'=>'Fax', 'enabled'=>1, 'visible'=>1, 'position'=>105, 'searchall'=>1), + 'email' =>array('type'=>'varchar(255)', 'label'=>'Email', 'enabled'=>1, 'visible'=>1, 'position'=>110, 'searchall'=>1), + 'socialnetworks' =>array('type'=>'text', 'label'=>'SocialNetworks', 'enabled'=>1, 'visible'=>3, 'position'=>115), + 'photo' =>array('type'=>'varchar(255)', 'label'=>'Photo', 'enabled'=>1, 'visible'=>3, 'position'=>170), + 'priv' =>array('type'=>'smallint(6)', 'label'=>'ContactVisibility', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>175), + 'fk_stcommcontact' =>array('type'=>'integer', 'label'=>'Fk stcommcontact', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>220), + 'fk_prospectlevel' =>array('type'=>'varchar(12)', 'label'=>'ProspectLevel', 'enabled'=>1, 'visible'=>-1, 'position'=>255), + 'no_email' =>array('type'=>'smallint(6)', 'label'=>'No_Email', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>180), + 'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>3, 'position'=>185), + 'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>3, 'position'=>190), + 'note_private' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>3, 'position'=>195, 'searchall'=>1), + 'note_public' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>3, 'position'=>200, 'searchall'=>1), + 'default_lang' =>array('type'=>'varchar(6)', 'label'=>'Default lang', 'enabled'=>1, 'visible'=>3, 'position'=>205), + 'canvas' =>array('type'=>'varchar(32)', 'label'=>'Canvas', 'enabled'=>1, 'visible'=>3, 'position'=>210), + 'statut' =>array('type'=>'tinyint(4)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-1, 'position'=>1000), ); public $civility_id; // In fact we store civility_code @@ -209,6 +235,11 @@ class Contact extends CommonObject public $roles = array(); + public $cacheprospectstatus = array(); + public $fk_prospectlevel; + public $stcomm_id; + public $statut_commercial; + public $stcomm_picto; /** * Constructor @@ -220,12 +251,22 @@ class Contact extends CommonObject global $conf, $langs; $this->db = $db; - - if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0; - if (empty($conf->mailing->enabled)) $this->fields['no_email']['enabled'] = 0; - if (!empty($conf->global->SOCIETE_DISABLE_CONTACTS)) $this->fields['thirdparty']['enabled'] = 0; $this->statut = 1; // By default, status is enabled + if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID)) $this->fields['rowid']['visible'] = 0; + if (empty($conf->mailing->enabled)) $this->fields['no_email']['enabled'] = 0; + + // typical ['s.nom'] is used for third-parties + if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { + $this->fields['fk_soc']['enabled'] = 0; + $this->fields['fk_soc']['searchall'] = 0; + } + + if (empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { // Default behaviour + $this->field['fk_stcommcontact']['enabled'] = 0; + $this->field['fk_prospectcontactlevel']['enabled'] = 0; + } + // Unset fields that are disabled foreach ($this->fields as $key => $val) { @@ -287,9 +328,7 @@ class Contact extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->lasterror(); return -1; @@ -330,6 +369,7 @@ class Contact extends CommonObject $sql .= ", firstname"; $sql .= ", fk_user_creat"; $sql .= ", priv"; + $sql.= ", fk_stcommcontact"; $sql .= ", statut"; $sql .= ", canvas"; $sql .= ", entity"; @@ -343,6 +383,7 @@ class Contact extends CommonObject $sql .= "'".$this->db->escape($this->firstname)."',"; $sql .= " ".($user->id > 0 ? "'".$this->db->escape($user->id)."'" : "null").","; $sql .= " ".$this->db->escape($this->priv).","; + $sql.= " 0,"; $sql .= " ".$this->db->escape($this->statut).","; $sql .= " ".(!empty($this->canvas) ? "'".$this->db->escape($this->canvas)."'" : "null").","; $sql .= " ".$this->db->escape($this->entity).","; @@ -388,16 +429,12 @@ class Contact extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); @@ -471,6 +508,11 @@ class Contact extends CommonObject $sql .= ", phone_perso = ".(isset($this->phone_perso) ? "'".$this->db->escape($this->phone_perso)."'" : "null"); $sql .= ", phone_mobile = ".(isset($this->phone_mobile) ? "'".$this->db->escape($this->phone_mobile)."'" : "null"); $sql .= ", priv = '".$this->db->escape($this->priv)."'"; + $sql .= ", fk_prospectcontactlevel = '".$this->db->escape($this->fk_prospectlevel)."'"; + if (isset($this->stcomm_id)) + { + $sql .= ", fk_stcommcontact = ".($this->stcomm_id > 0 || $this->stcomm_id == -1 ? $this->stcomm_id : "0"); + } $sql .= ", statut = ".$this->db->escape($this->statut); $sql .= ", fk_user_modif=".($user->id > 0 ? "'".$this->db->escape($user->id)."'" : "NULL"); $sql .= ", default_lang=".($this->default_lang ? "'".$this->db->escape($this->default_lang)."'" : "NULL"); @@ -596,16 +638,12 @@ class Contact extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { dol_syslog(get_class($this)."::update Error ".$this->error, LOG_ERR); $this->db->rollback(); return -$error; } - } - else - { + } else { $this->error = $this->db->lasterror().' sql='.$sql; $this->db->rollback(); return -1; @@ -761,14 +799,10 @@ class Contact extends CommonObject $error++; $this->error = $this->db->lasterror(); } - } - else - { + } else { $result = true; } - } - else - { + } else { $sql = "DELETE FROM ".MAIN_DB_PREFIX."user_alert "; $sql .= "WHERE type=1 AND fk_contact=".$this->db->escape($id)." AND fk_user=".$user->id; $result = $this->db->query($sql); @@ -791,9 +825,7 @@ class Contact extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { dol_syslog(get_class($this)."::update Error ".$this->error, LOG_ERR); $this->db->rollback(); return -$error; @@ -834,6 +866,7 @@ class Contact extends CommonObject $sql .= " c.socialnetworks,"; $sql .= " c.photo,"; $sql .= " c.priv, c.note_private, c.note_public, c.default_lang, c.canvas,"; + $sql.= " c.fk_prospectcontactlevel, c.fk_stcommcontact, st.libelle as stcomm, st.picto as stcomm_picto,"; $sql .= " c.import_key,"; $sql .= " c.datec as date_creation, c.tms as date_modification,"; $sql .= " co.label as country, co.code as country_code,"; @@ -845,9 +878,9 @@ class Contact extends CommonObject $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as d ON c.fk_departement = d.rowid"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON c.rowid = u.fk_socpeople"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON c.fk_soc = s.rowid"; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_stcommcontact as st ON c.fk_stcommcontact = st.id'; if ($id) $sql .= " WHERE c.rowid = ".$id; - else - { + else { $sql .= " WHERE c.entity IN (".getEntity($this->element).")"; if ($ref_ext) { $sql .= " AND c.ref_ext = '".$this->db->escape($ref_ext)."'"; @@ -867,8 +900,7 @@ class Contact extends CommonObject dol_syslog($this->error, LOG_ERR); return 2; - } - elseif ($num) // $num = 1 + } elseif ($num) // $num = 1 { $obj = $this->db->fetch_object($resql); @@ -902,6 +934,14 @@ class Contact extends CommonObject $this->poste = $obj->poste; $this->statut = $obj->statut; + $this->fk_prospectlevel = $obj->fk_prospectcontactlevel; + + $transcode=$langs->trans('StatusProspect'.$obj->fk_stcommcontact); + $libelle=($transcode!='StatusProspect'.$obj->fk_stcommcontact?$transcode:$obj->stcomm); + $this->stcomm_id = $obj->fk_stcommcontact; // id statut commercial + $this->statut_commercial = $libelle; // libelle statut commercial + $this->stcomm_picto = $obj->stcomm_picto; // Picto statut commercial + $this->phone_pro = trim($obj->phone); $this->fax = trim($obj->fax); $this->phone_perso = trim($obj->phone_perso); @@ -942,9 +982,7 @@ class Contact extends CommonObject $this->user_id = $uobj->rowid; } $this->db->free($resql); - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -970,9 +1008,7 @@ class Contact extends CommonObject $this->birthday_alert = 1; } $this->db->free($resql); - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -987,15 +1023,11 @@ class Contact extends CommonObject } return 1; - } - else - { + } else { $this->error = $langs->trans("RecordNotFound"); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1016,8 +1048,7 @@ class Contact extends CommonObject if (in_array($this->civility_id, array('MR')) || in_array($this->civility_code, array('MR'))) { $this->gender = 'man'; - } - elseif (in_array($this->civility_id, array('MME', 'MLE')) || in_array($this->civility_code, array('MME', 'MLE'))) + } elseif (in_array($this->civility_id, array('MME', 'MLE')) || in_array($this->civility_code, array('MME', 'MLE'))) { $this->gender = 'woman'; } @@ -1061,9 +1092,7 @@ class Contact extends CommonObject } $this->db->free($resql); return 0; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -1115,9 +1144,7 @@ class Contact extends CommonObject $i++; } - } - else - { + } else { $error++; $this->error = $this->db->error().' sql='.$sql; } @@ -1183,9 +1210,7 @@ class Contact extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog("Error ".$this->error, LOG_ERR); return -1; @@ -1232,9 +1257,7 @@ class Contact extends CommonObject } $this->db->free($resql); - } - else - { + } else { print $this->db->error(); } } @@ -1259,9 +1282,7 @@ class Contact extends CommonObject $this->db->free($resql); return $nb; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1292,7 +1313,7 @@ class Contact extends CommonObject $label .= '
    '; } - $label .= ''.$langs->trans("Contact").''; + $label .= img_picto('', $this->picto).' '.$langs->trans("Contact").''; $label .= '
    '.$langs->trans("Name").': '.$this->getFullName($langs); //if ($this->civility_id) $label.= '
    ' . $langs->trans("Civility") . ': '.$this->civility_id; // TODO Translate cibilty_id code if (!empty($this->poste)) $label .= '
    '.$langs->trans("Poste").': '.$this->poste; @@ -1522,9 +1543,7 @@ class Contact extends CommonObject { $this->db->rollback(); return -$error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -1659,7 +1678,7 @@ class Contact extends CommonObject $sql .= ", ".MAIN_DB_PREFIX."societe_contacts sc"; $sql .= " WHERE sc.fk_soc =".$this->socid; $sql .= " AND sc.fk_c_type_contact=tc.rowid"; - $sql .= " AND tc.element='".$element."'"; + $sql .= " AND tc.element='".$this->db->escape($element)."'"; $sql .= " AND tc.active=1"; dol_syslog(__METHOD__, LOG_DEBUG); @@ -1677,9 +1696,7 @@ class Contact extends CommonObject } return $tab; - } - else - { + } else { $this->error = $this->db->error(); dol_print_error($this->db); return -1; @@ -1742,4 +1759,137 @@ class Contact extends CommonObject return $error * -1; } } + + /** + * Load array of prospect status + * + * @param int $active 1=Active only, 0=Not active only, -1=All + * @return int <0 if KO, >0 if OK + */ + public function loadCacheOfProspStatus($active = 1) + { + global $langs; + + $sql = "SELECT id, code, libelle as label, picto FROM " . MAIN_DB_PREFIX . "c_stcommcontact"; + if ($active >= 0) $sql .= " WHERE active = " . $active; + $resql = $this->db->query($sql); + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $this->cacheprospectstatus[$obj->id] = array('id' => $obj->id, 'code' => $obj->code, 'label' => ($langs->trans("ST_" . strtoupper($obj->code)) == "ST_" . strtoupper($obj->code)) ? $obj->label : $langs->trans("ST_" . strtoupper($obj->code)), 'picto' => $obj->picto); + $i++; + } + return 1; + } + + /** + * Return prostect level + * + * @return string Libelle + */ + public function getLibProspLevel() + { + return $this->libProspLevel($this->fk_prospectlevel); + } + + /** + * Return label of prospect level + * + * @param int $fk_prospectlevel Prospect level + * @return string label of level + */ + public function libProspLevel($fk_prospectlevel) + { + global $langs; + + $lib = $langs->trans("ProspectLevel" . $fk_prospectlevel); + // If lib not found in language file, we get label from cache/databse + if ($lib == $langs->trans("ProspectLevel" . $fk_prospectlevel)) + { + $lib = $langs->getLabelFromKey($this->db, $fk_prospectlevel, 'c_prospectlevel', 'code', 'label'); + } + return $lib; + } + + + /** + * Set prospect level + * + * @param User $user Utilisateur qui definie la remise + * @return int <0 if KO, >0 if OK + * @deprecated Use update function instead + */ + public function setProspectLevel(User $user) + { + return $this->update($this->id, $user); + } + + /** + * Return status of prospect + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long + * @param string $label Label to use for status for added status + * @return string Libelle + */ + public function getLibProspCommStatut($mode = 0, $label = '') + { + return $this->libProspCommStatut($this->stcomm_id, $mode, $label, $this->stcomm_picto); + } + + /** + * Return label of a given status + * + * @param int|string $statut Id or code for prospection status + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @param string $label Label to use for status for added status + * @param string $picto Name of image file to show ('filenew', ...) + * If no extension provided, we use '.png'. Image must be stored into theme/xxx/img directory. + * Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img + * Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img + * Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1) + * @return string Libelle du statut + */ + public function libProspCommStatut($statut, $mode = 0, $label = '', $picto = '') + { + global $langs; + $langs->load('customers'); + + if ($mode == 2) + { + if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto) . ' ' . $langs->trans("StatusProspect-1"); + elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto) . ' ' . $langs->trans("StatusProspect0"); + elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1"); + elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2"); + elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3"); + else { + return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label); + } + } + if ($mode == 3) + { + if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto); + elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto); + elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto); + elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto); + elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto); + else { + return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto); + } + } + if ($mode == 4) + { + if ($statut == '-1' || $statut == 'ST_NO') return img_action($langs->trans("StatusProspect-1"), -1, $picto) . ' ' . $langs->trans("StatusProspect-1"); + elseif ($statut == '0' || $statut == 'ST_NEVER') return img_action($langs->trans("StatusProspect0"), 0, $picto) . ' ' . $langs->trans("StatusProspect0"); + elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1"); + elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2"); + elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3"); + else { + return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label); + } + } + + return "Error, mode/status not found"; + } } diff --git a/htdocs/contact/consumption.php b/htdocs/contact/consumption.php index ad4b5ca08f5..7655e00ea3f 100644 --- a/htdocs/contact/consumption.php +++ b/htdocs/contact/consumption.php @@ -178,8 +178,7 @@ if ($type_element == 'fichinter') $where = ' WHERE f.entity IN ('.getEntity('ficheinter').')'; $dateprint = 'f.datec'; $doc_number = 'f.ref'; -} -elseif ($type_element == 'invoice') +} elseif ($type_element == 'invoice') { // Customer : show products from invoices require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $documentstatic = new Facture($db); @@ -193,8 +192,7 @@ elseif ($type_element == 'invoice') $dateprint = 'f.datef'; $doc_number = 'f.ref'; $thirdTypeSelect = 'customer'; -} -elseif ($type_element == 'propal') +} elseif ($type_element == 'propal') { require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $documentstatic = new Propal($db); @@ -208,8 +206,7 @@ elseif ($type_element == 'propal') $datePrint = 'c.datep'; $doc_number = 'c.ref'; $thirdTypeSelect = 'customer'; -} -elseif ($type_element == 'order') +} elseif ($type_element == 'order') { require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $documentstatic = new Commande($db); @@ -223,8 +220,7 @@ elseif ($type_element == 'order') $dateprint = 'c.date_commande'; $doc_number = 'c.ref'; $thirdTypeSelect = 'customer'; -} -elseif ($type_element == 'supplier_invoice') +} elseif ($type_element == 'supplier_invoice') { // Supplier : Show products from invoices. require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $documentstatic = new FactureFournisseur($db); @@ -266,8 +262,7 @@ elseif ($type_element == 'supplier_order') $dateprint = 'c.date_valid'; $doc_number = 'c.ref'; $thirdTypeSelect = 'supplier'; -} -elseif ($type_element == 'contract') +} elseif ($type_element == 'contract') { // Order require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $documentstatic = new Contrat($db); @@ -423,9 +418,7 @@ if ($sql_select) if ($type_element == 'contract') { print $documentstaticline->getLibStatut(2); - } - else - { + } else { print $documentstatic->getLibStatut(2); } print ''; @@ -467,9 +460,7 @@ if ($sql_select) } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label; - } - else - { + } else { $label = $objp->product_label; } @@ -501,29 +492,23 @@ if ($sql_select) $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0)); - } - elseif ($objp->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) + } elseif ($objp->description == '(EXCESS PAID)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0)); - } - elseif ($objp->description == '(DEPOSIT)' && $objp->fk_remise_except > 0) + } elseif ($objp->description == '(DEPOSIT)' && $objp->fk_remise_except > 0) { $discount = new DiscountAbsolute($db); $discount->fetch($objp->fk_remise_except); echo ($txt ? ' - ' : '').$langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0)); // Add date of deposit if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')'; - } - else - { + } else { echo ($txt ? ' - ' : '').dol_htmlentitiesbr($objp->description); } } - } - else - { + } else { if ($objp->fk_product > 0) { echo $form->textwithtooltip($text, $description, 3, '', '', $i, 0, ''); diff --git a/htdocs/contact/document.php b/htdocs/contact/document.php index e21ee3e492b..f8498ddae9a 100644 --- a/htdocs/contact/document.php +++ b/htdocs/contact/document.php @@ -52,7 +52,7 @@ if (!empty($canvas)) // Security check if ($user->socid) $socid = $user->socid; -$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', $objcanvas); // If we create a contact with no company (shared contacts), no check on write permission +$result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php index 842d03cb3a6..f601086ad05 100644 --- a/htdocs/contact/ldap.php +++ b/htdocs/contact/ldap.php @@ -67,9 +67,7 @@ if ($action == 'dolibarr2ldap') { setEventMessages($langs->trans("ContactSynchronized"), null, 'mesgs'); $db->commit(); - } - else - { + } else { setEventMessages($ldap->error, $ldap->errors, 'errors'); $db->rollback(); } @@ -106,9 +104,7 @@ if ($object->socid > 0) $thirdparty->fetch($object->socid); print ''.$langs->trans("ThirdParty").''.$thirdparty->getNomUrl(1).''; -} -else -{ +} else { print ''.$langs->trans("ThirdParty").''; print $langs->trans("ContactNotLinkedToCompany"); print ''; @@ -183,22 +179,16 @@ if ($result > 0) if (!is_array($records)) { print ''.$langs->trans("ErrorFailedToReadLDAP").''; - } - else - { + } else { $result = show_ldap_content($records, 0, $records['count'], true); } - } - else - { + } else { print ''.$langs->trans("LDAPRecordNotFound").' (dn='.$dn.' - search='.$search.')'; } $ldap->unbind(); $ldap->close(); -} -else -{ +} else { setEventMessages($ldap->error, $ldap->errors, 'errors'); } diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php index 843a894a0fd..4d30977bf6a 100644 --- a/htdocs/contact/list.php +++ b/htdocs/contact/list.php @@ -11,6 +11,7 @@ * Copyright (C) 2018 Juanjo Menent * Copyright (C) 2019 Frédéric France * Copyright (C) 2019 Josep Lluís Amador + * Copyright (C) 2020 Open-Dsi * * 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 @@ -43,7 +44,7 @@ $langs->loadLangs(array("companies", "suppliers", "categories")); $socialnetworks = getArrayOfSocialNetworks(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -61,7 +62,7 @@ $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', $search_cti = preg_replace('/^0+/', '', preg_replace('/[^0-9]/', '', GETPOST('search_cti', 'alphanohtml'))); // Phone number without any special chars $search_phone = GETPOST("search_phone", 'alpha'); -$search_id = trim(GETPOST("search_id", "int")); +$search_id = GETPOST("search_id", "int"); $search_firstlast_only = GETPOST("search_firstlast_only", 'alpha'); $search_lastname = GETPOST("search_lastname", 'alpha'); $search_firstname = GETPOST("search_firstname", 'alpha'); @@ -76,7 +77,7 @@ $search_no_email = GETPOST("search_no_email", 'int'); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { - $search_{$key} = GETPOST("search_".$key, 'alpha'); + $search_[$key] = GETPOST("search_".$key, 'alpha'); } } } @@ -91,6 +92,8 @@ $search_town = GETPOST('search_town', 'alpha'); $search_import_key = GETPOST("search_import_key", "alpha"); $search_country = GETPOST("search_country", 'intcomma'); $search_roles = GETPOST("search_roles", 'array'); +$search_level = GETPOST("search_level", "array"); +$search_stcomm = GETPOST('search_stcomm', 'int'); if ($search_status == '') $search_status = 1; // always display active customer first @@ -101,8 +104,8 @@ $type = GETPOST("type", 'aZ'); $view = GETPOST("view", 'alpha'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $userid = GETPOST('userid', 'int'); $begin = GETPOST('begin'); @@ -123,14 +126,12 @@ if ($type == "c") if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactcustomerlist'; $titre .= ' ('.$langs->trans("ThirdPartyCustomers").')'; $urlfiche = "card.php"; -} -elseif ($type == "f") +} elseif ($type == "f") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactsupplierlist'; $titre .= ' ('.$langs->trans("ThirdPartySuppliers").')'; $urlfiche = "card.php"; -} -elseif ($type == "o") +} elseif ($type == "o") { if (empty($contextpage) || $contextpage == 'contactlist') $contextpage = 'contactotherlist'; $titre .= ' ('.$langs->trans("OthersNotLinkedToThirdParty").')'; @@ -148,41 +149,47 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" -$fieldstosearchall = array( - 'p.lastname'=>'Lastname', - 'p.firstname'=>'Firstname', - 'p.email'=>'EMail', - 's.nom'=>"ThirdParty", - 'p.phone'=>"Phone", - 'p.phone_perso'=>"PhonePerso", - 'p.phone_mobile'=>"PhoneMobile", - 'p.fax'=>"Fax", - 'p.note_public'=>"NotePublic", - 'p.note_private'=>"NotePrivate", -); +$fieldstosearchall = array(); +foreach ($object->fields as $key => $val) +{ + // don't allow search in private notes for external users when doing "search in all" + if (!empty($user->socid) && $key == "note_private") { + continue; + } + + if (empty($val['searchall'])) { + continue; + } + + $fieldstosearchall['p.'.$key] = $val['label']; +} + +// Add none object fields for "search in all" +if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { + $fieldstosearchall['s.nom'] = "ThirdParty"; +} // Definition of fields for list -$arrayfields = array( - 'p.rowid'=>array('label'=>"TechnicalID", 'position'=>1, 'checked'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'enabled'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0)), - 'p.lastname'=>array('label'=>"Lastname", 'position'=>2, 'checked'=>1), - 'p.firstname'=>array('label'=>"Firstname", 'position'=>3, 'checked'=>1), - 'p.poste'=>array('label'=>"PostOrFunction", 'position'=>10, 'checked'=>1), - 'p.town'=>array('label'=>"Town", 'position'=>20, 'checked'=>0), - 'p.zip'=>array('label'=>"Zip", 'position'=>21, 'checked'=>0), - 'country.code_iso'=>array('label'=>"Country", 'position'=>22, 'checked'=>0), - 'p.phone'=>array('label'=>"Phone", 'position'=>30, 'checked'=>1), - 'p.phone_perso'=>array('label'=>"PhonePerso", 'position'=>31, 'checked'=>0), - 'p.phone_mobile'=>array('label'=>"PhoneMobile", 'position'=>32, 'checked'=>1), - 'p.fax'=>array('label'=>"Fax", 'position'=>33, 'checked'=>0), - 'p.email'=>array('label'=>"EMail", 'position'=>40, 'checked'=>1), - 'p.no_email'=>array('label'=>"No_Email", 'position'=>41, 'checked'=>0, 'enabled'=>(!empty($conf->mailing->enabled))), - 'p.thirdparty'=>array('label'=>"ThirdParty", 'position'=>50, 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)), - 'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200), - 'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500), - 'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), - 'p.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), - 'p.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100), -); +$arrayfields = array(); +foreach ($object->fields as $key => $val) { + // If $val['visible']==0, then we never show the field + if (empty($val['visible'])) { + continue; + } + + $arrayfields['p.'.$key] = array( + 'label'=>$val['label'], + 'checked'=>(($val['visible'] < 0) ? 0 : 1), + 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), + 'position'=>$val['position']); +} + +// Add none object fields to fields for list +$arrayfields['country.code_iso'] = array('label'=>"Country", 'position'=>22, 'checked'=>0); +if (empty($conf->global->SOCIETE_DISABLE_CONTACTS)) { + $arrayfields['s.nom'] = array('label'=>"ThirdParty", 'position'=>25, 'checked'=>1); +} + if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { @@ -194,6 +201,7 @@ if (!empty($conf->socialnetworks->enabled)) { } } } + // Extra fields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) { @@ -259,11 +267,13 @@ if (empty($reshook)) if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { if ($value['active']) { - $search_{$key} = ""; + $search_[$key] = ""; } } } $search_priv = ""; + $search_stcomm = ''; + $search_level = ''; $search_status = -1; $search_categ = ''; $search_categ_thirdparty = ''; @@ -281,6 +291,17 @@ if (empty($reshook)) $permissiontodelete = $user->rights->societe->supprimer; $uploaddir = $conf->societe->dir_output; include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + + if ($action == 'setstcomm') + { + $object = new Contact($db); + $result = $object->fetch(GETPOST('stcommcontactid')); + $object->stcomm_id = dol_getIdFromCode($db, GETPOST('stcomm', 'alpha'), 'c_stcommcontact'); + $result = $object->update($object->id, $user); + if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); + + $action = ''; + } } if ($search_priv < 0) $search_priv = ''; @@ -295,12 +316,36 @@ $formother = new FormOther($db); $formcompany = new FormCompany($db); $contactstatic = new Contact($db); +if (!empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { + $contactstatic->loadCacheOfProspStatus(); +} + $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("Contacts") : $langs->trans("ContactsAddresses")); +// Select every potentiels, and note each potentiels which fit in search parameters +$tab_level = array(); +$sql = "SELECT code, label, sortorder"; +$sql .= " FROM ".MAIN_DB_PREFIX."c_prospectcontactlevel"; +$sql .= " WHERE active > 0"; +$sql .= " ORDER BY sortorder"; +$resql = $db->query($sql); +if ($resql) +{ + while ($obj = $db->fetch_object($resql)) + { + // Compute level text + $level = $langs->trans($obj->code); + if ($level == $obj->code) $level = $langs->trans($obj->label); + $tab_level[$obj->code] = $level; + } +} +else dol_print_error($db); + $sql = "SELECT s.rowid as socid, s.nom as name,"; $sql .= " p.rowid, p.lastname as lastname, p.statut, p.firstname, p.zip, p.town, p.poste, p.email, p.no_email,"; $sql .= " p.socialnetworks, p.photo,"; $sql .= " p.phone as phone_pro, p.phone_mobile, p.phone_perso, p.fax, p.fk_pays, p.priv, p.datec as date_creation, p.tms as date_update,"; +$sql .= " st.libelle as stcomm, st.picto as stcomm_picto, p.fk_stcommcontact as stcomm_id, p.fk_prospectcontactlevel,"; $sql .= " co.label as country, co.code as country_code"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { @@ -314,6 +359,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as p"; if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (p.rowid = ef.fk_object)"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = p.fk_pays"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = p.fk_soc"; +$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_stcommcontact as st ON st.id = p.fk_stcommcontact"; if (!empty($search_categ)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_contact as cc ON p.rowid = cc.fk_socpeople"; // We need this table joined to the select in order to filter by categ if (!empty($search_categ_thirdparty)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_societe as cs ON s.rowid = cs.fk_soc"; // We need this table joined to the select in order to filter by categ if (!empty($search_categ_supplier)) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX."categorie_fournisseur as cs2 ON s.rowid = cs2.fk_soc"; // We need this table joined to the select in order to filter by categ @@ -327,14 +373,14 @@ if (!empty($userid)) // propre au commercial { $sql .= " AND p.fk_user_creat=".$db->escape($userid); } +if ($search_level) $sql .= natural_search("p.fk_prospectcontactlevel", join(',', $search_level), 3); +if ($search_stcomm != '' && $search_stcomm != -2) $sql .= natural_search("p.fk_stcommcontact", $search_stcomm, 2); // Filter to exclude not owned private contacts if ($search_priv != '0' && $search_priv != '1') { $sql .= " AND (p.priv='0' OR (p.priv='1' AND p.fk_user_creat=".$user->id."))"; -} -else -{ +} else { if ($search_priv == '0') $sql .= " AND p.priv='0'"; if ($search_priv == '1') $sql .= " AND (p.priv='1' AND p.fk_user_creat=".$user->id.")"; } @@ -351,10 +397,10 @@ if (strlen($search_phone)) $sql .= natural_search(array('p.phone', 'p.p if (strlen($search_cti)) $sql .= natural_search(array('p.phone', 'p.phone_perso', 'p.phone_mobile'), $search_cti); if (strlen($search_firstlast_only)) $sql .= natural_search(array('p.lastname', 'p.firstname'), $search_firstlast_only); -if ($search_id > 0) $sql .= natural_search("p.rowid", $search_id, 1); +if ($search_id > 0) $sql .= natural_search('p.rowid', $search_id, 1); if ($search_lastname) $sql .= natural_search('p.lastname', $search_lastname); if ($search_firstname) $sql .= natural_search('p.firstname', $search_firstname); -if ($search_societe) $sql .= natural_search('s.nom', $search_societe); +if ($search_societe) $sql .= natural_search(empty($conf->global->SOCIETE_DISABLE_CONTACTS) ? 's.nom' : 'p.fk_soc', $search_societe); if ($search_country) $sql .= " AND p.fk_pays IN (".$search_country.')'; if (strlen($search_poste)) $sql .= natural_search('p.poste', $search_poste); if (strlen($search_phone_perso)) $sql .= natural_search('p.phone_perso', $search_phone_perso); @@ -363,8 +409,8 @@ if (strlen($search_phone_mobile)) $sql .= natural_search('p.phone_mobile', $se if (strlen($search_fax)) $sql .= natural_search('p.fax', $search_fax); if (!empty($conf->socialnetworks->enabled)) { foreach ($socialnetworks as $key => $value) { - if ($value['active'] && strlen($search_{$key})) { - $sql .= ' AND p.socialnetworks LIKE \'%"'.$key.'":"'.$search_{$key}.'%\''; + if ($value['active'] && strlen($search_[$key])) { + $sql .= ' AND p.socialnetworks LIKE \'%"'.$key.'":"'.$search_[$key].'%\''; } } } @@ -381,16 +427,13 @@ if ($search_import_key) $sql .= natural_search("p.import_key", $sear if ($type == "o") // filtre sur type { $sql .= " AND p.fk_soc IS NULL"; -} -elseif ($type == "f") // filtre sur type +} elseif ($type == "f") // filtre sur type { $sql .= " AND s.fournisseur = 1"; -} -elseif ($type == "c") // filtre sur type +} elseif ($type == "c") // filtre sur type { $sql .= " AND s.client IN (1, 3)"; -} -elseif ($type == "p") // filtre sur type +} elseif ($type == "p") // filtre sur type { $sql .= " AND s.client IN (2, 3)"; } @@ -408,9 +451,7 @@ $sql .= $hookmanager->resPrint; if ($view == "recent") { $sql .= $db->order("p.datec", "DESC"); -} -else -{ +} else { $sql .= $db->order($sortfield, $sortorder); } @@ -430,7 +471,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); -if (! $resql) +if (!$resql) { dol_print_error($db); exit; @@ -476,8 +517,14 @@ if ($search_email != '') $param .= '&search_email='.urlencode($search_email) if ($search_no_email != '') $param .= '&search_no_email='.urlencode($search_no_email); if ($search_status != '') $param .= '&search_status='.urlencode($search_status); if ($search_priv == '0' || $search_priv == '1') $param .= "&search_priv=".urlencode($search_priv); +if ($search_stcomm != '') $param .= '&search_stcomm='.urlencode($search_stcomm); +if (is_array($search_level) && count($search_level)) { + foreach ($search_level as $slevel) { + $param .= '&search_level[]='.urlencode($slevel); + } +} if ($search_import_key != '') $param .= '&search_import_key='.urlencode($search_import_key); -if ($optioncss != '') $param .= '&optioncss='.$optioncss; +if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); if (count($search_roles) > 0) $param .= implode('&search_roles[]=', $search_roles); // Add $param from extra fields @@ -493,11 +540,7 @@ if ($user->rights->societe->supprimer) $arrayofmassactions['predelete'] = 'selectMassAction('', $arrayofmassactions); -$newcardbutton = ''; -if ($user->rights->societe->contact->creer) -{ - $newcardbutton .= dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create'); -} +$newcardbutton = dolGetButtonTitle($langs->trans('NewContactAddress'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?action=create', '', $user->rights->societe->contact->creer); print '
    '; if ($optioncss != '') print ''; @@ -528,7 +571,7 @@ if ($search_firstlast_only) } $moreforfilter = ''; -if (!empty($conf->categorie->enabled)) +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire) { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; @@ -551,21 +594,20 @@ if (!empty($conf->categorie->enabled)) $moreforfilter .= $formother->select_categories(Categorie::TYPE_SUPPLIER, $search_categ_supplier, 'search_categ_supplier', 1); $moreforfilter .= '
    '; } - $moreforfilter .= '
    '; - $moreforfilter .= $langs->trans('Roles').': '; - $moreforfilter .= $formcompany->showRoles("search_roles", $objecttmp, 'edit', $search_roles); - $moreforfilter .= '
    '; -} -if ($moreforfilter) -{ - print '
    '; - print $moreforfilter; - $parameters = array('type'=>$type); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print '
    '; } +$moreforfilter .= '
    '; +$moreforfilter .= $langs->trans('Roles').': '; +$moreforfilter .= $formcompany->showRoles("search_roles", $objecttmp, 'edit', $search_roles); +$moreforfilter .= '
    '; + +print '
    '; +print $moreforfilter; +$parameters = array('type'=>$type); +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +print '
    '; + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); @@ -674,13 +716,13 @@ if (!empty($conf->socialnetworks->enabled)) { if (!empty($arrayfields['p.'.$key]['checked'])) { print ''; - print ''; + print ''; print ''; } } } } -if (!empty($arrayfields['p.thirdparty']['checked'])) +if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) { print ''; print ''; @@ -689,9 +731,28 @@ if (!empty($arrayfields['p.thirdparty']['checked'])) if (!empty($arrayfields['p.priv']['checked'])) { print ''; - $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); - print $form->selectarray('search_priv', $selectarray, $search_priv, 1); - print ''; + $selectarray = array('0'=>$langs->trans("ContactPublic"), '1'=>$langs->trans("ContactPrivate")); + print $form->selectarray('search_priv', $selectarray, $search_priv, 1); + print ''; +} +// Prospect level +if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) +{ + print ''; + print $form->multiselectarray('search_level', $tab_level, $search_level, 0, 0, 'width75', 0, 0, '', '', '', 2); + print ''; +} +// Prospect status +if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) +{ + print ''; + $arraystcomm = array(); + foreach ($contactstatic->cacheprospectstatus as $key => $val) + { + $arraystcomm[$val['id']] = ($langs->trans("StatusProspect".$val['id']) != "StatusProspect".$val['id'] ? $langs->trans("StatusProspect".$val['id']) : $val['label']); + } + print $form->selectarray('search_stcomm', $arraystcomm, $search_stcomm, -2, 0, 0, '', 0, 0, 0, '', 'nowrap '); + print ''; } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; @@ -744,7 +805,7 @@ if (!empty($arrayfields['p.town']['checked'])) print_liste_field_ //if (! empty($arrayfields['state.nom']['checked'])) print_liste_field_titre($arrayfields['state.nom']['label'],$_SERVER["PHP_SELF"],"state.nom","",$param,'',$sortfield,$sortorder); //if (! empty($arrayfields['region.nom']['checked'])) print_liste_field_titre($arrayfields['region.nom']['label'],$_SERVER["PHP_SELF"],"region.nom","",$param,'',$sortfield,$sortorder); if (!empty($arrayfields['country.code_iso']['checked'])) { - print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "co.code_iso", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['p.phone']['checked'])) print_liste_field_titre($arrayfields['p.phone']['label'], $_SERVER["PHP_SELF"], "p.phone", $begin, $param, '', $sortfield, $sortorder); if (!empty($arrayfields['p.phone_perso']['checked'])) print_liste_field_titre($arrayfields['p.phone_perso']['label'], $_SERVER["PHP_SELF"], "p.phone_perso", $begin, $param, '', $sortfield, $sortorder); @@ -759,30 +820,33 @@ if (!empty($conf->socialnetworks->enabled)) { } } } -if (!empty($arrayfields['p.thirdparty']['checked'])) print_liste_field_titre($arrayfields['p.thirdparty']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder); -if (!empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['p.fk_soc']['checked'])) print_liste_field_titre($arrayfields['p.fk_soc']['label'], $_SERVER["PHP_SELF"], "p.fk_soc", $begin, $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", $begin, $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.priv']['checked'])) print_liste_field_titre($arrayfields['p.priv']['label'], $_SERVER["PHP_SELF"], "p.priv", $begin, $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) print_liste_field_titre($arrayfields['p.fk_prospectcontactlevel']['label'], $_SERVER["PHP_SELF"], "p.fk_prospectcontactlevel", "", $param, '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) print_liste_field_titre($arrayfields['p.fk_stcommcontact']['label'], $_SERVER["PHP_SELF"], "p.fk_stcommcontact", "", $param, '', $sortfield, $sortorder, 'center '); // 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, + '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['p.datec']['checked'])) { - print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); } if (!empty($arrayfields['p.tms']['checked'])) { - print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); } if (!empty($arrayfields['p.statut']['checked'])) { - print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['p.statut']['label'], $_SERVER["PHP_SELF"], "p.statut", "", $param, '', $sortfield, $sortorder, 'center '); } if (!empty($arrayfields['p.import_key']['checked'])) { - print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre($arrayfields['p.import_key']['label'], $_SERVER["PHP_SELF"], "p.import_key", "", $param, '', $sortfield, $sortorder, 'center '); } print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; @@ -811,6 +875,8 @@ while ($i < min($num, $limit)) $contactstatic->country_code = $obj->country_code; $contactstatic->photo = $obj->photo; + $contactstatic->fk_prospectlevel = $obj->fk_prospectcontactlevel; + print ''; // ID @@ -918,18 +984,16 @@ while ($i < min($num, $limit)) } } } - // Company - if (!empty($arrayfields['p.thirdparty']['checked'])) + // Company + if (!empty($arrayfields['p.fk_soc']['checked']) || !empty($arrayfields['s.nom']['checked'])) { print ''; if ($obj->socid) { - $objsoc = new Societe($db); - $objsoc->fetch($obj->socid); - print $objsoc->getNomUrl(1); - } - else - print ' '; + $objsoc = new Societe($db); + $objsoc->fetch($obj->socid); + print $objsoc->getNomUrl(1); + } else print ' '; print ''; if (!$i) $totalarray['nbfield']++; } @@ -941,6 +1005,30 @@ while ($i < min($num, $limit)) if (!$i) $totalarray['nbfield']++; } + if (!empty($arrayfields['p.fk_prospectcontactlevel']['checked'])) + { + // Prospect level + print ''; + print $contactstatic->getLibProspLevel(); + print ""; + if (!$i) $totalarray['nbfield']++; + } + + if (!empty($arrayfields['p.fk_stcommcontact']['checked'])) + { + // Prospect status + print '
    '; + print '
    '.$contactstatic->libProspCommStatut($obj->stcomm_id, 2, $contactstatic->cacheprospectstatus[$obj->stcomm_id]['label'], $obj->stcomm_picto); + print '
    -
    '; + foreach ($contactstatic->cacheprospectstatus as $key => $val) { + $titlealt = 'default'; + if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label']; + if ($obj->stcomm_id != $val['id']) print ''.img_action($titlealt, $val['code'], $val['picto']).''; + } + print '
    '; + if (!$i) $totalarray['nbfield']++; + } + // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; // Fields from hook diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 5a6ea3eb032..1710b4dda6a 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contact.lib.php'; $langs->loadLangs(array('companies', 'other')); $id = GETPOST('id', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; @@ -85,21 +85,15 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact- if (!dol_move_uploaded_file($_FILES['photo']['tmp_name'], $newfile, 1, 0, $_FILES['photo']['error']) > 0) { setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); - } - else - { + } else { // Create thumbs $object->addThumbs($newfile); } } - } - else - { + } else { setEventMessages("ErrorBadImageFormat", null, 'errors'); } - } - else - { + } else { switch ($_FILES['photo']['error']) { case 1: //uploaded file exceeds the upload_max_filesize directive in php.ini @@ -111,9 +105,7 @@ if ($action == 'update' && !$_POST["cancel"] && $user->rights->societe->contact- break; } } - } - else - { + } else { $error = $object->error; } } @@ -183,9 +175,7 @@ if ($action == 'edit') $objsoc->fetch($object->socid); print ''.$langs->trans("ThirdParty").''.$objsoc->getNomUrl(1).''; - } - else - { + } else { print ''.$langs->trans("ThirdParty").''; print $langs->trans("ContactNotLinkedToCompany"); print ''; @@ -198,7 +188,7 @@ if ($action == 'edit') print ''; // Date To Birth - print ''.$langs->trans("DateToBirth").''; + print ''.$langs->trans("DateOfBirth").''; $form = new Form($db); print $form->selectDate($object->birthday, 'birthday', 0, 0, 1, "perso", 1, 0); print ''; @@ -207,9 +197,7 @@ if ($action == 'edit') if (!empty($object->birthday_alert)) { print ''; - } - else - { + } else { print ''; } print ''; @@ -225,9 +213,7 @@ if ($action == 'edit') print ''; print "
    "; -} -else -{ +} else { // View mode dol_fiche_head($head, 'perso', $title, -1, 'contact'); @@ -286,7 +272,7 @@ else { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - print ''.$langs->trans("DateToBirth").''.dol_print_date($object->birthday, "day"); + print ''.$langs->trans("DateOfBirth").''.dol_print_date($object->birthday, "day"); print '   '; //var_dump($birthdatearray); @@ -301,10 +287,8 @@ else if ($object->birthday_alert) print $langs->trans("BirthdayAlertOn"); else print $langs->trans("BirthdayAlertOff"); print ''; - } - else - { - print ''.$langs->trans("DateToBirth").''; + } else { + print ''.$langs->trans("DateOfBirth").''; } print ""; diff --git a/htdocs/contact/vcard.php b/htdocs/contact/vcard.php index 75362491424..ee325317033 100644 --- a/htdocs/contact/vcard.php +++ b/htdocs/contact/vcard.php @@ -102,8 +102,7 @@ if ($company->id) $v->setEmail($company->email, 'INTERNET'); } // when e-mail of contact and company complete different use company e-mail at first (and contact e-mail at second) - else - { + else { $v->setEmail($company->email); // support by Microsoft Outlook (2019 and possible earlier) diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index 031a1b7498d..5343ab8f349 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -42,7 +42,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'contrat'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index 3e068f5650b..bd0c7b132d0 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -42,7 +42,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'contratdet'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 0055b0ba428..d016cb23d75 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -39,9 +39,7 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); diff --git a/htdocs/contrat/card.php b/htdocs/contrat/card.php index 96fcc7f899a..b6e77e69dca 100644 --- a/htdocs/contrat/card.php +++ b/htdocs/contrat/card.php @@ -50,7 +50,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; // Load translation files required by the page $langs->loadLangs(array("contracts", "orders", "companies", "bills", "products", 'compta')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int'); $id = GETPOST('id', 'int'); @@ -112,13 +112,10 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) + } elseif ($action == 'confirm_closeline' && $confirm == 'yes' && $user->rights->contrat->activer) { if (!GETPOST('dateend')) { @@ -132,9 +129,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -302,14 +297,11 @@ if (empty($reshook)) } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $lines[$i]->product_label; - } - else - { + } else { $label = $lines[$i]->product_label; } $desc = ($lines[$i]->desc && $lines[$i]->desc != $lines[$i]->libelle) ?dol_htmlentitiesbr($lines[$i]->desc) : ''; - } - else { + } else { $desc = dol_htmlentitiesbr($lines[$i]->desc); } @@ -354,9 +346,7 @@ if (empty($reshook)) } } } - } - else - { + } else { setEventMessages($srcobject->error, $srcobject->errors, 'errors'); $error++; } @@ -367,30 +357,23 @@ if (empty($reshook)) // modified by hook if ($reshook < 0) $error++; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } - else - { + } else { $result = $object->create($user); if ($result > 0) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); } $action = 'create'; } } - } - - elseif ($action == 'classin' && $user->rights->contrat->creer) + } elseif ($action == 'classin' && $user->rights->contrat->creer) { $object->setProject(GETPOST('projectid')); } @@ -407,9 +390,7 @@ if (empty($reshook)) { $idprod = 0; $tva_tx = (GETPOST('tva_tx', 'alpha') ? GETPOST('tva_tx', 'alpha') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $tva_tx = ''; } @@ -480,8 +461,7 @@ if (empty($reshook)) $pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level]; $price_min = $prod->multiprices_min[$object->thirdparty->price_level]; $price_base_type = $prod->multiprices_base_type[$object->thirdparty->price_level]; - } - elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; @@ -513,9 +493,7 @@ if (empty($reshook)) if ($price_base_type != 'HT') { $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); - } - else - { + } else { $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); } } @@ -525,9 +503,7 @@ if (empty($reshook)) else $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); $fk_unit = $prod->fk_unit; - } - else - { + } else { $pu_ht = GETPOST('price_ht'); $price_base_type = 'HT'; $tva_tx = GETPOST('tva_tx') ?str_replace('*', '', GETPOST('tva_tx')) : 0; // tva_tx field may be disabled, so we use vat rate 0 @@ -543,8 +519,7 @@ if (empty($reshook)) $fk_fournprice = $_POST['fournprice']; if (!empty($_POST['buying_price'])) $pa_ht = $_POST['buying_price']; - else - $pa_ht = null; + else $pa_ht = null; $info_bits = 0; if ($tva_npr) $info_bits |= 0x01; @@ -554,9 +529,7 @@ if (empty($reshook)) { $object->error = $langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, -1, $conf->currency)); $result = -1; - } - else - { + } else { // Insert line $result = $object->addline( $desc, @@ -595,7 +568,7 @@ if (empty($reshook)) $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } unset($_POST['prod_entry_mode']); @@ -629,15 +602,11 @@ if (empty($reshook)) unset($_POST['date_endday']); unset($_POST['date_endmonth']); unset($_POST['date_endyear']); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } - } - - elseif ($action == 'updateline' && $user->rights->contrat->creer && !GETPOST('cancel', 'alpha')) { + } elseif ($action == 'updateline' && $user->rights->contrat->creer && !GETPOST('cancel', 'alpha')) { $error = 0; if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update) @@ -692,12 +661,12 @@ if (empty($reshook)) $fk_fournprice = $_POST['fournprice']; if (!empty($_POST['buying_price'])) $pa_ht = $_POST['buying_price']; - else - $pa_ht = null; + else $pa_ht = null; $fk_unit = GETPOST('unit', 'alpha'); - $objectline->description = GETPOST('product_desc', 'none'); + $objectline->fk_product = GETPOST('idprod', 'int'); + $objectline->description = GETPOST('product_desc', 'restricthtml'); $objectline->price_ht = GETPOST('elprice'); $objectline->subprice = GETPOST('elprice'); $objectline->qty = GETPOST('elqty'); @@ -744,14 +713,10 @@ if (empty($reshook)) if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) + } elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->deleteline(GETPOST('lineid'), $user); @@ -759,14 +724,10 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) + } elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->contrat->creer) { $result = $object->validate($user); @@ -783,19 +744,15 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'reopen' && $user->rights->contrat->creer) + } elseif ($action == 'reopen' && $user->rights->contrat->creer) { $result = $object->reopen($user); if ($result < 0) @@ -822,23 +779,17 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->contrat->supprimer) { $result = $object->delete($user); if ($result >= 0) { header("Location: list.php?restore_lastsearch_values=1"); return; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) + } elseif ($action == 'confirm_move' && $confirm == 'yes' && $user->rights->contrat->creer) { if (GETPOST('newcid') > 0) { @@ -850,23 +801,18 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); return; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("RefNewContract")), null, 'errors'); } - } - elseif ($action == 'update_extras') + } elseif ($action == 'update_extras') { $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) { @@ -881,8 +827,7 @@ if (empty($reshook)) if ($error) { $action = 'edit_extras'; } - } - elseif ($action == 'setref_supplier') + } elseif ($action == 'setref_supplier') { $cancelbutton = GETPOST('cancel', 'alpha'); if (!$cancelbutton) { @@ -896,13 +841,11 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } - elseif ($action == 'setref_customer') + } elseif ($action == 'setref_customer') { $cancelbutton = GETPOST('cancel', 'alpha'); @@ -918,13 +861,11 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } - elseif ($action == 'setref') + } elseif ($action == 'setref') { $cancelbutton = GETPOST('cancel', 'alpha'); @@ -958,13 +899,11 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } - } - elseif ($action == 'setdate_contrat') + } elseif ($action == 'setdate_contrat') { $cancelbutton = GETPOST('cancel', 'alpha'); @@ -982,8 +921,7 @@ if (empty($reshook)) header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; } - } - else { + } else { header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; } @@ -1014,16 +952,12 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1044,8 +978,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1057,9 +990,7 @@ if (empty($reshook)) if (!GETPOST('socid', 3)) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { + } else { if ($object->id > 0) { $result = $object->createFromClone($user, $socid); if ($result > 0) { @@ -1119,9 +1050,7 @@ if ($action == 'create') if ($element == 'project') { $projectid = GETPOST('originid'); - } - else - { + } else { // For compatibility if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; } if ($element == 'propal') { $element = 'comm/propal'; $subelement = 'propal'; } @@ -1148,8 +1077,7 @@ if ($action == 'create') // Object source contacts list $srccontactslist = $objectsrc->liste_contact(-1, 'external', 1); } - } - else { + } else { $projectid = GETPOST('projectid', 'int'); $note_private = GETPOST("note_private"); $note_public = GETPOST("note_public"); @@ -1195,9 +1123,7 @@ if ($action == 'create') print $soc->getNomUrl(1); print ''; print ''; - } - else - { + } else { print ''; print $form->select_company('', 'socid', '', 'SelectThirdParty', 1, 0, null, 0, 'minwidth300'); print ' '; @@ -1291,9 +1217,7 @@ if ($action == 'create') } print "\n"; -} -else -/* *************************************************************************** */ +} else /* *************************************************************************** */ /* */ /* Mode vue et edition */ /* */ @@ -1513,8 +1437,6 @@ else $usemargins = 0; if (!empty($conf->margin->enabled) && !empty($object->element) && in_array($object->element, array('facture', 'propal', 'commande'))) $usemargins = 1; - $var = false; - // Title line for service $cursorline = 1; print '
    '; @@ -1525,7 +1447,6 @@ else print ''; print ''; print ''; - print ''; print ''; // Area with common detail of line @@ -1567,7 +1488,9 @@ else // Line in view mode if ($action != 'editline' || GETPOST('rowid') != $objp->rowid) { - print ''; + $moreparam = ''; + if (! empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $objp->statut == ContratLigne::STATUS_CLOSED && $action != 'showclosedlines') $moreparam = 'style="display: none;"'; + print ''; // Label if ($objp->fk_product > 0) { @@ -1599,9 +1522,7 @@ else echo $form->textwithtooltip($text, $description, 3, '', '', $cursorline, 0, (!empty($line->fk_parent_line) ?img_picto('', 'rightarrow') : '')); print ''; - } - else - { + } else { print ''.img_object($langs->trans("ShowProductOrService"), ($objp->product_type ? 'service' : 'product')).' '.dol_htmlentitiesbr($objp->description)."\n"; } // VAT @@ -1622,9 +1543,7 @@ else if ($objp->remise_percent > 0) { print ''.$objp->remise_percent."%\n"; - } - else - { + } else { print ' '; } @@ -1648,7 +1567,7 @@ else } if ($user->rights->contrat->creer && ($object->statut >= 0)) { - print ''; + print ''; print img_delete(); print ''; } @@ -1667,7 +1586,7 @@ else $colspan = 7; } - print ''; + print ''; print ''; // Date planned @@ -1681,8 +1600,7 @@ else $textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days"); print " ".img_warning($textlate); } - } - else print $langs->trans("Unknown"); + } else print $langs->trans("Unknown"); print '  -  '; print $langs->trans("DateEndPlanned").': '; if ($objp->date_fin) @@ -1693,8 +1611,7 @@ else $textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days"); print " ".img_warning($textlate); } - } - else print $langs->trans("Unknown"); + } else print $langs->trans("Unknown"); print ''; print ''; @@ -1705,28 +1622,37 @@ else $line = new ContratLigne($db); $line->id = $objp->rowid; $line->fetch_optionals(); - print $line->showOptionals($extrafields, 'view', array('style'=>'class="oddeven"', 'colspan'=>$colspan), '', '', 1); + print $line->showOptionals($extrafields, 'view', array('class'=>'oddeven','style'=>$moreparam, 'colspan'=>$colspan), '', '', 1); } } // Line in mode update - else - { + else { // Ligne carac print ''; print ''; - if ($objp->fk_product) + if ($objp->fk_product > 0) { - $productstatic->id = $objp->fk_product; - $productstatic->type = $objp->ptype; - $productstatic->ref = $objp->pref; - $productstatic->entity = $objp->pentity; - print $productstatic->getNomUrl(1, '', 32); - print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; + $canchangeproduct = 1; + if (empty($canchangeproduct)) { + $productstatic->id = $objp->fk_product; + $productstatic->type = $objp->ptype; + $productstatic->ref = $objp->pref; + $productstatic->entity = $objp->pentity; + print $productstatic->getNomUrl(1, '', 32); + print $objp->label ? ' - '.dol_trunc($objp->label, 32) : ''; + print ''; + } else { + $senderissupplier = 0; + if (empty($senderissupplier)) { + print $form->select_produits((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod'); + } else { + print $form->select_produits_fournisseurs((!empty($object->lines[$cursorline - 1]->fk_product) ? $object->lines[$cursorline - 1]->fk_product : 0), 'idprod'); + } + } print '
    '; - } - else - { + } else { print $objp->label ? $objp->label.'
    ' : ''; + print ''; } // editeur wysiwyg @@ -1801,15 +1727,15 @@ else } $db->free($result); - } - else - { + } else { dol_print_error($db); } if ($object->statut > 0) { - print ''; + $moreparam = ''; + if (! empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $object->lines[$cursorline-1]->statut == ContratLigne::STATUS_CLOSED && $action != 'showclosedlines') $moreparam = 'style="display: none;"'; + print ''; print '
    '; print "\n"; } @@ -1873,9 +1799,7 @@ else if (empty($dateactend)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEndReal")), null, 'errors'); - } - else - { + } else { print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&ligne=".GETPOST('ligne', 'int')."&date=".$dateactstart."&dateend=".$dateactend."&comment=".urlencode($comment), $langs->trans("CloseService"), $langs->trans("ConfirmCloseService", dol_print_date($dateactend, "%A %d %B %Y")), "confirm_closeline", '', 0, 1); } print '
    '; @@ -1887,7 +1811,7 @@ else { print ''; - print ''; + print ''; print ''; print ''; print "\n"; - print ''; + print ''; print ''; print ''; - print ''; + print ''; print ''; } print "
    '.$langs->trans("ServiceStatus").': '.$object->lines[$cursorline - 1]->getLibStatut(4).''; if ($user->socid == 0) @@ -1914,7 +1838,7 @@ else print '
    '; // Si pas encore active @@ -1983,7 +1907,7 @@ else print '
    '.$langs->trans("Comment").''.$langs->trans("Comment").''; print '   '; print ''; @@ -2112,8 +2036,7 @@ else if ($object->statut == 1) { if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->commande->order_advance->send)) { print ''; - } else - print ''; + } else print ''; } } @@ -2147,9 +2070,7 @@ else if ($user->rights->contrat->activer) { print ''; - } - else - { + } else { print ''; } } @@ -2158,9 +2079,7 @@ else if ($user->rights->contrat->desactiver) { print ''; - } - else - { + } else { print ''; } @@ -2173,18 +2092,24 @@ else //} } - // Clone - if ($user->rights->contrat->creer) { - print ''; - } + if (! empty($conf->global->CONTRACT_HIDE_CLOSED_SERVICES_BY_DEFAULT) && $object->nbofservicesclosed > 0) + { + if ($action == 'showclosedlines') print ''; + else print ''; + } - // Delete + // Clone + if ($user->rights->contrat->creer) { + print ''; + } + + // On peut supprimer entite si + // - Droit de creer + mode brouillon (erreur creation) + // - Droit de supprimer if (($user->rights->contrat->creer && $object->statut == $object::STATUS_DRAFT) || $user->rights->contrat->supprimer) { - print ''; - } - else - { + print ''; + } else { print ''; } } @@ -2211,7 +2136,7 @@ else $delallowed = $user->rights->contrat->creer; - print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); + print $formfile->showdocuments('contract', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', 0, '', $soc->default_lang); // Show links to link elements diff --git a/htdocs/contrat/class/api_contracts.class.php b/htdocs/contrat/class/api_contracts.class.php index a35d3c871de..671ac1177f6 100644 --- a/htdocs/contrat/class/api_contracts.class.php +++ b/htdocs/contrat/class/api_contracts.class.php @@ -141,7 +141,7 @@ class Contracts extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { @@ -149,29 +149,28 @@ class Contracts extends DolibarrApi } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } dol_syslog("API Rest request"); - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; while ($i < $min) { - $obj = $db->fetch_object($result); - $contrat_static = new Contrat($db); + $obj = $this->db->fetch_object($result); + $contrat_static = new Contrat($this->db); if ($contrat_static->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($contrat_static); } $i++; } - } - else { - throw new RestException(503, 'Error when retrieve contrat list : '.$db->lasterror()); + } else { + throw new RestException(503, 'Error when retrieve contrat list : '.$this->db->lasterror()); } if (!count($obj_ret)) { throw new RestException(404, 'No contract found'); @@ -464,9 +463,7 @@ class Contracts extends DolibarrApi $updateRes = $this->contract->deleteline($lineid, DolibarrApiAccess::$user); if ($updateRes > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(405, $this->contract->error); } } @@ -501,9 +498,7 @@ class Contracts extends DolibarrApi if ($this->contract->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $this->contract->error); } } diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 58be7fdcb45..e179bd50797 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -298,16 +298,12 @@ class Contrat extends CommonObject if ($numref != "") { return $numref; - } - else - { + } else { $this->error = $obj->error; dol_print_error($db, get_class($this)."::getNextValue ".$obj->error); return ""; } - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Contract")); return ""; @@ -410,9 +406,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -467,9 +461,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -508,20 +500,17 @@ class Contrat extends CommonObject if ($force_number) { $num = $force_number; - } - elseif (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life + } elseif (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); if ($num) { - $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET ref = '".$num."', statut = 1"; + $sql = "UPDATE ".MAIN_DB_PREFIX."contrat SET ref = '".$this->db->escape($num)."', statut = 1"; //$sql.= ", fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; $sql .= " WHERE rowid = ".$this->id." AND statut = 0"; @@ -591,9 +580,7 @@ class Contrat extends CommonObject $this->brouillon = 0; $this->date_validation = $now; } - } - else - { + } else { $error++; } @@ -601,9 +588,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -666,9 +651,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -720,8 +703,7 @@ class Contrat extends CommonObject $this->error = 'Fetch found several records.'; dol_syslog($this->error, LOG_ERR); $result = -2; - } - elseif ($num) // $num = 1 + } elseif ($num) // $num = 1 { $obj = $this->db->fetch_object($resql); if ($obj) @@ -744,6 +726,7 @@ class Contrat extends CommonObject $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; + $this->model_pdf = $obj->model_pdf; $this->modelpdf = $obj->model_pdf; $this->fk_projet = $obj->fk_project; // deprecated @@ -770,16 +753,12 @@ class Contrat extends CommonObject return $this->id; } - } - else - { + } else { dol_syslog(get_class($this)."::fetch Contract not found"); $this->error = "Contract not found"; return 0; } - } - else - { + } else { dol_syslog(get_class($this)."::fetch Error searching contract"); $this->error = $this->db->error(); return -1; @@ -939,9 +918,7 @@ class Contrat extends CommonObject $pos++; } $this->db->free($result); - } - else - { + } else { dol_syslog(get_class($this)."::Fetch Error when reading lines of contracts linked to products"); return -3; } @@ -1081,8 +1058,7 @@ class Contrat extends CommonObject $error++; } } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) { $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); @@ -1117,7 +1093,7 @@ class Contrat extends CommonObject } $sqlcontact = "SELECT ctc.code, ctc.source, ec.fk_socpeople FROM ".MAIN_DB_PREFIX."element_contact as ec, ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sqlcontact .= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$originforcontact."'"; + $sqlcontact .= " WHERE element_id = ".$originidforcontact." AND ec.fk_c_type_contact = ctc.rowid AND ctc.element = '".$this->db->escape($originforcontact)."'"; $resqlcontact = $this->db->query($sqlcontact); if ($resqlcontact) @@ -1129,8 +1105,7 @@ class Contrat extends CommonObject //print $objcontact->code.'-'.$objcontact->source.'-'.$objcontact->fk_socpeople."\n"; $this->add_contact($objcontact->fk_socpeople, $objcontact->code, $objcontact->source); // May failed because of duplicate key or because code of contact type does not exists for new object } - } - else dol_print_error($resqlcontact); + } else dol_print_error($resqlcontact); } } @@ -1145,24 +1120,18 @@ class Contrat extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { dol_syslog(get_class($this)."::create - 30 - ".$this->error, LOG_ERR); $this->db->rollback(); return -3; } - } - else - { + } else { $this->error = "Failed to add contract"; dol_syslog(get_class($this)."::create - 20 - ".$this->error, LOG_ERR); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $langs->trans("UnknownError: ".$this->db->error()." -", LOG_DEBUG); $this->db->rollback(); @@ -1331,9 +1300,7 @@ class Contrat extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -1426,9 +1393,7 @@ class Contrat extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -1505,9 +1470,7 @@ class Contrat extends CommonObject if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } @@ -1558,9 +1521,7 @@ class Contrat extends CommonObject if (($result = $this->defineBuyPrice($pu_ht, $remise_percent, $fk_product)) < 0) { return $result; - } - else - { + } else { $pa_ht = $result; } } @@ -1580,15 +1541,15 @@ class Contrat extends CommonObject $sql .= ($fk_product > 0 ? $fk_product : "null").","; $sql .= " ".$qty.","; $sql .= " ".$txtva.","; - $sql .= " ".($vat_src_code ? "'".$vat_src_code."'" : "null").","; + $sql .= " ".($vat_src_code ? "'".$this->db->escape($vat_src_code)."'" : "null").","; $sql .= " ".$txlocaltax1.","; $sql .= " ".$txlocaltax2.","; - $sql .= " '".$localtax1_type."',"; - $sql .= " '".$localtax2_type."',"; + $sql .= " '".$this->db->escape($localtax1_type)."',"; + $sql .= " '".$this->db->escape($localtax2_type)."',"; $sql .= " ".price2num($remise_percent).","; $sql .= " ".price2num($pu_ht).","; $sql .= " ".price2num($total_ht).",".price2num($total_tva).",".price2num($total_localtax1).",".price2num($total_localtax2).",".price2num($total_ttc).","; - $sql .= " '".$info_bits."',"; + $sql .= " '".$this->db->escape($info_bits)."',"; $sql .= " ".price2num($price).",".price2num($remise).","; if (isset($fk_fournprice)) $sql .= ' '.$fk_fournprice.','; else $sql .= ' null,'; @@ -1631,22 +1592,16 @@ class Contrat extends CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return $contractlineid; } - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error()." sql=".$sql; return -1; } - } - else - { + } else { dol_syslog(get_class($this)."::addline ErrorTryToAddLineOnValidatedContract", LOG_ERR); return -2; } @@ -1698,9 +1653,7 @@ class Contrat extends CommonObject { $remise = round(($pu * $remise_percent / 100), 2); $price = $pu - $remise; - } - else - { + } else { $remise_percent = 0; } @@ -1750,9 +1703,7 @@ class Contrat extends CommonObject if (($result = $this->defineBuyPrice($pu, $remise_percent)) < 0) { return $result; - } - else - { + } else { $pa_ht = $result; } } @@ -1766,8 +1717,8 @@ class Contrat extends CommonObject $sql .= ",tva_tx='".price2num($tvatx)."'"; $sql .= ",localtax1_tx='".price2num($localtax1tx)."'"; $sql .= ",localtax2_tx='".price2num($localtax2tx)."'"; - $sql .= ",localtax1_type='".$localtax1_type."'"; - $sql .= ",localtax2_type='".$localtax2_type."'"; + $sql .= ",localtax1_type='".$this->db->escape($localtax1_type)."'"; + $sql .= ",localtax2_type='".$this->db->escape($localtax2_type)."'"; $sql .= ", total_ht='".price2num($total_ht)."'"; $sql .= ", total_tva='".price2num($total_tva)."'"; $sql .= ", total_localtax1='".price2num($total_localtax1)."'"; @@ -1775,14 +1726,10 @@ class Contrat extends CommonObject $sql .= ", total_ttc='".price2num($total_ttc)."'"; $sql .= ", fk_product_fournisseur_price=".($fk_fournprice > 0 ? $fk_fournprice : "null"); $sql .= ", buy_price_ht='".price2num($pa_ht)."'"; - if ($date_start > 0) { $sql .= ",date_ouverture_prevue='".$this->db->idate($date_start)."'"; } - else { $sql .= ",date_ouverture_prevue=null"; } - if ($date_end > 0) { $sql .= ",date_fin_validite='".$this->db->idate($date_end)."'"; } - else { $sql .= ",date_fin_validite=null"; } - if ($date_debut_reel > 0) { $sql .= ",date_ouverture='".$this->db->idate($date_debut_reel)."'"; } - else { $sql .= ",date_ouverture=null"; } - if ($date_fin_reel > 0) { $sql .= ",date_cloture='".$this->db->idate($date_fin_reel)."'"; } - else { $sql .= ",date_cloture=null"; } + if ($date_start > 0) { $sql .= ",date_ouverture_prevue='".$this->db->idate($date_start)."'"; } else { $sql .= ",date_ouverture_prevue=null"; } + if ($date_end > 0) { $sql .= ",date_fin_validite='".$this->db->idate($date_end)."'"; } else { $sql .= ",date_fin_validite=null"; } + if ($date_debut_reel > 0) { $sql .= ",date_ouverture='".$this->db->idate($date_debut_reel)."'"; } else { $sql .= ",date_ouverture=null"; } + if ($date_fin_reel > 0) { $sql .= ",date_cloture='".$this->db->idate($date_fin_reel)."'"; } else { $sql .= ",date_cloture=null"; } $sql .= ", fk_unit=".($fk_unit ? "'".$this->db->escape($fk_unit)."'" : "null"); $sql .= " WHERE rowid = ".$rowid; @@ -1825,16 +1772,12 @@ class Contrat extends CommonObject $this->db->commit(); return 1; } - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::updateline Erreur -2"); return -2; } - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error(); dol_syslog(get_class($this)."::updateline Erreur -1"); @@ -1895,9 +1838,7 @@ class Contrat extends CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; return -2; } @@ -1970,7 +1911,6 @@ class Contrat extends CommonObject } $statusType = 'status'.$status; - if ($status == self::STATUS_VALIDATED) $statusType = 'status4'; if ($status == self::STATUS_VALIDATED) $statusType = 'status6'; if ($mode == 4 || $mode == 6 || $mode == 7) @@ -1993,9 +1933,7 @@ class Contrat extends CommonObject $text .= ($mode != 7 || $this->nbofservicesclosed > 0) ? ($this->nbofservicesclosed.ContratLigne::LibStatut(5, 3, -1, 'class="marginleft2"')) : ''; $text .= ($mode == 7 ? '' : ''); return $text; - } - else - { + } else { return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } } @@ -2029,7 +1967,7 @@ class Contrat extends CommonObject $label = ''; if ($user->rights->contrat->lire) { - $label = ''.$langs->trans("ShowContract").''; + $label = img_picto('', $this->picto).' '.$langs->trans("Contract").''; $label .= '
    '.$langs->trans('Ref').': '.($this->ref ? $this->ref : $this->id); $label .= '
    '.$langs->trans('RefCustomer').': '.($this->ref_customer ? $this->ref_customer : $this->ref_client); $label .= '
    '.$langs->trans('RefSupplier').': '.$this->ref_supplier; @@ -2113,9 +2051,7 @@ class Contrat extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -2150,9 +2086,7 @@ class Contrat extends CommonObject $i++; } return $tab; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -2188,9 +2122,7 @@ class Contrat extends CommonObject $i++; } return $tab; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -2222,8 +2154,7 @@ class Contrat extends CommonObject $sql .= " WHERE c.statut = 1"; $sql .= " AND c.rowid = cd.fk_contrat"; $sql .= " AND cd.statut = 0"; - } - elseif ($mode == 'expired') + } elseif ($mode == 'expired') { $sql = "SELECT cd.rowid, cd.date_fin_validite as datefin"; $sql .= $this->from; @@ -2231,8 +2162,7 @@ class Contrat extends CommonObject $sql .= " AND c.rowid = cd.fk_contrat"; $sql .= " AND cd.statut = 4"; $sql .= " AND cd.date_fin_validite < '".$this->db->idate(dol_now())."'"; - } - elseif ($mode == 'active') + } elseif ($mode == 'active') { $sql = "SELECT cd.rowid, cd.date_fin_validite as datefin"; $sql .= $this->from; @@ -2258,8 +2188,7 @@ class Contrat extends CommonObject $label = $langs->trans("BoardNotActivatedServices"); $labelShort = $langs->trans("BoardNotActivatedServicesShort"); $url = DOL_URL_ROOT.'/contrat/services_list.php?mainmenu=commercial&leftmenu=contracts&mode=0&sortfield=cd.date_fin_validite&sortorder=asc'; - } - elseif ($mode == 'expired') { + } elseif ($mode == 'expired') { $warning_delay = $conf->contrat->services->expires->warning_delay; $url = DOL_URL_ROOT.'/contrat/services_list.php?mainmenu=commercial&leftmenu=contracts&mode=4&filter=expired&sortfield=cd.date_fin_validite&sortorder=asc'; $label = $langs->trans("BoardExpiredServices"); @@ -2290,9 +2219,7 @@ class Contrat extends CommonObject } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -2333,9 +2260,7 @@ class Contrat extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -2384,6 +2309,8 @@ class Contrat extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; $sql .= " AND tosell = 1"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -2792,11 +2719,22 @@ class ContratLigne extends CommonObjectLine global $langs; $langs->load("contracts"); - if ($status == self::STATUS_INITIAL) { $labelStatus = $langs->trans("ServiceStatusInitial"); $labelStatusShort = $langs->trans("ServiceStatusInitial"); } - elseif ($status == self::STATUS_OPEN && $expired == -1) { $labelStatus = $langs->trans("ServiceStatusRunning"); $labelStatusShort = $langs->trans("ServiceStatusRunning"); } - elseif ($status == self::STATUS_OPEN && $expired == 0) { $labelStatus = $langs->trans("ServiceStatusNotLate"); $labelStatusShort = $langs->trans("ServiceStatusNotLateShort"); } - elseif ($status == self::STATUS_OPEN && $expired == 1) { $labelStatus = $langs->trans("ServiceStatusLate"); $labelStatusShort = $langs->trans("ServiceStatusLateShort"); } - elseif ($status == self::STATUS_CLOSED) { $labelStatus = $langs->trans("ServiceStatusClosed"); $labelStatusShort = $langs->trans("ServiceStatusClosed"); } + if ($status == self::STATUS_INITIAL) { + $labelStatus = $langs->trans("ServiceStatusInitial"); + $labelStatusShort = $langs->trans("ServiceStatusInitial"); + } elseif ($status == self::STATUS_OPEN && $expired == -1) { + $labelStatus = $langs->trans("ServiceStatusRunning"); + $labelStatusShort = $langs->trans("ServiceStatusRunning"); + } elseif ($status == self::STATUS_OPEN && $expired == 0) { + $labelStatus = $langs->trans("ServiceStatusNotLate"); + $labelStatusShort = $langs->trans("ServiceStatusNotLateShort"); + } elseif ($status == self::STATUS_OPEN && $expired == 1) { + $labelStatus = $langs->trans("ServiceStatusLate"); + $labelStatusShort = $langs->trans("ServiceStatusLateShort"); + } elseif ($status == self::STATUS_CLOSED) { + $labelStatus = $langs->trans("ServiceStatusClosed"); + $labelStatusShort = $langs->trans("ServiceStatusClosed"); + } $statusType = 'status'.$status; if ($status == self::STATUS_OPEN && $expired == 1) $statusType = 'status1'; @@ -2841,18 +2779,16 @@ class ContratLigne extends CommonObjectLine * Load object in memory from database * * @param int $id Id object - * @param string $ref Ref of contract + * @param string $ref Ref of contract line * @return int <0 if KO, >0 if OK */ public function fetch($id, $ref = '') { - // Check parameters if (empty($id) && empty($ref)) return -1; $sql = "SELECT"; $sql .= " t.rowid,"; - $sql .= " t.tms,"; $sql .= " t.fk_contrat,"; $sql .= " t.fk_product,"; @@ -2953,16 +2889,18 @@ class ContratLigne extends CommonObjectLine $this->fk_user_cloture = $obj->fk_user_cloture; $this->commentaire = $obj->commentaire; $this->fk_fournprice = $obj->fk_fournprice; + $marginInfos = getMarginInfos($obj->subprice, $obj->remise_percent, $obj->tva_tx, $obj->localtax1_tx, $obj->localtax2_tx, $this->fk_fournprice, $obj->pa_ht); $this->pa_ht = $marginInfos[0]; $this->fk_unit = $obj->fk_unit; + + $this->fetch_optionals(); } + $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -3047,9 +2985,7 @@ class ContratLigne extends CommonObjectLine if (($result = $this->defineBuyPrice($this->subprice, $this->remise_percent, $this->fk_product)) < 0) { return $result; - } - else - { + } else { $this->pa_ht = $result; } } @@ -3196,9 +3132,7 @@ class ContratLigne extends CommonObjectLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; @@ -3279,9 +3213,7 @@ class ContratLigne extends CommonObjectLine $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->error()." sql=".$sql; return -1; @@ -3334,9 +3266,7 @@ class ContratLigne extends CommonObjectLine $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } diff --git a/htdocs/contrat/contact.php b/htdocs/contrat/contact.php index 1da2416ce84..38a97d0aaa8 100644 --- a/htdocs/contrat/contact.php +++ b/htdocs/contrat/contact.php @@ -36,7 +36,7 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array('contracts', 'companies')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int'); $id = GETPOST('id', 'int'); @@ -70,9 +70,7 @@ if ($action == 'addcontact' && $user->rights->contrat->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $msg = $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); @@ -90,9 +88,7 @@ if ($action == 'swapstatut' && $user->rights->contrat->creer) if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db, $object->error); } } diff --git a/htdocs/contrat/document.php b/htdocs/contrat/document.php index fd3b3f66e4a..d60d54258bb 100644 --- a/htdocs/contrat/document.php +++ b/htdocs/contrat/document.php @@ -193,9 +193,7 @@ if ($object->id) $permtoedit = $user->rights->contrat->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/contrat/index.php b/htdocs/contrat/index.php index 2a7c9c0d91a..7fe88d03c3d 100644 --- a/htdocs/contrat/index.php +++ b/htdocs/contrat/index.php @@ -37,8 +37,8 @@ $hookmanager->initHooks(array('contractindex')); // Load translation files required by the page $langs->loadLangs(array('products', 'companies', 'contracts')); -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); $statut = GETPOST('statut') ?GETPOST('statut') : 1; @@ -140,9 +140,7 @@ if ($resql) $i++; } $db->free($resql); -} -else -{ +} else { dol_print_error($db); } // Search by status (only expired) @@ -179,9 +177,7 @@ if ($resql) $i++; } $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -298,16 +294,12 @@ if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) //$tot_ttc+=$obj->total_ttc; $i++; } - } - else - { + } else { print '
    '.$langs->trans("NoContracts").'

    "; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -383,9 +375,7 @@ if ($result) $db->free($result); print ""; -} -else -{ +} else { dol_print_error($db); } @@ -439,9 +429,7 @@ if ($resql) $productstatic->ref = $obj->pref; $productstatic->entity = $obj->pentity; print $productstatic->getNomUrl(1, '', 20); - } - else - { + } else { print ''.img_object($langs->trans("ShowService"), "service"); if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; else print ' '.dol_trunc($obj->note, 20); @@ -462,9 +450,7 @@ if ($resql) $db->free(); print ""; -} -else -{ +} else { dol_print_error($db); } @@ -519,9 +505,7 @@ if ($resql) $productstatic->ref = $obj->pref; $productstatic->entity = $obj->pentity; print $productstatic->getNomUrl(1, '', 20); - } - else - { + } else { print ''.img_object($langs->trans("ShowService"), "service"); if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; else print ' '.dol_trunc($obj->note, 20); @@ -541,9 +525,7 @@ if ($resql) $db->free(); print ""; -} -else -{ +} else { dol_print_error($db); } @@ -599,9 +581,7 @@ if ($resql) $productstatic->ref = $obj->pref; $productstatic->entity = $obj->pentity; print $productstatic->getNomUrl(1, '', 20); - } - else - { + } else { print ''.img_object($langs->trans("ShowService"), "service"); if ($obj->label) print ' '.dol_trunc($obj->label, 20).''; else print ' '.dol_trunc($obj->note, 20); @@ -621,9 +601,7 @@ if ($resql) $db->free(); print ""; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/contrat/list.php b/htdocs/contrat/list.php index 37fd99a771e..04329a63145 100644 --- a/htdocs/contrat/list.php +++ b/htdocs/contrat/list.php @@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; // Load translation files required by the page $langs->loadLangs(array('contracts', 'products', 'companies', 'compta')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -50,13 +50,13 @@ $search_name = GETPOST('search_name', 'alpha'); $search_email = GETPOST('search_email', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state", 'alpha')); +$search_state = GETPOST("search_state", 'alpha'); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); $search_contract = GETPOST('search_contract', 'alpha'); $search_ref_customer = GETPOST('search_ref_customer', 'alpha'); $search_ref_supplier = GETPOST('search_ref_supplier', 'alpha'); -$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); +$sall = (GETPOST('search_all', 'alphanohtml') != '') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search_status = GETPOST('search_status', 'alpha'); $socid = GETPOST('socid', 'int'); $search_user = GETPOST('search_user', 'int'); @@ -369,11 +369,9 @@ if ($user->rights->contrat->supprimer) $arrayofmassactions['predelete'] = 'selectMassAction('', $arrayofmassactions); -$newcardbutton = ''; -if ($user->rights->contrat->creer) -{ - $newcardbutton .= dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contrat/card.php?action=create'); -} +$url = DOL_URL_ROOT.'/contrat/card.php?action=create'; +if (!empty($socid)) $url .= '&socid='.$socid; +$newcardbutton = dolGetButtonTitle($langs->trans('NewContractSubscription'), '', 'fa fa-plus-circle', $url, '', $user->rights->contrat->creer); print '
    '; if ($optioncss != '') print ''; @@ -418,7 +416,7 @@ if ($user->rights->user->user->lire) $moreforfilter .= ''; } // If the user can view categories of products -if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) +if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
    '; @@ -708,8 +706,7 @@ while ($i < min($num, $limit)) if ($nbofsalesrepresentative > 3) { // We print only number print $nbofsalesrepresentative; - } - elseif ($nbofsalesrepresentative > 0) + } elseif ($nbofsalesrepresentative > 0) { $userstatic = new User($db); $j = 0; @@ -731,9 +728,7 @@ while ($i < min($num, $limit)) } } //else print $langs->trans("NoSalesRepresentativeAffected"); - } - else - { + } else { print ' '; } print ''; diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index d782ad5b3f5..d9eb8e3ccdc 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -34,7 +34,7 @@ if (!empty($conf->projet->enabled)) { // Load translation files required by the page $langs->loadLangs(array('companies', 'contracts')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $socid = GETPOST('socid', 'int'); $id = GETPOST('id', 'int'); diff --git a/htdocs/contrat/services_list.php b/htdocs/contrat/services_list.php index 90f6516a499..7279ab98781 100644 --- a/htdocs/contrat/services_list.php +++ b/htdocs/contrat/services_list.php @@ -98,14 +98,11 @@ if ($search_status != '') $tmp = explode('&', $search_status); $mode = $tmp[0]; if (empty($tmp[1])) $filter = ''; - else - { + else { if ($tmp[1] == 'filter=notexpired') $filter = 'notexpired'; if ($tmp[1] == 'filter=expired') $filter = 'expired'; } -} -else -{ +} else { $search_status = $mode; if ($filter == 'expired') $search_status .= '&filter=expired'; if ($filter == 'notexpired') $search_status .= '&filter=notexpired'; @@ -202,7 +199,7 @@ $now = dol_now(); $form = new Form($db); -$sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut,"; +$sql = "SELECT c.rowid as cid, c.ref, c.statut as cstatut, c.ref_customer, c.ref_supplier,"; $sql .= " s.rowid as socid, s.nom as name, s.email, s.client, s.fournisseur,"; $sql .= " cd.rowid, cd.description, cd.statut,"; $sql .= " p.rowid as pid, p.ref as pref, p.label as label, p.fk_product_type as ptype, p.entity as pentity,"; @@ -567,6 +564,8 @@ while ($i < min($num, $limit)) $contractstatic->id = $obj->cid; $contractstatic->ref = $obj->ref ? $obj->ref : $obj->cid; + $contractstatic->ref_customer = $obj->ref_customer; + $contractstatic->ref_supplier = $obj->ref_supplier; $companystatic->id = $obj->socid; $companystatic->name = $obj->name; @@ -579,7 +578,7 @@ while ($i < min($num, $limit)) // Ref if (!empty($arrayfields['c.ref']['checked'])) { - print ''; + print ''; print $contractstatic->getNomUrl(1, 16); print ''; if (!$i) $totalarray['nbfield']++; @@ -597,9 +596,7 @@ while ($i < min($num, $limit)) print $productstatic->getNomUrl(1, '', 24); print $obj->label ? ' - '.dol_trunc($obj->label, 16) : ''; if (!empty($obj->description) && !empty($conf->global->PRODUCT_DESC_IN_LIST)) print '
    '.dol_nl2br($obj->description); - } - else - { + } else { if ($obj->type == 0) print img_object($obj->description, 'product').' '.dol_trunc($obj->description, 24); if ($obj->type == 1) print img_object($obj->description, 'service').' '.dol_trunc($obj->description, 24); } @@ -682,8 +679,7 @@ while ($i < min($num, $limit)) $warning_delay = $conf->contrat->services->expires->warning_delay / 3600 / 24; $textlate = $langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($warning_delay) >= 0 ? '+' : '').ceil($warning_delay).' '.$langs->trans("days"); print img_warning($textlate); - } - else print '    '; + } else print '    '; print ''; if (!$i) $totalarray['nbfield']++; } @@ -724,9 +720,7 @@ while ($i < min($num, $limit)) { // If contract is draft, we say line is also draft print $contractstatic->LibStatut(0, 5); - } - else - { + } else { print $staticcontratligne->LibStatut($obj->statut, 5, ($obj->date_fin_validite && $db->jdate($obj->date_fin_validite) < $now) ? 1 : 0); } print ''; diff --git a/htdocs/core/actions_addupdatedelete.inc.php b/htdocs/core/actions_addupdatedelete.inc.php index 3091b77f0a4..cee75415eee 100644 --- a/htdocs/core/actions_addupdatedelete.inc.php +++ b/htdocs/core/actions_addupdatedelete.inc.php @@ -40,8 +40,7 @@ if ($cancel) { header("Location: ".$backtopageforcancel); exit; - } - elseif (!empty($backtopage)) + } elseif (!empty($backtopage)) { header("Location: ".$backtopage); exit; @@ -57,8 +56,7 @@ if ($action == 'add' && !empty($permissiontoadd)) { if ($object->fields[$key]['type'] == 'duration') { if (GETPOST($key.'hour') == '' && GETPOST($key.'min') == '') continue; // The field was not submited to be edited - } - else { + } else { if (!GETPOSTISSET($key)) continue; // The field was not submited to be edited } // Ignore special fields @@ -66,7 +64,7 @@ if ($action == 'add' && !empty($permissiontoadd)) // Set value to insert if (in_array($object->fields[$key]['type'], array('text', 'html'))) { - $value = GETPOST($key, 'none'); + $value = GETPOST($key, 'restricthtml'); } elseif ($object->fields[$key]['type'] == 'date') { $value = dol_mktime(12, 0, 0, GETPOST($key.'month', 'int'), GETPOST($key.'day', 'int'), GETPOST($key.'year', 'int')); } elseif ($object->fields[$key]['type'] == 'datetime') { @@ -74,7 +72,7 @@ if ($action == 'add' && !empty($permissiontoadd)) } elseif ($object->fields[$key]['type'] == 'duration') { $value = 60 * 60 * GETPOST($key.'hour', 'int') + 60 * GETPOST($key.'min', 'int'); } elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) { - $value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup + $value = price2num(GETPOST($key, 'alphanohtml')); // To fix decimal separator according to lang setup } elseif ($object->fields[$key]['type'] == 'boolean') { $value = (GETPOST($key) == 'on' ? 1 : 0); } else { @@ -87,7 +85,7 @@ if ($action == 'add' && !empty($permissiontoadd)) $object->$key = $value; if ($val['notnull'] > 0 && $object->$key == '' && !is_null($val['default']) && $val['default'] == '(PROV)') { - $object->$key = '(PROV)'; + $object->$key = '(PROV)'; } if ($val['notnull'] > 0 && $object->$key == '' && is_null($val['default'])) { @@ -107,22 +105,18 @@ if ($action == 'add' && !empty($permissiontoadd)) $result = $object->create($user); if ($result > 0) { - // Creation OK + // Creation OK $urltogo = $backtopage ? str_replace('__ID__', $result, $backtopage) : $backurlforlist; $urltogo = preg_replace('/--IDFORBACKTOPAGE--/', $object->id, $urltogo); // New method to autoselect project after a New on another form object creation header("Location: ".$urltogo); exit; - } - else - { + } else { // Creation KO if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); - else setEventMessages($object->error, null, 'errors'); + else setEventMessages($object->error, null, 'errors'); $action = 'create'; } - } - else - { + } else { $action = 'create'; } } @@ -135,23 +129,25 @@ if ($action == 'update' && !empty($permissiontoadd)) // Check if field was submited to be edited if ($object->fields[$key]['type'] == 'duration') { if (!GETPOSTISSET($key.'hour') || !GETPOSTISSET($key.'min')) continue; // The field was not submited to be edited - } - elseif ($object->fields[$key]['type'] == 'boolean') { + } elseif ($object->fields[$key]['type'] == 'boolean') { if (!GETPOSTISSET($key)) { $object->$key = 0; // use 0 instead null if the field is defined as not null continue; } - } - - else { + } else { if (!GETPOSTISSET($key)) continue; // The field was not submited to be edited } // Ignore special fields if (in_array($key, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat', 'fk_user_modif', 'import_key'))) continue; // Set value to update - if (in_array($object->fields[$key]['type'], array('text', 'html'))) { - $value = GETPOST($key, 'none'); + if (preg_match('/^(text|html)/', $object->fields[$key]['type'])) { + $tmparray = explode(':', $object->fields[$key]['type']); + if (!empty($tmparray[1])) { + $value = GETPOST($key, $tmparray[1]); + } else { + $value = GETPOST($key, 'restricthtml'); + } } elseif ($object->fields[$key]['type'] == 'date') { $value = dol_mktime(12, 0, 0, GETPOST($key.'month'), GETPOST($key.'day'), GETPOST($key.'year')); } elseif ($object->fields[$key]['type'] == 'datetime') { @@ -163,7 +159,7 @@ if ($action == 'update' && !empty($permissiontoadd)) $value = ''; } } elseif (preg_match('/^(integer|price|real|double)/', $object->fields[$key]['type'])) { - $value = price2num(GETPOST($key, 'none')); // To fix decimal separator according to lang setup + $value = price2num(GETPOST($key, 'alphanohtml')); // To fix decimal separator according to lang setup } elseif ($object->fields[$key]['type'] == 'boolean') { $value = ((GETPOST($key, 'aZ09') == 'on' || GETPOST($key, 'aZ09') == '1') ? 1 : 0); } else { @@ -192,16 +188,12 @@ if ($action == 'update' && !empty($permissiontoadd)) if ($result > 0) { $action = 'view'; - } - else - { + } else { // Creation KO setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit'; } - } - else - { + } else { $action = 'edit'; } } @@ -227,9 +219,7 @@ if ($action == "update_extras" && !empty($permissiontoadd)) { setEventMessages($langs->trans('RecordSaved'), null, 'mesgs'); $action = 'view'; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $action = 'edit_extras'; } @@ -238,11 +228,11 @@ if ($action == "update_extras" && !empty($permissiontoadd)) // Action to delete if ($action == 'confirm_delete' && !empty($permissiontodelete)) { - if (!($object->id > 0)) - { - dol_print_error('', 'Error, object must be fetched before being deleted'); - exit; - } + if (!($object->id > 0)) + { + dol_print_error('', 'Error, object must be fetched before being deleted'); + exit; + } $result = $object->delete($user); if ($result > 0) @@ -251,9 +241,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) setEventMessages("RecordDeleted", null, 'mesgs'); header("Location: ".$backurlforlist); exit; - } - else - { + } else { if (!empty($object->errors)) setEventMessages(null, $object->errors, 'errors'); else setEventMessages($object->error, null, 'errors'); } @@ -263,7 +251,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissiontoadd)) { if (method_exists('deleteline', $object)) { - $result = $object->deleteline($user, $lineid); // For backward compatibility + $result = $object->deleteline($user, $lineid); // For backward compatibility } else { $result = $object->deleteLine($user, $lineid); } @@ -287,16 +275,14 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && !empty($permissionto if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { if (method_exists($object, 'generateDocument')) { $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } setEventMessages($langs->trans('RecordDeleted'), null, 'mesgs'); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -308,8 +294,7 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) if ($result >= 0) { // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { if (method_exists($object, 'generateDocument')) { $outputlangs = $langs; $newlang = ''; @@ -319,15 +304,13 @@ if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontoadd) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -349,15 +332,13 @@ if ($action == 'confirm_close' && $confirm == 'yes' && $permissiontoadd) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -369,9 +350,7 @@ if ($action == 'confirm_setdraft' && $confirm == 'yes' && $permissiontoadd) if ($result >= 0) { // Nothing else done - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -393,15 +372,13 @@ if ($action == 'confirm_reopen' && $confirm == 'yes' && $permissiontoadd) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); } } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -412,24 +389,20 @@ if ($action == 'confirm_clone' && $confirm == 'yes' && !empty($permissiontoadd)) if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { - $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone or if createFromClone modifies the object. We use native clone to keep this->db valid. + } else { + $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone or if createFromClone modifies the object. We use native clone to keep this->db valid. //$objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int')); - // ... - $result = $objectutil->createFromClone($user, (($object->id > 0) ? $object->id : $id)); - if (is_object($result) || $result > 0) + // ... + $result = $objectutil->createFromClone($user, (($object->id > 0) ? $object->id : $id)); + if (is_object($result) || $result > 0) { $newid = 0; if (is_object($result)) $newid = $result->id; else $newid = $result; header("Location: ".$_SERVER['PHP_SELF'].'?id='.$newid); // Open record of new object exit; - } - else - { - setEventMessages($objectutil->error, $objectutil->errors, 'errors'); + } else { + setEventMessages($objectutil->error, $objectutil->errors, 'errors'); $action = ''; } } diff --git a/htdocs/core/actions_builddoc.inc.php b/htdocs/core/actions_builddoc.inc.php index ce582040ac9..20bd19625cc 100644 --- a/htdocs/core/actions_builddoc.inc.php +++ b/htdocs/core/actions_builddoc.inc.php @@ -37,9 +37,7 @@ if ($action == 'builddoc' && $permissiontoadd) if (is_numeric(GETPOST('model', 'alpha'))) { $error = $langs->trans("ErrorFieldRequired", $langs->transnoentities("Model")); - } - else - { + } else { // Reload to get all modified line records and be ready for hooks $ret = $object->fetch($id); $ret = $object->fetch_thirdparty(); @@ -84,14 +82,12 @@ if ($action == 'builddoc' && $permissiontoadd) if (empty($hideref)) $hideref = 0; if (empty($moreparams)) $moreparams = null; - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); if ($result <= 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; - } - else - { + } else { if (empty($donotredirect)) // This is set when include is done by bulk action "Bill Orders" { setEventMessages($langs->trans("FileGenerated"), null); @@ -134,8 +130,7 @@ if ($action == 'remove_file' && $permissiontoadd) header('Location: '.$urltoredirect); exit; - } - else { + } else { setEventMessages('BugFoundVarUploaddirnotDefined', null, 'errors'); } } diff --git a/htdocs/core/actions_changeselectedfields.inc.php b/htdocs/core/actions_changeselectedfields.inc.php index 9a03ba0d29e..f4e7f01d234 100644 --- a/htdocs/core/actions_changeselectedfields.inc.php +++ b/htdocs/core/actions_changeselectedfields.inc.php @@ -28,7 +28,7 @@ // $object must be defined (object is loaded in this file with fetch) // Save selection -if (GETPOST('formfilteraction', 'none') == 'listafterchangingselectedfields') +if (GETPOST('formfilteraction', 'alphanohtml') == 'listafterchangingselectedfields') { $tabparam = array(); diff --git a/htdocs/core/actions_comments.inc.php b/htdocs/core/actions_comments.inc.php index 07829999c10..079f207b4a4 100644 --- a/htdocs/core/actions_comments.inc.php +++ b/htdocs/core/actions_comments.inc.php @@ -35,7 +35,7 @@ $comment = new Comment($db); if ($action == 'addcomment') { - $description = GETPOST('comment_description', 'none'); + $description = GETPOST('comment_description', 'restricthtml'); if (!empty($description)) { $comment->description = $description; @@ -49,9 +49,7 @@ if ($action == 'addcomment') setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1' : '')); exit; - } - else - { + } else { setEventMessages($comment->error, $comment->errors, 'errors'); $action = ''; } @@ -61,15 +59,13 @@ if ($action === 'updatecomment') { if ($comment->fetch($idcomment) >= 0) { - $comment->description = GETPOST('comment_description', 'none'); + $comment->description = GETPOST('comment_description', 'restricthtml'); if ($comment->update($user) > 0) { setEventMessages($langs->trans("CommentAdded"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1#comment' : '')); exit; - } - else - { + } else { setEventMessages($comment->error, $comment->errors, 'errors'); $action = ''; } @@ -84,9 +80,7 @@ if ($action == 'deletecomment') setEventMessages($langs->trans("CommentDeleted"), null, 'mesgs'); header('Location: '.$varpage.'?id='.$id.($withproject ? '&withproject=1' : '')); exit; - } - else - { + } else { setEventMessages($comment->error, $comment->errors, 'errors'); $action = ''; } diff --git a/htdocs/core/actions_extrafields.inc.php b/htdocs/core/actions_extrafields.inc.php index bb5a7516fb2..46a6a31c202 100644 --- a/htdocs/core/actions_extrafields.inc.php +++ b/htdocs/core/actions_extrafields.inc.php @@ -122,9 +122,7 @@ if ($action == 'add') $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'create'; } - } - else - { + } else { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); @@ -149,9 +147,7 @@ if ($action == 'add') { $params['options'] = array($parameters=>null); } - } - else - { + } else { //Esle it's separated key/value and coma list foreach ($parameters_array as $param_ligne) { @@ -191,25 +187,19 @@ if ($action == 'add') setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { $error++; $mesg = $extrafields->error; setEventMessages($mesg, null, 'errors'); } - } - else - { + } else { $error++; $langs->load("errors"); $mesg = $langs->trans("ErrorFieldCanNotContainSpecialNorUpperCharacters", $langs->transnoentities("AttributeCode")); setEventMessages($mesg, null, 'errors'); $action = 'create'; } - } - else - { + } else { setEventMessages($mesg, null, 'errors'); } } @@ -293,9 +283,7 @@ if ($action == 'update') $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); $action = 'edit'; } - } - else - { + } else { $error++; $langs->load("errors"); $mesg[] = $langs->trans("ErrorBadFormatValueList", $param_ligne); @@ -319,9 +307,7 @@ if ($action == 'update') { $params['options'] = array($parameters=>null); } - } - else - { + } else { //Esle it's separated key/value and coma list foreach ($parameters_array as $param_ligne) { @@ -361,24 +347,18 @@ if ($action == 'update') setEventMessages($langs->trans('SetupSaved'), null, 'mesgs'); header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { $error++; $mesg = $extrafields->error; setEventMessages($mesg, null, 'errors'); } - } - else - { + } else { $error++; $langs->load("errors"); $mesg = $langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); setEventMessages($mesg, null, 'errors'); } - } - else - { + } else { setEventMessages($mesg, null, 'errors'); } } @@ -394,11 +374,8 @@ if ($action == 'delete') { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else $mesg = $extrafields->error; - } - else - { + } else $mesg = $extrafields->error; + } else { $error++; $langs->load("errors"); $mesg = $langs->trans("ErrorFieldCanNotContainSpecialCharacters", $langs->transnoentities("AttributeCode")); diff --git a/htdocs/core/actions_fetchobject.inc.php b/htdocs/core/actions_fetchobject.inc.php index e85e3ed629a..d4cdbb66a21 100644 --- a/htdocs/core/actions_fetchobject.inc.php +++ b/htdocs/core/actions_fetchobject.inc.php @@ -37,17 +37,14 @@ if (($id > 0 || (!empty($ref) && !in_array($action, array('create', 'createtask' { $object->fetch_thirdparty(); $id = $object->id; - } - else - { + } else { if (empty($object->error) && !count($object->errors)) { if ($ret < 0) // if $ret == 0, it means not found. { setEventMessages('Fetch on object (type '.get_class($object).') return an error without filling $object->error nor $object->errors', null, 'errors'); } - } - else { + } else { setEventMessages($object->error, $object->errors, 'errors'); } $action = ''; diff --git a/htdocs/core/actions_lineupdown.inc.php b/htdocs/core/actions_lineupdown.inc.php index b0556d6399f..e5507eeafc0 100644 --- a/htdocs/core/actions_lineupdown.inc.php +++ b/htdocs/core/actions_lineupdown.inc.php @@ -43,7 +43,7 @@ if ($action == 'up' && $permissiontoedit) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); @@ -64,7 +64,7 @@ if ($action == 'down' && $permissiontoedit) $outputlangs->setDefaultLang($newlang); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.GETPOST('rowid')); diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index a1b2c12e10b..3caeeed6678 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -41,8 +41,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) $error++; if ($_FILES['userfile']['error'][$key] == 1 || $_FILES['userfile']['error'][$key] == 2) { setEventMessages($langs->trans('ErrorFileSizeTooLarge'), null, 'errors'); - } - else { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("File")), null, 'errors'); } } @@ -58,15 +57,13 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC)) if (!empty($upload_dirold) && !empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $result = dol_add_file_process($upload_dirold, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs); - } - elseif (!empty($upload_dir)) + } elseif (!empty($upload_dir)) { $result = dol_add_file_process($upload_dir, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs); } } } -} -elseif (GETPOST('linkit', 'none') && !empty($conf->global->MAIN_UPLOAD_DOC)) +} elseif (GETPOST('linkit', 'restricthtml') && !empty($conf->global->MAIN_UPLOAD_DOC)) { $link = GETPOST('link', 'alpha'); if ($link) @@ -86,8 +83,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') if (GETPOST('section', 'alpha')) { // For a delete from the ECM module, upload_dir is ECM root dir and urlfile contains relative path from upload_dir $file = $upload_dir.(preg_match('/\/$/', $upload_dir) ? '' : '/').$urlfile; - } - else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. + } else // For a delete from the file manager into another module, or from documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. { $urlfile = basename($urlfile); $file = $upload_dir.(preg_match('/\/$/', $upload_dir) ? '' : '/').$urlfile; @@ -124,8 +120,7 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') } else { setEventMessages($langs->trans("ErrorFailToDeleteFile", $urlfile), null, 'errors'); } - } - elseif ($linkid) // delete of external link + } elseif ($linkid) // delete of external link { require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $link = new Link($db); @@ -148,16 +143,13 @@ if ($action == 'confirm_deletefile' && $confirm == 'yes') if ($backtopage) { header('Location: '.$backtopage); exit; - } - else - { + } else { $tmpurl = $_SERVER["PHP_SELF"].'?id='.$object->id.(GETPOST('section_dir', 'alpha') ? '§ion_dir='.urlencode(GETPOST('section_dir', 'alpha')) : '').(!empty($withproject) ? '&withproject=1' : ''); header('Location: '.$tmpurl); exit; } } -} -elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha')) +} elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST('link', 'alpha')) { require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; $langs->load('link'); @@ -176,13 +168,10 @@ elseif ($action == 'confirm_updateline' && GETPOST('save', 'alpha') && GETPOST(' { setEventMessages($langs->trans("ErrorFailedToUpdateLink", $link->label), null, 'mesgs'); } - } - else - { + } else { //error fetching } -} -elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) +} elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) { // For documents pages, upload_dir contains already path to file from module dir, so we clean path into urlfile. if (!empty($upload_dir)) @@ -243,15 +232,11 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) } setEventMessages($langs->trans("FileRenamed"), null); - } - else - { + } else { $langs->load("errors"); // lang must be loaded because we can't rely on loading during output, we need var substitution to be done now. setEventMessages($langs->trans("ErrorFailToRenameFile", $filenamefrom, $filenameto), null, 'errors'); } - } - else - { + } else { $langs->load("errors"); // lang must be loaded because we can't rely on loading during output, we need var substitution to be done now. setEventMessages($langs->trans("ErrorDestinationAlreadyExists", $filenameto), null, 'errors'); } @@ -277,9 +262,7 @@ elseif ($action == 'renamefile' && GETPOST('renamefilesave', 'alpha')) require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $ecmfile->share = getRandomPassword(true); } - } - else - { + } else { $ecmfile->share = ''; } $result = $ecmfile->update($user); diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 77fbea3c36a..c2f0a314445 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -3,7 +3,7 @@ * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018 Juanjo Menent * Copyright (C) 2019 Ferran Marcet - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Frédéric France * * 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 @@ -141,7 +141,7 @@ if (!$error && $massaction == 'confirm_presend') $massaction = 'presend'; } - if (!GETPOST('subject', 'none')) + if (!GETPOST('subject', 'restricthtml')) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("MailTopic")), null, 'warnings'); @@ -180,8 +180,7 @@ if (!$error && $massaction == 'confirm_presend') if ($val == 'thirdparty') // Id of third party or user { $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact + } elseif ($val && method_exists($thirdparty, 'contact_get_property')) // Id of contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); $sendtoid[] = $val; @@ -210,8 +209,7 @@ if (!$error && $massaction == 'confirm_presend') if ($val == 'thirdparty') // Id of third party { $tmparray[] = $thirdparty->name.' <'.$thirdparty->email.'>'; - } - elseif ($val) // Id du contact + } elseif ($val) // Id du contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); //$sendtoid[] = $val; TODO Add also id of contact in CC ? @@ -256,20 +254,17 @@ if (!$error && $massaction == 'confirm_presend') if ($objectobj->element == 'societe') { $sendto = $objectobj->email; - } - elseif ($objectobj->element == 'expensereport') + } elseif ($objectobj->element == 'expensereport') { $fuser = new User($db); $fuser->fetch($objectobj->fk_user_author); $sendto = $fuser->email; - } - elseif ($objectobj->element == 'holiday') + } elseif ($objectobj->element == 'holiday') { $fuser = new User($db); $fuser->fetch($objectobj->fk_user); $sendto = $fuser->email; - } - elseif ($objectobj->element == 'facture' && !empty($listofobjectcontacts[$objectid])) + } elseif ($objectobj->element == 'facture' && !empty($listofobjectcontacts[$objectid])) { $emails_to_sends = array(); $objectobj->fetch_thirdparty(); @@ -283,9 +278,7 @@ if (!$error && $massaction == 'confirm_presend') if (count($emails_to_sends) > 0) { $sendto = implode(',', $emails_to_sends); } - } - else - { + } else { $objectobj->fetch_thirdparty(); $sendto = $objectobj->thirdparty->email; } @@ -336,9 +329,7 @@ if (!$error && $massaction == 'confirm_presend') 'names'=>array($filename), 'mimes'=>array($mime) ); - } - else - { + } else { $nbignored++; $langs->load("errors"); $resaction .= '
    '.$langs->trans('ErrorCantReadFile', $file).'

    '; @@ -364,19 +355,15 @@ if (!$error && $massaction == 'confirm_presend') $fromtype = GETPOST('fromtype'); if ($fromtype === 'user') { $from = $user->getFullName($langs).' <'.$user->email.'>'; - } - elseif ($fromtype === 'company') { + } elseif ($fromtype === 'company') { $from = $conf->global->MAIN_INFO_SOCIETE_NOM.' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; - } - elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { + } elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { $tmp = explode(',', $user->email_aliases); $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { + } elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { $tmp = explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES); $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { + } elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { $sql = 'SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile WHERE rowid = '.(int) $reg[1]; $resql = $db->query($sql); $obj = $db->fetch_object($resql); @@ -384,14 +371,13 @@ if (!$error && $massaction == 'confirm_presend') { $from = $obj->label.' <'.$obj->email.'>'; } - } - else { + } else { $from = $_POST['fromname'].' <'.$_POST['frommail'].'>'; } $replyto = $from; - $subject = GETPOST('subject', 'none'); - $message = GETPOST('message', 'none'); + $subject = GETPOST('subject', 'restricthtml'); + $message = GETPOST('message', 'restricthtml'); $sendtobcc = GETPOST('sendtoccc'); if ($objectclass == 'Propal') $sendtobcc .= (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO) ? '' : (($sendtobcc ? ", " : "").$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)); @@ -412,9 +398,7 @@ if (!$error && $massaction == 'confirm_presend') { $looparray[$key]->thirdparty = $thirdparty; // Force thirdparty on object } - } - else - { + } else { $objectforloop = new $objectclass($db); $objectforloop->thirdparty = $thirdparty; // Force thirdparty on object (even if object was not loaded) $looparray[0] = $objectforloop; @@ -464,8 +448,7 @@ if (!$error && $massaction == 'confirm_presend') ); } } - } - elseif (!empty($attachedfilesThirdpartyObj[$thirdparty->id][$objectid])) { + } elseif (!empty($attachedfilesThirdpartyObj[$thirdparty->id][$objectid])) { // Create form object // if "one email per recipient" isn't check we must separate $attachedfiles by object $attachedfiles = $attachedfilesThirdpartyObj[$thirdparty->id][$objectid]; @@ -481,9 +464,7 @@ if (!$error && $massaction == 'confirm_presend') $trackid = 'thi'.$thirdparty->id; if ($objecttmp->element == 'expensereport') $trackid = 'use'.$thirdparty->id; if ($objecttmp->element == 'holiday') $trackid = 'use'.$thirdparty->id; - } - else - { + } else { $trackid = strtolower(get_class($objecttmp)); if (get_class($objecttmp) == 'Contrat') $trackid = 'con'; if (get_class($objecttmp) == 'Propal') $trackid = 'pro'; @@ -507,9 +488,7 @@ if (!$error && $massaction == 'confirm_presend') if ($mailfile->error) { $resaction .= '
    '.$mailfile->error.'
    '; - } - else - { + } else { $result = $mailfile->sendfile(); if ($result) { @@ -574,17 +553,13 @@ if (!$error && $massaction == 'confirm_presend') $nbsent++; // Nb of object sent } - } - else - { + } else { $langs->load("other"); if ($mailfile->error) { $resaction .= $langs->trans('ErrorFailedToSendMail', $from, $sendto); $resaction .= '
    '.$mailfile->error.'
    '; - } - else - { + } else { $resaction .= '
    No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS
    '; } } @@ -605,9 +580,7 @@ if (!$error && $massaction == 'confirm_presend') //setEventMessages($langs->trans("EMailSentToNRecipients", $nbsent.'/'.count($toselect)), null, 'mesgs'); setEventMessages($langs->trans("EMailSentForNElements", $nbsent.'/'.count($toselect)), null, 'mesgs'); setEventMessages($resaction, null, 'mesgs'); - } - else - { + } else { //setEventMessages($langs->trans("EMailSentToNRecipients", 0), null, 'warnings'); // May be object has no generated PDF file setEventMessages($resaction, null, 'warnings'); } @@ -642,7 +615,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $cmd->fetch_optionals(); $objecttmp->socid = $cmd->socid; - $objecttmp->type = Facture::TYPE_STANDARD; + $objecttmp->type = $objecttmp::TYPE_STANDARD; $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; $objecttmp->fk_project = $cmd->fk_project; @@ -675,9 +648,9 @@ if ($massaction == 'confirm_createbills') // Create bills from orders $sql .= ", targettype"; $sql .= ") VALUES ("; $sql .= $id_order; - $sql .= ", '".$objecttmp->origin."'"; + $sql .= ", '".$db->escape($objecttmp->origin)."'"; $sql .= ", ".$objecttmp->id; - $sql .= ", '".$objecttmp->element."'"; + $sql .= ", '".$db->escape($objecttmp->element)."'"; $sql .= ")"; if (!$db->query($sql)) @@ -722,16 +695,12 @@ if ($massaction == 'confirm_createbills') // Create bills from orders { $result = $objecttmp->insert_discount($discountid); //$result=$discount->link_to_invoice($lineid,$id); - } - else - { + } else { setEventMessages($discount->error, $discount->errors, 'errors'); $error++; break; } - } - else - { + } else { // Positive line $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); // Date start @@ -773,7 +742,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders 'HT', 0, $product_type, - $ii, + $lines[$i]->rang, $lines[$i]->special_code, $objecttmp->origin, $lines[$i]->rowid, @@ -789,9 +758,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders if ($result > 0) { $lineid = $result; - } - else - { + } else { $lineid = 0; $error++; break; @@ -881,9 +848,7 @@ if ($massaction == 'confirm_createbills') // Create bills from orders header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); exit; - } - else - { + } else { $db->rollback(); $action = 'create'; $_GET["origin"] = $_POST["origin"]; @@ -923,20 +888,15 @@ if (!$error && $massaction == 'cancelorders') setEventMessages($cmd->error, $cmd->errors, 'errors'); $error++; break; - } - else - $nbok++; + } else $nbok++; } if (!$error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -1029,25 +989,23 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $input_files .= ' '.escapeshellarg($f); } - $cmd = 'pdftk ' . $input_files . ' cat output '.escapeshellarg($file); + $cmd = 'pdftk '.$input_files.' cat output '.escapeshellarg($file); exec($cmd); // check if pdftk is installed if (file_exists($file)) { if (!empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); + $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now, 'dayhourlog')), null, 'mesgs'); } else { setEventMessages($langs->trans('ErrorPDFTkOutputFileNotFound'), null, 'errors'); } - } - else - { + } else { setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); } - } - else { + } else { // Create empty PDF $formatarray = pdf_getFormat(); $page_largeur = $formatarray['width']; @@ -1104,9 +1062,7 @@ if (!$error && $massaction == "builddoc" && $permissiontoread && !GETPOST('butto $langs->load("exports"); setEventMessages($langs->trans('FileSuccessfullyBuilt', $filename.'_'.dol_print_date($now, 'dayhourlog')), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans('NoPDFAvailableForDocGenAmongChecked'), null, 'errors'); } } @@ -1160,17 +1116,13 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) setEventMessages($langs->trans("ErrorObjectMustHaveStatusDraftToBeValidated", $objecttmp->ref), null, 'errors'); $error++; break; - } - elseif ($result < 0) + } elseif ($result < 0) { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } - else $nbok++; - } - else - { + } else $nbok++; + } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; @@ -1182,9 +1134,7 @@ if (!$error && $massaction == 'validate' && $permissiontoadd) if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); } //var_dump($listofobjectthirdparties);exit; @@ -1205,10 +1155,8 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissio setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } else - $nbok++; - } - else { + } else $nbok++; + } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; @@ -1218,15 +1166,14 @@ if (!$error && $massaction == 'closed' && $objectclass == "Propal" && $permissio if (!$error) { if ($nbok > 1) setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); - else - setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); + else setEventMessages($langs->trans("RecordsModified", $nbok), null, 'mesgs'); $db->commit(); - } - else { + } else { $db->rollback(); } } +//var_dump($_POST);var_dump($massaction);exit; // Delete record from mass action (massaction = 'delete' for direct delete, action/confirm='delete'/'yes' with a confirmation step before) if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == 'yes')) && $permissiontodelete) @@ -1269,11 +1216,8 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == ' setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } - else $nbok++; - } - else - { + } else $nbok++; + } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; @@ -1285,9 +1229,7 @@ if (!$error && ($massaction == 'delete' || ($action == 'delete' && $confirm == ' if ($nbok > 1) setEventMessages($langs->trans("RecordsDeleted", $nbok), null, 'mesgs'); else setEventMessages($langs->trans("RecordDeleted", $nbok), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); } //var_dump($listofobjectthirdparties);exit; @@ -1331,11 +1273,8 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; - } - else $nbok++; - } - else - { + } else $nbok++; + } else { setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); $error++; break; @@ -1347,9 +1286,7 @@ if (!$error && $massaction == 'generate_doc' && $permissiontoread) if ($nbok > 1) setEventMessages($langs->trans("RecordsGenerated", $nbok), null, 'mesgs'); else setEventMessages($langs->trans("RecordGenerated", $nbok), null, 'mesgs'); $db->commit(); - } - else - { + } else { $db->rollback(); } } diff --git a/htdocs/core/actions_printing.inc.php b/htdocs/core/actions_printing.inc.php index e2da8a4170c..e88fc937e38 100644 --- a/htdocs/core/actions_printing.inc.php +++ b/htdocs/core/actions_printing.inc.php @@ -75,8 +75,7 @@ if ($action == 'print_file' && $user->rights->printing->read) { setEventMessages($printer->error, $printer->errors); setEventMessages($langs->transnoentitiesnoconv("FileWasSentToPrinter", basename(GETPOST('file', 'alpha'))).' '.$langs->transnoentitiesnoconv("ViaModule").' '.$printer->name, null); } - } - catch (Exception $e) + } catch (Exception $e) { $ret = 1; setEventMessages($e->getMessage(), null, 'errors'); diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php index e23d2ce01a9..5be25002079 100644 --- a/htdocs/core/actions_sendmails.inc.php +++ b/htdocs/core/actions_sendmails.inc.php @@ -114,44 +114,43 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $result = $object->fetch($id); $sendtosocid = 0; // Id of related thirdparty - if (method_exists($object, "fetch_thirdparty") && !in_array($object->element, array('societe', 'member', 'user', 'expensereport', 'contact'))) + if (method_exists($object, "fetch_thirdparty") && !in_array($object->element, array('member', 'user', 'expensereport', 'societe', 'contact'))) { - $result = $object->fetch_thirdparty(); - if ($object->element == 'user' && $result == 0) $result = 1; // Even if not found, we consider ok + $resultthirdparty = $object->fetch_thirdparty(); $thirdparty = $object->thirdparty; - $sendtosocid = $thirdparty->id; - } - elseif ($object->element == 'member' || $object->element == 'user') + if (is_object($thirdparty)) $sendtosocid = $thirdparty->id; + } elseif ($object->element == 'member' || $object->element == 'user') { $thirdparty = $object; if ($object->socid > 0) $sendtosocid = $object->socid; - } - elseif ($object->element == 'expensereport') + } elseif ($object->element == 'expensereport') { $tmpuser = new User($db); $tmpuser->fetch($object->fk_user_author); $thirdparty = $tmpuser; if ($object->socid > 0) $sendtosocid = $object->socid; - } - elseif ($object->element == 'societe') + } elseif ($object->element == 'societe') { $thirdparty = $object; - if ($thirdparty->id > 0) $sendtosocid = $thirdparty->id; - } - elseif ($object->element == 'contact') + if (is_object($thirdparty) && $thirdparty->id > 0) $sendtosocid = $thirdparty->id; + } elseif ($object->element == 'contact') { $contact = $object; - if ($contact->id > 0) $sendtosocid = $contact->fetch_thirdparty()->id; - } - else dol_print_error('', "Use actions_sendmails.in.php for an element/object '".$object->element."' that is not supported"); + if ($contact->id > 0) { + $contact->fetch_thirdparty(); + $thirdparty = $contact->thirdparty; + if (is_object($thirdparty) && $thirdparty->id > 0) $sendtosocid = $thirdparty->id; + } + } else dol_print_error('', "Use actions_sendmails.in.php for an element/object '".$object->element."' that is not supported"); if (is_object($hookmanager)) { $parameters = array(); $reshook = $hookmanager->executeHooks('initSendToSocid', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks } + } else { + $thirdparty = $mysoc; } - else $thirdparty = $mysoc; if ($result > 0) { @@ -176,24 +175,24 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST // Recipients are provided into free text $tmparray[] = trim($_POST['sendto']); } + if (count($receiver) > 0) { + // Recipient was provided from combo list foreach ($receiver as $key=>$val) { - // Recipient was provided from combo list - if ($val == 'thirdparty') // Key selected means currentthird party (may be usd for current member or current user too) + if ($val == 'thirdparty') // Key selected means current third party ('thirdparty' may be used for current member or current user too) { $tmparray[] = dol_string_nospecial($thirdparty->getFullName($langs), ' ', array(",")).' <'.$thirdparty->email.'>'; } - // Recipient was provided from combo list elseif ($val == 'contact') // Key selected means current contact { $tmparray[] = dol_string_nospecial($contact->getFullName($langs), ' ', array(",")).' <'.$contact->email.'>'; - } - elseif ($val) // $val is the Id of a contact + $sendtoid[] = $contact->id; + } elseif ($val) // $val is the Id of a contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); - $sendtoid[] = $val; + $sendtoid[] = ((int) $val); } } } @@ -239,11 +238,11 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST elseif ($val == 'contact') // Key selected means current contact { $tmparray[] = dol_string_nospecial($contact->name, ' ', array(",")).' <'.$contact->email.'>'; - } - elseif ($val) // $val is the Id of a contact + //$sendtoid[] = $contact->id; TODO Add also id of contact in CC ? + } elseif ($val) // $val is the Id of a contact { $tmparray[] = $thirdparty->contact_get_property((int) $val, 'email'); - //$sendtoid[] = $val; TODO Add also id of contact in CC ? + //$sendtoid[] = ((int) $val); TODO Add also id of contact in CC ? } } } @@ -264,12 +263,12 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST if (dol_strlen($sendto)) { - // Define $urlwithroot - $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); - $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file - //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current + // Define $urlwithroot + $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); + $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file + //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; $langs->load("commercial"); @@ -277,22 +276,17 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $fromtype = GETPOST('fromtype', 'alpha'); if ($fromtype === 'robot') { $from = dol_string_nospecial($conf->global->MAIN_MAIL_EMAIL_FROM, ' ', array(",")).' <'.$conf->global->MAIN_MAIL_EMAIL_FROM.'>'; - } - elseif ($fromtype === 'user') { + } elseif ($fromtype === 'user') { $from = dol_string_nospecial($user->getFullName($langs), ' ', array(",")).' <'.$user->email.'>'; - } - elseif ($fromtype === 'company') { + } elseif ($fromtype === 'company') { $from = dol_string_nospecial($conf->global->MAIN_INFO_SOCIETE_NOM, ' ', array(",")).' <'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'>'; - } - elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { + } elseif (preg_match('/user_aliases_(\d+)/', $fromtype, $reg)) { $tmp = explode(',', $user->email_aliases); $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { + } elseif (preg_match('/global_aliases_(\d+)/', $fromtype, $reg)) { $tmp = explode(',', $conf->global->MAIN_INFO_SOCIETE_MAIL_ALIASES); $from = trim($tmp[($reg[1] - 1)]); - } - elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { + } elseif (preg_match('/senderprofile_(\d+)_(\d+)/', $fromtype, $reg)) { $sql = 'SELECT rowid, label, email FROM '.MAIN_DB_PREFIX.'c_email_senderprofile'; $sql .= ' WHERE rowid = '.(int) $reg[1]; $resql = $db->query($sql); @@ -301,14 +295,13 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST { $from = dol_string_nospecial($obj->label, ' ', array(",")).' <'.$obj->email.'>'; } - } - else { + } else { $from = dol_string_nospecial($_POST['fromname'], ' ', array(",")).' <'.$_POST['frommail'].'>'; } $replyto = dol_string_nospecial($_POST['replytoname'], ' ', array(",")).' <'.$_POST['replytomail'].'>'; - $message = GETPOST('message', 'none'); - $subject = GETPOST('subject', 'none'); + $message = GETPOST('message', 'restricthtml'); + $subject = GETPOST('subject', 'restricthtml'); // Make a change into HTML code to allow to include images from medias directory with an external reabable URL. // @@ -419,19 +412,17 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST { setEventMessages($mailfile->error, $mailfile->errors, 'errors'); $action = 'presend'; - } - else - { + } else { $result = $mailfile->sendfile(); if ($result) { // Initialisation of datas of object to call trigger if (is_object($object)) { - if (empty($actiontypecode)) $actiontypecode = 'AC_OTH_AUTO'; // Event insert into agenda automatically + if (empty($actiontypecode)) $actiontypecode = 'AC_OTH_AUTO'; // Event insert into agenda automatically $object->socid = $sendtosocid; // To link to a company - $object->sendtoid = $sendtoid; // To link to contact addresses. This is an array. + $object->sendtoid = $sendtoid; // To link to contact-addresses. This is an array. $object->actiontypecode = $actiontypecode; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...) $object->actionmsg = $actionmsg; // Long text (@todo Replace this with $message, we already have details of email in dedicated properties) $object->actionmsg2 = $actionmsg2; // Short text ($langs->transnoentities('MailSentBy')...); @@ -465,7 +456,7 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST if ($error) { setEventMessages($object->error, $object->errors, 'errors'); - } + } } // End call of triggers } @@ -479,18 +470,14 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST if (isset($paramname2) || isset($paramval2)) $moreparam .= '&'.($paramname2 ? $paramname2 : 'mid').'='.$paramval2; header('Location: '.$_SERVER["PHP_SELF"].'?'.($paramname ? $paramname : 'id').'='.(is_object($object) ? $object->id : '').$moreparam); exit; - } - else - { + } else { $langs->load("other"); $mesg = '
    '; if ($mailfile->error) { $mesg .= $langs->transnoentities('ErrorFailedToSendMail', dol_escape_htmltag($from), dol_escape_htmltag($sendto)); $mesg .= '
    '.$mailfile->error; - } - else - { + } else { $mesg .= 'No mail sent. Feature is disabled by option MAIN_DISABLE_ALL_MAILS'; } $mesg .= '
    '; @@ -499,18 +486,14 @@ if (($action == 'send' || $action == 'relance') && !$_POST['addfile'] && !$_POST $action = 'presend'; } } - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("MailTo")), null, 'warnings'); dol_syslog('Try to send email with no recipient defined', LOG_WARNING); $action = 'presend'; } - } - else - { - $langs->load("other"); + } else { + $langs->load("errors"); setEventMessages($langs->trans('ErrorFailedToReadObject', $object->element), null, 'errors'); dol_syslog('Failed to read data of object id='.$object->id.' element='.$object->element); $action = 'presend'; diff --git a/htdocs/core/actions_setmoduleoptions.inc.php b/htdocs/core/actions_setmoduleoptions.inc.php index 313375d1aa1..05be4a31d18 100644 --- a/htdocs/core/actions_setmoduleoptions.inc.php +++ b/htdocs/core/actions_setmoduleoptions.inc.php @@ -50,9 +50,7 @@ if ($action == 'update' && is_array($arrayofparameters)) { $db->commit(); if (empty($nomessageinupdate)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); if (empty($nomessageinupdate)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors'); } @@ -96,8 +94,7 @@ if ($action == 'setModuleOptions') unset($listofdir[$key]); continue; } if (!is_dir($tmpdir)) $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); - else - { + else { $upload_dir = $tmpdir; } } @@ -112,9 +109,7 @@ if ($action == 'setModuleOptions') { $db->commit(); if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); if (empty($nomessageinsetmoduleoptions)) setEventMessages($langs->trans("SetupNotSaved"), null, 'errors'); } diff --git a/htdocs/core/actions_setnotes.inc.php b/htdocs/core/actions_setnotes.inc.php index 3bbba0204f5..61db9b9fc55 100644 --- a/htdocs/core/actions_setnotes.inc.php +++ b/htdocs/core/actions_setnotes.inc.php @@ -33,7 +33,7 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', if (empty($action) || !is_object($object) || empty($id)) dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before'); if (empty($object->id)) $object->fetch($id); // Fetch may not be already done - $result_update = $object->update_note(dol_html_entity_decode(GETPOST('note_public', 'none'), ENT_QUOTES, 'UTF-8', 1), '_public'); + $result_update = $object->update_note(dol_html_entity_decode(GETPOST('note_public', 'restricthtml'), ENT_QUOTES, 'UTF-8', 1), '_public'); if ($result_update < 0) setEventMessages($object->error, $object->errors, 'errors'); elseif (in_array($object->table_element, array('supplier_proposal', 'propal', 'commande_fournisseur', 'commande', 'facture_fourn', 'facture'))) @@ -49,7 +49,7 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $hidedetails = (GETPOST('hidedetails', 'int') ? GETPOST('hidedetails', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS) ? 1 : 0)); $hidedesc = (GETPOST('hidedesc', 'int') ? GETPOST('hidedesc', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC) ? 1 : 0)); $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); @@ -63,6 +63,6 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', // Set public note if (empty($action) || !is_object($object) || empty($id)) dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before'); if (empty($object->id)) $object->fetch($id); // Fetch may not be already done - $result = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'none'), ENT_QUOTES), '_private'); + $result = $object->update_note(dol_html_entity_decode(GETPOST('note_private', 'restricthtml'), ENT_QUOTES), '_private'); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } diff --git a/htdocs/core/ajax/ajaxdirpreview.php b/htdocs/core/ajax/ajaxdirpreview.php index 5b656786c8f..41e23819266 100644 --- a/htdocs/core/ajax/ajaxdirpreview.php +++ b/htdocs/core/ajax/ajaxdirpreview.php @@ -34,28 +34,28 @@ if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); if (!isset($mode) || $mode != 'noajax') // For ajax call { - require_once '../../main.inc.php'; - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; - require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; + require_once '../../main.inc.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + require_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmdirectory.class.php'; - $action = GETPOST('action', 'aZ09'); - $file = urldecode(GETPOST('file', 'alpha')); - $section = GETPOST("section", 'alpha'); - $module = GETPOST("module", 'alpha'); - $urlsource = GETPOST("urlsource", 'alpha'); - $search_doc_ref = GETPOST('search_doc_ref', 'alpha'); + $action = GETPOST('action', 'aZ09'); + $file = urldecode(GETPOST('file', 'alpha')); + $section = GETPOST("section", 'alpha'); + $module = GETPOST("module", 'alpha'); + $urlsource = GETPOST("urlsource", 'alpha'); + $search_doc_ref = GETPOST('search_doc_ref', 'alpha'); - $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; - $sortfield = GETPOST("sortfield", 'alpha'); - $sortorder = GETPOST("sortorder", 'alpha'); - $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); - if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 - $offset = $limit * $page; - $pageprev = $page - 1; - $pagenext = $page + 1; - if (!$sortorder) $sortorder = "ASC"; - if (!$sortfield) $sortfield = "name"; + $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; + $sortfield = GETPOST("sortfield", 'alpha'); + $sortorder = GETPOST("sortorder", 'alpha'); + $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); + if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 + $offset = $limit * $page; + $pageprev = $page - 1; + $pagenext = $page + 1; + if (!$sortorder) $sortorder = "ASC"; + if (!$sortfield) $sortfield = "name"; $rootdirfordoc = $conf->ecm->dir_output; @@ -63,31 +63,30 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $ecmdir = new EcmDirectory($db); if ($section > 0) { - $result = $ecmdir->fetch($section); - if (!$result > 0) - { - //dol_print_error($db,$ecmdir->error); - //exit; - } + $result = $ecmdir->fetch($section); + if (!$result > 0) + { + //dol_print_error($db,$ecmdir->error); + //exit; + } } } else // For no ajax call { $rootdirfordoc = $conf->ecm->dir_output; $ecmdir = new EcmDirectory($db); - $relativepath = ''; - if ($section > 0) - { - $result = $ecmdir->fetch($section); - if (!$result > 0) - { - dol_print_error($db, $ecmdir->error); - exit; - } + $relativepath = ''; + if ($section > 0) + { + $result = $ecmdir->fetch($section); + if (!$result > 0) + { + dol_print_error($db, $ecmdir->error); + exit; + } - $relativepath = $ecmdir->getRelativePath(); // Example 'mydir/' - } - elseif (GETPOST('section_dir')) + $relativepath = $ecmdir->getRelativePath(); // Example 'mydir/' + } elseif (GETPOST('section_dir')) { $relativepath = GETPOST('section_dir'); } @@ -114,10 +113,10 @@ if ($user->socid > 0) $socid = $user->socid; // On interdit les remontees de repertoire ainsi que les pipe dans les noms de fichiers. if (preg_match('/\.\./', $upload_dir) || preg_match('/[<>|]/', $upload_dir)) { - dol_syslog("Refused to deliver file ".$upload_dir); - // Do no show plain path in shown error message - dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $upload_dir)); - exit; + dol_syslog("Refused to deliver file ".$upload_dir); + // Do no show plain path in shown error message + dol_print_error(0, $langs->trans("ErrorFileNameInvalid", $upload_dir)); + exit; } // Check permissions @@ -146,10 +145,10 @@ if ($modulepart == 'medias') if (!isset($mode) || $mode != 'noajax') { // Ajout directives pour resoudre bug IE - header('Cache-Control: Public, must-revalidate'); - header('Pragma: public'); + header('Cache-Control: Public, must-revalidate'); + header('Pragma: public'); - top_httphead(); + top_httphead(); } $type = 'directory'; @@ -157,8 +156,8 @@ $type = 'directory'; // This test if file exists should be useless. We keep it to find bug more easily if (!dol_is_dir($upload_dir)) { - //dol_mkdir($upload_dir); - /*$langs->load("install"); + //dol_mkdir($upload_dir); + /*$langs->load("install"); dol_print_error(0,$langs->trans("ErrorDirDoesNotExists",$upload_dir)); exit;*/ } @@ -174,72 +173,76 @@ if (!empty($pageid)) $param .= '&pageid='.urlencode($pageid); // Dir scan if ($type == 'directory') { - $formfile = new FormFile($db); + $formfile = new FormFile($db); - $maxlengthname = 40; - $excludefiles = array('^SPECIMEN\.pdf$', '^\.', '(\.meta|_preview.*\.png)$', '^temp$', '^payments$', '^CVS$', '^thumbs$'); - $sorting = (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC); + $maxlengthname = 40; + $excludefiles = array('^SPECIMEN\.pdf$', '^\.', '(\.meta|_preview.*\.png)$', '^temp$', '^payments$', '^CVS$', '^thumbs$'); + $sorting = (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC); - // Right area. If module is defined here, we are in automatic ecm. - $automodules = array('company', 'invoice', 'invoice_supplier', 'propal', 'supplier_proposal', 'order', 'order_supplier', 'contract', 'product', 'tax', 'project', 'fichinter', 'user', 'expensereport', 'holiday', 'banque'); + // Right area. If module is defined here, we are in automatic ecm. + $automodules = array( + 'company', + 'invoice', + 'invoice_supplier', + 'propal', + 'supplier_proposal', + 'order', + 'order_supplier', + 'contract', + 'product', + 'tax', + 'project', + 'fichinter', + 'user', + 'expensereport', + 'holiday', + 'recruitment-recruitmentcandidature', + 'banque', + 'mrp-mo' + ); - // TODO change for multicompany sharing - // Auto area for suppliers invoices - if ($module == 'company') $upload_dir = $conf->societe->dir_output; - // Auto area for suppliers invoices - elseif ($module == 'invoice') $upload_dir = $conf->facture->dir_output; - // Auto area for suppliers invoices - elseif ($module == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; - // Auto area for customers proposal - elseif ($module == 'propal') $upload_dir = $conf->propal->dir_output; - // Auto area for suppliers proposal - elseif ($module == 'supplier_proposal') $upload_dir = $conf->supplier_proposal->dir_output; - // Auto area for customers orders - elseif ($module == 'order') $upload_dir = $conf->commande->dir_output; - // Auto area for suppliers orders - elseif ($module == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; - // Auto area for suppliers invoices - elseif ($module == 'contract') $upload_dir = $conf->contrat->dir_output; - // Auto area for products - elseif ($module == 'product') $upload_dir = $conf->product->dir_output; - // Auto area for suppliers invoices - elseif ($module == 'tax') $upload_dir = $conf->tax->dir_output; - // Auto area for projects - elseif ($module == 'project') $upload_dir = $conf->projet->dir_output; - // Auto area for interventions - elseif ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output; - // Auto area for users - elseif ($module == 'user') $upload_dir = $conf->user->dir_output; - // Auto area for expense report - elseif ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output; - // Auto area for holiday - elseif ($module == 'holiday') $upload_dir = $conf->holiday->dir_output; - // Auto area for holiday - elseif ($module == 'banque') $upload_dir = $conf->bank->dir_output; + // TODO change for multicompany sharing + if ($module == 'company') $upload_dir = $conf->societe->dir_output; + elseif ($module == 'invoice') $upload_dir = $conf->facture->dir_output; + elseif ($module == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; + elseif ($module == 'propal') $upload_dir = $conf->propal->dir_output; + elseif ($module == 'supplier_proposal') $upload_dir = $conf->supplier_proposal->dir_output; + elseif ($module == 'order') $upload_dir = $conf->commande->dir_output; + elseif ($module == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; + elseif ($module == 'contract') $upload_dir = $conf->contrat->dir_output; + elseif ($module == 'product') $upload_dir = $conf->product->dir_output; + elseif ($module == 'tax') $upload_dir = $conf->tax->dir_output; + elseif ($module == 'project') $upload_dir = $conf->projet->dir_output; + elseif ($module == 'fichinter') $upload_dir = $conf->ficheinter->dir_output; + elseif ($module == 'user') $upload_dir = $conf->user->dir_output; + elseif ($module == 'expensereport') $upload_dir = $conf->expensereport->dir_output; + elseif ($module == 'holiday') $upload_dir = $conf->holiday->dir_output; + elseif ($module == 'recruitment-recruitmentcandidature') $upload_dir = $conf->recruitment->dir_output.'/recruitmentcandidature'; + elseif ($module == 'banque') $upload_dir = $conf->bank->dir_output; + elseif ($module == 'mrp-mo') $upload_dir = $conf->mrp->dir_output.'/mo'; - // Automatic list - if (in_array($module, $automodules)) - { - $param .= '&module='.$module; - if (isset($search_doc_ref) && $search_doc_ref != '') $param .= '&search_doc_ref='.urlencode($search_doc_ref); + // Automatic list + if (in_array($module, $automodules)) + { + $param .= '&module='.$module; + if (isset($search_doc_ref) && $search_doc_ref != '') $param .= '&search_doc_ref='.urlencode($search_doc_ref); - $textifempty = ($section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("NoFileFound"))); + $textifempty = ($section ? $langs->trans("NoFileFound") : ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("NoFileFound"))); - if ($module == 'company') $excludefiles[] = '^contact$'; // The subdir 'contact' contains files of contacts with no id of thirdparty. + if ($module == 'company') $excludefiles[] = '^contact$'; // The subdir 'contact' contains files of contacts with no id of thirdparty. - $filter = preg_quote($search_doc_ref, '/'); - $filearray = dol_dir_list($upload_dir, "files", 1, $filter, $excludefiles, $sortfield, $sorting, 1); + $filter = preg_quote($search_doc_ref, '/'); + $filearray = dol_dir_list($upload_dir, "files", 1, $filter, $excludefiles, $sortfield, $sorting, 1); - $perm = $user->rights->ecm->upload; + $perm = $user->rights->ecm->upload; - $formfile->list_of_autoecmfiles($upload_dir, $filearray, $module, $param, 1, '', $perm, 1, $textifempty, $maxlengthname, $url, 1); - } - // Manual list - else - { - if ($module == 'medias') - { - /* + $formfile->list_of_autoecmfiles($upload_dir, $filearray, $module, $param, 1, '', $perm, 1, $textifempty, $maxlengthname, $url, 1); + } + // Manual list + else { + if ($module == 'medias') + { + /* $_POST is array like 'token' => string '062380e11b7dcd009d07318b57b71750' (length=32) 'action' => string 'file_manager' (length=12) @@ -250,91 +253,82 @@ if ($type == 'directory') 'max_file_size' => string '2097152' (length=7) 'sendit' => string 'Envoyer fichier' (length=15) */ - $relativepath = GETPOST('file', 'alpha') ?GETPOST('file', 'alpha') : GETPOST('section_dir', 'alpha'); - if ($relativepath && $relativepath != '/') $relativepath .= '/'; - $upload_dir = $dolibarr_main_data_root.'/'.$module.'/'.$relativepath; - if (GETPOSTISSET('website') || GETPOSTISSET('file_manager')) - { - $param .= '&file_manager=1'; - if (!preg_match('/website=/', $param)) $param .= '&website='.urlencode(GETPOST('website', 'alpha')); - if (!preg_match('/pageid=/', $param)) $param .= '&pageid='.urlencode(GETPOST('pageid', 'int')); - //if (!preg_match('/backtopage=/',$param)) $param.='&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid); - } - } - else - { - $relativepath = $ecmdir->getRelativePath(); - $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; - } + $relativepath = GETPOST('file', 'alpha') ?GETPOST('file', 'alpha') : GETPOST('section_dir', 'alpha'); + if ($relativepath && $relativepath != '/') $relativepath .= '/'; + $upload_dir = $dolibarr_main_data_root.'/'.$module.'/'.$relativepath; + if (GETPOSTISSET('website') || GETPOSTISSET('file_manager')) + { + $param .= '&file_manager=1'; + if (!preg_match('/website=/', $param)) $param .= '&website='.urlencode(GETPOST('website', 'alpha')); + if (!preg_match('/pageid=/', $param)) $param .= '&pageid='.urlencode(GETPOST('pageid', 'int')); + //if (!preg_match('/backtopage=/',$param)) $param.='&backtopage='.urlencode($_SERVER["PHP_SELF"].'?file_manager=1&website='.$websitekey.'&pageid='.$pageid); + } + } else { + $relativepath = $ecmdir->getRelativePath(); + $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; + } - // If $section defined with value 0 + // If $section defined with value 0 if (($section === '0' || empty($section)) && ($module != 'medias')) - { - $filearray = array(); - } - else - { - $filearray = dol_dir_list($upload_dir, "files", 0, '', array('^\.', '(\.meta|_preview.*\.png)$', '^temp$', '^CVS$'), $sortfield, $sorting, 1); - } + { + $filearray = array(); + } else { + $filearray = dol_dir_list($upload_dir, "files", 0, '', array('^\.', '(\.meta|_preview.*\.png)$', '^temp$', '^CVS$'), $sortfield, $sorting, 1); + } - if ($section) - { - $param .= '§ion='.$section; - if (isset($search_doc_ref) && $search_doc_ref != '') $param .= '&search_doc_ref='.$search_doc_ref; + if ($section) + { + $param .= '§ion='.$section; + if (isset($search_doc_ref) && $search_doc_ref != '') $param .= '&search_doc_ref='.$search_doc_ref; - $textifempty = $langs->trans('NoFileFound'); - } - elseif ($section === '0') - { - if ($module == 'ecm') $textifempty = '
    '.$langs->trans("DirNotSynchronizedSyncFirst").'

    '; - else $textifempty = $langs->trans('NoFileFound'); - } - else $textifempty = ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("ECMSelectASection")); + $textifempty = $langs->trans('NoFileFound'); + } elseif ($section === '0') + { + if ($module == 'ecm') $textifempty = '
    '.$langs->trans("DirNotSynchronizedSyncFirst").'

    '; + else $textifempty = $langs->trans('NoFileFound'); + } else $textifempty = ($showonrightsize == 'featurenotyetavailable' ? $langs->trans("FeatureNotYetAvailable") : $langs->trans("ECMSelectASection")); - if ($module == 'medias') - { - $useinecm = 6; - $modulepart = 'medias'; - $perm = ($user->rights->website->write || $user->rights->emailing->creer); - $title = 'none'; - } - elseif ($module == 'ecm') // DMS/ECM -> manual structure - { - if ($user->rights->ecm->read) - { - // Buttons: Preview - $useinecm = 2; - } + if ($module == 'medias') + { + $useinecm = 6; + $modulepart = 'medias'; + $perm = ($user->rights->website->write || $user->rights->emailing->creer); + $title = 'none'; + } elseif ($module == 'ecm') // DMS/ECM -> manual structure + { + if ($user->rights->ecm->read) + { + // Buttons: Preview + $useinecm = 2; + } - if ($user->rights->ecm->upload) - { - // Buttons: Preview + Delete - $useinecm = 4; - } + if ($user->rights->ecm->upload) + { + // Buttons: Preview + Delete + $useinecm = 4; + } - if ($user->rights->ecm->setup) - { - // Buttons: Preview + Delete + Edit - $useinecm = 5; - } + if ($user->rights->ecm->setup) + { + // Buttons: Preview + Delete + Edit + $useinecm = 5; + } - $perm = $user->rights->ecm->upload; - $modulepart = 'ecm'; - $title = ''; // Use default - } - else - { - $useinecm = 5; - $modulepart = 'ecm'; - $perm = $user->rights->ecm->upload; - $title = ''; // Use default - } + $perm = $user->rights->ecm->upload; + $modulepart = 'ecm'; + $title = ''; // Use default + } else { + $useinecm = 5; + $modulepart = 'ecm'; + $perm = $user->rights->ecm->upload; + $title = ''; // Use default + } - // When we show list of files for ECM files, $filearray contains file list, and directory is defined with modulepart + section into $param - // When we show list of files for a directory, $filearray ciontains file list, and directory is defined with modulepart + $relativepath - //var_dump("section=".$section." title=".$title." modulepart=".$modulepart." useinecm=".$useinecm." perm=".$perm." relativepath=".$relativepath." param=".$param." url=".$url); - $formfile->list_of_documents($filearray, '', $modulepart, $param, 1, $relativepath, $perm, $useinecm, $textifempty, $maxlengthname, $title, $url, 0, $perm); - } + // When we show list of files for ECM files, $filearray contains file list, and directory is defined with modulepart + section into $param + // When we show list of files for a directory, $filearray ciontains file list, and directory is defined with modulepart + $relativepath + //var_dump("section=".$section." title=".$title." modulepart=".$modulepart." useinecm=".$useinecm." perm=".$perm." relativepath=".$relativepath." param=".$param." url=".$url); + $formfile->list_of_documents($filearray, '', $modulepart, $param, 1, $relativepath, $perm, $useinecm, $textifempty, $maxlengthname, $title, $url, 0, $perm); + } } diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 3e54532668a..620643da8f2 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -49,8 +49,7 @@ if (!isset($mode) || $mode != 'noajax') // For ajax call $preopened = GETPOST('preopened'); if ($selecteddir != '/') $selecteddir = preg_replace('/\/$/', '', $selecteddir); // We removed last '/' except if it is '/' -} -else // For no ajax call +} else // For no ajax call { //if (GETPOST('preopened')) { $_GET['dir'] = $_POST['dir'] = GETPOST('preopened'); } @@ -73,8 +72,7 @@ if ($modulepart == 'ecm') { $fullpathselecteddir = $conf->ecm->dir_output.'/'.($selecteddir != '/' ? $selecteddir : ''); $fullpathpreopened = $conf->ecm->dir_output.'/'.($preopened != '/' ? $preopened : ''); -} -elseif ($modulepart == 'medias') +} elseif ($modulepart == 'medias') { $fullpathselecteddir = $dolibarr_main_data_root.'/medias/'.($selecteddir != '/' ? $selecteddir : ''); $fullpathpreopened = $dolibarr_main_data_root.'/medias/'.($preopened != '/' ? $preopened : ''); @@ -95,8 +93,7 @@ if (preg_match('/\.\./', $fullpathselecteddir) || preg_match('/[<>|]/', $fullpat if ($modulepart == 'ecm') { if (!$user->rights->ecm->read) accessforbidden(); -} -elseif ($modulepart == 'medias') +} elseif ($modulepart == 'medias') { // Always allowed } @@ -471,8 +468,7 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, if ($modulepart == 'ecm') { $newfullpathselecteddir = $conf->ecm->dir_output.'/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : ''); - } - elseif ($modulepart == 'medias') + } elseif ($modulepart == 'medias') { $newfullpathselecteddir = $dolibarr_main_data_root.'/medias/'.($val['fullrelativename'] != '/' ? $val['fullrelativename'] : ''); } @@ -486,7 +482,6 @@ function treeOutputForAbsoluteDir($sqltree, $selecteddir, $fullpathselecteddir, echo "
\n"; } - } - else print "PermissionDenied"; + } else print "PermissionDenied"; } } diff --git a/htdocs/core/ajax/check_notifications.php b/htdocs/core/ajax/check_notifications.php index d8f4985f6d8..01cb85008bd 100644 --- a/htdocs/core/ajax/check_notifications.php +++ b/htdocs/core/ajax/check_notifications.php @@ -1,7 +1,7 @@ * Copyright (C) 2017 Juanjo Menent - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,27 +18,83 @@ */ if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); -if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Disables token renewal +if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); +if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); + +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data +//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', '1'); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL', '1'); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL' + require '../../main.inc.php'; +//$time = (int) GETPOST('time', 'int'); // Use the time parameter that is always increased by time_update, even if call is late +$time=dol_now(); +$action = GETPOST('action', 'aZ09'); +$listofreminderids = GETPOST('listofreminderids', 'aZ09'); + + +/* + * Actions + */ + +if ($action == 'stopreminder') { + dol_syslog("Clear notification for listofreminderids=".$listofreminderids); + $listofreminderid = GETPOST('listofreminderids', 'intcomma'); + + // Set the reminder as done + //foreach ($listofreminderidsarray as $listofreminderid) { + // if (empty($listofreminderid)) continue; + //$sql = 'DELETE FROM '.MAIN_DB_PREFIX.'action_reminder WHERE rowid = '.$listofreminderid.' AND fk_user = '.$user->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.'actioncomm_reminder SET status = 1'; + $sql .= ' WHERE status = 0 AND rowid IN ('.$db->sanitize($db->escape($listofreminderid)).')'; + $sql .= ' AND fk_user = '.$user->id.' AND entity = '.$conf->entity; + $resql = $db->query($sql); + if (!$resql) { + dol_print_error($db); + } + //} + + include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + + // Clean database + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'actioncomm_reminder'; + $sql .= " WHERE dateremind < '".$db->idate(dol_time_plus_duree(dol_now(), -1, 'm'))."'"; + $resql = $db->query($sql); + if (!$resql) { + dol_print_error($db); + } + + exit; +} + /* * View */ -top_httphead('text/html'); // TODO Use a json mime type +top_httphead('application/json'); global $user, $db, $langs, $conf; -$time = (int) GETPOST('time', 'int'); // Use the time parameter that is always increased by time_update, even if call is late -//$time=dol_now(); - - $eventfound = array(); //Uncomment this to force a test //$eventfound[]=array('type'=>'agenda', 'id'=>1, 'tipo'=>'eee', 'location'=>'aaa'); @@ -46,9 +102,10 @@ $eventfound = array(); //dol_syslog('time='.$time.' $_SESSION[auto_ck_events_not_before]='.$_SESSION['auto_check_events_not_before']); // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened. -if ($time >= $_SESSION['auto_check_events_not_before']) +// This need to extend period to be sure to not miss and save in session what we notified to avoid duplicate. +if (empty($_SESSION['auto_check_events_not_before']) || $time >= $_SESSION['auto_check_events_not_before'] || GETPOST('forcechecknow', 'int')) { - $time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined + /*$time_update = (int) $conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY; // Always defined if (!empty($_SESSION['auto_check_events_not_before'])) { // We start scan from the not before so if two tabs were opend at differents seconds and we close one (so the js timer), @@ -60,15 +117,14 @@ if ($time >= $_SESSION['auto_check_events_not_before']) dol_syslog("We ask to check browser notification on a too large period. We fix this with current date."); $starttime = $time; } - } - else - { + } else { $starttime = $time; } $_SESSION['auto_check_events_not_before'] = $time + $time_update; + */ - // Force save of session change we did. + // Force save of the session change we did. // WARNING: Any change in sessions after that will not be saved ! session_write_close(); @@ -77,43 +133,42 @@ if ($time >= $_SESSION['auto_check_events_not_before']) dol_syslog('NEW $_SESSION[auto_check_events_not_before]='.$_SESSION['auto_check_events_not_before']); - $sql = 'SELECT id'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm a, '.MAIN_DB_PREFIX.'actioncomm_resources ar'; - $sql .= ' WHERE a.id = ar.fk_actioncomm'; - // TODO Try to make a solution with only a javascript timer that is easier. Difficulty is to avoid notification twice when several tabs are opened. - // This need to extend period to be sure to not miss and save in session what we notified to avoid duplicate (save is not done yet). - $sql .= " AND datep BETWEEN '".$db->idate($starttime)."' AND '".$db->idate($time + $time_update - 1)."'"; - $sql .= ' AND a.code <> "AC_OTH_AUTO"'; - $sql .= ' AND ar.element_type = "user"'; - $sql .= ' AND ar.fk_element = '.$user->id; + $sql = 'SELECT a.id as id_agenda, a.code, a.datep, a.label, a.location, ar.rowid as id_reminder, ar.dateremind, ar.fk_user as id_user_reminder'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'actioncomm as a'; + if (!empty($user->conf->MAIN_USER_WANT_ALL_EVENTS_NOTIFICATIONS)) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.$user->id; + $sql .= ' WHERE a.code <> "AC_OTH_AUTO"'; + $sql .= ' AND ('; + $sql .= " (ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity; + $sql .= ' )'; + } else { + $sql .= ' JOIN '.MAIN_DB_PREFIX.'actioncomm_reminder as ar ON a.id = ar.fk_actioncomm AND ar.fk_user = '.$user->id; + $sql .= " AND ar.typeremind = 'browser' AND ar.dateremind < '".$db->idate(dol_now())."' AND ar.status = 0 AND ar.entity = ".$conf->entity; + } + $sql .= $db->order('datep', 'ASC'); $sql .= ' LIMIT 10'; // Avoid too many notification at once $resql = $db->query($sql); if ($resql) { - $actionmod = new ActionComm($db); - while ($obj = $db->fetch_object($resql)) { - // Load translation files required by the page - $langs->loadLangs(array('agenda', 'commercial')); - - $actionmod->fetch($obj->id); - // Message must be formated and translated to be used with javascript directly $event = array(); $event['type'] = 'agenda'; - $event['id'] = $actionmod->id; - $event['tipo'] = $langs->transnoentities('Action'.$actionmod->code); - $event['titulo'] = $actionmod->label; - $event['location'] = $langs->transnoentities('Location').': '.$actionmod->location; + $event['id_reminder'] = $obj->id_reminder; + $event['id_agenda'] = $obj->id_agenda; + $event['id_user'] = $obj->id_user_reminder; + $event['code'] = $obj->code; + $event['label'] = $obj->label; + $event['location'] = $obj->location; + $event['reminder_date_formated'] = dol_print_date($db->jdate($obj->dateremind), 'standard'); + $event['event_date_start_formated'] = dol_print_date($db->jdate($obj->datep), 'standard'); - $eventfound[] = $event; + $eventfound[$obj->id_agenda] = $event; } - } - else - { + } else { dol_syslog("Error sql = ".$db->lasterror(), LOG_ERR); } } -print json_encode($eventfound); +print json_encode(array('pastreminders'=>$eventfound, 'nextreminder'=>'')); diff --git a/htdocs/core/ajax/constantonoff.php b/htdocs/core/ajax/constantonoff.php index c7e5bbd8991..710759e10bb 100644 --- a/htdocs/core/ajax/constantonoff.php +++ b/htdocs/core/ajax/constantonoff.php @@ -26,13 +26,15 @@ if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); +if (!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Token is required even in GET mode require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // set or del $name = GETPOST('name', 'alpha'); + /* * View */ @@ -46,7 +48,7 @@ top_httphead(); //print ''."\n"; -// Registering the location of boxes +// Registering the new value of constant if (!empty($action) && !empty($name)) { $entity = GETPOST('entity', 'int'); @@ -57,10 +59,11 @@ if (!empty($action) && !empty($name)) if ($action == 'set') { dolibarr_set_const($db, $name, $value, 'chaine', 0, '', $entity); - } - elseif ($action == 'del') + } elseif ($action == 'del') { dolibarr_del_const($db, $name, $entity); } } +} else { + http_response_code(403); } diff --git a/htdocs/core/ajax/contacts.php b/htdocs/core/ajax/contacts.php index 67e769ab17f..6b476a8f59a 100644 --- a/htdocs/core/ajax/contacts.php +++ b/htdocs/core/ajax/contacts.php @@ -1,6 +1,6 @@ - * Copyright (C) 2016 Laurent Destailleur + * Copyright (C) 2020 Laurent Destailleur * * 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 @@ -27,11 +27,15 @@ if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); require '../../main.inc.php'; -$id = GETPOST('id', 'int'); -$action = GETPOST('action', 'alpha'); +$id = GETPOST('id', 'int'); // id of thirdparty +$action = GETPOST('action', 'aZ09'); $htmlname = GETPOST('htmlname', 'alpha'); $showempty = GETPOST('showempty', 'int'); +// Security check +$result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0); + + /* * View */ diff --git a/htdocs/core/ajax/extraparams.php b/htdocs/core/ajax/extraparams.php index a3db4505f70..16f39af9bde 100644 --- a/htdocs/core/ajax/extraparams.php +++ b/htdocs/core/ajax/extraparams.php @@ -51,20 +51,38 @@ if (!empty($id) && !empty($element) && !empty($htmlelement) && !empty($type)) $classpath = $subelement = $element; // For compatibility - if ($element == 'order' || $element == 'commande') { $classpath = $subelement = 'commande'; } - elseif ($element == 'propal') { $classpath = 'comm/propal'; $subelement = 'propal'; } - elseif ($element == 'facture') { $classpath = 'compta/facture'; $subelement = 'facture'; } - elseif ($element == 'contract') { $classpath = $subelement = 'contrat'; } - elseif ($element == 'shipping') { $classpath = $subelement = 'expedition'; } - elseif ($element == 'deplacement') { $classpath = 'compta/deplacement'; $subelement = 'deplacement'; } - elseif ($element == 'order_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.commande'; } - elseif ($element == 'invoice_supplier') { $classpath = 'fourn'; $subelement = 'fournisseur.facture'; } + if ($element == 'order' || $element == 'commande') { + $classpath = $subelement = 'commande'; + } elseif ($element == 'propal') { + $classpath = 'comm/propal'; + $subelement = 'propal'; + } elseif ($element == 'facture') { + $classpath = 'compta/facture'; + $subelement = 'facture'; + } elseif ($element == 'contract') { + $classpath = $subelement = 'contrat'; + } elseif ($element == 'shipping') { + $classpath = $subelement = 'expedition'; + } elseif ($element == 'deplacement') { + $classpath = 'compta/deplacement'; + $subelement = 'deplacement'; + } elseif ($element == 'order_supplier') { + $classpath = 'fourn'; + $subelement = 'fournisseur.commande'; + } elseif ($element == 'invoice_supplier') { + $classpath = 'fourn'; + $subelement = 'fournisseur.facture'; + } dol_include_once('/'.$classpath.'/class/'.$subelement.'.class.php'); - if ($element == 'order_supplier') { $classname = 'CommandeFournisseur'; } - elseif ($element == 'invoice_supplier') { $classname = 'FactureFournisseur'; } - else $classname = ucfirst($subelement); + if ($element == 'order_supplier') { + $classname = 'CommandeFournisseur'; + } elseif ($element == 'invoice_supplier') { + $classname = 'FactureFournisseur'; + } else { + $classname = ucfirst($subelement); + } $object = new $classname($db); $object->fetch($id); diff --git a/htdocs/core/ajax/loadinplace.php b/htdocs/core/ajax/loadinplace.php index 14258e1ebb1..b1a72868312 100644 --- a/htdocs/core/ajax/loadinplace.php +++ b/htdocs/core/ajax/loadinplace.php @@ -62,8 +62,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e elseif ($element == 'order_supplier') { $element = 'fournisseur'; $subelement = 'commande'; - } - elseif ($element == 'invoice_supplier') { + } elseif ($element == 'invoice_supplier') { $element = 'fournisseur'; $subelement = 'facture'; } @@ -83,8 +82,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e { $ret = $form->$methodname(); if ($ret > 0) echo json_encode($form->$cachename); - } - elseif (!empty($ext_element)) + } elseif (!empty($ext_element)) { $module = $subelement = $ext_element; if (preg_match('/^([^_]+)_([^_]+)/i', $ext_element, $regs)) @@ -99,16 +97,12 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e $ret = $object->$methodname($fk_element); if ($ret > 0) echo json_encode($object->$cachename); } - } - else - { + } else { $object = new GenericObject($db); $value = $object->$loadmethod($table_element, $fk_element, $field); echo $value; } - } - else - { + } else { echo $langs->transnoentities('NotEnoughPermissions'); } } diff --git a/htdocs/core/ajax/objectonoff.php b/htdocs/core/ajax/objectonoff.php index f7bf1d6299c..ceb221b4870 100644 --- a/htdocs/core/ajax/objectonoff.php +++ b/htdocs/core/ajax/objectonoff.php @@ -30,7 +30,7 @@ if (!defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); $value = GETPOST('value', 'int'); $field = GETPOST('field', 'alpha'); @@ -43,9 +43,9 @@ if (!empty($user->socid)) { $socid = $user->socid; } -if (empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { +/*if (empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { accessforbidden('Calling this file is allowed only when MAIN_DIRECT_STATUS_UPDATE is set'); -} +}*/ /* @@ -58,11 +58,9 @@ print '\n"; + $out .= "\n"; $this->fetchValuesForExtraLanguages(); if (!is_object($form)) $form = new Form($this->db); $htmltext = ''; @@ -715,12 +703,11 @@ abstract class CommonObject if (!in_array($this->country_code, $countriesusingstate) && empty($conf->global->MAIN_FORCE_STATE_INTO_ADDRESS) // If MAIN_FORCE_STATE_INTO_ADDRESS is on, state is already returned previously with getFullAddress && empty($conf->global->SOCIETE_DISABLE_STATE) && $this->state) { - if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) { - $out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state; - } - else { - $out .= ($outdone ? ' - ' : '').$this->state; - } + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 && $this->region) { + $out .= ($outdone ? ' - ' : '').$this->region.' - '.$this->state; + } else { + $out .= ($outdone ? ' - ' : '').$this->state; + } $outdone++; } @@ -759,8 +746,8 @@ abstract class CommonObject } if (!empty($this->url)) { - //$out.=dol_print_url($this->url,'_goout',0,1);//steve changed to blank - $out .= dol_print_url($this->url, '_blank', 0, 1); + //$out.=dol_print_url($this->url,'_goout',0,1);//steve changed to blank + $out .= dol_print_url($this->url, '_blank', 0, 1); $outdone++; } @@ -845,10 +832,8 @@ abstract class CommonObject $this->errors = $ecmfile->errors; } */ - } - else return ''; - } - elseif (empty($ecmfile->share)) + } else return ''; + } elseif (empty($ecmfile->share)) { // Add entry into index if ($initsharekey) @@ -856,8 +841,7 @@ abstract class CommonObject require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; $ecmfile->share = getRandomPassword(true); $ecmfile->update($user); - } - else return ''; + } else return ''; } // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); @@ -879,9 +863,7 @@ abstract class CommonObject if ($relativelink) { $linktoreturn = 'document.php'.($paramlink ? '?'.$paramlink : ''); - } - else - { + } else { $linktoreturn = $urlwithroot.'/document.php'.($paramlink ? '?'.$paramlink : ''); } @@ -890,7 +872,7 @@ abstract class CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add a link between element $this->element and a contact * @@ -902,7 +884,7 @@ abstract class CommonObject */ public function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0) { - // phpcs:enable + // phpcs:enable global $user, $langs; @@ -928,9 +910,7 @@ abstract class CommonObject if (is_numeric($type_contact)) { $id_type_contact = $type_contact; - } - else - { + } else { // We look for id type_contact $sql = "SELECT tc.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."c_type_contact as tc"; @@ -993,18 +973,14 @@ abstract class CommonObject $this->db->commit(); return 1; - } - else - { + } else { if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $this->error = $this->db->errno(); $this->db->rollback(); echo 'err rollback'; return -2; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -1013,7 +989,7 @@ abstract class CommonObject } else return 0; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Copy contact from one element to current * @@ -1023,7 +999,7 @@ abstract class CommonObject */ public function copy_linked_contact($objFrom, $source = 'internal') { - // phpcs:enable + // phpcs:enable $contacts = $objFrom->liste_contact(-1, $source); foreach ($contacts as $contact) { @@ -1036,7 +1012,7 @@ abstract class CommonObject return 1; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update a link to contact line * @@ -1048,26 +1024,24 @@ abstract class CommonObject */ public function update_contact($rowid, $statut, $type_contact_id = 0, $fk_socpeople = 0) { - // phpcs:enable + // phpcs:enable // Insert into database $sql = "UPDATE ".MAIN_DB_PREFIX."element_contact set"; $sql .= " statut = ".$statut; - if ($type_contact_id) $sql .= ", fk_c_type_contact = '".$type_contact_id."'"; - if ($fk_socpeople) $sql .= ", fk_socpeople = '".$fk_socpeople."'"; + if ($type_contact_id) $sql .= ", fk_c_type_contact = ".((int) $type_contact_id); + if ($fk_socpeople) $sql .= ", fk_socpeople = ".((int) $fk_socpeople); $sql .= " where rowid = ".$rowid; $resql = $this->db->query($sql); if ($resql) { return 0; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete a link to contact line * @@ -1077,7 +1051,7 @@ abstract class CommonObject */ public function delete_contact($rowid, $notrigger = 0) { - // phpcs:enable + // phpcs:enable global $user; @@ -1097,16 +1071,14 @@ abstract class CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete all links between an object $this and all its contacts * @@ -1116,7 +1088,7 @@ abstract class CommonObject */ public function delete_linked_contact($source = '', $code = '') { - // phpcs:enable + // phpcs:enable $temp = array(); $typeContact = $this->liste_type_contact($source, '', 0, 0, $code); @@ -1135,15 +1107,13 @@ abstract class CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Get array of all contacts for an object * @@ -1155,7 +1125,7 @@ abstract class CommonObject */ public function liste_contact($status = -1, $source = 'external', $list = 0, $code = '') { - // phpcs:enable + // phpcs:enable global $langs; $tab = array(); @@ -1197,9 +1167,7 @@ abstract class CommonObject 'nom'=>$obj->lastname, // For backward compatibility 'civility'=>$obj->civility, 'lastname'=>$obj->lastname, 'firstname'=>$obj->firstname, 'email'=>$obj->email, 'login'=>$obj->login, 'photo'=>$obj->photo, 'statuscontact'=>$obj->statuscontact, 'rowid'=>$obj->rowid, 'code'=>$obj->code, 'libelle'=>$libelle_type, 'status'=>$obj->statuslink, 'fk_c_type_contact'=>$obj->fk_c_type_contact); - } - else - { + } else { $tab[$i] = $obj->id; } @@ -1207,9 +1175,7 @@ abstract class CommonObject } return $tab; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_print_error($this->db); return -1; @@ -1243,16 +1209,14 @@ abstract class CommonObject $result = $this->update_contact($rowid, $newstatut); $this->db->free($resql); return $result; - } - else - { + } else { $this->error = $this->db->error(); dol_print_error($this->db); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return array with list of possible values for type of contacts * @@ -1265,7 +1229,7 @@ abstract class CommonObject */ public function liste_type_contact($source = 'internal', $order = 'position', $option = 0, $activeonly = 0, $code = '') { - // phpcs:enable + // phpcs:enable global $langs; if (empty($order)) $order = 'position'; @@ -1297,9 +1261,7 @@ abstract class CommonObject $i++; } return $tab; - } - else - { + } else { $this->error = $this->db->lasterror(); //dol_print_error($this->db); return null; @@ -1323,6 +1285,8 @@ abstract class CommonObject // phpcs:enable global $langs, $conf; + $langs->loadLangs(array('bills', 'contracts', 'interventions', 'orders', 'projects', 'propal', 'ticket', 'agenda')); + $tab = array(); $sql = "SELECT DISTINCT tc.rowid, tc.code, tc.libelle, tc.position, tc.element"; @@ -1380,9 +1344,7 @@ abstract class CommonObject } } return $tab; - } - else - { + } else { $this->error = $this->db->lasterror(); return null; } @@ -1427,9 +1389,9 @@ abstract class CommonObject if ($source == 'internal') $sql .= " AND c.entity IN (".getEntity('user').")"; if ($source == 'external') $sql .= " AND c.entity IN (".getEntity('societe').")"; $sql .= " AND ec.fk_c_type_contact = tc.rowid"; - $sql .= " AND tc.element = '".$element."'"; - $sql .= " AND tc.source = '".$source."'"; - if ($code) $sql .= " AND tc.code = '".$code."'"; + $sql .= " AND tc.element = '".$this->db->escape($element)."'"; + $sql .= " AND tc.source = '".$this->db->escape($source)."'"; + if ($code) $sql .= " AND tc.code = '".$this->db->escape($code)."'"; $sql .= " AND tc.active = 1"; if ($status) $sql .= " AND ec.statut = ".$status; @@ -1442,9 +1404,7 @@ abstract class CommonObject $result[$i] = $obj->fk_socpeople; $i++; } - } - else - { + } else { $this->error = $this->db->error(); return null; } @@ -1452,17 +1412,17 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Load object contact with id=$this->contactid into $this->contact + * Load object contact with id=$this->contact_id into $this->contact * - * @param int $contactid Id du contact. Use this->contactid if empty. + * @param int $contactid Id du contact. Use this->contact_id if empty. * @return int <0 if KO, >0 if OK */ public function fetch_contact($contactid = null) { - // phpcs:enable - if (empty($contactid)) $contactid = $this->contactid; + // phpcs:enable + if (empty($contactid)) $contactid = $this->contact_id; if (empty($contactid)) return 0; @@ -1473,7 +1433,7 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the third party of object, from id $this->socid or $this->fk_soc, into this->thirdparty * @@ -1482,7 +1442,7 @@ abstract class CommonObject */ public function fetch_thirdparty($force_thirdparty_id = 0) { - // phpcs:enable + // phpcs:enable global $conf; if (empty($this->socid) && empty($this->fk_soc) && empty($this->fk_thirdparty) && empty($force_thirdparty_id)) @@ -1505,8 +1465,7 @@ abstract class CommonObject } return $result; - } else - return -1; + } else return -1; } @@ -1536,7 +1495,7 @@ abstract class CommonObject return $this->fetch($result->rowid); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load data for barcode into properties ->barcode_type* * Properties ->barcode_type that is id of barcode. Type is used to find other properties, but @@ -1546,7 +1505,7 @@ abstract class CommonObject */ public function fetch_barcode() { - // phpcs:enable + // phpcs:enable global $conf; dol_syslog(get_class($this).'::fetch_barcode this->element='.$this->element.' this->barcode_type='.$this->barcode_type); @@ -1576,9 +1535,7 @@ abstract class CommonObject $this->barcode_type_label = $obj->label; $this->barcode_type_coder = $obj->coder; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -1587,7 +1544,7 @@ abstract class CommonObject return 0; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the project with id $this->fk_project into this->project * @@ -1595,7 +1552,7 @@ abstract class CommonObject */ public function fetch_projet() { - // phpcs:enable + // phpcs:enable include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; if (empty($this->fk_project) && !empty($this->fk_projet)) $this->fk_project = $this->fk_projet; // For backward compatibility @@ -1609,7 +1566,7 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the product with id $this->fk_product into this->product * @@ -1617,7 +1574,7 @@ abstract class CommonObject */ public function fetch_product() { - // phpcs:enable + // phpcs:enable include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; if (empty($this->fk_product)) return 0; @@ -1629,7 +1586,7 @@ abstract class CommonObject return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load the user with id $userid into this->user * @@ -1638,14 +1595,14 @@ abstract class CommonObject */ public function fetch_user($userid) { - // phpcs:enable + // phpcs:enable $user = new User($this->db); $result = $user->fetch($userid); $this->user = $user; return $result; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Read linked origin object * @@ -1653,10 +1610,10 @@ abstract class CommonObject */ public function fetch_origin() { - // phpcs:enable + // phpcs:enable if ($this->origin == 'shipping') $this->origin = 'expedition'; if ($this->origin == 'delivery') $this->origin = 'livraison'; - if ($this->origin == 'order_supplier') $this->origin = 'commandeFournisseur'; + if ($this->origin == 'order_supplier') $this->origin = 'commandeFournisseur'; $origin = $this->origin; @@ -1666,14 +1623,14 @@ abstract class CommonObject } /** - * Load object from specific field - * - * @param string $table Table element or element line - * @param string $field Field selected - * @param string $key Import key - * @param string $element Element name - * @return int <0 if KO, >0 if OK - */ + * Load object from specific field + * + * @param string $table Table element or element line + * @param string $field Field selected + * @param string $key Import key + * @param string $element Element name + * @return int <0 if KO, >0 if OK + */ public function fetchObjectFrom($table, $field, $key, $element = null) { global $conf; @@ -1785,9 +1742,7 @@ abstract class CommonObject if (empty($this->fields) && method_exists($this, 'fetch')) { $result = $this->fetch($id); - } - else - { + } else { $result = $this->fetchCommon($id); } if ($result >= 0) $result = $this->call_trigger($trigkey, (!empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors @@ -1799,22 +1754,18 @@ abstract class CommonObject if (property_exists($this, $field)) $this->$field = $value; $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load properties id_previous and id_next by comparing $fieldid with $this->ref * @@ -1825,7 +1776,7 @@ abstract class CommonObject */ public function load_previous_next_ref($filter, $fieldid, $nodbprefix = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user; if (!$this->table_element) @@ -1852,11 +1803,10 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= ", ".MAIN_DB_PREFIX.$tmparray[1]." as ".($tmparray[1] == 'societe' ? 's' : 'parenttable'); // If we need to link to this table to limit select to entity - } - elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid + } elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$aliastablesociete.".rowid = sc.fk_soc"; - $sql .= " WHERE te.".$fieldid." < '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) + $sql .= " WHERE te.".$fieldid." < '".$this->db->escape($fieldid == 'rowid' ? $this->id : $this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; if ($this->restrictiononfksoc == 2 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND (sc.fk_user = ".$user->id.' OR te.fk_soc IS NULL)'; if (!empty($filter)) @@ -1867,8 +1817,7 @@ abstract class CommonObject if (isset($this->ismultientitymanaged) && !is_numeric($this->ismultientitymanaged)) { $tmparray = explode('@', $this->ismultientitymanaged); $sql .= ' AND te.'.$tmparray[0].' = '.($tmparray[1] == 'societe' ? 's' : 'parenttable').'.rowid'; // If we need to link to this table to limit select to entity - } - elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid + } elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ' AND te.fk_soc = s.rowid'; // If we need to link to societe to limit select to socid if (isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) { if ($this->element == 'user' && !empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) { if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) { @@ -1910,7 +1859,7 @@ abstract class CommonObject } elseif ($this->restrictiononfksoc == 1 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe as s"; // If we need to link to societe to limit select to socid elseif ($this->restrictiononfksoc == 2 && $this->element != 'societe' && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON te.fk_soc = s.rowid"; // If we need to link to societe to limit select to socid if ($this->restrictiononfksoc && !$user->rights->societe->client->voir && !$socid) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON ".$aliastablesociete.".rowid = sc.fk_soc"; - $sql .= " WHERE te.".$fieldid." > '".$this->db->escape($this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) + $sql .= " WHERE te.".$fieldid." > '".$this->db->escape($fieldid == 'rowid' ? $this->id : $this->ref)."'"; // ->ref must always be defined (set to id if field does not exists) if ($this->restrictiononfksoc == 1 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND sc.fk_user = ".$user->id; if ($this->restrictiononfksoc == 2 && !$user->rights->societe->client->voir && !$socid) $sql .= " AND (sc.fk_user = ".$user->id.' OR te.fk_soc IS NULL)'; if (!empty($filter)) @@ -1973,7 +1922,7 @@ abstract class CommonObject while ($i < $num) { if ($source == 'thirdparty') $contactAlreadySelected[$i] = $tab[$i]['socid']; - else $contactAlreadySelected[$i] = $tab[$i]['id']; + else $contactAlreadySelected[$i] = $tab[$i]['id']; $i++; } return $contactAlreadySelected; @@ -2000,14 +1949,12 @@ abstract class CommonObject if ($projectid) $sql .= ' SET fk_project = '.$projectid; else $sql .= ' SET fk_project = NULL'; $sql .= ' WHERE rowid = '.$this->id; - } - elseif ($this->table_element == 'actioncomm') // Special case for actioncomm + } elseif ($this->table_element == 'actioncomm') // Special case for actioncomm { if ($projectid) $sql .= ' SET fk_project = '.$projectid; else $sql .= ' SET fk_project = NULL'; $sql .= ' WHERE id = '.$this->id; - } - else // Special case for old architecture objects + } else // Special case for old architecture objects { if ($projectid) $sql .= ' SET fk_projet = '.$projectid; else $sql .= ' SET fk_projet = NULL'; @@ -2019,9 +1966,7 @@ abstract class CommonObject { $this->fk_project = $projectid; return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -2053,16 +1998,12 @@ abstract class CommonObject // for supplier if (get_class($this) == 'Fournisseur') $this->mode_reglement_supplier_id = $id; return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentMethods Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentMethods, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2094,16 +2035,12 @@ abstract class CommonObject if ($rate) $this->setMulticurrencyRate($rate, 2); return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyCode Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyCode, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2202,16 +2139,12 @@ abstract class CommonObject } return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyRate Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setMulticurrencyRate, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2245,16 +2178,12 @@ abstract class CommonObject if (get_class($this) == 'Fournisseur') $this->cond_reglement_supplier_id = $id; $this->cond_reglement = $id; // for compatibility return 1; - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentTerms Erreur '.$sql.' - '.$this->db->error()); $this->error = $this->db->error(); return -1; } - } - else - { + } else { dol_syslog(get_class($this).'::setPaymentTerms, status of the object is incompatible'); $this->error = 'Status of the object is incompatible '.$this->statut; return -2; @@ -2270,33 +2199,29 @@ abstract class CommonObject */ public function setRetainedWarrantyPaymentTerms($id) { - dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms('.$id.')'); - if ($this->statut >= 0 || $this->element == 'societe') - { - $fieldname = 'retained_warranty_fk_cond_reglement'; + dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms('.$id.')'); + if ($this->statut >= 0 || $this->element == 'societe') + { + $fieldname = 'retained_warranty_fk_cond_reglement'; - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET '.$fieldname.' = '.$id; - $sql .= ' WHERE rowid='.$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET '.$fieldname.' = '.$id; + $sql .= ' WHERE rowid='.$this->id; - if ($this->db->query($sql)) - { - $this->retained_warranty_fk_cond_reglement = $id; - return 1; - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms Erreur '.$sql.' - '.$this->db->error()); - $this->error = $this->db->error(); - return -1; - } - } - else - { - dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms, status of the object is incompatible'); - $this->error = 'Status of the object is incompatible '.$this->statut; - return -2; - } + if ($this->db->query($sql)) + { + $this->retained_warranty_fk_cond_reglement = $id; + return 1; + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms Erreur '.$sql.' - '.$this->db->error()); + $this->error = $this->db->error(); + return -1; + } + } else { + dol_syslog(get_class($this).'::setRetainedWarrantyPaymentTerms, status of the object is incompatible'); + $this->error = 'Status of the object is incompatible '.$this->statut; + return -2; + } } /** @@ -2318,9 +2243,7 @@ abstract class CommonObject { $this->fk_delivery_address = $id; return 1; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog(get_class($this).'::setDeliveryAddress Erreur '.$sql.' - '.$this->error); return -1; @@ -2442,11 +2365,10 @@ abstract class CommonObject $resql = $this->db->query($sql); if ($resql) { - $this->modelpdf = $modelpdf; + $this->model_pdf = $modelpdf; + $this->modelpdf = $modelpdf; // For bakward compatibility return 1; - } - else - { + } else { dol_print_error($this->db); return 0; } @@ -2488,9 +2410,7 @@ abstract class CommonObject dol_syslog(get_class($this).'::setBankAccount Error '.$sql.' - '.$this->db->error()); $this->error = $this->db->lasterror(); $error++; - } - else - { + } else { if (!$notrigger) { // Call trigger @@ -2504,9 +2424,7 @@ abstract class CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->fk_account = ($fk_account == 'NULL') ?null:$fk_account; $this->db->commit(); return 1; @@ -2516,7 +2434,7 @@ abstract class CommonObject // TODO: Move line related operations to CommonObjectLine? - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Save a new position (field rang) for details lines. * You can choose to set position for lines with already a position or lines without any position defined. @@ -2528,7 +2446,7 @@ abstract class CommonObject */ public function line_order($renum = false, $rowidorder = 'ASC', $fk_parent_line = true) { - // phpcs:enable + // phpcs:enable if (!$this->table_element_line) { dol_syslog(get_class($this)."::line_order was called on objet with property table_element_line not defined", LOG_ERR); @@ -2553,8 +2471,7 @@ abstract class CommonObject { $row = $this->db->fetch_row($resql); $nl = $row[0]; - } - else dol_print_error($this->db); + } else dol_print_error($this->db); if ($nl > 0) { // The goal of this part is to reorder all lines, with all children lines sharing the same @@ -2596,9 +2513,7 @@ abstract class CommonObject $this->updateRangOfLine($row, ($key + 1)); } } - } - else - { + } else { dol_print_error($this->db); } } @@ -2608,10 +2523,11 @@ abstract class CommonObject /** * Get children of line * - * @param int $id Id of parent line - * @return array Array with list of children lines id + * @param int $id Id of parent line + * @param int $includealltree 0 = 1st level child, 1 = All level child + * @return array Array with list of children lines id */ - public function getChildrenOfLine($id) + public function getChildrenOfLine($id, $includealltree = 0) { $rows = array(); @@ -2624,20 +2540,17 @@ abstract class CommonObject $resql = $this->db->query($sql); if ($resql) { - $i = 0; - $num = $this->db->num_rows($resql); - while ($i < $num) - { - $row = $this->db->fetch_row($resql); - $rows[$i] = $row[0]; - $i++; + if ($this->db->num_rows($resql) > 0) { + while ($row = $this->db->fetch_row($resql)) { + $rows[] = $row[0]; + if (!empty($includealltree)) $rows = array_merge($rows, $this->getChildrenOfLine($row[0]), $includealltree); + } } } - return $rows; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update a line to have a lower rank * @@ -2647,7 +2560,7 @@ abstract class CommonObject */ public function line_up($rowid, $fk_parent_line = true) { - // phpcs:enable + // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); // Get rang of line @@ -2657,7 +2570,7 @@ abstract class CommonObject $this->updateLineUp($rowid, $rang); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update a line to have a higher rank * @@ -2667,7 +2580,7 @@ abstract class CommonObject */ public function line_down($rowid, $fk_parent_line = true) { - // phpcs:enable + // phpcs:enable $this->line_order(false, 'ASC', $fk_parent_line); // Get rang of line @@ -2702,7 +2615,7 @@ abstract class CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update position of line with ajax (rang) * @@ -2711,7 +2624,7 @@ abstract class CommonObject */ public function line_ajaxorder($rows) { - // phpcs:enable + // phpcs:enable $num = count($rows); for ($i = 0; $i < $num; $i++) { @@ -2744,9 +2657,7 @@ abstract class CommonObject { dol_print_error($this->db); } - } - else - { + } else { dol_print_error($this->db); } } @@ -2778,9 +2689,7 @@ abstract class CommonObject { dol_print_error($this->db); } - } - else - { + } else { dol_print_error($this->db); } } @@ -2825,7 +2734,7 @@ abstract class CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Get max value used for position of line (rang) * @@ -2834,8 +2743,8 @@ abstract class CommonObject */ public function line_max($fk_parent_line = 0) { - // phpcs:enable - $positionfield = 'rang'; + // phpcs:enable + $positionfield = 'rang'; if ($this->table_element == 'bom') $positionfield = 'position'; // Search the last rang with fk_parent_line @@ -2853,16 +2762,13 @@ abstract class CommonObject if (!empty($row[0])) { return $row[0]; - } - else - { + } else { return $this->getRangOfLine($fk_parent_line); } } } // If not, search the last rang of element - else - { + else { $sql = 'SELECT max('.$positionfield.') FROM '.MAIN_DB_PREFIX.$this->table_element_line; $sql .= ' WHERE '.$this->fk_element.' = '.$this->id; @@ -2876,7 +2782,7 @@ abstract class CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update external ref of element * @@ -2885,7 +2791,7 @@ abstract class CommonObject */ public function update_ref_ext($ref_ext) { - // phpcs:enable + // phpcs:enable if (!$this->table_element) { dol_syslog(get_class($this)."::update_ref_ext was called on objet with property table_element not defined", LOG_ERR); @@ -2901,15 +2807,13 @@ abstract class CommonObject { $this->ref_ext = $ref_ext; return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update note of element * @@ -2919,7 +2823,7 @@ abstract class CommonObject */ public function update_note($note, $suffix = '') { - // phpcs:enable + // phpcs:enable global $user; if (!$this->table_element) @@ -2934,12 +2838,14 @@ abstract class CommonObject dol_syslog(get_class($this)."::update_note Parameter suffix must be empty, '_private' or '_public'", LOG_ERR); return -2; } + + $newsuffix = $suffix; + // Special cas - //var_dump($this->table_element);exit; - if ($this->table_element == 'product') $suffix = ''; + if ($this->table_element == 'product' && $newsuffix == '_private') $newsuffix = ''; $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET note".$suffix." = ".(!empty($note) ? ("'".$this->db->escape($note)."'") : "NULL"); + $sql .= " SET note".$newsuffix." = ".(!empty($note) ? ("'".$this->db->escape($note)."'") : "NULL"); $sql .= " ,".(in_array($this->table_element, array('actioncomm', 'adherent', 'advtargetemailing', 'cronjob', 'establishment')) ? "fk_user_mod" : "fk_user_modif")." = ".$user->id; $sql .= " WHERE rowid =".$this->id; @@ -2948,21 +2854,18 @@ abstract class CommonObject { if ($suffix == '_public') $this->note_public = $note; elseif ($suffix == '_private') $this->note_private = $note; - else - { + else { $this->note = $note; // deprecated $this->note_private = $note; } return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update public note (kept for backward compatibility) * @@ -2973,11 +2876,11 @@ abstract class CommonObject */ public function update_note_public($note) { - // phpcs:enable + // phpcs:enable return $this->update_note($note, '_public'); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update total_ht, total_ttc, total_vat, total_localtax1, total_localtax2 for an object (sum of lines). * Must be called at end of methods addline or updateline. @@ -2990,16 +2893,16 @@ abstract class CommonObject */ public function update_price($exclspec = 0, $roundingadjust = 'none', $nodatabaseupdate = 0, $seller = null) { - // phpcs:enable + // phpcs:enable global $conf, $hookmanager, $action; - $parameters = array('exclspec' => $exclspec, 'roundingadjust' => $roundingadjust, 'nodatabaseupdate' => $nodatabaseupdate, 'seller' => $seller); - $reshook = $hookmanager->executeHooks('updateTotalPrice', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook > 0) { - return 1; // replacement code - } elseif ($reshook < 0) { - return -1; // failure - } // reshook = 0 => execute normal code + $parameters = array('exclspec' => $exclspec, 'roundingadjust' => $roundingadjust, 'nodatabaseupdate' => $nodatabaseupdate, 'seller' => $seller); + $reshook = $hookmanager->executeHooks('updateTotalPrice', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook > 0) { + return 1; // replacement code + } elseif ($reshook < 0) { + return -1; // failure + } // reshook = 0 => execute normal code // Some external module want no update price after a trigger because they have another method to calculate the total (ex: with an extrafield) $MODULE = ""; @@ -3221,14 +3124,10 @@ abstract class CommonObject if (!$error) { return 1; - } - else - { + } else { return -1; } - } - else - { + } else { dol_print_error($this->db, 'Bad request in update_price'); return -1; } @@ -3273,9 +3172,7 @@ abstract class CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return 0; @@ -3346,19 +3243,16 @@ abstract class CommonObject { if ($justsource) { - $sql .= "fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."'"; - if ($withtargettype) $sql .= " AND targettype = '".$targettype."'"; - } - elseif ($justtarget) + $sql .= "fk_source = ".$sourceid." AND sourcetype = '".$this->db->escape($sourcetype)."'"; + if ($withtargettype) $sql .= " AND targettype = '".$this->db->escape($targettype)."'"; + } elseif ($justtarget) { - $sql .= "fk_target = ".$targetid." AND targettype = '".$targettype."'"; - if ($withsourcetype) $sql .= " AND sourcetype = '".$sourcetype."'"; + $sql .= "fk_target = ".$targetid." AND targettype = '".$this->db->escape($targettype)."'"; + if ($withsourcetype) $sql .= " AND sourcetype = '".$this->db->escape($sourcetype)."'"; } - } - else - { - $sql .= "(fk_source = ".$sourceid." AND sourcetype = '".$sourcetype."')"; - $sql .= " ".$clause." (fk_target = ".$targetid." AND targettype = '".$targettype."')"; + } else { + $sql .= "(fk_source = ".$sourceid." AND sourcetype = '".$this->db->escape($sourcetype)."')"; + $sql .= " ".$clause." (fk_target = ".$targetid." AND targettype = '".$this->db->escape($targettype)."')"; } $sql .= ' ORDER BY '.$orderby; @@ -3376,14 +3270,11 @@ abstract class CommonObject if ($justsource) { $this->linkedObjectsIds[$obj->targettype][$obj->rowid] = $obj->fk_target; - } - elseif ($justtarget) + } elseif ($justtarget) { $this->linkedObjectsIds[$obj->sourcetype][$obj->rowid] = $obj->fk_source; } - } - else - { + } else { if ($obj->fk_source == $sourceid && $obj->sourcetype == $sourcetype) { $this->linkedObjectsIds[$obj->targettype][$obj->rowid] = $obj->fk_target; @@ -3414,32 +3305,23 @@ abstract class CommonObject // To work with non standard classpath or module name if ($objecttype == 'facture') { $classpath = 'compta/facture/class'; - } - elseif ($objecttype == 'facturerec') { + } elseif ($objecttype == 'facturerec') { $classpath = 'compta/facture/class'; $module = 'facture'; - } - elseif ($objecttype == 'propal') { + } elseif ($objecttype == 'propal') { $classpath = 'comm/propal/class'; - } - elseif ($objecttype == 'supplier_proposal') { + } elseif ($objecttype == 'supplier_proposal') { $classpath = 'supplier_proposal/class'; - } - elseif ($objecttype == 'shipping') { + } elseif ($objecttype == 'shipping') { $classpath = 'expedition/class'; $subelement = 'expedition'; $module = 'expedition_bon'; - } - elseif ($objecttype == 'delivery') { + } elseif ($objecttype == 'delivery') { $classpath = 'livraison/class'; $subelement = 'livraison'; $module = 'livraison_bon'; - } - elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { + } elseif ($objecttype == 'invoice_supplier' || $objecttype == 'order_supplier') { $classpath = 'fourn/class'; $module = 'fournisseur'; - } - elseif ($objecttype == 'fichinter') { + } elseif ($objecttype == 'fichinter') { $classpath = 'fichinter/class'; $subelement = 'fichinter'; $module = 'ficheinter'; - } - elseif ($objecttype == 'subscription') { + } elseif ($objecttype == 'subscription') { $classpath = 'adherents/class'; $module = 'adherent'; - } - elseif ($objecttype == 'contact') { + } elseif ($objecttype == 'contact') { $module = 'societe'; } @@ -3448,23 +3330,17 @@ abstract class CommonObject if ($objecttype == 'order') { $classfile = 'commande'; $classname = 'Commande'; - } - elseif ($objecttype == 'invoice_supplier') { + } elseif ($objecttype == 'invoice_supplier') { $classfile = 'fournisseur.facture'; $classname = 'FactureFournisseur'; - } - elseif ($objecttype == 'order_supplier') { + } elseif ($objecttype == 'order_supplier') { $classfile = 'fournisseur.commande'; $classname = 'CommandeFournisseur'; - } - elseif ($objecttype == 'supplier_proposal') { + } elseif ($objecttype == 'supplier_proposal') { $classfile = 'supplier_proposal'; $classname = 'SupplierProposal'; - } - elseif ($objecttype == 'facturerec') { + } elseif ($objecttype == 'facturerec') { $classfile = 'facture-rec'; $classname = 'FactureRec'; - } - elseif ($objecttype == 'subscription') { + } elseif ($objecttype == 'subscription') { $classfile = 'subscription'; $classname = 'Subscription'; - } - elseif ($objecttype == 'project' || $objecttype == 'projet') { + } elseif ($objecttype == 'project' || $objecttype == 'projet') { $classpath = 'projet/class'; $classfile = 'project'; $classname = 'Project'; } @@ -3488,17 +3364,13 @@ abstract class CommonObject } } } - } - else - { + } else { unset($this->linkedObjectsIds[$objecttype]); } } } return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -3529,8 +3401,7 @@ abstract class CommonObject $sql .= ", sourcetype = '".$this->db->escape($sourcetype)."'"; $sql .= " WHERE fk_target = ".$this->id; $sql .= " AND targettype = '".$this->db->escape($this->element)."'"; - } - elseif ($updatetarget) + } elseif ($updatetarget) { $sql .= "fk_target = ".$targetid; $sql .= ", targettype = '".$this->db->escape($targettype)."'"; @@ -3542,9 +3413,7 @@ abstract class CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -3579,21 +3448,16 @@ abstract class CommonObject if ($rowid > 0) { $sql .= " rowid = ".$rowid; - } - else - { + } else { if ($deletesource) { $sql .= " fk_source = ".$sourceid." AND sourcetype = '".$this->db->escape($sourcetype)."'"; $sql .= " AND fk_target = ".$this->id." AND targettype = '".$this->db->escape($this->element)."'"; - } - elseif ($deletetarget) + } elseif ($deletetarget) { $sql .= " fk_target = ".$targetid." AND targettype = '".$this->db->escape($targettype)."'"; $sql .= " AND fk_source = ".$this->id." AND sourcetype = '".$this->db->escape($this->element)."'"; - } - else - { + } else { $sql .= " (fk_source = ".$this->id." AND sourcetype = '".$this->db->escape($this->element)."')"; $sql .= " OR"; $sql .= " (fk_target = ".$this->id." AND targettype = '".$this->db->escape($this->element)."')"; @@ -3604,9 +3468,7 @@ abstract class CommonObject if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; return -1; @@ -3683,16 +3545,12 @@ abstract class CommonObject } return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::setStatut ".$this->error, LOG_ERR); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -3731,11 +3589,8 @@ abstract class CommonObject { $this->canvas = $obj->canvas; return 1; - } - else return 0; - } - else - { + } else return 0; + } else { dol_print_error($this->db); return -1; } @@ -3808,16 +3663,13 @@ abstract class CommonObject if (is_numeric($elementname)) // old usage { $this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", $table); - } - else // new usage: $elementname=Translation key + } else // new usage: $elementname=Translation key { $this->errors[] = $langs->trans("ErrorRecordHasAtLeastOneChildOfType", $langs->transnoentitiesnoconv($elementname)); } break; // We found at least one, we stop here } - } - else - { + } else { $this->errors[] = $this->db->lasterror(); return -1; } @@ -3826,8 +3678,7 @@ abstract class CommonObject { $this->errors[] = "ErrorRecordHasChildren"; return $haschild; - } - else return 0; + } else return 0; } /** @@ -3919,8 +3770,7 @@ abstract class CommonObject { if (empty($totalToShip)) $totalToShip = 0; // Avoid warning because $totalToShip is '' $totalToShip += $line->qty_shipped; // defined for shipment only - } - elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) + } elseif ($line->element == 'commandefournisseurdispatch' && isset($line->qty)) { if (empty($totalToShip)) $totalToShip = 0; $totalToShip += $line->qty; // defined for reception only @@ -3930,13 +3780,12 @@ abstract class CommonObject if ($this->element == 'shipping') { // for shipments $qty = $line->qty_shipped ? $line->qty_shipped : 0; - } - else { + } else { $qty = $line->qty ? $line->qty : 0; } $weight = $line->weight ? $line->weight : 0; - ($weight == 0 && !empty($line->product->weight)) ? $weight = $line->product->weight : 0; + ($weight == 0 && !empty($line->product->weight)) ? $weight = $line->product->weight : 0; $volume = $line->volume ? $line->volume : 0; ($volume == 0 && !empty($line->product->volume)) ? $volume = $line->product->volume : 0; @@ -3958,8 +3807,7 @@ abstract class CommonObject { $trueWeightUnit = pow(10, $weightUnit); $totalWeight += $weight * $qty * $trueWeightUnit; - } - else { + } else { if ($weight_units == 99) { // conversion 1 Pound = 0.45359237 KG $trueWeightUnit = 0.45359237; @@ -3968,8 +3816,7 @@ abstract class CommonObject // conversion 1 Ounce = 0.0283495 KG $trueWeightUnit = 0.0283495; $totalWeight += $weight * $qty * $trueWeightUnit; - } - else { + } else { $totalWeight += $weight * $qty; // This may be wrong if we mix different units } } @@ -3979,9 +3826,7 @@ abstract class CommonObject $trueVolumeUnit = pow(10, $volumeUnit); //print $line->volume; $totalVolume += $volume * $qty * $trueVolumeUnit; - } - else - { + } else { $totalVolume += $volume * $qty; // This may be wrong if we mix different units } } @@ -4012,113 +3857,13 @@ abstract class CommonObject $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return incoterms informations - * TODO Use a cache for label get - * - * @return string incoterms info - */ - public function display_incoterms() - { - // phpcs:enable - $out = ''; - $this->label_incoterms = ''; - if (!empty($this->fk_incoterms)) - { - $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_incoterms WHERE rowid = '.(int) $this->fk_incoterms; - $result = $this->db->query($sql); - if ($result) - { - $res = $this->db->fetch_object($result); - $out .= $res->code; - } - } - - $out .= (($res->code && $this->location_incoterms) ? ' - ' : '').$this->location_incoterms; - - return $out; - } - - /** - * Return incoterms informations for pdf display - * - * @return string incoterms info - */ - public function getIncotermsForPDF() - { - $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'c_incoterms WHERE rowid = '.(int) $this->fk_incoterms; - $resql = $this->db->query($sql); - if ($resql) - { - $num = $this->db->num_rows($resql); - if ($num > 0) - { - $res = $this->db->fetch_object($resql); - return 'Incoterm : '.$res->code.' - '.$this->location_incoterms; - } - else - { - return ''; - } - } - else - { - $this->errors[] = $this->db->lasterror(); - return false; - } - } - - /** - * Define incoterms values of current object - * - * @param int $id_incoterm Id of incoterm to set or '' to remove - * @param string $location location of incoterm - * @return int <0 if KO, >0 if OK - */ - public function setIncoterms($id_incoterm, $location) - { - if ($this->id && $this->table_element) - { - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET fk_incoterms = ".($id_incoterm > 0 ? $id_incoterm : "null"); - $sql .= ", location_incoterms = ".($id_incoterm > 0 ? "'".$this->db->escape($location)."'" : "null"); - $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this).'::setIncoterms', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $this->fk_incoterms = $id_incoterm; - $this->location_incoterms = $location; - - $sql = 'SELECT libelle FROM '.MAIN_DB_PREFIX.'c_incoterms WHERE rowid = '.(int) $this->fk_incoterms; - $res = $this->db->query($sql); - if ($res) - { - $obj = $this->db->fetch_object($res); - $this->label_incoterms = $obj->libelle; - } - return 1; - } - else - { - $this->errors[] = $this->db->lasterror(); - return -1; - } - } - else return -1; - } - - // -------------------- // TODO: All functions here must be redesigned and moved as they are not business functions but output functions // -------------------- @@ -4156,9 +3901,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_create.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_create.tpl.php'; } @@ -4223,9 +3966,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_title.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_title.tpl.php'; } if (empty($conf->file->strict_mode)) { @@ -4252,9 +3993,7 @@ abstract class CommonObject { $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer, 'selected'=>$selected, 'table_element_line'=>$line->table_element); $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - } - else - { + } else { $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'dateSelector'=>$dateSelector, 'seller'=>$seller, 'buyer'=>$buyer, 'selected'=>$selected, 'table_element_line'=>$line->table_element, 'fk_parent_line'=>$line->fk_parent_line); $reshook = $hookmanager->executeHooks('printObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } @@ -4335,9 +4074,7 @@ abstract class CommonObject } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $line->product_label; - } - else - { + } else { $label = $line->product_label; } @@ -4356,9 +4093,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_view.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_view.tpl.php'; } @@ -4387,9 +4122,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/objectline_edit.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/objectline_edit.tpl.php'; } @@ -4433,8 +4166,8 @@ abstract class CommonObject print ''.$langs->trans('Unit').''; } print ''.$langs->trans('ReductionShort').''; - print ''.$form->showCheckAddButtons('checkforselect', 1).''; - print ''; + print ''.$form->showCheckAddButtons('checkforselect', 1).''; + print ''; $i = 0; if (!empty($this->lines)) @@ -4449,9 +4182,7 @@ abstract class CommonObject $action = ''; $hookmanager->executeHooks('printOriginObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks } - } - else - { + } else { $this->printOriginLine($line, '', $restrictlist, '/core/tpl', $selectedLines); } @@ -4481,23 +4212,19 @@ abstract class CommonObject if (!empty($line->date_start)) { $date_start = $line->date_start; - } - else - { + } else { $date_start = $line->date_debut_prevue; if ($line->date_debut_reel) $date_start = $line->date_debut_reel; } if (!empty($line->date_end)) { $date_end = $line->date_end; - } - else - { + } else { $date_end = $line->date_fin_prevue; if ($line->date_fin_reel) $date_end = $line->date_fin_reel; } - $this->tpl['id'] = $line->id; + $this->tpl['id'] = $line->id; $this->tpl['label'] = ''; if (!empty($line->fk_parent_line)) $this->tpl['label'] .= img_picto('', 'rightarrow'); @@ -4507,8 +4234,7 @@ abstract class CommonObject $discount = new DiscountAbsolute($this->db); $discount->fk_soc = $this->socid; $this->tpl['label'] .= $discount->getNomUrl(0, 'discount'); - } - elseif (!empty($line->fk_product)) + } elseif (!empty($line->fk_product)) { $productstatic = new Product($this->db); $productstatic->id = $line->fk_product; @@ -4526,9 +4252,7 @@ abstract class CommonObject { $this->tpl['label'] .= get_date_range($date_start, $date_end); } - } - else - { + } else { $this->tpl['label'] .= ($line->product_type == -1 ? ' ' : ($line->product_type == 1 ? img_object($langs->trans(''), 'service') : img_object($langs->trans(''), 'product'))); if (!empty($line->desc)) { $this->tpl['label'] .= $line->desc; @@ -4550,39 +4274,32 @@ abstract class CommonObject $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromCreditNote", $discount->getNomUrl(0)); - } - elseif ($line->desc == '(DEPOSIT)') // TODO Not sure this is used for source object + } elseif ($line->desc == '(DEPOSIT)') // TODO Not sure this is used for source object { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromDeposit", $discount->getNomUrl(0)); - } - elseif ($line->desc == '(EXCESS RECEIVED)') + } elseif ($line->desc == '(EXCESS RECEIVED)') { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromExcessReceived", $discount->getNomUrl(0)); - } - elseif ($line->desc == '(EXCESS PAID)') + } elseif ($line->desc == '(EXCESS PAID)') { $discount = new DiscountAbsolute($this->db); $discount->fetch($line->fk_remise_except); $this->tpl['description'] = $langs->transnoentities("DiscountFromExcessPaid", $discount->getNomUrl(0)); - } - else - { + } else { $this->tpl['description'] = dol_trunc($line->desc, 60); } - } - else - { + } else { $this->tpl['description'] = ' '; } - // VAT Rate - $this->tpl['vat_rate'] = vatrate($line->tva_tx, true); - $this->tpl['vat_rate'] .= (($line->info_bits & 1) == 1) ? '*' : ''; - if (!empty($line->vat_src_code) && !preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'] .= ' ('.$line->vat_src_code.')'; + // VAT Rate + $this->tpl['vat_rate'] = vatrate($line->tva_tx, true); + $this->tpl['vat_rate'] .= (($line->info_bits & 1) == 1) ? '*' : ''; + if (!empty($line->vat_src_code) && !preg_match('/\(/', $this->tpl['vat_rate'])) $this->tpl['vat_rate'] .= ' ('.$line->vat_src_code.')'; $this->tpl['price'] = price($line->subprice); $this->tpl['multicurrency_price'] = price($line->multicurrency_subprice); @@ -4602,9 +4319,7 @@ abstract class CommonObject if (!empty($module)) { $tpl = dol_buildpath($reldir.'/originproductline.tpl.php'); - } - else - { + } else { $tpl = DOL_DOCUMENT_ROOT.$reldir.'/originproductline.tpl.php'; } @@ -4618,7 +4333,7 @@ abstract class CommonObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add resources to the current object : add entry into llx_element_resources * Need $this->element & $this->id @@ -4631,7 +4346,7 @@ abstract class CommonObject */ public function add_element_resource($resource_id, $resource_type, $busy = 0, $mandatory = 0) { - // phpcs:enable + // phpcs:enable $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_resources ("; @@ -4655,16 +4370,14 @@ abstract class CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete a link to resource line * @@ -4675,7 +4388,7 @@ abstract class CommonObject */ public function delete_resource($rowid, $element, $notrigger = 0) { - // phpcs:enable + // phpcs:enable global $user; $this->db->begin(); @@ -4691,9 +4404,7 @@ abstract class CommonObject $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; - } - else - { + } else { if (!$notrigger) { $result = $this->call_trigger(strtoupper($element).'_DELETE_RESOURCE', $user); @@ -4727,7 +4438,7 @@ abstract class CommonObject * Common function for all objects extending CommonObject for generating documents * * @param string $modelspath Relative folder where generators are placed - * @param string $modele Generator to use. Caller must set it to obj->modelpdf or GETPOST('modelpdf','alpha') for example. + * @param string $modele Generator to use. Caller must set it to obj->model_pdf or GETPOST('model_pdf','alpha') for example. * @param Translate $outputlangs Output language to use * @param int $hidedetails 1 to hide details. 0 by default * @param int $hidedesc 1 to hide product description. 0 by default @@ -4747,255 +4458,246 @@ abstract class CommonObject if (empty($reshook)) { - dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); + dol_syslog("commonGenerateDocument modele=".$modele." outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - // Increase limit for PDF build - $err = error_reporting(); - error_reporting(0); - @set_time_limit(120); - error_reporting($err); + // Increase limit for PDF build + $err = error_reporting(); + error_reporting(0); + @set_time_limit(120); + error_reporting($err); - // If selected model is a filename template (then $modele="modelname" or "modelname:filename") - $tmp = explode(':', $modele, 2); - if (!empty($tmp[1])) - { - $modele = $tmp[0]; - $srctemplatepath = $tmp[1]; - } + // If selected model is a filename template (then $modele="modelname" or "modelname:filename") + $tmp = explode(':', $modele, 2); + if (!empty($tmp[1])) + { + $modele = $tmp[0]; + $srctemplatepath = $tmp[1]; + } - // Search template files + // Search template files $file = ''; $classname = ''; $filefound = ''; - $dirmodels = array('/'); - if (is_array($conf->modules_parts['models'])) $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); - foreach ($dirmodels as $reldir) - { - foreach (array('doc', 'pdf') as $prefix) - { - if (in_array(get_class($this), array('Adherent'))) $file = $prefix."_".$modele.".class.php"; // Member module use prefix_module.class.php - else $file = $prefix."_".$modele.".modules.php"; + $dirmodels = array('/'); + if (is_array($conf->modules_parts['models'])) $dirmodels = array_merge($dirmodels, $conf->modules_parts['models']); + foreach ($dirmodels as $reldir) + { + foreach (array('doc', 'pdf') as $prefix) + { + if (in_array(get_class($this), array('Adherent'))) $file = $prefix."_".$modele.".class.php"; // Member module use prefix_module.class.php + else $file = $prefix."_".$modele.".modules.php"; - // On verifie l'emplacement du modele - $file = dol_buildpath($reldir.$modelspath.$file, 0); - if (file_exists($file)) - { - $filefound = $file; - $classname = $prefix.'_'.$modele; - break; - } - } - if ($filefound) break; - } + // On verifie l'emplacement du modele + $file = dol_buildpath($reldir.$modelspath.$file, 0); + if (file_exists($file)) + { + $filefound = $file; + $classname = $prefix.'_'.$modele; + break; + } + } + if ($filefound) break; + } - // If generator was found - if ($filefound) - { - global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. + // If generator was found + if ($filefound) + { + global $db; // Required to solve a conception default making an include of code using $db instead of $this->db just after. - require_once $file; + require_once $file; - $obj = new $classname($this->db); + $obj = new $classname($this->db); - // If generator is ODT, we must have srctemplatepath defined, if not we set it. - if ($obj->type == 'odt' && empty($srctemplatepath)) - { - $varfortemplatedir = $obj->scandir; - if ($varfortemplatedir && !empty($conf->global->$varfortemplatedir)) - { - $dirtoscan = $conf->global->$varfortemplatedir; + // If generator is ODT, we must have srctemplatepath defined, if not we set it. + if ($obj->type == 'odt' && empty($srctemplatepath)) + { + $varfortemplatedir = $obj->scandir; + if ($varfortemplatedir && !empty($conf->global->$varfortemplatedir)) + { + $dirtoscan = $conf->global->$varfortemplatedir; - $listoffiles = array(); + $listoffiles = array(); - // Now we add first model found in directories scanned - $listofdir = explode(',', $dirtoscan); - foreach ($listofdir as $key => $tmpdir) - { - $tmpdir = trim($tmpdir); - $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); - if (!$tmpdir) { unset($listofdir[$key]); continue; } - if (is_dir($tmpdir)) - { - $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0); - if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles); - } - } + // Now we add first model found in directories scanned + $listofdir = explode(',', $dirtoscan); + foreach ($listofdir as $key => $tmpdir) + { + $tmpdir = trim($tmpdir); + $tmpdir = preg_replace('/DOL_DATA_ROOT/', DOL_DATA_ROOT, $tmpdir); + if (!$tmpdir) { unset($listofdir[$key]); continue; } + if (is_dir($tmpdir)) + { + $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0); + if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles); + } + } - if (count($listoffiles)) - { - foreach ($listoffiles as $record) - { - $srctemplatepath = $record['fullname']; - break; - } - } - } + if (count($listoffiles)) + { + foreach ($listoffiles as $record) + { + $srctemplatepath = $record['fullname']; + break; + } + } + } - if (empty($srctemplatepath)) - { - $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotDefined'; - return -1; - } - } + if (empty($srctemplatepath)) + { + $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotDefined'; + return -1; + } + } - if ($obj->type == 'odt' && !empty($srctemplatepath)) - { - if (!dol_is_file($srctemplatepath)) - { - dol_syslog("Failed to locate template file ".$srctemplatepath, LOG_WARNING); - $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotFound'; - return -1; - } - } + if ($obj->type == 'odt' && !empty($srctemplatepath)) + { + if (!dol_is_file($srctemplatepath)) + { + dol_syslog("Failed to locate template file ".$srctemplatepath, LOG_WARNING); + $this->error = 'ErrorGenerationAskedForOdtTemplateWithSrcFileNotFound'; + return -1; + } + } - // We save charset_output to restore it because write_file can change it if needed for - // output format that does not support UTF8. - $sav_charset_output = $outputlangs->charset_output; + // We save charset_output to restore it because write_file can change it if needed for + // output format that does not support UTF8. + $sav_charset_output = $outputlangs->charset_output; - if (in_array(get_class($this), array('Adherent'))) - { - $arrayofrecords = array(); // The write_file of templates of adherent class need this var - $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, $moreparams); - } - else - { - $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $moreparams); - } - // After call of write_file $obj->result['fullpath'] is set with generated file. It will be used to update the ECM database index. + if (in_array(get_class($this), array('Adherent'))) + { + $arrayofrecords = array(); // The write_file of templates of adherent class need this var + $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, 'member', 1, $moreparams); + } else { + $resultwritefile = $obj->write_file($this, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $moreparams); + } + // After call of write_file $obj->result['fullpath'] is set with generated file. It will be used to update the ECM database index. - if ($resultwritefile > 0) - { - $outputlangs->charset_output = $sav_charset_output; + if ($resultwritefile > 0) + { + $outputlangs->charset_output = $sav_charset_output; - // We delete old preview - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - dol_delete_preview($this); + // We delete old preview + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + dol_delete_preview($this); - // Index file in database - if (!empty($obj->result['fullpath'])) - { - $destfull = $obj->result['fullpath']; - $upload_dir = dirname($destfull); - $destfile = basename($destfull); - $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir); + // Index file in database + if (!empty($obj->result['fullpath'])) + { + $destfull = $obj->result['fullpath']; + $upload_dir = dirname($destfull); + $destfile = basename($destfull); + $rel_dir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $upload_dir); - if (!preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) // If not a tmp dir - { - $filename = basename($destfile); - $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); - $rel_dir = preg_replace('/^[\\/]/', '', $rel_dir); + if (!preg_match('/[\\/]temp[\\/]|[\\/]thumbs|\.meta$/', $rel_dir)) // If not a tmp dir + { + $filename = basename($destfile); + $rel_dir = preg_replace('/[\\/]$/', '', $rel_dir); + $rel_dir = preg_replace('/^[\\/]/', '', $rel_dir); - include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; - $ecmfile = new EcmFiles($this->db); - $result = $ecmfile->fetch(0, '', ($rel_dir ? $rel_dir.'/' : '').$filename); + include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; + $ecmfile = new EcmFiles($this->db); + $result = $ecmfile->fetch(0, '', ($rel_dir ? $rel_dir.'/' : '').$filename); - // Set the public "share" key - $setsharekey = false; - if ($this->element == 'propal') - { - $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok - if ($useonlinesignature) $setsharekey = true; - if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey = true; - } - if ($this->element == 'commande' && !empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey = true; - } - if ($this->element == 'facture' && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey = true; - } - if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { - $setsharekey = true; - } + // Set the public "share" key + $setsharekey = false; + if ($this->element == 'propal') + { + $useonlinesignature = $conf->global->MAIN_FEATURES_LEVEL; // Replace this with 1 when feature to make online signature is ok + if ($useonlinesignature) $setsharekey = true; + if (!empty($conf->global->PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD)) $setsharekey = true; + } + if ($this->element == 'commande' && !empty($conf->global->ORDER_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey = true; + } + if ($this->element == 'facture' && !empty($conf->global->INVOICE_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey = true; + } + if ($this->element == 'bank_account' && !empty($conf->global->BANK_ACCOUNT_ALLOW_EXTERNAL_DOWNLOAD)) { + $setsharekey = true; + } - if ($setsharekey) { - if (empty($ecmfile->share)) // Because object not found or share not set yet - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; - $ecmfile->share = getRandomPassword(true); - } - } + if ($setsharekey) { + if (empty($ecmfile->share)) // Because object not found or share not set yet + { + require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; + $ecmfile->share = getRandomPassword(true); + } + } - if ($result > 0) - { - $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content - $ecmfile->fullpath_orig = ''; - $ecmfile->gen_or_uploaded = 'generated'; - $ecmfile->description = ''; // indexed content - $ecmfile->keyword = ''; // keyword content - $result = $ecmfile->update($user); - if ($result < 0) { - setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); - } - } - else - { - $ecmfile->entity = $conf->entity; - $ecmfile->filepath = $rel_dir; - $ecmfile->filename = $filename; - $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content - $ecmfile->fullpath_orig = ''; - $ecmfile->gen_or_uploaded = 'generated'; - $ecmfile->description = ''; // indexed content - $ecmfile->keyword = ''; // keyword content - $ecmfile->src_object_type = $this->table_element; - $ecmfile->src_object_id = $this->id; + if ($result > 0) + { + $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content + $ecmfile->fullpath_orig = ''; + $ecmfile->gen_or_uploaded = 'generated'; + $ecmfile->description = ''; // indexed content + $ecmfile->keyword = ''; // keyword content + $result = $ecmfile->update($user); + if ($result < 0) { + setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); + } + } else { + $ecmfile->entity = $conf->entity; + $ecmfile->filepath = $rel_dir; + $ecmfile->filename = $filename; + $ecmfile->label = md5_file(dol_osencode($destfull)); // hash of file content + $ecmfile->fullpath_orig = ''; + $ecmfile->gen_or_uploaded = 'generated'; + $ecmfile->description = ''; // indexed content + $ecmfile->keyword = ''; // keyword content + $ecmfile->src_object_type = $this->table_element; + $ecmfile->src_object_id = $this->id; - $result = $ecmfile->create($user); - if ($result < 0) { - setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); - } - } + $result = $ecmfile->create($user); + if ($result < 0) { + setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); + } + } - /*$this->result['fullname']=$destfull; + /*$this->result['fullname']=$destfull; $this->result['filepath']=$ecmfile->filepath; $this->result['filename']=$ecmfile->filename;*/ - //var_dump($obj->update_main_doc_field);exit; + //var_dump($obj->update_main_doc_field);exit; - // Update the last_main_doc field into main object (if documenent generator has property ->update_main_doc_field set) - $update_main_doc_field = 0; - if (!empty($obj->update_main_doc_field)) $update_main_doc_field = 1; - if ($update_main_doc_field && !empty($this->table_element)) - { - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; - $sql .= ' WHERE rowid = '.$this->id; + // Update the last_main_doc field into main object (if documenent generator has property ->update_main_doc_field set) + $update_main_doc_field = 0; + if (!empty($obj->update_main_doc_field)) $update_main_doc_field = 1; + if ($update_main_doc_field && !empty($this->table_element)) + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element." SET last_main_doc = '".$this->db->escape($ecmfile->filepath.'/'.$ecmfile->filename)."'"; + $sql .= ' WHERE rowid = '.$this->id; - $resql = $this->db->query($sql); - if (!$resql) { + $resql = $this->db->query($sql); + if (!$resql) { dol_print_error($this->db); } else { - $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; - } - } - } - } - else - { - dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING); - } + $this->last_main_doc = $ecmfile->filepath.'/'.$ecmfile->filename; + } + } + } + } else { + dol_syslog('Method ->write_file was called on object '.get_class($obj).' and return a success but the return array ->result["fullpath"] was not set.', LOG_WARNING); + } - // Success in building document. We build meta file. - dol_meta_create($this); + // Success in building document. We build meta file. + dol_meta_create($this); - return 1; - } - else - { - $outputlangs->charset_output = $sav_charset_output; - dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors); - return -1; - } - } else { - if (! $filefound) { - $this->error = $langs->trans("Error").' Failed to load doc generator with modelpaths='.$modelspath.' - modele='.$modele; - dol_print_error('', $this->error); - } else { - $this->error = $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $filefound); - dol_print_error('', $this->error); - } - return -1; - } - } - else return $reshook; + return 1; + } else { + $outputlangs->charset_output = $sav_charset_output; + dol_print_error($this->db, "Error generating document for ".__CLASS__.". Error: ".$obj->error, $obj->errors); + return -1; + } + } else { + if (!$filefound) { + $this->error = $langs->trans("Error").' Failed to load doc generator with modelpaths='.$modelspath.' - modele='.$modele; + dol_print_error('', $this->error); + } else { + $this->error = $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $filefound); + dol_print_error('', $this->error); + } + return -1; + } + } else return $reshook; } /** @@ -5100,9 +4802,7 @@ abstract class CommonObject if (!empty($this->errors)) { $this->errors = array_unique(array_merge($this->errors, $interface->errors)); // We use array_unique because when a trigger call another trigger on same object, this->errors is added twice. - } - else - { + } else { $this->errors = $interface->errors; } } @@ -5141,7 +4841,7 @@ abstract class CommonObject // Request to get translation values for object $sql = "SELECT rowid, property, lang , value"; $sql .= " FROM ".MAIN_DB_PREFIX."object_lang"; - $sql .= " WHERE type_object = '".$element."'"; + $sql .= " WHERE type_object = '".$this->db->escape($element)."'"; $sql .= " AND fk_object = ".$this->id; //dol_syslog(get_class($this)."::fetch_optionals get extrafields data for ".$this->table_element, LOG_DEBUG); // Too verbose @@ -5163,9 +4863,7 @@ abstract class CommonObject if (preg_match('/date/', $type)) { $this->array_languages[$key][$codelang] = $this->db->jdate($value); - } - else - { + } else { $this->array_languages[$key][$codelang] = $value; } @@ -5177,9 +4875,7 @@ abstract class CommonObject if ($numrows) return $numrows; else return 0; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -5228,14 +4924,12 @@ abstract class CommonObject // Clean parameters // TODO GMT date in memory must be GMT so we should add gm=true in parameters $value_key = dol_mktime(0, 0, 0, $_POST[$postfieldkey."month"], $_POST[$postfieldkey."day"], $_POST[$postfieldkey."year"]); - } - elseif (in_array($key_type, array('datetime'))) + } elseif (in_array($key_type, array('datetime'))) { // Clean parameters // TODO GMT date in memory must be GMT so we should add gm=true in parameters $value_key = dol_mktime($_POST[$postfieldkey."hour"], $_POST[$postfieldkey."min"], 0, $_POST[$postfieldkey."month"], $_POST[$postfieldkey."day"], $_POST[$postfieldkey."year"]); - } - elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) + } elseif (in_array($key_type, array('checkbox', 'chkbxlst'))) { $value_arr = GETPOST($postfieldkey, 'array'); // check if an array if (!empty($value_arr)) { @@ -5243,14 +4937,11 @@ abstract class CommonObject } else { $value_key = ''; } - } - elseif (in_array($key_type, array('price', 'double'))) + } elseif (in_array($key_type, array('price', 'double'))) { $value_arr = GETPOST($postfieldkey, 'alpha'); $value_key = price2num($value_arr); - } - else - { + } else { $value_key = GETPOST($postfieldkey); if (in_array($key_type, array('link')) && $value_key == '-1') $value_key = ''; } @@ -5330,9 +5021,7 @@ abstract class CommonObject $extrafields->fetch_name_optionals_label($this->table_element); } $optionsArray = (!empty($extrafields->attributes[$this->table_element]['label']) ? $extrafields->attributes[$this->table_element]['label'] : null); - } - else - { + } else { global $extrafields; dol_syslog("Warning: fetch_optionals was called with param optionsArray defined when you should pass null now", LOG_WARNING); } @@ -5352,7 +5041,7 @@ abstract class CommonObject } } $sql .= " FROM ".MAIN_DB_PREFIX.$table_element."_extrafields"; - $sql .= " WHERE fk_object = ".$rowid; + $sql .= " WHERE fk_object = ".((int) $rowid); //dol_syslog(get_class($this)."::fetch_optionals get extrafields data for ".$this->table_element, LOG_DEBUG); // Too verbose $resql = $this->db->query($sql); @@ -5373,9 +5062,7 @@ abstract class CommonObject { //var_dump($extrafields->attributes[$this->table_element]['type'][$key]); $this->array_options["options_".$key] = $this->db->jdate($value); - } - else - { + } else { $this->array_options["options_".$key] = $value; } @@ -5399,9 +5086,7 @@ abstract class CommonObject if ($numrows) return $numrows; else return 0; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -5434,9 +5119,7 @@ abstract class CommonObject $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } @@ -5495,7 +5178,7 @@ abstract class CommonObject if ($this->array_options[$key] === '') $mandatorypb = true; if ($mandatorypb) { - dol_syslog("Mandatory extra field ".$key." is empty"); + dol_syslog("Mandatory extra field ".$key." is empty"); $this->errors[] = $langs->trans('ErrorFieldRequired', $attributeLabel); return -1; } @@ -5509,11 +5192,9 @@ abstract class CommonObject if (!empty($conf->global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { $value = dol_eval($attrfieldcomputed, 1, 0); - dol_syslog($langs->trans("Extrafieldcomputed")." sur ".$attributeLabel."(".$value.")", LOG_DEBUG); - $new_array_options[$key] = $value; - } - else - { + dol_syslog($langs->trans("Extrafieldcomputed")." sur ".$attributeLabel."(".$value.")", LOG_DEBUG); + $new_array_options[$key] = $value; + } else { $new_array_options[$key] = null; } } @@ -5525,8 +5206,7 @@ abstract class CommonObject { $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_options[$key] = null; } @@ -5539,8 +5219,7 @@ abstract class CommonObject dol_syslog($langs->trans("ExtraFieldHasWrongValue")." for ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG); $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_options[$key] = null; } @@ -5571,21 +5250,16 @@ abstract class CommonObject if ($this->array_options[$key] == $this->oldcopy->array_options[$key]) // If old value crypted in database is same than submited new value, it means we don't change it, so we don't update. { $new_array_options[$key] = $this->array_options[$key]; // Value is kept - } - else - { + } else { // var_dump($algo); $newvalue = dol_hash($this->array_options[$key], $algo); $new_array_options[$key] = $newvalue; } - } - else - { + } else { $new_array_options[$key] = $this->array_options[$key]; // Value is kept } } - } - else // Common usage + } else // Common usage { $new_array_options[$key] = $this->array_options[$key]; } @@ -5609,24 +5283,20 @@ abstract class CommonObject if ($value == '-1') // -1 is key for no defined in combo list of objects { $new_array_options[$key] = ''; - } - elseif ($value) + } elseif ($value) { $object = new $InfoFieldList[0]($this->db); if (is_numeric($value)) $res = $object->fetch($value); else $res = $object->fetch('', $value); if ($res > 0) $new_array_options[$key] = $object->id; - else - { + else { $this->error = "Id/Ref '".$value."' for object '".$object->element."' not found"; $this->db->rollback(); return -1; } } - } - else - { + } else { dol_syslog('Error bad setup of extrafield', LOG_WARNING); } break; @@ -5654,13 +5324,13 @@ abstract class CommonObject // We must insert a default value for fields for other entities that are mandatory to avoid not null error if (is_array($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'])) { - foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) - { - if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously - { - $sql .= ",".$tmpkey; - } - } + foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) + { + if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously + { + $sql .= ",".$tmpkey; + } + } } $sql .= ") VALUES (".$this->id; @@ -5673,9 +5343,7 @@ abstract class CommonObject if ($new_array_options[$key] != '' || $new_array_options[$key] == '0') { $sql .= ",'".$this->db->escape($new_array_options[$key])."'"; - } - else - { + } else { $sql .= ",null"; } } @@ -5683,14 +5351,14 @@ abstract class CommonObject // We must insert a default value for fields for other entities that are mandatory to avoid not null error if (is_array($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'])) { - foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) - { - if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously - { - if (in_array($tmpval, array('int', 'double', 'price'))) $sql .= ", 0"; - else $sql .= ", ''"; - } - } + foreach ($extrafields->attributes[$this->table_element]['mandatoryfieldsofotherentities'] as $tmpkey => $tmpval) + { + if (!isset($extrafields->attributes[$this->table_element]['type'][$tmpkey])) // If field not already added previously + { + if (in_array($tmpval, array('int', 'double', 'price'))) $sql .= ", 0"; + else $sql .= ", ''"; + } + } } $sql .= ")"; @@ -5716,14 +5384,11 @@ abstract class CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } - } - else return 0; + } else return 0; } /** @@ -5766,8 +5431,7 @@ abstract class CommonObject { $this->errors[] = $langs->trans("ExtraLanguageHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_languages[$key] = null; } @@ -5779,8 +5443,7 @@ abstract class CommonObject dol_syslog($langs->trans("ExtraLanguageHasWrongValue")." sur ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG); $this->errors[] = $langs->trans("ExtraLanguageHasWrongValue", $attributeLabel); return -1; - } - elseif ($value == '') + } elseif ($value == '') { $new_array_languages[$key] = null; } @@ -5839,14 +5502,11 @@ abstract class CommonObject { $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } - } - else return 0; + } else return 0; } /** @@ -5894,8 +5554,7 @@ abstract class CommonObject { $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value === '') + } elseif ($value === '') { $this->array_options["options_".$key] = null; } @@ -5907,8 +5566,7 @@ abstract class CommonObject dol_syslog($langs->trans("ExtraFieldHasWrongValue")." sur ".$attributeLabel."(".$value."is not '".$attributeType."')", LOG_DEBUG); $this->errors[] = $langs->trans("ExtraFieldHasWrongValue", $attributeLabel); return -1; - } - elseif ($value === '') + } elseif ($value === '') { $this->array_options["options_".$key] = null; } @@ -5969,14 +5627,11 @@ abstract class CommonObject dol_syslog(__METHOD__.$this->error, LOG_ERR); $this->db->rollback(); return -1; - } - else - { + } else { $this->db->commit(); return 1; } - } - else return 0; + } else return 0; } /** @@ -6032,38 +5687,38 @@ abstract class CommonObject } $out = ''; - $type = ''; - $param = array(); - $param['options'] = array(); - $reg = array(); - $size = $this->fields[$key]['size']; - // Because we work on extrafields - if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); - $type = 'link'; - } elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); - $type = 'link'; - } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[2].':'.$reg[3] => 'N'); - $type = 'link'; - } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); - $type = 'sellist'; - } elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) { - $param['options'] = array(); - $type = 'varchar'; - $size = $reg[1]; - } elseif (preg_match('/varchar/', $val['type'])) { - $param['options'] = array(); - $type = 'varchar'; - } elseif (is_array($this->fields[$key]['arrayofkeyval'])) { - $param['options'] = $this->fields[$key]['arrayofkeyval']; - $type = 'select'; - } else { - $param['options'] = array(); - $type = $this->fields[$key]['type']; - } + $type = ''; + $param = array(); + $param['options'] = array(); + $reg = array(); + $size = $this->fields[$key]['size']; + // Because we work on extrafields + if (preg_match('/^(integer|link):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); + $type = 'link'; + } elseif (preg_match('/^(integer|link):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type = 'link'; + } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3] => 'N'); + $type = 'link'; + } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type = 'sellist'; + } elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) { + $param['options'] = array(); + $type = 'varchar'; + $size = $reg[1]; + } elseif (preg_match('/varchar/', $val['type'])) { + $param['options'] = array(); + $type = 'varchar'; + } elseif (is_array($this->fields[$key]['arrayofkeyval'])) { + $param['options'] = $this->fields[$key]['arrayofkeyval']; + $type = 'select'; + } else { + $param['options'] = array(); + $type = $this->fields[$key]['type']; + } $label = $this->fields[$key]['label']; //$elementtype=$this->fields[$key]['elementtype']; // Seems not used @@ -6086,42 +5741,31 @@ abstract class CommonObject } // Set value of $morecss. For this, we use in priority showsize from parameters, then $val['css'] then autodefine - if (empty($morecss) && !empty($val['css'])) - { - $morecss = $val['css']; - } - elseif (empty($morecss)) - { + if (empty($morecss) && !empty($val['css'])) { + $morecss = $val['css']; + } elseif (empty($morecss)) { if ($type == 'date') { $morecss = 'minwidth100imp'; - } - elseif ($type == 'datetime' || $type == 'link') // link means an foreign key to another primary id + } elseif ($type == 'datetime' || $type == 'link') // link means an foreign key to another primary id { $morecss = 'minwidth200imp'; - } - elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) + } elseif (in_array($type, array('int', 'integer', 'price')) || preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) { $morecss = 'maxwidth75'; } elseif ($type == 'url') { $morecss = 'minwidth400'; - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $morecss = ''; - } - else - { + } else { if (round($size) < 12) { $morecss = 'minwidth100'; - } - elseif (round($size) <= 48) + } elseif (round($size) <= 48) { $morecss = 'minwidth200'; - } - else - { + } else { $morecss = 'minwidth400'; } } @@ -6139,56 +5783,44 @@ abstract class CommonObject // TODO Must also support $moreparam $out = $form->selectDate($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 0, 1); - } - elseif (in_array($type, array('duration'))) + } elseif (in_array($type, array('duration'))) { $out = $form->select_duration($keyprefix.$key.$keysuffix, $value, 0, 'text', 0, 1); - } - elseif (in_array($type, array('int', 'integer'))) + } elseif (in_array($type, array('int', 'integer'))) { $tmp = explode(',', $size); $newsize = $tmp[0]; - $out = ''; - } - elseif (in_array($type, array('real'))) + $out = ''; + } elseif (in_array($type, array('real'))) { - $out = ''; - } - elseif (preg_match('/varchar/', $type)) + $out = ''; + } elseif (preg_match('/varchar/', $type)) { - $out = ''; - } - elseif (in_array($type, array('mail', 'phone', 'url'))) + $out = ''; + } elseif (in_array($type, array('mail', 'phone', 'url'))) { - $out = ''; - } - elseif ($type == 'text') + $out = ''; + } elseif (preg_match('/^text/', $type)) { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, false, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'html') + } elseif (preg_match('/^html/', $type)) { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $checked = ''; if (!empty($value)) { @@ -6197,22 +5829,19 @@ abstract class CommonObject $checked = ' value="1" '; } $out = ''; - } - elseif ($type == 'price') + } elseif ($type == 'price') { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '.$langs->getCurrencySymbol($conf->currency); - } - elseif (preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) + } elseif (preg_match('/^double(\([0-9],[0-9]\)){0,1}/', $type)) { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '; - } - elseif ($type == 'select') + } elseif ($type == 'select') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -6222,7 +5851,7 @@ abstract class CommonObject } $out .= ''; - } - elseif ($type == 'sellist') + } elseif ($type == 'sellist') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -6301,14 +5929,10 @@ abstract class CommonObject { $sql .= ' as main, '.MAIN_DB_PREFIX.$InfoFieldList[0].'_extrafields as extra'; $sqlwhere .= ' WHERE extra.fk_object=main.'.$InfoFieldList[2].' AND '.$InfoFieldList[4]; - } - else - { + } else { $sqlwhere .= ' WHERE '.$InfoFieldList[4]; } - } - else - { + } else { $sqlwhere .= ' WHERE 1=1'; } // Some tables may have field, some other not. For the moment we disable it. @@ -6343,9 +5967,7 @@ abstract class CommonObject { $labeltoshow .= $obj->$field_toshow.' '; } - } - else - { + } else { $labeltoshow = $obj->{$InfoFieldList[1]}; } $labeltoshow = dol_trunc($labeltoshow, 45); @@ -6362,16 +5984,13 @@ abstract class CommonObject } } $out .= ''; - } - else - { + } else { if (!$notrans) { $translabel = $langs->trans($obj->{$InfoFieldList[1]}); if ($translabel != $obj->{$InfoFieldList[1]}) { $labeltoshow = dol_trunc($translabel, 18); - } - else { + } else { $labeltoshow = dol_trunc($obj->{$InfoFieldList[1]}, 18); } } @@ -6395,19 +6014,16 @@ abstract class CommonObject $i++; } $this->db->free($resql); - } - else { + } else { print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; } } $out .= ''; - } - elseif ($type == 'checkbox') + } elseif ($type == 'checkbox') { $value_arr = explode(',', $value); $out = $form->multiselectarray($keyprefix.$key.$keysuffix, (empty($param['options']) ?null:$param['options']), $value_arr, '', 0, '', 0, '100%'); - } - elseif ($type == 'radio') + } elseif ($type == 'radio') { $out = ''; foreach ($param['options'] as $keyopt => $val) @@ -6418,13 +6034,11 @@ abstract class CommonObject $out .= ($value == $keyopt ? 'checked' : ''); $out .= '/>
'; } - } - elseif ($type == 'chkbxlst') + } elseif ($type == 'chkbxlst') { if (is_array($value)) { $value_arr = $value; - } - else { + } else { $value_arr = explode(',', $value); } @@ -6562,8 +6176,7 @@ abstract class CommonObject print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; } } - } - elseif ($type == 'link') + } elseif ($type == 'link') { $param_list = array_keys($param['options']); // $param_list='ObjectName:classPath[:AddCreateButtonOrNot[:Filter]]' $param_list_array = explode(':', $param_list[0]); @@ -6588,13 +6201,11 @@ abstract class CommonObject $out .= ''; } } - } - elseif ($type == 'password') + } elseif ($type == 'password') { // If prefix is 'search_', field is used as a filter, we use a common text field. $out = ''; - } - elseif ($type == 'array') + } elseif ($type == 'array') { $newval = $val; $newval['type'] = 'varchar(256)'; @@ -6673,8 +6284,7 @@ abstract class CommonObject { $type = 'varchar'; // convert varchar(xx) int varchar $size = $reg[1]; - } - elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) int varchar + } elseif (preg_match('/varchar/', $type)) $type = 'varchar'; // convert varchar(xx) int varchar if (is_array($val['arrayofkeyval'])) $type = 'select'; if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) $type = 'link'; @@ -6690,11 +6300,10 @@ abstract class CommonObject { $type = 'link'; $param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]); + } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type = 'sellist'; } - elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); - $type = 'sellist'; - } $langfile = $val['langfile']; $list = $val['list']; @@ -6716,35 +6325,26 @@ abstract class CommonObject if ($type == 'date') { $morecss = 'minwidth100imp'; - } - elseif ($type == 'datetime' || $type == 'timestamp') + } elseif ($type == 'datetime' || $type == 'timestamp') { $morecss = 'minwidth200imp'; - } - elseif (in_array($type, array('int', 'double', 'price'))) + } elseif (in_array($type, array('int', 'double', 'price'))) { $morecss = 'maxwidth75'; - } - elseif ($type == 'url') + } elseif ($type == 'url') { $morecss = 'minwidth400'; - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $morecss = ''; - } - else - { + } else { if (round($size) < 12) { $morecss = 'minwidth100'; - } - elseif (round($size) <= 48) + } elseif (round($size) <= 48) { $morecss = 'minwidth200'; - } - else - { + } else { $morecss = 'minwidth400'; } } @@ -6760,59 +6360,49 @@ abstract class CommonObject } else { $value = ''; } - } - elseif ($type == 'datetime' || $type == 'timestamp') + } elseif ($type == 'datetime' || $type == 'timestamp') { if (!empty($value)) { $value = dol_print_date($value, 'dayhour'); } else { $value = ''; } - } - elseif ($type == 'duration') + } elseif ($type == 'duration') { include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; if (!is_null($value) && $value !== '') { $value = convertSecondToTime($value, 'allhourmin'); } - } - elseif ($type == 'double' || $type == 'real') + } elseif ($type == 'double' || $type == 'real') { if (!is_null($value) && $value !== '') { $value = price($value); } - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $checked = ''; if (!empty($value)) { $checked = ' checked '; } $value = ''; - } - elseif ($type == 'mail') + } elseif ($type == 'mail') { $value = dol_print_email($value, 0, 0, 0, 64, 1, 1); - } - elseif ($type == 'url') + } elseif ($type == 'url') { $value = dol_print_url($value, '_blank', 32, 1); - } - elseif ($type == 'phone') + } elseif ($type == 'phone') { $value = dol_print_phone($value, '', 0, 0, '', ' ', 1); - } - elseif ($type == 'price') + } elseif ($type == 'price') { if (!is_null($value) && $value !== '') { $value = price($value, 0, $langs, 0, 0, -1, $conf->currency); } - } - elseif ($type == 'select') + } elseif ($type == 'select') { $value = $param['options'][$value]; - } - elseif ($type == 'sellist') + } elseif ($type == 'sellist') { $param_list = array_keys($param['options']); $InfoFieldList = explode(":", $param_list[0]); @@ -6873,9 +6463,7 @@ abstract class CommonObject $value .= $obj->$field_toshow.' '; } } - } - else - { + } else { $translabel = ''; if (!empty($obj->{$InfoFieldList[1]})) { $translabel = $langs->trans($obj->{$InfoFieldList[1]}); @@ -6886,14 +6474,11 @@ abstract class CommonObject $value = $obj->{$InfoFieldList[1]}; } } - } - else dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); - } - elseif ($type == 'radio') + } else dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); + } elseif ($type == 'radio') { $value = $param['options'][$value]; - } - elseif ($type == 'checkbox') + } elseif ($type == 'checkbox') { $value_arr = explode(',', $value); $value = ''; @@ -6905,8 +6490,7 @@ abstract class CommonObject } $value = '
    '.implode(' ', $toprint).'
'; } - } - elseif ($type == 'chkbxlst') + } elseif ($type == 'chkbxlst') { $value_arr = explode(',', $value); @@ -6973,8 +6557,7 @@ abstract class CommonObject } else { dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING); } - } - elseif ($type == 'link') + } elseif ($type == 'link') { $out = ''; @@ -6996,29 +6579,23 @@ abstract class CommonObject $object->fetch($value); $value = $object->getNomUrl($getnomurlparam); } - } - else - { + } else { dol_syslog('Error bad setup of extrafield', LOG_WARNING); return 'Error bad setup of extrafield'; } - } - else $value = ''; - } - elseif ($type == 'text' || $type == 'html') + } else $value = ''; + } elseif (preg_match('/^(text|html)/', $type)) { $value = dol_htmlentitiesbr($value); - } - elseif ($type == 'password') + } elseif ($type == 'password') { $value = preg_replace('/./i', '*', $value); - } - elseif ($type == 'array') + } elseif ($type == 'array') { $value = implode('
', $value); } - //print $type.'-'.$size; + //print $type.'-'.$size.'-'.$value; $out = $value; return $out; @@ -7039,240 +6616,253 @@ abstract class CommonObject */ public function showOptionals($extrafields, $mode = 'view', $params = null, $keysuffix = '', $keyprefix = '', $onetrtd = 0) { - global $db, $conf, $langs, $action, $form; + global $db, $conf, $langs, $action, $form, $hookmanager; if (!is_object($form)) $form = new Form($db); $out = ''; - if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) + $parameters = array(); + $reshook = $hookmanager->executeHooks('showOptionals', $parameters, $this, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { - $out .= "\n"; - $out .= ' '; - $out .= "\n"; - - $extrafields_collapse_num = ''; - $e = 0; - foreach ($extrafields->attributes[$this->table_element]['label'] as $key=>$label) + if (is_array($extrafields->attributes[$this->table_element]['label']) && count($extrafields->attributes[$this->table_element]['label']) > 0) { - // Show only the key field in params - if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue; + $out .= "\n"; + $out .= ' '; + $out .= "\n"; - // @todo Add test also on 'enabled' (different than 'list' that is 'visibility') - $enabled = 1; - if ($enabled && isset($extrafields->attributes[$this->table_element]['enabled'][$key])) + $extrafields_collapse_num = ''; + $e = 0; + foreach ($extrafields->attributes[$this->table_element]['label'] as $key=>$label) { - $enabled = dol_eval($extrafields->attributes[$this->table_element]['enabled'][$key], 1); - } - if (empty($enabled)) continue; + // Show only the key field in params + if (is_array($params) && array_key_exists('onlykey', $params) && $key != $params['onlykey']) continue; - $visibility = 1; - if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key])) - { - $visibility = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1); - } - - $perms = 1; - if ($perms && isset($extrafields->attributes[$this->table_element]['perms'][$key])) - { - $perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1); - } - - if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list - elseif (($mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3 && abs($visibility) != 4) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation - elseif ($mode == 'view' && empty($visibility)) continue; - if (empty($perms)) continue; - // Load language if required - if (!empty($extrafields->attributes[$this->table_element]['langfile'][$key])) { - $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]); - } - - $colspan = ''; - if (is_array($params) && count($params) > 0) { - if (array_key_exists('cols', $params)) { - $colspan = $params['cols']; + // Test on 'enabled' ('enabled' is different than 'list' = 'visibility') + $enabled = 1; + if ($enabled && isset($extrafields->attributes[$this->table_element]['enabled'][$key])) + { + $enabled = dol_eval($extrafields->attributes[$this->table_element]['enabled'][$key], 1); } - elseif (array_key_exists('colspan', $params)) { // For backward compatibility. Use cols instead now. - $reg = array(); - if (preg_match('/colspan="(\d+)"/', $params['colspan'], $reg)) { - $colspan = $reg[1]; - } - else { - $colspan = $params['colspan']; - } + if (empty($enabled)) continue; + + $visibility = 1; + if ($visibility && isset($extrafields->attributes[$this->table_element]['list'][$key])) + { + $visibility = dol_eval($extrafields->attributes[$this->table_element]['list'][$key], 1); } - } - switch ($mode) { - case "view": - $value = $this->array_options["options_".$key.$keysuffix]; - break; - case "create": - case "edit": - $getposttemp = GETPOST($keyprefix.'options_'.$key.$keysuffix, 'none'); // GETPOST can get value from GET, POST or setup of default values. - // GETPOST("options_" . $key) can be 'abc' or array(0=>'abc') - if (is_array($getposttemp) || $getposttemp != '' || GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) - { - if (is_array($getposttemp)) { - // $getposttemp is an array but following code expects a comma separated string - $value = implode(",", $getposttemp); - } else { - $value = $getposttemp; - } - } else { - $value = $this->array_options["options_".$key]; // No GET, no POST, no default value, so we take value of object. - } - //var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value); - break; - } + $perms = 1; + if ($perms && isset($extrafields->attributes[$this->table_element]['perms'][$key])) + { + $perms = dol_eval($extrafields->attributes[$this->table_element]['perms'][$key], 1); + } - if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') - { - $extrafields_collapse_num = ''; - $extrafield_param = $extrafields->attributes[$this->table_element]['param'][$key]; - if (!empty($extrafield_param) && is_array($extrafield_param)) { - $extrafield_param_list = array_keys($extrafield_param['options']); + if (($mode == 'create') && abs($visibility) != 1 && abs($visibility) != 3) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list + elseif (($mode == 'edit') && abs($visibility) != 1 && abs($visibility) != 3 && abs($visibility) != 4) continue; // <> -1 and <> 1 and <> 3 = not visible on forms, only on list and <> 4 = not visible at the creation + elseif ($mode == 'view' && empty($visibility)) continue; + if (empty($perms)) continue; + // Load language if required + if (!empty($extrafields->attributes[$this->table_element]['langfile'][$key])) { + $langs->load($extrafields->attributes[$this->table_element]['langfile'][$key]); + } - if (count($extrafield_param_list) > 0) { - $extrafield_collapse_display_value = intval($extrafield_param_list[0]); - - if ($extrafield_collapse_display_value == 1 || $extrafield_collapse_display_value == 2) { - $extrafields_collapse_num = $extrafields->attributes[$this->table_element]['pos'][$key]; - } - } - } - - $out .= $extrafields->showSeparator($key, $this, ($colspan + 1)); - } - else - { - $class = (!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : ''); - $csstyle = ''; + $colspan = ''; if (is_array($params) && count($params) > 0) { - if (array_key_exists('class', $params)) { - $class .= $params['class'].' '; - } - if (array_key_exists('style', $params)) { - $csstyle = $params['style']; + if (array_key_exists('cols', $params)) { + $colspan = $params['cols']; + } elseif (array_key_exists('colspan', $params)) { // For backward compatibility. Use cols instead now. + $reg = array(); + if (preg_match('/colspan="(\d+)"/', $params['colspan'], $reg)) { + $colspan = $reg[1]; + } else { + $colspan = $params['colspan']; + } } } - // add html5 elements - $domData = ' data-element="extrafield"'; - $domData .= ' data-targetelement="'.$this->element.'"'; - $domData .= ' data-targetid="'.$this->id.'"'; - - $html_id = (empty($this->id) ? '' : 'extrarow-'.$this->element.'_'.$key.'_'.$this->id); - - if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan = '0'; } - - if ($action == 'selectlines') { $colspan++; } - - // Convert date into timestamp format (value in memory must be a timestamp) - if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('date', 'datetime'))) - { - $datenotinstring = $this->array_options['options_'.$key]; - if (!is_numeric($this->array_options['options_'.$key])) // For backward compatibility - { - $datenotinstring = $this->db->jdate($datenotinstring); - } - $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min", 'int', 3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3)) : $datenotinstring; - } - // Convert float submited string into real php numeric (value in memory must be a php numeric) - if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('price', 'double'))) - { - $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ?price2num(GETPOST($keyprefix.'options_'.$key.$keysuffix, 'alpha', 3)) : $this->array_options['options_'.$key]; - } - // HTML, select, integer and text add default value - if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'select', 'int'))) - { - if ($action == 'create') $value = GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) ? GETPOST($keyprefix.'options_'.$key.$keysuffix, 'none', 3) : $extrafields->attributes[$this->table_element]['default'][$key]; - else $value = $this->array_options['options_'.$key]; - } - - $labeltoshow = $langs->trans($label); - $helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]); - - $out .= ''; - $out .= 'attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); - else $out .= $labeltoshow; - if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' *'; - } else { - if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; - $out .= '">'; - if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); - else $out .= $labeltoshow; - } - $out .= ''; - - $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; - - $out .= ''; - switch ($mode) { case "view": - $out .= $extrafields->showOutputField($key, $value); + $value = $this->array_options["options_".$key.$keysuffix]; // Value may be clean or formated later break; - case "create": - case "edit": - $out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element); + case "create": + case "edit": + // We get the value of property found with GETPOST so it takes into account: + // default values overwrite, restore back to list link, ... (but not 'default value in database' of field) + $check = 'alphanohtml'; + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text'))) { + $check = 'restricthtml'; + } + $getposttemp = GETPOST($keyprefix.'options_'.$key.$keysuffix, $check, 3); // GETPOST can get value from GET, POST or setup of default values overwrite. + // GETPOST("options_" . $key) can be 'abc' or array(0=>'abc') + if (is_array($getposttemp) || $getposttemp != '' || GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix)) + { + if (is_array($getposttemp)) { + // $getposttemp is an array but following code expects a comma separated string + $value = implode(",", $getposttemp); + } else { + $value = $getposttemp; + } + } else { + $value = $this->array_options["options_".$key]; // No GET, no POST, no default value, so we take value of object. + } + //var_dump($keyprefix.' - '.$key.' - '.$keysuffix.' - '.$keyprefix.'options_'.$key.$keysuffix.' - '.$this->array_options["options_".$key.$keysuffix].' - '.$getposttemp.' - '.$value); break; } - $out .= ''; - - /*for($ii = 0; $ii < ($colspan - 1); $ii++) + if ($extrafields->attributes[$this->table_element]['type'][$key] == 'separate') { - $out .=''; - }*/ + $extrafields_collapse_num = ''; + $extrafield_param = $extrafields->attributes[$this->table_element]['param'][$key]; + if (!empty($extrafield_param) && is_array($extrafield_param)) { + $extrafield_param_list = array_keys($extrafield_param['options']); - if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; - else $out .= ''; - $e++; - } - } - $out .= "\n"; - // Add code to manage list depending on others - if (!empty($conf->use_javascript_ajax)) { - $out .= ' - '."\n"; + $out .= $extrafields->showSeparator($key, $this, ($colspan + 1)); + } else { + $class = (!empty($extrafields->attributes[$this->table_element]['hidden'][$key]) ? 'hideobject ' : ''); + $csstyle = ''; + if (is_array($params) && count($params) > 0) { + if (array_key_exists('class', $params)) { + $class .= $params['class'].' '; + } + if (array_key_exists('style', $params)) { + $csstyle = $params['style']; + } + } + + // add html5 elements + $domData = ' data-element="extrafield"'; + $domData .= ' data-targetelement="'.$this->element.'"'; + $domData .= ' data-targetid="'.$this->id.'"'; + + $html_id = (empty($this->id) ? '' : 'extrarow-'.$this->element.'_'.$key.'_'.$this->id); + + if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && ($e % 2) == 0) { $colspan = '0'; } + + if ($action == 'selectlines') { $colspan++; } + + // Convert date into timestamp format (value in memory must be a timestamp) + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('date', 'datetime'))) + { + $datenotinstring = $this->array_options['options_'.$key]; + if (!is_numeric($this->array_options['options_'.$key])) // For backward compatibility + { + $datenotinstring = $this->db->jdate($datenotinstring); + } + $value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) || $value) ? dol_mktime(GETPOST($keyprefix.'options_'.$key.$keysuffix."hour", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."min", 'int', 3), 0, GETPOST($keyprefix.'options_'.$key.$keysuffix."month", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."day", 'int', 3), GETPOST($keyprefix.'options_'.$key.$keysuffix."year", 'int', 3)) : $datenotinstring; + } + // Convert float submited string into real php numeric (value in memory must be a php numeric) + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('price', 'double'))) + { + $value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) || $value) ? price2num($value) : $this->array_options['options_'.$key]; + } + + // HTML, text, select, integer and varchar: take into account default value in database if in create mode + if (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('html', 'text', 'varchar', 'select', 'int'))) + { + if ($action == 'create') $value = (GETPOSTISSET($keyprefix.'options_'.$key.$keysuffix) || $value) ? $value : $extrafields->attributes[$this->table_element]['default'][$key]; + } + + $labeltoshow = $langs->trans($label); + $helptoshow = $langs->trans($extrafields->attributes[$this->table_element]['help'][$key]); + + $out .= ''; + $out .= 'attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); + else $out .= $labeltoshow; + if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' *'; + } else { + if ($mode != 'view' && !empty($extrafields->attributes[$this->table_element]['required'][$key])) $out .= ' fieldrequired'; + $out .= '">'; + if (!empty($extrafields->attributes[$this->table_element]['help'][$key])) $out .= $form->textwithpicto($labeltoshow, $helptoshow); + else $out .= $labeltoshow; + } + $out .= ''; + + $html_id = !empty($this->id) ? $this->element.'_extras_'.$key.'_'.$this->id : ''; + + $out .= ''; + + switch ($mode) { + case "view": + $out .= $extrafields->showOutputField($key, $value); + break; + case "create": + $out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element); + break; + case "edit": + $out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element); + break; + } + + $out .= ''; + + /*for($ii = 0; $ii < ($colspan - 1); $ii++) + { + $out .=''; + }*/ + + if (!empty($conf->global->MAIN_EXTRAFIELDS_USE_TWO_COLUMS) && (($e % 2) == 1)) $out .= ''; + else $out .= ''; + $e++; + } + } + $out .= "\n"; + // Add code to manage list depending on others + if (!empty($conf->use_javascript_ajax)) { + $out .= ' + '."\n"; + } + $out .= ' '."\n"; } } + + $out .= $hookmanager->resPrint; + return $out; } @@ -7341,9 +6931,7 @@ abstract class CommonObject if (($unitPrice > 0) && (isset($conf->global->ForceBuyingPriceIfNull) && $conf->global->ForceBuyingPriceIfNull == 1)) // In most cases, test here is false { $buyPrice = $unitPrice * (1 - $discountPercent / 100); - } - else - { + } else { // Get cost price for margin calculation if (!empty($fk_product)) { @@ -7360,13 +6948,11 @@ abstract class CommonObject if ($product->cost_price > 0) { $buyPrice = $product->cost_price; - } - elseif ($product->pmp > 0) + } elseif ($product->pmp > 0) { $buyPrice = $product->pmp; } - } - elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') + } elseif (isset($conf->global->MARGIN_TYPE) && $conf->global->MARGIN_TYPE == 'pmp') { require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $product = new Product($this->db); @@ -7389,8 +6975,7 @@ abstract class CommonObject if (($result = $productFournisseur->find_min_price_product_fournisseur($fk_product)) > 0) { $buyPrice = $productFournisseur->fourn_unitprice; - } - elseif ($result < 0) + } elseif ($result < 0) { $this->errors[] = $productFournisseur->error; return -2; @@ -7401,7 +6986,7 @@ abstract class CommonObject return $buyPrice; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show photos of an object (nbmax maximum), into several columns * @@ -7421,7 +7006,7 @@ abstract class CommonObject */ public function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $notitle = 0, $usesharelink = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user, $langs; include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; @@ -7503,8 +7088,7 @@ abstract class CommonObject if ($nbphoto % $nbbyrow == 1) $return .= ''; $return .= ''; - } - elseif ($nbbyrow < 0) $return .= '
'; + } elseif ($nbbyrow < 0) $return .= '
'; $return .= "\n"; @@ -7530,26 +7114,20 @@ abstract class CommonObject { $return .= ''; $return .= ''; - } - else { + } else { $return .= ''; $return .= ''; } - } - else - { + } else { $return .= ''; $return .= ''; } - } - else - { + } else { if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) { $return .= ''; $return .= ''; - } - else { + } else { $return .= ''; $return .= ''; } @@ -7574,7 +7152,7 @@ abstract class CommonObject $return .= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; // Link to delete - $return .= ''; + $return .= ''; $return .= img_delete().''; } } @@ -7584,8 +7162,7 @@ abstract class CommonObject { $return .= ''; if (($nbphoto % $nbbyrow) == 0) $return .= ''; - } - elseif ($nbbyrow < 0) $return .= '
'; + } elseif ($nbbyrow < 0) $return .= '
'; } if (empty($size)) { // Format origine @@ -7601,7 +7178,7 @@ abstract class CommonObject $return .= ''.img_picto($langs->trans("Resize"), 'resize', '').'   '; // Link to delete - $return .= ''; + $return .= ''; $return .= img_delete().''; } } @@ -7674,8 +7251,7 @@ abstract class CommonObject { if (isset($info['type']) && ($info['type'] == 'duration')) return true; else return false; - } - else return false; + } else return false; } /** @@ -7690,8 +7266,7 @@ abstract class CommonObject { if (isset($info['type']) && ($info['type'] == 'int' || preg_match('/^integer/i', $info['type']))) return true; else return false; - } - else return false; + } else return false; } /** @@ -7795,13 +7370,10 @@ abstract class CommonObject if (empty($this->{$field})) { $queryarray[$field] = null; - } - else - { + } else { $queryarray[$field] = $this->db->idate($this->{$field}); } - } - elseif ($this->isArray($info)) + } elseif ($this->isArray($info)) { if (!empty($this->{$field})) { if (!is_array($this->{$field})) { @@ -7811,28 +7383,22 @@ abstract class CommonObject } else { $queryarray[$field] = null; } - } - elseif ($this->isDuration($info)) + } elseif ($this->isDuration($info)) { // $this->{$field} may be null, '', 0, '0', 123, '123' if ($this->{$field} != '' || !empty($info['notnull'])) $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 else $queryarray[$field] = null; - } - elseif ($this->isInt($info) || $this->isFloat($info)) + } elseif ($this->isInt($info) || $this->isFloat($info)) { if ($field == 'entity' && is_null($this->{$field})) $queryarray[$field] = $conf->entity; - else - { + else { // $this->{$field} may be null, '', 0, '0', 123, '123' if ($this->{$field} != '' || !empty($info['notnull'])) { if ($this->isInt($info)) $queryarray[$field] = (int) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 if ($this->isFloat($info)) $queryarray[$field] = (double) $this->{$field}; // If '0', it may be set to null later if $info['notnull'] == -1 - } - else $queryarray[$field] = null; + } else $queryarray[$field] = null; } - } - else - { + } else { $queryarray[$field] = $this->{$field}; } @@ -7847,7 +7413,7 @@ abstract class CommonObject * Function to load data from a SQL pointer into properties of current object $this * * @param stdClass $obj Contain data of object from database - * @return void + * @return void */ public function setVarsFromFetchObj(&$obj) { @@ -7857,8 +7423,7 @@ abstract class CommonObject { if (empty($obj->{$field}) || $obj->{$field} === '0000-00-00 00:00:00' || $obj->{$field} === '1000-01-01 00:00:00') $this->{$field} = 0; else $this->{$field} = strtotime($obj->{$field}); - } - elseif ($this->isArray($info)) + } elseif ($this->isArray($info)) { if (!empty($obj->{$field})) { $this->{$field} = @unserialize($obj->{$field}); @@ -7867,19 +7432,15 @@ abstract class CommonObject } else { $this->{$field} = array(); } - } - elseif ($this->isInt($info)) + } elseif ($this->isInt($info)) { if ($field == 'rowid') $this->id = (int) $obj->{$field}; - else - { + else { if ($this->isForcedToNullIfZero($info)) { if (empty($obj->{$field})) $this->{$field} = null; else $this->{$field} = (double) $obj->{$field}; - } - else - { + } else { if (!is_null($obj->{$field}) || (isset($info['notnull']) && $info['notnull'] == 1)) { $this->{$field} = (int) $obj->{$field}; } else { @@ -7887,25 +7448,20 @@ abstract class CommonObject } } } - } - elseif ($this->isFloat($info)) + } elseif ($this->isFloat($info)) { if ($this->isForcedToNullIfZero($info)) { if (empty($obj->{$field})) $this->{$field} = null; else $this->{$field} = (double) $obj->{$field}; - } - else - { + } else { if (!is_null($obj->{$field}) || (isset($info['notnull']) && $info['notnull'] == 1)) { $this->{$field} = (double) $obj->{$field}; } else { $this->{$field} = null; } } - } - else - { + } else { $this->{$field} = $obj->{$field}; } } @@ -7937,9 +7493,9 @@ abstract class CommonObject if (is_null($value)) return 'NULL'; elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) return $this->db->escape("$value"); elseif ($fieldsentry['type'] == 'boolean') { - if ($value) return 'true'; - else return 'false'; - } + if ($value) return 'true'; + else return 'false'; + } else return "'".$this->db->escape($value)."'"; } @@ -7968,11 +7524,11 @@ abstract class CommonObject if (array_key_exists('ref', $fieldvalues)) $fieldvalues['ref'] = dol_string_nospecial($fieldvalues['ref']); // If field is a ref, we sanitize data $keys = array(); - $values = array(); // Array to store string forged for SQL syntax + $values = array(); // Array to store string forged for SQL syntax foreach ($fieldvalues as $k => $v) { $keys[$k] = $k; $value = $this->fields[$k]; - $values[$k] = $this->quote($v, $value); // May return string 'NULL' if $value is null + $values[$k] = $this->quote($v, $value); // May return string 'NULL' if $value is null } // Clean and check mandatory @@ -7988,6 +7544,12 @@ abstract class CommonObject $this->errors[] = $langs->trans("ErrorFieldRequired", $this->fields[$key]['label']); } + // If value is null and there is a default value for field + if (isset($this->fields[$key]['notnull']) && $this->fields[$key]['notnull'] == 1 && (!isset($values[$key]) || $values[$key] === 'NULL') && !is_null($this->fields[$key]['default'])) + { + $values[$key] = $this->fields[$key]['default']; + } + // If field is an implicit foreign key field if (preg_match('/^integer:/i', $this->fields[$key]['type']) && empty($values[$key])) { if (isset($this->fields[$key]['default'])) $values[$key] = $this->fields[$key]['default']; @@ -8021,19 +7583,19 @@ abstract class CommonObject // If we have a field ref with a default value of (PROV) if (!$error) { - if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)') - { - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".$this->id; - $resqlupdate = $this->db->query($sql); + if (key_exists('ref', $this->fields) && $this->fields['ref']['notnull'] > 0 && !is_null($this->fields['ref']['default']) && $this->fields['ref']['default'] == '(PROV)') + { + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET ref = '(PROV".$this->id.")' WHERE (ref = '(PROV)' OR ref = '') AND rowid = ".$this->id; + $resqlupdate = $this->db->query($sql); - if ($resqlupdate === false) - { - $error++; - $this->errors[] = $this->db->lasterror(); - } else { - $this->ref = '(PROV'.$this->id.')'; - } - } + if ($resqlupdate === false) + { + $error++; + $this->errors[] = $this->db->lasterror(); + } else { + $this->ref = '(PROV'.$this->id.')'; + } + } } // Create extrafields @@ -8100,14 +7662,17 @@ abstract class CommonObject { if (empty($id) && empty($ref) && empty($morewhere)) return -1; - $sql = 'SELECT '.$this->getFieldList(); + $fieldlist = $this->getFieldList(); + if (empty($fieldlist)) return 0; + + $sql = 'SELECT '.$fieldlist; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element; - if (!empty($id)) $sql .= ' WHERE rowid = '.$id; + if (!empty($id)) $sql .= ' WHERE rowid = '.$id; elseif (!empty($ref)) $sql .= " WHERE ref = ".$this->quote($ref, $this->fields['ref']); else $sql .= ' WHERE 1 = 1'; // usage with empty id and empty ref is very rare if (empty($id) && isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql .= ' AND entity IN ('.getEntity($this->table_element).')'; - if ($morewhere) $sql .= $morewhere; + if ($morewhere) $sql .= $morewhere; $sql .= ' LIMIT 1'; // This is a fetch, to be sure to get only one record $res = $this->db->query($sql); @@ -8123,14 +7688,10 @@ abstract class CommonObject $this->fetch_optionals(); return $this->id; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; return -1; @@ -8181,9 +7742,7 @@ abstract class CommonObject } return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errors[] = $this->error; return -1; @@ -8310,8 +7869,7 @@ abstract class CommonObject return -1; } } - } - elseif (!empty($this->fk_element) && !empty($this->childtables)) // If object has childs linked with a foreign key field, we check all child tables. + } elseif (!empty($this->fk_element) && !empty($this->childtables)) // If object has childs linked with a foreign key field, we check all child tables. { $objectisused = $this->isObjectUsed($this->id); if (!empty($objectisused)) @@ -8326,46 +7884,46 @@ abstract class CommonObject // Delete cascade first if (is_array($this->childtablesoncascade) && !empty($this->childtablesoncascade)) { - foreach ($this->childtablesoncascade as $table) - { - $deleteFromObject = explode(':', $table); - if (count($deleteFromObject)>=2) { - $className = str_replace('@', '', $deleteFromObject[0]); - $filePath = $deleteFromObject[1]; - $columnName = $deleteFromObject[2]; - if (dol_include_once($filePath)) { - $childObject = new $className($this->db); - if (method_exists($childObject, 'deleteByParentField')) { - $result = $childObject->deleteByParentField($this->id, $columnName); - if ($result < 0) { + foreach ($this->childtablesoncascade as $table) + { + $deleteFromObject = explode(':', $table); + if (count($deleteFromObject) >= 2) { + $className = str_replace('@', '', $deleteFromObject[0]); + $filePath = $deleteFromObject[1]; + $columnName = $deleteFromObject[2]; + if (dol_include_once($filePath)) { + $childObject = new $className($this->db); + if (method_exists($childObject, 'deleteByParentField')) { + $result = $childObject->deleteByParentField($this->id, $columnName); + if ($result < 0) { $error++; - $this->errors[] = $childObject->error; - break; - } - } else { + $this->errors[] = $childObject->error; + break; + } + } else { $error++; $this->errors[] = "You defined a cascade delete on an object $childObject but there is no method deleteByParentField for it"; break; } - } else { - $error++; - $this->errors[] = 'Cannot include child class file ' .$filePath; - break; - } - } else { - // Delete record in child table - $sql = 'DELETE FROM ' . MAIN_DB_PREFIX . $table . ' WHERE ' . $this->fk_element . ' = ' . $this->id; - - $resql = $this->db->query($sql); - if (!$resql) { + } else { $error++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; + $this->errors[] = 'Cannot include child class file '.$filePath; break; - } - } - } - } + } + } else { + // Delete record in child table + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.$table.' WHERE '.$this->fk_element.' = '.$this->id; + + $resql = $this->db->query($sql); + if (!$resql) { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + break; + } + } + } + } if (!$error) { if (!$notrigger) { @@ -8421,8 +7979,8 @@ abstract class CommonObject if (!empty($parentId) && !empty($parentField)) { $this->db->begin(); - $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . $this->table_element; - $sql .= ' WHERE '.$parentField.' = ' . (int) $parentId; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX.$this->table_element; + $sql .= ' WHERE '.$parentField.' = '.(int) $parentId; $resql = $this->db->query($sql); if (!$resql) { @@ -8563,9 +8121,7 @@ abstract class CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -8581,7 +8137,7 @@ abstract class CommonObject */ public function initAsSpecimenCommon() { - global $user; + global $user; $this->id = 0; if (array_key_exists('label', $this->fields)) $this->label = 'This is label'; @@ -8617,40 +8173,121 @@ abstract class CommonObject return count($this->comments); } - /** - * Return nb comments already posted - * - * @return int - */ - public function getNbComments() - { - return count($this->comments); - } + /** + * Return nb comments already posted + * + * @return int + */ + public function getNbComments() + { + return count($this->comments); + } - /** - * Trim object parameters - * @param string[] $parameters array of parameters to trim - * - * @return void - */ - public function trimParameters($parameters) - { - if (!is_array($parameters)) return; - foreach ($parameters as $parameter) { - if (isset($this->$parameter)) { - $this->$parameter = trim($this->$parameter); - } - } - } + /** + * Trim object parameters + * @param string[] $parameters array of parameters to trim + * + * @return void + */ + public function trimParameters($parameters) + { + if (!is_array($parameters)) return; + foreach ($parameters as $parameter) { + if (isset($this->$parameter)) { + $this->$parameter = trim($this->$parameter); + } + } + } - /** - * copy related categories to another object - * - * @param int $fromId Id object source - * @param int $toId Id object cible - * @param string $type Type of category ('product', ...) - * @return int < 0 si erreur, > 0 si ok - */ + /* Part for categories/tags */ + + /** + * Sets object to given categories. + * + * Deletes object from existing categories not supplied. + * Adds it to non existing supplied categories. + * Existing categories are left untouch. + * + * @param string $type_categ Category type ('customer', 'supplier', 'website_page', ...) + * @return int Array of category objects or < 0 if KO + */ + public function getCategoriesCommon($type_categ) + { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + + // Get current categories + $c = new Categorie($this->db); + $existing = $c->containing($this->id, $type_categ, 'id'); + + return $existing; + } + + /** + * Sets object to given categories. + * + * Deletes object from existing categories not supplied. + * Adds it to non existing supplied categories. + * Existing categories are left untouch. + * + * @param int[]|int $categories Category ID or array of Categories IDs + * @param string $type_categ Category type ('customer', 'supplier', 'website_page', ...) + * @return int <0 if KO, >0 if OK + */ + public function setCategoriesCommon($categories, $type_categ) + { + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + + // Handle single category + if (!is_array($categories)) { + $categories = array($categories); + } + + // Get current categories + $c = new Categorie($this->db); + $existing = $c->containing($this->id, $type_categ, 'id'); + + // Diff + if (is_array($existing)) { + $to_del = array_diff($existing, $categories); + $to_add = array_diff($categories, $existing); + } else { + $to_del = array(); // Nothing to delete + $to_add = $categories; + } + + $error = 0; + + // Process + foreach ($to_del as $del) { + if ($c->fetch($del) > 0) { + $c->del_type($this, $type_categ); + } + } + foreach ($to_add as $add) { + if ($c->fetch($add) > 0) + { + $result = $c->add_type($this, $type_categ); + if ($result < 0) + { + $error++; + $this->error = $c->error; + $this->errors = $c->errors; + break; + } + } + } + + return $error ? -1 : 1; + } + + /** + * Copy related categories to another object + * + * @param int $fromId Id object source + * @param int $toId Id object cible + * @param string $type Type of category ('product', ...) + * @return int < 0 si erreur, > 0 si ok + */ public function cloneCategories($fromId, $toId, $type = '') { $this->db->begin(); @@ -8662,7 +8299,7 @@ abstract class CommonObject $sql = "INSERT INTO ".MAIN_DB_PREFIX."categorie_".(empty($categorystatic->MAP_CAT_TABLE[$type]) ? $type : $categorystatic->MAP_CAT_TABLE[$type])." (fk_categorie, fk_product)"; $sql .= " SELECT fk_categorie, $toId FROM ".MAIN_DB_PREFIX."categorie_".(empty($categorystatic->MAP_CAT_TABLE[$type]) ? $type : $categorystatic->MAP_CAT_TABLE[$type]); - $sql .= " WHERE fk_product = '".$fromId."'"; + $sql .= " WHERE fk_product = ".((int) $fromId); if (!$this->db->query($sql)) { @@ -8708,7 +8345,7 @@ abstract class CommonObject $sql = "DELETE FROM ".MAIN_DB_PREFIX."ecm_files"; $sql.= " WHERE filename LIKE '".$this->db->escape($this->ref)."%'"; - $sql.= " AND filepath = '".$element."/".$this->db->escape($this->ref)."' AND entity = ".$conf->entity; + $sql.= " AND filepath = '".$this->db->escape($element)."/".$this->db->escape($this->ref)."' AND entity = ".$conf->entity; if (!$this->db->query($sql)) { $this->error = $this->db->lasterror(); diff --git a/htdocs/core/class/commonobjectline.class.php b/htdocs/core/class/commonobjectline.class.php index a68d5c22002..c7e95aa1fbc 100644 --- a/htdocs/core/class/commonobjectline.class.php +++ b/htdocs/core/class/commonobjectline.class.php @@ -50,12 +50,22 @@ abstract class CommonObjectLine extends CommonObject public $fk_unit; + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } + /** * Returns the label, shot_label or code found in units dictionary from ->fk_unit. * A langs->trans() must be called on result to get translated value. * - * @param string $type Label type (long, short or code). This can be a translation key. - * @return string|int <0 if ko, label if ok + * @param string $type Label type ('long', 'short' or 'code'). This can be a translation key. + * @return string|int <0 if KO, label if OK (Example: 'long', 'short' or 'unitCODE') */ public function getLabelOfUnit($type = 'long') { @@ -81,9 +91,7 @@ abstract class CommonObjectLine extends CommonObject else $label = $res[$label_type]; $this->db->free($resql); return $label; - } - else - { + } else { $this->error = $this->db->error().' sql='.$sql; dol_syslog(get_class($this)."::getLabelOfUnit Error ".$this->error, LOG_ERR); return -1; diff --git a/htdocs/core/class/commonorder.class.php b/htdocs/core/class/commonorder.class.php index e45d08a9396..83d20e99b95 100644 --- a/htdocs/core/class/commonorder.class.php +++ b/htdocs/core/class/commonorder.class.php @@ -23,13 +23,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/commonincoterm.class.php'; /** * Superclass for orders classes */ abstract class CommonOrder extends CommonObject { - + use CommonIncoterm; } /** diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 50330f26b17..c3d6e7de299 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -127,7 +127,7 @@ abstract class CommonStickerGenerator /** * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param Translate $outputlangs Output langs * @param array $param Associative array containing label content and optional parameters * @return void @@ -139,7 +139,7 @@ abstract class CommonStickerGenerator * Methode qui permet de modifier la taille des caracteres * Cela modiera aussi l'espace entre chaque ligne * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param int $pt point * @return void */ @@ -158,7 +158,7 @@ abstract class CommonStickerGenerator /** * protected Print dot line * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param int $x1 X1 * @param int $y1 Y1 * @param int $x2 X2 @@ -175,8 +175,7 @@ abstract class CommonStickerGenerator $hauteur = abs($y1 - $y2); if ($length > $hauteur) { $Pointilles = ($length / $nbPointilles) / 2; // taille des pointilles - } - else { + } else { $Pointilles = ($hauteur / $nbPointilles) / 2; } for ($i = $x1; $i <= $x2; $i += $Pointilles + $Pointilles) { @@ -202,7 +201,7 @@ abstract class CommonStickerGenerator /** * protected Function realisant une croix aux 4 coins des cartes * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param int $x1 X1 * @param int $y1 Y1 * @param int $x2 X2 @@ -281,7 +280,7 @@ abstract class CommonStickerGenerator /** * protected Set format * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param string $format Format * @return void */ diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index ad87949d4e9..32d7b145a41 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -183,7 +183,7 @@ class Conf //if (! defined("$key")) define("$key", $value); // In some cases, the constant might be already forced (Example: SYSLOG_HANDLERS during install) $this->global->$key = $value; - if ($value && preg_match('/^MAIN_MODULE_/', $key)) + if ($value && strpos($key, 'MAIN_MODULE_') === 0) { $reg = array(); // If this is constant for a new tab page activated by a module. It initializes modules_parts['tabs']. @@ -191,7 +191,7 @@ class Conf { $partname = 'tabs'; $params = explode(':', $value, 2); - if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } + if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } $this->modules_parts[$partname][$params[0]][] = $value; // $value may be a string or an array } // If this is constant for all generic part activated by a module. It initializes @@ -203,7 +203,7 @@ class Conf { $modulename = strtolower($reg[1]); $partname = strtolower($reg[2]); - if (!isset($this->modules_parts[$partname]) || !is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } + if (!is_array($this->modules_parts[$partname])) { $this->modules_parts[$partname] = array(); } $arrValue = json_decode($value, true); if (is_array($arrValue) && !empty($arrValue)) $value = $arrValue; elseif (in_array($partname, array('login', 'menus', 'substitutions', 'triggers', 'tpl'))) $value = '/'.$modulename.'/core/'.$partname.'/'; @@ -249,8 +249,7 @@ class Conf { try { date_default_timezone_set($this->global->MAIN_SERVER_TZ); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog("Error: Bad value for parameter MAIN_SERVER_TZ=".$this->global->MAIN_SERVER_TZ, LOG_ERR); } @@ -271,14 +270,7 @@ class Conf if (empty($this->global->MAIN_MENUFRONT_STANDARD)) $this->global->MAIN_MENUFRONT_STANDARD = "eldy_menu.php"; if (empty($this->global->MAIN_MENU_SMARTPHONE)) $this->global->MAIN_MENU_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones if (empty($this->global->MAIN_MENUFRONT_SMARTPHONE)) $this->global->MAIN_MENUFRONT_SMARTPHONE = "eldy_menu.php"; // Use eldy by default because smartphone does not work on all phones - // Clean var use vat for company if (!isset($this->global->FACTURE_TVAOPTION)) $this->global->FACTURE_TVAOPTION = 1; - elseif (!empty($this->global->FACTURE_TVAOPTION) && !is_numeric($this->global->FACTURE_TVAOPTION)) - { - // Old value of option, we clean to use new value (0 or 1) - if ($this->global->FACTURE_TVAOPTION != "franchise") $this->global->FACTURE_TVAOPTION = 1; - else $this->global->FACTURE_TVAOPTION = 0; - } // Variable globales LDAP if (empty($this->global->LDAP_FIELD_FULLNAME)) $this->global->LDAP_FIELD_FULLNAME = ''; @@ -332,9 +324,7 @@ class Conf // For backward compatibility $this->$module->$dirname = $rootfordata."/".$name; - } - else - { + } else { // For multicompany sharings $this->$module->$multidirname = array($this->entity => $rootfortemp."/".$name."/temp"); @@ -410,28 +400,22 @@ class Conf $this->fournisseur->payment->dir_output = $rootfordata."/fournisseur/payment"; // For backward compatibility $this->fournisseur->payment->dir_temp = $rootfortemp."/fournisseur/payment/temp"; // For backward compatibility - // To prepare split of module fournisseur into fournisseur + supplier_order + supplier_invoice - if (!empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // By default, if module supplier is on, we set new properties + // To prepare split of module fournisseur into module 'fournisseur' + supplier_order + supplier_invoice + if (!empty($this->fournisseur->enabled) && empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // By default, if module supplier is on, and we don't use yet the new modules, we set artificialy the module properties { - if (empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // This can be set to 1 once modules purchase order and supplier invoice exists - { - $this->supplier_order = new stdClass(); - $this->supplier_order->enabled = 1; - $this->supplier_order->multidir_output = array($this->entity => $rootfordata."/fournisseur/commande"); - $this->supplier_order->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/commande/temp"); - $this->supplier_order->dir_output = $rootfordata."/fournisseur/commande"; // For backward compatibility - $this->supplier_order->dir_temp = $rootfortemp."/fournisseur/commande/temp"; // For backward compatibility - } + $this->supplier_order = new stdClass(); + $this->supplier_order->enabled = 1; + $this->supplier_order->multidir_output = array($this->entity => $rootfordata."/fournisseur/commande"); + $this->supplier_order->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/commande/temp"); + $this->supplier_order->dir_output = $rootfordata."/fournisseur/commande"; // For backward compatibility + $this->supplier_order->dir_temp = $rootfortemp."/fournisseur/commande/temp"; // For backward compatibility - if (empty($this->global->MAIN_USE_NEW_SUPPLIERMOD)) // This can be set to 1 once modules purchase order and supplier invoice exists - { - $this->supplier_invoice = new stdClass(); - $this->supplier_invoice->enabled = 1; - $this->supplier_invoice->multidir_output = array($this->entity => $rootfordata."/fournisseur/facture"); - $this->supplier_invoice->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/facture/temp"); - $this->supplier_invoice->dir_output = $rootfordata."/fournisseur/facture"; // For backward compatibility - $this->supplier_invoice->dir_temp = $rootfortemp."/fournisseur/facture/temp"; // For backward compatibility - } + $this->supplier_invoice = new stdClass(); + $this->supplier_invoice->enabled = 1; + $this->supplier_invoice->multidir_output = array($this->entity => $rootfordata."/fournisseur/facture"); + $this->supplier_invoice->multidir_temp = array($this->entity => $rootfortemp."/fournisseur/facture/temp"); + $this->supplier_invoice->dir_output = $rootfordata."/fournisseur/facture"; // For backward compatibility + $this->supplier_invoice->dir_temp = $rootfortemp."/fournisseur/facture/temp"; // For backward compatibility } } @@ -499,7 +483,9 @@ class Conf $this->global->STOCK_CALCULATE_ON_SHIPMENT_CLOSE = 0; $this->global->STOCK_CALCULATE_ON_SUPPLIER_BILL = 0; $this->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER = 0; - if (empty($this->reception->enabled))$this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1; + if (empty($this->reception->enabled)) { + $this->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER = 1; + } else { $this->global->STOCK_CALCULATE_ON_RECEPTION = 1; $this->global->STOCK_CALCULATE_ON_RECEPTION_CLOSE = 0; @@ -617,58 +603,58 @@ class Conf // Avoid strict errors. TODO: Replace xxx->warning_delay with a property ->warning_delay_xxx if (isset($this->agenda)) { $this->adherent->subscription = new stdClass(); - $this->adherent->subscription->warning_delay = (isset($this->global->MAIN_DELAY_MEMBERS) ? $this->global->MAIN_DELAY_MEMBERS : 0) * 24 * 60 * 60; + $this->adherent->subscription->warning_delay = (isset($this->global->MAIN_DELAY_MEMBERS) ? $this->global->MAIN_DELAY_MEMBERS : 0) * 86400; } if (isset($this->agenda)) { - $this->agenda->warning_delay = (isset($this->global->MAIN_DELAY_ACTIONS_TODO) ? $this->global->MAIN_DELAY_ACTIONS_TODO : 7) * 24 * 60 * 60; + $this->agenda->warning_delay = (isset($this->global->MAIN_DELAY_ACTIONS_TODO) ? $this->global->MAIN_DELAY_ACTIONS_TODO : 7) * 86400; } if (isset($this->projet)) { - $this->projet->warning_delay = (isset($this->global->MAIN_DELAY_PROJECT_TO_CLOSE) ? $this->global->MAIN_DELAY_PROJECT_TO_CLOSE : 7) * 24 * 60 * 60; + $this->projet->warning_delay = (isset($this->global->MAIN_DELAY_PROJECT_TO_CLOSE) ? $this->global->MAIN_DELAY_PROJECT_TO_CLOSE : 7) * 86400; $this->projet->task = new StdClass(); - $this->projet->task->warning_delay = (isset($this->global->MAIN_DELAY_TASKS_TODO) ? $this->global->MAIN_DELAY_TASKS_TODO : 7) * 24 * 60 * 60; + $this->projet->task->warning_delay = (isset($this->global->MAIN_DELAY_TASKS_TODO) ? $this->global->MAIN_DELAY_TASKS_TODO : 7) * 86400; } if (isset($this->commande)) { $this->commande->client = new stdClass(); $this->commande->fournisseur = new stdClass(); - $this->commande->client->warning_delay = (isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_ORDERS_TO_PROCESS : 2) * 24 * 60 * 60; - $this->commande->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS : 7) * 24 * 60 * 60; + $this->commande->client->warning_delay = (isset($this->global->MAIN_DELAY_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_ORDERS_TO_PROCESS : 2) * 86400; + $this->commande->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS) ? $this->global->MAIN_DELAY_SUPPLIER_ORDERS_TO_PROCESS : 7) * 86400; } if (isset($this->propal)) { $this->propal->cloture = new stdClass(); $this->propal->facturation = new stdClass(); - $this->propal->cloture->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_CLOSE) ? $this->global->MAIN_DELAY_PROPALS_TO_CLOSE : 0) * 24 * 60 * 60; - $this->propal->facturation->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_BILL) ? $this->global->MAIN_DELAY_PROPALS_TO_BILL : 0) * 24 * 60 * 60; + $this->propal->cloture->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_CLOSE) ? $this->global->MAIN_DELAY_PROPALS_TO_CLOSE : 0) * 86400; + $this->propal->facturation->warning_delay = (isset($this->global->MAIN_DELAY_PROPALS_TO_BILL) ? $this->global->MAIN_DELAY_PROPALS_TO_BILL : 0) * 86400; } if (isset($this->facture)) { $this->facture->client = new stdClass(); $this->facture->fournisseur = new stdClass(); - $this->facture->client->warning_delay = (isset($this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED) ? $this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED : 0) * 24 * 60 * 60; - $this->facture->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY) ? $this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY : 0) * 24 * 60 * 60; + $this->facture->client->warning_delay = (isset($this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED) ? $this->global->MAIN_DELAY_CUSTOMER_BILLS_UNPAYED : 0) * 86400; + $this->facture->fournisseur->warning_delay = (isset($this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY) ? $this->global->MAIN_DELAY_SUPPLIER_BILLS_TO_PAY : 0) * 86400; } if (isset($this->contrat)) { $this->contrat->services = new stdClass(); $this->contrat->services->inactifs = new stdClass(); $this->contrat->services->expires = new stdClass(); - $this->contrat->services->inactifs->warning_delay = (isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES) ? $this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES : 0) * 24 * 60 * 60; - $this->contrat->services->expires->warning_delay = (isset($this->global->MAIN_DELAY_RUNNING_SERVICES) ? $this->global->MAIN_DELAY_RUNNING_SERVICES : 0) * 24 * 60 * 60; + $this->contrat->services->inactifs->warning_delay = (isset($this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES) ? $this->global->MAIN_DELAY_NOT_ACTIVATED_SERVICES : 0) * 86400; + $this->contrat->services->expires->warning_delay = (isset($this->global->MAIN_DELAY_RUNNING_SERVICES) ? $this->global->MAIN_DELAY_RUNNING_SERVICES : 0) * 86400; } if (isset($this->commande)) { $this->bank->rappro = new stdClass(); $this->bank->cheque = new stdClass(); - $this->bank->rappro->warning_delay = (isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE) ? $this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE : 0) * 24 * 60 * 60; - $this->bank->cheque->warning_delay = (isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT) ? $this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT : 0) * 24 * 60 * 60; + $this->bank->rappro->warning_delay = (isset($this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE) ? $this->global->MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE : 0) * 86400; + $this->bank->cheque->warning_delay = (isset($this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT) ? $this->global->MAIN_DELAY_CHEQUES_TO_DEPOSIT : 0) * 86400; } if (isset($this->expensereport)) { $this->expensereport->approve = new stdClass(); - $this->expensereport->approve->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS) ? $this->global->MAIN_DELAY_EXPENSEREPORTS : 0) * 24 * 60 * 60; + $this->expensereport->approve->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS) ? $this->global->MAIN_DELAY_EXPENSEREPORTS : 0) * 86400; $this->expensereport->payment = new stdClass(); - $this->expensereport->payment->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY) ? $this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY : 0) * 24 * 60 * 60; + $this->expensereport->payment->warning_delay = (isset($this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY) ? $this->global->MAIN_DELAY_EXPENSEREPORTS_TO_PAY : 0) * 86400; } if (isset($this->holiday)) { $this->holiday->approve = new stdClass(); - $this->holiday->approve->warning_delay = (isset($this->global->MAIN_DELAY_HOLIDAYS) ? $this->global->MAIN_DELAY_HOLIDAYS : 0) * 24 * 60 * 60; + $this->holiday->approve->warning_delay = (isset($this->global->MAIN_DELAY_HOLIDAYS) ? $this->global->MAIN_DELAY_HOLIDAYS : 0) * 86400; } if (!empty($this->global->PRODUIT_MULTIPRICES) && empty($this->global->PRODUIT_MULTIPRICES_LIMIT)) @@ -698,6 +684,9 @@ class Conf // If we are in develop mode, we activate the option MAIN_SECURITY_CSRF_WITH_TOKEN to 1 if not already defined. if (!isset($this->global->MAIN_SECURITY_CSRF_WITH_TOKEN) && $this->global->MAIN_FEATURES_LEVEL >= 2) $this->global->MAIN_SECURITY_CSRF_WITH_TOKEN = 1; + if (defined('MAIN_ANTIVIRUS_COMMAND')) $this->global->MAIN_ANTIVIRUS_COMMAND = constant('MAIN_ANTIVIRUS_COMMAND'); + if (defined('MAIN_ANTIVIRUS_PARAM')) $this->global->MAIN_ANTIVIRUS_PARAM = constant('MAIN_ANTIVIRUS_PARAM'); + // For backward compatibility if (isset($this->product)) $this->produit = $this->product; if (isset($this->facture)) $this->invoice = $this->facture; @@ -712,39 +701,42 @@ class Conf if (is_object($mc)) $mc->setValues($this); } - // We init log handlers - if (!empty($this->global->SYSLOG_HANDLERS)) { - $handlers = json_decode($this->global->SYSLOG_HANDLERS); - } else { - $handlers = array(); - } - foreach ($handlers as $handler) { - $handler_files = array(); - $dirsyslogs = array_merge(array('/core/modules/syslog/'), $this->modules_parts['syslog']); - foreach ($dirsyslogs as $reldir) { - $dir = dol_buildpath($reldir, 0); - $newdir = dol_osencode($dir); - if (is_dir($newdir)) { - $file = $newdir.$handler.'.php'; - if (file_exists($file)) { - $handler_files[] = $file; + if (!empty($this->syslog->enabled)) { + // We init log handlers + if (!empty($this->global->SYSLOG_HANDLERS)) { + $handlers = json_decode($this->global->SYSLOG_HANDLERS); + } else { + $handlers = array(); + } + foreach ($handlers as $handler) { + $handler_file_found = ''; + $dirsyslogs = array_merge(array('/core/modules/syslog/'), $this->modules_parts['syslog']); + foreach ($dirsyslogs as $reldir) { + $dir = dol_buildpath($reldir, 0); + $newdir = dol_osencode($dir); + if (is_dir($newdir)) { + $file = $newdir.$handler.'.php'; + if (file_exists($file)) { + $handler_file_found = $file; + break; + } } } - } - if (empty($handler_files)) { - throw new Exception('Missing log handler file '.$handler.'.php'); - } + if (empty($handler_file_found)) { + throw new Exception('Missing log handler file '.$handler.'.php'); + } - require_once $handler_files[0]; - $loghandlerinstance = new $handler(); - if (!$loghandlerinstance instanceof LogHandlerInterface) { - throw new Exception('Log handler does not extend LogHandlerInterface'); - } + require_once $handler_file_found; + $loghandlerinstance = new $handler(); + if (!$loghandlerinstance instanceof LogHandlerInterface) { + throw new Exception('Log handler does not extend LogHandlerInterface'); + } - if (empty($this->loghandlers[$handler])) { - $this->loghandlers[$handler] = $loghandlerinstance; + if (empty($this->loghandlers[$handler])) { + $this->loghandlers[$handler] = $loghandlerinstance; + } } - } + } } } diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 999b01341f0..ad7d93506f4 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -31,408 +31,385 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class CoreObject extends CommonObject { - public $withChild = true; + public $withChild = true; - /** - * @var Array $_fields Fields to synchronize with Database - */ - protected $fields = array(); + /** + * @var Array $_fields Fields to synchronize with Database + */ + protected $fields = array(); - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct(DoliDB &$db) - { - $this->db = $db; - } + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct(DoliDB &$db) + { + $this->db = $db; + } - /** - * Function to init fields - * - * @return bool - */ - protected function init() - { - $this->id = 0; - $this->datec = 0; - $this->tms = 0; + /** + * Function to init fields + * + * @return bool + */ + protected function init() + { + $this->id = 0; + $this->datec = 0; + $this->tms = 0; - if (!empty($this->fields)) - { - foreach ($this->fields as $field=>$info) - { - if ($this->isDate($info)) $this->{$field} = time(); - elseif ($this->isArray($info)) $this->{$field} = array(); - elseif ($this->isInt($info)) $this->{$field} = (int) 0; - elseif ($this->isFloat($info)) $this->{$field} = (double) 0; - else $this->{$field} = ''; - } + if (!empty($this->fields)) + { + foreach ($this->fields as $field=>$info) + { + if ($this->isDate($info)) $this->{$field} = time(); + elseif ($this->isArray($info)) $this->{$field} = array(); + elseif ($this->isInt($info)) $this->{$field} = (int) 0; + elseif ($this->isFloat($info)) $this->{$field} = (double) 0; + else $this->{$field} = ''; + } - $this->to_delete = false; - $this->is_clone = false; + $this->to_delete = false; + $this->is_clone = false; - return true; - } - else - { - return false; - } - } + return true; + } else { + return false; + } + } - /** - * Test type of field - * - * @param string $field name of field - * @param string $type type of field to test - * @return boolean value of field or false - */ - private function checkFieldType($field, $type) - { - if (isset($this->fields[$field]) && method_exists($this, 'is_'.$type)) - { - return $this->{'is_'.$type}($this->fields[$field]); - } - else - { - return false; - } - } + /** + * Test type of field + * + * @param string $field name of field + * @param string $type type of field to test + * @return boolean value of field or false + */ + private function checkFieldType($field, $type) + { + if (isset($this->fields[$field]) && method_exists($this, 'is_'.$type)) + { + return $this->{'is_'.$type}($this->fields[$field]); + } else { + return false; + } + } - /** - * Get object and children from database - * - * @param int $id Id of object to load - * @param bool $loadChild used to load children from database - * @return int >0 if OK, <0 if KO, 0 if not found - */ - public function fetch($id, $loadChild = true) - { - $res = $this->fetchCommon($id); - if ($res > 0) { - if ($loadChild) $this->fetchChild(); - } + /** + * Get object and children from database + * + * @param int $id Id of object to load + * @param bool $loadChild used to load children from database + * @return int >0 if OK, <0 if KO, 0 if not found + */ + public function fetch($id, $loadChild = true) + { + $res = $this->fetchCommon($id); + if ($res > 0) { + if ($loadChild) $this->fetchChild(); + } - return $res; - } + return $res; + } - /** - * Function to instantiate a new child - * - * @param string $tabName Table name of child - * @param int $id If id is given, we try to return his key if exist or load if we try_to_load - * @param string $key Attribute name of the object id - * @param bool $try_to_load Force the fetch if an id is given - * @return int - */ - public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false) - { - if (!empty($id)) - { - foreach ($this->{$tabName} as $k=>&$object) - { - if ($object->{$key} === $id) return $k; - } - } + /** + * Function to instantiate a new child + * + * @param string $tabName Table name of child + * @param int $id If id is given, we try to return his key if exist or load if we try_to_load + * @param string $key Attribute name of the object id + * @param bool $try_to_load Force the fetch if an id is given + * @return int + */ + public function addChild($tabName, $id = 0, $key = 'id', $try_to_load = false) + { + if (!empty($id)) + { + foreach ($this->{$tabName} as $k=>&$object) + { + if ($object->{$key} === $id) return $k; + } + } - $k = count($this->{$tabName}); + $k = count($this->{$tabName}); - $className = ucfirst($tabName); - $this->{$tabName}[$k] = new $className($this->db); - if ($id > 0 && $key === 'id' && $try_to_load) - { - $this->{$tabName}[$k]->fetch($id); - } + $className = ucfirst($tabName); + $this->{$tabName}[$k] = new $className($this->db); + if ($id > 0 && $key === 'id' && $try_to_load) + { + $this->{$tabName}[$k]->fetch($id); + } - return $k; - } + return $k; + } - /** - * Function to set a child as to delete - * - * @param string $tabName Table name of child - * @param int $id Id of child to set as to delete - * @param string $key Attribute name of the object id - * @return bool - */ - public function removeChild($tabName, $id, $key = 'id') - { - foreach ($this->{$tabName} as &$object) - { - if ($object->{$key} == $id) - { - $object->to_delete = true; - return true; - } - } - return false; - } + /** + * Function to set a child as to delete + * + * @param string $tabName Table name of child + * @param int $id Id of child to set as to delete + * @param string $key Attribute name of the object id + * @return bool + */ + public function removeChild($tabName, $id, $key = 'id') + { + foreach ($this->{$tabName} as &$object) + { + if ($object->{$key} == $id) + { + $object->to_delete = true; + return true; + } + } + return false; + } - /** - * Function to fetch children objects - * - * @return void - */ - public function fetchChild() - { - if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) - { - foreach ($this->childtables as &$childTable) - { - $className = ucfirst($childTable); + /** + * Function to fetch children objects + * + * @return void + */ + public function fetchChild() + { + if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) + { + foreach ($this->childtables as &$childTable) + { + $className = ucfirst($childTable); - $this->{$className} = array(); + $this->{$className} = array(); - $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$childTable.' WHERE '.$this->fk_element.' = '.$this->id; - $res = $this->db->query($sql); + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$childTable.' WHERE '.$this->fk_element.' = '.$this->id; + $res = $this->db->query($sql); - if ($res) - { - while ($obj = $this->db->fetch_object($res)) - { - $o = new $className($this->db); - $o->fetch($obj->rowid); + if ($res) + { + while ($obj = $this->db->fetch_object($res)) + { + $o = new $className($this->db); + $o->fetch($obj->rowid); - $this->{$className}[] = $o; - } - } - else - { - $this->errors[] = $this->db->lasterror(); - } - } - } - } + $this->{$className}[] = $o; + } + } else { + $this->errors[] = $this->db->lasterror(); + } + } + } + } - /** - * Function to update children data - * - * @param User $user user object - * @return void - */ - public function saveChild(User &$user) - { - if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) - { - foreach ($this->childtables as &$childTable) - { - $className = ucfirst($childTable); - if (!empty($this->{$className})) - { - foreach ($this->{$className} as $i => &$object) - { - $object->{$this->fk_element} = $this->id; + /** + * Function to update children data + * + * @param User $user user object + * @return void + */ + public function saveChild(User &$user) + { + if ($this->withChild && !empty($this->childtables) && !empty($this->fk_element)) + { + foreach ($this->childtables as &$childTable) + { + $className = ucfirst($childTable); + if (!empty($this->{$className})) + { + foreach ($this->{$className} as $i => &$object) + { + $object->{$this->fk_element} = $this->id; - $object->update($user); - if ($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete == true) unset($this->{$className}[$i]); - } - } - } - } - } + $object->update($user); + if ($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete == true) unset($this->{$className}[$i]); + } + } + } + } + } - /** - * Function to update object or create or delete if needed - * - * @param User $user User object - * @return int < 0 if KO, > 0 if OK - */ - public function update(User &$user) - { - if (empty($this->id)) return $this->create($user); // To test, with that, no need to test on high level object, the core decide it, update just needed - elseif (isset($this->to_delete) && $this->to_delete == true) return $this->delete($user); + /** + * Function to update object or create or delete if needed + * + * @param User $user User object + * @return int < 0 if KO, > 0 if OK + */ + public function update(User &$user) + { + if (empty($this->id)) return $this->create($user); // To test, with that, no need to test on high level object, the core decide it, update just needed + elseif (isset($this->to_delete) && $this->to_delete == true) return $this->delete($user); - $error = 0; - $this->db->begin(); + $error = 0; + $this->db->begin(); - $res = $this->updateCommon($user); - if ($res) - { - $result = $this->call_trigger(strtoupper($this->element).'_UPDATE', $user); - if ($result < 0) $error++; - else $this->saveChild($user); - } - else - { - $error++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - } + $res = $this->updateCommon($user); + if ($res) + { + $result = $this->call_trigger(strtoupper($this->element).'_UPDATE', $user); + if ($result < 0) $error++; + else $this->saveChild($user); + } else { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } - if (empty($error)) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } + if (empty($error)) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1; + } + } - /** - * Function to create object in database - * - * @param User $user user object - * @return int < 0 if KO, > 0 if OK - */ - public function create(User &$user) - { - if ($this->id > 0) return $this->update($user); + /** + * Function to create object in database + * + * @param User $user User object + * @return int < 0 if KO, > 0 if OK + */ + public function create(User $user) + { + if ($this->id > 0) return $this->update($user); - $error = 0; - $this->db->begin(); + $error = 0; + $this->db->begin(); - $res = $this->createCommon($user); - if ($res) - { - $this->id = $this->db->last_insert_id($this->table_element); + $res = $this->createCommon($user); + if ($res) + { + $this->id = $this->db->last_insert_id($this->table_element); - $result = $this->call_trigger(strtoupper($this->element).'_CREATE', $user); - if ($result < 0) $error++; - else $this->saveChild($user); - } - else - { - $error++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - } + $result = $this->call_trigger(strtoupper($this->element).'_CREATE', $user); + if ($result < 0) $error++; + else $this->saveChild($user); + } else { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + } - if (empty($error)) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } + if (empty($error)) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1; + } + } - /** - * Function to delete object in database - * - * @param User $user user object - * @return int < 0 if KO, > 0 if OK - */ - public function delete(User &$user) - { - if ($this->id <= 0) return 0; + /** + * Function to delete object in database + * + * @param User $user user object + * @return int < 0 if KO, > 0 if OK + */ + public function delete(User &$user) + { + if ($this->id <= 0) return 0; - $error = 0; - $this->db->begin(); + $error = 0; + $this->db->begin(); - $result = $this->call_trigger(strtoupper($this->element).'_DELETE', $user); - if ($result < 0) $error++; + $result = $this->call_trigger(strtoupper($this->element).'_DELETE', $user); + if ($result < 0) $error++; - if (!$error) - { - $this->deleteCommon($user); - if ($this->withChild && !empty($this->childtables)) - { - foreach ($this->childtables as &$childTable) - { - $className = ucfirst($childTable); - if (!empty($this->{$className})) - { - foreach ($this->{$className} as &$object) - { - $object->delete($user); - } - } - } - } - } + if (!$error) + { + $this->deleteCommon($user); + if ($this->withChild && !empty($this->childtables)) + { + foreach ($this->childtables as &$childTable) + { + $className = ucfirst($childTable); + if (!empty($this->{$className})) + { + foreach ($this->{$className} as &$object) + { + $object->delete($user); + } + } + } + } + } - if (empty($error)) - { - $this->db->commit(); - return 1; - } - else - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->error; - $this->db->rollback(); - return -1; - } - } + if (empty($error)) + { + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->error; + $this->db->rollback(); + return -1; + } + } - /** - * Function to get a formatted date - * - * @param string $field Attribute to return - * @param string $format Output date format - * @return string - */ - public function getDate($field, $format = '') - { - if (empty($this->{$field})) return ''; - else - { - return dol_print_date($this->{$field}, $format); - } - } + /** + * Function to get a formatted date + * + * @param string $field Attribute to return + * @param string $format Output date format + * @return string + */ + public function getDate($field, $format = '') + { + if (empty($this->{$field})) return ''; + else { + return dol_print_date($this->{$field}, $format); + } + } - /** - * Function to set date in field - * - * @param string $field field to set - * @param string $date formatted date to convert - * @return mixed - */ - public function setDate($field, $date) - { - if (empty($date)) - { - $this->{$field} = 0; - } - else - { - require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - $this->{$field} = dol_stringtotime($date); - } + /** + * Function to set date in field + * + * @param string $field field to set + * @param string $date formatted date to convert + * @return mixed + */ + public function setDate($field, $date) + { + if (empty($date)) + { + $this->{$field} = 0; + } else { + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + $this->{$field} = dol_stringtotime($date); + } - return $this->{$field}; - } + return $this->{$field}; + } - /** - * Function to update current object - * - * @param array $Tab Array of values - * @return int - */ - public function setValues(&$Tab) - { - foreach ($Tab as $key => $value) - { - if ($this->checkFieldType($key, 'date')) - { - $this->setDate($key, $value); - } - elseif ($this->checkFieldType($key, 'float')) - { - $this->{$key} = (double) price2num($value); - } - elseif ($this->checkFieldType($key, 'int')) { - $this->{$key} = (int) price2num($value); - } - else - { - $this->{$key} = dol_string_nohtmltag($value); - } - } + /** + * Function to update current object + * + * @param array $Tab Array of values + * @return int + */ + public function setValues(&$Tab) + { + foreach ($Tab as $key => $value) + { + if ($this->checkFieldType($key, 'date')) + { + $this->setDate($key, $value); + } elseif ($this->checkFieldType($key, 'float')) + { + $this->{$key} = (double) price2num($value); + } elseif ($this->checkFieldType($key, 'int')) { + $this->{$key} = (int) price2num($value); + } else { + $this->{$key} = dol_string_nohtmltag($value); + } + } - return 1; - } + return 1; + } } diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 406615aada6..80c47591fbb 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -50,7 +50,7 @@ class Cstate // extends CommonObject public $id; public $code_departement; - + public $code; /** * @var string * @deprecated @@ -132,9 +132,7 @@ class Cstate // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -169,16 +167,16 @@ class Cstate // extends CommonObject $obj = $this->db->fetch_object($resql); $this->id = $obj->rowid; - $this->code_departement = $obj->code_departement; - $this->nom = $obj->nom; + $this->code_departement = $obj->code_departement; //deprecated + $this->code = $obj->code_departement; + $this->nom = $obj->nom; //deprecated + $this->name = $obj->nom; $this->active = $obj->active; } $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -264,9 +262,7 @@ class Cstate // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/core/class/ctypent.class.php b/htdocs/core/class/ctypent.class.php index 2524445b294..07d3563088e 100644 --- a/htdocs/core/class/ctypent.class.php +++ b/htdocs/core/class/ctypent.class.php @@ -136,9 +136,7 @@ class Ctypent // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -185,9 +183,7 @@ class Ctypent // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -240,9 +236,7 @@ class Ctypent // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -280,9 +274,7 @@ class Ctypent // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/core/class/cunits.class.php b/htdocs/core/class/cunits.class.php index 096ae47a7b8..ac7b07ea5a9 100644 --- a/htdocs/core/class/cunits.class.php +++ b/htdocs/core/class/cunits.class.php @@ -135,9 +135,7 @@ class CUnits // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -195,9 +193,7 @@ class CUnits // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -236,14 +232,11 @@ class CUnits // extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid' || $key == 't.active' || $key == 't.scale') { $sqlwhere[] = $key.'='.(int) $value; - } - elseif (strpos($key, 'date') !== false) { + } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; - } - elseif ($key == 't.unit_type' || $key == 't.code' || $key == 't.short_label') { + } elseif ($key == 't.unit_type' || $key == 't.code' || $key == 't.short_label') { $sqlwhere[] = $key.' = \''.$this->db->escape($value).'\''; - } - else { + } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } @@ -339,9 +332,7 @@ class CUnits // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -379,9 +370,7 @@ class CUnits // extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -397,10 +386,9 @@ class CUnits // extends CommonObject public function getUnitFromCode($code, $mode = 'code') { - if($mode == 'short_label'){ + if ($mode == 'short_label'){ return dol_getIdFromCode($this->db, $code, 'c_units', 'short_label', 'rowid'); - } - elseif($mode == 'code'){ + } elseif ($mode == 'code'){ return dol_getIdFromCode($this->db, $code, 'c_units', 'code', 'rowid'); } @@ -424,10 +412,10 @@ class CUnits // extends CommonObject // convert to standard unit $value = $value * $scaleUnitPow; - if($fk_new_unit !=0 ){ + if ($fk_new_unit !=0 ){ // Calcul en unité de base $scaleUnitPow = $this->scaleOfUnitPow($fk_new_unit); - if(!empty($scaleUnitPow)) + if (!empty($scaleUnitPow)) { // convert to new unit $value = $value / $scaleUnitPow; @@ -436,11 +424,9 @@ class CUnits // extends CommonObject return round($value, 2); } - - /** * get scale of unit factor - * @param $id int id of unit in dictionary + * @param int $id id of unit in dictionary * @return float|int */ public function scaleOfUnitPow($id) @@ -448,9 +434,9 @@ class CUnits // extends CommonObject $base = 10; // TODO : add base col into unit dictionary table $unit = $this->db->getRow('SELECT scale, unit_type from '.MAIN_DB_PREFIX.'c_units WHERE rowid = '.intval($id)); - if($unit){ + if ($unit) { // TODO : if base exist in unit dictionary table remove this convertion exception and update convertion infos in database exemple time hour currently scale 3600 will become scale 2 base 60 - if($unit->unit_type == 'time'){ + if ($unit->unit_type == 'time') { return doubleval($unit->scale); } diff --git a/htdocs/core/class/discount.class.php b/htdocs/core/class/discount.class.php index 724b2a778d8..4cddc65d636 100644 --- a/htdocs/core/class/discount.class.php +++ b/htdocs/core/class/discount.class.php @@ -187,15 +187,11 @@ class DiscountAbsolute $this->db->free($resql); return 1; - } - else - { + } else { $this->db->free($resql); return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -264,9 +260,7 @@ class DiscountAbsolute { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."societe_remise_except"); return $this->id; - } - else - { + } else { $this->error = $this->db->lasterror().' - sql='.$sql; return -1; } @@ -303,9 +297,7 @@ class DiscountAbsolute $this->error = 'ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved'; return -2; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -331,9 +323,7 @@ class DiscountAbsolute $this->error = 'ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved'; return -2; } - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -368,15 +358,12 @@ class DiscountAbsolute { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } - } - elseif ($this->fk_invoice_supplier_source) { + } elseif ($this->fk_invoice_supplier_source) { $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; $sql .= " set paye=0, fk_statut=1"; $sql .= " WHERE (type = 2 or type = 3) AND rowid=".$this->fk_invoice_supplier_source; @@ -387,22 +374,16 @@ class DiscountAbsolute { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } - } - else - { + } else { $this->db->commit(); return 1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -458,9 +439,7 @@ class DiscountAbsolute $this->fk_facture = $rowidinvoice; } return 1; - } - else - { + } else { $this->error = $this->db->error(); return -3; } @@ -490,9 +469,7 @@ class DiscountAbsolute if ($resql) { return 1; - } - else - { + } else { $this->error = $this->db->error(); return -3; } @@ -568,16 +545,13 @@ class DiscountAbsolute $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql .= ' AND f.type = 3'; - } - elseif ($invoice->element == 'invoice_supplier') + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = '.$invoice->id; $sql .= ' AND f.type = 3'; - } - else - { + } else { $this->error = get_class($this)."::getSumDepositsUsed was called with a bad object as a first parameter"; dol_print_error($this->error); return -1; @@ -589,9 +563,7 @@ class DiscountAbsolute $obj = $this->db->fetch_object($resql); if ($multicurrency == 1) return $obj->multicurrency_amount; else return $obj->amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -614,16 +586,13 @@ class DiscountAbsolute $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture as f'; $sql .= ' WHERE rc.fk_facture_source=f.rowid AND rc.fk_facture = '.$invoice->id; $sql .= ' AND f.type IN ('.$invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE.', '.$invoice::TYPE_SITUATION.')'; // Find discount coming from credit note or excess received - } - elseif ($invoice->element == 'invoice_supplier') + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc, '.MAIN_DB_PREFIX.'facture_fourn as f'; $sql .= ' WHERE rc.fk_invoice_supplier_source=f.rowid AND rc.fk_invoice_supplier = '.$invoice->id; $sql .= ' AND f.type IN ('.$invoice::TYPE_STANDARD.', '.$invoice::TYPE_CREDIT_NOTE.')'; // Find discount coming from credit note or excess paid - } - else - { + } else { $this->error = get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; dol_print_error($this->error); return -1; @@ -635,9 +604,7 @@ class DiscountAbsolute $obj = $this->db->fetch_object($resql); if ($multicurrency == 1) return $obj->multicurrency_amount; else return $obj->amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -658,15 +625,12 @@ class DiscountAbsolute $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; $sql .= ' WHERE rc.fk_facture IS NULL AND rc.fk_facture_source = '.$invoice->id; - } - elseif ($invoice->element == 'invoice_supplier') + } elseif ($invoice->element == 'invoice_supplier') { $sql = 'SELECT sum(rc.amount_ttc) as amount, sum(rc.multicurrency_amount_ttc) as multicurrency_amount'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_remise_except as rc'; $sql .= ' WHERE rc.fk_invoice_supplier IS NULL AND rc.fk_invoice_supplier_source = '.$invoice->id; - } - else - { + } else { $this->error = get_class($this)."::getSumCreditNotesUsed was called with a bad object as a first parameter"; dol_print_error($this->error); return -1; @@ -678,9 +642,7 @@ class DiscountAbsolute $obj = $this->db->fetch_object($resql); if ($multicurrency) return $obj->multicurrency_amount; else return $obj->amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/core/class/dolgeoip.class.php b/htdocs/core/class/dolgeoip.class.php index 24e0a6de275..2b148a96e8a 100644 --- a/htdocs/core/class/dolgeoip.class.php +++ b/htdocs/core/class/dolgeoip.class.php @@ -55,16 +55,14 @@ class DolGeoIP { require_once DOL_DOCUMENT_ROOT.'/includes/geoip2/geoip2.phar'; } - } - elseif ($type == 'city') + } elseif ($type == 'city') { // geoip may have been already included with PEAR if ($geoipversion == '2' || ($geoipversion != 'php' && !function_exists('geoip_country_code_by_name'))) { require_once DOL_DOCUMENT_ROOT.'/includes/geoip2/geoip2.phar'; } - } - else { print 'ErrorBadParameterInConstructor'; return 0; } + } else { print 'ErrorBadParameterInConstructor'; return 0; } // Here, function exists (embedded into PHP or exists because we made include) if (empty($type) || empty($datfile)) @@ -85,20 +83,16 @@ class DolGeoIP { try { $this->gi = new GeoIp2\Database\Reader($datfile); // '/usr/local/share/GeoIP/GeoIP2-City.mmdb' - } - catch (Exception $e) + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog('DolGeoIP '.$this->errorlabel, LOG_ERR); return 0; } - } - elseif (function_exists('geoip_open')) + } elseif (function_exists('geoip_open')) { $this->gi = geoip_open($datfile, GEOIP_STANDARD); - } - else - { + } else { $this->gi = 'NOGI'; // We are using embedded php geoip functions //print 'function_exists(geoip_country_code_by_name))='.function_exists('geoip_country_code_by_name'); //print geoip_database_info(); @@ -126,9 +120,7 @@ class DolGeoIP { // geoip_country_code_by_addr does not exists return strtolower(geoip_country_code_by_name($ip)); - } - else - { + } else { if (preg_match('/^[0-9]+.[0-9]+\.[0-9]+\.[0-9]+/', $ip)) { if ($geoipversion == '2') @@ -136,33 +128,25 @@ class DolGeoIP try { $record = $this->gi->country($ip); return strtolower($record->country->isoCode); - } - catch (Exception $e) { + } catch (Exception $e) { //return $e->getMessage(); return ''; } - } - else - { + } else { if (!function_exists('geoip_country_code_by_addr')) return strtolower(geoip_country_code_by_name($this->gi, $ip)); return strtolower(geoip_country_code_by_addr($this->gi, $ip)); } - } - else - { + } else { if ($geoipversion == '2') { try { $record = $this->gi->country($ip); return strtolower($record->country->isoCode); - } - catch (Exception $e) { + } catch (Exception $e) { //return $e->getMessage(); return ''; } - } - else - { + } else { if (!function_exists('geoip_country_code_by_addr_v6')) return strtolower(geoip_country_code_by_name_v6($this->gi, $ip)); return strtolower(geoip_country_code_by_addr_v6($this->gi, $ip)); } @@ -193,14 +177,11 @@ class DolGeoIP try { $record = $this->gi->country($name); return $record->country->isoCode; - } - catch (Exception $e) { + } catch (Exception $e) { //return $e->getMessage(); return ''; } - } - else - { + } else { return geoip_country_code_by_name($this->gi, $name); } } diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 4df5c6add45..dee727cb596 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -472,14 +472,10 @@ class DolGraph { //print 'ee'.join(',',$theme_bgcoloronglet); $this->bgcolor = $theme_bgcoloronglet; - } - else - { + } else { $this->bgcolor = $theme_bgcolor; } - } - else - { + } else { $this->bgcolor = $bg_color; } } @@ -502,14 +498,10 @@ class DolGraph { //print 'ee'.join(',',$theme_bgcoloronglet); $this->bgcolorgrid = $theme_bgcoloronglet; - } - else - { + } else { $this->bgcolorgrid = $theme_bgcolor; } - } - else - { + } else { $this->bgcolorgrid = $bg_colorgrid; } } @@ -541,7 +533,7 @@ class DolGraph $vals = array(); $nblines = count($this->data); - $nbvalues = count($this->data[0]) - 1; + $nbvalues = (empty($this->data[0]) ? 0 : count($this->data[0]) - 1); for ($j = 0; $j < $nblines; $j++) { @@ -570,7 +562,7 @@ class DolGraph $vals = array(); $nblines = count($this->data); - $nbvalues = count($this->data[0]) - 1; + $nbvalues = (empty($this->data[0]) ? 0 : count($this->data[0]) - 1); for ($j = 0; $j < $nblines; $j++) { @@ -725,9 +717,7 @@ class DolGraph foreach ($values as $x => $y) { if (isset($y)) $serie[$i] .= 'd'.$i.'.push({"label":"'.dol_escape_js($legends[$x]).'", "data":'.$y.'});'."\n"; } - } - else - { + } else { foreach ($values as $x => $y) { if (isset($y)) $serie[$i] .= 'd'.$i.'.push(['.$x.', '.$y.']);'."\n"; } @@ -758,9 +748,7 @@ class DolGraph if ($nblot < 0) { $this->stringtoshow .= ''."\n"; - } - else - { + } else { while ($i < $nblot) { $this->stringtoshow .= ''."\n"; @@ -835,8 +823,7 @@ class DolGraph }'."\n"; } // Other cases, graph of type 'bars', 'lines' - else - { + else { // Add code to support tooltips // TODO: remove js css and use graph-tooltip-inner class instead by adding css in each themes $this->stringtoshow .= ' @@ -895,13 +882,12 @@ class DolGraph $color = sprintf("%02x%02x%02x", $this->datacolor[$i][0], $this->datacolor[$i][1], $this->datacolor[$i][2]); $this->stringtoshow .= '{ '; if (! isset($this->type[$i]) || $this->type[$i] == 'bars') { - if($nblot == 3) { - if($i == $firstlot) $align = 'right'; - elseif($i == $firstlot + 1) $align = 'center'; + if ($nblot == 3) { + if ($i == $firstlot) $align = 'right'; + elseif ($i == $firstlot + 1) $align = 'center'; else $align = 'left'; $this->stringtoshow .= 'bars: { lineWidth: 1, show: true, align: "'.$align.'", barWidth: 0.45 }, '; - } - else $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.($i==$firstlot?'center':'left').'", barWidth: 0.5 }, '; + } else $this->stringtoshow.='bars: { lineWidth: 1, show: true, align: "'.($i==$firstlot?'center':'left').'", barWidth: 0.5 }, '; } if (isset($this->type[$i]) && ($this->type[$i] == 'lines' || $this->type[$i] == 'linesnopoint')) $this->stringtoshow .= 'lines: { show: true, fill: false }, points: { show: '.($this->type[$i] == 'linesnopoint' ? 'false' : 'true').' }, '; $this->stringtoshow .= 'color: "#'.$color.'", label: "'.(isset($this->Legend[$i]) ? dol_escape_js($this->Legend[$i]) : '').'", data: d'.$i.' }'; @@ -1058,9 +1044,7 @@ class DolGraph if ($nblot < 0) { $this->stringtoshow .= ''; - } - else - { + } else { while ($i < $nblot) { //$this->stringtoshow .= ''."\n"; @@ -1103,8 +1087,7 @@ class DolGraph if (strpos($tmp, '-') !== false) { $foundnegativecolor++; $color = '#FFFFFF'; // If $val is '-123' - } - else $color = "#".$tmp; // If $val is '123' or '#123' + } else $color = "#".$tmp; // If $val is '123' or '#123' } $this->stringtoshow .= "'".$color."'"; $i++; @@ -1170,8 +1153,7 @@ class DolGraph $this->stringtoshow .= '});'."\n"; } // Other cases, graph of type 'bars', 'lines', 'linesnopoint' - else - { + else { $type = 'bar'; if (!isset($this->type[$firstlot]) || $this->type[$firstlot] == 'bars') $type = 'bar'; if (isset($this->type[$firstlot]) && ($this->type[$firstlot] == 'lines' || $this->type[$firstlot] == 'linesnopoint')) $type = 'line'; diff --git a/htdocs/core/class/dolreceiptprinter.class.php b/htdocs/core/class/dolreceiptprinter.class.php index 09dcc3681b7..f8c33f9403a 100644 --- a/htdocs/core/class/dolreceiptprinter.class.php +++ b/htdocs/core/class/dolreceiptprinter.class.php @@ -186,7 +186,7 @@ class dolReceiptPrinter extends Printer 'dol_value_month' => 'DOL_VALUE_MONTH', 'dol_value_day' => 'DOL_VALUE_DAY', 'dol_value_day_letters' => 'DOL_VALUE_DAY', - //'dol_print_payment', + 'dol_print_payment' => 'DOL_PRINT_PAYMENT', 'dol_print_logo' => 'DOL_PRINT_LOGO', 'dol_print_logo_old' => 'DOL_PRINT_LOGO_OLD', 'dol_value_object_id' => 'InvoiceID', @@ -197,17 +197,16 @@ class dolReceiptPrinter extends Printer 'dol_print_object_local_tax2' => 'TotalLT2', 'dol_print_object_total' => 'Total', 'dol_print_object_number' => 'DOL_PRINT_OBJECT_NUMBER', - 'dol_value_object_points' => 'DOL_VALUE_OBJECT_POINTS', + //'dol_value_object_points' => 'DOL_VALUE_OBJECT_POINTS', 'dol_print_order_lines' => 'DOL_PRINT_ORDER_LINES', 'dol_value_customer_firstname' => 'DOL_VALUE_CUSTOMER_FIRSTNAME', 'dol_value_customer_lastname' => 'DOL_VALUE_CUSTOMER_LASTNAME', 'dol_value_customer_mail' => 'DOL_VALUE_CUSTOMER_MAIL', 'dol_value_customer_phone' => 'DOL_VALUE_CUSTOMER_PHONE', - 'dol_value_customer_mobile' => 'DOL_VALUE_CUSTOMER_MOBILE', 'dol_value_customer_skype' => 'DOL_VALUE_CUSTOMER_SKYPE', 'dol_value_customer_tax_number' => 'DOL_VALUE_CUSTOMER_TAX_NUMBER', - 'dol_value_customer_account_balance' => 'DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE', - 'dol_value_customer_points' => 'DOL_VALUE_CUSTOMER_POINTS', + //'dol_value_customer_account_balance' => 'DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE', + //'dol_value_customer_points' => 'DOL_VALUE_CUSTOMER_POINTS', 'dol_value_mysoc_name' => 'DOL_VALUE_MYSOC_NAME', 'dol_value_mysoc_address' => 'Address', 'dol_value_mysoc_zip' => 'Zip', @@ -572,7 +571,7 @@ class dolReceiptPrinter extends Printer // tags a remplacer par leur valeur avant de parser (dol_value_xxx) $this->template = str_replace('', $object->id, $this->template); $this->template = str_replace('', $object->ref, $this->template); - $this->template = str_replace('', $object->points, $this->template); + //$this->template = str_replace('', $object->points, $this->template); $this->template = str_replace('', dol_print_date($object->date, 'day'), $this->template); $this->template = str_replace('', dol_print_date($object->date, 'dayhour'), $this->template); $this->template = str_replace('', dol_print_date($object->date, '%Y'), $this->template); @@ -583,12 +582,12 @@ class dolReceiptPrinter extends Printer $this->template = str_replace('', $object->thirdparty->firstname, $this->template); $this->template = str_replace('', $object->thirdparty->lastname, $this->template); - $this->template = str_replace('', $object->thirdparty->mail, $this->template); + $this->template = str_replace('', $object->thirdparty->email, $this->template); $this->template = str_replace('', $object->thirdparty->phone, $this->template); - $this->template = str_replace('', $object->thirdparty->mobile, $this->template); - $this->template = str_replace('', $object->thirdparty->vatintra, $this->template); - $this->template = str_replace('', $object->customer_account_balance, $this->template); - $this->template = str_replace('', $object->customer_points, $this->template); + //$this->template = str_replace('', $object->thirdparty->mobile, $this->template); + $this->template = str_replace('', $object->thirdparty->tva_intra, $this->template); + //$this->template = str_replace('', $object->customer_account_balance, $this->template); + //$this->template = str_replace('', $object->customer_points, $this->template); $this->template = str_replace('', $mysoc->name, $this->template); $this->template = str_replace('', $mysoc->address, $this->template); @@ -776,6 +775,35 @@ class dolReceiptPrinter extends Printer } } break; + case 'DOL_PRINT_PAYMENT': + $sql = "SELECT p.pos_change as pos_change, p.datep as date, p.fk_paiement, p.num_paiement as num, pf.amount as amount, pf.multicurrency_amount,"; + $sql .= " cp.code"; + $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."paiement as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON p.fk_paiement = cp.id"; + $sql .= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = ".$object->id; + $sql .= " ORDER BY p.datep"; + $resql = $this->db->query($sql); + if ($resql) + { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $row = $this->db->fetch_object($resql); + $spacestoadd = $nbcharactbyline - strlen($langs->transnoentitiesnoconv("PaymentTypeShort".$row->code)) - 12; + $spaces = str_repeat(' ', $spacestoadd); + $amount_payment=($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount; + if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment + $this->printer->text($spaces.$langs->transnoentitiesnoconv("PaymentTypeShort".$row->code).' '.str_pad(price($amount_payment), 10, ' ', STR_PAD_LEFT)."\n"); + if ($row->code == "LIQ" && $row->pos_change>0) // Print change only in cash payments + { + $spacestoadd = $nbcharactbyline - strlen($langs->trans("Change")) - 12; + $spaces = str_repeat(' ', $spacestoadd); + $this->printer->text($spaces.$langs->trans("Change").' '.str_pad(price($row->pos_change), 10, ' ', STR_PAD_LEFT)."\n"); + } + $i++; + } + } + break; default: $this->printer->text($vals[$tplline]['tag']); $this->printer->text($vals[$tplline]['value']); @@ -788,6 +816,7 @@ class dolReceiptPrinter extends Printer if ($this->printer->connector instanceof DummyPrintConnector) { $data = $this->printer->connector->getData(); + if ($conf->global->TAKEPOS_PRINT_METHOD == "takeposconnector") echo base64_encode($data); dol_syslog($data); } // Close and print diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 3bac7c8c2cc..7cf18ae4801 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -95,13 +95,12 @@ class EmailSenderProfile extends CommonObject 'entity' => array('type'=>'integer', 'label'=>'Entity', 'visible'=>-1, 'enabled'=>1, 'position'=>20, 'notnull'=>1, 'index'=>1,), 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>1), 'email' => array('type'=>'varchar(255)', 'label'=>'Email', 'visible'=>1, 'enabled'=>1, 'position'=>40, 'notnull'=>-1), - //'fk_user_creat' => array('type'=>'integer', 'label'=>'UserAuthor', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), 'private' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'User', 'visible'=>-1, 'enabled'=>1, 'position'=>50, 'default'=>'0', 'notnull'=>1), 'signature' => array('type'=>'text', 'label'=>'Signature', 'visible'=>3, 'enabled'=>1, 'position'=>400, 'notnull'=>-1, 'index'=>1,), 'position' => array('type'=>'integer', 'label'=>'Position', 'visible'=>1, 'enabled'=>1, 'position'=>405, 'notnull'=>-1, 'index'=>1,), 'date_creation' => array('type'=>'datetime', 'label'=>'DateCreation', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), 'tms' => array('type'=>'timestamp', 'label'=>'DateModification', 'visible'=>-1, 'enabled'=>1, 'position'=>500, 'notnull'=>1,), - 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>-1, 'index'=>1, 'arrayofkeyval'=>array(0=>'Disabled', 1=>'Enabled')), + 'active' => array('type'=>'integer', 'label'=>'Status', 'visible'=>1, 'enabled'=>1, 'default'=>1, 'position'=>1000, 'notnull'=>1, 'index'=>1, 'arrayofkeyval'=>array(0=>'Disabled', 1=>'Enabled')), ); /** @@ -331,7 +330,7 @@ class EmailSenderProfile extends CommonObject */ public function getLibStatut($mode = 0) { - return $this->LibStatut($this->status, $mode); + return $this->LibStatut($this->active, $mode); } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -346,36 +345,16 @@ class EmailSenderProfile extends CommonObject { global $langs; - if ($mode == 0 || $mode == 1) - { - if ($status == 1) return $langs->trans('Enabled'); - elseif ($status == 0) return $langs->trans('Disabled'); - } - elseif ($mode == 2) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 3) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 4) - { - if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut4').' '.$langs->trans('Enabled'); - elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5').' '.$langs->trans('Disabled'); - } - elseif ($mode == 5) - { - if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); - } - elseif ($mode == 6) - { - if ($status == 1) return $langs->trans('Enabled').' '.img_picto($langs->trans('Enabled'), 'statut4'); - elseif ($status == 0) return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5'); + if ($status == 1) { + $label = $labelshort = $langs->trans('Enabled'); + } else { + $label = $labelshort = $langs->trans('Disabled'); } + + $statusType = 'status'.$status; + if ($status == self::STATUS_ENABLED) $statusType = 'status4'; + + return dolGetStatus($label, $labelshort, '', $statusType, $mode); } /** @@ -424,9 +403,7 @@ class EmailSenderProfile extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/core/class/events.class.php b/htdocs/core/class/events.class.php index 9c2e5b145dd..bffd23f05d2 100644 --- a/htdocs/core/class/events.class.php +++ b/htdocs/core/class/events.class.php @@ -173,9 +173,7 @@ class Events // extends CommonObject { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."events"); return $this->id; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -260,9 +258,7 @@ class Events // extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 5ac47f1a478..e17bfbc55d4 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -38,103 +38,116 @@ class ExtraFields { /** - * @var DoliDB Database handler. - */ - public $db; + * @var DoliDB Database handler. + */ + public $db; /** - * @var array Array with type of element (for what object is the extrafield) + * @var array Array with type of element (for what object is the extrafield) * @deprecated - */ - public $attribute_elementtype; + */ + public $attribute_elementtype; - /** - * @var array Array with type of the extra field + /** + * @var array Array with type of the extra field * @deprecated - */ - public $attribute_type; + */ + public $attribute_type; - /** - * @var array Array with label of extra field + /** + * @var array Array with label of extra field * @deprecated - */ - public $attribute_label; + */ + public $attribute_label; - /** - * @var array Array with size of extra field + /** + * @var array Array with size of extra field * @deprecated - */ + */ public $attribute_size; - /** - * @var array Array with list of possible values for some types of extra fields + /** + * @var array Array with list of possible values for some types of extra fields * @deprecated - */ + */ public $attribute_choice; - /** - * @var array Array to store compute formula for computed fields + /** + * @var array Array to store compute formula for computed fields * @deprecated - */ + */ public $attribute_computed; - /** - * @var array Array to store default value + /** + * @var array Array to store default value * @deprecated - */ + */ public $attribute_default; - /** - * @var array Array to store if attribute is unique or not + /** + * @var array Array to store if attribute is unique or not * @deprecated - */ + */ public $attribute_unique; - /** - * @var array Array to store if attribute is required or not + /** + * @var array Array to store if attribute is required or not * @deprecated - */ + */ public $attribute_required; - /** - * @var array Array to store parameters of attribute (used in select type) + /** + * @var array Array to store parameters of attribute (used in select type) * @deprecated - */ + */ public $attribute_param; - /** - * @var array Array to store position of attribute + /** + * @var array Array to store position of attribute * @deprecated - */ + */ public $attribute_pos; - /** - * @var array Array to store if attribute is editable regardless of the document status + /** + * @var array Array to store if attribute is editable regardless of the document status * @deprecated - */ + */ public $attribute_alwayseditable; - /** - * @var array Array to store permission to check + /** + * @var array Array to store permission to check * @deprecated - */ + */ public $attribute_perms; - /** - * @var array Array to store language file to translate label of values + /** + * @var array Array to store language file to translate label of values * @deprecated - */ + */ public $attribute_langfile; - /** - * @var array Array to store if field is visible by default on list + /** + * @var array Array to store if field is visible by default on list * @deprecated - */ + */ public $attribute_list; /** - * @var array New array to store extrafields definition - */ + * @var array Array to store if field is summable + * @deprecated + */ + public $attribute_totalizable; + + /** + * @var array Array to store entity id of extrafield + * @deprecated + */ + public $attribute_entityid; + + + /** + * @var array New array to store extrafields definition + */ public $attributes; /** @@ -147,33 +160,33 @@ class ExtraFields */ public $errors = array(); - /** + /** * @var string DB Error number */ public $errno; public static $type2label = array( - 'varchar'=>'String1Line', - 'text'=>'TextLongNLines', - 'html'=>'HtmlText', - 'int'=>'Int', - 'double'=>'Float', - 'date'=>'Date', - 'datetime'=>'DateAndTime', - 'boolean'=>'Boolean', - 'price'=>'ExtrafieldPrice', - 'phone'=>'ExtrafieldPhone', - 'mail'=>'ExtrafieldMail', - 'url'=>'ExtrafieldUrl', - 'password' => 'ExtrafieldPassword', - 'select' => 'ExtrafieldSelect', - 'sellist' => 'ExtrafieldSelectList', - 'radio' => 'ExtrafieldRadio', - 'checkbox' => 'ExtrafieldCheckBox', - 'chkbxlst' => 'ExtrafieldCheckBoxFromList', - 'link' => 'ExtrafieldLink', - 'separate' => 'ExtrafieldSeparator', + 'varchar'=>'String1Line', + 'text'=>'TextLongNLines', + 'html'=>'HtmlText', + 'int'=>'Int', + 'double'=>'Float', + 'date'=>'Date', + 'datetime'=>'DateAndTime', + 'boolean'=>'Boolean', + 'price'=>'ExtrafieldPrice', + 'phone'=>'ExtrafieldPhone', + 'mail'=>'ExtrafieldMail', + 'url'=>'ExtrafieldUrl', + 'password' => 'ExtrafieldPassword', + 'select' => 'ExtrafieldSelect', + 'sellist' => 'ExtrafieldSelectList', + 'radio' => 'ExtrafieldRadio', + 'checkbox' => 'ExtrafieldCheckBox', + 'chkbxlst' => 'ExtrafieldCheckBoxFromList', + 'link' => 'ExtrafieldLink', + 'separate' => 'ExtrafieldSeparator', ); @@ -181,7 +194,7 @@ class ExtraFields * Constructor * * @param DoliDB $db Database handler - */ + */ public function __construct($db) { $this->db = $db; @@ -225,7 +238,7 @@ class ExtraFields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not * @param int $totalizable Is a measure. Must show a total on lists - * @param int $printable Is extrafield displayed on PDF + * @param int $printable Is extrafield displayed on PDF * @return int <=0 if KO, >0 if OK */ public function addExtraField($attrname, $label, $type, $pos, $size, $elementtype, $unique = 0, $required = 0, $default_value = '', $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) @@ -253,11 +266,8 @@ class ExtraFields $this->error = ''; $this->errno = 0; return 1; - } - else return -2; - } - else - { + } else return -2; + } else { return -1; } } @@ -338,21 +348,17 @@ class ExtraFields $resql = $this->db->query($sql, 1, 'dml'); } return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Add description of a new optional attribute * @@ -375,13 +381,13 @@ class ExtraFields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not * @param int $totalizable Is a measure. Must show a total on lists - * @param int $printable Is extrafield displayed on PDF + * @param int $printable Is extrafield displayed on PDF * @return int <=0 if KO, >0 if OK - * @throws Exception + * @throws Exception */ private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = 0, $elementtype = 'member', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user; if ($elementtype == 'thirdparty') $elementtype = 'societe'; @@ -401,13 +407,10 @@ class ExtraFields if (is_array($param) && count($param) > 0) { $params = serialize($param); - } - elseif (strlen($param) > 0) + } elseif (strlen($param) > 0) { $params = trim($param); - } - else - { + } else { $params = ''; } @@ -436,7 +439,7 @@ class ExtraFields $sql .= " help,"; $sql .= " totalizable"; $sql .= " )"; - $sql .= " VALUES('".$attrname."',"; + $sql .= " VALUES('".$this->db->escape($attrname)."',"; $sql .= " '".$this->db->escape($label)."',"; $sql .= " '".$this->db->escape($type)."',"; $sql .= " ".$pos.","; @@ -465,9 +468,7 @@ class ExtraFields if ($this->db->query($sql)) { return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); return -1; @@ -497,44 +498,42 @@ class ExtraFields $result = $this->delete_label($attrname, $elementtype); if ($result < 0) { - $this->error = $this->db->lasterror(); + $this->error = $this->db->lasterror(); $this->errors[] = $this->db->lasterror(); - $error++; + $error++; } if (!$error) { - $sql = "SELECT COUNT(rowid) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX."extrafields"; - $sql .= " WHERE elementtype = '".$elementtype."'"; - $sql .= " AND name = '".$attrname."'"; - //$sql.= " AND entity IN (0,".$conf->entity.")"; Do not test on entity here. We want to see if there is still on field remaning in other entities before deleting field in table - $resql = $this->db->query($sql); - if ($resql) - { - $obj = $this->db->fetch_object($resql); - if ($obj->nb <= 0) - { - $result = $this->db->DDLDropField(MAIN_DB_PREFIX.$table, $attrname); // This also drop the unique key - if ($result < 0) - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - $error++; - } - } - } + $sql = "SELECT COUNT(rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."extrafields"; + $sql .= " WHERE elementtype = '".$this->db->escape($elementtype)."'"; + $sql .= " AND name = '".$this->db->escape($attrname)."'"; + //$sql.= " AND entity IN (0,".$conf->entity.")"; Do not test on entity here. We want to see if there is still on field remaning in other entities before deleting field in table + $resql = $this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + if ($obj->nb <= 0) + { + $result = $this->db->DDLDropField(MAIN_DB_PREFIX.$table, $attrname); // This also drop the unique key + if ($result < 0) + { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $error++; + } + } + } } return $result; - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Delete description of an optional attribute * @@ -544,7 +543,7 @@ class ExtraFields */ private function delete_label($attrname, $elementtype = 'member') { - // phpcs:enable + // phpcs:enable global $conf; if ($elementtype == 'thirdparty') $elementtype = 'societe'; @@ -553,24 +552,20 @@ class ExtraFields if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/", $attrname)) { $sql = "DELETE FROM ".MAIN_DB_PREFIX."extrafields"; - $sql .= " WHERE name = '".$attrname."'"; + $sql .= " WHERE name = '".$this->db->escape($attrname)."'"; $sql .= " AND entity IN (0,".$conf->entity.')'; - $sql .= " AND elementtype = '".$elementtype."'"; + $sql .= " AND elementtype = '".$this->db->escape($elementtype)."'"; dol_syslog(get_class($this)."::delete_label", LOG_DEBUG); $resql = $this->db->query($sql); if ($resql) { return 1; - } - else - { + } else { dol_print_error($this->db); return -1; } - } - else - { + } else { return 0; } } @@ -596,17 +591,17 @@ class ExtraFields * @param string $entity Entity of extrafields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not - * @param int $totalizable Is extrafield totalizable on list - * @param int $printable Is extrafield displayed on PDF + * @param int $totalizable Is extrafield totalizable on list + * @param int $printable Is extrafield displayed on PDF * @return int >0 if OK, <=0 if KO - * @throws Exception + * @throws Exception */ public function update($attrname, $label, $type, $length, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) { if ($elementtype == 'thirdparty') $elementtype = 'societe'; if ($elementtype == 'contact') $elementtype = 'socpeople'; - $table = $elementtype.'_extrafields'; + $table = $elementtype.'_extrafields'; if ($elementtype == 'categorie') $table = 'categories_extrafields'; if (isset($attrname) && $attrname != '' && preg_match("/^\w[a-zA-Z0-9-_]*$/", $attrname)) @@ -659,34 +654,26 @@ class ExtraFields if ($unique) { $sql = "ALTER TABLE ".MAIN_DB_PREFIX.$table." ADD UNIQUE INDEX uk_".$table."_".$attrname." (".$attrname.")"; - } - else - { + } else { $sql = "ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname; } dol_syslog(get_class($this).'::update', LOG_DEBUG); $resql = $this->db->query($sql, 1, 'dml'); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Modify description of personalized attribute * @@ -708,14 +695,14 @@ class ExtraFields * @param string $entity Entity of extrafields * @param string $langfile Language file * @param string $enabled Condition to have the field enabled or not - * @param int $totalizable Is extrafield totalizable on list - * @param int $printable Is extrafield displayed on PDF - * @return int <=0 if KO, >0 if OK - * @throws Exception + * @param int $totalizable Is extrafield totalizable on list + * @param int $printable Is extrafield displayed on PDF + * @return int <=0 if KO, >0 if OK + * @throws Exception */ private function update_label($attrname, $label, $type, $size, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '0', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0) { - // phpcs:enable + // phpcs:enable global $conf, $user; dol_syslog(get_class($this)."::update_label ".$attrname.", ".$label.", ".$type.", ".$size.", ".$elementtype.", ".$unique.", ".$required.", ".$pos.", ".$alwayseditable.", ".$perms.", ".$list.", ".$default.", ".$computed.", ".$entity.", ".$langfile.", ".$enabled.", ".$totalizable.", ".$printable); @@ -725,9 +712,9 @@ class ExtraFields if (empty($pos)) $pos = 0; if (empty($list)) $list = '0'; - if (empty($totalizable)) { - $totalizable = 0; - } + if (empty($totalizable)) { + $totalizable = 0; + } if (empty($required)) $required = 0; if (empty($unique)) $unique = 0; if (empty($alwayseditable)) $alwayseditable = 0; @@ -739,13 +726,10 @@ class ExtraFields if (is_array($param) && count($param) > 0) { $params = serialize($param); - } - elseif (strlen($param) > 0) + } elseif (strlen($param) > 0) { $params = trim($param); - } - else - { + } else { $params = ''; } @@ -753,17 +737,15 @@ class ExtraFields { // We dont want on all entities, we delete all and current $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."extrafields"; - $sql_del .= " WHERE name = '".$attrname."'"; + $sql_del .= " WHERE name = '".$this->db->escape($attrname)."'"; $sql_del .= " AND entity IN (0, ".($entity === '' ? $conf->entity : $entity).")"; - $sql_del .= " AND elementtype = '".$elementtype."'"; - } - else - { + $sql_del .= " AND elementtype = '".$this->db->escape($elementtype)."'"; + } else { // We want on all entities ($entities = '0'), we delete on all only (we keep setup specific to each entity) $sql_del = "DELETE FROM ".MAIN_DB_PREFIX."extrafields"; - $sql_del .= " WHERE name = '".$attrname."'"; + $sql_del .= " WHERE name = '".$this->db->escape($attrname)."'"; $sql_del .= " AND entity = 0"; - $sql_del .= " AND elementtype = '".$elementtype."'"; + $sql_del .= " AND elementtype = '".$this->db->escape($elementtype)."'"; } $resql1 = $this->db->query($sql_del); @@ -783,7 +765,7 @@ class ExtraFields $sql .= " param,"; $sql .= " list,"; $sql .= " printable,"; - $sql .= " totalizable,"; + $sql .= " totalizable,"; $sql .= " fielddefault,"; $sql .= " fieldcomputed,"; $sql .= " fk_user_author,"; @@ -792,7 +774,7 @@ class ExtraFields $sql .= " enabled,"; $sql .= " help"; $sql .= ") VALUES ("; - $sql .= "'".$attrname."',"; + $sql .= "'".$this->db->escape($attrname)."',"; $sql .= " ".($entity === '' ? $conf->entity : $entity).","; $sql .= " '".$this->db->escape($label)."',"; $sql .= " '".$this->db->escape($type)."',"; @@ -807,7 +789,7 @@ class ExtraFields $sql .= " '".$this->db->escape($params)."',"; $sql .= " '".$this->db->escape($list)."', "; $sql .= " '".$this->db->escape($printable)."', "; - $sql .= " ".($totalizable ? 'TRUE' : 'FALSE').","; + $sql .= " ".($totalizable ? 'TRUE' : 'FALSE').","; $sql .= " ".(($default != '') ? "'".$this->db->escape($default)."'" : "null").","; $sql .= " ".($computed ? "'".$this->db->escape($computed)."'" : "null").","; $sql .= " ".$user->id.","; @@ -823,22 +805,18 @@ class ExtraFields { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_print_error($this->db); return -1; } - } - else - { + } else { return 0; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load array this->attributes, or old this->attribute_xxx like attribute_label, attribute_type, ... * @@ -848,7 +826,7 @@ class ExtraFields */ public function fetch_name_optionals_label($elementtype, $forceload = false) { - // phpcs:enable + // phpcs:enable global $conf; if (empty($elementtype)) return array(); @@ -864,7 +842,7 @@ class ExtraFields $sql = "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,printable,totalizable,fielddefault,fieldcomputed,entity,enabled,help"; $sql .= " FROM ".MAIN_DB_PREFIX."extrafields"; //$sql.= " WHERE entity IN (0,".$conf->entity.")"; // Filter is done later - if ($elementtype) $sql .= " WHERE elementtype = '".$elementtype."'"; // Filed with object->table_element + if ($elementtype) $sql .= " WHERE elementtype = '".$this->db->escape($elementtype)."'"; // Filed with object->table_element $sql .= " ORDER BY pos"; $resql = $this->db->query($sql); @@ -874,15 +852,15 @@ class ExtraFields { while ($tab = $this->db->fetch_object($resql)) { - if ($tab->entity != 0 && $tab->entity != $conf->entity) - { - // This field is not in current entity. We discard but before we save it into the array of mandatory fields if it is a mandatory field without default value - if ($tab->fieldrequired && is_null($tab->fielddefault)) - { - $this->attributes[$tab->elementtype]['mandatoryfieldsofotherentities'][$tab->name] = $tab->type; - } - continue; - } + if ($tab->entity != 0 && $tab->entity != $conf->entity) + { + // This field is not in current entity. We discard but before we save it into the array of mandatory fields if it is a mandatory field without default value + if ($tab->fieldrequired && is_null($tab->fielddefault)) + { + $this->attributes[$tab->elementtype]['mandatoryfieldsofotherentities'][$tab->name] = $tab->type; + } + continue; + } // We can add this attribute to object. TODO Remove this and return $this->attributes[$elementtype]['label'] if ($tab->type != 'separate') @@ -924,7 +902,7 @@ class ExtraFields $this->attributes[$tab->elementtype]['langfile'][$tab->name] = $tab->langs; $this->attributes[$tab->elementtype]['list'][$tab->name] = $tab->list; $this->attributes[$tab->elementtype]['printable'][$tab->name] = $tab->printable; - $this->attributes[$tab->elementtype]['totalizable'][$tab->name] = ($tab->totalizable ? 1 : 0); + $this->attributes[$tab->elementtype]['totalizable'][$tab->name] = ($tab->totalizable ? 1 : 0); $this->attributes[$tab->elementtype]['entityid'][$tab->name] = $tab->entity; $this->attributes[$tab->elementtype]['enabled'][$tab->name] = $tab->enabled; $this->attributes[$tab->elementtype]['help'][$tab->name] = $tab->help; @@ -933,9 +911,7 @@ class ExtraFields } } if ($elementtype) $this->attributes[$elementtype]['loaded'] = 1; // If nothing found, we also save tag 'loaded' - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::fetch_name_optionals_label ".$this->error, LOG_ERR); } @@ -992,8 +968,7 @@ class ExtraFields $totalizable = $this->attributes[$extrafieldsobjectkey]['totalizable'][$key]; $help = $this->attributes[$extrafieldsobjectkey]['help'][$key]; $hidden = (empty($list) ? 1 : 0); // If empty, we are sure it is hidden, otherwise we show. If it depends on mode (view/create/edit form or list, this must be filtered by caller) - } - else // Old usage + } else // Old usage { $label = $this->attribute_label[$key]; $type = $this->attribute_type[$key]; @@ -1021,39 +996,29 @@ class ExtraFields if ($type == 'date') { $morecss = 'minwidth100imp'; - } - elseif ($type == 'datetime' || $type == 'link') + } elseif ($type == 'datetime' || $type == 'link') { $morecss = 'minwidth200imp'; - } - elseif (in_array($type, array('int', 'integer', 'double', 'price'))) + } elseif (in_array($type, array('int', 'integer', 'double', 'price'))) { $morecss = 'maxwidth75'; - } - elseif ($type == 'password') + } elseif ($type == 'password') { $morecss = 'maxwidth100'; - } - elseif ($type == 'url') + } elseif ($type == 'url') { $morecss = 'minwidth400'; - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { $morecss = ''; - } - else - { + } else { if (round($size) < 12) { $morecss = 'minwidth100'; - } - elseif (round($size) <= 48) + } elseif (round($size) <= 48) { $morecss = 'minwidth200'; - } - else - { + } else { $morecss = 'minwidth400'; } } @@ -1071,48 +1036,38 @@ class ExtraFields // TODO Must also support $moreparam $out = $form->selectDate($value, $keyprefix.$key.$keysuffix, $showtime, $showtime, $required, '', 1, (($keyprefix != 'search_' && $keyprefix != 'search_options_') ? 1 : 0), 0, 1); - } - elseif (in_array($type, array('int', 'integer'))) + } elseif (in_array($type, array('int', 'integer'))) { $tmp = explode(',', $size); $newsize = $tmp[0]; $out = ''; - } - elseif (preg_match('/varchar/', $type)) + } elseif (preg_match('/varchar/', $type)) { $out = ''; - } - elseif (in_array($type, array('mail', 'phone', 'url'))) + } elseif (in_array($type, array('mail', 'phone', 'url'))) { $out = ''; - } - elseif ($type == 'text') + } elseif ($type == 'text') { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, false, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'html') + } elseif ($type == 'html') { if (!preg_match('/search_/', $keyprefix)) // If keyprefix is search_ or search_options_, we must just use a simple text field { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor($keyprefix.$key.$keysuffix, $value, '', 200, 'dolibarr_notes', 'In', false, false, !empty($conf->fckeditor->enabled) && $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, '90%'); $out = $doleditor->Create(1); - } - else - { + } else { $out = ''; } - } - elseif ($type == 'boolean') + } elseif ($type == 'boolean') { if (empty($mode)) { @@ -1123,27 +1078,22 @@ class ExtraFields $checked = ' value="1" '; } $out = ''; - } - else - { + } else { $out .= $form->selectyesno($keyprefix.$key.$keysuffix, $value, 1, false, 1); } - } - elseif ($type == 'price') + } elseif ($type == 'price') { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '.$langs->getCurrencySymbol($conf->currency); - } - elseif ($type == 'double') + } elseif ($type == 'double') { if (!empty($value)) { // $value in memory is a php numeric, we format it into user number format. $value = price($value); } $out = ' '; - } - elseif ($type == 'select') + } elseif ($type == 'select') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -1167,8 +1117,7 @@ class ExtraFields $out .= ''; } $out .= ''; - } - elseif ($type == 'sellist') + } elseif ($type == 'sellist') { $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->MAIN_EXTRAFIELDS_USE_SELECT2)) @@ -1189,8 +1138,8 @@ class ExtraFields // 2 : key fields name (if differ of rowid) // 3 : key field parent (for dependent lists) // 4 : where clause filter on column or table extrafield, syntax field='value' or extra.field=value - // 5 : id category type - // 6 : ids categories list separated by comma for category root + // 5 : id category type + // 6 : ids categories list separated by comma for category root $keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid'); @@ -1209,131 +1158,129 @@ class ExtraFields $keyList .= ', '.$parentField; } - $filter_categorie = false; - if (count($InfoFieldList) > 5) { - if ($InfoFieldList[0] == 'categorie') { - $filter_categorie = true; - } - } + $filter_categorie = false; + if (count($InfoFieldList) > 5) { + if ($InfoFieldList[0] == 'categorie') { + $filter_categorie = true; + } + } - if ($filter_categorie === false) { - $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label)) { - $keyList .= ', '; - $keyList .= implode(', ', $fields_label); - } + if ($filter_categorie === false) { + $fields_label = explode('|', $InfoFieldList[1]); + if (is_array($fields_label)) { + $keyList .= ', '; + $keyList .= implode(', ', $fields_label); + } - $sqlwhere = ''; - $sql = 'SELECT '.$keyList; - $sql .= ' FROM '.MAIN_DB_PREFIX.$InfoFieldList[0]; - if (!empty($InfoFieldList[4])) { - // can use curent entity filter - if (strpos($InfoFieldList[4], '$ENTITY$') !== false) { - $InfoFieldList[4] = str_replace('$ENTITY$', $conf->entity, $InfoFieldList[4]); - } - // can use SELECT request - if (strpos($InfoFieldList[4], '$SEL$') !== false) { - $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); - } + $sqlwhere = ''; + $sql = 'SELECT '.$keyList; + $sql .= ' FROM '.MAIN_DB_PREFIX.$InfoFieldList[0]; + if (!empty($InfoFieldList[4])) { + // can use curent entity filter + if (strpos($InfoFieldList[4], '$ENTITY$') !== false) { + $InfoFieldList[4] = str_replace('$ENTITY$', $conf->entity, $InfoFieldList[4]); + } + // can use SELECT request + if (strpos($InfoFieldList[4], '$SEL$') !== false) { + $InfoFieldList[4] = str_replace('$SEL$', 'SELECT', $InfoFieldList[4]); + } - // current object id can be use into filter - if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) { - $InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]); - } else { - $InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]); - } - //We have to join on extrafield table - if (strpos($InfoFieldList[4], 'extra') !== false) { - $sql .= ' as main, '.MAIN_DB_PREFIX.$InfoFieldList[0].'_extrafields as extra'; - $sqlwhere .= ' WHERE extra.fk_object=main.'.$InfoFieldList[2].' AND '.$InfoFieldList[4]; - } else { - $sqlwhere .= ' WHERE '.$InfoFieldList[4]; - } - } else { - $sqlwhere .= ' WHERE 1=1'; - } - // Some tables may have field, some other not. For the moment we disable it. - if (in_array($InfoFieldList[0], array('tablewithentity'))) { - $sqlwhere .= ' AND entity = '.$conf->entity; - } - $sql .= $sqlwhere; - //print $sql; + // current object id can be use into filter + if (strpos($InfoFieldList[4], '$ID$') !== false && !empty($objectid)) { + $InfoFieldList[4] = str_replace('$ID$', $objectid, $InfoFieldList[4]); + } else { + $InfoFieldList[4] = str_replace('$ID$', '0', $InfoFieldList[4]); + } + //We have to join on extrafield table + if (strpos($InfoFieldList[4], 'extra') !== false) { + $sql .= ' as main, '.MAIN_DB_PREFIX.$InfoFieldList[0].'_extrafields as extra'; + $sqlwhere .= ' WHERE extra.fk_object=main.'.$InfoFieldList[2].' AND '.$InfoFieldList[4]; + } else { + $sqlwhere .= ' WHERE '.$InfoFieldList[4]; + } + } else { + $sqlwhere .= ' WHERE 1=1'; + } + // Some tables may have field, some other not. For the moment we disable it. + if (in_array($InfoFieldList[0], array('tablewithentity'))) { + $sqlwhere .= ' AND entity = '.$conf->entity; + } + $sql .= $sqlwhere; + //print $sql; - $sql .= ' ORDER BY '.implode(', ', $fields_label); + $sql .= ' ORDER BY '.implode(', ', $fields_label); - dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) { - $out .= ''; - $num = $this->db->num_rows($resql); - $i = 0; - while ($i < $num) { - $labeltoshow = ''; - $obj = $this->db->fetch_object($resql); + dol_syslog(get_class($this).'::showInputField type=sellist', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) { + $out .= ''; + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) { + $labeltoshow = ''; + $obj = $this->db->fetch_object($resql); - // Several field into label (eq table:code|libelle:rowid) - $notrans = false; - $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label) && count($fields_label) > 1) { - $notrans = true; - foreach ($fields_label as $field_toshow) { - $labeltoshow .= $obj->$field_toshow.' '; - } - } else { - $labeltoshow = $obj->{$InfoFieldList[1]}; - } - $labeltoshow = dol_trunc($labeltoshow, 45); + // Several field into label (eq table:code|libelle:rowid) + $notrans = false; + $fields_label = explode('|', $InfoFieldList[1]); + if (is_array($fields_label) && count($fields_label) > 1) { + $notrans = true; + foreach ($fields_label as $field_toshow) { + $labeltoshow .= $obj->$field_toshow.' '; + } + } else { + $labeltoshow = $obj->{$InfoFieldList[1]}; + } + $labeltoshow = $labeltoshow; - if ($value == $obj->rowid) { - if (!$notrans) { - foreach ($fields_label as $field_toshow) { - $translabel = $langs->trans($obj->$field_toshow); - $labeltoshow = dol_trunc($translabel, 18).' '; - } - } - $out .= ''; - } else { - if (!$notrans) { - $translabel = $langs->trans($obj->{$InfoFieldList[1]}); - $labeltoshow = dol_trunc($translabel, 18); - } - if (empty($labeltoshow)) $labeltoshow = '(not defined)'; + if ($value == $obj->rowid) { + if (!$notrans) { + foreach ($fields_label as $field_toshow) { + $translabel = $langs->trans($obj->$field_toshow); + $labeltoshow = $translabel.' '; + } + } + $out .= ''; + } else { + if (!$notrans) { + $translabel = $langs->trans($obj->{$InfoFieldList[1]}); + $labeltoshow = $translabel; + } + if (empty($labeltoshow)) $labeltoshow = '(not defined)'; - if (!empty($InfoFieldList[3]) && $parentField) { - $parent = $parentName.':'.$obj->{$parentField}; - } + if (!empty($InfoFieldList[3]) && $parentField) { + $parent = $parentName.':'.$obj->{$parentField}; + } - $out .= ''; - } + $out .= ''; + } - $i++; - } - $this->db->free($resql); - } else { - print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; - } - } else { + $i++; + } + $this->db->free($resql); + } else { + print 'Error in request '.$sql.' '.$this->db->lasterror().'. Check setup of extra parameters.
'; + } + } else { require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - $data = $form->select_all_categories(Categorie::$MAP_ID_TO_CODE[$InfoFieldList[5]], '', 'parent', 64, $InfoFieldList[6], 1, 1); - $out .= ''; - foreach ($data as $data_key => $data_value) { - $out .= ''; + foreach ($data as $data_key => $data_value) { + $out .= ''; } @@ -5117,7 +4894,7 @@ class Form * @param integer $useempty 1=Add empty line * @return string */ - public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0) + public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0) { global $db, $conf, $langs, $user; @@ -5127,10 +4904,10 @@ class Form $sql = 'SELECT code FROM '.MAIN_DB_PREFIX.'multicurrency'; $sql .= " WHERE entity IN ('".getEntity('mutlicurrency')."')"; - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { - while ($obj = $db->fetch_object($resql)) $TCurrency[$obj->code] = $obj->code; + while ($obj = $this->db->fetch_object($resql)) $TCurrency[$obj->code] = $obj->code; } $out = ''; @@ -5165,16 +4942,16 @@ class Form return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load into the cache vat rates of a country * * @param string $country_code Country code with quotes ("'CA'", or "'CA,IN,...'") * @return int Nb of loaded lines, 0 if already loaded, <0 if KO */ - public function load_cache_vatrates($country_code) + public function load_cache_vatrates($country_code) { - // phpcs:enable + // phpcs:enable global $langs; $num = count($this->cache_vatrates); @@ -5218,21 +4995,17 @@ class Form } return $num; - } - else - { + } else { $this->error = ''.$langs->trans("ErrorNoVATRateDefinedForSellerCountry", $country_code).''; return -1; } - } - else - { + } else { $this->error = ''.$this->db->error().''; return -2; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Output an HTML select vat rate. * The name of this function should be selectVat. We keep bad name for compatibility purpose. @@ -5254,9 +5027,9 @@ class Form * @param int $mode 0=Use vat rate as key in combo list, 1=Add VAT code after vat rate into key, -1=Use id of vat line as key * @return string */ - public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0) + public function load_tva($htmlname = 'tauxtva', $selectedrate = '', $societe_vendeuse = '', $societe_acheteuse = '', $idprod = 0, $info_bits = 0, $type = '', $options_only = false, $mode = 0) { - // phpcs:enable + // phpcs:enable global $langs, $conf, $mysoc; $langs->load('errors'); @@ -5281,9 +5054,7 @@ class Form if ($societe_vendeuse->id == $mysoc->id) { $return .= ''.$langs->trans("ErrorYourCountryIsNotDefined").''; - } - else - { + } else { $return .= ''.$langs->trans("ErrorSupplierCountryIsNotDefined").''; } return $return; @@ -5298,9 +5069,7 @@ class Form if (is_object($societe_vendeuse)) { $code_country = "'".$societe_vendeuse->country_code."'"; - } - else - { + } else { $code_country = "'".$mysoc->country_code."'"; // Pour compatibilite ascendente } if (!empty($conf->global->SERVICE_ARE_ECOMMERCE_200238EC)) // If option to have vat for end customer for services is on @@ -5315,13 +5084,10 @@ class Form { $code_country .= ",'".$societe_acheteuse->country_code."'"; } - } - elseif (!$idprod) // We don't know type of product + } elseif (!$idprod) // We don't know type of product { $code_country .= ",'".$societe_acheteuse->country_code."'"; - } - else - { + } else { $prodstatic = new Product($this->db); $prodstatic->fetch($idprod); if ($prodstatic->type == Product::TYPE_SERVICE) // We know product is a service @@ -5343,10 +5109,10 @@ class Form $tmpthirdparty = new Societe($this->db); $defaulttx = get_default_tva($societe_vendeuse, (is_object($societe_acheteuse) ? $societe_acheteuse : $tmpthirdparty), $idprod); $defaultnpr = get_default_npr($societe_vendeuse, (is_object($societe_acheteuse) ? $societe_acheteuse : $tmpthirdparty), $idprod); - if (preg_match('/\((.*)\)/', $defaulttx, $reg)) { - $defaultcode = $reg[1]; - $defaulttx = preg_replace('/\s*\(.*\)/', '', $defaulttx); - } + if (preg_match('/\((.*)\)/', $defaulttx, $reg)) { + $defaultcode = $reg[1]; + $defaulttx = preg_replace('/\s*\(.*\)/', '', $defaulttx); + } if (empty($defaulttx)) $defaultnpr = 0; } @@ -5395,8 +5161,7 @@ class Form $return .= ' selected'; $selectedfound = true; } - } - elseif ($rate['txtva'] == $defaulttx && $rate['nprtva'] == $defaultnpr) + } elseif ($rate['txtva'] == $defaulttx && $rate['nprtva'] == $defaultnpr) { $return .= ' selected'; $selectedfound = true; @@ -5407,9 +5172,7 @@ class Form if ($mysoc->country_code == 'IN' || !empty($conf->global->MAIN_VAT_LABEL_IS_POSITIVE_RATES)) { $return .= $rate['labelpositiverates']; - } - else - { + } else { $return .= vatrate($rate['label']); } //$return.=($rate['code']?' '.$rate['code']:''); @@ -5419,9 +5182,7 @@ class Form } if (!$options_only) $return .= ''; - } - else - { + } else { $return .= $this->error; } @@ -5430,9 +5191,9 @@ class Form } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. * Fields are preselected with : * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) @@ -5452,22 +5213,44 @@ class Form * @param string $addplusone Add a link "+1 hour". Value must be name of another select_date field. * @param datetime $adddateof Add a link "Date of invoice" using the following date. * @return string|void Nothing or string if nooutput is 1 - * @deprecated + * @deprecated * @see selectDate(), form_date(), select_month(), select_year(), select_dayofweek() */ - public function select_date($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $nooutput = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') - { - // phpcs:enable - $retstring = $this->selectDate($set_time, $prefix, $h, $m, $empty, $form_name, $d, $addnowlink, $disabled, $fullday, $addplusone, $adddateof); - if (!empty($nooutput)) { - return $retstring; - } - print $retstring; - return; - } + public function select_date($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $nooutput = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '') + { + // phpcs:enable + $retstring = $this->selectDate($set_time, $prefix, $h, $m, $empty, $form_name, $d, $addnowlink, $disabled, $fullday, $addplusone, $adddateof); + if (!empty($nooutput)) { + return $retstring; + } + print $retstring; + return; + } - /** - * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + /** + * Show 2 HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. + * Fields are preselected with : + * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') + * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) + * - Empty (fields empty), if set_time is -1 (in this case, parameter empty must also have value 1) + * + * @param integer $set_time Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). + * @param integer $set_time_end Pre-selected date (must be a local PHP server timestamp), -1 to keep date not preselected, '' to use current date with 00:00 hour (Parameter 'empty' must be 0 or 2). + * @param string $prefix Prefix for fields name + * @param string $empty 0=Fields required, 1=Empty inputs are allowed, 2=Empty inputs are allowed for hours only + * @return string Html for selectDate + * @see form_date(), select_month(), select_year(), select_dayofweek() + */ + public function selectDateToDate($set_time = '', $set_time_end = '', $prefix = 're', $empty = 0) + { + $ret = $this->selectDate($set_time, $prefix.'_start', 0, 0, $empty); + $ret .= '
'; + $ret .= $this->selectDate($set_time_end, $prefix.'_end', 0, 0, $empty); + return $ret; + } + + /** + * Show a HTML widget to input a date or combo list for day, month, years and optionaly hours and minutes. * Fields are preselected with : * - set_time date (must be a local PHP server timestamp or string date with format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM') * - local date in user area, if set_time is '' (so if set_time is '', output may differs when done from two different location) @@ -5482,16 +5265,17 @@ class Form * @param int $d 1=Show days, month, years * @param int $addnowlink Add a link "Now", 1 with server time, 2 with local computer time * @param int $disabled Disable input fields - * @param int $fullday When a checkbox with id #fullday is cheked, hours are set with 00:00 (if value if 'fulldaystart') or 23:59 (if value is 'fulldayend') + * @param int $fullday When a checkbox with id #fullday is checked, hours are set with 00:00 (if value if 'fulldaystart') or 23:59 (if value is 'fulldayend') * @param string $addplusone Add a link "+1 hour". Value must be name of another selectDate field. * @param datetime $adddateof Add a link "Date of ..." using the following date. See also $labeladddateof for the label used. - * @param string $openinghours Specify hour start and hour end for the select ex 8,20 - * @param int $stepminutes Specify step for minutes between 1 and 30 - * @param string $labeladddateof Label to use for the $adddateof parameter. + * @param string $openinghours Specify hour start and hour end for the select ex 8,20 + * @param int $stepminutes Specify step for minutes between 1 and 30 + * @param string $labeladddateof Label to use for the $adddateof parameter. + * @param string $placeholder Placeholder * @return string Html for selectDate * @see form_date(), select_month(), select_year(), select_dayofweek() */ - public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1, $labeladddateof = '') + public function selectDate($set_time = '', $prefix = 're', $h = 0, $m = 0, $empty = 0, $form_name = "", $d = 1, $addnowlink = 0, $disabled = 0, $fullday = '', $addplusone = '', $adddateof = '', $openinghours = '', $stepminutes = 1, $labeladddateof = '', $placeholder = '') { global $conf, $langs; @@ -5502,7 +5286,7 @@ class Form if ($m == '') $m = 0; $emptydate = 0; $emptyhours = 0; - if ($stepminutes <= 0 || $stepminutes > 30) $stepminutes = 1; + if ($stepminutes <= 0 || $stepminutes > 30) $stepminutes = 1; if ($empty == 1) { $emptydate = 1; $emptyhours = 1; } if ($empty == 2) { $emptydate = 0; $emptyhours = 1; } $orig_set_time = $set_time; @@ -5514,6 +5298,7 @@ class Form } // Analysis of the pre-selection date + $reg = array(); if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+)\s?([0-9]+)?:?([0-9]+)?/', $set_time, $reg)) // deprecated usage { // Date format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' @@ -5522,8 +5307,7 @@ class Form $sday = (!empty($reg[3]) ? $reg[3] : ''); $shour = (!empty($reg[4]) ? $reg[4] : ''); $smin = (!empty($reg[5]) ? $reg[5] : ''); - } - elseif (strval($set_time) != '' && $set_time != -1) + } elseif (strval($set_time) != '' && $set_time != -1) { // set_time est un timestamps (0 possible) $syear = dol_print_date($set_time, "%Y"); @@ -5534,16 +5318,12 @@ class Form $shour = dol_print_date($set_time, "%H"); $smin = dol_print_date($set_time, "%M"); $ssec = dol_print_date($set_time, "%S"); - } - else - { + } else { $shour = ''; $smin = ''; $ssec = ''; } - } - else - { + } else { // Date est '' ou vaut -1 $syear = ''; $smonth = ''; @@ -5578,7 +5358,7 @@ class Form if ($usecalendar == "eldy") { // Zone de saisie manuelle de la date - $retstring .= 'trans("FormatDateShortJavaInput").'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript $retstring .= '>'; @@ -5590,14 +5370,12 @@ class Form $base = DOL_URL_ROOT.'/core/'; $retstring .= ' onClick="showDP(\''.$base.'\',\''.$prefix.'\',\''.$langs->trans("FormatDateShortJavaInput").'\',\''.$langs->defaultlang.'\');"'; $retstring .= '>'.img_object($langs->trans("SelectDate"), 'calendarday', 'class="datecallink"').''; - } - else $retstring .= ''; + } else $retstring .= ''; $retstring .= ''."\n"; $retstring .= ''."\n"; $retstring .= ''."\n"; - } - elseif ($usecalendar == 'jquery') + } elseif ($usecalendar == 'jquery') { if (!$disabled) { @@ -5633,8 +5411,9 @@ class Form // Zone de saisie manuelle de la date $retstring .= '
'; - $retstring .= 'trans("FormatDateShortJavaInput").'\'); "'; // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript $retstring .= '>'; @@ -5650,9 +5429,7 @@ class Form $retstring.=' });'; $retstring.='});'; $retstring.="";*/ - } - else - { + } else { $retstring .= ''; } @@ -5660,15 +5437,12 @@ class Form $retstring .= ''."\n"; $retstring .= ''."\n"; $retstring .= ''."\n"; - } - else - { + } else { $retstring .= "Bad value of MAIN_POPUP_CALENDAR"; } } // Show date with combo selects - else - { + else { //$retstring.='
'; // Day $retstring .= ''; @@ -5704,9 +5478,7 @@ class Form if ($emptydate || $set_time == -1) { $retstring .= ''; - } - else - { + } else { $retstring .= ''; for ($year = $syear - 10; $year < $syear + 10; $year++) @@ -5763,39 +5535,38 @@ class Form { // Script which will be inserted in the onClick of the "Now" link $reset_scripts = ""; - if ($addnowlink == 2) // local computer time - { - // pad add leading 0 on numbers - $reset_scripts .= "Number.prototype.pad = function(size) { + if ($addnowlink == 2) // local computer time + { + // pad add leading 0 on numbers + $reset_scripts .= "Number.prototype.pad = function(size) { var s = String(this); while (s.length < (size || 2)) {s = '0' + s;} return s; }; var d = new Date();"; - } + } // Generate the date part, depending on the use or not of the javascript calendar - if ($addnowlink == 1) // server time expressed in user time setup - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; - } - elseif ($addnowlink == 2) - { - /* Disabled because the output does not use the string format defined by FormatDateShort key to forge the value into #prefix. + if ($addnowlink == 1) // server time expressed in user time setup + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; + } elseif ($addnowlink == 2) + { + /* Disabled because the output does not use the string format defined by FormatDateShort key to forge the value into #prefix. * This break application for foreign languages. $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(d.toLocaleDateString(\''.str_replace('_', '-', $langs->defaultlang).'\'));'; $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(d.getDate().pad());'; $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(parseInt(d.getMonth().pad()) + 1);'; $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(d.getFullYear());'; */ - $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; - $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; - } + $reset_scripts .= 'jQuery(\'#'.$prefix.'\').val(\''.dol_print_date(dol_now(), 'day', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'day\').val(\''.dol_print_date(dol_now(), '%d', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'month\').val(\''.dol_print_date(dol_now(), '%m', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'year\').val(\''.dol_print_date(dol_now(), '%Y', 'tzuser').'\');'; + } /*if ($usecalendar == "eldy") { $base=DOL_URL_ROOT.'/core/'; @@ -5812,14 +5583,15 @@ class Form { if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; //$reset_scripts .= 'this.form.elements[\''.$prefix.'hour\'].value=formatDate(new Date(), \'HH\'); '; - if ($addnowlink == 1) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H', 'tzuser').'\');'; - } - elseif ($addnowlink == 2) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(d.getHours().pad());'; - } + if ($addnowlink == 1) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(\''.dol_print_date(dol_now(), '%H', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').change();'; + } elseif ($addnowlink == 2) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').val(d.getHours().pad());'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'hour\').change();'; + } if ($fullday) $reset_scripts .= ' } '; } @@ -5828,14 +5600,15 @@ class Form { if ($fullday) $reset_scripts .= " if (jQuery('#fullday:checked').val() == null) {"; //$reset_scripts .= 'this.form.elements[\''.$prefix.'min\'].value=formatDate(new Date(), \'mm\'); '; - if ($addnowlink == 1) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M', 'tzuser').'\');'; - } - elseif ($addnowlink == 2) - { - $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(d.getMinutes().pad());'; - } + if ($addnowlink == 1) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(\''.dol_print_date(dol_now(), '%M', 'tzuser').'\');'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').change();'; + } elseif ($addnowlink == 2) + { + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').val(d.getMinutes().pad());'; + $reset_scripts .= 'jQuery(\'#'.$prefix.'min\').change();'; + } if ($fullday) $reset_scripts .= ' } '; } // If reset_scripts is not empty, print the link with the reset_scripts in the onClick @@ -5892,9 +5665,35 @@ class Form return $retstring; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Function to show a form to select a duration on a page + /** + * selectTypeDuration + * + * @param string $prefix Prefix + * @param string $selected Selected type + * @return string HTML select string + */ + public function selectTypeDuration($prefix, $selected = 'i') + { + global $langs; + + $TDurationTypes = array('y'=>$langs->trans('Years'), 'm'=>$langs->trans('Month'), 'w'=>$langs->trans('Weeks'), 'd'=>$langs->trans('Days'), 'h'=>$langs->trans('Hours'), 'i'=>$langs->trans('Minutes')); + + $retstring = '"; + + return $retstring; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to show a form to select a duration on a page * * @param string $prefix Prefix for input fields * @param int $iSecond Default preselected duration (number of seconds or '') @@ -5906,9 +5705,9 @@ class Form * @param int $nooutput Do not output html string but return it * @return string|void */ - public function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0) + public function select_duration($prefix, $iSecond = '', $disabled = 0, $typehour = 'select', $minunderhours = 0, $nooutput = 0) { - // phpcs:enable + // phpcs:enable global $langs; $retstring = ''; @@ -5924,8 +5723,7 @@ class Form $minSelected = convertSecondToTime($iSecond, 'min'); } - if ($typehour == 'select') - { + if ($typehour == 'select') { $retstring .= '"; - } - elseif ($typehour == 'text' || $typehour == 'textselect') - { + } elseif ($typehour == 'text' || $typehour == 'textselect') { $retstring .= ''; + } else { + return 'BadValueForParameterTypeHour'; } - else return 'BadValueForParameterTypeHour'; if ($typehour != 'text') $retstring .= ' '.$langs->trans('HourShort'); else $retstring .= ':'; @@ -5961,8 +5758,7 @@ class Form $retstring .= '>'.$min.''; } $retstring .= ""; - } - elseif ($typehour == 'text') + } elseif ($typehour == 'text') { $retstring .= ''; } @@ -5980,6 +5776,7 @@ class Form /** * Generic method to select a component from a combo list. + * Can use autocomplete with ajax after x key pressed or a full combo, depending on setup. * This is the generic method that will replace all specific existing methods. * * @param string $objectdesc ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]] @@ -5994,7 +5791,7 @@ class Form * @param int $disabled 1=Html component is disabled * @param string $selected_input_value Value of preselected input text (for use with ajax) * @return string Return HTML string - * @see selectForFormsList() select_thirdparty + * @see selectForFormsList() select_thirdparty_list() */ public function selectForForms($objectdesc, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $disabled = 0, $selected_input_value = '') { @@ -6011,6 +5808,7 @@ class Form if (!empty($classpath)) { dol_include_once($classpath); + if ($classname && class_exists($classname)) { $objecttmp = new $classname($this->db); @@ -6038,16 +5836,16 @@ class Form $out = ''; if (!empty($conf->use_javascript_ajax) && !empty($conf->global->$confkeyforautocompletemode) && !$forcecombo) { - // No immediate load of all database - $placeholder = ''; - if ($preselectedvalue && empty($selected_input_value)) - { - $objecttmp->fetch($preselectedvalue); - $selected_input_value = ($prefixforautocompletemode == 'company' ? $objecttmp->name : $objecttmp->ref); - //unset($objecttmp); - } + // No immediate load of all database + $placeholder = ''; + if ($preselectedvalue && empty($selected_input_value)) + { + $objecttmp->fetch($preselectedvalue); + $selected_input_value = ($prefixforautocompletemode == 'company' ? $objecttmp->name : $objecttmp->ref); + //unset($objecttmp); + } - $objectdesc = $classname.':'.$classpath.':'.$addcreatebuttonornot.':'.$filter; + $objectdesc = $classname.':'.$classpath.':'.$addcreatebuttonornot.':'.$filter; $urlforajaxcall = DOL_URL_ROOT.'/core/ajax/selectobject.php'; // No immediate load of all database @@ -6057,9 +5855,7 @@ class Form $out .= ''; if ($placeholder) $placeholder = ' placeholder="'.$placeholder.'"'; $out .= ''; - } - else - { + } else { // Immediate load of table record. Note: filter is inside $objecttmp->filter $out .= $this->selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty, $searchkey, $placeholder, $morecss, $moreparams, $forcecombo, 0, $disabled); } @@ -6087,9 +5883,7 @@ class Form if (preg_match('/^\'(.*)\'$/', $tmpescaped, $regbis)) { $tmpescaped = "'".$db->escape($regbis[1])."'"; - } - else - { + } else { $tmpescaped = $db->escape($tmpescaped); } return $db->escape($tmp[0]).' '.strtoupper($db->escape($tmp[1]))." ".$tmpescaped; @@ -6113,7 +5907,7 @@ class Form * @return string|array Return HTML string * @see selectForForms() */ - public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled = 0) + public function selectForFormsList($objecttmp, $htmlname, $preselectedvalue, $showempty = '', $searchkey = '', $placeholder = '', $morecss = '', $moreparams = '', $forcecombo = 0, $outputmode = 0, $disabled = 0) { global $conf, $langs, $user; @@ -6131,20 +5925,16 @@ class Form if ($val['showoncombobox']) $tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key; } if ($tmpfieldstoshow) $fieldstoshow = $tmpfieldstoshow; - } - else - { + } else { // For backward compatibility $objecttmp->fields['ref'] = array('type'=>'varchar(30)', 'label'=>'Ref', 'showoncombobox'=>1); - } + } if (empty($fieldstoshow)) { if (isset($objecttmp->fields['ref'])) { $fieldstoshow = 't.ref'; - } - else - { + } else { $langs->load("errors"); $this->error = $langs->trans("ErrorNoFieldWithAttributeShowoncombobox"); return $langs->trans('ErrorNoFieldWithAttributeShowoncombobox'); @@ -6232,14 +6022,10 @@ class Form if ($preselectedvalue > 0 && $preselectedvalue == $obj->rowid) { $out .= ''; - } - else - { + } else { $out .= ''; } - } - else - { + } else { array_push($outarray, array('key'=>$obj->rowid, 'value'=>$label, 'label'=>$label)); } @@ -6249,9 +6035,7 @@ class Form } $out .= ''."\n"; - } - else - { + } else { dol_print_error($this->db); } @@ -6328,8 +6112,8 @@ class Form { foreach ($array as $key => $value) { - if (!is_array($value)) $array[$key] = $langs->trans($value); - else $array[$key]['label'] = $langs->trans($value['label']); + if (!is_array($value)) $array[$key] = $langs->trans($value); + else $array[$key]['label'] = $langs->trans($value['label']); } } @@ -6339,14 +6123,14 @@ class Form foreach ($array as $key => $tmpvalue) { - if (is_array($tmpvalue)) $value = $tmpvalue['label']; - else $value = $tmpvalue; + if (is_array($tmpvalue)) $value = $tmpvalue['label']; + else $value = $tmpvalue; $disabled = ''; $style = ''; if (!empty($disablebademail)) { - if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value)) - || ($disablebademail == 2 && preg_match('/---/', $value))) + if (($disablebademail == 1 && !preg_match('/<.+@.+>/', $value)) + || ($disablebademail == 2 && preg_match('/---/', $value))) { $disabled = ' disabled'; $style = ' class="warning"'; @@ -6357,9 +6141,7 @@ class Form { if (empty($nohtmlescape)) $selectOptionValue = dol_escape_htmltag($key.' - '.($maxlen ?dol_trunc($value, $maxlen) : $value)); else $selectOptionValue = $key.' - '.($maxlen ?dol_trunc($value, $maxlen) : $value); - } - else - { + } else { if (empty($nohtmlescape)) $selectOptionValue = dol_escape_htmltag($maxlen ?dol_trunc($value, $maxlen) : $value); else $selectOptionValue = $maxlen ?dol_trunc($value, $maxlen) : $value; if ($value == '' || $value == '-') $selectOptionValue = ' '; @@ -6376,10 +6158,10 @@ class Form if ($nohtmlescape) $out .= ' data-html="'.dol_escape_htmltag($selectOptionValue).'"'; if (is_array($tmpvalue)) { - foreach ($tmpvalue as $keyforvalue => $valueforvalue) - { - if (preg_match('/^data-/', $keyforvalue)) $out .= ' '.$keyforvalue.'="'.$valueforvalue.'"'; - } + foreach ($tmpvalue as $keyforvalue => $valueforvalue) + { + if (preg_match('/^data-/', $keyforvalue)) $out .= ' '.$keyforvalue.'="'.$valueforvalue.'"'; + } } $out .= '>'; //var_dump($selectOptionValue); @@ -6487,19 +6269,17 @@ class Form if ($acceptdelayedhtml) { $delayedhtmlcontent .= $outdelayed; - } - else - { + } else { $out .= $outdelayed; } return $out; } - /** - * Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter. - * Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice. - * - * @param string $htmlname Name of html select area + /** + * Return a HTML select string, built from an array of key+value, but content returned into select is defined into $array parameter. + * Note: Do not apply langs->trans function on returned content of Ajax service, content may be entity encoded twice. + * + * @param string $htmlname Name of html select area * @param string $array Array (key=>array('text'=>'A text', 'url'=>'An url'), ...) * @param string $id Preselected key * @param string $moreparam Add more parameters onto the select tag @@ -6605,9 +6385,7 @@ class Form if ($acceptdelayedhtml) { $delayedhtmlcontent .= $outdelayed; - } - else - { + } else { $out .= $outdelayed; } return $out; @@ -6619,7 +6397,7 @@ class Form * @param string $htmlname Name of select * @param array $array Array with key+value * @param array $selected Array with key+value preselected - * @param int $key_in_label 1 pour afficher la key dans la valeur "[key] value" + * @param int $key_in_label 1 to show key like in "[key] value" * @param int $value_as_key 1 to use value as key * @param string $morecss Add more css style * @param int $translate Translate and encode value @@ -6638,25 +6416,23 @@ class Form $out = ''; if ($addjscombo < 0) { - if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $addjscombo = 1; - else $addjscombo = 0; + if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) $addjscombo = 1; + else $addjscombo = 0; } // Add code for jquery to use multiselect if (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { + $out .= "\n".' + '; + $(".' . $cssclass.'").change(function() { + $(this).closest("tr").toggleClass("highlight", this.checked); + }); + }); + '; return $out; } @@ -7846,14 +7575,15 @@ class Form * @param int $addcheckuncheckall Add the check all/uncheck all checkbox (use javascript) and code to manage this * @param string $cssclass CSS class * @param int $calljsfunction 0=default. 1=call function initCheckForSelect() after changing status of checkboxes + * @param string $massactionname Mass action name * @return string */ - public function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0) + public function showFilterAndCheckAddButtons($addcheckuncheckall = 0, $cssclass = 'checkforaction', $calljsfunction = 0, $massactionname = "massaction") { $out = $this->showFilterButtons(); if ($addcheckuncheckall) { - $out .= $this->showCheckAddButtons($cssclass, $calljsfunction); + $out .= $this->showCheckAddButtons($cssclass, $calljsfunction, $massactionname); } return $out; } @@ -7868,14 +7598,15 @@ class Form * @param string $target htmlname of target select to bind event * @param int $default_selected default category to select if fk_c_type_fees change = EX_KME * @param array $params param to give + * @param int $info_admin Show the tooltip help picto to setup list * @return string */ - public function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array()) + public function selectExpenseCategories($selected = '', $htmlname = 'fk_c_exp_tax_cat', $useempty = 0, $excludeid = array(), $target = '', $default_selected = 0, $params = array(), $info_admin = 1) { - global $db, $conf, $langs, $user; + global $db, $langs, $user; - $out = ''; - $sql = 'SELECT rowid, label FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat WHERE active = 1'; + $out = ''; + $sql = 'SELECT rowid, label FROM '.MAIN_DB_PREFIX.'c_exp_tax_cat WHERE active = 1'; $sql .= ' AND entity IN (0,'.getEntity('exp_tax_cat').')'; if (!empty($excludeid)) $sql .= ' AND rowid NOT IN ('.implode(',', $excludeid).')'; $sql .= ' ORDER BY label'; @@ -7883,7 +7614,7 @@ class Form $resql = $db->query($sql); if ($resql) { - $out = ''; if ($useempty) $out .= ''; while ($obj = $db->fetch_object($resql)) @@ -7891,7 +7622,9 @@ class Form $out .= ''; } $out .= ''; - if (!empty($htmlname) && $user->admin) $out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + $out .= ajax_combobox('select_'.$htmlname); + + if (!empty($htmlname) && $user->admin && $info_admin) $out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if (!empty($target)) { @@ -7943,9 +7676,7 @@ class Form } } } - } - else - { + } else { dol_print_error($db); } @@ -7960,11 +7691,11 @@ class Form * @param integer $useempty 1=Add empty line * @return string */ - public function selectExpenseRanges($selected = '', $htmlname = 'fk_range', $useempty = 0) + public function selectExpenseRanges($selected = '', $htmlname = 'fk_range', $useempty = 0) { global $db, $conf, $langs; - $out = ''; + $out = ''; $sql = 'SELECT rowid, range_ik FROM '.MAIN_DB_PREFIX.'c_exp_tax_range'; $sql .= ' WHERE entity = '.$conf->entity.' AND active = 1'; @@ -7979,9 +7710,7 @@ class Form $out .= ''; } $out .= ''; - } - else - { + } else { dol_print_error($db); } @@ -7998,11 +7727,11 @@ class Form * @param integer $useid 0=use 'code' as key, 1=use 'id' as key * @return string */ - public function selectExpense($selected = '', $htmlname = 'fk_c_type_fees', $useempty = 0, $allchoice = 1, $useid = 0) + public function selectExpense($selected = '', $htmlname = 'fk_c_type_fees', $useempty = 0, $allchoice = 1, $useid = 0) { global $db, $langs; - $out = ''; + $out = ''; $sql = 'SELECT id, code, label FROM '.MAIN_DB_PREFIX.'c_type_fees'; $sql .= ' WHERE active = 1'; @@ -8022,14 +7751,12 @@ class Form $out .= ''; } $out .= ''; - } - else - { + } else { dol_print_error($db); } - return $out; - } + return $out; + } /** * Output a combo list with invoices qualified for a third party @@ -8041,15 +7768,15 @@ class Form * @param int $option_only Return only html options lines without the select tag * @param string $show_empty Add an empty line ('1' or string to show for empty line) * @param int $discard_closed Discard closed projects (0=Keep,1=hide completely,2=Disable) - * @param int $forcefocus Force focus on field (works with javascript only) - * @param int $disabled Disabled + * @param int $forcefocus Force focus on field (works with javascript only) + * @param int $disabled Disabled * @param string $morecss More css added to the select component * @param string $projectsListId ''=Automatic filter on project allowed. List of id=Filter on project ids. * @param string $showproject 'all' = Show project info, ''=Hide project info * @param User $usertofilter User object to use for filtering * @return int Nbr of project if OK, <0 if KO */ - public function selectInvoice($socid = -1, $selected = '', $htmlname = 'invoiceid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showproject = 'all', $usertofilter = null) + public function selectInvoice($socid = -1, $selected = '', $htmlname = 'invoiceid', $maxlength = 24, $option_only = 0, $show_empty = '1', $discard_closed = 0, $forcefocus = 0, $disabled = 0, $morecss = 'maxwidth500', $projectsListId = '', $showproject = 'all', $usertofilter = null) { global $user, $conf, $langs; @@ -8075,7 +7802,7 @@ class Form } // Search all projects - $sql = 'SELECT f.rowid, f.ref as fref, "nolabel" as flabel, p.rowid as pid, f.ref, + $sql = 'SELECT f.rowid, f.ref as fref, "nolabel" as flabel, p.rowid as pid, f.ref, p.title, p.fk_soc, p.fk_statut, p.public,'; $sql .= ' s.nom as name'; $sql .= ' FROM '.MAIN_DB_PREFIX.'projet as p'; @@ -8095,9 +7822,9 @@ class Form if (!empty($conf->use_javascript_ajax)) { include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; - $comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus); - $out .= $comboenhancement; - $morecss = 'minwidth200imp maxwidth500'; + $comboenhancement = ajax_combobox($htmlname, '', 0, $forcefocus); + $out .= $comboenhancement; + $morecss = 'minwidth200imp maxwidth500'; } if (empty($option_only)) { @@ -8120,9 +7847,7 @@ class Form if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($usertofilter->rights->societe->lire)) { // Do nothing - } - else - { + } else { if ($discard_closed == 1 && $obj->fk_statut == Project::STATUS_CLOSED) { $i++; @@ -8141,13 +7866,11 @@ class Form { $disabled = 1; $labeltoshow .= ' - '.$langs->trans("Draft"); - } - elseif ($obj->fk_statut == Project::STATUS_CLOSED) + } elseif ($obj->fk_statut == Project::STATUS_CLOSED) { if ($discard_closed == 2) $disabled = 1; $labeltoshow .= ' - '.$langs->trans("Closed"); - } - elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) + } elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled = 1; $labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany"); @@ -8159,15 +7882,11 @@ class Form $out .= '
'; + $ret .= '
'; return $ret; } + + /** + * selectModelMail + * + * @param string $prefix Prefix + * @param string $modelType Model type + * @param int $default 1=Show also Default mail template + * @return string HTML select string + */ + public function selectModelMail($prefix, $modelType = '', $default = 0) + { + global $langs, $db, $user; + + $retstring = ''; + + $TModels = array(); + + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $result = $formmail->fetchAllEMailTemplate($modelType, $user, $langs); + + if ($default) $TModels[0] = $langs->trans('DefaultMailModel'); + if ($result > 0) { + foreach ($formmail->lines_model as $model) { + $TModels[$model->id] = $model->label; + } + } + + $retstring .= '"; + + return $retstring; + } } diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 7aa7d5585d8..f48e9b8eb74 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -82,9 +82,7 @@ class FormAccounting extends Form { $options = $this->options_cache[$usecache]; $selected = $selectid; - } - else - { + } else { $sql = "SELECT rowid, code, label, nature, entity, active"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_journal"; $sql .= " WHERE active = 1"; @@ -170,23 +168,21 @@ class FormAccounting extends Form $sql .= " AND c.category_type = 0"; if (empty($allcountries)) $sql .= " AND c.fk_country = ".$mysoc->country_id; $sql .= " ORDER BY c.label ASC"; - } - else - { + } else { $sql = "SELECT c.rowid, c.label as type, c.range_account"; $sql .= " FROM ".MAIN_DB_PREFIX."c_accounting_category as c, ".MAIN_DB_PREFIX."c_country as co"; $sql .= " WHERE c.active = 1"; $sql .= " AND c.category_type = 0"; $sql .= " AND c.fk_country = co.rowid"; - if (empty($allcountries)) $sql .= " AND co.code = '".$mysoc->country_code."'"; + if (empty($allcountries)) $sql .= " AND co.code = '".$this->db->escape($mysoc->country_code)."'"; $sql .= " ORDER BY c.label ASC"; } dol_syslog(get_class($this).'::'.__METHOD__, LOG_DEBUG); - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { - $num = $db->num_rows($resql); + $num = $this->db->num_rows($resql); if ($num) { $out = ''; //if ($user->admin && $help) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1); - } - else - { + } else { $out .= $langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code); } - } - else - { - dol_print_error($db, $db->lasterror()); + } else { + dol_print_error($this->db); } $out .= ajax_combobox($htmlname, array()); @@ -287,9 +279,7 @@ class FormAccounting extends Form { $options = $options + $this->options_cache[$usecache]; // We use + instead of array_merge because we don't want to reindex key from 0 $selected = $selectid; - } - else - { + } else { $trunclength = empty($conf->global->ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT) ? 50 : $conf->global->ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT; $sql = "SELECT DISTINCT aa.account_number, aa.label, aa.labelshort, aa.rowid, aa.fk_pcg_version"; @@ -315,9 +305,7 @@ class FormAccounting extends Form if (empty($obj->labelshort)) { $labeltoshow = $obj->label; - } - else - { + } else { $labeltoshow = $obj->labelshort; } diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 398e2b8a235..54406b1075b 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -29,58 +29,58 @@ */ class FormActions { - /** - * @var DoliDB Database handler. - */ - public $db; + /** + * @var DoliDB Database handler. + */ + public $db; - /** + /** * @var string Error code (or message) */ public $error = ''; - /** + /** * Constructor * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; - } + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Show list of action status - * - * @param string $formname Name of form where select is included - * @param string $selected Preselected value (-1..100) - * @param int $canedit 1=can edit, 0=read only - * @param string $htmlname Name of html prefix for html fields (selectX and valX) - * @param integer $showempty Show an empty line if select is used - * @param integer $onlyselect 0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running) - * @param string $morecss More css on select field - * @return void - */ - public function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100') - { - // phpcs:enable - global $langs, $conf; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Show list of action status + * + * @param string $formname Name of form where select is included + * @param string $selected Preselected value (-1..100) + * @param int $canedit 1=can edit, 0=read only + * @param string $htmlname Name of html prefix for html fields (selectX and valX) + * @param integer $showempty Show an empty line if select is used + * @param integer $onlyselect 0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running) + * @param string $morecss More css on select field + * @return void + */ + public function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100') + { + // phpcs:enable + global $langs, $conf; - $listofstatus = array( - '-1' => $langs->trans("ActionNotApplicable"), - '0' => $langs->trans("ActionsToDoShort"), - '50' => $langs->trans("ActionRunningShort"), - '100' => $langs->trans("ActionDoneShort") - ); + $listofstatus = array( + '-1' => $langs->trans("ActionNotApplicable"), + '0' => $langs->trans("ActionsToDoShort"), + '50' => $langs->trans("ActionRunningShort"), + '100' => $langs->trans("ActionDoneShort") + ); // +ActionUncomplete - if (!empty($conf->use_javascript_ajax)) - { - print "\n"; - print "\n"; - } - if (!empty($conf->use_javascript_ajax) || $onlyselect) - { - //var_dump($selected); - if ($selected == 'done') $selected = '100'; - print ''; - if ($selected == 0 || $selected == 100) $canedit = 0; - - if (empty($onlyselect)) - { - print ' = 0) ? '' : ' disabled').'>'; - print '%'; - } - } - else + } + if (!empty($conf->use_javascript_ajax) || $onlyselect) { - print ' %'; - } - } - - - /** - * Show list of actions for element - * - * @param Object $object Object - * @param string $typeelement 'invoice','propal','order','invoice_supplier','order_supplier','fichinter' - * @param int $socid Socid of user - * @param int $forceshowtitle Show title even if there is no actions to show - * @param string $morecss More css on table - * @param int $max Max number of record - * @param string $moreparambacktopage More param for the backtopage - * @param string $morehtmlcenter More html text on center of title line - * @return int <0 if KO, >=0 if OK - */ - public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlcenter = '') - { - global $langs, $conf, $user; - - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - - $sortfield = 'a.datep,a.id'; - $sortorder = 'DESC,DESC'; - - $listofactions = ActionComm::getActions($this->db, $socid, $object->id, $typeelement, '', $sortfield, $sortorder, ($max ? ($max + 1) : 0)); - if (!is_array($listofactions)) dol_print_error($this->db, 'FailedToGetActions'); - - $num = count($listofactions); - if ($num || $forceshowtitle) - { - if ($typeelement == 'invoice') $title = $langs->trans('ActionsOnBill'); - elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') $title = $langs->trans('ActionsOnBill'); - elseif ($typeelement == 'propal') $title = $langs->trans('ActionsOnPropal'); - elseif ($typeelement == 'supplier_proposal') $title = $langs->trans('ActionsOnSupplierProposal'); - elseif ($typeelement == 'order') $title = $langs->trans('ActionsOnOrder'); - elseif ($typeelement == 'order_supplier' || $typeelement == 'supplier_order') $title = $langs->trans('ActionsOnOrder'); - elseif ($typeelement == 'shipping') $title = $langs->trans('ActionsOnShipping'); - elseif ($typeelement == 'fichinter') $title = $langs->trans('ActionsOnFicheInter'); - elseif ($typeelement == 'project') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); - elseif ($typeelement == 'task') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); - elseif ($typeelement == 'member') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); - else $title = $langs->trans("LatestLinkedEvents", $max ? $max : ''); - - $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id.($moreparambacktopage ? '&'.$moreparambacktopage : ''); - - $projectid = $object->fk_project; - if ($typeelement == 'project') $projectid = $object->id; - - $newcardbutton = ''; - if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create)) + //var_dump($selected); + if ($selected == 'done') $selected = '100'; + print ''; + if ($selected == 0 || $selected == 100) $canedit = 0; + + if (empty($onlyselect)) + { + print ' = 0) ? '' : ' disabled').'>'; + print '%'; + } + } else { + print ' %'; + } + } + + + /** + * Show list of actions for element + * + * @param Object $object Object + * @param string $typeelement 'invoice', 'propal', 'order', 'invoice_supplier', 'order_supplier', 'fichinter' + * @param int $socid Socid of user + * @param int $forceshowtitle Show title even if there is no actions to show + * @param string $morecss More css on table + * @param int $max Max number of record + * @param string $moreparambacktopage More param for the backtopage + * @param string $morehtmlcenter More html text on center of title line + * @return int <0 if KO, >=0 if OK + */ + public function showactions($object, $typeelement, $socid = 0, $forceshowtitle = 0, $morecss = 'listactions', $max = 0, $moreparambacktopage = '', $morehtmlcenter = '') + { + global $langs, $conf, $user; + + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; + + $sortfield = 'a.datep,a.id'; + $sortorder = 'DESC,DESC'; + + $listofactions = ActionComm::getActions($this->db, $socid, $object->id, $typeelement, '', $sortfield, $sortorder, ($max ? ($max + 1) : 0)); + if (!is_array($listofactions)) dol_print_error($this->db, 'FailedToGetActions'); + + $num = count($listofactions); + if ($num || $forceshowtitle) + { + if ($typeelement == 'invoice') $title = $langs->trans('ActionsOnBill'); + elseif ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') $title = $langs->trans('ActionsOnBill'); + elseif ($typeelement == 'propal') $title = $langs->trans('ActionsOnPropal'); + elseif ($typeelement == 'supplier_proposal') $title = $langs->trans('ActionsOnSupplierProposal'); + elseif ($typeelement == 'order') $title = $langs->trans('ActionsOnOrder'); + elseif ($typeelement == 'order_supplier' || $typeelement == 'supplier_order') $title = $langs->trans('ActionsOnOrder'); + elseif ($typeelement == 'shipping') $title = $langs->trans('ActionsOnShipping'); + elseif ($typeelement == 'fichinter') $title = $langs->trans('ActionsOnFicheInter'); + elseif ($typeelement == 'project') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); + elseif ($typeelement == 'task') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); + elseif ($typeelement == 'member') $title = $langs->trans('LatestLinkedEvents', $max ? $max : ''); + else $title = $langs->trans("LatestLinkedEvents", $max ? $max : ''); + + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id.($moreparambacktopage ? '&'.$moreparambacktopage : ''); + + $projectid = $object->fk_project; + if ($typeelement == 'project') $projectid = $object->id; + + $newcardbutton = ''; + if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create)) + { + $newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/action/card.php?action=create&datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog')).'&origin='.urlencode($typeelement).'&originid='.$object->id.($object->socid > 0 ? '&socid='.$object->socid : ($socid > 0 ? '&socid='.$socid : '')).($projectid > 0 ? '&projectid='.$projectid : '').'&backtopage='.urlencode($urlbacktopage)); } - print ''."\n"; - print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlcenter); + print ''."\n"; + print load_fiche_titre($title, $newcardbutton, '', 0, 0, '', $morehtmlcenter); - $page = 0; $param = ''; + $page = 0; $param = ''; - print '
'; - print ''; - print ''; - print getTitleFieldOfList('Ref', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('By', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('Title', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); - print getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', $page, $param, '', $sortfield, $sortorder, 'center ', 1); - print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, 'right ', 1); - print ''; - print "\n"; + print '
'; + print '
'; + print ''; + print getTitleFieldOfList('Ref', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('By', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('Type', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('Title', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, '', 1); + print getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', $page, $param, '', $sortfield, $sortorder, 'center ', 1); + print getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', $page, $param, '', $sortfield, $sortorder, 'right ', 1); + print ''; + print "\n"; - if (is_array($listofactions) && count($listofactions)) - { - $cacheusers = array(); + if (is_array($listofactions) && count($listofactions)) + { + $cacheusers = array(); - $cursorevent = 0; - foreach ($listofactions as $actioncomm) - { - if ($max && $cursorevent >= $max) break; + $cursorevent = 0; + foreach ($listofactions as $actioncomm) + { + if ($max && $cursorevent >= $max) break; - $ref = $actioncomm->getNomUrl(1, -1); - $label = $actioncomm->getNomUrl(0, 38); + $ref = $actioncomm->getNomUrl(1, -1); + $label = $actioncomm->getNomUrl(0, 38); - print ''; - // Ref + print ''; + // Ref print ''; // Onwer - print ''; + print ''; // Type - print ''; - // Label - print ''; - // Date - print ''; - print ''; - print ''; + print ''; + // Label + print ''; + // Date + print ''; + print ''; + print ''; - $cursorevent++; - } - } - else - { - print ''; - } + $cursorevent++; + } + } else { + print ''; + } - if ($max && $num > $max) - { - print ''; - } + if ($max && $num > $max) + { + print ''; + } - print '
'.$ref.''; - if (!empty($actioncomm->userownerid)) - { - if (is_object($cacheusers[$actioncomm->userownerid])) - { - $tmpuser = $cacheusers[$actioncomm->userownerid]; - } - else - { - $tmpuser = new User($this->db); - $tmpuser->fetch($actioncomm->userownerid); - $cacheusers[$actioncomm->userownerid] = $tmpuser; - } - if ($tmpuser->id > 0) - { - print $tmpuser->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', ''); - } - } - print ''; + if (!empty($actioncomm->userownerid)) + { + if (is_object($cacheusers[$actioncomm->userownerid])) + { + $tmpuser = $cacheusers[$actioncomm->userownerid]; + } else { + $tmpuser = new User($this->db); + $tmpuser->fetch($actioncomm->userownerid); + $cacheusers[$actioncomm->userownerid] = $tmpuser; + } + if ($tmpuser->id > 0) + { + print $tmpuser->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', ''); + } + } + print ''; - // TODO Code common with code into comm/action/list.php + print ''; + // TODO Code common with code into comm/action/list.php $imgpicto = ''; if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) { if ($actioncomm->type_picto) { $imgpicto = img_picto('', $actioncomm->type_picto); - } - else { + } else { if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; @@ -286,105 +281,100 @@ class FormActions } else { print $actioncomm->type_short ? $actioncomm->type_short : $actioncomm->type; } - print ''.$label.''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel'); - if ($actioncomm->datef) - { - $tmpa = dol_getdate($actioncomm->datep); - $tmpb = dol_getdate($actioncomm->datef); - if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) - { - if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel'); - } - else print '-'.dol_print_date($actioncomm->datef, 'dayhour', 'tzuserrel'); - } - print ''; - print $actioncomm->getLibStatut(3); - print '
'.$label.''.dol_print_date($actioncomm->datep, 'dayhour', 'tzuserrel'); + if ($actioncomm->datef) + { + $tmpa = dol_getdate($actioncomm->datep); + $tmpb = dol_getdate($actioncomm->datef); + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) + { + if ($tmpa['hours'] != $tmpb['hours'] || $tmpa['minutes'] != $tmpb['minutes'] && $tmpa['seconds'] != $tmpb['seconds']) print '-'.dol_print_date($actioncomm->datef, 'hour', 'tzuserrel'); + } else print '-'.dol_print_date($actioncomm->datef, 'dayhour', 'tzuserrel'); + } + print ''; + print $actioncomm->getLibStatut(3); + print '
'.$langs->trans("None").'
'.$langs->trans("None").'
'.$langs->trans("More").'...
'.$langs->trans("More").'...
'; - print '
'; - } + print ''; + print ''; + } - return $num; - } + return $num; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Output html select list of type of event - * - * @param array|string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx'). Can be an array too. - * @param string $htmlname Name of select field - * @param string $excludetype A type to exclude ('systemauto', 'system', '') - * @param integer $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1=Keep details and add a combined line "All manual" - * @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value - * @param int $multiselect 1=Allow multiselect of action type - * @param int $nooutput 1=No output - * @param string $morecss More css to add to SELECT component. - * @return string - */ - public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = '') - { - // phpcs:enable - global $langs, $user, $form, $conf; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Output html select list of type of event + * + * @param array|string $selected Type pre-selected (can be 'manual', 'auto' or 'AC_xxx'). Can be an array too. + * @param string $htmlname Name of select field + * @param string $excludetype A type to exclude ('systemauto', 'system', '') + * @param integer $onlyautoornot 1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type, -1=Keep details and add a combined line "All manual" + * @param int $hideinfohelp 1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value + * @param int $multiselect 1=Allow multiselect of action type + * @param int $nooutput 1=No output + * @param string $morecss More css to add to SELECT component. + * @return string + */ + public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = '') + { + // phpcs:enable + global $langs, $user, $form, $conf; - if (!is_object($form)) $form = new Form($this->db); + if (!is_object($form)) $form = new Form($this->db); - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; - $caction = new CActionComm($this->db); + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/cactioncomm.class.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; + $caction = new CActionComm($this->db); - // Suggest a list with manual events or all auto events - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); - if (empty($multiselect)) { - // Add empty line at start only if no multiselect - array_unshift($arraylist, ' '); - } - //asort($arraylist); + // Suggest a list with manual events or all auto events + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot); + if (empty($multiselect)) { + // Add empty line at start only if no multiselect + array_unshift($arraylist, ' '); + } + //asort($arraylist); - if ($selected == 'manual') $selected = 'AC_OTH'; - if ($selected == 'auto') $selected = 'AC_OTH_AUTO'; + if ($selected == 'manual') $selected = 'AC_OTH'; + if ($selected == 'auto') $selected = 'AC_OTH_AUTO'; - if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']); + if (!empty($conf->global->AGENDA_ALWAYS_HIDE_AUTO)) unset($arraylist['AC_OTH_AUTO']); - $out = ''; + $out = ''; if (!empty($multiselect)) { - if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected); + if (!is_array($selected) && !empty($selected)) $selected = explode(',', $selected); $out .= $form->multiselectarray($htmlname, $arraylist, $selected, 0, 0, 'centpercent', 0, 0); - } - else - { + } else { $out .= $form->selectarray($htmlname, $arraylist, $selected, 0, 0, 0, '', 0, 0, 0, '', 'minwidth200'.($morecss ? ' '.$morecss : ''), 1); } - if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) - { - $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup").($hideinfohelp == -1 ? ". ".$langs->trans("YouCanSetDefaultValueInModuleSetup") : ''), 1); - } + if ($user->admin && empty($onlyautoornot) && $hideinfohelp <= 0) + { + $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup").($hideinfohelp == -1 ? ". ".$langs->trans("YouCanSetDefaultValueInModuleSetup") : ''), 1); + } - if ($nooutput) return $out; - else print $out; - return ''; - } + if ($nooutput) return $out; + else print $out; + return ''; + } } diff --git a/htdocs/core/class/html.formadmin.class.php b/htdocs/core/class/html.formadmin.class.php index 16e9a70ab56..b53d73bc757 100644 --- a/htdocs/core/class/html.formadmin.class.php +++ b/htdocs/core/class/html.formadmin.class.php @@ -114,9 +114,7 @@ class FormAdmin if ($selected == $keytouse) { $out .= ''; - } - else - { + } else { $out .= ''; } } @@ -184,9 +182,7 @@ class FormAdmin if ($file == $selected) { $menuarray[$prefix.'_'.$file] = ''; - } - else - { + } else { $menuarray[$prefix.'_'.$file] = ''; } } @@ -385,9 +381,7 @@ class FormAdmin $i++; } - } - else - { + } else { dol_print_error($this->db); return ''; } @@ -405,9 +399,7 @@ class FormAdmin if ($selected == $key) { $out .= ''; - } - else - { + } else { $out .= ''; } } diff --git a/htdocs/core/class/html.formbank.class.php b/htdocs/core/class/html.formbank.class.php index a9708a9d76d..a359bd194f7 100644 --- a/htdocs/core/class/html.formbank.class.php +++ b/htdocs/core/class/html.formbank.class.php @@ -23,6 +23,8 @@ * \brief File of class with all html predefined components */ +include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + /** * Class to manage generation of HTML components for bank module diff --git a/htdocs/core/class/html.formbarcode.class.php b/htdocs/core/class/html.formbarcode.class.php index 8c27666dfc4..104daf6de0e 100644 --- a/htdocs/core/class/html.formbarcode.class.php +++ b/htdocs/core/class/html.formbarcode.class.php @@ -176,8 +176,7 @@ class FormBarCode } $out .= ""; $out .= ajax_combobox("select_".$htmlname); - } - else { + } else { dol_print_error($this->db); } return $out; diff --git a/htdocs/core/class/html.formcategory.class.php b/htdocs/core/class/html.formcategory.class.php index 41e39cc93a2..f2f856144ff 100644 --- a/htdocs/core/class/html.formcategory.class.php +++ b/htdocs/core/class/html.formcategory.class.php @@ -32,13 +32,12 @@ class FormCategory extends Form /** * Return a HTML filter box for a list filter view * - * @param string $type The categorie type (e.g Categorie::TYPE_WAREHOUSE) - * @param Array $preSelected A list with the elements that should pre-selected - * @return string A HTML filter box (Note: selected results can get with GETPOST("search_category_".$type."_list")) + * @param string $type The categorie type (e.g Categorie::TYPE_WAREHOUSE) + * @param Array $preSelected A list with the elements that should pre-selected + * @return string A HTML filter box (Note: selected results can get with GETPOST("search_category_".$type."_list")) */ - public function getFilterBox($type, $preSelected) + public function getFilterBox($type, array $preSelected) { - // phpcs:enable global $langs; if (empty($preSelected) || !is_array($preSelected)) diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 6fb02454311..b43df3753dc 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -3,6 +3,7 @@ * Copyright (C) 2008-2012 Regis Houssin * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2017 Rui Strecht + * Copyright (C) 2020 Open-Dsi * * 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 @@ -39,7 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; class FormCompany extends Form { - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of labels (translated) of third parties type * @@ -49,7 +50,7 @@ class FormCompany extends Form */ public function typent_array($mode = 0, $filter = '') { - // phpcs:enable + // phpcs:enable global $langs, $mysoc; $effs = array(); @@ -82,7 +83,7 @@ class FormCompany extends Form return $effs; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Renvoie la liste des types d'effectifs possibles (pas de traduction car nombre) * @@ -92,7 +93,7 @@ class FormCompany extends Form */ public function effectif_array($mode = 0, $filter = '') { - // phpcs:enable + // phpcs:enable $effs = array(); $sql = "SELECT id, code, libelle"; @@ -122,7 +123,7 @@ class FormCompany extends Form } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Affiche formulaire de selection des modes de reglement * @@ -134,7 +135,7 @@ class FormCompany extends Form */ public function form_prospect_level($page, $selected = '', $htmlname = 'prospect_level_id', $empty = 0) { - // phpcs:enable + // phpcs:enable global $user, $langs; print '
'; @@ -166,19 +167,70 @@ class FormCompany extends Form } print Form::selectarray($htmlname, $options, $selected); - } - else dol_print_error($this->db); + } else dol_print_error($this->db); if (!empty($htmlname) && $user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); print ''; print '
'; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Affiche formulaire de selection des niveau de prospection pour les contacts + * + * @param int $page Page + * @param int $selected Id or code preselected + * @param string $htmlname Nom du formulaire select + * @param int $empty Add empty value in list + * @return void + */ + public function formProspectContactLevel($page, $selected = '', $htmlname = 'prospect_contact_level_id', $empty = 0) + { + global $user, $langs; + + print '
'; + print ''; + print ''; + + dol_syslog(__METHOD__, LOG_DEBUG); + $sql = "SELECT code, label"; + $sql .= " FROM " . MAIN_DB_PREFIX . "c_prospectcontactlevel"; + $sql .= " WHERE active > 0"; + $sql .= " ORDER BY sortorder"; + $resql = $this->db->query($sql); + if ($resql) + { + $options = array(); + + if ($empty) + { + $options[''] = ''; + } + + while ($obj = $this->db->fetch_object($resql)) + { + $level = $langs->trans($obj->code); + + if ($level == $obj->code) + { + $level = $langs->trans($obj->label); + } + + $options[$obj->code] = $level; + } + + print Form::selectarray($htmlname, $options, $selected); + } + else dol_print_error($this->db); + if (!empty($htmlname) && $user->admin) print ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print ''; + print '
'; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns the drop-down list of departments/provinces/cantons for all countries or for a given country. - * In the case of an all-country list, the display breaks on the country. - * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). - * Thus the links with the departments are done on a department independently of its name. + * In the case of an all-country list, the display breaks on the country. + * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). + * Thus the links with the departments are done on a department independently of its name. * * @param string $selected Code state preselected * @param int $country_codeid 0=list for all countries, otherwise country code or country rowid to show @@ -187,16 +239,16 @@ class FormCompany extends Form */ public function select_departement($selected = '', $country_codeid = 0, $htmlname = 'state_id') { - // phpcs:enable + // phpcs:enable print $this->select_state($selected, $country_codeid, $htmlname); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Returns the drop-down list of departments/provinces/cantons for all countries or for a given country. - * In the case of an all-country list, the display breaks on the country. - * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). - * Thus the links with the departments are done on a department independently of its name. + * In the case of an all-country list, the display breaks on the country. + * The key of the list is the code (there can be several entries for a given code but in this case, the country field differs). + * Thus the links with the departments are done on a department independently of its name. * * @param int $selected Code state preselected (mus be state id) * @param integer $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show @@ -206,7 +258,7 @@ class FormCompany extends Form */ public function select_state($selected = 0, $country_codeid = 0, $htmlname = 'state_id') { - // phpcs:enable + // phpcs:enable global $conf, $langs, $user; dol_syslog(get_class($this)."::select_departement selected=".$selected.", country_codeid=".$country_codeid, LOG_DEBUG); @@ -241,8 +293,7 @@ class FormCompany extends Form if ($obj->code == '0') // Le code peut etre une chaine { $out .= ''; - } - else { + } else { if (!$country || $country != $obj->country) { // Affiche la rupture si on est en mode liste multipays @@ -256,9 +307,7 @@ class FormCompany extends Form if (!empty($selected) && $selected == $obj->rowid) { $out .= ''; - } - else { + } else { if ($country == '' || $country != $obj->country) { // Show break @@ -356,9 +399,7 @@ class FormCompany extends Form if ($selected > 0 && $selected == $obj->code) { print ''; - } - else - { + } else { print ''; } } @@ -366,25 +407,24 @@ class FormCompany extends Form } } print ''; - } - else - { + } else { dol_print_error($this->db); } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return combo list with people title * * @param string $selected Civility/Title code preselected * @param string $htmlname Name of HTML select combo field * @param string $morecss Add more css on SELECT element + * @param int $addjscombo Add js combo * @return string String with HTML select */ - public function select_civility($selected = '', $htmlname = 'civility_id', $morecss = 'maxwidth100') + public function select_civility($selected = '', $htmlname = 'civility_id', $morecss = 'maxwidth150', $addjscombo = 0) { - // phpcs:enable + // phpcs:enable global $conf, $langs, $user; $langs->load("dict"); @@ -409,12 +449,10 @@ class FormCompany extends Form if ($selected == $obj->code) { $out .= ''; $i++; @@ -422,16 +460,20 @@ class FormCompany extends Form } $out .= ''; if ($user->admin) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - } - else - { + + if ($addjscombo) { + // Enhance with select2 + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname); + } + } else { dol_print_error($this->db); } return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne. * Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays. @@ -445,25 +487,25 @@ class FormCompany extends Form */ public function select_forme_juridique($selected = '', $country_codeid = 0, $filter = '') { - // phpcs:enable + // phpcs:enable print $this->select_juridicalstatus($selected, $country_codeid, $filter); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Retourne la liste deroulante des formes juridiques tous pays confondus ou pour un pays donne. * Dans le cas d'une liste tous pays confondu, on affiche une rupture sur le pays * * @param string $selected Preselected code of juridical type * @param int $country_codeid 0=list for all countries, otherwise list only country requested - * @param string $filter Add a SQL filter on list - * @param string $htmlname HTML name of select - * @param string $morecss More CSS - * @return string String with HTML select + * @param string $filter Add a SQL filter on list + * @param string $htmlname HTML name of select + * @param string $morecss More CSS + * @return string String with HTML select */ public function select_juridicalstatus($selected = '', $country_codeid = 0, $filter = '', $htmlname = 'forme_juridique_code', $morecss = '') { - // phpcs:enable + // phpcs:enable global $conf, $langs, $user; $langs->load("dict"); @@ -474,7 +516,7 @@ class FormCompany extends Form $sql .= " FROM ".MAIN_DB_PREFIX."c_forme_juridique as f, ".MAIN_DB_PREFIX."c_country as c"; $sql .= " WHERE f.fk_pays=c.rowid"; $sql .= " AND f.active = 1 AND c.active = 1"; - if ($country_codeid) $sql .= " AND c.code = '".$country_codeid."'"; + if ($country_codeid) $sql .= " AND c.code = '".$this->db->escape($country_codeid)."'"; if ($filter) $sql .= " ".$filter; $sql .= " ORDER BY c.code"; @@ -525,9 +567,7 @@ class FormCompany extends Form if ($selected > 0 && $selected == $val['code']) { $out .= ''; $firstCompany = $obj->rowid; - } - else - { + } else { print ''; @@ -705,30 +739,28 @@ class FormCompany extends Form print "\n"; print ajax_combobox($htmlname); return $firstCompany; - } - else - { + } else { dol_print_error($this->db); return 0; } } } - /** - * Return a select list with types of contacts - * - * @param object $object Object to use to find type of contact - * @param string $selected Default selected value - * @param string $htmlname HTML select name - * @param string $source Source ('internal' or 'external') - * @param string $sortorder Sort criteria ('position', 'code', ...) - * @param int $showempty 1=Add en empty line - * @param string $morecss Add more css to select component - * @return void - */ - public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '') + /** + * Return a select list with types of contacts + * + * @param object $object Object to use to find type of contact + * @param string $selected Default selected value + * @param string $htmlname HTML select name + * @param string $source Source ('internal' or 'external') + * @param string $sortorder Sort criteria ('position', 'code', ...) + * @param int $showempty 1=Add en empty line + * @param string $morecss Add more css to select component + * @return void + */ + public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '') { - global $user, $langs; + global $user, $langs; if (is_object($object) && method_exists($object, 'liste_type_contact')) { @@ -790,7 +822,7 @@ class FormCompany extends Form return 'ErrorBadValueForParameterRenderMode'; // Should not happened } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return a select list with zip codes and their town * @@ -805,7 +837,7 @@ class FormCompany extends Form */ public function select_ziptown($selected = '', $htmlname = 'zipcode', $fields = '', $fieldsize = 0, $disableautocomplete = 0, $moreattrib = '', $morecss = '') { - // phpcs:enable + // phpcs:enable global $conf; $out = ''; @@ -823,158 +855,155 @@ class FormCompany extends Form return $out; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...) - * - * @param int $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm) - * @param string $htmlname Name of HTML select - * @param string $preselected Default value to show - * @param string $country_code FR, IT, ... - * @param string $morecss More css - * @return string HTML string with prof id - */ - public function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth100onsmartphone quatrevingtpercent') - { - // phpcs:enable - global $conf, $langs, $hookmanager; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...) + * + * @param int $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm) + * @param string $htmlname Name of HTML select + * @param string $preselected Default value to show + * @param string $country_code FR, IT, ... + * @param string $morecss More css + * @return string HTML string with prof id + */ + public function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth100onsmartphone quatrevingtpercent') + { + // phpcs:enable + global $conf, $langs, $hookmanager; - $formlength = 0; - if (empty($conf->global->MAIN_DISABLEPROFIDRULES)) { - if ($country_code == 'FR') - { - if (isset($idprof)) { - if ($idprof == 1) $formlength = 9; - elseif ($idprof == 2) $formlength = 14; - elseif ($idprof == 3) $formlength = 5; // 4 chiffres et 1 lettre depuis janvier - elseif ($idprof == 4) $formlength = 32; // No maximum as we need to include a town name in this id - } - } - elseif ($country_code == 'ES') - { - if ($idprof == 1) $formlength = 9; //CIF/NIF/NIE 9 digits - if ($idprof == 2) $formlength = 12; //NASS 12 digits without / - if ($idprof == 3) $formlength = 5; //CNAE 5 digits - if ($idprof == 4) $formlength = 32; //depend of college - } - } + $formlength = 0; + if (empty($conf->global->MAIN_DISABLEPROFIDRULES)) { + if ($country_code == 'FR') + { + if (isset($idprof)) { + if ($idprof == 1) $formlength = 9; + elseif ($idprof == 2) $formlength = 14; + elseif ($idprof == 3) $formlength = 5; // 4 chiffres et 1 lettre depuis janvier + elseif ($idprof == 4) $formlength = 32; // No maximum as we need to include a town name in this id + } + } elseif ($country_code == 'ES') + { + if ($idprof == 1) $formlength = 9; //CIF/NIF/NIE 9 digits + if ($idprof == 2) $formlength = 12; //NASS 12 digits without / + if ($idprof == 3) $formlength = 5; //CNAE 5 digits + if ($idprof == 4) $formlength = 32; //depend of college + } + } - $selected = $preselected; - if (!$selected && isset($idprof)) { - if ($idprof == 1 && !empty($this->idprof1)) $selected = $this->idprof1; - elseif ($idprof == 2 && !empty($this->idprof2)) $selected = $this->idprof2; - elseif ($idprof == 3 && !empty($this->idprof3)) $selected = $this->idprof3; - elseif ($idprof == 4 && !empty($this->idprof4)) $selected = $this->idprof4; - } + $selected = $preselected; + if (!$selected && isset($idprof)) { + if ($idprof == 1 && !empty($this->idprof1)) $selected = $this->idprof1; + elseif ($idprof == 2 && !empty($this->idprof2)) $selected = $this->idprof2; + elseif ($idprof == 3 && !empty($this->idprof3)) $selected = $this->idprof3; + elseif ($idprof == 4 && !empty($this->idprof4)) $selected = $this->idprof4; + } - $maxlength = $formlength; - if (empty($formlength)) { $formlength = 24; $maxlength = 128; } + $maxlength = $formlength; + if (empty($formlength)) { $formlength = 24; $maxlength = 128; } - $out = ''; + $out = ''; - // Execute hook getInputIdProf to complete or replace $out - $parameters = array('formlength'=>$formlength, 'selected'=>$preselected, 'idprof'=>$idprof, 'htmlname'=>$htmlname, 'country_code'=>$country_code); - $reshook = $hookmanager->executeHooks('getInputIdProf', $parameters); - if (empty($reshook)) - { - $out .= ''; - } - $out .= $hookmanager->resPrint; + // Execute hook getInputIdProf to complete or replace $out + $parameters = array('formlength'=>$formlength, 'selected'=>$preselected, 'idprof'=>$idprof, 'htmlname'=>$htmlname, 'country_code'=>$country_code); + $reshook = $hookmanager->executeHooks('getInputIdProf', $parameters); + if (empty($reshook)) + { + $out .= ''; + } + $out .= $hookmanager->resPrint; - return $out; - } + return $out; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return a HTML select with localtax values for thirdparties - * - * @param int $local LocalTax - * @param int $selected Preselected value - * @param string $htmlname HTML select name - * @return void - */ - public function select_localtax($local, $selected, $htmlname) - { - // phpcs:enable - $tax = get_localtax_by_third($local); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return a HTML select with localtax values for thirdparties + * + * @param int $local LocalTax + * @param int $selected Preselected value + * @param string $htmlname HTML select name + * @return void + */ + public function select_localtax($local, $selected, $htmlname) + { + // phpcs:enable + $tax = get_localtax_by_third($local); - $num = $this->db->num_rows($tax); - $i = 0; - if ($num) - { - $valors = explode(":", $tax); + $num = $this->db->num_rows($tax); + $i = 0; + if ($num) + { + $valors = explode(":", $tax); - if (count($valors) > 1) - { - //montar select - print ''; - } - } - } + if (count($valors) > 1) + { + //montar select + print ''; + } + } + } - /** - * Return a HTML select for thirdparty type - * - * @param int $selected selected value - * @param string $htmlname HTML select name - * @param string $htmlidname HTML select id - * @param string $typeinput HTML output - * @param string $morecss More css - * @return string HTML string - */ - public function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname = 'customerprospect', $typeinput = 'form', $morecss = '') - { + /** + * Return a HTML select for thirdparty type + * + * @param int $selected selected value + * @param string $htmlname HTML select name + * @param string $htmlidname HTML select id + * @param string $typeinput HTML output + * @param string $morecss More css + * @return string HTML string + */ + public function selectProspectCustomerType($selected, $htmlname = 'client', $htmlidname = 'customerprospect', $typeinput = 'form', $morecss = '') + { - global $conf, $langs; + global $conf, $langs; - $out = ''; + $out = ''; - return $out; - } + return $out; + } } diff --git a/htdocs/core/class/html.formcontract.class.php b/htdocs/core/class/html.formcontract.class.php index 2235ac6b335..b2e32b8c063 100644 --- a/htdocs/core/class/html.formcontract.class.php +++ b/htdocs/core/class/html.formcontract.class.php @@ -58,9 +58,10 @@ class FormContract * @param string $htmlname Nom de la zone html * @param int $maxlength Maximum length of label * @param int $showempty Show empty line + * @param int $showRef Show customer and supplier reference on each contract (when found) * @return int Nbr of project if OK, <0 if KO */ - public function select_contract($socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1) + public function select_contract($socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1, $showRef = 0) { // phpcs:enable global $db, $user, $conf, $langs; @@ -69,7 +70,8 @@ class FormContract if (!empty($conf->global->CONTRACT_HIDE_UNSELECTABLES)) $hideunselectables = true; // Search all contacts - $sql = 'SELECT c.rowid, c.ref, c.fk_soc, c.statut'; + $sql = 'SELECT c.rowid, c.ref, c.fk_soc, c.statut,'; + $sql .= ' c.ref_customer, c.ref_supplier'; $sql .= ' FROM '.MAIN_DB_PREFIX.'contrat as c'; $sql .= " WHERE c.entity = ".$conf->entity; //if ($contratListId) $sql.= " AND c.rowid IN (".$contratListId.")"; @@ -87,34 +89,37 @@ class FormContract $sql .= " ORDER BY c.ref "; dol_syslog(get_class($this)."::select_contract", LOG_DEBUG); - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { print ''; - $db->free($resql); + $this->db->free($resql); if (!empty($conf->use_javascript_ajax)) { @@ -157,10 +160,8 @@ class FormContract } return $num; - } - else - { - dol_print_error($db); + } else { + dol_print_error($this->db); return -1; } } @@ -174,9 +175,10 @@ class FormContract * @param string $htmlname Nom de la zone html * @param int $maxlength Maximum length of label * @param int $showempty Show empty line + * @param int $showRef Show customer and supplier reference on each contract (when found) * @return int Nbr of project if OK, <0 if KO */ - public function formSelectContract($page, $socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1) + public function formSelectContract($page, $socid = -1, $selected = '', $htmlname = 'contrattid', $maxlength = 16, $showempty = 1, $showRef = 0) { global $langs; @@ -184,7 +186,7 @@ class FormContract print '
'; print ''; print ''; - $this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty); + $this->select_contract($socid, $selected, $htmlname, $maxlength, $showempty, $showRef); print ''; print '
'; } diff --git a/htdocs/core/class/html.formexpensereport.class.php b/htdocs/core/class/html.formexpensereport.class.php new file mode 100644 index 00000000000..e8079b77ed6 --- /dev/null +++ b/htdocs/core/class/html.formexpensereport.class.php @@ -0,0 +1,136 @@ + + * + * 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 . + * or see https://www.gnu.org/ + */ + +/** + * \file htdocs/core/class/html.formexpensereport.class.php + * \ingroup core + * \brief File of class with all html predefined components + */ + +/** + * Class to manage generation of HTML components for contract module + */ +class FormExpenseReport +{ + /** + * @var DoliDB Database handler. + */ + public $db; + + /** + * @var string Error code (or message) + */ + public $error = ''; + + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } + + + /** + * Retourne la liste deroulante des differents etats d'une note de frais. + * Les valeurs de la liste sont les id de la table c_expensereport_statuts + * + * @param int $selected preselect status + * @param string $htmlname Name of HTML select + * @param int $useempty 1=Add empty line + * @param int $useshortlabel Use short labels + * @return string HTML select with status + */ + public function selectExpensereportStatus($selected = '', $htmlname = 'fk_statut', $useempty = 1, $useshortlabel = 0) + { + global $langs; + + $tmpep = new ExpenseReport($this->db); + + print ''; + } + + /** + * Return list of types of notes with select value = id + * + * @param int $selected Preselected type + * @param string $htmlname Name of field in form + * @param int $showempty Add an empty field + * @param int $active 1=Active only, 0=Unactive only, -1=All + * @return string Select html + */ + public function selectTypeExpenseReport($selected = '', $htmlname = 'type', $showempty = 0, $active = 1) + { + // phpcs:enable + global $langs, $user; + $langs->load("trips"); + + $out = ''; + + $out .= ''; + $out .= ajax_combobox($htmlname); + + return $out; + } +} diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 46e85707497..464dbafa375 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -58,7 +58,7 @@ class FormFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show form to upload a new file. * @@ -70,8 +70,8 @@ class FormFile * @param int $size Length of input file area. Deprecated. * @param Object $object Object to use (when attachment is done on an element) * @param string $options Add an option column - * @param integer $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). - * Deprecated 2 should never be used and if 1 is used, option should no be enabled. + * @param integer $useajax Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). + * Deprecated 2 should never be used and if 1 is used, option should no be enabled. * @param string $savingdocmask Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__' * @param integer $linkfiles 1=Also add form to link files, 0=Do not show form to link files * @param string $htmlname Name and id of HTML form ('formuserfile' by default, 'formuserfileecm' when used to upload a file in ECM) @@ -83,14 +83,14 @@ class FormFile */ public function form_attach_new_file($url, $title = '', $addcancel = 0, $sectionid = 0, $perm = 1, $size = 50, $object = '', $options = '', $useajax = 1, $savingdocmask = '', $linkfiles = 1, $htmlname = 'formuserfile', $accept = '', $sectiondir = '', $usewithoutform = 0, $capture = 0) { - // phpcs:enable + // phpcs:enable global $conf, $langs, $hookmanager; $hookmanager->initHooks(array('formfile')); - // Deprecation warning - if ($useajax == 2) { - dol_syslog(__METHOD__.": using 2 for useajax is deprecated and should be not used", LOG_WARNING); - } + // Deprecation warning + if ($useajax == 2) { + dol_syslog(__METHOD__.": using 2 for useajax is deprecated and should be not used", LOG_WARNING); + } if (!empty($conf->browser->layout) && $conf->browser->layout != 'classic') $useajax = 0; @@ -101,9 +101,7 @@ class FormFile // TODO: This does not support option savingdocmask // TODO: This break feature to upload links too return $this->_formAjaxFileUpload($object); - } - else - { + } else { //If there is no permission and the option to hide unauthorized actions is enabled, then nothing is printed if (!$perm && !empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { return 1; @@ -116,15 +114,18 @@ class FormFile if (empty($usewithoutform)) // Try to avoid this and set instead the form by the caller. { - $out .= '
'; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; + // Add a param as GET parameter to detect when POST were cleaned by PHP because a file larger than post_max_size + $url .= (strpos($url, '?') === false ? '?' : '&').'uploadform=1'; + + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; } - $out .= ''; + $out .= '
'; $out .= ''; if (!empty($options)) $out .= ''; @@ -197,32 +198,33 @@ class FormFile $out .= ' '; $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphptoshow), 1); } - } - else - { + } else { $out .= ' ('.$langs->trans("UploadDisabled").')'; } $out .= ""; if ($savingdocmask) - { - //add a global variable for disable the auto renaming on upload - $rename = (empty($conf->global->MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT) ? 'checked' : ''); + { + //add a global variable for disable the auto renaming on upload + $rename = (empty($conf->global->MAIN_DOC_UPLOAD_NOT_RENAME_BY_DEFAULT) ? 'checked' : ''); - $out .= ''; - if (!empty($options)) $out .= ''; - $out .= ''; - $out .= ''; - } + $out .= ''; + if (!empty($options)) $out .= ''; + $out .= ''; + $out .= ''; + } $out .= "
'.$options.'
'.$options.''; - $out .= ' '.$langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/', $langs->transnoentitiesnoconv("OriginFileName"), $savingdocmask), $langs->transnoentitiesnoconv("OriginFileName")); - $out .= '
'.$options.''; + $out .= ' '; + $out .= ''; + $out .= $langs->trans("SaveUploadedFileWithMask", preg_replace('/__file__/', $langs->transnoentitiesnoconv("OriginFileName"), $savingdocmask), $langs->transnoentitiesnoconv("OriginFileName")); + $out .= ''; + $out .= '
"; if (empty($usewithoutform)) { - $out .= '
'; - if (empty($sectionid)) $out .= '
'; + $out .= ''; + if (empty($sectionid)) $out .= '
'; } $out .= "\n\n"; @@ -236,10 +238,10 @@ class FormFile if (empty($usewithoutform)) { - $out .= '
'; + $out .= '
'; + $out .= '
'; } $out .= "\n\n"; @@ -272,7 +274,7 @@ class FormFile $res = $hookmanager->executeHooks('formattachOptions', $parameters, $object); if (empty($res)) { - print '
'; + print '
'; print $out; print '
'; } @@ -282,7 +284,7 @@ class FormFile } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show the box with list of available documents for object * @@ -307,7 +309,7 @@ class FormFile */ public function show_documents($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed = 0, $modelselected = '', $allowgenifempty = 1, $forcenomultilang = 0, $iconPDF = 0, $notused = 0, $noform = 0, $param = '', $title = '', $buttonlabel = '', $codelang = '') { - // phpcs:enable + // phpcs:enable $this->numoffiles = 0; print $this->showdocuments($modulepart, $modulesubdir, $filedir, $urlsource, $genallowed, $delallowed, $modelselected, $allowgenifempty, $forcenomultilang, $iconPDF, $notused, $noform, $param, $title, $buttonlabel, $codelang); return $this->numoffiles; @@ -425,262 +427,206 @@ class FormFile { $showempty = 1; if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'; $modellist = ModeleThirdPartyDoc::liste_modeles($this->db); } - } - elseif ($modulepart == 'propal') + } elseif ($modulepart == 'propal') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/propale/modules_propale.php'; $modellist = ModelePDFPropales::liste_modeles($this->db); } - } - elseif ($modulepart == 'supplier_proposal') + } elseif ($modulepart == 'supplier_proposal') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_proposal/modules_supplier_proposal.php'; $modellist = ModelePDFSupplierProposal::liste_modeles($this->db); } - } - elseif ($modulepart == 'commande') + } elseif ($modulepart == 'commande') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/commande/modules_commande.php'; $modellist = ModelePDFCommandes::liste_modeles($this->db); } - } - elseif ($modulepart == 'expedition') + } elseif ($modulepart == 'expedition') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/expedition/modules_expedition.php'; $modellist = ModelePDFExpedition::liste_modeles($this->db); } - } - elseif ($modulepart == 'reception') - { - if (is_array($genallowed)) $modellist = $genallowed; - else - { + } elseif ($modulepart == 'reception') + { + if (is_array($genallowed)) $modellist = $genallowed; + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/reception/modules_reception.php'; $modellist = ModelePdfReception::liste_modeles($this->db); } - } - elseif ($modulepart == 'livraison') + } elseif ($modulepart == 'livraison') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/livraison/modules_livraison.php'; $modellist = ModelePDFDeliveryOrder::liste_modeles($this->db); } - } - elseif ($modulepart == 'ficheinter') + } elseif ($modulepart == 'ficheinter') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/fichinter/modules_fichinter.php'; $modellist = ModelePDFFicheinter::liste_modeles($this->db); } - } - elseif ($modulepart == 'facture') + } elseif ($modulepart == 'facture') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/facture/modules_facture.php'; $modellist = ModelePDFFactures::liste_modeles($this->db); } - } - elseif ($modulepart == 'contract') + } elseif ($modulepart == 'contract') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/contract/modules_contract.php'; $modellist = ModelePDFContract::liste_modeles($this->db); } - } - elseif ($modulepart == 'project') + } elseif ($modulepart == 'project') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/project/modules_project.php'; $modellist = ModelePDFProjects::liste_modeles($this->db); } - } - elseif ($modulepart == 'project_task') + } elseif ($modulepart == 'project_task') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/project/task/modules_task.php'; $modellist = ModelePDFTask::liste_modeles($this->db); } - } - elseif ($modulepart == 'product') + } elseif ($modulepart == 'product') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/product/modules_product.class.php'; $modellist = ModelePDFProduct::liste_modeles($this->db); } - } - elseif ($modulepart == 'product_batch') + } elseif ($modulepart == 'product_batch') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/product_batch/modules_product_batch.class.php'; $modellist = ModelePDFProductBatch::liste_modeles($this->db); } - } - elseif ($modulepart == 'stock') + } elseif ($modulepart == 'stock') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_stock.php'; $modellist = ModelePDFStock::liste_modeles($this->db); } - } - elseif ($modulepart == 'movement') + } elseif ($modulepart == 'movement') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/stock/modules_movement.php'; $modellist = ModelePDFMovement::liste_modeles($this->db); } - } - elseif ($modulepart == 'export') + } elseif ($modulepart == 'export') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; $modellist = ModeleExports::liste_modeles($this->db); } - } - elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') + } elseif ($modulepart == 'commande_fournisseur' || $modulepart == 'supplier_order') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_order/modules_commandefournisseur.php'; $modellist = ModelePDFSuppliersOrders::liste_modeles($this->db); } - } - elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') + } elseif ($modulepart == 'facture_fournisseur' || $modulepart == 'supplier_invoice') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php'; $modellist = ModelePDFSuppliersInvoices::liste_modeles($this->db); } - } - elseif ($modulepart == 'supplier_payment') + } elseif ($modulepart == 'supplier_payment') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php'; $modellist = ModelePDFSuppliersPayments::liste_modeles($this->db); } - } - elseif ($modulepart == 'remisecheque') + } elseif ($modulepart == 'remisecheque') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/cheque/modules_chequereceipts.php'; $modellist = ModeleChequeReceipts::liste_modeles($this->db); } - } - elseif ($modulepart == 'donation') + } elseif ($modulepart == 'donation') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/dons/modules_don.php'; $modellist = ModeleDon::liste_modeles($this->db); } - } - elseif ($modulepart == 'member') + } elseif ($modulepart == 'member') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/member/modules_cards.php'; $modellist = ModelePDFCards::liste_modeles($this->db); } - } - elseif ($modulepart == 'agenda' || $modulepart == 'actions') + } elseif ($modulepart == 'agenda' || $modulepart == 'actions') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/action/modules_action.php'; $modellist = ModeleAction::liste_modeles($this->db); } - } - elseif ($modulepart == 'expensereport') + } elseif ($modulepart == 'expensereport') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/expensereport/modules_expensereport.php'; $modellist = ModeleExpenseReport::liste_modeles($this->db); } - } - elseif ($modulepart == 'unpaid') + } elseif ($modulepart == 'unpaid') { $modellist = ''; - } - elseif ($modulepart == 'user') + } elseif ($modulepart == 'user') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/user/modules_user.class.php'; $modellist = ModelePDFUser::liste_modeles($this->db); } - } - elseif ($modulepart == 'usergroup') + } elseif ($modulepart == 'usergroup') { if (is_array($genallowed)) $modellist = $genallowed; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/core/modules/usergroup/modules_usergroup.class.php'; $modellist = ModelePDFUserGroup::liste_modeles($this->db); } - } - else - { - $submodulepart = $modulepart; + } else { + $submodulepart = $modulepart; - // modulepart = 'nameofmodule' or 'nameofmodule:NameOfObject' - $tmp = explode(':', $modulepart); - if (!empty($tmp[1])) { - $modulepart = $tmp[0]; - $submodulepart = $tmp[1]; - } + // modulepart = 'nameofmodule' or 'nameofmodule:NameOfObject' + $tmp = explode(':', $modulepart); + if (!empty($tmp[1])) { + $modulepart = $tmp[0]; + $submodulepart = $tmp[1]; + } - // For normalized standard modules + // For normalized standard modules $file = dol_buildpath('/core/modules/'.$modulepart.'/modules_'.strtolower($submodulepart).'.php', 0); if (file_exists($file)) { @@ -688,7 +634,7 @@ class FormFile } // For normalized external modules. else { - $file = dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.strtolower($submodulepart).'.php', 0); + $file = dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.strtolower($submodulepart).'.php', 0); $res = include_once $file; } @@ -697,9 +643,7 @@ class FormFile if (class_exists($class)) { $modellist = call_user_func($class.'::liste_modeles', $this->db); - } - else - { + } else { dol_print_error($this->db, "Bad value for modulepart '".$modulepart."' in showdocuments"); return -1; } @@ -743,9 +687,7 @@ class FormFile { $out .= ajax_combobox('model'); } - } - else - { + } else { $out .= '
'.$langs->trans("Files").'
'; } @@ -758,9 +700,7 @@ class FormFile $morecss = 'maxwidth150'; if ($conf->browser->layout == 'phone') $morecss = 'maxwidth100'; $out .= $formadmin->select_language($defaultlang, 'lang_id', 0, null, 0, 0, 0, $morecss); - } - else - { + } else { $out .= ' '; } @@ -896,9 +836,7 @@ class FormFile { $out .= $hookmanager->resPrint; // Complete line $out .= ''; - } - else - { + } else { $out = $hookmanager->resPrint; // Replace all $out } } @@ -984,9 +922,7 @@ class FormFile if (!empty($conf->global->MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP)) { $filterforfilesearch = preg_quote(basename($modulesubdir), '/'); - } - else - { + } else { $filterforfilesearch = preg_quote(basename($modulesubdir), '/').'[^\-]+'; } $file_list = dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // We also discard .meta and .png preview @@ -1053,9 +989,7 @@ class FormFile '; if (!$found) $out = ''; - } - else - { + } else { // TODO Add link to regenerate doc ? //$out.= '
'.img_picto('', 'refresh').'
'."\n"; } @@ -1064,7 +998,7 @@ class FormFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show list of documents in $filearray (may be they are all in same directory but may not) * This also sync database if $upload_dir is defined. @@ -1099,7 +1033,7 @@ class FormFile */ public function list_of_documents($filearray, $object, $modulepart, $param = '', $forcedownload = 0, $relativepath = '', $permonobject = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $title = '', $url = '', $showrelpart = 0, $permtoeditline = -1, $upload_dir = '', $sortfield = '', $sortorder = 'ASC', $disablemove = 1, $addfilterfields = 0, $disablecrop = -1) { - // phpcs:enable + // phpcs:enable global $user, $conf, $langs, $hookmanager; global $sortfield, $sortorder, $maxheightmini; global $dolibarr_main_url_root; @@ -1121,7 +1055,7 @@ class FormFile // For backward compatiblity, we detect file stored into an old path if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO) && $filearray[0]['level1name'] == 'photos') { - $relativepath = preg_replace('/^.*\/produit\//', '', $filearray[0]['path']).'/'; + $relativepath = preg_replace('/^.*\/produit\//', '', $filearray[0]['path']).'/'; } // Defined relative dir to DOL_DATA_ROOT $relativedir = ''; @@ -1153,9 +1087,7 @@ class FormFile if (isset($reshook) && $reshook != '') // null or '' for bypass { return $reshook; - } - else - { + } else { if (!is_object($form)) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; // The compoent may be included into ajax page that does not include the Form class @@ -1276,11 +1208,9 @@ class FormFile print ''; print ''; $editline = 1; - } - else - { + } else { $filenametoshow = preg_replace('/\.noexe$/', '', $file['name']); - print dol_trunc($filenametoshow, 200); + print dol_escape_htmltag(dol_trunc($filenametoshow, 200)); print ''; } // Preview link @@ -1309,15 +1239,13 @@ class FormFile print ''; if (image_format_supported($file['name']) >= 0) { - if ($useinecm == 5 || $useinecm == 6) - { - $smallfile = getImageFileNameForSize($file['name'], ''); // There is no thumb for ECM module and Media filemanager, so we use true image. TODO Change this it is slow on image dir. - } - else - { - $smallfile = getImageFileNameForSize($file['name'], '_small'); // For new thumbs using same ext (in lower case however) than original - } - if (!dol_is_file($file['path'].'/'.$smallfile)) $smallfile = getImageFileNameForSize($file['name'], '_small', '.png'); // For backward compatibility of old thumbs that were created with filename in lower case and with .png extension + if ($useinecm == 5 || $useinecm == 6) + { + $smallfile = getImageFileNameForSize($file['name'], ''); // There is no thumb for ECM module and Media filemanager, so we use true image. TODO Change this it is slow on image dir. + } else { + $smallfile = getImageFileNameForSize($file['name'], '_small'); // For new thumbs using same ext (in lower case however) than original + } + if (!dol_is_file($file['path'].'/'.$smallfile)) $smallfile = getImageFileNameForSize($file['name'], '_small', '.png'); // For backward compatibility of old thumbs that were created with filename in lower case and with .png extension //print $file['path'].'/'.$smallfile.'
'; $urlforhref = getAdvancedPreviewUrl($modulepart, $relativepath.$fileinfo['filename'].'.'.strtolower($fileinfo['extension']), 1, '&entity='.(!empty($object->entity) ? $object->entity : $conf->entity)); @@ -1327,10 +1255,9 @@ class FormFile } else { print ''; } - print ''; + print ''; print ''; - } - else print ' '; + } else print ' '; print ''; } @@ -1342,9 +1269,7 @@ class FormFile { print $langs->trans("FileSharedViaALink").' '; print ' '; - } - else - { + } else { if ($file['share']) { // Define $urlwithroot @@ -1362,9 +1287,7 @@ class FormFile print img_picto($langs->trans("FileSharedViaALink"), 'globe').' '; print ''; - } - else - { + } else { //print ''.$langs->trans("FileNotShared").''; } } @@ -1417,7 +1340,7 @@ class FormFile if (!empty($conf->dol_use_jmobile)) $useajax = 0; if (empty($conf->use_javascript_ajax)) $useajax = 0; if (!empty($conf->global->MAIN_ECM_DISABLE_JS)) $useajax = 0; - print ''.img_delete().''; + print ''.img_delete().''; } print ""; @@ -1432,15 +1355,12 @@ class FormFile print 'id.'">'.img_down('default', 0, 'imgdownforline').''; } print ''; - } - else { + } else { print 'browser->layout != 'phone' && empty($disablemove)) ? ' class="linecolmove tdlineupdown center"' : ' class="linecolmove center"').'>'; print ''; } - } - } - else - { + } + } else { print ''; print ''; print ''; @@ -1484,7 +1404,7 @@ class FormFile } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Show list of documents in a directory * @@ -1505,7 +1425,7 @@ class FormFile */ public function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload = 0, $relativepath = '', $permissiontodelete = 1, $useinecm = 0, $textifempty = '', $maxlength = 0, $url = '', $addfilterfields = 0) { - // phpcs:enable + // phpcs:enable global $user, $conf, $langs, $form; global $sortfield, $sortorder; global $search_doc_ref; @@ -1556,81 +1476,74 @@ class FormFile { include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; $object_instance = new Societe($this->db); - } - elseif ($modulepart == 'invoice') + } elseif ($modulepart == 'invoice') { include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $object_instance = new Facture($this->db); - } - elseif ($modulepart == 'invoice_supplier') + } elseif ($modulepart == 'invoice_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; $object_instance = new FactureFournisseur($this->db); - } - elseif ($modulepart == 'propal') + } elseif ($modulepart == 'propal') { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $object_instance = new Propal($this->db); - } - elseif ($modulepart == 'supplier_proposal') + } elseif ($modulepart == 'supplier_proposal') { include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; $object_instance = new SupplierProposal($this->db); - } - elseif ($modulepart == 'order') + } elseif ($modulepart == 'order') { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $object_instance = new Commande($this->db); - } - elseif ($modulepart == 'order_supplier') + } elseif ($modulepart == 'order_supplier') { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; $object_instance = new CommandeFournisseur($this->db); - } - elseif ($modulepart == 'contract') + } elseif ($modulepart == 'contract') { include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; $object_instance = new Contrat($this->db); - } - elseif ($modulepart == 'product') + } elseif ($modulepart == 'product') { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $object_instance = new Product($this->db); - } - elseif ($modulepart == 'tax') + } elseif ($modulepart == 'tax') { include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; $object_instance = new ChargeSociales($this->db); - } - elseif ($modulepart == 'project') + } elseif ($modulepart == 'project') { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; $object_instance = new Project($this->db); - } - elseif ($modulepart == 'fichinter') + } elseif ($modulepart == 'fichinter') { include_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; $object_instance = new Fichinter($this->db); - } - elseif ($modulepart == 'user') + } elseif ($modulepart == 'user') { include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; $object_instance = new User($this->db); - } - elseif ($modulepart == 'expensereport') + } elseif ($modulepart == 'expensereport') { include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; $object_instance = new ExpenseReport($this->db); - } - elseif ($modulepart == 'holiday') + } elseif ($modulepart == 'holiday') { include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; $object_instance = new Holiday($this->db); - } - elseif ($modulepart == 'banque') + } elseif ($modulepart == 'recruitment-recruitmentcandidature') { - include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - $object_instance = new Account($this->db); + include_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; + $object_instance = new RecruitmentCandidature($this->db); + } elseif ($modulepart == 'banque') + { + include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $object_instance = new Account($this->db); + } elseif ($modulepart == 'mrp-mo') + { + include_once DOL_DOCUMENT_ROOT.'/mrp/class/mo.class.php'; + $object_instance = new Mo($this->db); } foreach ($filearray as $key => $file) @@ -1647,16 +1560,27 @@ class FormFile $id = 0; $ref = ''; $label = ''; // To show ref or specific information according to view to show (defined by $module) + $reg = array(); if ($modulepart == 'company' || $modulepart == 'tax') { preg_match('/(\d+)\/[^\/]+$/', $relativefile, $reg); $id = (isset($reg[1]) ? $reg[1] : ''); } elseif ($modulepart == 'invoice_supplier') { preg_match('/([^\/]+)\/[^\/]+$/', $relativefile, $reg); $ref = (isset($reg[1]) ? $reg[1] : ''); if (is_numeric($ref)) { $id = $ref; $ref = ''; } } // $ref may be also id with old supplier invoices elseif ($modulepart == 'user' || $modulepart == 'holiday') { preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $id = (isset($reg[1]) ? $reg[1] : ''); } - elseif (in_array($modulepart, array('invoice', 'propal', 'supplier_proposal', 'order', 'order_supplier', 'contract', 'product', 'project', 'fichinter', 'expensereport', 'banque'))) - { + elseif (in_array($modulepart, array( + 'invoice', + 'propal', + 'supplier_proposal', + 'order', + 'order_supplier', + 'contract', + 'product', + 'project', + 'fichinter', + 'expensereport', + 'recruitment-recruitmentcandidature', + 'mrp-mo', + 'banque'))) { preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = (isset($reg[1]) ? $reg[1] : ''); - } - else - { - //print 'Error: Value for modulepart = '.$modulepart.' is not yet implemented in function list_of_autoecmfiles'."\n"; + } else { + //print 'Error: Value for modulepart = '.$modulepart.' is not yet implemented in function list_of_autoecmfiles'."\n"; } if (!$id && !$ref) continue; @@ -1664,9 +1588,7 @@ class FormFile if (!empty($this->cache_objects[$modulepart.'_'.$id.'_'.$ref])) { $found = 1; - } - else - { + } else { //print 'Fetch '.$id." - ".$ref.'
'; if ($id) { @@ -1726,7 +1648,7 @@ class FormFile //if ($forcedownload) print '&attachment=1'; //print '&file='.urlencode($relativefile).'">'; //print img_view().'   '; - //if ($permissiontodelete) print ''.img_delete().''; + //if ($permissiontodelete) print ''.img_delete().''; //else print ' '; print "\n"; } @@ -1817,7 +1739,7 @@ class FormFile print ''; print ''; - print_liste_field_titre( + print_liste_field_titre( $langs->trans("Links"), $_SERVER['PHP_SELF'], "name", @@ -1826,20 +1748,20 @@ class FormFile '', $sortfield, $sortorder, - '' + '' ); - print_liste_field_titre( + print_liste_field_titre( "", "", "", "", "", '', - '', - '', - 'right ' + '', + '', + 'right ' ); - print_liste_field_titre( + print_liste_field_titre( $langs->trans("Date"), $_SERVER['PHP_SELF'], "date", @@ -1848,18 +1770,18 @@ class FormFile '', $sortfield, $sortorder, - 'center ' + 'center ' ); - print_liste_field_titre( + print_liste_field_titre( '', $_SERVER['PHP_SELF'], "", "", $param, '', - '', - '', - 'center ' + '', + '', + 'center ' ); print_liste_field_titre('', '', ''); print ''; @@ -1887,9 +1809,7 @@ class FormFile print ''; print ''; print ''; - } - else - { + } else { print '
'; print img_picto('', 'globe').' '; print ''; @@ -1902,7 +1822,7 @@ class FormFile print ''; print ''.img_edit().''; // id= is included into $param if ($permissiontodelete) { - print '   '.img_delete().''; // id= is included into $param + print '   '.img_delete().''; // id= is included into $param } else { print ' '; } @@ -1950,8 +1870,7 @@ class FormFile { //$out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail'); $out .= ''; - } - else $out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']); + } else $out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']); $out .= ''; } } diff --git a/htdocs/core/class/html.formintervention.class.php b/htdocs/core/class/html.formintervention.class.php index 32a3488b939..dccbe50333a 100644 --- a/htdocs/core/class/html.formintervention.class.php +++ b/htdocs/core/class/html.formintervention.class.php @@ -80,32 +80,28 @@ class FormIntervention } dol_syslog(get_class($this)."::select_intervention", LOG_DEBUG); - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { $out .= ''."\n"; + if (is_array($value)) { + $out .= "\n"; + } else { + $out .= ''."\n"; + } } $modelmail_array = array(); @@ -434,9 +440,7 @@ class FormMail extends Form if (preg_match('/\((.*)\)/', $line->label, $reg)) { $modelmail_array[$line->id] = $langs->trans($reg[1]); // langs->trans when label is __(xxx)__ - } - else - { + } else { $modelmail_array[$line->id] = $line->label; } if ($line->lang) $modelmail_array[$line->id] .= ' ('.$line->lang.')'; @@ -459,8 +463,8 @@ class FormMail extends Form } elseif (!empty($this->param['models']) && in_array($this->param['models'], array( 'propal_send', 'order_send', 'facture_send', 'shipping_send', 'fichinter_send', 'supplier_proposal_send', 'order_supplier_send', - 'invoice_supplier_send', 'thirdparty', 'contract', 'user', 'all' - ))) + 'invoice_supplier_send', 'thirdparty', 'contract', 'user', 'recruitmentcandidature_send', 'all' + ))) { // If list of template is empty $out .= '
'."\n"; @@ -470,10 +474,11 @@ class FormMail extends Form $out .= ''; $out .= '   '; $out .= '
'; + } else { + $out .= ''; } - $out .= ''."\n"; // Substitution array/string @@ -481,7 +486,7 @@ class FormMail extends Form if (is_array($this->substit) && count($this->substit)) $helpforsubstitution .= $langs->trans('AvailableVariables').' :
'."\n"; foreach ($this->substit as $key => $val) { - $helpforsubstitution .= $key.' -> '.$langs->trans(dol_string_nohtmltag($val)).'
'; + $helpforsubstitution .= $key.' -> '.$langs->trans(dol_string_nohtmltag(dolGetFirstLineOfText($val))).'
'; } if (!empty($this->withsubstit)) // Unset or set ->withsubstit=0 to disable this. { @@ -519,9 +524,7 @@ class FormMail extends Form if ($this->frommail) { $out .= ' <'.$this->frommail.'>'; - } - else - { + } else { if ($this->fromtype) { $langs->load('errors'); @@ -536,9 +539,7 @@ class FormMail extends Form { $langs->load('errors'); $liste['user'] = $user->getFullName($langs).' <'.$langs->trans('ErrorNoMailDefinedForThisUser').'>'; - } - else - { + } else { $liste['user'] = $user->getFullName($langs).' <'.$user->email.'>'; } @@ -579,8 +580,7 @@ class FormMail extends Form } $i++; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); foreach ($listaliases as $typealias => $listalias) { @@ -615,9 +615,7 @@ class FormMail extends Form } $out .= "\n"; - } - else - { + } else { $out .= ''; if ($conf->global->MARGIN_TYPE == "1") print ''; - else - print ''; + else print ''; print ''; if (!empty($conf->global->DISPLAY_MARGIN_RATES)) print ''; diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index 726ea5feb78..ba2406f4b70 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -38,723 +38,693 @@ */ class FormOther { - private $db; + private $db; - /** + /** * @var string Error code (or message) */ public $error; - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; - } + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return HTML select list of export models - * - * @param string $selected Id modele pre-selectionne - * @param string $htmlname Nom de la zone select - * @param string $type Type des modeles recherches - * @param int $useempty Show an empty value in list - * @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on) - * @return void - */ - public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null) - { - // phpcs:enable - global $conf, $langs, $user; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return HTML select list of export models + * + * @param string $selected Id modele pre-selectionne + * @param string $htmlname Nom de la zone select + * @param string $type Type des modeles recherches + * @param int $useempty Show an empty value in list + * @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on) + * @return void + */ + public function select_export_model($selected = '', $htmlname = 'exportmodelid', $type = '', $useempty = 0, $fk_user = null) + { + // phpcs:enable + global $conf, $langs, $user; - $sql = "SELECT rowid, label, fk_user"; - $sql .= " FROM ".MAIN_DB_PREFIX."export_model"; - $sql .= " WHERE type = '".$this->db->escape($type)."'"; + $sql = "SELECT rowid, label, fk_user"; + $sql .= " FROM ".MAIN_DB_PREFIX."export_model"; + $sql .= " WHERE type = '".$this->db->escape($type)."'"; if (!empty($fk_user)) $sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model - $sql .= " ORDER BY label"; - $result = $this->db->query($sql); - if ($result) - { - print ''; + if ($useempty) + { + print ''; + } - $num = $this->db->num_rows($result); - $i = 0; - while ($i < $num) - { - $obj = $this->db->fetch_object($result); + $num = $this->db->num_rows($result); + $i = 0; + while ($i < $num) + { + $obj = $this->db->fetch_object($result); - $label = $obj->label; - if ($obj->fk_user == 0) { - $label .= ' ('.$langs->trans("Everybody").')'; - } - elseif (!empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) { - $tmpuser = new User($this->db); - $tmpuser->fetch($obj->fk_user); - $label .= ' ('.$tmpuser->getFullName($langs).')'; - } + $label = $obj->label; + if ($obj->fk_user == 0) { + $label .= ' ('.$langs->trans("Everybody").')'; + } elseif (!empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) { + $tmpuser = new User($this->db); + $tmpuser->fetch($obj->fk_user); + $label .= ' ('.$tmpuser->getFullName($langs).')'; + } - if ($selected == $obj->rowid) - { - print ''; - $i++; - } - print ""; - print ajax_combobox($htmlname); - } - else { - dol_print_error($this->db); - } - } + if ($selected == $obj->rowid) + { + print ''; + $i++; + } + print ""; + print ajax_combobox($htmlname); + } else { + dol_print_error($this->db); + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return list of export models - * - * @param string $selected Id modele pre-selectionne - * @param string $htmlname Nom de la zone select - * @param string $type Type des modeles recherches - * @param int $useempty Affiche valeur vide dans liste - * @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on) - * @return void - */ - public function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0, $fk_user = null) - { - // phpcs:enable - global $conf, $langs, $user; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return list of export models + * + * @param string $selected Id modele pre-selectionne + * @param string $htmlname Nom de la zone select + * @param string $type Type des modeles recherches + * @param int $useempty Affiche valeur vide dans liste + * @param int $fk_user User that has created the template (this is set to null to get all export model when EXPORTS_SHARE_MODELS is on) + * @return void + */ + public function select_import_model($selected = '', $htmlname = 'importmodelid', $type = '', $useempty = 0, $fk_user = null) + { + // phpcs:enable + global $conf, $langs, $user; - $sql = "SELECT rowid, label, fk_user"; - $sql .= " FROM ".MAIN_DB_PREFIX."import_model"; - $sql .= " WHERE type = '".$this->db->escape($type)."'"; - if (!empty($fk_user)) $sql .= " AND fk_user IN (0, ".$fk_user.")"; // An export model - $sql .= " ORDER BY rowid"; - $result = $this->db->query($sql); - if ($result) - { - print ''; + if ($useempty) + { + print ''; + } - $num = $this->db->num_rows($result); - $i = 0; - while ($i < $num) - { - $obj = $this->db->fetch_object($result); + $num = $this->db->num_rows($result); + $i = 0; + while ($i < $num) + { + $obj = $this->db->fetch_object($result); - $label = $obj->label; - if ($obj->fk_user == 0) { - $label .= ' ('.$langs->trans("Everybody").')'; - } - elseif (!empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) { - $tmpuser = new User($this->db); - $tmpuser->fetch($obj->fk_user); - $label .= ' ('.$tmpuser->getFullName($langs).')'; - } + $label = $obj->label; + if ($obj->fk_user == 0) { + $label .= ' ('.$langs->trans("Everybody").')'; + } elseif (!empty($conf->global->EXPORTS_SHARE_MODELS) && empty($fk_user) && is_object($user) && $user->id != $obj->fk_user) { + $tmpuser = new User($this->db); + $tmpuser->fetch($obj->fk_user); + $label .= ' ('.$tmpuser->getFullName($langs).')'; + } - if ($selected == $obj->rowid) - { - print ''; - $i++; - } - print ""; - print ajax_combobox($htmlname); - } - else { - dol_print_error($this->db); - } - } + if ($selected == $obj->rowid) + { + print ''; + $i++; + } + print ""; + print ajax_combobox($htmlname); + } else { + dol_print_error($this->db); + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return list of ecotaxes with label - * - * @param string $selected Preselected ecotaxes - * @param string $htmlname Name of combo list - * @return integer - */ - public function select_ecotaxes($selected = '', $htmlname = 'ecotaxe_id') - { - // phpcs:enable - global $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return list of ecotaxes with label + * + * @param string $selected Preselected ecotaxes + * @param string $htmlname Name of combo list + * @return integer + */ + public function select_ecotaxes($selected = '', $htmlname = 'ecotaxe_id') + { + // phpcs:enable + global $langs; - $sql = "SELECT e.rowid, e.code, e.label, e.price, e.organization,"; - $sql .= " c.label as country"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_ecotaxe as e,".MAIN_DB_PREFIX."c_country as c"; - $sql .= " WHERE e.active = 1 AND e.fk_pays = c.rowid"; - $sql .= " ORDER BY country, e.organization ASC, e.code ASC"; + $sql = "SELECT e.rowid, e.code, e.label, e.price, e.organization,"; + $sql .= " c.label as country"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_ecotaxe as e,".MAIN_DB_PREFIX."c_country as c"; + $sql .= " WHERE e.active = 1 AND e.fk_pays = c.rowid"; + $sql .= " ORDER BY country, e.organization ASC, e.code ASC"; - dol_syslog(get_class($this).'::select_ecotaxes', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - print ''; - return 0; - } - else - { - dol_print_error($this->db); - return 1; - } - } + dol_syslog(get_class($this).'::select_ecotaxes', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + print ''; + return 0; + } else { + dol_print_error($this->db); + return 1; + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return list of revenue stamp for country - * - * @param string $selected Value of preselected revenue stamp - * @param string $htmlname Name of combo list - * @param string $country_code Country Code - * @return string HTML select list - */ - public function select_revenue_stamp($selected = '', $htmlname = 'revenuestamp', $country_code = '') - { - // phpcs:enable - global $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return list of revenue stamp for country + * + * @param string $selected Value of preselected revenue stamp + * @param string $htmlname Name of combo list + * @param string $country_code Country Code + * @return string HTML select list + */ + public function select_revenue_stamp($selected = '', $htmlname = 'revenuestamp', $country_code = '') + { + // phpcs:enable + global $langs; - $out = ''; + $out = ''; - $sql = "SELECT r.taux, r.revenuestamp_type"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_revenuestamp as r,".MAIN_DB_PREFIX."c_country as c"; - $sql .= " WHERE r.active = 1 AND r.fk_pays = c.rowid"; - $sql .= " AND c.code = '".$country_code."'"; + $sql = "SELECT r.taux, r.revenuestamp_type"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_revenuestamp as r,".MAIN_DB_PREFIX."c_country as c"; + $sql .= " WHERE r.active = 1 AND r.fk_pays = c.rowid"; + $sql .= " AND c.code = '".$this->db->escape($country_code)."'"; - dol_syslog(get_class($this).'::select_revenue_stamp', LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $out .= ''; - return $out; - } - else - { - dol_print_error($this->db); - return ''; - } - } + dol_syslog(get_class($this).'::select_revenue_stamp', LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $out .= ''; + return $out; + } else { + dol_print_error($this->db); + return ''; + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return a HTML select list to select a percent - * - * @param integer $selected pourcentage pre-selectionne - * @param string $htmlname nom de la liste deroulante - * @param int $disabled Disabled or not - * @param int $increment increment value - * @param int $start start value - * @param int $end end value - * @param int $showempty Add also an empty line - * @return string HTML select string - */ - public function select_percent($selected = 0, $htmlname = 'percent', $disabled = 0, $increment = 5, $start = 0, $end = 100, $showempty = 0) - { - // phpcs:enable - $return = ''; + if ($showempty) $return .= ''; - for ($i = $start; $i <= $end; $i += $increment) - { - if ($selected != '' && (int) $selected == $i) - { - $return .= ''; - } + for ($i = $start; $i <= $end; $i += $increment) + { + if ($selected != '' && (int) $selected == $i) + { + $return .= ''; + } - $return .= ''; + $return .= ''; - return $return; - } + return $return; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return select list for categories (to use in form search selectors) - * - * @param int $type Type of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) is deprecated. - * @param integer $selected Preselected value - * @param string $htmlname Name of combo list - * @param int $nocateg Show also an entry "Not categorized" - * @param int $showempty Add also an empty line - * @param string $morecss More CSS - * @return string Html combo list code - * @see select_all_categories() - */ - public function select_categories($type, $selected = 0, $htmlname = 'search_categ', $nocateg = 0, $showempty = 1, $morecss = '') - { - // phpcs:enable - global $conf, $langs; - require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return select list for categories (to use in form search selectors) + * + * @param int $type Type of category ('customer', 'supplier', 'contact', 'product', 'member'). Old mode (0, 1, 2, ...) is deprecated. + * @param integer $selected Preselected value + * @param string $htmlname Name of combo list + * @param int $nocateg Show also an entry "Not categorized" + * @param int $showempty Add also an empty line + * @param string $morecss More CSS + * @return string Html combo list code + * @see select_all_categories() + */ + public function select_categories($type, $selected = 0, $htmlname = 'search_categ', $nocateg = 0, $showempty = 1, $morecss = '') + { + // phpcs:enable + global $conf, $langs; + require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; - // For backward compatibility - if (is_numeric($type)) - { - dol_syslog(__METHOD__.': using numeric value for parameter type is deprecated. Use string code instead.', LOG_WARNING); - } + // For backward compatibility + if (is_numeric($type)) + { + dol_syslog(__METHOD__.': using numeric value for parameter type is deprecated. Use string code instead.', LOG_WARNING); + } - // Load list of "categories" - $static_categs = new Categorie($this->db); - $tab_categs = $static_categs->get_full_arbo($type); + // Load list of "categories" + $static_categs = new Categorie($this->db); + $tab_categs = $static_categs->get_full_arbo($type); - $moreforfilter = ''; - // Enhance with select2 - if ($conf->use_javascript_ajax) - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; - $comboenhancement = ajax_combobox('select_categ_'.$htmlname); - $moreforfilter .= $comboenhancement; - } + $moreforfilter = ''; + // Enhance with select2 + if ($conf->use_javascript_ajax) + { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $comboenhancement = ajax_combobox('select_categ_'.$htmlname); + $moreforfilter .= $comboenhancement; + } - // Print a select with each of them - $moreforfilter .= ''; + if ($showempty) $moreforfilter .= ''; // Should use -1 to say nothing - if (is_array($tab_categs)) - { - foreach ($tab_categs as $categ) - { - $moreforfilter .= ''; - } - $moreforfilter .= ''; + if (is_array($tab_categs)) + { + foreach ($tab_categs as $categ) + { + $moreforfilter .= ''; + } + $moreforfilter .= ''; - return $moreforfilter; - } + return $moreforfilter; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return select list for categories (to use in form search selectors) - * - * @param string $selected Preselected value - * @param string $htmlname Name of combo list (example: 'search_sale') - * @param User $user Object user - * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status - * @param int $showempty 1=show also an empty value - * @param string $morecss More CSS - * @param int $norepresentative Show also an entry "Not categorized" - * @return string Html combo list code - */ - public function select_salesrepresentatives($selected, $htmlname, $user, $showstatus = 0, $showempty = 1, $morecss = '', $norepresentative = 0) - { - // phpcs:enable - global $conf, $langs, $hookmanager; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return select list for categories (to use in form search selectors) + * + * @param string $selected Preselected value + * @param string $htmlname Name of combo list (example: 'search_sale') + * @param User $user Object user + * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status + * @param int $showempty 1=show also an empty value + * @param string $morecss More CSS + * @param int $norepresentative Show also an entry "Not categorized" + * @return string Html combo list code + */ + public function select_salesrepresentatives($selected, $htmlname, $user, $showstatus = 0, $showempty = 1, $morecss = '', $norepresentative = 0) + { + // phpcs:enable + global $conf, $langs, $hookmanager; - $langs->load('users'); + $langs->load('users'); - $out = ''; - // Enhance with select2 - if ($conf->use_javascript_ajax) - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out = ''; + // Enhance with select2 + if ($conf->use_javascript_ajax) + { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; - $comboenhancement = ajax_combobox($htmlname); - if ($comboenhancement) - { - $out .= $comboenhancement; - } - } + $comboenhancement = ajax_combobox($htmlname); + if ($comboenhancement) + { + $out .= $comboenhancement; + } + } - $reshook = $hookmanager->executeHooks('addSQLWhereFilterOnSelectSalesRep', array(), $this, $action); + $reshook = $hookmanager->executeHooks('addSQLWhereFilterOnSelectSalesRep', array(), $this, $action); - // Select each sales and print them in a select input - $out .= ''; + if ($showempty) $out .= ''; - // Get list of users allowed to be viewed - $sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login"; - $sql_usr .= " FROM ".MAIN_DB_PREFIX."user as u"; + // Get list of users allowed to be viewed + $sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut, u.login"; + $sql_usr .= " FROM ".MAIN_DB_PREFIX."user as u"; - if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { - if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) { - $sql_usr .= " WHERE u.entity IS NOT NULL"; // Show all users - } else { - $sql_usr .= " WHERE EXISTS (SELECT ug.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug WHERE u.rowid = ug.fk_user AND ug.entity IN (".getEntity('usergroup')."))"; - $sql_usr .= " OR u.entity = 0"; // Show always superadmin - } - } - else - { - $sql_usr .= " WHERE u.entity IN (".getEntity('user').")"; - } + if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) + { + if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) { + $sql_usr .= " WHERE u.entity IS NOT NULL"; // Show all users + } else { + $sql_usr .= " WHERE EXISTS (SELECT ug.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug WHERE u.rowid = ug.fk_user AND ug.entity IN (".getEntity('usergroup')."))"; + $sql_usr .= " OR u.entity = 0"; // Show always superadmin + } + } else { + $sql_usr .= " WHERE u.entity IN (".getEntity('user').")"; + } - if (empty($user->rights->user->user->lire)) $sql_usr .= " AND u.rowid = ".$user->id; - if (!empty($user->socid)) $sql_usr .= " AND u.fk_soc = ".$user->socid; + if (empty($user->rights->user->user->lire)) $sql_usr .= " AND u.rowid = ".$user->id; + if (!empty($user->socid)) $sql_usr .= " AND u.fk_soc = ".$user->socid; - //Add hook to filter on user (for exemple on usergroup define in custom modules) - if (!empty($reshook)) $sql_usr .= $hookmanager->resArray[0]; + //Add hook to filter on user (for exemple on usergroup define in custom modules) + if (!empty($reshook)) $sql_usr .= $hookmanager->resArray[0]; - // Add existing sales representatives of thirdparty of external user - if (empty($user->rights->user->user->lire) && $user->socid) - { - $sql_usr .= " UNION "; - $sql_usr .= "SELECT u2.rowid, u2.lastname, u2.firstname, u2.statut, u2.login"; - $sql_usr .= " FROM ".MAIN_DB_PREFIX."user as u2, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + // Add existing sales representatives of thirdparty of external user + if (empty($user->rights->user->user->lire) && $user->socid) + { + $sql_usr .= " UNION "; + $sql_usr .= "SELECT u2.rowid, u2.lastname, u2.firstname, u2.statut, u2.login"; + $sql_usr .= " FROM ".MAIN_DB_PREFIX."user as u2, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) - { - if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) { - $sql_usr .= " WHERE u2.entity IS NOT NULL"; // Show all users - } else { - $sql_usr .= " WHERE EXISTS (SELECT ug2.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug2 WHERE u2.rowid = ug2.fk_user AND ug2.entity IN (".getEntity('usergroup')."))"; - } - } - else - { - $sql_usr .= " WHERE u2.entity IN (".getEntity('user').")"; - } + if (!empty($conf->global->MULTICOMPANY_TRANSVERSE_MODE)) + { + if (!empty($user->admin) && empty($user->entity) && $conf->entity == 1) { + $sql_usr .= " WHERE u2.entity IS NOT NULL"; // Show all users + } else { + $sql_usr .= " WHERE EXISTS (SELECT ug2.fk_user FROM ".MAIN_DB_PREFIX."usergroup_user as ug2 WHERE u2.rowid = ug2.fk_user AND ug2.entity IN (".getEntity('usergroup')."))"; + } + } else { + $sql_usr .= " WHERE u2.entity IN (".getEntity('user').")"; + } - $sql_usr .= " AND u2.rowid = sc.fk_user AND sc.fk_soc=".$user->socid; + $sql_usr .= " AND u2.rowid = sc.fk_user AND sc.fk_soc=".$user->socid; - //Add hook to filter on user (for exemple on usergroup define in custom modules) - if (!empty($reshook)) $sql_usr .= $hookmanager->resArray[1]; - } - $sql_usr .= " ORDER BY statut DESC, lastname ASC"; // Do not use 'ORDER BY u.statut' here, not compatible with the UNION. - //print $sql_usr;exit; + //Add hook to filter on user (for exemple on usergroup define in custom modules) + if (!empty($reshook)) $sql_usr .= $hookmanager->resArray[1]; + } + $sql_usr .= " ORDER BY statut DESC, lastname ASC"; // Do not use 'ORDER BY u.statut' here, not compatible with the UNION. + //print $sql_usr;exit; - $resql_usr = $this->db->query($sql_usr); - if ($resql_usr) - { - while ($obj_usr = $this->db->fetch_object($resql_usr)) - { - $out .= ''; - } - $this->db->free($resql_usr); - } - else - { - dol_print_error($this->db); - } + $out .= ''; + } + $this->db->free($resql_usr); + } else { + dol_print_error($this->db); + } - if ($norepresentative) - { - $langs->load("companies"); - $out .= ''; - } + if ($norepresentative) + { + $langs->load("companies"); + $out .= ''; + } - $out .= ''; + $out .= ''; - return $out; - } + return $out; + } - /** - * Return list of project and tasks - * - * @param int $selectedtask Pre-selected task - * @param int $projectid Project id - * @param string $htmlname Name of html select - * @param int $modeproject 1 to restrict on projects owned by user - * @param int $modetask 1 to restrict on tasks associated to user - * @param int $mode 0=Return list of tasks and their projects, 1=Return projects and tasks if exists - * @param int $useempty 0=Allow empty values - * @param int $disablechildoftaskid 1=Disable task that are child of the provided task id + /** + * Return list of project and tasks + * + * @param int $selectedtask Pre-selected task + * @param int $projectid Project id + * @param string $htmlname Name of html select + * @param int $modeproject 1 to restrict on projects owned by user + * @param int $modetask 1 to restrict on tasks associated to user + * @param int $mode 0=Return list of tasks and their projects, 1=Return projects and tasks if exists + * @param int $useempty 0=Allow empty values + * @param int $disablechildoftaskid 1=Disable task that are child of the provided task id * @param string $filteronprojstatus Filter on project status ('-1'=no filter, '0,1'=Draft+Validated status) - * @param string $morecss More css - * @return void - */ - public function selectProjectTasks($selectedtask = '', $projectid = 0, $htmlname = 'task_parent', $modeproject = 0, $modetask = 0, $mode = 0, $useempty = 0, $disablechildoftaskid = 0, $filteronprojstatus = '', $morecss = '') - { - global $user, $langs; + * @param string $morecss More css + * @return void + */ + public function selectProjectTasks($selectedtask = '', $projectid = 0, $htmlname = 'task_parent', $modeproject = 0, $modetask = 0, $mode = 0, $useempty = 0, $disablechildoftaskid = 0, $filteronprojstatus = '', $morecss = '') + { + global $user, $langs; - require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; + require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; - //print $modeproject.'-'.$modetask; - $task = new Task($this->db); - $tasksarray = $task->getTasksArray($modetask ? $user : 0, $modeproject ? $user : 0, $projectid, 0, $mode, '', $filteronprojstatus); - if ($tasksarray) - { - print ''; + //print $modeproject.'-'.$modetask; + $task = new Task($this->db); + $tasksarray = $task->getTasksArray($modetask ? $user : 0, $modeproject ? $user : 0, $projectid, 0, $mode, '', $filteronprojstatus); + if ($tasksarray) + { + print ''; - print ajax_combobox($htmlname); - } - else - { - print '
'.$langs->trans("NoProject").'
'; - } - } + print ajax_combobox($htmlname); + } else { + print '
'.$langs->trans("NoProject").'
'; + } + } - /** - * Write lines of a project (all lines of a project if parent = 0) - * - * @param int $inc Cursor counter - * @param int $parent Id of parent task we want to see - * @param array $lines Array of task lines - * @param int $level Level - * @param int $selectedtask Id selected task - * @param int $selectedproject Id selected project - * @param int $disablechildoftaskid 1=Disable task that are child of the provided task id - * @return void - */ - private function _pLineSelect(&$inc, $parent, $lines, $level = 0, $selectedtask = 0, $selectedproject = 0, $disablechildoftaskid = 0) - { - global $langs, $user, $conf; + /** + * Write lines of a project (all lines of a project if parent = 0) + * + * @param int $inc Cursor counter + * @param int $parent Id of parent task we want to see + * @param array $lines Array of task lines + * @param int $level Level + * @param int $selectedtask Id selected task + * @param int $selectedproject Id selected project + * @param int $disablechildoftaskid 1=Disable task that are child of the provided task id + * @return void + */ + private function _pLineSelect(&$inc, $parent, $lines, $level = 0, $selectedtask = 0, $selectedproject = 0, $disablechildoftaskid = 0) + { + global $langs, $user, $conf; - $lastprojectid = 0; + $lastprojectid = 0; - $numlines = count($lines); - for ($i = 0; $i < $numlines; $i++) { - if ($lines[$i]->fk_parent == $parent) { - //var_dump($selectedproject."--".$selectedtask."--".$lines[$i]->fk_project."_".$lines[$i]->id); // $lines[$i]->id may be empty if project has no lines + $numlines = count($lines); + for ($i = 0; $i < $numlines; $i++) { + if ($lines[$i]->fk_parent == $parent) { + //var_dump($selectedproject."--".$selectedtask."--".$lines[$i]->fk_project."_".$lines[$i]->id); // $lines[$i]->id may be empty if project has no lines - // Break on a new project - if ($parent == 0) // We are on a task at first level - { - if ($lines[$i]->fk_project != $lastprojectid) // Break found on project - { - if ($i > 0) print ''; - print '\n"; + // Break on a new project + if ($parent == 0) // We are on a task at first level + { + if ($lines[$i]->fk_project != $lastprojectid) // Break found on project + { + if ($i > 0) print ''; + print '\n"; - $lastprojectid = $lines[$i]->fk_project; - $inc++; - } - } + $lastprojectid = $lines[$i]->fk_project; + $inc++; + } + } - $newdisablechildoftaskid = $disablechildoftaskid; + $newdisablechildoftaskid = $disablechildoftaskid; - // Print task - if (isset($lines[$i]->id)) // We use isset because $lines[$i]->id may be null if project has no task and are on root project (tasks may be caught by a left join). We enter here only if '0' or >0 - { - // Check if we must disable entry - $disabled = 0; - if ($disablechildoftaskid && (($lines[$i]->id == $disablechildoftaskid || $lines[$i]->fk_parent == $disablechildoftaskid))) - { - $disabled++; - if ($lines[$i]->fk_parent == $disablechildoftaskid) $newdisablechildoftaskid = $lines[$i]->id; // If task is child of a disabled parent, we will propagate id to disable next child too - } + // Print task + if (isset($lines[$i]->id)) // We use isset because $lines[$i]->id may be null if project has no task and are on root project (tasks may be caught by a left join). We enter here only if '0' or >0 + { + // Check if we must disable entry + $disabled = 0; + if ($disablechildoftaskid && (($lines[$i]->id == $disablechildoftaskid || $lines[$i]->fk_parent == $disablechildoftaskid))) + { + $disabled++; + if ($lines[$i]->fk_parent == $disablechildoftaskid) $newdisablechildoftaskid = $lines[$i]->id; // If task is child of a disabled parent, we will propagate id to disable next child too + } - print '\n"; - $inc++; - } + print '\n"; + $inc++; + } - $level++; - if ($lines[$i]->id) $this->_pLineSelect($inc, $lines[$i]->id, $lines, $level, $selectedtask, $selectedproject, $newdisablechildoftaskid); - $level--; - } - } - } + $level++; + if ($lines[$i]->id) $this->_pLineSelect($inc, $lines[$i]->id, $lines, $level, $selectedtask, $selectedproject, $newdisablechildoftaskid); + $level--; + } + } + } - /** - * Output a HTML thumb of color or a text if not defined. - * - * @param string $color String with hex (FFFFFF) or comma RGB ('255,255,255') - * @param string $textifnotdefined Text to show if color not defined - * @return string HTML code for color thumb - * @see selectColor() - */ - public static function showColor($color, $textifnotdefined = '') - { - $textcolor = 'FFF'; - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - if (colorIsLight($color)) $textcolor = '000'; + /** + * Output a HTML thumb of color or a text if not defined. + * + * @param string $color String with hex (FFFFFF) or comma RGB ('255,255,255') + * @param string $textifnotdefined Text to show if color not defined + * @return string HTML code for color thumb + * @see selectColor() + */ + public static function showColor($color, $textifnotdefined = '') + { + $textcolor = 'FFF'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + if (colorIsLight($color)) $textcolor = '000'; - $color = colorArrayToHex(colorStringToArray($color, array()), ''); + $color = colorArrayToHex(colorStringToArray($color, array()), ''); if ($color) print ''; else print $textifnotdefined; - } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Output a HTML code to select a color - * - * @param string $set_color Pre-selected color - * @param string $prefix Name of HTML field - * @param string $form_name Deprecated. Not used. - * @param int $showcolorbox 1=Show color code and color box, 0=Show only color code - * @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') - * @return void - * @deprecated Use instead selectColor - * @see selectColor() - */ - public function select_color($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '') - { - // phpcs:enable - print $this->selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors); - } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Output a HTML code to select a color + * + * @param string $set_color Pre-selected color + * @param string $prefix Name of HTML field + * @param string $form_name Deprecated. Not used. + * @param int $showcolorbox 1=Show color code and color box, 0=Show only color code + * @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') + * @return void + * @deprecated Use instead selectColor + * @see selectColor() + */ + public function select_color($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '') + { + // phpcs:enable + print $this->selectColor($set_color, $prefix, $form_name, $showcolorbox, $arrayofcolors); + } - /** - * Output a HTML code to select a color. Field will return an hexa color like '334455'. - * - * @param string $set_color Pre-selected color - * @param string $prefix Name of HTML field - * @param string $form_name Deprecated. Not used. - * @param int $showcolorbox 1=Show color code and color box, 0=Show only color code - * @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') - * @param string $morecss Add css style into input field - * @return string - * @see showColor() - */ - public static function selectColor($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '', $morecss = '') - { - // Deprecation warning - if ($form_name) { - dol_syslog(__METHOD__.": form_name parameter is deprecated", LOG_WARNING); - } + /** + * Output a HTML code to select a color. Field will return an hexa color like '334455'. + * + * @param string $set_color Pre-selected color + * @param string $prefix Name of HTML field + * @param string $form_name Deprecated. Not used. + * @param int $showcolorbox 1=Show color code and color box, 0=Show only color code + * @param array $arrayofcolors Array of colors. Example: array('29527A','5229A3','A32929','7A367A','B1365F','0D7813') + * @param string $morecss Add css style into input field + * @return string + * @see showColor() + */ + public static function selectColor($set_color = '', $prefix = 'f_color', $form_name = '', $showcolorbox = 1, $arrayofcolors = '', $morecss = '') + { + // Deprecation warning + if ($form_name) { + dol_syslog(__METHOD__.": form_name parameter is deprecated", LOG_WARNING); + } - global $langs, $conf; + global $langs, $conf; - $out = ''; + $out = ''; - if (!is_array($arrayofcolors) || count($arrayofcolors) < 1) - { - $langs->load("other"); - if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax)) - { - $out .= ''; - $out .= ''; - $out .= ''; + $out .= ''; - } - $out .= ''; - } - else // In most cases, this is not used. We used instead function with no specific list of colors - { - if (empty($conf->dol_use_jmobile) && !empty($conf->use_javascript_ajax)) - { - $out .= ''; - $out .= ''; - $out .= ''; + $out .= ''; - } - $out .= ''; - } + } + $out .= ''; + } - return $out; - } + return $out; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Creation d'un icone de couleur - * - * @param string $color Couleur de l'image - * @param string $module Nom du module - * @param string $name Nom de l'image - * @param int $x Largeur de l'image en pixels - * @param int $y Hauteur de l'image en pixels - * @return void - */ - public function CreateColorIcon($color, $module, $name, $x = '12', $y = '12') - { - // phpcs:enable - global $conf; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Creation d'un icone de couleur + * + * @param string $color Couleur de l'image + * @param string $module Nom du module + * @param string $name Nom de l'image + * @param int $x Largeur de l'image en pixels + * @param int $y Hauteur de l'image en pixels + * @return void + */ + public function CreateColorIcon($color, $module, $name, $x = '12', $y = '12') + { + // phpcs:enable + global $conf; - $file = $conf->$module->dir_temp.'/'.$name.'.png'; + $file = $conf->$module->dir_temp.'/'.$name.'.png'; - // On cree le repertoire contenant les icones - if (!file_exists($conf->$module->dir_temp)) - { - dol_mkdir($conf->$module->dir_temp); - } + // On cree le repertoire contenant les icones + if (!file_exists($conf->$module->dir_temp)) + { + dol_mkdir($conf->$module->dir_temp); + } - // On cree l'image en vraies couleurs - $image = imagecreatetruecolor($x, $y); + // On cree l'image en vraies couleurs + $image = imagecreatetruecolor($x, $y); - $color = substr($color, 1, 6); + $color = substr($color, 1, 6); - $rouge = hexdec(substr($color, 0, 2)); //conversion du canal rouge - $vert = hexdec(substr($color, 2, 2)); //conversion du canal vert - $bleu = hexdec(substr($color, 4, 2)); //conversion du canal bleu + $rouge = hexdec(substr($color, 0, 2)); //conversion du canal rouge + $vert = hexdec(substr($color, 2, 2)); //conversion du canal vert + $bleu = hexdec(substr($color, 4, 2)); //conversion du canal bleu - $couleur = imagecolorallocate($image, $rouge, $vert, $bleu); - //print $rouge.$vert.$bleu; - imagefill($image, 0, 0, $couleur); //on remplit l'image - // On cree la couleur et on l'attribue a une variable pour ne pas la perdre - ImagePng($image, $file); //renvoie une image sous format png - ImageDestroy($image); - } + $couleur = imagecolorallocate($image, $rouge, $vert, $bleu); + //print $rouge.$vert.$bleu; + imagefill($image, 0, 0, $couleur); //on remplit l'image + // On cree la couleur et on l'attribue a une variable pour ne pas la perdre + ImagePng($image, $file); //renvoie une image sous format png + ImageDestroy($image); + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return HTML combo list of week - * - * @param string $selected Preselected value - * @param string $htmlname Nom de la zone select - * @param int $useempty Affiche valeur vide dans liste - * @return string - */ - public function select_dayofweek($selected = '', $htmlname = 'weekid', $useempty = 0) - { - // phpcs:enable - global $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return HTML combo list of week + * + * @param string $selected Preselected value + * @param string $htmlname Nom de la zone select + * @param int $useempty Affiche valeur vide dans liste + * @return string + */ + public function select_dayofweek($selected = '', $htmlname = 'weekid', $useempty = 0) + { + // phpcs:enable + global $langs; - $week = array( - 0=>$langs->trans("Day0"), - 1=>$langs->trans("Day1"), - 2=>$langs->trans("Day2"), - 3=>$langs->trans("Day3"), - 4=>$langs->trans("Day4"), - 5=>$langs->trans("Day5"), - 6=>$langs->trans("Day6") - ); + $week = array( + 0=>$langs->trans("Day0"), + 1=>$langs->trans("Day1"), + 2=>$langs->trans("Day2"), + 3=>$langs->trans("Day3"), + 4=>$langs->trans("Day4"), + 5=>$langs->trans("Day5"), + 6=>$langs->trans("Day6") + ); - $select_week = ''; - return $select_week; - } + $select_week = ''; + return $select_week; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return HTML combo list of month - * - * @param string $selected Preselected value - * @param string $htmlname Name of HTML select object - * @param int $useempty Show empty in list - * @param int $longlabel Show long label - * @param string $morecss More Css - * @return string - */ - public function select_month($selected = '', $htmlname = 'monthid', $useempty = 0, $longlabel = 0, $morecss = 'maxwidth50imp valignmiddle') - { - // phpcs:enable - global $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return HTML combo list of month + * + * @param string $selected Preselected value + * @param string $htmlname Name of HTML select object + * @param int $useempty Show empty in list + * @param int $longlabel Show long label + * @param string $morecss More Css + * @return string + */ + public function select_month($selected = '', $htmlname = 'monthid', $useempty = 0, $longlabel = 0, $morecss = 'maxwidth50imp valignmiddle') + { + // phpcs:enable + global $langs; - require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; - if ($longlabel) $montharray = monthArray($langs, 0); // Get array - else $montharray = monthArray($langs, 1); + if ($longlabel) $montharray = monthArray($langs, 0); // Get array + else $montharray = monthArray($langs, 1); - $select_month = ''; - return $select_month; - } + $select_month = ''; + return $select_month; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return HTML combo list of years - * - * @param string $selected Preselected value (''=current year, -1=none, year otherwise) - * @param string $htmlname Name of HTML select object - * @param int $useempty Affiche valeur vide dans liste - * @param int $min_year Offset of minimum year into list (by default current year -10) - * @param int $max_year Offset of maximum year into list (by default current year + 5) - * @param int $offset Offset - * @param int $invert Invert - * @param string $option Option - * @param string $morecss More CSS - * @return string - */ - public function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp') - { - // phpcs:enable - print $this->selectyear($selected, $htmlname, $useempty, $min_year, $max_year, $offset, $invert, $option, $morecss); - } + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return HTML combo list of years + * + * @param string $selected Preselected value (''=current year, -1=none, year otherwise) + * @param string $htmlname Name of HTML select object + * @param int $useempty Affiche valeur vide dans liste + * @param int $min_year Offset of minimum year into list (by default current year -10) + * @param int $max_year Offset of maximum year into list (by default current year + 5) + * @param int $offset Offset + * @param int $invert Invert + * @param string $option Option + * @param string $morecss More CSS + * @return string + */ + public function select_year($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp') + { + // phpcs:enable + print $this->selectyear($selected, $htmlname, $useempty, $min_year, $max_year, $offset, $invert, $option, $morecss); + } - /** - * Return HTML combo list of years - * - * @param string $selected Preselected value (''=current year, -1=none, year otherwise) - * @param string $htmlname Name of HTML select object - * @param int $useempty Affiche valeur vide dans liste - * @param int $min_year Offset of minimum year into list (by default current year -10) - * @param int $max_year Offset of maximum year into list (by default current year + 5) - * @param int $offset Offset - * @param int $invert Invert - * @param string $option Option - * @param string $morecss More css - * @return string - */ - public function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp') - { - $out = ''; + /** + * Return HTML combo list of years + * + * @param string $selected Preselected value (''=current year, -1=none, year otherwise) + * @param string $htmlname Name of HTML select object + * @param int $useempty Affiche valeur vide dans liste + * @param int $min_year Offset of minimum year into list (by default current year -10) + * @param int $max_year Offset of maximum year into list (by default current year + 5) + * @param int $offset Offset + * @param int $invert Invert + * @param string $option Option + * @param string $morecss More css + * @param bool $addjscombo Add js combo + * @return string + */ + public function selectyear($selected = '', $htmlname = 'yearid', $useempty = 0, $min_year = 10, $max_year = 5, $offset = 0, $invert = 0, $option = '', $morecss = 'valignmiddle maxwidth75imp', $addjscombo = false) + { + $out = ''; - $currentyear = date("Y") + $offset; - $max_year = $currentyear + $max_year; - $min_year = $currentyear - $min_year; - if (empty($selected) && empty($useempty)) $selected = $currentyear; + // Add code for jquery to use multiselect + if ($addjscombo) + { + // Enhance with select2 + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $out .= ajax_combobox($htmlname); + } - $out .= '\n"; + $currentyear = date("Y") + $offset; + $max_year = $currentyear + $max_year; + $min_year = $currentyear - $min_year; + if (empty($selected) && empty($useempty)) $selected = $currentyear; - return $out; - } + $out .= '\n"; + + return $out; + } - /** - * Get array with HTML tabs with boxes of a particular area including personalized choices of user. - * Class 'Form' must be known. - * - * @param User $user Object User - * @param String $areacode Code of area for pages - 0 = Home page ... See getListOfPagesForBoxes() + /** + * Get array with HTML tabs with boxes of a particular area including personalized choices of user. + * Class 'Form' must be known. + * + * @param User $user Object User + * @param String $areacode Code of area for pages - 0 = Home page ... See getListOfPagesForBoxes() * @return array array('selectboxlist'=>, 'boxactivated'=>, 'boxlista'=>, 'boxlistb'=>) - */ - public static function getBoxesArea($user, $areacode) - { - global $conf, $langs, $db; + */ + public static function getBoxesArea($user, $areacode) + { + global $conf, $langs, $db; - include_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; - $confuserzone = 'MAIN_BOXES_'.$areacode; + $confuserzone = 'MAIN_BOXES_'.$areacode; - // $boxactivated will be array of boxes enabled into global setup - // $boxidactivatedforuser will be array of boxes choosed by user + // $boxactivated will be array of boxes enabled into global setup + // $boxidactivatedforuser will be array of boxes choosed by user - $selectboxlist = ''; - $boxactivated = InfoBox::listBoxes($db, 'activated', $areacode, (empty($user->conf->$confuserzone) ?null:$user), array(), 0); // Search boxes of common+user (or common only if user has no specific setup) + $selectboxlist = ''; + $boxactivated = InfoBox::listBoxes($db, 'activated', $areacode, (empty($user->conf->$confuserzone) ?null:$user), array(), 0); // Search boxes of common+user (or common only if user has no specific setup) - $boxidactivatedforuser = array(); - foreach ($boxactivated as $box) - { - if (empty($user->conf->$confuserzone) || $box->fk_user == $user->id) $boxidactivatedforuser[$box->id] = $box->id; // We keep only boxes to show for user - } + $boxidactivatedforuser = array(); + foreach ($boxactivated as $box) + { + if (empty($user->conf->$confuserzone) || $box->fk_user == $user->id) $boxidactivatedforuser[$box->id] = $box->id; // We keep only boxes to show for user + } - // Define selectboxlist - $arrayboxtoactivatelabel = array(); - if (!empty($user->conf->$confuserzone)) - { - $boxorder = ''; - $langs->load("boxes"); // Load label of boxes - foreach ($boxactivated as $box) - { - if (!empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user - $label = $langs->transnoentitiesnoconv($box->boxlabel); - //if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')'; - if (preg_match('/graph/', $box->class) && $conf->browser->layout != 'phone') - { - $label = $label.' '; - } - $arrayboxtoactivatelabel[$box->id] = $label; // We keep only boxes not shown for user, to show into combo list - } - foreach ($boxidactivatedforuser as $boxid) - { - if (empty($boxorder)) $boxorder .= 'A:'; + // Define selectboxlist + $arrayboxtoactivatelabel = array(); + if (!empty($user->conf->$confuserzone)) + { + $boxorder = ''; + $langs->load("boxes"); // Load label of boxes + foreach ($boxactivated as $box) + { + if (!empty($boxidactivatedforuser[$box->id])) continue; // Already visible for user + $label = $langs->transnoentitiesnoconv($box->boxlabel); + //if (preg_match('/graph/',$box->class)) $label.=' ('.$langs->trans("Graph").')'; + if (preg_match('/graph/', $box->class) && $conf->browser->layout != 'phone') + { + $label = $label.' '; + } + $arrayboxtoactivatelabel[$box->id] = $label; // We keep only boxes not shown for user, to show into combo list + } + foreach ($boxidactivatedforuser as $boxid) + { + if (empty($boxorder)) $boxorder .= 'A:'; $boxorder .= $boxid.','; - } + } - //var_dump($boxidactivatedforuser); + //var_dump($boxidactivatedforuser); - // Class Form must have been already loaded - $selectboxlist .= ''."\n"; + // Class Form must have been already loaded + $selectboxlist .= ''."\n"; $selectboxlist .= ''; + $selectboxlist .= ''; $selectboxlist .= ''; $selectboxlist .= ''; $selectboxlist .= ''; $selectboxlist .= ''; $selectboxlist .= Form::selectarray('boxcombo', $arrayboxtoactivatelabel, -1, $langs->trans("ChooseBoxToAdd").'...', 0, 0, '', 0, 0, 0, 'ASC', 'maxwidth150onsmartphone', 0, 'hidden selected', 0, 1); - if (empty($conf->use_javascript_ajax)) $selectboxlist .= ' '; - $selectboxlist .= ''; - if (!empty($conf->use_javascript_ajax)) - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; - $selectboxlist .= ajax_combobox("boxcombo"); - } - } + if (empty($conf->use_javascript_ajax)) $selectboxlist .= ' '; + $selectboxlist .= ''; + if (!empty($conf->use_javascript_ajax)) + { + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; + $selectboxlist .= ajax_combobox("boxcombo"); + } + } - // Javascript code for dynamic actions - if (!empty($conf->use_javascript_ajax)) - { - $selectboxlist .= ''."\n"; - } + $selectboxlist .= ''."\n"; + } - // Define boxlista and boxlistb - $nbboxactivated = count($boxidactivatedforuser); + // Define boxlista and boxlistb + $nbboxactivated = count($boxidactivatedforuser); - if ($nbboxactivated) - { - // Load translation files required by the page - $langs->loadLangs(array("boxes", "projects")); + if ($nbboxactivated) + { + // Load translation files required by the page + $langs->loadLangs(array("boxes", "projects")); - $emptybox = new ModeleBoxes($db); + $emptybox = new ModeleBoxes($db); - $boxlista .= "\n\n"; + $boxlista .= "\n\n"; - // Define $box_max_lines - $box_max_lines = 5; - if (!empty($conf->global->MAIN_BOXES_MAXLINES)) $box_max_lines = $conf->global->MAIN_BOXES_MAXLINES; + // Define $box_max_lines + $box_max_lines = 5; + if (!empty($conf->global->MAIN_BOXES_MAXLINES)) $box_max_lines = $conf->global->MAIN_BOXES_MAXLINES; - $ii = 0; - foreach ($boxactivated as $key => $box) - { - if ((!empty($user->conf->$confuserzone) && $box->fk_user == 0) || (empty($user->conf->$confuserzone) && $box->fk_user != 0)) continue; + $ii = 0; + foreach ($boxactivated as $key => $box) + { + if ((!empty($user->conf->$confuserzone) && $box->fk_user == 0) || (empty($user->conf->$confuserzone) && $box->fk_user != 0)) continue; if (empty($box->box_order) && $ii < ($nbboxactivated / 2)) $box->box_order = 'A'.sprintf("%02d", ($ii + 1)); // When box_order was not yet set to Axx or Bxx and is still 0 - if (preg_match('/^A/i', $box->box_order)) // column A - { - $ii++; - //print 'box_id '.$boxactivated[$ii]->box_id.' '; - //print 'box_order '.$boxactivated[$ii]->box_order.'
'; - // Show box - $box->loadBox($box_max_lines); - $boxlista .= $box->outputBox(); - } - } + if (preg_match('/^A/i', $box->box_order)) // column A + { + $ii++; + //print 'box_id '.$boxactivated[$ii]->box_id.' '; + //print 'box_order '.$boxactivated[$ii]->box_order.'
'; + // Show box + $box->loadBox($box_max_lines); + $boxlista .= $box->showBox(null, null, 1); + } + } - if ($conf->browser->layout != 'phone') - { - $emptybox->box_id = 'A'; - $emptybox->info_box_head = array(); - $emptybox->info_box_contents = array(); - $boxlista .= $emptybox->outputBox(array(), array()); - } - $boxlista .= "\n"; + if ($conf->browser->layout != 'phone') + { + $emptybox->box_id = 'A'; + $emptybox->info_box_head = array(); + $emptybox->info_box_contents = array(); + $boxlista .= $emptybox->showBox(array(), array(), 1); + } + $boxlista .= "\n"; - $boxlistb .= "\n\n"; + $boxlistb .= "\n\n"; - $ii = 0; - foreach ($boxactivated as $key => $box) - { - if ((!empty($user->conf->$confuserzone) && $box->fk_user == 0) || (empty($user->conf->$confuserzone) && $box->fk_user != 0)) continue; - if (empty($box->box_order) && $ii < ($nbboxactivated / 2)) $box->box_order = 'B'.sprintf("%02d", ($ii + 1)); // When box_order was not yet set to Axx or Bxx and is still 0 - if (preg_match('/^B/i', $box->box_order)) // colonne B - { - $ii++; - //print 'box_id '.$boxactivated[$ii]->box_id.' '; - //print 'box_order '.$boxactivated[$ii]->box_order.'
'; - // Show box - $box->loadBox($box_max_lines); - $boxlistb .= $box->outputBox(); - } - } + $ii = 0; + foreach ($boxactivated as $key => $box) + { + if ((!empty($user->conf->$confuserzone) && $box->fk_user == 0) || (empty($user->conf->$confuserzone) && $box->fk_user != 0)) continue; + if (empty($box->box_order) && $ii < ($nbboxactivated / 2)) $box->box_order = 'B'.sprintf("%02d", ($ii + 1)); // When box_order was not yet set to Axx or Bxx and is still 0 + if (preg_match('/^B/i', $box->box_order)) // colonne B + { + $ii++; + //print 'box_id '.$boxactivated[$ii]->box_id.' '; + //print 'box_order '.$boxactivated[$ii]->box_order.'
'; + // Show box + $box->loadBox($box_max_lines); + $boxlistb .= $box->showBox(null, null, 1); + } + } - if ($conf->browser->layout != 'phone') - { - $emptybox->box_id = 'B'; - $emptybox->info_box_head = array(); - $emptybox->info_box_contents = array(); - $boxlistb .= $emptybox->outputBox(array(), array()); - } + if ($conf->browser->layout != 'phone') + { + $emptybox->box_id = 'B'; + $emptybox->info_box_head = array(); + $emptybox->info_box_contents = array(); + $boxlistb .= $emptybox->showBox(array(), array(), 1); + } - $boxlistb .= "\n"; - } + $boxlistb .= "\n"; + } - return array('selectboxlist'=>count($boxactivated) ? $selectboxlist : '', 'boxactivated'=>$boxactivated, 'boxlista'=>$boxlista, 'boxlistb'=>$boxlistb); - } + return array('selectboxlist'=>count($boxactivated) ? $selectboxlist : '', 'boxactivated'=>$boxactivated, 'boxlista'=>$boxlista, 'boxlistb'=>$boxlistb); + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return a HTML select list of a dictionary - * - * @param string $htmlname Name of select zone - * @param string $dictionarytable Dictionary table - * @param string $keyfield Field for key - * @param string $labelfield Label field - * @param string $selected Selected value - * @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. - * @param string $moreattrib More attributes on HTML select tag - * @return void - */ - public function select_dictionary($htmlname, $dictionarytable, $keyfield = 'code', $labelfield = 'label', $selected = '', $useempty = 0, $moreattrib = '') - { - // phpcs:enable - global $langs, $conf; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return a HTML select list of a dictionary + * + * @param string $htmlname Name of select zone + * @param string $dictionarytable Dictionary table + * @param string $keyfield Field for key + * @param string $labelfield Label field + * @param string $selected Selected value + * @param int $useempty 1=Add an empty value in list, 2=Add an empty value in list only if there is more than 2 entries. + * @param string $moreattrib More attributes on HTML select tag + * @return void + */ + public function select_dictionary($htmlname, $dictionarytable, $keyfield = 'code', $labelfield = 'label', $selected = '', $useempty = 0, $moreattrib = '') + { + // phpcs:enable + global $langs, $conf; - $langs->load("admin"); + $langs->load("admin"); - $sql = "SELECT rowid, ".$keyfield.", ".$labelfield; - $sql .= " FROM ".MAIN_DB_PREFIX.$dictionarytable; - $sql .= " ORDER BY ".$labelfield; + $sql = "SELECT rowid, ".$keyfield.", ".$labelfield; + $sql .= " FROM ".MAIN_DB_PREFIX.$dictionarytable; + $sql .= " ORDER BY ".$labelfield; - dol_syslog(get_class($this)."::select_dictionary", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) - { - $num = $this->db->num_rows($result); - $i = 0; - if ($num) - { - print ''; + if ($useempty == 1 || ($useempty == 2 && $num > 1)) + { + print ''; + } - while ($i < $num) - { - $obj = $this->db->fetch_object($result); - if ($selected == $obj->rowid || $selected == $obj->$keyfield) - { - print ''; - $i++; - } - print ""; - } else { - print $langs->trans("DictionaryEmpty"); - } - } - else { - dol_print_error($this->db); - } - } + while ($i < $num) + { + $obj = $this->db->fetch_object($result); + if ($selected == $obj->rowid || $selected == $obj->$keyfield) + { + print ''; + $i++; + } + print ""; + } else { + print $langs->trans("DictionaryEmpty"); + } + } else { + dol_print_error($this->db); + } + } - /** + /** * Return an html string with a select combo box to choose yes or no * * @param string $htmlname Name of html select field @@ -1317,7 +1287,7 @@ class FormOther * @param int $useempty 1=Add empty line * @return string See option */ - public function selectAutoManual($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0) + public function selectAutoManual($htmlname, $value = '', $option = 0, $disabled = false, $useempty = 0) { global $langs; @@ -1336,9 +1306,7 @@ class FormOther { $resultautomanual .= ''."\n"; $resultautomanual .= ''."\n"; - } - else - { + } else { $selected = (($useempty && $value != '0' && $value != 'manual') ? '' : ' selected'); $resultautomanual .= ''."\n"; $resultautomanual .= ''."\n"; diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php index bf3db0cc65c..9586adeaed4 100644 --- a/htdocs/core/class/html.formprojet.class.php +++ b/htdocs/core/class/html.formprojet.class.php @@ -97,9 +97,7 @@ class FormProjets )); $out .= ''; - } - else - { + } else { $out .= $this->select_projects_list($socid, $selected, $htmlname, $maxlength, $option_only, $show_empty, abs($discard_closed), $forcefocus, $disabled, 0, $filterkey, 1, $forceaddid, $htmlid, $morecss); } if ($discard_closed > 0) @@ -115,8 +113,7 @@ class FormProjets { print $out; return ''; - } - else return $out; + } else return $out; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -173,7 +170,7 @@ class FormProjets if (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql .= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)"; elseif ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma. { - $sql .= " AND (p.fk_soc IN (".$socid.", ".$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") OR p.fk_soc IS NULL)"; + $sql .= " AND (p.fk_soc IN (".$socid.", ".((int) $conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY).") OR p.fk_soc IS NULL)"; } } if (!empty($filterkey)) $sql .= natural_search(array('p.title', 'p.ref'), $filterkey); @@ -208,9 +205,7 @@ class FormProjets if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && !$user->rights->societe->lire) { // Do nothing - } - else - { + } else { if ($discard_closed == 1 && $obj->fk_statut == 2 && $obj->rowid != $selected) // We discard closed except if selected { $i++; @@ -232,13 +227,11 @@ class FormProjets { $disabled = 1; $labeltoshow .= ' - '.$langs->trans("Draft"); - } - elseif ($obj->fk_statut == 2) + } elseif ($obj->fk_statut == 2) { if ($discard_closed == 2) $disabled = 1; $labeltoshow .= ' - '.$langs->trans("Closed"); - } - elseif (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) + } elseif (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled = 1; $labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany"); @@ -249,15 +242,11 @@ class FormProjets $out .= ''; } + $num = $this->db->num_rows($resql); $i = 0; if ($num) @@ -394,9 +380,7 @@ class FormProjets if ($socid > 0 && (empty($obj->fk_soc) || $obj->fk_soc == $socid) && empty($usertofilter->rights->societe->lire)) { // Do nothing - } - else - { + } else { if ($discard_closed == 1 && $obj->fk_statut == Project::STATUS_CLOSED) { $i++; @@ -405,6 +389,18 @@ class FormProjets $labeltoshow = ''; + $disabled = 0; + if ($obj->fk_statut == Project::STATUS_DRAFT) + { + $disabled = 1; + } elseif ($obj->fk_statut == Project::STATUS_CLOSED) + { + if ($discard_closed == 2) $disabled = 1; + } elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) + { + $disabled = 1; + } + if ($showproject == 'all') { $labeltoshow .= dol_trunc($obj->ref, 18); // Project ref @@ -419,13 +415,11 @@ class FormProjets { $disabled = 1; $labeltoshow .= ' - '.$langs->trans("Draft"); - } - elseif ($obj->fk_statut == Project::STATUS_CLOSED) + } elseif ($obj->fk_statut == Project::STATUS_CLOSED) { if ($discard_closed == 2) $disabled = 1; $labeltoshow .= ' - '.$langs->trans("Closed"); - } - elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) + } elseif ($socid > 0 && (!empty($obj->fk_soc) && $obj->fk_soc != $socid)) { $disabled = 1; $labeltoshow .= ' - '.$langs->trans("LinkedToAnotherCompany"); @@ -441,15 +435,11 @@ class FormProjets $out .= '\n"; print "\n"; - } - else - { + } else { print ''; } diff --git a/htdocs/core/class/html.formsocialcontrib.class.php b/htdocs/core/class/html.formsocialcontrib.class.php index 5ecef635d73..e3a063b0d69 100644 --- a/htdocs/core/class/html.formsocialcontrib.class.php +++ b/htdocs/core/class/html.formsocialcontrib.class.php @@ -59,17 +59,18 @@ class FormSocialContrib * @param int $maxlen Max length of text in combo box * @param int $help Add or not the admin help picto * @param string $morecss Add more CSS on select + * @param int $noerrorifempty No print error if list is empty for the country * @return void */ - public function select_type_socialcontrib($selected = '', $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300') + public function select_type_socialcontrib($selected = '', $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300', $noerrorifempty = 0) { // phpcs:enable global $conf, $db, $langs, $user, $mysoc; if (empty($mysoc->country_id) && empty($mysoc->country_code)) { - dol_print_error('', 'Call to select_type_socialcontrib with mysoc country not yet defined'); - exit; + print $langs->trans("ErrorSetupOfCountryMustBeDone"); + return; } if (!empty($mysoc->country_id)) @@ -79,21 +80,19 @@ class FormSocialContrib $sql .= " WHERE c.active = 1"; $sql .= " AND c.fk_pays = ".$mysoc->country_id; $sql .= " ORDER BY c.libelle ASC"; - } - else - { + } else { $sql = "SELECT c.id, c.libelle as type"; $sql .= " FROM ".MAIN_DB_PREFIX."c_chargesociales as c, ".MAIN_DB_PREFIX."c_country as co"; $sql .= " WHERE c.active = 1 AND c.fk_pays = co.rowid"; - $sql .= " AND co.code = '".$mysoc->country_code."'"; + $sql .= " AND co.code = '".$this->db->escape($mysoc->country_code)."'"; $sql .= " ORDER BY c.libelle ASC"; } dol_syslog("Form::select_type_socialcontrib", LOG_DEBUG); - $resql = $db->query($sql); + $resql = $this->db->query($sql); if ($resql) { - $num = $db->num_rows($resql); + $num = $this->db->num_rows($resql); if ($num) { print ''; if ($user->admin && $help) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if (!empty($conf->use_javascript_ajax)) print ajax_combobox($htmlname); + } else { + if (empty($noerrorifempty)) print $langs->trans("ErrorNoSocialContributionForSellerCountry", $mysoc->country_code); } - else - { - print $langs->trans("ErrorNoSocialContributionForSellerCountry", $mysoc->country_code); - } - } - else - { - dol_print_error($db, $db->lasterror()); + } else { + dol_print_error($this->db); } } } diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 8dcd4965c65..35ad4b83a7f 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -200,17 +200,17 @@ class FormTicket // Type print ''; + + // Group + print ''; // Severity print ''; - - // Group - print ''; // Subject @@ -231,7 +231,7 @@ class FormTicket } // MESSAGE - $msg = GETPOSTISSET('message') ? GETPOST('message', 'none') : ''; + $msg = GETPOSTISSET('message') ? GETPOST('message', 'restricthtml') : ''; print ''; + + // Attached files + if (!empty($this->withfile)) { + // Define list of attached files + $listofpaths = array(); + $listofnames = array(); + $listofmimes = array(); + if (!empty($_SESSION["listofpaths"])) { + $listofpaths = explode(';', $_SESSION["listofpaths"]); + } + + if (!empty($_SESSION["listofnames"])) { + $listofnames = explode(';', $_SESSION["listofnames"]); + } + + if (!empty($_SESSION["listofmimes"])) { + $listofmimes = explode(';', $_SESSION["listofmimes"]); + } + + $out = ''; + $out .= ''; + $out .= '\n"; + + print $out; + } + // User of creation if ($this->withusercreate > 0 && $this->fk_user_create) { print ''; } else { print ''; - print ''; + print ''; print ''; } @@ -359,58 +412,6 @@ class FormTicket print ''; } - // Attached files - if (!empty($this->withfile)) { - // Define list of attached files - $listofpaths = array(); - $listofnames = array(); - $listofmimes = array(); - if (!empty($_SESSION["listofpaths"])) { - $listofpaths = explode(';', $_SESSION["listofpaths"]); - } - - if (!empty($_SESSION["listofnames"])) { - $listofnames = explode(';', $_SESSION["listofnames"]); - } - - if (!empty($_SESSION["listofmimes"])) { - $listofmimes = explode(';', $_SESSION["listofmimes"]); - } - - $out = ''; - $out .= ''; - $out .= '\n"; - - print $out; - } - // Other attributes $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $ticketstat, $this->action); // Note that $action and $object may have been modified by hook @@ -884,12 +885,12 @@ class FormTicket $modelmail_array[$line->id] = $line->label; } - print '
'.$langs->trans("MailFrom").""; $out .= $langs->trans("Name").':'; $out .= '    '; @@ -644,35 +642,28 @@ class FormMail extends Form $soc = new Societe($this->db); $soc->fetch($this->toid); $out .= $soc->getNomUrl(1); - } - elseif ($this->totype == 'contact') + } elseif ($this->totype == 'contact') { $contact = new Contact($this->db); $contact->fetch($this->toid); $out .= $contact->getNomUrl(1); - } - else - { + } else { $out .= $this->toname; } $out .= ' <'.$this->tomail.'>'; if ($this->withtofree) { - $out .= '
'.$langs->trans("and").' withto) : "").'" />'; + $out .= '
'.$langs->trans("and").' withto) : "").'" />'; } - } - else - { + } else { // Note withto may be a text like 'AllRecipientSelected' $out .= (!is_array($this->withto) && !is_numeric($this->withto)) ? $this->withto : ""; } - } - else - { + } else { // The free input of email if (!empty($this->withtofree)) { - $out .= 'withto) : "")).'" />'; + $out .= 'withto) : "")).'" />'; } // The select combo if (!empty($this->withto) && is_array($this->withto)) @@ -684,7 +675,9 @@ class FormMail extends Form { $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - $withtoselected = GETPOST("receiver", 'none'); // Array of selected value + + $withtoselected = GETPOST("receiver", 'array'); // Array of selected value + if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action', 'aZ09') == 'presend') { $withtoselected = array_keys($tmparray); @@ -708,7 +701,7 @@ class FormMail extends Form { $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - $withtoselected = GETPOST("receiveruser", 'none'); // Array of selected value + $withtoselected = GETPOST("receiveruser", 'array'); // Array of selected value if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action', 'aZ09') == 'presend') { $withtoselected = array_keys($tmparray); @@ -741,10 +734,8 @@ class FormMail extends Form if ($this->withtoccreadonly) { $out .= (!is_array($this->withtocc) && !is_numeric($this->withtocc)) ? $this->withtocc : ""; - } - else - { - $out .= 'withtocc) && !is_numeric($this->withtocc)) ? $this->withtocc : '')).'" />'; + } else { + $out .= 'withtocc) && !is_numeric($this->withtocc)) ? $this->withtocc : '')).'" />'; if (!empty($this->withtocc) && is_array($this->withtocc)) { $out .= " ".$langs->trans("and")."/".$langs->trans("or")." "; @@ -754,7 +745,7 @@ class FormMail extends Form { $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - $withtoccselected = GETPOST("receivercc"); // Array of selected value + $withtoccselected = GETPOST("receivercc", 'array'); // Array of selected value $out .= $form->multiselectarray("receivercc", $tmparray, $withtoccselected, null, null, 'inline-block minwidth500', null, ""); } } @@ -774,7 +765,7 @@ class FormMail extends Form { $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - $withtoselected = GETPOST("receiverccuser", 'none'); // Array of selected value + $withtoselected = GETPOST("receiverccuser", 'array'); // Array of selected value if (empty($withtoselected) && count($tmparray) == 1 && GETPOST('action', 'aZ09') == 'presend') { $withtoselected = array_keys($tmparray); @@ -865,7 +856,10 @@ class FormMail extends Form foreach ($listofpaths as $key => $val) { $out .= '
'; + // Preview of attachment + preg_match('#^(/)(\w+)(/)(.+)$#', substr($val, (strlen(DOL_DATA_ROOT) - strlen($val))), $formfile_params); $out .= img_mime($listofnames[$key]).' '.$listofnames[$key]; + $out .= $formfile->showPreview(array(), $formfile_params[2], $formfile_params[4]); if (!$this->withfilereadonly) { $out .= ' '; @@ -873,8 +867,7 @@ class FormMail extends Form } $out .= '
'; } - } - elseif (empty($this->withmaindocfile)) // Do not show message if we asked to show the checkbox + } elseif (empty($this->withmaindocfile)) // Do not show message if we asked to show the checkbox { $out .= $langs->trans("NoAttachedFiles").'
'; } @@ -885,9 +878,7 @@ class FormMail extends Form $out .= ' '; $out .= ''; } - } - else - { + } else { $out .= $this->withfile; } @@ -897,7 +888,7 @@ class FormMail extends Form // Message if (!empty($this->withbody)) { - $defaultmessage = GETPOST('message', 'none'); + $defaultmessage = GETPOST('message', 'restricthtml'); if (!GETPOST('modelselected', 'alpha') || GETPOST('modelmailselected') != '-1') { if ($arraydefaultmessage && $arraydefaultmessage->content) { @@ -912,9 +903,7 @@ class FormMail extends Form if (empty($this->substit['__REF__'])) { $paymenturl = ''; - } - else - { + } else { // Set the online payment url link into __ONLINE_PAYMENT_URL__ key require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; $langs->loadLangs(array('paypal', 'other')); @@ -933,13 +922,13 @@ class FormMail extends Form $langs->load('other'); $this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'] = str_replace('\n', "\n", $langs->transnoentities("PredefinedMailContentLink", $paymenturl)); $this->substit['__ONLINE_PAYMENT_URL__'] = $paymenturl; - } - else - { + } else { $this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'] = ''; $this->substit['__ONLINE_PAYMENT_URL__'] = ''; } + $this->substit['__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__'] = ''; + // Add lines substitution key from each line $lines = ''; $defaultlines = $arraydefaultmessage->content_lines; @@ -962,24 +951,26 @@ class FormMail extends Form if (strpos($defaultmessage, '__ONLINE_PAYMENT_TEXT_AND_URL__') !== false && dol_textishtml($this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'])) { $atleastonecomponentishtml++; } + if (strpos($defaultmessage, '__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__') !== false && dol_textishtml($this->substit['__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__'])) { + $atleastonecomponentishtml++; + } if (dol_textishtml($defaultmessage)) { $atleastonecomponentishtml++; } if ($atleastonecomponentishtml) { - if (! dol_textishtml($this->substit['__USER_SIGNATURE__'])) { + if (!dol_textishtml($this->substit['__USER_SIGNATURE__'])) { $this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']); } - if (! dol_textishtml($this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'])) { + if (!dol_textishtml($this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'])) { $this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__'] = dol_nl2br($this->substit['__ONLINE_PAYMENT_TEXT_AND_URL__']); } - if (! dol_textishtml($defaultmessage)) { + if (!dol_textishtml($defaultmessage)) { $defaultmessage = dol_nl2br($defaultmessage); } } if (GETPOSTISSET("message") && !$_POST['modelselected']) $defaultmessage = $_POST["message"]; - else - { + else { $defaultmessage = make_substitutions($defaultmessage, $this->substit); // Clean first \n and br (to avoid empty line when CONTACTCIVNAME is empty) $defaultmessage = preg_replace("/^(
)+/", "", $defaultmessage); @@ -995,9 +986,7 @@ class FormMail extends Form { $out .= nl2br($defaultmessage); $out .= ''; - } - else - { + } else { if (!isset($this->ckeditortoolbar)) $this->ckeditortoolbar = 'dolibarr_notes'; // Editor wysiwyg @@ -1073,7 +1062,7 @@ class FormMail extends Form if (!empty($this->withtocccreadonly)) { $out .= (!is_array($this->withtoccc) && !is_numeric($this->withtoccc)) ? $this->withtoccc : ""; } else { - $out .= 'withtoccc) && !is_numeric($this->withtoccc)) ? $this->withtoccc : '')).'" />'; + $out .= 'withtoccc) && !is_numeric($this->withtoccc)) ? $this->withtoccc : '')).'" />'; if (!empty($this->withtoccc) && is_array($this->withtoccc)) { $out .= " ".$langs->trans("and")."/".$langs->trans("or")." "; // multiselect array convert html entities into options tags, even if we dont want this, so we encode them a second time @@ -1081,7 +1070,7 @@ class FormMail extends Form foreach ($tmparray as $key => $val) { $tmparray[$key] = dol_htmlentities($tmparray[$key], null, 'UTF-8', true); } - $withtocccselected = GETPOST("receiverccc"); // Array of selected value + $withtocccselected = GETPOST("receiverccc", 'array'); // Array of selected value $out .= $form->multiselectarray("receiverccc", $tmparray, $withtocccselected, null, null, null, null, "90%"); } } @@ -1157,7 +1146,7 @@ class FormMail extends Form { global $conf, $langs, $form; - $defaulttopic = GETPOST('subject', 'none'); + $defaulttopic = GETPOST('subject', 'restricthtml'); if (!GETPOST('modelselected', 'alpha') || GETPOST('modelmailselected') != '-1') { if ($arraydefaultmessage && $arraydefaultmessage->topic) { $defaulttopic = $arraydefaultmessage->topic; @@ -1198,7 +1187,7 @@ class FormMail extends Form */ public function getEMailTemplate($db, $type_template, $user, $outputlangs, $id = 0, $active = 1, $label = '') { - $ret = new ModelMail(); + $ret = new ModelMail(); if ($id == -2 && empty($label)) { $this->error = 'LabelIsMandatoryWhenIdIs-2'; @@ -1240,26 +1229,42 @@ class FormMail extends Form $ret->content = $obj->content; $ret->content_lines = $obj->content_lines; $ret->joinfiles = $obj->joinfiles; - } - elseif ($id == -2) { + } elseif ($id == -2) { // Not found with the provided label return -1; - } - else { // If there is no template at all + } else { // If there is no template at all $defaultmessage = ''; - if ($type_template == 'body') { $defaultmessage = $this->withbody; } // Special case to use this->withbody as content - elseif ($type_template == 'facture_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoice"); } - elseif ($type_template == 'facture_relance') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); } - elseif ($type_template == 'propal_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendProposal"); } - elseif ($type_template == 'supplier_proposal_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierProposal"); } - elseif ($type_template == 'order_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendOrder"); } - elseif ($type_template == 'order_supplier_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierOrder"); } - elseif ($type_template == 'invoice_supplier_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierInvoice"); } - elseif ($type_template == 'shipping_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendShipping"); } - elseif ($type_template == 'fichinter_send') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendFichInter"); } - elseif ($type_template == 'thirdparty') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentThirdparty"); } - elseif ($type_template == 'user') { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentUser"); } - elseif (!empty($type_template)) { $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentGeneric"); } + + if ($type_template == 'body') { + // Special case to use this->withbody as content + $defaultmessage = $this->withbody; + } elseif ($type_template == 'facture_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoice"); + } elseif ($type_template == 'facture_relance') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendInvoiceReminder"); + } elseif ($type_template == 'propal_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendProposal"); + } elseif ($type_template == 'supplier_proposal_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierProposal"); + } elseif ($type_template == 'order_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendOrder"); + } elseif ($type_template == 'order_supplier_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierOrder"); + } elseif ($type_template == 'invoice_supplier_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendSupplierInvoice"); + } elseif ($type_template == 'shipping_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendShipping"); + } elseif ($type_template == 'fichinter_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendFichInter"); + } elseif ($type_template == 'actioncomm_send') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentSendActionComm"); + } elseif ($type_template == 'thirdparty') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentThirdparty"); + } elseif ($type_template == 'user') { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentUser"); + } elseif (!empty($type_template)) { + $defaultmessage = $outputlangs->transnoentities("PredefinedMailContentGeneric"); + } $ret->label = 'default'; $ret->lang = $outputlangs->defaultlang; @@ -1271,9 +1276,7 @@ class FormMail extends Form $db->free($resql); return $ret; - } - else - { + } else { dol_print_error($db); return -1; } @@ -1290,14 +1293,12 @@ class FormMail extends Form */ public function isEMailTemplate($type_template, $user, $outputlangs) { - $ret = array(); - $sql = "SELECT label, topic, content, lang"; $sql .= " FROM ".MAIN_DB_PREFIX.'c_email_templates'; $sql .= " WHERE type_template='".$this->db->escape($type_template)."'"; $sql .= " AND entity IN (".getEntity('c_email_templates').")"; $sql .= " AND (fk_user is NULL or fk_user = 0 or fk_user = ".$user->id.")"; - if (is_object($outputlangs)) $sql .= " AND (lang = '".$outputlangs->defaultlang."' OR lang IS NULL OR lang = '')"; + if (is_object($outputlangs)) $sql .= " AND (lang = '".$this->db->escape($outputlangs->defaultlang)."' OR lang IS NULL OR lang = '')"; $sql .= $this->db->order("lang,label", "ASC"); //print $sql; @@ -1307,9 +1308,7 @@ class FormMail extends Form $num = $this->db->num_rows($resql); $this->db->free($resql); return $num; - } - else - { + } else { $this->error = get_class($this).' '.__METHOD__.' ERROR:'.$this->db->lasterror(); return -1; } @@ -1327,15 +1326,13 @@ class FormMail extends Form */ public function fetchAllEMailTemplate($type_template, $user, $outputlangs, $active = 1) { - $ret = array(); - $sql = "SELECT rowid, label, topic, content, content_lines, lang, fk_user, private, position"; $sql .= " FROM ".MAIN_DB_PREFIX.'c_email_templates'; $sql .= " WHERE type_template IN ('".$this->db->escape($type_template)."', 'all')"; $sql .= " AND entity IN (".getEntity('c_email_templates').")"; $sql .= " AND (private = 0 OR fk_user = ".$user->id.")"; // See all public templates or templates I own. if ($active >= 0) $sql .= " AND active = ".$active; - //if (is_object($outputlangs)) $sql.= " AND (lang = '".$outputlangs->defaultlang."' OR lang IS NULL OR lang = '')"; // Return all languages + //if (is_object($outputlangs)) $sql.= " AND (lang = '".$this->db->escape($outputlangs->defaultlang)."' OR lang IS NULL OR lang = '')"; // Return all languages $sql .= $this->db->order("position,lang,label", "ASC"); //print $sql; @@ -1361,9 +1358,7 @@ class FormMail extends Form } $this->db->free($resql); return $num; - } - else - { + } else { $this->error = get_class($this).' '.__METHOD__.' ERROR:'.$this->db->lasterror(); return -1; } @@ -1381,7 +1376,7 @@ class FormMail extends Form */ public function setSubstitFromObject($object, $outputlangs) { - global $conf, $user; + global $conf, $user, $extrafields; $parameters = array(); $tmparray = getCommonSubstitutionArray($outputlangs, 0, null, $object); @@ -1493,9 +1488,7 @@ class FormMail extends Form if ($conf->commande->enabled) $tmparray['__SECUREKEYPAYMENT_ORDER__'] = 'SecureKeyPAYMENTUniquePerOrder'; if ($conf->contrat->enabled) $tmparray['__SECUREKEYPAYMENT_CONTRACTLINE__'] = 'SecureKeyPAYMENTUniquePerContractLine'; } - } - else - { + } else { /* No need to show into tooltip help, option is not enabled $vars['__SECUREKEYPAYMENT__']=''; $vars['__SECUREKEYPAYMENT_MEMBER__']=''; @@ -1527,9 +1520,9 @@ class ModelMail public $id; /** - * @var string Model mail label - */ - public $label; + * @var string Model mail label + */ + public $label; public $topic; public $content; diff --git a/htdocs/core/class/html.formmargin.class.php b/htdocs/core/class/html.formmargin.class.php index 83923ffa6c7..cf159819764 100644 --- a/htdocs/core/class/html.formmargin.class.php +++ b/htdocs/core/class/html.formmargin.class.php @@ -87,7 +87,7 @@ class FormMargin if (empty($line->pa_ht) && isset($line->fk_fournprice) && !$force_price) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - $product = new ProductFournisseur($db); + $product = new ProductFournisseur($this->db); if ($product->fetch_product_fournisseur_price($line->fk_fournprice)) $line->pa_ht = $product->fourn_unitprice * (1 - $product->fourn_remise_percent / 100); } @@ -118,8 +118,7 @@ class FormMargin //} //else $marginInfos['margin_on_products'] += $pv - $pa; - } - elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '2') { // remise globale considérée comme service + } elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '2') { // remise globale considérée comme service $marginInfos['pa_services'] += $pa; $marginInfos['pv_services'] += $pv; $marginInfos['pa_total'] += $pa; @@ -129,13 +128,11 @@ class FormMargin // $marginInfos['margin_on_services'] += -1 * (abs($pv) - $pa); //else $marginInfos['margin_on_services'] += $pv - $pa; - } - elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '3') { // remise globale prise en compte uniqt sur total + } elseif ($conf->global->MARGIN_METHODE_FOR_DISCOUNT == '3') { // remise globale prise en compte uniqt sur total $marginInfos['pa_total'] += $pa; $marginInfos['pv_total'] += $pv; } - } - else { + } else { $type = $line->product_type ? $line->product_type : $line->fk_product_type; if ($type == 0) { // product $marginInfos['pa_products'] += $pa; @@ -151,8 +148,7 @@ class FormMargin //{ $marginInfos['margin_on_products'] += $pv - $pa; //} - } - elseif ($type == 1) { // service + } elseif ($type == 1) { // service $marginInfos['pa_services'] += $pa; $marginInfos['pv_services'] += $pv; $marginInfos['pa_total'] += $pa; @@ -208,7 +204,7 @@ class FormMargin if (!empty($conf->global->MARGIN_ADD_SHOWHIDE_BUTTON)) // TODO Warning this feature rely on an external js file that may be removed. Using native js function document.cookie should be better { print $langs->trans('ShowMarginInfos').' : '; - $hidemargininfos = $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']; + $hidemargininfos = preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE['DOLUSER_MARGININFO_HIDE_SHOW']); // Clean cookie print ''.img_picto($langs->trans("Disabled"), 'switch_off').''; print ''.img_picto($langs->trans("Enabled"), 'switch_on').''; @@ -228,8 +224,7 @@ class FormMargin print '
'.$langs->trans('SellingPrice').''.$langs->trans('BuyingPrice').''.$langs->trans('CostPrice').''.$langs->trans('CostPrice').''.$langs->trans('Margin').''.$langs->trans('MarginRate').'
'.$langs->trans("SmsFrom").""; //print ''; if ($conf->global->MAIN_SMS_SENDMODE == 'ovh') // For backward compatibility @deprecated { dol_include_once('/ovh/class/ovhsms.class.php'); - try - { + try { $sms = new OvhSms($this->db); if (empty($conf->global->OVHSMS_ACCOUNT)) { $resultsender = 'ErrorOVHSMS_ACCOUNT not defined'; - } - else - { + } else { $resultsender = $sms->SmsSenderList(); } - } - catch (Exception $e) + } catch (Exception $e) { dol_print_error('', 'Error to get list of senders: '.$e->getMessage()); } - } - elseif (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' + } elseif (!empty($conf->global->MAIN_SMS_SENDMODE)) // $conf->global->MAIN_SMS_SENDMODE looks like a value 'class@module' { $tmp = explode('@', $conf->global->MAIN_SMS_SENDMODE); $classfile = $tmp[0]; $module = (empty($tmp[1]) ? $tmp[0] : $tmp[1]); dol_include_once('/'.$module.'/class/'.$classfile.'.class.php'); - try - { + try { $classname = ucfirst($classfile); if (class_exists($classname)) { $sms = new $classname($this->db); $resultsender = $sms->SmsSenderList(); - } - else - { + } else { $sms = new stdClass(); $sms->error = 'The SMS manager "'.$classfile.'" defined into SMS setup MAIN_SMS_SENDMODE is not found'; } - } - catch (Exception $e) + } catch (Exception $e) { dol_print_error('', 'Error to get list of senders: '.$e->getMessage()); exit; } - } - else - { + } else { dol_syslog("Warning: The SMS sending method has not been defined into MAIN_SMS_SENDMODE", LOG_WARNING); $resultsender = array(); $resultsender[0]->number = $this->fromsms; @@ -255,9 +240,7 @@ function limitChars(textarea, limit, infodiv) print ''; } print ''; - } - else - { + } else { print ''.$langs->trans("SmsNoPossibleSenderFound"); if (is_object($sms) && !empty($sms->error)) print ' '.$sms->error; print ''; @@ -278,9 +261,7 @@ function limitChars(textarea, limit, infodiv) if ($this->withtoreadonly) { print (!is_array($this->withto) && !is_numeric($this->withto)) ? $this->withto : ""; - } - else - { + } else { print "withto) && $this->withto != '1' ? (isset($_REQUEST["sendto"]) ?GETPOST("sendto") : $this->withto) : "+")."\">"; if (!empty($this->withtosocid) && $this->withtosocid > 0) { @@ -317,9 +298,7 @@ function limitChars(textarea, limit, infodiv) { print nl2br($defaultmessage); print ''; - } - else - { + } else { print ''; print '
'.$langs->trans("SmsInfoCharRemain").': '.(160 - dol_strlen($defaultmessage)).'
'; - $this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', '2', 0, 0, 0, 'minwidth150'); + $this->selectTypesTickets((GETPOST('type_code', 'alpha') ? GETPOST('type_code', 'alpha') : $this->type_code), 'type_code', '', 2, 0, 0, 0, 'minwidth200'); + print '
'; + $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', 2, 0, 0, 0, 'minwidth200'); print '
'; - $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2'); - print '
'; - $this->selectGroupTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2'); + $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 0); print '
'; // If public form, display more information @@ -247,6 +247,59 @@ class FormTicket $doleditor->Create(); print '
'.$langs->trans("MailFile").''; + // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript + $out .= ''."\n"; + $out .= ''."\n"; + if (count($listofpaths)) { + foreach ($listofpaths as $key => $val) { + $out .= '
'; + $out .= img_mime($listofnames[$key]).' '.$listofnames[$key]; + if (!$this->withfilereadonly) { + $out .= ' '; + } + $out .= '
'; + } + } else { + $out .= $langs->trans("NoAttachedFiles").'
'; + } + if ($this->withfile == 2) { // Can add other files + $out .= ''; + $out .= ' '; + $out .= ''; + } + $out .= "
'.$langs->trans("CreatedBy").''; @@ -338,7 +391,7 @@ class FormTicket print '
'.$langs->trans("MailFile").''; - // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript - $out .= ''."\n"; - $out .= ''."\n"; - if (count($listofpaths)) { - foreach ($listofpaths as $key => $val) { - $out .= '
'; - $out .= img_mime($listofnames[$key]).' '.$listofnames[$key]; - if (!$this->withfilereadonly) { - $out .= ' '; - } - $out .= '
'; - } - } else { - $out .= $langs->trans("NoAttachedFiles").'
'; - } - if ($this->withfile == 2) { // Can add other files - $out .= ''; - $out .= ' '; - $out .= ''; - } - $out .= "
'; + print '
'; // External users can't send message email if ($user->rights->ticket->write && !$user->socid) { - print ''; } // Private message (not visible by customer/external user) if (!$user->socid) { - print ''; } + // Subject print ''; - $label_title = empty($conf->global->MAIN_APPLICATION_TITLE) ? $mysoc->name : $conf->global->MAIN_APPLICATION_TITLE; - print ''; // Destinataires - print ''; } - // MESSAGE - $defaultmessage=""; + // MESSAGE + $defaultmessage = ""; if (is_object($arraydefaultmessage) && $arraydefaultmessage->content) { $defaultmessage = $arraydefaultmessage->content; } - $defaultmessage = str_replace('\n', "\n", $defaultmessage); + $defaultmessage = str_replace('\n', "\n", $defaultmessage); // Deal with format differences between message and signature (text / HTML) - if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__SIGNATURE__'])) { - $this->substit['__SIGNATURE__'] = dol_nl2br($this->substit['__SIGNATURE__']); - } elseif (!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__SIGNATURE__'])) { + if (dol_textishtml($defaultmessage) && !dol_textishtml($this->substit['__USER_SIGNATURE__'])) { + $this->substit['__USER_SIGNATURE__'] = dol_nl2br($this->substit['__USER_SIGNATURE__']); + } elseif (!dol_textishtml($defaultmessage) && dol_textishtml($this->substit['__USER_SIGNATURE__'])) { $defaultmessage = dol_nl2br($defaultmessage); } if (isset($_POST["message"]) && !$_POST['modelselected']) { @@ -1009,17 +1008,16 @@ class FormTicket $defaultmessage = preg_replace("/^\n+/", "", $defaultmessage); } - print ''; // Signature @@ -1027,13 +1025,11 @@ class FormTicket if ($user->rights->ticket->write && !$user->socid) { $mail_signature = GETPOST('mail_signature') ? GETPOST('mail_signature') : $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE; print ''; } @@ -1041,7 +1037,7 @@ class FormTicket if (!empty($this->withfile)) { $out = ''; $out .= ''; - $out .= '"; $cols++; } - } - else - { + } else { if ($mydate["wday"] == $startday) { echo ""; @@ -255,9 +247,7 @@ function displayBox($selectedDate, $month, $year) if ($thedate == '') { $stoploop = 1; - } - else - { + } else { $mydate = dol_getdate($thedate); if ($firstdate["month"] != $mydate["month"]) $stoploop = 1; } @@ -277,9 +267,7 @@ function displayBox($selectedDate, $month, $year) print $langs->trans("Month".$selectMonth)." "; print sprintf("%02s", $tempDate["mday"]); print ", ".$selectYear; - } - else - { + } else { print "Click a Date"; } ?> diff --git a/htdocs/core/db/Database.interface.php b/htdocs/core/db/Database.interface.php index 3ba3b322e68..898421978db 100644 --- a/htdocs/core/db/Database.interface.php +++ b/htdocs/core/db/Database.interface.php @@ -177,6 +177,14 @@ interface Database */ public function escape($stringtoencode); + /** + * Sanitize a string for SQL forging + * + * @param string $stringtosanitize String to escape + * @return string String escaped + */ + public function sanitize($stringtosanitize); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Get last ID after an insert INSERT diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 2818eff65e2..8af9f7bbc25 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -90,7 +90,7 @@ abstract class DoliDB implements Database public function idate($param) { // TODO GMT $param should be gmt, so we should add tzouptut to 'gmt' - return dol_print_date($param, "%Y-%m-%d %H:%M:%S"); + return dol_print_date($param, "%Y-%m-%d %H:%M:%S", 'tzserver'); } /** @@ -103,6 +103,22 @@ abstract class DoliDB implements Database return $this->lasterrno; } + /** + * Sanitize a string for SQL forging + * + * @param string $stringtosanitize String to escape + * @param int $allowsimplequote Allow simple quote + * @return string String escaped + */ + public function sanitize($stringtosanitize, $allowsimplequote = 0) + { + if ($allowsimplequote) { + return preg_replace('/[^a-z0-9_\-\.,\']/i', '', $stringtosanitize); + } else { + return preg_replace('/[^a-z0-9_\-\.,]/i', '', $stringtosanitize); + } + } + /** * Start transaction * @@ -120,9 +136,7 @@ abstract class DoliDB implements Database dol_syslog('', 0, 1); } return $ret; - } - else - { + } else { $this->transaction_opened++; dol_syslog('', 0, 1); return 1; @@ -146,14 +160,10 @@ abstract class DoliDB implements Database $this->transaction_opened = 0; dol_syslog("COMMIT Transaction".($log ? ' '.$log : ''), LOG_DEBUG); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->transaction_opened--; return 1; } @@ -174,9 +184,7 @@ abstract class DoliDB implements Database $this->transaction_opened = 0; dol_syslog("ROLLBACK Transaction".($log ? ' '.$log : ''), LOG_DEBUG); return $ret; - } - else - { + } else { $this->transaction_opened--; return 1; } @@ -252,9 +260,7 @@ abstract class DoliDB implements Database $i++; } return $return; - } - else - { + } else { return ''; } } @@ -331,7 +337,7 @@ abstract class DoliDB implements Database if ($res) { $results = array(); - if($this->num_rows($res) > 0){ + if ($this->num_rows($res) > 0){ while ($obj = $this->fetch_object($res)){ $results[] = $obj; } diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php deleted file mode 100644 index 667f1986815..00000000000 --- a/htdocs/core/db/mssql.class.php +++ /dev/null @@ -1,1228 +0,0 @@ - - * Copyright (C) 2004-2008 Laurent Destailleur - * Copyright (C) 2005-2007 Regis Houssin - * Copyright (C) 2007 Simon Desee - * Copyright (C) 2015 Cedric GROSS - * - * 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 . - */ - -/** - * \file htdocs/core/db/mssql.class.php - * \brief Fichier de la classe permettant de gerer une base MSSQL - */ - -require_once DOL_DOCUMENT_ROOT.'/core/db/DoliDB.class.php'; - -/** - * Classe de gestion de la database de dolibarr - */ -class DoliDBMssql extends DoliDB -{ - //! Database type - public $type = 'mssql'; - //! Database label - const LABEL = 'MSSQL'; - //! Charset used to force charset when creating database - public $forcecharset = 'latin1'; // Can't be static as it may be forced with a dynamic value - //! Collate used to force collate when creating database - public $forcecollate = 'latin1_swedish_ci'; // Can't be static as it may be forced with a dynamic value - //! Version min database - const VERSIONMIN = '2000'; - /** @var boolean|resource Resultset of last query */ - private $_results; - - /** - * Constructor. - * This create an opened connexion to a database server and eventually to a database - * - * @param string $type Type of database (mysql, pgsql...) - * @param string $host Address of database server - * @param string $user Nom de l'utilisateur autorise - * @param string $pass Mot de passe - * @param string $name Nom de la database - * @param int $port Port of database server - */ - public function __construct($type, $host, $user, $pass, $name = '', $port = 0) - { - global $langs; - - $this->database_user = $user; - $this->database_host = $host; - $this->database_port = $port; - $this->transaction_opened = 0; - - if (!function_exists("mssql_connect")) - { - $this->connected = false; - $this->ok = false; - $this->error = "Mssql PHP functions for using MSSql driver are not available in this version of PHP"; - dol_syslog(get_class($this)."::DoliDBMssql : MSsql PHP functions for using MSsql driver are not available in this version of PHP", LOG_ERR); - return $this->ok; - } - - if (!$host) - { - $this->connected = false; - $this->ok = false; - $this->error = $langs->trans("ErrorWrongHostParameter"); - dol_syslog(get_class($this)."::DoliDBMssql : Erreur Connect, wrong host parameters", LOG_ERR); - return $this->ok; - } - - // Essai connexion serveur - $this->db = $this->connect($host, $user, $pass, $name, $port); - if ($this->db) - { - // Si client connecte avec charset different de celui de la base Dolibarr - // (La base Dolibarr a ete forcee en this->forcecharset a l'install) - $this->connected = true; - $this->ok = true; - } - else - { - // host, login ou password incorrect - $this->connected = false; - $this->ok = false; - $this->error = mssql_get_last_message(); - dol_syslog(get_class($this)."::DoliDBMssql : Erreur Connect mssql_get_last_message=".$this->error, LOG_ERR); - } - - // Si connexion serveur ok et si connexion base demandee, on essaie connexion base - if ($this->connected && $name) - { - if ($this->select_db($name)) - { - $this->database_selected = true; - $this->database_name = $name; - $this->ok = true; - } - else - { - $this->database_selected = false; - $this->database_name = ''; - $this->ok = false; - $this->error = $this->error(); - dol_syslog(get_class($this)."::DoliDBMssql : Erreur Select_db ".$this->error, LOG_ERR); - } - } - else - { - // Pas de selection de base demandee, ok ou ko - $this->database_selected = false; - } - - return $this->ok; - } - - /** - * Convert a SQL request in Mysql syntax to native syntax - * - * @param string $line SQL request line to convert - * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) - * @return string SQL request line converted - */ - public static function convertSQLFromMysql($line, $type = 'ddl') - { - return $line; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Select a database - * - * @param string $database Name of database - * @return boolean true if OK, false if KO - */ - public function select_db($database) - { - // phpcs:enable - return @mssql_select_db($database, $this->db); - } - - /** - * Connexion to server - * - * @param string $host database server host - * @param string $login login - * @param string $passwd password - * @param string $name name of database (not used for mysql, used for pgsql) - * @param int $port Port of database server - * @return false|resource|true Database access handler - * @see close() - */ - public function connect($host, $login, $passwd, $name, $port = 0) - { - dol_syslog(get_class($this)."::connect host=$host, port=$port, login=$login, passwd=--hidden--, name=$name"); - $newhost = $host; - if ($port) $newhost .= ':'.$port; - $this->db = @mssql_connect($newhost, $login, $passwd); - //force les enregistrement en latin1 si la base est en utf8 par defaut - // Supprime car plante sur mon PHP-Mysql. De plus, la base est forcement en latin1 avec - // les nouvelles version de Dolibarr car force par l'install Dolibarr. - //$this->query('SET NAMES '.$this->forcecharset); - //print "Resultat fonction connect: ".$this->db; - $set_options = array('SET ANSI_PADDING ON;', - "SET ANSI_NULLS ON;", - "SET ANSI_WARNINGS ON;", - "SET ARITHABORT ON;", - "SET CONCAT_NULL_YIELDS_NULL ON;", - "SET QUOTED_IDENTIFIER ON;" - ); - mssql_query(implode(' ', $set_options), $this->db); - - return $this->db; - } - - /** - * Return version of database server - * - * @return string Version string - */ - public function getVersion() - { - $resql = $this->query("SELECT @@VERSION"); - if ($resql) - { - $version = $this->fetch_array($resql); - return $version['computed']; - } - else return ''; - } - - /** - * Return version of database client driver - * - * @return string Version string - */ - public function getDriverInfo() - { - return 'php mssql driver'; - } - - /** - * Close database connexion - * - * @return bool True if disconnect successfull, false otherwise - * @see connect() - */ - public function close() - { - if ($this->db) { - if ($this->transaction_opened > 0) dol_syslog(get_class($this)."::close Closing a connection with an opened transaction depth=".$this->transaction_opened, LOG_ERR); - $this->connected = false; - return mssql_close($this->db); - } - return false; - } - - - /** - * Start transaction - * - * @return bool true if transaction successfuly opened or already opened, false if error - */ - public function begin() - { - - $res = mssql_query('select @@TRANCOUNT'); - $this->transaction_opened = mssql_result($res, 0, 0); - - if ($this->transaction_opened == 0) - { - //return 1; //There is a mess with auto_commit and 'SET IMPLICIT_TRANSACTIONS ON' generate also a mess - $ret = mssql_query("SET IMPLICIT_TRANSACTIONS OFF;BEGIN TRANSACTION;", $this->db); - if ($ret) - { - dol_syslog("BEGIN Transaction", LOG_DEBUG); - } - return $ret; - } - else - { - return true; - } - } - - /** - * Validate a database transaction - * - * @param string $log Add more log to default log line - * @return bool true if validation is OK or transaction level no started, false if ERROR - */ - public function commit($log = '') - { - $res = mssql_query('select @@TRANCOUNT'); - $this->transaction_opened = mssql_result($res, 0, 0); - - if ($this->transaction_opened == 1) - { - //return 1; //There is a mess with auto_commit and 'SET IMPLICIT_TRANSACTION ON' generate also a mess - $ret = mssql_query("COMMIT TRANSACTION", $this->db); - if ($ret) - { - dol_syslog("COMMIT Transaction", LOG_DEBUG); - return true; - } - else - { - return false; - } - } - elseif ($this->transaction_opened > 1) - { - return true; - } - trigger_error("Commit requested but no transaction remain"); - return false; - } - - /** - * Annulation d'une transaction et retour aux anciennes valeurs - * - * @param string $log Add more log to default log line - * @return bool true si annulation ok ou transaction non ouverte, false en cas d'erreur - */ - public function rollback($log = '') - { - $res = mssql_query('select @@TRANCOUNT'); - $this->transaction_opened = mssql_result($res, 0, 0); - - if ($this->transaction_opened == 1) - { - $ret = mssql_query("ROLLBACK TRANSACTION", $this->db); - dol_syslog("ROLLBACK Transaction".($log ? ' '.$log : ''), LOG_DEBUG); - return $ret; - } - elseif ($this->transaction_opened > 1) - { - return true; - } - trigger_error("Rollback requested but no transaction remain"); - return false; - } - - /** - * Execute a SQL request and return the resultset - * - * @param string $query SQL query string - * @param int $usesavepoint 0=Default mode, 1=Run a savepoint before and a rollbock to savepoint if error (this allow to have some request with errors inside global transactions). - * Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints. - * @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...) - * @return false|resource|true Resultset of answer - */ - public function query($query, $usesavepoint = 0, $type = 'auto') - { - $query = trim($query); - - if (preg_match('/^--/', $query)) return true; - - // Conversion syntaxe MySql vers MSDE. - $query = str_ireplace("now()", "getdate()", $query); - // Erreur SQL: cannot update timestamp field - $query = str_ireplace(", tms = tms", "", $query); - - $query = preg_replace("/([. ,\t(])(percent|file|public)([. ,=\t)])/", "$1[$2]$3", $query); - - $original_query = ''; - - if ($type == "auto" || $type = 'dml') - { - $query = preg_replace('/AUTO_INCREMENT/i', 'IDENTITY', $query); - $query = preg_replace('/double/i', 'float', $query); - $query = preg_replace('/float\((.*)\)/', 'numeric($1)', $query); - $query = preg_replace('/([ \t])unsigned|IF NOT EXISTS[ \t]/i', '$1', $query); - $query = preg_replace('/([ \t])(MEDIUM|TINY|LONG){0,1}TEXT([ \t,])/i', "$1VARCHAR(MAX)$3", $query); - - $matches = array(); - if (preg_match('/ALTER TABLE\h+(\w+?)\h+ADD\h+(?:(UNIQUE)|INDEX)\h+(?:INDEX)?\h*(\w+?)\h*\((.+)\)/is', $query, $matches)) - { - $original_query = $query; - $query = "CREATE ".trim($matches[2])." INDEX [".trim($matches[3])."] ON [".trim($matches[1])."] (".trim($matches[4]).")"; - if ($matches[2]) { - //check if columun is nullable cause Sql server only allow 1 null value if unique index. - $fields = explode(",", trim($matches[4])); - $fields_clear = array_map('trim', $fields); - $infos = $this->GetFieldInformation(trim($matches[1]), $fields_clear); - $query_comp = array(); - if (is_array($infos)) { - foreach ($infos as $fld) { - if ($fld->IS_NULLABLE == 'YES') { - $query_comp[] = $fld->COLUMN_NAME." IS NOT NULL"; - } - } - } - if (!empty($query_comp)) - $query .= " WHERE ".implode(" AND ", $query_comp); - } - } - else - { - if (preg_match('/ALTER TABLE\h+(\w+?)\h+ADD\h+PRIMARY\h+KEY\h+(\w+?)\h*\((.+)\)/is', $query, $matches)) - { - $original_query = $query; - $query = "ALTER TABLE [".$matches[1]."] ADD CONSTRAINT [".$matches[2]."] PRIMARY KEY CLUSTERED (".$matches[3].")"; - } - } - } - - if ($type == "auto" || $type = 'ddl') - { - $itemfound = stripos($query, " limit "); - if ($itemfound !== false) { - // Extraire le nombre limite - $number = stristr($query, " limit "); - $number = substr($number, 7); - // Inserer l'instruction TOP et le nombre limite - $query = str_ireplace("select ", "select top ".$number." ", $query); - // Supprimer l'instruction MySql - $query = str_ireplace(" limit ".$number, "", $query); - } - - $itemfound = stripos($query, " week("); - if ($itemfound !== false) { - // Recreer une requete sans instruction Mysql - $positionMySql = stripos($query, " week("); - $newquery = substr($query, 0, $positionMySql); - - // Recuperer la date passee en parametre - $extractvalue = stristr($query, " week("); - $extractvalue = substr($extractvalue, 6); - $positionMySql = stripos($extractvalue, ")"); - // Conserver la fin de la requete - $endofquery = substr($extractvalue, $positionMySql); - $extractvalue = substr($extractvalue, 0, $positionMySql); - - // Remplacer l'instruction MySql en Sql Server - // Inserer la date en parametre et le reste de la requete - $query = $newquery." DATEPART(week, ".$extractvalue.$endofquery; - } - if (preg_match('/^insert\h+(?:INTO)?\h*(\w+?)\h*\(.*\b(?:row)?id\b.*\)\h+VALUES/i', $query, $matches)) - { - //var_dump($query); - //var_dump($matches); - //if (stripos($query,'llx_c_departements') !== false) var_dump($query); - $sql = 'SET IDENTITY_INSERT ['.trim($matches[1]).'] ON;'; - @mssql_query($sql, $this->db); - $post_query = 'SET IDENTITY_INSERT ['.trim($matches[1]).'] OFF;'; - } - } - //print ""; - - if (!in_array($query, array('BEGIN', 'COMMIT', 'ROLLBACK'))) - { - $SYSLOG_SQL_LIMIT = 10000; // limit log to 10kb per line to limit DOS attacks - dol_syslog('sql='.substr($query, 0, $SYSLOG_SQL_LIMIT), LOG_DEBUG); - } - - if (!$this->database_name) - { - // Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE) - $ret = mssql_query($query, $this->db); - } - else - { - $ret = mssql_query($query, $this->db); - } - - if (!empty($post_query)) - { - @mssql_query($post_query, $this->db); - } - - if (!preg_match("/^COMMIT/i", $query) && !preg_match("/^ROLLBACK/i", $query)) - { - // Si requete utilisateur, on la sauvegarde ainsi que son resultset - if (!$ret) - { - $result = mssql_query("SELECT @@ERROR as code", $this->db); - $row = mssql_fetch_array($result); - - $this->lastqueryerror = $query; - $this->lasterror = $this->error(); - $this->lasterrno = $row["code"]; - - dol_syslog(get_class($this)."::query SQL Error query: ".$query, LOG_ERR); - if ($original_query) dol_syslog(get_class($this)."::query SQL Original query: ".$original_query, LOG_ERR); - dol_syslog(get_class($this)."::query SQL Error message: ".$this->lasterror." (".$this->lasterrno.")", LOG_ERR); - } - $this->lastquery = $query; - $this->_results = $ret; - } - - return $ret; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Renvoie la ligne courante (comme un objet) pour le curseur resultset - * - * @param resource $resultset Curseur de la requete voulue - * @return object|false Object result line or false if KO or end of cursor - */ - public function fetch_object($resultset) - { - // phpcs:enable - // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion - if (!is_resource($resultset)) { $resultset = $this->_results; } - return mssql_fetch_object($resultset); - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return datas as an array - * - * @param resource $resultset Resultset of request - * @return array|false Array or false if KO or end of cursor - */ - public function fetch_array($resultset) - { - // phpcs:enable - // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion - if (!is_resource($resultset)) { $resultset = $this->_results; } - return mssql_fetch_array($resultset); - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return datas as an array - * - * @param resource $resultset Resultset of request - * @return array|false Array or false if KO or end of cursor - */ - public function fetch_row($resultset) - { - // phpcs:enable - // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion - if (!is_resource($resultset)) { $resultset = $this->_results; } - return @mssql_fetch_row($resultset); - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return number of lines for result of a SELECT - * - * @param resource $resultset Resulset of requests - * @return int Nb of lines - * @see affected_rows() - */ - public function num_rows($resultset) - { - // phpcs:enable - // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion - if (!is_resource($resultset)) { $resultset = $this->_results; } - return mssql_num_rows($resultset); - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return the number of lines in the result of a request INSERT, DELETE or UPDATE - * - * @param resource $resultset Curseur de la requete voulue - * @return int Number of lines - * @see num_rows() - */ - public function affected_rows($resultset) - { - // phpcs:enable - // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion - if (!is_resource($resultset)) { $resultset = $this->_results; } - // mssql necessite un link de base pour cette fonction contrairement - // a pqsql qui prend un resultset - $rsRows = mssql_query("select @@rowcount as rows", $this->db); - return mssql_result($rsRows, 0, "rows"); - //return mssql_affected_rows($this->db); - } - - - /** - * Free last resultset used. - * - * @param resource $resultset Curseur de la requete voulue - * @return bool - */ - public function free($resultset = null) - { - // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion - if (!is_resource($resultset)) { $resultset = $this->_results; } - // Si resultset en est un, on libere la memoire - if (is_resource($resultset)) mssql_free_result($resultset); - } - - /** - * Escape a string to insert data - * - * @param string $stringtoencode String to escape - * @return string String escaped - */ - public function escape($stringtoencode) - { - return addslashes($stringtoencode); - } - - - /** - * Convert (by PHP) a GM Timestamp date into a PHP server TZ to insert into a date field. - * Function to use to build INSERT, UPDATE or WHERE predica - * - * @param string $param Date TMS to convert - * @return string Date in a string YYYY-MM-DD HH:MM:SS - */ - public function idate($param) - { - return dol_print_date($param, "%Y-%m-%d %H:%M:%S"); - } - - /** - * Return generic error code of last operation. - * - * @return string Error code (Exemples: DB_ERROR_TABLE_ALREADY_EXISTS, DB_ERROR_RECORD_ALREADY_EXISTS...) - */ - public function errno() - { - if (!$this->connected) - { - // Si il y a eu echec de connexion, $this->db n'est pas valide. - return 'DB_ERROR_FAILED_TO_CONNECT'; - } - else - { - // Constants to convert a MSSql error code to a generic Dolibarr error code - $errorcode_map = array( - 1004 => 'DB_ERROR_CANNOT_CREATE', - 1005 => 'DB_ERROR_CANNOT_CREATE', - 1006 => 'DB_ERROR_CANNOT_CREATE', - 1007 => 'DB_ERROR_ALREADY_EXISTS', - 1008 => 'DB_ERROR_CANNOT_DROP', - 1025 => 'DB_ERROR_NO_FOREIGN_KEY_TO_DROP', - 1046 => 'DB_ERROR_NODBSELECTED', - 1048 => 'DB_ERROR_CONSTRAINT', - 2714 => 'DB_ERROR_TABLE_ALREADY_EXISTS', - 1051 => 'DB_ERROR_NOSUCHTABLE', - 1054 => 'DB_ERROR_NOSUCHFIELD', - 1060 => 'DB_ERROR_COLUMN_ALREADY_EXISTS', - 1061 => 'DB_ERROR_KEY_NAME_ALREADY_EXISTS', - 2627 => 'DB_ERROR_RECORD_ALREADY_EXISTS', - 102 => 'DB_ERROR_SYNTAX', - 8120 => 'DB_ERROR_GROUP_BY_SYNTAX', - 1068 => 'DB_ERROR_PRIMARY_KEY_ALREADY_EXISTS', - 1075 => 'DB_ERROR_CANT_DROP_PRIMARY_KEY', - 1091 => 'DB_ERROR_NOSUCHFIELD', - 1100 => 'DB_ERROR_NOT_LOCKED', - 1136 => 'DB_ERROR_VALUE_COUNT_ON_ROW', - 1146 => 'DB_ERROR_NOSUCHTABLE', - 1216 => 'DB_ERROR_NO_PARENT', - 1217 => 'DB_ERROR_CHILD_EXISTS', - 1451 => 'DB_ERROR_CHILD_EXISTS', - 1913 => 'DB_ERROR_KEY_NAME_ALREADY_EXISTS' - ); - - if (isset($errorcode_map[$this->lasterrno])) - { - return $errorcode_map[$this->lasterrno]; - } - $errno = $this->lasterrno; - return ($errno ? 'DB_ERROR_'.$errno : '0'); - } - } - - /** - * Return description of last error - * - * @return string Error text - */ - public function error() - { - if (!$this->connected) { - // Si il y a eu echec de connexion, $this->db n'est pas valide pour mssql_get_last_message. - return 'Not connected. Check setup parameters in conf/conf.php file and your mssql client and server versions'; - } - else { - return mssql_get_last_message(); - } - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Get last ID after an insert INSERT - * - * @param string $tab Table name concerned by insert. Ne sert pas sous MySql mais requis pour compatibilite avec Postgresql - * @param string $fieldid Field name - * @return int Id of row or -1 on error - */ - public function last_insert_id($tab, $fieldid = 'rowid') - { - // phpcs:enable - $res = $this->query("SELECT @@IDENTITY as id"); - if ($res && $data = $this->fetch_array($res)) - { - return $data["id"]; - } - else - { - return -1; - } - } - - /** - * Encrypt sensitive data in database - * Warning: This function includes the escape, so it must use direct value - * - * @param string $fieldorvalue Field name or value to encrypt - * @param int $withQuotes Return string with quotes - * @return string XXX(field) or XXX('value') or field or 'value' - */ - public function encrypt($fieldorvalue, $withQuotes = 0) - { - global $conf; - - // Type of encryption (2: AES (recommended), 1: DES , 0: no encryption) - $cryptType = ($conf->db->dolibarr_main_db_encryption ? $conf->db->dolibarr_main_db_encryption : 0); - - //Encryption key - $cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey) ? $conf->db->dolibarr_main_db_cryptkey : ''); - - $return = $fieldorvalue; - return ($withQuotes ? "'" : "").$this->escape($return).($withQuotes ? "'" : ""); - } - - /** - * Decrypt sensitive data in database - * - * @param string $value Value to decrypt - * @return string Decrypted value if used - */ - public function decrypt($value) - { - global $conf; - - // Type of encryption (2: AES (recommended), 1: DES , 0: no encryption) - $cryptType = ($conf->db->dolibarr_main_db_encryption ? $conf->db->dolibarr_main_db_encryption : 0); - - //Encryption key - $cryptKey = (!empty($conf->db->dolibarr_main_db_cryptkey) ? $conf->db->dolibarr_main_db_cryptkey : ''); - - $return = $value; - return $return; - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return connexion ID - * - * @return string Id connexion - */ - public function DDLGetConnectId() - { - // phpcs:enable - $resql = $this->query('SELECT CONNECTION_ID()'); - if ($resql) - { - $row = $this->fetch_row($resql); - return $row[0]; - } - else return '?'; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Create a new database - * Do not use function xxx_create_db (xxx=mysql, ...) as they are deprecated - * We force to create database with charset this->forcecharset and collate this->forcecollate - * - * @param string $database Database name to create - * @param string $charset Charset used to store data - * @param string $collation Charset used to sort data - * @param string $owner Username of database owner - * @return false|resource|true resource defined if OK, false if KO - */ - public function DDLCreateDb($database, $charset = '', $collation = '', $owner = '') - { - // phpcs:enable - /*if (empty($charset)) $charset=$this->forcecharset; - if (empty($collation)) $collation=$this->forcecollate; - */ - - $sql = 'CREATE DATABASE '.$this->EscapeFieldName($database); - //TODO: Check if we need to force a charset - //$sql.= ' DEFAULT CHARACTER SET '.$charset.' DEFAULT COLLATE '.$collation; - $ret = $this->query($sql); - - $this->select_db($database); - $sql = "CREATE USER [$owner] FOR LOGIN [$owner]"; - mssql_query($sql, $this->db); - $sql = "ALTER ROLE [db_owner] ADD MEMBER [$owner]"; - mssql_query($sql, $this->db); - - $sql = "ALTER DATABASE [$database] SET ANSI_NULL_DEFAULT ON;"; - @mssql_query($sql, $this->db); - $sql = "ALTER DATABASE [$database] SET ANSI_NULL ON;"; - @mssql_query($sql, $this->db); - - return $ret; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * List tables into a database - * - * @param string $database Name of database - * @param string $table Nmae of table filter ('xxx%') - * @return array List of tables in an array - */ - public function DDLListTables($database, $table = '') - { - // phpcs:enable - $v = mssql_query("Select name from sysobjects where type like 'u'", $this->db); - $this->_results = mssql_fetch_array($v); - return $this->_results; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * List information of columns into a table. - * - * @param string $table Name of table - * @return array Tableau des informations des champs de la table - */ - public function DDLInfoTable($table) - { - // phpcs:enable - - // FIXME: Dummy method - // TODO: Implement - // May help: https://stackoverflow.com/questions/600446/sql-server-how-do-you-return-the-column-names-from-a-table - - $infotables = array(); - return $infotables; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Create a table into database - * - * @param string $table Nom de la table - * @param array $fields Tableau associatif [nom champ][tableau des descriptions] - * @param string $primary_key Nom du champ qui sera la clef primaire - * @param string $type Type de la table - * @param array $unique_keys Tableau associatifs Nom de champs qui seront clef unique => valeur - * @param array $fulltext_keys Tableau des Nom de champs qui seront indexes en fulltext - * @param array $keys Tableau des champs cles noms => valeur - * @return int <0 if KO, >=0 if OK - */ - public function DDLCreateTable($table, $fields, $primary_key, $type, $unique_keys = null, $fulltext_keys = null, $keys = null) - { - // phpcs:enable - // FIXME: $fulltext_keys parameter is unused - - $sqlfields = array(); - $sqluq = array(); - $sqlk = array(); - - // cles recherchees dans le tableau des descriptions (fields) : type,value,attribute,null,default,extra - // ex. : $fields['rowid'] = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment'); - $sql = "create table ".$table."("; - $i = 0; - foreach ($fields as $field_name => $field_desc) - { - $sqlfields[$i] = $field_name." "; - $sqlfields[$i] .= $field_desc['type']; - if (preg_match("/^[^\s]/i", $field_desc['value'])) - $sqlfields[$i] .= "(".$field_desc['value'].")"; - elseif (preg_match("/^[^\s]/i", $field_desc['attribute'])) - $sqlfields[$i] .= " ".$field_desc['attribute']; - elseif (preg_match("/^[^\s]/i", $field_desc['default'])) - { - if (preg_match("/null/i", $field_desc['default'])) - $sqlfields[$i] .= " default ".$field_desc['default']; - else - $sqlfields[$i] .= " default '".$field_desc['default']."'"; - } - elseif (preg_match("/^[^\s]/i", $field_desc['null'])) - $sqlfields[$i] .= " ".$field_desc['null']; - - elseif (preg_match("/^[^\s]/i", $field_desc['extra'])) - $sqlfields[$i] .= " ".$field_desc['extra']; - $i++; - } - if ($primary_key != "") - $pk = "primary key(".$primary_key.")"; - - if (is_array($unique_keys)) - { - $i = 0; - foreach ($unique_keys as $key => $value) - { - $sqluq[$i] = "UNIQUE KEY '".$key."' ('".$value."')"; - $i++; - } - } - if (is_array($keys)) - { - $i = 0; - foreach ($keys as $key => $value) - { - $sqlk[$i] = "KEY ".$key." (".$value.")"; - $i++; - } - } - $sql .= implode(',', $sqlfields); - if ($primary_key != "") - $sql .= ",".$pk; - if (is_array($unique_keys)) - $sql .= ",".implode(',', $sqluq); - if (is_array($keys)) - $sql .= ",".implode(',', $sqlk); - $sql .= ") type=".$type; - - dol_syslog($sql); - if (!$this -> query($sql)) - return -1; - else - return 1; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Drop a table into database - * - * @param string $table Name of table - * @return int <0 if KO, >=0 if OK - */ - public function DDLDropTable($table) - { - // phpcs:enable - $sql = "DROP TABLE ".$table; - - if (!$this->query($sql)) - return -1; - else - return 1; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return a pointer of line with description of a table or field - * - * @param string $table Name of table - * @param string $field Optionnel : Name of field if we want description of field - * @return false|resource|true Resource - */ - public function DDLDescTable($table, $field = "") - { - // phpcs:enable - $sql = "DESC ".$table." ".$field; - - dol_syslog($sql); - $this->_results = $this->query($sql); - return $this->_results; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Create a new field into table - * - * @param string $table Name of table - * @param string $field_name Name of field to add - * @param string $field_desc Tableau associatif de description du champ a inserer[nom du parametre][valeur du parametre] - * @param string $field_position Optionnel ex.: "after champtruc" - * @return int <0 if KO, >0 if OK - */ - public function DDLAddField($table, $field_name, $field_desc, $field_position = "") - { - // phpcs:enable - // cles recherchees dans le tableau des descriptions (field_desc) : type,value,attribute,null,default,extra - // ex. : $field_desc = array('type'=>'int','value'=>'11','null'=>'not null','extra'=> 'auto_increment'); - $sql = "ALTER TABLE ".$table." ADD ".$field_name." "; - $sql .= $field_desc['type']; - if (preg_match("/^[^\s]/i", $field_desc['value'])) - $sql .= "(".$field_desc['value'].")"; - if (preg_match("/^[^\s]/i", $field_desc['attribute'])) - $sql .= " ".$field_desc['attribute']; - if (preg_match("/^[^\s]/i", $field_desc['null'])) - $sql .= " ".$field_desc['null']; - if (preg_match("/^[^\s]/i", $field_desc['default'])) - if (preg_match("/null/i", $field_desc['default'])) - $sql .= " default ".$field_desc['default']; - else - $sql .= " default '".$field_desc['default']."'"; - if (preg_match("/^[^\s]/i", $field_desc['extra'])) - $sql .= " ".$field_desc['extra']; - $sql .= " ".$field_position; - - if (!$this -> query($sql)) - return -1; - else - return 1; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Update format of a field into a table - * - * @param string $table Name of table - * @param string $field_name Name of field to modify - * @param string $field_desc Array with description of field format - * @return int <0 if KO, >0 if OK - */ - public function DDLUpdateField($table, $field_name, $field_desc) - { - // phpcs:enable - $sql = "ALTER TABLE ".$table; - $sql .= " MODIFY COLUMN ".$field_name." ".$field_desc['type']; - if ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int' || $field_desc['type'] == 'varchar') { - $sql .= "(".$field_desc['value'].")"; - } - - dol_syslog($sql, LOG_DEBUG); - if (!$this->query($sql)) - return -1; - else - return 1; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Drop a field from table - * - * @param string $table Name of table - * @param string $field_name Name of field to drop - * @return int <0 if KO, >0 if OK - */ - public function DDLDropField($table, $field_name) - { - // phpcs:enable - $sql = "ALTER TABLE ".$table." DROP COLUMN `".$field_name."`"; - dol_syslog($sql, LOG_DEBUG); - if (!$this->query($sql)) - { - $this->error = $this->lasterror(); - return -1; - } - else return 1; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Create a user and privileges to connect to database (even if database does not exists yet) - * - * @param string $dolibarr_main_db_host Ip serveur - * @param string $dolibarr_main_db_user Nom user a creer - * @param string $dolibarr_main_db_pass Mot de passe user a creer - * @param string $dolibarr_main_db_name Database name where user must be granted - * @return int <0 if KO, >=0 if OK - */ - public function DDLCreateUser($dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_pass, $dolibarr_main_db_name) - { - // phpcs:enable - $sql = "CREATE LOGIN ".$this->EscapeFieldName($dolibarr_main_db_user)." WITH PASSWORD='$dolibarr_main_db_pass'"; - dol_syslog(get_class($this)."::DDLCreateUser", LOG_DEBUG); // No sql to avoid password in log - $resql = $this->query($sql); - if (!$resql) - { - if ($this->lasterrno != '15025') - { - return -1; - } - else - { - // If user already exists, we continue to set permissions - dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING); - } - } - $sql = "SELECT name from sys.databases where name='".$dolibarr_main_db_name."'"; - $ressql = $this->query($sql); - if (!$ressql) - { - dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING); - return -1; - } - else - { - if ($num) - { - $this->select_db($dolibarr_main_db_name); - $sql = "CREATE USER [$dolibarr_main_db_user] FOR LOGIN [$dolibarr_main_db_user]"; - $this->query($sql); - $sql = "ALTER ROLE [db_owner] ADD MEMBER [$dolibarr_main_db_user]"; - $this->query($sql); - } - } - return 1; - } - - /** - * Return charset used to store data in database - * - * @return string Charset - */ - public function getDefaultCharacterSetDatabase() - { - // FIXME: Dummy method - // TODO: Implement - - return ''; - } - - /** - * Return list of available charset that can be used to store data in database - * - * @return array List of Charset - */ - public function getListOfCharacterSet() - { - // FIXME: Dummy method - // TODO: Implement - - return ''; - } - - /** - * Return collation used in database - * - * @return string Collation value - */ - public function getDefaultCollationDatabase() - { - $resql = $this->query("SELECT SERVERPROPERTY('collation')"); - if (!$resql) - { - return $this->forcecollate; - } - $liste = $this->fetch_array($resql); - return $liste['computed']; - } - - /** - * Return list of available collation that can be used for database - * - * @return array Liste of Collation - */ - public function getListOfCollation() - { - // FIXME: Dummy method - // TODO: Implement - - return array(); - } - - /** - * Return full path of dump program - * - * @return string Full path of dump program - */ - public function getPathOfDump() - { - // FIXME: Dummy method - // TODO: Implement - - return ''; - } - - /** - * Return full path of restore program - * - * @return string Full path of restore program - */ - public function getPathOfRestore() - { - // FIXME: Dummy method - // TODO: Implement - - return ''; - } - - /** - * Return value of server parameters - * - * @param string $filter Filter list on a particular value - * @return array Array of key-values (key=>value) - */ - public function getServerParametersValues($filter = '') - { - // FIXME: Dummy method - // TODO: Implement - // May help: SELECT SERVERPROPERTY - - $result = array(); - return $result; - } - - /** - * Return value of server status - * - * @param string $filter Filter list on a particular value - * @return array Array of key-values (key=>value) - */ - public function getServerStatusValues($filter = '') - { - // FIXME: Dummy method - // TODO: Implement - // May help: http://www.experts-exchange.com/Database/MS-SQL-Server/Q_20971756.html - - return array(); - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Escape a field name according to escape's syntax - * - * @param string $fieldname Field's name to escape - * @return string field's name escaped - */ - public function EscapeFieldName($fieldname) - { - // phpcs:enable - return "[".$fieldname."]"; - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Get information on field - * - * @param string $table Table name which contains fields - * @param mixed $fields String for one field or array of string for multiple field - * @return false|object - */ - public function GetFieldInformation($table, $fields) - { - // phpcs:enable - $sql = "SELECT * from INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='".$this->escape($table)."' AND COLUMN_NAME"; - if (is_array($fields)) - { - $where = " IN ('".implode("','", $fields)."')"; - } - else - { - $where = "='".$this->escape($fields)."'"; - } - $result = array(); - $ret = mssql_query($sql.$where, $this->db); - if ($ret) - { - while ($obj = mssql_fetch_object($ret)) - { - $result[] = $obj; - } - } - else - return false; - - return $result; - } -} diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 719e34c5df9..e3687f7f405 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -121,18 +121,14 @@ class DoliDBMysqli extends DoliDB if (!preg_match('/general/', $collation)) $this->db->query("SET collation_connection = ".$collation); } - } - else - { + } else { $this->database_selected = false; $this->database_name = ''; $this->ok = false; $this->error = $this->error(); dol_syslog(get_class($this)."::DoliDBMysqli : Select_db error ".$this->error, LOG_ERR); } - } - else - { + } else { // Pas de selection de base demandee, ok ou ko $this->database_selected = false; @@ -269,9 +265,7 @@ class DoliDBMysqli extends DoliDB { // Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE) $ret = $this->db->query($query); - } - else - { + } else { $ret = $this->db->query($query); } @@ -341,9 +335,7 @@ class DoliDBMysqli extends DoliDB { if (!is_object($resultset)) { $resultset = $this->_results; } return $resultset->fetch_row(); - } - else - { + } else { // si le curseur est un booleen on retourne la valeur 0 return 0; } @@ -471,8 +463,7 @@ class DoliDBMysqli extends DoliDB if (!$this->connected) { // Si il y a eu echec de connexion, $this->db n'est pas valide pour mysqli_error. return 'Not connected. Check setup parameters in conf/conf.php file and your mysql client and server versions'; - } - else { + } else { return $this->db->error; } } @@ -517,8 +508,7 @@ class DoliDBMysqli extends DoliDB if ($cryptType == 2) { $return = 'AES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; - } - elseif ($cryptType == 1) + } elseif ($cryptType == 1) { $return = 'DES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } @@ -550,8 +540,7 @@ class DoliDBMysqli extends DoliDB if ($cryptType == 2) { $return = 'AES_DECRYPT('.$value.',\''.$cryptKey.'\')'; - } - elseif ($cryptType == 1) + } elseif ($cryptType == 1) { $return = 'DES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } @@ -575,8 +564,7 @@ class DoliDBMysqli extends DoliDB { $row = $this->fetch_row($resql); return $row[0]; - } - else return '?'; + } else return '?'; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -704,9 +692,8 @@ class DoliDBMysqli extends DoliDB { if ((preg_match("/null/i", $field_desc['default'])) || (preg_match("/CURRENT_TIMESTAMP/i", $field_desc['default']))) { $sqlfields[$i] .= " default ".$field_desc['default']; - } - else { - $sqlfields[$i] .= " default '".$field_desc['default']."'"; + } else { + $sqlfields[$i] .= " default '".$this->escape($field_desc['default'])."'"; } } if (preg_match("/^[^\s]/i", $field_desc['null'])) { @@ -724,7 +711,7 @@ class DoliDBMysqli extends DoliDB $i = 0; foreach ($unique_keys as $key => $value) { - $sqluq[$i] = "UNIQUE KEY '".$key."' ('".$value."')"; + $sqluq[$i] = "UNIQUE KEY '".$key."' ('".$this->escape($value)."')"; $i++; } } @@ -748,8 +735,7 @@ class DoliDBMysqli extends DoliDB if (!$this->query($sql)) return -1; - else - return 1; + else return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -766,8 +752,7 @@ class DoliDBMysqli extends DoliDB if (!$this->query($sql)) return -1; - else - return 1; + else return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -824,8 +809,7 @@ class DoliDBMysqli extends DoliDB { if (preg_match("/null/i", $field_desc['default'])) $sql .= " default ".$field_desc['default']; - else - $sql .= " default '".$field_desc['default']."'"; + else $sql .= " default '".$this->escape($field_desc['default'])."'"; } if (isset($field_desc['extra']) && preg_match("/^[^\s]/i", $field_desc['extra'])) { @@ -864,8 +848,7 @@ class DoliDBMysqli extends DoliDB { $sqlbis = "UPDATE ".$table." SET ".$field_name." = '".$this->escape($field_desc['default'] ? $field_desc['default'] : '')."' WHERE ".$field_name." IS NULL"; $this->query($sqlbis); - } - elseif ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') + } elseif ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') { $sqlbis = "UPDATE ".$table." SET ".$field_name." = ".((int) $this->escape($field_desc['default'] ? $field_desc['default'] : 0))." WHERE ".$field_name." IS NULL"; $this->query($sqlbis); @@ -883,8 +866,7 @@ class DoliDBMysqli extends DoliDB dol_syslog(get_class($this)."::DDLUpdateField ".$sql, LOG_DEBUG); if (!$this->query($sql)) return -1; - else - return 1; + else return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -929,9 +911,7 @@ class DoliDBMysqli extends DoliDB if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS') { return -1; - } - else - { + } else { // If user already exists, we continue to set permissions dol_syslog(get_class($this)."::DDLCreateUser sql=".$sql, LOG_WARNING); } diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 08b23156f64..d24b4e98189 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -104,9 +104,7 @@ class DoliDBPgsql extends DoliDB { $this->connected = true; $this->ok = true; - } - else - { + } else { // host, login ou password incorrect $this->connected = false; $this->ok = false; @@ -122,18 +120,14 @@ class DoliDBPgsql extends DoliDB $this->database_selected = true; $this->database_name = $name; $this->ok = true; - } - else - { + } else { $this->database_selected = false; $this->database_name = ''; $this->ok = false; $this->error = $this->error(); dol_syslog(get_class($this)."::DoliDBPgsql : Erreur Select_db ".$this->error, LOG_ERR); } - } - else - { + } else { // Pas de selection de base demandee, ok ou ko $this->database_selected = false; } @@ -240,8 +234,11 @@ class DoliDBPgsql extends DoliDB // on update defaulted by now $line = preg_replace('/(\s*)tms(\s*)timestamp/i', '\\1tms timestamp without time zone DEFAULT now() NOT NULL', $line); + // nuke DEFAULT CURRENT_TIMESTAMP + $line = preg_replace('/(\s*)DEFAULT(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); + // nuke ON UPDATE CURRENT_TIMESTAMP - $line = preg_replace('/(\s*)on(\s*)update(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); + $line = preg_replace('/(\s*)ON(\s*)UPDATE(\s*)CURRENT_TIMESTAMP/i', '\\1', $line); // unique index(field1,field2) if (preg_match('/unique index\s*\((\w+\s*,\s*\w+)\)/i', $line)) @@ -520,8 +517,7 @@ class DoliDBPgsql extends DoliDB { $query = preg_replace('/([^\'])([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9])/', '\\1\'\\2\'', $query); dol_syslog("Warning: Bad formed request converted into ".$query, LOG_WARNING); - } - else $loop = false; + } else $loop = false; } } @@ -724,8 +720,7 @@ class DoliDBPgsql extends DoliDB if (!$this->connected) { // Si il y a eu echec de connexion, $this->db n'est pas valide. return 'DB_ERROR_FAILED_TO_CONNECT'; - } - else { + } else { // Constants to convert error code to a generic Dolibarr error code $errorcode_map = array( 1004 => 'DB_ERROR_CANNOT_CREATE', @@ -912,7 +907,7 @@ class DoliDBPgsql extends DoliDB $listtables = array(); $like = ''; - if ($table) $like = " AND table_name LIKE '".$table."'"; + if ($table) $like = " AND table_name LIKE '".$this->escape($table)."'"; $result = pg_query($this->db, "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public'".$like." ORDER BY table_name"); if ($result) { @@ -950,7 +945,7 @@ class DoliDBPgsql extends DoliDB $sql .= " '' as \"Privileges\""; $sql .= " FROM information_schema.columns infcol"; $sql .= " WHERE table_schema='public' "; - $sql .= " AND table_name='".$table."'"; + $sql .= " AND table_name='".$this->escape($table)."'"; $sql .= " ORDER BY ordinal_position;"; dol_syslog($sql, LOG_DEBUG); @@ -1000,10 +995,8 @@ class DoliDBPgsql extends DoliDB { if (preg_match("/null/i", $field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; - else - $sqlfields[$i] .= " default '".$field_desc['default']."'"; - } - elseif (preg_match("/^[^\s]/i", $field_desc['null'])) + else $sqlfields[$i] .= " default '".$this->escape($field_desc['default'])."'"; + } elseif (preg_match("/^[^\s]/i", $field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; elseif (preg_match("/^[^\s]/i", $field_desc['extra'])) @@ -1018,7 +1011,7 @@ class DoliDBPgsql extends DoliDB $i = 0; foreach ($unique_keys as $key => $value) { - $sqluq[$i] = "UNIQUE KEY '".$key."' ('".$value."')"; + $sqluq[$i] = "UNIQUE KEY '".$key."' ('".$this->escape($value)."')"; $i++; } } @@ -1043,8 +1036,7 @@ class DoliDBPgsql extends DoliDB dol_syslog($sql, LOG_DEBUG); if (!$this->query($sql)) return -1; - else - return 1; + else return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -1061,8 +1053,7 @@ class DoliDBPgsql extends DoliDB if (!$this->query($sql)) return -1; - else - return 1; + else return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -1102,9 +1093,9 @@ class DoliDBPgsql extends DoliDB public function DDLDescTable($table, $field = "") { // phpcs:enable - $sql = "SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$table."' AND attrelid = typrelid"; + $sql = "SELECT attname FROM pg_attribute, pg_type WHERE typname = '".$this->escape($table)."' AND attrelid = typrelid"; $sql .= " AND attname NOT IN ('cmin', 'cmax', 'ctid', 'oid', 'tableoid', 'xmin', 'xmax')"; - if ($field) $sql .= " AND attname = '".$field."'"; + if ($field) $sql .= " AND attname = '".$this->escape($field)."'"; dol_syslog($sql, LOG_DEBUG); $this->_results = $this->query($sql); @@ -1142,7 +1133,7 @@ class DoliDBPgsql extends DoliDB if (preg_match("/null/i", $field_desc['default'])) { $sql .= " default ".$field_desc['default']; } else { - $sql .= " default '".$field_desc['default']."'"; + $sql .= " default '".$this->escape($field_desc['default'])."'"; } } if (preg_match("/^[^\s]/i", $field_desc['extra'])) { @@ -1181,8 +1172,7 @@ class DoliDBPgsql extends DoliDB { $sqlbis = "UPDATE ".$table." SET ".$field_name." = '".$this->escape($field_desc['default'] ? $field_desc['default'] : '')."' WHERE ".$field_name." IS NULL"; $this->query($sqlbis); - } - elseif ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') + } elseif ($field_desc['type'] == 'tinyint' || $field_desc['type'] == 'int') { $sqlbis = "UPDATE ".$table." SET ".$field_name." = ".((int) $this->escape($field_desc['default'] ? $field_desc['default'] : 0))." WHERE ".$field_name." IS NULL"; $this->query($sqlbis); @@ -1234,8 +1224,7 @@ class DoliDBPgsql extends DoliDB { $liste = $this->fetch_array($resql); return $liste['server_encoding']; - } - else return ''; + } else return ''; } /** @@ -1275,8 +1264,7 @@ class DoliDBPgsql extends DoliDB { $liste = $this->fetch_array($resql); return $liste['lc_collate']; - } - else return ''; + } else return ''; } /** @@ -1315,9 +1303,7 @@ class DoliDBPgsql extends DoliDB if (file_exists('/usr/bin/pg_dump')) { $fullpathofdump = '/usr/bin/pg_dump'; - } - else - { + } else { // TODO L'utilisateur de la base doit etre un superadmin pour lancer cette commande $resql = $this->query('SHOW data_directory'); if ($resql) @@ -1346,9 +1332,7 @@ class DoliDBPgsql extends DoliDB if (file_exists('/usr/bin/'.$tool)) { $fullpathofdump = '/usr/bin/'.$tool; - } - else - { + } else { // TODO L'utilisateur de la base doit etre un superadmin pour lancer cette commande $resql = $this->query('SHOW data_directory'); if ($resql) diff --git a/htdocs/core/db/sqlite3.class.php b/htdocs/core/db/sqlite3.class.php index 2d24c232797..c34b9dddac0 100644 --- a/htdocs/core/db/sqlite3.class.php +++ b/htdocs/core/db/sqlite3.class.php @@ -111,9 +111,7 @@ class DoliDBSqlite3 extends DoliDB $this->addCustomFunction('WEEKDAY'); $this->addCustomFunction('date_format'); //$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - } - else - { + } else { // host, login ou password incorrect $this->connected = false; $this->ok = false; @@ -339,8 +337,7 @@ class DoliDBSqlite3 extends DoliDB //$this->db = new PDO("sqlite:".$dir.'/database_'.$name.'.sdb'); $this->db = new SQLite3($database_name); //$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); - } - catch (Exception $e) + } catch (Exception $e) { $this->error = self::LABEL.' '.$e->getMessage().' current dir='.$database_name; return ''; @@ -423,7 +420,7 @@ class DoliDBSqlite3 extends DoliDB $constraintname = trim($reg[2]); $tablename = trim($reg[1]); - $descTable = $this->db->querySingle("SELECT sql FROM sqlite_master WHERE name='".$tablename."'"); + $descTable = $this->db->querySingle("SELECT sql FROM sqlite_master WHERE name='".$this->escape($tablename)."'"); // 1- Renommer la table avec un nom temporaire $this->query('ALTER TABLE '.$tablename.' RENAME TO tmp_'.$tablename); @@ -467,8 +464,7 @@ class DoliDBSqlite3 extends DoliDB if ($ret) { $ret->queryString = $query; } - } - catch (Exception $e) + } catch (Exception $e) { $this->error = $this->db->lastErrorMsg(); } @@ -553,9 +549,7 @@ class DoliDBSqlite3 extends DoliDB { if (!is_object($resultset)) { $resultset = $this->_results; } return $resultset->fetchArray(SQLITE3_NUM); - } - else - { + } else { // si le curseur est un booleen on retourne la valeur 0 return false; } @@ -641,8 +635,7 @@ class DoliDBSqlite3 extends DoliDB if (!$this->connected) { // Si il y a eu echec de connexion, $this->db n'est pas valide. return 'DB_ERROR_FAILED_TO_CONNECT'; - } - else { + } else { // Constants to convert error code to a generic Dolibarr error code /*$errorcode_map = array( 1004 => 'DB_ERROR_CANNOT_CREATE', @@ -706,8 +699,7 @@ class DoliDBSqlite3 extends DoliDB if (!$this->connected) { // Si il y a eu echec de connexion, $this->db n'est pas valide pour sqlite_error. return 'Not connected. Check setup parameters in conf/conf.php file and your sqlite version'; - } - else { + } else { return $this->error; } } @@ -751,8 +743,7 @@ class DoliDBSqlite3 extends DoliDB if ($cryptType == 2) { $return = 'AES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; - } - elseif ($cryptType == 1) + } elseif ($cryptType == 1) { $return = 'DES_ENCRYPT('.$return.',\''.$cryptKey.'\')'; } @@ -784,8 +775,7 @@ class DoliDBSqlite3 extends DoliDB if ($cryptType == 2) { $return = 'AES_DECRYPT('.$value.',\''.$cryptKey.'\')'; - } - elseif ($cryptType == 1) + } elseif ($cryptType == 1) { $return = 'DES_DECRYPT('.$value.',\''.$cryptKey.'\')'; } @@ -931,10 +921,8 @@ class DoliDBSqlite3 extends DoliDB { if (preg_match("/null/i", $field_desc['default'])) $sqlfields[$i] .= " default ".$field_desc['default']; - else - $sqlfields[$i] .= " default '".$field_desc['default']."'"; - } - elseif (preg_match("/^[^\s]/i", $field_desc['null'])) + else $sqlfields[$i] .= " default '".$this->escape($field_desc['default'])."'"; + } elseif (preg_match("/^[^\s]/i", $field_desc['null'])) $sqlfields[$i] .= " ".$field_desc['null']; elseif (preg_match("/^[^\s]/i", $field_desc['extra'])) @@ -949,7 +937,7 @@ class DoliDBSqlite3 extends DoliDB $i = 0; foreach ($unique_keys as $key => $value) { - $sqluq[$i] = "UNIQUE KEY '".$key."' ('".$value."')"; + $sqluq[$i] = "UNIQUE KEY '".$key."' ('".$this->escape($value)."')"; $i++; } } @@ -991,8 +979,7 @@ class DoliDBSqlite3 extends DoliDB if (!$this->query($sql)) return -1; - else - return 1; + else return 1; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -1043,8 +1030,7 @@ class DoliDBSqlite3 extends DoliDB { if (preg_match("/null/i", $field_desc['default'])) $sql .= " default ".$field_desc['default']; - else - $sql .= " default '".$field_desc['default']."'"; + else $sql .= " default '".$this->escape($field_desc['default'])."'"; } if (preg_match("/^[^\s]/i", $field_desc['extra'])) $sql .= " ".$field_desc['extra']; @@ -1280,8 +1266,7 @@ class DoliDBSqlite3 extends DoliDB $obj = $this->fetch_row($resql); //dol_syslog(get_class($this)."::select_db getServerParametersValues $var=". print_r($obj, true), LOG_DEBUG); $result[$var] = $obj[0]; - } - else { + } else { // TODO Récupérer le message $result[$var] = 'FAIL'; } @@ -1354,12 +1339,11 @@ class DoliDBSqlite3 extends DoliDB if ($y == 0 && $month == 0) return 0; $num = (365 * $y + 31 * ($month - 1) + $day); if ($month <= 2) { - $y--; } - else { + $y--; } else { $num -= floor(($month * 4 + 23) / 10); - } - $temp = floor(($y / 100 + 1) * 3 / 4); - return $num + floor($y / 4) - $temp; + } + $temp = floor(($y / 100 + 1) * 3 / 4); + return $num + floor($y / 4) - $temp; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps diff --git a/htdocs/core/extrafieldsinexport.inc.php b/htdocs/core/extrafieldsinexport.inc.php index 4f85610e657..ae6fdf8bf70 100644 --- a/htdocs/core/extrafieldsinexport.inc.php +++ b/htdocs/core/extrafieldsinexport.inc.php @@ -8,7 +8,8 @@ if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra)) } // Add extra fields -$sql = "SELECT name, label, type, param, fieldcomputed, fielddefault FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = '".$keyforselect."' AND type != 'separate' AND entity IN (0, ".$conf->entity.') ORDER BY pos ASC'; +$sql = "SELECT name, label, type, param, fieldcomputed, fielddefault FROM ".MAIN_DB_PREFIX."extrafields"; +$sql .= " WHERE elementtype = '".$this->db->escape($keyforselect)."' AND type != 'separate' AND entity IN (0, ".$conf->entity.') ORDER BY pos ASC'; //print $sql; $resql = $this->db->query($sql); if ($resql) // This can fail when class is used on old database (during migration for example) @@ -63,8 +64,7 @@ if ($resql) // This can fail when class is used on old database (during migra $this->export_entities_array[$r][$fieldname] = $keyforelement; } // If this is a computed field - else - { + else { $this->export_fields_array[$r][$fieldname] = $fieldlabel; $this->export_TypeFields_array[$r][$fieldname] = $typeFilter.'Compute'; $this->export_special_array[$r][$fieldname] = $obj->fieldcomputed; diff --git a/htdocs/core/filemanagerdol/browser/default/browser.php b/htdocs/core/filemanagerdol/browser/default/browser.php index d1d5d434b5b..8f7ff82ecff 100644 --- a/htdocs/core/filemanagerdol/browser/default/browser.php +++ b/htdocs/core/filemanagerdol/browser/default/browser.php @@ -95,6 +95,10 @@ var sServerPath = GetUrlParam( 'ServerPath' ); if ( sServerPath.length > 0 ) oConnector.ConnectorUrl += 'ServerPath=' + encodeURIComponent( sServerPath ) + '&' ; +/* @CHANGE LDR Overwrite value coming from parameters for security purpose */ +oConnector.ConnectorUrl = ''; +console.log('ConnectorUrl='+oConnector.ConnectorUrl); + oConnector.ResourceType = GetUrlParam( 'Type' ); oConnector.ShowAllTypes = ( oConnector.ResourceType.length == 0 ); diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php index 0f50f33e988..648ab675cfa 100644 --- a/htdocs/core/filemanagerdol/connectors/php/basexml.php +++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php @@ -84,8 +84,8 @@ function CreateXmlFooter() /** * SendError * - * @param integer $number Number - * @param unknown_type $text Text + * @param integer $number Number + * @param string $text Text * @return void */ function SendError($number, $text) @@ -97,9 +97,7 @@ function SendError($number, $text) { SendErrorNode($number, $text); CreateXmlFooter(); - } - else - { + } else { SetXmlHeaders(); dol_syslog('Error: '.$number.' '.$text, LOG_ERR); @@ -127,6 +125,5 @@ function SendErrorNode($number, $text) { if ($text) echo ''; - else - echo ''; + else echo ''; } diff --git a/htdocs/core/filemanagerdol/connectors/php/commands.php b/htdocs/core/filemanagerdol/connectors/php/commands.php index dcc1650d4cd..5590879f8e6 100644 --- a/htdocs/core/filemanagerdol/connectors/php/commands.php +++ b/htdocs/core/filemanagerdol/connectors/php/commands.php @@ -86,8 +86,7 @@ function GetFoldersAndFiles($resourceType, $currentFolder) { if (is_dir($sServerDir.$sFile)) $aFolders[] = ''; - else - { + else { $iFileSize = @filesize($sServerDir.$sFile); if (!$iFileSize) { $iFileSize = 0; @@ -147,8 +146,7 @@ function CreateFolder($resourceType, $currentFolder) if (strpos($sNewFolderName, '..') !== false) $sErrorNumber = '102'; // Invalid folder name. - else - { + else { // Map the virtual path to the local server path of the current folder. $sServerDir = ServerMapFolder($resourceType, $currentFolder, 'CreateFolder'); @@ -171,13 +169,9 @@ function CreateFolder($resourceType, $currentFolder) $sErrorNumber = '110'; break; } - } - else - $sErrorNumber = '103'; + } else $sErrorNumber = '103'; } - } - else - $sErrorNumber = '102'; + } else $sErrorNumber = '102'; // Create the "Error" node. echo ''; @@ -254,9 +248,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') $iCounter++; $sFileName = RemoveExtension($sOriginalFileName).'('.$iCounter.').'.$sExtension; $sErrorNumber = '201'; - } - else - { + } else { move_uploaded_file($oFile['tmp_name'], $sFilePath); if (is_file($sFilePath)) @@ -289,19 +281,14 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') { @unlink($sFilePath); $sErrorNumber = '202'; - } - elseif (isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true) + } elseif (isset($detectHtml) && $detectHtml === -1 && DetectHtml($sFilePath) === true) { @unlink($sFilePath); $sErrorNumber = '202'; } } - } - else - $sErrorNumber = '202'; - } - else - $sErrorNumber = '202'; + } else $sErrorNumber = '202'; + } else $sErrorNumber = '202'; $sFileUrl = CombinePaths(GetResourceTypePath($resourceType, $sCommand), $currentFolder); @@ -314,9 +301,7 @@ function FileUpload($resourceType, $currentFolder, $sCommand, $CKEcallback = '') { // this line already exists so wrap the if block around it SendUploadResults($sErrorNumber, $sFileUrl, $sFileName); - } - else - { + } else { //issue the CKEditor Callback SendCKEditorResults( $CKEcallback, diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php index 2a9ac9f146b..2438882604e 100644 --- a/htdocs/core/filemanagerdol/connectors/php/io.php +++ b/htdocs/core/filemanagerdol/connectors/php/io.php @@ -46,8 +46,7 @@ function GetResourceTypePath($resourceType, $sCommand) if ($sCommand == "QuickUpload") return $Config['QuickUploadPath'][$resourceType]; - else - return $Config['FileTypesPath'][$resourceType]; + else return $Config['FileTypesPath'][$resourceType]; } /** @@ -67,9 +66,7 @@ function GetResourceTypeDirectory($resourceType, $sCommand) // Map the "UserFiles" path to a local directory. return Server_MapPath($Config['QuickUploadPath'][$resourceType]); - } - else - { + } else { if (strlen($Config['FileTypesAbsolutePath'][$resourceType]) > 0) return $Config['FileTypesAbsolutePath'][$resourceType]; @@ -178,9 +175,7 @@ function CreateServerFolder($folderPath, $lastFolder = null) if (isset($Config['ChmodOnFolderCreate']) && !$Config['ChmodOnFolderCreate']) { mkdir($folderPath); - } - else - { + } else { $permissions = '0777'; if (isset($Config['ChmodOnFolderCreate']) && $Config['ChmodOnFolderCreate']) { @@ -202,9 +197,7 @@ function CreateServerFolder($folderPath, $lastFolder = null) ini_restore('error_reporting'); return $sErrorMsg; - } - else - return ''; + } else return ''; } /** diff --git a/htdocs/core/filemanagerdol/connectors/php/util.php b/htdocs/core/filemanagerdol/connectors/php/util.php index 1349ed00dad..b8caad99ee3 100644 --- a/htdocs/core/filemanagerdol/connectors/php/util.php +++ b/htdocs/core/filemanagerdol/connectors/php/util.php @@ -81,18 +81,14 @@ function ConvertToXmlAttribute($value) if (defined('PHP_OS')) { $os = PHP_OS; - } - else - { + } else { $os = php_uname(); } if (strtoupper(substr($os, 0, 3)) === 'WIN' || FindBadUtf8($value)) { return (utf8_encode(htmlspecialchars($value))); - } - else - { + } else { return (htmlspecialchars($value)); } } diff --git a/htdocs/core/get_info.php b/htdocs/core/get_info.php index 1564fc3f9bc..48b957b9e8a 100644 --- a/htdocs/core/get_info.php +++ b/htdocs/core/get_info.php @@ -70,10 +70,8 @@ if (!empty($conf->global->MAIN_APPLICATION_TITLE)) if (preg_match('/\d\.\d/', $appli)) { if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core - } - else $appli .= " ".DOL_VERSION; -} -else $appli .= " ".DOL_VERSION; + } else $appli .= " ".DOL_VERSION; +} else $appli .= " ".DOL_VERSION; if (!empty($conf->global->MAIN_FEATURES_LEVEL)) $appli .= "
".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL; @@ -89,9 +87,7 @@ if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) //$logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1); $logouttext .= ''; $logouttext .= ''; - } - else - { + } else { $logouthtmltext .= $langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]); $logouttext .= img_picto($langs->trans('Logout').":".$langs->trans('Logout'), 'logout_top.png', 'class="login"', 0, 0, 1); } @@ -118,9 +114,8 @@ $result = $hookmanager->executeHooks('printTopRightMenu', $parameters); // Note if (is_numeric($result)) { if (empty($result)) $toprightmenu .= $hookmanager->resPrint; // add - else $toprightmenu = $hookmanager->resPrint; // replace -} -else $toprightmenu .= $result; // For backward compatibility + else $toprightmenu = $hookmanager->resPrint; // replace +} else $toprightmenu .= $result; // For backward compatibility // Link to module builder if (!empty($conf->modulebuilder->enabled)) diff --git a/htdocs/core/get_menudiv.php b/htdocs/core/get_menudiv.php index 92b8dc34a0e..78a96484751 100644 --- a/htdocs/core/get_menudiv.php +++ b/htdocs/core/get_menudiv.php @@ -177,8 +177,7 @@ $(document).ready(function(){ if (empty($user->socid)) // If internal user or not defined { $conf->standard_menu = (empty($conf->global->MAIN_MENU_STANDARD_FORCED) ? (empty($conf->global->MAIN_MENU_STANDARD) ? 'eldy_menu.php' : $conf->global->MAIN_MENU_STANDARD) : $conf->global->MAIN_MENU_STANDARD_FORCED); -} -else // If external user +} else // If external user { $conf->standard_menu = (empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED) ? (empty($conf->global->MAIN_MENUFRONT_STANDARD) ? 'eldy_menu.php' : $conf->global->MAIN_MENUFRONT_STANDARD) : $conf->global->MAIN_MENUFRONT_STANDARD_FORCED); } diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index 9de5ceba476..b71dfc3eeb2 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -516,7 +516,8 @@ function hideMessage(fieldId,message) { /* - * Used by button to set on/off + * Used by button to set on/off. + * Call url then make complementary action (like show/hide, enable/disable or set another option). * * @param string url Url * @param string code Code @@ -525,12 +526,14 @@ function hideMessage(fieldId,message) { * @param int strict Strict * @param int forcereload Force reload * @param int userid User id + * @param string token Token */ -function setConstant(url, code, input, entity, strict, forcereload, userid) { - $.get( url, { +function setConstant(url, code, input, entity, strict, forcereload, userid, token) { + $.post( url, { action: "set", name: code, - entity: entity + entity: entity, + token: token }, function() { console.log("url request success forcereload="+forcereload); @@ -582,11 +585,12 @@ function setConstant(url, code, input, entity, strict, forcereload, userid) { if (forcereload) { location.reload(); } - }); + }).fail(function(error) { location.reload(); }); /* When it fails, we always force reload to have setEventErrorMEssage in session visible */ } /* * Used by button to set on/off + * Call url then make complementary action (like show/hide, enable/disable or set another option). * * @param string url Url * @param string code Code @@ -595,12 +599,14 @@ function setConstant(url, code, input, entity, strict, forcereload, userid) { * @param int strict Strict * @param int forcereload Force reload * @param int userid User id + * @param string token Token */ -function delConstant(url, code, input, entity, strict, forcereload, userid) { - $.get( url, { +function delConstant(url, code, input, entity, strict, forcereload, userid, token) { + $.post( url, { action: "del", name: code, - entity: entity + entity: entity, + token: token }, function() { console.log("url request success forcereload="+forcereload); @@ -648,7 +654,7 @@ function delConstant(url, code, input, entity, strict, forcereload, userid) { if (forcereload) { location.reload(); } - }); + }).fail(function(error) { location.reload(); }); /* When it fails, we always force reload to have setEventErrorMEssage in session visible */ } /* @@ -664,8 +670,9 @@ function delConstant(url, code, input, entity, strict, forcereload, userid) { * @param int noButton noButton * @param int strict Strict * @param int userid User id + * @param string token Token */ -function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton, strict, userid) { +function confirmConstantAction(action, url, code, input, box, entity, yesButton, noButton, strict, userid, token) { var boxConfirm = box; $("#confirm_" + code) .attr("title", boxConfirm.title) @@ -681,9 +688,9 @@ function confirmConstantAction(action, url, code, input, box, entity, yesButton, text : yesButton, click : function() { if (action == "set") { - setConstant(url, code, input, entity, strict, 0, userid); + setConstant(url, code, input, entity, strict, 0, userid, token); } else if (action == "del") { - delConstant(url, code, input, entity, strict, 0, userid); + delConstant(url, code, input, entity, strict, 0, userid, token); } // Close dialog $(this).dialog("close"); @@ -1123,4 +1130,15 @@ $(document).ready(function() { }); +// Force to hide menus when page is inside an iFrame +$(document).ready(function() { + if (window.location !== window.parent.location ) { + console.log("Page is detected to be into an iframe, we hide by CSS the menus"); + // The page is in an iframe + jQuery(".side-nav-vert, .side-nav").hide(); + jQuery(".id-container").css('width', '100%'); + + } +}); + // End of lib_head.js.php diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php index 250eb0231a6..a95e3556405 100644 --- a/htdocs/core/js/lib_notification.js.php +++ b/htdocs/core/js/lib_notification.js.php @@ -39,91 +39,121 @@ if (!($_SERVER['HTTP_REFERER'] === $dolibarr_main_url_root.'/' || $_SERVER['HTTP print 'var login = \''.$_SESSION['dol_login'].'\';'."\n"; print 'var nowtime = Date.now();'; print 'var time_auto_update = '.$conf->global->MAIN_BROWSER_NOTIFICATION_FREQUENCY.';'."\n"; // Always defined - print 'var time_js_next_test = (nowtime + time_auto_update);'."\n"; + print 'var time_js_next_test;'."\n"; ?> /* Check if permission ok */ if (Notification.permission !== "granted") { + console.log("Ask Notification.permission"); Notification.requestPermission() } /* Launch timer */ // We set a delay before launching first test so next check will arrive after the time_auto_update compared to previous one. - var time_first_execution = (time_auto_update - (nowtime - time_js_next_test)) * 1000; //need milliseconds + //var time_first_execution = (time_auto_update + (time_js_next_test - nowtime)) * 1000; //need milliseconds + var time_first_execution = global->MAIN_BROWSER_NOTIFICATION_CHECK_FIRST_EXECUTION); ?>; if (login != '') { - console.log("Launch browser notif check: setTimeout is set to launch 'first_execution' function after a wait of time_first_execution="+time_first_execution+". nowtime (time php page generation) = "+nowtime+" time_js_next_test = "+time_js_next_test+" time_auto_update="+time_auto_update); - setTimeout(first_execution, time_first_execution); + setTimeout(first_execution, time_first_execution * 1000); + time_js_next_test = nowtime + time_first_execution; + console.log("Launch browser notif check: setTimeout is set to launch 'first_execution' function after a wait of time_first_execution="+time_first_execution+". nowtime (time php page generation) = "+nowtime+" time_js_next_check = "+time_js_next_test); } //first run auto check function first_execution() { - console.log("Call first_execution time_auto_update (MAIN_BROWSER_NOTIFICATION_FREQUENCY) = "+time_auto_update); - check_events(); //one check before launching timer to launch other checks - setInterval(check_events, time_auto_update * 1000); //program time to run next check events + console.log("Call first_execution then set repeat time to time_auto_update = MAIN_BROWSER_NOTIFICATION_FREQUENCY = "+time_auto_update); + check_events(); //one check before setting the new time for other checks + setInterval(check_events, time_auto_update * 1000); // Set new time to run next check events } function check_events() { if (Notification.permission === "granted") { - console.log("Call check_events time_js_next_test = date we are looking for event after ="+time_js_next_test); + time_js_next_test += time_auto_update; + console.log("Call ajax to check_events with time_js_next_test = "+time_js_next_test); + $.ajax("", { type: "post", // Usually post or get async: true, - data: {time: time_js_next_test}, + data: { time_js_next_test: time_js_next_test, forcechecknow: 1, token: 'notrequired' }, + dataType: "json", success: function (result) { - var arr = JSON.parse(result); - if (arr.length > 0) { + console.log(result); + var arrayofpastreminders = Object.values(result.pastreminders); + console.log("arrayofpastreminders.length"+arrayofpastreminders.length); + if (arrayofpastreminders && arrayofpastreminders.length > 0) { var audio = null; global->AGENDA_REMINDER_BROWSER_SOUND)) { print 'audio = new Audio(\''.DOL_URL_ROOT.'/theme/common/sound/notification_agenda.wav\');'; } ?> + var listofreminderids = ''; + var noti = [] - $.each(arr, function (index, value) { - var url="notdefined"; - var title="Not defined"; - var body = value['tipo'] + ': ' + value['titulo']; - if (value['type'] == 'agenda' && value['location'] != null && value['location'] != '') { - body += '\n' + value['location']; + $.each(arrayofpastreminders, function (index, value) { + console.log(value); + var url = "notdefined"; + var title = "Not defined"; + var body = value.label; + if (value.type == 'agenda' && value.location != null && value.location != '') { + body += '\n' + value.location; } - if (value['type'] == 'agenda') + if (value.type == 'agenda' && (value.event_date_start_formated != null || value.event_date_start_formated['event_date_start'] != '')) { + body += '\n' + value.event_date_start_formated; + } + + if (value.type == 'agenda') { - url = '' + value['id']; - title = 'trans('Agenda') ?>'; + url = '' + value.id_agenda; + title = 'trans('EventReminder') ?>'; } var extra = { icon: '', + //image: '', body: body, - tag: value['id'] + tag: value.id_agenda, + requireInteraction: true }; // We release the notify - var noti = new Notification(title, extra); + console.log("Send notification on browser"); + noti[index] = new Notification(title, extra); if (index==0 && audio) { audio.play(); } - noti.onclick = function (event) { - console.log("An event to notify on browser was received"); - event.preventDefault(); // prevent the browser from focusing the Notification's tab - window.focus(); - window.open(url, '_blank'); - noti.close(); - }; + + if (noti[index]) { + noti[index].onclick = function (event) { + console.log("A click on notification on browser has been done"); + event.preventDefault(); // prevent the browser from focusing the Notification's tab + window.focus(); + window.open(url, '_blank'); + noti[index].close(); + }; + + listofreminderids = (listofreminderids == '' ? '' : listofreminderids + ',') + value.id_reminder + } }); + + // Update status of all notifications we sent on browser (listofreminderids) + console.log("Flag notification as done for listofreminderids="+listofreminderids); + $.ajax(""+listofreminderids, { + type: "post", // Usually post or get + async: true, + data: { time_js_next_test: time_js_next_test, token: 'notrequired' } + }); + } else { + console.log("No past reminder found, next try at "+time_js_next_test); } } }); } else { - console.log("Cancel check_events. Useless because Notification.permission is "+Notification.permission); + console.log("Cancel check_events. Useless because javascript Notification.permission is "+Notification.permission+" (blocked manualy or web site is not https)."); } - - time_js_next_test += time_auto_update; - console.log('Updated time_js_next_test. New value is '+time_js_next_test); } return nbofextradays="+Math.floor(hours / 24)+" hours="+dt.getHours()); + return Math.floor(hours / 24); } -/* Update total. days = column nb staring from 0 */ +/* Update total. days = column nb starting from 0 */ function updateTotal(days,mode) { console.log('updateTotal days='+days+' mode='+mode); @@ -124,12 +125,15 @@ function updateTotal(days,mode) if (document.getElementById('numberOfFirstLine')) { startline = parseInt(document.getElementById('numberOfFirstLine').value); } + var nbextradays = 0; for (var i=-1; i < nbline; i++) { + /* get value into timespent cell */ + var id='timespent['+i+']['+days+']'; - var taskTime= new Date(0); - var element=document.getElementById(id); - if(element) + var taskTime = new Date(0); + var element = document.getElementById(id); + if (element) { /* alert(element.value);*/ if (element.value) @@ -142,11 +146,16 @@ function updateTotal(days,mode) } if (result >= 0) { - total.setHours(total.getHours()+taskTime.getHours()); + nbextradays = nbextradays + Math.floor((total.getHours()+taskTime.getHours() + result*24) / 24); + //console.log("i="+i+" result="+result); + total.setHours(total.getHours()+taskTime.getHours()); total.setMinutes(total.getMinutes()+taskTime.getMinutes()); + //console.log("i="+i+" nbextradays cumul="+nbextradays+" h="+total.getHours()+" "+taskTime.getHours()); } } - + + /* get value into timeadded cell */ + var id='timeadded['+i+']['+days+']'; var taskTime= new Date(0); var element=document.getElementById(id); @@ -163,8 +172,11 @@ function updateTotal(days,mode) } if (result >= 0) { + nbextradays = nbextradays + Math.floor((total.getHours()+taskTime.getHours() + result*24) / 24); + //console.log("i="+i+" result="+result); total.setHours(total.getHours()+taskTime.getHours()); total.setMinutes(total.getMinutes()+taskTime.getMinutes()); + //console.log("i="+i+" nbextradays cumul="+nbextradays+" h="+total.getHours()+" "+taskTime.getHours()); } } } @@ -223,10 +235,15 @@ function updateTotal(days,mode) stringdays = '0'+stringdays; } + /* Output total in top of column */ + if (total.getHours() || total.getMinutes()) jQuery('.totalDay'+stringdays).addClass("bold"); else jQuery('.totalDay'+stringdays).removeClass("bold"); - jQuery('.totalDay'+stringdays).text(pad(total.getHours())+':'+pad(total.getMinutes())); + var texttoshow = pad(nbextradays * 24 + total.getHours())+':'+pad(total.getMinutes()); + jQuery('.totalDay'+stringdays).text(texttoshow); + /* Output total of all total */ + var totalhour = 0; var totalmin = 0; for (var i=0; i<7; i++) diff --git a/htdocs/core/lib/accounting.lib.php b/htdocs/core/lib/accounting.lib.php index 16b124443da..683d3a87401 100644 --- a/htdocs/core/lib/accounting.lib.php +++ b/htdocs/core/lib/accounting.lib.php @@ -56,7 +56,7 @@ function accounting_prepare_head(AccountingAccount $object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/accountancy/admin/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("Asset"); + $head[$h][1] = $langs->trans("AccountAccounting"); $head[$h][2] = 'card'; $h++; @@ -173,73 +173,133 @@ function length_accounta($accounta) */ function journalHead($nom, $variante, $period, $periodlink, $description, $builddate, $exportlink = '', $moreparam = array(), $calcmode = '', $varlink = '') { - global $langs; + global $langs; - print "\n\n\n"; + print "\n\n\n"; - if (!is_empty($varlink)) $varlink = '?'.$varlink; + if (!is_empty($varlink)) $varlink = '?'.$varlink; - $head = array(); - $h = 0; - $head[$h][0] = $_SERVER["PHP_SELF"].$varlink; - $head[$h][1] = $langs->trans("Journalization"); - $head[$h][2] = 'journal'; + $head = array(); + $h = 0; + $head[$h][0] = $_SERVER["PHP_SELF"].$varlink; + $head[$h][1] = $langs->trans("Journalization"); + $head[$h][2] = 'journal'; - print ''; - print ''; + print ''; + print ''; - dol_fiche_head($head, 'journal'); + dol_fiche_head($head, 'journal'); - foreach ($moreparam as $key => $value) - { - print ''; - } - print '
'; + print '
'; $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ''); print ' '; print ''; @@ -903,29 +904,27 @@ class FormTicket print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); } print '   '; - print ''; - print '   '; + print ''; print '
'; + print '
'; $checkbox_selected = (GETPOST('private_message', 'alpha') == "1" ? ' checked' : ''); print ' '; print ''; - print ''; - print $form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help'); + print ' '.$form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help'); print '
'; + print '
'; //$toolbarname = 'dolibarr_details'; $toolbarname = 'dolibarr_notes'; include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, 70); $doleditor->Create(); - print ''; - if ($user->rights->ticket->write && !$user->socid) { - print $form->textwithpicto('', $langs->trans("TicketMessageHelp"), 1, 'help'); - } - print '
'.$langs->trans("MailFile").''; + $out .= ''; // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript $out .= ''."\n"; $out .= ''; - } - else - { // Default Header Redirect + } else { // Default Header Redirect header('Location: '.$redirect_to); } } @@ -502,9 +498,7 @@ class SimpleOpenID if ($data['is_valid'] == "true") { return true; - } - else - { + } else { return false; } } @@ -554,9 +548,7 @@ class SimpleOpenID { $this->ErrorStore('OPENID_NOSERVERSFOUND'); return false; - } - else - { + } else { dol_syslog(get_class($this).'::sendDiscoveryRequestToGetXRDS found endpoint = '.$server); $this->SetOpenIDServer($server); return $server; diff --git a/htdocs/core/class/rssparser.class.php b/htdocs/core/class/rssparser.class.php index 4ad70ac1f78..c18bfd1d263 100644 --- a/htdocs/core/class/rssparser.class.php +++ b/htdocs/core/class/rssparser.class.php @@ -218,9 +218,7 @@ class RssParser $foundintocache = 1; $this->_lastfetchdate = $filedate; - } - else - { + } else { dol_syslog(get_class($this)."::parser cache file ".$newpathofdestfile." is not found or older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we can't use it."); } } @@ -229,9 +227,7 @@ class RssParser if ($foundintocache) // Cache file found and is not too old { $str = file_get_contents($newpathofdestfile); - } - else - { + } else { try { ini_set("user_agent", "Dolibarr ERP-CRM RSS reader"); ini_set("max_execution_time", $conf->global->MAIN_USE_RESPONSE_TIMEOUT); @@ -244,8 +240,7 @@ class RssParser $context = stream_context_create($opts); $str = file_get_contents($this->_urlRSS, false, $context); - } - catch (Exception $e) { + } catch (Exception $e) { print 'Error retrieving URL '.$this->_urlRSS.' - '.$e->getMessage(); } } @@ -258,9 +253,7 @@ class RssParser //print 'xx'.LIBXML_NOCDATA; libxml_use_internal_errors(false); $rss = simplexml_load_string($str, "SimpleXMLElement", LIBXML_NOCDATA); - } - else - { + } else { if (! function_exists('xml_parser_create')) { $this->error = 'Function xml_parser_create are not supported by your PHP'; return -1; @@ -299,9 +292,7 @@ class RssParser @chmod($newpathofdestfile, octdec($newmask)); $this->_lastfetchdate = $nowgmt; - } - else - { + } else { print 'Error, failed to open file '.$newpathofdestfile.' for write'; } } @@ -330,9 +321,7 @@ class RssParser if (!empty($rss->channel->link)) $this->_link = (string) $rss->channel->link; if (!empty($rss->channel->title)) $this->_title = (string) $rss->channel->title; if (!empty($rss->channel->description)) $this->_description = (string) $rss->channel->description; - } - else - { + } else { //var_dump($rss->channel); if (!empty($rss->channel['language'])) $this->_language = (string) $rss->channel['language']; if (!empty($rss->channel['generator'])) $this->_generator = (string) $rss->channel['generator']; @@ -347,8 +336,7 @@ class RssParser if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) $items = $rss->channel->item; // With simplexml else $items = $rss->items; // With xmlparse //var_dump($items);exit; - } - elseif ($rss->_format == 'atom') + } elseif ($rss->_format == 'atom') { //var_dump($rss); if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) @@ -358,9 +346,7 @@ class RssParser if (!empty($rss->link->href)) $this->_link = (string) $rss->link->href; if (!empty($rss->title)) $this->_title = (string) $rss->title; if (!empty($rss->description)) $this->_description = (string) $rss->description; - } - else - { + } else { //if (!empty($rss->channel['rss_language'])) $this->_language = (string) $rss->channel['rss_language']; if (!empty($rss->channel['generator'])) $this->_generator = (string) $rss->channel['generator']; //if (!empty($rss->channel['rss_copyright'])) $this->_copyright = (string) $rss->channel['rss_copyright']; @@ -370,7 +356,9 @@ class RssParser if (!empty($rss->channel['title'])) $this->_title = (string) $rss->channel['title']; //if (!empty($rss->channel['rss_description'])) $this->_description = (string) $rss->channel['rss_description']; - $this->_imageurl = $this->getAtomImageUrl($rss->channel); + if (!empty($rss->channel)) { + $this->_imageurl = $this->getAtomImageUrl($rss->channel); + } } if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) { $tmprss = xml2php($rss); $items = $tmprss['entry']; @@ -397,9 +385,7 @@ class RssParser $itemPubDate = (string) $item->pubDate; $itemId = ''; $itemAuthor = ''; - } - else - { + } else { $itemLink = (string) $item['link']; $itemTitle = (string) $item['title']; $itemDescription = (string) $item['description']; @@ -417,8 +403,7 @@ class RssParser $itemCategory[] = (string) $cat; } } - } - elseif ($rss->_format == 'atom') + } elseif ($rss->_format == 'atom') { if (!empty($conf->global->EXTERNALRSS_USE_SIMPLEXML)) { @@ -428,9 +413,7 @@ class RssParser $itemPubDate = (string) $item['created']; $itemId = (string) $item['id']; $itemAuthor = (string) ($item['author'] ? $item['author'] : $item['author_name']); - } - else - { + } else { $itemLink = (isset($item['link']) ? (string) $item['link'] : ''); $itemTitle = (string) $item['title']; $itemDescription = $this->getAtomItemDescription($item); @@ -438,8 +421,7 @@ class RssParser $itemId = (string) $item['id']; $itemAuthor = (string) ($item['author'] ? $item['author'] : $item['author_name']); } - } - else print 'ErrorBadFeedFormat'; + } else print 'ErrorBadFeedFormat'; // Add record to result array $this->_rssarray[$i] = array( @@ -459,9 +441,7 @@ class RssParser } return 1; - } - else - { + } else { $this->error = 'ErrorFailedToLoadRSSFile'; return -1; } @@ -501,12 +481,10 @@ class RssParser if ($el == 'rdf') { $this->_format = 'rss'; $this->feed_version = '1.0'; - } - elseif ($el == 'rss') { + } elseif ($el == 'rss') { $this->_format = 'rss'; $this->feed_version = $attrs['version']; - } - elseif ($el == 'feed') { + } elseif ($el == 'feed') { $this->_format = 'atom'; $this->feed_version = $attrs['version']; $this->inchannel = true; @@ -517,8 +495,7 @@ class RssParser if ($el == 'channel') { $this->inchannel = true; - } - elseif ($el == 'item' or $el == 'entry') + } elseif ($el == 'item' or $el == 'entry') { $this->initem = true; if (isset($attrs['rdf:about'])) { @@ -534,9 +511,7 @@ class RssParser $el == 'textinput' ) { $this->intextinput = true; - } - - elseif ( + } elseif ( $this->_format == 'rss' and $this->current_namespace == '' and $el == 'image' ) @@ -575,13 +550,10 @@ class RssParser if (isset($attrs['rel']) && $attrs['rel'] == 'alternate') { $link_el = 'link'; - } - elseif (!isset($attrs['rel'])) + } elseif (!isset($attrs['rel'])) { $link_el = 'link'; - } - else - { + } else { $link_el = 'link_'.$attrs['rel']; } @@ -608,9 +580,7 @@ class RssParser if ($this->_format == 'atom' and $this->incontent) { $this->append_content($text); - } - else - { + } else { $current_el = join('_', array_reverse($this->stack)); $this->append($current_el, $text); } @@ -634,37 +604,30 @@ class RssParser $this->items[] = $this->current_item; $this->current_item = array(); $this->initem = false; - } - elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'textinput') + } elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'textinput') { $this->intextinput = false; - } - elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'image') + } elseif ($this->_format == 'rss' and $this->current_namespace == '' and $el == 'image') { $this->inimage = false; - } - elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS)) + } elseif ($this->_format == 'atom' and in_array($el, $this->_CONTENT_CONSTRUCTS)) { $this->incontent = false; - } - elseif ($el == 'channel' or $el == 'feed') + } elseif ($el == 'channel' or $el == 'feed') { $this->inchannel = false; - } - elseif ($this->_format == 'atom' and $this->incontent) { + } elseif ($this->_format == 'atom' and $this->incontent) { // balance tags properly // note: i don't think this is actually neccessary if ($this->stack[0] == $el) { $this->append_content(""); - } - else { + } else { $this->append_content("<$el />"); } array_shift($this->stack); - } - else { + } else { array_shift($this->stack); } @@ -699,8 +662,7 @@ class RssParser // phpcs:enable if ($this->initem) { $this->concat($this->current_item[$this->incontent], $text); - } - elseif ($this->inchannel) { + } elseif ($this->inchannel) { $this->concat($this->channel[$this->incontent], $text); } } @@ -721,28 +683,21 @@ class RssParser { if ($this->initem) { $this->concat($this->current_item[$this->current_namespace][$el], $text); - } - elseif ($this->inchannel) { + } elseif ($this->inchannel) { $this->concat($this->channel[$this->current_namespace][$el], $text); - } - elseif ($this->intextinput) { + } elseif ($this->intextinput) { $this->concat($this->textinput[$this->current_namespace][$el], $text); - } - elseif ($this->inimage) { + } elseif ($this->inimage) { $this->concat($this->image[$this->current_namespace][$el], $text); } - } - else { + } else { if ($this->initem) { $this->concat($this->current_item[$el], $text); - } - elseif ($this->intextinput) { + } elseif ($this->intextinput) { $this->concat($this->textinput[$el], $text); - } - elseif ($this->inimage) { + } elseif ($this->inimage) { $this->concat($this->image[$el], $text); - } - elseif ($this->inchannel) { + } elseif ($this->inchannel) { $this->concat($this->channel[$el], $text); } } @@ -762,8 +717,7 @@ class RssParser if (isset($item['summary'])) { $result = $item['summary']; - } - elseif (isset($item['atom_content'])) + } elseif (isset($item['atom_content'])) { $result = $item['atom_content']; } @@ -851,14 +805,11 @@ function xml2php($xml) $array[$key][] = $tmp; $array[$key][] = $child; $tab = true; - } - elseif ($tab === true) + } elseif ($tab === true) { //Add an element in an existing array $array[$key][] = $child; - } - else - { + } else { //Add a simple element $array[$key] = $child; } diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index 09a1f7f2949..3adbf4af4d5 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -228,6 +228,21 @@ class SMTPs private $_trackId = ''; private $_moreInHeader = ''; + /** + * An array of options for stream_context_create() + */ + private $_options = []; + + /** + * Set delivery receipt + * + * @param array $_options An array of options for stream_context_create() + * @return void + */ + public function setOptions($_options = []) + { + $this->_options = $_options; + } /** * Set delivery receipt @@ -316,8 +331,7 @@ class SMTPs if ($_part === true) $_retValue = $this->_errorsTo; - else - $_retValue = $this->_errorsTo[$_part]; + else $_retValue = $this->_errorsTo[$_part]; return $_retValue; } @@ -373,17 +387,32 @@ class SMTPs { $this->_setErr(99, $host.' is either offline or is an invalid host name.'); $_retVal = false; - } - else - { - //See if we can connect to the SMTP server - if ($this->socket = @fsockopen( - preg_replace('@tls://@i', '', $this->getHost()), // Host to 'hit', IP or domain + } else { + if (function_exists('stream_socket_client') && !empty($this->_options)) { + $socket_context = stream_context_create($this->_options); // An array of options for stream_context_create() + set_error_handler([$this, 'errorHandler']); + $this->socket = @stream_socket_client( + preg_replace('@tls://@i', '', $this->getHost()) . // Host to 'hit', IP or domain + ':' . $this->getPort(), // which Port number to use + $this->errno, // actual system level error + $this->errstr, // and any text that goes with the error + $this->_smtpTimeout, // timeout for reading/writing data over the socket + STREAM_CLIENT_CONNECT, + $socket_context // Options for connection + ); + } else { + $this->socket = @fsockopen( + preg_replace('@tls://@i', '', $this->getHost()), // Host to 'hit', IP or domain $this->getPort(), // which Port number to use $this->errno, // actual system level error $this->errstr, // and any text that goes with the error $this->_smtpTimeout // timeout for reading/writing data over the socket - )) { + ); + } + + //See if we can connect to the SMTP server + if (is_resource($this->socket)) + { // Fix from PHP SMTP class by 'Chris Ryan' // Sometimes the SMTP server takes a little longer to respond // so we will give it a longer timeout for the first read @@ -395,8 +424,7 @@ class SMTPs $_retVal = $this->socket; } // This connection attempt failed. - else - { + else { // @CHANGE LDR if (empty($this->errstr)) $this->errstr = 'Failed to connect with fsockopen host='.$this->getHost().' port='.$this->getPort(); $this->_setErr($this->errno, $this->errstr); @@ -521,9 +549,7 @@ class SMTPs if (!$_retVal) { $this->_setErr(130, 'Invalid Authentication Credentials.'); } - } - else - { + } else { $this->_setErr(126, '"'.$host.'" does not support authenticated connections.'); } @@ -555,8 +581,7 @@ class SMTPs } // This is a "normal" SMTP Server "handshack" - else - { + else { // Send the RFC821 specified HELO. $host = $this->getHost(); $usetls = preg_match('@tls://@i', $host); @@ -684,8 +709,7 @@ class SMTPs } // Read the Systems php.ini file - else - { + else { // Set these properties ONLY if they are set in the php.ini file. // Otherwise the default values will be used. if ($_host = ini_get('SMTPs')) @@ -952,8 +976,7 @@ class SMTPs if ($_part === true) $_retValue = $this->_msgFrom; - else - $_retValue = $this->_msgFrom[$_part]; + else $_retValue = $this->_msgFrom[$_part]; return $_retValue; } @@ -982,8 +1005,7 @@ class SMTPs if ($_part === true) $_retValue = $this->_msgReplyTo; - else - $_retValue = $this->_msgReplyTo[$_part]; + else $_retValue = $this->_msgReplyTo[$_part]; return $_retValue; } @@ -1017,8 +1039,7 @@ class SMTPs $_addrList = explode(',', $_addrList); // Stick it in an array - else - $_addrList = array($_addrList); + else $_addrList = array($_addrList); } // take the array of addresses and split them further @@ -1039,8 +1060,7 @@ class SMTPs $aryHost[$_tmpHost[1]][$_type][$_tmpHost[0]] = $_tmpaddr[0]; } // We only have an eMail address - else - { + else { // Strip off the beggining '<' $_strAddr = str_replace('<', '', $_strAddr); @@ -1096,9 +1116,7 @@ class SMTPs $_aryEmail['real'] = trim($_tmpAry[0], ' ">'); $_aryEmail['addr'] = $_tmpAry[1]; - } - else - $_aryEmail['addr'] = $_tmpAry[0]; + } else $_aryEmail['addr'] = $_tmpAry[0]; // Pull User Name and Host.tld apart list($_aryEmail['user'], $_aryEmail['host']) = explode('@', $_aryEmail['addr']); @@ -1169,9 +1187,7 @@ class SMTPs { $_realName = '"'.$_realName.'"'; $_RCPT_list[] = $_realName.' <'.$_addr.'@'.$_host.'>'; - } - else - { + } else { $_RCPT_list[] = $_addr.'@'.$_host; } } @@ -1179,15 +1195,11 @@ class SMTPs } return implode(', ', $_RCPT_list); - } - else - { + } else { $this->_setErr(101, 'No eMail Address for message to be sent to.'); return false; } - } - else - { + } else { $this->_setErr(102, 'eMail type not defined.'); return false; } @@ -1320,9 +1332,7 @@ class SMTPs $_header .= 'Message-ID: <'.time().'.SMTPs-dolibarr-'.$trackid.'@'.$host.">\r\n"; $_header .= 'References: <'.time().'.SMTPs-dolibarr-'.$trackid.'@'.$host.">\r\n"; $_header .= 'X-Dolibarr-TRACKID: '.$trackid.'@'.$host."\r\n"; - } - else - { + } else { $_header .= 'Message-ID: <'.time().'.SMTPs@'.$host.">\r\n"; } if (!empty($_SERVER['REMOTE_ADDR'])) $_header .= "X-RemoteAddr: ".$_SERVER['REMOTE_ADDR']."\r\n"; @@ -1369,8 +1379,7 @@ class SMTPs //{ if ($strType == 'html') $strMimeType = 'text/html'; - else - $strMimeType = 'text/plain'; + else $strMimeType = 'text/plain'; // Make RFC821 Compliant, replace bare linefeeds $strContent = preg_replace("/(?_getBoundary('related')."--\r\n"; $content .= "\r\n--".$this->_getBoundary('alternative')."--\r\n"; $content .= "\r\n"; - } - else - { + } else { if (key_exists('image', $this->_msgContent)) { $content .= "Content-Type: text/plain; charset=".$this->getCharSet()."\r\n"; diff --git a/htdocs/core/class/stats.class.php b/htdocs/core/class/stats.class.php index 9620612cb2e..a18bad625e6 100644 --- a/htdocs/core/class/stats.class.php +++ b/htdocs/core/class/stats.class.php @@ -73,9 +73,7 @@ abstract class Stats $foundintocache = 1; $this->lastfetchdate[get_class($this).'_'.__FUNCTION__] = $filedate; - } - else - { + } else { dol_syslog(get_class($this).'::'.__FUNCTION__." cache file ".$newpathofdestfile." is not found or older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we can't use it."); } } @@ -84,9 +82,7 @@ abstract class Stats { dol_syslog(get_class($this).'::'.__FUNCTION__." read data from cache file ".$newpathofdestfile." ".$filedate."."); $data = json_decode(file_get_contents($newpathofdestfile), true); - } - else - { + } else { $year = $startyear; $sm = $startmonth - 1; if ($sm != 0) $year = $year - 1; @@ -170,9 +166,7 @@ abstract class Stats $foundintocache = 1; $this->lastfetchdate[get_class($this).'_'.__FUNCTION__] = $filedate; - } - else - { + } else { dol_syslog(get_class($this).'::'.__FUNCTION__." cache file ".$newpathofdestfile." is not found or older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we can't use it."); } } @@ -182,9 +176,7 @@ abstract class Stats { dol_syslog(get_class($this).'::'.__FUNCTION__." read data from cache file ".$newpathofdestfile." ".$filedate."."); $data = json_decode(file_get_contents($newpathofdestfile), true); - } - else - { + } else { $year = $startyear; $sm = $startmonth - 1; if ($sm != 0) $year = $year - 1; @@ -220,8 +212,7 @@ abstract class Stats fclose($fp); if (!empty($conf->global->MAIN_UMASK)) $newmask = $conf->global->MAIN_UMASK; @chmod($newpathofdestfile, octdec($newmask)); - } - else dol_syslog("Failed to write cache file", LOG_ERR); + } else dol_syslog("Failed to write cache file", LOG_ERR); $this->lastfetchdate[get_class($this).'_'.__FUNCTION__] = $nowgmt; } @@ -299,9 +290,7 @@ abstract class Stats $foundintocache = 1; $this->lastfetchdate[get_class($this).'_'.__FUNCTION__] = $filedate; - } - else - { + } else { dol_syslog(get_class($this).'::'.__FUNCTION__." cache file ".$newpathofdestfile." is not found or older than now - cachedelay (".$nowgmt." - ".$cachedelay.") so we can't use it."); } } @@ -311,9 +300,7 @@ abstract class Stats { dol_syslog(get_class($this).'::'.__FUNCTION__." read data from cache file ".$newpathofdestfile." ".$filedate."."); $data = json_decode(file_get_contents($newpathofdestfile), true); - } - else - { + } else { $data = $this->getAllByProduct($year, $limit); // $data[$i][]=$datay[$year][$i][1]; // set yval for x=i } @@ -366,8 +353,7 @@ abstract class Stats $i++; } $this->db->free($resql); - } - else { + } else { dol_print_error($this->db); } return $result; @@ -410,8 +396,7 @@ abstract class Stats $i++; } $this->db->free($resql); - } - else { + } else { dol_print_error($this->db); } return $result; @@ -449,9 +434,7 @@ abstract class Stats $i++; } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db); } @@ -509,8 +492,7 @@ abstract class Stats $i++; } $this->db->free($resql); - } - else dol_print_error($this->db); + } else dol_print_error($this->db); for ($i = 1; $i < 13; $i++) { @@ -565,8 +547,7 @@ abstract class Stats $i++; } $this->db->free($resql); - } - else dol_print_error($this->db); + } else dol_print_error($this->db); for ($i = 1; $i < 13; $i++) { @@ -620,8 +601,7 @@ abstract class Stats } if ($num > $limit) $result[$i] = array($langs->transnoentitiesnoconv("Other"), $other); $this->db->free($resql); - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return $result; } diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 5cd26e3c75a..184724c0319 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -95,8 +95,7 @@ class Translate $langpref = str_replace("-", "_", $langpref); $langlist = preg_split("/[;,]/", $langpref); $codetouse = preg_replace('/[^_a-zA-Z]/', '', $langlist[0]); - } - else $codetouse = $srclang; + } else $codetouse = $srclang; // We redefine $srclang $langpart = explode("_", $codetouse); @@ -111,10 +110,8 @@ class Translate $srclang = strtolower($langpart[0])."_".strtoupper($langpart[1]); $longforlong = array('no_nb'=>'nb_NO'); if (isset($longforlong[strtolower($srclang)])) $srclang = $longforlong[strtolower($srclang)]; - } - else $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]); - } - else { // If it's for a codetouse that is a short code xx + } else $srclang = strtolower($langpart[0])."_".strtoupper($langpart[0]); + } else { // If it's for a codetouse that is a short code xx // Array to convert short lang code into long code. $longforshort = array('ar'=>'ar_SA', 'el'=>'el_GR', 'ca'=>'ca_ES', 'en'=>'en_US', 'nb'=>'nb_NO', 'no'=>'nb_NO'); if (isset($longforshort[strtolower($langpart[0])])) $srclang = $longforshort[strtolower($langpart[0])]; @@ -304,12 +301,10 @@ class Translate $tabtranslatedomain[$key] = $value; } } - } - elseif ($key[0] == '#') + } elseif ($key[0] == '#') { continue; - } - else { + } else { // Convert some strings: Parse and render carriage returns. Also, change '\\s' into '\s' because transifex sync pull the string '\s' into string '\\s' $this->tab_translate[$key] = str_replace(array('\\n', '\\\\s'), array("\n", '\s'), $value); if ($usecachekey) { @@ -517,21 +512,28 @@ class Translate } } } - } - else - { + } else { dol_print_error($db); } } if ($fileread) $this->_tab_loaded[$newdomain] = 1; // Set domain file as loaded - if (empty($this->_tab_loaded[$newdomain])) $this->_tab_loaded[$newdomain] = 2; // Marque ce cas comme non trouve (no lines found for language) + if (empty($this->_tab_loaded[$newdomain])) $this->_tab_loaded[$newdomain] = 2; // Mark this case as not found (no lines found for language) return 1; } - + /** + * Get information with result of loading data for domain + * + * @param string $domain Domain to check + * @return int 0, 1, 2... + */ + public function isLoaded($domain) + { + return $this->_tab_loaded[$domain]; + } /** * Return translated value of key for special keys ("Currency...", "Civility...", ...). @@ -557,24 +559,19 @@ class Translate if (preg_match('/^Civility([0-9A-Z]+)$/i', $key, $reg)) { $newstr = $this->getLabelFromKey($db, $reg[1], 'c_civility', 'code', 'label'); - } - elseif (preg_match('/^Currency([A-Z][A-Z][A-Z])$/i', $key, $reg)) + } elseif (preg_match('/^Currency([A-Z][A-Z][A-Z])$/i', $key, $reg)) { $newstr = $this->getLabelFromKey($db, $reg[1], 'c_currencies', 'code_iso', 'label'); - } - elseif (preg_match('/^SendingMethod([0-9A-Z]+)$/i', $key, $reg)) + } elseif (preg_match('/^SendingMethod([0-9A-Z]+)$/i', $key, $reg)) { $newstr = $this->getLabelFromKey($db, $reg[1], 'c_shipment_mode', 'code', 'libelle'); - } - elseif (preg_match('/^PaymentTypeShort([0-9A-Z]+)$/i', $key, $reg)) + } elseif (preg_match('/^PaymentTypeShort([0-9A-Z]+)$/i', $key, $reg)) { $newstr = $this->getLabelFromKey($db, $reg[1], 'c_paiement', 'code', 'libelle', '', 1); - } - elseif (preg_match('/^OppStatus([0-9A-Z]+)$/i', $key, $reg)) + } elseif (preg_match('/^OppStatus([0-9A-Z]+)$/i', $key, $reg)) { $newstr = $this->getLabelFromKey($db, $reg[1], 'c_lead_status', 'code', 'label'); - } - elseif (preg_match('/^OrderSource([0-9A-Z]+)$/i', $key, $reg)) + } elseif (preg_match('/^OrderSource([0-9A-Z]+)$/i', $key, $reg)) { // TODO OrderSourceX must be replaced with content of table llx_c_input_reason or llx_c_input_method //$newstr=$this->getLabelFromKey($db,$reg[1],'c_ordersource','code','label'); @@ -641,8 +638,7 @@ class Translate $str = str_replace(array('__lt__', '__gt__', '__quot__'), array('<', '>', '"',), $str); return $str; - } - else // Translation is not available + } else // Translation is not available { //if ($key[0] == '$') { return dol_eval($key,1); } return $this->getTradFromKey($key); @@ -712,9 +708,7 @@ class Translate } return $str; - } - else - { + } else { if ($key[0] == '$') { return dol_eval($key, 1); } return $this->getTradFromKey($key); } @@ -830,9 +824,7 @@ class Translate if ($usecode == 1 || !empty($conf->global->MAIN_SHOW_LANGUAGE_CODE)) { $langs_available[$dir] = $dir.': '.dol_trunc($this->trans('Language_'.$dir), $maxlength); - } - else - { + } else { $langs_available[$dir] = $this->trans('Language_'.$dir); } if ($mainlangonly) { @@ -961,9 +953,7 @@ class Translate $db->free($resql); return $this->cache_labels[$tablename][$key]; - } - else - { + } else { $this->error = $db->lasterror(); return -1; } @@ -1061,9 +1051,7 @@ class Translate array_multisort($label, SORT_ASC, $this->cache_currencies); //var_dump($this->cache_currencies); $this->cache_currencies is now sorted onto label return $num; - } - else - { + } else { dol_print_error($db); return -1; } diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 6dc243d3723..454ace0ebfa 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -133,8 +133,7 @@ class Utils $result = dol_delete_dir_recursive($filesarray[$key]['fullname'], $startcount, 1, 0, $tmpcountdeleted); $count += $result; $countdeleted += $tmpcountdeleted; - } - elseif ($filesarray[$key]['type'] == 'file') + } elseif ($filesarray[$key]['type'] == 'file') { // If (file that is not logfile) or (if mode is logfile) if ($filesarray[$key]['fullname'] != $filelog || $choice == 'logfile') @@ -144,9 +143,7 @@ class Utils { $count++; $countdeleted++; - } - else - { + } else { $counterror++; } } @@ -166,8 +163,7 @@ class Utils { $this->output = $langs->trans("PurgeNDirectoriesDeleted", $countdeleted); if ($count > $countdeleted) $this->output .= '
'.$langs->trans("PurgeNDirectoriesFailed", ($count - $countdeleted)); - } - else $this->output = $langs->trans("PurgeNothingToDelete").($choice == 'tempfilesold' ? ' (older than 24h)' : ''); + } else $this->output = $langs->trans("PurgeNothingToDelete").($choice == 'tempfilesold' ? ' (older than 24h)' : ''); // Recreate temp dir that are not automatically recreated by core code for performance purpose, we need them if (!empty($conf->api->enabled)) @@ -212,7 +208,7 @@ class Utils } // Check type parameter - if ($type == 'auto') $type = $db->type; + if ($type == 'auto') $type = $this->db->type; if (!in_array($type, array('postgresql', 'pgsql', 'mysql', 'mysqli', 'mysqlnobin'))) { $langs->load("errors"); @@ -266,10 +262,8 @@ class Utils if (GETPOST("sql_structure", "alpha") || $usedefault) { if (GETPOST("drop", "alpha") || $usedefault) $param .= " --add-drop-table=TRUE"; - else $param .= " --add-drop-table=FALSE"; - } - else - { + else $param .= " --add-drop-table=FALSE"; + } else { $param .= " -t"; } if (GETPOST("disable-add-locks", "alpha")) $param .= " --add-locks=FALSE"; @@ -282,9 +276,7 @@ class Utils if (GETPOST("delayed", "alpha")) $param .= " --delayed-insert"; if (GETPOST("sql_ignore", "alpha")) $param .= " --insert-ignore"; if (GETPOST("hexforbinary", "alpha") || $usedefault) $param .= " --hex-blob"; - } - else - { + } else { $param .= " -d"; // No row information (no data) } $param .= " --default-character-set=utf8"; // We always save output into utf8 charset @@ -325,9 +317,7 @@ class Utils dol_syslog("Datadump retval after exec=".$retval, LOG_ERR); $errormsg = 'Error '.$retval; $ok = 0; - } - else - { + } else { $i = 0; if (!empty($output_arr)) { @@ -366,9 +356,7 @@ class Utils if (!empty($conf->global->MAIN_UMASK)) @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); - } - else - { + } else { $langs->load("errors"); dol_syslog("Failed to open file ".$outputfile, LOG_ERR); $errormsg = $langs->trans("ErrorFailedToWriteInDir"); @@ -390,9 +378,7 @@ class Utils if ($compression == 'bz') bzclose($handle); if ($ok && preg_match('/^-- (MySql|MariaDB)/i', $errormsg)) { // No error $errormsg = ''; - } - else - { + } else { // Renommer fichier sortie en fichier erreur //print "$outputfile -> $outputerror"; @dol_delete_file($outputerror, 1, 0, 0, null, false, 0); @@ -430,9 +416,7 @@ class Utils $this->backupTables($outputfiletemp); dol_compress_file($outputfiletemp, $outputfile, $compression); unlink($outputfiletemp); - } - else - { + } else { $this->backupTables($outputfile); } @@ -612,15 +596,12 @@ class Utils { try { $moduleobj = new $class($this->db); - } - catch (Exception $e) + } catch (Exception $e) { $error++; dol_print_error($e->getMessage()); } - } - else - { + } else { $error++; $langs->load("errors"); dol_print_error($langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module)); @@ -689,9 +670,7 @@ class Utils if ($filecursor) { fwrite($fhandle, ($i ? "\n<<<\n\n" : "").$filecursor."\n"); - } - else - { + } else { $this->error = 'Failed to concat content of file '.$spec['fullname']; return -1; } @@ -759,25 +738,19 @@ class Utils $result = ($resarray['result'] == 0) ? 1 : 0; chdir($currentdir); - } - else - { + } else { $result = 0; } if ($result > 0) { return 1; - } - else - { + } else { $error++; $langs->load("errors"); $this->error = $langs->trans("ErrorFailToGenerateFile", $outputfiledoc); } - } - else - { + } else { $error++; $langs->load("errors"); $this->error = $langs->trans("ErrorCheckVersionIsDefined"); @@ -934,9 +907,7 @@ class Utils { $tables[] = $row[0]; } - } - else - { + } else { $tables = is_array($tables) ? $tables : explode(',', $tables); } @@ -996,9 +967,7 @@ class Utils if (empty($row2[1])) { fwrite($handle, "\n-- WARNING: Show create table ".$table." return empy string when it should not.\n"); - } - else - { + } else { fwrite($handle, $row2[1].";\n"); //fwrite($handle,"/*!40101 SET character_set_client = @saved_cs_client */;\n\n"); diff --git a/htdocs/core/commonfieldsinexport.inc.php b/htdocs/core/commonfieldsinexport.inc.php index 204a30b4829..a16d6297dd4 100644 --- a/htdocs/core/commonfieldsinexport.inc.php +++ b/htdocs/core/commonfieldsinexport.inc.php @@ -58,9 +58,7 @@ if (class_exists($keyforclass)) $this->export_help_array[$r][$fieldname] = $helpfield; } } -} -else -{ +} else { dol_print_error($this->db, 'Failed to find class '.$keyforclass.', even after the include of '.$keyforclassfile); } // End add common fields diff --git a/htdocs/core/customreports.php b/htdocs/core/customreports.php index 921b3d14bb6..7deb98dbfd5 100644 --- a/htdocs/core/customreports.php +++ b/htdocs/core/customreports.php @@ -54,8 +54,8 @@ if (!defined('USE_CUSTOME_REPORT_AS_INCLUDE')) // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; - $sortfield = GETPOST('sortfield', 'alpha'); - $sortorder = GETPOST('sortorder', 'alpha'); + $sortfield = GETPOST('sortfield', 'aZ09comma'); + $sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -129,8 +129,7 @@ if ($objecttype) { } $ObjectClassName = $arrayoftype[$objecttype]['ObjectClassName']; $object = new $ObjectClassName($db); - } - catch (Exception $e) { + } catch (Exception $e) { print 'Failed to load class for type '.$objecttype; } } @@ -252,12 +251,10 @@ if (is_array($search_groupby) && count($search_groupby)) { if (is_null($obj->val)) { $keytouse = '__NULL__'; $valuetranslated = $langs->transnoentitiesnoconv("NotDefined"); - } - elseif ($obj->val === '') { + } elseif ($obj->val === '') { $keytouse = ''; $valuetranslated = $langs->transnoentitiesnoconv("Empty"); - } - else { + } else { $keytouse = (string) $obj->val; $valuetranslated = $obj->val; } @@ -267,8 +264,7 @@ if (is_array($search_groupby) && count($search_groupby)) { $valuetranslated = $object->fields[$gvalwithoutprefix]['arrayofkeyval'][$obj->val]; if (is_null($valuetranslated)) $valuetranslated = $langs->transnoentitiesnoconv("UndefinedKey"); $valuetranslated = $langs->trans($valuetranslated); - } - elseif (preg_match('/integer:([^:]+):([^:]+)$/', $object->fields[$gvalwithoutprefix]['type'], $regs)) { + } elseif (preg_match('/integer:([^:]+):([^:]+)$/', $object->fields[$gvalwithoutprefix]['type'], $regs)) { $classname = $regs[1]; $classpath = $regs[2]; dol_include_once($classpath); @@ -292,9 +288,17 @@ if (is_array($search_groupby) && count($search_groupby)) { if (count($arrayofvaluesforgroupby['g_'.$gkey]) > $MAXUNIQUEVALFORGROUP) { $langs->load("errors"); + if (strpos($fieldtocount, 'te.') === 0) { + //if (!empty($extrafields->attributes[$object->table_element]['langfile'][$gvalwithoutprefix])) { + // $langs->load($extrafields->attributes[$object->table_element]['langfile'][$gvalwithoutprefix]); + //} + $keyforlabeloffield = $extrafields->attributes[$object->table_element]['label'][$gvalwithoutprefix]; + } else { + $keyforlabeloffield = $object->fields[$gvalwithoutprefix]['label']; + } //var_dump($gkey.' '.$gval.' '.$gvalwithoutprefix); $gvalwithoutprefix = preg_replace('/\-(year|month|day)/', '', $gvalwithoutprefix); - $labeloffield = $langs->transnoentitiesnoconv($object->fields[$gvalwithoutprefix]['label']); + $labeloffield = $langs->transnoentitiesnoconv($keyforlabeloffield); setEventMessages($langs->trans("ErrorTooManyDifferentValueForSelectedGroupBy", $MAXUNIQUEVALFORGROUP, $labeloffield), null, 'warnings'); $search_groupby = array(); } @@ -314,7 +318,7 @@ $startyear = $endyear - 2; $param = ''; print '
'; -print ''; +print ''; print ''; print ''; @@ -456,8 +460,7 @@ if (!empty($search_measures) && !empty($search_xaxis)) } elseif (preg_match('/\-day$/', $val)) { $tmpval = preg_replace('/\-day$/', '', $val); $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d') as x_".$key.', '; - } - else $sql .= $val.' as x_'.$key.', '; + } else $sql .= $val.' as x_'.$key.', '; } foreach ($search_groupby as $key => $val) { if (preg_match('/\-year$/', $val)) { @@ -469,24 +472,20 @@ if (!empty($search_measures) && !empty($search_xaxis)) } elseif (preg_match('/\-day$/', $val)) { $tmpval = preg_replace('/\-day$/', '', $val); $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d') as g_".$key.', '; - } - else $sql .= $val.' as g_'.$key.', '; + } else $sql .= $val.' as g_'.$key.', '; } foreach ($search_measures as $key => $val) { if ($val == 't.count') $sql .= 'COUNT(t.'.$fieldid.') as y_'.$key.', '; elseif (preg_match('/\-sum$/', $val)) { $tmpval = preg_replace('/\-sum$/', '', $val); $sql .= 'SUM('.$db->ifsql($tmpval.' IS NULL', '0', $tmpval).') as y_'.$key.', '; - } - elseif (preg_match('/\-average$/', $val)) { + } elseif (preg_match('/\-average$/', $val)) { $tmpval = preg_replace('/\-average$/', '', $val); $sql .= 'AVG('.$db->ifsql($tmpval.' IS NULL', '0', $tmpval).') as y_'.$key.', '; - } - elseif (preg_match('/\-min$/', $val)) { + } elseif (preg_match('/\-min$/', $val)) { $tmpval = preg_replace('/\-min$/', '', $val); $sql .= 'MIN('.$db->ifsql($tmpval.' IS NULL', '0', $tmpval).') as y_'.$key.', '; - } - elseif (preg_match('/\-max$/', $val)) { + } elseif (preg_match('/\-max$/', $val)) { $tmpval = preg_replace('/\-max$/', '', $val); $sql .= 'MAX('.$db->ifsql($tmpval.' IS NULL', '0', $tmpval).') as y_'.$key.', '; } @@ -524,8 +523,7 @@ if (!empty($search_measures) && !empty($search_xaxis)) } elseif (preg_match('/\-day$/', $val)) { $tmpval = preg_replace('/\-day$/', '', $val); $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d'), "; - } - else $sql .= $val.', '; + } else $sql .= $val.', '; } foreach ($search_groupby as $key => $val) { if (preg_match('/\-year$/', $val)) { @@ -537,8 +535,7 @@ if (!empty($search_measures) && !empty($search_xaxis)) } elseif (preg_match('/\-day$/', $val)) { $tmpval = preg_replace('/\-day$/', '', $val); $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d'), "; - } - else $sql .= $val.', '; + } else $sql .= $val.', '; } $sql = preg_replace('/,\s*$/', '', $sql); $sql .= ' ORDER BY '; @@ -552,8 +549,7 @@ if (!empty($search_measures) && !empty($search_xaxis)) } elseif (preg_match('/\-day$/', $val)) { $tmpval = preg_replace('/\-day$/', '', $val); $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d'), "; - } - else $sql .= $val.', '; + } else $sql .= $val.', '; } foreach ($search_groupby as $key => $val) { if (preg_match('/\-year$/', $val)) { @@ -565,8 +561,7 @@ if (!empty($search_measures) && !empty($search_xaxis)) } elseif (preg_match('/\-day$/', $val)) { $tmpval = preg_replace('/\-day$/', '', $val); $sql .= 'DATE_FORMAT('.$tmpval.", '%Y-%m-%d'), "; - } - else $sql .= $val.', '; + } else $sql .= $val.', '; } $sql = preg_replace('/,\s*$/', '', $sql); } diff --git a/htdocs/core/data/cloud_metadata_for_ssrf_test.txt b/htdocs/core/data/cloud_metadata_for_ssrf_test.txt new file mode 100644 index 00000000000..4d98b656b3c --- /dev/null +++ b/htdocs/core/data/cloud_metadata_for_ssrf_test.txt @@ -0,0 +1,23 @@ +## This file is a list of predefined URLs to block when trying to access them from the application, +## for example when using the grab website feature of module website +## Allowing grabbing local url allow to get metadata. + +10.0.0.0/8 +0.0.0.0/8 +100.64.0.0/10 +127.0.0.0/8 +169.254.0.0/16 +172.16.0.0/12 +192.0.0.0/29 +192.0.2.0/24 +192.88.99.0/24 +192.168.0.0/16 +198.18.0.0/15 +198.51.100.0/24 +203.0.113.0/24 +224.0.0.0/4 +240.0.0.0/4 +metadata.google.internal +100.100.100.200 (Alibaba Metadata) +[::] +[::1] diff --git a/htdocs/core/datepicker.php b/htdocs/core/datepicker.php index 3a75b4bdc90..d3a6d3a01c9 100644 --- a/htdocs/core/datepicker.php +++ b/htdocs/core/datepicker.php @@ -59,9 +59,7 @@ print ''."\n"; if (GETPOST('mode') && GETPOST('mode') == 'test') { print ''."\n"; -} -else -{ +} else { print ''.$langs->trans("Calendar").''; } @@ -109,9 +107,7 @@ if ($qualified) { //print $_GET["cm"].",".$_GET["sd"].",".$_GET["m"].",".$_GET["y"];exit; displayBox(GETPOST("sd", 'alpha'), GETPOST("m", 'int'), GETPOST("y", 'int')); -} -else -{ +} else { dol_print_error('', 'ErrorBadParameters'); } @@ -154,9 +150,7 @@ function displayBox($selectedDate, $month, $year) { $selDate = xyzToUnixTimestamp($selectedDate); $xyz = dol_print_date($selDate, "%Y%m%d"); - } - else - { + } else { $selDate = 0; $xyz = 0; } @@ -220,9 +214,7 @@ function displayBox($selectedDate, $month, $year) echo "
 
'; + foreach ($moreparam as $key => $value) + { + print ''; + } + print '
'; - // Ligne de titre - print ''; - print ''; - print ''; - print ''; + // Ligne de titre + print ''; + print ''; + print ''; + print ''; - // Calculation mode - if ($calcmode) - { - print ''; - print ''; - if (!$variante) print ''; - print ''; - } + // Calculation mode + if ($calcmode) + { + print ''; + print ''; + if (!$variante) print ''; + print ''; + } - // Ligne de la periode d'analyse du rapport - print ''; - print ''; - if (!$periodlink) print ''; - print ''; + // Ligne de la periode d'analyse du rapport + print ''; + print ''; + if (!$periodlink) print ''; + print ''; - // Ligne de description - print ''; - print ''; - print ''; - print ''; + // Ligne de description + print ''; + print ''; + print ''; + print ''; - print '
'.$langs->trans("Name").''; - print $nom; - print '
'.$langs->trans("Name").''; + print $nom; + print '
'.$langs->trans("CalculationMode").''; - else print ''; - print $calcmode; - if ($variante) print ''.$variante; - print '
'.$langs->trans("CalculationMode").''; + else print ''; + print $calcmode; + if ($variante) print ''.$variante; + print '
'.$langs->trans("ReportPeriod").''; - else print ''; - if ($period) print $period; - if ($periodlink) print ''.$periodlink; - print '
'.$langs->trans("ReportPeriod").''; + else print ''; + if ($period) print $period; + if ($periodlink) print ''.$periodlink; + print '
'.$langs->trans("ReportDescription").''.$description.'
'.$langs->trans("ReportDescription").''.$description.'
'; + print '
'; - dol_fiche_end(); + dol_fiche_end(); - print '
'; + print '
'; - print ''; + print ''; - print "\n\n\n"; + print "\n\n\n"; +} + +/** + * Return Default dates for transfer based on periodicity option in accountancy setup + * + * @return array Dates of periodicity by default + */ +function getDefaultDatesForTransfer() +{ + global $db, $conf; + + // Period by default on transfer (0: previous month | 1: current month | 2: fiscal year) + $periodbydefaultontransfer = $conf->global->ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER; + isset($periodbydefaultontransfer) ? $periodbydefaultontransfer : 0; + if ($periodbydefaultontransfer == 2) { + $sql = "SELECT date_start, date_end from ".MAIN_DB_PREFIX."accounting_fiscalyear "; + $sql .= " where date_start < '".$db->idate(dol_now())."' and date_end > '".$db->idate(dol_now())."'"; + $sql .= $db->plimit(1); + $res = $db->query($sql); + if ($res->num_rows > 0) { + $fiscalYear = $db->fetch_object($res); + $date_start = strtotime($fiscalYear->date_start); + $date_end = strtotime($fiscalYear->date_end); + } else { + $month_start = ($conf->global->SOCIETE_FISCAL_MONTH_START ? ($conf->global->SOCIETE_FISCAL_MONTH_START) : 1); + $year_start = dol_print_date(dol_now(), '%Y'); + $year_end = $year_start + 1; + $month_end = $month_start - 1; + if ($month_end < 1) + { + $month_end = 12; + $year_end--; + } + $date_start = dol_mktime(0, 0, 0, $month_start, 1, $year_start); + $date_end = dol_get_last_day($year_end, $month_end); + } + } elseif ($periodbydefaultontransfer == 1) { + $year_current = strftime("%Y", dol_now()); + $pastmonth = strftime("%m", dol_now()); + $pastmonthyear = $year_current; + if ($pastmonth == 0) { + $pastmonth = 12; + $pastmonthyear--; + } + } else { + $year_current = strftime("%Y", dol_now()); + $pastmonth = strftime("%m", dol_now()) - 1; + $pastmonthyear = $year_current; + if ($pastmonth == 0) { + $pastmonth = 12; + $pastmonthyear--; + } + } + + return array( + 'date_start' => $date_start, + 'date_end' => $date_end, + 'pastmonthyear' => $pastmonthyear, + 'pastmonth' => $pastmonth + ); } diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 7b3d66f9003..038b4be27a6 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -185,8 +185,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle { $qualified = 0; } - } - else // This is a test on a constant. For example when we have -- VMYSQLUTF8UNICODE, we test constant $conf->global->UTF8UNICODE + } else // This is a test on a constant. For example when we have -- VMYSQLUTF8UNICODE, we test constant $conf->global->UTF8UNICODE { $dbcollation = strtoupper(preg_replace('/_/', '', $conf->db->dolibarr_main_db_collation)); //var_dump($reg[2]); @@ -225,9 +224,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle if ($buffer) $arraysql[$i] = $buffer; fclose($fp); - } - else - { + } else { dol_syslog("Admin.lib::run_sql failed to open file ".$sqlfile, LOG_ERR); } @@ -251,9 +248,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle $obj = $db->fetch_object($resql); $listofmaxrowid[$table] = $obj->max; if (empty($listofmaxrowid[$table])) $listofmaxrowid[$table] = 0; - } - else - { + } else { if (!$silent) print ''; if (!$silent) print '
'.$langs->trans("Failed to get max rowid for ".$table)."
"; if (!$silent) print ''; @@ -297,7 +292,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle $sql = preg_replace('/llx_/i', MAIN_DB_PREFIX, $sql); } - if (!empty($handler)) $sql = preg_replace('/__HANDLER__/i', "'".$handler."'", $sql); + if (!empty($handler)) $sql = preg_replace('/__HANDLER__/i', "'".$db->escape($handler)."'", $sql); $newsql = preg_replace('/__ENTITY__/i', (!empty($entity) ? $entity : $conf->entity), $sql); @@ -370,9 +365,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle dol_syslog('Admin.lib::run_sql Insert nb '.$cursorinsert.', done in table '.$table.', rowid is '.$listofinsertedrowid[$cursorinsert], LOG_DEBUG); } // print 'OK'; - } - else - { + } else { $errno = $db->errno(); if (!$silent) print ''."\n"; @@ -414,9 +407,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle if (!$silent) print ''.$langs->trans("ProcessMigrateScript").''; if (!$silent) print ''.$langs->trans("OK").''."\n"; $ok = 1; - } - else - { + } else { if (!$silent) print ''.$langs->trans("ProcessMigrateScript").''; if (!$silent) print ''.$langs->trans("KO").''."\n"; $ok = 0; @@ -458,9 +449,7 @@ function dolibarr_del_const($db, $name, $entity = 1) { $conf->global->$name = ''; return 1; - } - else - { + } else { dol_print_error($db); return -1; } @@ -555,9 +544,7 @@ function dolibarr_set_const($db, $name, $value, $type = 'chaine', $visible = 0, $db->commit(); $conf->global->$name = $value; return 1; - } - else - { + } else { $error = $db->lasterror(); $db->rollback(); return -1; @@ -659,8 +646,7 @@ function security_prepare_head() { $obj = $db->fetch_object($resql); if ($obj) $nbPerms = $obj->nb; - } - else dol_print_error($db); + } else dol_print_error($db); $head[$h][0] = DOL_URL_ROOT."/admin/perms.php"; $head[$h][1] = $langs->trans("DefaultRights"); @@ -971,9 +957,7 @@ function activateModule($value, $withdeps = 1) if ($result <= 0) { $ret['errors'][] = $objMod->error; - } - else - { + } else { if ($withdeps) { if (isset($objMod->depends) && is_array($objMod->depends) && !empty($objMod->depends)) @@ -1009,9 +993,7 @@ function activateModule($value, $withdeps = 1) { $ret['nbmodules'] += $resarray['nbmodules']; $ret['nbperms'] += $resarray['nbperms']; - } - else - { + } else { $ret['errors'][] = $langs->trans('activateModuleDependNotSatisfied', $objMod->name, $modulestring); } } @@ -1082,8 +1064,7 @@ function unActivateModule($value, $requiredby = 1) $objMod = new $modName($db); $result = $objMod->remove(); if ($result <= 0) $ret = $objMod->error; - } - else // We come here when we try to unactivate a module when module does not exists anymore in sources + } else // We come here when we try to unactivate a module when module does not exists anymore in sources { //print $dir.$modFile;exit; // TODO Replace this after DolibarrModules is moved as abstract class with a try catch to show module we try to disable has not been found or could not be loaded @@ -1163,9 +1144,7 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab if ($objMod->numero > 0) { $j = $objMod->numero; - } - else - { + } else { $j = 1000 + $i; } @@ -1210,24 +1189,19 @@ function complete_dictionary_with_modules(&$taborder, &$tabname, &$tablib, &$tab { print 'Error in descriptor of module '.$const_name.'. Array ->dictionaries has not same number of record for key "tabname", "tablib", "tabsql" and "tabsqlsort"'; //print "$const_name: $nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp\n"; - } - else - { + } else { $taborder[] = 0; // Add an empty line } } $j++; $i++; - } - else dol_syslog("Module ".get_class($objMod)." not qualified"); + } else dol_syslog("Module ".get_class($objMod)." not qualified"); } } } closedir($handle); - } - else - { + } else { dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING); } } @@ -1285,15 +1259,12 @@ function activateModulesRequiredByCountry($country_code) setEventMessages($objMod->automatic_activation[$country_code], null, 'warnings'); } - } - else dol_syslog("Module ".get_class($objMod)." not qualified"); + } else dol_syslog("Module ".get_class($objMod)." not qualified"); } } } closedir($handle); - } - else - { + } else { dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING); } } @@ -1348,9 +1319,7 @@ function complete_elementList_with_modules(&$elementList) if ($objMod->numero > 0) { $j = $objMod->numero; - } - else - { + } else { $j = 1000 + $i; } @@ -1387,15 +1356,12 @@ function complete_elementList_with_modules(&$elementList) $j++; $i++; - } - else dol_syslog("Module ".get_class($objMod)." not qualified"); + } else dol_syslog("Module ".get_class($objMod)." not qualified"); } } } closedir($handle); - } - else - { + } else { dol_syslog("htdocs/admin/modules.php: Failed to open directory ".$dir.". See permission and open_basedir option.", LOG_WARNING); } } @@ -1448,17 +1414,13 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') // $const is a const key like 'MYMODULE_ABC' if (is_numeric($key)) { // Very old behaviour $type = 'string'; - } - else - { + } else { if (is_array($const)) { $type = $const['type']; $label = $const['label']; $const = $key; - } - else - { + } else { $type = $const; $const = $key; } @@ -1549,9 +1511,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') print ''; print ''; print ''; - } - else - { + } else { print ''; print ''; print ''; @@ -1560,18 +1520,15 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') print '\n"; - } - elseif ($obj->type == 'html') + } elseif ($obj->type == 'html') { require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('constvalue_'.$const.(empty($strictw3c) ? '' : '[]'), $obj->value, '', 160, 'dolibarr_notes', '', false, false, $conf->fckeditor->enabled, ROWS_5, '90%'); $doleditor->Create(); - } - elseif ($obj->type == 'yesno') + } elseif ($obj->type == 'yesno') { print $form->selectyesno('constvalue'.(empty($strictw3c) ? '' : '[]'), $obj->value, 1); - } - elseif (preg_match('/emailtemplate/', $obj->type)) + } elseif (preg_match('/emailtemplate/', $obj->type)) { include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; $formmail = new FormMail($db); @@ -1595,8 +1552,7 @@ function form_constantes($tableau, $strictw3c = 0, $helptext = '') //var_dump($arraydefaultmessage); //var_dump($arrayofmessagename); print $form->selectarray('constvalue_'.$obj->name, $arrayofmessagename, $obj->value.':'.$tmp[1], 'None', 0, 0, '', 0, 0, 0, '', '', 1); - } - else // type = 'string' ou 'chaine' + } else // type = 'string' ou 'chaine' { print ''; } @@ -1674,7 +1630,7 @@ function addDocumentModel($name, $type, $label = '', $description = '') $db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity, libelle, description)"; - $sql .= " VALUES ('".$db->escape($name)."','".$type."',".$conf->entity.", "; + $sql .= " VALUES ('".$db->escape($name)."','".$db->escape($type)."',".$conf->entity.", "; $sql .= ($label ? "'".$db->escape($label)."'" : 'null').", "; $sql .= (!empty($description) ? "'".$db->escape($description)."'" : "null"); $sql .= ")"; @@ -1685,9 +1641,7 @@ function addDocumentModel($name, $type, $label = '', $description = '') { $db->commit(); return 1; - } - else - { + } else { dol_print_error($db); $db->rollback(); return -1; @@ -1709,7 +1663,7 @@ function delDocumentModel($name, $type) $sql = "DELETE FROM ".MAIN_DB_PREFIX."document_model"; $sql .= " WHERE nom = '".$db->escape($name)."'"; - $sql .= " AND type = '".$type."'"; + $sql .= " AND type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; dol_syslog("admin.lib::delDocumentModel", LOG_DEBUG); @@ -1718,9 +1672,7 @@ function delDocumentModel($name, $type) { $db->commit(); return 1; - } - else - { + } else { dol_print_error($db); $db->rollback(); return -1; @@ -1737,8 +1689,11 @@ function phpinfo_array() { ob_start(); phpinfo(); + $phpinfostring = ob_get_contents(); + ob_end_clean(); + $info_arr = array(); - $info_lines = explode("\n", strip_tags(ob_get_clean(), "

")); // end of ob_start() + $info_lines = explode("\n", strip_tags($phpinfostring, "

")); $cat = "General"; foreach ($info_lines as $line) { @@ -1749,8 +1704,7 @@ function phpinfo_array() if (preg_match("~]+>([^<]*)]+>([^<]*)~", $line, $val)) { $info_arr[trim($cat)][trim($val[1])] = $val[2]; - } - elseif (preg_match("~]+>([^<]*)]+>([^<]*)]+>([^<]*)~", $line, $val)) + } elseif (preg_match("~]+>([^<]*)]+>([^<]*)]+>([^<]*)~", $line, $val)) { $info_arr[trim($cat)][trim($val[1])] = array("local" => $val[2], "master" => $val[3]); } @@ -1818,6 +1772,14 @@ function email_admin_prepare_head() $head[$h][2] = 'common_emailing'; $h++; } + + if ($conf->ticket->enabled) + { + $head[$h][0] = DOL_URL_ROOT."/admin/mails_ticket.php"; + $head[$h][1] = $langs->trans("OutGoingEmailSetupForEmailing", $langs->transnoentitiesnoconv("Ticket")); + $head[$h][2] = 'common_ticket'; + $h++; + } } $head[$h][0] = DOL_URL_ROOT."/admin/mails_templates.php"; diff --git a/htdocs/core/lib/agenda.lib.php b/htdocs/core/lib/agenda.lib.php index b29457c1d0c..19ce8e33fdc 100644 --- a/htdocs/core/lib/agenda.lib.php +++ b/htdocs/core/lib/agenda.lib.php @@ -51,6 +51,7 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh { global $conf, $user, $langs, $db, $hookmanager; global $begin_h, $end_h, $begin_d, $end_d; + global $massaction; $langs->load("companies"); @@ -63,44 +64,36 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh print ''; print ''; print ''; - print ''; + if ($massaction != 'predelete') { // When $massaction == 'predelete', action may be already output to 'delete' by the mass action system. + print ''; + } print ''; - print '
'; - - if ($conf->browser->layout == 'phone') print '
'; - else print ''; - - if ($conf->browser->layout == 'phone') print '
'; - else print '
'; - - print ''; - if ($canedit) { + print '
'; // Type - print '
'; - print ''; + print ''; // Assigned to - print ''; - print ''; + print ''; if ($conf->resource->enabled) { @@ -108,25 +101,21 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh $formresource = new FormResource($db); // Resource - print ''; - print ''; + print ''; } } if (!empty($conf->societe->enabled) && $user->rights->societe->lire) { - print ''; - print ''; + print ''; } if (!empty($conf->projet->enabled) && $user->rights->projet->lire) @@ -134,80 +123,29 @@ function print_actions_filter($form, $canedit, $status, $year, $month, $day, $sh require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; $formproject = new FormProjets($db); - print ''; - print ''; + print ''; } if ($canedit && !preg_match('/list/', $_SERVER["PHP_SELF"])) { // Status - print ''; - print ''; - } - - if ($canedit && $action == 'show_peruser') - { - // Filter on hours - print ''; - print ''; - print "'; - - // Filter on days - print ''; - print ''; - print "'; + print ''; } // Hooks $parameters = array('canedit'=>$canedit, 'pid'=>$pid, 'socid'=>$socid); + $object = null; $reshook = $hookmanager->executeHooks('searchAgendaFrom', $parameters, $object, $action); // Note that $action and $object may have been - print '
'; - print $langs->trans("Type"); - print ''; + print ''; + print ''.$langs->trans("Type").''; $multiselect = 0; if (!empty($conf->global->MAIN_ENABLE_MULTISELECT_TYPE)) // We use an option here because it adds bugs when used on agenda page "peruser" and "list" { $multiselect = (!empty($conf->global->AGENDA_USE_EVENT_TYPE)); } - print ''; print $formactions->select_type_actions($actioncode, "search_actioncode", $excludetype, (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1), 0, $multiselect, 0, 'maxwidth500'); - print '
'; - print $langs->trans("ActionsToDoBy").'   '; - print ''; + print '
'; print img_picto('', 'user', 'class="fawidth30 inline-block"'); + print ''.$langs->trans("ActionsToDoBy").''; print $form->select_dolusers($filtert, 'search_filtert', 1, '', !$canedit, '', '', 0, 0, 0, '', 0, '', 'maxwidth500'); - if (empty($conf->dol_optimize_smallscreen)) print '   '.$langs->trans("or").' '.$langs->trans("ToUserOfGroup").'   '; - else print '
'; + print '
'; + print '
'; print img_picto('', 'object_group', 'class="fawidth30 inline-block"'); + print ''.$langs->trans("ToUserOfGroup").''; print $form->select_dolgroups($usergroupid, 'usergroup', 1, '', !$canedit, '', '', '0', false, 'maxwidth500'); - print '
'; - print $langs->trans("Resource"); - print ''; - print img_picto('', 'object_resource', 'class="fawidth30 inline-block"'); + print '
'; + print img_picto('', 'object_resource', 'class="fawidth30 inline-block"'); + print ''.$langs->trans("Resource").''; print $formresource->select_resource_list($resourceid, "search_resourceid", '', 1, 0, 0, null, '', 2, 0, 'maxwidth500'); - print '
'; - print $langs->trans("ThirdParty").'   '; - print ''; + print '
'; print img_picto('', 'company', 'class="fawidth30 inline-block"'); + print ''.$langs->trans("ThirdParty").''; print $form->select_company($socid, 'search_socid', '', ' ', 0, 0, null, 0, 'minwidth100 maxwidth500'); - print '
'; - print $langs->trans("Project").'   '; - print ''; + print '
'; print img_picto('', 'project', 'class="fawidth30 inline-block"'); + print ''.$langs->trans("Project").''; print $formproject->select_projects($socid ? $socid : -1, $pid, 'search_projectid', 0, 0, 1, 0, 0, 0, 0, '', 1, 0, 'maxwidth500'); - print '
'; - print $langs->trans("Status"); - print '  '; + print '
'; + print img_picto('', 'setup', 'class="fawidth30 inline-block"'); + print ''.$langs->trans("Status").''; $formactions->form_select_status_action('formaction', $status, 1, 'search_status', 1, 2, 'minwidth100'); - print '
'.$langs->trans("VisibleTimeRange").'"; - print '
'; - print ''; - if (empty($conf->dol_use_jmobile)) print ' - '; - else print '
'; - print ''; - if (empty($conf->dol_use_jmobile)) print ' '.$langs->trans("H"); - print '
'; - print '
'.$langs->trans("VisibleDaysRange").'"; - print '
'; - print ''; - if (empty($conf->dol_use_jmobile)) print ' - '; - else print '
'; - print ''; - print '
'; - print '
'; - - if ($conf->browser->layout == 'phone') print ''; - else print '
'; - - print ''; - print '
'; - print '
'; - print ''; - print '
'; - print '
'; - - if ($conf->browser->layout == 'phone') print ''; - else print '
'; - - print '
'; // Close fichecenter print '
'; - - //print ''; } @@ -248,7 +186,7 @@ function show_array_actions_to_do($max = 5) print '
'; print ''; print ''; - print ''; + print ''; print ''; $var = true; @@ -304,9 +242,7 @@ function show_array_actions_to_do($max = 5) print "
'.$langs->trans("LastActionsToDo", $max).''.$langs->trans("FullList").''.$langs->trans("FullList").'

"; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -346,7 +282,7 @@ function show_array_last_actions_done($max = 5) print '
'; print ''; print ''; - print ''; + print ''; print ''; $var = true; $i = 0; @@ -393,9 +329,7 @@ function show_array_last_actions_done($max = 5) print "
'.$langs->trans("LastDoneTasks", $max).''.$langs->trans("FullList").''.$langs->trans("FullList").'

"; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -524,7 +458,7 @@ function calendars_prepare_head($param) $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php'.($param ? '?'.$param : ''); + $head[$h][0] = DOL_URL_ROOT.'/comm/action/list.php?action=show_list'.($param ? '&'.$param : ''); $head[$h][1] = $langs->trans("ViewList"); $head[$h][2] = 'cardlist'; $h++; diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php index 869fcf602d7..10fa477600a 100644 --- a/htdocs/core/lib/ajax.lib.php +++ b/htdocs/core/lib/ajax.lib.php @@ -46,16 +46,16 @@ */ function ajax_autocompleter($selected, $htmlname, $url, $urloption = '', $minLength = 2, $autoselect = 0, $ajaxoptions = array(), $moreparams = '') { - if (empty($minLength)) $minLength = 1; + if (empty($minLength)) $minLength = 1; - $dataforrenderITem = 'ui-autocomplete'; - $dataforitem = 'ui-autocomplete-item'; - // Allow two constant to use other values for backward compatibility - if (defined('JS_QUERY_AUTOCOMPLETE_RENDERITEM')) $dataforrenderITem = constant('JS_QUERY_AUTOCOMPLETE_RENDERITEM'); - if (defined('JS_QUERY_AUTOCOMPLETE_ITEM')) $dataforitem = constant('JS_QUERY_AUTOCOMPLETE_ITEM'); + $dataforrenderITem = 'ui-autocomplete'; + $dataforitem = 'ui-autocomplete-item'; + // Allow two constant to use other values for backward compatibility + if (defined('JS_QUERY_AUTOCOMPLETE_RENDERITEM')) $dataforrenderITem = constant('JS_QUERY_AUTOCOMPLETE_RENDERITEM'); + if (defined('JS_QUERY_AUTOCOMPLETE_ITEM')) $dataforitem = constant('JS_QUERY_AUTOCOMPLETE_ITEM'); - // Input search_htmlname is original field - // Input htmlname is a second input field used when using ajax autocomplete. + // Input search_htmlname is original field + // Input htmlname is a second input field used when using ajax autocomplete. $script = ''; $script .= ''."\n"; @@ -348,7 +348,7 @@ function ajax_dialog($title, $message, $w = 350, $h = 150) $msg = '
'; $msg .= $message; $msg .= '
'."\n"; - $msg .= ''; - $msg .= "\n"; + $msg .= "\n"; - return $msg; + return $msg; } @@ -397,8 +397,8 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = if (empty($minLengthToAutocomplete)) $minLengthToAutocomplete = 0; - $tmpplugin = 'select2'; - $msg = "\n".' + $tmpplugin = 'select2'; + $msg = "\n".' \n"; + $msg .= "\n"; - return $msg; + return $msg; } /** @@ -491,8 +491,8 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete = * @param int $revertonoff Revert on/off * @param int $strict Use only "disabled" with delConstant and "enabled" with setConstant * @param int $forcereload Force to reload page if we click/change value (this is supported only when there is no 'alert' option in input) - * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No margin left. Works for fontawesome picto only. - * @param int $forcenoajax 1=Force to use a ahref link instead of ajax code. + * @param string $marginleftonlyshort 1 = Add a short left margin on picto, 2 = Add a larger left margin on picto, 0 = No left margin. Works for fontawesome picto only. + * @param int $forcenoajax 1=Force to use a ahref link instead of ajax code. * @return string */ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonoff = 0, $strict = 0, $forcereload = 0, $marginleftonlyshort = 2, $forcenoajax = 0) @@ -500,15 +500,13 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof global $conf, $langs, $user; $entity = ((isset($entity) && is_numeric($entity) && $entity >= 0) ? $entity : $conf->entity); - if (! isset($input)) $input = array(); + if (!isset($input)) $input = array(); if (empty($conf->use_javascript_ajax) || $forcenoajax) { - if (empty($conf->global->$code)) print ''.img_picto($langs->trans("Disabled"), 'off').''; - else print ''.img_picto($langs->trans("Enabled"), 'on').''; - } - else - { + if (empty($conf->global->$code)) print ''.img_picto($langs->trans("Disabled"), 'off').''; + else print ''.img_picto($langs->trans("Enabled"), 'on').''; + } else { $out = "\n".' '; - $out .= ''.img_picto($langs->trans($text_off), 'switch_off').''; - $out .= ''.img_picto($langs->trans($text_on), 'switch_on').''; + $out .= ''.img_picto($langs->trans($text_off), 'switch_off').''; + $out .= ''.img_picto($langs->trans($text_on), 'switch_on').''; - return $out; + return $out; } diff --git a/htdocs/core/lib/asset.lib.php b/htdocs/core/lib/asset.lib.php index 1b58784f6e8..5fddf4f1c46 100644 --- a/htdocs/core/lib/asset.lib.php +++ b/htdocs/core/lib/asset.lib.php @@ -88,10 +88,10 @@ function asset_prepare_head(Asset $object) // Show more tabs from modules // Entries must be declared in modules descriptor with line //$this->tabs = array( - // 'entity:+tabname:Title:@assets:/assets/mypage.php?id=__ID__' + // 'entity:+tabname:Title:@assets:/asset/mypage.php?id=__ID__' //); // to add new tab //$this->tabs = array( - // 'entity:-tabname:Title:@assets:/assets/mypage.php?id=__ID__' + // 'entity:-tabname:Title:@assets:/asset/mypage.php?id=__ID__' //); // to remove a tab complete_head_from_modules($conf, $langs, $object, $head, $h, 'assets'); diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php index d0f102a4e78..387d705780a 100644 --- a/htdocs/core/lib/bank.lib.php +++ b/htdocs/core/lib/bank.lib.php @@ -334,8 +334,7 @@ function checkBanForAccount($account) return false; // Sould be 6 but can be 123-456 elseif (strlen($account->code_banque) < 6) return false; // Sould be 6 - else - return true; + else return true; } // No particular rule diff --git a/htdocs/core/lib/barcode.lib.php b/htdocs/core/lib/barcode.lib.php index a4d7a077aab..da712d960cd 100644 --- a/htdocs/core/lib/barcode.lib.php +++ b/htdocs/core/lib/barcode.lib.php @@ -127,15 +127,12 @@ function barcode_encode($code, $encoding) /* use built-in EAN-Encoder */ dol_syslog("barcode.lib.php::barcode_encode Use barcode_encode_ean"); $bars = barcode_encode_ean($code, $encoding); - } - elseif (file_exists($genbarcode_loc)) // For example C39 + } elseif (file_exists($genbarcode_loc)) // For example C39 { /* use genbarcode */ dol_syslog("barcode.lib.php::barcode_encode Use genbarcode ".$genbarcode_loc." code=".$code." encoding=".$encoding); $bars = barcode_encode_genbarcode($code, $encoding); - } - else - { + } else { print "barcode_encode needs an external programm for encodings other then EAN/ISBN (code=".$code.", encoding=".$encoding.")
\n"; print "
    \n"; print "
  • download gnu-barcode from www.gnu.org/software/barcode/\n"; @@ -263,9 +260,7 @@ function barcode_encode_genbarcode($code, $encoding) $text = fgets($fp, 1024); $encoding = fgets($fp, 1024); pclose($fp); - } - else - { + } else { dol_syslog("barcode.lib.php::barcode_encode_genbarcode failed to run popen ".$fullcommandclear, LOG_ERR); return false; } @@ -396,18 +391,14 @@ function barcode_outimage($text, $bars, $scale = 1, $mode = "png", $total_y = 0, { header("Content-Type: image/jpeg; name=\"barcode.jpg\""); imagejpeg($im); - } - elseif ($mode == 'gif') + } elseif ($mode == 'gif') { header("Content-Type: image/gif; name=\"barcode.gif\""); imagegif($im); - } - elseif (!empty($filebarcode)) // To wxrite into afile onto disk + } elseif (!empty($filebarcode)) // To wxrite into afile onto disk { imagepng($im, $filebarcode); - } - else - { + } else { header("Content-Type: image/png; name=\"barcode.png\""); imagepng($im); } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 67611649142..d7b5773e1c2 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -41,20 +41,20 @@ */ function societe_prepare_head(Societe $object) { - global $db, $langs, $conf, $user; - $h = 0; - $head = array(); + global $db, $langs, $conf, $user; + $h = 0; + $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id; - $head[$h][1] = $langs->trans("ThirdParty"); - $head[$h][2] = 'card'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id; + $head[$h][1] = $langs->trans("ThirdParty"); + $head[$h][2] = 'card'; + $h++; - if (empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) - { - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->societe->contact->lire) + if (empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) + { + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->societe->contact->lire) { - //$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); + //$nbContact = count($object->liste_contact(-1,'internal')) + count($object->liste_contact(-1,'external')); $nbContact = 0; // TODO $sql = "SELECT COUNT(p.rowid) as nb"; @@ -67,15 +67,13 @@ function societe_prepare_head(Societe $object) if ($obj) $nbContact = $obj->nb; } - $head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id; - $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; - $head[$h][2] = 'contact'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/contact.php?socid='.$object->id; + $head[$h][1] = $langs->trans('ContactsAddresses'); + if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + $head[$h][2] = 'contact'; + $h++; } - } - else - { + } else { $head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id; $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); $head[$h][1] = $langs->trans("ContactsAddresses"); @@ -84,66 +82,65 @@ function societe_prepare_head(Societe $object) $h++; } - if ($object->client == 1 || $object->client == 2 || $object->client == 3) - { - $head[$h][0] = DOL_URL_ROOT.'/comm/card.php?socid='.$object->id; - $head[$h][1] = ''; - if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client == 2 || $object->client == 3)) $head[$h][1] .= $langs->trans("Prospect"); - if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client == 3) $head[$h][1] .= ' | '; - if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client == 1 || $object->client == 3)) $head[$h][1] .= $langs->trans("Customer"); - $head[$h][2] = 'customer'; - $h++; + if ($object->client == 1 || $object->client == 2 || $object->client == 3) + { + $head[$h][0] = DOL_URL_ROOT.'/comm/card.php?socid='.$object->id; + $head[$h][1] = ''; + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && ($object->client == 2 || $object->client == 3)) $head[$h][1] .= $langs->trans("Prospect"); + if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && $object->client == 3) $head[$h][1] .= ' | '; + if (empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && ($object->client == 1 || $object->client == 3)) $head[$h][1] .= $langs->trans("Customer"); + $head[$h][2] = 'customer'; + $h++; - if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) - { - $langs->load("products"); - // price - $head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id; - $head[$h][1] = $langs->trans("CustomerPrices"); - $head[$h][2] = 'price'; - $h++; - } - } - $supplier_module_enabled = 0; - if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_proposal->enabled) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) $supplier_module_enabled = 1; - if ($supplier_module_enabled == 1 && $object->fournisseur && !empty($user->rights->fournisseur->lire)) - { - $head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id; - $head[$h][1] = $langs->trans("Supplier"); - $head[$h][2] = 'supplier'; - $h++; - } + if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) + { + $langs->load("products"); + // price + $head[$h][0] = DOL_URL_ROOT.'/societe/price.php?socid='.$object->id; + $head[$h][1] = $langs->trans("CustomerPrices"); + $head[$h][2] = 'price'; + $h++; + } + } + $supplier_module_enabled = 0; + if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)) || !empty($conf->supplier_proposal->enabled) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) $supplier_module_enabled = 1; + if ($supplier_module_enabled == 1 && $object->fournisseur && !empty($user->rights->fournisseur->lire)) + { + $head[$h][0] = DOL_URL_ROOT.'/fourn/card.php?socid='.$object->id; + $head[$h][1] = $langs->trans("Supplier"); + $head[$h][2] = 'supplier'; + $h++; + } - if (!empty($conf->projet->enabled) && (!empty($user->rights->projet->lire))) - { - $head[$h][0] = DOL_URL_ROOT.'/societe/project.php?socid='.$object->id; - $head[$h][1] = $langs->trans("Projects"); - $nbNote = 0; - $sql = "SELECT COUNT(n.rowid) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX."projet as n"; - $sql .= " WHERE fk_soc = ".$object->id; - $sql .= " AND entity IN (".getEntity('project').")"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $nbNote = $obj->nb; - $i++; - } - } - else { - dol_print_error($db); - } + if (!empty($conf->projet->enabled) && (!empty($user->rights->projet->lire))) + { + $head[$h][0] = DOL_URL_ROOT.'/societe/project.php?socid='.$object->id; + $head[$h][1] = $langs->trans("Projects"); + $nbNote = 0; + $sql = "SELECT COUNT(n.rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet as n"; + $sql .= " WHERE fk_soc = ".$object->id; + $sql .= " AND entity IN (".getEntity('project').")"; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $nbNote = $obj->nb; + $i++; + } + } else { + dol_print_error($db); + } if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; - $head[$h][2] = 'project'; - $h++; - } + $head[$h][2] = 'project'; + $h++; + } - // Tab to link resources + // Tab to link resources if (!empty($conf->resource->enabled) && !empty($conf->global->RESOURCE_ON_THIRDPARTIES)) { $head[$h][0] = DOL_URL_ROOT.'/resource/element_resource.php?element=societe&element_id='.$object->id; @@ -174,24 +171,24 @@ function societe_prepare_head(Societe $object) } // Related items - if ((!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) - && empty($conf->global->THIRPARTIES_DISABLE_RELATED_OBJECT_TAB)) - { - $head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id; - $head[$h][1] = $langs->trans("Referers"); - $head[$h][2] = 'consumption'; - $h++; - } + if ((!empty($conf->commande->enabled) || !empty($conf->propal->enabled) || !empty($conf->facture->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) + && empty($conf->global->THIRPARTIES_DISABLE_RELATED_OBJECT_TAB)) + { + $head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id; + $head[$h][1] = $langs->trans("Referers"); + $head[$h][2] = 'consumption'; + $h++; + } - // Bank accounts - if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT)) - { - $nbBankAccount = 0; + // Bank accounts + if (empty($conf->global->SOCIETE_DISABLE_BANKACCOUNT)) + { + $nbBankAccount = 0; $foundonexternalonlinesystem = 0; - $langs->load("banks"); + $langs->load("banks"); - //$title = $langs->trans("BankAccounts"); - $title = $langs->trans("PaymentInformation"); + //$title = $langs->trans("BankAccounts"); + $title = $langs->trans("PaymentInformation"); if (!empty($conf->stripe->enabled)) { @@ -207,150 +204,147 @@ function societe_prepare_head(Societe $object) if ($stripecu) $foundonexternalonlinesystem++; } - $sql = "SELECT COUNT(n.rowid) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as n"; - $sql .= " WHERE n.fk_soc = ".$object->id; - if (empty($conf->stripe->enabled)) { + $sql = "SELECT COUNT(n.rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe_rib as n"; + $sql .= " WHERE n.fk_soc = ".$object->id; + if (empty($conf->stripe->enabled)) { $sql .= " AND n.stripe_card_ref IS NULL"; } else { $sql .= " AND (n.stripe_card_ref IS NULL OR (n.stripe_card_ref IS NOT NULL AND n.status = ".$servicestatus."))"; } - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $nbBankAccount = $obj->nb; - $i++; - } - } - else { - dol_print_error($db); - } + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $nbBankAccount = $obj->nb; + $i++; + } + } else { + dol_print_error($db); + } - //if (! empty($conf->stripe->enabled) && $nbBankAccount > 0) $nbBankAccount = '...'; // No way to know exact number + //if (! empty($conf->stripe->enabled) && $nbBankAccount > 0) $nbBankAccount = '...'; // No way to know exact number - $head[$h][0] = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; - $head[$h][1] = $title; - if ($foundonexternalonlinesystem) $head[$h][1] .= '...'; - elseif ($nbBankAccount > 0) $head[$h][1] .= ''.$nbBankAccount.''; - $head[$h][2] = 'rib'; - $h++; - } + $head[$h][0] = DOL_URL_ROOT.'/societe/paymentmodes.php?socid='.$object->id; + $head[$h][1] = $title; + if ($foundonexternalonlinesystem) $head[$h][1] .= '...'; + elseif ($nbBankAccount > 0) $head[$h][1] .= ''.$nbBankAccount.''; + $head[$h][2] = 'rib'; + $h++; + } - if (!empty($conf->website->enabled) && (!empty($conf->global->WEBSITE_USE_WEBSITE_ACCOUNTS)) && (!empty($user->rights->societe->lire))) - { - $head[$h][0] = DOL_URL_ROOT.'/societe/website.php?id='.$object->id; - $head[$h][1] = $langs->trans("WebSiteAccounts"); - $nbNote = 0; - $sql = "SELECT COUNT(n.rowid) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX."societe_account as n"; - $sql .= " WHERE fk_soc = ".$object->id.' AND fk_website > 0'; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $nbNote = $obj->nb; - $i++; - } - } - else { - dol_print_error($db); - } - if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; - $head[$h][2] = 'website'; - $h++; - } + if (!empty($conf->website->enabled) && (!empty($conf->global->WEBSITE_USE_WEBSITE_ACCOUNTS)) && (!empty($user->rights->societe->lire))) + { + $head[$h][0] = DOL_URL_ROOT.'/societe/website.php?id='.$object->id; + $head[$h][1] = $langs->trans("WebSiteAccounts"); + $nbNote = 0; + $sql = "SELECT COUNT(n.rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe_account as n"; + $sql .= " WHERE fk_soc = ".$object->id.' AND fk_website > 0'; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $nbNote = $obj->nb; + $i++; + } + } else { + dol_print_error($db); + } + if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; + $head[$h][2] = 'website'; + $h++; + } // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'thirdparty'); + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'thirdparty'); - if ($user->socid == 0) - { - // Notifications - if (!empty($conf->notification->enabled)) - { - $nbNote = 0; - $sql = "SELECT COUNT(n.rowid) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX."notify_def as n"; - $sql .= " WHERE fk_soc = ".$object->id; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $nbNote = $obj->nb; - $i++; - } - } - else { - dol_print_error($db); - } + if ($user->socid == 0) + { + // Notifications + if (!empty($conf->notification->enabled)) + { + $nbNote = 0; + $sql = "SELECT COUNT(n.rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."notify_def as n"; + $sql .= " WHERE fk_soc = ".$object->id; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $nbNote = $obj->nb; + $i++; + } + } else { + dol_print_error($db); + } - $head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id; - $head[$h][1] = $langs->trans("Notifications"); + $head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id; + $head[$h][1] = $langs->trans("Notifications"); if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; - $head[$h][2] = 'notify'; - $h++; - } + $head[$h][2] = 'notify'; + $h++; + } // Notes - $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; + $nbNote = 0; + if (!empty($object->note_private)) $nbNote++; if (!empty($object->note_public)) $nbNote++; - $head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id; - $head[$h][1] = $langs->trans("Notes"); + $head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id; + $head[$h][1] = $langs->trans("Notes"); if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; - $head[$h][2] = 'note'; - $h++; + $head[$h][2] = 'note'; + $h++; - // Attached files - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->societe->multidir_output[$object->entity]."/".$object->id; - $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); - $nbLinks = Link::count($db, $object->element, $object->id); + // Attached files + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->societe->multidir_output[$object->entity]."/".$object->id; + $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); + $nbLinks = Link::count($db, $object->element, $object->id); - $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; - $head[$h][1] = $langs->trans("Documents"); + $head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id; + $head[$h][1] = $langs->trans("Documents"); if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; - $head[$h][2] = 'document'; - $h++; - } + $head[$h][2] = 'document'; + $h++; + } - $head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; - $head[$h][1] .= $langs->trans("Events"); - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { - $head[$h][1] .= '/'; - $head[$h][1] .= $langs->trans("Agenda"); - } - $head[$h][2] = 'agenda'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id; + $head[$h][1] .= $langs->trans("Events"); + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) + { + $head[$h][1] .= '/'; + $head[$h][1] .= $langs->trans("Agenda"); + } + $head[$h][2] = 'agenda'; + $h++; - // Log - /*$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$object->id; + // Log + /*$head[$h][0] = DOL_URL_ROOT.'/societe/info.php?socid='.$object->id; $head[$h][1] = $langs->trans("Info"); $head[$h][2] = 'info'; $h++;*/ - complete_head_from_modules($conf, $langs, $object, $head, $h, 'thirdparty', 'remove'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'thirdparty', 'remove'); - return $head; + return $head; } @@ -362,21 +356,21 @@ function societe_prepare_head(Societe $object) */ function societe_prepare_head2($object) { - global $langs, $conf, $user; - $h = 0; - $head = array(); + global $langs, $conf, $user; + $h = 0; + $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id; - $head[$h][1] = $langs->trans("ThirdParty"); - $head[$h][2] = 'company'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/card.php?socid='.$object->id; + $head[$h][1] = $langs->trans("ThirdParty"); + $head[$h][2] = 'company'; + $h++; - $head[$h][0] = 'commerciaux.php?socid='.$object->id; - $head[$h][1] = $langs->trans("SalesRepresentative"); - $head[$h][2] = 'salesrepresentative'; - $h++; + $head[$h][0] = 'commerciaux.php?socid='.$object->id; + $head[$h][1] = $langs->trans("SalesRepresentative"); + $head[$h][2] = 'salesrepresentative'; + $h++; - return $head; + return $head; } @@ -388,35 +382,35 @@ function societe_prepare_head2($object) */ function societe_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf, $user; - $h = 0; - $head = array(); + $h = 0; + $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/societe/admin/societe.php'; - $head[$h][1] = $langs->trans("Miscellaneous"); - $head[$h][2] = 'general'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/admin/societe.php'; + $head[$h][1] = $langs->trans("Miscellaneous"); + $head[$h][2] = 'general'; + $h++; - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, null, $head, $h, 'company_admin'); + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'company_admin'); - $head[$h][0] = DOL_URL_ROOT.'/societe/admin/societe_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsThirdParties"); - $head[$h][2] = 'attributes'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/admin/societe_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsThirdParties"); + $head[$h][2] = 'attributes'; + $h++; - $head[$h][0] = DOL_URL_ROOT.'/societe/admin/contact_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsContacts"); - $head[$h][2] = 'attributes_contacts'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/societe/admin/contact_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsContacts"); + $head[$h][2] = 'attributes_contacts'; + $h++; - complete_head_from_modules($conf, $langs, null, $head, $h, 'company_admin', 'remove'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'company_admin', 'remove'); - return $head; + return $head; } @@ -438,52 +432,49 @@ function societe_admin_prepare_head() */ function getCountry($searchkey, $withcode = '', $dbtouse = 0, $outputlangs = '', $entconv = 1, $searchlabel = '') { - global $db, $langs; + global $db, $langs; - $result = ''; + $result = ''; - // Check parameters - if (empty($searchkey) && empty($searchlabel)) - { - if ($withcode === 'all') return array('id'=>'', 'code'=>'', 'label'=>''); - else return ''; - } - if (!is_object($dbtouse)) $dbtouse = $db; - if (!is_object($outputlangs)) $outputlangs = $langs; + // Check parameters + if (empty($searchkey) && empty($searchlabel)) + { + if ($withcode === 'all') return array('id'=>'', 'code'=>'', 'label'=>''); + else return ''; + } + if (!is_object($dbtouse)) $dbtouse = $db; + if (!is_object($outputlangs)) $outputlangs = $langs; - $sql = "SELECT rowid, code, label FROM ".MAIN_DB_PREFIX."c_country"; - if (is_numeric($searchkey)) $sql .= " WHERE rowid=".$searchkey; - elseif (!empty($searchkey)) $sql .= " WHERE code='".$db->escape($searchkey)."'"; - else $sql .= " WHERE label='".$db->escape($searchlabel)."'"; + $sql = "SELECT rowid, code, label FROM ".MAIN_DB_PREFIX."c_country"; + if (is_numeric($searchkey)) $sql .= " WHERE rowid=".$searchkey; + elseif (!empty($searchkey)) $sql .= " WHERE code='".$db->escape($searchkey)."'"; + else $sql .= " WHERE label='".$db->escape($searchlabel)."'"; - $resql = $dbtouse->query($sql); - if ($resql) - { - $obj = $dbtouse->fetch_object($resql); - if ($obj) - { - $label = ((!empty($obj->label) && $obj->label != '-') ? $obj->label : ''); - if (is_object($outputlangs)) - { - $outputlangs->load("dict"); - if ($entconv) $label = ($obj->code && ($outputlangs->trans("Country".$obj->code) != "Country".$obj->code)) ? $outputlangs->trans("Country".$obj->code) : $label; - else $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code)) ? $outputlangs->transnoentitiesnoconv("Country".$obj->code) : $label; - } - if ($withcode == 1) $result = $label ? "$obj->code - $label" : "$obj->code"; - elseif ($withcode == 2) $result = $obj->code; - elseif ($withcode == 3) $result = $obj->rowid; - elseif ($withcode === 'all') $result = array('id'=>$obj->rowid, 'code'=>$obj->code, 'label'=>$label); - else $result = $label; - } - else - { - $result = 'NotDefined'; - } - $dbtouse->free($resql); - return $result; - } - else dol_print_error($dbtouse, ''); - return 'Error'; + $resql = $dbtouse->query($sql); + if ($resql) + { + $obj = $dbtouse->fetch_object($resql); + if ($obj) + { + $label = ((!empty($obj->label) && $obj->label != '-') ? $obj->label : ''); + if (is_object($outputlangs)) + { + $outputlangs->load("dict"); + if ($entconv) $label = ($obj->code && ($outputlangs->trans("Country".$obj->code) != "Country".$obj->code)) ? $outputlangs->trans("Country".$obj->code) : $label; + else $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("Country".$obj->code) != "Country".$obj->code)) ? $outputlangs->transnoentitiesnoconv("Country".$obj->code) : $label; + } + if ($withcode == 1) $result = $label ? "$obj->code - $label" : "$obj->code"; + elseif ($withcode == 2) $result = $obj->code; + elseif ($withcode == 3) $result = $obj->rowid; + elseif ($withcode === 'all') $result = array('id'=>$obj->rowid, 'code'=>$obj->code, 'label'=>$label); + else $result = $label; + } else { + $result = 'NotDefined'; + } + $dbtouse->free($resql); + return $result; + } else dol_print_error($dbtouse, ''); + return 'Error'; } /** @@ -503,70 +494,60 @@ function getCountry($searchkey, $withcode = '', $dbtouse = 0, $outputlangs = '', */ function getState($id, $withcode = '', $dbtouse = 0, $withregion = 0, $outputlangs = '', $entconv = 1) { - global $db, $langs; + global $db, $langs; - if (!is_object($dbtouse)) $dbtouse = $db; + if (!is_object($dbtouse)) $dbtouse = $db; - $sql = "SELECT d.rowid as id, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.code_region as region_code, r.nom as region_name FROM"; - $sql .= " ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c"; - $sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid and d.rowid=".$id; - $sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1"; - $sql .= " ORDER BY c.code, d.code_departement"; + $sql = "SELECT d.rowid as id, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.code_region as region_code, r.nom as region_name FROM"; + $sql .= " ".MAIN_DB_PREFIX."c_departements as d, ".MAIN_DB_PREFIX."c_regions as r,".MAIN_DB_PREFIX."c_country as c"; + $sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid and d.rowid=".$id; + $sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1"; + $sql .= " ORDER BY c.code, d.code_departement"; - dol_syslog("Company.lib::getState", LOG_DEBUG); - $resql = $dbtouse->query($sql); - if ($resql) - { - $obj = $dbtouse->fetch_object($resql); - if ($obj) - { - $label = ((!empty($obj->name) && $obj->name != '-') ? $obj->name : ''); - if (is_object($outputlangs)) - { - $outputlangs->load("dict"); - if ($entconv) $label = ($obj->code && ($outputlangs->trans("State".$obj->code) != "State".$obj->code)) ? $outputlangs->trans("State".$obj->code) : $label; - else $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("State".$obj->code) != "State".$obj->code)) ? $outputlangs->transnoentitiesnoconv("State".$obj->code) : $label; - } + dol_syslog("Company.lib::getState", LOG_DEBUG); + $resql = $dbtouse->query($sql); + if ($resql) + { + $obj = $dbtouse->fetch_object($resql); + if ($obj) + { + $label = ((!empty($obj->name) && $obj->name != '-') ? $obj->name : ''); + if (is_object($outputlangs)) + { + $outputlangs->load("dict"); + if ($entconv) $label = ($obj->code && ($outputlangs->trans("State".$obj->code) != "State".$obj->code)) ? $outputlangs->trans("State".$obj->code) : $label; + else $label = ($obj->code && ($outputlangs->transnoentitiesnoconv("State".$obj->code) != "State".$obj->code)) ? $outputlangs->transnoentitiesnoconv("State".$obj->code) : $label; + } - if ($withcode == 1) { - if ($withregion == 1) { - return $label = $obj->region_name.' - '.$obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); - } - else { - return $label = $obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); - } - } - elseif ($withcode == 2) { - if ($withregion == 1) { - return $label = $obj->region_name.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); - } - else { - return $label = ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); - } - } - elseif ($withcode === 'all') { - if ($withregion == 1) { - return array('id'=>$obj->id, 'code'=>$obj->code, 'label'=>$label, 'region_code'=>$obj->region_code, 'region'=>$obj->region_name); - } - else { - return array('id'=>$obj->id, 'code'=>$obj->code, 'label'=>$label); - } - } - else { - if ($withregion == 1) { - return $label = $obj->region_name.' - '.$label; - } - else { - return $label; - } - } - } - else - { - return $langs->transnoentitiesnoconv("NotDefined"); - } - } - else dol_print_error($dbtouse, ''); + if ($withcode == 1) { + if ($withregion == 1) { + return $label = $obj->region_name.' - '.$obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); + } else { + return $label = $obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); + } + } elseif ($withcode == 2) { + if ($withregion == 1) { + return $label = $obj->region_name.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); + } else { + return $label = ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); + } + } elseif ($withcode === 'all') { + if ($withregion == 1) { + return array('id'=>$obj->id, 'code'=>$obj->code, 'label'=>$label, 'region_code'=>$obj->region_code, 'region'=>$obj->region_name); + } else { + return array('id'=>$obj->id, 'code'=>$obj->code, 'label'=>$label); + } + } else { + if ($withregion == 1) { + return $label = $obj->region_name.' - '.$label; + } else { + return $label; + } + } + } else { + return $langs->transnoentitiesnoconv("NotDefined"); + } + } else dol_print_error($dbtouse, ''); } /** @@ -579,40 +560,38 @@ function getState($id, $withcode = '', $dbtouse = 0, $withregion = 0, $outputlan */ function currency_name($code_iso, $withcode = '', $outputlangs = null) { - global $langs, $db; + global $langs, $db; - if (empty($outputlangs)) $outputlangs = $langs; + if (empty($outputlangs)) $outputlangs = $langs; - $outputlangs->load("dict"); + $outputlangs->load("dict"); - // If there is a translation, we can send immediatly the label - if ($outputlangs->trans("Currency".$code_iso) != "Currency".$code_iso) - { - return ($withcode ? $code_iso.' - ' : '').$outputlangs->trans("Currency".$code_iso); - } + // If there is a translation, we can send immediatly the label + if ($outputlangs->trans("Currency".$code_iso) != "Currency".$code_iso) + { + return ($withcode ? $code_iso.' - ' : '').$outputlangs->trans("Currency".$code_iso); + } - // If no translation, we read table to get label by default - $sql = "SELECT label FROM ".MAIN_DB_PREFIX."c_currencies"; - $sql .= " WHERE code_iso='".$code_iso."'"; + // If no translation, we read table to get label by default + $sql = "SELECT label FROM ".MAIN_DB_PREFIX."c_currencies"; + $sql .= " WHERE code_iso='".$db->escape($code_iso)."'"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); - if ($num) - { - $obj = $db->fetch_object($resql); - $label = ($obj->label != '-' ? $obj->label : ''); - if ($withcode) return ($label == $code_iso) ? "$code_iso" : "$code_iso - $label"; - else return $label; - } - else - { - return $code_iso; - } - } - return 'ErrorWhenReadingCurrencyLabel'; + if ($num) + { + $obj = $db->fetch_object($resql); + $label = ($obj->label != '-' ? $obj->label : ''); + if ($withcode) return ($label == $code_iso) ? "$code_iso" : "$code_iso - $label"; + else return $label; + } else { + return $code_iso; + } + } + return 'ErrorWhenReadingCurrencyLabel'; } /** @@ -623,30 +602,28 @@ function currency_name($code_iso, $withcode = '', $outputlangs = null) */ function getFormeJuridiqueLabel($code) { - global $db, $langs; + global $db, $langs; - if (!$code) return ''; + if (!$code) return ''; - $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."c_forme_juridique"; - $sql .= " WHERE code='$code'"; + $sql = "SELECT libelle FROM ".MAIN_DB_PREFIX."c_forme_juridique"; + $sql .= " WHERE code='".$db->escape($code)."'"; - dol_syslog("Company.lib::getFormeJuridiqueLabel", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); + dol_syslog("Company.lib::getFormeJuridiqueLabel", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); - if ($num) - { - $obj = $db->fetch_object($resql); - $label = ($obj->libelle != '-' ? $obj->libelle : ''); - return $label; - } - else - { - return $langs->trans("NotDefined"); - } - } + if ($num) + { + $obj = $db->fetch_object($resql); + $label = ($obj->libelle != '-' ? $obj->libelle : ''); + return $label; + } else { + return $langs->trans("NotDefined"); + } + } } @@ -719,8 +696,8 @@ function isInEEC($object) $country_code_in_EEC = getCountriesInEEC(); - //print "dd".$this->country_code; - return in_array($object->country_code, $country_code_in_EEC); + //print "dd".$this->country_code; + return in_array($object->country_code, $country_code_in_EEC); } @@ -738,120 +715,116 @@ function isInEEC($object) */ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatelink = 0, $morehtmlright = '') { - global $user; + global $user; - $i = -1; + $i = -1; - if (!empty($conf->projet->enabled) && $user->rights->projet->lire) - { - $langs->load("projects"); + if (!empty($conf->projet->enabled) && $user->rights->projet->lire) + { + $langs->load("projects"); - $newcardbutton = ''; - if (!empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); - } + $newcardbutton = ''; + if (!empty($conf->projet->enabled) && $user->rights->projet->creer && empty($nocreatelink)) + { + $newcardbutton .= dolGetButtonTitle($langs->trans('AddProject'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/projet/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); + } - print "\n"; - print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"), $newcardbutton.$morehtmlright, ''); - print '
    '; - print "\n".''; + print "\n"; + print load_fiche_titre($langs->trans("ProjectsDedicatedToThisThirdParty"), $newcardbutton.$morehtmlright, ''); + print '
    '; + print "\n".'
    '; - $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount"; - $sql .= ", cls.code as opp_status_code"; - $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; - $sql .= " WHERE p.fk_soc = ".$object->id; - $sql .= " AND p.entity IN (".getEntity('project').")"; - $sql .= " ORDER BY p.dateo DESC"; + $sql = "SELECT p.rowid as id, p.entity, p.title, p.ref, p.public, p.dateo as do, p.datee as de, p.fk_statut as status, p.fk_opp_status, p.opp_amount, p.opp_percent, p.tms as date_update, p.budget_amount"; + $sql .= ", cls.code as opp_status_code"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_lead_status as cls on p.fk_opp_status = cls.rowid"; + $sql .= " WHERE p.fk_soc = ".$object->id; + $sql .= " AND p.entity IN (".getEntity('project').")"; + $sql .= " ORDER BY p.dateo DESC"; - $result = $db->query($sql); - if ($result) - { - $num = $db->num_rows($result); + $result = $db->query($sql); + if ($result) + { + $num = $db->num_rows($result); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - if ($num > 0) - { - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - - $projecttmp = new Project($db); - - $i = 0; - - while ($i < $num) - { - $obj = $db->fetch_object($result); - $projecttmp->fetch($obj->id); - - // To verify role of users - $userAccess = $projecttmp->restrictedProjectArea($user); - - if ($user->rights->projet->lire && $userAccess > 0) - { - print ''; - - // Ref - print ''; - - // Label - print ''; - // Date start - print ''; - // Date end - print ''; - // Opp amount - print ''; - // Opp status - print ''; - // Opp percent - print ''; - // Status - print ''; - - print ''; - } - $i++; - } - } - else + if ($num > 0) { - print ''; - } - $db->free($result); - } - else - { - dol_print_error($db); - } - print "
    '.$langs->trans("Ref").''.$langs->trans("Name").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("OpportunityAmountShort").''.$langs->trans("OpportunityStatusShort").''.$langs->trans("OpportunityProbabilityShort").''.$langs->trans("Status").'
    '.$langs->trans("Ref").''.$langs->trans("Name").''.$langs->trans("DateStart").''.$langs->trans("DateEnd").''.$langs->trans("OpportunityAmountShort").''.$langs->trans("OpportunityStatusShort").''.$langs->trans("OpportunityProbabilityShort").''.$langs->trans("Status").'
    '; - print $projecttmp->getNomUrl(1); - print ''.$obj->title.''.dol_print_date($db->jdate($obj->do), "day").''.dol_print_date($db->jdate($obj->de), "day").''; - if ($obj->opp_status_code) - { - print price($obj->opp_amount, 1, '', 1, -1, -1, ''); - } - print ''; - if ($obj->opp_status_code) print $langs->trans("OppStatus".$obj->opp_status_code); - print ''; - if ($obj->opp_percent) print price($obj->opp_percent, 1, '', 1, 0).'%'; - print ''.$projecttmp->getLibStatut(5).'
    '.$langs->trans("None").'
    "; - print '
    '; + require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - print "
    \n"; - } + $projecttmp = new Project($db); - return $i; + $i = 0; + + while ($i < $num) + { + $obj = $db->fetch_object($result); + $projecttmp->fetch($obj->id); + + // To verify role of users + $userAccess = $projecttmp->restrictedProjectArea($user); + + if ($user->rights->projet->lire && $userAccess > 0) + { + print ''; + + // Ref + print ''; + print $projecttmp->getNomUrl(1); + print ''; + + // Label + print ''.$obj->title.''; + // Date start + print ''.dol_print_date($db->jdate($obj->do), "day").''; + // Date end + print ''.dol_print_date($db->jdate($obj->de), "day").''; + // Opp amount + print ''; + if ($obj->opp_status_code) + { + print price($obj->opp_amount, 1, '', 1, -1, -1, ''); + } + print ''; + // Opp status + print ''; + if ($obj->opp_status_code) print $langs->trans("OppStatus".$obj->opp_status_code); + print ''; + // Opp percent + print ''; + if ($obj->opp_percent) print price($obj->opp_percent, 1, '', 1, 0).'%'; + print ''; + // Status + print ''.$projecttmp->getLibStatut(5).''; + + print ''; + } + $i++; + } + } else { + print ''.$langs->trans("None").''; + } + $db->free($result); + } else { + dol_print_error($db); + } + print ""; + print '
'; + + print "
\n"; + } + + return $i; } @@ -872,388 +845,386 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $formcompany = new FormCompany($db); - $form = new Form($db); + $form = new Form($db); - $optioncss = GETPOST('optioncss', 'alpha'); - $sortfield = GETPOST("sortfield", 'alpha'); - $sortorder = GETPOST("sortorder", 'alpha'); - $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); + $optioncss = GETPOST('optioncss', 'alpha'); + $sortfield = GETPOST("sortfield", 'alpha'); + $sortorder = GETPOST("sortorder", 'alpha'); + $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); - $search_status = GETPOST("search_status", 'int'); - if ($search_status == '') $search_status = 1; // always display active customer first + $search_status = GETPOST("search_status", 'int'); + if ($search_status == '') $search_status = 1; // always display active customer first - $search_name = GETPOST("search_name", 'alpha'); - $search_address = GETPOST("search_address", 'alpha'); - $search_poste = GETPOST("search_poste", 'alpha'); + $search_name = GETPOST("search_name", 'alpha'); + $search_address = GETPOST("search_address", 'alpha'); + $search_poste = GETPOST("search_poste", 'alpha'); $search_roles = GETPOST("search_roles", 'array'); - $socialnetworks = getArrayOfSocialNetworks(); + $socialnetworks = getArrayOfSocialNetworks(); - $searchAddressPhoneDBFields = array( - //Address - 't.address', - 't.zip', - 't.town', + $searchAddressPhoneDBFields = array( + //Address + 't.address', + 't.zip', + 't.town', - //Phone - 't.phone', - 't.phone_perso', - 't.phone_mobile', + //Phone + 't.phone', + 't.phone_perso', + 't.phone_mobile', - //Fax - 't.fax', + //Fax + 't.fax', - //E-mail - 't.email', - ); - //Social media - foreach ($socialnetworks as $key => $value) { - if ($value['active']) { - $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'"; - } - } + //E-mail + 't.email', + ); + //Social media + foreach ($socialnetworks as $key => $value) { + if ($value['active']) { + $searchAddressPhoneDBFields['t.'.$key] = "t.socialnetworks->'$.".$key."'"; + } + } - if (!$sortorder) $sortorder = "ASC"; - if (!$sortfield) $sortfield = "t.lastname"; + if (!$sortorder) $sortorder = "ASC"; + if (!$sortfield) $sortfield = "t.lastname"; - if (!empty($conf->clicktodial->enabled)) - { - $user->fetch_clicktodial(); // lecture des infos de clicktodial du user - } + if (!empty($conf->clicktodial->enabled)) + { + $user->fetch_clicktodial(); // lecture des infos de clicktodial du user + } - $contactstatic = new Contact($db); + $contactstatic = new Contact($db); - $extrafields->fetch_name_optionals_label($contactstatic->table_element); + $extrafields->fetch_name_optionals_label($contactstatic->table_element); - $contactstatic->fields = array( - 'name' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1), - 'poste' =>array('type'=>'varchar(128)', 'label'=>'PostOrFunction', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>20), - 'address' =>array('type'=>'varchar(128)', 'label'=>'Address', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>30), - 'role' =>array('type'=>'checkbox', 'label'=>'Role', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>40), - 'statut' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>50, 'arrayofkeyval'=>array(0=>$contactstatic->LibStatut(0, 1), 1=>$contactstatic->LibStatut(1, 1))), - ); + $contactstatic->fields = array( + 'name' =>array('type'=>'varchar(128)', 'label'=>'Name', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1), + 'poste' =>array('type'=>'varchar(128)', 'label'=>'PostOrFunction', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>20), + 'address' =>array('type'=>'varchar(128)', 'label'=>'Address', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>30), + 'role' =>array('type'=>'checkbox', 'label'=>'Role', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'showoncombobox'=>1, 'index'=>1, 'position'=>40), + 'statut' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'default'=>0, 'index'=>1, 'position'=>50, 'arrayofkeyval'=>array(0=>$contactstatic->LibStatut(0, 1), 1=>$contactstatic->LibStatut(1, 1))), + ); - // Definition of fields for list - $arrayfields = array( - 't.rowid'=>array('label'=>"TechnicalID", 'checked'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'enabled'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'position'=>1), - 't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10), - 't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20), - 't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30), - 'sc.role'=>array('label'=>"ContactByDefaultFor", 'checked'=>1, 'position'=>40), - 't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>50, 'class'=>'center'), - ); - // Extra fields - if (is_array($extrafields->attributes[$contactstatic->table_element]['label']) && count($extrafields->attributes[$contactstatic->table_element]['label'])) - { - foreach ($extrafields->attributes[$contactstatic->table_element]['label'] as $key => $val) - { - if (!empty($extrafields->attributes[$contactstatic->table_element]['list'][$key])) { + // Definition of fields for list + $arrayfields = array( + 't.rowid'=>array('label'=>"TechnicalID", 'checked'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'enabled'=>($conf->global->MAIN_SHOW_TECHNICAL_ID ? 1 : 0), 'position'=>1), + 't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10), + 't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20), + 't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30), + 'sc.role'=>array('label'=>"ContactByDefaultFor", 'checked'=>1, 'position'=>40), + 't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>50, 'class'=>'center'), + ); + // Extra fields + if (is_array($extrafields->attributes[$contactstatic->table_element]['label']) && count($extrafields->attributes[$contactstatic->table_element]['label'])) + { + foreach ($extrafields->attributes[$contactstatic->table_element]['label'] as $key => $val) + { + if (!empty($extrafields->attributes[$contactstatic->table_element]['list'][$key])) { $arrayfields["ef.".$key] = array( 'label'=>$extrafields->attributes[$contactstatic->table_element]['label'][$key], 'checked'=>(($extrafields->attributes[$contactstatic->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>1000 + $extrafields->attributes[$contactstatic->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$contactstatic->table_element]['list'][$key]) != 3 && $extrafields->attributes[$contactstatic->table_element]['perms'][$key])); } - } - } + } + } - // Initialize array of search criterias - $search = array(); - foreach ($arrayfields as $key => $val) - { - $queryName = 'search_'.substr($key, 2); - if (GETPOST($queryName, 'alpha')) { - $search[substr($key, 2)] = GETPOST($queryName, 'alpha'); - } - } - $search_array_options = $extrafields->getOptionalsFromPost($contactstatic->table_element, '', 'search_'); + // Initialize array of search criterias + $search = array(); + foreach ($arrayfields as $key => $val) + { + $queryName = 'search_'.substr($key, 2); + if (GETPOST($queryName, 'alpha')) { + $search[substr($key, 2)] = GETPOST($queryName, 'alpha'); + } + } + $search_array_options = $extrafields->getOptionalsFromPost($contactstatic->table_element, '', 'search_'); - // Purge search criteria - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers - { - $search_status = ''; - $search_name = ''; - $search_roles = array(); - $search_address = ''; - $search_poste = ''; - $search = array(); - $search_array_options = array(); + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers + { + $search_status = ''; + $search_name = ''; + $search_roles = array(); + $search_address = ''; + $search_poste = ''; + $search = array(); + $search_array_options = array(); - foreach ($contactstatic->fields as $key => $val) + foreach ($contactstatic->fields as $key => $val) { $search[$key] = ''; } - } + } - $contactstatic->fields = dol_sort_array($contactstatic->fields, 'position'); - $arrayfields = dol_sort_array($arrayfields, 'position'); + $contactstatic->fields = dol_sort_array($contactstatic->fields, 'position'); + $arrayfields = dol_sort_array($arrayfields, 'position'); - $newcardbutton = ''; - if ($user->rights->societe->contact->creer) - { - $addcontact = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); - $newcardbutton .= dolGetButtonTitle($addcontact, '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); - } + $newcardbutton = ''; + if ($user->rights->societe->contact->creer) + { + $addcontact = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("AddContact") : $langs->trans("AddContactAddress")); + $newcardbutton .= dolGetButtonTitle($addcontact, '', 'fa fa-plus-circle', DOL_URL_ROOT.'/contact/card.php?socid='.$object->id.'&action=create&backtopage='.urlencode($backtopage)); + } - print "\n"; + print "\n"; - $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ContactsForCompany") : $langs->trans("ContactsAddressesForCompany")); - print load_fiche_titre($title, $newcardbutton, ''); + $title = (!empty($conf->global->SOCIETE_ADDRESSES_MANAGEMENT) ? $langs->trans("ContactsForCompany") : $langs->trans("ContactsAddressesForCompany")); + print load_fiche_titre($title, $newcardbutton, ''); - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; - $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - //if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + //if ($massactionbutton) $selectedfields.=$form->showCheckAddButtons('checkforselect', 1); print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table - print "\n".''."\n"; + print "\n".'
'."\n"; - $param = "socid=".urlencode($object->id); - if ($search_status != '') $param .= '&search_status='.urlencode($search_status); - if (count($search_roles) > 0) $param .= implode('&search_roles[]=', $search_roles); - if ($search_name != '') $param .= '&search_name='.urlencode($search_name); - if ($search_poste != '') $param .= '&search_poste='.urlencode($search_poste); - if ($search_address != '') $param .= '&search_address='.urlencode($search_address); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + $param = "socid=".urlencode($object->id); + if ($search_status != '') $param .= '&search_status='.urlencode($search_status); + if (count($search_roles) > 0) $param .= implode('&search_roles[]=', $search_roles); + if ($search_name != '') $param .= '&search_name='.urlencode($search_name); + if ($search_poste != '') $param .= '&search_poste='.urlencode($search_poste); + if ($search_address != '') $param .= '&search_address='.urlencode($search_address); + if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - // Add $param from extra fields - $extrafieldsobjectkey = $contactstatic->table_element; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + // Add $param from extra fields + $extrafieldsobjectkey = $contactstatic->table_element; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - $sql = "SELECT t.rowid, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,"; - $sql .= " t.civility as civility_id, t.address, t.zip, t.town"; - $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)"; - $sql .= " WHERE t.fk_soc = ".$object->id; - if ($search_status != '' && $search_status != '-1') $sql .= " AND t.statut = ".$db->escape($search_status); - if ($search_name) $sql .= natural_search(array('t.lastname', 't.firstname'), $search_name); - if ($search_poste) $sql .= natural_search('t.poste', $search_poste); - if ($search_address) { + $sql = "SELECT t.rowid, t.lastname, t.firstname, t.fk_pays as country_id, t.civility, t.poste, t.phone as phone_pro, t.phone_mobile, t.phone_perso, t.fax, t.email, t.socialnetworks, t.statut, t.photo,"; + $sql .= " t.civility as civility_id, t.address, t.zip, t.town"; + $sql .= " FROM ".MAIN_DB_PREFIX."socpeople as t"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople_extrafields as ef on (t.rowid = ef.fk_object)"; + $sql .= " WHERE t.fk_soc = ".$object->id; + if ($search_status != '' && $search_status != '-1') $sql .= " AND t.statut = ".$db->escape($search_status); + if ($search_name) $sql .= natural_search(array('t.lastname', 't.firstname'), $search_name); + if ($search_poste) $sql .= natural_search('t.poste', $search_poste); + if ($search_address) { $sql .= natural_search($searchAddressPhoneDBFields, $search_address); } if (count($search_roles) > 0) { $sql .= " AND t.rowid IN (SELECT sc.fk_socpeople FROM ".MAIN_DB_PREFIX."societe_contacts as sc WHERE sc.fk_c_type_contact IN (".implode(',', $search_roles)."))"; } - // Add where from extra fields - $extrafieldsobjectkey = $contactstatic->table_element; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; - if ($sortfield == "t.name") $sql .= " ORDER BY t.lastname $sortorder, t.firstname $sortorder"; - else $sql .= " ORDER BY $sortfield $sortorder"; + // Add where from extra fields + $extrafieldsobjectkey = $contactstatic->table_element; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; + if ($sortfield == "t.name") $sql .= " ORDER BY t.lastname $sortorder, t.firstname $sortorder"; + else $sql .= " ORDER BY $sortfield $sortorder"; - dol_syslog('core/lib/company.lib.php :: show_contacts', LOG_DEBUG); - $result = $db->query($sql); - if (!$result) dol_print_error($db); + dol_syslog('core/lib/company.lib.php :: show_contacts', LOG_DEBUG); + $result = $db->query($sql); + if (!$result) dol_print_error($db); - $num = $db->num_rows($result); + $num = $db->num_rows($result); - // Fields title search - // -------------------------------------------------------------------- - print ''; - foreach ($contactstatic->fields as $key => $val) - { - $align = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $align .= ($align ? ' ' : '').'center'; - if (in_array($val['type'], array('timestamp'))) $align .= ($align ? ' ' : '').'nowrap'; - if ($key == 'status' || $key == 'statut') $align .= ($align ? ' ' : '').'center'; - if (!empty($arrayfields['t.'.$key]['checked']) || !empty($arrayfields['sc.'.$key]['checked'])) - { - print ''; - } - } - // Extra fields - $extrafieldsobjectkey = $contactstatic->table_element; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + // Fields title search + // -------------------------------------------------------------------- + print ''; + foreach ($contactstatic->fields as $key => $val) + { + $align = ''; + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $align .= ($align ? ' ' : '').'center'; + if (in_array($val['type'], array('timestamp'))) $align .= ($align ? ' ' : '').'nowrap'; + if ($key == 'status' || $key == 'statut') $align .= ($align ? ' ' : '').'center'; + if (!empty($arrayfields['t.'.$key]['checked']) || !empty($arrayfields['sc.'.$key]['checked'])) + { + print ''; + } + } + // Extra fields + $extrafieldsobjectkey = $contactstatic->table_element; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; - // Fields from hook - $parameters = array('arrayfields'=>$arrayfields); - $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $contactstatic); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - // Action column - print ''; - print ''."\n"; + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields); + $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $contactstatic); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + // Action column + print ''; + print ''."\n"; - // Fields title label - // -------------------------------------------------------------------- - print ''; - foreach ($contactstatic->fields as $key => $val) - { - $align = ''; - if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $align .= ($align ? ' ' : '').'center'; - if (in_array($val['type'], array('timestamp'))) $align .= ($align ? ' ' : '').'nowrap'; - if ($key == 'status' || $key == 'statut') $align .= ($align ? ' ' : '').'center'; - if (!empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($val['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; - if ($key == 'role') $align .= ($align ? ' ' : '').'left'; - if (!empty($arrayfields['sc.'.$key]['checked'])) { - print getTitleFieldOfList($arrayfields['sc.'.$key]['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; - } - } - // Extra fields - $extrafieldsobjectkey = $contactstatic->table_element; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; - // Hook fields + // Fields title label + // -------------------------------------------------------------------- + print ''; + foreach ($contactstatic->fields as $key => $val) + { + $align = ''; + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $align .= ($align ? ' ' : '').'center'; + if (in_array($val['type'], array('timestamp'))) $align .= ($align ? ' ' : '').'nowrap'; + if ($key == 'status' || $key == 'statut') $align .= ($align ? ' ' : '').'center'; + if (!empty($arrayfields['t.'.$key]['checked'])) print getTitleFieldOfList($val['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; + if ($key == 'role') $align .= ($align ? ' ' : '').'left'; + if (!empty($arrayfields['sc.'.$key]['checked'])) { + print getTitleFieldOfList($arrayfields['sc.'.$key]['label'], 0, $_SERVER['PHP_SELF'], '', '', $param, ($align ? 'class="'.$align.'"' : ''), $sortfield, $sortorder, $align.' ')."\n"; + } + } + // Extra fields + $extrafieldsobjectkey = $contactstatic->table_element; + 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, $object); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; - print ''."\n"; + $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n"; + print ''."\n"; - $i = -1; + $i = -1; if ($num || (GETPOST('button_search') || GETPOST('button_search.x') || GETPOST('button_search_x'))) - { - $i = 0; + { + $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($result); + while ($i < $num) + { + $obj = $db->fetch_object($result); - $contactstatic->id = $obj->rowid; - $contactstatic->ref = $obj->ref; - $contactstatic->statut = $obj->statut; - $contactstatic->lastname = $obj->lastname; - $contactstatic->firstname = $obj->firstname; - $contactstatic->civility_id = $obj->civility_id; - $contactstatic->civility_code = $obj->civility_id; - $contactstatic->poste = $obj->poste; - $contactstatic->address = $obj->address; - $contactstatic->zip = $obj->zip; - $contactstatic->town = $obj->town; - $contactstatic->phone_pro = $obj->phone_pro; - $contactstatic->phone_mobile = $obj->phone_mobile; - $contactstatic->phone_perso = $obj->phone_perso; - $contactstatic->email = $obj->email; - $contactstatic->web = $obj->web; - $contactstatic->socialnetworks = $obj->socialnetworks; - $contactstatic->photo = $obj->photo; + $contactstatic->id = $obj->rowid; + $contactstatic->ref = $obj->ref; + $contactstatic->statut = $obj->statut; + $contactstatic->lastname = $obj->lastname; + $contactstatic->firstname = $obj->firstname; + $contactstatic->civility_id = $obj->civility_id; + $contactstatic->civility_code = $obj->civility_id; + $contactstatic->poste = $obj->poste; + $contactstatic->address = $obj->address; + $contactstatic->zip = $obj->zip; + $contactstatic->town = $obj->town; + $contactstatic->phone_pro = $obj->phone_pro; + $contactstatic->phone_mobile = $obj->phone_mobile; + $contactstatic->phone_perso = $obj->phone_perso; + $contactstatic->email = $obj->email; + $contactstatic->web = $obj->web; + $contactstatic->socialnetworks = $obj->socialnetworks; + $contactstatic->photo = $obj->photo; - $country_code = getCountry($obj->country_id, 2); - $contactstatic->country_code = $country_code; + $country_code = getCountry($obj->country_id, 2); + $contactstatic->country_code = $country_code; - $contactstatic->setGenderFromCivility(); - $contactstatic->fetch_optionals(); + $contactstatic->setGenderFromCivility(); + $contactstatic->fetch_optionals(); - $resultRole = $contactstatic->fetchRoles(); - if ($resultRole < 0) { - setEventMessages(null, $contactstatic->errors, 'errors'); - } + $resultRole = $contactstatic->fetchRoles(); + if ($resultRole < 0) { + setEventMessages(null, $contactstatic->errors, 'errors'); + } - if (is_array($contactstatic->array_options)) - { - foreach ($contactstatic->array_options as $key => $val) - { - $obj->$key = $val; - } - } + if (is_array($contactstatic->array_options)) + { + foreach ($contactstatic->array_options as $key => $val) + { + $obj->$key = $val; + } + } - print ''; + print ''; - // ID - if (!empty($arrayfields['t.rowid']['checked'])) - { - print ''; - } + // ID + if (!empty($arrayfields['t.rowid']['checked'])) + { + print ''; + } // Photo - Name - if (!empty($arrayfields['t.name']['checked'])) - { - print ''; - } + } // Job position - if (!empty($arrayfields['t.poste']['checked'])) - { - print ''; - } + if (!empty($arrayfields['t.poste']['checked'])) + { + print ''; + } - // Address - Phone - Email - if (!empty($arrayfields['t.address']['checked'])) - { - print ''; - } + // Address - Phone - Email + if (!empty($arrayfields['t.address']['checked'])) + { + print ''; + } - // Role - if (!empty($arrayfields['sc.role']['checked'])) - { - print ''; - } + // Role + if (!empty($arrayfields['sc.role']['checked'])) + { + print ''; + } - // Status - if (!empty($arrayfields['t.statut']['checked'])) - { - print ''; - } + // Status + if (!empty($arrayfields['t.statut']['checked'])) + { + print ''; + } - // Extra fields - $extrafieldsobjectkey = $contactstatic->table_element; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Extra fields + $extrafieldsobjectkey = $contactstatic->table_element; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - // Actions + // Actions print ''; + print ''; - print "\n"; - $i++; - } - } - else - { + print "\n"; + $i++; + } + } else { $colspan = 1; foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } print ''; - } - print "\n
'; - if (in_array($key, array('statut'))) { - print $form->selectarray('search_status', array('-1'=>'', '0'=>$contactstatic->LibStatut(0, 1), '1'=>$contactstatic->LibStatut(1, 1)), $search_status); - } elseif (in_array($key, array('role'))) { - print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles); - } else { - print ''; - } - print '
'; + if (in_array($key, array('statut'))) { + print $form->selectarray('search_status', array('-1'=>'', '0'=>$contactstatic->LibStatut(0, 1), '1'=>$contactstatic->LibStatut(1, 1)), $search_status); + } elseif (in_array($key, array('role'))) { + print $formcompany->showRoles("search_roles", $contactstatic, 'edit', $search_roles); + } else { + print ''; + } + print ''; - print $form->showFilterButtons(); - print '
'; + print $form->showFilterButtons(); + print '
'; - print $contactstatic->id; - print ''; + print $contactstatic->id; + print ''; - print $form->showphoto('contact', $contactstatic, 0, 0, 0, 'photorefnoborder valignmiddle marginrightonly', 'small', 1, 0, 1); + if (!empty($arrayfields['t.name']['checked'])) + { + print ''; + print $form->showphoto('contact', $contactstatic, 0, 0, 0, 'photorefnoborder valignmiddle marginrightonly', 'small', 1, 0, 1); print $contactstatic->getNomUrl(0, '', 0, '&backtopage='.urlencode($backtopage)); print ''; - if ($obj->poste) print $obj->poste; - print ''; + if ($obj->poste) print $obj->poste; + print ''; - print $contactstatic->getBannerAddress('contact', $object); - print ''; + print $contactstatic->getBannerAddress('contact', $object); + print ''; - print $formcompany->showRoles("roles", $contactstatic, 'view'); - print ''; + print $formcompany->showRoles("roles", $contactstatic, 'view'); + print ''.$contactstatic->getLibStatut(5).''.$contactstatic->getLibStatut(5).''; // Add to agenda - if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) - { - print ''; - print img_object($langs->trans("Event"), "action"); - print '   '; - } + if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->create) + { + print ''; + print img_object($langs->trans("Event"), "action"); + print '   '; + } - // Edit - if ($user->rights->societe->contact->creer) - { - print ''; - print img_edit(); - print ''; - } + // Edit + if ($user->rights->societe->contact->creer) + { + print ''; + print img_edit(); + print ''; + } - print '
'.$langs->trans("None").'
\n"; + } + print "\n\n"; print '
'; - print '
'."\n"; + print ''."\n"; - return $i; + return $i; } @@ -1271,12 +1242,12 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '') */ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '') { - global $user, $conf; + global $user, $conf; - $out = show_actions_done($conf, $langs, $db, $filterobj, $objcon, 1, $actioncode, 'todo'); + $out = show_actions_done($conf, $langs, $db, $filterobj, $objcon, 1, $actioncode, 'todo'); - if ($noprint) return $out; - else print $out; + if ($noprint) return $out; + else print $out; } /** @@ -1299,340 +1270,333 @@ function show_actions_todo($conf, $langs, $db, $filterobj, $objcon = '', $noprin */ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC', $module = '') { - global $user, $conf; - global $form; + global $user, $conf; + global $form; - global $param, $massactionbutton; + global $param, $massactionbutton; + $start_year = GETPOST('dateevent_startyear'); + $start_month = GETPOST('dateevent_startmonth'); + $start_day = GETPOST('dateevent_startday'); + $end_year = GETPOST('dateevent_endyear'); + $end_month = GETPOST('dateevent_endmonth'); + $end_day = GETPOST('dateevent_endday'); + if (!empty($start_year) && !empty($start_month) && !empty($start_day)) { + $search_start = $start_year.'-'.$start_month.'-'.$start_day; + $tms_start = strtotime($search_start); + } + if (!empty($end_year) && !empty($end_month) && !empty($end_day)) { + $search_end = $end_year.'-'.$end_month.'-'.$end_day.' 23:59:59'; + $tms_end = strtotime($search_end); + } + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All test are required to be compatible with all browsers + { + $search_start = ''; + $tms_start = ''; + $search_end = ''; + $tms_end = ''; + } + dol_include_once('/comm/action/class/actioncomm.class.php'); - dol_include_once('/comm/action/class/actioncomm.class.php'); + // Check parameters + if (!is_object($filterobj) && !is_object($objcon)) dol_print_error('', 'BadParameter'); - // Check parameters - if (!is_object($filterobj) && !is_object($objcon)) dol_print_error('', 'BadParameter'); + $out = ''; + $histo = array(); + $numaction = 0; + $now = dol_now('tzuser'); - $out = ''; - $histo = array(); - $numaction = 0; - $now = dol_now('tzuser'); + // Open DSI -- Fix order by -- Begin + $sortfield_list = explode(',', $sortfield); + $sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent'); + $sortfield_new_list = array(); + foreach ($sortfield_list as $sortfield_value) { + $sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)]; + } + $sortfield_new = implode(',', $sortfield_new_list); - // Open DSI -- Fix order by -- Begin - $sortfield_list = explode(',', $sortfield); - $sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent'); - $sortfield_new_list = array(); - foreach ($sortfield_list as $sortfield_value) { - $sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)]; - } - $sortfield_new = implode(',', $sortfield_new_list); + $sql = ''; - $sql = ''; + if (!empty($conf->agenda->enabled)) + { + // Recherche histo sur actioncomm + if (is_object($objcon) && $objcon->id > 0) { + $sql = "SELECT DISTINCT a.id, a.label as label,"; + } else { + $sql = "SELECT a.id, a.label as label,"; + } + $sql .= " a.datep as dp,"; + $sql .= " a.datep2 as dp2,"; + $sql .= " a.percent as percent, 'action' as type,"; + $sql .= " a.fk_element, a.elementtype,"; + $sql .= " a.fk_contact,"; + $sql .= " c.code as acode, c.libelle as alabel, c.picto as apicto,"; + $sql .= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; + if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) $sql .= ", sp.lastname, sp.firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { /* Nothing */ } elseif (is_object($filterobj) && get_class($filterobj) == 'Project') { /* Nothing */ } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", m.lastname, m.firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", o.ref"; + elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && is_array($filterobj->fields['ref']) && $filterobj->table_element && $filterobj->element) $sql .= ", o.ref"; - if (!empty($conf->agenda->enabled)) - { - // Recherche histo sur actioncomm - if (is_object($objcon) && $objcon->id > 0) { - $sql = "SELECT DISTINCT a.id, a.label as label,"; - } - else - { - $sql = "SELECT a.id, a.label as label,"; - } - $sql .= " a.datep as dp,"; - $sql .= " a.datep2 as dp2,"; - $sql .= " a.percent as percent, 'action' as type,"; - $sql .= " a.fk_element, a.elementtype,"; - $sql .= " a.fk_contact,"; - $sql .= " c.code as acode, c.libelle as alabel, c.picto as apicto,"; - $sql .= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; - if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) $sql .= ", sp.lastname, sp.firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { /* Nothing */ } - elseif (is_object($filterobj) && get_class($filterobj) == 'Project') { /* Nothing */ } - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", m.lastname, m.firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", o.ref"; - elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && is_array($filterobj->fields['ref']) && $filterobj->table_element && $filterobj->element) $sql .= ", o.ref"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; + $force_filter_contact = false; + if (is_object($objcon) && $objcon->id > 0) { + $force_filter_contact = true; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm"; + $sql .= " AND r.element_type = '".$db->escape($objcon->table_element)."' AND r.fk_element = ".$objcon->id; + } - $force_filter_contact = false; - if (is_object($objcon) && $objcon->id > 0) { - $force_filter_contact = true; - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm"; - $sql .= " AND r.element_type = '".$db->escape($objcon->table_element)."' AND r.fk_element = ".$objcon->id; - } + if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er"; + $sql .= " ON er.resource_type = 'dolresource'"; + $sql .= " AND er.element_id = a.id"; + $sql .= " AND er.resource_id = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Project') { /* Nothing */ } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", ".MAIN_DB_PREFIX."adherent as m"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", ".MAIN_DB_PREFIX."product as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", ".MAIN_DB_PREFIX."ticket as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", ".MAIN_DB_PREFIX."bom_bom as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", ".MAIN_DB_PREFIX."contrat as o"; + elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && is_array($filterobj->fields['ref']) && $filterobj->table_element && $filterobj->element) $sql .= ", ".MAIN_DB_PREFIX.$filterobj->table_element." as o"; - if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur'))) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er"; - $sql .= " ON er.resource_type = 'dolresource'"; - $sql .= " AND er.element_id = a.id"; - $sql .= " AND er.resource_id = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Project') { /* Nothing */ } - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", ".MAIN_DB_PREFIX."adherent as m"; - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", ".MAIN_DB_PREFIX."product as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", ".MAIN_DB_PREFIX."ticket as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", ".MAIN_DB_PREFIX."bom_bom as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", ".MAIN_DB_PREFIX."contrat as o"; - elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && is_array($filterobj->fields['ref']) && $filterobj->table_element && $filterobj->element) $sql .= ", ".MAIN_DB_PREFIX.$filterobj->table_element." as o"; + $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; + if ($force_filter_contact === false) { + if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql .= " AND a.fk_soc = ".$filterobj->id; + elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { /* Nothing */ } + elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql .= " AND a.fk_project = ".$filterobj->id; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') + { + $sql .= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && is_array($filterobj->fields['ref']) && $filterobj->table_element && $filterobj->element) + { + // Generic case + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = '".$db->escape($filterobj->element).($module ? '@'.$module : '')."'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } + } - $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; - if ($force_filter_contact === false) { - if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql .= " AND a.fk_soc = ".$filterobj->id; - elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { /* Nothing */ } - elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql .= " AND a.fk_project = ".$filterobj->id; - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') - { - $sql .= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && is_array($filterobj->fields) && is_array($filterobj->fields['rowid']) && is_array($filterobj->fields['ref']) && $filterobj->table_element && $filterobj->element) - { - // Generic case - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = '".$db->escape($filterobj->element).($module ? '@'.$module : '')."'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - } + if (!empty($search_start) && !empty($search_end)) { + $sql .= " AND ((a.datep BETWEEN '$search_start' AND '$search_end') OR (a.datep2 BETWEEN '$search_start' AND '$search_end'))"; + } + elseif (empty($search_start) && !empty($search_end)) { + $sql .= " AND ((a.datep <= '$search_end') OR (a.datep2 <= '$search_end'))"; + } + elseif (!empty($search_start) && empty($search_end)) { + $sql .= " AND ((a.datep >= '$search_start') OR (a.datep2 >= '$search_start'))"; + } - // Condition on actioncode - if (!empty($actioncode)) - { - if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { - if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; - elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; - else - { - if ($actioncode == 'AC_OTH') $sql .= " AND c.type != 'systemauto'"; - elseif ($actioncode == 'AC_OTH_AUTO') $sql .= " AND c.type = 'systemauto'"; - } - } - else - { - if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; - elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; - else $sql .= " AND c.code = '".$db->escape($actioncode)."'"; - } - } - if ($donetodo == 'todo') $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; - elseif ($donetodo == 'done') $sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; - if (is_array($filters) && $filters['search_agenda_label']) $sql .= natural_search('a.label', $filters['search_agenda_label']); - } + if (is_array($actioncode) && !empty($actioncode)) { + $sql .= ' AND ('; + foreach ($actioncode as $key => $code) { + if ($key != 0) $sql .= "OR ("; + if (!empty($code)) addEventTypeSQL($sql, $code, $donetodo, $now, $filters, ""); + if ($key != 0) $sql .= ")"; + } + $sql .= ')'; + } + elseif (!empty($actioncode)) addEventTypeSQL($sql, $actioncode, $donetodo, $now, $filters); - // Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing. - if (!empty($conf->mailing->enabled) && !empty($objcon->email) - && (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING')) - { - $langs->load("mails"); + if (is_array($actioncode)) { + foreach ($actioncode as $code) { + $sql2 = addMailingEventTypeSQL($code, $objcon, $filterobj); + if (!empty($sql2)) { + if (!empty($sql)) $sql = $sql." UNION ".$sql2; + elseif (empty($sql)) $sql = $sql2; + break; + } + } + } + else { + $sql2 = addMailingEventTypeSQL($actioncode, $objcon, $filterobj); + if (!empty($sql) && !empty($sql2)) { + $sql = $sql." UNION ".$sql2; + } + elseif (empty($sql) && !empty($sql2)) { + $sql = $sql2; + } + } + } - $sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type"; - $sql2 .= ", null as fk_element, '' as elementtype, null as contact_id"; - $sql2 .= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto"; - $sql2 .= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action - if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2 .= ", '' as lastname, '' as firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql2 .= ", '' as lastname, '' as firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql2 .= ", '' as ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql2 .= ", '' as ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql2 .= ", '' as ref"; - $sql2 .= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u"; - $sql2 .= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email. - $sql2 .= " AND mc.statut = 1"; - $sql2 .= " AND u.rowid = m.fk_user_valid"; - $sql2 .= " AND mc.fk_mailing = m.rowid"; - } + //TODO Add limit in nb of results + if ($sql) + { + $sql .= $db->order($sortfield_new, $sortorder); + dol_syslog("company.lib::show_actions_done", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $i = 0; + $num = $db->num_rows($resql); - if (!empty($sql) && !empty($sql2)) { - $sql = $sql." UNION ".$sql2; - } elseif (empty($sql) && !empty($sql2)) { - $sql = $sql2; - } + while ($i < $num) + { + $obj = $db->fetch_object($resql); - //TODO Add limit in nb of results - if ($sql) - { - $sql .= $db->order($sortfield_new, $sortorder); - dol_syslog("company.lib::show_actions_done", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) - { - $i = 0; - $num = $db->num_rows($resql); + if ($obj->type == 'action') { + $contactaction = new ActionComm($db); + $contactaction->id = $obj->id; + $result = $contactaction->fetchResources(); + if ($result < 0) { + dol_print_error($db); + setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors'); + } - while ($i < $num) - { - $obj = $db->fetch_object($resql); + //if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; + //elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; + $tododone = ''; + if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone = 'todo'; - if ($obj->type == 'action') { - $contactaction = new ActionComm($db); - $contactaction->id = $obj->id; - $result = $contactaction->fetchResources(); - if ($result < 0) { - dol_print_error($db); - setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors'); - } + $histo[$numaction] = array( + 'type'=>$obj->type, + 'tododone'=>$tododone, + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'percent'=>$obj->percent, - //if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; - //elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; - $tododone = ''; - if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone = 'todo'; + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo, - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>$tododone, - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'percent'=>$obj->percent, + 'contact_id'=>$obj->fk_contact, + 'socpeopleassigned' => $contactaction->socpeopleassigned, + 'lastname'=>$obj->lastname, + 'firstname'=>$obj->firstname, + 'fk_element'=>$obj->fk_element, + 'elementtype'=>$obj->elementtype, + // Type of event + 'acode'=>$obj->acode, + 'alabel'=>$obj->alabel, + 'libelle'=>$obj->alabel, // deprecated + 'apicto'=>$obj->apicto + ); + } else { + $histo[$numaction] = array( + 'type'=>$obj->type, + 'tododone'=>'done', + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'percent'=>$obj->percent, + 'acode'=>$obj->acode, - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo, + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo + ); + } - 'contact_id'=>$obj->fk_contact, - 'socpeopleassigned' => $contactaction->socpeopleassigned, - 'lastname'=>$obj->lastname, - 'firstname'=>$obj->firstname, - 'fk_element'=>$obj->fk_element, - 'elementtype'=>$obj->elementtype, - // Type of event - 'acode'=>$obj->acode, - 'alabel'=>$obj->alabel, - 'libelle'=>$obj->alabel, // deprecated - 'apicto'=>$obj->apicto - ); - } else { - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>'done', - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'percent'=>$obj->percent, - 'acode'=>$obj->acode, + $numaction++; + $i++; + } + } else { + dol_print_error($db); + } + } - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo - ); - } + if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email))) + { + $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60; - $numaction++; - $i++; - } - } - else - { - dol_print_error($db); - } - } + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; - if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email))) - { - $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60; + $formactions = new FormActions($db); - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + $actionstatic = new ActionComm($db); + $userstatic = new User($db); + $contactstatic = new Contact($db); - $formactions = new FormActions($db); + $out .= '
'; + if ($objcon && get_class($objcon) == 'Contact' && + (is_null($filterobj) || get_class($filterobj) == 'Societe')) + { + $out .= ''; + } else { + $out .= ''; + } + if ($filterobj && get_class($filterobj) == 'Societe') $out .= ''; - $actionstatic = new ActionComm($db); - $userstatic = new User($db); - $contactstatic = new Contact($db); + $out .= "\n"; - $out .= ''; - if ($objcon && get_class($objcon) == 'Contact' && - (is_null($filterobj) || get_class($filterobj) == 'Societe')) - { - $out .= ''; - } - else - { - $out .= ''; - } - if ($filterobj && get_class($filterobj) == 'Societe') $out .= ''; + $out .= '
'; + $out .= ''; - $out .= "\n"; - - $out .= '
'; - $out .= '
'; - - $out .= ''; - if ($donetodo) - { - $out .= ''; - } - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - $out .= ''; - // Action column - $out .= ''; - $out .= ''; - - $out .= ''; + $out .= ''; if ($donetodo) { - $tmp = ''; - if (get_class($filterobj) == 'Societe') $tmp .= ''; - $tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : ''); - $tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : ''); - $tmp .= ($donetodo != 'todo' ? $langs->trans("ActionsDoneShort") : ''); - //$out.=$langs->trans("ActionsToDoShort").' / '.$langs->trans("ActionsDoneShort"); - if (get_class($filterobj) == 'Societe') $tmp .= ''; - $out .= getTitleFieldOfList($tmp); + $out .= ''; + } + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + $out .= ''; + // Action column + $out .= ''; + $out .= ''; + + $out .= ''; + if ($donetodo) + { + $tmp = ''; + if (get_class($filterobj) == 'Societe') $tmp .= ''; + $tmp .= ($donetodo != 'done' ? $langs->trans("ActionsToDoShort") : ''); + $tmp .= ($donetodo != 'done' && $donetodo != 'todo' ? ' / ' : ''); + $tmp .= ($donetodo != 'todo' ? $langs->trans("ActionsDoneShort") : ''); + //$out.=$langs->trans("ActionsToDoShort").' / '.$langs->trans("ActionsDoneShort"); + if (get_class($filterobj) == 'Societe') $tmp .= ''; + $out .= getTitleFieldOfList($tmp); } $out .= getTitleFieldOfList($langs->trans("Ref"), 0, $_SERVER["PHP_SELF"], 'a.id', '', $param, '', $sortfield, $sortorder); $out .= getTitleFieldOfList($langs->trans("Owner")); - $out .= getTitleFieldOfList($langs->trans("Type")); + $out .= getTitleFieldOfList($langs->trans("Type")); $out .= getTitleFieldOfList($langs->trans("Label"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); - $out .= getTitleFieldOfList($langs->trans("Date"), 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, 'align="center"', $sortfield, $sortorder); - $out .= getTitleFieldOfList($langs->trans("RelatedObjects"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); + $out .= getTitleFieldOfList($langs->trans("Date"), 0, $_SERVER["PHP_SELF"], 'a.datep,a.id', '', $param, 'align="center"', $sortfield, $sortorder); + $out .= getTitleFieldOfList($langs->trans("RelatedObjects"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); $out .= getTitleFieldOfList($langs->trans("ActionOnContact"), 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); $out .= getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], 'a.percent', '', $param, 'align="center"', $sortfield, $sortorder); $out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch '); @@ -1642,123 +1606,133 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin $caction = new CActionComm($db); $arraylist = $caction->liste_array(1, 'code', '', (empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : 0), '', 1); - foreach ($histo as $key => $value) - { + foreach ($histo as $key => $value) + { $actionstatic->fetch($histo[$key]['id']); // TODO Do we need this, we already have a lot of data of line into $histo $actionstatic->type_picto = $histo[$key]['apicto']; $actionstatic->type_code = $histo[$key]['acode']; - $out .= ''; + $out .= ''; - // Done or todo - if ($donetodo) - { - $out .= ''; - } + // Done or todo + if ($donetodo) + { + $out .= ''; + } - // Ref - $out .= ''; + // Ref + $out .= ''; - // Author of event - $out .= ''; + // Author of event + $out .= ''; - // Type - $out .= ''; + // Type + $out .= ''; - // Title - $out .= ''; + // Title + $out .= ''; - // Date - $out .= '\n"; + // Date + $out .= '\n"; - // Title of event - //$out.=''; + // Title of event + //$out.=''; - // Linked object - $out .= ''; + // Linked object + $out .= ''; - // Contact(s) for action - if (empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) - { - $contactstatic->lastname = $histo[$key]['lastname']; - $contactstatic->firstname = $histo[$key]['firstname']; - $contactstatic->id = $histo[$key]['contact_id']; - $out .= ''; - } elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) { + // Contact(s) for action + if (empty($objcon->id) && isset($histo[$key]['contact_id']) && $histo[$key]['contact_id'] > 0) + { + $contactstatic->lastname = $histo[$key]['lastname']; + $contactstatic->firstname = $histo[$key]['firstname']; + $contactstatic->id = $histo[$key]['contact_id']; + $out .= ''; + } elseif (isset($histo[$key]['socpeopleassigned']) && is_array($histo[$key]['socpeopleassigned']) && count($histo[$key]['socpeopleassigned']) > 0) { $out .= ''; + } else { + $out .= ''; } - else { - $out .= ''; - } - // Status - $out .= ''; + // Status + $out .= ''; - // Actions - $out .= ''; + // Actions + $out .= ''; - $out .= "\n"; - $i++; - } - $out .= "
'; - $out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, 0, 1); - $out .= ''; - $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); - $out .= $searchpicto; - $out .= '
'; + $out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1); + $out .= ''.$form->selectDateToDate($tms_start, $tms_end, 'dateevent', 1).''; + $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); + $out .= $searchpicto; + $out .= '
'; - $out .= ''; + $out .= ''; - if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') { - $out .= ''.img_object($langs->trans("ShowEMailing"), "email").' '; - $out .= $histo[$key]['id']; - $out .= ''; - } else { - $out .= $actionstatic->getNomUrl(1, -1); - } - $out .= ''; + if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') { + $out .= ''.img_object($langs->trans("ShowEMailing"), "email").' '; + $out .= $histo[$key]['id']; + $out .= ''; + } else { + $out .= $actionstatic->getNomUrl(1, -1); + } + $out .= ''; - //$userstatic->id=$histo[$key]['userid']; - //$userstatic->login=$histo[$key]['login']; - //$out.=$userstatic->getLoginUrl(1); - if ($histo[$key]['userid'] > 0) - { - $userstatic->fetch($histo[$key]['userid']); // TODO Introduce a cache on users fetched - $out .= $userstatic->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', ''); - } - $out .= ''; + //$userstatic->id=$histo[$key]['userid']; + //$userstatic->login=$histo[$key]['login']; + //$out.=$userstatic->getLoginUrl(1); + if ($histo[$key]['userid'] > 0) + { + $userstatic->fetch($histo[$key]['userid']); // TODO Introduce a cache on users fetched + $out .= $userstatic->getNomUrl(-1, '', 0, 0, 16, 0, 'firstelselast', ''); + } + $out .= ''; - if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { - if ($actionstatic->type_picto) print img_picto('', $actionstatic->type_picto); - else { - if ($actionstatic->type_code == 'AC_RDV') $out .= img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actionstatic->type_code == 'AC_TEL') $out .= img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actionstatic->type_code == 'AC_FAX') $out .= img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actionstatic->type_code == 'AC_EMAIL') $out .= img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actionstatic->type_code == 'AC_INT') $out .= img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; - elseif (!preg_match('/_AUTO/', $actionstatic->type_code)) $out .= img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; - } - } - $labeltype = $actionstatic->type_code; - if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH'; - if (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; - $out .= dol_trunc($labeltype, 28); - $out .= ''; + // TODO Code common with code into showactions + $imgpicto = ''; + if (!empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + if ($actionstatic->type_picto) { + $imgpicto .= img_picto('', $actionstatic->type_picto); + } + else { + if ($actionstatic->type_code == 'AC_RDV') $imgpicto .= img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_TEL') $imgpicto .= img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_FAX') $imgpicto .= img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_EMAIL' || $actionstatic->type_code == 'AC_EMAIL_IN') $imgpicto .= img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_INT') $imgpicto .= img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actionstatic->type_code == 'AC_OTH' && $actionstatic->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; + elseif (!preg_match('/_AUTO/', $actionstatic->type_code)) $imgpicto .= img_picto('', 'object_action', '', false, 0, 0, '', 'paddingright').' '; + } + } + $out .= $imgpicto; + $labeltype = $actionstatic->type_code; + if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH'; + if ($actionstatic->type_code == 'AC_OTH' && $actionstatic->code == 'TICKET_MSG') { + $labeltype = $langs->trans("Message"); + } else { + if (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; + if ($actionstatic->type_code == 'AC_OTH_AUTO' && ($actionstatic->type_code != $actionstatic->code) && $labeltype && !empty($arraylist[$actionstatic->code])) $labeltype .= ' - '.$arraylist[$actionstatic->code]; // Use code in priority on type_code + } + $out .= dol_trunc($labeltype, 28); + $out .= ''; - if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') - { - $transcode = $langs->trans("Action".$histo[$key]['acode']); - $libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']); - //$actionstatic->libelle=$libelle; - $libelle = $histo[$key]['note']; - $actionstatic->id = $histo[$key]['id']; - $out .= dol_trunc($libelle, 120); - } - if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') - { - $out .= ''.img_object($langs->trans("ShowEMailing"), "email").' '; - $transcode = $langs->trans("Action".$histo[$key]['acode']); - $libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing'); - $out .= dol_trunc($libelle, 120); - } - $out .= ''; + if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') + { + $transcode = $langs->trans("Action".$histo[$key]['acode']); + $libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']); + //$actionstatic->libelle=$libelle; + $libelle = $histo[$key]['note']; + $actionstatic->id = $histo[$key]['id']; + $out .= dol_trunc($libelle, 120); + } + if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'mailing') + { + $out .= ''.img_object($langs->trans("ShowEMailing"), "email").' '; + $transcode = $langs->trans("Action".$histo[$key]['acode']); + $libelle = ($transcode != "Action".$histo[$key]['acode'] ? $transcode : 'Send mass mailing'); + $out .= dol_trunc($libelle, 120); + } + $out .= ''; - $out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel'); - if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) - { - $tmpa = dol_getdate($histo[$key]['datestart'], true); - $tmpb = dol_getdate($histo[$key]['dateend'], true); - if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel'); - else $out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel'); - } - $late = 0; - if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; - if ($histo[$key]['percent'] == 0 && !$histo[$key]['datestart'] && $histo[$key]['dateend'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; - if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $histo[$key]['dateend'] < ($now - $delay_warning)) $late = 1; - if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && !$histo[$key]['dateend'] && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; - if ($late) $out .= img_warning($langs->trans("Late")).' '; - $out .= "'; + $out .= dol_print_date($histo[$key]['datestart'], 'dayhour', 'tzuserrel'); + if ($histo[$key]['dateend'] && $histo[$key]['dateend'] != $histo[$key]['datestart']) + { + $tmpa = dol_getdate($histo[$key]['datestart'], true); + $tmpb = dol_getdate($histo[$key]['dateend'], true); + if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $out .= '-'.dol_print_date($histo[$key]['dateend'], 'hour', 'tzuserrel'); + else $out .= '-'.dol_print_date($histo[$key]['dateend'], 'dayhour', 'tzuserrel'); + } + $late = 0; + if ($histo[$key]['percent'] == 0 && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; + if ($histo[$key]['percent'] == 0 && !$histo[$key]['datestart'] && $histo[$key]['dateend'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; + if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && $histo[$key]['dateend'] && $histo[$key]['dateend'] < ($now - $delay_warning)) $late = 1; + if ($histo[$key]['percent'] > 0 && $histo[$key]['percent'] < 100 && !$histo[$key]['dateend'] && $histo[$key]['datestart'] && $histo[$key]['datestart'] < ($now - $delay_warning)) $late = 1; + if ($late) $out .= img_warning($langs->trans("Late")).' '; + $out .= "'.dol_trunc($histo[$key]['note'], 40).''.dol_trunc($histo[$key]['note'], 40).''; - if (isset($histo[$key]['elementtype']) && !empty($histo[$key]['fk_element'])) - { - $out .= dolGetElementUrl($histo[$key]['fk_element'], $histo[$key]['elementtype'], 1); - } - else $out .= ' '; - $out .= ''; + if (isset($histo[$key]['elementtype']) && !empty($histo[$key]['fk_element'])) + { + $out .= dolGetElementUrl($histo[$key]['fk_element'], $histo[$key]['elementtype'], 1); + } else $out .= ' '; + $out .= ''.$contactstatic->getNomUrl(1, '', 10).''.$contactstatic->getNomUrl(1, '', 10).''; $contact = new Contact($db); foreach ($histo[$key]['socpeopleassigned'] as $cid => $value) { @@ -1777,28 +1751,27 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin } } $out .= '  '.$actionstatic->LibStatut($histo[$key]['percent'], 3, 0, $histo[$key]['datestart']).''.$actionstatic->LibStatut($histo[$key]['percent'], 3, 0, $histo[$key]['datestart']).'
\n"; - $out .= "
\n"; + $out .= "\n"; + $i++; + } + $out .= "\n"; + $out .= "

\n"; - $out .= ''; - } + $out .= ''; + } - if ($noprint) return $out; - else print $out; + if ($noprint) return $out; + else print $out; } /** @@ -1883,3 +1856,74 @@ function show_subsidiaries($conf, $langs, $db, $object) return $i; } +/** + * Add Event Type SQL + * + * @param string $sql $sql modified + * @param string $actioncode Action code + * @param string $donetodo donetodo + * @param string $now now + * @param string $filters array + * @param string $sqlANDOR "AND", "OR" or "" sql condition + * @return string sql request + */ +function addEventTypeSQL(&$sql, $actioncode, $donetodo, $now, $filters, $sqlANDOR = "AND") +{ + global $conf, $db; + // Condition on actioncode + + if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + if ($actioncode == 'AC_NON_AUTO') $sql .= " $sqlANDOR c.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'"; + else { + if ($actioncode == 'AC_OTH') $sql .= " $sqlANDOR c.type != 'systemauto'"; + elseif ($actioncode == 'AC_OTH_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'"; + } + } + else { + if ($actioncode == 'AC_NON_AUTO') $sql .= " $sqlANDOR c.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " $sqlANDOR c.type = 'systemauto'"; + else $sql .= " $sqlANDOR c.code = '".$db->escape($actioncode)."'"; + } + + if ($donetodo == 'todo') $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; + elseif ($donetodo == 'done') $sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; + if (is_array($filters) && $filters['search_agenda_label']) $sql .= natural_search('a.label', $filters['search_agenda_label']); + + return $sql; +} + +/** + * Add Mailing Event Type SQL + * + * @param string $actioncode Action code + * @param string $objcon objcon + * @param Object $filterobj filterobj + * @return string + */ +function addMailingEventTypeSQL($actioncode, $objcon, $filterobj) +{ + global $conf, $langs, $db; + // Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing. + if (!empty($conf->mailing->enabled) && !empty($objcon->email) + && (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING')) { + $langs->load("mails"); + + $sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type"; + $sql2 .= ", '' as fk_element, '' as elementtype, '' as contact_id"; + $sql2 .= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto"; + $sql2 .= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action + if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2 .= ", '' as lastname, '' as firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql2 .= ", '' as lastname, '' as firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql2 .= ", '' as ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql2 .= ", '' as ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql2 .= ", '' as ref"; + $sql2 .= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u"; + $sql2 .= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email. + $sql2 .= " AND mc.statut = 1"; + $sql2 .= " AND u.rowid = m.fk_user_valid"; + $sql2 .= " AND mc.fk_mailing=m.rowid"; + return $sql2; + } +} diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php index 33ad0a85229..1779e77213e 100644 --- a/htdocs/core/lib/cron.lib.php +++ b/htdocs/core/lib/cron.lib.php @@ -123,9 +123,7 @@ function dol_print_cron_urls() print $langs->trans("CronExplainHowToRunUnix"); print '
'; print '
'; - } - else - { + } else { print $langs->trans("CronExplainHowToRunWin"); } } diff --git a/htdocs/core/lib/date.lib.php b/htdocs/core/lib/date.lib.php index a751f584564..48e347afbd1 100644 --- a/htdocs/core/lib/date.lib.php +++ b/htdocs/core/lib/date.lib.php @@ -94,9 +94,7 @@ function getServerTimeZoneInt($refgmtdate = 'now') $localdt = new DateTime($newrefgmtdate, $localtz); $tmp = -1 * $localtz->getOffset($localdt); //print $refgmtdate.'='.$tmp; - } - else - { + } else { $tmp = 0; dol_print_error('', 'PHP version must be 5.3+'); } @@ -110,7 +108,7 @@ function getServerTimeZoneInt($refgmtdate = 'now') * * @param int $time Date timestamp (or string with format YYYY-MM-DD) * @param int $duration_value Value of delay to add - * @param int $duration_unit Unit of added delay (d, m, y, w, h) + * @param int $duration_unit Unit of added delay (d, m, y, w, h, i) * @return int New timestamp */ function dol_time_plus_duree($time, $duration_value, $duration_unit) @@ -118,6 +116,7 @@ function dol_time_plus_duree($time, $duration_value, $duration_unit) global $conf; if ($duration_value == 0) return $time; + if ($duration_unit == 'i') return $time + (60 * $duration_value); if ($duration_unit == 'h') return $time + (3600 * $duration_value); if ($duration_unit == 'w') return $time + (3600 * 24 * 7 * $duration_value); @@ -231,47 +230,37 @@ function convertSecondToTime($iSecond, $format = 'all', $lengthOfDay = 86400, $l { $sTime .= dol_print_date($iSecond, 'hourduration', true); } - } - elseif ($format == 'allhourminsec') + } elseif ($format == 'allhourminsec') { return sprintf("%02d", ($sWeek * $lengthOfWeek * 24 + $sDay * 24 + (int) floor($iSecond / 3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60))).':'.sprintf("%02d", ((int) ($iSecond % 60))); - } - elseif ($format == 'allhourmin') + } elseif ($format == 'allhourmin') { return sprintf("%02d", ($sWeek * $lengthOfWeek * 24 + $sDay * 24 + (int) floor($iSecond / 3600))).':'.sprintf("%02d", ((int) floor(($iSecond % 3600) / 60))); - } - elseif ($format == 'allhour') + } elseif ($format == 'allhour') { return sprintf("%02d", ($sWeek * $lengthOfWeek * 24 + $sDay * 24 + (int) floor($iSecond / 3600))); } - } - elseif ($format == 'hour') // only hour part + } elseif ($format == 'hour') // only hour part { $sTime = dol_print_date($iSecond, '%H', true); - } - elseif ($format == 'fullhour') + } elseif ($format == 'fullhour') { if (!empty($iSecond)) { $iSecond = $iSecond / 3600; - } - else { + } else { $iSecond = 0; } $sTime = $iSecond; - } - elseif ($format == 'min') // only min part + } elseif ($format == 'min') // only min part { $sTime = dol_print_date($iSecond, '%M', true); - } - elseif ($format == 'sec') // only sec part + } elseif ($format == 'sec') // only sec part { $sTime = dol_print_date($iSecond, '%S', true); - } - elseif ($format == 'month') // only month part + } elseif ($format == 'month') // only month part { $sTime = dol_print_date($iSecond, '%m', true); - } - elseif ($format == 'year') // only year part + } elseif ($format == 'year') // only year part { $sTime = dol_print_date($iSecond, '%Y', true); } @@ -300,8 +289,7 @@ function dolSqlDateFilter($datefield, $day_date, $month_date, $year_date, $exclu } elseif ($year_date > 0 && !empty($day_date)) { $sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month_date, $day_date, $year_date)); $sqldate .= "' AND '".$db->idate(dol_mktime(23, 59, 59, $month_date, $day_date, $year_date))."'"; - } else - $sqldate .= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%c') = '".$db->escape($month_date)."'"; + } else $sqldate .= ($excludefirstand ? "" : " AND ")." date_format( ".$datefield.", '%c') = '".$db->escape($month_date)."'"; } elseif ($year_date > 0) { $sqldate .= ($excludefirstand ? "" : " AND ").$datefield." BETWEEN '".$db->idate(dol_get_first_day($year_date, 1, false)); $sqldate .= "' AND '".$db->idate(dol_get_last_day($year_date, 12, false))."'"; @@ -346,8 +334,7 @@ function dol_stringtotime($string, $gm = 1) if ($syear < 50) $syear += 1900; if ($syear >= 50 && $syear < 100) $syear += 2000; $string = sprintf("%04d%02d%02d%02d%02d%02d", $syear, $smonth, $sday, $shour, $smin, $ssec); - } - elseif ( + } elseif ( preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})Z$/i', $string, $reg) // Convert date with format YYYY-MM-DDTHH:MM:SSZ (RFC3339) || preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2})$/i', $string, $reg) // Convert date with format YYYY-MM-DD HH:MM:SS || preg_match('/^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z$/i', $string, $reg) // Convert date with format YYYYMMDDTHHMMSSZ @@ -411,9 +398,7 @@ function dol_get_prev_month($month, $year) { $prev_month = 12; $prev_year = $year - 1; - } - else - { + } else { $prev_month = $month - 1; $prev_year = $year; } @@ -432,9 +417,7 @@ function dol_get_next_month($month, $year) { $next_month = 1; $next_year = $year + 1; - } - else - { + } else { $next_month = $month + 1; $next_year = $year; } @@ -483,8 +466,8 @@ function dol_get_next_week($day, $week, $month, $year) * @param int $year Year * @param int $month Month * @param mixed $gm False or 0 or 'server' = Return date to compare with server TZ, True or 1 to compare with GM date. - * Exemple: dol_get_first_day(1970,1,false) will return -3600 with TZ+1, after a dol_print_date will return 1970-01-01 00:00:00 - * Exemple: dol_get_first_day(1970,1,true) will return 0 whatever is TZ, after a dol_print_date will return 1970-01-01 00:00:00 + * Exemple: dol_get_first_day(1970,1,false) will return -3600 with TZ+1, a dol_print_date on it will return 1970-01-01 00:00:00 + * Exemple: dol_get_first_day(1970,1,true) will return 0 whatever is TZ, a dol_print_date on it will return 1970-01-01 00:00:00 * @return int Date for first day, '' if error */ function dol_get_first_day($year, $month = 1, $gm = false) @@ -508,9 +491,7 @@ function dol_get_last_day($year, $month = 12, $gm = false) { $month = 1; $year += 1; - } - else - { + } else { $month += 1; } @@ -521,6 +502,28 @@ function dol_get_last_day($year, $month = 12, $gm = false) return $datelim; } +/** Return GMT time for last hour of a given GMT date (it removes hours, min and second part) + * + * @param int $date Date + * @return int Date for last hour of a given date + */ +function dol_get_last_hour($date) +{ + $tmparray = dol_getdate($date); + return dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year'], false); +} + +/** Return GMT time for first hour of a given GMT date (it removes hours, min and second part) + * + * @param int $date Date + * @return int Date for last hour of a given date + */ +function dol_get_first_hour($date) +{ + $tmparray = dol_getdate($date); + return dol_mktime(0, 0, 0, $tmparray['mon'], $tmparray['mday'], $tmparray['year'], false); +} + /** Return first day of week for a date. First day of week may be monday if option MAIN_START_WEEK is 1. * * @param int $day Day @@ -563,9 +566,7 @@ function dol_get_first_day_week($day, $month, $year, $gm = false) $prev_month = 12; $prev_year = $year - 1; } - } - else - { + } else { $prev_month = $month; $prev_year = $year; } @@ -636,25 +637,6 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', $mois = date("m", $timestampStart); $annee = date("Y", $timestampStart); - // Check into var $conf->global->HOLIDAY_MORE_DAYS MM-DD,YYYY-MM-DD, ... - // Do not use this anymore, use instead the dictionary of public holidays. - if (!empty($conf->global->HOLIDAY_MORE_PUBLIC_HOLIDAYS)) - { - $arrayofdaystring = explode(',', $conf->global->HOLIDAY_MORE_PUBLIC_HOLIDAYS); - foreach ($arrayofdaystring as $daystring) - { - $tmp = explode('-', $daystring); - if ($tmp[2]) - { - if ($tmp[0] == $annee && $tmp[1] == $mois && $tmp[2] == $jour) $ferie = true; - } - else - { - if ($tmp[0] == $mois && $tmp[1] == $jour) $ferie = true; - } - } - } - $country_id = dol_getIdFromCode($db, $country_code, 'c_country', 'code', 'rowid'); // Loop on public holiday defined into hrm_public_holiday @@ -674,9 +656,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', if (!empty($obj->dayrule) && $obj->dayrule != 'date') // For example 'easter', '...' { $specialdayrule[$obj->dayrule] = $obj->dayrule; - } - else - { + } else { $match = 1; if (!empty($obj->year) && $obj->year != $annee) $match = 0; if ($obj->month != $mois) $match = 0; @@ -687,9 +667,7 @@ function num_public_holiday($timestampStart, $timestampEnd, $country_code = '', $i++; } - } - else - { + } else { dol_syslog($db->lasterror(), LOG_ERR); return 'Error sql '.$db->lasterror(); } @@ -857,9 +835,7 @@ function num_between_day($timestampStart, $timestampEnd, $lastday = 0) if ($lastday == 1) { $bit = 0; - } - else - { + } else { $bit = 1; } $nbjours = (int) floor(($timestampEnd - $timestampStart) / (60 * 60 * 24)) + 1 - $bit; @@ -901,8 +877,7 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0, $nbOpenDay = ($numdays - $numholidays); if ($inhour == 1 && $nbOpenDay <= 3) $nbOpenDay = ($nbOpenDay * 24); return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); - } - elseif ($timestampStart == $timestampEnd) + } elseif ($timestampStart == $timestampEnd) { $numholidays = 0; if ($lastday) { @@ -910,13 +885,11 @@ function num_open_day($timestampStart, $timestampEnd, $inhour = 0, $lastday = 0, if ($numholidays == 1) return 0; } - $nbOpenDay=$lastday; + $nbOpenDay = $lastday; if ($inhour == 1) $nbOpenDay = ($nbOpenDay * 24); return $nbOpenDay - (($inhour == 1 ? 12 : 0.5) * abs($halfday)); - } - else - { + } else { return $langs->trans("Error"); } } diff --git a/htdocs/core/lib/doc.lib.php b/htdocs/core/lib/doc.lib.php index 38e847bb3c1..4e9768b2a44 100644 --- a/htdocs/core/lib/doc.lib.php +++ b/htdocs/core/lib/doc.lib.php @@ -75,8 +75,7 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu $discount->fetch($line->fk_remise_except); $sourceref = !empty($discount->discount_type) ? $discount->ref_invoive_supplier_source : $discount->ref_facture_source; $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromCreditNote", $sourceref); - } - elseif ($desc == '(DEPOSIT)' && $line->fk_remise_except) + } elseif ($desc == '(DEPOSIT)' && $line->fk_remise_except) { $discount = new DiscountAbsolute($db); $discount->fetch($line->fk_remise_except); @@ -84,27 +83,21 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromDeposit", $sourceref); // Add date of deposit if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) $libelleproduitservice .= ' ('.dol_print_date($discount->datec, 'day', '', $outputlangs).')'; - } - elseif ($desc == '(EXCESS RECEIVED)' && $line->fk_remise_except) + } elseif ($desc == '(EXCESS RECEIVED)' && $line->fk_remise_except) { $discount = new DiscountAbsolute($db); $discount->fetch($line->fk_remise_except); $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessReceived", $discount->ref_facture_source); - } - elseif ($desc == '(EXCESS PAID)' && $line->fk_remise_except) + } elseif ($desc == '(EXCESS PAID)' && $line->fk_remise_except) { $discount = new DiscountAbsolute($db); $discount->fetch($line->fk_remise_except); $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid", $discount->ref_invoice_supplier_source); - } - else - { + } else { if ($idprod) { if (empty($hidedesc)) $libelleproduitservice = dol_concatdesc($libelleproduitservice, $desc); - } - else - { + } else { $libelleproduitservice = dol_concatdesc($libelleproduitservice, $desc); } } @@ -123,9 +116,7 @@ function doc_getlinedesc($line, $outputlangs, $hideref = 0, $hidedesc = 0, $issu if ($prodser->isService()) { $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Service")." "; - } - else - { + } else { $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Product")." "; } } diff --git a/htdocs/core/lib/doleditor.lib.php b/htdocs/core/lib/doleditor.lib.php index df9e3d94619..ddccb11247e 100644 --- a/htdocs/core/lib/doleditor.lib.php +++ b/htdocs/core/lib/doleditor.lib.php @@ -111,9 +111,7 @@ function show_skin($fuser, $edit = 0) if ($subdir == $selected_theme) { print ' '.$subdir.''; - } - else - { + } else { print ' '.$subdir; } print ''; diff --git a/htdocs/core/lib/ecm.lib.php b/htdocs/core/lib/ecm.lib.php index 3d14f14a7df..1f22e464358 100644 --- a/htdocs/core/lib/ecm.lib.php +++ b/htdocs/core/lib/ecm.lib.php @@ -84,9 +84,7 @@ function ecm_prepare_head($object, $module = 'ecm', $section = '') $head[$h][1] = $langs->trans("Directory"); $head[$h][2] = 'card'; $h++; - } - else - { + } else { $head[$h][0] = DOL_URL_ROOT.'/ecm/dir_card.php?section='.$section.'&module='.$module; $head[$h][1] = $langs->trans("Directory"); $head[$h][2] = 'card'; @@ -140,3 +138,38 @@ function ecm_prepare_head_fm($object) return $head; } + +/** + * Return array head with list of tabs to view object informations. + * + * @return array head array with tabs + */ +function ecm_admin_prepare_head() +{ + global $langs, $conf; + $langs->load("ecm"); + + $h = 0; + $head = array(); + + $head[$h][0] = DOL_URL_ROOT."/admin/ecm.php"; + $head[$h][1] = $langs->trans("Setup"); + $head[$h][2] = 'ecm'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/ecm_files_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsEcmFiles"); + $head[$h][2] = 'attributes_ecm_files'; + $h++; + + $head[$h][0] = DOL_URL_ROOT.'/admin/ecm_directories_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsEcmDirectories"); + $head[$h][2] = 'attributes_ecm_directories'; + $h++; + + complete_head_from_modules($conf, $langs, null, $head, $h, 'ecm_admin'); + + complete_head_from_modules($conf, $langs, null, $head, $h, 'ecm_admin', 'remove'); + + return $head; +} diff --git a/htdocs/core/lib/expedition.lib.php b/htdocs/core/lib/expedition.lib.php index fc1ca494d36..b575247e84b 100644 --- a/htdocs/core/lib/expedition.lib.php +++ b/htdocs/core/lib/expedition.lib.php @@ -58,10 +58,11 @@ function expedition_prepare_head(Expedition $object) $h++; } + complete_head_from_modules($conf, $langs, $object, $head, $h, 'order'); - complete_head_from_modules($conf, $langs, $object, $head, $h, 'order', 'remove'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'order', 'remove'); - return $head; + return $head; } /** @@ -94,18 +95,18 @@ function expedition_admin_prepare_head() if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFields"); - $head[$h][2] = 'attributes_shipment'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/expedition_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributes_shipment'; + $h++; } if (!empty($conf->global->MAIN_SUBMODULE_EXPEDITION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsLines"); - $head[$h][2] = 'attributeslines_shipment'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/expeditiondet_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'attributeslines_shipment'; + $h++; } if (!empty($conf->global->MAIN_SUBMODULE_LIVRAISON)) @@ -132,7 +133,7 @@ function expedition_admin_prepare_head() $h++; } - + complete_head_from_modules($conf, $langs, null, $head, $h, 'expedition_admin'); complete_head_from_modules($conf, $langs, null, $head, $h, 'expedition_admin', 'remove'); diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index 4c54ca09e31..e7a6b897fdb 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -94,7 +94,7 @@ function payment_expensereport_prepare_head(PaymentExpenseReport $object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/expensereport/payment/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("ExpenseReport"); + $head[$h][1] = $langs->trans("ExpenseReportPayment"); $head[$h][2] = 'payment'; $h++; @@ -133,14 +133,6 @@ function expensereport_admin_prepare_head() $head[$h][2] = 'expensereport'; $h++; - if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) - { - $head[$h][0] = DOL_URL_ROOT."/admin/expensereport_ik.php"; - $head[$h][1] = $langs->trans("ExpenseReportsIk"); - $head[$h][2] = 'expenseik'; - $h++; - } - if (!empty($conf->global->MAIN_USE_EXPENSE_RULE)) { $head[$h][0] = DOL_URL_ROOT."/admin/expensereport_rules.php"; @@ -149,6 +141,14 @@ function expensereport_admin_prepare_head() $h++; } + if (!empty($conf->global->MAIN_USE_EXPENSE_IK)) + { + $head[$h][0] = DOL_URL_ROOT."/admin/expensereport_ik.php"; + $head[$h][1] = $langs->trans("ExpenseReportsIk"); + $head[$h][2] = 'expenseik'; + $h++; + } + // Show more tabs from modules // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index eeac3566961..63047ed0e7b 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -118,8 +118,7 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl if (is_array($excludefilter)) { $excludefilterarray = array_merge($excludefilterarray, $excludefilter); - } - elseif ($excludefilter) $excludefilterarray[] = $excludefilter; + } elseif ($excludefilter) $excludefilterarray[] = $excludefilter; // Check if file is qualified foreach ($excludefilterarray as $filt) { @@ -143,6 +142,7 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl if (!$filter || preg_match('/'.$filter.'/i', $file)) // We do not search key $filter into all $path, only into $file part { + $reg = array(); preg_match('/([^\/]+)\/[^\/]+$/', $path.'/'.$file, $reg); $level1name = (isset($reg[1]) ? $reg[1] : ''); $file_list[] = array( @@ -167,8 +167,7 @@ function dol_dir_list($path, $types = "all", $recursive = 0, $filter = "", $excl $file_list = array_merge($file_list, dol_dir_list($path."/".$file, $types, $recursive, $filter, $excludefilter, $sortcriteria, $sortorder, $mode, $nohook, ($relativename != '' ? $relativename.'/' : '').$file, $donotfollowsymlinks)); } } - } - elseif (!$isdir && (($types == "files") || ($types == "all"))) + } elseif (!$isdir && (($types == "files") || ($types == "all"))) { // Add file into file_list array if ($loaddate || $sortcriteria == 'date') $filedate = dol_filemtime($path."/".$file); @@ -225,8 +224,8 @@ function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $s { global $conf, $db; - $sql = " SELECT rowid, label, entity, filename, filepath, fullpath_orig, keywords, cover, gen_or_uploaded, extraparams, date_c, date_m, fk_user_c, fk_user_m,"; - $sql .= " acl, position, share"; + $sql = " SELECT rowid, label, entity, filename, filepath, fullpath_orig, keywords, cover, gen_or_uploaded, extraparams,"; + $sql .= " date_c, tms as date_m, fk_user_c, fk_user_m, acl, position, share"; if ($mode) $sql .= ", description"; $sql .= " FROM ".MAIN_DB_PREFIX."ecm_files"; $sql .= " WHERE filepath = '".$db->escape($path)."'"; @@ -279,9 +278,7 @@ function dol_dir_list_in_database($path, $filter = "", $excludefilter = null, $s } return $file_list; - } - else - { + } else { dol_print_error($db); return array(); } @@ -374,14 +371,10 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir) if ($result < 0) { setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); - } - else - { + } else { $filearray[$key]['rowid'] = $result; } - } - else - { + } else { $filearray[$key]['rowid'] = 0; // Should not happened } } @@ -405,8 +398,7 @@ function dol_compare_file($a, $b) $sortorder = strtoupper($sortorder); - if ($sortorder == 'ASC') { $retup = -1; $retdown = 1; } - else { $retup = 1; $retdown = -1; } + if ($sortorder == 'ASC') { $retup = -1; $retdown = 1; } else { $retup = 1; $retdown = -1; } if ($sortfield == 'name') { @@ -514,9 +506,7 @@ function dol_dir_is_emtpy($folder) if ($folder_content == "...") return true; else return false; - } - else - return true; // Dir does not exists + } else return true; // Dir does not exists } /** @@ -542,9 +532,7 @@ function dol_count_nb_of_line($file) if (!$line === false) $nb++; } fclose($fp); - } - else - { + } else { $nb = -1; } @@ -627,9 +615,7 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask if (empty($arrayreplacementisregex)) { $content = make_substitutions($content, $arrayreplacement, null); - } - else - { + } else { foreach ($arrayreplacement as $key => $value) { $content = preg_replace($key, $value, $content); @@ -775,9 +761,7 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep //var_dump("xxx dolCopyDir $srcfile/$file, $destfile/$file, $newmask, $overwriteifexists"); $tmpresult = dolCopyDir($srcfile."/".$file, $destfile."/".$newfile, $newmask, $overwriteifexists, $arrayreplacement, $excludesubdir); } - } - else - { + } else { $newfile = $file; // Replace destination filename with a new one if (is_array($arrayreplacement)) @@ -793,18 +777,14 @@ function dolCopyDir($srcfile, $destfile, $newmask, $overwriteifexists, $arrayrep if ($result > 0 && $tmpresult >= 0) { // Do nothing, so we don't set result to 0 if tmpresult is 0 and result was success in a previous pass - } - else - { + } else { $result = $tmpresult; } if ($result < 0) break; } } closedir($dir_handle); - } - else - { + } else { // Source directory does not exists $result = -2; } @@ -870,8 +850,7 @@ function dol_move($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1, $te // We force delete and try again. Rename function sometimes fails to replace dest file with some windows NTFS partitions. dol_delete_file($destfile); $result = @rename($newpathofsrcfile, $newpathofdestfile); // To see errors, remove @ - } - else dol_syslog("files.lib.php::dol_move Failed.", LOG_WARNING); + } else dol_syslog("files.lib.php::dol_move Failed.", LOG_WARNING); } // Move ok @@ -909,8 +888,7 @@ function dol_move($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1, $te $ecmfile->filename = $filename; $resultecm = $ecmfile->update($user); - } - elseif ($resultecm == 0) // If no entry were found for src files, create/update target file + } elseif ($resultecm == 0) // If no entry were found for src files, create/update target file { $filename = basename($rel_filetorenameafter); $rel_dir = dirname($rel_filetorenameafter); @@ -929,8 +907,7 @@ function dol_move($srcfile, $destfile, $newmask = 0, $overwriteifexists = 1, $te { setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); } - } - elseif ($resultecm < 0) + } elseif ($resultecm < 0) { setEventMessages($ecmfile->error, $ecmfile->errors, 'warnings'); } @@ -982,11 +959,11 @@ function dolCheckVirus($src_file) if (!class_exists('AntiVir')) { require_once DOL_DOCUMENT_ROOT.'/core/class/antivir.class.php'; } - $antivir=new AntiVir($db); + $antivir = new AntiVir($db); $result = $antivir->dol_avscan_file($src_file); if ($result < 0) // If virus or error, we stop here { - $reterrors=$antivir->errors; + $reterrors = $antivir->errors; return $reterrors; } } @@ -1073,7 +1050,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable { // $upload_dir ends with a slash, so be must be sure the medias dir to compare to ends with slash too. $publicmediasdirwithslash = $conf->medias->multidir_output[$conf->entity]; - if (! preg_match('/\/$/', $publicmediasdirwithslash)) $publicmediasdirwithslash.='/'; + if (!preg_match('/\/$/', $publicmediasdirwithslash)) $publicmediasdirwithslash .= '/'; if (strpos($upload_dir, $publicmediasdirwithslash) !== 0) { // We never add .noexe on files into media directory $file_name .= '.noexe'; @@ -1098,14 +1075,11 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable } } - if ($reshook < 0) // At least one blocking error returned by one hook - { + if ($reshook < 0) { // At least one blocking error returned by one hook $errmsg = join(',', $hookmanager->errors); if (empty($errmsg)) $errmsg = 'ErrorReturnedBySomeHooks'; // Should not occurs. Added if hook is bugged and does not set ->errors when there is error. return $errmsg; - } - elseif (empty($reshook)) - { + } elseif (empty($reshook)) { // The file functions must be in OS filesystem encoding. $src_file_osencoded = dol_osencode($src_file); $file_name_osencoded = dol_osencode($file_name); @@ -1125,6 +1099,11 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable dol_syslog("Files.lib::dol_move_uploaded_file File ".$file_name." already exists. Return 'ErrorFileAlreadyExists'", LOG_WARNING); return 'ErrorFileAlreadyExists'; } + } else { // We are allowed to erase + if (is_dir($file_name_osencoded)) { // If there is a directory with name of file to create + dol_syslog("Files.lib::dol_move_uploaded_file A directory with name ".$file_name." already exists. Return 'ErrorDirWithFileNameAlreadyExists'", LOG_WARNING); + return 'ErrorDirWithFileNameAlreadyExists'; + } } // Move file @@ -1134,9 +1113,7 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite, $disable if (!empty($conf->global->MAIN_UMASK)) @chmod($file_name_osencoded, octdec($conf->global->MAIN_UMASK)); dol_syslog("Files.lib::dol_move_uploaded_file Success to move ".$src_file." to ".$file_name." - Umask=".$conf->global->MAIN_UMASK, LOG_DEBUG); return $successcode; // Success - } - else - { + } else { dol_syslog("Files.lib::dol_move_uploaded_file Failed to move ".$src_file." to ".$file_name, LOG_ERR); return -3; // Unknown error } @@ -1177,6 +1154,7 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, return false; } + $reshook = 0; if (empty($nohook)) { $hookmanager->initHooks(array('fileslib')); @@ -1190,14 +1168,12 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, $reshook = $hookmanager->executeHooks('deleteFile', $parameters, $object); } - if (empty($nohook) && $reshook != 0) // reshook = 0 to do standard actions, 1 = ok, -1 = ko + if (empty($nohook) && $reshook != 0) // reshook = 0 to do standard actions, 1 = ok and replace, -1 = ko { + dol_syslog("reshook=".$reshook); if ($reshook < 0) return false; return true; - } - else - { - //print "x".$file." ".$disableglob;exit; + } else { $file_osencoded = dol_osencode($file); // New filename encoded in OS filesystem encoding charset if (empty($disableglob) && !empty($file_osencoded)) { @@ -1238,19 +1214,16 @@ function dol_delete_file($file, $disableglob = 0, $nophperrors = 0, $nohook = 0, } } } - } - else - { + } else { dol_syslog("Failed to remove file ".$filename, LOG_WARNING); // TODO Failure to remove can be because file was already removed or because of permission // If error because it does not exists, we should return true, and we should return false if this is a permission problem } } + } else { + dol_syslog("No files to delete found", LOG_DEBUG); } - else dol_syslog("No files to delete found", LOG_DEBUG); - } - else - { + } else { $ok = false; if ($nophperrors) $ok = @unlink($file_osencoded); else $ok = unlink($file_osencoded); @@ -1312,9 +1285,7 @@ function dol_delete_dir_recursive($dir, $count = 0, $nophperrors = 0, $onlysub = if (is_dir(dol_osencode("$dir/$item")) && !is_link(dol_osencode("$dir/$item"))) { $count = dol_delete_dir_recursive("$dir/$item", $count, $nophperrors, 0, $countdeleted); - } - else - { + } else { $result = dol_delete_file("$dir/$item", 1, $nophperrors); $count++; if ($result) $countdeleted++; @@ -1394,9 +1365,7 @@ function dol_delete_preview($object) $object->error = $langs->trans("ErrorFailedToDeleteFile", $filepreviewold); return 0; } - } - else - { + } else { $multiple = $filepreviewold."."; for ($i = 0; $i < 20; $i++) { @@ -1484,9 +1453,7 @@ function dol_meta_create($object) @chmod($file, octdec($conf->global->MAIN_UMASK)); return 1; - } - else - { + } else { dol_syslog('FailedToDetectDirInDolMetaCreateFor'.$object->element, LOG_WARNING); } @@ -1566,6 +1533,8 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess $nbok = 0; for ($i = 0; $i < $nbfile; $i++) { + if (empty($TFile['name'][$i])) continue; // For example, when submitting a form with no file name + // Define $destfull (path to file including filename) and $destfile (only filename) $destfull = $upload_dir."/".$TFile['name'][$i]; $destfile = $TFile['name'][$i]; @@ -1638,27 +1607,22 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess { if ($allowoverwrite) { // Do not show error message. We can have an error due to DB_ERROR_RECORD_ALREADY_EXISTS - } - else { + } else { setEventMessages('WarningFailedToAddFileIntoDatabaseIndex', '', 'warnings'); } } } $nbok++; - } - else - { + } else { $langs->load("errors"); if ($resupload < 0) // Unknown error { setEventMessages($langs->trans("ErrorFileNotUploaded"), null, 'errors'); - } - elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) // Files infected by a virus + } elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) // Files infected by a virus { setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); - } - else // Known error + } else // Known error { setEventMessages($langs->trans($resupload), null, 'errors'); } @@ -1685,9 +1649,7 @@ function dol_add_file_process($upload_dir, $allowoverwrite = 0, $donotupdatesess } else { setEventMessages($langs->trans("ErrorFileNotLinked"), null, 'errors'); } - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("File")), null, 'errors'); } @@ -1890,31 +1852,22 @@ function dol_convert_file($fileinput, $ext = 'png', $fileoutput = '', $page = '' { try { $ret = $image->writeImages($fileoutput, true); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_WARNING); } - } - else - { + } else { dol_syslog("Warning: Failed to write cache preview file '.$fileoutput.'. Check permission on file/dir", LOG_ERR); } if ($ret) return $count; else return -3; - } - else - { + } else { return -2; } - } - else - { + } else { return -1; } - } - else - { + } else { return 0; } } @@ -1936,14 +1889,11 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz", &$errorstring $foundhandler = 0; - try - { + try { dol_syslog("dol_compress_file mode=".$mode." inputfile=".$inputfile." outputfile=".$outputfile); $data = implode("", file(dol_osencode($inputfile))); - if ($mode == 'gz') { $foundhandler = 1; $compressdata = gzencode($data, 9); } - elseif ($mode == 'bz') { $foundhandler = 1; $compressdata = bzcompress($data, 9); } - elseif ($mode == 'zip') + if ($mode == 'gz') { $foundhandler = 1; $compressdata = gzencode($data, 9); } elseif ($mode == 'bz') { $foundhandler = 1; $compressdata = bzcompress($data, 9); } elseif ($mode == 'zip') { if (class_exists('ZipArchive') && !empty($conf->global->MAIN_USE_ZIPARCHIVE_FOR_ZIP_COMPRESS)) { @@ -2015,9 +1965,7 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz", &$errorstring $errorstring = "dol_compress_file error archive->errorCode = ".$archive->errorCode()." errormsg=".$errormsg; dol_syslog("dol_compress_file failure - ".$errormsg, LOG_ERR); return -3; - } - else - { + } else { dol_syslog("dol_compress_file success - ".count($result)." files"); return 1; } @@ -2030,9 +1978,7 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz", &$errorstring fwrite($fp, $compressdata); fclose($fp); return 1; - } - else - { + } else { $errorstring = "Try to zip with format ".$mode." with no handler for this format"; dol_syslog($errorstring, LOG_ERR); @@ -2040,8 +1986,7 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz", &$errorstring $errormsg = $errorstring; return -2; } - } - catch (Exception $e) + } catch (Exception $e) { global $langs, $errormsg; $langs->load("errors"); @@ -2069,11 +2014,12 @@ function dol_uncompress($inputfile, $outputdir) dol_syslog("Constant ODTPHP_PATHTOPCLZIP for pclzip library is set to ".ODTPHP_PATHTOPCLZIP.", so we use Pclzip to unzip into ".$outputdir); include_once ODTPHP_PATHTOPCLZIP.'/pclzip.lib.php'; $archive = new PclZip($inputfile); - $result = $archive->extract(PCLZIP_OPT_PATH, $outputdir); - //var_dump($result); + + // Extract into outputdir, but only files that match the regex '/^((?!\.\.).)*$/' that means "does not include .." + $result = $archive->extract(PCLZIP_OPT_PATH, $outputdir, PCLZIP_OPT_BY_PREG, '/^((?!\.\.).)*$/'); + if (!is_array($result) && $result <= 0) return array('error'=>$archive->errorInfo(true)); - else - { + else { $ok = 1; $errmsg = ''; // Loop on each file to check result for unzipping file foreach ($result as $key => $val) @@ -2092,19 +2038,29 @@ function dol_uncompress($inputfile, $outputdir) } } - if (class_exists('ZipArchive')) + if (class_exists('ZipArchive')) // Must install php-zip to have it { dol_syslog("Class ZipArchive is set so we unzip using ZipArchive to unzip into ".$outputdir); $zip = new ZipArchive; $res = $zip->open($inputfile); if ($res === true) { - $zip->extractTo($outputdir.'/'); + //$zip->extractTo($outputdir.'/'); + // We must extract one file at time so we can check that file name does not contains '..' to avoid transversal path of zip built for example using + // python3 path_traversal_archiver.py test.zip -l 10 -p tmp/ + // with -l is the range of dot to go back in path. + // and path_traversal_archiver.py found at https://github.com/Alamot/code-snippets/blob/master/path_traversal/path_traversal_archiver.py + for ($i = 0; $i < $zip->numFiles; $i++) { + if (preg_match('/\.\./', $zip->getNameIndex($i))) { + dol_syslog("Warning: Try to unzip a file with a transversal path ".$zip->getNameIndex($i), LOG_WARNING); + continue; // Discard the file + } + $zip->extractTo($outputdir.'/', array($zip->getNameIndex($i))); + } + $zip->close(); return array(); - } - else - { + } else { return array('error'=>'ErrUnzipFails'); } } @@ -2137,11 +2093,8 @@ function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles = return -3; } - try - { - if ($mode == 'gz') { $foundhandler = 0; } - elseif ($mode == 'bz') { $foundhandler = 0; } - elseif ($mode == 'zip') + try { + if ($mode == 'gz') { $foundhandler = 0; } elseif ($mode == 'bz') { $foundhandler = 0; } elseif ($mode == 'zip') { /*if (defined('ODTPHP_PATHTOPCLZIP')) { @@ -2205,13 +2158,10 @@ function dol_compress_dir($inputdir, $outputfile, $mode = "zip", $excludefiles = { dol_syslog("Try to zip with format ".$mode." with no handler for this format", LOG_ERR); return -2; - } - else - { + } else { return 0; } - } - catch (Exception $e) + } catch (Exception $e) { global $langs, $errormsg; $langs->load("errors"); @@ -2291,20 +2241,17 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, if (empty($entity) || empty($conf->medias->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); $accessallowed = 1; $original_file = $conf->medias->multidir_output[$entity].'/'.$original_file; - } - // Wrapping for *.log files, like when used with url http://.../document.php?modulepart=logs&file=dolibarr.log + } // Wrapping for *.log files, like when used with url http://.../document.php?modulepart=logs&file=dolibarr.log elseif ($modulepart == 'logs' && !empty($dolibarr_main_data_root)) { $accessallowed = ($user->admin && basename($original_file) == $original_file && preg_match('/^dolibarr.*\.log$/', basename($original_file))); $original_file = $dolibarr_main_data_root.'/'.$original_file; - } - // Wrapping for *.log files, like when used with url http://.../document.php?modulepart=logs&file=dolibarr.log + } // Wrapping for *.log files, like when used with url http://.../document.php?modulepart=logs&file=dolibarr.log elseif ($modulepart == 'doctemplateswebsite' && !empty($dolibarr_main_data_root)) { $accessallowed = ($fuser->rights->website->write && preg_match('/\.jpg$/i', basename($original_file))); $original_file = $dolibarr_main_data_root.'/doctemplates/websites/'.$original_file; - } - // Wrapping for *.zip files, like when used with url http://.../document.php?modulepart=packages&file=module_myfile.zip + } // Wrapping for *.zip files, like when used with url http://.../document.php?modulepart=packages&file=module_myfile.zip elseif ($modulepart == 'packages' && !empty($dolibarr_main_data_root)) { // Dir for custom dirs @@ -2313,203 +2260,169 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = ($user->admin && preg_match('/^module_.*\.zip$/', basename($original_file))); $original_file = $dirins.'/'.$original_file; - } - // Wrapping for some images + } // Wrapping for some images elseif ($modulepart == 'mycompany' && !empty($conf->mycompany->dir_output)) { $accessallowed = 1; $original_file = $conf->mycompany->dir_output.'/'.$original_file; - } - // Wrapping for users photos + } // Wrapping for users photos elseif ($modulepart == 'userphoto' && !empty($conf->user->dir_output)) { $accessallowed = 1; $original_file = $conf->user->dir_output.'/'.$original_file; - } - // Wrapping for members photos + } // Wrapping for members photos elseif ($modulepart == 'memberphoto' && !empty($conf->adherent->dir_output)) { $accessallowed = 1; $original_file = $conf->adherent->dir_output.'/'.$original_file; - } - // Wrapping pour les apercu factures + } // Wrapping pour les apercu factures elseif ($modulepart == 'apercufacture' && !empty($conf->facture->multidir_output[$entity])) { if ($fuser->rights->facture->{$lire}) $accessallowed = 1; $original_file = $conf->facture->multidir_output[$entity].'/'.$original_file; - } - // Wrapping pour les apercu propal + } // Wrapping pour les apercu propal elseif ($modulepart == 'apercupropal' && !empty($conf->propal->multidir_output[$entity])) { if ($fuser->rights->propale->{$lire}) $accessallowed = 1; $original_file = $conf->propal->multidir_output[$entity].'/'.$original_file; - } - // Wrapping pour les apercu commande + } // Wrapping pour les apercu commande elseif ($modulepart == 'apercucommande' && !empty($conf->commande->multidir_output[$entity])) { if ($fuser->rights->commande->{$lire}) $accessallowed = 1; $original_file = $conf->commande->multidir_output[$entity].'/'.$original_file; - } - // Wrapping pour les apercu intervention + } // Wrapping pour les apercu intervention elseif (($modulepart == 'apercufichinter' || $modulepart == 'apercuficheinter') && !empty($conf->ficheinter->dir_output)) { if ($fuser->rights->ficheinter->{$lire}) $accessallowed = 1; $original_file = $conf->ficheinter->dir_output.'/'.$original_file; - } - // Wrapping pour les apercu conat + } // Wrapping pour les apercu conat elseif (($modulepart == 'apercucontract') && !empty($conf->contrat->dir_output)) { if ($fuser->rights->contrat->{$lire}) $accessallowed = 1; $original_file = $conf->contrat->dir_output.'/'.$original_file; - } - // Wrapping pour les apercu supplier proposal + } // Wrapping pour les apercu supplier proposal elseif (($modulepart == 'apercusupplier_proposal' || $modulepart == 'apercusupplier_proposal') && !empty($conf->supplier_proposal->dir_output)) { if ($fuser->rights->supplier_proposal->{$lire}) $accessallowed = 1; $original_file = $conf->supplier_proposal->dir_output.'/'.$original_file; - } - // Wrapping pour les apercu supplier order + } // Wrapping pour les apercu supplier order elseif (($modulepart == 'apercusupplier_order' || $modulepart == 'apercusupplier_order') && !empty($conf->fournisseur->commande->dir_output)) { if ($fuser->rights->fournisseur->commande->{$lire}) $accessallowed = 1; $original_file = $conf->fournisseur->commande->dir_output.'/'.$original_file; - } - // Wrapping pour les apercu supplier invoice + } // Wrapping pour les apercu supplier invoice elseif (($modulepart == 'apercusupplier_invoice' || $modulepart == 'apercusupplier_invoice') && !empty($conf->fournisseur->facture->dir_output)) { if ($fuser->rights->fournisseur->facture->{$lire}) $accessallowed = 1; $original_file = $conf->fournisseur->facture->dir_output.'/'.$original_file; - } - // Wrapping pour les apercu supplier invoice + } // Wrapping pour les apercu supplier invoice elseif (($modulepart == 'apercuexpensereport') && !empty($conf->expensereport->dir_output)) { if ($fuser->rights->expensereport->{$lire}) $accessallowed = 1; $original_file = $conf->expensereport->dir_output.'/'.$original_file; - } - // Wrapping pour les images des stats propales + } // Wrapping pour les images des stats propales elseif ($modulepart == 'propalstats' && !empty($conf->propal->multidir_temp[$entity])) { if ($fuser->rights->propale->{$lire}) $accessallowed = 1; $original_file = $conf->propal->multidir_temp[$entity].'/'.$original_file; - } - // Wrapping pour les images des stats commandes + } // Wrapping pour les images des stats commandes elseif ($modulepart == 'orderstats' && !empty($conf->commande->dir_temp)) { if ($fuser->rights->commande->{$lire}) $accessallowed = 1; $original_file = $conf->commande->dir_temp.'/'.$original_file; - } - elseif ($modulepart == 'orderstatssupplier' && !empty($conf->fournisseur->dir_output)) + } elseif ($modulepart == 'orderstatssupplier' && !empty($conf->fournisseur->dir_output)) { if ($fuser->rights->fournisseur->commande->{$lire}) $accessallowed = 1; $original_file = $conf->fournisseur->commande->dir_temp.'/'.$original_file; - } - // Wrapping pour les images des stats factures + } // Wrapping pour les images des stats factures elseif ($modulepart == 'billstats' && !empty($conf->facture->dir_temp)) { if ($fuser->rights->facture->{$lire}) $accessallowed = 1; $original_file = $conf->facture->dir_temp.'/'.$original_file; - } - elseif ($modulepart == 'billstatssupplier' && !empty($conf->fournisseur->dir_output)) + } elseif ($modulepart == 'billstatssupplier' && !empty($conf->fournisseur->dir_output)) { if ($fuser->rights->fournisseur->facture->{$lire}) $accessallowed = 1; $original_file = $conf->fournisseur->facture->dir_temp.'/'.$original_file; - } - // Wrapping pour les images des stats expeditions + } // Wrapping pour les images des stats expeditions elseif ($modulepart == 'expeditionstats' && !empty($conf->expedition->dir_temp)) { if ($fuser->rights->expedition->{$lire}) $accessallowed = 1; $original_file = $conf->expedition->dir_temp.'/'.$original_file; - } - // Wrapping pour les images des stats expeditions + } // Wrapping pour les images des stats expeditions elseif ($modulepart == 'tripsexpensesstats' && !empty($conf->deplacement->dir_temp)) { if ($fuser->rights->deplacement->{$lire}) $accessallowed = 1; $original_file = $conf->deplacement->dir_temp.'/'.$original_file; - } - // Wrapping pour les images des stats expeditions + } // Wrapping pour les images des stats expeditions elseif ($modulepart == 'memberstats' && !empty($conf->adherent->dir_temp)) { if ($fuser->rights->adherent->{$lire}) $accessallowed = 1; $original_file = $conf->adherent->dir_temp.'/'.$original_file; - } - // Wrapping pour les images des stats produits + } // Wrapping pour les images des stats produits elseif (preg_match('/^productstats_/i', $modulepart) && !empty($conf->product->dir_temp)) { if ($fuser->rights->produit->{$lire} || $fuser->rights->service->{$lire}) $accessallowed = 1; $original_file = (!empty($conf->product->multidir_temp[$entity]) ? $conf->product->multidir_temp[$entity] : $conf->service->multidir_temp[$entity]).'/'.$original_file; - } - // Wrapping for taxes + } // Wrapping for taxes elseif (in_array($modulepart, array('tax', 'tax-vat')) && !empty($conf->tax->dir_output)) { if ($fuser->rights->tax->charges->{$lire}) $accessallowed = 1; $modulepartsuffix = str_replace('tax-', '', $modulepart); $original_file = $conf->tax->dir_output.'/'.($modulepartsuffix != 'tax' ? $modulepartsuffix.'/' : '').$original_file; - } - // Wrapping for events + } // Wrapping for events elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) { if ($fuser->rights->agenda->myactions->{$read}) $accessallowed = 1; $original_file = $conf->agenda->dir_output.'/'.$original_file; - } - // Wrapping for categories + } // Wrapping for categories elseif ($modulepart == 'category' && !empty($conf->categorie->multidir_output[$entity])) { if (empty($entity) || empty($conf->categorie->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); if ($fuser->rights->categorie->{$lire}) $accessallowed = 1; $original_file = $conf->categorie->multidir_output[$entity].'/'.$original_file; - } - // Wrapping pour les prelevements + } // Wrapping pour les prelevements elseif ($modulepart == 'prelevement' && !empty($conf->prelevement->dir_output)) { if ($fuser->rights->prelevement->bons->{$lire} || preg_match('/^specimen/i', $original_file)) $accessallowed = 1; $original_file = $conf->prelevement->dir_output.'/'.$original_file; - } - // Wrapping pour les graph energie + } // Wrapping pour les graph energie elseif ($modulepart == 'graph_stock' && !empty($conf->stock->dir_temp)) { $accessallowed = 1; $original_file = $conf->stock->dir_temp.'/'.$original_file; - } - // Wrapping pour les graph fournisseurs + } // Wrapping pour les graph fournisseurs elseif ($modulepart == 'graph_fourn' && !empty($conf->fournisseur->dir_temp)) { $accessallowed = 1; $original_file = $conf->fournisseur->dir_temp.'/'.$original_file; - } - // Wrapping pour les graph des produits + } // Wrapping pour les graph des produits elseif ($modulepart == 'graph_product' && !empty($conf->product->dir_temp)) { $accessallowed = 1; $original_file = $conf->product->multidir_temp[$entity].'/'.$original_file; - } - // Wrapping pour les code barre + } // Wrapping pour les code barre elseif ($modulepart == 'barcode') { $accessallowed = 1; // If viewimage is called for barcode, we try to output an image on the fly, with no build of file on disk. //$original_file=$conf->barcode->dir_temp.'/'.$original_file; $original_file = ''; - } - // Wrapping pour les icones de background des mailings + } // Wrapping pour les icones de background des mailings elseif ($modulepart == 'iconmailing' && !empty($conf->mailing->dir_temp)) { $accessallowed = 1; $original_file = $conf->mailing->dir_temp.'/'.$original_file; - } - // Wrapping pour le scanner + } // Wrapping pour le scanner elseif ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) { $accessallowed = 1; $original_file = $conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file; - } - // Wrapping pour les images fckeditor + } // Wrapping pour les images fckeditor elseif ($modulepart == 'fckeditor' && !empty($conf->fckeditor->dir_output)) { $accessallowed = 1; $original_file = $conf->fckeditor->dir_output.'/'.$original_file; - } - - // Wrapping for users + } // Wrapping for users elseif ($modulepart == 'user' && !empty($conf->user->dir_output)) { $canreaduser = (!empty($fuser->admin) || $fuser->rights->user->user->{$lire}); @@ -2519,9 +2432,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->user->dir_output.'/'.$original_file; - } - - // Wrapping for third parties + } // Wrapping for third parties elseif (($modulepart == 'company' || $modulepart == 'societe' || $modulepart == 'thirdparty') && !empty($conf->societe->multidir_output[$entity])) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); @@ -2531,9 +2442,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->societe->multidir_output[$entity].'/'.$original_file; $sqlprotectagainstexternals = "SELECT rowid as fk_soc FROM ".MAIN_DB_PREFIX."societe WHERE rowid='".$db->escape($refname)."' AND entity IN (".getEntity('societe').")"; - } - - // Wrapping for contact + } // Wrapping for contact elseif ($modulepart == 'contact' && !empty($conf->societe->multidir_output[$entity])) { if (empty($entity) || empty($conf->societe->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); @@ -2542,9 +2451,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->societe->multidir_output[$entity].'/contact/'.$original_file; - } - - // Wrapping for invoices + } // Wrapping for invoices elseif (($modulepart == 'facture' || $modulepart == 'invoice') && !empty($conf->facture->multidir_output[$entity])) { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2553,8 +2460,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->facture->multidir_output[$entity].'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('invoice').")"; - } - // Wrapping for mass actions + } // Wrapping for mass actions elseif ($modulepart == 'massfilesarea_proposals' && !empty($conf->propal->multidir_output[$entity])) { if ($fuser->rights->propal->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2562,81 +2468,70 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->propal->multidir_output[$entity].'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_orders') + } elseif ($modulepart == 'massfilesarea_orders') { if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->commande->multidir_output[$entity].'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_sendings') + } elseif ($modulepart == 'massfilesarea_sendings') { if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->expedition->dir_output.'/sending/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_invoices') + } elseif ($modulepart == 'massfilesarea_invoices') { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->facture->multidir_output[$entity].'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_expensereport') + } elseif ($modulepart == 'massfilesarea_expensereport') { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->expensereport->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_interventions') + } elseif ($modulepart == 'massfilesarea_interventions') { if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->ficheinter->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) + } elseif ($modulepart == 'massfilesarea_supplier_proposal' && !empty($conf->supplier_proposal->dir_output)) { if ($fuser->rights->supplier_proposal->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->supplier_proposal->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_supplier_order') + } elseif ($modulepart == 'massfilesarea_supplier_order') { if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->fournisseur->commande->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_supplier_invoice') + } elseif ($modulepart == 'massfilesarea_supplier_invoice') { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->fournisseur->facture->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - elseif ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) + } elseif ($modulepart == 'massfilesarea_contract' && !empty($conf->contrat->dir_output)) { if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file)) { $accessallowed = 1; } $original_file = $conf->contrat->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - - // Wrapping for interventions + } // Wrapping for interventions elseif (($modulepart == 'fichinter' || $modulepart == 'ficheinter') && !empty($conf->ficheinter->dir_output)) { if ($fuser->rights->ficheinter->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2645,9 +2540,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->ficheinter->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; - } - - // Wrapping pour les deplacements et notes de frais + } // Wrapping pour les deplacements et notes de frais elseif ($modulepart == 'deplacement' && !empty($conf->deplacement->dir_output)) { if ($fuser->rights->deplacement->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2656,8 +2549,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->deplacement->dir_output.'/'.$original_file; //$sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."fichinter WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; - } - // Wrapping pour les propales + } // Wrapping pour les propales elseif (($modulepart == 'propal' || $modulepart == 'propale') && !empty($conf->propal->multidir_output[$entity])) { if ($fuser->rights->propale->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2666,9 +2558,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->propal->multidir_output[$entity].'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."propal WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('propal').")"; - } - - // Wrapping pour les commandes + } // Wrapping pour les commandes elseif (($modulepart == 'commande' || $modulepart == 'order') && !empty($conf->commande->multidir_output[$entity])) { if ($fuser->rights->commande->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2677,9 +2567,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->commande->multidir_output[$entity].'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."commande WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('order').")"; - } - - // Wrapping pour les projets + } // Wrapping pour les projets elseif ($modulepart == 'project' && !empty($conf->projet->dir_output)) { if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2688,8 +2576,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->projet->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('project').")"; - } - elseif ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) + } elseif ($modulepart == 'project_task' && !empty($conf->projet->dir_output)) { if ($fuser->rights->projet->{$lire} || preg_match('/^specimen/i', $original_file)) { @@ -2697,9 +2584,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->projet->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."projet WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('project').")"; - } - - // Wrapping pour les commandes fournisseurs + } // Wrapping pour les commandes fournisseurs elseif (($modulepart == 'commande_fournisseur' || $modulepart == 'order_supplier') && !empty($conf->fournisseur->commande->dir_output)) { if ($fuser->rights->fournisseur->commande->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2708,9 +2593,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->fournisseur->commande->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."commande_fournisseur WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; - } - - // Wrapping pour les factures fournisseurs + } // Wrapping pour les factures fournisseurs elseif (($modulepart == 'facture_fournisseur' || $modulepart == 'invoice_supplier') && !empty($conf->fournisseur->facture->dir_output)) { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2719,8 +2602,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->fournisseur->facture->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."facture_fourn WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; - } - // Wrapping pour les rapport de paiements + } // Wrapping pour les rapport de paiements elseif ($modulepart == 'supplier_payment') { if ($fuser->rights->fournisseur->facture->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2729,9 +2611,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->fournisseur->payment->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."paiementfournisseur WHERE ref='".$db->escape($refname)."' AND entity=".$conf->entity; - } - - // Wrapping pour les rapport de paiements + } // Wrapping pour les rapport de paiements elseif ($modulepart == 'facture_paiement' && !empty($conf->facture->dir_output)) { if ($fuser->rights->facture->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2740,9 +2620,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } if ($fuser->societe_id > 0) $original_file = $conf->facture->dir_output.'/payments/private/'.$fuser->id.'/'.$original_file; else $original_file = $conf->facture->dir_output.'/payments/'.$original_file; - } - - // Wrapping for accounting exports + } // Wrapping for accounting exports elseif ($modulepart == 'export_compta' && !empty($conf->accounting->dir_output)) { if ($fuser->rights->accounting->bind->write || preg_match('/^specimen/i', $original_file)) @@ -2750,9 +2628,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->accounting->dir_output.'/'.$original_file; - } - - // Wrapping pour les expedition + } // Wrapping pour les expedition elseif ($modulepart == 'expedition' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2760,8 +2636,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->expedition->dir_output."/sending/".$original_file; - } - // Wrapping pour les bons de livraison + } // Wrapping pour les bons de livraison elseif ($modulepart == 'livraison' && !empty($conf->expedition->dir_output)) { if ($fuser->rights->expedition->livraison->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2769,9 +2644,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->expedition->dir_output."/receipt/".$original_file; - } - - // Wrapping pour les actions + } // Wrapping pour les actions elseif ($modulepart == 'actions' && !empty($conf->agenda->dir_output)) { if ($fuser->rights->agenda->myactions->{$read} || preg_match('/^specimen/i', $original_file)) @@ -2779,9 +2652,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->agenda->dir_output.'/'.$original_file; - } - - // Wrapping pour les actions + } // Wrapping pour les actions elseif ($modulepart == 'actionsreport' && !empty($conf->agenda->dir_temp)) { if ($fuser->rights->agenda->allactions->{$read} || preg_match('/^specimen/i', $original_file)) @@ -2789,9 +2660,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->agenda->dir_temp."/".$original_file; - } - - // Wrapping pour les produits et services + } // Wrapping pour les produits et services elseif ($modulepart == 'product' || $modulepart == 'produit' || $modulepart == 'service' || $modulepart == 'produit|service') { if (empty($entity) || (empty($conf->product->multidir_output[$entity]) && empty($conf->service->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); @@ -2801,9 +2670,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } if (!empty($conf->product->enabled)) $original_file = $conf->product->multidir_output[$entity].'/'.$original_file; elseif (!empty($conf->service->enabled)) $original_file = $conf->service->multidir_output[$entity].'/'.$original_file; - } - - // Wrapping pour les lots produits + } // Wrapping pour les lots produits elseif ($modulepart == 'product_batch' || $modulepart == 'produitlot') { if (empty($entity) || (empty($conf->productbatch->multidir_output[$entity]))) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); @@ -2812,9 +2679,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } if (!empty($conf->productbatch->enabled)) $original_file = $conf->productbatch->multidir_output[$entity].'/'.$original_file; - } - - // Wrapping for stock movements + } // Wrapping for stock movements elseif ($modulepart == 'movement' || $modulepart == 'mouvement') { if (empty($entity) || empty($conf->stock->multidir_output[$entity])) return array('accessallowed'=>0, 'error'=>'Value entity must be provided'); @@ -2823,9 +2688,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } if (!empty($conf->stock->enabled)) $original_file = $conf->stock->multidir_output[$entity].'/movement/'.$original_file; - } - - // Wrapping pour les contrats + } // Wrapping pour les contrats elseif ($modulepart == 'contract' && !empty($conf->contrat->dir_output)) { if ($fuser->rights->contrat->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2834,9 +2697,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->contrat->dir_output.'/'.$original_file; $sqlprotectagainstexternals = "SELECT fk_soc as fk_soc FROM ".MAIN_DB_PREFIX."contrat WHERE ref='".$db->escape($refname)."' AND entity IN (".getEntity('contract').")"; - } - - // Wrapping pour les dons + } // Wrapping pour les dons elseif ($modulepart == 'donation' && !empty($conf->don->dir_output)) { if ($fuser->rights->don->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2844,9 +2705,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->don->dir_output.'/'.$original_file; - } - - // Wrapping pour les dons + } // Wrapping pour les dons elseif ($modulepart == 'dolresource' && !empty($conf->resource->dir_output)) { if ($fuser->rights->resource->{$read} || preg_match('/^specimen/i', $original_file)) @@ -2854,9 +2713,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->resource->dir_output.'/'.$original_file; - } - - // Wrapping pour les remises de cheques + } // Wrapping pour les remises de cheques elseif ($modulepart == 'remisecheque' && !empty($conf->bank->dir_output)) { if ($fuser->rights->banque->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2865,9 +2722,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } $original_file = $conf->bank->dir_output.'/checkdeposits/'.$original_file; // original_file should contains relative path so include the get_exdir result - } - - // Wrapping for bank + } // Wrapping for bank elseif (($modulepart == 'banque' || $modulepart == 'bank') && !empty($conf->bank->dir_output)) { if ($fuser->rights->banque->{$lire}) @@ -2875,55 +2730,41 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->bank->dir_output.'/'.$original_file; - } - - // Wrapping for export module + } // Wrapping for export module elseif ($modulepart == 'export' && !empty($conf->export->dir_temp)) { // Aucun test necessaire car on force le rep de download sur // le rep export qui est propre a l'utilisateur $accessallowed = 1; $original_file = $conf->export->dir_temp.'/'.$fuser->id.'/'.$original_file; - } - - // Wrapping for import module + } // Wrapping for import module elseif ($modulepart == 'import' && !empty($conf->import->dir_temp)) { $accessallowed = 1; $original_file = $conf->import->dir_temp.'/'.$original_file; - } - - // Wrapping pour l'editeur wysiwyg + } // Wrapping pour l'editeur wysiwyg elseif ($modulepart == 'editor' && !empty($conf->fckeditor->dir_output)) { $accessallowed = 1; $original_file = $conf->fckeditor->dir_output.'/'.$original_file; - } - - // Wrapping for backups + } // Wrapping for backups elseif ($modulepart == 'systemtools' && !empty($conf->admin->dir_output)) { if ($fuser->admin) $accessallowed = 1; $original_file = $conf->admin->dir_output.'/'.$original_file; - } - - // Wrapping for upload file test + } // Wrapping for upload file test elseif ($modulepart == 'admin_temp' && !empty($conf->admin->dir_temp)) { if ($fuser->admin) $accessallowed = 1; $original_file = $conf->admin->dir_temp.'/'.$original_file; - } - - // Wrapping pour BitTorrent + } // Wrapping pour BitTorrent elseif ($modulepart == 'bittorrent' && !empty($conf->bittorrent->dir_output)) { $accessallowed = 1; $dir = 'files'; if (dol_mimetype($original_file) == 'application/x-bittorrent') $dir = 'torrents'; $original_file = $conf->bittorrent->dir_output.'/'.$dir.'/'.$original_file; - } - - // Wrapping pour Foundation module + } // Wrapping pour Foundation module elseif ($modulepart == 'member' && !empty($conf->adherent->dir_output)) { if ($fuser->rights->adherent->{$lire} || preg_match('/^specimen/i', $original_file)) @@ -2931,24 +2772,27 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->adherent->dir_output.'/'.$original_file; - } - - // Wrapping for Scanner + } // Wrapping for Scanner elseif ($modulepart == 'scanner_user_temp' && !empty($conf->scanner->dir_temp)) { $accessallowed = 1; $original_file = $conf->scanner->dir_temp.'/'.$fuser->id.'/'.$original_file; - } - - // GENERIC Wrapping + } // GENERIC Wrapping // If modulepart=module_user_temp Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart/temp/iduser // If modulepart=module_temp Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart/temp // If modulepart=module_user Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart/iduser // If modulepart=module Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart - else - { + // If modulepart=module-abc Allows any module to open a file if file is in directory called DOL_DATA_ROOT/modulepart + else { + //var_dump($modulepart); + //var_dump($original_file); if (preg_match('/^specimen/i', $original_file)) $accessallowed = 1; // If link to a file called specimen. Test must be done before changing $original_file int full path. if ($fuser->admin) $accessallowed = 1; // If user is admin + $tmpmodulepart = explode('-', $modulepart); + if (!empty($tmpmodulepart[1])) { + $modulepart = $tmpmodulepart[0]; + $original_file = $tmpmodulepart[1].'/'.$original_file; + } // Define $accessallowed $reg = array(); @@ -2961,8 +2805,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed = 1; $original_file = $conf->{$reg[1]}->dir_temp.'/'.$fuser->id.'/'.$original_file; - } - elseif (preg_match('/^([a-z]+)_temp$/i', $modulepart, $reg)) + } elseif (preg_match('/^([a-z]+)_temp$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_temp)) // modulepart not supported { @@ -2971,8 +2814,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed = 1; $original_file = $conf->{$reg[1]}->dir_temp.'/'.$original_file; - } - elseif (preg_match('/^([a-z]+)_user$/i', $modulepart, $reg)) + } elseif (preg_match('/^([a-z]+)_user$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported { @@ -2981,8 +2823,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, } if ($fuser->rights->{$reg[1]}->{$lire} || $fuser->rights->{$reg[1]}->{$read} || ($fuser->rights->{$reg[1]}->{$download})) $accessallowed = 1; $original_file = $conf->{$reg[1]}->dir_output.'/'.$fuser->id.'/'.$original_file; - } - elseif (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) + } elseif (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) { if (empty($conf->{$reg[1]}->dir_output)) // modulepart not supported { @@ -2994,9 +2835,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity, $accessallowed = 1; } $original_file = $conf->{$reg[1]}->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; - } - else - { + } else { if (empty($conf->$modulepart->dir_output)) // modulepart not supported { dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.'). The module for this modulepart value may not be activated.'); @@ -3121,17 +2960,13 @@ function getFilesUpdated(&$file_list, SimpleXMLElement $dir, $path = '', $pathre if (!file_exists($pathref.'/'.$filename)) { $file_list['missing'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize); - } - else - { + } else { $md5_local = md5_file($pathref.'/'.$filename); if ($conffile == '/etc/dolibarr/conf.php' && $filename == '/filefunc.inc.php') // For install with deb or rpm, we ignore test on filefunc.inc.php that was modified by package { $checksumconcat[] = $expectedmd5; - } - else - { + } else { if ($md5_local != $expectedmd5) $file_list['updated'][] = array('filename'=>$filename, 'expectedmd5'=>$expectedmd5, 'expectedsize'=>$expectedsize, 'md5'=>(string) $md5_local); $checksumconcat[] = $md5_local; } diff --git a/htdocs/core/lib/format_cards.lib.php b/htdocs/core/lib/format_cards.lib.php index c46cd150a51..1693329329e 100644 --- a/htdocs/core/lib/format_cards.lib.php +++ b/htdocs/core/lib/format_cards.lib.php @@ -55,9 +55,7 @@ if ($resql) $_Avery_Labels[$row['code']]['custom_x'] = $row['custom_x']; $_Avery_Labels[$row['code']]['custom_y'] = $row['custom_y']; } -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1a47d634299..47a5d3d9330 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -15,6 +15,7 @@ * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2018-2020 Frédéric France * Copyright (C) 2019 Thibault Foucart + * Copyright (C) 2020 Open-Dsi * * 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 @@ -81,16 +82,20 @@ function getEntity($element, $shared = 1, $currentobject = null) { global $conf, $mc; + // fix different element names (France to English) + switch ($element) { + case 'contrat': $element = 'contract'; break; // "/contrat/class/contrat.class.php" + case 'order_supplier': $element = 'supplier_order'; break; // "/fourn/class/fournisseur.commande.class.php" + } + if (is_object($mc)) { return $mc->getEntity($element, $shared, $currentobject); - } - else - { + } else { $out = ''; $addzero = array('user', 'usergroup', 'c_email_templates', 'email_template', 'default_values'); if (in_array($element, $addzero)) $out .= '0,'; - $out .= $conf->entity; + $out .= ((int) $conf->entity); return $out; } } @@ -108,13 +113,22 @@ function setEntity($currentobject) if (is_object($mc) && method_exists($mc, 'setEntity')) { return $mc->setEntity($currentobject); - } - else - { + } else { return ((is_object($currentobject) && $currentobject->id > 0 && $currentobject->entity > 0) ? $currentobject->entity : $conf->entity); } } +/** + * Return if string has a name dedicated to store a secret + * + * @param string $keyname Name of key to test + * @return boolean True if key is used to store a secret + */ +function isASecretKey($keyname) +{ + return preg_match('/(_pass|password|_pw|_key|securekey|serverkey|secret\d?|p12key|exportkey|_PW_[a-z]+|token)$/i', $keyname); +} + /** * Return information about user browser * @@ -168,21 +182,13 @@ function getBrowserInfo($user_agent) } // OS - if (preg_match('/linux/i', $user_agent)) { $os = 'linux'; } - elseif (preg_match('/macintosh/i', $user_agent)) { $os = 'macintosh'; } - elseif (preg_match('/windows/i', $user_agent)) { $os = 'windows'; } + if (preg_match('/linux/i', $user_agent)) { $os = 'linux'; } elseif (preg_match('/macintosh/i', $user_agent)) { $os = 'macintosh'; } elseif (preg_match('/windows/i', $user_agent)) { $os = 'windows'; } // Name - if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'firefox'; $version = $reg[2]; } - elseif (preg_match('/edge(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'edge'; $version = $reg[2]; } - elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $user_agent, $reg)) { $name = 'chrome'; $version = $reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string - elseif (preg_match('/chrome/i', $user_agent, $reg)) { $name = 'chrome'; } - elseif (preg_match('/iceweasel/i', $user_agent)) { $name = 'iceweasel'; } - elseif (preg_match('/epiphany/i', $user_agent)) { $name = 'epiphany'; } - elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'safari'; $version = $reg[2]; } // Safari is often present in string for mobile but its not. - elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'opera'; $version = $reg[2]; } - elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name = 'ie'; $version = end($reg); } // MS products at end - elseif (preg_match('/(Windows NT\s([0-9]+\.[0-9])).*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name = 'ie'; $version = end($reg); } // MS products at end + if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'firefox'; $version = $reg[2]; } elseif (preg_match('/edge(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'edge'; $version = $reg[2]; } elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $user_agent, $reg)) { $name = 'chrome'; $version = $reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string + elseif (preg_match('/chrome/i', $user_agent, $reg)) { $name = 'chrome'; } elseif (preg_match('/iceweasel/i', $user_agent)) { $name = 'iceweasel'; } elseif (preg_match('/epiphany/i', $user_agent)) { $name = 'epiphany'; } elseif (preg_match('/safari(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'safari'; $version = $reg[2]; } // Safari is often present in string for mobile but its not. + elseif (preg_match('/opera(\/|\s)([\d\.]*)/i', $user_agent, $reg)) { $name = 'opera'; $version = $reg[2]; } elseif (preg_match('/(MSIE\s([0-9]+\.[0-9]))|.*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name = 'ie'; $version = end($reg); } // MS products at end + elseif (preg_match('/(Windows NT\s([0-9]+\.[0-9])).*(Trident\/[0-9]+.[0-9];.*rv:([0-9]+\.[0-9]+))/i', $user_agent, $reg)) { $name = 'ie'; $version = end($reg); } // MS products at end elseif (preg_match('/l(i|y)n(x|ks)(\(|\/|\s)*([\d\.]+)/i', $user_agent, $reg)) { $name = 'lynxlinks'; $version = $reg[4]; } if ($tablet) { @@ -257,17 +263,14 @@ function GETPOSTISSET($paramname) if ($paramname == 'contextpage' && !empty($_SESSION['lastsearch_contextpage_'.$relativepathstring])) { $isset = 1; - } - elseif ($paramname == 'page' && !empty($_SESSION['lastsearch_page_'.$relativepathstring])) + } elseif ($paramname == 'page' && !empty($_SESSION['lastsearch_page_'.$relativepathstring])) + { + $isset = 1; + } elseif ($paramname == 'limit' && !empty($_SESSION['lastsearch_limit_'.$relativepathstring])) { $isset = 1; } - elseif ($paramname == 'limit' && !empty($_SESSION['lastsearch_limit_'.$relativepathstring])) - { - $isset = 1; - } - } - else { + } else { $isset = (isset($_POST[$paramname]) || isset($_GET[$paramname])); } @@ -285,12 +288,13 @@ function GETPOSTISSET($paramname) * 'none'=no check (only for param that should have very rich content) * 'int'=check it's numeric (integer or float) * 'intcomma'=check it's integer+comma ('1,2,3,4...') - * 'alpha'=check it's text and sign + * 'alpha'=Same than alphanohtml since v13 + * 'alphanohtml'=check there is no html content and no " and no ../ * 'aZ'=check it's a-z only * 'aZ09'=check it's simple alpha string (recommended for keys) * 'array'=check it's array * 'san_alpha'=Use filter_var with FILTER_SANITIZE_STRING (do not use this for free text string) - * 'nohtml', 'alphanohtml'=check there is no html content + * 'nohtml'=check there is no html content and no " and no ../ * 'restricthtml'=check html content is restricted to some tags only * 'custom'= custom filter specify $filter and $options) * @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get) @@ -350,17 +354,14 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null if ($paramname == 'contextpage' && !empty($_SESSION['lastsearch_contextpage_'.$relativepathstring])) { $out = $_SESSION['lastsearch_contextpage_'.$relativepathstring]; - } - elseif ($paramname == 'page' && !empty($_SESSION['lastsearch_page_'.$relativepathstring])) + } elseif ($paramname == 'page' && !empty($_SESSION['lastsearch_page_'.$relativepathstring])) { $out = $_SESSION['lastsearch_page_'.$relativepathstring]; - } - elseif ($paramname == 'limit' && !empty($_SESSION['lastsearch_limit_'.$relativepathstring])) + } elseif ($paramname == 'limit' && !empty($_SESSION['lastsearch_limit_'.$relativepathstring])) { $out = $_SESSION['lastsearch_limit_'.$relativepathstring]; } - } - // Else, retreive default values if we are not doing a sort + } // Else, retreive default values if we are not doing a sort elseif (!isset($_GET['sortfield'])) // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_ENABLE_DEFAULT_VALUES is not set { if (!empty($_GET['action']) && $_GET['action'] == 'create' && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) @@ -374,7 +375,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } if (!empty($conf->global->MAIN_ENABLE_DEFAULT_VALUES)) { - if (!empty($_GET['action']) && (preg_match('/^create/', $_GET['action']) || preg_match('/^presend/', $_GET['action'])) && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) + if (!empty($_GET['action']) && (preg_match('/^create/', $_GET['action']) || preg_match('/^presend/', $_GET['action'])) && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) { // Now search in setup to overwrite default values if (!empty($user->default_values)) // $user->default_values defined from menu 'Setup - Default values' @@ -395,12 +396,10 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } if (!$foundintru) $qualified = 1; //var_dump($defkey.'-'.$qualified); - } - else $qualified = 1; + } else $qualified = 1; if ($qualified) { - //var_dump($user->default_values[$relativepathstring][$defkey]['createform']); if (isset($user->default_values[$relativepathstring]['createform'][$defkey][$paramname])) { $out = $user->default_values[$relativepathstring]['createform'][$defkey][$paramname]; @@ -410,8 +409,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } } } - } - // Management of default search_filters and sort order + } // Management of default search_filters and sort order //elseif (preg_match('/list.php$/', $_SERVER["PHP_SELF"]) && ! empty($paramname) && ! isset($_GET[$paramname]) && ! isset($_POST[$paramname])) elseif (!empty($paramname) && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) { @@ -436,8 +434,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } if (!$foundintru) $qualified = 1; //var_dump($defkey.'-'.$qualified); - } - else $qualified = 1; + } else $qualified = 1; if ($qualified) { @@ -458,8 +455,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } } } - } - elseif (isset($user->default_values[$relativepathstring]['filters'])) + } elseif (isset($user->default_values[$relativepathstring]['filters'])) { foreach ($user->default_values[$relativepathstring]['filters'] as $defkey => $defval) // $defkey is a querystring like 'a=b&c=d', $defval is key of user { @@ -475,8 +471,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } if (!$foundintru) $qualified = 1; //var_dump($defkey.'-'.$qualified); - } - else $qualified = 1; + } else $qualified = 1; if ($qualified) { @@ -488,9 +483,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null $forbidden_chars_to_replace = array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ";", "="); // we accept _, -, . and , $out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$defkey][$paramname], '', $forbidden_chars_to_replace); } - } - else - { + } else { $forbidden_chars_to_replace = array(" ", "'", "/", "\\", ":", "*", "?", "\"", "<", ">", "|", "[", "]", ";", "="); // we accept _, -, . and , $out = dol_string_nospecial($user->default_values[$relativepathstring]['filters'][$defkey][$paramname], '', $forbidden_chars_to_replace); } @@ -515,102 +508,77 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null { $loopnb++; $newout = ''; - if ($reg[1] == 'DAY') { $tmp = dol_getdate(dol_now(), true); $newout = $tmp['mday']; } - elseif ($reg[1] == 'MONTH') { $tmp = dol_getdate(dol_now(), true); $newout = $tmp['mon']; } - elseif ($reg[1] == 'YEAR') { $tmp = dol_getdate(dol_now(), true); $newout = $tmp['year']; } - elseif ($reg[1] == 'PREVIOUS_DAY') { $tmp = dol_getdate(dol_now(), true); $tmp2 = dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } - elseif ($reg[1] == 'PREVIOUS_MONTH') { $tmp = dol_getdate(dol_now(), true); $tmp2 = dol_get_prev_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } - elseif ($reg[1] == 'PREVIOUS_YEAR') { $tmp = dol_getdate(dol_now(), true); $newout = ($tmp['year'] - 1); } - elseif ($reg[1] == 'NEXT_DAY') { $tmp = dol_getdate(dol_now(), true); $tmp2 = dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); $newout = $tmp2['day']; } - elseif ($reg[1] == 'NEXT_MONTH') { $tmp = dol_getdate(dol_now(), true); $tmp2 = dol_get_next_month($tmp['mon'], $tmp['year']); $newout = $tmp2['month']; } - elseif ($reg[1] == 'NEXT_YEAR') { $tmp = dol_getdate(dol_now(), true); $newout = ($tmp['year'] + 1); } - elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID') - { + if ($reg[1] == 'DAY') { + $tmp = dol_getdate(dol_now(), true); + $newout = $tmp['mday']; + } elseif ($reg[1] == 'MONTH') { + $tmp = dol_getdate(dol_now(), true); + $newout = $tmp['mon']; + } elseif ($reg[1] == 'YEAR') { + $tmp = dol_getdate(dol_now(), true); + $newout = $tmp['year']; + } elseif ($reg[1] == 'PREVIOUS_DAY') { + $tmp = dol_getdate(dol_now(), true); + $tmp2 = dol_get_prev_day($tmp['mday'], $tmp['mon'], $tmp['year']); + $newout = $tmp2['day']; + } elseif ($reg[1] == 'PREVIOUS_MONTH') { + $tmp = dol_getdate(dol_now(), true); + $tmp2 = dol_get_prev_month($tmp['mon'], $tmp['year']); + $newout = $tmp2['month']; + } elseif ($reg[1] == 'PREVIOUS_YEAR') { + $tmp = dol_getdate(dol_now(), true); + $newout = ($tmp['year'] - 1); + } elseif ($reg[1] == 'NEXT_DAY') { + $tmp = dol_getdate(dol_now(), true); + $tmp2 = dol_get_next_day($tmp['mday'], $tmp['mon'], $tmp['year']); + $newout = $tmp2['day']; + } elseif ($reg[1] == 'NEXT_MONTH') { + $tmp = dol_getdate(dol_now(), true); + $tmp2 = dol_get_next_month($tmp['mon'], $tmp['year']); + $newout = $tmp2['month']; + } elseif ($reg[1] == 'NEXT_YEAR') { + $tmp = dol_getdate(dol_now(), true); + $newout = ($tmp['year'] + 1); + } elseif ($reg[1] == 'MYCOMPANY_COUNTRY_ID' || $reg[1] == 'MYCOUNTRY_ID' || $reg[1] == 'MYCOUNTRYID') { $newout = $mysoc->country_id; - } - elseif ($reg[1] == 'USER_ID' || $reg[1] == 'USERID') - { + } elseif ($reg[1] == 'USER_ID' || $reg[1] == 'USERID') { $newout = $user->id; - } - elseif ($reg[1] == 'USER_SUPERVISOR_ID' || $reg[1] == 'SUPERVISOR_ID' || $reg[1] == 'SUPERVISORID') - { + } elseif ($reg[1] == 'USER_SUPERVISOR_ID' || $reg[1] == 'SUPERVISOR_ID' || $reg[1] == 'SUPERVISORID') { $newout = $user->fk_user; - } - elseif ($reg[1] == 'ENTITY_ID' || $reg[1] == 'ENTITYID') - { + } elseif ($reg[1] == 'ENTITY_ID' || $reg[1] == 'ENTITYID') { $newout = $conf->entity; + } else { + $newout = ''; // Key not found, we replace with empty string } - else $newout = ''; // Key not found, we replace with empty string //var_dump('__'.$reg[1].'__ -> '.$newout); $out = preg_replace('/__'.preg_quote($reg[1], '/').'__/', $newout, $out); } } - // Check is done after replacement - switch ($check) - { - case 'none': - break; - case 'int': // Check param is a numeric value (integer but also float or hexadecimal) - if (!is_numeric($out)) { $out = ''; } - break; - case 'intcomma': - if (preg_match('/[^0-9,-]+/i', $out)) $out = ''; - break; - case 'alpha': - if (!is_array($out)) - { - // '"' is dangerous because param in url can close the href= or src= and add javascript functions. - // '../' is dangerous because it allows dir transversals - $out = str_replace(array('"', '../'), '', trim($out)); + // Check rule + if (preg_match('/^array/', $check)) { // If 'array' or 'array:restricthtml' or 'array:aZ09' + if (!is_array($out) || empty($out)) { + $out = array(); + } else { + $tmparray = explode(':', $check); + if (!empty($tmparray[1])) { + $tmpcheck = $tmparray[1]; + } else { + $tmpcheck = 'alphanohtml'; } - break; - case 'san_alpha': - $out = filter_var($out, FILTER_SANITIZE_STRING); - break; - case 'aZ': - if (!is_array($out)) - { - $out = trim($out); - if (preg_match('/[^a-z]+/i', $out)) $out = ''; + foreach ($out as $outkey => $outval) { + $out[$outkey] = checkVal($outval, $tmpcheck, $filter, $options); } - break; - case 'aZ09': - if (!is_array($out)) - { - $out = trim($out); - if (preg_match('/[^a-z0-9_\-\.]+/i', $out)) $out = ''; - } - break; - case 'aZ09comma': // great to sanitize sortfield or sortorder params that can be t.abc,t.def_gh - if (!is_array($out)) - { - $out = trim($out); - if (preg_match('/[^a-z0-9_\-\.,]+/i', $out)) $out = ''; - } - break; - case 'array': - if (!is_array($out) || empty($out)) $out = array(); - break; - case 'nohtml': - $out = dol_string_nohtmltag($out, 0); - break; - case 'alphanohtml': // Recommended for most scalar parameters and search parameters - if (!is_array($out)) - { - // '"' is dangerous because param in url can close the href= or src= and add javascript functions. - // '../' is dangerous because it allows dir transversals - $out = str_replace(array('"', '../'), '', trim($out)); - $out = dol_string_nohtmltag($out, 0); - } - break; - case 'restricthtml': // Recommended for most html textarea - $out = dol_string_onlythesehtmltags($out, 0); - break; - case 'custom': - if (empty($filter)) return 'BadFourthParameterForGETPOST'; - $out = filter_var($out, $filter, $options); - break; + } + } + else { + $out = checkVal($out, $check, $filter, $options); + } + + // Sanitizing for special parameters. There is no reason to allow the backtopage parameter to contains an external URL. + if ($paramname == 'backtopage') { + $out = str_replace('\\', '/', $out); + $out = preg_replace(array('/^\/\/+/', '/^[a-z]*:/i'), '', $out); } // Code for search criteria persistence. @@ -636,24 +604,98 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } +/** + * Return a value after checking on a rule. + * + * @param string $out Value to get/check + * @param string $check Type of check + * @param int $filter Filter to apply when $check is set to 'custom'. (See http://php.net/manual/en/filter.filters.php for détails) + * @param mixed $options Options to pass to filter_var when $check is set to 'custom' + * @return string|array Value found (string or array), or '' if check fails + */ +function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options = null) +{ + // Check is done after replacement + switch ($check) + { + case 'none': + break; + case 'int': // Check param is a numeric value (integer but also float or hexadecimal) + if (!is_numeric($out)) { $out = ''; } + break; + case 'intcomma': + if (preg_match('/[^0-9,-]+/i', $out)) $out = ''; + break; + case 'san_alpha': + $out = filter_var($out, FILTER_SANITIZE_STRING); + break; + case 'aZ': + if (!is_array($out)) + { + $out = trim($out); + if (preg_match('/[^a-z]+/i', $out)) $out = ''; + } + break; + case 'aZ09': + if (!is_array($out)) + { + $out = trim($out); + if (preg_match('/[^a-z0-9_\-\.]+/i', $out)) $out = ''; + } + break; + case 'aZ09comma': // great to sanitize sortfield or sortorder params that can be t.abc,t.def_gh + if (!is_array($out)) + { + $out = trim($out); + if (preg_match('/[^a-z0-9_\-\.,]+/i', $out)) $out = ''; + } + break; + case 'nohtml': + $out = dol_string_nohtmltag($out, 0); + break; + case 'alpha': // No html and no " and no ../ + case 'alphanohtml': // Recommended for most scalar parameters and search parameters + if (!is_array($out)) + { + // '"' is dangerous because param in url can close the href= or src= and add javascript functions. + // '../' is dangerous because it allows dir transversals + $out = str_replace(array('"', '"', '../'), '', trim($out)); + $out = dol_string_nohtmltag($out, 0); + } + break; + case 'restricthtml': // Recommended for most html textarea + $out = dol_string_onlythesehtmltags($out, 0); + // TODO We can also remove all javascripts reference + break; + case 'custom': + if (empty($filter)) return 'BadFourthParameterForGETPOST'; + $out = filter_var($out, $filter, $options); + break; + } + + return $out; +} + + + if (!function_exists('dol_getprefix')) { - /** - * Return a prefix to use for this Dolibarr instance, for session/cookie names or email id. - * The prefix is unique for instance and avoid conflict between multi-instances, even when having two instances with same root dir - * or two instances in same virtual servers. - * - * @param string $mode '' (prefix for session name) or 'email' (prefix for email id) - * @return string A calculated prefix - */ - function dol_getprefix($mode = '') - { - global $conf; + /** + * Return a prefix to use for this Dolibarr instance, for session/cookie names or email id. + * The prefix is unique for instance and avoid conflict between multi-instances, even when having two instances with same root dir + * or two instances in same virtual servers. + * + * @param string $mode '' (prefix for session name) or 'email' (prefix for email id) + * @return string A calculated prefix + */ + function dol_getprefix($mode = '') + { + global $conf; // If prefix is for email if ($mode == 'email') { - if (!empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID)) // If MAIL_PREFIX_FOR_EMAIL_ID is set (a value initialized with a random value is recommended) + if (!empty($conf->global->MAIL_PREFIX_FOR_EMAIL_ID)) // If MAIL_PREFIX_FOR_EMAIL_ID is set (a value initialized with a random value is recommended) { if ($conf->global->MAIL_PREFIX_FOR_EMAIL_ID != 'SERVER_NAME') return $conf->global->MAIL_PREFIX_FOR_EMAIL_ID; elseif (isset($_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"]; @@ -746,8 +788,7 @@ function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0) { if ($returnemptyifnotfound == 1 || !file_exists($res)) return ''; } - } - else // For an url path + } else // For an url path { // We try to get local path of file on filesystem from url // Note that trying to know if a file on disk exist by forging path on disk from url @@ -824,9 +865,7 @@ function dol_clone($object, $native = 0) if (empty($native)) { $myclone = unserialize(serialize($object)); - } - else - { + } else { $myclone = clone $object; // PHP clone is a shallow copy only, not a real clone, so properties of references will keep references (refer to the same target/variable) } @@ -917,11 +956,9 @@ function dol_string_unaccent($str) ); $string = strtr($string, $replacements); return rawurldecode($string); - } - else - { + } else { // See http://www.ascii-code.com/ - $string = strtr( + $string = strtr( $str, "\xC0\xC1\xC2\xC3\xC4\xC5\xC7 \xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1 @@ -950,7 +987,7 @@ function dol_string_unaccent($str) * @param array $badcharstoreplace List of forbidden characters * @return string Cleaned string * - * @see dol_sanitizeFilename(), dol_string_unaccent() + * @see dol_sanitizeFilename(), dol_string_unaccent(), dol_string_nounprintableascii() */ function dol_string_nospecial($str, $newstr = '_', $badcharstoreplace = '') { @@ -963,6 +1000,21 @@ function dol_string_nospecial($str, $newstr = '_', $badcharstoreplace = '') } +/** + * Clean a string from all non printable ascii chars (0x00-0x1F and 0x7F). It removes also CR-LF + * This can be used to sanitize a string and view its real content. Some hacks try to obfuscate attacks by inserting non printable chars. + * + * @param string $str String to clean + * @return string Cleaned string + * + * @see dol_sanitizeFilename(), dol_string_unaccent(), dol_string_nospecial() + */ +function dol_string_nounprintableascii($str) +{ + return preg_replace('/[\x00-\x1F\x7F]/u', '', $str); +} + + /** * Returns text escaped for inclusion into javascript code * @@ -977,10 +1029,8 @@ function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0) $substitjs = array("'"=>"\\'", "\r"=>'\\r'); //$substitjs['syslog->enabled)) return; // Check if we are into execution of code of a website - if (defined('USEEXTERNALSERVER') && ! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { + if (defined('USEEXTERNALSERVER') && !defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { global $website, $websitekey; - if (is_object($website) && ! empty($website->ref)) $suffixinfilename.='_website_'.$website->ref; - elseif (! empty($websitekey)) $suffixinfilename.='_website_'.$websitekey; + if (is_object($website) && !empty($website->ref)) $suffixinfilename .= '_website_'.$website->ref; + elseif (!empty($websitekey)) $suffixinfilename .= '_website_'.$websitekey; } if ($ident < 0) @@ -1107,9 +1157,9 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = // If adding log inside HTML page is required if ((!empty($_REQUEST['logtohtml']) && !empty($conf->global->MAIN_ENABLE_LOG_TO_HTML)) - || (!empty($user->rights->debugbar->read) && is_object($debugbar))) + || (!empty($user->rights->debugbar->read) && is_object($debugbar))) { - $conf->logbuffer[] = dol_print_date(time(), "%Y-%m-%d %H:%M:%S")." ".$logLevels[$level]." ".$message; + $conf->logbuffer[] = dol_print_date(time(), "%Y-%m-%d %H:%M:%S")." ".$logLevels[$level]." ".$message; } //TODO: Remove this. MAIN_ENABLE_LOG_INLINE_HTML should be deprecated and use a log handler dedicated to HTML output @@ -1135,8 +1185,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = // This is when server run behind a reverse proxy if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR'] != $remoteip) $data['ip'] = $_SERVER['HTTP_X_FORWARDED_FOR'].' -> '.$data['ip']; elseif (!empty($_SERVER['HTTP_CLIENT_IP']) && $_SERVER['HTTP_CLIENT_IP'] != $remoteip) $data['ip'] = $_SERVER['HTTP_CLIENT_IP'].' -> '.$data['ip']; - } - // This is when PHP session is ran inside a web server but not inside a client request (example: init code of apache) + } // This is when PHP session is ran inside a web server but not inside a client request (example: init code of apache) elseif (!empty($_SERVER['SERVER_ADDR'])) $data['ip'] = $_SERVER['SERVER_ADDR']; // This is when PHP session is ran outside a web server, like from Windows command line (Not always defined, but useful if OS defined it). elseif (!empty($_SERVER['COMPUTERNAME'])) $data['ip'] = $_SERVER['COMPUTERNAME'].(empty($_SERVER['USERNAME']) ? '' : '@'.$_SERVER['USERNAME']); @@ -1160,6 +1209,38 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = } } +/** + * Return HTML code to output a button to open a dialog popup box. + * Such buttons must be included inside a HTML form. + * + * @param string $name A name for the html component + * @param string $label Label of button + * @param string $buttonstring button string + * @param string $url Url to open + * @param string $disabled Disabled text + * @return string HTML component with button + */ +function dolButtonToOpenUrlInDialogPopup($name, $label, $buttonstring, $url, $disabled = '') +{ + //print ''; + $out = ''.$buttonstring.''; + $out .= ''; + return $out; +} /** * Show tab header of a card @@ -1173,11 +1254,13 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = * @param string $morehtmlright Add more html content on right of tabs title * @param string $morecss More Css * @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value. + * @param string $moretabssuffix A suffix to use when you have several dol_get_fiche_head() in same page * @return void + * @deprecated Use print dol_get_fiche_head() instead */ -function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0) +function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '') { - print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss, $limittoshow); + print dol_get_fiche_head($links, $active, $title, $notab, $picto, $pictoisfullpath, $morehtmlright, $morecss, $limittoshow, $moretabssuffix); } /** @@ -1192,9 +1275,10 @@ function dol_fiche_head($links = array(), $active = '0', $title = '', $notab = 0 * @param string $morehtmlright Add more html content on right of tabs title * @param string $morecss More Css * @param int $limittoshow Limit number of tabs to show. Use 0 to use automatic default value. + * @param string $moretabssuffix A suffix to use when you have several dol_get_fiche_head() in same page * @return string */ -function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0) +function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limittoshow = 0, $moretabssuffix = '') { global $conf, $langs, $hookmanager; @@ -1202,7 +1286,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $showtitle = 1; if (!empty($conf->dol_optimize_smallscreen)) $showtitle = 0; - $out = "\n".''; + $out = "\n".''; if ((!empty($title) && $showtitle) || $morehtmlright || !empty($links)) { $out .= '
'."\n"; @@ -1254,8 +1338,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab { if ((is_numeric($active) && $i == $active) || (!empty($links[$i][2]) && !is_numeric($active) && $active == $links[$i][2])) { $isactive = true; - } - else { + } else { $isactive = false; } @@ -1267,13 +1350,10 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab if (!empty($links[$i][0])) { $out .= ''.$links[$i][1].''."\n"; - } - else - { + } else { $out .= ''.$links[$i][1].''."\n"; } - } - elseif (!empty($links[$i][1])) + } elseif (!empty($links[$i][1])) { //print "x $i $active ".$links[$i][2]." z"; if ($isactive) @@ -1281,18 +1361,14 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab $out .= ''; $out .= $links[$i][1]; $out .= ''."\n"; - } - else - { + } else { $out .= ''; $out .= $links[$i][1]; $out .= ''."\n"; } } $out .= '
'; - } - else - { + } else { // The popup with the other tabs if (!$popuptab) { @@ -1304,10 +1380,8 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab { if (!empty($links[$i][0])) $outmore .= ''.$links[$i][1].''."\n"; - else - $outmore .= ''.$links[$i][1].''."\n"; - } - elseif (!empty($links[$i][1])) + else $outmore .= ''.$links[$i][1].''."\n"; + } elseif (!empty($links[$i][1])) { $outmore .= ''; $outmore .= preg_replace('/([a-z])\/([a-z])/i', '\\1 / \\2', $links[$i][1]); // Replace x/y with x / y to allow wrap on long composed texts. @@ -1325,18 +1399,28 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab { $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); $right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right'); + $widthofpopup = 200; - $tabsname = str_replace("@", "", $picto); + $tabsname = $moretabssuffix; + if (empty($tabsname)) { $tabsname = str_replace("@", "", $picto); } $out .= '
'; - $out .= ''.$langs->trans("More").'... ('.$nbintab.')'; - $out .= '
'; + $out .= ''.$langs->trans("More").'... ('.$nbintab.')'; // Do not use "reposition" class in the "More". + $out .= '
'; $out .= $outmore; $out .= '
'; $out .= '
'; $out .= "
\n"; $out .= ""; } @@ -1439,20 +1523,16 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $maxvisiblephotos = (isset($conf->global->PRODUCT_MAX_VISIBLE_PHOTO) ? $conf->global->PRODUCT_MAX_VISIBLE_PHOTO : 5); if ($conf->browser->layout == 'phone') $maxvisiblephotos = 1; if ($showimage) $morehtmlleft .= '
'.$object->show_photos('product', $conf->product->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'
'; - else - { + else { if (!empty($conf->global->PRODUCT_NODISPLAYIFNOPHOTO)) { $nophoto = ''; $morehtmlleft .= '
'; - } - else { // Show no photo link + } else { // Show no photo link $nophoto = '/public/theme/common/nophoto.png'; $morehtmlleft .= '
No photo
'; } } - } - elseif ($object->element == 'ticket') - { + } elseif ($object->element == 'ticket') { $width = 80; $cssclass = 'photoref'; $showimage = $object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->ref); $maxvisiblephotos = (isset($conf->global->TICKET_MAX_VISIBLE_PHOTO) ? $conf->global->TICKET_MAX_VISIBLE_PHOTO : 2); @@ -1463,9 +1543,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi if ($object->nbphoto > 0) { $morehtmlleft .= '
'.$showphoto.'
'; - } - else - { + } else { $showimage = 0; } } @@ -1474,15 +1552,12 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi if (!empty($conf->global->TICKET_NODISPLAYIFNOPHOTO)) { $nophoto = ''; $morehtmlleft .= '
'; - } - else { // Show no photo link + } else { // Show no photo link $nophoto = '/public/theme/common/nophoto.png'; $morehtmlleft .= '
No photo
'; } } - } - else - { + } else { if ($showimage) { if ($modulepart != 'unknown') @@ -1497,9 +1572,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi { $subdir = get_exdir($object->id, 2, 0, 1, $object, $modulepart); $subdir .= ((!empty($subdir) && !preg_match('/\/$/', $subdir)) ? '/' : '').$objectref; // the objectref dir is not included into get_exdir when used with level=2, so we add it at end - } - else - { + } else { $subdir = get_exdir($object->id, 0, 0, 1, $object, $modulepart); } if (empty($subdir)) $subdir = 'errorgettingsubdirofobject'; // Protection to avoid to return empty path @@ -1532,7 +1605,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi if ($pdfexists && !$error) { - $heightforphotref = 70; + $heightforphotref = 80; if (!empty($conf->dol_optimize_smallscreen)) $heightforphotref = 60; // If the preview file is found if (file_exists($fileimage)) @@ -1542,8 +1615,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $phototoshow .= '
'; } } - } - elseif (!$phototoshow) + } elseif (!$phototoshow) { $phototoshow .= $form->showphoto($modulepart, $object, 0, 0, 0, 'photoref', 'small', 1, 0, $maxvisiblephotos); } @@ -1558,15 +1630,13 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi if (!$phototoshow) // Show No photo link (picto of object) { - $morehtmlleft .= '
'; + $morehtmlleft .= '
'; if ($object->element == 'action') { $width = 80; $cssclass = 'photorefcenter'; $nophoto = img_picto('No photo', 'title_agenda'); - } - else - { + } else { $width = 14; $cssclass = 'photorefcenter'; $picto = $object->picto; if ($object->element == 'project' && !$object->public) $picto = 'project'; // instead of projectpub @@ -1589,12 +1659,10 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi if (!empty($conf->use_javascript_ajax) && $user->rights->societe->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { $morehtmlstatus .= ajax_object_onoff($object, 'status', 'status', 'InActivity', 'ActivityCeased'); - } - else { + } else { $morehtmlstatus .= $object->getLibStatut(6); } - } - elseif ($object->element == 'product') + } elseif ($object->element == 'product') { //$morehtmlstatus.=$langs->trans("Status").' ('.$langs->trans("Sell").') '; if (!empty($conf->use_javascript_ajax) && $user->rights->produit->creer && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { @@ -1609,32 +1677,27 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi } else { $morehtmlstatus .= ''.$object->getLibStatut(6, 1).''; } - } - elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan'))) + } elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan'))) { $tmptxt = $object->getLibStatut(6, $object->totalpaye); if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt = $object->getLibStatut(5, $object->totalpaye); $morehtmlstatus .= $tmptxt; - } - elseif ($object->element == 'contrat' || $object->element == 'contract') + } elseif ($object->element == 'contrat' || $object->element == 'contract') { if ($object->statut == 0) $morehtmlstatus .= $object->getLibStatut(5); else $morehtmlstatus .= $object->getLibStatut(4); - } - elseif ($object->element == 'facturerec') + } elseif ($object->element == 'facturerec') { if ($object->frequency == 0) $morehtmlstatus .= $object->getLibStatut(2); else $morehtmlstatus .= $object->getLibStatut(5); - } - elseif ($object->element == 'project_task') + } elseif ($object->element == 'project_task') { $object->fk_statut = 1; if ($object->progress > 0) $object->fk_statut = 2; if ($object->progress >= 100) $object->fk_statut = 3; $tmptxt = $object->getLibStatut(5); $morehtmlstatus .= $tmptxt; // No status on task - } - else { // Generic case + } else { // Generic case $tmptxt = $object->getLibStatut(6); if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt = $object->getLibStatut(5); $morehtmlstatus .= $tmptxt; @@ -1671,7 +1734,8 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi } if (!empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && ($conf->global->MAIN_SHOW_TECHNICAL_ID == '1' || preg_match('/'.preg_quote($object->element, '/').'/i', $conf->global->MAIN_SHOW_TECHNICAL_ID)) && !empty($object->id)) { - $morehtmlref .= '
'; + $morehtmlref .= '
'; + $morehtmlref .= '
'; $morehtmlref .= $langs->trans("TechnicalID").': '.$object->id; $morehtmlref .= '
'; } @@ -1753,8 +1817,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs $ret .= ($ret ? ", " : '').$object->state; } if ($object->zip) $ret .= ($ret ? ", " : '').$object->zip; - } - elseif (in_array($object->country_code, array('GB', 'UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country + } elseif (in_array($object->country_code, array('GB', 'UK'))) // UK: title firstname name \n address lines \n town state \n zip \n country { $town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : $object->town); $ret .= ($ret ? $sep : '').$town; @@ -1763,8 +1826,7 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs $ret .= ($ret ? ", " : '').$object->state; } if ($object->zip) $ret .= ($ret ? $sep : '').$object->zip; - } - elseif (in_array($object->country_code, array('ES', 'TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country + } elseif (in_array($object->country_code, array('ES', 'TR'))) // ES: title firstname name \n address lines \n zip town \n state \n country { $ret .= ($ret ? $sep : '').$object->zip; $town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : $object->town); @@ -1773,15 +1835,13 @@ function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs { $ret .= "\n".$object->state; } - } - elseif (in_array($object->country_code, array('IT'))) // IT: tile firstname name\n address lines \n zip (Code Departement) \n country + } elseif (in_array($object->country_code, array('IT'))) // IT: tile firstname name\n address lines \n zip (Code Departement) \n country { $ret .= ($ret ? $sep : '').$object->zip; $town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : $object->town); $ret .= ($town ? (($object->zip ? ' ' : '').$town) : ''); $ret .= ($object->state_code ? (' '.($object->state_code)) : ''); - } - else // Other: title firstname name \n address lines \n zip town \n country + } else // Other: title firstname name \n address lines \n zip town \n country { $town = ($extralangcode ? $object->array_languages['town'][$extralangcode] : $object->town); $ret .= $object->zip ? (($ret ? $sep : '').$object->zip) : ''; @@ -1815,8 +1875,7 @@ function dol_strftime($fmt, $ts = false, $is_gmt = false) { if ((abs($ts) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range return ($is_gmt) ? @gmstrftime($fmt, $ts) : @strftime($fmt, $ts); - } - else return 'Error date into a not supported range'; + } else return 'Error date into a not supported range'; } /** @@ -1858,8 +1917,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang $offsettzstring = @date_default_timezone_get(); // Example 'Europe/Berlin' or 'Indian/Reunion' $offsettz = 0; $offsetdst = 0; - } - elseif ($tzoutput == 'tzuser' || $tzoutput == 'tzuserrel') + } elseif ($tzoutput == 'tzuser' || $tzoutput == 'tzuserrel') { $to_gmt = true; $offsettzstring = (empty($_SESSION['dol_tz_string']) ? 'UTC' : $_SESSION['dol_tz_string']); // Example 'Europe/Berlin' or 'Indian/Reunion' @@ -1922,35 +1980,31 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang $reg = array(); if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000 { - dol_print_error("Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"]); - return ''; - } - elseif (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)) // Still available to solve problems in extrafields of type date + dol_print_error("Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"]); + return ''; + } elseif (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)) // Still available to solve problems in extrafields of type date { - // This part of code should not be used. - dol_syslog("Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"], LOG_WARNING); - //if (function_exists('debug_print_backtrace')) debug_print_backtrace(); - // Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' - $syear = (!empty($reg[1]) ? $reg[1] : ''); - $smonth = (!empty($reg[2]) ? $reg[2] : ''); - $sday = (!empty($reg[3]) ? $reg[3] : ''); - $shour = (!empty($reg[4]) ? $reg[4] : ''); - $smin = (!empty($reg[5]) ? $reg[5] : ''); - $ssec = (!empty($reg[6]) ? $reg[6] : ''); + // This part of code should not be used. + dol_syslog("Functions.lib::dol_print_date function called with a bad value from page ".$_SERVER["PHP_SELF"], LOG_WARNING); + //if (function_exists('debug_print_backtrace')) debug_print_backtrace(); + // Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' + $syear = (!empty($reg[1]) ? $reg[1] : ''); + $smonth = (!empty($reg[2]) ? $reg[2] : ''); + $sday = (!empty($reg[3]) ? $reg[3] : ''); + $shour = (!empty($reg[4]) ? $reg[4] : ''); + $smin = (!empty($reg[5]) ? $reg[5] : ''); + $ssec = (!empty($reg[6]) ? $reg[6] : ''); - $time = dol_mktime($shour, $smin, $ssec, $smonth, $sday, $syear, true); - $ret = adodb_strftime($format, $time + $offsettz + $offsetdst, $to_gmt); - } - else - { + $time = dol_mktime($shour, $smin, $ssec, $smonth, $sday, $syear, true); + $ret = adodb_strftime($format, $time + $offsettz + $offsetdst, $to_gmt); + } else { // Date is a timestamps if ($time < 100000000000) // Protection against bad date values { $timetouse = $time + $offsettz + $offsetdst; // TODO Replace this with function Date PHP. We also should not use anymore offsettz and offsetdst but only offsettzstring. $ret = adodb_strftime($format, $timetouse, $to_gmt); - } - else $ret = 'Bad value '.$time.' for date'; + } else $ret = 'Bad value '.$time.' for date'; } if (preg_match('/__b__/i', $format)) @@ -1964,9 +2018,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang { $monthtext = $outputlangs->transnoentities('Month'.$month); $monthtextshort = $outputlangs->transnoentities('MonthShort'.$month); - } - else - { + } else { $monthtext = $outputlangs->transnoentitiesnoconv('Month'.$month); $monthtextshort = $outputlangs->transnoentitiesnoconv('MonthShort'.$month); } @@ -2034,9 +2086,7 @@ function dol_getdate($timestamp, $fast = false) if ($usealternatemethod) { $arrayinfo = adodb_getdate($timestamp, $fast); - } - else - { + } else { $arrayinfo = getdate($timestamp); } @@ -2087,28 +2137,23 @@ function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = false, $ { $default_timezone = @date_default_timezone_get(); // Example 'Europe/Berlin' $localtz = new DateTimeZone($default_timezone); - } - elseif ($gm === 'user') + } elseif ($gm === 'user') { // We use dol_tz_string first because it is more reliable. $default_timezone = (empty($_SESSION["dol_tz_string"]) ? @date_default_timezone_get() : $_SESSION["dol_tz_string"]); // Example 'Europe/Berlin' try { $localtz = new DateTimeZone($default_timezone); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog("Warning dol_tz_string contains an invalid value ".$_SESSION["dol_tz_string"], LOG_WARNING); $default_timezone = @date_default_timezone_get(); } - } - elseif (strrpos($gm, "tz,") !== false) + } elseif (strrpos($gm, "tz,") !== false) { $timezone = str_replace("tz,", "", $gm); // Example 'tz,Europe/Berlin' - try - { + try { $localtz = new DateTimeZone($timezone); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog("Warning passed timezone contains an invalid value ".$timezone, LOG_WARNING); } @@ -2147,8 +2192,7 @@ function dol_now($mode = 'gmt') require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $tzsecond = getServerTimeZoneInt('now'); // Contains tz+dayling saving time $ret = (int) (dol_now('gmt') + ($tzsecond * 3600)); - } - /*elseif ($mode == 'tzref') // Time for now with parent company timezone is added + } /*elseif ($mode == 'tzref') // Time for now with parent company timezone is added { require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; $tzsecond=getParentCompanyTimeZoneInt(); // Contains tz+dayling saving time @@ -2187,16 +2231,13 @@ function dol_print_size($size, $shortvalue = 0, $shortunit = 0) $ret = $size; $textunitshort = $langs->trans("b"); $textunitlong = $langs->trans("Bytes"); - } - else - { + } else { $ret = round($size / $level, 0); $textunitshort = $langs->trans("Kb"); $textunitlong = $langs->trans("KiloBytes"); } // Use long or short text unit - if (empty($shortunit)) { $ret .= ' '.$textunitlong; } - else { $ret .= ' '.$textunitshort; } + if (empty($shortunit)) { $ret .= ' '.$textunitlong; } else { $ret .= ' '.$textunitshort; } return $ret; } @@ -2270,9 +2311,7 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, if (!empty($conf->global->AGENDA_ADDACTIONFOREMAIL)) $link = ''.img_object($langs->trans("AddAction"), "calendar").''; if ($link) $newemail = '
'.$newemail.' '.$link.'
'; } - } - else - { + } else { if ($showinvalid && !isValidEmail($email)) { $langs->load("errors"); @@ -2302,23 +2341,23 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, */ function getArrayOfSocialNetworks() { - global $conf, $db; - $sql = "SELECT rowid, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks"; - $sql .= " WHERE entity=".$conf->entity; - $socialnetworks = array(); - $resql = $db->query($sql); - if ($resql) { - while ($obj = $db->fetch_object($resql)) { - $socialnetworks[$obj->code] = array( - 'rowid' => $obj->rowid, - 'label' => $obj->label, - 'url' => $obj->url, - 'icon' => $obj->icon, - 'active' => $obj->active, - ); - } - } - return $socialnetworks; + global $conf, $db; + $sql = "SELECT rowid, code, label, url, icon, active FROM ".MAIN_DB_PREFIX."c_socialnetworks"; + $sql .= " WHERE entity=".$conf->entity; + $socialnetworks = array(); + $resql = $db->query($sql); + if ($resql) { + while ($obj = $db->fetch_object($resql)) { + $socialnetworks[$obj->code] = array( + 'rowid' => $obj->rowid, + 'label' => $obj->label, + 'url' => $obj->url, + 'icon' => $obj->icon, + 'active' => $obj->active, + ); + } + } + return $socialnetworks; } /** @@ -2364,9 +2403,7 @@ function dol_print_socialnetworks($value, $cid, $socid, $type) $htmllink .= ($link ? ' '.$link : ''); } $htmllink .= '
'; - } - else - { + } else { $langs->load("errors"); $htmllink .= img_warning($langs->trans("ErrorBadSocialNetworkValue", $value)); } @@ -2406,289 +2443,241 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli // France if (dol_strlen($phone) == 10) { $newphone = substr($newphone, 0, 2).$separ.substr($newphone, 2, 2).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2); - } - elseif (dol_strlen($phone) == 7) + } elseif (dol_strlen($phone) == 7) { $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 2); - } - elseif (dol_strlen($phone) == 9) + } elseif (dol_strlen($phone) == 9) { $newphone = substr($newphone, 0, 2).$separ.substr($newphone, 2, 3).$separ.substr($newphone, 5, 2).$separ.substr($newphone, 7, 2); - } - elseif (dol_strlen($phone) == 11) + } elseif (dol_strlen($phone) == 11) { $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 2).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2); - } - elseif (dol_strlen($phone) == 12) + } elseif (dol_strlen($phone) == 12) { $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); } - } - - elseif (strtoupper($countrycode) == "CA") + } elseif (strtoupper($countrycode) == "CA") { if (dol_strlen($phone) == 10) { $newphone = ($separ != '' ? '(' : '').substr($newphone, 0, 3).($separ != '' ? ')' : '').$separ.substr($newphone, 3, 3).($separ != '' ? '-' : '').substr($newphone, 6, 4); } - } - elseif (strtoupper($countrycode) == "PT") + } elseif (strtoupper($countrycode) == "PT") {//Portugal if (dol_strlen($phone) == 13) {//ex: +351_ABC_DEF_GHI $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 3).$separ.substr($newphone, 10, 3); } - } - elseif (strtoupper($countrycode) == "SR") + } elseif (strtoupper($countrycode) == "SR") {//Suriname if (dol_strlen($phone) == 10) {//ex: +597_ABC_DEF $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 3); - } - elseif (dol_strlen($phone) == 11) + } elseif (dol_strlen($phone) == 11) {//ex: +597_ABC_DEFG $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 4); } - } - elseif (strtoupper($countrycode) == "DE") + } elseif (strtoupper($countrycode) == "DE") {//Allemagne if (dol_strlen($phone) == 14) {//ex: +49_ABCD_EFGH_IJK $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 4).$separ.substr($newphone, 7, 4).$separ.substr($newphone, 11, 3); - } - elseif (dol_strlen($phone) == 13) + } elseif (dol_strlen($phone) == 13) {//ex: +49_ABC_DEFG_HIJ $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 4).$separ.substr($newphone, 10, 3); } - } - elseif (strtoupper($countrycode) == "ES") + } elseif (strtoupper($countrycode) == "ES") {//Espagne if (dol_strlen($phone) == 12) {//ex: +34_ABC_DEF_GHI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 3); } - } - elseif (strtoupper($countrycode) == "BF") + } elseif (strtoupper($countrycode) == "BF") {// Burkina Faso if (dol_strlen($phone) == 12) {//ex : +22 A BC_DE_FG_HI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 1).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); } - } - elseif (strtoupper($countrycode) == "RO") + } elseif (strtoupper($countrycode) == "RO") {// Roumanie if (dol_strlen($phone) == 12) {//ex : +40 AB_CDE_FG_HI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); } - } - elseif (strtoupper($countrycode) == "TR") + } elseif (strtoupper($countrycode) == "TR") {//Turquie if (dol_strlen($phone) == 13) {//ex : +90 ABC_DEF_GHIJ $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 4); } - } - elseif (strtoupper($countrycode) == "US") + } elseif (strtoupper($countrycode) == "US") {//Etat-Unis if (dol_strlen($phone) == 12) {//ex: +1 ABC_DEF_GHIJ $newphone = substr($newphone, 0, 2).$separ.substr($newphone, 2, 3).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 8, 4); } - } - elseif (strtoupper($countrycode) == "MX") + } elseif (strtoupper($countrycode) == "MX") {//Mexique if (dol_strlen($phone) == 12) {//ex: +52 ABCD_EFG_HI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 4).$separ.substr($newphone, 7, 3).$separ.substr($newphone, 10, 2); - } - elseif (dol_strlen($phone) == 11) + } elseif (dol_strlen($phone) == 11) {//ex: +52 AB_CD_EF_GH $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 2).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2); - } - elseif (dol_strlen($phone) == 13) + } elseif (dol_strlen($phone) == 13) {//ex: +52 ABC_DEF_GHIJ $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 4); } - } - elseif (strtoupper($countrycode) == "ML") + } elseif (strtoupper($countrycode) == "ML") {//Mali if (dol_strlen($phone) == 12) {//ex: +223 AB_CD_EF_GH $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); } - } - elseif (strtoupper($countrycode) == "TH") + } elseif (strtoupper($countrycode) == "TH") {//Thaïlande if (dol_strlen($phone) == 11) {//ex: +66_ABC_DE_FGH $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 3); - } - elseif (dol_strlen($phone) == 12) + } elseif (dol_strlen($phone) == 12) {//ex: +66_A_BCD_EF_GHI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 1).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 3); } - } - elseif (strtoupper($countrycode) == "MU") + } elseif (strtoupper($countrycode) == "MU") { - //Maurice + //Maurice if (dol_strlen($phone) == 11) {//ex: +230_ABC_DE_FG $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2); - } - elseif (dol_strlen($phone) == 12) + } elseif (dol_strlen($phone) == 12) {//ex: +230_ABCD_EF_GH $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 4).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); } - } - elseif (strtoupper($countrycode) == "ZA") + } elseif (strtoupper($countrycode) == "ZA") {//Afrique du sud if (dol_strlen($phone) == 12) {//ex: +27_AB_CDE_FG_HI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); } - } - elseif (strtoupper($countrycode) == "SY") + } elseif (strtoupper($countrycode) == "SY") {//Syrie if (dol_strlen($phone) == 12) {//ex: +963_AB_CD_EF_GH $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); - } - elseif (dol_strlen($phone) == 13) + } elseif (dol_strlen($phone) == 13) {//ex: +963_AB_CD_EF_GHI $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 3); } - } - elseif (strtoupper($countrycode) == "AE") + } elseif (strtoupper($countrycode) == "AE") {//Emirats Arabes Unis if (dol_strlen($phone) == 12) {//ex: +971_ABC_DEF_GH $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 3).$separ.substr($newphone, 10, 2); - } - elseif (dol_strlen($phone) == 13) + } elseif (dol_strlen($phone) == 13) {//ex: +971_ABC_DEF_GHI $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 3).$separ.substr($newphone, 10, 3); - } - elseif (dol_strlen($phone) == 14) + } elseif (dol_strlen($phone) == 14) {//ex: +971_ABC_DEF_GHIK $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 3).$separ.substr($newphone, 10, 4); } - } - elseif (strtoupper($countrycode) == "DZ") + } elseif (strtoupper($countrycode) == "DZ") {//Algérie if (dol_strlen($phone) == 13) {//ex: +213_ABC_DEF_GHI $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 3).$separ.substr($newphone, 10, 3); } - } - elseif (strtoupper($countrycode) == "BE") + } elseif (strtoupper($countrycode) == "BE") {//Belgique if (dol_strlen($phone) == 11) {//ex: +32_ABC_DE_FGH $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 3); - } - elseif (dol_strlen($phone) == 12) + } elseif (dol_strlen($phone) == 12) {//ex: +32_ABC_DEF_GHI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 3); } - } - elseif (strtoupper($countrycode) == "PF") + } elseif (strtoupper($countrycode) == "PF") {//Polynésie française if (dol_strlen($phone) == 12) {//ex: +689_AB_CD_EF_GH $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); } - } - elseif (strtoupper($countrycode) == "CO") + } elseif (strtoupper($countrycode) == "CO") {//Colombie if (dol_strlen($phone) == 13) {//ex: +57_ABC_DEF_GH_IJ $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 2).$separ.substr($newphone, 11, 2); } - } - elseif (strtoupper($countrycode) == "JO") + } elseif (strtoupper($countrycode) == "JO") {//Jordanie if (dol_strlen($phone) == 12) {//ex: +962_A_BCD_EF_GH $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 1).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2); } - } - elseif (strtoupper($countrycode) == "JM") + } elseif (strtoupper($countrycode) == "JM") {//Jamaïque if (dol_strlen($newphone) == 12) {//ex: +1867_ABC_DEFG $newphone = substr($newphone, 0, 5).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 8, 4); } - } - elseif (strtoupper($countrycode) == "MG") + } elseif (strtoupper($countrycode) == "MG") {//Madagascar if (dol_strlen($phone) == 13) {//ex: +261_AB_CD_EF_GHI $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 2).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 3); } - } - elseif (strtoupper($countrycode) == "GB") + } elseif (strtoupper($countrycode) == "GB") {//Royaume uni if (dol_strlen($phone) == 13) {//ex: +44_ABCD_EFG_HIJ $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 4).$separ.substr($newphone, 7, 3).$separ.substr($newphone, 10, 3); } - } - elseif (strtoupper($countrycode) == "CH") + } elseif (strtoupper($countrycode) == "CH") {//Suisse if (dol_strlen($phone) == 12) {//ex: +41_AB_CDE_FG_HI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 8, 2).$separ.substr($newphone, 10, 2); - } - elseif (dol_strlen($phone) == 15) + } elseif (dol_strlen($phone) == 15) {// +41_AB_CDE_FGH_IJKL $newphone = $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 2).$separ.substr($newphone, 5, 3).$separ.substr($newphone, 8, 3).$separ.substr($newphone, 11, 4); } - } - elseif (strtoupper($countrycode) == "TN") + } elseif (strtoupper($countrycode) == "TN") {//Tunisie if (dol_strlen($phone) == 12) {//ex: +216_AB_CDE_FGH $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 2).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 3); } - } - elseif (strtoupper($countrycode) == "GF") + } elseif (strtoupper($countrycode) == "GF") {//Guyane francaise if (dol_strlen($phone) == 13) {//ex: +594_ABC_DE_FG_HI (ABC=594 de nouveau) $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2).$separ.substr($newphone, 11, 2); } - } - elseif (strtoupper($countrycode) == "GP") + } elseif (strtoupper($countrycode) == "GP") {//Guadeloupe if (dol_strlen($phone) == 13) {//ex: +590_ABC_DE_FG_HI (ABC=590 de nouveau) $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2).$separ.substr($newphone, 11, 2); } - } - elseif (strtoupper($countrycode) == "MQ") + } elseif (strtoupper($countrycode) == "MQ") {//Martinique if (dol_strlen($phone) == 13) {//ex: +596_ABC_DE_FG_HI (ABC=596 de nouveau) $newphone = substr($newphone, 0, 4).$separ.substr($newphone, 4, 3).$separ.substr($newphone, 7, 2).$separ.substr($newphone, 9, 2).$separ.substr($newphone, 11, 2); } - } - elseif (strtoupper($countrycode) == "IT") + } elseif (strtoupper($countrycode) == "IT") {//Italie if (dol_strlen($phone) == 12) {//ex: +39_ABC_DEF_GHI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 3); - } - elseif (dol_strlen($phone) == 13) + } elseif (dol_strlen($phone) == 13) {//ex: +39_ABC_DEF_GH_IJ $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 3).$separ.substr($newphone, 6, 3).$separ.substr($newphone, 9, 2).$separ.substr($newphone, 11, 2); } - } - elseif (strtoupper($countrycode) == "AU") + } elseif (strtoupper($countrycode) == "AU") { - //Australie + //Australie if (dol_strlen($phone) == 12) { - //ex: +61_A_BCDE_FGHI + //ex: +61_A_BCDE_FGHI $newphone = substr($newphone, 0, 3).$separ.substr($newphone, 3, 1).$separ.substr($newphone, 4, 4).$separ.substr($newphone, 8, 4); } } @@ -2699,8 +2688,7 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli $newphoneform = $newphone; $newphone = ''; - } - elseif (!empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url + } elseif (!empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url { if (empty($user->clicktodial_loaded)) $user->fetch_clicktodial(); @@ -2753,9 +2741,9 @@ function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addli if ($withpicto) { if ($withpicto == 'fax') { $picto = 'phoning_fax'; - }elseif ($withpicto == 'phone') { + } elseif ($withpicto == 'phone') { $picto = 'phoning'; - }elseif ($withpicto == 'mobile') { + } elseif ($withpicto == 'mobile') { $picto = 'phoning_mobile'; } else { $picto = ''; @@ -2794,11 +2782,8 @@ function dol_print_ip($ip, $mode = 0) if (file_exists(DOL_DOCUMENT_ROOT.'/theme/common/flags/'.$countrycode.'.png')) { $ret .= ' '.img_picto($countrycode.' '.$langs->trans("AccordingToGeoIPDatabase"), DOL_URL_ROOT.'/theme/common/flags/'.$countrycode.'.png', '', 1); - } - else $ret .= ' ('.$countrycode.')'; - } - else - { + } else $ret .= ' ('.$countrycode.')'; + } else { // Nothing } } @@ -2816,7 +2801,15 @@ function dol_print_ip($ip, $mode = 0) */ function getUserRemoteIP() { - $ip = empty($_SERVER['HTTP_X_FORWARDED_FOR']) ? (empty($_SERVER['HTTP_CLIENT_IP']) ? (empty($_SERVER['REMOTE_ADDR']) ? '' : $_SERVER['REMOTE_ADDR']) : $_SERVER['HTTP_CLIENT_IP']) : $_SERVER['HTTP_X_FORWARDED_FOR']; + if (empty($_SERVER['HTTP_X_FORWARDED_FOR']) || preg_match('/[^0-9\.\:,\[\]]/', $_SERVER['HTTP_X_FORWARDED_FOR'])) { + if (empty($_SERVER['HTTP_CLIENT_IP']) || preg_match('/[^0-9\.\:,\[\]]/', $_SERVER['HTTP_CLIENT_IP'])) { + $ip = (empty($_SERVER['REMOTE_ADDR']) ? '' : $_SERVER['REMOTE_ADDR']); + } else { + $ip = $_SERVER['HTTP_CLIENT_IP']; // value is clean here + } + } else { + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; // value is clean here + } return $ip; } @@ -3020,20 +3013,14 @@ function dol_substr($string, $start, $length, $stringencoding = '', $trunconbyte if (function_exists('mb_substr')) { $ret = mb_substr($string, $start, $length, $stringencoding); - } - else - { + } else { $ret = substr($string, $start, $length); } - } - else - { + } else { if (function_exists('mb_strcut')) { $ret = mb_strcut($string, $start, $length, $stringencoding); - } - else - { + } else { $ret = substr($string, $start, $length); } } @@ -3070,11 +3057,9 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF $newstring = dol_textishtml($string) ?dol_string_nohtmltag($string, 1) : $string; if (dol_strlen($newstring, $stringencoding) > ($size + ($nodot ? 0 : 3))) // If nodot is 0 and size is 1,2 or 3 chars more, we don't trunc and don't add ... return dol_substr($newstring, 0, $size, $stringencoding).($nodot ? '' : '...'); - else - //return 'u'.$size.'-'.$newstring.'-'.dol_strlen($newstring,$stringencoding).'-'.$string; + else //return 'u'.$size.'-'.$newstring.'-'.dol_strlen($newstring,$stringencoding).'-'.$string; return $string; - } - elseif ($trunc == 'middle') + } elseif ($trunc == 'middle') { $newstring = dol_textishtml($string) ?dol_string_nohtmltag($string, 1) : $string; if (dol_strlen($newstring, $stringencoding) > 2 && dol_strlen($newstring, $stringencoding) > ($size + 1)) @@ -3082,27 +3067,20 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF $size1 = round($size / 2); $size2 = round($size / 2); return dol_substr($newstring, 0, $size1, $stringencoding).'...'.dol_substr($newstring, dol_strlen($newstring, $stringencoding) - $size2, $size2, $stringencoding); - } - else - return $string; - } - elseif ($trunc == 'left') + } else return $string; + } elseif ($trunc == 'left') { $newstring = dol_textishtml($string) ?dol_string_nohtmltag($string, 1) : $string; if (dol_strlen($newstring, $stringencoding) > ($size + ($nodot ? 0 : 3))) // If nodot is 0 and size is 1,2 or 3 chars more, we don't trunc and don't add ... return '...'.dol_substr($newstring, dol_strlen($newstring, $stringencoding) - $size, $size, $stringencoding); - else - return $string; - } - elseif ($trunc == 'wrap') + else return $string; + } elseif ($trunc == 'wrap') { $newstring = dol_textishtml($string) ?dol_string_nohtmltag($string, 1) : $string; if (dol_strlen($newstring, $stringencoding) > ($size + 1)) return dol_substr($newstring, 0, $size, $stringencoding)."\n".dol_trunc(dol_substr($newstring, $size, dol_strlen($newstring, $stringencoding) - $size, $stringencoding), $size, $trunc); - else - return $string; - } - else return 'BadParam3CallingDolTrunc'; + else return $string; + } else return 'BadParam3CallingDolTrunc'; } /** @@ -3142,113 +3120,112 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ $fullpathpicto = $picto; $reg = array(); if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) { - $morecss .= ($morecss ? ' ' : '').$reg[1]; - $moreatt = str_replace('class="'.$reg[1].'"', '', $moreatt); + $morecss .= ($morecss ? ' ' : '').$reg[1]; + $moreatt = str_replace('class="'.$reg[1].'"', '', $moreatt); } } else { $pictowithouttext = preg_replace('/(\.png|\.gif|\.svg)$/', '', $picto); - - if (empty($srconly) && in_array($pictowithouttext, array( - '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', - 'accountancy', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', - 'cash-register', 'category', 'check', 'close_title', 'company', 'contact', 'contract', 'cubes', - 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'external-link-alt', 'external-link-square-alt', - 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'help', - 'intervention', 'label', 'language', 'list', 'listlight', 'lot', - 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', - 'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', - 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', - 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', - 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', - 'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label', - 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', - 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', - 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', - 'object_shipment', 'object_supplier_invoice', 'object_supplier_invoicea', 'object_supplier_invoiced', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', - 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', - 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', - 'off', 'on', 'order', - 'paiment', 'play', 'playdisabled', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', - 'setup', 'sign-out', 'split', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', + if (empty($srconly) && in_array($pictowithouttext, array( + '1downarrow', '1uparrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected', + 'accountancy', 'account', 'accountline', 'action', 'add', 'address', 'bank_account', 'barcode', 'bank', 'bill', 'bookmark', 'bom', 'building', + 'cash-register', 'category', 'check', 'clock', 'close_title', 'company', 'contact', 'contract', 'cubes', + 'delete', 'dolly', 'dollyrevert', 'edit', 'ellipsis-h', 'email', 'external-link-alt', 'external-link-square-alt', + 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', + 'help', 'holiday', + 'intervention', 'label', 'language', 'list', 'listlight', 'lot', + 'map-marker-alt', 'money-bill-alt', 'mrp', 'note', 'next', + 'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', + 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', + 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', + 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', + 'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label', + 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', + 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', + 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', + 'object_recruitmentjobposition', 'object_recruitmentcandidature', + 'object_shipment', 'object_share-alt', 'object_supplier_invoice', 'object_supplier_invoicea', 'object_supplier_invoiced', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', + 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', + 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', + 'off', 'on', 'order', + 'paiment', 'play', 'playdisabled', 'previous', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', + 'setup', 'share-alt', 'sign-out', 'split', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', - 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', - 'home', 'hrm', 'companies', 'products', 'commercial', 'invoicing', 'pencil-ruler', 'preview', 'project', 'projectpub', 'supplier_invoice', 'members', 'ticket', 'generic', - 'error', 'warning', 'supplier_proposal', 'supplier_order', 'supplier_invoice', - 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda' + 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies', + 'generic', 'home', 'hrm', 'members', 'products', 'invoicing', + 'payment', 'pencil-ruler', 'preview', 'project', 'projectpub', 'refresh', 'supplier_invoice', 'ticket', + 'error', 'warning', + 'recruitmentcandidature', 'recruitmentjobposition', 'resource', + 'supplier_proposal', 'supplier_order', 'supplier_invoice', + 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda' ) )) { $fakey = $pictowithouttext; $facolor = ''; $fasize = ''; $fa = 'fas'; - if (in_array($pictowithouttext, array('object_generic', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) { + if (in_array($pictowithouttext, array('clock', 'object_generic', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) { $fa = 'far'; } - if (in_array($pictowithouttext, array('skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'stripe-s', 'youtube', 'google-plus-g', 'whatsapp'))) { + if (in_array($pictowithouttext, array('black-tie', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'stripe-s', 'youtube', 'google-plus-g', 'whatsapp'))) { $fa = 'fab'; } $pictowithouttext = str_replace('object_', '', $pictowithouttext); - $arrayconvpictotofa = array( - 'account'=>'university', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'address'=> 'address-book', - 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'supplier_invoicea'=>'file-excel', 'billd'=>'file-medical', 'supplier_invoiced'=>'file-medical', 'bom'=>'cubes', - 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', - 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', - 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', - 'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', - 'email'=>'at', - 'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'info-circle', - 'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', - 'member'=>'users', 'mrp'=>'cubes', 'trip'=>'wallet', 'group'=>'users', - 'sign-out'=>'sign-out-alt', - 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star', - 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter', - 'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table', - 'intervention'=>'ambulance', 'invoice'=>'file-invoice-dollar', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice', - 'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', - 'other'=>'square', - 'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', + $arrayconvpictotofa = array( + 'account'=>'university', 'accountline'=>'receipt', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'add'=>'plus-circle', 'address'=> 'address-book', + 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'supplier_invoicea'=>'file-excel', 'billd'=>'file-medical', 'supplier_invoiced'=>'file-medical', 'bom'=>'cubes', + 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'conversation'=>'comments', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', + 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', + 'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly', + 'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', + 'email'=>'at', + 'edit'=>'pencil-alt', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle', + 'generic'=>'file', 'holiday'=>'umbrella-beach', 'label'=>'layer-group', + 'member'=>'users', 'mrp'=>'cubes', 'next'=>'arrow-alt-circle-right', + 'trip'=>'wallet', 'group'=>'users', + 'sign-out'=>'sign-out-alt', + 'switch_off'=>'toggle-off', 'switch_on'=>'toggle-on', 'check'=>'check', 'bookmark'=>'star', 'bookmark'=>'star', + 'bank'=>'university', 'close_title'=>'window-close', 'delete'=>'trash', 'edit'=>'pencil-alt', 'filter'=>'filter', + 'list-alt'=>'list-alt', 'calendar'=>'calendar-alt', 'calendarweek'=>'calendar-week', 'calendarmonth'=>'calendar-alt', 'calendarday'=>'calendar-day', 'calendarperuser'=>'table', + 'intervention'=>'ambulance', 'invoice'=>'file-invoice-dollar', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice', + 'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', + 'other'=>'square', + 'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', + 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge', 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', - 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', - 'resource'=>'laptop-house', - 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', - 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', - 'title_agenda'=>'calendar-alt', - 'uparrow'=>'mail-forward', 'vcard'=>'address-card', - 'jabber'=>'comment-o', - 'website'=>'globe-americas' - ); + 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', + 'refresh'=>'redo', 'resource'=>'laptop-house', + 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', + 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', + 'title_agenda'=>'calendar-alt', + 'uparrow'=>'mail-forward', 'vcard'=>'address-card', + 'jabber'=>'comment-o', + 'website'=>'globe-americas' + ); if ($pictowithouttext == 'off') { - $fakey = 'fa-square'; + $fakey = 'fa-square'; $fasize = '1.3em'; - } - elseif ($pictowithouttext == 'on') { - $fakey = 'fa-check-square'; + } elseif ($pictowithouttext == 'on') { + $fakey = 'fa-check-square'; $fasize = '1.3em'; - } - elseif ($pictowithouttext == 'listlight') { + } elseif ($pictowithouttext == 'listlight') { $fakey = 'fa-download'; $marginleftonlyshort = 1; - } - elseif ($pictowithouttext == 'printer') { + } elseif ($pictowithouttext == 'printer') { $fakey = 'fa-print'; $fasize = '1.2em'; - } - elseif ($pictowithouttext == 'note') { - $fakey = 'fa-sticky-note'; + } elseif ($pictowithouttext == 'note') { + $fakey = 'fa-sticky-note'; $marginleftonlyshort = 1; - } - elseif (in_array($pictowithouttext, array('1uparrow', '1downarrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected'))) { - $convertarray = array('1uparrow'=>'caret-up', '1downarrow'=>'caret-down', '1leftarrow'=>'caret-left', '1rightarrow'=>'caret-right', '1uparrow_selected'=>'caret-up', '1downarrow_selected'=>'caret-down', '1leftarrow_selected'=>'caret-left', '1rightarrow_selected'=>'caret-right'); - $fakey = 'fa-'.$convertarray[$pictowithouttext]; - if (preg_match('/selected/', $pictowithouttext)) $facolor = '#888'; + } elseif (in_array($pictowithouttext, array('1uparrow', '1downarrow', '1leftarrow', '1rightarrow', '1uparrow_selected', '1downarrow_selected', '1leftarrow_selected', '1rightarrow_selected'))) { + $convertarray = array('1uparrow'=>'caret-up', '1downarrow'=>'caret-down', '1leftarrow'=>'caret-left', '1rightarrow'=>'caret-right', '1uparrow_selected'=>'caret-up', '1downarrow_selected'=>'caret-down', '1leftarrow_selected'=>'caret-left', '1rightarrow_selected'=>'caret-right'); + $fakey = 'fa-'.$convertarray[$pictowithouttext]; + if (preg_match('/selected/', $pictowithouttext)) $facolor = '#888'; $marginleftonlyshort = 1; - } - elseif (!empty($arrayconvpictotofa[$pictowithouttext])) + } elseif (!empty($arrayconvpictotofa[$pictowithouttext])) { $fakey = 'fa-'.$arrayconvpictotofa[$pictowithouttext]; - } - else { + } else { $fakey = 'fa-'.$pictowithouttext; } @@ -3264,7 +3241,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // Add CSS $arrayconvpictotomorcess = array( - 'action'=>'infobox-action', 'account'=>'infobox-bank_account', 'accountancy'=>'infobox-bank_account', + 'action'=>'infobox-action', 'account'=>'infobox-bank_account', 'accountline'=>'infobox-bank_account', 'accountancy'=>'infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'bill'=>'infobox-commande', 'billa'=>'infobox-commande', 'billd'=>'infobox-commande', 'cash-register'=>'infobox-bank_account', 'contract'=>'infobox-contrat', 'check'=>'font-status4', 'conversation'=>'infobox-contrat', @@ -3277,6 +3254,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4', 'holiday'=>'infobox-holiday', 'invoice'=>'infobox-commande', 'payment'=>'infobox-bank_account', 'poll'=>'infobox-adherent', 'project'=>'infobox-project', 'projecttask'=>'infobox-project', 'propal'=>'infobox-propal', + 'recruitmentjobposition'=>'infobox-adherent', 'recruitmentcandidature'=>'infobox-adherent', 'resource'=>'infobox-action', 'supplier_invoice'=>'infobox-order_supplier', 'supplier_invoicea'=>'infobox-order_supplier', 'supplier_invoiced'=>'infobox-order_supplier', 'supplier_order'=>'infobox-order_supplier', 'supplier_proposal'=>'infobox-supplier_proposal', @@ -3290,9 +3268,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ // Define $color $arrayconvpictotocolor = array( - 'address'=>'#37a', 'building'=>'#37a', 'bom'=>'#a69944', - 'companies'=>'#37a', 'company'=>'#37a', 'contact'=>'#37a', 'dynamicprice'=>'#a69944', - 'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'listlight'=>'#999', + 'address'=>'#6c6aa8', 'building'=>'#6c6aa8', 'bom'=>'#a69944', + 'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#37a', 'dynamicprice'=>'#a69944', + 'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'help'=>'#bbb', 'listlight'=>'#999', 'dolly'=>'#a69944', 'dollyrevert'=>'#a69944', 'lot'=>'#a69944', 'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'stock'=>'#a69944', 'other'=>'#ddd', @@ -3305,20 +3283,20 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ } // This snippet only needed since function img_edit accepts only one additional parameter: no separate one for css only. - // class/style need to be extracted to avoid duplicate class/style validation errors when $moreatt is added to the end of the attributes. - $reg = array(); + // class/style need to be extracted to avoid duplicate class/style validation errors when $moreatt is added to the end of the attributes. + $reg = array(); if (preg_match('/class="([^"]+)"/', $moreatt, $reg)) { - $morecss .= ($morecss ? ' ' : '').$reg[1]; - $moreatt = str_replace('class="'.$reg[1].'"', '', $moreatt); - } - if (preg_match('/style="([^"]+)"/', $moreatt, $reg)) { - $morestyle = ' '.$reg[1]; - $moreatt = str_replace('style="'.$reg[1].'"', '', $moreatt); - } - $moreatt = trim($moreatt); + $morecss .= ($morecss ? ' ' : '').$reg[1]; + $moreatt = str_replace('class="'.$reg[1].'"', '', $moreatt); + } + if (preg_match('/style="([^"]+)"/', $moreatt, $reg)) { + $morestyle = ' '.$reg[1]; + $moreatt = str_replace('style="'.$reg[1].'"', '', $moreatt); + } + $moreatt = trim($moreatt); - $enabledisablehtml = ''; + $enabledisablehtml = ''; if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $enabledisablehtml .= $titlealt; } @@ -3329,11 +3307,9 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ if (!empty($conf->global->MAIN_OVERWRITE_THEME_PATH)) { $path = $conf->global->MAIN_OVERWRITE_THEME_PATH.'/theme/'.$theme; // If the theme does not have the same name as the module - } - elseif (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { + } elseif (!empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path = $conf->global->MAIN_OVERWRITE_THEME_RES.'/theme/'.$conf->global->MAIN_OVERWRITE_THEME_RES; // To allow an external module to overwrite image resources whatever is activated theme - } - elseif (!empty($conf->modules_parts['theme']) && array_key_exists($theme, $conf->modules_parts['theme'])) { + } elseif (!empty($conf->modules_parts['theme']) && array_key_exists($theme, $conf->modules_parts['theme'])) { $path = $theme.'/theme/'.$theme; // If the theme have the same name as the module } @@ -3369,7 +3345,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ return $fullpathpicto; } // tag title is used for tooltip on , tag alt can be used with very simple text on image for blind people - return ''.dol_escape_htmltag($alt).''; // Alt is used for accessibility, title for popup + return ''.dol_escape_htmltag($alt).''; // Alt is used for accessibility, title for popup } /** @@ -3406,13 +3382,13 @@ function img_weather($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $mo { global $conf; - if (is_numeric($picto)) - { - $leveltopicto = array(0=>'weather-clear.png', 1=>'weather-few-clouds.png', 2=>'weather-clouds.png', 3=>'weather-many-clouds.png', 4=>'weather-storm.png'); - //return ''; - $picto = $leveltopicto[$picto]; + if (is_numeric($picto)) { + //$leveltopicto = array(0=>'weather-clear.png', 1=>'weather-few-clouds.png', 2=>'weather-clouds.png', 3=>'weather-many-clouds.png', 4=>'weather-storm.png'); + //$picto = $leveltopicto[$picto]; + return ''; + } elseif (!preg_match('/(\.png|\.gif)$/i', $picto)) { + $picto .= '.png'; } - elseif (!preg_match('/(\.png|\.gif)$/i', $picto)) $picto .= '.png'; $path = DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/weather/'.$picto; @@ -3436,8 +3412,7 @@ function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0 if (!preg_match('/(\.png|\.gif)$/i', $picto)) $picto .= '.png'; if ($pictoisfullpath) $path = $picto; - else - { + else { $path = DOL_URL_ROOT.'/theme/common/'.$picto; if (!empty($conf->global->MAIN_MODULE_CAN_OVERWRITE_COMMONICONS)) @@ -3456,24 +3431,42 @@ function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0 * * @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title. * @param string $numaction Action id or code to show + * @param string $picto Name of image file to show ('filenew', ...) + * If no extension provided, we use '.png'. Image must be stored into theme/xxx/img directory. + * Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img + * Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img + * Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1) * @return string Return an img tag */ -function img_action($titlealt, $numaction) +function img_action($titlealt, $numaction, $picto = '') { global $langs; if (empty($titlealt) || $titlealt == 'default') { - if ($numaction == '-1' || $numaction == 'ST_NO') { $numaction = -1; $titlealt = $langs->transnoentitiesnoconv('ChangeDoNotContact'); } - elseif ($numaction == '0' || $numaction == 'ST_NEVER') { $numaction = 0; $titlealt = $langs->transnoentitiesnoconv('ChangeNeverContacted'); } - elseif ($numaction == '1' || $numaction == 'ST_TODO') { $numaction = 1; $titlealt = $langs->transnoentitiesnoconv('ChangeToContact'); } - elseif ($numaction == '2' || $numaction == 'ST_PEND') { $numaction = 2; $titlealt = $langs->transnoentitiesnoconv('ChangeContactInProcess'); } - elseif ($numaction == '3' || $numaction == 'ST_DONE') { $numaction = 3; $titlealt = $langs->transnoentitiesnoconv('ChangeContactDone'); } - else { $titlealt = $langs->transnoentitiesnoconv('ChangeStatus '.$numaction); $numaction = 0; } + if ($numaction == '-1' || $numaction == 'ST_NO') { + $numaction = -1; + $titlealt = $langs->transnoentitiesnoconv('ChangeDoNotContact'); + } elseif ($numaction == '0' || $numaction == 'ST_NEVER') { + $numaction = 0; + $titlealt = $langs->transnoentitiesnoconv('ChangeNeverContacted'); + } elseif ($numaction == '1' || $numaction == 'ST_TODO') { + $numaction = 1; + $titlealt = $langs->transnoentitiesnoconv('ChangeToContact'); + } elseif ($numaction == '2' || $numaction == 'ST_PEND') { + $numaction = 2; + $titlealt = $langs->transnoentitiesnoconv('ChangeContactInProcess'); + } elseif ($numaction == '3' || $numaction == 'ST_DONE') { + $numaction = 3; + $titlealt = $langs->transnoentitiesnoconv('ChangeContactDone'); + } else { + $titlealt = $langs->transnoentitiesnoconv('ChangeStatus '.$numaction); + $numaction = 0; + } } if (!is_numeric($numaction)) $numaction = 0; - return img_picto($titlealt, 'stcomm'.$numaction.'.png'); + return img_picto($titlealt, !empty($picto) ? $picto : 'stcomm'.$numaction.'.png'); } /** @@ -3754,7 +3747,9 @@ function img_left($titlealt = 'default', $selected = 0, $moreatt = '') { global $langs; - if ($titlealt == 'default') $titlealt = $langs->trans('Left'); + if ($titlealt == 'default') { + $titlealt = $langs->trans('Left'); + } return img_picto($titlealt, ($selected ? '1leftarrow_selected.png' : '1leftarrow.png'), $moreatt); } @@ -3797,21 +3792,29 @@ function img_allow($allow, $titlealt = 'default') /** * Return image of a credit card according to its brand name * - * @param string $brand Brand name of credit card - * @param string $morecss More CSS + * @param string $brand Brand name of credit card + * @param string $morecss More CSS * @return string Return img tag */ function img_credit_card($brand, $morecss = null) { if (is_null($morecss)) $morecss = 'fa-2x'; - if ($brand == 'visa' || $brand == 'Visa') {$brand = 'cc-visa'; } - elseif ($brand == 'mastercard' || $brand == 'MasterCard') {$brand = 'cc-mastercard'; } - elseif ($brand == 'amex' || $brand == 'American Express') {$brand = 'cc-amex'; } - elseif ($brand == 'discover' || $brand == 'Discover') {$brand = 'cc-discover'; } - elseif ($brand == 'jcb' || $brand == 'JCB') {$brand = 'cc-jcb'; } - elseif ($brand == 'diners' || $brand == 'Diners club') {$brand = 'cc-diners-club'; } - elseif (!in_array($brand, array('cc-visa', 'cc-mastercard', 'cc-amex', 'cc-discover', 'cc-jcb', 'cc-diners-club'))) {$brand = 'credit-card'; } + if ($brand == 'visa' || $brand == 'Visa') { + $brand = 'cc-visa'; + } elseif ($brand == 'mastercard' || $brand == 'MasterCard') { + $brand = 'cc-mastercard'; + } elseif ($brand == 'amex' || $brand == 'American Express') { + $brand = 'cc-amex'; + } elseif ($brand == 'discover' || $brand == 'Discover') { + $brand = 'cc-discover'; + } elseif ($brand == 'jcb' || $brand == 'JCB') { + $brand = 'cc-jcb'; + } elseif ($brand == 'diners' || $brand == 'Diners club') { + $brand = 'cc-diners-club'; + } elseif (!in_array($brand, array('cc-visa', 'cc-mastercard', 'cc-amex', 'cc-discover', 'cc-jcb', 'cc-diners-club'))) { + $brand = 'credit-card'; + } return ''; } @@ -3899,15 +3902,14 @@ function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss if ($infoonimgalt) { $result = img_picto($text, 'info', 'class="hideonsmartphone'.($morecss ? ' '.$morecss : '').'"'); - } - else { + } else { if (empty($conf->use_javascript_ajax)) $textfordropdown = ''; $class = (empty($admin) ? 'undefined' : ($admin == '1' ? 'info' : $admin)); $result = ($nodiv ? '' : '
').' '.$text.($nodiv ? '' : '
'); if ($textfordropdown) { - $tmpresult .= ''.$langs->trans($textfordropdown).' '.img_picto($langs->trans($textfordropdown), '1downarrow').''; + $tmpresult .= ''.$langs->trans($textfordropdown).' '.img_picto($langs->trans($textfordropdown), '1downarrow').''; $tmpresult .= ''; - } - else - { + } else { $return = $out; } } @@ -6930,8 +6868,7 @@ function dol_htmloutput_mesg($mesgstring = '', $mesgarray = array(), $style = 'o if ($val && preg_match('/class="error"/i', $val)) { $iserror++; break; } if ($val && preg_match('/class="warning"/i', $val)) { $iswarning++; break; } } - } - elseif ($mesgstring && preg_match('/class="error"/i', $mesgstring)) $iserror++; + } elseif ($mesgstring && preg_match('/class="error"/i', $mesgstring)) $iserror++; elseif ($mesgstring && preg_match('/class="warning"/i', $mesgstring)) $iswarning++; if ($style == 'error') $iserror++; if ($style == 'warning') $iswarning++; @@ -6954,17 +6891,14 @@ function dol_htmloutput_mesg($mesgstring = '', $mesgarray = array(), $style = 'o $tmpmesgstring = preg_replace('/
/', '', $tmpmesgstring); $tmpmesgstring = preg_replace('/<\/div>/', '', $tmpmesgstring); $newmesgarray[] = $tmpmesgstring; - } - else - { + } else { dol_syslog("Error call of dol_htmloutput_mesg with an array with a value that is not a string", LOG_WARNING); } } $mesgarray = $newmesgarray; } print get_htmloutput_mesg($mesgstring, $mesgarray, ($iserror ? 'error' : 'warning'), $keepembedded); - } - else print get_htmloutput_mesg($mesgstring, $mesgarray, 'ok', $keepembedded); + } else print get_htmloutput_mesg($mesgstring, $mesgarray, 'ok', $keepembedded); } /** @@ -7012,19 +6946,17 @@ function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sen if (is_object($array[$key])) { $temp[$key] = $array[$key]->$index; - } - else - { + } else { $temp[$key] = $array[$key][$index]; } } - if (!$natsort) { - ($order == 'asc') ? asort($temp) : arsort($temp); - } else { - ($case_sensitive) ? natsort($temp) : natcasesort($temp); - if ($order != 'asc') $temp = array_reverse($temp, true); - } + if (!$natsort) { + ($order == 'asc') ? asort($temp) : arsort($temp); + } else { + ($case_sensitive) ? natsort($temp) : natcasesort($temp); + if ($order != 'asc') $temp = array_reverse($temp, true); + } $sorted = array(); @@ -7149,9 +7081,7 @@ function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = else $cache_codes[$tablename][$key][$fieldid] = ''; $db->free($resql); return $cache_codes[$tablename][$key][$fieldid]; - } - else - { + } else { return -1; } } @@ -7185,7 +7115,7 @@ function verifCond($strRights) * @param string $s String to evaluate * @param int $returnvalue 0=No return (used to execute eval($a=something)). 1=Value of eval is returned (used to eval($something)). * @param int $hideerrors 1=Hide errors - * @return mixed Nothing or return of eval + * @return mixed Nothing or return result of eval */ function dol_eval($s, $returnvalue = 0, $hideerrors = 1) { @@ -7204,9 +7134,7 @@ function dol_eval($s, $returnvalue = 0, $hideerrors = 1) { if ($hideerrors) return @eval('return '.$s.';'); else return eval('return '.$s.';'); - } - else - { + } else { if ($hideerrors) @eval($s); else eval($s); } @@ -7250,8 +7178,7 @@ function picto_from_langcode($codelang, $moreatt = '') ); if (isset($langtocountryflag[$codelang])) $flagImage = $langtocountryflag[$codelang]; - else - { + else { $tmparray = explode('_', $codelang); $flagImage = empty($tmparray[1]) ? $tmparray[0] : $tmparray[1]; } @@ -7459,20 +7386,18 @@ function getLanguageCodeFromCountryCode($countrycode) if (function_exists('locale_get_primary_language') && function_exists('locale_get_region')) // Need extension php-intl { - foreach ($locales as $locale) - { - $locale_language = locale_get_primary_language($locale); - $locale_region = locale_get_region($locale); - if (strtoupper($countrycode) == $locale_region) - { - //var_dump($locale.'-'.$locale_language.'-'.$locale_region); - return strtolower($locale_language).'_'.strtoupper($locale_region); - } - } - } - else - { - dol_syslog("Warning Exention php-intl is not available", LOG_WARNING); + foreach ($locales as $locale) + { + $locale_language = locale_get_primary_language($locale); + $locale_region = locale_get_region($locale); + if (strtoupper($countrycode) == $locale_region) + { + //var_dump($locale.'-'.$locale_language.'-'.$locale_region); + return strtolower($locale_language).'_'.strtoupper($locale_region); + } + } + } else { + dol_syslog("Warning Exention php-intl is not available", LOG_WARNING); } return null; @@ -7531,16 +7456,14 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $substitutionarray = array(); complete_substitutions_array($substitutionarray, $langs, $object, array('needforkey'=>$values[2])); $label = make_substitutions($reg[1], $substitutionarray); - } - else $label = $langs->trans($values[2]); + } else $label = $langs->trans($values[2]); $head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', ((is_object($object) && !empty($object->id)) ? $object->id : ''), $values[5]), 1); $head[$h][1] = $label; $head[$h][2] = str_replace('+', '', $values[1]); $h++; } - } - elseif (count($values) == 5) // deprecated + } elseif (count($values) == 5) // deprecated { dol_syslog('Passing 5 values in tabs module_parts is deprecated. Please update to 6 with permissions.', LOG_WARNING); @@ -7551,16 +7474,14 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $substitutionarray = array(); complete_substitutions_array($substitutionarray, $langs, $object, array('needforkey'=>$values[2])); $label = make_substitutions($reg[1], $substitutionarray); - } - else $label = $langs->trans($values[2]); + } else $label = $langs->trans($values[2]); $head[$h][0] = dol_buildpath(preg_replace('/__ID__/i', ((is_object($object) && !empty($object->id)) ? $object->id : ''), $values[4]), 1); $head[$h][1] = $label; $head[$h][2] = str_replace('+', '', $values[1]); $h++; } - } - elseif ($mode == 'remove' && preg_match('/^\-/', $values[1])) + } elseif ($mode == 'remove' && preg_match('/^\-/', $values[1])) { if ($values[0] != $type) continue; $tabname = str_replace('-', '', $values[1]); @@ -7586,7 +7507,7 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, if ($reshook > 0) { $head = $hookmanager->resArray; - $h = count($head); + $h = count($head); } } } @@ -7665,8 +7586,7 @@ function printCommonFooter($zone = 'private') } if (!$foundintru) $qualified = 1; //var_dump($defkey.'-'.$qualified); - } - else $qualified = 1; + } else $qualified = 1; if ($qualified) { @@ -7697,8 +7617,7 @@ function printCommonFooter($zone = 'private') } if (!$foundintru) $qualified = 1; //var_dump($defkey.'-'.$qualified); - } - else $qualified = 1; + } else $qualified = 1; if ($qualified) { @@ -7750,7 +7669,7 @@ function printCommonFooter($zone = 'private') if (!empty($conf->google->enabled) && !empty($conf->global->MAIN_GOOGLE_AN_ID)) { $tmptagarray = explode(',', $conf->global->MAIN_GOOGLE_AN_ID); - foreach($tmptagarray as $tmptag) { + foreach ($tmptagarray as $tmptag) { print "\n"; print "\n"; print " @@ -7771,17 +7690,17 @@ function printCommonFooter($zone = 'private') // Add Xdebug coverage of code if (defined('XDEBUGCOVERAGE')) { - print_r(xdebug_get_code_coverage()); + print_r(xdebug_get_code_coverage()); } // Add DebugBar data - if (!empty($user->rights->debugbar->read) && is_object($debugbar)) - { - $debugbar['time']->stopMeasure('pageaftermaster'); - print ''."\n"; - print $debugbar->getRenderer()->render(); - } - elseif (count($conf->logbuffer)) // If there is some logs in buffer to show + if (!empty($user->rights->debugbar->read) && is_object($debugbar)) + { + $debugbar['time']->stopMeasure('pageaftermaster'); + print ''."\n"; + $renderer = $debugbar->getRenderer(); + print $debugbar->getRenderer()->render(); + } elseif (count($conf->logbuffer)) // If there is some logs in buffer to show { print "\n"; print "'; - print '
'; + print '
'."\n"; + if ($addformmessage) + { + print ''; + print '
'; - $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix; - if (!empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); - elseif (!empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORM)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORM); + $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix; + if (!empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); + elseif (!empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORM)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORM); - // Add other message if VAT exists - if ($object->total_vat != 0 || $object->total_tva != 0) - { - $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix; - if (!empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); - elseif (!empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT); - } - } + // Add other message if VAT exists + if ($object->total_vat != 0 || $object->total_tva != 0) + { + $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix; + if (!empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform); + elseif (!empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT); + } + } - print '

'."\n"; - print $fromcompany->name.'
'; - print $line1; - if (strlen($line1.$line2) > 50) print '
'; - else print ' - '; - print $line2; - print '
'."\n"; + print '

'."\n"; + print $fromcompany->name.'
'; + print $line1; + if (strlen($line1.$line2) > 50) print '
'; + else print ' - '; + print $line2; + print '
'."\n"; } diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index c1cd75f79cb..db79efefc45 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -11,6 +11,7 @@ * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * Copyright (C) 2015-2016 Marcos García * Copyright (C) 2019 Lenin Rivas + * Copyright (C) 2020 Nicolas ZABOURI * * 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 @@ -54,9 +55,7 @@ function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup') { include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; $pdfformat = dol_getDefaultFormat($outputlangs); - } - else - { + } else { $pdfformat = $conf->global->MAIN_PDF_FORMAT; } @@ -123,7 +122,11 @@ function pdf_getInstance($format = '', $metric = 'mm', $pagetype = 'P') define('K_SMALL_RATIO', 2 / 3); define('K_THAI_TOPCHARS', true); define('K_TCPDF_CALLS_IN_HTML', true); - define('K_TCPDF_THROW_EXCEPTION_ERROR', false); + if (!empty($conf->global->TCPDF_THROW_ERRORS_INSTEAD_OF_DIE)) { + define('K_TCPDF_THROW_EXCEPTION_ERROR', true); + } else { + define('K_TCPDF_THROW_EXCEPTION_ERROR', false); + } } // Load TCPDF @@ -267,7 +270,7 @@ function pdf_getPDFFontSize($outputlangs) function pdf_getHeightForLogo($logo, $url = false) { global $conf; - $height = (empty($conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT) ? 22 : $conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT); + $height = (empty($conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT) ? 20 : $conf->global->MAIN_DOCUMENTS_LOGO_HEIGHT); $maxwidth = 130; include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; $tmp = dol_getImageSize($logo, $url); @@ -305,9 +308,7 @@ function pdfGetHeightForHtmlContent(&$pdf, $htmlcontent) $height = 0; if ($end_page == $start_page) { $height = $end_y - $start_y; - } - else - { + } else { for ($page = $start_page; $page <= $end_page; ++$page) { $pdf->setPage($page); $tmpm = $pdf->getMargins(); @@ -482,8 +483,7 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t // Country if (!empty($targetcontact->country_code) && $targetcontact->country_code != $sourcecompany->country_code) { $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcontact->country_code)); - } - elseif (empty($targetcontact->country_code) && !empty($targetcompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) { + } elseif (empty($targetcontact->country_code) && !empty($targetcompany->country_code) && ($targetcompany->country_code != $sourcecompany->country_code)) { $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code)); } @@ -513,9 +513,7 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t if ($targetcontact->url) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("Web").": ".$outputlangs->convToOutputCharset($targetcontact->url); } } - } - else - { + } else { $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset(dol_format_address($targetcompany)); // Country if (!empty($targetcompany->country_code) && $targetcompany->country_code != $sourcecompany->country_code) $stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Country".$targetcompany->country_code)); @@ -781,7 +779,7 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, // Key $tmplength = 15; $content = $account->cle_rib; - }elseif ($val == 'IBAN' || $val == 'BIC') { + } elseif ($val == 'IBAN' || $val == 'BIC') { // Key $tmplength = 0; $content = ''; @@ -803,9 +801,7 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, $curx = $savcurx; $cury += 8; } - } - else - { + } else { $pdf->SetFont('', 'B', $default_font_size - $diffsizecontent); $pdf->SetXY($curx, $cury); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': '.$outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); @@ -840,9 +836,7 @@ function pdf_bank(&$pdf, $outputlangs, $curx, $cury, $account, $onlynumber = 0, $tmpy = $pdf->getStringHeight(100, $val); $cury += $tmpy; $cur += 1; - } - - elseif (!$usedetailedbban) $cury += 1; + } elseif (!$usedetailedbban) $cury += 1; // Use correct name of bank id according to country $ibankey = FormBank::getIBANLabel($account); @@ -1058,9 +1052,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ $width = 200; $align = 'C'; } $freetextheight = $pdf->getStringHeight($width, $line); - } - else - { + } else { $freetextheight = pdfGetHeightForHtmlContent($pdf, dol_htmlentitiesbr($line, 1, 'UTF-8', 0)); // New method (works for HTML content) //print '
'.$freetextheight;exit; } @@ -1075,9 +1067,7 @@ function pdf_pagefoot(&$pdf, $outputlangs, $paramfreetext, $fromcompany, $marge_ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) // by default { $pdf->MultiCell(0, 3, $line, 0, $align, 0); - } - else - { + } else { $pdf->writeHTMLCell($pdf->page_largeur - $pdf->margin_left - $pdf->margin_right, $freetextheight, $dims['lm'], $dims['hk'] - $marginwithfooter, dol_htmlentitiesbr($line, 1, 'UTF-8', 0)); } $posy -= $freetextheight; @@ -1244,9 +1234,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, { include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; $prodser = new ProductFournisseur($db); - } - else - { + } else { include_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; $prodser = new Product($db); } @@ -1282,8 +1270,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $textwasmodified = ($note == $prodser->note); if (!empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note = $prodser->multilangs[$outputlangs->defaultlang]["note"]; } - } - elseif ($object->element == 'facture' || $object->element == 'facturefourn') { + } elseif ($object->element == 'facture' || $object->element == 'facturefourn') { if ($object->type == $object::TYPE_DEPOSIT) { $desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc); } @@ -1306,8 +1293,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $discount->fetch($object->lines[$i]->fk_remise_except); $sourceref = !empty($discount->discount_type) ? $discount->ref_invoive_supplier_source : $discount->ref_facture_source; $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromCreditNote", $sourceref); - } - elseif ($desc == '(DEPOSIT)' && $object->lines[$i]->fk_remise_except) + } elseif ($desc == '(DEPOSIT)' && $object->lines[$i]->fk_remise_except) { $discount = new DiscountAbsolute($db); $discount->fetch($object->lines[$i]->fk_remise_except); @@ -1315,21 +1301,17 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromDeposit", $sourceref); // Add date of deposit if (!empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) $libelleproduitservice .= ' ('.dol_print_date($discount->datec, 'day', '', $outputlangs).')'; - } - elseif ($desc == '(EXCESS RECEIVED)' && $object->lines[$i]->fk_remise_except) + } elseif ($desc == '(EXCESS RECEIVED)' && $object->lines[$i]->fk_remise_except) { $discount = new DiscountAbsolute($db); $discount->fetch($object->lines[$i]->fk_remise_except); $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessReceived", $discount->ref_facture_source); - } - elseif ($desc == '(EXCESS PAID)' && $object->lines[$i]->fk_remise_except) + } elseif ($desc == '(EXCESS PAID)' && $object->lines[$i]->fk_remise_except) { $discount = new DiscountAbsolute($db); $discount->fetch($object->lines[$i]->fk_remise_except); $libelleproduitservice = $outputlangs->transnoentitiesnoconv("DiscountFromExcessPaid", $discount->ref_invoice_supplier_source); - } - else - { + } else { if ($idprod) { if (empty($hidedesc)) @@ -1337,15 +1319,15 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, if (!empty($conf->global->MAIN_DOCUMENTS_DESCRIPTION_FIRST)) { $libelleproduitservice = $desc."\n".$libelleproduitservice; - } - else - { - $libelleproduitservice .= $desc; + } else { + if (!empty($conf->global->HIDE_LABEL_VARIANT_PDF) && $prodser->isVariant()) { + $libelleproduitservice = $desc; + } else { + $libelleproduitservice .= $desc; + } } } - } - else - { + } else { $libelleproduitservice .= $desc; } } @@ -1359,9 +1341,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, if ($prodser->isService()) { $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Service")." "; - } - else - { + } else { $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Product")." "; } } @@ -1374,14 +1354,12 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, $ref_prodserv = $ref_supplier; elseif ($conf->global->PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES == 2) $ref_prodserv = $ref_supplier.' ('.$outputlangs->transnoentitiesnoconv("InternalRef").' '.$prodser->ref.')'; - else // Common case + else // Common case { $ref_prodserv = $prodser->ref; // Show local ref if ($ref_supplier) $ref_prodserv .= ($prodser->ref ? ' (' : '').$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.($prodser->ref ? ')' : ''); } - } - else - { + } else { $ref_prodserv = $prodser->ref; // Show local ref only } @@ -1942,9 +1920,7 @@ function pdf_getlineprogress($object, $i, $outputlangs, $hidedetails = 0, $hookm $prev_progress = $object->lines[$i]->get_prev_progress($object->id); } $result = ($object->lines[$i]->situation_percent - $prev_progress).'%'; - } - else - $result = $object->lines[$i]->situation_percent.'%'; + } else $result = $object->lines[$i]->situation_percent.'%'; } } return $result; @@ -1999,9 +1975,7 @@ function pdf_getlinetotalexcltax($object, $i, $outputlangs, $hidedetails = 0) $progress = ($object->lines[$i]->situation_percent - $prev_progress) / 100; } $result .= price($sign * ($total_ht / ($object->lines[$i]->situation_percent / 100)) * $progress, 0, $outputlangs); - } - else - { + } else { $result .= price($sign * $total_ht, 0, $outputlangs); } } @@ -2043,8 +2017,7 @@ function pdf_getlinetotalwithtax($object, $i, $outputlangs, $hidedetails = 0) if ($object->lines[$i]->special_code == 3) { $result .= $outputlangs->transnoentities("Option"); - } - elseif (empty($hidedetails) || $hidedetails > 1) $result .= price($sign * ($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht) * ($object->lines[$i]->tva_tx) / 100, 0, $outputlangs); + } elseif (empty($hidedetails) || $hidedetails > 1) $result .= price($sign * ($object->lines[$i]->total_ht) + ($object->lines[$i]->total_ht) * ($object->lines[$i]->tva_tx) / 100, 0, $outputlangs); } return $result; } @@ -2073,8 +2046,7 @@ function pdf_getTotalQty($object, $type, $outputlangs) if ($type == 'all') { $total += $object->lines[$i]->qty; - } - elseif ($type == 9 && is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line))) + } elseif ($type == 9 && is_object($hookmanager) && (($object->lines[$i]->product_type == 9 && !empty($object->lines[$i]->special_code)) || !empty($object->lines[$i]->fk_parent_line))) { $special_code = $object->lines[$i]->special_code; if (!empty($object->lines[$i]->fk_parent_line)) $special_code = $object->getSpecialCode($object->lines[$i]->fk_parent_line); @@ -2082,12 +2054,10 @@ function pdf_getTotalQty($object, $type, $outputlangs) $action = ''; $reshook = $hookmanager->executeHooks('pdf_getTotalQty', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks return $hookmanager->resPrint; - } - elseif ($type == 0 && $object->lines[$i]->product_type == 0) + } elseif ($type == 0 && $object->lines[$i]->product_type == 0) { $total += $object->lines[$i]->qty; - } - elseif ($type == 1 && $object->lines[$i]->product_type == 1) + } elseif ($type == 1 && $object->lines[$i]->product_type == 1) { $total += $object->lines[$i]->qty; } @@ -2118,8 +2088,7 @@ function pdf_getLinkedObjects($object, $outputlangs) if ($objecttype == 'facture') { // For invoice, we don't want to have a reference line on document. Image we are using recuring invoice, we will have a line longer than document width. - } - elseif ($objecttype == 'propal' || $objecttype == 'supplier_proposal') + } elseif ($objecttype == 'propal' || $objecttype == 'supplier_proposal') { $outputlangs->load('propal'); @@ -2130,8 +2099,7 @@ function pdf_getLinkedObjects($object, $outputlangs) $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("DatePropal"); $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date, 'day', '', $outputlangs); } - } - elseif ($objecttype == 'commande' || $objecttype == 'supplier_order') + } elseif ($objecttype == 'commande' || $objecttype == 'supplier_order') { $outputlangs->load('orders'); foreach ($objects as $elementobject) @@ -2141,8 +2109,7 @@ function pdf_getLinkedObjects($object, $outputlangs) $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("OrderDate"); $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date, 'day', '', $outputlangs); } - } - elseif ($objecttype == 'contrat') + } elseif ($objecttype == 'contrat') { $outputlangs->load('contracts'); foreach ($objects as $elementobject) @@ -2152,8 +2119,7 @@ function pdf_getLinkedObjects($object, $outputlangs) $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("DateContract"); $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->date_contrat, 'day', '', $outputlangs); } - } - elseif ($objecttype == 'fichinter') + } elseif ($objecttype == 'fichinter') { $outputlangs->load('interventions'); foreach ($objects as $elementobject) @@ -2163,8 +2129,7 @@ function pdf_getLinkedObjects($object, $outputlangs) $linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("InterDate"); $linkedobjects[$objecttype]['date_value'] = dol_print_date($elementobject->datec, 'day', '', $outputlangs); } - } - elseif ($objecttype == 'shipping') + } elseif ($objecttype == 'shipping') { $outputlangs->loadLangs(array("orders", "sendings")); @@ -2175,11 +2140,11 @@ function pdf_getLinkedObjects($object, $outputlangs) if (empty($object->linkedObjects['commande']) && $object->element != 'commande') // There is not already a link to order and object is not the order, so we show also info with order { $elementobject->fetchObjectLinked(null, '', null, '', 'OR', 1, 'sourcetype', 0); - if (! empty($elementobject->linkedObjectsIds['commande'])){ + if (!empty($elementobject->linkedObjectsIds['commande'])) { include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; $order = new Commande($db); $ret = $order->fetch(reset($elementobject->linkedObjectsIds['commande'])); - if ($ret < 1) { $order=null; } + if ($ret < 1) { $order = null; } } } if (!is_object($order)) @@ -2190,9 +2155,7 @@ function pdf_getLinkedObjects($object, $outputlangs) //$linkedobjects[$objecttype]['date_title'] = $outputlangs->transnoentities("DateShipment"); //if (! empty($linkedobjects[$objecttype]['date_value'])) $linkedobjects[$objecttype]['date_value'].=' / '; //$linkedobjects[$objecttype]['date_value'].= dol_print_date($elementobject->date_delivery,'day','',$outputlangs); - } - else - { + } else { $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefOrder").' / '.$outputlangs->transnoentities("RefSending"); if (empty($linkedobjects[$objecttype]['ref_value'])) $linkedobjects[$objecttype]['ref_value'] = $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : ''); $linkedobjects[$objecttype]['ref_value'] .= ' / '.$outputlangs->transnoentities($elementobject->ref); @@ -2238,8 +2201,7 @@ function pdf_getSizeForImage($realpath) { $width = $maxwidth; $height = (int) round($maxwidth * $tmp['height'] / $tmp['width']); - } - else // No pb with maxheight + } else // No pb with maxheight { $height = $maxheight; } @@ -2264,9 +2226,7 @@ function pdfGetLineTotalDiscountAmount($object, $i, $outputlangs, $hidedetails = if ($object->lines[$i]->special_code == 3) { return $outputlangs->transnoentities("Option"); - } - else - { + } else { if (is_object($hookmanager)) { $special_code = $object->lines[$i]->special_code; diff --git a/htdocs/core/lib/price.lib.php b/htdocs/core/lib/price.lib.php index 2cb8d8e30f6..ea80732ae41 100644 --- a/htdocs/core/lib/price.lib.php +++ b/htdocs/core/lib/price.lib.php @@ -131,8 +131,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $localtax1_rate = $localtaxes_array[1]; $localtax2_type = $localtaxes_array[2]; $localtax2_rate = $localtaxes_array[3]; - } - else // deprecated method. values and type for localtaxes must be provided by caller and loaded with getLocalTaxesFromRate using the full vat rate (including text code) + } else // deprecated method. values and type for localtaxes must be provided by caller and loaded with getLocalTaxesFromRate using the full vat rate (including text code) { dol_syslog("Price.lib::calcul_price_total search vat information using old deprecated method", LOG_WARNING); @@ -152,15 +151,13 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $localtax2_type = $obj->localtax2_type; //var_dump($localtax1_rate.' '.$localtax2_rate.' '.$localtax1_type.' '.$localtax2_type);exit; } - } - else dol_print_error($db); + } else dol_print_error($db); } // pu calculation from pu_devise if pu empty if (empty($pu) && !empty($pu_devise)) { if (!empty($multicurrency_tx)) $pu = $pu_devise / $multicurrency_tx; - else - { + else { dol_syslog('Price.lib::calcul_price_total function called with bad parameters combination (multicurrency_tx empty when pu_devise not) ', LOG_ERR); return array(); } @@ -169,8 +166,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt // pu_devise calculation from pu if (empty($pu_devise) && !empty($multicurrency_tx)) { if (is_numeric($pu) && is_numeric($multicurrency_tx)) $pu_devise = $pu * $multicurrency_tx; - else - { + else { dol_syslog('Price.lib::calcul_price_total function called with bad parameters combination (pu or multicurrency_tx are not numeric)', LOG_ERR); return array(); } @@ -192,9 +188,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $tot_sans_remise_wt = price2num($tot_sans_remise * (1 + ($txtva / 100)), 'MU'); $tot_avec_remise_wt = price2num($tot_avec_remise * (1 + ($txtva / 100)), 'MU'); $pu_wt = price2num($pu * (1 + ($txtva / 100)), 'MU'); - } - else - { + } else { $tot_sans_remise_wt = $tot_sans_remise; $tot_avec_remise_wt = $tot_avec_remise; $pu_wt = $pu; @@ -268,9 +262,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $result[5] = price2num($pu * (1 + ((($info_bits & 1) ? 0 : $txtva) / 100)) + $localtaxes[2], 'MU'); // Selon TVA NPR ou non $result5bis = price2num($pu * (1 + ($txtva / 100)) + $localtaxes[2], 'MU'); // Si TVA consideree normale (non NPR) $result[4] = price2num($result5bis - ($result[3] + $localtaxes[2]), 'MU'); - } - else - { + } else { // We work to define prices using the price with tax $result[8] = price2num($tot_sans_remise + $localtaxes[0], 'MT'); $result[6] = price2num($tot_sans_remise / (1 + ((($info_bits & 1) ? 0 : $txtva) / 100)), 'MT'); // Selon TVA NPR ou non @@ -354,9 +346,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $result[9] = round($result[9] / $conf->global->MAIN_ROUNDING_RULE_TOT, 0) * $conf->global->MAIN_ROUNDING_RULE_TOT; $result[10] = round($result[10] / $conf->global->MAIN_ROUNDING_RULE_TOT, 0) * $conf->global->MAIN_ROUNDING_RULE_TOT; $result[2] = price2num($result[0] + $result[1] + $result[9] + $result[10], 'MT'); - } - else - { + } else { $result[1] = round($result[1] / $conf->global->MAIN_ROUNDING_RULE_TOT, 0) * $conf->global->MAIN_ROUNDING_RULE_TOT; $result[2] = round($result[2] / $conf->global->MAIN_ROUNDING_RULE_TOT, 0) * $conf->global->MAIN_ROUNDING_RULE_TOT; $result[9] = round($result[9] / $conf->global->MAIN_ROUNDING_RULE_TOT, 0) * $conf->global->MAIN_ROUNDING_RULE_TOT; @@ -405,9 +395,7 @@ function calcul_price_total($qty, $pu, $remise_percent_ligne, $txtva, $uselocalt $result[24] = $newresult[8]; $result[25] = $newresult[9]; $result[26] = $newresult[10]; - } - else - { + } else { $result[16] = $result[0]; $result[17] = $result[1]; $result[18] = $result[2]; diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index a8567cd420c..dfc57313add 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -547,17 +547,14 @@ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_sho 't.rowid' => $unit, 't.active' => 1 ); - } - elseif ($scale !== '') + } elseif ($scale !== '') { $arrayforfilter = array( 't.scale' => $scale, 't.unit_type' => $measuring_style, 't.active' => 1 ); - } - else - { + } else { $arrayforfilter = array( 't.rowid' => $unit, 't.unit_type' => $measuring_style, @@ -578,8 +575,7 @@ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_sho $measuring_unit_cache[$unit.'_'.$measuring_style.'_'.$scale.'_'.$use_short_label] = $labeltoreturn; return $labeltoreturn; } - } - else { + } else { return $measuring_unit_cache[$unit.'_'.$measuring_style.'_'.$scale.'_'.$use_short_label]; } } diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index ac8530b4aa5..29a522e7335 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -30,23 +30,23 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; /** * Prepare array with list of tabs * - * @param Object $object Object related to tabs - * @return array Array of tabs to show + * @param Project $project Object related to tabs + * @return array Array of tabs to show */ -function project_prepare_head($object) +function project_prepare_head(Project $project) { global $db, $langs, $conf, $user; $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/projet/card.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/projet/card.php?id='.$project->id; $head[$h][1] = $langs->trans("Project"); $head[$h][2] = 'project'; $h++; - $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); - $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$object->id; + $nbContact = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external')); + $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$project->id; $head[$h][1] = $langs->trans("ProjectContact"); if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; $head[$h][2] = 'contact'; @@ -55,12 +55,12 @@ function project_prepare_head($object) if (empty($conf->global->PROJECT_HIDE_TASKS)) { // Then tab for sub level of projet, i mean tasks - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id; $head[$h][1] = $langs->trans("Tasks"); require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; $taskstatic = new Task($db); - $nbTasks = count($taskstatic->getTasksArray(0, 0, $object->id, 0, 0)); + $nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0)); if ($nbTasks > 0) $head[$h][1] .= ''.($nbTasks).''; $head[$h][2] = 'tasks'; $h++; @@ -71,16 +71,15 @@ function project_prepare_head($object) //$sql .= " WHERE t.fk_user = u.rowid AND t.fk_task = pt.rowid"; $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as t, ".MAIN_DB_PREFIX."projet_task as pt"; $sql .= " WHERE t.fk_task = pt.rowid"; - $sql .= " AND pt.fk_projet =".$object->id; + $sql .= " AND pt.fk_projet =".$project->id; $resql = $db->query($sql); if ($resql) { $obj = $db->fetch_object($resql); if ($obj) $nbTimeSpent = 1; - } - else dol_print_error($db); + } else dol_print_error($db); - $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.$project->id; $head[$h][1] = $langs->trans("TimeSpent"); if ($nbTimeSpent > 0) $head[$h][1] .= '...'; $head[$h][2] = 'timespent'; @@ -92,8 +91,32 @@ function project_prepare_head($object) || !empty($conf->facture->enabled) || !empty($conf->contrat->enabled) || !empty($conf->ficheinter->enabled) || !empty($conf->agenda->enabled) || !empty($conf->deplacement->enabled)) { - $head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$object->id; + $count = 0; + + if (!empty($conf->propal->enabled)) $count += $project->getElementCount('propal', 'propal'); + if (!empty($conf->commande->enabled)) $count += $project->getElementCount('order', 'commande'); + if (!empty($conf->facture->enabled)) $count += $project->getElementCount('invoice', 'facture'); + if (!empty($conf->facture->enabled)) $count += $project->getElementCount('invoice_predefined', 'facture_rec'); + if (!empty($conf->supplier_proposal->enabled)) $count += $project->getElementCount('proposal_supplier', 'supplier_proposal'); + if (!empty($conf->supplier_order->enabled)) $count += $project->getElementCount('order_supplier', 'commande_fournisseur'); + if (!empty($conf->supplier_invoice->enabled)) $count += $project->getElementCount('invoice_supplier', 'facture_fourn'); + if (!empty($conf->contrat->enabled)) $count += $project->getElementCount('contract', 'contrat'); + if (!empty($conf->ficheinter->enabled)) $count += $project->getElementCount('intervention', 'fichinter'); + if (!empty($conf->expedition->enabled)) $count += $project->getElementCount('shipping', 'expedition'); + if (!empty($conf->mrp->enabled)) $count += $project->getElementCount('mrp', 'mrp_mo', 'fk_project'); + if (!empty($conf->deplacement->enabled)) $count += $project->getElementCount('trip', 'deplacement'); + if (!empty($conf->expensereport->enabled)) $count += $project->getElementCount('expensereport', 'expensereport'); + if (!empty($conf->don->enabled)) $count += $project->getElementCount('donation', 'don'); + if (!empty($conf->loan->enabled)) $count += $project->getElementCount('loan', 'loan'); + if (!empty($conf->tax->enabled)) $count += $project->getElementCount('chargesociales', 'chargesociales'); + if (!empty($conf->projet->enabled)) $count += $project->getElementCount('project_task', 'projet_task'); + if (!empty($conf->stock->enabled)) $count += $project->getElementCount('stock_mouvement', 'stock'); + if (!empty($conf->salaries->enabled)) $count += $project->getElementCount('salaries', 'payment_salary'); + if (!empty($conf->banque->enabled)) $count += $project->getElementCount('variouspayment', 'payment_various'); + + $head[$h][0] = DOL_URL_ROOT.'/projet/element.php?id='.$project->id; $head[$h][1] = $langs->trans("ProjectOverview"); + if ($count > 0) $head[$h][1] .= ''.$count.''; $head[$h][2] = 'element'; $h++; } @@ -102,15 +125,15 @@ function project_prepare_head($object) // Entries must be declared in modules descriptor with line // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'project'); + complete_head_from_modules($conf, $langs, $project, $head, $h, 'project'); if (empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; - $head[$h][0] = DOL_URL_ROOT.'/projet/note.php?id='.$object->id; + if (!empty($project->note_private)) $nbNote++; + if (!empty($project->note_public)) $nbNote++; + $head[$h][0] = DOL_URL_ROOT.'/projet/note.php?id='.$project->id; $head[$h][1] = $langs->trans('Notes'); if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; $head[$h][2] = 'notes'; @@ -119,10 +142,10 @@ function project_prepare_head($object) require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->projet->dir_output."/".dol_sanitizeFileName($object->ref); + $upload_dir = $conf->projet->dir_output."/".dol_sanitizeFileName($project->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); - $nbLinks = Link::count($db, $object->element, $object->id); - $head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id; + $nbLinks = Link::count($db, $project->element, $project->id); + $head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$project->id; $head[$h][1] = $langs->trans('Documents'); if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; $head[$h][2] = 'document'; @@ -131,15 +154,15 @@ function project_prepare_head($object) // Manage discussion if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT)) { - $nbComments = $object->getNbComments(); - $head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$object->id; + $nbComments = $project->getNbComments(); + $head[$h][0] = DOL_URL_ROOT.'/projet/comment.php?id='.$project->id; $head[$h][1] = $langs->trans("CommentLink"); if ($nbComments > 0) $head[$h][1] .= ''.$nbComments.''; $head[$h][2] = 'project_comment'; $h++; } - $head[$h][0] = DOL_URL_ROOT.'/projet/info.php?id='.$object->id; + $head[$h][0] = DOL_URL_ROOT.'/projet/info.php?id='.$project->id; $head[$h][1] .= $langs->trans("Events"); if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) { @@ -149,7 +172,7 @@ function project_prepare_head($object) $head[$h][2] = 'agenda'; $h++; - complete_head_from_modules($conf, $langs, $object, $head, $h, 'project', 'remove'); + complete_head_from_modules($conf, $langs, $project, $head, $h, 'project', 'remove'); return $head; } @@ -191,8 +214,7 @@ function task_prepare_head($object) { $obj = $db->fetch_object($resql); if ($obj) $nbTimeSpent = 1; - } - else dol_print_error($db); + } else dol_print_error($db); $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$object->id.(GETPOST('withproject') ? '&withproject=1' : ''); $head[$h][1] = $langs->trans("TimeSpent"); @@ -418,15 +440,11 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($foundtaskforuserdeeper > 0) { $showlineingray = 1; // We will show line but in gray - } - else - { + } else { $showline = 0; // No reason to show line } } - } - else - { + } else { // Caller did not ask to filter on tasks of a specific user (this probably means he want also tasks of all users, into public project // or into all other projects if user has permission to). if (empty($user->rights->projet->all->lire)) @@ -681,9 +699,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t if ($lines[$i]->planned_workload) $total_projectlinesa_spent_if_planned += $lines[$i]->duration; if ($lines[$i]->planned_workload) $total_projectlinesa_declared_if_planned += $lines[$i]->planned_workload * $lines[$i]->progress / 100; } - } - else - { + } else { //$level--; } } @@ -1264,8 +1280,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr print '
'; print convertSecondToTime($lines[$i]->duration, 'allhourmin'); print ''; - } - else print '--:--'; + } else print '--:--'; print "\n"; // Time spent by user @@ -1379,9 +1394,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr //var_dump($totalforeachday); } $level--; - } - else - { + } else { //$level--; } } @@ -1640,8 +1653,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ print ''; print convertSecondToTime($lines[$i]->duration, 'allhourmin'); print ''; - } - else print '--:--'; + } else print '--:--'; print "\n"; // Time spent by user @@ -1744,9 +1756,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$ //var_dump($totalforeachday); } $level--; - } - else - { + } else { //$level--; } } @@ -1909,8 +1919,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & print ''; print convertSecondToTime($lines[$i]->duration, 'allhourmin'); print ''; - } - else print '--:--'; + } else print '--:--'; print "\n"; // Time spent by user @@ -2005,9 +2014,7 @@ function projectLinesPerMonth(&$inc, $firstdaytoshow, $fuser, $parent, $lines, & //var_dump($totalforeachday); } $level--; - } - else - { + } else { //$level--; } } @@ -2109,9 +2116,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $sql .= ", ".MAIN_DB_PREFIX."projet_task as t"; $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as ctc"; - } - else - { + } else { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t ON p.rowid = t.fk_projet"; } $sql .= " WHERE p.entity IN (".getEntity('project').")"; @@ -2159,12 +2164,12 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $arrayidofprojects[$objp->projectid] = $objp->projectid; $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); if (empty($arrayidofprojects)) $arrayidofprojects[0] = -1; // Get list of project with calculation on tasks - $sql2 = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_soc, s.nom as socname, p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_percent, p.opp_amount,"; + $sql2 = "SELECT p.rowid as projectid, p.ref, p.title, p.fk_soc, s.nom as socname, s.email, s.client, s.fournisseur,"; + $sql2 .= " p.fk_user_creat, p.public, p.fk_statut as status, p.fk_opp_status as opp_status, p.opp_percent, p.opp_amount,"; $sql2 .= " p.dateo, p.datee,"; $sql2 .= " COUNT(t.rowid) as nb, SUM(t.planned_workload) as planned_workload, SUM(t.planned_workload * t.progress / 100) as declared_progess_workload"; $sql2 .= " FROM ".MAIN_DB_PREFIX."projet as p"; @@ -2217,7 +2222,6 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks if ($userAccess >= 0) { $projectstatic->ref = $objp->ref; - $projectstatic->statut = $objp->status; // deprecated $projectstatic->status = $objp->status; $projectstatic->title = $objp->title; $projectstatic->datee = $db->jdate($objp->datee); @@ -2236,6 +2240,9 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks $thirdpartystatic->id = $objp->fk_soc; $thirdpartystatic->ref = $objp->socname; $thirdpartystatic->name = $objp->socname; + $thirdpartystatic->client = $objp->client; + $thirdpartystatic->fournisseur = $objp->fournisseur; + $thirdpartystatic->email = $objp->email; print $thirdpartystatic->getNomUrl(1); } print ''; @@ -2339,9 +2346,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks print ''; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -2405,13 +2410,11 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $progressBarClass = 'progress-bar-danger'; $title = $langs->trans('TheReportedProgressIsLessThanTheCalculatedProgressionByX', abs($task->progress - $progressCalculated).' '.$langs->trans("point")); $diff = ' '.($task->progress - $progressCalculated).'%'; - } - elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% + } elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% $progressBarClass = 'progress-bar-warning'; $title = $langs->trans('TheReportedProgressIsLessThanTheCalculatedProgressionByX', abs($task->progress - $progressCalculated).' '.$langs->trans("point")); $diff = ' '.($task->progress - $progressCalculated).'%'; - } - else { + } else { $progressBarClass = 'progress-bar-success'; $title = $langs->trans('TheReportedProgressIsMoreThanTheCalculatedProgressionByX', ($task->progress - $progressCalculated).' '.$langs->trans("point")); $diff = ' '.($task->progress - $progressCalculated).'%'; @@ -2426,8 +2429,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide if ($label !== true) { $out .= $label; // replace label by param - } - else { + } else { $out .= $task->getNomUrl(1).' '.dol_htmlentities($task->label); } $out .= ' '; @@ -2439,8 +2441,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $out .= ' '; if ($progressNumber !== true) { $out .= $progressNumber; // replace label by param - } - else { + } else { if ($task->hasDelay()) $out .= img_warning($langs->trans("Late")).' '; $url = DOL_URL_ROOT.'/projet/tasks/time.php?id='.$task->id; @@ -2453,7 +2454,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $out .= ''; $out .= ''; - $out .= '/'; + $out .= ' / '; $out .= ''; $out .= ''; @@ -2475,9 +2476,7 @@ function getTaskProgressView($task, $label = true, $progressNumber = true, $hide $out .= '
'; } $out .= '
'; - } - else - { + } else { // bad $out .= '
'; $out .= '
'; @@ -2518,12 +2517,10 @@ function getTaskProgressBadge($task, $label = '', $tooltip = '') if (doubleval($progressCalculated) > doubleval($task->progress * $warningRatio)) { $badgeClass .= 'badge-danger'; if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%'; - } - elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% + } elseif (doubleval($progressCalculated) > doubleval($task->progress)) { // warning if close at 10% $badgeClass .= 'badge-warning'; if (empty($tooltip)) $tooltip = $task->progress.'% < '.$langs->trans("Expected").' '.$progressCalculated.'%'; - } - else { + } else { $badgeClass .= 'badge-success'; if (empty($tooltip)) $tooltip = $task->progress.'% >= '.$langs->trans("Expected").' '.$progressCalculated.'%'; } diff --git a/htdocs/core/lib/reception.lib.php b/htdocs/core/lib/reception.lib.php index 3cf9a535eaa..f36295e31f3 100644 --- a/htdocs/core/lib/reception.lib.php +++ b/htdocs/core/lib/reception.lib.php @@ -47,41 +47,40 @@ function reception_prepare_head(Reception $object) $head[$h][2] = 'reception'; $h++; - - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) { - $objectsrc = $object; - if ($object->origin == 'commande' && $object->origin_id > 0) - { - $objectsrc = new Commande($db); - $objectsrc->fetch($object->origin_id); - } - $nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external')); - $head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id; - $head[$h][1] = $langs->trans("ContactsAddresses"); + $objectsrc = $object; + if ($object->origin == 'commande' && $object->origin_id > 0) + { + $objectsrc = new Commande($db); + $objectsrc->fetch($object->origin_id); + } + $nbContact = count($objectsrc->liste_contact(-1, 'internal')) + count($objectsrc->liste_contact(-1, 'external')); + $head[$h][0] = DOL_URL_ROOT."/reception/contact.php?id=".$object->id; + $head[$h][1] = $langs->trans("ContactsAddresses"); if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; - $head[$h][2] = 'contact'; - $h++; + $head[$h][2] = 'contact'; + $h++; } - $nbNote = 0; - if (!empty($object->note_private)) $nbNote++; - if (!empty($object->note_public)) $nbNote++; + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception'); + + $nbNote = 0; + if (!empty($object->note_private)) $nbNote++; + if (!empty($object->note_public)) $nbNote++; $head[$h][0] = DOL_URL_ROOT."/reception/note.php?id=".$object->id; $head[$h][1] = $langs->trans("Notes"); if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; $head[$h][2] = 'note'; $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'reception', 'remove'); - - - - - complete_head_from_modules($conf, $langs, $object, $head, $h, 'order', 'remove'); - - return $head; + return $head; } /** @@ -102,25 +101,24 @@ function reception_admin_prepare_head() $head[$h][2] = 'reception'; $h++; + complete_head_from_modules($conf, $langs, null, $head, $h, 'reception_admin'); if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFields"); - $head[$h][2] = 'attributes_reception'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/reception_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFields"); + $head[$h][2] = 'attributes_reception'; + $h++; } if (!empty($conf->global->MAIN_SUBMODULE_RECEPTION)) { - $head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsLines"); - $head[$h][2] = 'attributeslines_reception'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/commande_fournisseur_dispatch_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsLines"); + $head[$h][2] = 'attributeslines_reception'; + $h++; } - - complete_head_from_modules($conf, $langs, null, $head, $h, 'reception_admin', 'remove'); return $head; diff --git a/htdocs/core/lib/report.lib.php b/htdocs/core/lib/report.lib.php index 5a8d5d2530e..67e01e376c9 100644 --- a/htdocs/core/lib/report.lib.php +++ b/htdocs/core/lib/report.lib.php @@ -69,7 +69,7 @@ function report_header($reportname, $notused, $period, $periodlink, $description // Ligne de titre print ''; - print ''.$langs->trans("ReportName").''; + print ''.$langs->trans("ReportName").''; print ''; print $reportname; print ''; @@ -80,7 +80,7 @@ function report_header($reportname, $notused, $period, $periodlink, $description if ($calcmode) { print ''; - print ''.$langs->trans("CalculationMode").''; + print ''.$langs->trans("CalculationMode").''; print ''; print $calcmode; if ($variante) print ''; diff --git a/htdocs/core/lib/resource.lib.php b/htdocs/core/lib/resource.lib.php index e6a0998ba6f..a4ba796078f 100644 --- a/htdocs/core/lib/resource.lib.php +++ b/htdocs/core/lib/resource.lib.php @@ -37,13 +37,13 @@ function resource_prepare_head($object) $head[$h][0] = dol_buildpath('/resource/card.php', 1).'?id='.$object->id; $head[$h][1] = $langs->trans("ResourceCard"); - $head[$h][2] = 'resource'; + $head[$h][2] = 'resource'; $h++; if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && (empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_USER) || empty($conf->global->RESOURCE_HIDE_ADD_CONTACT_THIPARTY))) { - $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); - $head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id; + $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); + $head[$h][0] = DOL_URL_ROOT.'/resource/contact.php?id='.$object->id; $head[$h][1] = $langs->trans('ContactsAddresses'); if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; $head[$h][2] = 'contact'; diff --git a/htdocs/core/lib/salaries.lib.php b/htdocs/core/lib/salaries.lib.php index 5a94e025097..c11e37b7aaa 100644 --- a/htdocs/core/lib/salaries.lib.php +++ b/htdocs/core/lib/salaries.lib.php @@ -27,42 +27,41 @@ */ function salaries_prepare_head($object) { + global $db, $langs, $conf; - global $db, $langs, $conf; + $h = 0; + $head = array(); - $h = 0; - $head = array(); + $head[$h][0] = DOL_URL_ROOT.'/salaries/card.php?id='.$object->id; + $head[$h][1] = $langs->trans("SalaryPayment"); + $head[$h][2] = 'card'; + $h++; - $head[$h][0] = DOL_URL_ROOT.'/salaries/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("SalaryPayment"); - $head[$h][2] = 'card'; - $h++; + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries'); - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries'); + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; + $upload_dir = $conf->salaries->dir_output."/".dol_sanitizeFileName($object->ref); + $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); + $nbLinks = Link::count($db, $object->element, $object->id); + $head[$h][0] = DOL_URL_ROOT.'/salaries/document.php?id='.$object->id; + $head[$h][1] = $langs->trans('Documents'); + if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; + $head[$h][2] = 'documents'; + $h++; - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->salaries->dir_output."/".dol_sanitizeFileName($object->ref); - $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); - $nbLinks = Link::count($db, $object->element, $object->id); - $head[$h][0] = DOL_URL_ROOT.'/salaries/document.php?id='.$object->id; - $head[$h][1] = $langs->trans('Documents'); - if (($nbFiles + $nbLinks) > 0) $head[$h][1] .= ''.($nbFiles + $nbLinks).''; - $head[$h][2] = 'documents'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/salaries/info.php?id='.$object->id; + $head[$h][1] = $langs->trans("Info"); + $head[$h][2] = 'info'; + $h++; - $head[$h][0] = DOL_URL_ROOT.'/salaries/info.php?id='.$object->id; - $head[$h][1] = $langs->trans("Info"); - $head[$h][2] = 'info'; - $h++; + complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'remove'); - complete_head_from_modules($conf, $langs, $object, $head, $h, 'salaries', 'remove'); - - return $head; + return $head; } /** @@ -72,28 +71,28 @@ function salaries_prepare_head($object) */ function salaries_admin_prepare_head() { - global $langs, $conf, $user; + global $langs, $conf, $user; - $h = 0; - $head = array(); + $h = 0; + $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/salaries/admin/salaries.php'; - $head[$h][1] = $langs->trans("Miscellaneous"); - $head[$h][2] = 'general'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/salaries/admin/salaries.php'; + $head[$h][1] = $langs->trans("Miscellaneous"); + $head[$h][2] = 'general'; + $h++; - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab - complete_head_from_modules($conf, $langs, '', $head, $h, 'salaries_admin'); + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'salaries_admin'); - $head[$h][0] = DOL_URL_ROOT.'/salaries/admin/salaries_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsSalaries"); - $head[$h][2] = 'attributes'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/salaries/admin/salaries_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsSalaries"); + $head[$h][2] = 'attributes'; + $h++; - complete_head_from_modules($conf, $langs, '', $head, $h, 'salaries_admin', 'remove'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'salaries_admin', 'remove'); - return $head; + return $head; } diff --git a/htdocs/core/lib/security.lib.php b/htdocs/core/lib/security.lib.php index 92728286cd5..cd4bc333b41 100644 --- a/htdocs/core/lib/security.lib.php +++ b/htdocs/core/lib/security.lib.php @@ -46,8 +46,7 @@ function dol_encode($chain, $key = '1') $output_tab[$i] = chr(ord(substr($chain, $i, 1)) + 17); } $chain = implode("", $output_tab); - } - elseif ($key) + } elseif ($key) { $result = ''; $strlength = dol_strlen($chain); @@ -85,8 +84,7 @@ function dol_decode($chain, $key = '1') } $chain = implode("", $output_tab); - } - elseif ($key) + } elseif ($key) { $result = ''; $strlength = dol_strlen($chain); @@ -171,7 +169,7 @@ function dol_verifyHash($chain, $hash, $type = '0') * @param User $user User to check * @param string $features Features to check (it must be module $object->element. Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...) * @param int $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional). - * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional). + * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany module. Param not used if objectid is null (optional). * @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'. * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional) * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional) @@ -189,10 +187,15 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f //print ", dbtablename=".$dbtablename.", dbt_socfield=".$dbt_keyfield.", dbt_select=".$dbt_select; //print ", perm: ".$features."->".$feature2."=".($user->rights->$features->$feature2->lire)."
"; + $parentfortableentity = ''; + if ($features == 'facturerec') $features = 'facture'; if ($features == 'mo') $features = 'mrp'; if ($features == 'member') $features = 'adherent'; if ($features == 'subscription') { $features = 'adherent'; $feature2 = 'cotisation'; }; + if ($features == 'websitepage') { $features = 'website'; $tableandshare = 'website_page'; $parentfortableentity = 'fk_website@website'; } + if ($features == 'project') $features = 'projet'; + if ($features == 'product') $features = 'produit'; // Get more permissions checks from hooks $parameters = array('features'=>$features, 'objectid'=>$objectid, 'idtype'=>$dbt_select); @@ -248,9 +251,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f $tmpreadok = 1; foreach ($feature2 as $subfeature) { if ($subfeature == 'user' && $user->id == $objectid) continue; // A user can always read its own card - if (!empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $tmpreadok = 0; } - elseif (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok = 0; } - else { $tmpreadok = 1; break; } // Break is to bypass second test if the first is ok + if (!empty($subfeature) && empty($user->rights->$feature->$subfeature->lire) && empty($user->rights->$feature->$subfeature->read)) { $tmpreadok = 0; } elseif (empty($subfeature) && empty($user->rights->$feature->lire) && empty($user->rights->$feature->read)) { $tmpreadok = 0; } else { $tmpreadok = 1; break; } // Break is to bypass second test if the first is ok } if (!$tmpreadok) { // We found a test on feature that is ko $readok = 0; // All tests are ko (we manage here the and, the or will be managed later using $nbko). @@ -294,8 +295,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f if (!$user->rights->import->run) { $createok = 0; $nbko++; } } elseif ($feature == 'ecm') { if (!$user->rights->ecm->upload) { $createok = 0; $nbko++; } - } - elseif (!empty($feature2)) { // This is for permissions on one level + } elseif (!empty($feature2)) { // This is for permissions on one level foreach ($feature2 as $subfeature) { if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->creer) continue; // User can edit its own card if ($subfeature == 'user' && $user->id == $objectid && $user->rights->user->self->password) continue; // User can edit its own password @@ -311,7 +311,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f break; } } - } elseif (!empty($feature)) { // This is for permissions on 2 levels ('creer' or 'write') + } elseif (!empty($feature)) { // This is for permissions on 2 levels ('creer' or 'write') //print '
feature='.$feature.' creer='.$user->rights->$feature->creer.' write='.$user->rights->$feature->write; exit; if (empty($user->rights->$feature->creer) && empty($user->rights->$feature->write) @@ -348,47 +348,38 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f if ($feature == 'contact') { if (!$user->rights->societe->contact->supprimer) $deleteok = 0; - } - elseif ($feature == 'produit|service') + } elseif ($feature == 'produit|service') { if (!$user->rights->produit->supprimer && !$user->rights->service->supprimer) $deleteok = 0; - } - elseif ($feature == 'commande_fournisseur') + } elseif ($feature == 'commande_fournisseur') { if (!$user->rights->fournisseur->commande->supprimer) $deleteok = 0; - } - elseif ($feature == 'banque') + } elseif ($feature == 'banque') { if (!$user->rights->banque->modifier) $deleteok = 0; - } - elseif ($feature == 'cheque') + } elseif ($feature == 'cheque') { if (!$user->rights->banque->cheque) $deleteok = 0; - } - elseif ($feature == 'ecm') + } elseif ($feature == 'ecm') { if (!$user->rights->ecm->upload) $deleteok = 0; - } - elseif ($feature == 'ftp') + } elseif ($feature == 'ftp') { if (!$user->rights->ftp->write) $deleteok = 0; - }elseif ($feature == 'salaries') + } elseif ($feature == 'salaries') { if (!$user->rights->salaries->delete) $deleteok = 0; - } - elseif ($feature == 'salaries') + } elseif ($feature == 'salaries') { if (!$user->rights->salaries->delete) $deleteok = 0; - } - elseif (!empty($feature2)) // This is for permissions on 2 levels + } elseif (!empty($feature2)) // This is for permissions on 2 levels { foreach ($feature2 as $subfeature) { if (empty($user->rights->$feature->$subfeature->supprimer) && empty($user->rights->$feature->$subfeature->delete)) $deleteok = 0; else { $deleteok = 1; break; } // For bypass the second test if the first is ok } - } - elseif (!empty($feature)) // This is used for permissions on 1 level + } elseif (!empty($feature)) // This is used for permissions on 1 level { //print '
feature='.$feature.' creer='.$user->rights->$feature->supprimer.' write='.$user->rights->$feature->delete; if (empty($user->rights->$feature->supprimer) @@ -408,7 +399,7 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f // is linked to a company allowed to $user. if (!empty($objectid) && $objectid > 0) { - $ok = checkUserAccessToObject($user, $featuresarray, $objectid, $tableandshare, $feature2, $dbt_keyfield, $dbt_select); + $ok = checkUserAccessToObject($user, $featuresarray, $objectid, $tableandshare, $feature2, $dbt_keyfield, $dbt_select, $parentfortableentity); $params = array('objectid' => $objectid, 'features' => join(',', $featuresarray), 'features2' => $feature2); return $ok ? 1 : accessforbidden('', 1, 1, 0, $params); } @@ -420,17 +411,18 @@ function restrictedArea($user, $features, $objectid = 0, $tableandshare = '', $f * Check access by user to object. * This function is also called by restrictedArea * - * @param User $user User to check - * @param array $featuresarray Features/modules to check. Example: ('user','service','member','project','task',...) - * @param int|string $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional). - * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional). - * @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'. - * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional) - * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional) - * @return bool True if user has access, False otherwise + * @param User $user User to check + * @param array $featuresarray Features/modules to check. Example: ('user','service','member','project','task',...) + * @param int|string $objectid Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional). + * @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany modume. Param not used if objectid is null (optional). + * @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'. + * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional) + * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional) + * @param string $parenttableforentity Parent table for entity. Example 'fk_website@website' + * @return bool True if user has access, False otherwise * @see restrictedArea() */ -function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = '', $dbt_select = 'rowid') +function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableandshare = '', $feature2 = '', $dbt_keyfield = '', $dbt_select = 'rowid', $parenttableforentity = '') { global $db, $conf; @@ -448,7 +440,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand if ($feature == 'project') $feature = 'projet'; if ($feature == 'task') $feature = 'projet_task'; - $check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday'); // Test on entity only (Objects with no link to company) + $check = array('adherent', 'banque', 'bom', 'don', 'mrp', 'user', 'usergroup', 'product', 'produit', 'service', 'produit|service', 'categorie', 'resource', 'expensereport', 'holiday', 'website'); // Test on entity only (Objects with no link to company) $checksoc = array('societe'); // Test for societe object $checkother = array('contact', 'agenda'); // Test on entity and link to third party. Allowed if link is empty (Ex: contacts...). $checkproject = array('projet', 'project'); // Test for project object @@ -476,35 +468,35 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand { $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND dbt.entity IS NOT NULL"; - } - else - { + } else { $sql .= ",".MAIN_DB_PREFIX."usergroup_user as ug"; $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND ((ug.fk_user = dbt.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; $sql .= " OR dbt.entity = 0)"; // Show always superadmin } + } else { + $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } - else { + } else { + $reg = array(); + if ($parenttableforentity && preg_match('/(.*)@(.*)/', $parenttableforentity, $reg)) { + $sql .= ", ".MAIN_DB_PREFIX.$reg[2]." as dbtp"; + $sql .= " WHERE dbt.".$reg[1]." = dbtp.rowid AND dbt.".$dbt_select." IN (".$objectid.")"; + $sql .= " AND dbtp.entity IN (".getEntity($sharedelement, 1).")"; + } else { $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } } - else - { - $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; - $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; - } - } - elseif (in_array($feature, $checksoc)) // We check feature = checksoc + } elseif (in_array($feature, $checksoc)) // We check feature = checksoc { // If external user: Check permission for external users if ($user->socid > 0) { if ($user->socid <> $objectid) return false; - } - // If internal user: Check permission for internal users that are restricted on their objects + } // If internal user: Check permission for internal users that are restricted on their objects elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { $sql = "SELECT COUNT(sc.fk_soc) as nb"; @@ -514,8 +506,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $sql .= " AND sc.fk_user = ".$user->id; $sql .= " AND sc.fk_soc = s.rowid"; $sql .= " AND s.entity IN (".getEntity($sharedelement, 1).")"; - } - // If multicompany and internal users with all permissions, check user is in correct entity + } // If multicompany and internal users with all permissions, check user is in correct entity elseif (!empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(s.rowid) as nb"; @@ -523,8 +514,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $sql .= " WHERE s.rowid IN (".$objectid.")"; $sql .= " AND s.entity IN (".getEntity($sharedelement, 1).")"; } - } - elseif (in_array($feature, $checkother)) // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...). + } elseif (in_array($feature, $checkother)) // Test on entity and link to societe. Allowed if link is empty (Ex: contacts...). { // If external user: Check permission for external users if ($user->socid > 0) @@ -533,18 +523,16 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND dbt.fk_soc = ".$user->socid; - } - // If internal user: Check permission for internal users that are restricted on their objects + } // If internal user: Check permission for internal users that are restricted on their objects elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON dbt.fk_soc = sc.fk_soc AND sc.fk_user = '".$user->id."'"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON dbt.fk_soc = sc.fk_soc AND sc.fk_user = ".((int) $user->id); $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND (dbt.fk_soc IS NULL OR sc.fk_soc IS NOT NULL)"; // Contact not linked to a company or to a company of user $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; - } - // If multicompany and internal users with all permissions, check user is in correct entity + } // If multicompany and internal users with all permissions, check user is in correct entity elseif (!empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; @@ -552,11 +540,10 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } - - if ($feature == 'agenda')// Also check myactions rights + if ($feature == 'agenda')// Also check owner or attendee for users without allactions->read { if ($objectid > 0 && empty($user->rights->agenda->allactions->read)) { - require_once DOL_DOCUMENT_ROOT . '/comm/action/class/actioncomm.class.php'; + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; $action = new ActionComm($db); $action->fetch($objectid); if ($action->authorid != $user->id && $action->userownerid != $user->id && !(array_key_exists($user->id, $action->userassigned))) { @@ -564,9 +551,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand } } } - } - elseif (in_array($feature, $checkproject)) - { + } elseif (in_array($feature, $checkproject)) { if (!empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -574,17 +559,13 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $tmps = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, 0); $tmparray = explode(',', $tmps); if (!in_array($objectid, $tmparray)) return false; - } - else - { + } else { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } - } - elseif (in_array($feature, $checktask)) - { + } elseif (in_array($feature, $checktask)) { if (!empty($conf->projet->enabled) && empty($user->rights->projet->all->lire)) { $task = new Task($db); @@ -595,16 +576,13 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $tmps = $projectstatic->getProjectsAuthorizedForUser($user, 0, 1, 0); $tmparray = explode(',', $tmps); if (!in_array($task->fk_project, $tmparray)) return false; - } - else - { + } else { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.".$dbt_select." IN (".$objectid.")"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; } - } - elseif (!in_array($feature, $nocheck)) // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield + } elseif (!in_array($feature, $nocheck)) // By default (case of $checkdefault), we check on object entity + link to third party on field $dbt_keyfield { // If external user: Check permission for external users if ($user->socid > 0) @@ -614,8 +592,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt"; $sql .= " WHERE dbt.rowid IN (".$objectid.")"; $sql .= " AND dbt.".$dbt_keyfield." = ".$user->socid; - } - // If internal user: Check permission for internal users that are restricted on their objects + } // If internal user: Check permission for internal users that are restricted on their objects elseif (!empty($conf->societe->enabled) && ($user->rights->societe->lire && !$user->rights->societe->client->voir)) { if (empty($dbt_keyfield)) dol_print_error('', 'Param dbt_keyfield is required but not defined'); @@ -628,8 +605,7 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand $sql .= " AND dbt.".$dbt_keyfield." = s.rowid"; $sql .= " AND dbt.entity IN (".getEntity($sharedelement, 1).")"; $sql .= " AND sc.fk_user = ".$user->id; - } - // If multicompany and internal users with all permissions, check user is in correct entity + } // If multicompany and internal users with all permissions, check user is in correct entity elseif (!empty($conf->multicompany->enabled)) { $sql = "SELECT COUNT(dbt.".$dbt_select.") as nb"; @@ -646,13 +622,12 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand { $obj = $db->fetch_object($resql); if (!$obj || $obj->nb < count(explode(',', $objectid))) return false; - } - else - { + } else { return false; } } } + return true; } @@ -707,9 +682,7 @@ function accessforbidden($message = '', $printheader = 1, $printfooter = 1, $sho { print $langs->trans("CurrentLogin").': '.$user->login.'
'; print $langs->trans("ErrorForbidden2", $langs->transnoentitiesnoconv("Home"), $langs->transnoentitiesnoconv("Users")); - } - else - { + } else { print $langs->trans("ErrorForbidden3"); } } diff --git a/htdocs/core/lib/security2.lib.php b/htdocs/core/lib/security2.lib.php index ce346c0d26e..6f206832e2d 100644 --- a/htdocs/core/lib/security2.lib.php +++ b/htdocs/core/lib/security2.lib.php @@ -92,7 +92,7 @@ function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $auth // Call function to check user/password $function = 'check_user_password_'.$mode; $login = call_user_func($function, $usertotest, $passwordtotest, $entitytotest, $context); - if ($login) // Login is successfull + if ($login && $login != '--bad-login-validity--') // Login is successfull { $test = false; // To stop once at first login success $conf->authmode = $mode; // This properties is defined only when logged to say what mode was successfully used @@ -101,9 +101,7 @@ function checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $auth $dol_screenwidth = GETPOST('screenwidth'); $dol_screenheight = GETPOST('screenheight'); } - } - else - { + } else { dol_syslog("Authentication KO - failed to load file '".$authfile."'", LOG_ERR); sleep(1); // Load translation files required by the page @@ -132,8 +130,8 @@ if (!function_exists('dol_loginfunction')) */ function dol_loginfunction($langs, $conf, $mysoc) { - global $dolibarr_main_demo, $db; - global $hookmanager; + global $dolibarr_main_demo, $dolibarr_main_force_https; + global $db, $hookmanager; $langs->loadLangs(array("main", "other", "help", "admin")); @@ -179,16 +177,14 @@ if (!function_exists('dol_loginfunction')) $tmp = dol_buildpath($reldir.'login.tpl.php'); if (file_exists($tmp)) { $template_dir = preg_replace('/login\.tpl\.php$/', '', $tmp); break; } } - } - else - { + } else { $template_dir = DOL_DOCUMENT_ROOT."/core/tpl/"; } // Set cookie for timeout management $prefix = dol_getprefix(''); $sessiontimeout = 'DOLSESSTIMEOUT_'.$prefix; - if (!empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", null, false, true); + if (!empty($conf->global->MAIN_SESSION_TIMEOUT)) setcookie($sessiontimeout, $conf->global->MAIN_SESSION_TIMEOUT, 0, "/", null, (empty($dolibarr_main_force_https) ? false : true), true); if (GETPOST('urlfrom', 'alpha')) $_SESSION["urlfrom"] = GETPOST('urlfrom', 'alpha'); else unset($_SESSION["urlfrom"]); @@ -226,13 +222,11 @@ if (!function_exists('dol_loginfunction')) if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); - } - elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo); $width = 128; - } - elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; } @@ -363,8 +357,7 @@ function encodedecode_dbpassconf($level = 0) $passwd = $val; $lineofpass = 1; } - } - elseif (preg_match('/^[^#]*dolibarr_main_db_pass[\s]*=[\s]*(.*)/i', $buffer, $reg)) + } elseif (preg_match('/^[^#]*dolibarr_main_db_pass[\s]*=[\s]*(.*)/i', $buffer, $reg)) { $val = trim($reg[1]); // This also remove CR/LF $val = preg_replace('/^["\']/', '', $val); @@ -375,9 +368,7 @@ function encodedecode_dbpassconf($level = 0) $passwd_crypted = $val; $val = dol_decode($val); $passwd = $val; - } - else - { + } else { $passwd = $val; $val = dol_encode($val); $passwd_crypted = $val; @@ -400,9 +391,7 @@ function encodedecode_dbpassconf($level = 0) //print 'passwd = '.$passwd.' - passwd_crypted = '.$passwd_crypted; //exit; - } - else - { + } else { $config .= $buffer; } } @@ -422,15 +411,11 @@ function encodedecode_dbpassconf($level = 0) //@chmod($file, octdec('0600')); return 1; - } - else - { + } else { dol_syslog("encodedecode_dbpassconf Failed to open conf.php file for writing", LOG_WARNING); return -1; } - } - else - { + } else { dol_syslog("encodedecode_dbpassconf Failed to read conf.php", LOG_ERR); return -2; } @@ -475,8 +460,7 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len } $generated_password = str_shuffle($randomCode); - } - else // Old platform, non cryptographic random + } else // Old platform, non cryptographic random { $max = strlen($lowercase) - 1; for ($x = 0; $x < $nbofchar; $x++) { @@ -493,8 +477,7 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len $generated_password = str_shuffle($randomCode); } - } - elseif (!empty($conf->global->USER_PASSWORD_GENERATED)) + } elseif (!empty($conf->global->USER_PASSWORD_GENERATED)) { $nomclass = "modGeneratePass".ucfirst($conf->global->USER_PASSWORD_GENERATED); $nomfichier = $nomclass.".class.php"; @@ -513,9 +496,7 @@ function getRandomPassword($generic = false, $replaceambiguouschars = null, $len if (function_exists('random_int')) // Cryptographic random { $generated_password = str_replace($replaceambiguouschars, $numbers[random_int(0, $max)], $generated_password); - } - else - { + } else { $generated_password = str_replace($replaceambiguouschars, $numbers[mt_rand(0, $max)], $generated_password); } } diff --git a/htdocs/core/lib/sendings.lib.php b/htdocs/core/lib/sendings.lib.php index ad1e6304d03..b81757f261f 100644 --- a/htdocs/core/lib/sendings.lib.php +++ b/htdocs/core/lib/sendings.lib.php @@ -304,9 +304,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') } $label = (!empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label; - } - else - { + } else { $label = (!empty($objp->label) ? $objp->label : $objp->product_label); } @@ -332,9 +330,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') } print ''; - } - else - { + } else { print ""; if ($objp->fk_product_type == 1) $text = img_object($langs->trans('Service'), 'service'); else $text = img_object($langs->trans('Product'), 'product'); @@ -439,9 +435,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; print dol_print_date($receiving->date_delivery, 'day'); print ''; - } - else - { + } else { //print ' '; print ' '; print ' '; @@ -454,9 +448,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '') print ''; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } diff --git a/htdocs/core/lib/signature.lib.php b/htdocs/core/lib/signature.lib.php index 837f505c132..37cb9b31e8d 100644 --- a/htdocs/core/lib/signature.lib.php +++ b/htdocs/core/lib/signature.lib.php @@ -63,8 +63,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '') if ($mode == 0) $out .= urlencode($ref); $out .= ($mode ? '' : ''); if ($mode == 1) $out .= '&hashp=hash_of_file'; - else - { + else { include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; $propaltmp = new Propal($db); $res = $propaltmp->fetch(0, $ref); @@ -80,9 +79,7 @@ function getOnlineSignatureUrl($mode, $type, $ref = '') { $out = $langs->trans("FeatureOnlineSignDisabled"); return $out; - } - else - { + } else { $out .= '&hashp='.$hashp; } } diff --git a/htdocs/core/lib/takepos.lib.php b/htdocs/core/lib/takepos.lib.php index d04fa5f77ef..dfddc95d733 100644 --- a/htdocs/core/lib/takepos.lib.php +++ b/htdocs/core/lib/takepos.lib.php @@ -26,7 +26,7 @@ * * @return array Array of tabs */ -function takepos_prepare_head() +function takepos_admin_prepare_head() { global $langs, $conf; @@ -38,18 +38,20 @@ function takepos_prepare_head() $head[$h][2] = 'setup'; $h++; + $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/appearance.php'; + $head[$h][1] = $langs->trans("Appearance"); + $head[$h][2] = 'appearance'; + $h++; + $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/receipt.php'; $head[$h][1] = $langs->trans("Receipt"); $head[$h][2] = 'receipt'; $h++; - if ($conf->global->TAKEPOS_BAR_RESTAURANT) - { - $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/bar.php'; - $head[$h][1] = $langs->trans("BarRestaurant"); - $head[$h][2] = 'bar'; - $h++; - } + $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/bar.php'; + $head[$h][1] = $langs->trans("BarRestaurant"); + $head[$h][2] = 'bar'; + $h++; $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS); for ($i = 1; $i <= $numterminals; $i++) @@ -65,7 +67,9 @@ function takepos_prepare_head() $head[$h][2] = 'other'; $h++; - complete_head_from_modules($conf, $langs, null, $head, $h, 'takepos'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'takepos_admin'); - return $head; + complete_head_from_modules($conf, $langs, null, $head, $h, 'takepos_admin', 'remove'); + + return $head; } diff --git a/htdocs/core/lib/tax.lib.php b/htdocs/core/lib/tax.lib.php index cdf9fe29b1c..3b261bd0814 100644 --- a/htdocs/core/lib/tax.lib.php +++ b/htdocs/core/lib/tax.lib.php @@ -42,7 +42,7 @@ function tax_prepare_head(ChargeSociales $object) $head = array(); $head[$h][0] = DOL_URL_ROOT.'/compta/sociales/card.php?id='.$object->id; - $head[$h][1] = $langs->trans('Card'); + $head[$h][1] = $langs->trans('SocialContribution'); $head[$h][2] = 'card'; $h++; @@ -110,8 +110,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $paymenttable = 'paiement'; $paymentfacturetable = 'paiement_facture'; $invoicefieldref = 'ref'; - } - elseif ($direction == 'buy') + } elseif ($direction == 'buy') { $invoicetable = 'facture_fourn'; $invoicedettable = 'facture_fourn_det'; @@ -162,8 +161,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -172,11 +170,9 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 0"; // Limit to products $sql .= " AND d.date_start is null AND d.date_end IS NULL)"; // enhance detection of products - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture; - } - else - { + } else { // Count on payments date $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.$f_rate as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; $sql .= " d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; @@ -203,8 +199,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -213,7 +208,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 0"; // Limit to products $sql .= " AND d.date_start is null AND d.date_end IS NULL)"; // enhance detection of products - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture.", pf.rowid"; } @@ -273,9 +268,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $company_id = $assoc['company_id']; } - } - else - { + } else { dol_print_error($db); return -3; } @@ -310,8 +303,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -320,11 +312,9 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 1"; // Limit to services $sql .= " OR d.date_start is NOT null OR d.date_end IS NOT NULL)"; // enhance detection of service - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture; - } - else - { + } else { // Count on payments date $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.$f_rate as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; $sql .= " d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; @@ -351,8 +341,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -361,7 +350,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 1"; // Limit to services $sql .= " OR d.date_start is NOT null OR d.date_end IS NOT NULL)"; // enhance detection of service - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture.", pf.rowid"; } @@ -424,9 +413,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $company_id = $assoc['company_id']; } - } - else - { + } else { dol_print_error($db); return -3; } @@ -455,8 +442,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di { $sql .= " AND p.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND p.datep <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND p.datep >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND p.datep <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -465,7 +451,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di if ($date_start && $date_end) $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = -1"; $sql .= " OR e.date_debut is NOT null OR e.date_fin IS NOT NULL)"; // enhance detection of service - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.total_tva <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.total_tva <> 0)"; $sql .= " ORDER BY e.rowid"; if (!$sql) @@ -528,9 +514,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di $company_id = $assoc['company_id']; } - } - else - { + } else { dol_print_error($db); return -3; } @@ -579,9 +563,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $paymenttable = 'paiement'; $paymentfacturetable = 'paiement_facture'; $invoicefieldref = 'ref'; - } - else - { + } else { $invoicetable = 'facture_fourn'; $invoicedettable = 'facture_fourn_det'; $fk_facture = 'fk_facture_fourn'; @@ -631,8 +613,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -641,11 +622,9 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 0"; // Limit to products $sql .= " AND d.date_start is null AND d.date_end IS NULL)"; // enhance detection of products - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture; - } - else - { + } else { // Count on payments date $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.$f_rate as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; $sql .= " d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; @@ -672,8 +651,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -682,7 +660,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 0"; // Limit to products $sql .= " AND d.date_start is null AND d.date_end IS NULL)"; // enhance detection of products - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture.", pf.rowid"; } @@ -742,9 +720,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $rate = $assoc['rate']; } - } - else - { + } else { dol_print_error($db); return -3; } @@ -779,8 +755,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND f.datef >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND f.datef <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -789,11 +764,9 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire if ($date_start && $date_end) $sql .= " AND f.datef >= '".$db->idate($date_start)."' AND f.datef <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 1"; // Limit to services $sql .= " OR d.date_start is NOT null OR d.date_end IS NOT NULL)"; // enhance detection of service - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture; - } - else - { + } else { // Count on payments date $sql = "SELECT d.rowid, d.product_type as dtype, d.".$fk_facture." as facid, d.$f_rate as rate, d.total_ht as total_ht, d.total_ttc as total_ttc, d.".$total_tva." as total_vat, d.description as descr,"; $sql .= " d.".$total_localtax1." as total_localtax1, d.".$total_localtax2." as total_localtax2, "; @@ -820,8 +793,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND pa.datep >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND pa.datep <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -830,7 +802,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire if ($date_start && $date_end) $sql .= " AND pa.datep >= '".$db->idate($date_start)."' AND pa.datep <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = 1"; // Limit to services $sql .= " OR d.date_start is NOT null OR d.date_end IS NOT NULL)"; // enhance detection of service - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.".$total_tva." <> 0)"; $sql .= " ORDER BY d.rowid, d.".$fk_facture.", pf.rowid"; } @@ -893,9 +865,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $rate = $assoc['rate']; } - } - else - { + } else { dol_print_error($db); return -3; } @@ -924,8 +894,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire { $sql .= " AND p.datep >= '".$db->idate(dol_get_first_day($y, $m, false))."'"; $sql .= " AND p.datep <= '".$db->idate(dol_get_last_day($y, $m, false))."'"; - } - elseif ($y) + } elseif ($y) { $sql .= " AND p.datep >= '".$db->idate(dol_get_first_day($y, 1, false))."'"; $sql .= " AND p.datep <= '".$db->idate(dol_get_last_day($y, 12, false))."'"; @@ -934,7 +903,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire if ($date_start && $date_end) $sql .= " AND p.datep >= '".$db->idate($date_start)."' AND p.datep <= '".$db->idate($date_end)."'"; $sql .= " AND (d.product_type = -1"; $sql .= " OR e.date_debut is NOT null OR e.date_fin IS NOT NULL)"; // enhance detection of service - if (empty($conf->global->MAIN_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.total_tva <> 0)"; + if (!empty($conf->global->MAIN_NOT_INCLUDE_ZERO_VAT_IN_REPORTS)) $sql .= " AND (d.".$f_rate." <> 0 OR d.total_tva <> 0)"; $sql .= " ORDER BY e.rowid"; if (!$sql) @@ -997,9 +966,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire $rate = $assoc['rate']; } - } - else - { + } else { dol_print_error($db); return -3; } diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index b8413c323ef..826e2d6bc98 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -30,39 +30,41 @@ */ function ticketAdminPrepareHead() { - global $langs, $conf; + global $langs, $conf; - $langs->load("ticket"); + $langs->load("ticket"); - $h = 0; - $head = array(); + $h = 0; + $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/admin/ticket.php'; - $head[$h][1] = $langs->trans("TicketSettings"); - $head[$h][2] = 'settings'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/ticket.php'; + $head[$h][1] = $langs->trans("TicketSettings"); + $head[$h][2] = 'settings'; + $h++; - $head[$h][0] = DOL_URL_ROOT.'/admin/ticket_extrafields.php'; - $head[$h][1] = $langs->trans("ExtraFieldsTicket"); - $head[$h][2] = 'attributes'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/ticket_extrafields.php'; + $head[$h][1] = $langs->trans("ExtraFieldsTicket"); + $head[$h][2] = 'attributes'; + $h++; - $head[$h][0] = DOL_URL_ROOT.'/admin/ticket_public.php'; - $head[$h][1] = $langs->trans("PublicInterface"); - $head[$h][2] = 'public'; - $h++; + $head[$h][0] = DOL_URL_ROOT.'/admin/ticket_public.php'; + $head[$h][1] = $langs->trans("PublicInterface"); + $head[$h][2] = 'public'; + $h++; - // Show more tabs from modules - // Entries must be declared in modules descriptor with line - //$this->tabs = array( - // 'entity:+tabname:Title:@ticket:/ticket/mypage.php?id=__ID__' - //); // to add new tab - //$this->tabs = array( - // 'entity:-tabname:Title:@ticket:/ticket/mypage.php?id=__ID__' - //); // to remove a tab - complete_head_from_modules($conf, $langs, null, $head, $h, 'ticketadmin'); + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@ticket:/ticket/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@ticket:/ticket/mypage.php?id=__ID__' + //); // to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'ticketadmin'); - return $head; + complete_head_from_modules($conf, $langs, null, $head, $h, 'ticketadmin', 'remove'); + + return $head; } /** @@ -73,71 +75,69 @@ function ticketAdminPrepareHead() */ function ticket_prepare_head($object) { - global $db, $langs, $conf, $user; + global $db, $langs, $conf, $user; - $h = 0; - $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?action=view&track_id='.$object->track_id; - $head[$h][1] = $langs->trans("Ticket"); - $head[$h][2] = 'tabTicket'; - $h++; + $h = 0; + $head = array(); + $head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?action=view&track_id='.$object->track_id; + $head[$h][1] = $langs->trans("Ticket"); + $head[$h][2] = 'tabTicket'; + $h++; - if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid)) - { - $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); - $head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id; - $head[$h][1] = $langs->trans('ContactsAddresses'); - if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; - $head[$h][2] = 'contact'; - $h++; - } + if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && empty($user->socid)) + { + $nbContact = count($object->liste_contact(-1, 'internal')) + count($object->liste_contact(-1, 'external')); + $head[$h][0] = DOL_URL_ROOT.'/ticket/contact.php?track_id='.$object->track_id; + $head[$h][1] = $langs->trans('ContactsAddresses'); + if ($nbContact > 0) $head[$h][1] .= ''.$nbContact.''; + $head[$h][2] = 'contact'; + $h++; + } - complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket'); - // Attached files - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $upload_dir = $conf->ticket->dir_output."/".$object->ref; - $nbFiles = count(dol_dir_list($upload_dir, 'files')); - $head[$h][0] = dol_buildpath('/ticket/document.php', 1).'?id='.$object->id; - $head[$h][1] = $langs->trans("Documents"); - if ($nbFiles > 0) { - $head[$h][1] .= ''.$nbFiles.''; - } + // Attached files + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $upload_dir = $conf->ticket->dir_output."/".$object->ref; + $nbFiles = count(dol_dir_list($upload_dir, 'files')); + $head[$h][0] = dol_buildpath('/ticket/document.php', 1).'?id='.$object->id; + $head[$h][1] = $langs->trans("Documents"); + if ($nbFiles > 0) { + $head[$h][1] .= ''.$nbFiles.''; + } - $head[$h][2] = 'tabTicketDocument'; - $h++; + $head[$h][2] = 'tabTicketDocument'; + $h++; - // History + // History $ticketViewType = "messaging"; if (empty($_SESSION['ticket-view-type'])) { $_SESSION['ticket-view-type'] = $ticketViewType; - } - else { + } else { $ticketViewType = $_SESSION['ticket-view-type']; } if ($ticketViewType == "messaging") { $head[$h][0] = DOL_URL_ROOT.'/ticket/messaging.php?track_id='.$object->track_id; - } - else { + } else { // $ticketViewType == "list" $head[$h][0] = DOL_URL_ROOT.'/ticket/agenda.php?track_id='.$object->track_id; } - $head[$h][1] = $langs->trans('Events'); - if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) - { - $head[$h][1] .= '/'; - $head[$h][1] .= $langs->trans("Agenda"); - } - $head[$h][2] = 'tabTicketLogs'; - $h++; + $head[$h][1] = $langs->trans('Events'); + if (!empty($conf->agenda->enabled) && (!empty($user->rights->agenda->myactions->read) || !empty($user->rights->agenda->allactions->read))) + { + $head[$h][1] .= '/'; + $head[$h][1] .= $langs->trans("Agenda"); + } + $head[$h][2] = 'tabTicketLogs'; + $h++; - complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'remove'); + complete_head_from_modules($conf, $langs, $object, $head, $h, 'ticket', 'remove'); - return $head; + return $head; } /** @@ -162,17 +162,13 @@ function showDirectPublicLink($object) if (empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { $out .= ''.$langs->trans("PublicInterfaceNotEnabled").''; - } - else - { + } else { $out .= img_picto('', 'object_globe.png').' '.$langs->trans("TicketPublicAccess").':
'; if ($url) { $out .= ''; $out .= ajax_autoselect("directpubliclink", 0); - } - else - { + } else { $out .= ''.$langs->trans("TicketNotCreatedFromPublicInterface").''; } } @@ -188,13 +184,13 @@ function showDirectPublicLink($object) */ function generate_random_id($car = 16) { - $string = ""; - $chaine = "abcdefghijklmnopqrstuvwxyz123456789"; - srand((double) microtime() * 1000000); - for ($i = 0; $i < $car; $i++) { - $string .= $chaine[rand() % strlen($chaine)]; - } - return $string; + $string = ""; + $chaine = "abcdefghijklmnopqrstuvwxyz123456789"; + srand((double) microtime() * 1000000); + for ($i = 0; $i < $car; $i++) { + $string .= $chaine[rand() % strlen($chaine)]; + } + return $string; } /** @@ -210,58 +206,54 @@ function generate_random_id($car = 16) */ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '') { - global $user, $conf, $langs, $mysoc; + global $user, $conf, $langs, $mysoc; - top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers + top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss); // Show html headers - print ''; + print ''; + print '
'; - // Define urllogo - $width = 0; - if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO) || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { - // Print logo - if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO)) - { - $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; + // Define urllogo + if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO) || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { + // Print logo + if (!empty($conf->global->TICKET_SHOW_COMPANY_LOGO)) + { + $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; - if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); - $width = 150; - } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { - $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$mysoc->logo); - $width = 150; - } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { - $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; - } - } - } + if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$mysoc->logo_small); + } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) { + $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$mysoc->logo); + } elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) { + $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; + } + } + } - print '
'; - // Output html code for logo - if ($urllogo || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) - { - print '
'; - print '
'; - if ($urllogo) { - print ''; - print ''; - print ''; - } - if (!empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { - print '
'.($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC ? $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC : $langs->trans("TicketSystem")).''; - } - print '
'; - if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { - print ''; - } - print '
'; - } + // Output html code for logo + if ($urllogo || !empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) + { + print '
'; + print '
'; + if ($urllogo) { + print ''; + print ''; + print ''; + } + if (!empty($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC)) { + print '
'.($conf->global->TICKET_PUBLIC_INTERFACE_TOPIC ? $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC : $langs->trans("TicketSystem")).''; + } + print '
'; + if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { + print ''; + } + print '
'; + } - print '
'; + print '
'; - print '
'; + print '
'; } @@ -285,278 +277,266 @@ function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $ */ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC') { - global $user, $conf; - global $form; + global $user, $conf; + global $form; - global $param, $massactionbutton; + global $param, $massactionbutton; - dol_include_once('/comm/action/class/actioncomm.class.php'); + dol_include_once('/comm/action/class/actioncomm.class.php'); - // Check parameters - if (!is_object($filterobj) && !is_object($objcon)) dol_print_error('', 'BadParameter'); + // Check parameters + if (!is_object($filterobj) && !is_object($objcon)) dol_print_error('', 'BadParameter'); - $out = ''; - $histo = array(); - $numaction = 0; - $now = dol_now('tzuser'); + $out = ''; + $histo = array(); + $numaction = 0; + $now = dol_now('tzuser'); - // Open DSI -- Fix order by -- Begin - $sortfield_list = explode(',', $sortfield); - $sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent'); - $sortfield_new_list = array(); - foreach ($sortfield_list as $sortfield_value) { - $sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)]; - } - $sortfield_new = implode(',', $sortfield_new_list); + // Open DSI -- Fix order by -- Begin + $sortfield_list = explode(',', $sortfield); + $sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent'); + $sortfield_new_list = array(); + foreach ($sortfield_list as $sortfield_value) { + $sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)]; + } + $sortfield_new = implode(',', $sortfield_new_list); - if (!empty($conf->agenda->enabled)) - { - // Recherche histo sur actioncomm - if (is_object($objcon) && $objcon->id > 0) { - $sql = "SELECT DISTINCT a.id, a.label as label,"; - } - else - { - $sql = "SELECT a.id, a.label as label,"; - } - $sql .= " a.datep as dp,"; - $sql .= " a.note as message,"; - $sql .= " a.datep2 as dp2,"; - $sql .= " a.percent as percent, 'action' as type,"; - $sql .= " a.fk_element, a.elementtype,"; - $sql .= " a.fk_contact,"; - $sql .= " c.code as acode, c.libelle as alabel, c.picto as apicto,"; - $sql .= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; - if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql .= ", sp.lastname, sp.firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", m.lastname, m.firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", o.ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", o.ref"; - $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; + if (!empty($conf->agenda->enabled)) + { + // Recherche histo sur actioncomm + if (is_object($objcon) && $objcon->id > 0) { + $sql = "SELECT DISTINCT a.id, a.label as label,"; + } else { + $sql = "SELECT a.id, a.label as label,"; + } + $sql .= " a.datep as dp,"; + $sql .= " a.note as message,"; + $sql .= " a.datep2 as dp2,"; + $sql .= " a.percent as percent, 'action' as type,"; + $sql .= " a.fk_element, a.elementtype,"; + $sql .= " a.fk_contact,"; + $sql .= " c.code as acode, c.libelle as alabel, c.picto as apicto,"; + $sql .= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; + if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql .= ", sp.lastname, sp.firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", m.lastname, m.firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", o.ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", o.ref"; + $sql .= " FROM ".MAIN_DB_PREFIX."actioncomm as a"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id"; - $force_filter_contact = false; - if (is_object($objcon) && $objcon->id > 0) { - $force_filter_contact = true; - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm"; - $sql .= " AND r.element_type = '".$db->escape($objcon->table_element)."' AND r.fk_element = ".$objcon->id; - } + $force_filter_contact = false; + if (is_object($objcon) && $objcon->id > 0) { + $force_filter_contact = true; + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm"; + $sql .= " AND r.element_type = '".$db->escape($objcon->table_element)."' AND r.fk_element = ".$objcon->id; + } - if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { - $sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er"; - $sql .= " ON er.resource_type = 'dolresource'"; - $sql .= " AND er.element_id = a.id"; - $sql .= " AND er.resource_id = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", ".MAIN_DB_PREFIX."adherent as m"; - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", ".MAIN_DB_PREFIX."product as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", ".MAIN_DB_PREFIX."ticket as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", ".MAIN_DB_PREFIX."bom_bom as o"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", ".MAIN_DB_PREFIX."contrat as o"; + if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') { + $sql .= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er"; + $sql .= " ON er.resource_type = 'dolresource'"; + $sql .= " AND er.element_id = a.id"; + $sql .= " AND er.resource_id = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql .= ", ".MAIN_DB_PREFIX."adherent as m"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql .= ", ".MAIN_DB_PREFIX."commande_fournisseur as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql .= ", ".MAIN_DB_PREFIX."product as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql .= ", ".MAIN_DB_PREFIX."ticket as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') $sql .= ", ".MAIN_DB_PREFIX."bom_bom as o"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') $sql .= ", ".MAIN_DB_PREFIX."contrat as o"; - $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; - if ($force_filter_contact === false) { - if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql .= " AND a.fk_soc = ".$filterobj->id; - elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql .= " AND a.fk_project = ".$filterobj->id; - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') - { - $sql .= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') - { - $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'"; - if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; - } - } + $sql .= " WHERE a.entity IN (".getEntity('agenda').")"; + if ($force_filter_contact === false) { + if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql .= " AND a.fk_soc = ".$filterobj->id; + elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql .= " AND a.fk_project = ".$filterobj->id; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') + { + $sql .= " AND a.fk_element = m.rowid AND a.elementtype = 'member'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'order_supplier'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Product') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'product'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'ticket'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'BOM') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'bom'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } elseif (is_object($filterobj) && get_class($filterobj) == 'Contrat') + { + $sql .= " AND a.fk_element = o.rowid AND a.elementtype = 'contract'"; + if ($filterobj->id) $sql .= " AND a.fk_element = ".$filterobj->id; + } + } - // Condition on actioncode - if (!empty($actioncode)) - { - if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) - { - if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; - elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; - else - { - if ($actioncode == 'AC_OTH') $sql .= " AND c.type != 'systemauto'"; - elseif ($actioncode == 'AC_OTH_AUTO') $sql .= " AND c.type = 'systemauto'"; - } - } - else - { - if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; - elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; - else $sql .= " AND c.code = '".$db->escape($actioncode)."'"; - } - } - if ($donetodo == 'todo') $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; - elseif ($donetodo == 'done') $sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; - if (is_array($filters) && $filters['search_agenda_label']) $sql .= natural_search('a.label', $filters['search_agenda_label']); - } + // Condition on actioncode + if (!empty($actioncode)) + { + if (empty($conf->global->AGENDA_USE_EVENT_TYPE)) + { + if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; + else { + if ($actioncode == 'AC_OTH') $sql .= " AND c.type != 'systemauto'"; + elseif ($actioncode == 'AC_OTH_AUTO') $sql .= " AND c.type = 'systemauto'"; + } + } else { + if ($actioncode == 'AC_NON_AUTO') $sql .= " AND c.type != 'systemauto'"; + elseif ($actioncode == 'AC_ALL_AUTO') $sql .= " AND c.type = 'systemauto'"; + else $sql .= " AND c.code = '".$db->escape($actioncode)."'"; + } + } + if ($donetodo == 'todo') $sql .= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; + elseif ($donetodo == 'done') $sql .= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; + if (is_array($filters) && $filters['search_agenda_label']) $sql .= natural_search('a.label', $filters['search_agenda_label']); + } - // Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing. - if (!empty($conf->mailing->enabled) && !empty($objcon->email) - && (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING')) - { - $langs->load("mails"); + // Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing. + if (!empty($conf->mailing->enabled) && !empty($objcon->email) + && (empty($actioncode) || $actioncode == 'AC_OTH_AUTO' || $actioncode == 'AC_EMAILING')) + { + $langs->load("mails"); - $sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type"; - $sql2 .= ", null as fk_element, '' as elementtype, null as contact_id"; - $sql2 .= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto"; - $sql2 .= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action - if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2 .= ", '' as lastname, '' as firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql2 .= ", '' as lastname, '' as firstname"; - elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql2 .= ", '' as ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql2 .= ", '' as ref"; - elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql2 .= ", '' as ref"; - $sql2 .= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u"; - $sql2 .= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email. - $sql2 .= " AND mc.statut = 1"; - $sql2 .= " AND u.rowid = m.fk_user_valid"; - $sql2 .= " AND mc.fk_mailing=m.rowid"; - } + $sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type"; + $sql2 .= ", null as fk_element, '' as elementtype, null as contact_id"; + $sql2 .= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto"; + $sql2 .= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action + if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2 .= ", '' as lastname, '' as firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql2 .= ", '' as lastname, '' as firstname"; + elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql2 .= ", '' as ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql2 .= ", '' as ref"; + elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql2 .= ", '' as ref"; + $sql2 .= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u"; + $sql2 .= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email. + $sql2 .= " AND mc.statut = 1"; + $sql2 .= " AND u.rowid = m.fk_user_valid"; + $sql2 .= " AND mc.fk_mailing=m.rowid"; + } - if (!empty($sql) && !empty($sql2)) { - $sql = $sql." UNION ".$sql2; - } elseif (empty($sql) && !empty($sql2)) { - $sql = $sql2; - } + if (!empty($sql) && !empty($sql2)) { + $sql = $sql." UNION ".$sql2; + } elseif (empty($sql) && !empty($sql2)) { + $sql = $sql2; + } - //TODO Add limit in nb of results - $sql .= $db->order($sortfield_new, $sortorder); - dol_syslog("company.lib::show_actions_done", LOG_DEBUG); - $resql = $db->query($sql); - if ($resql) - { - $i = 0; - $num = $db->num_rows($resql); + //TODO Add limit in nb of results + $sql .= $db->order($sortfield_new, $sortorder); - while ($i < $num) - { - $obj = $db->fetch_object($resql); + dol_syslog("company.lib::show_actions_done", LOG_DEBUG); + $resql = $db->query($sql); + if ($resql) + { + $i = 0; + $num = $db->num_rows($resql); - if ($obj->type == 'action') { - $contactaction = new ActionComm($db); - $contactaction->id = $obj->id; - $result = $contactaction->fetchResources(); - if ($result < 0) { - dol_print_error($db); - setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors'); - } + while ($i < $num) + { + $obj = $db->fetch_object($resql); - //if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; - //elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; - $tododone = ''; - if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone = 'todo'; + if ($obj->type == 'action') { + $contactaction = new ActionComm($db); + $contactaction->id = $obj->id; + $result = $contactaction->fetchResources(); + if ($result < 0) { + dol_print_error($db); + setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors'); + } - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>$tododone, - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'message'=>$obj->message, - 'percent'=>$obj->percent, + //if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))"; + //elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))"; + $tododone = ''; + if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone = 'todo'; - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo, + $histo[$numaction] = array( + 'type'=>$obj->type, + 'tododone'=>$tododone, + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'message'=>$obj->message, + 'percent'=>$obj->percent, - 'contact_id'=>$obj->fk_contact, - 'socpeopleassigned' => $contactaction->socpeopleassigned, - 'lastname'=>$obj->lastname, - 'firstname'=>$obj->firstname, - 'fk_element'=>$obj->fk_element, - 'elementtype'=>$obj->elementtype, - // Type of event - 'acode'=>$obj->acode, - 'alabel'=>$obj->alabel, - 'libelle'=>$obj->alabel, // deprecated - 'apicto'=>$obj->apicto - ); - } else { - $histo[$numaction] = array( - 'type'=>$obj->type, - 'tododone'=>'done', - 'id'=>$obj->id, - 'datestart'=>$db->jdate($obj->dp), - 'dateend'=>$db->jdate($obj->dp2), - 'note'=>$obj->label, - 'message'=>$obj->message, - 'percent'=>$obj->percent, - 'acode'=>$obj->acode, + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo, - 'userid'=>$obj->user_id, - 'login'=>$obj->user_login, - 'userfirstname'=>$obj->user_firstname, - 'userlastname'=>$obj->user_lastname, - 'userphoto'=>$obj->user_photo - ); - } + 'contact_id'=>$obj->fk_contact, + 'socpeopleassigned' => $contactaction->socpeopleassigned, + 'lastname'=>$obj->lastname, + 'firstname'=>$obj->firstname, + 'fk_element'=>$obj->fk_element, + 'elementtype'=>$obj->elementtype, + // Type of event + 'acode'=>$obj->acode, + 'alabel'=>$obj->alabel, + 'libelle'=>$obj->alabel, // deprecated + 'apicto'=>$obj->apicto + ); + } else { + $histo[$numaction] = array( + 'type'=>$obj->type, + 'tododone'=>'done', + 'id'=>$obj->id, + 'datestart'=>$db->jdate($obj->dp), + 'dateend'=>$db->jdate($obj->dp2), + 'note'=>$obj->label, + 'message'=>$obj->message, + 'percent'=>$obj->percent, + 'acode'=>$obj->acode, - $numaction++; - $i++; - } - } - else - { - dol_print_error($db); - } + 'userid'=>$obj->user_id, + 'login'=>$obj->user_login, + 'userfirstname'=>$obj->user_firstname, + 'userlastname'=>$obj->user_lastname, + 'userphoto'=>$obj->user_photo + ); + } - if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email))) - { - $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60; + $numaction++; + $i++; + } + } else { + dol_print_error($db); + } - require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + if (!empty($conf->agenda->enabled) || (!empty($conf->mailing->enabled) && !empty($objcon->email))) + { + $delay_warning = $conf->global->MAIN_DELAY_ACTIONS_TODO * 24 * 60 * 60; - $formactions = new FormActions($db); + require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; - $actionstatic = new ActionComm($db); - $userstatic = new User($db); - $contactstatic = new Contact($db); - $userGetNomUrlCache = array(); + $formactions = new FormActions($db); + + $actionstatic = new ActionComm($db); + $userstatic = new User($db); + $contactstatic = new Contact($db); + $userGetNomUrlCache = array(); $out .= '
'; $out .= '
'; + $out .= ''; + if ($objcon && get_class($objcon) == 'Contact' && (is_null($filterobj) || get_class($filterobj) == 'Societe')) { $out .= ''; - } - else - { + } else { $out .= ''; } if ($filterobj && get_class($filterobj) == 'Societe') $out .= ''; @@ -594,115 +574,108 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out .= ''; - $out .= '
'; + $out .= ''; $out .= '
'; - $out .= "\n"; + $out .= "\n"; - $out .= '\n"; + } - if ($noprint) return $out; - else print $out; + if ($noprint) return $out; + else print $out; } diff --git a/htdocs/core/lib/treeview.lib.php b/htdocs/core/lib/treeview.lib.php index 0dcb6e8242d..c0cfa20f529 100644 --- a/htdocs/core/lib/treeview.lib.php +++ b/htdocs/core/lib/treeview.lib.php @@ -79,9 +79,7 @@ function tree_showpad(&$fulltree, $key, $silent = 0) { if ($fulltree[$key]['level'] == $pos) print img_picto_common('', 'treemenu/branch.gif'); else print img_picto_common('', 'treemenu/line.gif'); - } - else - { + } else { if ($fulltree[$key]['level'] == $pos) print img_picto_common('', 'treemenu/branchbottom.gif'); else print img_picto_common('', 'treemenu/linebottom.gif'); } @@ -105,15 +103,16 @@ function tree_showpad(&$fulltree, $key, $silent = 0) * $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); * TODO Replace with jstree plugin instead of treeview plugin. * - * @param array $tab Array of all elements - * @param array $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>) - * @param int $rang Level of element - * @param string $iddivjstree Id to use for parent ul element + * @param array $tab Array of all elements + * @param array $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>) + * @param int $rang Level of element + * @param string $iddivjstree Id to use for parent ul element * @param int $donoresetalreadyloaded Do not reset global array $donoresetalreadyloaded used to avoid to go down on an aleady processed record - * @param int $showfk 1=show fk_links to parent into label (used by menu editor only) + * @param int $showfk 1=show fk_links to parent into label (used by menu editor only) + * @param string $moreparam Add more param on url of elements * @return void */ -function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0) +function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoresetalreadyloaded = 0, $showfk = 0, $moreparam = '') { global $tree_recur_alreadyadded, $menu_handler_to_search; @@ -174,9 +173,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset print ''; print $tab[$x]['buttons']; print ''; - } - else - { + } else { print $tab[$x]['entry']; } //print ' -> A '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'
'."\n"; @@ -184,9 +181,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset // And now we search all its sons of lower level tree_recur($tab, $tab[$x], $rang + 1, 'iddivjstree', 0, $showfk); print ''; - } - elseif (!empty($tab[$x]['rowid']) && $tab[$x]['fk_menu'] == -1 && $tab[$x]['fk_mainmenu'] == $pere['mainmenu'] && $tab[$x]['fk_leftmenu'] == $pere['leftmenu']) - { + } elseif (!empty($tab[$x]['rowid']) && $tab[$x]['fk_menu'] == -1 && $tab[$x]['fk_mainmenu'] == $pere['mainmenu'] && $tab[$x]['fk_leftmenu'] == $pere['leftmenu']) { //print 'rang='.$rang.'-x='.$x." rowid=".$tab[$x]['rowid']." tab[x]['fk_leftmenu'] = ".$tab[$x]['fk_leftmenu']." leftmenu pere = ".$pere['leftmenu']."
\n"; if (empty($ulprinted) && !empty($pere['rowid'])) { @@ -203,16 +198,14 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset if ($showfk) { print '
'; - print '   '; + print '   '; print $tab[$x]['title']; print ''; print '  (mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' - fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')'; print ''; print $tab[$x]['buttons']; print '
'; - } - else - { + } else { print $tab[$x]['entry']; } //print ' -> B '.$tab[$x]['rowid'].' mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].'
'."\n"; diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php index acf847d6480..7d67635a1e2 100644 --- a/htdocs/core/lib/usergroups.lib.php +++ b/htdocs/core/lib/usergroups.lib.php @@ -125,13 +125,13 @@ function user_prepare_head($object) $nbNote = $obj->nb; $i++; } - } - else { + } else { dol_print_error($db); } + $langs->load("mails"); $head[$h][0] = DOL_URL_ROOT.'/user/notify/card.php?id='.$object->id; - $head[$h][1] = $langs->trans("Notifications"); + $head[$h][1] = $langs->trans("NotificationsAuto"); if ($nbNote > 0) $head[$h][1] .= ''.$nbNote.''; $head[$h][2] = 'notify'; $h++; @@ -346,9 +346,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ' '.$langs->trans("UsePersonalValue").''; print ' '; print ''; - } - else - { + } else { $dirthemestring = ''; foreach ($dirthemes as $dirtheme) { @@ -403,9 +401,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($subdir == $selected_theme) { print ' '.$subdir.''; - } - else - { + } else { print ' '.$subdir; } print '
'; @@ -441,18 +437,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($foruserprofile) { // Nothing - } - else - { + } else { // Show logo print ''.$langs->trans("EnableShowLogo").''; if ($edit) { print ajax_constantonoff('MAIN_SHOW_LOGO', array(), null, 0, 0, 1); //print $form->selectyesno('MAIN_SHOW_LOGO', $conf->global->MAIN_SHOW_LOGO, 1); - } - else - { + } else { print yn($conf->global->MAIN_SHOW_LOGO); } print ''; @@ -486,9 +478,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } if ($edit) print '
('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '';*/ - } - else - { + } else { $default = $langs->trans('No'); print ''; print ''.$langs->trans("TopMenuDisableImages").''; @@ -497,9 +487,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) { print ajax_constantonoff('THEME_TOPMENU_DISABLE_IMAGE', array(), null, 0, 0, 1); //print $form->selectyesno('THEME_TOPMENU_DISABLE_IMAGE', $conf->global->THEME_TOPMENU_DISABLE_IMAGE, 1); - } - else - { + } else { print yn($conf->global->THEME_TOPMENU_DISABLE_IMAGE); } print '   '.$langs->trans("Default").': '.$default.' '; @@ -531,9 +519,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } if ($edit) print '
('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '';*/ - } - else - { + } else { print ''; print ''.$langs->trans("BackgroundColor").''; print ''; @@ -541,9 +527,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''), 'THEME_ELDY_BACKBODY', 'formcolor', 1).' '; - } - else - { + } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKBODY, array()), ''); if ($color) print ''; else print $langs->trans("Default"); @@ -577,9 +561,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } if ($edit) print '
('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '';*/ - } - else - { + } else { $default = (empty($colorbackhmenu1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbackhmenu1))); print ''; @@ -588,9 +570,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''), 'THEME_ELDY_TOPMENU_BACK1', 'formcolor', 1).' '; - } - else - { + } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TOPMENU_BACK1, array()), ''); if ($color) print ''; else print $langs->trans("Default"); @@ -624,9 +604,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } if ($edit) print '
('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '';*/ - } - else - { + } else { $default = (empty($colorbackvmenu1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbackvmenu1))); print ''; @@ -635,9 +613,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''), 'THEME_ELDY_VERMENU_BACK1', 'formcolor', 1).' '; - } - else - { + } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_VERMENU_BACK1, array()), ''); if ($color) print ''; else print $langs->trans("Default"); @@ -651,9 +627,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // TextTitleColor for title of Pages if ($foruserprofile) { - } - else - { + } else { $default = (empty($colortexttitlenotab) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlenotab))); print ''; @@ -662,9 +636,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLENOTAB, array()), ''), 'THEME_ELDY_TEXTTITLENOTAB', 'formcolor', 1).' '; - } - else - { + } else { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLENOTAB, $langs->trans("Default")); } print '   '.$langs->trans("Default").': '.$default.' '; @@ -677,9 +649,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // BackgroundTableTitleColor if ($foruserprofile) { - } - else - { + } else { $default = (empty($colorbacktitle1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacktitle1))); print ''; @@ -688,9 +658,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_BACKTITLE1, array()), ''), 'THEME_ELDY_BACKTITLE1', 'formcolor', 1).' '; - } - else - { + } else { print $formother->showColor($conf->global->THEME_ELDY_BACKTITLE1, $langs->trans("Default")); } print '   '.$langs->trans("Default").': '.$default.' '; // $colorbacktitle1 in CSS @@ -703,9 +671,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // TextTitleColor if ($foruserprofile) { - } - else - { + } else { $default = (empty($colortexttitle) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitle))); print ''; @@ -714,9 +680,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLE, array()), ''), 'THEME_ELDY_TEXTTITLE', 'formcolor', 1).' '; - } - else - { + } else { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLE, $langs->trans("Default")); } print '   '.$langs->trans("Default").': '.$default.' '; @@ -729,9 +693,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // TextTitleLinkColor if ($foruserprofile) { - } - else - { + } else { $default=(empty($colortexttitlelink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortexttitlelink))); print ''; @@ -740,9 +702,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTTITLELINK, array()), ''), 'THEME_ELDY_TEXTTITLELINK', 'formcolor', 1).' '; - } - else - { + } else { print $formother->showColor($conf->global->THEME_ELDY_TEXTTITLELINK, $langs->trans("Default")); } print '   '.$langs->trans("Default").': '.$default.' '; @@ -756,9 +716,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // BackgroundTableLineOddColor if ($foruserprofile) { - } - else - { + } else { $default = (empty($colorbacklineimpair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklineimpair1))); print ''; @@ -767,9 +725,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''), 'THEME_ELDY_LINEIMPAIR1', 'formcolor', 1).' '; - } - else - { + } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEIMPAIR1, array()), ''); if ($color) print ''; else print $langs->trans("Default"); @@ -783,9 +739,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) // BackgroundTableLineEvenColor if ($foruserprofile) { - } - else - { + } else { $default = (empty($colorbacklinepair1) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepair1))); print ''; @@ -794,9 +748,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''), 'THEME_ELDY_LINEPAIR1', 'formcolor', 1).' '; - } - else - { + } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_LINEPAIR1, array()), ''); if ($color) print ''; else print $langs->trans("Default"); @@ -830,9 +782,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) } if ($edit) print '
('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')'; print '';*/ - } - else - { + } else { $default = (empty($colortextlink) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colortextlink))); print ''; @@ -841,13 +791,10 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $formother->selectColor(colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''), 'THEME_ELDY_TEXTLINK', 'formcolor', 1).' '; - } - else - { + } else { $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_TEXTLINK, array()), ''); if ($color) print ''; - else - { + else { //print ''; //print ''.$langs->trans("Default").''; print $langs->trans("Default"); @@ -872,8 +819,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; */ - } - else { + } else { $default = (empty($colorbacklinepairhover) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepairhover))); print ''; @@ -886,17 +832,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover)); else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), ''); print $formother->selectColor($color, 'THEME_ELDY_USE_HOVER', 'formcolor', 1).' '; - } - else - { + } else { if ($conf->global->THEME_ELDY_USE_HOVER == '1') $color = colorArrayToHex(colorStringToArray($colorbacklinepairhover)); else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_HOVER, array()), ''); if ($color) { if ($color != colorArrayToHex(colorStringToArray($colorbacklinepairhover))) print ''; else print $langs->trans("Default"); - } - else print $langs->trans("Default"); + } else print $langs->trans("Default"); } print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); @@ -916,9 +859,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print ''; print ''; */ - } - else - { + } else { $default = (empty($colorbacklinepairchecked) ? $langs->trans("Unknown") : colorArrayToHex(colorStringToArray($colorbacklinepairchecked))); print ''; @@ -931,17 +872,14 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), ''); print $formother->selectColor($color, 'THEME_ELDY_USE_CHECKED', 'formcolor', 1).' '; - } - else - { + } else { if ($conf->global->THEME_ELDY_USE_CHECKED == '1') $color = 'e6edf0'; else $color = colorArrayToHex(colorStringToArray($conf->global->THEME_ELDY_USE_CHECKED, array()), ''); if ($color) { if ($color != 'e6edf0') print ''; else print $langs->trans("Default"); - } - else print $langs->trans("Default"); + } else print $langs->trans("Default"); } print '   '.$langs->trans("Default").': '.$default.' '; print $form->textwithpicto('', $langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis")); @@ -961,15 +899,11 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER, 1); - } - else - { + } else { if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { print yn($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER); - } - else - { + } else { print yn(1); if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) print ' ('.$langs->trans("ForcedByGlobalSetup").')'; } @@ -978,9 +912,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc")); print ''; print ''; - } - else - { + } else { /*var_dump($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER); $default=$langs->trans('No'); print ''; @@ -1023,13 +955,10 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) if ($edit) { print $form->selectArray('MAIN_OPTIMIZEFORCOLORBLIND', $colorBlindOptions, $fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND, 0); - } - else - { + } else { if (!empty($fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND) && isset($colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND])) { print $colorBlindOptions[$fuser->conf->MAIN_OPTIMIZEFORCOLORBLIND]; - } - else { + } else { print yn(0); } } @@ -1037,9 +966,7 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false) print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORCOLORBLINDDesc")); print ''; print ''; - } - else - { + } else { } print ''; } diff --git a/htdocs/core/lib/website.lib.php b/htdocs/core/lib/website.lib.php index be3d1dea56d..e0f7f4d50b6 100644 --- a/htdocs/core/lib/website.lib.php +++ b/htdocs/core/lib/website.lib.php @@ -93,9 +93,7 @@ function dolKeepOnlyPhpCode($str) if (!empty($partlings)) { $newstr .= $partlings[0].'?>'; - } - else - { + } else { $newstr .= $part.'?>'; } } @@ -242,8 +240,7 @@ function dolWebsiteOutput($content, $contenttype = 'html', $containerid = '') $content = preg_replace('/^.*]*)*>/ims', '', $content); $content = preg_replace('/<\/body(\s[^>]*)*>.*$/ims', '', $content); } - } - elseif (defined('USEDOLIBARRSERVER')) // REPLACEMENT OF LINKS When page called from Dolibarr server + } elseif (defined('USEDOLIBARRSERVER')) // REPLACEMENT OF LINKS When page called from Dolibarr server { $content = str_replace(']*href=")\/?documents\.php/', '\1/wrapper.php', $content, -1, $nbrep); - } - else - { + } else { // ]*src=")\/?image\//', '\1/medias/image/', $content, -1, $nbrep); $content = preg_replace('/(url\(["\']?)\/?image\//', '\1/medias/image/', $content, -1, $nbrep); @@ -425,9 +419,7 @@ function redirectToContainer($containerref, $containeraliasalt = '', $containeri if ($result > 0) { $containerref = $tmpwebsitepage->pageurl; - } - else - { + } else { print "Error, page contains a redirect to the alternative alias '".$containeraliasalt."' that does not exists in web site (".$website->id." / ".$website->ref.")"; exit; } @@ -463,19 +455,14 @@ function redirectToContainer($containerref, $containeraliasalt = '', $containeri { print "Error, page with uri '.$currenturi.' try a redirect to the same alias page '".$containerref."' in web site '".$website->ref."'"; exit; - } - else - { + } else { $newurl = preg_replace('/&pageref=([^&]+)/', '&pageref='.$containerref, $currenturi); } - } - else - { + } else { $newurl = $currenturi.'&pageref='.urlencode($containerref); } } - } - else // When page called from virtual host server + } else // When page called from virtual host server { $newurl = '/'.$containerref.'.php'; } @@ -487,9 +474,7 @@ function redirectToContainer($containerref, $containeraliasalt = '', $containeri } header("Location: ".$newurl); exit; - } - else - { + } else { print "Error, page contains a redirect to the alias page '".$containerref."' that does not exists in web site (".$website->id." / ".$website->ref.")"; exit; } @@ -549,7 +534,7 @@ function includeContainer($containerref) * Return HTML content to add structured data for an article, news or Blog Post. * Use the json-ld format. * - * @param string $type 'blogpost', 'product', 'software', 'organization', ... + * @param string $type 'blogpost', 'product', 'software', 'organization', 'qa', ... * @param array $data Array of data parameters for structured data * @return string HTML content */ @@ -557,21 +542,27 @@ function getStructuredData($type, $data = array()) { global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs; // Very important. Required to have var available when running inluded containers. + $type = strtolower($type); + if ($type == 'software') { - $ret = ''."\n"; + $ret = ''."\n"; $ret .= ''."\n"; - } - elseif ($type == 'organization') + } elseif ($type == 'organization') { $companyname = $mysoc->name; $url = $mysoc->url; @@ -602,13 +592,12 @@ function getStructuredData($type, $data = array()) $ret .= ",\n"; $ret .= '"sameAs": ['; $i = 0; - foreach($mysoc->socialnetworks as $key => $value) { + foreach ($mysoc->socialnetworks as $key => $value) { if ($key == 'linkedin') { $ret.= '"https://www.'.$key.'.com/company/'.dol_escape_json($value).'"'; } elseif ($key == 'youtube') { $ret.= '"https://www.'.$key.'.com/user/'.dol_escape_json($value).'"'; - } - else { + } else { $ret.= '"https://www.'.$key.'.com/'.dol_escape_json($value).'"'; } $i++; @@ -618,8 +607,7 @@ function getStructuredData($type, $data = array()) } $ret .= '}'."\n"; $ret .= ''."\n"; - } - elseif ($type == 'blogpost') + } elseif ($type == 'blogpost') { if (!empty($websitepage->author_alias)) { @@ -635,7 +623,7 @@ function getStructuredData($type, $data = array()) $pageurl = str_replace('__WEBSITE_KEY__', $website->ref, $pageurl); $title = str_replace('__WEBSITE_KEY__', $website->ref, $title); - $image = 'medias/'.str_replace('__WEBSITE_KEY__', $website->ref, $image); + $image = '/medias/'.str_replace('__WEBSITE_KEY__', $website->ref, $image); $companyname = str_replace('__WEBSITE_KEY__', $website->ref, $companyname); $description = str_replace('__WEBSITE_KEY__', $website->ref, $description); @@ -671,7 +659,7 @@ function getStructuredData($type, $data = array()) $ret .= '"keywords": ['; $i = 0; $arrayofkeywords = explode(',', $websitepage->keywords); - foreach($arrayofkeywords as $keyword) { + foreach ($arrayofkeywords as $keyword) { $ret.= '"'.dol_escape_json($keyword).'"'; $i++; if ($i < count($arrayofkeywords)) $ret .= ', '; @@ -682,8 +670,7 @@ function getStructuredData($type, $data = array()) $ret .= "\n".'}'."\n"; $ret .= ''."\n"; } - } - elseif ($type == 'product') + } elseif ($type == 'product') { $ret = ''."\n"; $ret .= ''."\n"; + } elseif ($type == 'qa') + { + $ret = ''."\n"; + $ret .= ''."\n"; } return $ret; } @@ -749,7 +763,8 @@ function getSocialNetworkSharingLinks() // Reddit $out .= '
'."\n"; // Facebook @@ -793,9 +808,11 @@ function getSocialNetworkSharingLinks() * @param string $sortfield Sort Fields * @param string $sortorder Sort order ('DESC' or 'ASC') * @param string $langcode Language code ('' or 'en', 'fr', 'es', ...) + * @param array $otherfilters Other filters + * @param int $status 0 or 1, or -1 for both * @return string HTML content */ -function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '') +function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = 'null', $status = 1) { global $conf, $db, $hookmanager, $langs, $mysoc, $user, $website, $websitepage, $weblangs; // Very important. Required to have var available when running inluded containers. @@ -804,30 +821,26 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so if (!is_object($weblangs)) $weblangs = $langs; - if (empty($searchstring)) + if (empty($searchstring) && empty($type) && empty($langcode) && empty($otherfilters)) { $error++; $arrayresult['code'] = 'KO'; $arrayresult['message'] = $weblangs->trans("EmptySearchString"); - } - elseif (dol_strlen($searchstring) < 2) - { + } elseif ($searchstring && dol_strlen($searchstring) < 2) { $weblangs->load("errors"); $error++; $arrayresult['code'] = 'KO'; $arrayresult['message'] = $weblangs->trans("ErrorSearchCriteriaTooSmall"); - } - else - { + } else { $tmparrayoftype = explode(',', $type); - foreach ($tmparrayoftype as $tmptype) { + /*foreach ($tmparrayoftype as $tmptype) { if (!in_array($tmptype, array('', 'page', 'blogpost'))) { $error++; $arrayresult['code'] = 'KO'; $arrayresult['message'] = 'Bad value for parameter type'; break; } - } + }*/ } $searchdone = 0; @@ -835,31 +848,40 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so if (!$error && (empty($max) || ($found < $max)) && (preg_match('/meta/', $algo) || preg_match('/content/', $algo))) { - $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'website_page'; - $sql .= " WHERE fk_website = ".$website->id; + $sql = 'SELECT wp.rowid FROM '.MAIN_DB_PREFIX.'website_page as wp'; + if (is_array($otherfilters) && ! empty($otherfilters['category'])) { + $sql .= ', '.MAIN_DB_PREFIX.'categorie_website_page as cwp'; + } + $sql .= " WHERE wp.fk_website = ".$website->id; + if ($status >= 0) { + $sql .= " AND wp.status = ".$status; + } if ($langcode) { - $sql .= " AND lang ='".$db->escape($langcode)."'"; + $sql .= " AND wp.lang ='".$db->escape($langcode)."'"; } if ($type) { $tmparrayoftype = explode(',', $type); $typestring = ''; foreach ($tmparrayoftype as $tmptype) { - $typestring .= ($typestring ? ", " : "")."'".trim($tmptype)."'"; + $typestring .= ($typestring ? ", " : "")."'".$db->escape(trim($tmptype))."'"; } - $sql .= " AND type_container IN (".$typestring.")"; + $sql .= " AND wp.type_container IN (".$typestring.")"; } $sql .= " AND ("; $searchalgo = ''; if (preg_match('/meta/', $algo)) { - $searchalgo .= ($searchalgo ? ' OR ' : '')."title LIKE '%".$db->escape($searchstring)."%' OR description LIKE '%".$db->escape($searchstring)."%'"; - $searchalgo .= ($searchalgo ? ' OR ' : '')."keywords LIKE '".$db->escape($searchstring).",%' OR keywords LIKE '% ".$db->escape($searchstring)."%'"; // TODO Use a better way to scan keywords + $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.title LIKE '%".$db->escape($searchstring)."%' OR wp.description LIKE '%".$db->escape($searchstring)."%'"; + $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.keywords LIKE '".$db->escape($searchstring).",%' OR wp.keywords LIKE '% ".$db->escape($searchstring)."%'"; // TODO Use a better way to scan keywords } if (preg_match('/content/', $algo)) { - $searchalgo .= ($searchalgo ? ' OR ' : '')."content LIKE '%".$db->escape($searchstring)."%'"; + $searchalgo .= ($searchalgo ? ' OR ' : '')."wp.content LIKE '%".$db->escape($searchstring)."%'"; } $sql .= $searchalgo; + if (is_array($otherfilters) && ! empty($otherfilters['category'])) { + $sql .= ' AND cwp.fk_website_page = wp.rowid AND cwp.fk_categorie = '.((int) $otherfilters['category']); + } $sql .= ")"; $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($max); @@ -879,9 +901,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so } $i++; } - } - else - { + } else { $error++; $arrayresult['code'] = $db->lasterrno(); $arrayresult['message'] = $db->lasterror(); @@ -940,9 +960,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so $arrayresult['code'] = 'KO'; $arrayresult['message'] = $weblangs->trans("NoRecordFound"); } - } - else - { + } else { $error++; $arrayresult['code'] = 'KO'; $arrayresult['message'] = 'No supported algorithm found'; @@ -991,9 +1009,7 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify { $urltograbdirrootwithoutslash = getRootURLFromURL($urltograb); $urltograbbis = $urltograbdirrootwithoutslash.$regs[2][$key]; // We use dirroot - } - else - { + } else { $urltograbbis = $urltograb.'/'.$regs[2][$key]; // We use dir of grabbed file } @@ -1029,15 +1045,12 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify $error++; setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors'); $action = 'create'; - } - elseif ($tmpgeturl['http_code'] != '200') + } elseif ($tmpgeturl['http_code'] != '200') { $error++; setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors'); $action = 'create'; - } - else - { + } else { $alreadygrabbed[$urltograbbis] = 1; // Track that file was alreay grabbed. dol_mkdir(dirname($filetosave)); @@ -1068,9 +1081,7 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify { $urltograbdirrootwithoutslash = getRootURLFromURL($urltograb); $urltograbbis = $urltograbdirrootwithoutslash.$regs[2][$key]; // We use dirroot - } - else - { + } else { $urltograbbis = $urltograb.'/'.$regs[2][$key]; // We use dir of grabbed file } @@ -1108,15 +1119,12 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify $error++; setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['curl_error_msg'], null, 'errors'); $action = 'create'; - } - elseif ($tmpgeturl['http_code'] != '200') + } elseif ($tmpgeturl['http_code'] != '200') { $error++; setEventMessages('Error getting '.$urltograbbis.': '.$tmpgeturl['http_code'], null, 'errors'); $action = 'create'; - } - else - { + } else { $alreadygrabbed[$urltograbbis] = 1; // Track that file was alreay grabbed. dol_mkdir(dirname($filetosave)); diff --git a/htdocs/core/lib/website2.lib.php b/htdocs/core/lib/website2.lib.php index 84a30c13d0a..673b904b743 100644 --- a/htdocs/core/lib/website2.lib.php +++ b/htdocs/core/lib/website2.lib.php @@ -197,18 +197,21 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage) } } } + } else { + dol_print_error($db); } - else dol_print_error($db); $tplcontent .= ''."\n"; } - // Add manifest.json on homepage + // Add manifest.json. Do we have to add it only on home page ? $tplcontent .= 'use_manifest) { print \'\'."\n"; } ?>'."\n"; $tplcontent .= ''."\n"; + // Add js $tplcontent .= ''."\n"; $tplcontent .= ''."\n"; $tplcontent .= ''."\n"; + // Add headers $tplcontent .= ''."\n"; - $tplcontent .= '/ims\', \'\', file_get_contents(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")); ?>'."\n"; + $tplcontent .= ''."\n"; $tplcontent .= ''."\n"; $tplcontent .= preg_replace('/<\/?html>/ims', '', $objectpage->htmlheader)."\n"; $tplcontent .= ''."\n"; @@ -268,8 +271,7 @@ function dolSaveIndexPage($pathofwebsite, $fileindex, $filetpl, $filewrapper) if (!empty($conf->global->MAIN_UMASK)) { @chmod($fileindex, octdec($conf->global->MAIN_UMASK)); } - } - else { + } else { $result1 = true; } @@ -532,8 +534,7 @@ function showWebsiteTemplates(Website $website) } } } - } - else { + } else { print ''.$langs->trans("None").''; } diff --git a/htdocs/core/lib/ws.lib.php b/htdocs/core/lib/ws.lib.php index 912f0f16cea..ad16755f617 100644 --- a/htdocs/core/lib/ws.lib.php +++ b/htdocs/core/lib/ws.lib.php @@ -58,8 +58,7 @@ function check_authentication($authentication, &$error, &$errorcode, &$errorlabe { $error++; $errorcode = 'ERROR_FETCH_USER'; $errorlabel = 'A technical error occurred during fetch of user'; - } - elseif ($result == 0) + } elseif ($result == 0) { $error++; $errorcode = 'BAD_CREDENTIALS'; $errorlabel = 'Bad value for login or password'; diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php index 3d8120a6d29..e7252ac2171 100644 --- a/htdocs/core/lib/xcal.lib.php +++ b/htdocs/core/lib/xcal.lib.php @@ -229,9 +229,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) { $enddate = dol_time_plus_duree($startdate, 1, "d"); } - } - else - { + } else { if (empty($enddate)) { $enddate = $startdate + $duration; @@ -315,9 +313,7 @@ function build_calfile($format, $title, $desc, $events_array, $outputfile) { @chmod($outputfile, octdec($conf->global->MAIN_UMASK)); } - } - else - { + } else { dol_syslog("xcal.lib.php::build_calfile Failed to open file ".$outputfile." for writing"); return -2; } @@ -528,9 +524,7 @@ function calEncode($line) } $out .= $newpara; - } - else - { + } else { $strlength = dol_strlen($line); for ($j = 0; $j < $strlength; $j++) diff --git a/htdocs/core/login/functions_dolibarr.php b/htdocs/core/login/functions_dolibarr.php index ea3fa2f3a19..52e50a504af 100644 --- a/htdocs/core/login/functions_dolibarr.php +++ b/htdocs/core/login/functions_dolibarr.php @@ -45,6 +45,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes if (!empty($usertotest)) { + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; dol_syslog("functions_dolibarr::check_user_password_dolibarr usertotest=".$usertotest." passwordtotest=".preg_replace('/./', '*', $passwordtotest)." entitytotest=".$entitytotest); // If test username/password asked, we define $test=false if ko and $login var to login if ok, set also $_SESSION["dol_loginmesg"] if ko @@ -53,14 +54,15 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes $usernamecol2 = 'email'; $entitycol = 'entity'; - $sql = 'SELECT rowid, login, entity, pass, pass_crypted'; + $sql = 'SELECT rowid, login, entity, pass, pass_crypted, datestartvalidity, dateendvalidity'; $sql .= ' FROM '.$table; $sql .= ' WHERE ('.$usernamecol1." = '".$db->escape($usertotest)."'"; if (preg_match('/@/', $usertotest)) $sql .= ' OR '.$usernamecol2." = '".$db->escape($usertotest)."'"; $sql .= ') AND '.$entitycol." IN (0,".($entity ? $entity : 1).")"; $sql .= ' AND statut = 1'; - // Required to first found the user into entity, then the superadmin. - // For the case (TODO and that we must avoid) a user has renamed its login with same value than a user in entity 0. + // Note: Test on validity is done later + // Required to firstly found the user into entity, then the superadmin. + // For the case (TODO we must avoid that) a user has renamed its login with same value than a user in entity 0. $sql .= ' ORDER BY entity DESC'; $resql = $db->query($sql); @@ -69,6 +71,20 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes $obj = $db->fetch_object($resql); if ($obj) { + $now = dol_now(); + if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) { + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } + if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) { + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } + $passclear = $obj->pass; $passcrypted = $obj->pass_crypted; $passtyped = $passwordtotest; @@ -79,19 +95,19 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes $cryptType = ''; if (!empty($conf->global->DATABASE_PWD_ENCRYPTED)) $cryptType = $conf->global->DATABASE_PWD_ENCRYPTED; - // By default, we used MD5 - if (!in_array($cryptType, array('md5'))) $cryptType = 'md5'; + // By default, we use default setup for encryption rule + if (!in_array($cryptType, array('auto'))) $cryptType = 'auto'; // Check crypted password according to crypt algorithm - if ($cryptType == 'md5') + if ($cryptType == 'auto') { - if (dol_verifyHash($passtyped, $passcrypted)) + if (dol_verifyHash($passtyped, $passcrypted, '0')) { $passok = true; dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentification ok - ".$cryptType." of pass is ok"); } } - // For compatibility with old versions + // For compatibility with very old versions if (!$passok) { if ((!$passcrypted || $passtyped) @@ -106,9 +122,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes if ($passok) { $login = $obj->login; - } - else - { + } else { sleep(2); // Anti brut force protection dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO bad password for '".$usertotest."', cryptType=".$cryptType, LOG_NOTICE); @@ -124,8 +138,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes global $mc; if (!isset($mc)) $conf->multicompany->enabled = false; // Global not available, disable $conf->multicompany->enabled for safety - else - { + else { $ret = $mc->checkRight($obj->rowid, $entitytotest); if ($ret < 0) { @@ -134,9 +147,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes } } } - } - else - { + } else { dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO user not found for '".$usertotest."'", LOG_NOTICE); sleep(1); @@ -145,9 +156,7 @@ function check_user_password_dolibarr($usertotest, $passwordtotest, $entitytotes $_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword"); } - } - else - { + } else { dol_syslog("functions_dolibarr::check_user_password_dolibarr Authentication KO db error for '".$usertotest."' error=".$db->lasterror(), LOG_ERR); sleep(1); $_SESSION["dol_loginmesg"] = $db->lasterror(); diff --git a/htdocs/core/login/functions_http.php b/htdocs/core/login/functions_http.php index 45167fc21c9..7b2eebb0426 100644 --- a/htdocs/core/login/functions_http.php +++ b/htdocs/core/login/functions_http.php @@ -33,12 +33,33 @@ */ function check_user_password_http($usertotest, $passwordtotest, $entitytotest) { + global $db, $langs; + dol_syslog("functions_http::check_user_password_http _SERVER[REMOTE_USER]=".(empty($_SERVER["REMOTE_USER"]) ? '' : $_SERVER["REMOTE_USER"])); $login = ''; if (!empty($_SERVER["REMOTE_USER"])) { $login = $_SERVER["REMOTE_USER"]; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + + $tmpuser = new User($db); + $tmpuser->fetch('', $login, '', 1, ($entitytotest > 0 ? $entitytotest : -1)); + + $now = dol_now(); + if ($tmpuser->datestartvalidity && $db->jdate($tmpuser->datestartvalidity) >= $now) { + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } + if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) { + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } } return $login; diff --git a/htdocs/core/login/functions_ldap.php b/htdocs/core/login/functions_ldap.php index 3a8b274c109..287563b01c3 100644 --- a/htdocs/core/login/functions_ldap.php +++ b/htdocs/core/login/functions_ldap.php @@ -126,9 +126,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) $_SESSION["dol_loginmesg"] = $langs->trans("YouMustChangePassNextLogon", $usertotest, $ldap->domainFQDN); return ''; } - } - else - { + } else { if ($ldapdebug) print "DEBUG: ".$ldap->error."
\n"; } $ldap->close(); @@ -153,6 +151,27 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) dol_syslog("functions_ldap::check_user_password_ldap Authentification ok"); $login = $usertotest; + require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; + + $tmpuser = new User($db); + $tmpuser->fetch('', $login, '', 1, ($entitytotest > 0 ? $entitytotest : -1)); + + $now = dol_now(); + if ($tmpuser->datestartvalidity && $db->jdate($tmpuser->datestartvalidity) >= $now) { + $ldap->close(); + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } + if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) { + $ldap->close(); + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } + // ldap2dolibarr synchronisation if ($login && !empty($conf->ldap->enabled) && $conf->global->LDAP_SYNCHRO_ACTIVE == 'ldap2dolibarr') // ldap2dolibarr synchronisation { @@ -190,6 +209,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) //$resultUpdate = $usertmp->update_ldap2dolibarr($ldap); } + unset($usertmp); } @@ -218,9 +238,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest) $_SESSION["dol_loginmesg"] = $langs->trans("ErrorBadLoginPassword"); } - } - else - { + } else { /* Login failed. Return false, together with the error code and text from ** the LDAP server. The common error codes and reasons are listed below : ** (for iPlanet, other servers may differ) diff --git a/htdocs/core/login/functions_openid.php b/htdocs/core/login/functions_openid.php index a401dfd7764..e5e66a7fc80 100644 --- a/htdocs/core/login/functions_openid.php +++ b/htdocs/core/login/functions_openid.php @@ -36,7 +36,7 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/openid.class.php'; */ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) { - global $_POST, $db, $conf, $langs; + global $db, $conf, $langs; dol_syslog("functions_openid::check_user_password_openid usertotest=".$usertotest); @@ -56,10 +56,8 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) { $openid->SetApprovedURL($protocol.$_SERVER["HTTP_HOST"].$_SERVER["SCRIPT_NAME"]); // Send Response from OpenID server to this script $openid->Redirect(); // This will redirect user to OpenID Server - } - else - { - $error = $openid->GetError(); + } else { + $_SESSION["dol_loginmesg"] = $openid->GetError(); return false; } return false; @@ -74,7 +72,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) { // OK HERE KEY IS VALID - $sql = "SELECT login"; + $sql = "SELECT login, entity, datestartvalidity, dateendvalidity"; $sql .= " FROM ".MAIN_DB_PREFIX."user"; $sql .= " WHERE openid = '".$db->escape($_GET['openid_identity'])."'"; $sql .= " AND entity IN (0,".($_SESSION["dol_entity"] ? $_SESSION["dol_entity"] : 1).")"; @@ -86,24 +84,34 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest) $obj = $db->fetch_object($resql); if ($obj) { + $now = dol_now(); + if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) { + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } + if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) { + // Load translation files required by the page + $langs->loadLangs(array('main', 'errors')); + $_SESSION["dol_loginmesg"] = $langs->trans("ErrorLoginDateValidity"); + return '--bad-login-validity--'; + } + $login = $obj->login; } } - } - elseif ($openid->IsError() === true) + } elseif ($openid->IsError() === true) { // ON THE WAY, WE GOT SOME ERROR - $error = $openid->GetError(); + $_SESSION["dol_loginmesg"] = $openid->GetError(); return false; - } - else - { + } else { // Signature Verification Failed //echo "INVALID AUTHORIZATION"; return false; } - } - elseif ($_GET['openid_mode'] == 'cancel') + } elseif ($_GET['openid_mode'] == 'cancel') { // User Canceled your Request //echo "USER CANCELED REQUEST"; diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index ec75b35073c..818198fc035 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -258,7 +258,8 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2454__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_journal', 2451__+MAX_llx_menu__, '/accountancy/admin/journals_list.php?id=35&mainmenu=accountancy&leftmenu=accountancy_admin', 'AccountingJournals', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 20, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2455__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chartmodel', 2451__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'Pcg_version', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 30, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2456__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart', 2451__+MAX_llx_menu__, '/accountancy/admin/account.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'Chartofaccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 40, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2457__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart_group', 2451__+MAX_llx_menu__, '/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin', 'AccountingCategory', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 41, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2456__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chartsubledger',2451__+MAX_llx_menu__, '/accountancy/admin/subaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'ChartOfSubaccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 41, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2457__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_chart_group', 2451__+MAX_llx_menu__, '/accountancy/admin/categories_list.php?id=32&mainmenu=accountancy&leftmenu=accountancy_admin', 'AccountingCategory', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 45, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2458__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_default', 2451__+MAX_llx_menu__, '/accountancy/admin/defaultaccounts.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuDefaultAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 50, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin"', __HANDLER__, 'left', 2459__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_vat', 2451__+MAX_llx_menu__, '/compta/bank/list.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'MenuBankAccounts', 2, 'accountancy', '$user->rights->accounting->chartofaccount', '', 0, 51, __ENTITY__); @@ -273,25 +274,27 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left -- Accounting period insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_admin" && $conf->global->MAIN_FEATURES_LEVEL > 0', __HANDLER__, 'left', 2450__+MAX_llx_menu__, 'accountancy', 'accountancy_admin_period', 2451__+MAX_llx_menu__, '/accountancy/admin/fiscalyear.php?mainmenu=accountancy&leftmenu=accountancy_admin', 'FiscalPeriod', 1, 'admin', '', '', 2, 80, __ENTITY__); -- Binding - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 2, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 3, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 4, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)', __HANDLER__, 'left', 2401__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_customer', 2400__+MAX_llx_menu__, '/accountancy/customer/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_customer', 'CustomersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 2, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES) && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2402__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 3, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->facture->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES) && $leftmenu=="accountancy_dispatch_customer"', __HANDLER__, 'left', 2403__+MAX_llx_menu__, 'accountancy', '', 2401__+MAX_llx_menu__, '/accountancy/customer/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 4, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)', __HANDLER__, 'left', 2410__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_supplier', 2400__+MAX_llx_menu__, '/accountancy/supplier/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_supplier', 'SuppliersVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2411__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES) && $leftmenu=="accountancy_dispatch_supplier"', __HANDLER__, 'left', 2412__+MAX_llx_menu__, 'accountancy', '', 2410__+MAX_llx_menu__, '/accountancy/supplier/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)', __HANDLER__, 'left', 2420__+MAX_llx_menu__, 'accountancy', 'accountancy_dispatch_expensereport', 2400__+MAX_llx_menu__, '/accountancy/expensereport/index.php?mainmenu=accountancy&leftmenu=accountancy_dispatch_expensereport', 'ExpenseReportsVentilation', 1, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 5, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2421__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/list.php?mainmenu=accountancy', 'ToDispatch', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 6, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $conf->expensereport->enabled && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS) && $leftmenu=="accountancy_dispatch_expensereport"', __HANDLER__, 'left', 2422__+MAX_llx_menu__, 'accountancy', '', 2420__+MAX_llx_menu__, '/accountancy/expensereport/lines.php?mainmenu=accountancy', 'Dispatched', 2, 'accountancy', '$user->rights->accounting->bind->write', '', 0, 7, __ENTITY__); -- Journals --insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2705__+MAX_llx_menu__, 'accountancy', '', 2400__+MAX_llx_menu__, '', 'Journalization', 1, 'main', '$user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); --insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2707__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/bankjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=3', 'BankJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__); --insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2708__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/expensereportsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=6', 'ExpenseReportJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 2, __ENTITY__); --insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2709__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/purchasesjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=2', 'PurchasesJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 3, __ENTITY__); --insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2706__+MAX_llx_menu__, 'accountancy', '', 2705__+MAX_llx_menu__, '/accountancy/journal/sellsjournal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal=1', 'SellsJournal', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 4, __ENTITY__); - -- General Ledger - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__); -- Balance - insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__); + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2430__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 10, __ENTITY__); + -- General Ledger + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2432__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/listbyaccount.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Bookkeeping', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 12, __ENTITY__); + -- Journals + insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2434__+MAX_llx_menu__, 'accountancy', 'bookkeeping', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/list.php?mainmenu=accountancy&leftmenu=accountancy_bookeeping', 'Journals', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 15, __ENTITY__); -- Export accounting documents insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled || $conf->accounting->enabled', __HANDLER__, 'left', 2436__+MAX_llx_menu__, 'accountancy', 'accountancy_files', 2400__+MAX_llx_menu__, '/compta/accounting-files.php?mainmenu=accountancy&leftmenu=accountancy_files', 'AccountantFiles', 1, 'accountancy', '$user->rights->compta->resultat->lire || $user->rights->accounting->mouvements->lire', '', 0, 17, __ENTITY__); -- Reports @@ -316,19 +319,26 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->asset->enabled && $leftmenu=="asset"', __HANDLER__, 'left', 3001__+MAX_llx_menu__, 'asset', '', 3000__+MAX_llx_menu__, '/asset/card.php?mainmenu=accountancy&leftmenu=asset&action=create', 'MenuNewAsset', 2, 'assets', '$user->rights->asset->write', '', 0, 21, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->asset->enabled && $leftmenu=="asset"', __HANDLER__, 'left', 3003__+MAX_llx_menu__, 'asset', '', 3000__+MAX_llx_menu__, '/asset/list.php?mainmenu=accountancy&leftmenu=asset', 'MenuListAssets', 2, 'assets', '$user->rights->asset->read', '', 0, 22, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->asset->enabled && $leftmenu=="asset"', __HANDLER__, 'left', 3004__+MAX_llx_menu__, 'asset', 'asset_type', 3000__+MAX_llx_menu__, '/asset/type.php?mainmenu=accountancy&leftmenu=asset', 'MenuTypeAssets', 2, 'assets', '$user->rights->asset->read', '', 0, 23, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->asset->enabled && $leftmenu=="asset"', __HANDLER__, 'left', 3005__+MAX_llx_menu__, 'asset', '', 3004__+MAX_llx_menu__, '/asset/type.php?mainmenu=accountancy&action=create', 'MenuNewTypeAssets', 3, 'assets', '$user->rights->asset->configurer', '', 0, 24, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->asset->enabled && $leftmenu=="asset"', __HANDLER__, 'left', 3005__+MAX_llx_menu__, 'asset', '', 3004__+MAX_llx_menu__, '/asset/type.php?mainmenu=accountancy&action=create', 'MenuNewTypeAssets', 3, 'assets', '$user->rights->asset->setup_advance', '', 0, 24, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->asset->enabled && $leftmenu=="asset"', __HANDLER__, 'left', 3006__+MAX_llx_menu__, 'asset', '', 3004__+MAX_llx_menu__, '/asset/type.php?mainmenu=accountancy', 'MenuListTypeAssets', 3, 'assets', '$user->rights->asset->read', '', 0, 25, __ENTITY__); -- Check deposit insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?mainmenu=bank&leftmenu=checks', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?mainmenu=bank&leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/list.php?mainmenu=bank&leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__); --- Withdrawal -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=withdraw', 'StandingOrders', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__); +-- PaymentByDirectDebit +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=withdraw', 'PaymentByDirectDebit', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/bons.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2504__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2506__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=withdraw', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2507__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=withdraw', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__); +-- PaymentByCreditTransfer +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2510__+MAX_llx_menu__, 'accountancy', 'banktransfer', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'PaymentByBankTransfer', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2512__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2513__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2514__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2516__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2517__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__); -- Bank insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled', __HANDLER__, 'left', 2600__+MAX_llx_menu__, 'accountancy', 'bank', 14__+MAX_llx_menu__, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', 0, 'banks', '$user->rights->banque->lire', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2601__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/card.php?mainmenu=bank&action=create&leftmenu=bank', 'MenuNewFinancialAccount', 1, 'banks', '$user->rights->banque->configurer', '', 0, 0, __ENTITY__); @@ -382,8 +392,9 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4202__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/list.php', 'List', 1, 'members', '$user->rights->adherent->lire', '', 2, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4203__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=-1', 'MenuMembersToValidate', 2, 'members', '$user->rights->adherent->lire', '', 2, 2, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4204__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1', 'MenuMembersValidated', 2, 'members', '$user->rights->adherent->lire', '', 2, 3, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=outofdate', 'MenuMembersNotUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=uptodate', 'MenuMembersUpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=withoutsubscription', 'WithoutSubscription', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4205__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=outofdate', 'UpToDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 4, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4206__+MAX_llx_menu__, 'members', '', 4204__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=1&filter=uptodate', 'OutOfDate', 2, 'members', '$user->rights->adherent->lire', '', 2, 5, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4207__+MAX_llx_menu__, 'members', '', 4202__+MAX_llx_menu__, '/adherents/list.php?mainmenu=members&leftmenu=members&statut=0', 'MenuMembersResiliated', 2, 'members', '$user->rights->adherent->lire', '', 2, 6, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->adherent->enabled', __HANDLER__, 'left', 4208__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/stats/geo.php?mainmenu=members&leftmenu=members&mode=memberbycountry', 'MenuMembersStats', 1, 'members', '$user->rights->adherent->lire', '', 2, 7, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '! empty($conf->global->MEMBER_LINK_TO_HTPASSWDFILE) && $conf->adherent->enabled', __HANDLER__, 'left', 4502__+MAX_llx_menu__, 'members', '', 4200__+MAX_llx_menu__, '/adherents/htpasswd.php?mainmenu=members&leftmenu=export', 'Filehtpasswd', 1, 'members', '$user->rights->adherent->export', '', 2, 9, __ENTITY__); @@ -405,7 +416,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->hrm->enabled', __HANDLER__, 'left', 4602__+MAX_llx_menu__, 'hrm', '', 4600__+MAX_llx_menu__, '/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist', 'List', 1, 'hrm', '$user->rights->hrm->employee->read', '', 0, 2, __ENTITY__); -- HRM - Holiday insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5000__+MAX_llx_menu__, 'hrm', 'hrm', 15__+MAX_llx_menu__, '/holiday/list.php?mainmenu=hrm&leftmenu=hrm', 'CPTitreMenu', 0, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); -insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?mainmenu=hrm&action=request', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); +insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5001__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/card.php?mainmenu=hrm&action=create', 'MenuAddCP', 1, 'holiday', '$user->rights->holiday->write', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5002__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/list.php?mainmenu=hrm&leftmenu=hrm', 'List', 1, 'holiday', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5003__+MAX_llx_menu__, 'hrm', '', 5002__+MAX_llx_menu__, '/holiday/list.php?mainmenu=hrm&search_statut=2&leftmenu=hrm', 'ListToApprove', 2, 'trips', '$user->rights->holiday->read', '', 0, 1, __ENTITY__); insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->holiday->enabled', __HANDLER__, 'left', 5004__+MAX_llx_menu__, 'hrm', '', 5000__+MAX_llx_menu__, '/holiday/define_holiday.php?mainmenu=hrm&action=request', 'MenuConfCP', 1, 'holiday', '$user->rights->holiday->define_holiday', '', 0, 2, __ENTITY__); diff --git a/htdocs/core/menus/standard/auguria.lib.php b/htdocs/core/menus/standard/auguria.lib.php index e55da6f93ac..a124759faa8 100644 --- a/htdocs/core/menus/standard/auguria.lib.php +++ b/htdocs/core/menus/standard/auguria.lib.php @@ -116,8 +116,7 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout if (!empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname = 'class="tmenusel"'; elseif (!empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname = 'class="tmenusel"'; else $classname = 'class="tmenu"'; - } - elseif ($showmode == 2) $classname = 'class="tmenu"'; + } elseif ($showmode == 2) $classname = 'class="tmenu"'; $menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target'] ? $newTabMenu[$i]['target'] : $atarget), ($newTabMenu[$i]['mainmenu'] ? $newTabMenu[$i]['mainmenu'] : $newTabMenu[$i]['rowid']), ($newTabMenu[$i]['leftmenu'] ? $newTabMenu[$i]['leftmenu'] : ''), $newTabMenu[$i]['position'], $id, $idsel, $classname); } @@ -145,8 +144,7 @@ function print_auguria_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); }*/ - else - { + else { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_512x512_white.png'; $logoContainerAdditionalClass = ''; } @@ -357,8 +355,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t } $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); $db->free($resql); } @@ -388,13 +385,16 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t $nature = ''; // Must match array $sourceList defined into journals_list.php - if ($objp->nature == 2 && ! empty($conf->facture->enabled)) $nature="sells"; - if ($objp->nature == 3 && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled))) $nature="purchases"; - if ($objp->nature == 4 && ! empty($conf->banque->enabled)) $nature="bank"; - if ($objp->nature == 5 && ! empty($conf->expensereport->enabled)) $nature="expensereports"; - if ($objp->nature == 1) $nature="various"; - if ($objp->nature == 8) $nature="inventory"; - if ($objp->nature == 9) $nature="hasnew"; + if ($objp->nature == 2 && !empty($conf->facture->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_SALES)) $nature = "sells"; + if ($objp->nature == 3 + && (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_invoice->enabled)) + && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_PURCHASES)) + $nature = "purchases"; + if ($objp->nature == 4 && !empty($conf->banque->enabled)) $nature = "bank"; + if ($objp->nature == 5 && !empty($conf->expensereport->enabled) && empty($conf->global->ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS)) $nature = "expensereports"; + if ($objp->nature == 1) $nature = "various"; + if ($objp->nature == 8) $nature = "inventory"; + if ($objp->nature == 9) $nature = "hasnew"; // To enable when page exists if (empty($conf->global->ACCOUNTANCY_SHOW_DEVELOP_JOURNAL)) @@ -410,14 +410,11 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t } $i++; } - } - else - { + } else { // Should not happend. Entries are added $newmenu->add('', $langs->trans("NoJournalDefined"), 2, $user->rights->accounting->comptarapport->lire); } - } - else dol_print_error($db); + } else dol_print_error($db); $db->free($resql); } @@ -473,9 +470,7 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t if ($altok % 2 == 0) { print '
'."\n"; - } - else - { + } else { print '
'."\n"; } } @@ -533,14 +528,11 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t else print ''; print '
'."\n"; $lastlevel0 = 'enabled'; - } - elseif ($showmenu) // Not enabled but visible (so greyed) + } elseif ($showmenu) // Not enabled but visible (so greyed) { print ''."\n"; $lastlevel0 = 'greyed'; - } - else - { + } else { $lastlevel0 = 'hidden'; } if ($showmenu) @@ -559,15 +551,14 @@ function print_left_auguria_menu($db, $menu_array_before, $menu_array_after, &$t { print ''."\n"; - } - elseif ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. + } elseif ($showmenu && $lastlevel0 == 'enabled') // Not enabled but visible (so greyed), except if parent was not enabled. { print ''."\n"; } diff --git a/htdocs/core/menus/standard/auguria_menu.php b/htdocs/core/menus/standard/auguria_menu.php index 2a67d43c1e3..5b7aa913350 100644 --- a/htdocs/core/menus/standard/auguria_menu.php +++ b/htdocs/core/menus/standard/auguria_menu.php @@ -68,37 +68,33 @@ class MenuManager global $conf, $user, $langs; // On sauve en session le menu principal choisi - if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"] = $_GET["mainmenu"]; - if (isset($_GET["idmenu"])) $_SESSION["idmenu"] = $_GET["idmenu"]; + if (GETPOSTISSET("mainmenu")) $_SESSION["mainmenu"] = GETPOST("mainmenu", 'aZ09'); + if (GETPOSTISSET("idmenu")) $_SESSION["idmenu"] = GETPOST("idmenu", 'int'); // Read mainmenu and leftmenu that define which menu to show - if (isset($_GET["mainmenu"])) + if (GETPOSTISSET("mainmenu")) { // On sauve en session le menu principal choisi - $mainmenu = $_GET["mainmenu"]; + $mainmenu = GETPOST("mainmenu", 'aZ09'); $_SESSION["mainmenu"] = $mainmenu; $_SESSION["leftmenuopened"] = ""; - } - else - { + } else { // On va le chercher en session si non defini par le lien $mainmenu = isset($_SESSION["mainmenu"]) ? $_SESSION["mainmenu"] : ''; } if (!empty($forcemainmenu)) $mainmenu = $forcemainmenu; - if (isset($_GET["leftmenu"])) + if (GETPOSTISSET("leftmenu")) { // On sauve en session le menu principal choisi - $leftmenu = $_GET["leftmenu"]; + $leftmenu = GETPOST("leftmenu", 'aZ09'); $_SESSION["leftmenu"] = $leftmenu; if ($_SESSION["leftmenuopened"] == $leftmenu) // To collapse { //$leftmenu=""; $_SESSION["leftmenuopened"] = ""; - } - else - { + } else { $_SESSION["leftmenuopened"] = $leftmenu; } } else { @@ -145,9 +141,7 @@ class MenuManager { if ($mode == 'top') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); if ($mode == 'left') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0, '', '', $moredata); - } - else - { + } else { $conf->global->MAIN_SHOW_LOGO = 0; if ($mode == 'top') print_left_auguria_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0); if ($mode == 'left') print_auguria_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode); @@ -210,8 +204,7 @@ class MenuManager { if (in_array($val['mainmenu'], array('cashdesk', 'externalsite', 'website', 'collab'))) print $langs->trans("Access"); else print $langs->trans("Dashboard"); - } - else print $langs->trans(ucfirst($val['mainmenu'])."Dashboard"); + } else print $langs->trans(ucfirst($val['mainmenu'])."Dashboard"); print ''; print ''."\n"; } @@ -221,13 +214,10 @@ class MenuManager if ($val['enabled']) { $lastlevel[0] = 'enabled'; - } - elseif ($showmenu) // Not enabled but visible (so greyed) + } elseif ($showmenu) // Not enabled but visible (so greyed) { $lastlevel[0] = 'greyed'; - } - else - { + } else { $lastlevel[0] = 'hidden'; } } @@ -258,9 +248,7 @@ class MenuManager if (!preg_match("/^(http:\/\/|https:\/\/)/i", $val2['url'])) { $relurl2 = dol_buildpath($val2['url'], 1); - } - else - { + } else { $relurl2 = $val2['url']; } $canonurl2 = preg_replace('/\?.*$/', '', $val2['url']); @@ -285,21 +273,16 @@ class MenuManager //print ' data-ajax="false"'; print '>'; $lastlevel2[$val2['level']] = 'enabled'; - } - else // Not allowed but visible (greyed) + } else // Not allowed but visible (greyed) { print ''; $lastlevel2[$val2['level']] = 'greyed'; } - } - else - { + } else { if ($val2['enabled']) // Allowed { $lastlevel2[$val2['level']] = 'enabled'; - } - else - { + } else { $lastlevel2[$val2['level']] = 'greyed'; } } @@ -308,8 +291,7 @@ class MenuManager { if ($val2['enabled']) // Allowed print ''; - else - print ''; + else print ''; } print ''."\n"; } diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index e07bbcac70e..5e4b98f7461 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -56,19 +56,19 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = if (empty($noout)) print_start_menu_array(); - $usemenuhider = 1; + $usemenuhider = 1; // Show/Hide vertical menu. The hamburger icon for .menuhider action. if ($mode != 'jmobile' && $mode != 'topnb' && $usemenuhider && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { - $showmode = 1; - $classname = 'class="tmenu menuhider"'; - $idsel = 'menu'; + $showmode = 1; + $classname = 'class="tmenu menuhider"'; + $idsel = 'menu'; - $menu->add('#', (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE) ? '' : ''), 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); + $menu->add('#', (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE) ? '' : ''), 0, $showmode, $atarget, "xxx", '', 0, $id, $idsel, $classname); } - $menu_arr = array(); + $menu_arr = array(); // Home $menu_arr[] = array( @@ -92,9 +92,9 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Members $tmpentry = array( - 'enabled' => (!empty($conf->adherent->enabled)), - 'perms' => (!empty($user->rights->adherent->lire)), - 'module' => 'adherent' + 'enabled' => (!empty($conf->adherent->enabled)), + 'perms' => (!empty($user->rights->adherent->lire)), + 'module' => 'adherent' ); $menu_arr[] = array( 'name' => 'Members', @@ -117,13 +117,13 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Third parties $tmpentry = array( - 'enabled'=> ((!empty($conf->societe->enabled) && - (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) - ) - || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) - ), - 'perms'=> (!empty($user->rights->societe->lire) || !empty($user->rights->fournisseur->lire)), - 'module'=>'societe|fournisseur' + 'enabled'=> ((!empty($conf->societe->enabled) && + (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) + ) + || (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled) || !empty($conf->supplier_invoice->enabled)) + ), + 'perms'=> (!empty($user->rights->societe->lire) || !empty($user->rights->fournisseur->lire)), + 'module'=>'societe|fournisseur' ); $menu_arr[] = array( 'name' => 'Companies', @@ -148,7 +148,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = $tmpentry = array( 'enabled'=> (!empty($conf->product->enabled) || !empty($conf->service->enabled) || !empty($conf->expedition->enabled)), 'perms'=> (!empty($user->rights->produit->lire) || !empty($user->rights->service->lire) || !empty($user->rights->expedition->lire)), - 'module'=>'product|service' + 'module'=>'product|service' ); $menu_arr[] = array( 'name' => 'Products', @@ -157,7 +157,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = ? (array("TMenuProducts", " | ", "TMenuServices")) : (!empty($conf->product->enabled) ? "TMenuProducts" : "TMenuServices"), 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "products", 'leftmenu' => '', @@ -171,36 +171,36 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'submenus' => array(), ); - // MRP + // MRP - GPAO $tmpentry = array( - 'enabled'=>(!empty($conf->bom->enabled) || !empty($conf->mrp->enabled)), - 'perms'=>(!empty($user->rights->bom->read) || !empty($user->rights->mrp->read)), - 'module'=>'bom|mrp' + 'enabled'=>(!empty($conf->bom->enabled) || !empty($conf->mrp->enabled)), + 'perms'=>(!empty($user->rights->bom->read) || !empty($user->rights->mrp->read)), + 'module'=>'bom|mrp' ); $menu_arr[] = array( - 'name' => 'TMenuMRP', - 'link' => '/mrp/index.php?mainmenu=mrp&leftmenu=', - 'title' => "TMenuMRP", - 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), - 'target' => $atarget, - 'mainmenu' => "mrp", - 'leftmenu' => '', - 'position' => 30, - 'id' => $id, - 'idsel' => 'mrp', - 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "mrp") ? 'class="tmenusel"' : 'class="tmenu"', - 'prefix' => '', - 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "mrp") ? 0 : 1), - 'loadLangs' => array("mrp"), - 'submenus' => array(), + 'name' => 'TMenuMRP', + 'link' => '/mrp/index.php?mainmenu=mrp&leftmenu=', + 'title' => "TMenuMRP", + 'level' => 0, + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'target' => $atarget, + 'mainmenu' => "mrp", + 'leftmenu' => '', + 'position' => 31, + 'id' => $id, + 'idsel' => 'mrp', + 'classname' => $classname = ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "mrp") ? 'class="tmenusel"' : 'class="tmenu"', + 'prefix' => '', + 'session' => (($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "mrp") ? 0 : 1), + 'loadLangs' => array("mrp"), + 'submenus' => array(), ); // Projects $tmpentry = array( - 'enabled'=> (!empty($conf->projet->enabled) ? 1 : 0), - 'perms'=> (!empty($user->rights->projet->lire) ? 1 : 0), - 'module'=>'projet' + 'enabled'=> (!empty($conf->projet->enabled) ? 1 : 0), + 'perms'=> (!empty($user->rights->projet->lire) ? 1 : 0), + 'module'=>'projet' ); $menu_arr[] = array( 'name' => 'Projet', @@ -209,7 +209,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = ? (($conf->global->PROJECT_USE_OPPORTUNITIES == 2) ? "Leads" : "Projects") : "Projects", 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "project", 'leftmenu' => '', @@ -223,27 +223,23 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'submenus' => array(), ); - // Commercial + // Commercial (propal, commande, supplier_proposal, supplier_order, contrat, ficheinter) $tmpentry = array( - 'enabled'=>(!empty($conf->propal->enabled) || - !empty($conf->commande->enabled) || - !empty($conf->fournisseur->enabled) || - !empty($conf->supplier_proposal->enabled) || - !empty($conf->supplier_order->enabled) || - !empty($conf->contrat->enabled) || - !empty($conf->ficheinter->enabled) - ) ? 1 : 0, - 'perms'=>(!empty($user->rights->propal->lire) || - !empty($user->rights->commande->lire) || - !empty($user->rights->fournisseur->lire) || - !empty($user->rights->supplier_proposal->lire) || - !empty($user->rights->supplier_order->lire) || - !empty($user->rights->contrat->lire) || - !empty($user->rights->ficheinter->lire) || - !empty($user->rights->supplier_order->lire) || - !empty($user->rights->fournisseur->commande->lire) - ), - 'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter' + 'enabled'=>(!empty($conf->propal->enabled) + || !empty($conf->commande->enabled) + || !empty($conf->supplier_proposal->enabled) + || !empty($conf->supplier_order->enabled) + || !empty($conf->contrat->enabled) + || !empty($conf->ficheinter->enabled) + ) ? 1 : 0, + 'perms'=>(!empty($user->rights->propal->lire) + || !empty($user->rights->commande->lire) + || !empty($user->rights->supplier_proposal->lire) + || !empty($user->rights->supplier_order->lire) + || !empty($user->rights->contrat->lire) + || !empty($user->rights->ficheinter->lire) + ), + 'module'=>'propal|commande|supplier_proposal|supplier_order|contrat|ficheinter' ); $onlysupplierorder = !empty($user->rights->fournisseur->commande->lire) && @@ -259,7 +255,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = 'link' => ($onlysupplierorder ? '/fourn/commande/index.php?mainmenu=commercial&leftmenu=' : '/comm/index.php?mainmenu=commercial&leftmenu='), 'title' => "Commercial", 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "commercial", 'leftmenu' => '', @@ -275,25 +271,25 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Billing - Financial $tmpentry = array( - 'enabled'=>(!empty($conf->facture->enabled) || - !empty($conf->don->enabled) || - !empty($conf->tax->enabled) || - !empty($conf->salaries->enabled) || - !empty($conf->supplier_invoice->enabled) || - !empty($conf->loan->enabled) || - !empty($conf->margins->enabled) - ) ? 1 : 0, - 'perms'=>(!empty($user->rights->facture->lire) || !empty($user->rights->don->contact->lire) - || !empty($user->rights->tax->charges->lire) || !empty($user->rights->salaries->read) - || !empty($user->rights->fournisseur->facture->lire) || !empty($user->rights->loan->read) || !empty($user->rights->margins->liretous)), - 'module'=>'facture|supplier_invoice|don|tax|salaries|loan' + 'enabled'=>(!empty($conf->facture->enabled) || + !empty($conf->don->enabled) || + !empty($conf->tax->enabled) || + !empty($conf->salaries->enabled) || + !empty($conf->supplier_invoice->enabled) || + !empty($conf->loan->enabled) || + !empty($conf->margins->enabled) + ) ? 1 : 0, + 'perms'=>(!empty($user->rights->facture->lire) || !empty($user->rights->don->contact->lire) + || !empty($user->rights->tax->charges->lire) || !empty($user->rights->salaries->read) + || !empty($user->rights->fournisseur->facture->lire) || !empty($user->rights->loan->read) || !empty($user->rights->margins->liretous)), + 'module'=>'facture|supplier_invoice|don|tax|salaries|loan' ); $menu_arr[] = array( 'name' => 'Compta', 'link' => '/compta/index.php?mainmenu=billing&leftmenu=', 'title' => "MenuFinancial", 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "billing", 'leftmenu' => '', @@ -309,16 +305,16 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Bank $tmpentry = array( - 'enabled'=>(!empty($conf->banque->enabled) || !empty($conf->prelevement->enabled)), + 'enabled'=>(!empty($conf->banque->enabled) || !empty($conf->prelevement->enabled)), 'perms'=>(!empty($user->rights->banque->lire) || !empty($user->rights->prelevement->lire) || !empty($user->rights->paymentbybanktransfer->read)), - 'module'=>'banque|prelevement|paymentbybanktransfer' + 'module'=>'banque|prelevement|paymentbybanktransfer' ); $menu_arr[] = array( 'name' => 'Bank', 'link' => '/compta/bank/list.php?mainmenu=bank&leftmenu=', 'title' => "MenuBankCash", 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "bank", 'leftmenu' => '', @@ -336,16 +332,16 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Accounting $tmpentry = array( - 'enabled'=>(!empty($conf->comptabilite->enabled) || !empty($conf->accounting->enabled) || !empty($conf->asset->enabled)), - 'perms'=>(!empty($user->rights->compta->resultat->lire) || !empty($user->rights->accounting->mouvements->lire) || !empty($user->rights->asset->read)), - 'module'=>'comptabilite|accounting|asset' + 'enabled'=>(!empty($conf->comptabilite->enabled) || !empty($conf->accounting->enabled) || !empty($conf->asset->enabled)), + 'perms'=>(!empty($user->rights->compta->resultat->lire) || !empty($user->rights->accounting->mouvements->lire) || !empty($user->rights->asset->read)), + 'module'=>'comptabilite|accounting|asset' ); $menu_arr[] = array( 'name' => 'Accounting', 'link' => '/accountancy/index.php?mainmenu=accountancy&leftmenu=', 'title' => "MenuAccountancy", 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "accountancy", 'leftmenu' => '', @@ -363,16 +359,16 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // HRM $tmpentry = array( - 'enabled'=>(!empty($conf->hrm->enabled) || !empty($conf->holiday->enabled) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled)), - 'perms'=>(!empty($user->rights->hrm->employee->read) || !empty($user->rights->holiday->write) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire)), - 'module'=>'hrm|holiday|deplacement|expensereport' + 'enabled'=>(!empty($conf->hrm->enabled) || !empty($conf->holiday->enabled) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)), + 'perms'=>(!empty($user->rights->hrm->employee->read) || !empty($user->rights->holiday->write) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire) || !empty($user->rights->recruitment->recruitmentjobposition->read)), + 'module'=>'hrm|holiday|deplacement|expensereport|recruitment' ); $menu_arr[] = array( 'name' => 'HRM', 'link' => '/hrm/index.php?mainmenu=hrm&leftmenu=', 'title' => "HRM", 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "hrm", 'leftmenu' => '', @@ -390,16 +386,16 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Tools $tmpentry = array( - 'enabled'=>1, - 'perms'=>1, - 'module'=>'' + 'enabled'=>1, + 'perms'=>1, + 'module'=>'' ); $menu_arr[] = array( 'name' => 'Tools', 'link' => '/core/tools.php?mainmenu=tools&leftmenu=', 'title' => "Tools", 'level' => 0, - 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), + 'enabled' => $showmode = isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal), 'target' => $atarget, 'mainmenu' => "tools", 'leftmenu' => '', @@ -441,9 +437,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = { $mtitle .= $langs->trans($item); } - } - else - { + } else { $mtitle = $langs->trans($smenu->title); } // Add item @@ -453,6 +447,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // Show personalized menus $menuArbo = new Menubase($db, 'eldy'); + $newTabMenu = $menuArbo->menuTopCharger('', '', $type_user, 'eldy', $tabMenu); // Return tabMenu with only top entries $num = count($newTabMenu); @@ -461,41 +456,45 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = //var_dump($type_user.' '.$newTabMenu[$i]['url'].' '.$showmode.' '.$newTabMenu[$i]['perms']); $idsel = (empty($newTabMenu[$i]['mainmenu']) ? 'none' : $newTabMenu[$i]['mainmenu']); + $newTabMenu[$i]['url'] = make_substitutions($newTabMenu[$i]['url'], $substitarray); + + // url = url from host, shorturl = relative path into dolibarr sources + $url = $shorturl = $newTabMenu[$i]['url']; + if (!preg_match("/^(http:\/\/|https:\/\/)/i", $newTabMenu[$i]['url'])) // Do not change url content for external links + { + $tmp = explode('?', $newTabMenu[$i]['url'], 2); + $url = $shorturl = $tmp[0]; + $param = (isset($tmp[1]) ? $tmp[1] : ''); + + if (!preg_match('/mainmenu/i', $param) || !preg_match('/leftmenu/i', $param)) $param .= ($param ? '&' : '').'mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu='; + //$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad + $url = dol_buildpath($url, 1).($param ? '?'.$param : ''); + //$shorturl = $shorturl.($param?'?'.$param:''); + $shorturl = $url; + if (DOL_URL_ROOT) $shorturl = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/', '', $shorturl); + } + $showmode = isVisibleToUserType($type_user, $newTabMenu[$i], $listofmodulesforexternal); if ($showmode == 1) { - $newTabMenu[$i]['url'] = make_substitutions($newTabMenu[$i]['url'], $substitarray); - - // url = url from host, shorturl = relative path into dolibarr sources - $url = $shorturl = $newTabMenu[$i]['url']; - if (!preg_match("/^(http:\/\/|https:\/\/)/i", $newTabMenu[$i]['url'])) // Do not change url content for external links - { - $tmp = explode('?', $newTabMenu[$i]['url'], 2); - $url = $shorturl = $tmp[0]; - $param = (isset($tmp[1]) ? $tmp[1] : ''); - - if (!preg_match('/mainmenu/i', $param) || !preg_match('/leftmenu/i', $param)) $param .= ($param ? '&' : '').'mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu='; - //$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad - $url = dol_buildpath($url, 1).($param ? '?'.$param : ''); - //$shorturl = $shorturl.($param?'?'.$param:''); - $shorturl = $url; - if (DOL_URL_ROOT) $shorturl = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/', '', $shorturl); - } - // Define the class (top menu selected or not) if (!empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname = 'class="tmenusel"'; elseif (!empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname = 'class="tmenusel"'; else $classname = 'class="tmenu"'; + } elseif ($showmode == 2) { + $classname = 'class="tmenu"'; } - elseif ($showmode == 2) $classname = 'class="tmenu"'; - $menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target'] ? $newTabMenu[$i]['target'] : $atarget), ($newTabMenu[$i]['mainmenu'] ? $newTabMenu[$i]['mainmenu'] : $newTabMenu[$i]['rowid']), ($newTabMenu[$i]['leftmenu'] ? $newTabMenu[$i]['leftmenu'] : ''), $newTabMenu[$i]['position'], $id, $idsel, $classname); + $menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target'] ? $newTabMenu[$i]['target'] : $atarget), + ($newTabMenu[$i]['mainmenu'] ? $newTabMenu[$i]['mainmenu'] : $newTabMenu[$i]['rowid']), + ($newTabMenu[$i]['leftmenu'] ? $newTabMenu[$i]['leftmenu'] : ''), + $newTabMenu[$i]['position'], $id, $idsel, $classname); } // Sort on position $menu->liste = dol_sort_array($menu->liste, 'position'); - // Output menu entries + // Output menu entries // Show logo company if (empty($conf->global->MAIN_MENU_INVERT) && empty($noout) && !empty($conf->global->MAIN_SHOW_LOGO) && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { @@ -515,8 +514,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = { $urllogo=DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_mini); }*/ - else - { + else { $urllogo = DOL_URL_ROOT.'/theme/dolibarr_512x512_white.png'; $logoContainerAdditionalClass = ''; } @@ -525,26 +523,25 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = print "\n".''."\n"; print_start_menu_entry('companylogo', 'class="tmenu tmenucompanylogo nohover"', 1); - print ''."\n"; print_end_menu_entry(4); } - if (empty($noout)) { - foreach ($menu->liste as $menuval) { - print_start_menu_entry($menuval['idsel'], $menuval['classname'], $menuval['enabled']); - print_text_menu_entry($menuval['titre'], $menuval['enabled'], (($menuval['url'] != '#' && !preg_match('/^(http:\/\/|https:\/\/)/i', $menuval['url'])) ? DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget)); - print_end_menu_entry($menuval['enabled']); - } - } + if (empty($noout)) { + foreach ($menu->liste as $menuval) { + print_start_menu_entry($menuval['idsel'], $menuval['classname'], $menuval['enabled']); + print_text_menu_entry($menuval['titre'], $menuval['enabled'], (($menuval['url'] != '#' && !preg_match('/^(http:\/\/|https:\/\/)/i', $menuval['url'])) ? DOL_URL_ROOT:'').$menuval['url'], $menuval['id'], $menuval['idsel'], $menuval['classname'], ($menuval['target'] ? $menuval['target'] : $atarget)); + print_end_menu_entry($menuval['enabled']); + } + } $showmode = 1; - if (empty($noout)) { - print_start_menu_entry('', 'class="tmenuend"', $showmode); - print_end_menu_entry($showmode); - print_end_menu_array(); - } + if (empty($noout)) { + print_start_menu_entry('', 'class="tmenuend"', $showmode); + print_end_menu_entry($showmode); + print_end_menu_array(); + } return 0; } @@ -557,7 +554,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = */ function print_start_menu_array() { - global $conf; + global $conf; print '
'; print '
'; // Show graphs print ''; - } - else - { + } else { print 'global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' style="display: none"' : '').'>'; print '"; diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 6543747d1f7..d7075d86e1b 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -130,7 +130,7 @@ $entitytolang = array( $array_selected = isset($_SESSION["export_selected_fields"]) ? $_SESSION["export_selected_fields"] : array(); $array_filtervalue = isset($_SESSION["export_filtered_fields"]) ? $_SESSION["export_filtered_fields"] : array(); $datatoexport = GETPOST("datatoexport", "aZ09"); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $step = GETPOST("step", "int") ?GETPOST("step", "int") : 1; $export_name = GETPOST("export_name", "alphanohtml"); @@ -173,9 +173,7 @@ if ($action == 'selectfield') // Selection of field at step 2 //print_r($array_selected); $_SESSION["export_selected_fields"] = $array_selected; } - } - else - { + } else { $warnings = array(); $array_selected[$field] = count($array_selected) + 1; // We tag the key $field as "selected" @@ -190,8 +188,7 @@ if ($action == 'selectfield') // Selection of field at step 2 $tmp = $fieldsdependenciesarray[$fieldsentitiesarray[$field]]; // $fieldsdependenciesarray=array('element'=>'fd.rowid') or array('element'=>array('fd.rowid','ab.rowid')) if (is_array($tmp)) $listofdependencies = $tmp; else $listofdependencies = array($tmp); - } - elseif (!empty($field) && !empty($fieldsdependenciesarray[$field])) + } elseif (!empty($field) && !empty($fieldsdependenciesarray[$field])) { // We found a dependency on a dedicated field $tmp = $fieldsdependenciesarray[$field]; // $fieldsdependenciesarray=array('fd.fieldx'=>'fd.rowid') or array('fd.fieldx'=>array('fd.rowid','ab.rowid')) @@ -222,9 +219,7 @@ if ($action == 'unselectfield') { $array_selected = array(); $_SESSION["export_selected_fields"] = $array_selected; - } - else - { + } else { unset($array_selected[$_GET["field"]]); // Renumber fields of array_selected (from 1 to nb_elements) asort($array_selected); @@ -287,9 +282,7 @@ if ($action == 'builddoc') { setEventMessages($objexport->error, $objexport->errors, 'errors'); $sqlusedforexport = $objexport->sqlusedforexport; - } - else - { + } else { setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs'); $sqlusedforexport = $objexport->sqlusedforexport; } @@ -309,9 +302,9 @@ if ($step == 5 && $action == 'confirm_deletefile' && $confirm == 'yes') if ($action == 'deleteprof') { - if ($_GET["id"]) + if (GETPOST("id", 'int')) { - $objexport->fetch($_GET["id"]); + $objexport->fetch(GETPOST('id', 'int')); $result = $objexport->delete($user); } } @@ -350,18 +343,13 @@ if ($action == 'add_export_model') if ($result >= 0) { setEventMessages($langs->trans("ExportModelSaved", $objexport->model_name), null, 'mesgs'); - } - else - { + } else { $langs->load("errors"); if ($objexport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') setEventMessages($langs->trans("ErrorExportDuplicateProfil"), null, 'errors'); - else - setEventMessages($objexport->error, $objexport->errors, 'errors'); + else setEventMessages($objexport->error, $objexport->errors, 'errors'); } - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ExportModelName")), null, 'errors'); } } @@ -471,17 +459,13 @@ if ($step == 1 || !$datatoexport) print ''; } - } - else - { + } else { print ''; } print '
'; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); print "
\n"; print $px2->show(); diff --git a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php index d0096390489..f4f460719a0 100644 --- a/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php +++ b/htdocs/expensereport/tpl/expensereport_linktofile.tpl.php @@ -42,9 +42,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) print ''; print ''; print ''; - } - else - { + } else { $error = 0; $thumbshown = ''; @@ -106,8 +104,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) { $checked = ' checked'; break; - } - elseif ($file['relativename'] && in_array($file['relativename'], GETPOST('attachfile', 'array'))) { + } elseif ($file['relativename'] && in_array($file['relativename'], GETPOST('attachfile', 'array'))) { $checked = ' checked'; break; } @@ -132,9 +129,7 @@ if (empty($conf->global->EXPENSEREPORT_DISABLE_ATTACHMENT_ON_LINES)) print ''; print '
'; print ''.$langs->trans("NoFilesUploadedYet").''; diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index 978a3059ace..89ae2103476 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -141,9 +141,7 @@ class Export if (!empty($perm[2])) { $bool = $user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]}; - } - else - { + } else { $bool = $user->rights->{$perm[0]}->{$perm[1]}; } if ($perm[0] == 'user' && $user->admin) $bool = true; @@ -295,8 +293,7 @@ class Export case 'Text': if (!(strpos($ValueField, '%') === false)) $szFilterQuery .= " ".$NameField." LIKE '".$ValueField."'"; - else - $szFilterQuery .= " ".$NameField." = '".$ValueField."'"; + else $szFilterQuery .= " ".$NameField." = '".$ValueField."'"; break; case 'Date': if (strpos($ValueField, "+") > 0) @@ -305,13 +302,10 @@ class Export $ValueArray = explode("+", $ValueField); $szFilterQuery = "(".$this->conditionDate($NameField, trim($ValueArray[0]), ">="); $szFilterQuery .= " AND ".$this->conditionDate($NameField, trim($ValueArray[1]), "<=").")"; - } - else - { + } else { if (is_numeric(substr($ValueField, 0, 1))) $szFilterQuery = $this->conditionDate($NameField, trim($ValueField), "="); - else - $szFilterQuery = $this->conditionDate($NameField, trim(substr($ValueField, 1)), substr($ValueField, 0, 1)); + else $szFilterQuery = $this->conditionDate($NameField, trim(substr($ValueField, 1)), substr($ValueField, 0, 1)); } break; case 'Duree': @@ -324,13 +318,10 @@ class Export $ValueArray = explode("+", $ValueField); $szFilterQuery = "(".$NameField.">=".$ValueArray[0]; $szFilterQuery .= " AND ".$NameField."<=".$ValueArray[1].")"; - } - else - { + } else { if (is_numeric(substr($ValueField, 0, 1))) $szFilterQuery = " ".$NameField."=".$ValueField; - else - $szFilterQuery = " ".$NameField.substr($ValueField, 0, 1).substr($ValueField, 1); + else $szFilterQuery = " ".$NameField.substr($ValueField, 0, 1).substr($ValueField, 1); } break; case 'Boolean': @@ -343,12 +334,11 @@ class Export else { if (!(strpos($ValueField, '%') === false)) $szFilterQuery = " ".$NameField." LIKE '".$ValueField."'"; - else - $szFilterQuery = " ".$NameField." = '".$ValueField."'"; + else $szFilterQuery = " ".$NameField." = '".$ValueField."'"; } break; default: - dol_syslog("Error we try to forge an sql export request with a condition on a field with type '".$InfoFieldList[0]."' (defined into module descriptor) but this type is unknown/not supported. It looks like a bug into module descriptor.", LOG_ERR); + dol_syslog("Error we try to forge an sql export request with a condition on a field with type ".$InfoFieldList[0]." (defined into module descriptor) but this type is unknown/not supported. It looks like a bug into module descriptor.", LOG_ERR); } return $szFilterQuery; @@ -367,7 +357,7 @@ class Export // TODO date_format is forbidden, not performant and not portable. Use instead BETWEEN if (strlen($Value) == 4) $Condition = " date_format(".$Field.",'%Y') ".$Sens." '".$Value."'"; elseif (strlen($Value) == 6) $Condition = " date_format(".$Field.",'%Y%m') ".$Sens." '".$Value."'"; - else $Condition = " date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value; + else $Condition = " date_format(".$Field.",'%Y%m%d') ".$Sens." ".$Value; return $Condition; } @@ -428,8 +418,7 @@ class Export if (!empty($InfoFieldList[3])) $keyList = $InfoFieldList[3]; - else - $keyList = 'rowid'; + else $keyList = 'rowid'; $sql = 'SELECT '.$keyList.' as rowid, '.$InfoFieldList[2].' as label'.(empty($InfoFieldList[3]) ? '' : ', '.$InfoFieldList[3].' as code'); if ($InfoFieldList[1] == 'c_stcomm') $sql = 'SELECT id as id, '.$keyList.' as rowid, '.$InfoFieldList[2].' as label'.(empty($InfoFieldList[3]) ? '' : ', '.$InfoFieldList[3].' as code'); if ($InfoFieldList[1] == 'c_country') $sql = 'SELECT '.$keyList.' as rowid, '.$InfoFieldList[2].' as label, code as code'; @@ -473,9 +462,7 @@ class Export if (!empty($ValueField) && $ValueField == $obj->rowid) { $szFilterField .= ''; - } - else - { + } else { $szFilterField .= ''; } $i++; @@ -484,8 +471,7 @@ class Export $szFilterField .= ""; $this->db->free($resql); - } - else dol_print_error($this->db); + } else dol_print_error($this->db); break; } @@ -553,6 +539,7 @@ class Export if (empty($this->array_export_fields) || !is_array($this->array_export_fields)) { $this->error = "ErrorBadParameter"; + dol_syslog($this->error, LOG_ERR); return -1; } @@ -564,8 +551,7 @@ class Export $objmodel = new $classname($this->db); if (!empty($sqlquery)) $sql = $sqlquery; - else - { + else { // Define value for indice from $datatoexport $foundindice = 0; foreach ($this->array_export_code as $key => $dataset) @@ -595,8 +581,7 @@ class Export //$this->array_export_label[$indice] if ($conf->global->EXPORT_PREFIX_SPEC) $filename = $conf->global->EXPORT_PREFIX_SPEC."_".$datatoexport; - else - $filename = "export_".$datatoexport; + else $filename = "export_".$datatoexport; $filename .= '.'.$objmodel->getDriverExtension(); $dirname = $conf->export->dir_temp.'/'.$user->id; @@ -664,9 +649,7 @@ class Export $remaintopay = $tmpobjforcomputecall->getRemainToPay(); } $obj->$alias = $remaintopay; - } - else - { + } else { // TODO FIXME Export of compute field does not work. $obj containt $obj->alias_field and formulat will contains $obj->field $computestring = $this->array_export_special[$indice][$key]; $tmp = dol_eval($computestring, 1, 0); @@ -688,16 +671,12 @@ class Export $objmodel->close_file(); return 1; - } - else - { + } else { $this->error = $objmodel->error; dol_syslog("Export::build_file Error: ".$this->error, LOG_ERR); return -1; } - } - else - { + } else { $this->error = $this->db->error()." - sql=".$sql; return -1; } @@ -727,10 +706,10 @@ class Export $sql .= 'filter'; $sql .= ') VALUES ('; $sql .= "'".$this->db->escape($this->model_name)."',"; - $sql .= "'".$this->db->escape($this->datatoexport)."',"; - $sql .= "'".$this->db->escape($this->hexa)."',"; - $sql .= "'".$user->id."',"; - $sql .= "'".$this->db->escape($this->hexafiltervalue)."'"; + $sql .= " '".$this->db->escape($this->datatoexport)."',"; + $sql .= " '".$this->db->escape($this->hexa)."',"; + $sql .= ' '.($user->id > 0 ? $user->id : 'null').","; + $sql .= " '".$this->db->escape($this->hexafiltervalue)."'"; $sql .= ")"; dol_syslog(get_class($this)."::create", LOG_DEBUG); @@ -739,9 +718,7 @@ class Export { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); $this->db->rollback(); @@ -759,7 +736,7 @@ class Export { $sql = 'SELECT em.rowid, em.label, em.type, em.field, em.filter'; $sql .= ' FROM '.MAIN_DB_PREFIX.'export_model as em'; - $sql .= ' WHERE em.rowid = '.$id; + $sql .= ' WHERE em.rowid = '.((int) $id); dol_syslog("Export::fetch", LOG_DEBUG); $result = $this->db->query($sql); @@ -776,15 +753,11 @@ class Export $this->hexafiltervalue = $obj->filter; return 1; - } - else - { + } else { $this->error = "ModelNotFound"; return -2; } - } - else - { + } else { dol_print_error($this->db); return -3; } @@ -822,9 +795,7 @@ class Export } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -874,7 +845,7 @@ class Export } // suppression de l'export print ''; - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; print "
'; if ($objexport->array_export_perms[$key]) { - print ''.img_picto($langs->trans("NewExport"), 'filenew').''; - } - else - { + print ''.img_picto($langs->trans("NewExport"), 'next', 'class="fa-15x"').''; + } else { print $langs->trans("NotEnoughPermissions"); } print '
'.$langs->trans("NoExportableData").'
'; @@ -546,8 +530,7 @@ if ($step == 2 && $datatoexport) print ''.$langs->trans("SelectExportFields").' '; if (empty($conf->global->EXPORTS_SHARE_MODELS)) { $htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1, $user->id); - } - else { + } else { $htmlother->select_export_model($exportmodelid, 'exportmodelid', $datatoexport, 1); } print ' '; @@ -614,9 +597,7 @@ if ($step == 2 && $datatoexport) if (!empty($objexport->array_export_special[0][$code])) { $htmltext .= ''.$langs->trans("ComputedField")." -> ".$langs->trans("Method")." : ".$objexport->array_export_special[0][$code]."
"; - } - else - { + } else { $htmltext .= ''.$langs->trans("Table")." -> ".$langs->trans("Field").": ".$tablename." -> ".preg_replace('/^.*\./', '', $code)."
"; } if (!empty($objexport->array_export_examplevalues[0][$code])) @@ -642,9 +623,7 @@ if ($step == 2 && $datatoexport) print $form->textwithpicto($text, $htmltext); //print ' ('.$code.')'; print ''; - } - else - { + } else { // Fields not selected print ''; //print $text.'-'.$htmltext."
"; @@ -672,14 +651,10 @@ if ($step == 2 && $datatoexport) if ($usefilters && isset($objexport->array_export_TypeFields[0]) && is_array($objexport->array_export_TypeFields[0])) { print ''.$langs->trans("NextStep").''; - } - else - { + } else { print ''.$langs->trans("NextStep").''; } - } - else - { + } else { print ''.$langs->trans("NextStep").''; } @@ -810,9 +785,7 @@ if ($step == 3 && $datatoexport) if (!empty($objexport->array_export_special[0][$code])) { $htmltext .= ''.$langs->trans("ComputedField")." -> ".$langs->trans("Method")." : ".$objexport->array_export_special[0][$code]."
"; - } - else - { + } else { $htmltext .= ''.$langs->trans("Table")." -> ".$langs->trans("Field").": ".$tablename." -> ".preg_replace('/^.*\./', '', $code)."
"; } if (!empty($objexport->array_export_examplevalues[0][$code])) @@ -841,9 +814,7 @@ if ($step == 3 && $datatoexport) { $tmp = $objexport->build_filterField($Typefieldsarray[$code], $code, $ValueFilter); print $form->textwithpicto($tmp, $szInfoFiltre); - } - else - { + } else { print $objexport->build_filterField($Typefieldsarray[$code], $code, $ValueFilter); } } @@ -1005,9 +976,7 @@ if ($step == 4 && $datatoexport) if (!empty($objexport->array_export_special[0][$code])) { $htmltext .= ''.$langs->trans("ComputedField")." -> ".$langs->trans("Method")." : ".$objexport->array_export_special[0][$code]."
"; - } - else - { + } else { $htmltext .= ''.$langs->trans("Table")." -> ".$langs->trans("Field").": ".$tablename." -> ".preg_replace('/^.*\./', '', $code)."
"; } if (!empty($objexport->array_export_examplevalues[0][$code])) @@ -1085,13 +1054,13 @@ if ($step == 4 && $datatoexport) print ''; print ''; - print ''; + print ''; print ''; // List of existing export profils $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."export_model"; - $sql .= " WHERE type = '".$datatoexport."'"; + $sql .= " WHERE type = '".$db->escape($datatoexport)."'"; if (empty($conf->global->EXPORTS_SHARE_MODELS))$sql .= " AND fk_user=".$user->id; $sql .= " ORDER BY rowid"; $resql = $db->query($sql); @@ -1105,15 +1074,14 @@ if ($step == 4 && $datatoexport) print ''; print $obj->label; print ''; - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; print ''; $i++; } - } - else { - dol_print_error($this->db); + } else { + dol_print_error($db); } print ''; @@ -1306,6 +1274,5 @@ function getablenamefromfield($code, $sqlmaxforexport) if (preg_match($regexstring, $newsql, $reg)) { return $reg[1]; // The tablename - } - else return ''; + } else return ''; } diff --git a/htdocs/externalsite/admin/externalsite.php b/htdocs/externalsite/admin/externalsite.php index b1e3dc7fac8..cb73403356b 100644 --- a/htdocs/externalsite/admin/externalsite.php +++ b/htdocs/externalsite/admin/externalsite.php @@ -40,7 +40,7 @@ $langs->loadLangs(array('admin', 'other', 'externalsite')); $def = array(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Sauvegardes parametres if ($action == 'update') @@ -50,7 +50,7 @@ if ($action == 'update') $db->begin(); $label = GETPOST('EXTERNALSITE_LABEL', 'alpha'); - $exturl = GETPOST('EXTERNALSITE_URL', 'none'); + $exturl = GETPOST('EXTERNALSITE_URL', 'restricthtml'); $i += dolibarr_set_const($db, 'EXTERNALSITE_LABEL', trim($label), 'chaine', 0, '', $conf->entity); $i += dolibarr_set_const($db, 'EXTERNALSITE_URL', trim($exturl), 'chaine', 0, '', $conf->entity); @@ -59,9 +59,7 @@ if ($action == 'update') { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); setEventMessages($db->lasterror(), null, 'errors'); } @@ -103,7 +101,7 @@ print ""; print ''; print ''.$langs->trans("ExternalSiteURL").""; print ''; print "http://localhost/myurl/"; print "
https://wikipedia.org/"; diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php index 3a1b1c04b82..4827d832af4 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -63,19 +63,15 @@ if (!empty($keyforcontent)) { $langs->load("errors"); print $langs->trans("ErrorBadSyntaxForParamKeyForContent", 'EXTERNAL_SITE_CONTENT_', 'EXTERNAL_SITE_URL_'); - } - elseif (empty($conf->global->$keyforcontent)) + } elseif (empty($conf->global->$keyforcontent)) { $langs->load("errors"); print $langs->trans("ErrorVariableKeyForContentMustBeSet", 'EXTERNAL_SITE_CONTENT_'.$keyforcontent, 'EXTERNAL_SITE_URL_'.$keyforcontent); - } - else - { + } else { if (preg_match('/EXTERNAL_SITE_CONTENT_/', $keyforcontent)) { print $conf->global->$keyforcontent; - } - elseif (preg_match('/EXTERNAL_SITE_URL_/', $keyforcontent)) + } elseif (preg_match('/EXTERNAL_SITE_URL_/', $keyforcontent)) { /*print " @@ -114,9 +110,7 @@ if (!empty($keyforcontent)) print '
'; llxFooter(); -} -else -{ +} else { if (preg_match('/^\//', $conf->global->EXTERNALSITE_URL) || preg_match('/^http/i', $conf->global->EXTERNALSITE_URL)) { print " @@ -150,9 +144,7 @@ else "; - } - else - { + } else { llxHeader(); print '
'; print $conf->global->EXTERNALSITE_URL; diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index 5199e9de0db..c19bce3c9d1 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'fichinter'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php index 62dc9025209..768de47cfd0 100644 --- a/htdocs/fichinter/admin/fichinterdet_extrafields.php +++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'fichinterdet'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index b5b259f2430..b8ff3714596 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -51,7 +51,7 @@ $langs->loadLangs(array("interventions", "admin", "compta", "bills")); // Security check $id = (GETPOST('fichinterid', 'int') ?GETPOST('fichinterid', 'int') : GETPOST('id', 'int')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if ($user->socid) $socid = $user->socid; $objecttype = 'fichinter_rec'; if ($action == "create" || $action == "add") $objecttype = ''; @@ -131,7 +131,7 @@ if ($action == 'add') { if (!$error) { $object->id_origin = $id; $object->title = GETPOST('titre', 'alpha'); - $object->description = GETPOST('description', 'alpha'); + $object->description = GETPOST('description', 'restricthtml'); $object->socid = GETPOST('socid', 'alpha'); $object->fk_project = GETPOST('projectid', 'int'); $object->fk_contract = GETPOST('contractid', 'int'); @@ -424,8 +424,7 @@ if ($action == 'create') { print ''; print '
'; print "\n"; - } - else { + } else { dol_print_error('', "Error, no fichinter ".$object->id); } } elseif ($action == 'selsocforcreatefrommodel') { @@ -596,8 +595,7 @@ if ($action == 'create') { } else { if ($object->frequency > 0) print $langs->trans('FrequencyPer_'.$object->unit_frequency, $object->frequency); - else - print $langs->trans("NotARecurringInterventionalTemplate"); + else print $langs->trans("NotARecurringInterventionalTemplate"); } print ''; @@ -619,15 +617,12 @@ if ($action == 'create') { print ''; if ($user->rights->ficheinter->creer && ($action == 'nb_gen_max' || $object->frequency > 0)) { print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); - } else - print $langs->trans("MaxPeriodNumber"); + } else print $langs->trans("MaxPeriodNumber"); print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max ? $object->nb_gen_max : '', $object, $user->rights->facture->creer); - } - else - print ''; + } else print ''; print ''; print ''; @@ -693,8 +688,7 @@ if ($action == 'create') { // Show product and description if (isset($object->lines[$i]->product_type)) $type = $object->lines[$i]->product_type; - else - $object->lines[$i]->fk_product_type; + else $object->lines[$i]->fk_product_type; // Try to enhance type detection using date_start and date_end for free lines when type // was not saved. if (!empty($objp->date_start)) $type = 1; @@ -720,19 +714,18 @@ if ($action == 'create') { if ($user->rights->ficheinter->creer) { print ''; } if ($user->rights->ficheinter->supprimer) { print ''; } print '
'; - } else - print $langs->trans("ErrorRecordNotFound"); + } else print $langs->trans("ErrorRecordNotFound"); } else { /* * List mode @@ -860,10 +853,8 @@ if ($action == 'create') { print ''; print $langs->trans("CreateFichInter").''; - } else - print $langs->trans("DateIsNotEnough"); - } else - print " "; + } else print $langs->trans("DateIsNotEnough"); + } else print " "; print ""; diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 404955f8ef4..e4afe4b0452 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -65,7 +65,7 @@ $confirm = GETPOST('confirm', 'alpha'); $mesg = GETPOST('msg', 'alpha'); $origin = GETPOST('origin', 'alpha'); $originid = (GETPOST('originid', 'int') ?GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility -$note_public = GETPOST('note_public', 'none'); +$note_public = GETPOST('note_public', 'restricthtml'); $lineid = GETPOST('line_id', 'int'); //PDF @@ -129,9 +129,7 @@ if (empty($reshook)) if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { + } else { if ($object->id > 0) { // Because createFromClone modifies the object, we must clone it so that we can restore it later @@ -142,9 +140,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $object = $orig; $action = ''; @@ -171,19 +167,15 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->modelpdf : GETPOST('model', 'alpha'), $outputlangs); + $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; + } else { + $mesg = $object->error; } - else - { - $mesg = '
'.$object->error.'
'; - } - } - - elseif ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) + } elseif ($action == 'confirm_modify' && $confirm == 'yes' && $user->rights->ficheinter->creer) { $result = $object->setDraft($user); if ($result >= 0) @@ -200,30 +192,26 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->modelpdf : GETPOST('model', 'alpha'), $outputlangs); + $result = fichinter_create($db, $object, (!GETPOST('model', 'alpha')) ? $object->model_pdf : GETPOST('model', 'alpha'), $outputlangs); } header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; + } else { + $mesg = $object->error; } - else - { - $mesg = '
'.$object->error.'
'; - } - } - - elseif ($action == 'add' && $user->rights->ficheinter->creer) + } elseif ($action == 'add' && $user->rights->ficheinter->creer) { - $object->socid = $socid; - $object->duration = GETPOST('duration', 'int'); - $object->fk_project = GETPOST('projectid', 'int'); - $object->fk_contrat = GETPOST('contratid', 'int'); - $object->author = $user->id; - $object->description = GETPOST('description', 'none'); - $object->ref = $ref; - $object->modelpdf = GETPOST('model', 'alpha'); - $object->note_private = GETPOST('note_private', 'none'); - $object->note_public = GETPOST('note_public', 'none'); + $object->socid = $socid; + $object->duration = GETPOST('duration', 'int'); + $object->fk_project = GETPOST('projectid', 'int'); + $object->fk_contrat = GETPOST('contratid', 'int'); + $object->author = $user->id; + $object->description = GETPOST('description', 'restricthtml'); + $object->ref = $ref; + $object->model_pdf = GETPOST('model', 'alpha'); + $object->note_private = GETPOST('note_private', 'restricthtml'); + $object->note_public = GETPOST('note_public', 'restricthtml'); if ($object->socid > 0) { @@ -263,7 +251,7 @@ if (empty($reshook)) $extrafields = new ExtraFields($db); $array_options = $extrafields->getOptionalsFromPost($object->table_element); - $object->array_options = $array_options; + $object->array_options = $array_options; $id = $object->create($user); @@ -368,12 +356,12 @@ if (empty($reshook)) $result = $object->addline( $user, - $id, - $desc, - $date_intervention, - $duration, - $array_options - ); + $id, + $desc, + $date_intervention, + $duration, + $array_options + ); if ($result < 0) { @@ -383,63 +371,51 @@ if (empty($reshook)) } } } - } - else - { - $mesg = $srcobject->error; - $error++; - } - } - else - { - $mesg = $object->error; - $error++; - } - } - else - { - // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) { - $error++; - $action = 'create'; - } + } else { + $mesg = $srcobject->error; + $error++; + } + } else { + $mesg = $object->error; + $error++; + } + } else { + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost(null, $object); + if ($ret < 0) { + $error++; + $action = 'create'; + } - if (!$error) - { - // Extrafields - $array_options = $extrafields->getOptionalsFromPost($object->table_element); + if (!$error) + { + // Extrafields + $array_options = $extrafields->getOptionalsFromPost($object->table_element); - $object->array_options = $array_options; + $object->array_options = $array_options; - $result = $object->create($user); - if ($result > 0) - { - $id = $result; // Force raffraichissement sur fiche venant d'etre cree - } - else - { - $langs->load("errors"); - setEventMessages($object->error, $object->errors, 'errors'); - $action = 'create'; - } - } - } - } - else - { - $mesg = '
'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")).'
'; - $action = 'create'; - } - } - - elseif ($action == 'update' && $user->rights->ficheinter->creer) + $result = $object->create($user); + if ($result > 0) + { + $id = $result; // Force raffraichissement sur fiche venant d'etre cree + } else { + $langs->load("errors"); + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'create'; + } + } + } + } else { + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("ThirdParty")); + $action = 'create'; + } + } elseif ($action == 'update' && $user->rights->ficheinter->creer) { $object->socid = $socid; $object->fk_project = GETPOST('projectid', 'int'); $object->fk_contrat = GETPOST('contratid', 'int'); $object->author = $user->id; - $object->description = GETPOST('description', 'alpha'); + $object->description = GETPOST('description', 'restricthtml'); $object->ref = $ref; $result = $object->update($user); @@ -460,9 +436,7 @@ if (empty($reshook)) { $result = $object->set_contrat($user, GETPOST('contratid', 'int')); if ($result < 0) dol_print_error($db, $object->error); - } - - elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) + } elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->ficheinter->supprimer) { $result = $object->delete($user); if ($result < 0) { @@ -471,9 +445,7 @@ if (empty($reshook)) header('Location: '.DOL_URL_ROOT.'/fichinter/list.php?leftmenu=ficheinter&restore_lastsearch_values=1'); exit; - } - - elseif ($action == 'setdescription' && $user->rights->ficheinter->creer) + } elseif ($action == 'setdescription' && $user->rights->ficheinter->creer) { $result = $object->set_description($user, GETPOST('description')); if ($result < 0) dol_print_error($db, $object->error); @@ -484,17 +456,17 @@ if (empty($reshook)) { if (!GETPOST('np_desc', 'restricthtml') && empty($conf->global->FICHINTER_EMPTY_LINE_DESC)) { - $mesg = '
'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")).'
'; + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Description")); $error++; } if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && !GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) { - $mesg = '
'.$langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Duration")).'
'; + $mesg = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Duration")); $error++; } if (empty($conf->global->FICHINTER_WITHOUT_DURATION) && GETPOST('durationhour', 'int') >= 24 && GETPOST('durationmin', 'int') > 0) { - $mesg = '
'.$langs->trans("ErrorValueTooHigh").'
'; + $mesg = $langs->trans("ErrorValueTooHigh"); $error++; } if (!$error) @@ -510,14 +482,14 @@ if (empty($reshook)) $extrafields->fetch_name_optionals_label($object->table_element_line); $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); - $result = $object->addline( + $result = $object->addline( $user, - $id, - $desc, - $date_intervention, - $duration, - $array_options - ); + $id, + $desc, + $date_intervention, + $duration, + $array_options + ); // Define output language $outputlangs = $langs; @@ -534,12 +506,10 @@ if (empty($reshook)) { $db->commit(); - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $outputlangs); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { + } else { $mesg = $object->error; $db->rollback(); } @@ -554,9 +524,7 @@ if (empty($reshook)) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -569,26 +537,36 @@ if (empty($reshook)) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { - $mesg = '
'.$object->error.'
'; + } else { + $mesg = $object->error; } } // Classify Done elseif ($action == 'classifydone' && $user->rights->ficheinter->creer) { - $result = $object->setStatut(3); - if ($result > 0) - { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } + $result = $object->setStatut(3); + if ($result > 0) + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } + + // Reopen + elseif ($action == 'confirm_reopen' && $user->rights->ficheinter->creer) + { + $result = $object->setStatut(Fichinter::STATUS_VALIDATED); + if ($result > 0) + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + else { + $mesg = $object->error; + } } /* @@ -613,9 +591,9 @@ if (empty($reshook)) $date_inter = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int')); $duration = convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int')); - $objectline->datei = $date_inter; - $objectline->desc = $desc; - $objectline->duration = $duration; + $objectline->datei = $date_inter; + $objectline->desc = $desc; + $objectline->duration = $duration; // Extrafields $extrafields->fetch_name_optionals_label($object->table_element_line); @@ -623,11 +601,11 @@ if (empty($reshook)) $objectline->array_options = $array_options; $result = $objectline->update($user); - if ($result < 0) - { - dol_print_error($db); - exit; - } + if ($result < 0) + { + dol_print_error($db); + exit; + } // Define output language $outputlangs = $langs; @@ -639,7 +617,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $outputlangs); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; @@ -674,7 +652,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $outputlangs); } /* @@ -694,13 +672,11 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $outputlangs); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.$lineid); exit; - } - - elseif ($action == 'down' && $user->rights->ficheinter->creer) + } elseif ($action == 'down' && $user->rights->ficheinter->creer) { $object->line_down($lineid); @@ -714,7 +690,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->modelpdf, $outputlangs); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) fichinter_create($db, $object, $object->model_pdf, $outputlangs); header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'#'.$lineid); exit; @@ -739,7 +715,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) @@ -769,17 +745,13 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); - $mesg = '
'.$langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType").'
'; - } - else - { - $mesg = '
'.$object->error.'
'; + $mesg = $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); + } else { + $mesg = $object->error; } } } @@ -799,8 +771,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -827,7 +798,11 @@ if ($action == 'create') print load_fiche_titre($langs->trans("AddIntervention"), '', 'intervention'); - dol_htmloutput_mesg($mesg); + if ($error > 0) { + dol_htmloutput_errors($mesg); + } else { + dol_htmloutput_mesg($mesg); + } if ($socid) $res = $soc->fetch($socid); @@ -842,13 +817,11 @@ if ($action == 'create') $subelement = $regs[2]; } - if ($element == 'project') - { - $projectid = GETPOST('originid', 'int'); - } - else + if ($element == 'project') { - // For compatibility + $projectid = GETPOST('originid', 'int'); + } else { + // For compatibility if ($element == 'order' || $element == 'commande') { $element = $subelement = 'commande'; } @@ -875,14 +848,13 @@ if ($action == 'create') $soc = $objectsrc->thirdparty; - $note_private = (!empty($objectsrc->note) ? $objectsrc->note : (!empty($objectsrc->note_private) ? $objectsrc->note_private : GETPOST('note_private', 'none'))); - $note_public = (!empty($objectsrc->note_public) ? $objectsrc->note_public : GETPOST('note_public', 'none')); + $note_private = (!empty($objectsrc->note) ? $objectsrc->note : (!empty($objectsrc->note_private) ? $objectsrc->note_private : GETPOST('note_private', 'restricthtml'))); + $note_public = (!empty($objectsrc->note_public) ? $objectsrc->note_public : GETPOST('note_public', 'restricthtml')); // Object source contacts list $srccontactslist = $objectsrc->liste_contact(-1, 'external', 1); } - } - else { + } else { $projectid = GETPOST('projectid', 'int'); } @@ -932,27 +904,27 @@ if ($action == 'create') $langs->load("project"); - print ''.$langs->trans("Project").''; - /* Fix: If a project must be linked to any companies (suppliers or not), project must be not be set as limited to customer but must be not linked to any particular thirdparty + print ''.$langs->trans("Project").''; + /* Fix: If a project must be linked to any companies (suppliers or not), project must be not be set as limited to customer but must be not linked to any particular thirdparty if ($societe->fournisseur==1) $numprojet=select_projects(-1,$_POST["projectid"],'projectid'); else $numprojet=select_projects($societe->id,$_POST["projectid"],'projectid'); */ - $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid'); - if ($numprojet == 0) - { - print '   '; - } - print ''; - } + $numprojet = $formproject->select_projects($soc->id, $projectid, 'projectid'); + if ($numprojet == 0) + { + print '   '; + } + print ''; + } // Contract if ($conf->contrat->enabled) { $langs->load("contracts"); print ''.$langs->trans("Contract").''; - $numcontrat = $formcontract->select_contract($soc->id, GETPOST('contratid', 'int'), 'contratid', 0, 1); + $numcontrat = $formcontract->select_contract($soc->id, GETPOST('contratid', 'int'), 'contratid', 0, 1, 1); if ($numcontrat == 0) { print '   '; @@ -960,53 +932,53 @@ if ($action == 'create') print ''; } - // Model - print ''; - print ''.$langs->trans("DefaultModel").''; - print ''; - $liste = ModelePDFFicheinter::liste_modeles($db); - print $form->selectarray('model', $liste, $conf->global->FICHEINTER_ADDON_PDF); - print ""; + // Model + print ''; + print ''.$langs->trans("DefaultModel").''; + print ''; + $liste = ModelePDFFicheinter::liste_modeles($db); + print $form->selectarray('model', $liste, $conf->global->FICHEINTER_ADDON_PDF); + print ""; - // Public note - print ''; - print ''.$langs->trans('NotePublic').''; - print ''; - $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - //print ''; - print ''; + // Public note + print ''; + print ''.$langs->trans('NotePublic').''; + print ''; + $doleditor = new DolEditor('note_public', $note_public, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + //print ''; + print ''; - // Private note - if (empty($user->socid)) - { - print ''; - print ''.$langs->trans('NotePrivate').''; - print ''; - $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - //print ''; - print ''; - } + // Private note + if (empty($user->socid)) + { + print ''; + print ''.$langs->trans('NotePrivate').''; + print ''; + $doleditor = new DolEditor('note_private', $note_private, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + //print ''; + print ''; + } - // Other attributes - $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) + // Other attributes + $parameters = array(); + $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'); } - // Show link to origin object - if (!empty($origin) && !empty($originid) && is_object($objectsrc)) - { - $newclassname = $classname; - if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; - print ''.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).''; + // Show link to origin object + if (!empty($origin) && !empty($originid) && is_object($objectsrc)) + { + $newclassname = $classname; + if ($newclassname == 'Propal') $newclassname = 'CommercialProposal'; + print ''.$langs->trans($newclassname).''.$objectsrc->getNomUrl(1).''; - // Amount - /* Hide amount because we only copy services so amount may differ than source + // Amount + /* Hide amount because we only copy services so amount may differ than source print '' . $langs->trans('AmountHT') . '' . price($objectsrc->total_ht) . ''; print '' . $langs->trans('AmountVAT') . '' . price($objectsrc->total_tva) . ""; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE @@ -1028,14 +1000,14 @@ if ($action == 'create') print '' . $langs->trans('MulticurrencyAmountTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; } */ - } + } - print ''; + print ''; - if (is_object($objectsrc)) - { - print ''; - print ''; + if (is_object($objectsrc)) + { + print ''; + print ''; } elseif ($origin == 'project' && !empty($projectid)) { print ''; } @@ -1044,8 +1016,8 @@ if ($action == 'create') print '
'; print ''; - print '     '; - print ''; + print '     '; + print ''; print '
'; print ''; @@ -1061,9 +1033,7 @@ if ($action == 'create') print ''; } - } - else - { + } else { print '
'; print ''; @@ -1088,14 +1058,13 @@ if ($action == 'create') print '
'; print ''; print ''; - print '     '; - print ''; + print '     '; + print ''; print '
'; print '
'; } -} -elseif ($id > 0 || !empty($ref)) +} elseif ($id > 0 || !empty($ref)) { /* * Affichage en mode visu @@ -1107,7 +1076,11 @@ elseif ($id > 0 || !empty($ref)) $soc = new Societe($db); $soc->fetch($object->socid); - dol_htmloutput_mesg($mesg); + if ($error > 0) { + dol_htmloutput_errors($mesg); + } else { + dol_htmloutput_mesg($mesg); + } $head = fichinter_prepare_head($object); @@ -1134,9 +1107,7 @@ elseif ($id > 0 || !empty($ref)) $error++; setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $numref = $object->ref; } $text = $langs->trans('ConfirmValidateIntervention', $numref); @@ -1150,6 +1121,12 @@ elseif ($id > 0 || !empty($ref)) $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ModifyIntervention'), $langs->trans('ConfirmModifyIntervention'), 'confirm_modify', '', 0, 1); } + // Confirm back to open + if ($action == 'reopen') + { + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('Reopen'), $langs->trans('ConfirmReopenIntervention', $object->ref), 'confirm_reopen', '', 0, 1); + } + // Confirm deletion of line if ($action == 'ask_deleteline') { @@ -1195,46 +1172,46 @@ elseif ($id > 0 || !empty($ref)) // Project if (!empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref .= '
'.$langs->trans('Project').' '; - if ($user->rights->ficheinter->creer) - { - if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; - } - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= '
'; - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= ''; - $morehtmlref .= '
'; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ''; - $morehtmlref .= $proj->ref; - $morehtmlref .= ''; - } else { - $morehtmlref .= ''; - } - } + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project').' '; + if ($user->rights->ficheinter->creer) + { + if ($action != 'classify') { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } } $morehtmlref .= '
'; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - print '
'; - print '
'; - print '
'; + print '
'; + print '
'; + print '
'; - print ''; + print '
'; if (!empty($conf->global->FICHINTER_USE_PLANNED_AND_DONE_DATES)) { @@ -1289,54 +1266,50 @@ elseif ($id > 0 || !empty($ref)) if ($action == 'contrat') { $formcontract = new Formcontract($db); - $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1); - } - else - { + $formcontract->formSelectContract($_SERVER["PHP_SELF"].'?id='.$object->id, $object->socid, $object->fk_contrat, 'contratid', 0, 1, 1); + } else { if ($object->fk_contrat) - { - $contratstatic = new Contrat($db); - $contratstatic->fetch($object->fk_contrat); - //print ''.$projet->title.''; - print $contratstatic->getNomUrl(0, '', 1); - } - else - { - print " "; - } + { + $contratstatic = new Contrat($db); + $contratstatic->fetch($object->fk_contrat); + //print ''.$projet->title.''; + print $contratstatic->getNomUrl(0, '', 1); + } else { + print " "; + } } print ''; print ''; } - // Other attributes - $cols = 2; - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + $cols = 2; + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - print '
'; + print ''; - print '
'; - print '
'; - print '
'; - print '
'; + print '
'; + print '
'; + print '
'; + print '
'; - print ''; + print '
'; - if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) - { - // Duration - print ''; - print ''; - print ''; - } + if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) + { + // Duration + print ''; + print ''; + print ''; + } print "
'.$langs->trans("TotalDuration").''.convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'
'.$langs->trans("TotalDuration").''.convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).'
"; print '
'; - print '
'; - print '
'; + print '
'; + print '
'; - print '

'; + print '

'; if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB)) @@ -1363,9 +1336,7 @@ elseif ($id > 0 || !empty($ref)) { print ''; print ''; - } - else - { + } else { print ''; } @@ -1388,8 +1359,13 @@ elseif ($id > 0 || !empty($ref)) { print '
'; print ''; - print ''; + + // No. + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } + print ''; print ''; print ''; @@ -1401,11 +1377,16 @@ elseif ($id > 0 || !empty($ref)) { $objp = $db->fetch_object($resql); - // Ligne en mode visu if ($action != 'editline' || GETPOST('line_id', 'int') != $objp->rowid) { print ''; + + // No. + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } + print ''; - } - else - { + } else { print ''; } @@ -1468,6 +1447,12 @@ elseif ($id > 0 || !empty($ref)) if ($object->statut == 0 && $action == 'editline' && $user->rights->ficheinter->creer && GETPOST('line_id', 'int') == $objp->rowid) { print ''; + + // No. + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } + print ''; - // Duration - print ''; + // Duration + print ''; - print ''; print ''."\n"; @@ -1520,56 +1505,68 @@ elseif ($id > 0 || !empty($ref)) { if (!$num) { - print '
'.$langs->trans('Description').''.$langs->trans('Date').''.(empty($conf->global->FICHINTER_WITHOUT_DURATION) ? $langs->trans('Duration') : '').'
'.($i + 1).''; print ''; // ancre pour retourner sur la ligne print dol_htmlentitiesbr($objp->description); @@ -1446,9 +1427,7 @@ elseif ($id > 0 || !empty($ref)) } } print ' 
'.($i + 1).''; print ''; // ancre pour retourner sur la ligne @@ -1479,25 +1464,25 @@ elseif ($id > 0 || !empty($ref)) // Date d'intervention print ''; - if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) { - print $form->selectDate($db->jdate($objp->date_intervention), 'di', 0, 0, 0, "date_intervention"); - } else { - print $form->selectDate($db->jdate($objp->date_intervention), 'di', 1, 1, 0, "date_intervention"); - } + if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) { + print $form->selectDate($db->jdate($objp->date_intervention), 'di', 0, 0, 0, "date_intervention"); + } else { + print $form->selectDate($db->jdate($objp->date_intervention), 'di', 1, 1, 0, "date_intervention"); + } print ''; - if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) { - $selectmode = 'select'; - if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) - $selectmode = 'text'; - $form->select_duration('duration', $objp->duree, 0, $selectmode); - } - print ''; + if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) { + $selectmode = 'select'; + if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) + $selectmode = 'text'; + $form->select_duration('duration', $objp->duree, 0, $selectmode); + } + print ''; - print ''; + print ''; + print ''; print '
'; + print '
'; + print '
'; + print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print "\n"; + // No. + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''; + } + + print ''; + print ''; + print ''; + print ''; + print "\n"; } print ''."\n"; - print ''; - // Date intervention - print ''; + } + + print ''; + + // Date intervention + print ''; - // Duration - print ''; + // Duration + print ''; - print ''; + print ''; print ''; //Line extrafield @@ -1584,9 +1581,7 @@ elseif ($id > 0 || !empty($ref)) } if ($num) print '
'; - print ''; // ancre - print $langs->trans('Description').''.$langs->trans('Date').''.(empty($conf->global->FICHINTER_WITHOUT_DURATION) ? $langs->trans('Duration') : '').' 
'; + print ''; // ancre + print $langs->trans('Description').''.$langs->trans('Date').''.(empty($conf->global->FICHINTER_WITHOUT_DURATION) ? $langs->trans('Duration') : '').' 
'; - // editeur wysiwyg - if (empty($conf->global->FICHINTER_EMPTY_LINE_DESC)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('np_desc', GETPOST('np_desc', 'restricthtml'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, ROWS_2, '90%'); - $doleditor->Create(); - } - print ''; + // No. + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + print ''.($i + 1).''; + // editeur wysiwyg + if (empty($conf->global->FICHINTER_EMPTY_LINE_DESC)) { + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor('np_desc', GETPOST('np_desc', 'restricthtml'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, ROWS_2, '90%'); + $doleditor->Create(); + } + print ''; $now = dol_now(); $timearray = dol_getdate($now); if (!GETPOST('diday', 'int')) { - $timewithnohour = dol_mktime(0, 0, 0, $timearray['mon'], $timearray['mday'], $timearray['year']); - } else { - $timewithnohour = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int')); - } - if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) { - print $form->selectDate($timewithnohour, 'di', 0, 0, 0, "addinter"); - } else { - print $form->selectDate($timewithnohour, 'di', 1, 1, 0, "addinter"); - } + $timewithnohour = dol_mktime(0, 0, 0, $timearray['mon'], $timearray['mday'], $timearray['year']); + } else { + $timewithnohour = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int')); + } + if (!empty($conf->global->FICHINTER_DATE_WITHOUT_HOUR)) { + print $form->selectDate($timewithnohour, 'di', 0, 0, 0, "addinter"); + } else { + print $form->selectDate($timewithnohour, 'di', 1, 1, 0, "addinter"); + } print ''; - if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) { - $selectmode = 'select'; - if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) { - $selectmode = 'text'; - } - $form->select_duration('duration', (!GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) ? 3600 : (60 * 60 * GETPOST('durationhour', 'int') + 60 * GETPOST('durationmin', 'int')), 0, $selectmode); - } - print ''; + if (empty($conf->global->FICHINTER_WITHOUT_DURATION)) { + $selectmode = 'select'; + if (!empty($conf->global->INTERVENTION_ADDLINE_FREEDUREATION)) { + $selectmode = 'text'; + } + $form->select_duration('duration', (!GETPOST('durationhour', 'int') && !GETPOST('durationmin', 'int')) ? 3600 : (60 * 60 * GETPOST('durationhour', 'int') + 60 * GETPOST('durationmin', 'int')), 0, $selectmode); + } + print '
'; - } - else - { + } else { dol_print_error($db); } @@ -1606,22 +1601,22 @@ elseif ($id > 0 || !empty($ref)) $parameters = array(); $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been - // modified by hook + // modified by hook if (empty($reshook)) { if ($user->socid == 0) { - if ($action != 'editdescription' && ($action != 'presend')) { - // Validate - if ($object->statut == Fichinter::STATUS_DRAFT && (count($object->lines) > 0 || !empty($conf->global->FICHINTER_DISABLE_DETAILS))) { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->creer) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->ficheinter_advance->validate)) { - print ''; - } - } + if ($action != 'editdescription' && ($action != 'presend')) { + // Validate + if ($object->statut == Fichinter::STATUS_DRAFT && (count($object->lines) > 0 || !empty($conf->global->FICHINTER_DISABLE_DETAILS))) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->creer) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->ficheinter_advance->validate)) { + print ''; + } + } - // Modify - if ($object->statut == Fichinter::STATUS_VALIDATED && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->creer) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->ficheinter_advance->unvalidate))) + // Modify + if ($object->statut == Fichinter::STATUS_VALIDATED && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->creer) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && $user->rights->ficheinter->ficheinter_advance->unvalidate))) { print ''; } + // Reopen + if ($object->statut >= Fichinter::STATUS_CLOSED) + { + if ($user->rights->ficheinter->creer) + { + print ''; + } else print ''; + } + // Send if (empty($user->socid)) { if ($object->statut > Fichinter::STATUS_DRAFT) @@ -1636,13 +1640,12 @@ elseif ($id > 0 || !empty($ref)) if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->ficheinter->ficheinter_advance->send) { print ''; - } - else print ''; + } else print ''; } } // create intervention model - if ($conf->global->MAIN_FEATURES_LEVEL >= 2 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) { + if ($conf->global->MAIN_FEATURES_LEVEL >= 1 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) { print ''; @@ -1674,16 +1677,14 @@ elseif ($id > 0 || !empty($ref)) if ($object->statut != Fichinter::STATUS_BILLED) { print ''; - } - else - { + } else { print ''; } } } // Done - if (empty($conf->global->FICHINTER_CLASSIFY_BILLED) && $object->statut > Fichinter::STATUS_DRAFT && $object->statut < Fichinter::STATUS_CLOSED) + if (empty($conf->global->FICHINTER_CLASSIFY_BILLED) && $object->statut > Fichinter::STATUS_DRAFT && $object->statut < Fichinter::STATUS_CLOSED) { print ''; } @@ -1696,7 +1697,7 @@ elseif ($id > 0 || !empty($ref)) // Delete if (($object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer) || $user->rights->ficheinter->supprimer) { - print ''; } } @@ -1717,7 +1718,7 @@ elseif ($id > 0 || !empty($ref)) $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; $genallowed = $user->rights->ficheinter->lire; $delallowed = $user->rights->ficheinter->creer; - print $formfile->showdocuments('ficheinter', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); + print $formfile->showdocuments('ficheinter', $filename, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); // Show links to link elements $linktoelem = $form->showLinkToObjectBlock($object, null, array('fichinter')); diff --git a/htdocs/fichinter/class/api_interventions.class.php b/htdocs/fichinter/class/api_interventions.class.php index 4f81930355e..c2328e5cfd3 100644 --- a/htdocs/fichinter/class/api_interventions.class.php +++ b/htdocs/fichinter/class/api_interventions.class.php @@ -144,7 +144,7 @@ class Interventions extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { @@ -152,29 +152,28 @@ class Interventions extends DolibarrApi } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } dol_syslog("API Rest request"); - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; while ($i < $min) { - $obj = $db->fetch_object($result); - $fichinter_static = new Fichinter($db); + $obj = $this->db->fetch_object($result); + $fichinter_static = new Fichinter($this->db); if ($fichinter_static->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($fichinter_static); } $i++; } - } - else { - throw new RestException(503, 'Error when retrieve intervention list : '.$db->lasterror()); + } else { + throw new RestException(503, 'Error when retrieve intervention list : '.$this->db->lasterror()); } if (!count($obj_ret)) { throw new RestException(404, 'No intervention found'); diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index f370b8bb571..930c6e07978 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -4,7 +4,7 @@ * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2011-2020 Juanjo Menent * Copyright (C) 2015 Marcos García - * Copyright (C) 2015 Charlie Benke + * Copyright (C) 2015-2020 Charlene Benke * Copyright (C) 2018 Nicolas ZABOURI * Copyright (C) 2018-2019 Frédéric France * @@ -206,9 +206,7 @@ class Fichinter extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -281,7 +279,7 @@ class Fichinter extends CommonObject $sql .= ", ".$user->id; $sql .= ", ".$user->id; $sql .= ", ".($this->description ? "'".$this->db->escape($this->description)."'" : "null"); - $sql .= ", '".$this->db->escape($this->modelpdf)."'"; + $sql .= ", '".$this->db->escape($this->model_pdf)."'"; $sql .= ", ".($this->fk_project ? $this->fk_project : 0); $sql .= ", ".($this->fk_contrat ? $this->fk_contrat : 0); $sql .= ", ".$this->statut; @@ -334,17 +332,13 @@ class Fichinter extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); $this->error = join(',', $this->errors); dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); return -1; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -404,9 +398,7 @@ class Fichinter extends CommonObject $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -431,8 +423,7 @@ class Fichinter extends CommonObject if ($ref) { $sql .= " WHERE f.entity IN (".getEntity('intervention').")"; $sql .= " AND f.ref='".$this->db->escape($ref)."'"; - } - else $sql .= " WHERE f.rowid=".$rowid; + } else $sql .= " WHERE f.rowid=".$rowid; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); @@ -457,7 +448,8 @@ class Fichinter extends CommonObject $this->fk_project = $obj->fk_project; $this->note_public = $obj->note_public; $this->note_private = $obj->note_private; - $this->modelpdf = $obj->model_pdf; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated $this->fk_contrat = $obj->fk_contrat; $this->user_creation = $obj->fk_user_author; @@ -480,9 +472,7 @@ class Fichinter extends CommonObject $this->db->free($resql); return 1; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -535,9 +525,7 @@ class Fichinter extends CommonObject $this->db->rollback(); return -1; } - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; @@ -568,9 +556,7 @@ class Fichinter extends CommonObject if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef($this->thirdparty); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -655,9 +641,7 @@ class Fichinter extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); dol_syslog(get_class($this)."::setValid ".$this->error, LOG_ERR); return -1; @@ -781,7 +765,7 @@ class Fichinter extends CommonObject $result = ''; - $label = ''.$langs->trans("ShowIntervention").''; + $label = img_picto('', $this->picto).' '.$langs->trans("Intervention").''; $label .= '
'.$langs->trans('Ref').': '.$this->ref; if (isset($this->status)) { $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5); @@ -826,7 +810,7 @@ class Fichinter extends CommonObject $result .= $linkend; global $action; - $hookmanager->initHooks(array('intervnetiondao')); + $hookmanager->initHooks(array('interventiondao')); $parameters = array('id'=>$this->id, 'getnomurl'=>$result); $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks if ($reshook > 0) $result = $hookmanager->resPrint; @@ -877,15 +861,11 @@ class Fichinter extends CommonObject if ($numref != "") { return $numref; - } - else - { + } else { dol_print_error($db, "Fichinter::getNextNumRef ".$obj->error); return ""; } - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("Error_FICHEINTER_ADDON_NotDefined"); return ""; @@ -943,9 +923,7 @@ class Fichinter extends CommonObject } } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db); } } @@ -1067,9 +1045,7 @@ class Fichinter extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1099,9 +1075,7 @@ class Fichinter extends CommonObject { $this->date_delivery = $date_delivery; return 1; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog("Fichinter::set_date_delivery Erreur SQL"); return -1; @@ -1133,9 +1107,7 @@ class Fichinter extends CommonObject { $this->description = $description; return 1; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog("Fichinter::set_description Erreur SQL"); return -1; @@ -1160,16 +1132,14 @@ class Fichinter extends CommonObject if ($user->rights->ficheinter->creer) { $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter "; - $sql .= " SET fk_contrat = '".$contractid."'"; + $sql .= " SET fk_contrat = ".((int) $contractid); $sql .= " WHERE rowid = ".$this->id; if ($this->db->query($sql)) { $this->fk_contrat = $contractid; return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1259,9 +1229,7 @@ class Fichinter extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1305,9 +1273,7 @@ class Fichinter extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -1398,9 +1364,7 @@ class Fichinter extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1503,9 +1467,7 @@ class FichinterLigne extends CommonObjectLine $this->db->free($result); return 1; - } - else - { + } else { $this->error = $this->db->error().' sql='.$sql; return -1; } @@ -1539,9 +1501,7 @@ class FichinterLigne extends CommonObjectLine { $obj = $this->db->fetch_object($resql); $rangToUse = $obj->max + 1; - } - else - { + } else { dol_print_error($this->db); $this->db->rollback(); return -1; @@ -1593,15 +1553,11 @@ class FichinterLigne extends CommonObjectLine if (!$error) { $this->db->commit(); return $result; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; @@ -1661,16 +1617,12 @@ class FichinterLigne extends CommonObjectLine { $this->db->commit(); return $result; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -1714,16 +1666,12 @@ class FichinterLigne extends CommonObjectLine { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -1773,22 +1721,16 @@ class FichinterLigne extends CommonObjectLine $this->db->commit(); return $result; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; } - } - else - { + } else { return -2; } } diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php index a09547b3164..c9e689ffd4c 100644 --- a/htdocs/fichinter/class/fichinterrec.class.php +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -38,780 +38,777 @@ require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; */ class FichinterRec extends Fichinter { - public $element = 'fichinterrec'; - public $table_element = 'fichinter_rec'; - public $table_element_line = 'fichinter_rec'; - public $fk_element = 'fk_fichinter'; + public $element = 'fichinterrec'; + public $table_element = 'fichinter_rec'; + public $table_element_line = 'fichinter_rec'; + public $fk_element = 'fk_fichinter'; - /** + /** * {@inheritdoc} */ protected $table_ref_field = 'titre'; - /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto = 'intervention'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'intervention'; - public $title; - public $number; - public $date; - public $amount; - public $remise; - public $tva; - public $total; - public $db_table; - public $propalid; + public $title; + public $number; + public $date; + public $amount; + public $remise; + public $tva; + public $total; + public $db_table; + public $propalid; - public $date_last_gen; - public $date_when; - public $nb_gen_done; - public $nb_gen_max; + public $date_last_gen; + public $date_when; + public $nb_gen_done; + public $nb_gen_max; - public $rang; - public $special_code; + public $rang; + public $special_code; - public $usenewprice = 0; + public $usenewprice = 0; - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; - //status dans l'ordre de l'intervention - $this->statuts[0] = 'Draft'; - $this->statuts[1] = 'Closed'; + //status dans l'ordre de l'intervention + $this->statuts[0] = 'Draft'; + $this->statuts[1] = 'Closed'; - $this->statuts_short[0] = 'Draft'; - $this->statuts_short[1] = 'Closed'; + $this->statuts_short[0] = 'Draft'; + $this->statuts_short[1] = 'Closed'; - $this->statuts_logo[0] = 'statut0'; - $this->statuts_logo[1] = 'statut1'; - } + $this->statuts_logo[0] = 'statut0'; + $this->statuts_logo[1] = 'statut1'; + } - /** - * Returns the label status - * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * @return string Label - */ - public function getLibStatut($mode = 0) - { - return $this->LibStatut($this->statut, $mode); - } + /** + * Returns the label status + * + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @return string Label + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->statut, $mode); + } - /** - * Create a predefined fichinter - * - * @param User $user User object - * @param int $notrigger no trigger - * @return int <0 if KO, id of fichinter if OK - */ - public function create($user, $notrigger = 0) - { - global $conf; + /** + * Create a predefined fichinter + * + * @param User $user User object + * @param int $notrigger no trigger + * @return int <0 if KO, id of fichinter if OK + */ + public function create($user, $notrigger = 0) + { + global $conf; - $error = 0; - $now = dol_now(); + $error = 0; + $now = dol_now(); - // Clean parameters - $this->title = trim($this->title); - $this->description = trim($this->description); + // Clean parameters + $this->title = trim($this->title); + $this->description = trim($this->description); - $this->db->begin(); + $this->db->begin(); - // Load fichinter model - $fichintsrc = new Fichinter($this->db); + // Load fichinter model + $fichintsrc = new Fichinter($this->db); - $result = $fichintsrc->fetch($this->id_origin); - $result = $fichintsrc->fetch_lines(1); // to get all lines + $result = $fichintsrc->fetch($this->id_origin); + $result = $fichintsrc->fetch_lines(1); // to get all lines - if ($result > 0) { - // On positionne en mode brouillon la facture - $this->brouillon = 1; + if ($result > 0) { + // On positionne en mode brouillon la facture + $this->brouillon = 1; - $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinter_rec ("; - $sql .= "titre"; - $sql .= ", fk_soc"; - $sql .= ", entity"; - $sql .= ", datec"; - $sql .= ", duree"; - $sql .= ", description"; - $sql .= ", note_private"; - $sql .= ", note_public"; - $sql .= ", fk_user_author"; - $sql .= ", fk_projet"; - $sql .= ", fk_contrat"; - $sql .= ", modelpdf"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinter_rec ("; + $sql .= "titre"; + $sql .= ", fk_soc"; + $sql .= ", entity"; + $sql .= ", datec"; + $sql .= ", duree"; + $sql .= ", description"; + $sql .= ", note_private"; + $sql .= ", note_public"; + $sql .= ", fk_user_author"; + $sql .= ", fk_projet"; + $sql .= ", fk_contrat"; + $sql .= ", modelpdf"; - $sql .= ", frequency"; - $sql .= ", unit_frequency"; - $sql .= ", date_when"; - $sql .= ", date_last_gen"; - $sql .= ", nb_gen_done"; - $sql .= ", nb_gen_max"; - // $sql.= ", auto_validate"; + $sql .= ", frequency"; + $sql .= ", unit_frequency"; + $sql .= ", date_when"; + $sql .= ", date_last_gen"; + $sql .= ", nb_gen_done"; + $sql .= ", nb_gen_max"; + // $sql.= ", auto_validate"; - $sql .= ") VALUES ("; - $sql .= "'".$this->db->escape($this->title)."'"; - $sql .= ", ".($this->socid > 0 ? $this->socid : 'null'); - $sql .= ", ".$conf->entity; - $sql .= ", '".$this->db->idate($now)."'"; - $sql .= ", ".(!empty($fichintsrc->duration) ? $fichintsrc->duration : '0'); - $sql .= ", ".(!empty($this->description) ? ("'".$this->db->escape($this->description)."'") : "null"); - $sql .= ", ".(!empty($fichintsrc->note_private) ? ("'".$this->db->escape($fichintsrc->note_private)."'") : "null"); - $sql .= ", ".(!empty($fichintsrc->note_public) ? ("'".$this->db->escape($fichintsrc->note_public)."'") : "null"); - $sql .= ", '".$user->id."'"; - // si c'est la même société on conserve les liens vers le projet et le contrat - if ($this->socid == $fichintsrc->socid) { - $sql .= ", ".(!empty($fichintsrc->fk_project) ? $fichintsrc->fk_project : "null"); - $sql .= ", ".(!empty($fichintsrc->fk_contrat) ? $fichintsrc->fk_contrat : "null"); - } else { - $sql .= ", null, null"; - } + $sql .= ") VALUES ("; + $sql .= "'".$this->db->escape($this->title)."'"; + $sql .= ", ".($this->socid > 0 ? $this->socid : 'null'); + $sql .= ", ".$conf->entity; + $sql .= ", '".$this->db->idate($now)."'"; + $sql .= ", ".(!empty($fichintsrc->duration) ? $fichintsrc->duration : '0'); + $sql .= ", ".(!empty($this->description) ? ("'".$this->db->escape($this->description)."'") : "null"); + $sql .= ", ".(!empty($fichintsrc->note_private) ? ("'".$this->db->escape($fichintsrc->note_private)."'") : "null"); + $sql .= ", ".(!empty($fichintsrc->note_public) ? ("'".$this->db->escape($fichintsrc->note_public)."'") : "null"); + $sql .= ", ".$user->id; + // si c'est la même société on conserve les liens vers le projet et le contrat + if ($this->socid == $fichintsrc->socid) { + $sql .= ", ".(!empty($fichintsrc->fk_project) ? $fichintsrc->fk_project : "null"); + $sql .= ", ".(!empty($fichintsrc->fk_contrat) ? $fichintsrc->fk_contrat : "null"); + } else { + $sql .= ", null, null"; + } - $sql .= ", ".(!empty($fichintsrc->modelpdf) ? "'".$this->db->escape($fichintsrc->modelpdf)."'" : "''"); + $sql .= ", ".(!empty($fichintsrc->model_pdf) ? "'".$this->db->escape($fichintsrc->model_pdf)."'" : "''"); - // récurrence - $sql .= ", ".(!empty($this->frequency) ? $this->frequency : "null"); - $sql .= ", '".$this->db->escape($this->unit_frequency)."'"; - $sql .= ", ".(!empty($this->date_when) ? "'".$this->db->idate($this->date_when)."'" : 'null'); - $sql .= ", ".(!empty($this->date_last_gen) ? "'".$this->db->idate($this->date_last_gen)."'" : 'null'); - $sql .= ", 0"; // we start à 0 - $sql .= ", ".$this->nb_gen_max; - // $sql.= ", ".$this->auto_validate; - $sql .= ")"; + // récurrence + $sql .= ", ".(!empty($this->frequency) ? $this->frequency : "null"); + $sql .= ", '".$this->db->escape($this->unit_frequency)."'"; + $sql .= ", ".(!empty($this->date_when) ? "'".$this->db->idate($this->date_when)."'" : 'null'); + $sql .= ", ".(!empty($this->date_last_gen) ? "'".$this->db->idate($this->date_last_gen)."'" : 'null'); + $sql .= ", 0"; // we start à 0 + $sql .= ", ".$this->nb_gen_max; + // $sql.= ", ".$this->auto_validate; + $sql .= ")"; - if ($this->db->query($sql)) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); + if ($this->db->query($sql)) { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - /* + /* * Lines */ - $num = count($fichintsrc->lines); - for ($i = 0; $i < $num; $i++) { - //$result=$fichintlignesrc->fetch($fichintsrc->lines[$i]->id); - - //var_dump($fichintsrc->lines[$i]); - $result_insert = $this->addline( - $fichintsrc->lines[$i]->desc, - $fichintsrc->lines[$i]->duration, - $fichintsrc->lines[$i]->datei, - $fichintsrc->lines[$i]->rang, - $fichintsrc->lines[$i]->subprice, - $fichintsrc->lines[$i]->qty, - $fichintsrc->lines[$i]->tva_tx, - $fichintsrc->lines[$i]->fk_product, - $fichintsrc->lines[$i]->remise_percent, - 'HT', - 0, - '', - 0, - $fichintsrc->lines[$i]->product_type, - $fichintsrc->lines[$i]->special_code, - $fichintsrc->lines[$i]->label, - $fichintsrc->lines[$i]->fk_unit - ); - - if ($result_insert < 0) - $error++; - } - - if ($error) - $this->db->rollback(); - else { - $this->db->commit(); - return $this->id; - } - } else { - $this->error = $this->db->error().' sql='.$sql; - $this->db->rollback(); - return -2; - } - } else { - $this->db->rollback(); - return -1; - } - } - - - /** - * Recupere l'objet facture et ses lignes de factures - * - * @param int $rowid Id of object to load - * @param string $ref Reference of fichinter - * @param string $ref_ext External reference of fichinter - * @return int >0 if OK, <0 if KO, 0 if not found - */ - public function fetch($rowid = 0, $ref = '', $ref_ext = '') - { - $sql = 'SELECT f.titre, f.fk_soc'; - $sql .= ', f.datec, f.duree, f.fk_projet, f.fk_contrat, f.description'; - $sql .= ', f.note_private, f.note_public, f.fk_user_author'; - $sql .= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.auto_validate'; - $sql .= ', f.note_private, f.note_public, f.fk_user_author'; - - $sql .= ' FROM '.MAIN_DB_PREFIX.'fichinter_rec as f'; - if ($rowid > 0) $sql .= ' WHERE f.rowid='.$rowid; - elseif ($ref) $sql .= " WHERE f.titre='".$this->db->escape($ref)."'"; - - dol_syslog(get_class($this)."::fetch rowid=".$rowid, LOG_DEBUG); - - $result = $this->db->query($sql); - if ($result) { - if ($this->db->num_rows($result)) { - $obj = $this->db->fetch_object($result); - - $this->id = $rowid; - $this->titre = $obj->titre; - $this->ref = $obj->titre; - $this->description = $obj->description; - $this->datec = $obj->datec; - $this->duration = $obj->duree; - $this->socid = $obj->fk_soc; - $this->statut = 0; - $this->fk_project = $obj->fk_projet; - $this->fk_contrat = $obj->fk_contrat; - $this->note_private = $obj->note_private; - $this->note_public = $obj->note_public; - $this->user_author = $obj->fk_user_author; - $this->modelpdf = $obj->model_pdf; - $this->rang = $obj->rang; - $this->special_code = $obj->special_code; - $this->frequency = $obj->frequency; - $this->unit_frequency = $obj->unit_frequency; - $this->date_when = $this->db->jdate($obj->date_when); - $this->date_last_gen = $this->db->jdate($obj->date_last_gen); - $this->nb_gen_done = $obj->nb_gen_done; - $this->nb_gen_max = $obj->nb_gen_max; - $this->auto_validate = $obj->auto_validate; - - $this->brouillon = 1; - - /* - * Lines - */ - $result = $this->fetch_lines(); - if ($result < 0) { - $this->error = $this->db->error(); - return -3; - } - return 1; - } else { - $this->error = 'Interventional with id '.$rowid.' not found sql='.$sql; - dol_syslog(get_class($this).'::Fetch Error '.$this->error, LOG_ERR); - return -2; - } - } else { - $this->error = $this->db->error(); - return -1; - } - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Recupere les lignes de factures predefinies dans this->lines - * @param int $sall sall - * - * @return int 1 if OK, < 0 if KO - */ - public function fetch_lines($sall = 0) - { - // phpcs:enable - $sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, '; - $sql .= ' l.price, l.qty, l.tva_tx, l.remise, l.remise_percent, l.subprice, l.duree, '; - $sql .= ' l.total_ht, l.total_tva, l.total_ttc,'; - $sql .= ' l.rang, l.special_code,'; - $sql .= ' l.fk_unit, p.ref as product_ref, p.fk_product_type as fk_product_type,'; - $sql .= ' p.label as product_label, p.description as product_desc'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet_rec as l'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; - $sql .= ' WHERE l.fk_fichinter = '.$this->id; - - dol_syslog('FichInter-rec::fetch_lines', LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) { - $num = $this->db->num_rows($result); - $i = 0; - while ($i < $num) { - $objp = $this->db->fetch_object($result); - $line = new FichinterLigne($this->db); - - $line->id = $objp->rowid; - $line->label = $objp->custom_label; // Label line - $line->desc = $objp->description; // Description line - $line->product_type = $objp->product_type; // Type of line - $line->product_ref = $objp->product_ref; // Ref product - $line->product_label = $objp->product_label; // Label product - $line->product_desc = $objp->product_desc; // Description product - $line->fk_product_type = $objp->fk_product_type; // Type of product - $line->qty = $objp->qty; - $line->duree = $objp->duree; - $line->duration = $objp->duree; - $line->datei = $objp->date; - $line->subprice = $objp->subprice; - $line->tva_tx = $objp->tva_tx; - $line->remise_percent = $objp->remise_percent; - $line->fk_remise_except = $objp->fk_remise_except; - $line->fk_product = $objp->fk_product; - $line->date_start = $objp->date_start; - $line->date_end = $objp->date_end; - $line->date_start = $objp->date_start; - $line->date_end = $objp->date_end; - $line->info_bits = $objp->info_bits; - $line->total_ht = $objp->total_ht; - $line->total_tva = $objp->total_tva; - $line->total_ttc = $objp->total_ttc; - $line->code_ventilation = $objp->fk_code_ventilation; - $line->rang = $objp->rang; - $line->special_code = $objp->special_code; - $line->fk_unit = $objp->fk_unit; - - // Ne plus utiliser - $line->price = $objp->price; - $line->remise = $objp->remise; - - $this->lines[$i] = $line; - - $i++; - } - - $this->db->free($result); - return 1; - } else { - $this->error = $this->db->error(); - return -3; - } - } - - - /** - * Delete template fichinter rec - * - * @param int $rowid Id of fichinter rec to delete. If empty, we delete current instance of fichinter rec - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @param int $idwarehouse Id warehouse to use for stock change. - * @return int <0 if KO, >0 if OK - */ - public function delete($rowid = 0, $notrigger = 0, $idwarehouse = -1) - { - if (empty($rowid)) $rowid = $this->id; - - dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG); - - $error = 0; - $this->db->begin(); - - $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet_rec WHERE fk_fichinter = ".$rowid; - dol_syslog($sql); - if ($this->db->query($sql)) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter_rec WHERE rowid = ".$rowid; - dol_syslog($sql); - if (!$this->db->query($sql)) { - $this->error = $this->db->lasterror(); - $error = -1; - } - } else { - $this->error = $this->db->lasterror(); - $error = -2; - } - - if (!$error) { - $this->db->commit(); - return 1; - } else { - $this->db->rollback(); - return $error; - } - } - - - /** - * Add a line to fichinter rec - * - * @param string $desc Description de la ligne - * @param integer $duration Durée - * @param string $datei Date - * @param int $rang Position of line - * @param double $pu_ht Prix unitaire HT (> 0 even for credit note) - * @param double $qty Quantite - * @param double $txtva Taux de tva force, sinon -1 - * @param int $fk_product Id du produit/service predefini - * @param double $remise_percent Pourcentage de remise de la ligne - * @param string $price_base_type HT or TTC - * @param int $info_bits Bits de type de lignes - * @param int $fk_remise_except Id remise - * @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note) - * @param int $type Type of line (0=product, 1=service) - * @param int $special_code Special code - * @param string $label Label of the line - * @param string $fk_unit Unit - * @return int <0 if KO, Id of line if OK - */ - public function addline($desc, $duration, $datei, $rang = -1, $pu_ht = 0, $qty = 0, $txtva = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $special_code = 0, $label = '', $fk_unit = null) - { - global $mysoc; - - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - - // Check parameters - if ($type < 0) return -1; - - if ($this->brouillon) { - // Clean parameters - $remise_percent = price2num($remise_percent); - $qty = price2num($qty); - if (!$qty) $qty = 1; - if (!$info_bits) $info_bits = 0; - $pu_ht = price2num($pu_ht); - $pu_ttc = price2num($pu_ttc); - $txtva = price2num($txtva); - - if ($price_base_type == 'HT') { - $pu = $pu_ht; - } else { - $pu = $pu_ttc; - } - - - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type, $mysoc); - - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - - $product_type = $type; - if ($fk_product) { - $product = new Product($this->db); - $result = $product->fetch($fk_product); - $product_type = $product->type; - } - - $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinterdet_rec ("; - $sql .= "fk_fichinter"; - $sql .= ", label"; - $sql .= ", description"; - $sql .= ", date"; - $sql .= ", duree"; - //$sql.= ", price"; - //$sql.= ", qty"; - //$sql.= ", tva_tx"; - $sql .= ", fk_product"; - $sql .= ", product_type"; - $sql .= ", remise_percent"; - //$sql.= ", subprice"; - $sql .= ", remise"; - $sql .= ", total_ht"; - $sql .= ", total_tva"; - $sql .= ", total_ttc"; - $sql .= ", rang"; - //$sql.= ", special_code"; - $sql .= ", fk_unit"; - $sql .= ") VALUES ("; - $sql .= (int) $this->id; - $sql .= ", ".(!empty($label) ? "'".$this->db->escape($label)."'" : "null"); - $sql .= ", ".(!empty($desc) ? "'".$this->db->escape($desc)."'" : "null"); - $sql .= ", ".(!empty($datei) ? "'".$this->db->idate($datei)."'" : "null"); - $sql .= ", ".$duration; - //$sql.= ", ".price2num($pu_ht); - //$sql.= ", ".(!empty($qty)? $qty :(!empty($duration)? $duration :"null")); - //$sql.= ", ".price2num($txtva); - $sql .= ", ".(!empty($fk_product) ? $fk_product : "null"); - $sql .= ", ".$product_type; - $sql .= ", ".(!empty($remise_percent) ? $remise_percent : "null"); - //$sql.= ", '".price2num($pu_ht)."'"; - $sql .= ", null"; - $sql .= ", '".price2num($total_ht)."'"; - $sql .= ", '".price2num($total_tva)."'"; - $sql .= ", '".price2num($total_ttc)."'"; - $sql .= ", ".(int) $rang; - //$sql.= ", ".$special_code; - $sql .= ", ".(!empty($fk_unit) ? $fk_unit : "null"); - $sql .= ")"; - - dol_syslog(get_class($this)."::addline", LOG_DEBUG); - if ($this->db->query($sql)) { - return 1; - } else { - $this->error = $this->db->lasterror(); - return -1; - } - } - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Rend la fichinter automatique - * - * @param User $user User object - * @param int $freq Freq - * @param string $courant Courant - * @return int 0 if OK, <0 if KO - */ - public function set_auto($user, $freq, $courant) - { - // phpcs:enable - if ($user->rights->fichinter->creer) { - $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter_rec "; - $sql .= " SET frequency='".$this->db->escape($freq)."'"; - $sql .= ", date_last_gen='".$this->db->escape($courant)."'"; - $sql .= " WHERE rowid = ".$this->id; - - $resql = $this->db->query($sql); - - if ($resql) { - $this->frequency = $freq; - $this->date_last_gen = $courant; - return 0; - } else { - dol_print_error($this->db); - return -1; - } - } else { - return -2; - } - } - - /** - * Return clicable name (with picto eventually) - * - * @param int $withpicto Add picto into link - * @param string $option Where point the link - * @param int $max Maxlength of ref - * @param int $short 1=Return just URL - * @param string $moretitle Add more text to title tooltip - * @return string String with URL - */ - public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '') - { - global $langs; - - $result = ''; - $label = $langs->trans("ShowInterventionModel").': '.$this->ref; - - $url = DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$this->id; - - if ($short) return $url; - - $picto = 'intervention'; - - $link = ''; - $linkend = ''; - - if ($withpicto) { - $result .= $link.img_object($label, $picto, 'class="classfortooltip"').$linkend; - } - if ($withpicto && $withpicto != 2) { - $result .= ' '; - } - if ($withpicto != 2) { - $result .= $link.$this->ref.$linkend; - } - return $result; - } - - - /** - * Initialise an instance with random values. - * Used to build previews or test instances. - * id must be 0 if object instance is a specimen. - * - * @param string $option ''=Create a specimen fichinter with lines, 'nolines'=No lines - * @return void - */ - public function initAsSpecimen($option = '') - { - global $user, $langs, $conf; - - $now = dol_now(); - $arraynow = dol_getdate($now); - $nownotime = dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']); - - parent::initAsSpecimen($option); - - $this->usenewprice = 1; - } - - /** - * Function used to replace a thirdparty id with another one. - * - * @param DoliDB $db Database handler - * @param int $origin_id Old thirdparty id - * @param int $dest_id New thirdparty id - * @return bool - */ - public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) - { - $tables = array('fichinter_rec'); - - return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); - } - - - /** - * Update frequency and unit - * - * @param int $frequency value of frequency - * @param string $unit unit of frequency (d, m, y) - * @return int <0 if KO, >0 if OK - */ - public function setFrequencyAndUnit($frequency, $unit) - { - if (!$this->table_element) { - dol_syslog(get_class($this)."::setFrequencyAndUnit called with table_element not defined", LOG_ERR); - return -1; - } - - if (!empty($frequency) && empty($unit)) { - dol_syslog(get_class($this)."::setFrequencyAndUnit called with frequency defined but unit not ", LOG_ERR); - return -2; - } - - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET frequency = '.($frequency ? $this->db->escape($frequency) : 'null'); - if (!empty($unit)) { - $sql .= ', unit_frequency = "'.$this->db->escape($unit).'"'; - } - $sql .= ' WHERE rowid = '.$this->id; - - dol_syslog(get_class($this)."::setFrequencyAndUnit", LOG_DEBUG); - if ($this->db->query($sql)) { - $this->frequency = $frequency; - if (!empty($unit)) $this->unit_frequency = $unit; - return 1; - } else { - dol_print_error($this->db); - return -1; - } - } - - /** - * Update the next date of execution - * - * @param datetime $date date of execution - * @param int $increment_nb_gen_done 0 do nothing more, >0 increment nb_gen_done - * @return int <0 if KO, >0 if OK - */ - public function setNextDate($date, $increment_nb_gen_done = 0) - { - if (!$this->table_element) { - dol_syslog(get_class($this)."::setNextDate was called on objet with property table_element not defined", LOG_ERR); - return -1; - } - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= " SET date_when = ".($date ? "'".$this->db->idate($date)."'" : "null"); - if ($increment_nb_gen_done > 0) $sql .= ', nb_gen_done = nb_gen_done + 1'; - $sql .= ' WHERE rowid = '.$this->id; - - dol_syslog(get_class($this)."::setNextDate", LOG_DEBUG); - if ($this->db->query($sql)) { - $this->date_when = $date; - if ($increment_nb_gen_done > 0) $this->nb_gen_done++; - return 1; - } else { - dol_print_error($this->db); - return -1; - } - } - - /** - * Update the maximum period - * - * @param int $nb number of maximum period - * @return int <0 if KO, >0 if OK - */ - public function setMaxPeriod($nb) - { - if (!$this->table_element) { - dol_syslog(get_class($this)."::setMaxPeriod was called on objet with property table_element not defined", LOG_ERR); - return -1; - } - - if (empty($nb)) $nb = 0; - - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET nb_gen_max = '.$nb; - $sql .= ' WHERE rowid = '.$this->id; - - dol_syslog(get_class($this)."::setMaxPeriod", LOG_DEBUG); - if ($this->db->query($sql)) { - $this->nb_gen_max = $nb; - return 1; - } else { - dol_print_error($this->db); - return -1; - } - } - - /** - * Update the auto validate fichinter - * - * @param int $validate 0 to create in draft, 1 to create and validate fichinter - * @return int <0 if KO, >0 if OK - */ - public function setAutoValidate($validate) - { - if (!$this->table_element) { - dol_syslog(get_class($this)."::setAutoValidate called with property table_element not defined", LOG_ERR); - return -1; - } - - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET auto_validate = '.$validate; - $sql .= ' WHERE rowid = '.$this->id; - - dol_syslog(get_class($this)."::setAutoValidate", LOG_DEBUG); - if ($this->db->query($sql)) { - $this->auto_validate = $validate; - return 1; - } else { - dol_print_error($this->db); - return -1; - } - } - - /** - * Update the Number of Generation Done - * - * @return int <0 if KO, >0 if OK - */ - public function updateNbGenDone() - { - if (!$this->table_element) { - dol_syslog(get_class($this)."::updateNbGenDone called with property table_element not defined", LOG_ERR); - return -1; - } - - $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET nb_gen_done = nb_gen_done + 1'; - $sql .= ' , date_last_gen = now()'; - // si on et arrivé à la fin des génération - if ($this->nb_gen_max == $this->nb_gen_done + 1) - $sql .= ' , statut = 1'; - - $sql .= ' WHERE rowid = '.$this->id; - - dol_syslog(get_class($this)."::setAutoValidate", LOG_DEBUG); - if ($this->db->query($sql)) { - $this->nb_gen_done = $this->nb_gen_done + 1; - $this->nb_gen_done = dol_now(); - return 1; - } else { - dol_print_error($this->db); - return -1; - } - } + $num = count($fichintsrc->lines); + for ($i = 0; $i < $num; $i++) { + //var_dump($fichintsrc->lines[$i]); + $result_insert = $this->addline( + $fichintsrc->lines[$i]->desc, + $fichintsrc->lines[$i]->duration, + $fichintsrc->lines[$i]->datei, + $fichintsrc->lines[$i]->rang, + $fichintsrc->lines[$i]->subprice, + $fichintsrc->lines[$i]->qty, + $fichintsrc->lines[$i]->tva_tx, + $fichintsrc->lines[$i]->fk_product, + $fichintsrc->lines[$i]->remise_percent, + 'HT', + 0, + '', + 0, + $fichintsrc->lines[$i]->product_type, + $fichintsrc->lines[$i]->special_code, + $fichintsrc->lines[$i]->label, + $fichintsrc->lines[$i]->fk_unit + ); + + if ($result_insert < 0) + $error++; + } + + if ($error) + $this->db->rollback(); + else { + $this->db->commit(); + return $this->id; + } + } else { + $this->error = $this->db->error().' sql='.$sql; + $this->db->rollback(); + return -2; + } + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Get the template of intervention object and lines + * + * @param int $rowid Id of object to load + * @param string $ref Reference of fichinter + * @param string $ref_ext External reference of fichinter + * @return int >0 if OK, <0 if KO, 0 if not found + */ + public function fetch($rowid = 0, $ref = '', $ref_ext = '') + { + $sql = 'SELECT f.titre as title, f.fk_soc'; + $sql .= ', f.datec, f.duree, f.fk_projet, f.fk_contrat, f.description'; + $sql .= ', f.note_private, f.note_public, f.fk_user_author'; + $sql .= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.auto_validate'; + $sql .= ', f.note_private, f.note_public, f.fk_user_author'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'fichinter_rec as f'; + if ($rowid > 0) $sql .= ' WHERE f.rowid='.$rowid; + elseif ($ref) $sql .= " WHERE f.titre='".$this->db->escape($ref)."'"; + + dol_syslog(get_class($this)."::fetch rowid=".$rowid, LOG_DEBUG); + + $result = $this->db->query($sql); + if ($result) { + if ($this->db->num_rows($result)) { + $obj = $this->db->fetch_object($result); + + $this->id = $rowid; + $this->titre = $obj->title; + $this->title = $obj->title; + $this->ref = $obj->title; + $this->description = $obj->description; + $this->datec = $obj->datec; + $this->duration = $obj->duree; + $this->socid = $obj->fk_soc; + $this->statut = 0; + $this->fk_project = $obj->fk_projet; + $this->fk_contrat = $obj->fk_contrat; + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; + $this->user_author = $obj->fk_user_author; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; + $this->rang = $obj->rang; + $this->special_code = $obj->special_code; + $this->frequency = $obj->frequency; + $this->unit_frequency = $obj->unit_frequency; + $this->date_when = $this->db->jdate($obj->date_when); + $this->date_last_gen = $this->db->jdate($obj->date_last_gen); + $this->nb_gen_done = $obj->nb_gen_done; + $this->nb_gen_max = $obj->nb_gen_max; + $this->auto_validate = $obj->auto_validate; + + $this->brouillon = 1; + + // Lines + $result = $this->fetch_lines(); + if ($result < 0) { + $this->error = $this->db->error(); + return -3; + } + return 1; + } else { + $this->error = 'Interventional with id '.$rowid.' not found sql='.$sql; + dol_syslog(get_class($this).'::Fetch Error '.$this->error, LOG_ERR); + return -2; + } + } else { + $this->error = $this->db->error(); + return -1; + } + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Load all lines of template of intervention into this->lines + * + * @param int $sall sall + * @return int 1 if OK, < 0 if KO + */ + public function fetch_lines($sall = 0) + { + // phpcs:enable + $sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, '; + $sql .= ' l.price, l.qty, l.tva_tx, l.remise, l.remise_percent, l.subprice, l.duree, '; + $sql .= ' l.total_ht, l.total_tva, l.total_ttc,'; + $sql .= ' l.rang, l.special_code,'; + $sql .= ' l.fk_unit, p.ref as product_ref, p.fk_product_type as fk_product_type,'; + $sql .= ' p.label as product_label, p.description as product_desc'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet_rec as l'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; + $sql .= ' WHERE l.fk_fichinter = '.$this->id; + + dol_syslog('FichInter-rec::fetch_lines', LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) { + $num = $this->db->num_rows($result); + $i = 0; + while ($i < $num) { + $objp = $this->db->fetch_object($result); + $line = new FichinterLigne($this->db); + + $line->id = $objp->rowid; + $line->label = $objp->custom_label; // Label line + $line->desc = $objp->description; // Description line + $line->product_type = $objp->product_type; // Type of line + $line->product_ref = $objp->product_ref; // Ref product + $line->product_label = $objp->product_label; // Label product + $line->product_desc = $objp->product_desc; // Description product + $line->fk_product_type = $objp->fk_product_type; // Type of product + $line->qty = $objp->qty; + $line->duree = $objp->duree; + $line->duration = $objp->duree; + $line->datei = $objp->date; + $line->subprice = $objp->subprice; + $line->tva_tx = $objp->tva_tx; + $line->remise_percent = $objp->remise_percent; + $line->fk_remise_except = $objp->fk_remise_except; + $line->fk_product = $objp->fk_product; + $line->date_start = $objp->date_start; + $line->date_end = $objp->date_end; + $line->date_start = $objp->date_start; + $line->date_end = $objp->date_end; + $line->info_bits = $objp->info_bits; + $line->total_ht = $objp->total_ht; + $line->total_tva = $objp->total_tva; + $line->total_ttc = $objp->total_ttc; + $line->code_ventilation = $objp->fk_code_ventilation; + $line->rang = $objp->rang; + $line->special_code = $objp->special_code; + $line->fk_unit = $objp->fk_unit; + + // Ne plus utiliser + $line->price = $objp->price; + $line->remise = $objp->remise; + + $this->lines[$i] = $line; + + $i++; + } + + $this->db->free($result); + return 1; + } else { + $this->error = $this->db->error(); + return -3; + } + } + + + /** + * Delete template fichinter rec + * + * @param int $rowid Id of fichinter rec to delete. If empty, we delete current instance of fichinter rec + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @param int $idwarehouse Id warehouse to use for stock change. + * @return int <0 if KO, >0 if OK + */ + public function delete($rowid = 0, $notrigger = 0, $idwarehouse = -1) + { + if (empty($rowid)) $rowid = $this->id; + + dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG); + + $error = 0; + $this->db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet_rec WHERE fk_fichinter = ".$rowid; + dol_syslog($sql); + if ($this->db->query($sql)) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter_rec WHERE rowid = ".$rowid; + dol_syslog($sql); + if (!$this->db->query($sql)) { + $this->error = $this->db->lasterror(); + $error = -1; + } + } else { + $this->error = $this->db->lasterror(); + $error = -2; + } + + if (!$error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return $error; + } + } + + + /** + * Add a line to fichinter rec + * + * @param string $desc Description de la ligne + * @param integer $duration Durée + * @param string $datei Date + * @param int $rang Position of line + * @param double $pu_ht Unit price without tax (> 0 even for credit note) + * @param double $qty Quantity + * @param double $txtva Forced VAT rate, otherwise -1 + * @param int $fk_product Id of predefined product/service + * @param double $remise_percent Percentage of discount on line + * @param string $price_base_type HT or TTC + * @param int $info_bits Bits for type of lines + * @param int $fk_remise_except Id discount + * @param double $pu_ttc Unit price with tax (> 0 even for credit note) + * @param int $type Type of line (0=product, 1=service) + * @param int $special_code Special code + * @param string $label Label of the line + * @param string $fk_unit Unit + * @return int <0 if KO, Id of line if OK + */ + public function addline($desc, $duration, $datei, $rang = -1, $pu_ht = 0, $qty = 0, $txtva = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $special_code = 0, $label = '', $fk_unit = null) + { + global $mysoc; + + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + + // Check parameters + if ($type < 0) return -1; + + if ($this->brouillon) { + // Clean parameters + $remise_percent = price2num($remise_percent); + $qty = price2num($qty); + if (!$qty) $qty = 1; + if (!$info_bits) $info_bits = 0; + $pu_ht = price2num($pu_ht); + $pu_ttc = price2num($pu_ttc); + $txtva = price2num($txtva); + + if ($price_base_type == 'HT') { + $pu = $pu_ht; + } else { + $pu = $pu_ttc; + } + + + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type, $mysoc); + + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + + $product_type = $type; + if ($fk_product) { + $product = new Product($this->db); + $result = $product->fetch($fk_product); + $product_type = $product->type; + } + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinterdet_rec ("; + $sql .= "fk_fichinter"; + $sql .= ", label"; + $sql .= ", description"; + $sql .= ", date"; + $sql .= ", duree"; + //$sql.= ", price"; + //$sql.= ", qty"; + //$sql.= ", tva_tx"; + $sql .= ", fk_product"; + $sql .= ", product_type"; + $sql .= ", remise_percent"; + //$sql.= ", subprice"; + $sql .= ", remise"; + $sql .= ", total_ht"; + $sql .= ", total_tva"; + $sql .= ", total_ttc"; + $sql .= ", rang"; + //$sql.= ", special_code"; + $sql .= ", fk_unit"; + $sql .= ") VALUES ("; + $sql .= (int) $this->id; + $sql .= ", ".(!empty($label) ? "'".$this->db->escape($label)."'" : "null"); + $sql .= ", ".(!empty($desc) ? "'".$this->db->escape($desc)."'" : "null"); + $sql .= ", ".(!empty($datei) ? "'".$this->db->idate($datei)."'" : "null"); + $sql .= ", ".$duration; + //$sql.= ", ".price2num($pu_ht); + //$sql.= ", ".(!empty($qty)? $qty :(!empty($duration)? $duration :"null")); + //$sql.= ", ".price2num($txtva); + $sql .= ", ".(!empty($fk_product) ? $fk_product : "null"); + $sql .= ", ".$product_type; + $sql .= ", ".(!empty($remise_percent) ? $remise_percent : "null"); + //$sql.= ", '".price2num($pu_ht)."'"; + $sql .= ", null"; + $sql .= ", '".price2num($total_ht)."'"; + $sql .= ", '".price2num($total_tva)."'"; + $sql .= ", '".price2num($total_ttc)."'"; + $sql .= ", ".(int) $rang; + //$sql.= ", ".$special_code; + $sql .= ", ".(!empty($fk_unit) ? $fk_unit : "null"); + $sql .= ")"; + + dol_syslog(get_class($this)."::addline", LOG_DEBUG); + if ($this->db->query($sql)) { + return 1; + } else { + $this->error = $this->db->lasterror(); + return -1; + } + } + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Rend la fichinter automatique + * + * @param User $user User object + * @param int $freq Freq + * @param string $courant Courant + * @return int 0 if OK, <0 if KO + */ + public function set_auto($user, $freq, $courant) + { + // phpcs:enable + if ($user->rights->fichinter->creer) { + $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter_rec "; + $sql .= " SET frequency='".$this->db->escape($freq)."'"; + $sql .= ", date_last_gen='".$this->db->escape($courant)."'"; + $sql .= " WHERE rowid = ".$this->id; + + $resql = $this->db->query($sql); + + if ($resql) { + $this->frequency = $freq; + $this->date_last_gen = $courant; + return 0; + } else { + dol_print_error($this->db); + return -1; + } + } else { + return -2; + } + } + + /** + * Return clicable name (with picto eventually) + * + * @param int $withpicto Add picto into link + * @param string $option Where point the link + * @param int $max Maxlength of ref + * @param int $short 1=Return just URL + * @param string $moretitle Add more text to title tooltip + * @return string String with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '') + { + global $langs; + + $result = ''; + $label = $langs->trans("ShowInterventionModel").': '.$this->ref; + + $url = DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$this->id; + + if ($short) return $url; + + $picto = 'intervention'; + + $link = ''; + $linkend = ''; + + if ($withpicto) { + $result .= $link.img_object($label, $picto, 'class="classfortooltip"').$linkend; + } + if ($withpicto && $withpicto != 2) { + $result .= ' '; + } + if ($withpicto != 2) { + $result .= $link.$this->ref.$linkend; + } + return $result; + } + + + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @param string $option ''=Create a specimen fichinter with lines, 'nolines'=No lines + * @return void + */ + public function initAsSpecimen($option = '') + { + global $user, $langs, $conf; + + $now = dol_now(); + $arraynow = dol_getdate($now); + $nownotime = dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']); + + parent::initAsSpecimen($option); + + $this->usenewprice = 1; + } + + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old thirdparty id + * @param int $dest_id New thirdparty id + * @return bool + */ + public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) + { + $tables = array('fichinter_rec'); + + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); + } + + + /** + * Update frequency and unit + * + * @param int $frequency value of frequency + * @param string $unit unit of frequency (d, m, y) + * @return int <0 if KO, >0 if OK + */ + public function setFrequencyAndUnit($frequency, $unit) + { + if (!$this->table_element) { + dol_syslog(get_class($this)."::setFrequencyAndUnit called with table_element not defined", LOG_ERR); + return -1; + } + + if (!empty($frequency) && empty($unit)) { + dol_syslog(get_class($this)."::setFrequencyAndUnit called with frequency defined but unit not ", LOG_ERR); + return -2; + } + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET frequency = '.($frequency ? $this->db->escape($frequency) : 'null'); + if (!empty($unit)) { + $sql .= ', unit_frequency = "'.$this->db->escape($unit).'"'; + } + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setFrequencyAndUnit", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->frequency = $frequency; + if (!empty($unit)) $this->unit_frequency = $unit; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the next date of execution + * + * @param datetime $date date of execution + * @param int $increment_nb_gen_done 0 do nothing more, >0 increment nb_gen_done + * @return int <0 if KO, >0 if OK + */ + public function setNextDate($date, $increment_nb_gen_done = 0) + { + if (!$this->table_element) { + dol_syslog(get_class($this)."::setNextDate was called on objet with property table_element not defined", LOG_ERR); + return -1; + } + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= " SET date_when = ".($date ? "'".$this->db->idate($date)."'" : "null"); + if ($increment_nb_gen_done > 0) $sql .= ', nb_gen_done = nb_gen_done + 1'; + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setNextDate", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->date_when = $date; + if ($increment_nb_gen_done > 0) $this->nb_gen_done++; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the maximum period + * + * @param int $nb number of maximum period + * @return int <0 if KO, >0 if OK + */ + public function setMaxPeriod($nb) + { + if (!$this->table_element) { + dol_syslog(get_class($this)."::setMaxPeriod was called on objet with property table_element not defined", LOG_ERR); + return -1; + } + + if (empty($nb)) $nb = 0; + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET nb_gen_max = '.$nb; + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setMaxPeriod", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->nb_gen_max = $nb; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the auto validate fichinter + * + * @param int $validate 0 to create in draft, 1 to create and validate fichinter + * @return int <0 if KO, >0 if OK + */ + public function setAutoValidate($validate) + { + if (!$this->table_element) { + dol_syslog(get_class($this)."::setAutoValidate called with property table_element not defined", LOG_ERR); + return -1; + } + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET auto_validate = '.$validate; + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setAutoValidate", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->auto_validate = $validate; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the Number of Generation Done + * + * @return int <0 if KO, >0 if OK + */ + public function updateNbGenDone() + { + if (!$this->table_element) { + dol_syslog(get_class($this)."::updateNbGenDone called with property table_element not defined", LOG_ERR); + return -1; + } + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' SET nb_gen_done = nb_gen_done + 1'; + $sql .= ' , date_last_gen = now()'; + // si on et arrivé à la fin des génération + if ($this->nb_gen_max == $this->nb_gen_done + 1) + $sql .= ' , statut = 1'; + + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setAutoValidate", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->nb_gen_done = $this->nb_gen_done + 1; + $this->nb_gen_done = dol_now(); + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } } diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index fa0ec89d558..1eb0df5147a 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -36,7 +36,7 @@ $langs->loadLangs(array('interventions', 'sendings', 'companies')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; @@ -66,9 +66,7 @@ if ($action == 'addcontact' && $user->rights->ficheinter->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); $mesg = $langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"); @@ -95,8 +93,7 @@ elseif ($action == 'deletecontact' && $user->rights->ficheinter->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index a6b4c88ed09..49988e27e78 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -43,7 +43,7 @@ $langs->loadLangs(array('other', 'fichinter', 'companies', 'interventions')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -53,8 +53,8 @@ $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -170,9 +170,7 @@ if ($object->id) $permtoedit = $user->rights->ficheinter->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index 1ee24997e87..ccadf89f1e4 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -179,9 +179,7 @@ if ($resql) //print ''.$langs->trans("Total").' ('.$langs->trans("CustomersOrdersRunning").')'.$totalinprocess.''; print ''.$langs->trans("Total").''.$total.''; print "

"; -} -else -{ +} else { dol_print_error($db); } @@ -298,8 +296,7 @@ if ($resql) } } print "

"; -} -else dol_print_error($db); +} else dol_print_error($db); /* @@ -369,8 +366,7 @@ if (!empty($conf->ficheinter->enabled)) } print "

"; - } - else dol_print_error($db); + } else dol_print_error($db); } print '
'; diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index 42031e25ce5..f6b95678f9d 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -40,7 +40,7 @@ $langs->loadLangs(array('companies', 'bills', 'interventions')); if (!empty($conf->projet->enabled)) $langs->load("projects"); if (!empty($conf->contrat->enabled)) $langs->load("contracts"); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -65,8 +65,8 @@ $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $diroutputmassaction = $conf->ficheinter->dir_output.'/temp/massgeneration/'.$user->id; $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -95,9 +95,10 @@ $fieldstosearchall = array( 's.nom'=>"ThirdParty", 'f.description'=>'Description', 'f.note_public'=>'NotePublic', + 'fd.description'=>'DescriptionOfLine', ); if (empty($user->socid)) $fieldstosearchall["f.note_private"] = "NotePrivate"; -if (!empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall['f.description']); +if (!empty($conf->global->FICHINTER_DISABLE_DETAILS)) unset($fieldstosearchall['fd.description']); // Definition of fields for list $arrayfields = array( @@ -108,6 +109,8 @@ $arrayfields = array( 'f.description'=>array('label'=>'Description', 'checked'=>1), 'f.datec'=>array('label'=>'DateCreation', 'checked'=>0, 'position'=>500), 'f.tms'=>array('label'=>'DateModificationShort', 'checked'=>0, 'position'=>500), + 'f.note_public'=>array('label'=>'NotePublic', 'checked'=>0, 'position'=>510, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PUBLIC_NOTES))), + 'f.note_private'=>array('label'=>'NotePrivate', 'checked'=>0, 'position'=>511, 'enabled'=>(empty($conf->global->MAIN_LIST_ALLOW_PRIVATE_NOTES))), 'f.fk_statut'=>array('label'=>'Status', 'checked'=>1, 'position'=>1000), 'fd.description'=>array('label'=>"DescriptionOfLine", 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), 'fd.date'=>array('label'=>'DateOfLine', 'checked'=>1, 'enabled'=>empty($conf->global->FICHINTER_DISABLE_DETAILS) ? 1 : 0), @@ -200,7 +203,7 @@ foreach ($arrayfields as $tmpkey => $tmpval) } $sql = "SELECT"; -$sql .= " f.ref, f.rowid, f.fk_statut as status, f.description, f.datec as date_creation, f.tms as date_update, f.note_private,"; +$sql .= " f.ref, f.rowid, f.fk_statut as status, f.description, f.datec as date_creation, f.tms as date_update, f.note_public, f.note_private,"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql .= " fd.rowid as lineid, fd.description as descriptiondetail, fd.date as dp, fd.duree,"; $sql .= " s.nom as name, s.rowid as socid, s.client, s.fournisseur, s.email, s.status as thirdpartystatus"; if (!empty($conf->projet->enabled)) { @@ -319,7 +322,10 @@ if ($resql) $massactionbutton = $form->selectMassAction('', $arrayofmassactions); $newcardbutton = ''; - $morehtmlcenter .= dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fichinter/card.php?action=create', '', $user->rights->ficheinter->creer); + + $url = DOL_URL_ROOT.'/fichinter/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewIntervention'), '', 'fa fa-plus-circle', $url, '', $user->rights->ficheinter->creer); // Lines of title fields print '
'."\n"; @@ -414,6 +420,18 @@ if ($resql) print ''; print ''; } + if (!empty($arrayfields['f.note_public']['checked'])) + { + // Note public + print ''; + print ''; + } + if (!empty($arrayfields['f.note_private']['checked'])) + { + // Note private + print ''; + print ''; + } // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { @@ -458,6 +476,8 @@ 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, '', $sortfield, $sortorder, 'center nowrap '); if (!empty($arrayfields['f.tms']['checked'])) print_liste_field_titre($arrayfields['f.tms']['label'], $_SERVER["PHP_SELF"], "f.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + if (!empty($arrayfields['f.note_public']['checked'])) print_liste_field_titre($arrayfields['f.note_public']['label'], $_SERVER["PHP_SELF"], "f.note_public", "", $param, '', $sortfield, $sortorder, 'center nowrap '); + if (!empty($arrayfields['f.note_private']['checked'])) print_liste_field_titre($arrayfields['f.note_private']['label'], $_SERVER["PHP_SELF"], "f.note_private", "", $param, '', $sortfield, $sortorder, 'center nowrap '); if (!empty($arrayfields['f.fk_statut']['checked'])) print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "f.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); if (!empty($arrayfields['fd.description']['checked'])) print_liste_field_titre($arrayfields['fd.description']['label'], $_SERVER["PHP_SELF"], ''); if (!empty($arrayfields['fd.date']['checked'])) print_liste_field_titre($arrayfields['fd.date']['label'], $_SERVER["PHP_SELF"], "fd.date", "", $param, '', $sortfield, $sortorder, 'center '); @@ -583,6 +603,22 @@ if ($resql) print ''; if (!$i) $totalarray['nbfield']++; } + // Note public + if (!empty($arrayfields['f.note_public']['checked'])) + { + print ''; + print dol_escape_htmltag($obj->note_public); + print ''; + if (!$i) $totalarray['nbfield']++; + } + // Note private + if (!empty($arrayfields['f.note_private']['checked'])) + { + print ''; + print dol_escape_htmltag($obj->note_private); + print ''; + if (!$i) $totalarray['nbfield']++; + } // Status if (!empty($arrayfields['f.fk_statut']['checked'])) { @@ -650,9 +686,7 @@ if ($resql) $delallowed = $user->rights->ficheinter->creer; print $formfile->showdocuments('massfilesarea_interventions', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index b5ef5f91241..42003b8a27a 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -36,7 +36,7 @@ $langs->loadLangs(array('companies', 'interventions')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 0ca948312c6..90d9741fbc3 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -70,7 +70,7 @@ print load_fiche_titre($title, '', 'intervention'); dol_mkdir($dir); $stats = new FichinterStats($db, $socid, $mode, ($userid > 0 ? $userid : 0)); -if ($object_status != '' && $object_status > -1) $stats->where .= ' AND c.fk_statut IN ('.$db->escape($object_status).')'; +if ($object_status != '' && $object_status > -1) $stats->where .= ' AND c.fk_statut IN ('.$db->sanitize($db->escape($object_status)).')'; // Build graphic number of object $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear); @@ -81,9 +81,7 @@ if (!$user->rights->societe->client->voir || $user->socid) { $filenamenb = $dir.'/interventionsnbinyear-'.$user->id.'-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenamenb = $dir.'/interventionsnbinyear-'.$year.'.png'; $fileurlnb = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsnbinyear-'.$year.'.png'; } @@ -121,9 +119,7 @@ if (!$user->rights->societe->client->voir || $user->socid) { $filenameamount = $dir.'/interventionsamountinyear-'.$user->id.'-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filenameamount = $dir.'/interventionsamountinyear-'.$year.'.png'; $fileurlamount = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsamountinyear-'.$year.'.png'; } @@ -160,9 +156,7 @@ if (!$user->rights->societe->client->voir || $user->socid) { $filename_avg = $dir.'/interventionsaverage-'.$user->id.'-'.$year.'.png'; $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$user->id.'-'.$year.'.png'; -} -else -{ +} else { $filename_avg = $dir.'/interventionsaverage-'.$year.'.png'; $fileurl_avg = DOL_URL_ROOT.'/viewimage.php?modulepart=interventionstats&file=interventionsaverage-'.$year.'.png'; } @@ -313,8 +307,7 @@ print '
'; // Show graphs print '"; @@ -254,9 +252,7 @@ if ($object->id > 0) if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->mode_reglement_supplier_id, 'mode_reglement_supplier_id', 'DBIT', 1, 1); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->mode_reglement_supplier_id, 'none'); } print ""; @@ -334,9 +330,7 @@ if ($object->id > 0) { $adh->ref = $adh->getFullName($langs); print $adh->getNomUrl(1); - } - else - { + } else { print $langs->trans("ThirdpartyNotLinkedToMember"); } print ''; @@ -372,7 +366,7 @@ if ($object->id > 0) $icon = 'bill'; if ($link) $boxstat .= ''; $boxstat .= '
'; - $boxstat .= ''.img_object("", $icon).' '.$text.'
'; + $boxstat .= ''.img_object("", $icon).' '.$text.'
'; $boxstat .= ''.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).''; $boxstat .= '
'; if ($link) $boxstat .= '
'; @@ -390,7 +384,7 @@ if ($object->id > 0) $icon = 'bill'; if ($link) $boxstat .= ''; $boxstat .= '
'; - $boxstat .= ''.img_object("", $icon).' '.$text.'
'; + $boxstat .= ''.img_object("", $icon).' '.$text.'
'; $boxstat .= ''.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).''; $boxstat .= '
'; if ($link) $boxstat .= '
'; @@ -408,7 +402,7 @@ if ($object->id > 0) $icon = 'bill'; if ($link) $boxstat .= ''; $boxstat .= '
'; - $boxstat .= ''.img_object("", $icon).' '.$text.'
'; + $boxstat .= ''.img_object("", $icon).' '.$text.'
'; $boxstat .= ''.price($outstandingTotal, 1, $langs, 1, -1, -1, $conf->currency).''; $boxstat .= '
'; if ($link) $boxstat .= '
'; @@ -419,7 +413,7 @@ if ($object->id > 0) $icon = 'bill'; if ($link) $boxstat .= ''; $boxstat .= '
'; - $boxstat .= ''.img_object("", $icon).' '.$text.'
'; + $boxstat .= ''.img_object("", $icon).' '.$text.'
'; $boxstat .= ''.price($outstandingOpened, 1, $langs, 1, -1, -1, $conf->currency).$warn.''; $boxstat .= '
'; if ($link) $boxstat .= '
'; @@ -566,9 +560,7 @@ if ($object->id > 0) if ($obj->dc) { print dol_print_date($db->jdate($obj->dc), 'day'); - } - else - { + } else { print "-"; } print ''; @@ -579,9 +571,7 @@ if ($object->id > 0) $db->free($resql); if ($num > 0) print "
'; -if ($mesg) { print $mesg; } -else { +if ($mesg) { print $mesg; } else { print $px1->show(); /*print "
\n"; print $px2->show(); diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index 94ecf930724..8912fd2a299 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -31,7 +31,7 @@ */ if (!defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE', 'Dolibarr'); -if (!defined('DOL_VERSION')) define('DOL_VERSION', '12.0.3'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c +if (!defined('DOL_VERSION')) define('DOL_VERSION', '13.0.0-alpha'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c if (!defined('EURO')) define('EURO', chr(128)); @@ -87,9 +87,7 @@ if (!$result && !empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done // Note: If calling page was an index.php not into htdocs (ie comm/index.php, ...), then this redirect will fails, // but we don't want to change this because when URL is correct, we must be sure the redirect to install/index.php will be correct. $path = ''; - } - else - { + } else { // If what we look is not index.php, we can try to guess location of root. May not work all the time. // There is no real solution, because the only way to know the apache url relative path is to have it into conf file. // If it fails to find correct $path, then only solution is to ask user to enter the correct URL to index.php or install/index.php @@ -114,9 +112,7 @@ if (!$result && !empty($_SERVER["GATEWAY_INTERFACE"])) // If install not done if (!empty($dolibarr_strict_mode)) { error_reporting(E_ALL | E_STRICT); -} -else -{ +} else { error_reporting(E_ALL & ~(E_STRICT | E_NOTICE | E_DEPRECATED)); } @@ -156,8 +152,7 @@ if (!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck)) { $csrfattack = false; if (empty($_SERVER['HTTP_REFERER'])) $csrfattack = true; // An evil browser was used - else - { + else { $tmpa = parse_url($_SERVER['HTTP_HOST']); $tmpb = parse_url($_SERVER['HTTP_REFERER']); if ((empty($tmpa['host']) ? $tmpa['path'] : $tmpa['host']) != (empty($tmpb['host']) ? $tmpb['path'] : $tmpb['host'])) $csrfattack = true; @@ -247,20 +242,16 @@ define('MAIN_DB_PREFIX', $dolibarr_main_db_prefix); */ // Path to root libraries if (!defined('ADODB_PATH')) { define('ADODB_PATH', (!isset($dolibarr_lib_ADODB_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/adodbtime/' : (empty($dolibarr_lib_ADODB_PATH) ? '' : $dolibarr_lib_ADODB_PATH.'/')); } -if (!defined('FPDF_PATH')) { define('FPDF_PATH', (empty($dolibarr_lib_FPDF_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/fpdf/' : $dolibarr_lib_FPDF_PATH.'/'); } // Used only for package that can't include tcpdf if (!defined('TCPDF_PATH')) { define('TCPDF_PATH', (empty($dolibarr_lib_TCPDF_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/tecnickcom/tcpdf/' : $dolibarr_lib_TCPDF_PATH.'/'); } -if (!defined('FPDI_PATH')) { define('FPDI_PATH', (empty($dolibarr_lib_FPDI_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/fpdfi/' : $dolibarr_lib_FPDI_PATH.'/'); } if (!defined('TCPDI_PATH')) { define('TCPDI_PATH', (empty($dolibarr_lib_TCPDI_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/tcpdi/' : $dolibarr_lib_TCPDI_PATH.'/'); } if (!defined('NUSOAP_PATH')) { define('NUSOAP_PATH', (!isset($dolibarr_lib_NUSOAP_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/nusoap/lib/' : (empty($dolibarr_lib_NUSOAP_PATH) ? '' : $dolibarr_lib_NUSOAP_PATH.'/')); } if (!defined('PHPEXCEL_PATH')) { define('PHPEXCEL_PATH', (!isset($dolibarr_lib_PHPEXCEL_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/phpoffice/phpexcel/Classes/' : (empty($dolibarr_lib_PHPEXCEL_PATH) ? '' : $dolibarr_lib_PHPEXCEL_PATH.'/')); } if (!defined('PHPEXCELNEW_PATH')) { define('PHPEXCELNEW_PATH', (!isset($dolibarr_lib_PHPEXCELNEW_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/phpoffice/PhpSpreadsheet/' : (empty($dolibarr_lib_PHPEXCELNEW_PATH) ? '' : $dolibarr_lib_PHPEXCELNEW_PATH.'/')); } -if (!defined('GEOIP_PATH')) { define('GEOIP_PATH', (!isset($dolibarr_lib_GEOIP_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/geoip/' : (empty($dolibarr_lib_GEOIP_PATH) ? '' : $dolibarr_lib_GEOIP_PATH.'/')); } if (!defined('ODTPHP_PATH')) { define('ODTPHP_PATH', (!isset($dolibarr_lib_ODTPHP_PATH)) ?DOL_DOCUMENT_ROOT.'/includes/odtphp/' : (empty($dolibarr_lib_ODTPHP_PATH) ? '' : $dolibarr_lib_ODTPHP_PATH.'/')); } if (!defined('ODTPHP_PATHTOPCLZIP')) { define('ODTPHP_PATHTOPCLZIP', (!isset($dolibarr_lib_ODTPHP_PATHTOPCLZIP)) ?DOL_DOCUMENT_ROOT.'/includes/odtphp/zip/pclzip/' : (empty($dolibarr_lib_ODTPHP_PATHTOPCLZIP) ? '' : $dolibarr_lib_ODTPHP_PATHTOPCLZIP.'/')); } if (!defined('JS_CKEDITOR')) { define('JS_CKEDITOR', (!isset($dolibarr_js_CKEDITOR)) ? '' : (empty($dolibarr_js_CKEDITOR) ? '' : $dolibarr_js_CKEDITOR.'/')); } if (!defined('JS_JQUERY')) { define('JS_JQUERY', (!isset($dolibarr_js_JQUERY)) ? '' : (empty($dolibarr_js_JQUERY) ? '' : $dolibarr_js_JQUERY.'/')); } if (!defined('JS_JQUERY_UI')) { define('JS_JQUERY_UI', (!isset($dolibarr_js_JQUERY_UI)) ? '' : (empty($dolibarr_js_JQUERY_UI) ? '' : $dolibarr_js_JQUERY_UI.'/')); } -if (!defined('JS_JQUERY_FLOT')) { define('JS_JQUERY_FLOT', (!isset($dolibarr_js_JQUERY_FLOT)) ? '' : (empty($dolibarr_js_JQUERY_FLOT) ? '' : $dolibarr_js_JQUERY_FLOT.'/')); } // Other required path if (!defined('DOL_DEFAULT_TTF')) { define('DOL_DEFAULT_TTF', (!isset($dolibarr_font_DOL_DEFAULT_TTF)) ?DOL_DOCUMENT_ROOT.'/includes/fonts/Aerial.ttf' : (empty($dolibarr_font_DOL_DEFAULT_TTF) ? '' : $dolibarr_font_DOL_DEFAULT_TTF)); } if (!defined('DOL_DEFAULT_TTF_BOLD')) { define('DOL_DEFAULT_TTF_BOLD', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD)) ?DOL_DOCUMENT_ROOT.'/includes/fonts/AerialBd.ttf' : (empty($dolibarr_font_DOL_DEFAULT_TTF_BOLD) ? '' : $dolibarr_font_DOL_DEFAULT_TTF_BOLD)); } @@ -285,8 +276,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php'; //print memory_get_usage(); -// If password is encoded, we decode it -if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) +// If password is encoded, we decode it. Note: When page is called for install, $dolibarr_main_db_pass may not be defined yet. +if (!empty($dolibarr_main_db_pass) && preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) { if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) { diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index b467fdbd366..9aeef877bab 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -118,7 +118,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; @@ -235,9 +235,7 @@ if ($object->id > 0) if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_supplier_id, 'cond_reglement_supplier_id', -1, 1); - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->cond_reglement_supplier_id, 'none'); } print "
"; - } - else - { + } else { dol_print_error($db); } } @@ -605,12 +595,10 @@ if ($object->id > 0) // Show orders we can bill if (empty($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)) { - $sql2 .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY.")"; // Must match filter in htdocs/fourn/orderstoinvoice.php - } - else - { + $sql2 .= " AND c.fk_statut IN (".$db->sanitize(CommandeFournisseur::STATUS_RECEIVED_COMPLETELY).")"; // Must match filter in htdocs/fourn/commande/list.php + } else { // CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.", ".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY - $sql2 .= " AND c.fk_statut IN (".$db->escape($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS).")"; + $sql2 .= " AND c.fk_statut IN (".$db->sanitize($db->escape($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)).")"; } $sql2 .= " AND c.billed = 0"; // Find order that are not already invoiced @@ -677,9 +665,7 @@ if ($object->id > 0) if ($obj->dc) { print dol_print_date($db->jdate($obj->dc), 'day'); - } - else - { + } else { print "-"; } print ''; @@ -690,9 +676,7 @@ if ($object->id > 0) $db->free($resql); if ($num > 0) print ""; - } - else - { + } else { dol_print_error($db); } } @@ -761,9 +745,7 @@ if ($object->id > 0) } $db->free($resql); if ($num > 0) print ''; - } - else - { + } else { dol_print_error($db); } } @@ -813,17 +795,13 @@ if ($object->id > 0) { if (!empty($orders2invoice) && $orders2invoice > 0) { - if ($object->status == 1) - { + if ($object->status == 1) { // Company is open - print ''; - } - else - { + print ''; + } else { print ''; } - } - else print ''; + } else print ''; } if ($user->rights->fournisseur->facture->creer) @@ -842,9 +820,7 @@ if ($object->id > 0) if ($user->rights->agenda->myactions->create) { print ''.$langs->trans("AddAction").''; - } - else - { + } else { print ''.$langs->trans("AddAction").''; } } @@ -870,9 +846,7 @@ if ($object->id > 0) // List of done actions show_actions_done($conf, $langs, $db, $object); } -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index b42c578a783..8c3ca0108e3 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -30,520 +30,519 @@ require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; */ class SupplierInvoices extends DolibarrApi { - /** - * - * @var array $FIELDS Mandatory fields, checked when create and update object - */ - static $FIELDS = array( - 'socid', - ); + /** + * + * @var array $FIELDS Mandatory fields, checked when create and update object + */ + static $FIELDS = array( + 'socid', + ); - /** - * @var FactureFournisseur $invoice {@type FactureFournisseur} - */ - public $invoice; + /** + * @var FactureFournisseur $invoice {@type FactureFournisseur} + */ + public $invoice; - /** - * Constructor - */ - public function __construct() - { - global $db; - $this->db = $db; - $this->invoice = new FactureFournisseur($this->db); - } + /** + * Constructor + */ + public function __construct() + { + global $db; + $this->db = $db; + $this->invoice = new FactureFournisseur($this->db); + } - /** - * Get properties of a supplier invoice object - * - * Return an array with supplier invoice information - * - * @param int $id ID of supplier invoice - * @return array|mixed data without useless information - * - * @throws RestException - */ - public function get($id) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) { - throw new RestException(401); - } + /** + * Get properties of a supplier invoice object + * + * Return an array with supplier invoice information + * + * @param int $id ID of supplier invoice + * @return array|mixed data without useless information + * + * @throws RestException + */ + public function get($id) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Supplier invoice not found'); - } - - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - $this->invoice->fetchObjectLinked(); - return $this->_cleanObjectDatas($this->invoice); - } - - /** - * List invoices - * - * Get a list of supplier invoices - * - * @param string $sortfield Sort field - * @param string $sortorder Sort order - * @param int $limit Limit for list - * @param int $page Page number - * @param string $thirdparty_ids Thirdparty ids to filter invoices of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} - * @param string $status Filter by invoice status : draft | unpaid | paid | cancelled - * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.datec:<:'20160101')" - * @return array Array of invoice objects - * - * @throws RestException - */ - public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') - { - global $db; - - $obj_ret = array(); - - // case of external user, $thirdparty_ids param is ignored and replaced by user's socid - $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; - - // If the internal user must only see his customers, force searching by him - $search_sale = 0; - if (!DolibarrApiAccess::$user->rights->societe->client->voir) $search_sale = DolibarrApiAccess::$user->id; - - $sql = "SELECT t.rowid"; - // We need these fields in order to filter by sale (including the case where the user can only see his prospects) - if (!DolibarrApiAccess::$user->rights->societe->client->voir || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; - $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as t"; - - // We need this table joined to the select in order to filter by sale - if (!DolibarrApiAccess::$user->rights->societe->client->voir || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - - $sql .= ' WHERE t.entity IN ('.getEntity('supplier_invoice').')'; - if (!DolibarrApiAccess::$user->rights->societe->client->voir || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; - if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; - if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale - - // Filter by status - if ($status == 'draft') { - $sql .= " AND t.fk_statut IN (0)"; - } - if ($status == 'unpaid') { - $sql .= " AND t.fk_statut IN (1)"; - } - if ($status == 'paid') { - $sql .= " AND t.fk_statut IN (2)"; - } - if ($status == 'cancelled') { - $sql .= " AND t.fk_statut IN (3)"; - } - // Insert sale filter - if ($search_sale > 0) { - $sql .= " AND sc.fk_user = ".$search_sale; - } - // Add sql filters - if ($sqlfilters) - { - if (!DolibarrApi::_checkFilters($sqlfilters)) - { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - - $sql .= $db->order($sortfield, $sortorder); - if ($limit) { - if ($page < 0) - { - $page = 0; - } - $offset = $limit * $page; - - $sql .= $db->plimit($limit + 1, $offset); - } - - $result = $db->query($sql); - if ($result) { - $i = 0; - $num = $db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - while ($i < $min) - { - $obj = $db->fetch_object($result); - $invoice_static = new FactureFournisseur($db); - if ($invoice_static->fetch($obj->rowid)) { - $obj_ret[] = $this->_cleanObjectDatas($invoice_static); - } - $i++; - } - } - else { - throw new RestException(503, 'Error when retrieve supplier invoice list : '.$db->lasterror()); - } - if (!count($obj_ret)) { - throw new RestException(404, 'No supplier invoice found'); - } - return $obj_ret; - } - - /** - * Create supplier invoice object - * - * @param array $request_data Request datas - * - * @return int ID of supplier invoice - * - * @throws RestException 401 - * @throws RestException 500 - */ - public function post($request_data = null) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(401, "Insuffisant rights"); - } - // Check mandatory fields - $result = $this->_validate($request_data); - - foreach ($request_data as $field => $value) { - $this->invoice->$field = $value; - } - if (!array_key_exists('date', $request_data)) { - $this->invoice->date = dol_now(); - } - - if ($this->invoice->create(DolibarrApiAccess::$user) < 0) { - throw new RestException(500, "Error creating order", array_merge(array($this->invoice->error), $this->invoice->errors)); - } - return $this->invoice->id; - } - - /** - * Update supplier invoice - * - * @param int $id Id of supplier invoice to update - * @param array $request_data Datas - * - * @return int - * - * @throws RestException 401 - * @throws RestException 404 - */ - public function put($id, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(401); - } - - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Supplier invoice not found'); - } - - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - foreach ($request_data as $field => $value) { - if ($field == 'id') continue; - $this->invoice->$field = $value; - } - - if ($this->invoice->update($id, DolibarrApiAccess::$user)) - return $this->get($id); - - return false; - } - - /** - * Delete supplier invoice - * - * @param int $id Supplier invoice ID - * - * @return array - * - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 500 - */ - public function delete($id) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->supprimer) { - throw new RestException(401); - } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Supplier invoice not found'); - } - - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - if ($this->invoice->delete(DolibarrApiAccess::$user) < 0) - { - throw new RestException(500); - } - - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Supplier invoice deleted' - ) - ); - } - - /** - * Validate an order - * - * @param int $id Order ID - * @param int $idwarehouse Warehouse ID - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * - * @url POST {id}/validate - * - * @return array - * - * @throws RestException 304 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 405 - * @throws RestException 500 - */ - public function validate($id, $idwarehouse = 0, $notrigger = 0) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(401); - } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Invoice not found'); - } - - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - - $result = $this->invoice->validate(DolibarrApiAccess::$user, '', $idwarehouse, $notrigger); - if ($result == 0) { - throw new RestException(304, 'Error nothing done. May be object is already validated'); - } - if ($result < 0) { - throw new RestException(500, 'Error when validating Invoice: '.$this->invoice->error); - } - - return array( - 'success' => array( - 'code' => 200, - 'message' => 'Invoice validated (Ref='.$this->invoice->ref.')' - ) - ); - } - - /** - * Get list of payments of a given supplier invoice - * - * @param int $id Id of SupplierInvoice - * - * @url GET {id}/payments - * - * @return array - * @throws RestException 400 - * @throws RestException 401 - * @throws RestException 404 - * @throws RestException 405 - */ - public function getPayments($id) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) { - throw new RestException(401); - } - if (empty($id)) { - throw new RestException(400, 'Invoice ID is mandatory'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Supplier invoice not found'); + } if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Invoice not found'); - } + $this->invoice->fetchObjectLinked(); + return $this->_cleanObjectDatas($this->invoice); + } - $result = $this->invoice->getListOfPayments(); - if ($result < 0) { - throw new RestException(405, $this->invoice->error); - } + /** + * List invoices + * + * Get a list of supplier invoices + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $thirdparty_ids Thirdparty ids to filter invoices of (example '1' or '1,2,3') {@pattern /^[0-9,]*$/i} + * @param string $status Filter by invoice status : draft | unpaid | paid | cancelled + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:'SO-%') and (t.datec:<:'20160101')" + * @return array Array of invoice objects + * + * @throws RestException + */ + public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '') + { + global $db; - return $result; - } + $obj_ret = array(); + + // case of external user, $thirdparty_ids param is ignored and replaced by user's socid + $socids = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : $thirdparty_ids; + + // If the internal user must only see his customers, force searching by him + $search_sale = 0; + if (!DolibarrApiAccess::$user->rights->societe->client->voir) $search_sale = DolibarrApiAccess::$user->id; + + $sql = "SELECT t.rowid"; + // We need these fields in order to filter by sale (including the case where the user can only see his prospects) + if (!DolibarrApiAccess::$user->rights->societe->client->voir || $search_sale > 0) $sql .= ", sc.fk_soc, sc.fk_user"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as t"; + + // We need this table joined to the select in order to filter by sale + if (!DolibarrApiAccess::$user->rights->societe->client->voir || $search_sale > 0) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + + $sql .= ' WHERE t.entity IN ('.getEntity('supplier_invoice').')'; + if (!DolibarrApiAccess::$user->rights->societe->client->voir || $search_sale > 0) $sql .= " AND t.fk_soc = sc.fk_soc"; + if ($socids) $sql .= " AND t.fk_soc IN (".$socids.")"; + if ($search_sale > 0) $sql .= " AND t.rowid = sc.fk_soc"; // Join for the needed table to filter by sale + + // Filter by status + if ($status == 'draft') { + $sql .= " AND t.fk_statut IN (0)"; + } + if ($status == 'unpaid') { + $sql .= " AND t.fk_statut IN (1)"; + } + if ($status == 'paid') { + $sql .= " AND t.fk_statut IN (2)"; + } + if ($status == 'cancelled') { + $sql .= " AND t.fk_statut IN (3)"; + } + // Insert sale filter + if ($search_sale > 0) { + $sql .= " AND sc.fk_user = ".$search_sale; + } + // Add sql filters + if ($sqlfilters) + { + if (!DolibarrApi::_checkFilters($sqlfilters)) + { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + $sql .= $this->db->order($sortfield, $sortorder); + if ($limit) { + if ($page < 0) + { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit + 1, $offset); + } + + $result = $this->db->query($sql); + if ($result) { + $i = 0; + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + while ($i < $min) + { + $obj = $this->db->fetch_object($result); + $invoice_static = new FactureFournisseur($this->db); + if ($invoice_static->fetch($obj->rowid)) { + $obj_ret[] = $this->_cleanObjectDatas($invoice_static); + } + $i++; + } + } else { + throw new RestException(503, 'Error when retrieve supplier invoice list : '.$this->db->lasterror()); + } + if (!count($obj_ret)) { + throw new RestException(404, 'No supplier invoice found'); + } + return $obj_ret; + } + + /** + * Create supplier invoice object + * + * @param array $request_data Request datas + * + * @return int ID of supplier invoice + * + * @throws RestException 401 + * @throws RestException 500 + */ + public function post($request_data = null) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + throw new RestException(401, "Insuffisant rights"); + } + // Check mandatory fields + $result = $this->_validate($request_data); + + foreach ($request_data as $field => $value) { + $this->invoice->$field = $value; + } + if (!array_key_exists('date', $request_data)) { + $this->invoice->date = dol_now(); + } + + if ($this->invoice->create(DolibarrApiAccess::$user) < 0) { + throw new RestException(500, "Error creating order", array_merge(array($this->invoice->error), $this->invoice->errors)); + } + return $this->invoice->id; + } + + /** + * Update supplier invoice + * + * @param int $id Id of supplier invoice to update + * @param array $request_data Datas + * + * @return int + * + * @throws RestException 401 + * @throws RestException 404 + */ + public function put($id, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + throw new RestException(401); + } + + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Supplier invoice not found'); + } + + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + foreach ($request_data as $field => $value) { + if ($field == 'id') continue; + $this->invoice->$field = $value; + } + + if ($this->invoice->update($id, DolibarrApiAccess::$user)) + return $this->get($id); + + return false; + } + + /** + * Delete supplier invoice + * + * @param int $id Supplier invoice ID + * + * @return array + * + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 500 + */ + public function delete($id) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->supprimer) { + throw new RestException(401); + } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Supplier invoice not found'); + } + + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + if ($this->invoice->delete(DolibarrApiAccess::$user) < 0) + { + throw new RestException(500); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Supplier invoice deleted' + ) + ); + } + + /** + * Validate an invoice + * + * @param int $id Invoice ID + * @param int $idwarehouse Warehouse ID + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * + * @url POST {id}/validate + * + * @return array + * + * @throws RestException 304 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 405 + * @throws RestException 500 + */ + public function validate($id, $idwarehouse = 0, $notrigger = 0) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + throw new RestException(401); + } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Invoice not found'); + } + + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $result = $this->invoice->validate(DolibarrApiAccess::$user, '', $idwarehouse, $notrigger); + if ($result == 0) { + throw new RestException(304, 'Error nothing done. The invoice is already validated'); + } + if ($result < 0) { + throw new RestException(500, 'Error when validating Invoice: '.$this->invoice->error); + } + + return array( + 'success' => array( + 'code' => 200, + 'message' => 'Invoice validated (Ref='.$this->invoice->ref.')' + ) + ); + } + + /** + * Get list of payments of a given supplier invoice + * + * @param int $id Id of SupplierInvoice + * + * @url GET {id}/payments + * + * @return array + * @throws RestException 400 + * @throws RestException 401 + * @throws RestException 404 + * @throws RestException 405 + */ + public function getPayments($id) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->lire) { + throw new RestException(401); + } + if (empty($id)) { + throw new RestException(400, 'Invoice ID is mandatory'); + } + + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Invoice not found'); + } + + $result = $this->invoice->getListOfPayments(); + if ($result < 0) { + throw new RestException(405, $this->invoice->error); + } + + return $result; + } - /** - * Add payment line to a specific supplier invoice with the remain to pay as amount. - * - * @param int $id Id of invoice - * @param string $datepaye {@from body} Payment date {@type timestamp} - * @param int $paiementid {@from body} Payment mode Id {@min 1} - * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} - * @param int $accountid {@from body} Account Id {@min 1} - * @param string $num_payment {@from body} Payment number (optional) - * @param string $comment {@from body} Note (optional) - * @param string $chqemetteur {@from body} Payment issuer (mandatory if paiementcode = 'CHQ') - * @param string $chqbank {@from body} Issuer bank name (optional) - * - * @url POST {id}/payments - * - * @return int Payment ID - * @throws RestException 400 - * @throws RestException 401 - * @throws RestException 404 - */ - public function addPayment($id, $datepaye, $paiementid, $closepaidinvoices, $accountid, $num_payment = '', $comment = '', $chqemetteur = '', $chqbank = '') - { - global $conf; + /** + * Add payment line to a specific supplier invoice with the remain to pay as amount. + * + * @param int $id Id of invoice + * @param string $datepaye {@from body} Payment date {@type timestamp} + * @param int $payment_mode_id {@from body} Payment mode ID (look it up via REST GET to /setup/dictionary/payment_types) {@min 1} + * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} + * @param int $accountid {@from body} Bank account ID (look it up via REST GET to /bankaccounts) {@min 1} + * @param string $num_payment {@from body} Payment number (optional) + * @param string $comment {@from body} Note (optional) + * @param string $chqemetteur {@from body} Payment issuer (mandatory if payment_mode_id corresponds to 'CHQ'-payment type) + * @param string $chqbank {@from body} Issuer bank name (optional) + * + * @url POST {id}/payments + * + * @return int Payment ID + * @throws RestException 400 + * @throws RestException 401 + * @throws RestException 404 + */ + public function addPayment($id, $datepaye, $payment_mode_id, $closepaidinvoices, $accountid, $num_payment = '', $comment = '', $chqemetteur = '', $chqbank = '') + { + global $conf; - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(403); - } - if (empty($id)) { - throw new RestException(400, 'Invoice ID is mandatory'); - } + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + throw new RestException(403); + } + if (empty($id)) { + throw new RestException(400, 'Invoice ID is mandatory'); + } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - if (!empty($conf->banque->enabled)) { - if (empty($accountid)) { - throw new RestException(400, 'Account ID is mandatory'); - } - } + if (!empty($conf->banque->enabled)) { + if (empty($accountid)) { + throw new RestException(400, 'Bank account ID is mandatory'); + } + } - if (empty($paiementid)) { - throw new RestException(400, 'Paiement ID or Paiement Code is mandatory'); - } + if (empty($payment_mode_id)) { + throw new RestException(400, 'Payment mode ID is mandatory'); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Invoice not found'); + } - // Calculate amount to pay - $totalpaye = $this->invoice->getSommePaiement(); - $totaldeposits = $this->invoice->getSumDepositsUsed(); - $resteapayer = price2num($this->invoice->total_ttc - $totalpaye - $totaldeposits, 'MT'); + // Calculate amount to pay + $totalpaye = $this->invoice->getSommePaiement(); + $totaldeposits = $this->invoice->getSumDepositsUsed(); + $resteapayer = price2num($this->invoice->total_ttc - $totalpaye - $totaldeposits, 'MT'); - $this->db->begin(); + $this->db->begin(); - $amounts = array(); - $multicurrency_amounts = array(); + $amounts = array(); + $multicurrency_amounts = array(); - $resteapayer = price2num($resteapayer, 'MT'); - $amounts[$id] = $resteapayer; + $resteapayer = price2num($resteapayer, 'MT'); + $amounts[$id] = $resteapayer; - // Multicurrency - $newvalue = price2num($this->invoice->multicurrency_total_ttc, 'MT'); - $multicurrency_amounts[$id] = $newvalue; + // Multicurrency + $newvalue = price2num($this->invoice->multicurrency_total_ttc, 'MT'); + $multicurrency_amounts[$id] = $newvalue; - // Creation of payment line - $paiement = new PaiementFourn($this->db); - $paiement->datepaye = $datepaye; - $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id - $paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching - $paiement->paiementid = $paiementid; - $paiement->paiementcode = dol_getIdFromCode($this->db, $paiementid, 'c_paiement', 'id', 'code', 1); - $paiement->oper = $paiement->paiementcode; // For backward compatibility - $paiement->num_payment = $num_payment; - $paiement->note_public = $comment; + // Creation of payment line + $paiement = new PaiementFourn($this->db); + $paiement->datepaye = $datepaye; + $paiement->amounts = $amounts; // Array with all payments dispatching with invoice id + $paiement->multicurrency_amounts = $multicurrency_amounts; // Array with all payments dispatching + $paiement->paiementid = $payment_mode_id; + $paiement->paiementcode = dol_getIdFromCode($this->db, $payment_mode_id, 'c_paiement', 'id', 'code', 1); + $paiement->oper = $paiement->paiementcode; // For backward compatibility + $paiement->num_payment = $num_payment; + $paiement->note_public = $comment; - $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices - if ($paiement_id < 0) - { - $this->db->rollback(); - throw new RestException(400, 'Payment error : '.$paiement->error); - } + $paiement_id = $paiement->create(DolibarrApiAccess::$user, ($closepaidinvoices == 'yes' ? 1 : 0)); // This include closing invoices + if ($paiement_id < 0) + { + $this->db->rollback(); + throw new RestException(400, 'Payment error : '.$paiement->error); + } - if (!empty($conf->banque->enabled)) { - $result = $paiement->addPaymentToBank(DolibarrApiAccess::$user, 'payment_supplier', '(SupplierInvoicePayment)', $accountid, $chqemetteur, $chqbank); - if ($result < 0) - { - $this->db->rollback(); - throw new RestException(400, 'Add payment to bank error : '.$paiement->error); - } - } + if (!empty($conf->banque->enabled)) { + $result = $paiement->addPaymentToBank(DolibarrApiAccess::$user, 'payment_supplier', '(SupplierInvoicePayment)', $accountid, $chqemetteur, $chqbank); + if ($result < 0) + { + $this->db->rollback(); + throw new RestException(400, 'Add payment to bank error : '.$paiement->error); + } + } - $this->db->commit(); + $this->db->commit(); - return $paiement_id; - } + return $paiement_id; + } - /** - * Get lines of a supplier invoice - * - * @param int $id Id of supplier invoice - * - * @url GET {id}/lines - * - * @return array - */ - public function getLines($id) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(401); - } + /** + * Get lines of a supplier invoice + * + * @param int $id Id of supplier invoice + * + * @url GET {id}/lines + * + * @return array + */ + public function getLines($id) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Supplier invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Supplier invoice not found'); + } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $this->invoice->fetch_lines(); - $result = array(); - foreach ($this->invoice->lines as $line) { - array_push($result, $this->_cleanObjectDatas($line)); - } - return $result; - } + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $this->invoice->fetch_lines(); + $result = array(); + foreach ($this->invoice->lines as $line) { + array_push($result, $this->_cleanObjectDatas($line)); + } + return $result; + } - /** - * Add a line to given supplier invoice - * - * @param int $id Id of supplier invoice to update - * @param array $request_data supplier invoice line data - * - * @url POST {id}/lines - * - * @return int|bool - */ - public function postLine($id, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(401); - } + /** + * Add a line to given supplier invoice + * + * @param int $id Id of supplier invoice to update + * @param array $request_data supplier invoice line data + * + * @url POST {id}/lines + * + * @return int|bool + */ + public function postLine($id, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Supplier invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Supplier invoice not found'); + } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $request_data = (object) $request_data; - $updateRes = $this->invoice->addline( - $request_data->description, - $request_data->pu_ht, + $updateRes = $this->invoice->addline( + $request_data->description, + $request_data->pu_ht, $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->qty, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->qty, $request_data->fk_product, $request_data->remise_percent, $request_data->date_start, @@ -560,54 +559,53 @@ class SupplierInvoices extends DolibarrApi $request_data->multicurrency_subprice, $request_data->ref_supplier, $request_data->special_code - ); + ); - if ($updateRes < 0) { - throw new RestException(400, 'Unable to insert the new line. Check your inputs. '.$this->invoice->error); - } + if ($updateRes < 0) { + throw new RestException(400, 'Unable to insert the new line. Check your inputs. '.$this->invoice->error); + } - return $updateRes; - } + return $updateRes; + } - /** - * Update a line to a given supplier invoice - * - * @param int $id Id of supplier invoice to update - * @param int $lineid Id of line to update - * @param array $request_data InvoiceLine data - * - * @url PUT {id}/lines/{lineid} - * - * @return object - * - * @throws 200 - * @throws 304 - * @throws 401 - * @throws 404 - */ - public function putLine($id, $lineid, $request_data = null) - { - if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(401); - } + /** + * Update a line to a given supplier invoice + * + * @param int $id Id of supplier invoice to update + * @param int $lineid Id of line to update + * @param array $request_data InvoiceLine data + * + * @url PUT {id}/lines/{lineid} + * + * @return object + * + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + * @throws RestException 304 Error + */ + public function putLine($id, $lineid, $request_data = null) + { + if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { + throw new RestException(401); + } - $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Supplier invoice not found'); - } + $result = $this->invoice->fetch($id); + if (!$result) { + throw new RestException(404, 'Supplier invoice not found'); + } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } - $request_data = (object) $request_data; - $updateRes = $this->invoice->updateline( - $lineid, - $request_data->description, - $request_data->pu_ht, + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } + $request_data = (object) $request_data; + $updateRes = $this->invoice->updateline( + $lineid, + $request_data->description, + $request_data->pu_ht, $request_data->tva_tx, - $request_data->localtax1_tx, - $request_data->localtax2_tx, - $request_data->qty, + $request_data->localtax1_tx, + $request_data->localtax2_tx, + $request_data->qty, $request_data->fk_product, 'HT', $request_data->info_bits, @@ -620,100 +618,98 @@ class SupplierInvoices extends DolibarrApi $request_data->fk_unit, $request_data->multicurrency_subprice, $request_data->ref_supplier - ); + ); - if ($updateRes > 0) { - $result = $this->get($id); - unset($result->line); - return $this->_cleanObjectDatas($result); - } else { - throw new RestException(304, $this->invoice->error); - } - } + if ($updateRes > 0) { + $result = $this->get($id); + unset($result->line); + return $this->_cleanObjectDatas($result); + } else { + throw new RestException(304, $this->invoice->error); + } + } /** - * Deletes a line of a given supplier invoice - * - * @param int $id Id of supplier invoice - * @param int $lineid Id of the line to delete - * - * @url DELETE {id}/lines/{lineid} - * - * @return array - * - * @throws 400 - * @throws 401 - * @throws 404 - * @throws 405 - */ - public function deleteLine($id, $lineid) - { + * Deletes a line of a given supplier invoice + * + * @param int $id Id of supplier invoice + * @param int $lineid Id of the line to delete + * + * @url DELETE {id}/lines/{lineid} + * + * @return array + * + * @throws RestException 400 Bad parameters + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + * @throws RestException 405 Error + */ + public function deleteLine($id, $lineid) + { if (!DolibarrApiAccess::$user->rights->fournisseur->facture->creer) { - throw new RestException(401); - } + throw new RestException(401); + } $result = $this->invoice->fetch($id); - if (!$result) { - throw new RestException(404, 'Supplier invoice not found'); - } + if (!$result) { + throw new RestException(404, 'Supplier invoice not found'); + } - if (empty($lineid)) { - throw new RestException(400, 'Line ID is mandatory'); - } + if (empty($lineid)) { + throw new RestException(400, 'Line ID is mandatory'); + } - if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { - throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); - } + if (!DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) { + throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); + } - // TODO Check the lineid $lineid is a line of ojbect + // TODO Check the lineid $lineid is a line of ojbect - $updateRes = $this->invoice->deleteline($lineid); - if ($updateRes > 0) { - return $this->get($id); - } - else - { - throw new RestException(405, $this->invoice->error); - } - } + $updateRes = $this->invoice->deleteline($lineid); + if ($updateRes > 0) { + return $this->get($id); + } else { + throw new RestException(405, $this->invoice->error); + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore - /** - * Clean sensible object datas - * - * @param Object $object Object to clean - * @return array Array of cleaned object properties - */ - protected function _cleanObjectDatas($object) - { - // phpcs:enable - $object = parent::_cleanObjectDatas($object); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore + /** + * Clean sensible object datas + * + * @param Object $object Object to clean + * @return array Array of cleaned object properties + */ + protected function _cleanObjectDatas($object) + { + // phpcs:enable + $object = parent::_cleanObjectDatas($object); - unset($object->rowid); - unset($object->barcode_type); - unset($object->barcode_type_code); - unset($object->barcode_type_label); - unset($object->barcode_type_coder); + unset($object->rowid); + unset($object->barcode_type); + unset($object->barcode_type_code); + unset($object->barcode_type_label); + unset($object->barcode_type_coder); - return $object; - } + return $object; + } - /** - * Validate fields before create or update object - * - * @param array $data Datas to validate - * @return array - * - * @throws RestException - */ - private function _validate($data) - { - $invoice = array(); - foreach (SupplierInvoices::$FIELDS as $field) { - if (!isset($data[$field])) - throw new RestException(400, "$field field missing"); - $invoice[$field] = $data[$field]; - } - return $invoice; - } + /** + * Validate fields before create or update object + * + * @param array $data Datas to validate + * @return array + * + * @throws RestException + */ + private function _validate($data) + { + $invoice = array(); + foreach (SupplierInvoices::$FIELDS as $field) { + if (!isset($data[$field])) + throw new RestException(400, "$field field missing"); + $invoice[$field] = $data[$field]; + } + return $invoice; + } } diff --git a/htdocs/fourn/class/api_supplier_orders.class.php b/htdocs/fourn/class/api_supplier_orders.class.php index 9e22d952920..0fd06790011 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -149,7 +149,7 @@ class SupplierOrders extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { @@ -157,27 +157,26 @@ class SupplierOrders extends DolibarrApi } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { $i = 0; - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); while ($i < $min) { - $obj = $db->fetch_object($result); - $order_static = new CommandeFournisseur($db); + $obj = $this->db->fetch_object($result); + $order_static = new CommandeFournisseur($this->db); if ($order_static->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($order_static); } $i++; } - } - else { - throw new RestException(503, 'Error when retrieve supplier order list : '.$db->lasterror()); + } else { + throw new RestException(503, 'Error when retrieve supplier order list : '.$this->db->lasterror()); } if (!count($obj_ret)) { throw new RestException(404, 'No supplier order found'); @@ -188,6 +187,8 @@ class SupplierOrders extends DolibarrApi /** * Create supplier order object * + * Example: {"ref": "auto", "ref_supplier": "1234", "socid": "1", "multicurrency_code": "SEK", "multicurrency_tx": 1, "tva_tx": 25, "note": "Imported via the REST API"} + * * @param array $request_data Request datas * @return int ID of supplier order */ diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index 30995b3b0df..e9ba334313c 100644 --- a/htdocs/fourn/class/fournisseur.class.php +++ b/htdocs/fourn/class/fournisseur.class.php @@ -95,9 +95,7 @@ class Fournisseur extends Societe { $obj = $this->db->fetch_object($resql); return $obj->nb; - } - else - { + } else { return -1; } } @@ -136,9 +134,7 @@ class Fournisseur extends Societe } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -166,9 +162,7 @@ class Fournisseur extends Societe { dol_syslog("Fournisseur::CreateCategory : Success"); return 0; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog("Fournisseur::CreateCategory : Failed (".$this->error.")"); return -1; @@ -204,9 +198,7 @@ class Fournisseur extends Societe { $arr[$obj->rowid] = $obj->name; } - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->lasterror(); } diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index dd6f6d8ac13..f354b89186d 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -42,22 +42,22 @@ require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; */ class CommandeFournisseur extends CommonOrder { - /** + /** * @var string ID to identify managed object */ public $element = 'order_supplier'; - /** + /** * @var string Name of table without prefix where object is stored */ public $table_element = 'commande_fournisseur'; - /** + /** * @var int Name of subtable line */ public $table_element_line = 'commande_fournisseurdet'; - /** + /** * @var int Field with ID of parent key if this field has a parent */ public $fk_element = 'fk_commande'; @@ -67,24 +67,24 @@ class CommandeFournisseur extends CommonOrder */ public $picto = 'supplier_order'; - /** - * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - * @var int - */ - public $ismultientitymanaged = 1; + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; - /** - * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user - * @var integer - */ - public $restrictiononfksoc = 1; + /** + * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user + * @var integer + */ + public $restrictiononfksoc = 1; - /** - * {@inheritdoc} - */ - protected $table_ref_field = 'ref'; + /** + * {@inheritdoc} + */ + protected $table_ref_field = 'ref'; - /** + /** * @var int ID */ public $id; @@ -93,75 +93,70 @@ class CommandeFournisseur extends CommonOrder * Supplier order reference * @var string */ - public $ref; + public $ref; - public $ref_supplier; - public $brouillon; - public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially - // -> 7=Canceled/Never received -> (reopen) 3=Process runing - // -> 6=Canceled -> (reopen) 2=Approved - // -> 9=Refused -> (reopen) 1=Validated - // Note: billed or not is on another field "billed" - public $statuts; // List of status + public $ref_supplier; + public $brouillon; + public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process runing -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially + // -> 7=Canceled/Never received -> (reopen) 3=Process runing + // -> 6=Canceled -> (reopen) 2=Approved + // -> 9=Refused -> (reopen) 1=Validated + // Note: billed or not is on another field "billed" + public $statuts; // List of status - public $billed; + public $billed; - public $socid; - public $fourn_id; - public $date; - public $date_valid; - public $date_approve; - public $date_approve2; // Used when SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set - public $date_commande; + public $socid; + public $fourn_id; + public $date; + public $date_valid; + public $date_approve; + public $date_approve2; // Used when SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set + public $date_commande; - /** - * Delivery date - */ - public $date_livraison; + /** + * Delivery date + */ + public $date_livraison; - public $total_ht; - public $total_tva; - public $total_localtax1; // Total Local tax 1 - public $total_localtax2; // Total Local tax 2 - public $total_ttc; - public $source; + public $total_ht; + public $total_tva; + public $total_localtax1; // Total Local tax 1 + public $total_localtax2; // Total Local tax 2 + public $total_ttc; + public $source; /** * @deprecated * @see $note_private, $note_public */ - public $note; + public $note; public $note_private; - public $note_public; - public $model_pdf; + public $note_public; + public $model_pdf; - /** - * @var int ID - */ - public $fk_project; + /** + * @var int ID + */ + public $fk_project; - public $cond_reglement_id; - public $cond_reglement_code; + public $cond_reglement_id; + public $cond_reglement_code; - /** - * @var int ID - */ - public $fk_account; + /** + * @var int ID + */ + public $fk_account; - public $mode_reglement_id; - public $mode_reglement_code; - public $user_author_id; - public $user_valid_id; - public $user_approve_id; - public $user_approve_id2; // Used when SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set + public $mode_reglement_id; + public $mode_reglement_code; + public $user_author_id; + public $user_valid_id; + public $user_approve_id; + public $user_approve_id2; // Used when SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set - //Incoterms - public $fk_incoterms; - public $location_incoterms; - public $label_incoterms; //Used into tooltip - - public $extraparams = array(); + public $extraparams = array(); /** * @var CommandeFournisseurLigne[] @@ -169,74 +164,74 @@ class CommandeFournisseur extends CommonOrder public $lines = array(); //Add for supplier_proposal - public $origin; - public $origin_id; - public $linked_objects = array(); + public $origin; + public $origin_id; + public $linked_objects = array(); // Multicurrency /** - * @var int ID - */ - public $fk_multicurrency; + * @var int ID + */ + public $fk_multicurrency; - public $multicurrency_code; - public $multicurrency_tx; - public $multicurrency_total_ht; - public $multicurrency_total_tva; - public $multicurrency_total_ttc; + public $multicurrency_code; + public $multicurrency_tx; + public $multicurrency_total_ht; + public $multicurrency_total_tva; + public $multicurrency_total_ttc; - public $fields = array( - 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), - 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>15), - 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20), - 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'showoncombobox'=>1, 'position'=>25), - 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>30, 'index'=>1), - 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35), - 'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefSupplier', 'enabled'=>1, 'visible'=>-1, 'position'=>40), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>45), - 'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-1, 'position'=>50), - 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>55), - 'date_approve' =>array('type'=>'datetime', 'label'=>'Date approve', 'enabled'=>1, 'visible'=>-1, 'position'=>60), - 'date_approve2' =>array('type'=>'datetime', 'label'=>'Date approve2', 'enabled'=>1, 'visible'=>-1, 'position'=>65), - 'date_commande' =>array('type'=>'date', 'label'=>'Date commande', 'enabled'=>1, 'visible'=>-1, 'position'=>70), - 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>75), - 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>80), - 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>85), - 'fk_user_approve' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserApproval', 'enabled'=>1, 'visible'=>-1, 'position'=>90), - 'fk_user_approve2' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserSecondApproval', 'enabled'=>1, 'visible'=>-1, 'position'=>95), - 'source' =>array('type'=>'smallint(6)', 'label'=>'Source', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>100), - 'billed' =>array('type'=>'smallint(6)', 'label'=>'Billed', 'enabled'=>1, 'visible'=>-1, 'position'=>110), - 'amount_ht' =>array('type'=>'double(24,8)', 'label'=>'Amount ht', 'enabled'=>1, 'visible'=>-1, 'position'=>115), - 'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>120), - 'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>125), - 'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1), - 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1), - 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1), - 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1), - 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>150, 'isameasure'=>1), - 'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>155), - 'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>160), - 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPDF', 'enabled'=>1, 'visible'=>0, 'position'=>165), - 'fk_input_method' =>array('type'=>'integer', 'label'=>'InputMethod', 'enabled'=>1, 'visible'=>-1, 'position'=>170), - 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>175), - 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>180), - 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>190), - 'date_livraison' =>array('type'=>'datetime', 'label'=>'DeliveryDate', 'enabled'=>1, 'visible'=>-1, 'position'=>195), - 'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>200), - 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>-1, 'position'=>205), - 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>-1, 'position'=>210), - 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>215), - 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCode', 'enabled'=>1, 'visible'=>-1, 'position'=>220), - 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>1, 'visible'=>-1, 'position'=>225), - 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>230), - 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>235), - 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>240), - 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>245), - 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500), - 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900), - ); + public $fields = array( + 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>15), + 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>20), + 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'showoncombobox'=>1, 'position'=>25), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>30, 'index'=>1), + 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'Ref ext', 'enabled'=>1, 'visible'=>0, 'position'=>35), + 'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefSupplier', 'enabled'=>1, 'visible'=>-1, 'position'=>40), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Fk projet', 'enabled'=>1, 'visible'=>-1, 'position'=>45), + 'date_creation' =>array('type'=>'datetime', 'label'=>'Date creation', 'enabled'=>1, 'visible'=>-1, 'position'=>50), + 'date_valid' =>array('type'=>'datetime', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>55), + 'date_approve' =>array('type'=>'datetime', 'label'=>'Date approve', 'enabled'=>1, 'visible'=>-1, 'position'=>60), + 'date_approve2' =>array('type'=>'datetime', 'label'=>'Date approve2', 'enabled'=>1, 'visible'=>-1, 'position'=>65), + 'date_commande' =>array('type'=>'date', 'label'=>'Date commande', 'enabled'=>1, 'visible'=>-1, 'position'=>70), + 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fk user author', 'enabled'=>1, 'visible'=>-1, 'position'=>75), + 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>80), + 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>85), + 'fk_user_approve' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserApproval', 'enabled'=>1, 'visible'=>-1, 'position'=>90), + 'fk_user_approve2' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserSecondApproval', 'enabled'=>1, 'visible'=>-1, 'position'=>95), + 'source' =>array('type'=>'smallint(6)', 'label'=>'Source', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>100), + 'billed' =>array('type'=>'smallint(6)', 'label'=>'Billed', 'enabled'=>1, 'visible'=>-1, 'position'=>110), + 'amount_ht' =>array('type'=>'double(24,8)', 'label'=>'Amount ht', 'enabled'=>1, 'visible'=>-1, 'position'=>115), + 'remise_percent' =>array('type'=>'double', 'label'=>'Remise percent', 'enabled'=>1, 'visible'=>-1, 'position'=>120), + 'remise' =>array('type'=>'double', 'label'=>'Remise', 'enabled'=>1, 'visible'=>-1, 'position'=>125), + 'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>130, 'isameasure'=>1), + 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>135, 'isameasure'=>1), + 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>140, 'isameasure'=>1), + 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>145, 'isameasure'=>1), + 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>150, 'isameasure'=>1), + 'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>155), + 'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>160), + 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPDF', 'enabled'=>1, 'visible'=>0, 'position'=>165), + 'fk_input_method' =>array('type'=>'integer', 'label'=>'InputMethod', 'enabled'=>1, 'visible'=>-1, 'position'=>170), + 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>175), + 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>180), + 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>190), + 'date_livraison' =>array('type'=>'datetime', 'label'=>'DeliveryDate', 'enabled'=>1, 'visible'=>-1, 'position'=>195), + 'fk_account' =>array('type'=>'integer', 'label'=>'Fk account', 'enabled'=>1, 'visible'=>-1, 'position'=>200), + 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>-1, 'position'=>205), + 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>-1, 'position'=>210), + 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'Fk multicurrency', 'enabled'=>1, 'visible'=>-1, 'position'=>215), + 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCode', 'enabled'=>1, 'visible'=>-1, 'position'=>220), + 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>1, 'visible'=>-1, 'position'=>225), + 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>230), + 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>235), + 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>240), + 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>-1, 'position'=>245), + 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900), + ); /** @@ -288,111 +283,112 @@ class CommandeFournisseur extends CommonOrder /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; - $this->products = array(); - } + $this->products = array(); + } - /** - * Get object and lines from database - * - * @param int $id Id of order to load - * @param string $ref Ref of object - * @return int >0 if OK, <0 if KO, 0 if not found - */ - public function fetch($id, $ref = '') - { - global $conf; + /** + * Get object and lines from database + * + * @param int $id Id of order to load + * @param string $ref Ref of object + * @return int >0 if OK, <0 if KO, 0 if not found + */ + public function fetch($id, $ref = '') + { + global $conf; - // Check parameters - if (empty($id) && empty($ref)) return -1; + // Check parameters + if (empty($id) && empty($ref)) return -1; - $sql = "SELECT c.rowid, c.entity, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_vat,"; - $sql .= " c.localtax1, c.localtax2, "; - $sql .= " c.date_creation, c.date_valid, c.date_approve, c.date_approve2,"; - $sql .= " c.fk_user_author, c.fk_user_valid, c.fk_user_approve, c.fk_user_approve2,"; - $sql .= " c.date_commande as date_commande, c.date_livraison as date_livraison, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_projet as fk_project, c.remise_percent, c.source, c.fk_input_method,"; - $sql .= " c.fk_account,"; - $sql .= " c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,"; - $sql .= " c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,"; - $sql .= " cm.libelle as methode_commande,"; - $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,"; - $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle"; - $sql .= ', c.fk_incoterms, c.location_incoterms'; - $sql .= ', i.libelle as label_incoterms'; - $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_payment_term as cr ON c.fk_cond_reglement = cr.rowid"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON c.fk_mode_reglement = p.id"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_input_method as cm ON cm.rowid = c.fk_input_method"; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid'; + $sql = "SELECT c.rowid, c.entity, c.ref, ref_supplier, c.fk_soc, c.fk_statut, c.amount_ht, c.total_ht, c.total_ttc, c.tva as total_vat,"; + $sql .= " c.localtax1, c.localtax2, "; + $sql .= " c.date_creation, c.date_valid, c.date_approve, c.date_approve2,"; + $sql .= " c.fk_user_author, c.fk_user_valid, c.fk_user_approve, c.fk_user_approve2,"; + $sql .= " c.date_commande as date_commande, c.date_livraison as date_livraison, c.fk_cond_reglement, c.fk_mode_reglement, c.fk_projet as fk_project, c.remise_percent, c.source, c.fk_input_method,"; + $sql .= " c.fk_account,"; + $sql .= " c.note_private, c.note_public, c.model_pdf, c.extraparams, c.billed,"; + $sql .= " c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc,"; + $sql .= " cm.libelle as methode_commande,"; + $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle, cr.libelle_facture as cond_reglement_libelle_doc,"; + $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle"; + $sql .= ', c.fk_incoterms, c.location_incoterms'; + $sql .= ', i.libelle as label_incoterms'; + $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_payment_term as cr ON c.fk_cond_reglement = cr.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON c.fk_mode_reglement = p.id"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_input_method as cm ON cm.rowid = c.fk_input_method"; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid'; - if (empty($id)) $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")"; - else $sql .= " WHERE c.rowid=".$id; + if (empty($id)) $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")"; + else $sql .= " WHERE c.rowid=".$id; - if ($ref) $sql .= " AND c.ref='".$this->db->escape($ref)."'"; + if ($ref) $sql .= " AND c.ref='".$this->db->escape($ref)."'"; - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $obj = $this->db->fetch_object($resql); - if (!$obj) - { - $this->error = 'Bill with id '.$id.' not found'; - dol_syslog(get_class($this).'::fetch '.$this->error); - return 0; - } + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + if (!$obj) + { + $this->error = 'Bill with id '.$id.' not found'; + dol_syslog(get_class($this).'::fetch '.$this->error); + return 0; + } - $this->id = $obj->rowid; - $this->entity = $obj->entity; + $this->id = $obj->rowid; + $this->entity = $obj->entity; - $this->ref = $obj->ref; - $this->ref_supplier = $obj->ref_supplier; - $this->socid = $obj->fk_soc; - $this->fourn_id = $obj->fk_soc; - $this->statut = $obj->fk_statut; - $this->status = $obj->fk_statut; - $this->billed = $obj->billed; - $this->user_author_id = $obj->fk_user_author; - $this->user_valid_id = $obj->fk_user_valid; - $this->user_approve_id = $obj->fk_user_approve; - $this->user_approve_id2 = $obj->fk_user_approve2; - $this->total_ht = $obj->total_ht; - $this->total_tva = $obj->total_vat; - $this->total_localtax1 = $obj->localtax1; - $this->total_localtax2 = $obj->localtax2; - $this->total_ttc = $obj->total_ttc; - $this->date = $this->db->jdate($obj->date_creation); - $this->date_valid = $this->db->jdate($obj->date_valid); - $this->date_approve = $this->db->jdate($obj->date_approve); - $this->date_approve2 = $this->db->jdate($obj->date_approve2); - $this->date_commande = $this->db->jdate($obj->date_commande); // date we make the order to supplier + $this->ref = $obj->ref; + $this->ref_supplier = $obj->ref_supplier; + $this->socid = $obj->fk_soc; + $this->fourn_id = $obj->fk_soc; + $this->statut = $obj->fk_statut; + $this->status = $obj->fk_statut; + $this->billed = $obj->billed; + $this->user_author_id = $obj->fk_user_author; + $this->user_valid_id = $obj->fk_user_valid; + $this->user_approve_id = $obj->fk_user_approve; + $this->user_approve_id2 = $obj->fk_user_approve2; + $this->total_ht = $obj->total_ht; + $this->total_tva = $obj->total_vat; + $this->total_localtax1 = $obj->localtax1; + $this->total_localtax2 = $obj->localtax2; + $this->total_ttc = $obj->total_ttc; + $this->date = $this->db->jdate($obj->date_creation); + $this->date_valid = $this->db->jdate($obj->date_valid); + $this->date_approve = $this->db->jdate($obj->date_approve); + $this->date_approve2 = $this->db->jdate($obj->date_approve2); + $this->date_commande = $this->db->jdate($obj->date_commande); // date we make the order to supplier $this->date_livraison = $this->db->jdate($obj->date_livraison); - $this->remise_percent = $obj->remise_percent; - $this->methode_commande_id = $obj->fk_input_method; - $this->methode_commande = $obj->methode_commande; + $this->remise_percent = $obj->remise_percent; + $this->methode_commande_id = $obj->fk_input_method; + $this->methode_commande = $obj->methode_commande; - $this->source = $obj->source; - $this->fk_project = $obj->fk_project; - $this->cond_reglement_id = $obj->fk_cond_reglement; - $this->cond_reglement_code = $obj->cond_reglement_code; - $this->cond_reglement = $obj->cond_reglement_libelle; - $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; - $this->fk_account = $obj->fk_account; - $this->mode_reglement_id = $obj->fk_mode_reglement; - $this->mode_reglement_code = $obj->mode_reglement_code; - $this->mode_reglement = $obj->mode_reglement_libelle; - $this->note = $obj->note_private; // deprecated - $this->note_private = $obj->note_private; - $this->note_public = $obj->note_public; - $this->modelpdf = $obj->model_pdf; + $this->source = $obj->source; + $this->fk_project = $obj->fk_project; + $this->cond_reglement_id = $obj->fk_cond_reglement; + $this->cond_reglement_code = $obj->cond_reglement_code; + $this->cond_reglement = $obj->cond_reglement_libelle; + $this->cond_reglement_doc = $obj->cond_reglement_libelle_doc; + $this->fk_account = $obj->fk_account; + $this->mode_reglement_id = $obj->fk_mode_reglement; + $this->mode_reglement_code = $obj->mode_reglement_code; + $this->mode_reglement = $obj->mode_reglement_libelle; + $this->note = $obj->note_private; // deprecated + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated //Incoterms $this->fk_incoterms = $obj->fk_incoterms; @@ -407,113 +403,109 @@ class CommandeFournisseur extends CommonOrder $this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - $this->extraparams = (array) json_decode($obj->extraparams, true); + $this->extraparams = (array) json_decode($obj->extraparams, true); - $this->db->free($resql); + $this->db->free($resql); - // Retreive all extrafield - // fetch optionals attributes and labels - $this->fetch_optionals(); + // Retreive all extrafield + // fetch optionals attributes and labels + $this->fetch_optionals(); - if ($this->statut == 0) $this->brouillon = 1; + if ($this->statut == 0) $this->brouillon = 1; - /* + /* * Lines */ - $result = $this->fetch_lines(); - if ($result < 0) - { - return -1; - } - else - { - return 1; - } - } - else - { - $this->error = $this->db->error()." sql=".$sql; - return -1; - } - } + $result = $this->fetch_lines(); + if ($result < 0) + { + return -1; + } else { + return 1; + } + } else { + $this->error = $this->db->error()." sql=".$sql; + return -1; + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Load array lines - * - * @param int $only_product Return only physical products - * @return int <0 if KO, >0 if OK - */ - public function fetch_lines($only_product = 0) - { - global $conf; - // phpcs:enable - //$result=$this->fetch_lines(); - $this->lines = array(); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Load array lines + * + * @param int $only_product Return only physical products + * @return int <0 if KO, >0 if OK + */ + public function fetch_lines($only_product = 0) + { + global $conf; + // phpcs:enable + //$result=$this->fetch_lines(); + $this->lines = array(); - $sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description, l.qty,"; - $sql .= " l.vat_src_code, l.tva_tx, l.remise_percent, l.subprice,"; - $sql .= " l.localtax1_tx, l. localtax2_tx, l.localtax1_type, l. localtax2_type, l.total_localtax1, l.total_localtax2,"; - $sql .= " l.total_ht, l.total_tva, l.total_ttc, l.special_code, l.fk_parent_line, l.rang,"; - $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc,"; - $sql .= " l.fk_unit,"; - $sql .= " l.date_start, l.date_end,"; - $sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc'; + $sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description, l.qty,"; + $sql .= " l.vat_src_code, l.tva_tx, l.remise_percent, l.subprice,"; + $sql .= " l.localtax1_tx, l. localtax2_tx, l.localtax1_type, l. localtax2_type, l.total_localtax1, l.total_localtax2,"; + $sql .= " l.total_ht, l.total_tva, l.total_ttc, l.special_code, l.fk_parent_line, l.rang,"; + $sql .= " p.rowid as product_id, p.ref as product_ref, p.label as product_label, p.description as product_desc,"; + $sql .= " l.fk_unit,"; + $sql .= " l.date_start, l.date_end,"; + $sql .= ' l.fk_multicurrency, l.multicurrency_code, l.multicurrency_subprice, l.multicurrency_total_ht, l.multicurrency_total_tva, l.multicurrency_total_ttc'; if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", pfp.rowid as fk_pfp, pfp.packaging"; - $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l"; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; + $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l"; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON l.fk_product = pfp.fk_product and l.ref = pfp.ref_fourn"; - $sql .= " WHERE l.fk_commande = ".$this->id; - if ($only_product) $sql .= ' AND p.fk_product_type = 0'; - $sql .= " ORDER BY l.rang, l.rowid"; - //print $sql; + $sql .= " WHERE l.fk_commande = ".$this->id; + if ($only_product) $sql .= ' AND p.fk_product_type = 0'; + $sql .= " ORDER BY l.rang, l.rowid"; + //print $sql; - dol_syslog(get_class($this)."::fetch get lines", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) - { - $num = $this->db->num_rows($result); - $i = 0; + dol_syslog(get_class($this)."::fetch get lines", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + $num = $this->db->num_rows($result); + $i = 0; - while ($i < $num) - { - $objp = $this->db->fetch_object($result); + while ($i < $num) + { + $objp = $this->db->fetch_object($result); - $line = new CommandeFournisseurLigne($this->db); + $line = new CommandeFournisseurLigne($this->db); - $line->id = $objp->rowid; - $line->desc = $objp->description; - $line->description = $objp->description; - $line->qty = $objp->qty; - $line->tva_tx = $objp->tva_tx; - $line->localtax1_tx = $objp->localtax1_tx; - $line->localtax2_tx = $objp->localtax2_tx; - $line->localtax1_type = $objp->localtax1_type; - $line->localtax2_type = $objp->localtax2_type; - $line->subprice = $objp->subprice; - $line->pu_ht = $objp->subprice; - $line->remise_percent = $objp->remise_percent; + $line->id = $objp->rowid; + $line->desc = $objp->description; + $line->description = $objp->description; + $line->qty = $objp->qty; + $line->tva_tx = $objp->tva_tx; + $line->localtax1_tx = $objp->localtax1_tx; + $line->localtax2_tx = $objp->localtax2_tx; + $line->localtax1_type = $objp->localtax1_type; + $line->localtax2_type = $objp->localtax2_type; + $line->subprice = $objp->subprice; + $line->pu_ht = $objp->subprice; + $line->remise_percent = $objp->remise_percent; - $line->vat_src_code = $objp->vat_src_code; - $line->total_ht = $objp->total_ht; - $line->total_tva = $objp->total_tva; - $line->total_localtax1 = $objp->total_localtax1; - $line->total_localtax2 = $objp->total_localtax2; - $line->total_ttc = $objp->total_ttc; - $line->product_type = $objp->product_type; + $line->vat_src_code = $objp->vat_src_code; + $line->total_ht = $objp->total_ht; + $line->total_tva = $objp->total_tva; + $line->total_localtax1 = $objp->total_localtax1; + $line->total_localtax2 = $objp->total_localtax2; + $line->total_ttc = $objp->total_ttc; + $line->product_type = $objp->product_type; - $line->fk_product = $objp->fk_product; + $line->fk_product = $objp->fk_product; - $line->libelle = $objp->product_label; // deprecated - $line->product_label = $objp->product_label; - $line->product_desc = $objp->product_desc; + $line->libelle = $objp->product_label; // deprecated + $line->product_label = $objp->product_label; + $line->product_desc = $objp->product_desc; - $line->ref = $objp->product_ref; // Ref of product - $line->product_ref = $objp->product_ref; // Ref of product - $line->ref_fourn = $objp->ref_supplier; // The supplier ref of price when product was added. May have change since - $line->ref_supplier = $objp->ref_supplier; // The supplier ref of price when product was added. May have change since + $line->ref = $objp->product_ref; // Ref of product + $line->product_ref = $objp->product_ref; // Ref of product + $line->ref_fourn = $objp->ref_supplier; // The supplier ref of price when product was added. May have change since + $line->ref_supplier = $objp->ref_supplier; // The supplier ref of price when product was added. May have change since if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { @@ -522,784 +514,740 @@ class CommandeFournisseur extends CommonOrder } $line->date_start = $this->db->jdate($objp->date_start); - $line->date_end = $this->db->jdate($objp->date_end); - $line->fk_unit = $objp->fk_unit; + $line->date_end = $this->db->jdate($objp->date_end); + $line->fk_unit = $objp->fk_unit; - // Multicurrency - $line->fk_multicurrency = $objp->fk_multicurrency; - $line->multicurrency_code = $objp->multicurrency_code; - $line->multicurrency_subprice = $objp->multicurrency_subprice; - $line->multicurrency_total_ht = $objp->multicurrency_total_ht; - $line->multicurrency_total_tva = $objp->multicurrency_total_tva; - $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; + // Multicurrency + $line->fk_multicurrency = $objp->fk_multicurrency; + $line->multicurrency_code = $objp->multicurrency_code; + $line->multicurrency_subprice = $objp->multicurrency_subprice; + $line->multicurrency_total_ht = $objp->multicurrency_total_ht; + $line->multicurrency_total_tva = $objp->multicurrency_total_tva; + $line->multicurrency_total_ttc = $objp->multicurrency_total_ttc; - $line->special_code = $objp->special_code; - $line->fk_parent_line = $objp->fk_parent_line; + $line->special_code = $objp->special_code; + $line->fk_parent_line = $objp->fk_parent_line; - $line->rang = $objp->rang; + $line->rang = $objp->rang; - // Retreive all extrafield - // fetch optionals attributes and labels - $line->fetch_optionals(); + // Retreive all extrafield + // fetch optionals attributes and labels + $line->fetch_optionals(); - $this->lines[$i] = $line; + $this->lines[$i] = $line; - $i++; - } - $this->db->free($result); + $i++; + } + $this->db->free($result); - return $num; - } - else - { - $this->error = $this->db->error()." sql=".$sql; - return -1; - } - } + return $num; + } else { + $this->error = $this->db->error()." sql=".$sql; + return -1; + } + } - /** - * Validate an order - * - * @param User $user Validator User - * @param int $idwarehouse Id of warehouse to use for stock decrease - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 if KO, >0 if OK - */ - public function valid($user, $idwarehouse = 0, $notrigger = 0) - { - global $langs, $conf; - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + /** + * Validate an order + * + * @param User $user Validator User + * @param int $idwarehouse Id of warehouse to use for stock decrease + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + public function valid($user, $idwarehouse = 0, $notrigger = 0) + { + global $langs, $conf; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $error = 0; + $error = 0; - dol_syslog(get_class($this)."::valid"); - $result = 0; - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_order_advance->validate))) - { - $this->db->begin(); + dol_syslog(get_class($this)."::valid"); + $result = 0; + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande->creer)) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_order_advance->validate))) + { + $this->db->begin(); - // Definition of supplier order numbering model name - $soc = new Societe($this->db); - $soc->fetch($this->fourn_id); + // Definition of supplier order numbering model name + $soc = new Societe($this->db); + $soc->fetch($this->fourn_id); - // Check if object has a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life - { - $num = $this->getNextNumRef($soc); - } - else + // Check if object has a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { - $num = $this->ref; - } - $this->newref = dol_sanitizeFileName($num); + $num = $this->getNextNumRef($soc); + } else { + $num = $this->ref; + } + $this->newref = dol_sanitizeFileName($num); - $sql = 'UPDATE '.MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " SET ref='".$this->db->escape($num)."',"; - $sql .= " fk_statut = ".self::STATUS_VALIDATED.","; - $sql .= " date_valid='".$this->db->idate(dol_now())."',"; - $sql .= " fk_user_valid = ".$user->id; - $sql .= " WHERE rowid = ".$this->id; - $sql .= " AND fk_statut = ".self::STATUS_DRAFT; + $sql = 'UPDATE '.MAIN_DB_PREFIX."commande_fournisseur"; + $sql .= " SET ref='".$this->db->escape($num)."',"; + $sql .= " fk_statut = ".self::STATUS_VALIDATED.","; + $sql .= " date_valid='".$this->db->idate(dol_now())."',"; + $sql .= " fk_user_valid = ".$user->id; + $sql .= " WHERE rowid = ".$this->id; + $sql .= " AND fk_statut = ".self::STATUS_DRAFT; - $resql = $this->db->query($sql); - if (!$resql) - { - dol_print_error($this->db); - $error++; - } + $resql = $this->db->query($sql); + if (!$resql) + { + dol_print_error($this->db); + $error++; + } - if (!$error && !$notrigger) - { + if (!$error && !$notrigger) + { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_VALIDATE', $user); if ($result < 0) $error++; // End call triggers - } + } - if (!$error) - { - $this->oldref = $this->ref; - - // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref)) - { - // Now we rename also files into index - $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'fournisseur/commande/".$this->db->escape($this->newref)."'"; - $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'fournisseur/commande/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } - - // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments - $oldref = dol_sanitizeFileName($this->ref); - $newref = dol_sanitizeFileName($num); - $dirsource = $conf->fournisseur->commande->dir_output.'/'.$oldref; - $dirdest = $conf->fournisseur->commande->dir_output.'/'.$newref; - if (!$error && file_exists($dirsource)) - { - dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - - if (@rename($dirsource, $dirdest)) - { - dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles = dol_dir_list($conf->fournisseur->commande->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { - $dirsource = $fileentry['name']; - $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); - $dirsource = $fileentry['path'].'/'.$dirsource; - $dirdest = $fileentry['path'].'/'.$dirdest; - @rename($dirsource, $dirdest); - } - } - } - } - } - - if (!$error) - { - $result = 1; - $this->statut = self::STATUS_VALIDATED; - $this->ref = $num; - } - - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error = 'NotAuthorized'; - dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); - return -1; - } - } - - /** - * Return label of the status of object - * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto - * @return string Label - */ - public function getLibStatut($mode = 0) - { - return $this->LibStatut($this->statut, $mode, $this->billed); - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return label of a status - * - * @param int $status Id statut - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto - * @param int $billed 1=Billed - * @return string Label of status - */ - public function LibStatut($status, $mode = 0, $billed = 0) - { - // phpcs:enable - global $conf, $langs; - - if (empty($this->statuts) || empty($this->statutshort)) { - $langs->load('orders'); - - $this->statuts[0] = 'StatusSupplierOrderDraft'; - $this->statuts[1] = 'StatusSupplierOrderValidated'; - $this->statuts[2] = 'StatusSupplierOrderApproved'; - if (empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) $this->statuts[3] = 'StatusSupplierOrderOnProcess'; - else $this->statuts[3] = 'StatusSupplierOrderOnProcessWithValidation'; - $this->statuts[4] = 'StatusSupplierOrderReceivedPartially'; - $this->statuts[5] = 'StatusSupplierOrderReceivedAll'; - $this->statuts[6] = 'StatusSupplierOrderCanceled'; // Approved->Canceled - $this->statuts[7] = 'StatusSupplierOrderCanceled'; // Process running->canceled - $this->statuts[9] = 'StatusSupplierOrderRefused'; - - // List of language codes for status - $this->statutshort[0] = 'StatusSupplierOrderDraftShort'; - $this->statutshort[1] = 'StatusSupplierOrderValidatedShort'; - $this->statutshort[2] = 'StatusSupplierOrderApprovedShort'; - $this->statutshort[3] = 'StatusSupplierOrderOnProcessShort'; - $this->statutshort[4] = 'StatusSupplierOrderReceivedPartiallyShort'; - $this->statutshort[5] = 'StatusSupplierOrderReceivedAllShort'; - $this->statutshort[6] = 'StatusSupplierOrderCanceledShort'; - $this->statutshort[7] = 'StatusSupplierOrderCanceledShort'; - $this->statutshort[9] = 'StatusSupplierOrderRefusedShort'; - } - - $statustrans = array( - 0 => 'status0', - 1 => 'status1b', - 2 => 'status1', - 3 => 'status4', - 4 => 'status4b', - 5 => 'status6', - 6 => 'status9', - 7 => 'status9', - 9 => 'status9', - ); - - $statusClass = 'status0'; - if (!empty($statustrans[$status])) { - $statusClass = $statustrans[$status]; - } - - $billedtext = ''; - if ($billed) { - $billedtext = ' - '.$langs->trans("Billed"); - } - if ($status == 5 && $billed) $statusClass = 'status6'; - - $statusLong = $langs->trans($this->statuts[$status]).$billedtext; - $statusShort = $langs->trans($this->statutshort[$status]); - - return dolGetStatus($statusLong, $statusShort, '', $statusClass, $mode); - } - - - /** - * Return clicable name (with picto eventually) - * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option On what the link points - * @param int $notooltip 1=Disable tooltip - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @param int $addlinktonotes Add link to show notes - * @return string Chain with URL - */ - public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0) - { - global $langs, $conf, $user; - - $result = ''; - $label = ''.$langs->trans("ShowOrder").''; - if (!empty($this->ref)) - $label .= '
'.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->ref_supplier)) - $label .= '
'.$langs->trans('RefSupplier').': '.$this->ref_supplier; - if (!empty($this->total_ht)) - $label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_tva)) - $label .= '
'.$langs->trans('VAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_ttc)) - $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); - - $picto = 'order'; - $url = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id; - - if ($option !== 'nolink') - { - // Add param to save lastsearch_values or not - $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; - if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; - } - - $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label = $langs->trans("ShowOrder"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip"'; - } - - $linkstart = ''; - $linkend = ''; - - $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; - $result .= $linkend; - - if ($addlinktonotes) - { - $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { - $notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); - $result .= ' '; - $result .= ''; - $result .= img_picto('', 'note'); - $result .= ''; - //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); - //$result.=''; - $result .= ''; - } - } - - return $result; - } - - - /** - * Returns the following order reference not used depending on the numbering model activated - * defined within COMMANDE_SUPPLIER_ADDON_NUMBER - * - * @param Societe $soc company object - * @return string free reference for the invoice - */ - public function getNextNumRef($soc) - { - global $db, $langs, $conf; - $langs->load("orders"); - - if (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER)) - { - $mybool = false; - - $file = $conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER.'.php'; - $classname = $conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER; - - // Include file with class - $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - - foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/supplier_order/"); - - // Load file with numbering class (if found) - $mybool |= @include_once $dir.$file; - } - - if ($mybool === false) { - dol_print_error('', "Failed to include file ".$file); - return ''; - } - - $obj = new $classname(); - $numref = $obj->getNextValue($soc, $this); - - if ($numref != "") - { - return $numref; - } - else + if (!$error) { - $this->error = $obj->error; - return -1; - } - } - else - { - $this->error = "Error_COMMANDE_SUPPLIER_ADDON_NotDefined"; - return -2; - } - } - /** - * Class invoiced the supplier order - * - * @param User $user Object user making the change - * @return int <0 if KO, >0 if KO - */ - public function classifyBilled(User $user) - { - $error = 0; - $this->db->begin(); + $this->oldref = $this->ref; - $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur SET billed = 1'; - $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; + // Rename directory if dir was a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref)) + { + // Now we rename also files into index + $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'fournisseur/commande/".$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'fournisseur/commande/".$this->db->escape($this->ref)."' and entity = ".$conf->entity; + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } - if ($this->db->query($sql)) - { - if (!$error) - { - // Call trigger - $result = $this->call_trigger('ORDER_SUPPLIER_CLASSIFY_BILLED', $user); - if ($result < 0) $error++; - // End call triggers - } + // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments + $oldref = dol_sanitizeFileName($this->ref); + $newref = dol_sanitizeFileName($num); + $dirsource = $conf->fournisseur->commande->dir_output.'/'.$oldref; + $dirdest = $conf->fournisseur->commande->dir_output.'/'.$newref; + if (!$error && file_exists($dirsource)) + { + dol_syslog(get_class($this)."::valid rename dir ".$dirsource." into ".$dirdest); - if (!$error) - { - $this->billed = 1; + if (@rename($dirsource, $dirdest)) + { + dol_syslog("Rename ok"); + // Rename docs starting with $oldref with $newref + $listoffiles = dol_dir_list($conf->fournisseur->commande->dir_output.'/'.$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + foreach ($listoffiles as $fileentry) + { + $dirsource = $fileentry['name']; + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirsource = $fileentry['path'].'/'.$dirsource; + $dirdest = $fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } + } + } + } + } - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - dol_print_error($this->db); + if (!$error) + { + $result = 1; + $this->statut = self::STATUS_VALIDATED; + $this->ref = $num; + } - $this->db->rollback(); + if (!$error) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->error = 'NotAuthorized'; + dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); return -1; - } - } + } + } - /** - * Approve a supplier order - * - * @param User $user Object user - * @param int $idwarehouse Id of warhouse for stock change - * @param int $secondlevel 0=Standard approval, 1=Second level approval (used when option SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set) - * @return int <0 if KO, >0 if OK - */ - public function approve($user, $idwarehouse = 0, $secondlevel = 0) - { - global $langs, $conf; + /** + * Return label of the status of object + * + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto + * @return string Label + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->statut, $mode, $this->billed); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return label of a status + * + * @param int $status Id statut + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto + * @param int $billed 1=Billed + * @return string Label of status + */ + public function LibStatut($status, $mode = 0, $billed = 0) + { + // phpcs:enable + global $conf, $langs; + + if (empty($this->statuts) || empty($this->statutshort)) { + $langs->load('orders'); + + $this->statuts[0] = 'StatusSupplierOrderDraft'; + $this->statuts[1] = 'StatusSupplierOrderValidated'; + $this->statuts[2] = 'StatusSupplierOrderApproved'; + if (empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) $this->statuts[3] = 'StatusSupplierOrderOnProcess'; + else $this->statuts[3] = 'StatusSupplierOrderOnProcessWithValidation'; + $this->statuts[4] = 'StatusSupplierOrderReceivedPartially'; + $this->statuts[5] = 'StatusSupplierOrderReceivedAll'; + $this->statuts[6] = 'StatusSupplierOrderCanceled'; // Approved->Canceled + $this->statuts[7] = 'StatusSupplierOrderCanceled'; // Process running->canceled + $this->statuts[9] = 'StatusSupplierOrderRefused'; + + // List of language codes for status + $this->statutshort[0] = 'StatusSupplierOrderDraftShort'; + $this->statutshort[1] = 'StatusSupplierOrderValidatedShort'; + $this->statutshort[2] = 'StatusSupplierOrderApprovedShort'; + $this->statutshort[3] = 'StatusSupplierOrderOnProcessShort'; + $this->statutshort[4] = 'StatusSupplierOrderReceivedPartiallyShort'; + $this->statutshort[5] = 'StatusSupplierOrderReceivedAllShort'; + $this->statutshort[6] = 'StatusSupplierOrderCanceledShort'; + $this->statutshort[7] = 'StatusSupplierOrderCanceledShort'; + $this->statutshort[9] = 'StatusSupplierOrderRefusedShort'; + } + + $statustrans = array( + 0 => 'status0', + 1 => 'status1b', + 2 => 'status1', + 3 => 'status4', + 4 => 'status4b', + 5 => 'status6', + 6 => 'status9', + 7 => 'status9', + 9 => 'status9', + ); + + $statusClass = 'status0'; + if (!empty($statustrans[$status])) { + $statusClass = $statustrans[$status]; + } + + $billedtext = ''; + if ($billed) { + $billedtext = ' - '.$langs->trans("Billed"); + } + if ($status == 5 && $billed) $statusClass = 'status6'; + + $statusLong = $langs->trans($this->statuts[$status]).$billedtext; + $statusShort = $langs->trans($this->statutshort[$status]); + + return dolGetStatus($statusLong, $statusShort, '', $statusClass, $mode); + } + + + /** + * Return clicable name (with picto eventually) + * + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param string $option On what the link points + * @param int $notooltip 1=Disable tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $addlinktonotes Add link to show notes + * @return string Chain with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0) + { + global $langs, $conf, $user; + + $result = ''; + $label = ''.$langs->trans("PurchaseOrder").''; + if (!empty($this->ref)) + $label .= '
'.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->ref_supplier)) + $label .= '
'.$langs->trans('RefSupplier').': '.$this->ref_supplier; + if (!empty($this->total_ht)) + $label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_tva)) + $label .= '
'.$langs->trans('VAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_ttc)) + $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); + + $picto = 'order'; + $url = DOL_URL_ROOT.'/fourn/commande/card.php?id='.$this->id; + + if ($option !== 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + } + + $linkclose = ''; + if (empty($notooltip)) + { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label = $langs->trans("ShowOrder"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip"'; + } + + $linkstart = ''; + $linkend = ''; + + $result .= $linkstart; + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto != 2) $result .= $this->ref; + $result .= $linkend; + + if ($addlinktonotes) + { + $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); + if ($txttoshow) + { + $notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); + $result .= ' '; + $result .= ''; + $result .= img_picto('', 'note'); + $result .= ''; + //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); + //$result.=''; + $result .= ''; + } + } + + return $result; + } + + + /** + * Returns the following order reference not used depending on the numbering model activated + * defined within COMMANDE_SUPPLIER_ADDON_NUMBER + * + * @param Societe $soc company object + * @return string free reference for the invoice + */ + public function getNextNumRef($soc) + { + global $db, $langs, $conf; + $langs->load("orders"); + + if (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER)) + { + $mybool = false; + + $file = $conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER.'.php'; + $classname = $conf->global->COMMANDE_SUPPLIER_ADDON_NUMBER; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/supplier_order/"); + + // Load file with numbering class (if found) + $mybool |= @include_once $dir.$file; + } + + if ($mybool === false) { + dol_print_error('', "Failed to include file ".$file); + return ''; + } + + $obj = new $classname(); + $numref = $obj->getNextValue($soc, $this); + + if ($numref != "") + { + return $numref; + } else { + $this->error = $obj->error; + return -1; + } + } else { + $this->error = "Error_COMMANDE_SUPPLIER_ADDON_NotDefined"; + return -2; + } + } + /** + * Class invoiced the supplier order + * + * @param User $user Object user making the change + * @return int <0 if KO, >0 if KO + */ + public function classifyBilled(User $user) + { + $error = 0; + $this->db->begin(); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur SET billed = 1'; + $sql .= ' WHERE rowid = '.$this->id.' AND fk_statut > '.self::STATUS_DRAFT; + + if ($this->db->query($sql)) + { + if (!$error) + { + // Call trigger + $result = $this->call_trigger('ORDER_SUPPLIER_CLASSIFY_BILLED', $user); + if ($result < 0) $error++; + // End call triggers + } + + if (!$error) + { + $this->billed = 1; + + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + dol_print_error($this->db); + + $this->db->rollback(); + return -1; + } + } + + /** + * Approve a supplier order + * + * @param User $user Object user + * @param int $idwarehouse Id of warhouse for stock change + * @param int $secondlevel 0=Standard approval, 1=Second level approval (used when option SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set) + * @return int <0 if KO, >0 if OK + */ + public function approve($user, $idwarehouse = 0, $secondlevel = 0) + { + global $langs, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $error = 0; + $error = 0; - dol_syslog(get_class($this)."::approve"); + dol_syslog(get_class($this)."::approve"); - if ($user->rights->fournisseur->commande->approuver) - { - $now = dol_now(); + if ($user->rights->fournisseur->commande->approuver) + { + $now = dol_now(); - $this->db->begin(); + $this->db->begin(); // Definition of order numbering model name - $soc = new Societe($this->db); - $soc->fetch($this->fourn_id); + $soc = new Societe($this->db); + $soc->fetch($this->fourn_id); - // Check if object has a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life - { - $num = $this->getNextNumRef($soc); - } - else + // Check if object has a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { - $num = $this->ref; - } - $this->newref = dol_sanitizeFileName($num); + $num = $this->getNextNumRef($soc); + } else { + $num = $this->ref; + } + $this->newref = dol_sanitizeFileName($num); - // Do we have to change status now ? (If double approval is required and first approval, we keep status to 1 = validated) + // Do we have to change status now ? (If double approval is required and first approval, we keep status to 1 = validated) $movetoapprovestatus = true; $comment = ''; - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; $sql .= " SET ref='".$this->db->escape($num)."',"; if (empty($secondlevel)) // standard or first level approval { - $sql .= " date_approve='".$this->db->idate($now)."',"; - $sql .= " fk_user_approve = ".$user->id; - if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $conf->global->MAIN_FEATURES_LEVEL > 0 && $this->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) - { - if (empty($this->user_approve_id2)) - { - $movetoapprovestatus = false; // second level approval not done - $comment = ' (first level)'; - } - } - } - else // request a second level approval + $sql .= " date_approve='".$this->db->idate($now)."',"; + $sql .= " fk_user_approve = ".$user->id; + if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $conf->global->MAIN_FEATURES_LEVEL > 0 && $this->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) + { + if (empty($this->user_approve_id2)) + { + $movetoapprovestatus = false; // second level approval not done + $comment = ' (first level)'; + } + } + } else // request a second level approval { - $sql .= " date_approve2='".$this->db->idate($now)."',"; - $sql .= " fk_user_approve2 = ".$user->id; - if (empty($this->user_approve_id)) $movetoapprovestatus = false; // first level approval not done - $comment = ' (second level)'; + $sql .= " date_approve2='".$this->db->idate($now)."',"; + $sql .= " fk_user_approve2 = ".$user->id; + if (empty($this->user_approve_id)) $movetoapprovestatus = false; // first level approval not done + $comment = ' (second level)'; } // If double approval is required and first approval, we keep status to 1 = validated if ($movetoapprovestatus) $sql .= ", fk_statut = ".self::STATUS_ACCEPTED; else $sql .= ", fk_statut = ".self::STATUS_VALIDATED; - $sql .= " WHERE rowid = ".$this->id; - $sql .= " AND fk_statut = ".self::STATUS_VALIDATED; + $sql .= " WHERE rowid = ".$this->id; + $sql .= " AND fk_statut = ".self::STATUS_VALIDATED; - if ($this->db->query($sql)) - { - if (!empty($conf->global->SUPPLIER_ORDER_AUTOADD_USER_CONTACT)) - { + if ($this->db->query($sql)) + { + if (!empty($conf->global->SUPPLIER_ORDER_AUTOADD_USER_CONTACT)) + { $result = $this->add_contact($user->id, 'SALESREPFOLL', 'internal', 1); if ($result < 0 && $result != -2) // -2 means already exists { $error++; } - } + } - // If stock is incremented on validate order, we must increment it - if (!$error && $movetoapprovestatus && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)) - { - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - $langs->load("agenda"); + // If stock is incremented on validate order, we must increment it + if (!$error && $movetoapprovestatus && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER)) + { + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); - $cpt = count($this->lines); - for ($i = 0; $i < $cpt; $i++) - { - // Product with reference - if ($this->lines[$i]->fk_product > 0) - { - $this->line = $this->lines[$i]; - $mouvP = new MouvementStock($this->db); - $mouvP->origin = &$this; - // We decrement stock of product (and sub-products) - $up_ht_disc = $this->lines[$i]->subprice; - if (!empty($this->lines[$i]->remise_percent) && empty($conf->global->STOCK_EXCLUDE_DISCOUNT_FOR_PMP)) $up_ht_disc = price2num($up_ht_disc * (100 - $this->lines[$i]->remise_percent) / 100, 'MU'); - $result = $mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $up_ht_disc, $langs->trans("OrderApprovedInDolibarr", $this->ref)); - if ($result < 0) { $error++; } - unset($this->line); - } - } - } + $cpt = count($this->lines); + for ($i = 0; $i < $cpt; $i++) + { + // Product with reference + if ($this->lines[$i]->fk_product > 0) + { + $this->line = $this->lines[$i]; + $mouvP = new MouvementStock($this->db); + $mouvP->origin = &$this; + // We decrement stock of product (and sub-products) + $up_ht_disc = $this->lines[$i]->subprice; + if (!empty($this->lines[$i]->remise_percent) && empty($conf->global->STOCK_EXCLUDE_DISCOUNT_FOR_PMP)) $up_ht_disc = price2num($up_ht_disc * (100 - $this->lines[$i]->remise_percent) / 100, 'MU'); + $result = $mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $up_ht_disc, $langs->trans("OrderApprovedInDolibarr", $this->ref)); + if ($result < 0) { $error++; } + unset($this->line); + } + } + } - if (!$error) - { + if (!$error) + { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_APPROVE', $user); if ($result < 0) $error++; // End call triggers - } + } - if (!$error) - { - $this->ref = $this->newref; + if (!$error) + { + $this->ref = $this->newref; - if ($movetoapprovestatus) $this->statut = self::STATUS_ACCEPTED; + if ($movetoapprovestatus) $this->statut = self::STATUS_ACCEPTED; else $this->statut = self::STATUS_VALIDATED; - if (empty($secondlevel)) // standard or first level approval + if (empty($secondlevel)) // standard or first level approval { - $this->date_approve = $now; - $this->user_approve_id = $user->id; - } - else // request a second level approval + $this->date_approve = $now; + $this->user_approve_id = $user->id; + } else // request a second level approval { - $this->date_approve2 = $now; - $this->user_approve_id2 = $user->id; + $this->date_approve2 = $now; + $this->user_approve_id2 = $user->id; } - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - return -1; - } - } - else - { - dol_syslog(get_class($this)."::approve Not Authorized", LOG_ERR); - } - return -1; - } + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + return -1; + } + } else { + dol_syslog(get_class($this)."::approve Not Authorized", LOG_ERR); + } + return -1; + } - /** - * Refuse an order - * - * @param User $user User making action - * @return int 0 if Ok, <0 if Ko - */ - public function refuse($user) - { - global $conf, $langs; + /** + * Refuse an order + * + * @param User $user User making action + * @return int 0 if Ok, <0 if Ko + */ + public function refuse($user) + { + global $conf, $langs; $error = 0; - dol_syslog(get_class($this)."::refuse"); - $result = 0; - if ($user->rights->fournisseur->commande->approuver) - { - $this->db->begin(); + dol_syslog(get_class($this)."::refuse"); + $result = 0; + if ($user->rights->fournisseur->commande->approuver) + { + $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".self::STATUS_REFUSED; - $sql .= " WHERE rowid = ".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".self::STATUS_REFUSED; + $sql .= " WHERE rowid = ".$this->id; - if ($this->db->query($sql)) - { - $result = 0; + if ($this->db->query($sql)) + { + $result = 0; - if ($error == 0) - { + if ($error == 0) + { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_REFUSE', $user); if ($result < 0) - { - $error++; - $this->db->rollback(); - } - else - $this->db->commit(); + { + $error++; + $this->db->rollback(); + } else $this->db->commit(); // End call triggers - } - } - else - { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - dol_syslog(get_class($this)."::refuse Error -1"); - $result = -1; - } - } - else - { - dol_syslog(get_class($this)."::refuse Not Authorized"); - } - return $result; - } + } + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this)."::refuse Error -1"); + $result = -1; + } + } else { + dol_syslog(get_class($this)."::refuse Not Authorized"); + } + return $result; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Cancel an approved order. - * The cancellation is done after approval - * - * @param User $user User making action - * @param int $idwarehouse Id warehouse to use for stock change (not used for supplier orders). - * @return int >0 if Ok, <0 if Ko - */ - public function Cancel($user, $idwarehouse = -1) - { - // phpcs:enable - global $langs, $conf; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Cancel an approved order. + * The cancellation is done after approval + * + * @param User $user User making action + * @param int $idwarehouse Id warehouse to use for stock change (not used for supplier orders). + * @return int >0 if Ok, <0 if Ko + */ + public function Cancel($user, $idwarehouse = -1) + { + // phpcs:enable + global $langs, $conf; - $error = 0; + $error = 0; - //dol_syslog("CommandeFournisseur::Cancel"); - $result = 0; - if ($user->rights->fournisseur->commande->commander) - { - $statut = self::STATUS_CANCELED; + //dol_syslog("CommandeFournisseur::Cancel"); + $result = 0; + if ($user->rights->fournisseur->commande->commander) + { + $statut = self::STATUS_CANCELED; - $this->db->begin(); + $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".$statut; - $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::cancel", LOG_DEBUG); - if ($this->db->query($sql)) - { - $result = 0; + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur SET fk_statut = ".$statut; + $sql .= " WHERE rowid = ".$this->id; + dol_syslog(get_class($this)."::cancel", LOG_DEBUG); + if ($this->db->query($sql)) + { + $result = 0; // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_CANCEL', $user); if ($result < 0) $error++; // End call triggers - if ($error == 0) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - dol_syslog(get_class($this)."::cancel ".$this->error); - return -1; - } - } - else - { - dol_syslog(get_class($this)."::cancel Not Authorized"); - return -1; - } - } + if ($error == 0) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this)."::cancel ".$this->error); + return -1; + } + } else { + dol_syslog(get_class($this)."::cancel Not Authorized"); + return -1; + } + } - /** - * Submit a supplier order to supplier - * - * @param User $user User making change - * @param integer $date Date - * @param int $methode Method - * @param string $comment Comment - * @return int <0 if KO, >0 if OK - */ - public function commande($user, $date, $methode, $comment = '') - { - global $langs; - dol_syslog(get_class($this)."::commande"); - $error = 0; - if ($user->rights->fournisseur->commande->commander) - { - $this->db->begin(); + /** + * Submit a supplier order to supplier + * + * @param User $user User making change + * @param integer $date Date + * @param int $methode Method + * @param string $comment Comment + * @return int <0 if KO, >0 if OK + */ + public function commande($user, $date, $methode, $comment = '') + { + global $langs; + dol_syslog(get_class($this)."::commande"); + $error = 0; + if ($user->rights->fournisseur->commande->commander) + { + $this->db->begin(); - $newnoteprivate = $this->note_private; - if ($comment) $newnoteprivate = dol_concatdesc($newnoteprivate, $langs->trans("Comment").': '.$comment); + $newnoteprivate = $this->note_private; + if ($comment) $newnoteprivate = dol_concatdesc($newnoteprivate, $langs->trans("Comment").': '.$comment); - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " SET fk_statut=".self::STATUS_ORDERSENT.", fk_input_method=".$methode.", date_commande='".$this->db->idate($date)."', "; - $sql .= " note_private='".$this->db->escape($newnoteprivate)."'"; - $sql .= " WHERE rowid=".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; + $sql .= " SET fk_statut=".self::STATUS_ORDERSENT.", fk_input_method=".$methode.", date_commande='".$this->db->idate($date)."', "; + $sql .= " note_private='".$this->db->escape($newnoteprivate)."'"; + $sql .= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::commande", LOG_DEBUG); - if ($this->db->query($sql)) - { - $this->statut = self::STATUS_ORDERSENT; - $this->methode_commande_id = $methode; - $this->date_commande = $date; - $this->context = array('comments' => $comment); + dol_syslog(get_class($this)."::commande", LOG_DEBUG); + if ($this->db->query($sql)) + { + $this->statut = self::STATUS_ORDERSENT; + $this->methode_commande_id = $methode; + $this->date_commande = $date; + $this->context = array('comments' => $comment); - // Call trigger - $result = $this->call_trigger('ORDER_SUPPLIER_SUBMIT', $user); - if ($result < 0) $error++; - // End call triggers - } - else - { - $error++; - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - } + // Call trigger + $result = $this->call_trigger('ORDER_SUPPLIER_SUBMIT', $user); + if ($result < 0) $error++; + // End call triggers + } else { + $error++; + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + } - if (!$error) - { - $this->db->commit(); - } - else - { - $this->db->rollback(); - } - } - else - { - $error++; - $this->error = $langs->trans('NotAuthorized'); - $this->errors[] = $langs->trans('NotAuthorized'); - dol_syslog(get_class($this)."::commande User not Authorized", LOG_WARNING); - } + if (!$error) + { + $this->db->commit(); + } else { + $this->db->rollback(); + } + } else { + $error++; + $this->error = $langs->trans('NotAuthorized'); + $this->errors[] = $langs->trans('NotAuthorized'); + dol_syslog(get_class($this)."::commande User not Authorized", LOG_WARNING); + } - return ($error ? -1 : 1); - } + return ($error ? -1 : 1); + } - /** - * Create order with draft status - * - * @param User $user User making creation - * @param int $notrigger Disable all triggers - * @return int <0 if KO, Id of supplier order if OK - */ - public function create($user, $notrigger = 0) - { - global $langs, $conf, $hookmanager; + /** + * Create order with draft status + * + * @param User $user User making creation + * @param int $notrigger Disable all triggers + * @return int <0 if KO, Id of supplier order if OK + */ + public function create($user, $notrigger = 0) + { + global $langs, $conf, $hookmanager; - $this->db->begin(); + $this->db->begin(); $error = 0; - $now = dol_now(); + $now = dol_now(); // $date_commande is deprecated $date = ($this->date_commande ? $this->date_commande : $this->date); // in case of date is set - if(empty($date)) $date = $now; + if (empty($date)) $date = $now; - // Clean parameters - if (empty($this->source)) $this->source = 0; + // Clean parameters + if (empty($this->source)) $this->source = 0; // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $date); @@ -1311,104 +1259,104 @@ class CommandeFournisseur extends CommonOrder $this->multicurrency_tx = 1; } - // We set order into draft status - $this->brouillon = 1; + // We set order into draft status + $this->brouillon = 1; - $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur ("; - $sql .= "ref"; - $sql .= ", ref_supplier"; - $sql .= ", note_private"; - $sql .= ", note_public"; - $sql .= ", entity"; - $sql .= ", fk_soc"; - $sql .= ", fk_projet"; - $sql .= ", date_creation"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur ("; + $sql .= "ref"; + $sql .= ", ref_supplier"; + $sql .= ", note_private"; + $sql .= ", note_public"; + $sql .= ", entity"; + $sql .= ", fk_soc"; + $sql .= ", fk_projet"; + $sql .= ", date_creation"; $sql .= ", date_livraison"; - $sql .= ", fk_user_author"; - $sql .= ", fk_statut"; - $sql .= ", source"; - $sql .= ", model_pdf"; - $sql .= ", fk_mode_reglement"; + $sql .= ", fk_user_author"; + $sql .= ", fk_statut"; + $sql .= ", source"; + $sql .= ", model_pdf"; + $sql .= ", fk_mode_reglement"; $sql .= ", fk_cond_reglement"; - $sql .= ", fk_account"; + $sql .= ", fk_account"; $sql .= ", fk_incoterms, location_incoterms"; - $sql .= ", fk_multicurrency"; - $sql .= ", multicurrency_code"; - $sql .= ", multicurrency_tx"; - $sql .= ") "; - $sql .= " VALUES ("; - $sql .= "''"; - $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; - $sql .= ", '".$this->db->escape($this->note_private)."'"; - $sql .= ", '".$this->db->escape($this->note_public)."'"; - $sql .= ", ".$conf->entity; - $sql .= ", ".$this->socid; - $sql .= ", ".($this->fk_project > 0 ? $this->fk_project : "null"); - $sql .= ", '".$this->db->idate($now)."'"; + $sql .= ", fk_multicurrency"; + $sql .= ", multicurrency_code"; + $sql .= ", multicurrency_tx"; + $sql .= ") "; + $sql .= " VALUES ("; + $sql .= "''"; + $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; + $sql .= ", '".$this->db->escape($this->note_private)."'"; + $sql .= ", '".$this->db->escape($this->note_public)."'"; + $sql .= ", ".$conf->entity; + $sql .= ", ".$this->socid; + $sql .= ", ".($this->fk_project > 0 ? $this->fk_project : "null"); + $sql .= ", '".$this->db->idate($now)."'"; $sql .= ", ".($this->date_livraison ? "'".$this->db->idate($this->date_livraison)."'" : "null"); - $sql .= ", ".$user->id; - $sql .= ", ".self::STATUS_DRAFT; - $sql .= ", ".$this->db->escape($this->source); - $sql .= ", '".$conf->global->COMMANDE_SUPPLIER_ADDON_PDF."'"; - $sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : 'null'); - $sql .= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : 'null'); - $sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL'); - $sql .= ", ".(int) $this->fk_incoterms; - $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; + $sql .= ", ".$user->id; + $sql .= ", ".self::STATUS_DRAFT; + $sql .= ", ".$this->db->escape($this->source); + $sql .= ", '".$this->db->escape($conf->global->COMMANDE_SUPPLIER_ADDON_PDF)."'"; + $sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : 'null'); + $sql .= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : 'null'); + $sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL'); + $sql .= ", ".(int) $this->fk_incoterms; + $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; $sql .= ", ".(int) $this->fk_multicurrency; $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; $sql .= ", ".(double) $this->multicurrency_tx; - $sql .= ")"; + $sql .= ")"; - dol_syslog(get_class($this)."::create", LOG_DEBUG); - if ($this->db->query($sql)) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."commande_fournisseur"); + dol_syslog(get_class($this)."::create", LOG_DEBUG); + if ($this->db->query($sql)) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."commande_fournisseur"); if ($this->id) { $num = count($this->lines); - // insert products details into database - for ($i = 0; $i < $num; $i++) - { - $this->special_code = $this->lines[$i]->special_code; // TODO : remove this in 9.0 and add special_code param to addline() + // insert products details into database + for ($i = 0; $i < $num; $i++) + { + $this->special_code = $this->lines[$i]->special_code; // TODO : remove this in 9.0 and add special_code param to addline() - // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set - $result = $this->addline( - $this->lines[$i]->desc, - $this->lines[$i]->subprice, - $this->lines[$i]->qty, - $this->lines[$i]->tva_tx, - $this->lines[$i]->localtax1_tx, - $this->lines[$i]->localtax2_tx, - $this->lines[$i]->fk_product, - 0, - $this->lines[$i]->ref_fourn, // $this->lines[$i]->ref_fourn comes from field ref into table of lines. Value may ba a ref that does not exists anymore, so we first try with value of product - $this->lines[$i]->remise_percent, - 'HT', - 0, - $this->lines[$i]->product_type, - $this->lines[$i]->info_bits, - false, - $this->lines[$i]->date_start, - $this->lines[$i]->date_end, - $this->lines[$i]->array_options, - $this->lines[$i]->fk_unit - ); - if ($result < 0) - { - dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error - $this->db->rollback(); - return -1; - } - } + // This include test on qty if option SUPPLIER_ORDER_WITH_NOPRICEDEFINED is not set + $result = $this->addline( + $this->lines[$i]->desc, + $this->lines[$i]->subprice, + $this->lines[$i]->qty, + $this->lines[$i]->tva_tx, + $this->lines[$i]->localtax1_tx, + $this->lines[$i]->localtax2_tx, + $this->lines[$i]->fk_product, + 0, + $this->lines[$i]->ref_fourn, // $this->lines[$i]->ref_fourn comes from field ref into table of lines. Value may ba a ref that does not exists anymore, so we first try with value of product + $this->lines[$i]->remise_percent, + 'HT', + 0, + $this->lines[$i]->product_type, + $this->lines[$i]->info_bits, + false, + $this->lines[$i]->date_start, + $this->lines[$i]->date_end, + $this->lines[$i]->array_options, + $this->lines[$i]->fk_unit + ); + if ($result < 0) + { + dol_syslog(get_class($this)."::create ".$this->error, LOG_WARNING); // do not use dol_print_error here as it may be a functionnal error + $this->db->rollback(); + return -1; + } + } - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " SET ref='(PROV".$this->id.")'"; - $sql .= " WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create", LOG_DEBUG); - if ($this->db->query($sql)) - { + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; + $sql .= " SET ref='(PROV".$this->id.")'"; + $sql .= " WHERE rowid=".$this->id; + dol_syslog(get_class($this)."::create", LOG_DEBUG); + if ($this->db->query($sql)) + { // Add link with price request and supplier order if ($this->id) { @@ -1424,87 +1372,82 @@ class CommandeFournisseur extends CommonOrder { foreach ($this->linked_objects as $origin => $tmp_origin_id) { - if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) - { - foreach ($tmp_origin_id as $origin_id) - { - $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { - dol_print_error($this->db); - $error++; - } - } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) - { - $origin_id = $tmp_origin_id; + if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) + { + foreach ($tmp_origin_id as $origin_id) + { + $ret = $this->add_object_linked($origin, $origin_id); + if (!$ret) + { + dol_print_error($this->db); + $error++; + } + } + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + { + $origin_id = $tmp_origin_id; $ret = $this->add_object_linked($origin, $origin_id); if (!$ret) { dol_print_error($this->db); $error++; } - } + } } } } - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) $error++; - } + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) $error++; + } if (!$error && !$notrigger) - { + { // Call trigger $result = $this->call_trigger('ORDER_SUPPLIER_CREATE', $user); if ($result < 0) - { - $this->db->rollback(); - return -1; - } + { + $this->db->rollback(); + return -1; + } // End call triggers - } + } - $this->db->commit(); - return $this->id; - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -2; - } - } - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -1; - } - } + $this->db->commit(); + return $this->id; + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -2; + } + } + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } - /** - * Load an object from its id and create a new one in database - * + /** + * Load an object from its id and create a new one in database + * * @param User $user User making the clone * @param int $socid Id of thirdparty - * @return int New id of clone - */ - public function createFromClone(User $user, $socid = 0) - { - global $conf, $user, $hookmanager; + * @return int New id of clone + */ + public function createFromClone(User $user, $socid = 0) + { + global $conf, $user, $hookmanager; - $error = 0; + $error = 0; $this->db->begin(); - // get extrafields so they will be clone - foreach ($this->lines as $line) - $line->fetch_optionals(); + // get extrafields so they will be clone + foreach ($this->lines as $line) + $line->fetch_optionals(); // Load source object $objFrom = clone $this; @@ -1526,94 +1469,92 @@ class CommandeFournisseur extends CommonOrder // TODO Change product price if multi-prices } - $this->id = 0; - $this->statut = self::STATUS_DRAFT; + $this->id = 0; + $this->statut = self::STATUS_DRAFT; - // Clear fields - $this->user_author_id = $user->id; - $this->user_valid = ''; - $this->date_creation = ''; - $this->date_validation = ''; - $this->ref_supplier = ''; - $this->user_approve_id = ''; - $this->user_approve_id2 = ''; - $this->date_approve = ''; - $this->date_approve2 = ''; + // Clear fields + $this->user_author_id = $user->id; + $this->user_valid = ''; + $this->date_creation = ''; + $this->date_validation = ''; + $this->ref_supplier = ''; + $this->user_approve_id = ''; + $this->user_approve_id2 = ''; + $this->date_approve = ''; + $this->date_approve2 = ''; - // Create clone - $this->context['createfromclone'] = 'createfromclone'; - $result = $this->create($user); - if ($result < 0) $error++; + // Create clone + $this->context['createfromclone'] = 'createfromclone'; + $result = $this->create($user); + if ($result < 0) $error++; - if (!$error) - { - // Hook of thirdparty module - if (is_object($hookmanager)) - { - $parameters = array('objFrom'=>$objFrom); - $action = ''; - $reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) $error++; - } - } + if (!$error) + { + // Hook of thirdparty module + if (is_object($hookmanager)) + { + $parameters = array('objFrom'=>$objFrom); + $action = ''; + $reshook = $hookmanager->executeHooks('createFrom', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook < 0) $error++; + } + } unset($this->context['createfromclone']); // End - if (!$error) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -1; - } - } + if (!$error) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -1; + } + } - /** - * Add order line - * - * @param string $desc Description - * @param float $pu_ht Unit price - * @param float $qty Quantity - * @param float $txtva Taux tva - * @param float $txlocaltax1 Localtax1 tax - * @param float $txlocaltax2 Localtax2 tax - * @param int $fk_product Id product - * @param int $fk_prod_fourn_price Id supplier price - * @param string $ref_supplier Supplier reference price - * @param float $remise_percent Remise - * @param string $price_base_type HT or TTC - * @param float $pu_ttc Unit price TTC - * @param int $type Type of line (0=product, 1=service) - * @param int $info_bits More information - * @param bool $notrigger Disable triggers - * @param int $date_start Date start of service - * @param int $date_end Date end of service + /** + * Add order line + * + * @param string $desc Description + * @param float $pu_ht Unit price + * @param float $qty Quantity + * @param float $txtva Taux tva + * @param float $txlocaltax1 Localtax1 tax + * @param float $txlocaltax2 Localtax2 tax + * @param int $fk_product Id product + * @param int $fk_prod_fourn_price Id supplier price + * @param string $ref_supplier Supplier reference price + * @param float $remise_percent Remise + * @param string $price_base_type HT or TTC + * @param float $pu_ttc Unit price TTC + * @param int $type Type of line (0=product, 1=service) + * @param int $info_bits More information + * @param bool $notrigger Disable triggers + * @param int $date_start Date start of service + * @param int $date_end Date end of service * @param array $array_options extrafields array - * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param string $fk_unit Code of the unit to use. Null to use the default one * @param string $pu_ht_devise Amount in currency * @param string $origin 'order', ... * @param int $origin_id Id of origin object - * @return int <=0 if KO, >0 if OK - */ + * @return int <=0 if KO, >0 if OK + */ public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0) - { - global $langs, $mysoc, $conf; + { + global $langs, $mysoc, $conf; - $error = 0; + $error = 0; - dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $ref_supplier, $remise_percent, $price_base_type, $pu_ttc, $type, $info_bits, $notrigger, $date_start, $date_end, $fk_unit, $pu_ht_devise, $origin, $origin_id"); - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + dol_syslog(get_class($this)."::addline $desc, $pu_ht, $qty, $txtva, $txlocaltax1, $txlocaltax2, $fk_product, $fk_prod_fourn_price, $ref_supplier, $remise_percent, $price_base_type, $pu_ttc, $type, $info_bits, $notrigger, $date_start, $date_end, $fk_unit, $pu_ht_devise, $origin, $origin_id"); + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; if ($this->statut == self::STATUS_DRAFT) { include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; // Clean parameters - if (!$qty) $qty = 1; + if (empty($qty)) $qty = 0; if (!$info_bits) $info_bits = 0; if (empty($txtva)) $txtva = 0; if (empty($txlocaltax1)) $txlocaltax1 = 0; @@ -1633,9 +1574,7 @@ class CommandeFournisseur extends CommonOrder if ($price_base_type == 'HT') { $pu = $pu_ht; - } - else - { + } else { $pu = $pu_ttc; } $desc = trim($desc); @@ -1654,65 +1593,63 @@ class CommandeFournisseur extends CommonOrder } - $this->db->begin(); + $this->db->begin(); - if ($fk_product > 0) - { - if (!empty($conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY)) - { - // Check quantity is enough - dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_prod_fourn_price=".$fk_prod_fourn_price." qty=".$qty." ref_supplier=".$ref_supplier); - $prod = new Product($this->db); - if ($prod->fetch($fk_product) > 0) - { - $product_type = $prod->type; - $label = $prod->label; + if ($fk_product > 0) + { + if (!empty($conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY)) + { + // Check quantity is enough + dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." fk_prod_fourn_price=".$fk_prod_fourn_price." qty=".$qty." ref_supplier=".$ref_supplier); + $prod = new Product($this->db); + if ($prod->fetch($fk_product) > 0) + { + $product_type = $prod->type; + $label = $prod->label; - // We use 'none' instead of $ref_supplier, because fourn_ref may not exists anymore. So we will take the first supplier price ok. - // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. - $result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc - // If supplier order created from customer order, we take best supplier price - // If $pu (defined previously from pu_ht or pu_ttc) is not defined at all, we also take the best supplier price - if ($result > 0 && ($origin == 'commande' || $pu === '')) - { - $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice - $ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice - // is remise percent not keyed but present for the product we add it - if ($remise_percent == 0 && $prod->remise_percent != 0) $remise_percent = $prod->remise_percent; - } - if ($result == 0) // If result == 0, we failed to found the supplier reference price - { - $langs->load("errors"); - $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); - $this->db->rollback(); - dol_syslog(get_class($this)."::addline we did not found supplier price, so we can't guess unit price"); - //$pu = $prod->fourn_pu; // We do not overwrite unit price - //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price - return -1; - } - if ($result == -1) - { - $langs->load("errors"); - $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); - $this->db->rollback(); - dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG); - return -1; - } - if ($result < -1) - { - $this->error = $prod->error; - $this->db->rollback(); - dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); - return -1; - } - } - else - { - $this->error = $prod->error; - $this->db->rollback(); - return -1; - } - } + // We use 'none' instead of $ref_supplier, because fourn_ref may not exists anymore. So we will take the first supplier price ok. + // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. + $result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc + // If supplier order created from customer order, we take best supplier price + // If $pu (defined previously from pu_ht or pu_ttc) is not defined at all, we also take the best supplier price + if ($result > 0 && ($origin == 'commande' || $pu === '')) + { + $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice + $ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice + // is remise percent not keyed but present for the product we add it + if ($remise_percent == 0 && $prod->remise_percent != 0) $remise_percent = $prod->remise_percent; + } + if ($result == 0) // If result == 0, we failed to found the supplier reference price + { + $langs->load("errors"); + $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); + $this->db->rollback(); + dol_syslog(get_class($this)."::addline we did not found supplier price, so we can't guess unit price"); + //$pu = $prod->fourn_pu; // We do not overwrite unit price + //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price + return -1; + } + if ($result == -1) + { + $langs->load("errors"); + $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); + $this->db->rollback(); + dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG); + return -1; + } + if ($result < -1) + { + $this->error = $prod->error; + $this->db->rollback(); + dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); + return -1; + } + } else { + $this->error = $prod->error; + $this->db->rollback(); + return -1; + } + } // redefine quantity according to packaging if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) @@ -1722,9 +1659,7 @@ class CommandeFournisseur extends CommonOrder if ($qty < $prod->packaging) { $qty = $prod->packaging; - } - else - { + } else { if (($qty % $prod->packaging) > 0) { $coeff = intval($qty / $prod->packaging) + 1; @@ -1733,469 +1668,447 @@ class CommandeFournisseur extends CommonOrder } } } - } - else - { - $product_type = $type; - } + } else { + $product_type = $type; + } - if ($conf->multicurrency->enabled && $pu_ht_devise > 0) { - $pu = 0; - } + if ($conf->multicurrency->enabled && $pu_ht_devise > 0) { + $pu = 0; + } - $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); + $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); - // Clean vat code - $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { - $vat_src_code = $reg[1]; - $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. - } + // Clean vat code + $vat_src_code = ''; + if (preg_match('/\((.*)\)/', $txtva, $reg)) + { + $vat_src_code = $reg[1]; + $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. + } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $product_type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; - $pu = $pu_ht = $tabprice[3]; + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + $total_localtax1 = $tabprice[9]; + $total_localtax2 = $tabprice[10]; + $pu = $pu_ht = $tabprice[3]; // MultiCurrency $multicurrency_total_ht = $tabprice[16]; - $multicurrency_total_tva = $tabprice[17]; - $multicurrency_total_ttc = $tabprice[18]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; - $localtax1_type = $localtaxes_type[0]; + $localtax1_type = $localtaxes_type[0]; $localtax2_type = $localtaxes_type[2]; - $subprice = price2num($pu, 'MU'); + $subprice = price2num($pu, 'MU'); - $rangmax = $this->line_max(); - $rang = $rangmax + 1; + $rangmax = $this->line_max(); + $rang = $rangmax + 1; - // Insert line - $this->line = new CommandeFournisseurLigne($this->db); + // Insert line + $this->line = new CommandeFournisseurLigne($this->db); - $this->line->context = $this->context; + $this->line->context = $this->context; - $this->line->fk_commande = $this->id; - $this->line->label = $label; - $this->line->ref_fourn = $ref_supplier; - $this->line->ref_supplier = $ref_supplier; - $this->line->desc = $desc; - $this->line->qty = $qty; - $this->line->tva_tx = $txtva; - $this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0); - $this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0); - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; - $this->line->fk_product = $fk_product; - $this->line->product_type = $product_type; - $this->line->remise_percent = $remise_percent; - $this->line->subprice = $pu_ht; - $this->line->rang = $rang; - $this->line->info_bits = $info_bits; + $this->line->fk_commande = $this->id; + $this->line->label = $label; + $this->line->ref_fourn = $ref_supplier; + $this->line->ref_supplier = $ref_supplier; + $this->line->desc = $desc; + $this->line->qty = $qty; + $this->line->tva_tx = $txtva; + $this->line->localtax1_tx = ($total_localtax1 ? $localtaxes_type[1] : 0); + $this->line->localtax2_tx = ($total_localtax2 ? $localtaxes_type[3] : 0); + $this->line->localtax1_type = $localtaxes_type[0]; + $this->line->localtax2_type = $localtaxes_type[2]; + $this->line->fk_product = $fk_product; + $this->line->product_type = $product_type; + $this->line->remise_percent = $remise_percent; + $this->line->subprice = $pu_ht; + $this->line->rang = $rang; + $this->line->info_bits = $info_bits; - $this->line->vat_src_code = $vat_src_code; - $this->line->total_ht = $total_ht; - $this->line->total_tva = $total_tva; - $this->line->total_localtax1 = $total_localtax1; - $this->line->total_localtax2 = $total_localtax2; - $this->line->total_ttc = $total_ttc; - $this->line->product_type = $type; - $this->line->special_code = $this->special_code; - $this->line->origin = $origin; - $this->line->origin_id = $origin_id; - $this->line->fk_unit = $fk_unit; + $this->line->vat_src_code = $vat_src_code; + $this->line->total_ht = $total_ht; + $this->line->total_tva = $total_tva; + $this->line->total_localtax1 = $total_localtax1; + $this->line->total_localtax2 = $total_localtax2; + $this->line->total_ttc = $total_ttc; + $this->line->product_type = $type; + $this->line->special_code = $this->special_code; + $this->line->origin = $origin; + $this->line->origin_id = $origin_id; + $this->line->fk_unit = $fk_unit; - $this->line->date_start = $date_start; - $this->line->date_end = $date_end; + $this->line->date_start = $date_start; + $this->line->date_end = $date_end; - // Multicurrency - $this->line->fk_multicurrency = $this->fk_multicurrency; - $this->line->multicurrency_code = $this->multicurrency_code; - $this->line->multicurrency_subprice = $pu_ht_devise; - $this->line->multicurrency_total_ht = $multicurrency_total_ht; - $this->line->multicurrency_total_tva = $multicurrency_total_tva; - $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + // Multicurrency + $this->line->fk_multicurrency = $this->fk_multicurrency; + $this->line->multicurrency_code = $this->multicurrency_code; + $this->line->multicurrency_subprice = $pu_ht_devise; + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; - $this->line->subprice = $pu_ht; - $this->line->price = $this->line->subprice; + $this->line->subprice = $pu_ht; + $this->line->price = $this->line->subprice; - $this->line->remise_percent = $remise_percent; + $this->line->remise_percent = $remise_percent; - if (is_array($array_options) && count($array_options) > 0) { - $this->line->array_options = $array_options; - } + if (is_array($array_options) && count($array_options) > 0) { + $this->line->array_options = $array_options; + } - $result = $this->line->insert($notrigger); - if ($result > 0) - { - // Reorder if child line - if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); + $result = $this->line->insert($notrigger); + if ($result > 0) + { + // Reorder if child line + if (!empty($fk_parent_line)) $this->line_order(true, 'DESC'); - // Mise a jour informations denormalisees au niveau de la commande meme - $result = $this->update_price(1, 'auto', 0, $this->thirdparty); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. - if ($result > 0) - { - $this->db->commit(); - return $this->line->id; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error = $this->line->error; - $this->errors = $this->line->errors; - dol_syslog(get_class($this)."::addline error=".$this->error, LOG_ERR); - $this->db->rollback(); - return -1; - } - } - } + // Mise a jour informations denormalisees au niveau de la commande meme + $result = $this->update_price(1, 'auto', 0, $this->thirdparty); // This method is designed to add line from user input so total calculation must be done using 'auto' mode. + if ($result > 0) + { + $this->db->commit(); + return $this->line->id; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->error = $this->line->error; + $this->errors = $this->line->errors; + dol_syslog(get_class($this)."::addline error=".$this->error, LOG_ERR); + $this->db->rollback(); + return -1; + } + } + } - /** - * Save a receiving into the tracking table of receiving (commande_fournisseur_dispatch) and add product into stock warehouse. - * - * @param User $user User object making change - * @param int $product Id of product to dispatch - * @param double $qty Qty to dispatch - * @param int $entrepot Id of warehouse to add product - * @param double $price Unit Price for PMP value calculation (Unit price without Tax and taking into account discount) - * @param string $comment Comment for stock movement + /** + * Save a receiving into the tracking table of receiving (commande_fournisseur_dispatch) and add product into stock warehouse. + * + * @param User $user User object making change + * @param int $product Id of product to dispatch + * @param double $qty Qty to dispatch + * @param int $entrepot Id of warehouse to add product + * @param double $price Unit Price for PMP value calculation (Unit price without Tax and taking into account discount) + * @param string $comment Comment for stock movement * @param integer $eatby eat-by date * @param integer $sellby sell-by date * @param string $batch Lot number * @param int $fk_commandefourndet Id of supplier order line - * @param int $notrigger 1 = notrigger - * @return int <0 if KO, >0 if OK - */ - public function dispatchProduct($user, $product, $qty, $entrepot, $price = 0, $comment = '', $eatby = '', $sellby = '', $batch = '', $fk_commandefourndet = 0, $notrigger = 0) - { - global $conf, $langs; + * @param int $notrigger 1 = notrigger + * @return int <0 if KO, >0 if OK + */ + public function dispatchProduct($user, $product, $qty, $entrepot, $price = 0, $comment = '', $eatby = '', $sellby = '', $batch = '', $fk_commandefourndet = 0, $notrigger = 0) + { + global $conf, $langs; - $error = 0; - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $error = 0; + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - // Check parameters (if test are wrong here, there is bug into caller) - if ($entrepot <= 0) - { - $this->error = 'ErrorBadValueForParameterWarehouse'; - return -1; - } - if ($qty == 0) - { - $this->error = 'ErrorBadValueForParameterQty'; - return -1; - } + // Check parameters (if test are wrong here, there is bug into caller) + if ($entrepot <= 0) + { + $this->error = 'ErrorBadValueForParameterWarehouse'; + return -1; + } + if ($qty == 0) + { + $this->error = 'ErrorBadValueForParameterQty'; + return -1; + } - $dispatchstatus = 1; - if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) $dispatchstatus = 0; // Setting dispatch status (a validation step after receiving products) will be done manually to 1 or 2 if this option is on + $dispatchstatus = 1; + if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) $dispatchstatus = 0; // Setting dispatch status (a validation step after receiving products) will be done manually to 1 or 2 if this option is on - $now = dol_now(); + $now = dol_now(); - if (($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY || $this->statut == self::STATUS_RECEIVED_COMPLETELY)) - { - $this->db->begin(); + if (($this->statut == self::STATUS_ORDERSENT || $this->statut == self::STATUS_RECEIVED_PARTIALLY || $this->statut == self::STATUS_RECEIVED_COMPLETELY)) + { + $this->db->begin(); - $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur_dispatch"; - $sql .= " (fk_commande, fk_product, qty, fk_entrepot, fk_user, datec, fk_commandefourndet, status, comment, eatby, sellby, batch) VALUES"; - $sql .= " ('".$this->id."','".$product."','".$qty."',".($entrepot > 0 ? "'".$entrepot."'" : "null").",'".$user->id."','".$this->db->idate($now)."','".$fk_commandefourndet."', ".$dispatchstatus.", '".$this->db->escape($comment)."', "; - $sql .= ($eatby ? "'".$this->db->idate($eatby)."'" : "null").", ".($sellby ? "'".$this->db->idate($sellby)."'" : "null").", ".($batch ? "'".$batch."'" : "null"); - $sql .= ")"; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseur_dispatch"; + $sql .= " (fk_commande, fk_product, qty, fk_entrepot, fk_user, datec, fk_commandefourndet, status, comment, eatby, sellby, batch) VALUES"; + $sql .= " ('".$this->id."','".$product."','".$qty."',".($entrepot > 0 ? "'".$entrepot."'" : "null").",'".$user->id."','".$this->db->idate($now)."','".$fk_commandefourndet."', ".$dispatchstatus.", '".$this->db->escape($comment)."', "; + $sql .= ($eatby ? "'".$this->db->idate($eatby)."'" : "null").", ".($sellby ? "'".$this->db->idate($sellby)."'" : "null").", ".($batch ? "'".$this->db->escape($batch)."'" : "null"); + $sql .= ")"; - dol_syslog(get_class($this)."::dispatchProduct", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - if (!$notrigger) - { - global $conf, $langs, $user; + dol_syslog(get_class($this)."::dispatchProduct", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + if (!$notrigger) + { + global $conf, $langs, $user; // Call trigger $result = $this->call_trigger('LINEORDER_SUPPLIER_DISPATCH', $user); if ($result < 0) - { - $error++; - } + { + $error++; + } // End call triggers - } - } - else + } + } else { + $this->error = $this->db->lasterror(); + $error++; + } + + // If module stock is enabled and the stock increase is done on purchase order dispatching + if (!$error && $entrepot > 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) { - $this->error = $this->db->lasterror(); - $error++; - } - - // If module stock is enabled and the stock increase is done on purchase order dispatching - if (!$error && $entrepot > 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) - { - $mouv = new MouvementStock($this->db); - if ($product > 0) - { - // $price should take into account discount (except if option STOCK_EXCLUDE_DISCOUNT_FOR_PMP is on) - $mouv->origin = &$this; + $mouv = new MouvementStock($this->db); + if ($product > 0) + { + // $price should take into account discount (except if option STOCK_EXCLUDE_DISCOUNT_FOR_PMP is on) + $mouv->origin = &$this; $result = $mouv->reception($user, $product, $entrepot, $qty, $price, $comment, $eatby, $sellby, $batch); - if ($result < 0) - { - $this->error = $mouv->error; - $this->errors = $mouv->errors; - dol_syslog(get_class($this)."::dispatchProduct ".$this->error." ".join(',', $this->errors), LOG_ERR); - $error++; - } - } - } + if ($result < 0) + { + $this->error = $mouv->error; + $this->errors = $mouv->errors; + dol_syslog(get_class($this)."::dispatchProduct ".$this->error." ".join(',', $this->errors), LOG_ERR); + $error++; + } + } + } - if ($error == 0) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else + if ($error == 0) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->error = 'BadStatusForObject'; + return -2; + } + } + + /** + * Delete line + * + * @param int $idline Id of line to delete + * @param int $notrigger 1=Disable call to triggers + * @return int <0 if KO, >0 if OK + */ + public function deleteline($idline, $notrigger = 0) + { + if ($this->statut == 0) { - $this->error = 'BadStatusForObject'; - return -2; - } - } + $line = new CommandeFournisseurLigne($this->db); - /** - * Delete line - * - * @param int $idline Id of line to delete - * @param int $notrigger 1=Disable call to triggers - * @return int <0 if KO, >0 if OK - */ - public function deleteline($idline, $notrigger = 0) - { - if ($this->statut == 0) - { - $line = new CommandeFournisseurLigne($this->db); + if ($line->fetch($idline) <= 0) + { + return 0; + } - if ($line->fetch($idline) <= 0) - { - return 0; - } + if ($line->delete($notrigger) > 0) + { + $this->update_price(); + return 1; + } else { + $this->error = $line->error; + $this->errors = $line->errors; + return -1; + } + } else { + return -2; + } + } - if ($line->delete($notrigger) > 0) - { - $this->update_price(); - return 1; - } - else - { - $this->error = $line->error; - $this->errors = $line->errors; - return -1; - } - } - else - { - return -2; - } - } + /** + * Delete an order + * + * @param User $user Object user + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = 0) + { + global $langs, $conf; + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - /** - * Delete an order - * - * @param User $user Object user - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 if KO, >0 if OK - */ - public function delete(User $user, $notrigger = 0) - { - global $langs, $conf; - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + $error = 0; - $error = 0; + $this->db->begin(); - $this->db->begin(); + if (empty($notrigger)) + { + // Call trigger + $result = $this->call_trigger('ORDER_SUPPLIER_DELETE', $user); + if ($result < 0) + { + $this->errors[] = 'ErrorWhenRunningTrigger'; + dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); + $this->db->rollback(); + return -1; + } + // End call triggers + } - if (empty($notrigger)) - { - // Call trigger - $result = $this->call_trigger('ORDER_SUPPLIER_DELETE', $user); - if ($result < 0) - { - $this->errors[] = 'ErrorWhenRunningTrigger'; - dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); - $this->db->rollback(); - return -1; - } - // End call triggers - } + $main = MAIN_DB_PREFIX.'commande_fournisseurdet'; + $ef = $main."_extrafields"; + $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = ".$this->id.")"; + dol_syslog(get_class($this)."::delete extrafields lines", LOG_DEBUG); + if (!$this->db->query($sql)) + { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $error++; + } - $main = MAIN_DB_PREFIX.'commande_fournisseurdet'; - $ef = $main."_extrafields"; - $sql = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_commande = ".$this->id.")"; - dol_syslog(get_class($this)."::delete extrafields lines", LOG_DEBUG); - if (!$this->db->query($sql)) - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - $error++; - } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande =".$this->id; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + if (!$this->db->query($sql)) + { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $error++; + } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseurdet WHERE fk_commande =".$this->id; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - if (!$this->db->query($sql)) - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - $error++; - } + $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur WHERE rowid =".$this->id; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + if ($resql = $this->db->query($sql)) + { + if ($this->db->affected_rows($resql) < 1) + { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $error++; + } + } else { + $this->error = $this->db->lasterror(); + $this->errors[] = $this->db->lasterror(); + $error++; + } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."commande_fournisseur WHERE rowid =".$this->id; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - if ($resql = $this->db->query($sql)) - { - if ($this->db->affected_rows($resql) < 1) - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - $error++; - } - } - else - { - $this->error = $this->db->lasterror(); - $this->errors[] = $this->db->lasterror(); - $error++; - } - - // Remove extrafields - if (!$error) - { - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $this->error = 'FailToDeleteExtraFields'; - $this->errors[] = 'FailToDeleteExtraFields'; - $error++; - dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); - } - } + // Remove extrafields + if (!$error) + { + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $this->error = 'FailToDeleteExtraFields'; + $this->errors[] = 'FailToDeleteExtraFields'; + $error++; + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); + } + } // Delete linked object - $res = $this->deleteObjectLinked(); - if ($res < 0) { - $this->error = 'FailToDeleteObjectLinked'; - $this->errors[] = 'FailToDeleteObjectLinked'; - $error++; - } + $res = $this->deleteObjectLinked(); + if ($res < 0) { + $this->error = 'FailToDeleteObjectLinked'; + $this->errors[] = 'FailToDeleteObjectLinked'; + $error++; + } - if (!$error) - { + if (!$error) + { // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive $this->deleteEcmFiles(); - // We remove directory - $ref = dol_sanitizeFileName($this->ref); - if ($conf->fournisseur->commande->dir_output) - { - $dir = $conf->fournisseur->commande->dir_output."/".$ref; - $file = $dir."/".$ref.".pdf"; - if (file_exists($file)) - { - if (!dol_delete_file($file, 0, 0, 0, $this)) // For triggers - { - $this->error = 'ErrorFailToDeleteFile'; - $this->errors[] = 'ErrorFailToDeleteFile'; - $error++; - } - } - if (file_exists($dir)) - { - $res = @dol_delete_dir_recursive($dir); - if (!$res) - { - $this->error = 'ErrorFailToDeleteDir'; - $this->errors[] = 'ErrorFailToDeleteDir'; - $error++; - } - } - } - } + // We remove directory + $ref = dol_sanitizeFileName($this->ref); + if ($conf->fournisseur->commande->dir_output) + { + $dir = $conf->fournisseur->commande->dir_output."/".$ref; + $file = $dir."/".$ref.".pdf"; + if (file_exists($file)) + { + if (!dol_delete_file($file, 0, 0, 0, $this)) // For triggers + { + $this->error = 'ErrorFailToDeleteFile'; + $this->errors[] = 'ErrorFailToDeleteFile'; + $error++; + } + } + if (file_exists($dir)) + { + $res = @dol_delete_dir_recursive($dir); + if (!$res) + { + $this->error = 'ErrorFailToDeleteDir'; + $this->errors[] = 'ErrorFailToDeleteDir'; + $error++; + } + } + } + } if (!$error) { dol_syslog(get_class($this)."::delete $this->id by $user->id", LOG_DEBUG); $this->db->commit(); return 1; - } - else - { + } else { dol_syslog(get_class($this)."::delete ".$this->error, LOG_ERR); $this->db->rollback(); return -$error; } - } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Get list of order methods - * - * @return int 0 if OK, <0 if KO - */ - public function get_methodes_commande() - { - // phpcs:enable - $sql = "SELECT rowid, libelle"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_input_method"; - $sql .= " WHERE active = 1"; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Get list of order methods + * + * @return int 0 if OK, <0 if KO + */ + public function get_methodes_commande() + { + // phpcs:enable + $sql = "SELECT rowid, libelle"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_input_method"; + $sql .= " WHERE active = 1"; - $resql = $this->db->query($sql); - if ($resql) - { - $i = 0; - $num = $this->db->num_rows($resql); - $this->methodes_commande = array(); - while ($i < $num) - { - $row = $this->db->fetch_row($resql); + $resql = $this->db->query($sql); + if ($resql) + { + $i = 0; + $num = $this->db->num_rows($resql); + $this->methodes_commande = array(); + while ($i < $num) + { + $row = $this->db->fetch_row($resql); - $this->methodes_commande[$row[0]] = $row[1]; + $this->methodes_commande[$row[0]] = $row[1]; - $i++; - } - return 0; - } - else - { - return -1; - } - } + $i++; + } + return 0; + } else { + return -1; + } + } - /** + /** * Return array of dispatched lines waiting to be approved for this order - * - * @since 8.0 Return dispatched quantity (qty). + * + * @since 8.0 Return dispatched quantity (qty). * * @param int $status Filter on stats (-1 = no filter, 0 = lines draft to be approved, 1 = approved lines) * @return array Array of lines - */ - public function getDispachedLines($status = -1) - { - $ret = array(); + */ + public function getDispachedLines($status = -1) + { + $ret = array(); - // List of already dispatched lines + // List of already dispatched lines $sql = "SELECT p.ref, p.label,"; $sql .= " e.rowid as warehouse_id, e.ref as entrepot,"; $sql .= " cfd.rowid as dispatchedlineid, cfd.fk_product, cfd.qty, cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status"; @@ -2228,476 +2141,456 @@ class CommandeFournisseur extends CommonOrder $i++; } - } - else dol_print_error($this->db, 'Failed to execute request to get dispatched lines'); + } else dol_print_error($this->db, 'Failed to execute request to get dispatched lines'); return $ret; - } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Set a delivery in database for this supplier order - * - * @param User $user User that input data - * @param integer $date Date of reception - * @param string $type Type of receipt ('tot' = total/done, 'par' = partial, 'nev' = never, 'can' = cancel) - * @param string $comment Comment - * @return int <0 if KO, >0 if OK - */ - public function Livraison($user, $date, $type, $comment) - { - // phpcs:enable - global $conf, $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Set a delivery in database for this supplier order + * + * @param User $user User that input data + * @param integer $date Date of reception + * @param string $type Type of receipt ('tot' = total/done, 'par' = partial, 'nev' = never, 'can' = cancel) + * @param string $comment Comment + * @return int <0 if KO, >0 if OK + */ + public function Livraison($user, $date, $type, $comment) + { + // phpcs:enable + global $conf, $langs; - $result = 0; + $result = 0; $error = 0; - dol_syslog(get_class($this)."::Livraison"); + dol_syslog(get_class($this)."::Livraison"); - if ($user->rights->fournisseur->commande->receptionner) - { - // Define the new status - if ($type == 'par') $statut = self::STATUS_RECEIVED_PARTIALLY; - elseif ($type == 'tot') $statut = self::STATUS_RECEIVED_COMPLETELY; - elseif ($type == 'nev') $statut = self::STATUS_CANCELED_AFTER_ORDER; - elseif ($type == 'can') $statut = self::STATUS_CANCELED_AFTER_ORDER; + if ($user->rights->fournisseur->commande->receptionner) + { + // Define the new status + if ($type == 'par') $statut = self::STATUS_RECEIVED_PARTIALLY; + elseif ($type == 'tot') $statut = self::STATUS_RECEIVED_COMPLETELY; + elseif ($type == 'nev') $statut = self::STATUS_CANCELED_AFTER_ORDER; + elseif ($type == 'can') $statut = self::STATUS_CANCELED_AFTER_ORDER; else { - $error++; - dol_syslog(get_class($this)."::Livraison Error -2", LOG_ERR); - return -2; + $error++; + dol_syslog(get_class($this)."::Livraison Error -2", LOG_ERR); + return -2; } - // Some checks to accept the record - if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) - { + // Some checks to accept the record + if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) + { // If option SUPPLIER_ORDER_USE_DISPATCH_STATUS is on, we check all reception are approved to allow status "total/done" - if (!$error && ($type == 'tot')) - { - $dispatchedlinearray = $this->getDispachedLines(0); - if (count($dispatchedlinearray) > 0) - { - $result = -1; - $error++; - $this->errors[] = 'ErrorCantSetReceptionToTotalDoneWithReceptionToApprove'; - dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionToApprove', LOG_DEBUG); - } - } - if (!$error && !empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS_NEED_APPROVE) && ($type == 'tot')) // Accept to move to reception done, only if status of all line are ok (refuse denied) - { - $dispatcheddenied = $this->getDispachedLines(2); - if (count($dispatchedlinearray) > 0) - { - $result = -1; - $error++; - $this->errors[] = 'ErrorCantSetReceptionToTotalDoneWithReceptionDenied'; - dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionDenied', LOG_DEBUG); - } - } - } + if (!$error && ($type == 'tot')) + { + $dispatchedlinearray = $this->getDispachedLines(0); + if (count($dispatchedlinearray) > 0) + { + $result = -1; + $error++; + $this->errors[] = 'ErrorCantSetReceptionToTotalDoneWithReceptionToApprove'; + dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionToApprove', LOG_DEBUG); + } + } + if (!$error && !empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS_NEED_APPROVE) && ($type == 'tot')) // Accept to move to reception done, only if status of all line are ok (refuse denied) + { + $dispatcheddenied = $this->getDispachedLines(2); + if (count($dispatchedlinearray) > 0) + { + $result = -1; + $error++; + $this->errors[] = 'ErrorCantSetReceptionToTotalDoneWithReceptionDenied'; + dol_syslog('ErrorCantSetReceptionToTotalDoneWithReceptionDenied', LOG_DEBUG); + } + } + } - // TODO LDR01 Add a control test to accept only if ALL predefined products are received (same qty). + // TODO LDR01 Add a control test to accept only if ALL predefined products are received (same qty). - if (!$error) - { - $this->db->begin(); + if (!$error) + { + $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " SET fk_statut = ".$statut; - $sql .= " WHERE rowid = ".$this->id; - $sql .= " AND fk_statut IN (".self::STATUS_ORDERSENT.",".self::STATUS_RECEIVED_PARTIALLY.")"; // Process running or Partially received + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; + $sql .= " SET fk_statut = ".$statut; + $sql .= " WHERE rowid = ".$this->id; + $sql .= " AND fk_statut IN (".self::STATUS_ORDERSENT.",".self::STATUS_RECEIVED_PARTIALLY.")"; // Process running or Partially received - dol_syslog(get_class($this)."::Livraison", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $result = 0; - $old_statut = $this->statut; - $this->statut = $statut; + dol_syslog(get_class($this)."::Livraison", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $result = 0; + $old_statut = $this->statut; + $this->statut = $statut; $this->actionmsg2 = $comment; - // Call trigger - $result = $this->call_trigger('ORDER_SUPPLIER_RECEIVE', $user); - if ($result < 0) $error++; - // End call triggers + // Call trigger + $result = $this->call_trigger('ORDER_SUPPLIER_RECEIVE', $user); + if ($result < 0) $error++; + // End call triggers - if (!$error) - { - $this->db->commit(); - } - else - { - $this->statut = $old_statut; - $this->db->rollback(); - $this->error = $this->db->lasterror(); - $result = -1; - } - } - else - { - $this->db->rollback(); - $this->error = $this->db->lasterror(); - $result = -1; - } - } - } - else - { - $this->error = $langs->trans('NotAuthorized'); - $this->errors[] = $langs->trans('NotAuthorized'); - dol_syslog(get_class($this)."::Livraison Not Authorized"); - $result = -3; - } - return $result; - } + if (!$error) + { + $this->db->commit(); + } else { + $this->statut = $old_statut; + $this->db->rollback(); + $this->error = $this->db->lasterror(); + $result = -1; + } + } else { + $this->db->rollback(); + $this->error = $this->db->lasterror(); + $result = -1; + } + } + } else { + $this->error = $langs->trans('NotAuthorized'); + $this->errors[] = $langs->trans('NotAuthorized'); + dol_syslog(get_class($this)."::Livraison Not Authorized"); + $result = -3; + } + return $result; + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Set the planned delivery date - * - * @param User $user Objet user making change - * @param integer $date_livraison Planned delivery date - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 if KO, >0 if OK - */ - public function set_date_livraison($user, $date_livraison, $notrigger = 0) - { - // phpcs:enable - if ($user->rights->fournisseur->commande->creer) - { - $error = 0; - - $this->db->begin(); - - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " SET date_livraison = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null'); - $sql .= " WHERE rowid = ".$this->id; - - dol_syslog(__METHOD__, LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) - { - $this->errors[] = $this->db->error(); - $error++; - } - - if (!$error) - { - $this->oldcopy = clone $this; - $this->date_livraison = $date_livraison; - } - - if (!$notrigger && empty($error)) - { - // Call trigger - $result = $this->call_trigger('ORDER_SUPPLIER_MODIFY', $user); - if ($result < 0) $error++; - // End call triggers - } - - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - foreach ($this->errors as $errmsg) - { - dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - } - else - { - return -2; - } - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Set the id projet - * - * @param User $user Objet utilisateur qui modifie - * @param int $id_projet Date de livraison - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 si ko, >0 si ok - */ - public function set_id_projet($user, $id_projet, $notrigger = 0) - { - // phpcs:enable - if ($user->rights->fournisseur->commande->creer) - { - $error = 0; + * Set the planned delivery date + * + * @param User $user Objet user making change + * @param integer $date_livraison Planned delivery date + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + public function set_date_livraison($user, $date_livraison, $notrigger = 0) + { + // phpcs:enable + if ($user->rights->fournisseur->commande->creer) + { + $error = 0; - $this->db->begin(); + $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; - $sql .= " SET fk_projet = ".($id_projet > 0 ? (int) $id_projet : 'null'); - $sql .= " WHERE rowid = ".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; + $sql .= " SET date_livraison = ".($date_livraison ? "'".$this->db->idate($date_livraison)."'" : 'null'); + $sql .= " WHERE rowid = ".$this->id; - dol_syslog(__METHOD__, LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) - { - $this->errors[] = $this->db->error(); - $error++; - } + dol_syslog(__METHOD__, LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) + { + $this->errors[] = $this->db->error(); + $error++; + } - if (!$error) - { - $this->oldcopy = clone $this; - $this->fk_projet = $id_projet; - $this->fk_project = $id_projet; - } + if (!$error) + { + $this->oldcopy = clone $this; + $this->date_livraison = $date_livraison; + } - if (!$notrigger && empty($error)) - { - // Call trigger - $result = $this->call_trigger('ORDER_SUPPLIER_MODIFY', $user); - if ($result < 0) $error++; - // End call triggers - } + if (!$notrigger && empty($error)) + { + // Call trigger + $result = $this->call_trigger('ORDER_SUPPLIER_MODIFY', $user); + if ($result < 0) $error++; + // End call triggers + } - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - foreach ($this->errors as $errmsg) - { - dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - } - else - { - return -2; - } - } + if (!$error) + { + $this->db->commit(); + return 1; + } else { + foreach ($this->errors as $errmsg) + { + dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } + } else { + return -2; + } + } - /** - * Update a supplier order from a customer order - * - * @param User $user User that create - * @param int $idc Id of supplier order to update - * @param int $comclientid Id of customer order to use as template - * @return int <0 if KO, >0 if OK - */ - public function updateFromCommandeClient($user, $idc, $comclientid) - { - $comclient = new Commande($this->db); - $comclient->fetch($comclientid); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Set the id projet + * + * @param User $user Objet utilisateur qui modifie + * @param int $id_projet Date de livraison + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 si ko, >0 si ok + */ + public function set_id_projet($user, $id_projet, $notrigger = 0) + { + // phpcs:enable + if ($user->rights->fournisseur->commande->creer) + { + $error = 0; - $this->id = $idc; + $this->db->begin(); - $this->lines = array(); + $sql = "UPDATE ".MAIN_DB_PREFIX."commande_fournisseur"; + $sql .= " SET fk_projet = ".($id_projet > 0 ? (int) $id_projet : 'null'); + $sql .= " WHERE rowid = ".$this->id; - $num = count($comclient->lines); - for ($i = 0; $i < $num; $i++) - { - $prod = new Product($this->db); - $label = ''; - $ref = ''; - if ($prod->fetch($comclient->lines[$i]->fk_product) > 0) - { - $label = $prod->label; - $ref = $prod->ref; - } + dol_syslog(__METHOD__, LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) + { + $this->errors[] = $this->db->error(); + $error++; + } - $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet"; - $sql .= " (fk_commande, label, description, fk_product, price, qty, tva_tx, localtax1_tx, localtax2_tx, remise_percent, subprice, remise, ref)"; - $sql .= " VALUES (".$idc.", '".$this->db->escape($label)."','".$this->db->escape($comclient->lines[$i]->desc)."'"; - $sql .= ",".$comclient->lines[$i]->fk_product.",'".price2num($comclient->lines[$i]->price)."'"; - $sql .= ", '".$comclient->lines[$i]->qty."', ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->localtax1_tx.", ".$comclient->lines[$i]->localtax2_tx.", ".$comclient->lines[$i]->remise_percent; - $sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0','".$ref."');"; - if ($this->db->query($sql)) - { - $this->update_price(); - } - } + if (!$error) + { + $this->oldcopy = clone $this; + $this->fk_projet = $id_projet; + $this->fk_project = $id_projet; + } - return 1; - } + if (!$notrigger && empty($error)) + { + // Call trigger + $result = $this->call_trigger('ORDER_SUPPLIER_MODIFY', $user); + if ($result < 0) $error++; + // End call triggers + } - /** - * Tag order with a particular status - * - * @param User $user Object user that change status - * @param int $status New status - * @return int <0 if KO, >0 if OK - */ - public function setStatus($user, $status) - { - global $conf, $langs; - $error = 0; + if (!$error) + { + $this->db->commit(); + return 1; + } else { + foreach ($this->errors as $errmsg) + { + dol_syslog(__METHOD__.' Error: '.$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } + } else { + return -2; + } + } - $this->db->begin(); + /** + * Update a supplier order from a customer order + * + * @param User $user User that create + * @param int $idc Id of supplier order to update + * @param int $comclientid Id of customer order to use as template + * @return int <0 if KO, >0 if OK + */ + public function updateFromCommandeClient($user, $idc, $comclientid) + { + $comclient = new Commande($this->db); + $comclient->fetch($comclientid); - $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur'; - $sql .= ' SET fk_statut='.$status; - $sql .= ' WHERE rowid = '.$this->id; + $this->id = $idc; - dol_syslog(get_class($this)."::setStatus", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - // Trigger names for each status - $triggerName = array(); - $triggerName[0] = 'DRAFT'; - $triggerName[1] = 'VALIDATED'; - $triggerName[2] = 'APPROVED'; - $triggerName[3] = 'ORDERED'; // Ordered - $triggerName[4] = 'RECEIVED_PARTIALLY'; - $triggerName[5] = 'RECEIVED_COMPLETELY'; - $triggerName[6] = 'CANCELED'; - $triggerName[7] = 'CANCELED'; - $triggerName[9] = 'REFUSED'; + $this->lines = array(); - // Call trigger - $result = $this->call_trigger("ORDER_SUPPLIER_STATUS_".$triggerName[$status], $user); - if ($result < 0) { $error++; } - // End call triggers - } - else - { - $error++; - $this->error = $this->db->lasterror(); - dol_syslog(get_class($this)."::setStatus ".$this->error); - } + $num = count($comclient->lines); + for ($i = 0; $i < $num; $i++) + { + $prod = new Product($this->db); + $label = ''; + $ref = ''; + if ($prod->fetch($comclient->lines[$i]->fk_product) > 0) + { + $label = $prod->label; + $ref = $prod->ref; + } - if (!$error) - { - $this->statut = $status; - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } + $sql = "INSERT INTO ".MAIN_DB_PREFIX."commande_fournisseurdet"; + $sql .= " (fk_commande, label, description, fk_product, price, qty, tva_tx, localtax1_tx, localtax2_tx, remise_percent, subprice, remise, ref)"; + $sql .= " VALUES (".$idc.", '".$this->db->escape($label)."', ".$this->db->escape($comclient->lines[$i]->desc); + $sql .= ",".$comclient->lines[$i]->fk_product.", ".price2num($comclient->lines[$i]->price); + $sql .= ", ".$comclient->lines[$i]->qty.", ".$comclient->lines[$i]->tva_tx.", ".$comclient->lines[$i]->localtax1_tx.", ".$comclient->lines[$i]->localtax2_tx.", ".$comclient->lines[$i]->remise_percent; + $sql .= ", '".price2num($comclient->lines[$i]->subprice)."','0', '".$this->db->escape($ref)."');"; + if ($this->db->query($sql)) + { + $this->update_price(); + } + } - /** - * Update line - * - * @param int $rowid Id de la ligne de facture - * @param string $desc Description de la ligne - * @param double $pu Prix unitaire - * @param double $qty Quantity - * @param double $remise_percent Percent discount on line - * @param double $txtva VAT rate - * @param double $txlocaltax1 Localtax1 tax - * @param double $txlocaltax2 Localtax2 tax - * @param double $price_base_type Type of price base - * @param int $info_bits Miscellaneous informations - * @param int $type Type of line (0=product, 1=service) - * @param int $notrigger Disable triggers - * @param integer $date_start Date start of service - * @param integer $date_end Date end of service + return 1; + } + + /** + * Tag order with a particular status + * + * @param User $user Object user that change status + * @param int $status New status + * @return int <0 if KO, >0 if OK + */ + public function setStatus($user, $status) + { + global $conf, $langs; + $error = 0; + + $this->db->begin(); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur'; + $sql .= ' SET fk_statut='.$status; + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setStatus", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + // Trigger names for each status + $triggerName = array(); + $triggerName[0] = 'DRAFT'; + $triggerName[1] = 'VALIDATED'; + $triggerName[2] = 'APPROVED'; + $triggerName[3] = 'ORDERED'; // Ordered + $triggerName[4] = 'RECEIVED_PARTIALLY'; + $triggerName[5] = 'RECEIVED_COMPLETELY'; + $triggerName[6] = 'CANCELED'; + $triggerName[7] = 'CANCELED'; + $triggerName[9] = 'REFUSED'; + + // Call trigger + $result = $this->call_trigger("ORDER_SUPPLIER_STATUS_".$triggerName[$status], $user); + if ($result < 0) { $error++; } + // End call triggers + } else { + $error++; + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this)."::setStatus ".$this->error); + } + + if (!$error) + { + $this->statut = $status; + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Update line + * + * @param int $rowid Id de la ligne de facture + * @param string $desc Description de la ligne + * @param double $pu Prix unitaire + * @param double $qty Quantity + * @param double $remise_percent Percent discount on line + * @param double $txtva VAT rate + * @param double $txlocaltax1 Localtax1 tax + * @param double $txlocaltax2 Localtax2 tax + * @param double $price_base_type Type of price base + * @param int $info_bits Miscellaneous informations + * @param int $type Type of line (0=product, 1=service) + * @param int $notrigger Disable triggers + * @param integer $date_start Date start of service + * @param integer $date_end Date end of service * @param array $array_options Extrafields array - * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Unit price in currency * @param string $ref_supplier Supplier ref - * @return int < 0 if error, > 0 if ok - */ - public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $notrigger = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') - { - global $mysoc, $conf, $langs; - dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $type, $fk_unit"); - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + * @return int < 0 if error, > 0 if ok + */ + public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $notrigger = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') + { + global $mysoc, $conf, $langs; + dol_syslog(get_class($this)."::updateline $rowid, $desc, $pu, $qty, $remise_percent, $txtva, $price_base_type, $info_bits, $type, $fk_unit"); + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - $error = 0; + $error = 0; - if ($this->brouillon) - { - // Clean parameters - if (empty($qty)) $qty = 0; - if (empty($info_bits)) $info_bits = 0; - if (empty($txtva)) $txtva = 0; - if (empty($txlocaltax1)) $txlocaltax1 = 0; - if (empty($txlocaltax2)) $txlocaltax2 = 0; - if (empty($remise)) $remise = 0; - if (empty($remise_percent)) $remise_percent = 0; + if ($this->brouillon) + { + // Clean parameters + if (empty($qty)) $qty = 0; + if (empty($info_bits)) $info_bits = 0; + if (empty($txtva)) $txtva = 0; + if (empty($txlocaltax1)) $txlocaltax1 = 0; + if (empty($txlocaltax2)) $txlocaltax2 = 0; + if (empty($remise)) $remise = 0; + if (empty($remise_percent)) $remise_percent = 0; - $remise_percent = price2num($remise_percent); - $qty = price2num($qty); - if (!$qty) $qty = 1; - $pu = price2num($pu); - $pu_ht_devise = price2num($pu_ht_devise); - $txtva = price2num($txtva); - $txlocaltax1 = price2num($txlocaltax1); - $txlocaltax2 = price2num($txlocaltax2); + $remise_percent = price2num($remise_percent); + $qty = price2num($qty); + $pu = price2num($pu); + $pu_ht_devise = price2num($pu_ht_devise); + $txtva = price2num($txtva); + $txlocaltax1 = price2num($txlocaltax1); + $txlocaltax2 = price2num($txlocaltax2); - // Check parameters - if ($type < 0) return -1; - if ($date_start && $date_end && $date_start > $date_end) { - $langs->load("errors"); - $this->error = $langs->trans('ErrorStartDateGreaterEnd'); - return -1; - } + // Check parameters + if ($type < 0) return -1; + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } - $this->db->begin(); + $this->db->begin(); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); + $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); - // Clean vat code - $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { - $vat_src_code = $reg[1]; - $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. - } + // Clean vat code + $vat_src_code = ''; + if (preg_match('/\((.*)\)/', $txtva, $reg)) + { + $vat_src_code = $reg[1]; + $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. + } - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + $total_localtax1 = $tabprice[9]; + $total_localtax2 = $tabprice[10]; $pu_ht = $tabprice[3]; $pu_tva = $tabprice[4]; $pu_ttc = $tabprice[5]; // MultiCurrency $multicurrency_total_ht = $tabprice[16]; - $multicurrency_total_tva = $tabprice[17]; - $multicurrency_total_ttc = $tabprice[18]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; - $localtax1_type = $localtaxes_type[0]; + $localtax1_type = $localtaxes_type[0]; $localtax2_type = $localtaxes_type[2]; - $subprice = price2num($pu_ht, 'MU'); + $subprice = price2num($pu_ht, 'MU'); - //Fetch current line from the database and then clone the object and set it in $oldline property - $this->line = new CommandeFournisseurLigne($this->db); - $this->line->fetch($rowid); - $this->line->fetch_optionals(); + //Fetch current line from the database and then clone the object and set it in $oldline property + $this->line = new CommandeFournisseurLigne($this->db); + $this->line->fetch($rowid); + $this->line->fetch_optionals(); - $oldline = clone $this->line; - $this->line->oldline = $oldline; + $oldline = clone $this->line; + $this->line->oldline = $oldline; - $this->line->context = $this->context; + $this->line->context = $this->context; - $this->line->fk_commande = $this->id; - //$this->line->label=$label; - $this->line->desc = $desc; + $this->line->fk_commande = $this->id; + //$this->line->label=$label; + $this->line->desc = $desc; // redefine quantity according to packaging if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) @@ -2705,9 +2598,7 @@ class CommandeFournisseur extends CommonOrder if ($qty < $this->line->packaging) { $qty = $this->line->packaging; - } - else - { + } else { if (($qty % $this->line->packaging) > 0) { $coeff = intval($qty / $this->line->packaging) + 1; @@ -2717,359 +2608,345 @@ class CommandeFournisseur extends CommonOrder } } - $this->line->qty = $qty; + $this->line->qty = $qty; $this->line->ref_supplier = $ref_supplier; - $this->line->vat_src_code = $vat_src_code; - $this->line->tva_tx = $txtva; - $this->line->localtax1_tx = $txlocaltax1; - $this->line->localtax2_tx = $txlocaltax2; - $this->line->localtax1_type = $localtaxes_type[0]; - $this->line->localtax2_type = $localtaxes_type[2]; - $this->line->remise_percent = $remise_percent; - $this->line->subprice = $pu_ht; - $this->line->rang = $this->rang; - $this->line->info_bits = $info_bits; - $this->line->total_ht = $total_ht; - $this->line->total_tva = $total_tva; - $this->line->total_localtax1 = $total_localtax1; - $this->line->total_localtax2 = $total_localtax2; - $this->line->total_ttc = $total_ttc; - $this->line->product_type = $type; - $this->line->special_code = $this->special_code; - $this->line->origin = $this->origin; - $this->line->fk_unit = $fk_unit; + $this->line->vat_src_code = $vat_src_code; + $this->line->tva_tx = $txtva; + $this->line->localtax1_tx = $txlocaltax1; + $this->line->localtax2_tx = $txlocaltax2; + $this->line->localtax1_type = $localtaxes_type[0]; + $this->line->localtax2_type = $localtaxes_type[2]; + $this->line->remise_percent = $remise_percent; + $this->line->subprice = $pu_ht; + $this->line->rang = $this->rang; + $this->line->info_bits = $info_bits; + $this->line->total_ht = $total_ht; + $this->line->total_tva = $total_tva; + $this->line->total_localtax1 = $total_localtax1; + $this->line->total_localtax2 = $total_localtax2; + $this->line->total_ttc = $total_ttc; + $this->line->product_type = $type; + $this->line->special_code = $this->special_code; + $this->line->origin = $this->origin; + $this->line->fk_unit = $fk_unit; - $this->line->date_start = $date_start; - $this->line->date_end = $date_end; + $this->line->date_start = $date_start; + $this->line->date_end = $date_end; - // Multicurrency - $this->line->fk_multicurrency = $this->fk_multicurrency; - $this->line->multicurrency_code = $this->multicurrency_code; - $this->line->multicurrency_subprice = $pu_ht_devise; - $this->line->multicurrency_total_ht = $multicurrency_total_ht; - $this->line->multicurrency_total_tva = $multicurrency_total_tva; - $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; + // Multicurrency + $this->line->fk_multicurrency = $this->fk_multicurrency; + $this->line->multicurrency_code = $this->multicurrency_code; + $this->line->multicurrency_subprice = $pu_ht_devise; + $this->line->multicurrency_total_ht = $multicurrency_total_ht; + $this->line->multicurrency_total_tva = $multicurrency_total_tva; + $this->line->multicurrency_total_ttc = $multicurrency_total_ttc; - $this->line->subprice = $pu_ht; - $this->line->price = $this->line->subprice; + $this->line->subprice = $pu_ht; + $this->line->price = $this->line->subprice; - $this->line->remise_percent = $remise_percent; + $this->line->remise_percent = $remise_percent; - if (is_array($array_options) && count($array_options) > 0) { - // We replace values in this->line->array_options only for entries defined into $array_options - foreach ($array_options as $key => $value) { - $this->line->array_options[$key] = $array_options[$key]; - } - } + if (is_array($array_options) && count($array_options) > 0) { + // We replace values in this->line->array_options only for entries defined into $array_options + foreach ($array_options as $key => $value) { + $this->line->array_options[$key] = $array_options[$key]; + } + } - $result = $this->line->update($notrigger); + $result = $this->line->update($notrigger); - // Mise a jour info denormalisees au niveau facture - if ($result >= 0) - { - $this->update_price('', 'auto'); + // Mise a jour info denormalisees au niveau facture + if ($result >= 0) + { + $this->update_price('', 'auto'); $this->db->commit(); return $result; - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -1; - } - } - else - { - $this->error = "Order status makes operation forbidden"; - dol_syslog(get_class($this)."::updateline ".$this->error, LOG_ERR); - return -2; - } - } + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } else { + $this->error = "Order status makes operation forbidden"; + dol_syslog(get_class($this)."::updateline ".$this->error, LOG_ERR); + return -2; + } + } - /** - * Initialise an instance with random values. - * Used to build previews or test instances. - * id must be 0 if object instance is a specimen. - * - * @return void - */ - public function initAsSpecimen() - { - global $user, $langs, $conf; + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @return void + */ + public function initAsSpecimen() + { + global $user, $langs, $conf; - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; - dol_syslog(get_class($this)."::initAsSpecimen"); + dol_syslog(get_class($this)."::initAsSpecimen"); - $now = dol_now(); + $now = dol_now(); - // Find first product - $prodid = 0; - $product = new ProductFournisseur($this->db); - $sql = "SELECT rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."product"; - $sql .= " WHERE entity IN (".getEntity('product').")"; - $sql .= $this->db->order("rowid", "ASC"); - $sql .= $this->db->plimit(1); - $resql = $this->db->query($sql); - if ($resql) - { - $obj = $this->db->fetch_object($resql); - $prodid = $obj->rowid; - } + // Find first product + $prodid = 0; + $product = new ProductFournisseur($this->db); + $sql = "SELECT rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."product"; + $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->order("rowid", "ASC"); + $sql .= $this->db->plimit(1); + $resql = $this->db->query($sql); + if ($resql) + { + $obj = $this->db->fetch_object($resql); + $prodid = $obj->rowid; + } - // Initialise parametres - $this->id = 0; - $this->ref = 'SPECIMEN'; - $this->specimen = 1; - $this->socid = 1; - $this->date = $now; - $this->date_commande = $now; - $this->date_lim_reglement = $this->date + 3600 * 24 * 30; - $this->cond_reglement_code = 'RECEP'; - $this->mode_reglement_code = 'CHQ'; + // Initialise parametres + $this->id = 0; + $this->ref = 'SPECIMEN'; + $this->specimen = 1; + $this->socid = 1; + $this->date = $now; + $this->date_commande = $now; + $this->date_lim_reglement = $this->date + 3600 * 24 * 30; + $this->cond_reglement_code = 'RECEP'; + $this->mode_reglement_code = 'CHQ'; - $this->note_public = 'This is a comment (public)'; - $this->note_private = 'This is a comment (private)'; + $this->note_public = 'This is a comment (public)'; + $this->note_private = 'This is a comment (private)'; - $this->multicurrency_tx = 1; - $this->multicurrency_code = $conf->currency; + $this->multicurrency_tx = 1; + $this->multicurrency_code = $conf->currency; - $this->statut = 0; + $this->statut = 0; - // Lines - $nbp = 5; - $xnbp = 0; - while ($xnbp < $nbp) - { - $line = new CommandeFournisseurLigne($this->db); - $line->desc = $langs->trans("Description")." ".$xnbp; - $line->qty = 1; - $line->subprice = 100; - $line->price = 100; - $line->tva_tx = 19.6; - $line->localtax1_tx = 0; - $line->localtax2_tx = 0; - if ($xnbp == 2) - { - $line->total_ht = 50; - $line->total_ttc = 59.8; - $line->total_tva = 9.8; - $line->remise_percent = 50; - } - else - { - $line->total_ht = 100; - $line->total_ttc = 119.6; - $line->total_tva = 19.6; - $line->remise_percent = 00; - } - $line->fk_product = $prodid; + // Lines + $nbp = 5; + $xnbp = 0; + while ($xnbp < $nbp) + { + $line = new CommandeFournisseurLigne($this->db); + $line->desc = $langs->trans("Description")." ".$xnbp; + $line->qty = 1; + $line->subprice = 100; + $line->price = 100; + $line->tva_tx = 19.6; + $line->localtax1_tx = 0; + $line->localtax2_tx = 0; + if ($xnbp == 2) + { + $line->total_ht = 50; + $line->total_ttc = 59.8; + $line->total_tva = 9.8; + $line->remise_percent = 50; + } else { + $line->total_ht = 100; + $line->total_ttc = 119.6; + $line->total_tva = 19.6; + $line->remise_percent = 00; + } + $line->fk_product = $prodid; - $this->lines[$xnbp] = $line; + $this->lines[$xnbp] = $line; - $this->total_ht += $line->total_ht; - $this->total_tva += $line->total_tva; - $this->total_ttc += $line->total_ttc; + $this->total_ht += $line->total_ht; + $this->total_tva += $line->total_tva; + $this->total_ttc += $line->total_ttc; - $xnbp++; - } - } + $xnbp++; + } + } - /** - * Charge les informations d'ordre info dans l'objet facture - * - * @param int $id Id de la facture a charger - * @return void - */ - public function info($id) - { - $sql = 'SELECT c.rowid, date_creation as datec, tms as datem, date_valid as date_validation, date_approve as datea, date_approve2 as datea2,'; - $sql .= ' fk_user_author, fk_user_modif, fk_user_valid, fk_user_approve, fk_user_approve2'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseur as c'; - $sql .= ' WHERE c.rowid = '.$id; + /** + * Charge les informations d'ordre info dans l'objet facture + * + * @param int $id Id de la facture a charger + * @return void + */ + public function info($id) + { + $sql = 'SELECT c.rowid, date_creation as datec, tms as datem, date_valid as date_validation, date_approve as datea, date_approve2 as datea2,'; + $sql .= ' fk_user_author, fk_user_modif, fk_user_valid, fk_user_approve, fk_user_approve2'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseur as c'; + $sql .= ' WHERE c.rowid = '.$id; - $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { - $obj = $this->db->fetch_object($result); - $this->id = $obj->rowid; - if ($obj->fk_user_author) $this->user_creation_id = $obj->fk_user_author; - if ($obj->fk_user_valid) $this->user_validation_id = $obj->fk_user_valid; - if ($obj->fk_user_modif) $this->user_modification_id = $obj->fk_user_modif; - if ($obj->fk_user_approve) $this->user_approve_id = $obj->fk_user_approve; - if ($obj->fk_user_approve2) $this->user_approve_id2 = $obj->fk_user_approve2; + $result = $this->db->query($sql); + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + $this->id = $obj->rowid; + if ($obj->fk_user_author) $this->user_creation_id = $obj->fk_user_author; + if ($obj->fk_user_valid) $this->user_validation_id = $obj->fk_user_valid; + if ($obj->fk_user_modif) $this->user_modification_id = $obj->fk_user_modif; + if ($obj->fk_user_approve) $this->user_approve_id = $obj->fk_user_approve; + if ($obj->fk_user_approve2) $this->user_approve_id2 = $obj->fk_user_approve2; - $this->date_creation = $this->db->idate($obj->datec); - $this->date_modification = $this->db->idate($obj->datem); - $this->date_approve = $this->db->idate($obj->datea); - $this->date_approve2 = $this->db->idate($obj->datea2); - $this->date_validation = $this->db->idate($obj->date_validation); - } - $this->db->free($result); - } - else - { - dol_print_error($this->db); - } - } + $this->date_creation = $this->db->idate($obj->datec); + $this->date_modification = $this->db->idate($obj->datem); + $this->date_approve = $this->db->idate($obj->datea); + $this->date_approve2 = $this->db->idate($obj->datea2); + $this->date_validation = $this->db->idate($obj->date_validation); + } + $this->db->free($result); + } else { + dol_print_error($this->db); + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Charge indicateurs this->nb de tableau de bord - * - * @return int <0 si ko, >0 si ok - */ - public function load_state_board() - { - // phpcs:enable - global $conf, $user; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Charge indicateurs this->nb de tableau de bord + * + * @return int <0 si ko, >0 si ok + */ + public function load_state_board() + { + // phpcs:enable + global $conf, $user; - $this->nb = array(); - $clause = "WHERE"; + $this->nb = array(); + $clause = "WHERE"; - $sql = "SELECT count(co.rowid) as nb"; - $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as co"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON co.fk_soc = s.rowid"; - if (!$user->rights->societe->client->voir && !$user->socid) - { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; - $sql .= " WHERE sc.fk_user = ".$user->id; - $clause = "AND"; - } - $sql .= " ".$clause." co.entity = ".$conf->entity; + $sql = "SELECT count(co.rowid) as nb"; + $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as co"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON co.fk_soc = s.rowid"; + if (!$user->rights->societe->client->voir && !$user->socid) + { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON s.rowid = sc.fk_soc"; + $sql .= " WHERE sc.fk_user = ".$user->id; + $clause = "AND"; + } + $sql .= " ".$clause." co.entity = ".$conf->entity; - $resql = $this->db->query($sql); - if ($resql) - { - while ($obj = $this->db->fetch_object($resql)) - { - $this->nb["supplier_orders"] = $obj->nb; - } - $this->db->free($resql); - return 1; - } - else - { - dol_print_error($this->db); - $this->error = $this->db->error(); - return -1; - } - } + $resql = $this->db->query($sql); + if ($resql) + { + while ($obj = $this->db->fetch_object($resql)) + { + $this->nb["supplier_orders"] = $obj->nb; + } + $this->db->free($resql); + return 1; + } else { + dol_print_error($this->db); + $this->error = $this->db->error(); + return -1; + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Load indicators for dashboard (this->nbtodo and this->nbtodolate) - * - * @param User $user Objet user - * @param int $mode "opened", "awaiting" for orders awaiting reception - * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK - */ - public function load_board($user, $mode = 'opened') - { - // phpcs:enable - global $conf, $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Load indicators for dashboard (this->nbtodo and this->nbtodolate) + * + * @param User $user Objet user + * @param int $mode "opened", "awaiting" for orders awaiting reception + * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK + */ + public function load_board($user, $mode = 'opened') + { + // phpcs:enable + global $conf, $langs; - $clause = " WHERE"; + $clause = " WHERE"; - $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date"; - $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; - if (!$user->rights->societe->client->voir && !$user->socid) - { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON c.fk_soc = sc.fk_soc"; - $sql .= " WHERE sc.fk_user = ".$user->id; - $clause = " AND"; - } - $sql .= $clause." c.entity = ".$conf->entity; - if ($mode === 'awaiting') { - $sql .= " AND c.fk_statut = ".self::STATUS_ORDERSENT; - } - else { - $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; - } - if ($user->socid) $sql .= " AND c.fk_soc = ".$user->socid; + $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date"; + $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseur as c"; + if (!$user->rights->societe->client->voir && !$user->socid) + { + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON c.fk_soc = sc.fk_soc"; + $sql .= " WHERE sc.fk_user = ".$user->id; + $clause = " AND"; + } + $sql .= $clause." c.entity = ".$conf->entity; + if ($mode === 'awaiting') { + $sql .= " AND c.fk_statut = ".self::STATUS_ORDERSENT; + } else { + $sql .= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; + } + if ($user->socid) $sql .= " AND c.fk_soc = ".$user->socid; - $resql = $this->db->query($sql); - if ($resql) - { - $commandestatic = new CommandeFournisseur($this->db); + $resql = $this->db->query($sql); + if ($resql) + { + $commandestatic = new CommandeFournisseur($this->db); - $response = new WorkboardResponse(); - $response->warning_delay = $conf->commande->fournisseur->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("SuppliersOrdersToProcess"); - $response->labelShort = $langs->trans("Opened"); - $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2&mainmenu=commercial&leftmenu=orders_suppliers'; - $response->img = img_object('', "order"); + $response = new WorkboardResponse(); + $response->warning_delay = $conf->commande->fournisseur->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("SuppliersOrdersToProcess"); + $response->labelShort = $langs->trans("Opened"); + $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2&mainmenu=commercial&leftmenu=orders_suppliers'; + $response->img = img_object('', "order"); - if ($mode === 'awaiting') { - $response->label = $langs->trans("SuppliersOrdersAwaitingReception"); - $response->labelShort = $langs->trans("AwaitingReception"); - $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=3&mainmenu=commercial&leftmenu=orders_suppliers'; - } + if ($mode === 'awaiting') { + $response->label = $langs->trans("SuppliersOrdersAwaitingReception"); + $response->labelShort = $langs->trans("AwaitingReception"); + $response->url = DOL_URL_ROOT.'/fourn/commande/list.php?statut=3&mainmenu=commercial&leftmenu=orders_suppliers'; + } - while ($obj = $this->db->fetch_object($resql)) - { - $response->nbtodo++; + while ($obj = $this->db->fetch_object($resql)) + { + $response->nbtodo++; - $commandestatic->date_livraison = $this->db->jdate($obj->delivery_date); - $commandestatic->date_commande = $this->db->jdate($obj->date_commande); - $commandestatic->statut = $obj->fk_statut; + $commandestatic->date_livraison = $this->db->jdate($obj->delivery_date); + $commandestatic->date_commande = $this->db->jdate($obj->date_commande); + $commandestatic->statut = $obj->fk_statut; - if ($commandestatic->hasDelay()) { - $response->nbtodolate++; - } - } + if ($commandestatic->hasDelay()) { + $response->nbtodolate++; + } + } - return $response; - } - else - { - $this->error = $this->db->error(); - return -1; - } - } + return $response; + } else { + $this->error = $this->db->error(); + return -1; + } + } - /** - * Returns the translated input method of object (defined if $this->methode_commande_id > 0). - * This function make a sql request to get translation. No cache yet, try to not use it inside a loop. - * - * @return string - */ - public function getInputMethod() - { - global $db, $langs; + /** + * Returns the translated input method of object (defined if $this->methode_commande_id > 0). + * This function make a sql request to get translation. No cache yet, try to not use it inside a loop. + * + * @return string + */ + public function getInputMethod() + { + global $db, $langs; - if ($this->methode_commande_id > 0) - { - $sql = "SELECT rowid, code, libelle as label"; - $sql .= " FROM ".MAIN_DB_PREFIX.'c_input_method'; - $sql .= " WHERE active=1 AND rowid = ".$db->escape($this->methode_commande_id); + if ($this->methode_commande_id > 0) + { + $sql = "SELECT rowid, code, libelle as label"; + $sql .= " FROM ".MAIN_DB_PREFIX.'c_input_method'; + $sql .= " WHERE active=1 AND rowid = ".$this->db->escape($this->methode_commande_id); - $resql = $db->query($sql); - if ($resql) - { - if ($db->num_rows($resql)) - { - $obj = $db->fetch_object($resql); + $resql = $this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); - $string = $langs->trans($obj->code); - if ($string == $obj->code) - { - $string = $obj->label != '-' ? $obj->label : ''; - } - return $string; - } - } - else dol_print_error($db); - } + $string = $langs->trans($obj->code); + if ($string == $obj->code) + { + $string = $obj->label != '-' ? $obj->label : ''; + } + return $string; + } + } else dol_print_error($this->db); + } - return ''; - } + return ''; + } /** * Create a document onto disk according to template model. @@ -3079,7 +2956,7 @@ class CommandeFournisseur extends CommonOrder * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param null|array $moreparams Array to provide more information * @return int 0 if KO, 1 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) @@ -3092,8 +2969,8 @@ class CommandeFournisseur extends CommonOrder if (!dol_strlen($modele)) { $modele = 'muscadet'; - if ($this->modelpdf) { - $modele = $this->modelpdf; + if ($this->model_pdf) { + $modele = $this->model_pdf; } elseif (!empty($conf->global->COMMANDE_SUPPLIER_ADDON_PDF)) { $modele = $conf->global->COMMANDE_SUPPLIER_ADDON_PDF; } @@ -3105,13 +2982,13 @@ class CommandeFournisseur extends CommonOrder } /** - * Return the max number delivery delay in day - * - * @param Translate $langs Language object - * @return string Translated string - */ - public function getMaxDeliveryTimeDay($langs) - { + * Return the max number delivery delay in day + * + * @param Translate $langs Language object + * @return string Translated string + */ + public function getMaxDeliveryTimeDay($langs) + { if (empty($this->lines)) return ''; $obj = new ProductFournisseur($this->db); @@ -3163,231 +3040,219 @@ class CommandeFournisseur extends CommonOrder return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } - /** - * Is the supplier order delayed? - * - * @return bool - */ - public function hasDelay() - { - global $conf; + /** + * Is the supplier order delayed? + * + * @return bool + */ + public function hasDelay() + { + global $conf; - if (empty($this->date_delivery) && !empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility + if (empty($this->date_delivery) && !empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility - $now = dol_now(); - $date_to_test = empty($this->date_delivery) ? $this->date_commande : $this->date_delivery; + $now = dol_now(); + $date_to_test = empty($this->date_delivery) ? $this->date_commande : $this->date_delivery; - return ($this->statut > 0 && $this->statut < 4) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); - } + return ($this->statut > 0 && $this->statut < 4) && $date_to_test && $date_to_test < ($now - $conf->commande->fournisseur->warning_delay); + } - /** - * Show the customer delayed info - * - * @return string Show delayed information - */ - public function showDelay() - { - global $conf, $langs; + /** + * Show the customer delayed info + * + * @return string Show delayed information + */ + public function showDelay() + { + global $conf, $langs; - if (empty($this->date_delivery) && !empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility + if (empty($this->date_delivery) && !empty($this->date_livraison)) $this->date_delivery = $this->date_livraison; // For backward compatibility - if (empty($this->date_delivery)) $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); - else $text = $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->date_delivery, 'day'); - $text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today"); + if (empty($this->date_delivery)) $text = $langs->trans("OrderDate").' '.dol_print_date($this->date_commande, 'day'); + else $text = $text = $langs->trans("DeliveryDate").' '.dol_print_date($this->date_delivery, 'day'); + $text .= ' '.($conf->commande->fournisseur->warning_delay > 0 ? '+' : '-').' '.round(abs($conf->commande->fournisseur->warning_delay) / 3600 / 24, 1).' '.$langs->trans("days").' < '.$langs->trans("Today"); - return $text; - } + return $text; + } - /** - * Calc status regarding to dispatched stock - * - * @param User $user User action - * @param int $closeopenorder Close if received - * @param string $comment Comment - * @return int <0 if KO, 0 if not applicable, >0 if OK - */ - public function calcAndSetStatusDispatch(User $user, $closeopenorder = 1, $comment = '') - { - global $conf, $langs; + /** + * Calc status regarding to dispatched stock + * + * @param User $user User action + * @param int $closeopenorder Close if received + * @param string $comment Comment + * @return int <0 if KO, 0 if not applicable, >0 if OK + */ + public function calcAndSetStatusDispatch(User $user, $closeopenorder = 1, $comment = '') + { + global $conf, $langs; - if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) - { - require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; + if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) || !empty($conf->supplier_order->enabled)) + { + require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; - $qtydelivered = array(); - $qtywished = array(); + $qtydelivered = array(); + $qtywished = array(); - $supplierorderdispatch = new CommandeFournisseurDispatch($this->db); - $filter = array('t.fk_commande'=>$this->id); - if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) { - $filter['t.status'] = 1; // Restrict to lines with status validated - } + $supplierorderdispatch = new CommandeFournisseurDispatch($this->db); + $filter = array('t.fk_commande'=>$this->id); + if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS)) { + $filter['t.status'] = 1; // Restrict to lines with status validated + } - $ret = $supplierorderdispatch->fetchAll('', '', 0, 0, $filter); - if ($ret < 0) - { - $this->error = $supplierorderdispatch->error; $this->errors = $supplierorderdispatch->errors; - return $ret; - } - else - { - if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines) > 0) - { - $date_liv = dol_now(); + $ret = $supplierorderdispatch->fetchAll('', '', 0, 0, $filter); + if ($ret < 0) + { + $this->error = $supplierorderdispatch->error; $this->errors = $supplierorderdispatch->errors; + return $ret; + } else { + if (is_array($supplierorderdispatch->lines) && count($supplierorderdispatch->lines) > 0) + { + $date_liv = dol_now(); - // Build array with quantity deliverd by product - foreach ($supplierorderdispatch->lines as $line) { - $qtydelivered[$line->fk_product] += $line->qty; - } - foreach ($this->lines as $line) { - $qtywished[$line->fk_product] += $line->qty; - } - //Compare array - $diff_array = array_diff_assoc($qtydelivered, $qtywished); // Warning: $diff_array is done only on common keys. - $keysinwishednotindelivered = array_diff(array_keys($qtywished), array_keys($qtydelivered)); // To check we also have same number of keys - $keysindeliverednotinwished = array_diff(array_keys($qtydelivered), array_keys($qtywished)); // To check we also have same number of keys - /*var_dump(array_keys($qtydelivered)); + // Build array with quantity deliverd by product + foreach ($supplierorderdispatch->lines as $line) { + $qtydelivered[$line->fk_product] += $line->qty; + } + foreach ($this->lines as $line) { + $qtywished[$line->fk_product] += $line->qty; + } + //Compare array + $diff_array = array_diff_assoc($qtydelivered, $qtywished); // Warning: $diff_array is done only on common keys. + $keysinwishednotindelivered = array_diff(array_keys($qtywished), array_keys($qtydelivered)); // To check we also have same number of keys + $keysindeliverednotinwished = array_diff(array_keys($qtydelivered), array_keys($qtywished)); // To check we also have same number of keys + /*var_dump(array_keys($qtydelivered)); var_dump(array_keys($qtywished)); var_dump($diff_array); var_dump($keysinwishednotindelivered); var_dump($keysindeliverednotinwished); exit;*/ - if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) //No diff => mean everythings is received - { - if ($closeopenorder) - { - //$ret=$this->setStatus($user,5); - $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' - if ($ret < 0) { - return -1; - } - return 5; - } - else - { - //Diff => received partially - //$ret=$this->setStatus($user,4); - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' - if ($ret < 0) { - return -1; - } - return 4; - } - } elseif (!empty($conf->global->SUPPLIER_ORDER_MORE_THAN_WISHED)) { - //set livraison to 'tot' if more products received than wished. (and if $closeopenorder is set to 1 of course...) + if (count($diff_array) == 0 && count($keysinwishednotindelivered) == 0 && count($keysindeliverednotinwished) == 0) //No diff => mean everythings is received + { + if ($closeopenorder) + { + //$ret=$this->setStatus($user,5); + $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + if ($ret < 0) { + return -1; + } + return 5; + } else { + //Diff => received partially + //$ret=$this->setStatus($user,4); + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + if ($ret < 0) { + return -1; + } + return 4; + } + } elseif (!empty($conf->global->SUPPLIER_ORDER_MORE_THAN_WISHED)) { + //set livraison to 'tot' if more products received than wished. (and if $closeopenorder is set to 1 of course...) - $close = 0; + $close = 0; - if (count($diff_array) > 0) - { - //there are some difference between the two arrays + if (count($diff_array) > 0) + { + //there are some difference between the two arrays - //scan the array of results - foreach ($diff_array as $key => $value) - { - //if the quantity delivered is greater or equal to wish quantity - if ($qtydelivered[$key] >= $qtywished[$key]) - { - $close++; - } - } - } + //scan the array of results + foreach ($diff_array as $key => $value) + { + //if the quantity delivered is greater or equal to wish quantity + if ($qtydelivered[$key] >= $qtywished[$key]) + { + $close++; + } + } + } - if ($close == count($diff_array)) { - //all the products are received equal or more than the wished quantity - if ($closeopenorder) { - $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' - if ($ret < 0) { - return -1; - } - return 5; - } - else - { - //Diff => received partially - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' - if ($ret < 0) { - return -1; - } - return 4; - } - } - else - { - //all the products are not received - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' - if ($ret < 0) { - return -1; - } - return 4; - } - } - else - { - //Diff => received partially - $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' - if ($ret < 0) { - return -1; - } - return 4; - } - } - return 1; - } - } - return 0; - } + if ($close == count($diff_array)) { + //all the products are received equal or more than the wished quantity + if ($closeopenorder) { + $ret = $this->Livraison($user, $date_liv, 'tot', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + if ($ret < 0) { + return -1; + } + return 5; + } else { + //Diff => received partially + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + if ($ret < 0) { + return -1; + } + return 4; + } + } else { + //all the products are not received + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + if ($ret < 0) { + return -1; + } + return 4; + } + } else { + //Diff => received partially + $ret = $this->Livraison($user, $date_liv, 'par', $comment); // GETPOST("type") is 'tot', 'par', 'nev', 'can' + if ($ret < 0) { + return -1; + } + return 4; + } + } + return 1; + } + } + return 0; + } - /** - * Load array this->receptions of lines of shipments with nb of products sent for each order line - * Note: For a dedicated shipment, the fetch_lines can be used to load the qty_asked and qty_shipped. This function is use to return qty_shipped cumulated for the order - * - * @param int $filtre_statut Filter on shipment status - * @return int <0 if KO, Nb of lines found if OK - */ - public function loadReceptions($filtre_statut = -1) - { - $this->receptions = array(); + /** + * Load array this->receptions of lines of shipments with nb of products sent for each order line + * Note: For a dedicated shipment, the fetch_lines can be used to load the qty_asked and qty_shipped. This function is use to return qty_shipped cumulated for the order + * + * @param int $filtre_statut Filter on shipment status + * @return int <0 if KO, Nb of lines found if OK + */ + public function loadReceptions($filtre_statut = -1) + { + $this->receptions = array(); - $sql = 'SELECT cd.rowid, cd.fk_product,'; - $sql .= ' sum(cfd.qty) as qty'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch as cfd,'; - if ($filtre_statut >= 0) $sql .= ' '.MAIN_DB_PREFIX.'reception as e,'; - $sql .= ' '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd'; - $sql .= ' WHERE'; - if ($filtre_statut >= 0) $sql .= ' cfd.fk_reception = e.rowid AND'; - $sql .= ' cfd.fk_commandefourndet = cd.rowid'; - $sql .= ' AND cd.fk_commande ='.$this->id; - if ($this->fk_product > 0) $sql .= ' AND cd.fk_product = '.$this->fk_product; - if ($filtre_statut >= 0) $sql .= ' AND e.fk_statut >= '.$filtre_statut; - $sql .= ' GROUP BY cd.rowid, cd.fk_product'; + $sql = 'SELECT cd.rowid, cd.fk_product,'; + $sql .= ' sum(cfd.qty) as qty'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch as cfd,'; + if ($filtre_statut >= 0) $sql .= ' '.MAIN_DB_PREFIX.'reception as e,'; + $sql .= ' '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd'; + $sql .= ' WHERE'; + if ($filtre_statut >= 0) $sql .= ' cfd.fk_reception = e.rowid AND'; + $sql .= ' cfd.fk_commandefourndet = cd.rowid'; + $sql .= ' AND cd.fk_commande ='.$this->id; + if ($this->fk_product > 0) $sql .= ' AND cd.fk_product = '.$this->fk_product; + if ($filtre_statut >= 0) $sql .= ' AND e.fk_statut >= '.$filtre_statut; + $sql .= ' GROUP BY cd.rowid, cd.fk_product'; - dol_syslog(get_class($this)."::loadReceptions", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result) - { - $num = $this->db->num_rows($result); - $i = 0; - while ($i < $num) - { - $obj = $this->db->fetch_object($result); - empty($this->receptions[$obj->rowid]) ? $this->receptions[$obj->rowid] = $obj->qty : $this->receptions[$obj->rowid] += $obj->qty; - $i++; - } - $this->db->free(); + dol_syslog(get_class($this)."::loadReceptions", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) + { + $num = $this->db->num_rows($result); + $i = 0; + while ($i < $num) + { + $obj = $this->db->fetch_object($result); + empty($this->receptions[$obj->rowid]) ? $this->receptions[$obj->rowid] = $obj->qty : $this->receptions[$obj->rowid] += $obj->qty; + $i++; + } + $this->db->free(); - return $num; - } - else - { - $this->error = $this->db->lasterror(); - return -1; - } - } + return $num; + } else { + $this->error = $this->db->lasterror(); + return -1; + } + } } @@ -3397,7 +3262,7 @@ class CommandeFournisseur extends CommonOrder */ class CommandeFournisseurLigne extends CommonOrderLine { - /** + /** * @var string ID to identify managed object */ public $element = 'commande_fournisseurdet'; @@ -3407,32 +3272,32 @@ class CommandeFournisseurLigne extends CommonOrderLine */ public $table_element = 'commande_fournisseurdet'; - public $oldline; + public $oldline; - /** - * Id of parent order - * @var int - */ - public $fk_commande; + /** + * Id of parent order + * @var int + */ + public $fk_commande; - // From llx_commande_fournisseurdet - /** - * @var int ID - */ - public $fk_parent_line; + // From llx_commande_fournisseurdet + /** + * @var int ID + */ + public $fk_parent_line; - /** - * @var int ID - */ - public $fk_facture; + /** + * @var int ID + */ + public $fk_facture; - /** - * @var string supplier order line label - */ - public $label; + /** + * @var string supplier order line label + */ + public $label; - public $rang = 0; - public $special_code = 0; + public $rang = 0; + public $special_code = 0; /** * Unit price without taxes @@ -3440,100 +3305,100 @@ class CommandeFournisseurLigne extends CommonOrderLine */ public $pu_ht; - public $date_start; - public $date_end; + public $date_start; + public $date_end; - // From llx_product_fournisseur_price + // From llx_product_fournisseur_price /** * Supplier reference of price when we added the line. May have been changed after line was added. * @var string */ - public $ref_supplier; - public $remise; - public $product_libelle; + public $ref_supplier; + public $remise; + public $product_libelle; - /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; - } + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } - /** - * Load line order - * - * @param int $rowid Id line order - * @return int <0 if KO, >0 if OK - */ - public function fetch($rowid) - { - global $conf; + /** + * Load line order + * + * @param int $rowid Id line order + * @return int <0 if KO, >0 if OK + */ + public function fetch($rowid) + { + global $conf; - $sql = 'SELECT cd.rowid, cd.fk_commande, cd.fk_product, cd.product_type, cd.description, cd.qty, cd.tva_tx, cd.special_code,'; - $sql .= ' cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.ref,'; - $sql .= ' cd.remise, cd.remise_percent, cd.subprice,'; - $sql .= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,'; - $sql .= ' cd.total_localtax1, cd.total_localtax2,'; - $sql .= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,'; - $sql .= ' cd.date_start, cd.date_end, cd.fk_unit,'; + $sql = 'SELECT cd.rowid, cd.fk_commande, cd.fk_product, cd.product_type, cd.description, cd.qty, cd.tva_tx, cd.special_code,'; + $sql .= ' cd.localtax1_tx, cd.localtax2_tx, cd.localtax1_type, cd.localtax2_type, cd.ref,'; + $sql .= ' cd.remise, cd.remise_percent, cd.subprice,'; + $sql .= ' cd.info_bits, cd.total_ht, cd.total_tva, cd.total_ttc,'; + $sql .= ' cd.total_localtax1, cd.total_localtax2,'; + $sql .= ' p.ref as product_ref, p.label as product_libelle, p.description as product_desc,'; + $sql .= ' cd.date_start, cd.date_end, cd.fk_unit,'; $sql .= ' cd.multicurrency_subprice, cd.multicurrency_total_ht, cd.multicurrency_total_tva, cd.multicurrency_total_ttc'; if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= ", pfp.rowid as fk_pfp, pfp.packaging"; - $sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet as cd'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON cd.fk_product = p.rowid'; if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON cd.fk_product = pfp.fk_product and cd.ref = pfp.ref_fourn"; - $sql .= ' WHERE cd.rowid = '.$rowid; - $result = $this->db->query($sql); - if ($result) - { - $objp = $this->db->fetch_object($result); + $sql .= ' WHERE cd.rowid = '.$rowid; + $result = $this->db->query($sql); + if ($result) + { + $objp = $this->db->fetch_object($result); - if (!empty($objp)) - { - $this->rowid = $objp->rowid; - $this->id = $objp->rowid; - $this->fk_commande = $objp->fk_commande; - $this->desc = $objp->description; - $this->qty = $objp->qty; - $this->ref_fourn = $objp->ref; - $this->ref_supplier = $objp->ref; - $this->subprice = $objp->subprice; - $this->tva_tx = $objp->tva_tx; - $this->localtax1_tx = $objp->localtax1_tx; - $this->localtax2_tx = $objp->localtax2_tx; - $this->localtax1_type = $objp->localtax1_type; - $this->localtax2_type = $objp->localtax2_type; - $this->remise = $objp->remise; - $this->remise_percent = $objp->remise_percent; - $this->fk_product = $objp->fk_product; - $this->info_bits = $objp->info_bits; - $this->total_ht = $objp->total_ht; - $this->total_tva = $objp->total_tva; - $this->total_localtax1 = $objp->total_localtax1; - $this->total_localtax2 = $objp->total_localtax2; - $this->total_ttc = $objp->total_ttc; - $this->product_type = $objp->product_type; - $this->special_code = $objp->special_code; + if (!empty($objp)) + { + $this->rowid = $objp->rowid; + $this->id = $objp->rowid; + $this->fk_commande = $objp->fk_commande; + $this->desc = $objp->description; + $this->qty = $objp->qty; + $this->ref_fourn = $objp->ref; + $this->ref_supplier = $objp->ref; + $this->subprice = $objp->subprice; + $this->tva_tx = $objp->tva_tx; + $this->localtax1_tx = $objp->localtax1_tx; + $this->localtax2_tx = $objp->localtax2_tx; + $this->localtax1_type = $objp->localtax1_type; + $this->localtax2_type = $objp->localtax2_type; + $this->remise = $objp->remise; + $this->remise_percent = $objp->remise_percent; + $this->fk_product = $objp->fk_product; + $this->info_bits = $objp->info_bits; + $this->total_ht = $objp->total_ht; + $this->total_tva = $objp->total_tva; + $this->total_localtax1 = $objp->total_localtax1; + $this->total_localtax2 = $objp->total_localtax2; + $this->total_ttc = $objp->total_ttc; + $this->product_type = $objp->product_type; + $this->special_code = $objp->special_code; - $this->ref = $objp->product_ref; - $this->product_ref = $objp->product_ref; - $this->product_libelle = $objp->product_libelle; - $this->product_desc = $objp->product_desc; + $this->ref = $objp->product_ref; + $this->product_ref = $objp->product_ref; + $this->product_libelle = $objp->product_libelle; + $this->product_desc = $objp->product_desc; if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) { $this->packaging = $objp->packaging; $this->fk_fournprice = $objp->fk_pfp; } - $this->date_start = $this->db->jdate($objp->date_start); - $this->date_end = $this->db->jdate($objp->date_end); - $this->fk_unit = $objp->fk_unit; + $this->date_start = $this->db->jdate($objp->date_start); + $this->date_end = $this->db->jdate($objp->date_end); + $this->fk_unit = $objp->fk_unit; $this->multicurrency_subprice = $objp->multicurrency_subprice; $this->multicurrency_total_ht = $objp->multicurrency_total_ht; @@ -3542,297 +3407,284 @@ class CommandeFournisseurLigne extends CommonOrderLine $this->fetch_optionals(); - $this->db->free($result); - return 1; - } - else - { - $this->error = 'Supplier order line with id='.$rowid.' not found'; - dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR); - return 0; - } - } - else - { - dol_print_error($this->db); - return -1; - } - } + $this->db->free($result); + return 1; + } else { + $this->error = 'Supplier order line with id='.$rowid.' not found'; + dol_syslog(get_class($this)."::fetch Error ".$this->error, LOG_ERR); + return 0; + } + } else { + dol_print_error($this->db); + return -1; + } + } - /** - * Insert line into database - * - * @param int $notrigger 1 = disable triggers - * @return int <0 if KO, >0 if OK - */ - public function insert($notrigger = 0) - { - global $conf, $user; + /** + * Insert line into database + * + * @param int $notrigger 1 = disable triggers + * @return int <0 if KO, >0 if OK + */ + public function insert($notrigger = 0) + { + global $conf, $user; - $error = 0; + $error = 0; - dol_syslog(get_class($this)."::insert rang=".$this->rang); + dol_syslog(get_class($this)."::insert rang=".$this->rang); - // Clean parameters - if (empty($this->tva_tx)) $this->tva_tx = 0; - if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; - if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; - if (empty($this->localtax1_type)) $this->localtax1_type = '0'; - if (empty($this->localtax2_type)) $this->localtax2_type = '0'; - if (empty($this->total_localtax1)) $this->total_localtax1 = 0; - if (empty($this->total_localtax2)) $this->total_localtax2 = 0; - if (empty($this->rang)) $this->rang = 0; - if (empty($this->remise)) $this->remise = 0; - if (empty($this->remise_percent)) $this->remise_percent = 0; - if (empty($this->info_bits)) $this->info_bits = 0; - if (empty($this->special_code)) $this->special_code = 0; - if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; - if (empty($this->pa_ht)) $this->pa_ht = 0; + // Clean parameters + if (empty($this->tva_tx)) $this->tva_tx = 0; + if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; + if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; + if (empty($this->localtax1_type)) $this->localtax1_type = '0'; + if (empty($this->localtax2_type)) $this->localtax2_type = '0'; + if (empty($this->total_localtax1)) $this->total_localtax1 = 0; + if (empty($this->total_localtax2)) $this->total_localtax2 = 0; + if (empty($this->rang)) $this->rang = 0; + if (empty($this->remise)) $this->remise = 0; + if (empty($this->remise_percent)) $this->remise_percent = 0; + if (empty($this->info_bits)) $this->info_bits = 0; + if (empty($this->special_code)) $this->special_code = 0; + if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; + if (empty($this->pa_ht)) $this->pa_ht = 0; - // Multicurrency - if (!empty($this->multicurrency_code)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); - if (empty($this->fk_multicurrency)) - { - $this->multicurrency_code = $conf->currency; - $this->fk_multicurrency = 0; - $this->multicurrency_tx = 1; - } + // Multicurrency + if (!empty($this->multicurrency_code)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code); + if (empty($this->fk_multicurrency)) + { + $this->multicurrency_code = $conf->currency; + $this->fk_multicurrency = 0; + $this->multicurrency_tx = 1; + } - // Check parameters - if ($this->product_type < 0) return -1; + // Check parameters + if ($this->product_type < 0) return -1; - $this->db->begin(); + $this->db->begin(); - // Insertion dans base de la ligne - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; - $sql .= " (fk_commande, label, description, date_start, date_end,"; - $sql .= " fk_product, product_type, special_code, rang,"; - $sql .= " qty, vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,"; - $sql .= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit,"; - $sql .= " fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc"; - $sql .= ")"; - $sql .= " VALUES (".$this->fk_commande.", '".$this->db->escape($this->label)."','".$this->db->escape($this->desc)."',"; - $sql .= " ".($this->date_start ? "'".$this->db->idate($this->date_start)."'" : "null").","; - $sql .= " ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : "null").","; - if ($this->fk_product) { $sql .= $this->fk_product.","; } - else { $sql .= "null,"; } - $sql .= "'".$this->db->escape($this->product_type)."',"; - $sql .= "'".$this->db->escape($this->special_code)."',"; - $sql .= "'".$this->db->escape($this->rang)."',"; - $sql .= "'".$this->db->escape($this->qty)."', "; - $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; - $sql .= " ".$this->tva_tx.", "; - $sql .= " ".$this->localtax1_tx.","; - $sql .= " ".$this->localtax2_tx.","; - $sql .= " '".$this->db->escape($this->localtax1_type)."',"; - $sql .= " '".$this->db->escape($this->localtax2_type)."',"; - $sql .= " ".$this->remise_percent.", ".price2num($this->subprice, 'MU').", '".$this->db->escape($this->ref_supplier)."',"; - $sql .= " ".price2num($this->total_ht).","; - $sql .= " ".price2num($this->total_tva).","; - $sql .= " ".price2num($this->total_localtax1).","; - $sql .= " ".price2num($this->total_localtax2).","; - $sql .= " ".price2num($this->total_ttc).","; - $sql .= ($this->fk_unit ? "'".$this->db->escape($this->fk_unit)."'" : "null"); - $sql .= ", ".($this->fk_multicurrency ? $this->fk_multicurrency : "null"); - $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; - $sql .= ", ".($this->multicurrency_subprice ? price2num($this->multicurrency_subprice) : '0'); - $sql .= ", ".($this->multicurrency_total_ht ? price2num($this->multicurrency_total_ht) : '0'); - $sql .= ", ".($this->multicurrency_total_tva ? price2num($this->multicurrency_total_tva) : '0'); - $sql .= ", ".($this->multicurrency_total_ttc ? price2num($this->multicurrency_total_ttc) : '0'); - $sql .= ")"; + // Insertion dans base de la ligne + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; + $sql .= " (fk_commande, label, description, date_start, date_end,"; + $sql .= " fk_product, product_type, special_code, rang,"; + $sql .= " qty, vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type, remise_percent, subprice, ref,"; + $sql .= " total_ht, total_tva, total_localtax1, total_localtax2, total_ttc, fk_unit,"; + $sql .= " fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc"; + $sql .= ")"; + $sql .= " VALUES (".$this->fk_commande.", '".$this->db->escape($this->label)."','".$this->db->escape($this->desc)."',"; + $sql .= " ".($this->date_start ? "'".$this->db->idate($this->date_start)."'" : "null").","; + $sql .= " ".($this->date_end ? "'".$this->db->idate($this->date_end)."'" : "null").","; + if ($this->fk_product) { $sql .= $this->fk_product.","; } else { $sql .= "null,"; } + $sql .= "'".$this->db->escape($this->product_type)."',"; + $sql .= "'".$this->db->escape($this->special_code)."',"; + $sql .= "'".$this->db->escape($this->rang)."',"; + $sql .= "'".$this->db->escape($this->qty)."', "; + $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; + $sql .= " ".$this->tva_tx.", "; + $sql .= " ".$this->localtax1_tx.","; + $sql .= " ".$this->localtax2_tx.","; + $sql .= " '".$this->db->escape($this->localtax1_type)."',"; + $sql .= " '".$this->db->escape($this->localtax2_type)."',"; + $sql .= " ".$this->remise_percent.", ".price2num($this->subprice, 'MU').", '".$this->db->escape($this->ref_supplier)."',"; + $sql .= " ".price2num($this->total_ht).","; + $sql .= " ".price2num($this->total_tva).","; + $sql .= " ".price2num($this->total_localtax1).","; + $sql .= " ".price2num($this->total_localtax2).","; + $sql .= " ".price2num($this->total_ttc).","; + $sql .= ($this->fk_unit ? "'".$this->db->escape($this->fk_unit)."'" : "null"); + $sql .= ", ".($this->fk_multicurrency ? $this->fk_multicurrency : "null"); + $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql .= ", ".($this->multicurrency_subprice ? price2num($this->multicurrency_subprice) : '0'); + $sql .= ", ".($this->multicurrency_total_ht ? price2num($this->multicurrency_total_ht) : '0'); + $sql .= ", ".($this->multicurrency_total_tva ? price2num($this->multicurrency_total_tva) : '0'); + $sql .= ", ".($this->multicurrency_total_ttc ? price2num($this->multicurrency_total_ttc) : '0'); + $sql .= ")"; - dol_syslog(get_class($this)."::insert", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - $this->rowid = $this->id; + dol_syslog(get_class($this)."::insert", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); + $this->rowid = $this->id; - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('LINEORDER_SUPPLIER_CREATE', $user); - if ($result < 0) $error++; - // End call triggers - } + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('LINEORDER_SUPPLIER_CREATE', $user); + if ($result < 0) $error++; + // End call triggers + } - if (!$error) { - $this->db->commit(); - return 1; - } + if (!$error) { + $this->db->commit(); + return 1; + } - foreach ($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); - $this->errors[] = ($this->errors ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - else - { - $this->errors[] = $this->db->error(); - $this->db->rollback(); - return -2; - } - } - /** - * Update the line object into db - * - * @param int $notrigger 1 = disable triggers - * @return int <0 si ko, >0 si ok - */ - public function update($notrigger = 0) - { - global $conf, $user; + foreach ($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + $this->errors[] = ($this->errors ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } else { + $this->errors[] = $this->db->error(); + $this->db->rollback(); + return -2; + } + } + /** + * Update the line object into db + * + * @param int $notrigger 1 = disable triggers + * @return int <0 si ko, >0 si ok + */ + public function update($notrigger = 0) + { + global $conf, $user; - $error = 0; + $error = 0; - $this->db->begin(); + $this->db->begin(); - // Mise a jour ligne en base - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; - $sql .= " description='".$this->db->escape($this->desc)."'"; - $sql .= ", ref='".$this->db->escape($this->ref_supplier)."'"; - $sql .= ", subprice='".price2num($this->subprice)."'"; - //$sql.= ",remise='".price2num($remise)."'"; - $sql .= ", remise_percent='".price2num($this->remise_percent)."'"; + // Mise a jour ligne en base + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; + $sql .= " description='".$this->db->escape($this->desc)."'"; + $sql .= ", ref='".$this->db->escape($this->ref_supplier)."'"; + $sql .= ", subprice='".price2num($this->subprice)."'"; + //$sql.= ",remise='".price2num($remise)."'"; + $sql .= ", remise_percent='".price2num($this->remise_percent)."'"; $sql .= ", vat_src_code = '".(empty($this->vat_src_code) ? '' : $this->vat_src_code)."'"; - $sql .= ", tva_tx='".price2num($this->tva_tx)."'"; - $sql .= ", localtax1_tx='".price2num($this->total_localtax1)."'"; - $sql .= ", localtax2_tx='".price2num($this->total_localtax2)."'"; - $sql .= ", localtax1_type='".$this->db->escape($this->localtax1_type)."'"; - $sql .= ", localtax2_type='".$this->db->escape($this->localtax2_type)."'"; - $sql .= ", qty='".price2num($this->qty)."'"; - $sql .= ", date_start=".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null"); - $sql .= ", date_end=".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null"); - $sql .= ", info_bits='".$this->db->escape($this->info_bits)."'"; - $sql .= ", total_ht='".price2num($this->total_ht)."'"; - $sql .= ", total_tva='".price2num($this->total_tva)."'"; - $sql .= ", total_localtax1='".price2num($this->total_localtax1)."'"; - $sql .= ", total_localtax2='".price2num($this->total_localtax2)."'"; - $sql .= ", total_ttc='".price2num($this->total_ttc)."'"; - $sql .= ", product_type=".$this->product_type; - $sql .= ", special_code=".(!empty($this->special_code) ? $this->special_code : 0); - $sql .= ($this->fk_unit ? ", fk_unit='".$this->db->escape($this->fk_unit)."'" : ", fk_unit=null"); + $sql .= ", tva_tx='".price2num($this->tva_tx)."'"; + $sql .= ", localtax1_tx='".price2num($this->total_localtax1)."'"; + $sql .= ", localtax2_tx='".price2num($this->total_localtax2)."'"; + $sql .= ", localtax1_type='".$this->db->escape($this->localtax1_type)."'"; + $sql .= ", localtax2_type='".$this->db->escape($this->localtax2_type)."'"; + $sql .= ", qty='".price2num($this->qty)."'"; + $sql .= ", date_start=".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null"); + $sql .= ", date_end=".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null"); + $sql .= ", info_bits='".$this->db->escape($this->info_bits)."'"; + $sql .= ", total_ht='".price2num($this->total_ht)."'"; + $sql .= ", total_tva='".price2num($this->total_tva)."'"; + $sql .= ", total_localtax1='".price2num($this->total_localtax1)."'"; + $sql .= ", total_localtax2='".price2num($this->total_localtax2)."'"; + $sql .= ", total_ttc='".price2num($this->total_ttc)."'"; + $sql .= ", product_type=".$this->product_type; + $sql .= ", special_code=".(!empty($this->special_code) ? $this->special_code : 0); + $sql .= ($this->fk_unit ? ", fk_unit='".$this->db->escape($this->fk_unit)."'" : ", fk_unit=null"); - // Multicurrency - $sql .= ", multicurrency_subprice=".price2num($this->multicurrency_subprice).""; - $sql .= ", multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; - $sql .= ", multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; - $sql .= ", multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; + // Multicurrency + $sql .= ", multicurrency_subprice=".price2num($this->multicurrency_subprice).""; + $sql .= ", multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; + $sql .= ", multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; + $sql .= ", multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; - $sql .= " WHERE rowid = ".$this->id; + $sql .= " WHERE rowid = ".$this->id; - dol_syslog(get_class($this)."::updateline", LOG_DEBUG); - $result = $this->db->query($sql); - if ($result > 0) - { - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + dol_syslog(get_class($this)."::updateline", LOG_DEBUG); + $result = $this->db->query($sql); + if ($result > 0) + { + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } - if (!$error && !$notrigger) - { - global $user; - // Call trigger - $result = $this->call_trigger('LINEORDER_SUPPLIER_UPDATE', $user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } - // End call triggers - } + if (!$error && !$notrigger) + { + global $user; + // Call trigger + $result = $this->call_trigger('LINEORDER_SUPPLIER_UPDATE', $user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + // End call triggers + } - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -1; - } - } + if (!$error) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -1; + } + } - /** - * Delete line in database - * - * @param int $notrigger 1=Disable call to triggers - * @return int <0 if KO, >0 if OK - */ - public function delete($notrigger = 0) - { - global $user; + /** + * Delete line in database + * + * @param int $notrigger 1=Disable call to triggers + * @return int <0 if KO, >0 if OK + */ + public function delete($notrigger = 0) + { + global $user; - $error = 0; + $error = 0; - $this->db->begin(); + $this->db->begin(); // extrafields - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } - $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid=".$this->id; + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid=".$this->id; - dol_syslog(__METHOD__, LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('LINEORDER_SUPPLIER_DELETE', $user); - if ($result < 0) $error++; - // End call triggers - } + dol_syslog(__METHOD__, LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + if (!$notrigger) + { + // Call trigger + $result = $this->call_trigger('LINEORDER_SUPPLIER_DELETE', $user); + if ($result < 0) $error++; + // End call triggers + } - if (!$error) - { - $this->db->commit(); - return 1; - } + if (!$error) + { + $this->db->commit(); + return 1; + } - foreach ($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - else - { - $this->error = $this->db->lasterror(); - return -1; - } - } + foreach ($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } else { + $this->error = $this->db->lasterror(); + return -1; + } + } } diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 808b217caed..a7abed27369 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -33,10 +33,10 @@ require_once DOL_DOCUMENT_ROOT."/reception/class/reception.class.php"; */ class CommandeFournisseurDispatch extends CommonObject { - /** - * @var DoliDB Database handler. - */ - public $db; + /** + * @var DoliDB Database handler. + */ + public $db; /** * @var string Error code (or message) @@ -59,31 +59,31 @@ class CommandeFournisseurDispatch extends CommonObject public $table_element = 'commande_fournisseur_dispatch'; //!< Name of table without prefix where object is stored public $lines = array(); - /** + /** * @var int ID */ public $id; /** - * @var int ID - */ + * @var int ID + */ public $fk_commande; /** - * @var int ID - */ + * @var int ID + */ public $fk_product; /** - * @var int ID - */ + * @var int ID + */ public $fk_commandefourndet; public $qty; /** - * @var int ID - */ + * @var int ID + */ public $fk_entrepot; /** @@ -107,35 +107,35 @@ class CommandeFournisseurDispatch extends CommonObject - /** - * Constructor - * - * @param DoliDb $db Database handler - */ - public function __construct($db) - { - $this->db = $db; + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct($db) + { + $this->db = $db; - // List of language codes for status - $this->statuts[0] = 'Received'; - $this->statuts[1] = 'Verified'; - $this->statuts[2] = 'Denied'; - $this->statutshort[0] = 'Received'; - $this->statutshort[1] = 'Verified'; - $this->statutshort[2] = 'Denied'; - } + // List of language codes for status + $this->statuts[0] = 'Received'; + $this->statuts[1] = 'Verified'; + $this->statuts[2] = 'Denied'; + $this->statutshort[0] = 'Received'; + $this->statutshort[1] = 'Verified'; + $this->statutshort[2] = 'Denied'; + } - /** - * Create object into database - * - * @param User $user User that creates - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 if KO, Id of created object if OK - */ - public function create($user, $notrigger = 0) - { - global $conf, $langs, $hookmanager; + /** + * Create object into database + * + * @param User $user User that creates + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, Id of created object if OK + */ + public function create($user, $notrigger = 0) + { + global $conf, $langs, $hookmanager; $error = 0; // Clean parameters @@ -155,7 +155,7 @@ class CommandeFournisseurDispatch extends CommonObject // Check parameters // Put here code to add control on parameters values - // Insert request + // Insert request $sql = "INSERT INTO ".MAIN_DB_PREFIX.$this->table_element."("; $sql .= "fk_commande,"; $sql .= "fk_product,"; @@ -172,7 +172,7 @@ class CommandeFournisseurDispatch extends CommonObject $sql .= "fk_reception"; - $sql .= ") VALUES ("; + $sql .= ") VALUES ("; $sql .= " ".(!isset($this->fk_commande) ? 'NULL' : "'".$this->db->escape($this->fk_commande)."'").","; $sql .= " ".(!isset($this->fk_product) ? 'NULL' : "'".$this->db->escape($this->fk_product)."'").","; $sql .= " ".(!isset($this->fk_commandefourndet) ? 'NULL' : "'".$this->db->escape($this->fk_commandefourndet)."'").","; @@ -191,62 +191,60 @@ class CommandeFournisseurDispatch extends CommonObject $this->db->begin(); dol_syslog(__METHOD__, LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } if (!$error) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. + // Uncomment this and change MYOBJECT to your own tag if you + // want this action calls a trigger. - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_CREATE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers + //// Call triggers + //$result=$this->call_trigger('MYOBJECT_CREATE',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + //// End call triggers } - } + } - // Create extrafields - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) $error++; - } + // Create extrafields + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) $error++; + } - // Commit or rollback - if ($error) + // Commit or rollback + if ($error) { foreach ($this->errors as $errmsg) { - dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); - return $this->id; + return $this->id; } - } + } - /** - * Load object in memory from the database - * - * @param int $id Id object - * @param string $ref Ref - * @return int <0 if KO, >0 if OK - */ - public function fetch($id, $ref = '') - { - global $langs; - $sql = "SELECT"; + /** + * Load object in memory from the database + * + * @param int $id Id object + * @param string $ref Ref + * @return int <0 if KO, >0 if OK + */ + public function fetch($id, $ref = '') + { + global $langs; + $sql = "SELECT"; $sql .= " t.rowid,"; $sql .= " t.fk_commande,"; @@ -265,19 +263,19 @@ class CommandeFournisseurDispatch extends CommonObject $sql .= " t.fk_reception"; - $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; - if ($ref) $sql .= " WHERE t.ref = '".$ref."'"; - else $sql .= " WHERE t.rowid = ".$id; + $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; + if ($ref) $sql .= " WHERE t.ref = '".$ref."'"; + else $sql .= " WHERE t.rowid = ".$id; - dol_syslog(get_class($this)."::fetch"); - $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { - $obj = $this->db->fetch_object($resql); + dol_syslog(get_class($this)."::fetch"); + $resql = $this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); - $this->id = $obj->rowid; + $this->id = $obj->rowid; $this->fk_commande = $obj->fk_commande; $this->fk_product = $obj->fk_product; @@ -295,29 +293,27 @@ class CommandeFournisseurDispatch extends CommonObject $this->fk_reception = $obj->fk_reception; $this->fetch_optionals(); - } - $this->db->free($resql); + } + $this->db->free($resql); - return 1; - } - else - { - $this->error = "Error ".$this->db->lasterror(); - return -1; - } - } + return 1; + } else { + $this->error = "Error ".$this->db->lasterror(); + return -1; + } + } - /** - * Update object into database - * - * @param User $user User that modifies - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 if KO, >0 if OK - */ - public function update($user, $notrigger = 0) - { - global $conf, $langs; + /** + * Update object into database + * + * @param User $user User that modifies + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function update($user, $notrigger = 0) + { + global $conf, $langs; $error = 0; // Clean parameters @@ -337,8 +333,8 @@ class CommandeFournisseurDispatch extends CommonObject // Check parameters // Put here code to add a control on parameters values - // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; $sql .= " fk_commande=".(isset($this->fk_commande) ? $this->fk_commande : "null").","; $sql .= " fk_product=".(isset($this->fk_product) ? $this->fk_product : "null").","; @@ -355,13 +351,13 @@ class CommandeFournisseurDispatch extends CommonObject $sql .= " sellby=".(dol_strlen($this->sellby) != 0 ? "'".$this->db->idate($this->sellby)."'" : 'null').""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " WHERE rowid=".$this->id; $this->db->begin(); dol_syslog(__METHOD__); - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } if (!$error) { @@ -377,39 +373,37 @@ class CommandeFournisseurDispatch extends CommonObject if (!$notrigger) { - // Uncomment this and change MYOBJECT to your own tag if you - $result = $this->call_trigger('LINERECEPTION_UPDATE', $user); - if ($result < 0) $error++; - //// End call triggers + // Uncomment this and change MYOBJECT to your own tag if you + $result = $this->call_trigger('LINERECEPTION_UPDATE', $user); + if ($result < 0) $error++; + //// End call triggers } } - // Commit or rollback + // Commit or rollback if ($error) { foreach ($this->errors as $errmsg) { - dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } - } + } /** - * Delete object in database - * - * @param User $user User that deletes - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 if KO, >0 if OK - */ + * Delete object in database + * + * @param User $user User that deletes + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, >0 if OK + */ public function delete($user, $notrigger = 0) { global $conf, $langs; @@ -422,16 +416,16 @@ class CommandeFournisseurDispatch extends CommonObject if (!$notrigger) { // Uncomment this and change MYOBJECT to your own tag if you - // want this action calls a trigger. + // want this action calls a trigger. - //// Call triggers - //$result=$this->call_trigger('MYOBJECT_DELETE',$user); - //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} - //// End call triggers + //// Call triggers + //$result=$this->call_trigger('MYOBJECT_DELETE',$user); + //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail} + //// End call triggers } } - // Remove extrafields + // Remove extrafields if (!$error) { $result = $this->deleteExtraFields(); if ($result < 0) @@ -443,27 +437,25 @@ class CommandeFournisseurDispatch extends CommonObject if (!$error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; - $sql .= " WHERE rowid=".$this->id; + $sql = "DELETE FROM ".MAIN_DB_PREFIX.$this->table_element; + $sql .= " WHERE rowid=".$this->id; - dol_syslog(__METHOD__); - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + dol_syslog(__METHOD__); + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } - // Commit or rollback + // Commit or rollback if ($error) { foreach ($this->errors as $errmsg) { - dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + dol_syslog(__METHOD__." ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -474,8 +466,8 @@ class CommandeFournisseurDispatch extends CommonObject /** * Load an object from its id and create a new one in database * - * @param User $user User making the clone - * @param int $fromid Id of object to clone + * @param User $user User making the clone + * @param int $fromid Id of object to clone * @return int New id of clone */ public function createFromClone(User $user, $fromid) @@ -516,9 +508,7 @@ class CommandeFournisseurDispatch extends CommonObject { $this->db->commit(); return $object->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -526,62 +516,57 @@ class CommandeFournisseurDispatch extends CommonObject - /** - * Return label of the status of object - * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto - * @return string Label - */ - public function getLibStatut($mode = 0) - { - return $this->LibStatut($this->status, $mode); - } + /** + * Return label of the status of object + * + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto + * @return string Label + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->status, $mode); + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return label of a status - * - * @param int $status Id status - * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto - * @return string Label of status - */ - public function LibStatut($status, $mode = 0) - { - // phpcs:enable - global $langs; - $langs->load('orders'); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return label of a status + * + * @param int $status Id status + * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto + * @return string Label of status + */ + public function LibStatut($status, $mode = 0) + { + // phpcs:enable + global $langs; + $langs->load('orders'); - if ($mode == 0) - { - return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) - { - return $langs->trans($this->statutshort[$status]); - } - elseif ($mode == 2) - { - return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 3) - { - if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut0'); - elseif ($status == 1) return img_picto($langs->trans($this->statuts[$status]), 'statut4'); - elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); - } - elseif ($mode == 4) - { - if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 1) return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); - } - elseif ($mode == 5) - { - if ($status == 0) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); - elseif ($status == 1) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); - elseif ($status == 2) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); - } - } + if ($mode == 0) + { + return $langs->trans($this->statuts[$status]); + } elseif ($mode == 1) + { + return $langs->trans($this->statutshort[$status]); + } elseif ($mode == 2) + { + return $langs->trans($this->statuts[$status]); + } elseif ($mode == 3) + { + if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status == 1) return img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut8'); + } elseif ($mode == 4) + { + if ($status == 0) return img_picto($langs->trans($this->statuts[$status]), 'statut0').' '.$langs->trans($this->statuts[$status]); + elseif ($status == 1) return img_picto($langs->trans($this->statuts[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); + elseif ($status == 2) return img_picto($langs->trans($this->statuts[$status]), 'statut8').' '.$langs->trans($this->statuts[$status]); + } elseif ($mode == 5) + { + if ($status == 0) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut0'); + elseif ($status == 1) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut4'); + elseif ($status == 2) return ''.$langs->trans($this->statutshort[$status]).' '.img_picto($langs->trans($this->statuts[$status]), 'statut8'); + } + } /** @@ -642,7 +627,7 @@ class CommandeFournisseurDispatch extends CommonObject $sql .= " t.eatby,"; $sql .= " t.sellby"; - $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; + $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; // Manage filter $sqlwhere = array(); @@ -691,7 +676,7 @@ class CommandeFournisseurDispatch extends CommonObject $line->batch = $obj->batch; $line->eatby = $this->db->jdate($obj->eatby); $line->sellby = $this->db->jdate($obj->sellby); - $line->fetch_optionals(); + $line->fetch_optionals(); $this->lines[$line->id] = $line; } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 99d906edf47..264832cadc2 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -34,7 +34,7 @@ * \brief File of class to manage suppliers invoices */ -include_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/commoninvoice.class.php'; require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; @@ -43,54 +43,54 @@ require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; */ class FactureFournisseur extends CommonInvoice { - /** + /** * @var string ID to identify managed object */ public $element = 'invoice_supplier'; - /** - * @var string Name of table without prefix where object is stored - */ - public $table_element = 'facture_fourn'; + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'facture_fourn'; - /** - * @var int Name of subtable line - */ - public $table_element_line = 'facture_fourn_det'; + /** + * @var int Name of subtable line + */ + public $table_element_line = 'facture_fourn_det'; - /** - * @var int Field with ID of parent key if this field has a parent - */ - public $fk_element = 'fk_facture_fourn'; + /** + * @var int Field with ID of parent key if this field has a parent + */ + public $fk_element = 'fk_facture_fourn'; - /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto = 'supplier_invoice'; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'supplier_invoice'; - /** - * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe - * @var int - */ - public $ismultientitymanaged = 1; + /** + * 0=No test on entity, 1=Test with field entity, 2=Test with link by societe + * @var int + */ + public $ismultientitymanaged = 1; - /** - * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user - * @var integer - */ - public $restrictiononfksoc = 1; + /** + * 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user + * @var integer + */ + public $restrictiononfksoc = 1; - /** - * {@inheritdoc} - */ - protected $table_ref_field = 'ref'; + /** + * {@inheritdoc} + */ + protected $table_ref_field = 'ref'; - /** + /** * @var int ID */ public $rowid; - /** + /** * @var string Ref */ public $ref; @@ -98,265 +98,257 @@ class FactureFournisseur extends CommonInvoice public $label; public $libelle; // @deprecated - public $product_ref; - public $ref_supplier; - public $socid; - //Check constants for types - public $type = self::TYPE_STANDARD; + public $product_ref; + public $ref_supplier; + public $socid; + //Check constants for types + public $type = self::TYPE_STANDARD; /** * Supplier invoice status * @var int * @see FactureFournisseur::STATUS_DRAFT, FactureFournisseur::STATUS_VALIDATED, FactureFournisseur::STATUS_PAID, FactureFournisseur::STATUS_ABANDONED */ - public $statut; + public $statut; - /** - * Set to 1 if the invoice is completely paid, otherwise is 0 - * @var int - * @deprecated Use statuses stored in self::statut - */ - public $paye; + /** + * Set to 1 if the invoice is completely paid, otherwise is 0 + * @var int + * @deprecated Use statuses stored in self::statut + */ + public $paye; - public $author; + public $author; - /** - * Date creation record (datec) - * - * @var integer - */ - public $datec; + /** + * Date creation record (datec) + * + * @var integer + */ + public $datec; - /** - * Date modification record (tms) - * - * @var integer - */ - public $tms; + /** + * Date modification record (tms) + * + * @var integer + */ + public $tms; - /** - * Invoice date (date) - * - * @var integer - */ - public $date; + /** + * Invoice date (date) + * + * @var integer + */ + public $date; - /** - * Max payment date (date_echeance) - * - * @var integer - */ - public $date_echeance; + /** + * Max payment date (date_echeance) + * + * @var integer + */ + public $date_echeance; - public $amount = 0; - public $remise = 0; - public $tva = 0; - public $localtax1; - public $localtax2; - public $total_ht = 0; - public $total_tva = 0; - public $total_localtax1 = 0; - public $total_localtax2 = 0; - public $total_ttc = 0; + public $amount = 0; + public $remise = 0; + public $tva = 0; + public $localtax1; + public $localtax2; + public $total_ht = 0; + public $total_tva = 0; + public $total_localtax1 = 0; + public $total_localtax2 = 0; + public $total_ttc = 0; /** * @deprecated * @see $note_private, $note_public */ - public $note; + public $note; - public $note_private; - public $note_public; - public $propalid; - public $cond_reglement_id; - public $cond_reglement_code; + public $note_private; + public $note_public; + public $propalid; + public $cond_reglement_id; + public $cond_reglement_code; - /** - * @var int ID - */ - public $fk_account; + /** + * @var int ID + */ + public $fk_account; - public $mode_reglement_id; - public $mode_reglement_code; + public $mode_reglement_id; + public $mode_reglement_code; /** * Invoice lines * @var SupplierInvoiceLine[] */ - public $lines = array(); + public $lines = array(); /** * @deprecated */ - public $fournisseur; + public $fournisseur; - /** - * @var int ID Incorterms - */ - public $fk_incoterms; - - public $location_incoterms; - public $label_incoterms; //Used into tooltip - - public $extraparams = array(); + public $extraparams = array(); // Multicurrency /** - * @var int ID - */ - public $fk_multicurrency; + * @var int ID + */ + public $fk_multicurrency; - public $multicurrency_code; - public $multicurrency_tx; - public $multicurrency_total_ht; - public $multicurrency_total_tva; - public $multicurrency_total_ttc; - //! id of source var_dump($$this);invoice if replacement invoice or credit note - /** - * @var int ID - */ - public $fk_facture_source; + public $multicurrency_code; + public $multicurrency_tx; + public $multicurrency_total_ht; + public $multicurrency_total_tva; + public $multicurrency_total_ttc; + //! id of source var_dump($$this);invoice if replacement invoice or credit note + /** + * @var int ID + */ + public $fk_facture_source; - public $fields = array( - 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), - 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>15), - 'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefSupplier', 'enabled'=>1, 'visible'=>-1, 'position'=>20), - 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>25, 'index'=>1), - 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>30), - 'type' =>array('type'=>'smallint(6)', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>35), - 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>40), - 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>45), - 'datef' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>-1, 'position'=>50), - 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>55), - 'libelle' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'position'=>60), - 'paye' =>array('type'=>'smallint(6)', 'label'=>'Paye', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>65), - 'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>70), - 'remise' =>array('type'=>'double(24,8)', 'label'=>'Discount', 'enabled'=>1, 'visible'=>-1, 'position'=>75), - 'close_code' =>array('type'=>'varchar(16)', 'label'=>'CloseCode', 'enabled'=>1, 'visible'=>-1, 'position'=>80), - 'close_note' =>array('type'=>'varchar(128)', 'label'=>'CloseNote', 'enabled'=>1, 'visible'=>-1, 'position'=>85), - 'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>90), - 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>95), - 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>100), - 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>105), - 'total_tva' =>array('type'=>'double(24,8)', 'label'=>'TotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>110), - 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>115), - 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>125), - 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>130), - 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>135), - 'fk_facture_source' =>array('type'=>'integer', 'label'=>'Fk facture source', 'enabled'=>1, 'visible'=>-1, 'position'=>140), - 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>1, 'visible'=>-1, 'position'=>145), - 'fk_account' =>array('type'=>'integer', 'label'=>'Account', 'enabled'=>1, 'visible'=>-1, 'position'=>150), - 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>155), - 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>160), - 'date_lim_reglement' =>array('type'=>'date', 'label'=>'DateLimReglement', 'enabled'=>1, 'visible'=>-1, 'position'=>165), - 'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>170), - 'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>175), - 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPdf', 'enabled'=>1, 'visible'=>0, 'position'=>180), - 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>190), - 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>-1, 'position'=>195), - 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>-1, 'position'=>200), - 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'MulticurrencyId', 'enabled'=>1, 'visible'=>-1, 'position'=>205), - 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCode', 'enabled'=>1, 'visible'=>-1, 'position'=>210), - 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>1, 'visible'=>-1, 'position'=>215), - 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>220), - 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>225), - 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>230), - 'date_pointoftax' =>array('type'=>'date', 'label'=>'Date pointoftax', 'enabled'=>1, 'visible'=>-1, 'position'=>235), - 'date_valid' =>array('type'=>'date', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>240), - 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>245), - 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500), - 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900), - ); + public $fields = array( + 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), + 'ref' =>array('type'=>'varchar(255)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>15), + 'ref_supplier' =>array('type'=>'varchar(255)', 'label'=>'RefSupplier', 'enabled'=>1, 'visible'=>-1, 'position'=>20), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>25, 'index'=>1), + 'ref_ext' =>array('type'=>'varchar(255)', 'label'=>'RefExt', 'enabled'=>1, 'visible'=>0, 'position'=>30), + 'type' =>array('type'=>'smallint(6)', 'label'=>'Type', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>35), + 'fk_soc' =>array('type'=>'integer:Societe:societe/class/societe.class.php', 'label'=>'ThirdParty', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>40), + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'position'=>45), + 'datef' =>array('type'=>'date', 'label'=>'Date', 'enabled'=>1, 'visible'=>-1, 'position'=>50), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>55), + 'libelle' =>array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'position'=>60), + 'paye' =>array('type'=>'smallint(6)', 'label'=>'Paye', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>65), + 'amount' =>array('type'=>'double(24,8)', 'label'=>'Amount', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>70), + 'remise' =>array('type'=>'double(24,8)', 'label'=>'Discount', 'enabled'=>1, 'visible'=>-1, 'position'=>75), + 'close_code' =>array('type'=>'varchar(16)', 'label'=>'CloseCode', 'enabled'=>1, 'visible'=>-1, 'position'=>80), + 'close_note' =>array('type'=>'varchar(128)', 'label'=>'CloseNote', 'enabled'=>1, 'visible'=>-1, 'position'=>85), + 'tva' =>array('type'=>'double(24,8)', 'label'=>'Tva', 'enabled'=>1, 'visible'=>-1, 'position'=>90), + 'localtax1' =>array('type'=>'double(24,8)', 'label'=>'Localtax1', 'enabled'=>1, 'visible'=>-1, 'position'=>95), + 'localtax2' =>array('type'=>'double(24,8)', 'label'=>'Localtax2', 'enabled'=>1, 'visible'=>-1, 'position'=>100), + 'total_ht' =>array('type'=>'double(24,8)', 'label'=>'TotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>105), + 'total_tva' =>array('type'=>'double(24,8)', 'label'=>'TotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>110), + 'total_ttc' =>array('type'=>'double(24,8)', 'label'=>'TotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>115), + 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-1, 'position'=>125), + 'fk_user_modif' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>130), + 'fk_user_valid' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>135), + 'fk_facture_source' =>array('type'=>'integer', 'label'=>'Fk facture source', 'enabled'=>1, 'visible'=>-1, 'position'=>140), + 'fk_projet' =>array('type'=>'integer:Project:projet/class/project.class.php:1:fk_statut=1', 'label'=>'Project', 'enabled'=>1, 'visible'=>-1, 'position'=>145), + 'fk_account' =>array('type'=>'integer', 'label'=>'Account', 'enabled'=>1, 'visible'=>-1, 'position'=>150), + 'fk_cond_reglement' =>array('type'=>'integer', 'label'=>'PaymentTerm', 'enabled'=>1, 'visible'=>-1, 'position'=>155), + 'fk_mode_reglement' =>array('type'=>'integer', 'label'=>'PaymentMode', 'enabled'=>1, 'visible'=>-1, 'position'=>160), + 'date_lim_reglement' =>array('type'=>'date', 'label'=>'DateLimReglement', 'enabled'=>1, 'visible'=>-1, 'position'=>165), + 'note_private' =>array('type'=>'text', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>0, 'position'=>170), + 'note_public' =>array('type'=>'text', 'label'=>'NotePrivate', 'enabled'=>1, 'visible'=>0, 'position'=>175), + 'model_pdf' =>array('type'=>'varchar(255)', 'label'=>'ModelPdf', 'enabled'=>1, 'visible'=>0, 'position'=>180), + 'extraparams' =>array('type'=>'varchar(255)', 'label'=>'Extraparams', 'enabled'=>1, 'visible'=>-1, 'position'=>190), + 'fk_incoterms' =>array('type'=>'integer', 'label'=>'IncotermCode', 'enabled'=>1, 'visible'=>-1, 'position'=>195), + 'location_incoterms' =>array('type'=>'varchar(255)', 'label'=>'IncotermLocation', 'enabled'=>1, 'visible'=>-1, 'position'=>200), + 'fk_multicurrency' =>array('type'=>'integer', 'label'=>'MulticurrencyId', 'enabled'=>1, 'visible'=>-1, 'position'=>205), + 'multicurrency_code' =>array('type'=>'varchar(255)', 'label'=>'MulticurrencyCode', 'enabled'=>1, 'visible'=>-1, 'position'=>210), + 'multicurrency_tx' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyRate', 'enabled'=>1, 'visible'=>-1, 'position'=>215), + 'multicurrency_total_ht' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalHT', 'enabled'=>1, 'visible'=>-1, 'position'=>220), + 'multicurrency_total_tva' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalVAT', 'enabled'=>1, 'visible'=>-1, 'position'=>225), + 'multicurrency_total_ttc' =>array('type'=>'double(24,8)', 'label'=>'MulticurrencyTotalTTC', 'enabled'=>1, 'visible'=>-1, 'position'=>230), + 'date_pointoftax' =>array('type'=>'date', 'label'=>'Date pointoftax', 'enabled'=>1, 'visible'=>-1, 'position'=>235), + 'date_valid' =>array('type'=>'date', 'label'=>'DateValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>240), + 'last_main_doc' =>array('type'=>'varchar(255)', 'label'=>'Last main doc', 'enabled'=>1, 'visible'=>-1, 'position'=>245), + 'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>500), + 'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>900), + ); - /** - * Standard invoice - */ - const TYPE_STANDARD = 0; + /** + * Standard invoice + */ + const TYPE_STANDARD = 0; - /** - * Replacement invoice - */ - const TYPE_REPLACEMENT = 1; + /** + * Replacement invoice + */ + const TYPE_REPLACEMENT = 1; - /** - * Credit note invoice - */ - const TYPE_CREDIT_NOTE = 2; + /** + * Credit note invoice + */ + const TYPE_CREDIT_NOTE = 2; - /** - * Deposit invoice - */ - const TYPE_DEPOSIT = 3; + /** + * Deposit invoice + */ + const TYPE_DEPOSIT = 3; - /** - * Draft - */ - const STATUS_DRAFT = 0; + /** + * Draft + */ + const STATUS_DRAFT = 0; - /** - * Validated (need to be paid) - */ - const STATUS_VALIDATED = 1; + /** + * Validated (need to be paid) + */ + const STATUS_VALIDATED = 1; - /** - * Classified paid. - * If paid partially, $this->close_code can be: - * - CLOSECODE_DISCOUNTVAT - * - CLOSECODE_BADDEBT - * If paid completelly, this->close_code will be null - */ - const STATUS_CLOSED = 2; + /** + * Classified paid. + * If paid partially, $this->close_code can be: + * - CLOSECODE_DISCOUNTVAT + * - CLOSECODE_BADDEBT + * If paid completelly, this->close_code will be null + */ + const STATUS_CLOSED = 2; - /** - * Classified abandoned and no payment done. - * $this->close_code can be: - * - CLOSECODE_BADDEBT - * - CLOSECODE_ABANDONED - * - CLOSECODE_REPLACED - */ - const STATUS_ABANDONED = 3; + /** + * Classified abandoned and no payment done. + * $this->close_code can be: + * - CLOSECODE_BADDEBT + * - CLOSECODE_ABANDONED + * - CLOSECODE_REPLACED + */ + const STATUS_ABANDONED = 3; const CLOSECODE_DISCOUNTVAT = 'discount_vat'; const CLOSECODE_BADCREDIT = 'badsupplier'; const CLOSECODE_ABANDONED = 'abandon'; const CLOSECODE_REPLACED = 'replaced'; - /** + /** * Constructor * * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; + */ + public function __construct($db) + { + $this->db = $db; - $this->products = array(); - } + $this->products = array(); + } - /** - * Create supplier invoice into database - * - * @param User $user object utilisateur qui cree - * @return int Id invoice created if OK, < 0 if KO - */ - public function create($user) - { - global $langs, $conf, $hookmanager; + /** + * Create supplier invoice into database + * + * @param User $user object utilisateur qui cree + * @return int Id invoice created if OK, < 0 if KO + */ + public function create($user) + { + global $langs, $conf, $hookmanager; $error = 0; - $now = dol_now(); + $now = dol_now(); - // Clean parameters - if (isset($this->ref_supplier)) $this->ref_supplier = trim($this->ref_supplier); - if (empty($this->type)) $this->type = self::TYPE_STANDARD; - if (empty($this->date)) $this->date = $now; + // Clean parameters + if (isset($this->ref_supplier)) $this->ref_supplier = trim($this->ref_supplier); + if (empty($this->type)) $this->type = self::TYPE_STANDARD; + if (empty($this->date)) $this->date = $now; - $socid = $this->socid; - $ref_supplier = $this->ref_supplier; - $amount = $this->amount; - $remise = $this->remise; + $socid = $this->socid; + $ref_supplier = $this->ref_supplier; + $amount = $this->amount; + $remise = $this->remise; // Multicurrency (test on $this->multicurrency_tx because we should take the default rate only if not using origin rate) if (!empty($this->multicurrency_code) && empty($this->multicurrency_tx)) list($this->fk_multicurrency, $this->multicurrency_tx) = MultiCurrency::getIdAndTxFromCode($this->db, $this->multicurrency_code, $this->date); @@ -368,73 +360,73 @@ class FactureFournisseur extends CommonInvoice $this->multicurrency_tx = 1; } - $this->db->begin(); + $this->db->begin(); - if (!$remise) $remise = 0; + if (!$remise) $remise = 0; - $sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn ("; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."facture_fourn ("; $sql .= "ref"; - $sql .= ", ref_supplier"; - $sql .= ", entity"; - $sql .= ", type"; - $sql .= ", libelle"; - $sql .= ", fk_soc"; - $sql .= ", datec"; - $sql .= ", datef"; + $sql .= ", ref_supplier"; + $sql .= ", entity"; + $sql .= ", type"; + $sql .= ", libelle"; + $sql .= ", fk_soc"; + $sql .= ", datec"; + $sql .= ", datef"; $sql .= ", fk_projet"; $sql .= ", fk_cond_reglement"; $sql .= ", fk_mode_reglement"; - $sql .= ", fk_account"; - $sql .= ", note_private"; - $sql .= ", note_public"; - $sql .= ", fk_user_author"; - $sql .= ", date_lim_reglement"; + $sql .= ", fk_account"; + $sql .= ", note_private"; + $sql .= ", note_public"; + $sql .= ", fk_user_author"; + $sql .= ", date_lim_reglement"; $sql .= ", fk_incoterms, location_incoterms"; - $sql .= ", fk_multicurrency"; - $sql .= ", multicurrency_code"; - $sql .= ", multicurrency_tx"; - $sql .= ", fk_facture_source"; - $sql .= ")"; - $sql .= " VALUES ("; + $sql .= ", fk_multicurrency"; + $sql .= ", multicurrency_code"; + $sql .= ", multicurrency_tx"; + $sql .= ", fk_facture_source"; + $sql .= ")"; + $sql .= " VALUES ("; $sql .= "'(PROV)'"; - $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; - $sql .= ", ".$conf->entity; - $sql .= ", '".$this->db->escape($this->type)."'"; - $sql .= ", '".$this->db->escape($this->label ? $this->label : $this->libelle)."'"; - $sql .= ", ".$this->socid; - $sql .= ", '".$this->db->idate($now)."'"; - $sql .= ", '".$this->db->idate($this->date)."'"; + $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; + $sql .= ", ".$conf->entity; + $sql .= ", '".$this->db->escape($this->type)."'"; + $sql .= ", '".$this->db->escape($this->label ? $this->label : $this->libelle)."'"; + $sql .= ", ".$this->socid; + $sql .= ", '".$this->db->idate($now)."'"; + $sql .= ", '".$this->db->idate($this->date)."'"; $sql .= ", ".($this->fk_project > 0 ? $this->fk_project : "null"); $sql .= ", ".($this->cond_reglement_id > 0 ? $this->cond_reglement_id : "null"); $sql .= ", ".($this->mode_reglement_id > 0 ? $this->mode_reglement_id : "null"); - $sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL'); - $sql .= ", '".$this->db->escape($this->note_private)."'"; - $sql .= ", '".$this->db->escape($this->note_public)."'"; - $sql .= ", ".$user->id.","; - $sql .= $this->date_echeance != '' ? "'".$this->db->idate($this->date_echeance)."'" : "null"; + $sql .= ", ".($this->fk_account > 0 ? $this->fk_account : 'NULL'); + $sql .= ", '".$this->db->escape($this->note_private)."'"; + $sql .= ", '".$this->db->escape($this->note_public)."'"; + $sql .= ", ".$user->id.","; + $sql .= $this->date_echeance != '' ? "'".$this->db->idate($this->date_echeance)."'" : "null"; $sql .= ", ".(int) $this->fk_incoterms; - $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; + $sql .= ", '".$this->db->escape($this->location_incoterms)."'"; $sql .= ", ".(int) $this->fk_multicurrency; $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; $sql .= ", ".(double) $this->multicurrency_tx; - $sql .= ", ".(isset($this->fk_facture_source) ? $this->fk_facture_source : "NULL"); - $sql .= ")"; + $sql .= ", ".(isset($this->fk_facture_source) ? $this->fk_facture_source : "NULL"); + $sql .= ")"; - dol_syslog(get_class($this)."::create", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn'); + dol_syslog(get_class($this)."::create", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn'); - // Update ref with new one - $this->ref = '(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX."facture_fourn SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id; + // Update ref with new one + $this->ref = '(PROV'.$this->id.')'; + $sql = 'UPDATE '.MAIN_DB_PREFIX."facture_fourn SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id; - dol_syslog(get_class($this)."::create", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) $error++; + dol_syslog(get_class($this)."::create", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) $error++; - if (!empty($this->linkedObjectsIds) && empty($this->linked_objects)) // To use new linkedObjectsIds instead of old linked_objects + if (!empty($this->linkedObjectsIds) && empty($this->linked_objects)) // To use new linkedObjectsIds instead of old linked_objects { $this->linked_objects = $this->linkedObjectsIds; // TODO Replace linked_objects with linkedObjectsIds } @@ -444,121 +436,115 @@ class FactureFournisseur extends CommonInvoice { foreach ($this->linked_objects as $origin => $tmp_origin_id) { - if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) - { - foreach ($tmp_origin_id as $origin_id) - { - $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { - dol_print_error($this->db); - $error++; - } - } - } - else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) - { - $origin_id = $tmp_origin_id; - $ret = $this->add_object_linked($origin, $origin_id); - if (!$ret) - { - dol_print_error($this->db); - $error++; - } - } + if (is_array($tmp_origin_id)) // New behaviour, if linked_object can have several links per type, so is something like array('contract'=>array(id1, id2, ...)) + { + foreach ($tmp_origin_id as $origin_id) + { + $ret = $this->add_object_linked($origin, $origin_id); + if (!$ret) + { + dol_print_error($this->db); + $error++; + } + } + } else // Old behaviour, if linked_object has only one link per type, so is something like array('contract'=>id1)) + { + $origin_id = $tmp_origin_id; + $ret = $this->add_object_linked($origin, $origin_id); + if (!$ret) + { + dol_print_error($this->db); + $error++; + } + } } } if (count($this->lines) && is_object($this->lines[0])) // If this->lines is array of InvoiceLines (preferred mode) { dol_syslog("There is ".count($this->lines)." lines that are invoice lines objects"); - foreach ($this->lines as $i => $val) - { - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn, special_code)'; - $sql .= ' VALUES ('.$this->id.','.intval($this->lines[$i]->special_code).')'; + foreach ($this->lines as $i => $val) + { + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn, special_code)'; + $sql .= ' VALUES ('.$this->id.','.intval($this->lines[$i]->special_code).')'; - $resql_insert = $this->db->query($sql); - if ($resql_insert) - { - $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); + $resql_insert = $this->db->query($sql); + if ($resql_insert) + { + $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); - $this->updateline( - $idligne, - $this->lines[$i]->description, - $this->lines[$i]->pu_ht, - $this->lines[$i]->tva_tx.($this->lines[$i]->vat_src_code ? ' ('.$this->lines[$i]->vat_src_code.')' : ''), - $this->lines[$i]->localtax1_tx, - $this->lines[$i]->localtax2_tx, - $this->lines[$i]->qty, - $this->lines[$i]->fk_product, - 'HT', - (!empty($this->lines[$i]->info_bits) ? $this->lines[$i]->info_bits : ''), - $this->lines[$i]->product_type, - $this->lines[$i]->remise_percent, - false, - $this->lines[$i]->date_start, - $this->lines[$i]->date_end, - $this->lines[$i]->array_options, - $this->lines[$i]->fk_unit, - $this->lines[$i]->pu_ht_devise - ); - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -5; - } - } - } - else // If this->lines is an array of invoice line arrays + $this->updateline( + $idligne, + $this->lines[$i]->description, + $this->lines[$i]->pu_ht, + $this->lines[$i]->tva_tx.($this->lines[$i]->vat_src_code ? ' ('.$this->lines[$i]->vat_src_code.')' : ''), + $this->lines[$i]->localtax1_tx, + $this->lines[$i]->localtax2_tx, + $this->lines[$i]->qty, + $this->lines[$i]->fk_product, + 'HT', + (!empty($this->lines[$i]->info_bits) ? $this->lines[$i]->info_bits : ''), + $this->lines[$i]->product_type, + $this->lines[$i]->remise_percent, + false, + $this->lines[$i]->date_start, + $this->lines[$i]->date_end, + $this->lines[$i]->array_options, + $this->lines[$i]->fk_unit, + $this->lines[$i]->pu_ht_devise + ); + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -5; + } + } + } else // If this->lines is an array of invoice line arrays { - dol_syslog("There is ".count($this->lines)." lines that are array lines"); - foreach ($this->lines as $i => $val) - { - $line = $this->lines[$i]; + dol_syslog("There is ".count($this->lines)." lines that are array lines"); + foreach ($this->lines as $i => $val) + { + $line = $this->lines[$i]; - // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array - //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. - if (!is_object($line)) $line = (object) $line; + // Test and convert into object this->lines[$i]. When coming from REST API, we may still have an array + //if (! is_object($line)) $line=json_decode(json_encode($line), false); // convert recursively array into object. + if (!is_object($line)) $line = (object) $line; - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn, special_code)'; - $sql .= ' VALUES ('.$this->id.','.intval($this->lines[$i]->special_code).')'; + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'facture_fourn_det (fk_facture_fourn, special_code)'; + $sql .= ' VALUES ('.$this->id.','.intval($this->lines[$i]->special_code).')'; - $resql_insert = $this->db->query($sql); - if ($resql_insert) - { - $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); + $resql_insert = $this->db->query($sql); + if ($resql_insert) + { + $idligne = $this->db->last_insert_id(MAIN_DB_PREFIX.'facture_fourn_det'); - $this->updateline( - $idligne, - $line->description, - $line->pu_ht, - $line->tva_tx, - $line->localtax1_tx, - $line->localtax2_tx, - $line->qty, - $line->fk_product, - 'HT', - (!empty($line->info_bits) ? $line->info_bits : ''), - $line->product_type - ); - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -5; - } - } + $this->updateline( + $idligne, + $line->description, + $line->pu_ht, + $line->tva_tx, + $line->localtax1_tx, + $line->localtax2_tx, + $line->qty, + $line->fk_product, + 'HT', + (!empty($line->info_bits) ? $line->info_bits : ''), + $line->product_type + ); + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -5; + } + } } - // Update total price - $result = $this->update_price(); - if ($result > 0) - { + // Update total price + $result = $this->update_price(); + if ($result > 0) + { // Actions on extra fields - if (!$error) + if (!$error) { $result = $this->insertExtraFields(); // This also set $this->error or $this->errors if errors are found if ($result < 0) @@ -569,163 +555,155 @@ class FactureFournisseur extends CommonInvoice if (!$error) { - // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_CREATE', $user); - if ($result < 0) $error++; - // End call triggers + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_CREATE', $user); + if ($result < 0) $error++; + // End call triggers } - if (!$error) - { - $this->db->commit(); - return $this->id; - } - else - { - $this->db->rollback(); - return -4; - } - } - else - { - $this->error = $langs->trans('FailedToUpdatePrice'); - $this->db->rollback(); - return -3; - } - } - else - { - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') - { - $this->error = $langs->trans('ErrorRefAlreadyExists'); - $this->db->rollback(); - return -1; - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -2; - } - } - } + if (!$error) + { + $this->db->commit(); + return $this->id; + } else { + $this->db->rollback(); + return -4; + } + } else { + $this->error = $langs->trans('FailedToUpdatePrice'); + $this->db->rollback(); + return -3; + } + } else { + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') + { + $this->error = $langs->trans('ErrorRefAlreadyExists'); + $this->db->rollback(); + return -1; + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -2; + } + } + } - /** - * Load object in memory from database - * - * @param int $id Id supplier invoice - * @param string $ref Ref supplier invoice - * @return int <0 if KO, >0 if OK, 0 if not found - */ - public function fetch($id = '', $ref = '') - { - global $langs; + /** + * Load object in memory from database + * + * @param int $id Id supplier invoice + * @param string $ref Ref supplier invoice + * @return int <0 if KO, >0 if OK, 0 if not found + */ + public function fetch($id = '', $ref = '') + { + global $langs; - $sql = "SELECT"; - $sql .= " t.rowid,"; + $sql = "SELECT"; + $sql .= " t.rowid,"; $sql .= " t.ref,"; - $sql .= " t.ref_supplier,"; - $sql .= " t.entity,"; - $sql .= " t.type,"; - $sql .= " t.fk_soc,"; - $sql .= " t.datec,"; - $sql .= " t.datef,"; - $sql .= " t.tms,"; - $sql .= " t.libelle as label,"; - $sql .= " t.paye,"; - $sql .= " t.amount,"; - $sql .= " t.remise,"; - $sql .= " t.close_code,"; - $sql .= " t.close_note,"; - $sql .= " t.tva,"; - $sql .= " t.localtax1,"; - $sql .= " t.localtax2,"; - $sql .= " t.total_ht,"; - $sql .= " t.total_tva,"; - $sql .= " t.total_ttc,"; - $sql .= " t.fk_statut,"; - $sql .= " t.fk_user_author,"; - $sql .= " t.fk_user_valid,"; - $sql .= " t.fk_facture_source,"; - $sql .= " t.fk_projet as fk_project,"; - $sql .= " t.fk_cond_reglement,"; - $sql .= " t.fk_account,"; - $sql .= " t.fk_mode_reglement,"; - $sql .= " t.date_lim_reglement,"; - $sql .= " t.note_private,"; - $sql .= " t.note_public,"; - $sql .= " t.model_pdf,"; - $sql .= " t.import_key,"; - $sql .= " t.extraparams,"; - $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle,"; - $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle,"; - $sql .= ' s.nom as socnom, s.rowid as socid,'; - $sql .= ' t.fk_incoterms, t.location_incoterms,'; - $sql .= " i.libelle as label_incoterms,"; - $sql .= ' t.fk_multicurrency, t.multicurrency_code, t.multicurrency_tx, t.multicurrency_total_ht, t.multicurrency_total_tva, t.multicurrency_total_ttc'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as t'; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (t.fk_soc = s.rowid)"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_payment_term as cr ON t.fk_cond_reglement = cr.rowid"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON t.fk_mode_reglement = p.id"; + $sql .= " t.ref_supplier,"; + $sql .= " t.entity,"; + $sql .= " t.type,"; + $sql .= " t.fk_soc,"; + $sql .= " t.datec,"; + $sql .= " t.datef,"; + $sql .= " t.tms,"; + $sql .= " t.libelle as label,"; + $sql .= " t.paye,"; + $sql .= " t.amount,"; + $sql .= " t.remise,"; + $sql .= " t.close_code,"; + $sql .= " t.close_note,"; + $sql .= " t.tva,"; + $sql .= " t.localtax1,"; + $sql .= " t.localtax2,"; + $sql .= " t.total_ht,"; + $sql .= " t.total_tva,"; + $sql .= " t.total_ttc,"; + $sql .= " t.fk_statut,"; + $sql .= " t.fk_user_author,"; + $sql .= " t.fk_user_valid,"; + $sql .= " t.fk_facture_source,"; + $sql .= " t.fk_projet as fk_project,"; + $sql .= " t.fk_cond_reglement,"; + $sql .= " t.fk_account,"; + $sql .= " t.fk_mode_reglement,"; + $sql .= " t.date_lim_reglement,"; + $sql .= " t.note_private,"; + $sql .= " t.note_public,"; + $sql .= " t.model_pdf,"; + $sql .= " t.import_key,"; + $sql .= " t.extraparams,"; + $sql .= " cr.code as cond_reglement_code, cr.libelle as cond_reglement_libelle,"; + $sql .= " p.code as mode_reglement_code, p.libelle as mode_reglement_libelle,"; + $sql .= ' s.nom as socnom, s.rowid as socid,'; + $sql .= ' t.fk_incoterms, t.location_incoterms,'; + $sql .= " i.libelle as label_incoterms,"; + $sql .= ' t.fk_multicurrency, t.multicurrency_code, t.multicurrency_tx, t.multicurrency_total_ht, t.multicurrency_total_tva, t.multicurrency_total_ttc'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as t'; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON (t.fk_soc = s.rowid)"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_payment_term as cr ON t.fk_cond_reglement = cr.rowid"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON t.fk_mode_reglement = p.id"; $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON t.fk_incoterms = i.rowid'; - if ($id) $sql .= " WHERE t.rowid=".$id; - if ($ref) $sql .= " WHERE t.ref='".$this->db->escape($ref)."' AND t.entity IN (".getEntity('supplier_invoice').")"; + if ($id) $sql .= " WHERE t.rowid=".$id; + if ($ref) $sql .= " WHERE t.ref='".$this->db->escape($ref)."' AND t.entity IN (".getEntity('supplier_invoice').")"; - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { - $obj = $this->db->fetch_object($resql); + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); - $this->id = $obj->rowid; - $this->ref = $obj->ref ? $obj->ref : $obj->rowid; // We take rowid if ref is empty for backward compatibility + $this->id = $obj->rowid; + $this->ref = $obj->ref ? $obj->ref : $obj->rowid; // We take rowid if ref is empty for backward compatibility - $this->ref_supplier = $obj->ref_supplier; - $this->entity = $obj->entity; - $this->type = empty($obj->type) ? self::TYPE_STANDARD : $obj->type; - $this->fk_soc = $obj->fk_soc; - $this->datec = $this->db->jdate($obj->datec); - $this->date = $this->db->jdate($obj->datef); - $this->datep = $this->db->jdate($obj->datef); - $this->tms = $this->db->jdate($obj->tms); - $this->libelle = $obj->label; // deprecated - $this->label = $obj->label; - $this->paye = $obj->paye; - $this->paid = $obj->paye; - $this->amount = $obj->amount; - $this->remise = $obj->remise; - $this->close_code = $obj->close_code; - $this->close_note = $obj->close_note; - $this->tva = $obj->tva; - $this->total_localtax1 = $obj->localtax1; - $this->total_localtax2 = $obj->localtax2; - $this->total_ht = $obj->total_ht; - $this->total_tva = $obj->total_tva; - $this->total_ttc = $obj->total_ttc; - $this->fk_statut = $obj->fk_statut; - $this->statut = $obj->fk_statut; - $this->fk_user_author = $obj->fk_user_author; - $this->author = $obj->fk_user_author; - $this->fk_user_valid = $obj->fk_user_valid; - $this->fk_facture_source = $obj->fk_facture_source; - $this->fk_project = $obj->fk_project; - $this->cond_reglement_id = $obj->fk_cond_reglement; - $this->cond_reglement_code = $obj->cond_reglement_code; - $this->cond_reglement = $obj->cond_reglement_libelle; - $this->cond_reglement_doc = $obj->cond_reglement_libelle; - $this->fk_account = $obj->fk_account; - $this->mode_reglement_id = $obj->fk_mode_reglement; - $this->mode_reglement_code = $obj->mode_reglement_code; - $this->mode_reglement = $obj->mode_reglement_libelle; - $this->date_echeance = $this->db->jdate($obj->date_lim_reglement); - $this->note = $obj->note_private; // deprecated - $this->note_private = $obj->note_private; - $this->note_public = $obj->note_public; - $this->model_pdf = $obj->model_pdf; - $this->modelpdf = $obj->model_pdf; - $this->import_key = $obj->import_key; + $this->ref_supplier = $obj->ref_supplier; + $this->entity = $obj->entity; + $this->type = empty($obj->type) ? self::TYPE_STANDARD : $obj->type; + $this->fk_soc = $obj->fk_soc; + $this->datec = $this->db->jdate($obj->datec); + $this->date = $this->db->jdate($obj->datef); + $this->datep = $this->db->jdate($obj->datef); + $this->tms = $this->db->jdate($obj->tms); + $this->libelle = $obj->label; // deprecated + $this->label = $obj->label; + $this->paye = $obj->paye; + $this->paid = $obj->paye; + $this->amount = $obj->amount; + $this->remise = $obj->remise; + $this->close_code = $obj->close_code; + $this->close_note = $obj->close_note; + $this->tva = $obj->tva; + $this->total_localtax1 = $obj->localtax1; + $this->total_localtax2 = $obj->localtax2; + $this->total_ht = $obj->total_ht; + $this->total_tva = $obj->total_tva; + $this->total_ttc = $obj->total_ttc; + $this->fk_statut = $obj->fk_statut; + $this->statut = $obj->fk_statut; + $this->fk_user_author = $obj->fk_user_author; + $this->author = $obj->fk_user_author; + $this->fk_user_valid = $obj->fk_user_valid; + $this->fk_facture_source = $obj->fk_facture_source; + $this->fk_project = $obj->fk_project; + $this->cond_reglement_id = $obj->fk_cond_reglement; + $this->cond_reglement_code = $obj->cond_reglement_code; + $this->cond_reglement = $obj->cond_reglement_libelle; + $this->cond_reglement_doc = $obj->cond_reglement_libelle; + $this->fk_account = $obj->fk_account; + $this->mode_reglement_id = $obj->fk_mode_reglement; + $this->mode_reglement_code = $obj->mode_reglement_code; + $this->mode_reglement = $obj->mode_reglement_libelle; + $this->date_echeance = $this->db->jdate($obj->date_lim_reglement); + $this->note = $obj->note_private; // deprecated + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated + $this->import_key = $obj->import_key; //Incoterms $this->fk_incoterms = $obj->fk_incoterms; @@ -740,116 +718,116 @@ class FactureFournisseur extends CommonInvoice $this->multicurrency_total_tva = $obj->multicurrency_total_tva; $this->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - $this->extraparams = (array) json_decode($obj->extraparams, true); + $this->extraparams = (array) json_decode($obj->extraparams, true); - $this->socid = $obj->socid; - $this->socnom = $obj->socnom; + $this->socid = $obj->socid; + $this->socnom = $obj->socnom; - // Retreive all extrafield - // fetch optionals attributes and labels - $this->fetch_optionals(); + // Retreive all extrafield + // fetch optionals attributes and labels + $this->fetch_optionals(); - if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1; + if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1; - $result = $this->fetch_lines(); - if ($result < 0) - { - $this->error = $this->db->lasterror(); - return -3; - } - } - else - { - $this->error = 'Bill with id '.$id.' not found'; - dol_syslog(get_class($this).'::fetch '.$this->error); - return 0; - } + $result = $this->fetch_lines(); + if ($result < 0) + { + $this->error = $this->db->lasterror(); + return -3; + } + } else { + $this->error = 'Bill with id '.$id.' not found'; + dol_syslog(get_class($this).'::fetch '.$this->error); + return 0; + } - $this->db->free($resql); - return 1; - } - else - { - $this->error = "Error ".$this->db->lasterror(); - return -1; - } - } + $this->db->free($resql); + return 1; + } else { + $this->error = "Error ".$this->db->lasterror(); + return -1; + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Load this->lines - * - * @return int 1 si ok, < 0 si erreur - */ - public function fetch_lines() - { - // phpcs:enable - $this->lines = array(); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Load this->lines + * + * @return int 1 si ok, < 0 si erreur + */ + public function fetch_lines() + { + // phpcs:enable + $this->lines = array(); - $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx'; - $sql .= ', f.localtax1_tx, f.localtax2_tx, f.localtax1_type, f.localtax2_type, f.total_localtax1, f.total_localtax2, f.fk_facture_fourn '; - $sql .= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; - $sql .= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; - $sql .= ', f.fk_multicurrency, f.multicurrency_code, f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; - $sql .= ' WHERE fk_facture_fourn='.$this->id; - $sql .= ' ORDER BY f.rang, f.rowid'; + $sql = 'SELECT f.rowid, f.ref as ref_supplier, f.description, f.date_start, f.date_end, f.pu_ht, f.pu_ttc, f.qty, f.remise_percent, f.vat_src_code, f.tva_tx'; + $sql .= ', f.localtax1_tx, f.localtax2_tx, f.localtax1_type, f.localtax2_type, f.total_localtax1, f.total_localtax2, f.fk_facture_fourn '; + $sql .= ', f.total_ht, f.tva as total_tva, f.total_ttc, f.fk_product, f.product_type, f.info_bits, f.rang, f.special_code, f.fk_parent_line, f.fk_unit'; + $sql .= ', p.rowid as product_id, p.ref as product_ref, p.label as label, p.description as product_desc'; + $sql .= ', fk_code_ventilation, f.fk_multicurrency, f.multicurrency_code, f.multicurrency_subprice, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn_det as f'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON f.fk_product = p.rowid'; + $sql .= ' WHERE fk_facture_fourn='.$this->id; + $sql .= ' ORDER BY f.rang, f.rowid'; - dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); - $resql_rows = $this->db->query($sql); - if ($resql_rows) - { - $num_rows = $this->db->num_rows($resql_rows); - if ($num_rows) - { - $i = 0; - while ($i < $num_rows) - { - $obj = $this->db->fetch_object($resql_rows); + dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); + $resql_rows = $this->db->query($sql); + if ($resql_rows) + { + $num_rows = $this->db->num_rows($resql_rows); + if ($num_rows) + { + $i = 0; + while ($i < $num_rows) + { + $obj = $this->db->fetch_object($resql_rows); - $line = new SupplierInvoiceLine($this->db); + $line = new SupplierInvoiceLine($this->db); - $line->id = $obj->rowid; - $line->rowid = $obj->rowid; - $line->description = $obj->description; - $line->date_start = $obj->date_start; - $line->date_end = $obj->date_end; + $line->id = $obj->rowid; + $line->rowid = $obj->rowid; + $line->description = $obj->description; + $line->date_start = $obj->date_start; + $line->date_end = $obj->date_end; - $line->product_ref = $obj->product_ref; - $line->ref = $obj->product_ref; - $line->ref_supplier = $obj->ref_supplier; - $line->libelle = $obj->label; - $line->label = $obj->label; - $line->product_desc = $obj->product_desc; - $line->subprice = $obj->pu_ht; - $line->pu_ht = $obj->pu_ht; - $line->pu_ttc = $obj->pu_ttc; + $line->product_ref = $obj->product_ref; + $line->ref = $obj->product_ref; + $line->ref_supplier = $obj->ref_supplier; + $line->libelle = $obj->label; + $line->label = $obj->label; + $line->product_desc = $obj->product_desc; + $line->subprice = $obj->pu_ht; + $line->pu_ht = $obj->pu_ht; + $line->pu_ttc = $obj->pu_ttc; - $line->vat_src_code = $obj->vat_src_code; - $line->tva_tx = $obj->tva_tx; - $line->localtax1_tx = $obj->localtax1_tx; - $line->localtax2_tx = $obj->localtax2_tx; - $line->localtax1_type = $obj->localtax1_type; - $line->localtax2_type = $obj->localtax2_type; - $line->qty = $obj->qty; - $line->remise_percent = $obj->remise_percent; - $line->tva = $obj->total_tva; // deprecated - $line->total_ht = $obj->total_ht; - $line->total_ttc = $obj->total_ttc; - $line->total_tva = $obj->total_tva; - $line->total_localtax1 = $obj->total_localtax1; - $line->total_localtax2 = $obj->total_localtax2; - $line->fk_facture_fourn = $obj->fk_facture_fourn; - $line->fk_product = $obj->fk_product; - $line->product_type = $obj->product_type; - $line->product_label = $obj->label; - $line->info_bits = $obj->info_bits; - $line->fk_parent_line = $obj->fk_parent_line; - $line->special_code = $obj->special_code; - $line->rang = $obj->rang; - $line->fk_unit = $obj->fk_unit; + $line->vat_src_code = $obj->vat_src_code; + $line->tva_tx = $obj->tva_tx; + $line->localtax1_tx = $obj->localtax1_tx; + $line->localtax2_tx = $obj->localtax2_tx; + $line->localtax1_type = $obj->localtax1_type; + $line->localtax2_type = $obj->localtax2_type; + $line->qty = $obj->qty; + $line->remise_percent = $obj->remise_percent; + $line->tva = $obj->total_tva; // deprecated + $line->total_ht = $obj->total_ht; + $line->total_ttc = $obj->total_ttc; + $line->total_tva = $obj->total_tva; + $line->total_localtax1 = $obj->total_localtax1; + $line->total_localtax2 = $obj->total_localtax2; + $line->fk_facture_fourn = $obj->fk_facture_fourn; + $line->fk_product = $obj->fk_product; + $line->product_type = $obj->product_type; + $line->product_label = $obj->label; + $line->info_bits = $obj->info_bits; + $line->fk_parent_line = $obj->fk_parent_line; + $line->special_code = $obj->special_code; + $line->rang = $obj->rang; + $line->fk_unit = $obj->fk_unit; + + // Accountancy + $line->code_ventilation = $obj->fk_code_ventilation; + $line->fk_accounting_account = $obj->fk_code_ventilation; // Multicurrency $line->fk_multicurrency = $obj->fk_multicurrency; @@ -859,123 +837,121 @@ class FactureFournisseur extends CommonInvoice $line->multicurrency_total_tva = $obj->multicurrency_total_tva; $line->multicurrency_total_ttc = $obj->multicurrency_total_ttc; - // Extra fields + // Extra fields $line->fetch_optionals(); $this->lines[$i] = $line; - $i++; - } - } - $this->db->free($resql_rows); - return 1; - } - else - { - $this->error = $this->db->error(); - return -3; - } - } + $i++; + } + } + $this->db->free($resql_rows); + return 1; + } else { + $this->error = $this->db->error(); + return -3; + } + } - /** - * Update database - * - * @param User $user User that modify - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 if KO, >0 if OK - */ - public function update($user = null, $notrigger = 0) - { - global $conf, $langs; - $error = 0; + /** + * Update database + * + * @param User $user User that modify + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function update($user = null, $notrigger = 0) + { + global $conf, $langs; + $error = 0; - // Clean parameters - if (empty($this->type)) $this->type = self::TYPE_STANDARD; + // Clean parameters + if (empty($this->type)) $this->type = self::TYPE_STANDARD; if (isset($this->ref)) $this->ref = trim($this->ref); - if (isset($this->ref_supplier)) $this->ref_supplier = trim($this->ref_supplier); - if (isset($this->entity)) $this->entity = trim($this->entity); - if (isset($this->type)) $this->type = trim($this->type); - if (isset($this->fk_soc)) $this->fk_soc = trim($this->fk_soc); - if (isset($this->label)) $this->label = trim($this->label); - if (isset($this->libelle)) $this->libelle = trim($this->libelle); // deprecated - if (isset($this->paye)) $this->paye = trim($this->paye); - if (isset($this->amount)) $this->amount = trim($this->amount); - if (isset($this->remise)) $this->remise = trim($this->remise); - if (isset($this->close_code)) $this->close_code = trim($this->close_code); - if (isset($this->close_note)) $this->close_note = trim($this->close_note); - if (isset($this->tva)) $this->tva = trim($this->tva); - if (isset($this->localtax1)) $this->localtax1 = trim($this->localtax1); - if (isset($this->localtax2)) $this->localtax2 = trim($this->localtax2); - if (empty($this->total_ht)) $this->total_ht = 0; - if (empty($this->total_tva)) $this->total_tva = 0; - // if (isset($this->total_localtax1)) $this->total_localtax1=trim($this->total_localtax1); - // if (isset($this->total_localtax2)) $this->total_localtax2=trim($this->total_localtax2); - if (isset($this->total_ttc)) $this->total_ttc = trim($this->total_ttc); - if (isset($this->statut)) $this->statut = (int) $this->statut; - if (isset($this->author)) $this->author = trim($this->author); - if (isset($this->fk_user_valid)) $this->fk_user_valid = trim($this->fk_user_valid); - if (isset($this->fk_facture_source)) $this->fk_facture_source = trim($this->fk_facture_source); - if (isset($this->fk_project)) $this->fk_project = trim($this->fk_project); - if (isset($this->cond_reglement_id)) $this->cond_reglement_id = trim($this->cond_reglement_id); - if (isset($this->note_private)) $this->note = trim($this->note_private); - if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf); - if (isset($this->import_key)) $this->import_key = trim($this->import_key); + if (isset($this->ref_supplier)) $this->ref_supplier = trim($this->ref_supplier); + if (isset($this->entity)) $this->entity = trim($this->entity); + if (isset($this->type)) $this->type = trim($this->type); + if (isset($this->fk_soc)) $this->fk_soc = trim($this->fk_soc); + if (isset($this->label)) $this->label = trim($this->label); + if (isset($this->libelle)) $this->libelle = trim($this->libelle); // deprecated + if (isset($this->paye)) $this->paye = trim($this->paye); + if (isset($this->amount)) $this->amount = trim($this->amount); + if (isset($this->remise)) $this->remise = trim($this->remise); + if (isset($this->close_code)) $this->close_code = trim($this->close_code); + if (isset($this->close_note)) $this->close_note = trim($this->close_note); + if (isset($this->tva)) $this->tva = trim($this->tva); + if (isset($this->localtax1)) $this->localtax1 = trim($this->localtax1); + if (isset($this->localtax2)) $this->localtax2 = trim($this->localtax2); + if (empty($this->total_ht)) $this->total_ht = 0; + if (empty($this->total_tva)) $this->total_tva = 0; + // if (isset($this->total_localtax1)) $this->total_localtax1=trim($this->total_localtax1); + // if (isset($this->total_localtax2)) $this->total_localtax2=trim($this->total_localtax2); + if (isset($this->total_ttc)) $this->total_ttc = trim($this->total_ttc); + if (isset($this->statut)) $this->statut = (int) $this->statut; + if (isset($this->author)) $this->author = trim($this->author); + if (isset($this->fk_user_valid)) $this->fk_user_valid = trim($this->fk_user_valid); + if (isset($this->fk_facture_source)) $this->fk_facture_source = trim($this->fk_facture_source); + if (isset($this->fk_project)) $this->fk_project = trim($this->fk_project); + if (isset($this->cond_reglement_id)) $this->cond_reglement_id = trim($this->cond_reglement_id); + if (isset($this->note_private)) $this->note = trim($this->note_private); + if (isset($this->note_public)) $this->note_public = trim($this->note_public); + if (isset($this->model_pdf)) $this->model_pdf = trim($this->model_pdf); + if (isset($this->import_key)) $this->import_key = trim($this->import_key); - // Check parameters - // Put here code to add control on parameters values + // Check parameters + // Put here code to add control on parameters values - // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn SET"; + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn SET"; $sql .= " ref=".(isset($this->ref) ? "'".$this->db->escape($this->ref)."'" : "null").","; - $sql .= " ref_supplier=".(isset($this->ref_supplier) ? "'".$this->db->escape($this->ref_supplier)."'" : "null").","; - $sql .= " entity=".(isset($this->entity) ? $this->entity : "null").","; - $sql .= " type=".(isset($this->type) ? $this->type : "null").","; - $sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").","; - $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').","; - $sql .= " datef=".(dol_strlen($this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').","; - if (dol_strlen($this->tms) != 0) $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; - $sql .= " libelle=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; - $sql .= " paye=".(isset($this->paye) ? $this->paye : "null").","; - $sql .= " amount=".(isset($this->amount) ? $this->amount : "null").","; - $sql .= " remise=".(isset($this->remise) ? $this->remise : "null").","; - $sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").","; - $sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").","; - $sql .= " tva=".(isset($this->tva) ? $this->tva : "null").","; - $sql .= " localtax1=".(isset($this->localtax1) ? $this->localtax1 : "null").","; - $sql .= " localtax2=".(isset($this->localtax2) ? $this->localtax2 : "null").","; - $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").","; - $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; - $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; - $sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").","; - $sql .= " fk_user_author=".(isset($this->author) ? $this->author : "null").","; - $sql .= " fk_user_valid=".(isset($this->fk_user_valid) ? $this->fk_user_valid : "null").","; - $sql .= " fk_facture_source=".(isset($this->fk_facture_source) ? $this->fk_facture_source : "null").","; - $sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").","; - $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").","; - $sql .= " date_lim_reglement=".(dol_strlen($this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').","; - $sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; - $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; - $sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").","; - $sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null").""; - $sql .= " WHERE rowid=".$this->id; + $sql .= " ref_supplier=".(isset($this->ref_supplier) ? "'".$this->db->escape($this->ref_supplier)."'" : "null").","; + $sql .= " entity=".(isset($this->entity) ? $this->entity : "null").","; + $sql .= " type=".(isset($this->type) ? $this->type : "null").","; + $sql .= " fk_soc=".(isset($this->fk_soc) ? $this->fk_soc : "null").","; + $sql .= " datec=".(dol_strlen($this->datec) != 0 ? "'".$this->db->idate($this->datec)."'" : 'null').","; + $sql .= " datef=".(dol_strlen($this->date) != 0 ? "'".$this->db->idate($this->date)."'" : 'null').","; + if (dol_strlen($this->tms) != 0) $sql .= " tms=".(dol_strlen($this->tms) != 0 ? "'".$this->db->idate($this->tms)."'" : 'null').","; + $sql .= " libelle=".(isset($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; + $sql .= " paye=".(isset($this->paye) ? $this->paye : "null").","; + $sql .= " amount=".(isset($this->amount) ? $this->amount : "null").","; + $sql .= " remise=".(isset($this->remise) ? $this->remise : "null").","; + $sql .= " close_code=".(isset($this->close_code) ? "'".$this->db->escape($this->close_code)."'" : "null").","; + $sql .= " close_note=".(isset($this->close_note) ? "'".$this->db->escape($this->close_note)."'" : "null").","; + $sql .= " tva=".(isset($this->tva) ? $this->tva : "null").","; + $sql .= " localtax1=".(isset($this->localtax1) ? $this->localtax1 : "null").","; + $sql .= " localtax2=".(isset($this->localtax2) ? $this->localtax2 : "null").","; + $sql .= " total_ht=".(isset($this->total_ht) ? $this->total_ht : "null").","; + $sql .= " total_tva=".(isset($this->total_tva) ? $this->total_tva : "null").","; + $sql .= " total_ttc=".(isset($this->total_ttc) ? $this->total_ttc : "null").","; + $sql .= " fk_statut=".(isset($this->statut) ? $this->statut : "null").","; + $sql .= " fk_user_author=".(isset($this->author) ? $this->author : "null").","; + $sql .= " fk_user_valid=".(isset($this->fk_user_valid) ? $this->fk_user_valid : "null").","; + $sql .= " fk_facture_source=".(isset($this->fk_facture_source) ? $this->fk_facture_source : "null").","; + $sql .= " fk_projet=".(isset($this->fk_project) ? $this->fk_project : "null").","; + $sql .= " fk_cond_reglement=".(isset($this->cond_reglement_id) ? $this->cond_reglement_id : "null").","; + $sql .= " date_lim_reglement=".(dol_strlen($this->date_echeance) != 0 ? "'".$this->db->idate($this->date_echeance)."'" : 'null').","; + $sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; + $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; + $sql .= " model_pdf=".(isset($this->model_pdf) ? "'".$this->db->escape($this->model_pdf)."'" : "null").","; + $sql .= " import_key=".(isset($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null").""; + $sql .= " WHERE rowid=".$this->id; - $this->db->begin(); + $this->db->begin(); - dol_syslog(get_class($this)."::update", LOG_DEBUG); - $resql = $this->db->query($sql); + dol_syslog(get_class($this)."::update", LOG_DEBUG); + $resql = $this->db->query($sql); - if (!$resql) { - $error++; + if (!$resql) { + $error++; - if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { - $this->errors[] = $langs->trans('ErrorRefAlreadyExists'); - } else { - $this->errors[] = "Error ".$this->db->lasterror(); - } - } + if ($this->db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { + $this->errors[] = $langs->trans('ErrorRefAlreadyExists'); + } else { + $this->errors[] = "Error ".$this->db->lasterror(); + } + } if (!$error) { @@ -986,170 +962,162 @@ class FactureFournisseur extends CommonInvoice } } - if (!$error) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_UPDATE', $user); - if ($result < 0) $error++; - // End call triggers - } - } + if (!$error) + { + if (!$notrigger) + { + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_UPDATE', $user); + if ($result < 0) $error++; + // End call triggers + } + } - // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - else - { - $this->db->commit(); - return 1; - } - } + // Commit or rollback + if ($error) + { + foreach ($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } else { + $this->db->commit(); + return 1; + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Add a discount line into an invoice (as an invoice line) using an existing absolute discount (Consume the discount) - * - * @param int $idremise Id of absolute discount - * @return int >0 if OK, <0 if KO - */ - public function insert_discount($idremise) - { - // phpcs:enable - global $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Add a discount line into an invoice (as an invoice line) using an existing absolute discount (Consume the discount) + * + * @param int $idremise Id of absolute discount + * @return int >0 if OK, <0 if KO + */ + public function insert_discount($idremise) + { + // phpcs:enable + global $langs; - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; - $this->db->begin(); + $this->db->begin(); - $remise = new DiscountAbsolute($this->db); - $result = $remise->fetch($idremise); + $remise = new DiscountAbsolute($this->db); + $result = $remise->fetch($idremise); - if ($result > 0) - { - if ($remise->fk_invoice_supplier) // Protection against multiple submission - { - $this->error = $langs->trans("ErrorDiscountAlreadyUsed"); - $this->db->rollback(); - return -5; - } + if ($result > 0) + { + if ($remise->fk_invoice_supplier) // Protection against multiple submission + { + $this->error = $langs->trans("ErrorDiscountAlreadyUsed"); + $this->db->rollback(); + return -5; + } - $facligne = new SupplierInvoiceLine($this->db); - $facligne->fk_facture_fourn = $this->id; - $facligne->fk_remise_except = $remise->id; - $facligne->desc = $remise->description; // Description ligne - $facligne->vat_src_code = $remise->vat_src_code; - $facligne->tva_tx = $remise->tva_tx; - $facligne->subprice = -$remise->amount_ht; - $facligne->fk_product = 0; // Id produit predefini - $facligne->product_type = 0; - $facligne->qty = 1; - $facligne->remise_percent = 0; - $facligne->rang = -1; - $facligne->info_bits = 2; + $facligne = new SupplierInvoiceLine($this->db); + $facligne->fk_facture_fourn = $this->id; + $facligne->fk_remise_except = $remise->id; + $facligne->desc = $remise->description; // Description ligne + $facligne->vat_src_code = $remise->vat_src_code; + $facligne->tva_tx = $remise->tva_tx; + $facligne->subprice = -$remise->amount_ht; + $facligne->fk_product = 0; // Id produit predefini + $facligne->product_type = 0; + $facligne->qty = 1; + $facligne->remise_percent = 0; + $facligne->rang = -1; + $facligne->info_bits = 2; - // Get buy/cost price of invoice that is source of discount - if ($remise->fk_invoice_supplier_source > 0) - { - $srcinvoice = new FactureFournisseur($this->db); - $srcinvoice->fetch($remise->fk_invoice_supplier_source); - $totalcostpriceofinvoice = 0; - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; // TODO Move this into commonobject - $formmargin = new FormMargin($this->db); - $arraytmp = $formmargin->getMarginInfosArray($srcinvoice, false); - $facligne->pa_ht = $arraytmp['pa_total']; - } + // Get buy/cost price of invoice that is source of discount + if ($remise->fk_invoice_supplier_source > 0) + { + $srcinvoice = new FactureFournisseur($this->db); + $srcinvoice->fetch($remise->fk_invoice_supplier_source); + $totalcostpriceofinvoice = 0; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmargin.class.php'; // TODO Move this into commonobject + $formmargin = new FormMargin($this->db); + $arraytmp = $formmargin->getMarginInfosArray($srcinvoice, false); + $facligne->pa_ht = $arraytmp['pa_total']; + } - $facligne->total_ht = -$remise->amount_ht; - $facligne->total_tva = -$remise->amount_tva; - $facligne->total_ttc = -$remise->amount_ttc; + $facligne->total_ht = -$remise->amount_ht; + $facligne->total_tva = -$remise->amount_tva; + $facligne->total_ttc = -$remise->amount_ttc; - $facligne->multicurrency_subprice = -$remise->multicurrency_subprice; - $facligne->multicurrency_total_ht = -$remise->multicurrency_total_ht; - $facligne->multicurrency_total_tva = -$remise->multicurrency_total_tva; - $facligne->multicurrency_total_ttc = -$remise->multicurrency_total_ttc; + $facligne->multicurrency_subprice = -$remise->multicurrency_subprice; + $facligne->multicurrency_total_ht = -$remise->multicurrency_total_ht; + $facligne->multicurrency_total_tva = -$remise->multicurrency_total_tva; + $facligne->multicurrency_total_ttc = -$remise->multicurrency_total_ttc; - $lineid = $facligne->insert(); - if ($lineid > 0) - { - $result = $this->update_price(1); - if ($result > 0) - { - // Create link between discount and invoice line - $result = $remise->link_to_invoice($lineid, 0, 'supplier'); - if ($result < 0) - { - $this->error = $remise->error; - $this->db->rollback(); - return -4; - } + $lineid = $facligne->insert(); + if ($lineid > 0) + { + $result = $this->update_price(1); + if ($result > 0) + { + // Create link between discount and invoice line + $result = $remise->link_to_invoice($lineid, 0, 'supplier'); + if ($result < 0) + { + $this->error = $remise->error; + $this->db->rollback(); + return -4; + } - $this->db->commit(); - return 1; - } - else - { - $this->error = $facligne->error; - $this->db->rollback(); - return -1; - } - } - else - { - $this->error = $facligne->error; - $this->db->rollback(); - return -2; - } - } - else - { - $this->db->rollback(); - return -3; - } - } + $this->db->commit(); + return 1; + } else { + $this->error = $facligne->error; + $this->db->rollback(); + return -1; + } + } else { + $this->error = $facligne->error; + $this->db->rollback(); + return -2; + } + } else { + $this->db->rollback(); + return -3; + } + } - /** - * Delete invoice from database - * - * @param User $user User object - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 if KO, >0 if OK - */ - public function delete(User $user, $notrigger = 0) - { - global $langs, $conf; + /** + * Delete invoice from database + * + * @param User $user User object + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = 0) + { + global $langs, $conf; - $rowid = $this->id; + $rowid = $this->id; - dol_syslog("FactureFournisseur::delete rowid=".$rowid, LOG_DEBUG); + dol_syslog("FactureFournisseur::delete rowid=".$rowid, LOG_DEBUG); - // TODO Test if there is at least on payment. If yes, refuse to delete. + // TODO Test if there is at least on payment. If yes, refuse to delete. - $error = 0; - $this->db->begin(); + $error = 0; + $this->db->begin(); - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_DELETE', $user); - if ($result < 0) - { - $this->db->rollback(); - return -1; - } - // Fin appel triggers - } + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_DELETE', $user); + if ($result < 0) + { + $this->db->rollback(); + return -1; + } + // Fin appel triggers + } if (!$error) { // If invoice was converted into a discount not yet consumed, we remove discount @@ -1178,28 +1146,27 @@ class FactureFournisseur extends CommonInvoice } } - if (!$error) - { - $main = MAIN_DB_PREFIX.'facture_fourn_det'; - $ef = $main."_extrafields"; - $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_facture_fourn = $rowid)"; - $resqlef = $this->db->query($sqlef); - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det WHERE fk_facture_fourn = '.$rowid.';'; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resqlef && $resql) - { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn WHERE rowid = '.$rowid; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $resql2 = $this->db->query($sql); - if (!$resql2) { - $error++; - } - } - else { - $error++; - } - } + if (!$error) + { + $main = MAIN_DB_PREFIX.'facture_fourn_det'; + $ef = $main."_extrafields"; + $sqlef = "DELETE FROM $ef WHERE fk_object IN (SELECT rowid FROM $main WHERE fk_facture_fourn = $rowid)"; + $resqlef = $this->db->query($sqlef); + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn_det WHERE fk_facture_fourn = '.$rowid.';'; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resqlef && $resql) + { + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'facture_fourn WHERE rowid = '.$rowid; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql2 = $this->db->query($sql); + if (!$resql2) { + $error++; + } + } else { + $error++; + } + } if (!$error) { @@ -1208,461 +1175,441 @@ class FactureFournisseur extends CommonInvoice if ($res < 0) $error++; } - if (!$error) - { - // Delete linked object - $res = $this->deleteObjectLinked(); - if ($res < 0) $error++; - } - - if (!$error) - { - // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive - $this->deleteEcmFiles(); - - // We remove directory - if ($conf->fournisseur->facture->dir_output) - { - include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $ref = dol_sanitizeFileName($this->ref); - $dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoive_supplier').$ref; - $file = $dir."/".$ref.".pdf"; - if (file_exists($file)) - { - if (!dol_delete_file($file, 0, 0, 0, $this)) // For triggers - { - $this->error = 'ErrorFailToDeleteFile'; - $error++; - } - } - if (file_exists($dir)) - { - $res = @dol_delete_dir_recursive($dir); - - if (!$res) - { - $this->error = 'ErrorFailToDeleteDir'; - $error++; - } - } - } - } - - // Remove extrafields - if (!$error) - { - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $error++; - dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); - } - } - - if (!$error) - { - dol_syslog(get_class($this)."::delete $this->id by $user->id", LOG_DEBUG); - $this->db->commit(); - return 1; - } - else - { - $this->error = $this->db->lasterror(); - $this->db->rollback(); - return -$error; - } - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Tag invoice as a payed invoice - * - * @param User $user Object user - * @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet. Not implementd yet. - * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet. Not implementd yet. - * @return int <0 si ko, >0 si ok - */ - public function set_paid($user, $close_code = '', $close_note = '') - { - // phpcs:enable - global $conf, $langs; - $error = 0; - - $this->db->begin(); - - $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn'; - $sql .= ' SET paye = 1, fk_statut = '.self::STATUS_CLOSED; - $sql .= ' WHERE rowid = '.$this->id; - - dol_syslog("FactureFournisseur::set_paid", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_PAYED', $user); - if ($result < 0) $error++; - // End call triggers - } - else - { - $error++; - $this->error = $this->db->error(); - dol_print_error($this->db); - } - - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Tag la facture comme non payee completement + appel trigger BILL_UNPAYED - * Fonction utilisee quand un paiement prelevement est refuse, - * ou quand une facture annulee et reouverte. - * - * @param User $user Object user that change status - * @return int <0 si ok, >0 si ok - */ - public function set_unpaid($user) - { - // phpcs:enable - global $conf, $langs; - $error = 0; - - $this->db->begin(); - - $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn'; - $sql .= ' SET paye=0, fk_statut=1, close_code=null, close_note=null'; - $sql .= ' WHERE rowid = '.$this->id; - - dol_syslog("FactureFournisseur::set_unpaid", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_UNPAYED', $user); - if ($result < 0) $error++; - // End call triggers - } - else - { - $error++; - $this->error = $this->db->lasterror(); - dol_syslog("FactureFournisseur::set_unpaid ".$this->error); - } - - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - - /** - * Tag invoice as validated + call trigger BILL_VALIDATE - * - * @param User $user Object user that validate - * @param string $force_number Reference to force on invoice - * @param int $idwarehouse Id of warehouse for stock change - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 if KO, =0 if nothing to do, >0 if OK - */ - public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0) - { - global $conf, $langs; - - require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - - $now = dol_now(); - - $error = 0; - dol_syslog(get_class($this).'::validate user='.$user->id.', force_number='.$force_number.', idwarehouse='.$idwarehouse); - - // Force to have object complete for checks - $this->fetch_thirdparty(); - $this->fetch_lines(); - - // Check parameters - if ($this->statut > self::STATUS_DRAFT) // This is to avoid to validate twice (avoid errors on logs and stock management) - { - dol_syslog(get_class($this)."::validate no draft status", LOG_WARNING); - return 0; - } - if (preg_match('/^'.preg_quote($langs->trans("CopyOf").' ').'/', $this->ref_supplier)) - { - $langs->load("errors"); - $this->error = $langs->trans("ErrorFieldFormat", $langs->transnoentities("RefSupplier")).'. '.$langs->trans('RemoveString', $langs->transnoentitiesnoconv("CopyOf")); - return -1; - } - if (count($this->lines) <= 0) - { - $langs->load("errors"); - $this->error = $langs->trans("ErrorObjectMustHaveLinesToBeValidated", $this->ref); - return -1; - } - - $this->db->begin(); - - // Define new ref - if ($force_number) - { - $num = $force_number; - } - elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life - { - $num = $this->getNextNumRef($this->thirdparty); - } - else + if (!$error) { - $num = $this->ref; - } - $this->newref = dol_sanitizeFileName($num); + // Delete linked object + $res = $this->deleteObjectLinked(); + if ($res < 0) $error++; + } - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; - $sql .= " SET ref='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; - $sql .= " WHERE rowid = ".$this->id; + if (!$error) + { + // Delete record into ECM index (Note that delete is also done when deleting files with the dol_delete_dir_recursive + $this->deleteEcmFiles(); - dol_syslog(get_class($this)."::validate", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - // Si on incrémente le produit principal et ses composants à la validation de facture fournisseur - if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) - { - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - $langs->load("agenda"); + // We remove directory + if ($conf->fournisseur->facture->dir_output) + { + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $cpt = count($this->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($this->lines[$i]->fk_product > 0) - { - $this->line = $this->lines[$i]; - $mouvP = new MouvementStock($this->db); + $ref = dol_sanitizeFileName($this->ref); + $dir = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoive_supplier').$ref; + $file = $dir."/".$ref.".pdf"; + if (file_exists($file)) + { + if (!dol_delete_file($file, 0, 0, 0, $this)) // For triggers + { + $this->error = 'ErrorFailToDeleteFile'; + $error++; + } + } + if (file_exists($dir)) + { + $res = @dol_delete_dir_recursive($dir); + + if (!$res) + { + $this->error = 'ErrorFailToDeleteDir'; + $error++; + } + } + } + } + + // Remove extrafields + if (!$error) + { + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); + } + } + + if (!$error) + { + dol_syslog(get_class($this)."::delete $this->id by $user->id", LOG_DEBUG); + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->lasterror(); + $this->db->rollback(); + return -$error; + } + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Tag invoice as a payed invoice + * + * @param User $user Object user + * @param string $close_code Code renseigne si on classe a payee completement alors que paiement incomplet. Not implementd yet. + * @param string $close_note Commentaire renseigne si on classe a payee alors que paiement incomplet. Not implementd yet. + * @return int <0 si ko, >0 si ok + */ + public function set_paid($user, $close_code = '', $close_note = '') + { + // phpcs:enable + global $conf, $langs; + $error = 0; + + $this->db->begin(); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn'; + $sql .= ' SET paye = 1, fk_statut = '.self::STATUS_CLOSED; + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog("FactureFournisseur::set_paid", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_PAYED', $user); + if ($result < 0) $error++; + // End call triggers + } else { + $error++; + $this->error = $this->db->error(); + dol_print_error($this->db); + } + + if (!$error) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Tag la facture comme non payee completement + appel trigger BILL_UNPAYED + * Fonction utilisee quand un paiement prelevement est refuse, + * ou quand une facture annulee et reouverte. + * + * @param User $user Object user that change status + * @return int <0 si ok, >0 si ok + */ + public function set_unpaid($user) + { + // phpcs:enable + global $conf, $langs; + $error = 0; + + $this->db->begin(); + + $sql = 'UPDATE '.MAIN_DB_PREFIX.'facture_fourn'; + $sql .= ' SET paye=0, fk_statut=1, close_code=null, close_note=null'; + $sql .= ' WHERE rowid = '.$this->id; + + dol_syslog("FactureFournisseur::set_unpaid", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_UNPAYED', $user); + if ($result < 0) $error++; + // End call triggers + } else { + $error++; + $this->error = $this->db->lasterror(); + dol_syslog("FactureFournisseur::set_unpaid ".$this->error); + } + + if (!$error) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } + + /** + * Tag invoice as validated + call trigger BILL_VALIDATE + * + * @param User $user Object user that validate + * @param string $force_number Reference to force on invoice + * @param int $idwarehouse Id of warehouse for stock change + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, =0 if nothing to do, >0 if OK + */ + public function validate($user, $force_number = '', $idwarehouse = 0, $notrigger = 0) + { + global $conf, $langs; + + require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; + + $now = dol_now(); + + $error = 0; + dol_syslog(get_class($this).'::validate user='.$user->id.', force_number='.$force_number.', idwarehouse='.$idwarehouse); + + // Force to have object complete for checks + $this->fetch_thirdparty(); + $this->fetch_lines(); + + // Check parameters + if ($this->statut > self::STATUS_DRAFT) // This is to avoid to validate twice (avoid errors on logs and stock management) + { + dol_syslog(get_class($this)."::validate no draft status", LOG_WARNING); + return 0; + } + if (preg_match('/^'.preg_quote($langs->trans("CopyOf").' ').'/', $this->ref_supplier)) + { + $langs->load("errors"); + $this->error = $langs->trans("ErrorFieldFormat", $langs->transnoentities("RefSupplier")).'. '.$langs->trans('RemoveString', $langs->transnoentitiesnoconv("CopyOf")); + return -1; + } + if (count($this->lines) <= 0) + { + $langs->load("errors"); + $this->error = $langs->trans("ErrorObjectMustHaveLinesToBeValidated", $this->ref); + return -1; + } + + $this->db->begin(); + + // Define new ref + if ($force_number) + { + $num = $force_number; + } elseif (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life + { + $num = $this->getNextNumRef($this->thirdparty); + } else { + $num = $this->ref; + } + $this->newref = dol_sanitizeFileName($num); + + $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; + $sql .= " SET ref='".$num."', fk_statut = 1, fk_user_valid = ".$user->id.", date_valid = '".$this->db->idate($now)."'"; + $sql .= " WHERE rowid = ".$this->id; + + dol_syslog(get_class($this)."::validate", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + // Si on incrémente le produit principal et ses composants à la validation de facture fournisseur + if (!$error && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) + { + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); + + $cpt = count($this->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($this->lines[$i]->fk_product > 0) + { + $this->line = $this->lines[$i]; + $mouvP = new MouvementStock($this->db); $mouvP->origin = &$this; - // We increase stock for product - $up_ht_disc = $this->lines[$i]->pu_ht; - if (!empty($this->lines[$i]->remise_percent) && empty($conf->global->STOCK_EXCLUDE_DISCOUNT_FOR_PMP)) $up_ht_disc = price2num($up_ht_disc * (100 - $this->lines[$i]->remise_percent) / 100, 'MU'); - if ($this->type == FactureFournisseur::TYPE_CREDIT_NOTE) $result = $mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $up_ht_disc, $langs->trans("InvoiceValidatedInDolibarr", $num)); - else $result = $mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $up_ht_disc, $langs->trans("InvoiceValidatedInDolibarr", $num)); - if ($result < 0) { $error++; } - unset($this->line); - } - } - } + // We increase stock for product + $up_ht_disc = $this->lines[$i]->pu_ht; + if (!empty($this->lines[$i]->remise_percent) && empty($conf->global->STOCK_EXCLUDE_DISCOUNT_FOR_PMP)) $up_ht_disc = price2num($up_ht_disc * (100 - $this->lines[$i]->remise_percent) / 100, 'MU'); + if ($this->type == FactureFournisseur::TYPE_CREDIT_NOTE) $result = $mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $up_ht_disc, $langs->trans("InvoiceValidatedInDolibarr", $num)); + else $result = $mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $up_ht_disc, $langs->trans("InvoiceValidatedInDolibarr", $num)); + if ($result < 0) { $error++; } + unset($this->line); + } + } + } - // Triggers call - if (!$error && empty($notrigger)) - { - // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_VALIDATE', $user); - if ($result < 0) $error++; - // End call triggers - } + // Triggers call + if (!$error && empty($notrigger)) + { + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_VALIDATE', $user); + if ($result < 0) $error++; + // End call triggers + } - if (!$error) - { - $this->oldref = $this->ref; + if (!$error) + { + $this->oldref = $this->ref; - // Rename directory if dir was a temporary ref - if (preg_match('/^[\(]?PROV/i', $this->ref)) - { - // Now we rename also files into index - $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'fournisseur/facture/".get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->db->escape($this->newref)."'"; - $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'fournisseur/facture/".get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->db->escape($this->ref)."' and entity = ".$conf->entity; - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->error = $this->db->lasterror(); } + // Rename directory if dir was a temporary ref + if (preg_match('/^[\(]?PROV/i', $this->ref)) + { + // Now we rename also files into index + $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref) + 1).")), filepath = 'fournisseur/facture/".get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->db->escape($this->newref)."'"; + $sql .= " WHERE filename LIKE '".$this->db->escape($this->ref)."%' AND filepath = 'fournisseur/facture/".get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$this->db->escape($this->ref)."' and entity = ".$conf->entity; + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->error = $this->db->lasterror(); } - // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments - $oldref = dol_sanitizeFileName($this->ref); - $newref = dol_sanitizeFileName($num); - $dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$oldref; - $dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref; - if (!$error && file_exists($dirsource)) - { - dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); + // We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments + $oldref = dol_sanitizeFileName($this->ref); + $newref = dol_sanitizeFileName($num); + $dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$oldref; + $dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref; + if (!$error && file_exists($dirsource)) + { + dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest); - if (@rename($dirsource, $dirdest)) - { - dol_syslog("Rename ok"); - // Rename docs starting with $oldref with $newref - $listoffiles = dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref, 'files', 1, '^'.preg_quote($oldref, '/')); - foreach ($listoffiles as $fileentry) - { - $dirsource = $fileentry['name']; - $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); - $dirsource = $fileentry['path'].'/'.$dirsource; - $dirdest = $fileentry['path'].'/'.$dirdest; - @rename($dirsource, $dirdest); - } - } - } - } - } + if (@rename($dirsource, $dirdest)) + { + dol_syslog("Rename ok"); + // Rename docs starting with $oldref with $newref + $listoffiles = dol_dir_list($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id, 2, 0, 0, $this, 'invoice_supplier').$newref, 'files', 1, '^'.preg_quote($oldref, '/')); + foreach ($listoffiles as $fileentry) + { + $dirsource = $fileentry['name']; + $dirdest = preg_replace('/^'.preg_quote($oldref, '/').'/', $newref, $dirsource); + $dirsource = $fileentry['path'].'/'.$dirsource; + $dirdest = $fileentry['path'].'/'.$dirdest; + @rename($dirsource, $dirdest); + } + } + } + } + } - // Set new ref and define current statut - if (!$error) - { - $this->ref = $num; - $this->statut = self::STATUS_VALIDATED; - //$this->date_validation=$now; this is stored into log table - } + // Set new ref and define current statut + if (!$error) + { + $this->ref = $num; + $this->statut = self::STATUS_VALIDATED; + //$this->date_validation=$now; this is stored into log table + } - if (!$error) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error = $this->db->error(); - $this->db->rollback(); - return -1; - } - } + if (!$error) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -1; + } + } - /** - * Set draft status - * - * @param User $user Object user that modify - * @param int $idwarehouse Id warehouse to use for stock change. - * @return int <0 if KO, >0 if OK - */ - public function setDraft($user, $idwarehouse = -1) - { - // phpcs:enable - global $conf, $langs; + /** + * Set draft status + * + * @param User $user Object user that modify + * @param int $idwarehouse Id warehouse to use for stock change. + * @return int <0 if KO, >0 if OK + */ + public function setDraft($user, $idwarehouse = -1) + { + // phpcs:enable + global $conf, $langs; - $error = 0; + $error = 0; - if ($this->statut == self::STATUS_DRAFT) - { - dol_syslog(__METHOD__." already draft status", LOG_WARNING); - return 0; - } + if ($this->statut == self::STATUS_DRAFT) + { + dol_syslog(__METHOD__." already draft status", LOG_WARNING); + return 0; + } - dol_syslog(__METHOD__, LOG_DEBUG); + dol_syslog(__METHOD__, LOG_DEBUG); - $this->db->begin(); + $this->db->begin(); - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; - $sql .= " SET fk_statut = ".self::STATUS_DRAFT; - $sql .= " WHERE rowid = ".$this->id; + $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn"; + $sql .= " SET fk_statut = ".self::STATUS_DRAFT; + $sql .= " WHERE rowid = ".$this->id; - $result = $this->db->query($sql); - if ($result) - { - if (!$error) - { - $this->oldcopy = clone $this; - } + $result = $this->db->query($sql); + if ($result) + { + if (!$error) + { + $this->oldcopy = clone $this; + } - // Si on incremente le produit principal et ses composants a la validation de facture fournisseur, on decremente - if ($result >= 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) - { - require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; - $langs->load("agenda"); + // Si on incremente le produit principal et ses composants a la validation de facture fournisseur, on decremente + if ($result >= 0 && !empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL)) + { + require_once DOL_DOCUMENT_ROOT.'/product/stock/class/mouvementstock.class.php'; + $langs->load("agenda"); - $cpt = count($this->lines); - for ($i = 0; $i < $cpt; $i++) - { - if ($this->lines[$i]->fk_product > 0) - { - $mouvP = new MouvementStock($this->db); - $mouvP->origin = &$this; + $cpt = count($this->lines); + for ($i = 0; $i < $cpt; $i++) + { + if ($this->lines[$i]->fk_product > 0) + { + $mouvP = new MouvementStock($this->db); + $mouvP->origin = &$this; // We increase stock for product if ($this->type == FactureFournisseur::TYPE_CREDIT_NOTE) $result = $mouvP->reception($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceBackToDraftInDolibarr", $this->ref)); - else $result = $mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceBackToDraftInDolibarr", $this->ref)); - } - } - } - // Triggers call - if (!$error && empty($notrigger)) - { - // Call trigger - $result = $this->call_trigger('BILL_SUPPLIER_UNVALIDATE', $user); - if ($result < 0) $error++; - // End call triggers - } - if ($error == 0) - { - $this->db->commit(); - return 1; - } - else - { - $this->db->rollback(); - return -1; - } - } - else - { - $this->error = $this->db->error(); - $this->db->rollback(); - return -1; - } - } + else $result = $mouvP->livraison($user, $this->lines[$i]->fk_product, $idwarehouse, $this->lines[$i]->qty, $this->lines[$i]->subprice, $langs->trans("InvoiceBackToDraftInDolibarr", $this->ref)); + } + } + } + // Triggers call + if (!$error && empty($notrigger)) + { + // Call trigger + $result = $this->call_trigger('BILL_SUPPLIER_UNVALIDATE', $user); + if ($result < 0) $error++; + // End call triggers + } + if ($error == 0) + { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return -1; + } + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -1; + } + } - /** - * Ajoute une ligne de facture (associe a aucun produit/service predefini) - * Les parametres sont deja cense etre juste et avec valeurs finales a l'appel - * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini - * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,idprod) - * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue). - * - * @param string $desc Description de la ligne - * @param double $pu Prix unitaire (HT ou TTC selon price_base_type, > 0 even for credit note) - * @param double $txtva Force Vat rate to use, -1 for auto. - * @param double $txlocaltax1 LocalTax1 Rate - * @param double $txlocaltax2 LocalTax2 Rate - * @param double $qty Quantite - * @param int $fk_product Product/Service ID predefined - * @param double $remise_percent Percentage discount of the line - * @param integer $date_start Date de debut de validite du service - * @param integer $date_end Date de fin de validite du service - * @param string $ventil Code de ventilation comptable - * @param int $info_bits Bits de type de lines - * @param string $price_base_type HT ou TTC - * @param int $type Type of line (0=product, 1=service) - * @param int $rang Position of line - * @param int $notrigger Disable triggers + /** + * Ajoute une ligne de facture (associe a aucun produit/service predefini) + * Les parametres sont deja cense etre juste et avec valeurs finales a l'appel + * de cette methode. Aussi, pour le taux tva, il doit deja avoir ete defini + * par l'appelant par la methode get_default_tva(societe_vendeuse,societe_acheteuse,idprod) + * et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue). + * + * @param string $desc Description de la ligne + * @param double $pu Prix unitaire (HT ou TTC selon price_base_type, > 0 even for credit note) + * @param double $txtva Force Vat rate to use, -1 for auto. + * @param double $txlocaltax1 LocalTax1 Rate + * @param double $txlocaltax2 LocalTax2 Rate + * @param double $qty Quantite + * @param int $fk_product Product/Service ID predefined + * @param double $remise_percent Percentage discount of the line + * @param integer $date_start Date de debut de validite du service + * @param integer $date_end Date de fin de validite du service + * @param string $ventil Code de ventilation comptable + * @param int $info_bits Bits de type de lines + * @param string $price_base_type HT ou TTC + * @param int $type Type of line (0=product, 1=service) + * @param int $rang Position of line + * @param int $notrigger Disable triggers * @param array $array_options extrafields array - * @param string $fk_unit Code of the unit to use. Null to use the default one - * @param int $origin_id id origin document + * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param int $origin_id id origin document * @param double $pu_ht_devise Amount in currency * @param string $ref_supplier Supplier ref * @param string $special_code Special code - * @return int >0 if OK, <0 if KO - */ - public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = false, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_ht_devise = 0, $ref_supplier = '', $special_code = '') - { - global $langs, $mysoc, $conf; + * @param int $fk_parent_line Parent line id + * @return int >0 if OK, <0 if KO + */ + public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = false, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_ht_devise = 0, $ref_supplier = '', $special_code = '', $fk_parent_line = 0) + { + global $langs, $mysoc, $conf; - dol_syslog(get_class($this)."::addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits,$price_base_type,$type,$fk_unit", LOG_DEBUG); - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + dol_syslog(get_class($this)."::addline $desc,$pu,$qty,$txtva,$fk_product,$remise_percent,$date_start,$date_end,$ventil,$info_bits,$price_base_type,$type,$fk_unit", LOG_DEBUG); + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; if ($this->statut == self::STATUS_DRAFT) { @@ -1691,97 +1638,93 @@ class FactureFournisseur extends CommonInvoice return -1; } - $this->db->begin(); + $this->db->begin(); - if ($fk_product > 0) - { - if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) - { - // Check quantity is enough - dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier); - $prod = new Product($this->db, $fk_product); - if ($prod->fetch($fk_product) > 0) - { - $product_type = $prod->type; - $label = $prod->label; - $fk_prod_fourn_price = 0; + if ($fk_product > 0) + { + if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) + { + // Check quantity is enough + dol_syslog(get_class($this)."::addline we check supplier prices fk_product=".$fk_product." qty=".$qty." ref_supplier=".$ref_supplier); + $prod = new Product($this->db, $fk_product); + if ($prod->fetch($fk_product) > 0) + { + $product_type = $prod->type; + $label = $prod->label; + $fk_prod_fourn_price = 0; - // We use 'none' instead of $ref_supplier, because $ref_supplier may not exists anymore. So we will take the first supplier price ok. - // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. - $result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc - if ($result > 0) - { - if (empty($pu)) $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice - $ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice - // is remise percent not keyed but present for the product we add it - if ($remise_percent == 0 && $prod->remise_percent != 0) - $remise_percent = $prod->remise_percent; - } - if ($result == 0) // If result == 0, we failed to found the supplier reference price - { - $langs->load("errors"); - $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); - $this->db->rollback(); - dol_syslog(get_class($this)."::addline we did not found supplier price, so we can't guess unit price"); - //$pu = $prod->fourn_pu; // We do not overwrite unit price - //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price - return -1; - } - if ($result == -1) - { - $langs->load("errors"); - $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); - $this->db->rollback(); - dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG); - return -1; - } - if ($result < -1) - { - $this->error = $prod->error; - $this->db->rollback(); - dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); - return -1; - } - } - else - { - $this->error = $prod->error; - $this->db->rollback(); - return -1; - } - } - } - else - { - $product_type = $type; - } + // We use 'none' instead of $ref_supplier, because $ref_supplier may not exists anymore. So we will take the first supplier price ok. + // If we want a dedicated supplier price, we must provide $fk_prod_fourn_price. + $result = $prod->get_buyprice($fk_prod_fourn_price, $qty, $fk_product, 'none', ($this->fk_soc ? $this->fk_soc : $this->socid)); // Search on couple $fk_prod_fourn_price/$qty first, then on triplet $qty/$fk_product/$ref_supplier/$this->fk_soc + if ($result > 0) + { + if (empty($pu)) $pu = $prod->fourn_pu; // Unit price supplier price set by get_buyprice + $ref_supplier = $prod->ref_supplier; // Ref supplier price set by get_buyprice + // is remise percent not keyed but present for the product we add it + if ($remise_percent == 0 && $prod->remise_percent != 0) + $remise_percent = $prod->remise_percent; + } + if ($result == 0) // If result == 0, we failed to found the supplier reference price + { + $langs->load("errors"); + $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); + $this->db->rollback(); + dol_syslog(get_class($this)."::addline we did not found supplier price, so we can't guess unit price"); + //$pu = $prod->fourn_pu; // We do not overwrite unit price + //$ref = $prod->ref_fourn; // We do not overwrite ref supplier price + return -1; + } + if ($result == -1) + { + $langs->load("errors"); + $this->error = "Ref ".$prod->ref." ".$langs->trans("ErrorQtyTooLowForThisSupplier"); + $this->db->rollback(); + dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_DEBUG); + return -1; + } + if ($result < -1) + { + $this->error = $prod->error; + $this->db->rollback(); + dol_syslog(get_class($this)."::addline result=".$result." - ".$this->error, LOG_ERR); + return -1; + } + } else { + $this->error = $prod->error; + $this->db->rollback(); + return -1; + } + } + } else { + $product_type = $type; + } - if ($conf->multicurrency->enabled && $pu_ht_devise > 0) { - $pu = 0; - } + if ($conf->multicurrency->enabled && $pu_ht_devise > 0) { + $pu = 0; + } - $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); + $localtaxes_type = getLocalTaxesFromRate($txtva, 0, $mysoc, $this->thirdparty); - // Clean vat code - $reg = array(); - $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $txtva, $reg)) - { - $vat_src_code = $reg[1]; - $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. - } + // Clean vat code + $reg = array(); + $vat_src_code = ''; + if (preg_match('/\((.*)\)/', $txtva, $reg)) + { + $vat_src_code = $reg[1]; + $txtva = preg_replace('/\s*\(.*\)/', '', $txtva); // Remove code into vatrate. + } - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + $total_localtax1 = $tabprice[9]; + $total_localtax2 = $tabprice[10]; $pu_ht = $tabprice[3]; // MultiCurrency @@ -1835,7 +1778,7 @@ class FactureFournisseur extends CommonInvoice $this->line->info_bits = $info_bits; $this->line->special_code = ((string) $special_code != '' ? $special_code : $this->special_code); - $this->line->fk_parent_line = $this->fk_parent_line; + $this->line->fk_parent_line = $fk_parent_line; $this->line->origin = $this->origin; $this->line->origin_id = $origin_id; $this->line->fk_unit = $fk_unit; @@ -1864,203 +1807,195 @@ class FactureFournisseur extends CommonInvoice { $this->db->commit(); return $this->line->id; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->line->error; $this->errors = $this->line->errors; $this->db->rollback(); return -2; } - } - else - { - return 0; - } - } + } else { + return 0; + } + } - /** - * Update a line detail into database - * - * @param int $id Id of line invoice - * @param string $desc Description of line - * @param double $pu Prix unitaire (HT ou TTC selon price_base_type) - * @param double $vatrate VAT Rate (Can be '8.5', '8.5 (ABC)') - * @param double $txlocaltax1 LocalTax1 Rate - * @param double $txlocaltax2 LocalTax2 Rate - * @param double $qty Quantity - * @param int $idproduct Id produit - * @param double $price_base_type HT or TTC - * @param int $info_bits Miscellaneous informations of line - * @param int $type Type of line (0=product, 1=service) - * @param double $remise_percent Percentage discount of the line - * @param int $notrigger Disable triggers - * @param integer $date_start Date start of service - * @param integer $date_end Date end of service + /** + * Update a line detail into database + * + * @param int $id Id of line invoice + * @param string $desc Description of line + * @param double $pu Prix unitaire (HT ou TTC selon price_base_type) + * @param double $vatrate VAT Rate (Can be '8.5', '8.5 (ABC)') + * @param double $txlocaltax1 LocalTax1 Rate + * @param double $txlocaltax2 LocalTax2 Rate + * @param double $qty Quantity + * @param int $idproduct Id produit + * @param double $price_base_type HT or TTC + * @param int $info_bits Miscellaneous informations of line + * @param int $type Type of line (0=product, 1=service) + * @param double $remise_percent Percentage discount of the line + * @param int $notrigger Disable triggers + * @param integer $date_start Date start of service + * @param integer $date_end Date end of service * @param array $array_options extrafields array - * @param string $fk_unit Code of the unit to use. Null to use the default one + * @param string $fk_unit Code of the unit to use. Null to use the default one * @param double $pu_ht_devise Amount in currency * @param string $ref_supplier Supplier ref - * @return int <0 if KO, >0 if OK - */ - public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1 = 0, $txlocaltax2 = 0, $qty = 1, $idproduct = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $remise_percent = 0, $notrigger = false, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') - { - global $mysoc, $langs; - dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$notrigger,$date_start,$date_end,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG); - include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + * @return int <0 if KO, >0 if OK + */ + public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1 = 0, $txlocaltax2 = 0, $qty = 1, $idproduct = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $remise_percent = 0, $notrigger = false, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $ref_supplier = '') + { + global $mysoc, $langs; + dol_syslog(get_class($this)."::updateline $id,$desc,$pu,$vatrate,$qty,$idproduct,$price_base_type,$info_bits,$type,$remise_percent,$notrigger,$date_start,$date_end,$fk_unit,$pu_ht_devise,$ref_supplier", LOG_DEBUG); + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; - $pu = price2num($pu); - $qty = price2num($qty); + $pu = price2num($pu); + $qty = price2num($qty); $remise_percent = price2num($remise_percent); $pu_ht_devise = price2num($pu_ht_devise); - // Check parameters - //if (! is_numeric($pu) || ! is_numeric($qty)) return -1; - if ($type < 0) return -1; + // Check parameters + //if (! is_numeric($pu) || ! is_numeric($qty)) return -1; + if ($type < 0) return -1; - if ($date_start && $date_end && $date_start > $date_end) { - $langs->load("errors"); - $this->error = $langs->trans('ErrorStartDateGreaterEnd'); - return -1; - } + if ($date_start && $date_end && $date_start > $date_end) { + $langs->load("errors"); + $this->error = $langs->trans('ErrorStartDateGreaterEnd'); + return -1; + } - // Clean parameters + // Clean parameters if (empty($vatrate)) $vatrate = 0; - if (empty($txlocaltax1)) $txlocaltax1 = 0; - if (empty($txlocaltax2)) $txlocaltax2 = 0; + if (empty($txlocaltax1)) $txlocaltax1 = 0; + if (empty($txlocaltax2)) $txlocaltax2 = 0; - $txlocaltax1 = price2num($txlocaltax1); - $txlocaltax2 = price2num($txlocaltax2); + $txlocaltax1 = price2num($txlocaltax1); + $txlocaltax2 = price2num($txlocaltax2); - $localtaxes_type = array($txlocaltax1, $txlocaltax2); + $localtaxes_type = array($txlocaltax1, $txlocaltax2); - // Calcul du total TTC et de la TVA pour la ligne a partir de - // qty, pu, remise_percent et txtva - // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker - // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $mysoc, $this->thirdparty); + $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $mysoc, $this->thirdparty); - $reg = array(); + $reg = array(); - // Clean vat code - $vat_src_code = ''; - if (preg_match('/\((.*)\)/', $vatrate, $reg)) - { - $vat_src_code = $reg[1]; - $vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate. - } + // Clean vat code + $vat_src_code = ''; + if (preg_match('/\((.*)\)/', $vatrate, $reg)) + { + $vat_src_code = $reg[1]; + $vatrate = preg_replace('/\s*\(.*\)/', '', $vatrate); // Remove code into vatrate. + } - $tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); - $total_ht = $tabprice[0]; - $total_tva = $tabprice[1]; - $total_ttc = $tabprice[2]; - $pu_ht = $tabprice[3]; - $pu_tva = $tabprice[4]; - $pu_ttc = $tabprice[5]; - $total_localtax1 = $tabprice[9]; - $total_localtax2 = $tabprice[10]; + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $vatrate, $txlocaltax1, $txlocaltax2, 0, $price_base_type, $info_bits, $type, $this->thirdparty, $localtaxes_type, 100, $this->multicurrency_tx, $pu_ht_devise); + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + $pu_ht = $tabprice[3]; + $pu_tva = $tabprice[4]; + $pu_ttc = $tabprice[5]; + $total_localtax1 = $tabprice[9]; + $total_localtax2 = $tabprice[10]; // MultiCurrency $multicurrency_total_ht = $tabprice[16]; - $multicurrency_total_tva = $tabprice[17]; - $multicurrency_total_ttc = $tabprice[18]; + $multicurrency_total_tva = $tabprice[17]; + $multicurrency_total_ttc = $tabprice[18]; $pu_ht_devise = $tabprice[19]; - if (empty($info_bits)) $info_bits = 0; + if (empty($info_bits)) $info_bits = 0; - if ($idproduct) - { - $product = new Product($this->db); - $result = $product->fetch($idproduct); - $product_type = $product->type; - } - else - { - $product_type = $type; - } + if ($idproduct) + { + $product = new Product($this->db); + $result = $product->fetch($idproduct); + $product_type = $product->type; + } else { + $product_type = $type; + } - //Fetch current line from the database and then clone the object and set it in $oldline property - $line = new SupplierInvoiceLine($this->db); - $line->fetch($id); - $line->fetch_optionals(); + //Fetch current line from the database and then clone the object and set it in $oldline property + $line = new SupplierInvoiceLine($this->db); + $line->fetch($id); + $line->fetch_optionals(); - $staticline = clone $line; + $staticline = clone $line; - $line->oldline = $staticline; - $line->context = $this->context; + $line->oldline = $staticline; + $line->context = $this->context; - $line->description = $desc; - $line->subprice = $pu_ht; - $line->pu_ht = $pu_ht; - $line->pu_ttc = $pu_ttc; - $line->qty = $qty; - $line->remise_percent = $remise_percent; - $line->ref_supplier = $ref_supplier; + $line->description = $desc; + $line->subprice = $pu_ht; + $line->pu_ht = $pu_ht; + $line->pu_ttc = $pu_ttc; + $line->qty = $qty; + $line->remise_percent = $remise_percent; + $line->ref_supplier = $ref_supplier; - $line->date_start = $date_start; - $line->date_end = $date_end; + $line->date_start = $date_start; + $line->date_end = $date_end; - $line->vat_src_code = $vat_src_code; - $line->tva_tx = $vatrate; - $line->localtax1_tx = $txlocaltax1; - $line->localtax2_tx = $txlocaltax2; + $line->vat_src_code = $vat_src_code; + $line->tva_tx = $vatrate; + $line->localtax1_tx = $txlocaltax1; + $line->localtax2_tx = $txlocaltax2; $line->localtax1_type = $localtaxes_type[0]; $line->localtax2_type = $localtaxes_type[2]; $line->total_ht = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ht) : $total_ht); $line->total_tva = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_tva) : $total_tva); - $line->total_localtax1 = $total_localtax1; - $line->total_localtax2 = $total_localtax2; - $line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ttc) : $total_ttc); - $line->fk_product = $idproduct; - $line->product_type = $product_type; - $line->info_bits = $info_bits; - $line->fk_unit = $fk_unit; + $line->total_localtax1 = $total_localtax1; + $line->total_localtax2 = $total_localtax2; + $line->total_ttc = (($this->type == self::TYPE_CREDIT_NOTE || $qty < 0) ?-abs($total_ttc) : $total_ttc); + $line->fk_product = $idproduct; + $line->product_type = $product_type; + $line->info_bits = $info_bits; + $line->fk_unit = $fk_unit; - if (is_array($array_options) && count($array_options) > 0) { - // We replace values in this->line->array_options only for entries defined into $array_options - foreach ($array_options as $key => $value) { - $line->array_options[$key] = $array_options[$key]; - } - } + if (is_array($array_options) && count($array_options) > 0) { + // We replace values in this->line->array_options only for entries defined into $array_options + foreach ($array_options as $key => $value) { + $line->array_options[$key] = $array_options[$key]; + } + } - // Multicurrency + // Multicurrency $line->multicurrency_subprice = $pu_ht_devise; $line->multicurrency_total_ht = $multicurrency_total_ht; - $line->multicurrency_total_tva = $multicurrency_total_tva; - $line->multicurrency_total_ttc = $multicurrency_total_ttc; + $line->multicurrency_total_tva = $multicurrency_total_tva; + $line->multicurrency_total_ttc = $multicurrency_total_ttc; - $res = $line->update($notrigger); + $res = $line->update($notrigger); - if ($res < 1) { - $this->errors[] = $line->error; - } else { - // Update total price into invoice record - $res = $this->update_price('', 'auto', 0, $this->thirdparty); - } + if ($res < 1) { + $this->errors[] = $line->error; + } else { + // Update total price into invoice record + $res = $this->update_price('', 'auto', 0, $this->thirdparty); + } - return $res; - } + return $res; + } - /** - * Delete a detail line from database - * - * @param int $rowid Id of line to delete - * @param int $notrigger 1=Does not execute triggers, 0= execute triggers - * @return int <0 if KO, >0 if OK - */ - public function deleteline($rowid, $notrigger = 0) - { - if (!$rowid) { - $rowid = $this->id; - } + /** + * Delete a detail line from database + * + * @param int $rowid Id of line to delete + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @return int <0 if KO, >0 if OK + */ + public function deleteline($rowid, $notrigger = 0) + { + if (!$rowid) { + $rowid = $this->id; + } $this->db->begin(); @@ -2078,98 +2013,94 @@ class FactureFournisseur extends CommonInvoice return -2; } - $line = new SupplierInvoiceLine($this->db); + $line = new SupplierInvoiceLine($this->db); - if ($line->fetch($rowid) < 1) { - return -1; - } + if ($line->fetch($rowid) < 1) { + return -1; + } - $res = $line->delete($notrigger); + $res = $line->delete($notrigger); - if ($res < 1) { + if ($res < 1) { $this->errors[] = $line->error; $this->db->rollback(); return -3; - } else { + } else { $res = $this->update_price(); if ($res > 0) { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -4; } - } - } + } + } - /** - * Charge les informations d'ordre info dans l'objet facture - * - * @param int $id Id de la facture a charger - * @return void - */ - public function info($id) - { - $sql = 'SELECT c.rowid, datec, tms as datem, '; - $sql .= ' fk_user_author, fk_user_modif, fk_user_valid'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as c'; - $sql .= ' WHERE c.rowid = '.$id; + /** + * Charge les informations d'ordre info dans l'objet facture + * + * @param int $id Id de la facture a charger + * @return void + */ + public function info($id) + { + $sql = 'SELECT c.rowid, datec, tms as datem, '; + $sql .= ' fk_user_author, fk_user_modif, fk_user_valid'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as c'; + $sql .= ' WHERE c.rowid = '.$id; - $result = $this->db->query($sql); - if ($result) - { - if ($this->db->num_rows($result)) - { - $obj = $this->db->fetch_object($result); - $this->id = $obj->rowid; - if ($obj->fk_user_author) - { - $cuser = new User($this->db); - $cuser->fetch($obj->fk_user_author); - $this->user_creation = $cuser; - } - if ($obj->fk_user_valid) - { - $vuser = new User($this->db); - $vuser->fetch($obj->fk_user_valid); - $this->user_validation = $vuser; - } - if ($obj->fk_user_modif) - { - $muser = new User($this->db); - $muser->fetch($obj->fk_user_modif); - $this->user_modification = $muser; - } - $this->date_creation = $this->db->idate($obj->datec); - $this->date_modification = $this->db->idate($obj->datem); - //$this->date_validation = $obj->datev; // This field is not available. Should be store into log table and using this function should be replaced with showing content of log (like for supplier orders) - } - $this->db->free($result); - } - else - { - dol_print_error($this->db); - } - } + $result = $this->db->query($sql); + if ($result) + { + if ($this->db->num_rows($result)) + { + $obj = $this->db->fetch_object($result); + $this->id = $obj->rowid; + if ($obj->fk_user_author) + { + $cuser = new User($this->db); + $cuser->fetch($obj->fk_user_author); + $this->user_creation = $cuser; + } + if ($obj->fk_user_valid) + { + $vuser = new User($this->db); + $vuser->fetch($obj->fk_user_valid); + $this->user_validation = $vuser; + } + if ($obj->fk_user_modif) + { + $muser = new User($this->db); + $muser->fetch($obj->fk_user_modif); + $this->user_modification = $muser; + } + $this->date_creation = $this->db->idate($obj->datec); + $this->date_modification = $this->db->idate($obj->datem); + //$this->date_validation = $obj->datev; // This field is not available. Should be store into log table and using this function should be replaced with showing content of log (like for supplier orders) + } + $this->db->free($result); + } else { + dol_print_error($this->db); + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** * Renvoi liste des factures remplacables * Statut validee ou abandonnee pour raison autre + non payee + aucun paiement + pas deja remplacee * * @param int $socid Id societe * @return array|int Tableau des factures ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1) - * <0 if error - */ - public function list_replacable_supplier_invoices($socid = 0) + * <0 if error + */ + public function list_replacable_supplier_invoices($socid = 0) { - // phpcs:enable + // phpcs:enable global $conf; $return = array(); @@ -2194,22 +2125,20 @@ class FactureFournisseur extends CommonInvoice while ($obj = $this->db->fetch_object($resql)) { $return[$obj->rowid] = array( - 'id' => $obj->rowid, - 'ref' => $obj->ref, - 'status' => $obj->fk_statut - ); + 'id' => $obj->rowid, + 'ref' => $obj->ref, + 'status' => $obj->fk_statut + ); } //print_r($return); return $return; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Renvoi liste des factures qualifiables pour correction par avoir * Les factures qui respectent les regles suivantes sont retournees: @@ -2217,11 +2146,11 @@ class FactureFournisseur extends CommonInvoice * * @param int $socid Id societe * @return array|int Tableau des factures ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>) - * <0 if error + * <0 if error */ - public function list_qualified_avoir_supplier_invoices($socid = 0) + public function list_qualified_avoir_supplier_invoices($socid = 0) { - // phpcs:enable + // phpcs:enable global $conf; $return = array(); @@ -2231,8 +2160,8 @@ class FactureFournisseur extends CommonInvoice $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."paiementfourn_facturefourn as pf ON f.rowid = pf.fk_facturefourn"; $sql .= " WHERE f.entity = ".$conf->entity; $sql .= " AND f.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")"; - $sql .= " AND NOT EXISTS (SELECT rowid from ".MAIN_DB_PREFIX."facture_fourn as ff WHERE f.rowid = ff.fk_facture_source"; - $sql .= " AND ff.type=".self::TYPE_REPLACEMENT.")"; + $sql .= " AND NOT EXISTS (SELECT rowid from ".MAIN_DB_PREFIX."facture_fourn as ff WHERE f.rowid = ff.fk_facture_source"; + $sql .= " AND ff.type=".self::TYPE_REPLACEMENT.")"; $sql .= " AND f.type != ".self::TYPE_CREDIT_NOTE; // Type non 2 si facture non avoir if ($socid > 0) $sql .= " AND f.fk_soc = ".$socid; $sql .= " ORDER BY f.ref"; @@ -2254,348 +2183,340 @@ class FactureFournisseur extends CommonInvoice } return $return; - } - else - { + } else { $this->error = $this->db->error(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Load indicators for dashboard (this->nbtodo and this->nbtodolate) - * - * @param User $user Object user - * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK - */ - public function load_board($user) - { - // phpcs:enable - global $conf, $langs; + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Load indicators for dashboard (this->nbtodo and this->nbtodolate) + * + * @param User $user Object user + * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK + */ + public function load_board($user) + { + // phpcs:enable + global $conf, $langs; - $sql = 'SELECT ff.rowid, ff.date_lim_reglement as datefin, ff.fk_statut'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as ff'; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= ' WHERE ff.paye=0'; - $sql .= ' AND ff.fk_statut > 0'; - $sql .= " AND ff.entity = ".$conf->entity; - if ($user->socid) $sql .= ' AND ff.fk_soc = '.$user->socid; - if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND ff.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql = 'SELECT ff.rowid, ff.date_lim_reglement as datefin, ff.fk_statut'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'facture_fourn as ff'; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= ' WHERE ff.paye=0'; + $sql .= ' AND ff.fk_statut > 0'; + $sql .= " AND ff.entity = ".$conf->entity; + if ($user->socid) $sql .= ' AND ff.fk_soc = '.$user->socid; + if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND ff.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; - $resql = $this->db->query($sql); - if ($resql) - { - $langs->load("bills"); - $now = dol_now(); - - $response = new WorkboardResponse(); - $response->warning_delay = $conf->facture->fournisseur->warning_delay / 60 / 60 / 24; - $response->label = $langs->trans("SupplierBillsToPay"); - $response->labelShort = $langs->trans("StatusToPay"); - - $response->url = DOL_URL_ROOT.'/fourn/facture/list.php?search_status=1&mainmenu=billing&leftmenu=suppliers_bills'; - $response->img = img_object($langs->trans("Bills"), "bill"); - - $facturestatic = new FactureFournisseur($this->db); - - while ($obj = $this->db->fetch_object($resql)) - { - $response->nbtodo++; - - $facturestatic->date_echeance = $this->db->jdate($obj->datefin); - $facturestatic->statut = $obj->fk_statut; - - if ($facturestatic->hasDelay()) { - $response->nbtodolate++; - $response->url_late = DOL_URL_ROOT.'/fourn/facture/list.php?option=late&mainmenu=billing&leftmenu=suppliers_bills'; - } - } - $this->db->free($resql); - return $response; - } - else - { - dol_print_error($this->db); - $this->error = $this->db->error(); - return -1; - } - } - - - /** - * Return clicable name (with picto eventually) - * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @param string $option Where point the link - * @param int $max Max length of shown ref - * @param int $short 1=Return just URL - * @param string $moretitle Add more text to title tooltip - * @param int $notooltip 1=Disable tooltip - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @param int $addlinktonotes Add link to show notes - * @return string String with URL - */ - public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0) - { - global $langs, $conf, $user; - - $result = ''; - - if ($option == 'withdraw') $url = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$this->id.'&type=bank-transfer'; - elseif ($option == 'document') $url = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id; - else $url = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id; - - if ($short) return $url; - - if ($option !== 'nolink') - { - // Add param to save lastsearch_values or not - $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; - if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; - } - - $picto = $this->picto; - if ($this->type == self::TYPE_REPLACEMENT) $picto .= 'r'; // Replacement invoice - if ($this->type == self::TYPE_CREDIT_NOTE) $picto .= 'a'; // Credit note - if ($this->type == self::TYPE_DEPOSIT) $picto .= 'd'; // Deposit invoice - - $label = ''.$langs->trans("SupplierInvoice").''; - if ($this->type == self::TYPE_REPLACEMENT) $label = ''.$langs->transnoentitiesnoconv("InvoiceReplace").''; - elseif ($this->type == self::TYPE_CREDIT_NOTE) $label = ''.$langs->transnoentitiesnoconv("CreditNote").''; - elseif ($this->type == self::TYPE_DEPOSIT) $label = ''.$langs->transnoentitiesnoconv("Deposit").''; - if (!empty($this->ref)) - $label .= '
'.$langs->trans('Ref').': '.$this->ref; - if (!empty($this->ref_supplier)) - $label .= '
'.$langs->trans('RefSupplier').': '.$this->ref_supplier; - if (!empty($this->label)) - $label .= '
'.$langs->trans('Label').': '.$this->label; - if (!empty($this->date)) - $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); - if (!empty($this->total_ht)) - $label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_tva)) - $label .= '
'.$langs->trans('VAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); - if (!empty($this->total_ttc)) - $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); - if ($moretitle) $label .= ' - '.$moretitle; - if (isset($this->statut) && isset($this->alreadypaid)) { - $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid); - } - - $ref = $this->ref; - if (empty($ref)) $ref = $this->id; - - $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label = $langs->trans("ShowSupplierInvoice"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip"'; - } - - $linkstart = ''; - $linkend = ''; - - $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= ($max ?dol_trunc($ref, $max) : $ref); - $result .= $linkend; - - if ($addlinktonotes) - { - $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); - if ($txttoshow) - { - $notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); - $result .= ' '; - $result .= ''; - $result .= img_picto('', 'note'); - $result .= ''; - //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); - //$result.=''; - $result .= ''; - } - } - - return $result; - } - - /** - * Return next reference of supplier invoice not already used (or last reference) - * according to numbering module defined into constant INVOICE_SUPPLIER_ADDON_NUMBER - * - * @param Societe $soc Thirdparty object - * @param string $mode 'next' for next value or 'last' for last value - * @return string free ref or last ref - */ - public function getNextNumRef($soc, $mode = 'next') - { - global $db, $langs, $conf; - $langs->load("orders"); - - // Clean parameters (if not defined or using deprecated value) - if (empty($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER)) $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER = 'mod_facture_fournisseur_cactus'; - - $mybool = false; - - $file = $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER.".php"; - $classname = $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER; - - // Include file with class - $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); - - foreach ($dirmodels as $reldir) { - $dir = dol_buildpath($reldir."core/modules/supplier_invoice/"); - - // Load file with numbering class (if found) - $mybool |= @include_once $dir.$file; - } - - if ($mybool === false) { - dol_print_error('', "Failed to include file ".$file); - return ''; - } - - $obj = new $classname(); - $numref = ""; - $numref = $obj->getNumRef($soc, $this, $mode); - - if ($numref != "") - { - return $numref; - } - else - { - $this->error = $obj->error; - //dol_print_error($db,get_class($this)."::getNextNumRef ".$obj->error); - return false; - } - } - - - /** - * Initialise an instance with random values. - * Used to build previews or test instances. - * id must be 0 if object instance is a specimen. - * - * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines - * @return void - */ - public function initAsSpecimen($option = '') - { - global $langs, $conf; - include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; - - $now = dol_now(); - - // Load array of products prodids - $num_prods = 0; - $prodids = array(); - - $sql = "SELECT rowid"; - $sql .= " FROM ".MAIN_DB_PREFIX."product"; - $sql .= " WHERE entity IN (".getEntity('product').")"; - - $resql = $this->db->query($sql); - if ($resql) - { - $num_prods = $this->db->num_rows($resql); - $i = 0; - while ($i < $num_prods) - { - $i++; - $row = $this->db->fetch_row($resql); - $prodids[$i] = $row[0]; - } - } - - // Initialise parametres - $this->id = 0; - $this->ref = 'SPECIMEN'; - $this->ref_supplier = 'SUPPLIER_REF_SPECIMEN'; - $this->specimen = 1; - $this->socid = 1; - $this->date = $now; - $this->date_lim_reglement = $this->date + 3600 * 24 * 30; - $this->cond_reglement_code = 'RECEP'; - $this->mode_reglement_code = 'CHQ'; - - $this->note_public = 'This is a comment (public)'; - $this->note_private = 'This is a comment (private)'; - - $this->multicurrency_tx = 1; - $this->multicurrency_code = $conf->currency; - - if (empty($option) || $option != 'nolines') + $resql = $this->db->query($sql); + if ($resql) { - // Lines - $nbp = 5; - $xnbp = 0; - while ($xnbp < $nbp) - { - $line = new FactureLigne($this->db); - $line->desc = $langs->trans("Description")." ".$xnbp; - $line->qty = 1; - $line->subprice = 100; - $line->pu_ht = 100; // the canelle template use pu_ht and not subprice - $line->price = 100; - $line->tva_tx = 19.6; - $line->localtax1_tx = 0; - $line->localtax2_tx = 0; - if ($xnbp == 2) - { - $line->total_ht = 50; - $line->total_ttc = 59.8; - $line->total_tva = 9.8; - $line->remise_percent = 50; - } - else - { - $line->total_ht = 100; - $line->total_ttc = 119.6; - $line->total_tva = 19.6; - $line->remise_percent = 0; + $langs->load("bills"); + $now = dol_now(); + + $response = new WorkboardResponse(); + $response->warning_delay = $conf->facture->fournisseur->warning_delay / 60 / 60 / 24; + $response->label = $langs->trans("SupplierBillsToPay"); + $response->labelShort = $langs->trans("StatusToPay"); + + $response->url = DOL_URL_ROOT.'/fourn/facture/list.php?search_status=1&mainmenu=billing&leftmenu=suppliers_bills'; + $response->img = img_object($langs->trans("Bills"), "bill"); + + $facturestatic = new FactureFournisseur($this->db); + + while ($obj = $this->db->fetch_object($resql)) + { + $response->nbtodo++; + + $facturestatic->date_echeance = $this->db->jdate($obj->datefin); + $facturestatic->statut = $obj->fk_statut; + + if ($facturestatic->hasDelay()) { + $response->nbtodolate++; + $response->url_late = DOL_URL_ROOT.'/fourn/facture/list.php?option=late&mainmenu=billing&leftmenu=suppliers_bills'; } + } + $this->db->free($resql); + return $response; + } else { + dol_print_error($this->db); + $this->error = $this->db->error(); + return -1; + } + } - if ($num_prods > 0) - { - $prodid = mt_rand(1, $num_prods); - $line->fk_product = $prodids[$prodid]; - } - $line->product_type = 0; - $this->lines[$xnbp] = $line; + /** + * Return clicable name (with picto eventually) + * + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @param string $option Where point the link + * @param int $max Max length of shown ref + * @param int $short 1=Return just URL + * @param string $moretitle Add more text to title tooltip + * @param int $notooltip 1=Disable tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $addlinktonotes Add link to show notes + * @return string String with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1, $addlinktonotes = 0) + { + global $langs, $conf, $user; - $this->total_ht += $line->total_ht; - $this->total_tva += $line->total_tva; - $this->total_ttc += $line->total_ttc; + $result = ''; - $xnbp++; - } + if ($option == 'withdraw') $url = DOL_URL_ROOT.'/compta/facture/prelevement.php?facid='.$this->id.'&type=bank-transfer'; + elseif ($option == 'document') $url = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$this->id; + else $url = DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$this->id; + + if ($short) return $url; + + if ($option !== 'nolink') + { + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; } - $this->amount_ht = $xnbp * 100; - $this->total_ht = $xnbp * 100; - $this->total_tva = $xnbp * 19.6; - $this->total_ttc = $xnbp * 119.6; - } + $picto = $this->picto; + if ($this->type == self::TYPE_REPLACEMENT) $picto .= 'r'; // Replacement invoice + if ($this->type == self::TYPE_CREDIT_NOTE) $picto .= 'a'; // Credit note + if ($this->type == self::TYPE_DEPOSIT) $picto .= 'd'; // Deposit invoice - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + $label = img_picto('', $this->picto).' '.$langs->trans("SupplierInvoice").''; + if ($this->type == self::TYPE_REPLACEMENT) $label = ''.$langs->transnoentitiesnoconv("InvoiceReplace").''; + elseif ($this->type == self::TYPE_CREDIT_NOTE) $label = ''.$langs->transnoentitiesnoconv("CreditNote").''; + elseif ($this->type == self::TYPE_DEPOSIT) $label = ''.$langs->transnoentitiesnoconv("Deposit").''; + if (!empty($this->ref)) + $label .= '
'.$langs->trans('Ref').': '.$this->ref; + if (!empty($this->ref_supplier)) + $label .= '
'.$langs->trans('RefSupplier').': '.$this->ref_supplier; + if (!empty($this->label)) + $label .= '
'.$langs->trans('Label').': '.$this->label; + if (!empty($this->date)) + $label .= '
'.$langs->trans('Date').': '.dol_print_date($this->date, 'day'); + if (!empty($this->total_ht)) + $label .= '
'.$langs->trans('AmountHT').': '.price($this->total_ht, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_tva)) + $label .= '
'.$langs->trans('AmountVAT').': '.price($this->total_tva, 0, $langs, 0, -1, -1, $conf->currency); + if (!empty($this->total_ttc)) + $label .= '
'.$langs->trans('AmountTTC').': '.price($this->total_ttc, 0, $langs, 0, -1, -1, $conf->currency); + if ($moretitle) $label .= ' - '.$moretitle; + if (isset($this->statut) && isset($this->alreadypaid)) { + $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5, $this->alreadypaid); + } + + $ref = $this->ref; + if (empty($ref)) $ref = $this->id; + + $linkclose = ''; + if (empty($notooltip)) + { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label = $langs->trans("ShowSupplierInvoice"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip"'; + } + + $linkstart = ''; + $linkend = ''; + + $result .= $linkstart; + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto != 2) $result .= ($max ?dol_trunc($ref, $max) : $ref); + $result .= $linkend; + + if ($addlinktonotes) + { + $txttoshow = ($user->socid > 0 ? $this->note_public : $this->note_private); + if ($txttoshow) + { + $notetoshow = $langs->trans("ViewPrivateNote").':
'.dol_string_nohtmltag($txttoshow, 1); + $result .= ' '; + $result .= ''; + $result .= img_picto('', 'note'); + $result .= ''; + //$result.=img_picto($langs->trans("ViewNote"),'object_generic'); + //$result.=''; + $result .= ''; + } + } + + return $result; + } + + /** + * Return next reference of supplier invoice not already used (or last reference) + * according to numbering module defined into constant INVOICE_SUPPLIER_ADDON_NUMBER + * + * @param Societe $soc Thirdparty object + * @param string $mode 'next' for next value or 'last' for last value + * @return string free ref or last ref + */ + public function getNextNumRef($soc, $mode = 'next') + { + global $db, $langs, $conf; + $langs->load("orders"); + + // Clean parameters (if not defined or using deprecated value) + if (empty($conf->global->INVOICE_SUPPLIER_ADDON_NUMBER)) $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER = 'mod_facture_fournisseur_cactus'; + + $mybool = false; + + $file = $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER.".php"; + $classname = $conf->global->INVOICE_SUPPLIER_ADDON_NUMBER; + + // Include file with class + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); + + foreach ($dirmodels as $reldir) { + $dir = dol_buildpath($reldir."core/modules/supplier_invoice/"); + + // Load file with numbering class (if found) + $mybool |= @include_once $dir.$file; + } + + if ($mybool === false) { + dol_print_error('', "Failed to include file ".$file); + return ''; + } + + $obj = new $classname(); + $numref = ""; + $numref = $obj->getNumRef($soc, $this, $mode); + + if ($numref != "") + { + return $numref; + } else { + $this->error = $obj->error; + return false; + } + } + + + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines + * @return void + */ + public function initAsSpecimen($option = '') + { + global $langs, $conf; + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + + $now = dol_now(); + + // Load array of products prodids + $num_prods = 0; + $prodids = array(); + + $sql = "SELECT rowid"; + $sql .= " FROM ".MAIN_DB_PREFIX."product"; + $sql .= " WHERE entity IN (".getEntity('product').")"; + $sql .= $this->db->plimit(100); + + $resql = $this->db->query($sql); + if ($resql) + { + $num_prods = $this->db->num_rows($resql); + $i = 0; + while ($i < $num_prods) + { + $i++; + $row = $this->db->fetch_row($resql); + $prodids[$i] = $row[0]; + } + } + + // Initialise parametres + $this->id = 0; + $this->ref = 'SPECIMEN'; + $this->ref_supplier = 'SUPPLIER_REF_SPECIMEN'; + $this->specimen = 1; + $this->socid = 1; + $this->date = $now; + $this->date_lim_reglement = $this->date + 3600 * 24 * 30; + $this->cond_reglement_code = 'RECEP'; + $this->mode_reglement_code = 'CHQ'; + + $this->note_public = 'This is a comment (public)'; + $this->note_private = 'This is a comment (private)'; + + $this->multicurrency_tx = 1; + $this->multicurrency_code = $conf->currency; + + if (empty($option) || $option != 'nolines') + { + // Lines + $nbp = 5; + $xnbp = 0; + while ($xnbp < $nbp) + { + $line = new FactureLigne($this->db); + $line->desc = $langs->trans("Description")." ".$xnbp; + $line->qty = 1; + $line->subprice = 100; + $line->pu_ht = 100; // the canelle template use pu_ht and not subprice + $line->price = 100; + $line->tva_tx = 19.6; + $line->localtax1_tx = 0; + $line->localtax2_tx = 0; + if ($xnbp == 2) + { + $line->total_ht = 50; + $line->total_ttc = 59.8; + $line->total_tva = 9.8; + $line->remise_percent = 50; + } else { + $line->total_ht = 100; + $line->total_ttc = 119.6; + $line->total_tva = 19.6; + $line->remise_percent = 0; + } + + if ($num_prods > 0) + { + $prodid = mt_rand(1, $num_prods); + $line->fk_product = $prodids[$prodid]; + } + $line->product_type = 0; + + $this->lines[$xnbp] = $line; + + $this->total_ht += $line->total_ht; + $this->total_tva += $line->total_tva; + $this->total_ttc += $line->total_ttc; + + $xnbp++; + } + } + + $this->amount_ht = $xnbp * 100; + $this->total_ht = $xnbp * 100; + $this->total_tva = $xnbp * 19.6; + $this->total_ttc = $xnbp * 119.6; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @return int <0 if KO, >0 if OK - */ - public function load_state_board() + */ + public function load_state_board() { - // phpcs:enable + // phpcs:enable global $conf, $user; $this->nb = array(); @@ -2620,94 +2541,90 @@ class FactureFournisseur extends CommonInvoice { $this->nb["supplier_invoices"] = $obj->nb; } - $this->db->free($resql); + $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; } } - /** - * Load an object from its id and create a new one in database - * - * @param User $user User that clone - * @param int $fromid Id of object to clone - * @param int $invertdetail Reverse sign of amounts for lines - * @return int New id of clone - */ - public function createFromClone(User $user, $fromid, $invertdetail = 0) - { - global $langs; + /** + * Load an object from its id and create a new one in database + * + * @param User $user User that clone + * @param int $fromid Id of object to clone + * @param int $invertdetail Reverse sign of amounts for lines + * @return int New id of clone + */ + public function createFromClone(User $user, $fromid, $invertdetail = 0) + { + global $langs; - $error = 0; + $error = 0; - $object = new FactureFournisseur($this->db); + $object = new FactureFournisseur($this->db); $this->db->begin(); - // Load source object - $object->fetch($fromid); - $object->id = 0; - $object->statut = self::STATUS_DRAFT; + // Load source object + $object->fetch($fromid); + $object->id = 0; + $object->statut = self::STATUS_DRAFT; - $object->fetch_thirdparty(); // We need it to recalculate VAT localtaxes according to main sale taxes and vendor + $object->fetch_thirdparty(); // We need it to recalculate VAT localtaxes according to main sale taxes and vendor - // Clear fields - $object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier); - $object->author = $user->id; - $object->user_valid = ''; - $object->fk_facture_source = 0; - $object->date_creation = ''; - $object->date_validation = ''; - $object->date = (empty($this->date) ? '' : $this->date); - $object->date_echeance = ''; - $object->ref_client = ''; - $object->close_code = ''; - $object->close_note = ''; + // Clear fields + $object->ref_supplier = (empty($this->ref_supplier) ? $langs->trans("CopyOf").' '.$object->ref_supplier : $this->ref_supplier); + $object->author = $user->id; + $object->user_valid = ''; + $object->fk_facture_source = 0; + $object->date_creation = ''; + $object->date_validation = ''; + $object->date = (empty($this->date) ? '' : $this->date); + $object->date_echeance = ''; + $object->ref_client = ''; + $object->close_code = ''; + $object->close_note = ''; - // Loop on each line of new invoice - foreach ($object->lines as $i => $line) - { - if (isset($object->lines[$i]->info_bits) && ($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts - { - unset($object->lines[$i]); - } - } + // Loop on each line of new invoice + foreach ($object->lines as $i => $line) + { + if (isset($object->lines[$i]->info_bits) && ($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts + { + unset($object->lines[$i]); + } + } - // Create clone - $object->context['createfromclone'] = 'createfromclone'; - $result = $object->create($user); + // Create clone + $object->context['createfromclone'] = 'createfromclone'; + $result = $object->create($user); - // Other options - if ($result < 0) - { - $this->error = $object->error; - $this->errors = $object->errors; - $error++; - } + // Other options + if ($result < 0) + { + $this->error = $object->error; + $this->errors = $object->errors; + $error++; + } - if (!$error) - { - } + if (!$error) + { + } - unset($object->context['createfromclone']); + unset($object->context['createfromclone']); - // End - if (!$error) - { - $this->db->commit(); - return $object->id; - } - else - { - $this->db->rollback(); - return -1; - } - } + // End + if (!$error) + { + $this->db->commit(); + return $object->id; + } else { + $this->db->rollback(); + return -1; + } + } /** * Create a document onto disk according to template model. @@ -2717,7 +2634,7 @@ class FactureFournisseur extends CommonInvoice * @param int $hidedetails Hide details of lines * @param int $hidedesc Hide description * @param int $hideref Hide ref - * @param null|array $moreparams Array to provide more information + * @param null|array $moreparams Array to provide more information * @return int <0 if KO, 0 if nothing done, >0 if OK */ public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null) @@ -2733,22 +2650,18 @@ class FactureFournisseur extends CommonInvoice if (!empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF)) { $modele = $conf->global->INVOICE_SUPPLIER_ADDON_PDF; - } - else - { + } else { $modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation } } if (empty($modele)) { - return 0; - } - else - { - $modelpath = "core/modules/supplier_invoice/doc/"; + return 0; + } else { + $modelpath = "core/modules/supplier_invoice/doc/"; - return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); + return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); } } @@ -2780,44 +2693,42 @@ class FactureFournisseur extends CommonInvoice return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); } - /** - * Is the payment of the supplier invoice having a delay? - * - * @return bool - */ - public function hasDelay() - { - global $conf; + /** + * Is the payment of the supplier invoice having a delay? + * + * @return bool + */ + public function hasDelay() + { + global $conf; - $now = dol_now(); + $now = dol_now(); - if (!$this->date_echeance) { - return false; - } + if (!$this->date_echeance) { + return false; + } - return ($this->statut == self::STATUS_VALIDATED) && ($this->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)); - } + return ($this->statut == self::STATUS_VALIDATED) && ($this->date_echeance < ($now - $conf->facture->fournisseur->warning_delay)); + } - /** - * Is credit note used - * - * @return bool - */ - public function isCreditNoteUsed() - { - global $db; + /** + * Is credit note used + * + * @return bool + */ + public function isCreditNoteUsed() + { + $isUsed = false; - $isUsed = false; + $sql = "SELECT fk_invoice_supplier FROM ".MAIN_DB_PREFIX."societe_remise_except WHERE fk_invoice_supplier_source=".$this->id; + $resql = $this->db->query($sql); + if (!empty($resql)) { + $obj = $this->db->fetch_object($resql); + if (!empty($obj->fk_invoice_supplier)) $isUsed = true; + } - $sql = "SELECT fk_invoice_supplier FROM ".MAIN_DB_PREFIX."societe_remise_except WHERE fk_invoice_supplier_source=".$this->id; - $resql = $db->query($sql); - if (!empty($resql)) { - $obj = $db->fetch_object($resql); - if (!empty($obj->fk_invoice_supplier))$isUsed = true; - } - - return $isUsed; - } + return $isUsed; + } } @@ -2931,63 +2842,63 @@ class SupplierInvoiceLine extends CommonObjectLine */ public $tva_tx; - /** + /** * Local tax 1 % * @var float */ public $localtax1_tx; - /** + /** * Local tax 2 % * @var float */ public $localtax2_tx; - /** + /** * Quantity * @var double */ public $qty; - /** + /** * Percent of discount * @var float */ public $remise_percent; - /** + /** * Total amount without taxes * @var float */ public $total_ht; - /** + /** * Total amount with taxes * @var float */ public $total_ttc; - /** + /** * Total amount of taxes * @var float */ public $total_tva; - /** + /** * Total local tax 1 amount * @var float */ public $total_localtax1; - /** + /** * Total local tax 2 amount * @var float */ public $total_localtax2; /** - * @var int ID - */ + * @var int ID + */ public $fk_product; /** @@ -2996,13 +2907,13 @@ class SupplierInvoiceLine extends CommonObjectLine */ public $product_type; - /** + /** * Label of the product * @var string */ public $product_label; - /** + /** * List of cumulative options: * Bit 0: 0 si TVA normal - 1 si TVA NPR * Bit 1: 0 si ligne normal - 1 si bit discount (link to line into llx_remise_except) @@ -3011,24 +2922,24 @@ class SupplierInvoiceLine extends CommonObjectLine public $info_bits; /** - * @var int ID - */ + * @var int ID + */ public $fk_parent_line; public $special_code; /** - * @var int rank of line - */ + * @var int rank of line + */ public $rang; - /** + /** * Total local tax 1 amount * @var float */ public $localtax1_type; - /** + /** * Total local tax 2 amount * @var float */ @@ -3036,8 +2947,8 @@ class SupplierInvoiceLine extends CommonObjectLine // Multicurrency /** - * @var int ID - */ + * @var int ID + */ public $fk_multicurrency; public $multicurrency_code; @@ -3047,14 +2958,14 @@ class SupplierInvoiceLine extends CommonObjectLine public $multicurrency_total_ttc; /** - * Constructor - * - * @param DoliDB $db Database handler - */ - public function __construct($db) - { - $this->db = $db; - } + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } /** * Retrieves a supplier invoice line @@ -3159,15 +3070,15 @@ class SupplierInvoiceLine extends CommonObjectLine $this->deleteObjectLinked(); // Remove extrafields - if (!$error) - { - $result = $this->deleteExtraFields(); - if ($result < 0) - { - $error++; - dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); - } - } + if (!$error) + { + $result = $this->deleteExtraFields(); + if ($result < 0) + { + $error++; + dol_syslog(get_class($this)."::delete error -4 ".$this->error, LOG_ERR); + } + } if (!$error) { // Supprime ligne @@ -3185,9 +3096,7 @@ class SupplierInvoiceLine extends CommonObjectLine { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -3231,7 +3140,7 @@ class SupplierInvoiceLine extends CommonObjectLine if (empty($this->fk_unit)) { $fk_unit = "null"; } else { - $fk_unit = "'".$this->db->escape($this->fk_unit)."'"; + $fk_unit = "'".$this->db->escape($this->fk_unit)."'"; } $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; @@ -3261,9 +3170,9 @@ class SupplierInvoiceLine extends CommonObjectLine // Multicurrency $sql .= " , multicurrency_subprice=".price2num($this->multicurrency_subprice).""; - $sql .= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; - $sql .= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; - $sql .= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; + $sql .= " , multicurrency_total_ht=".price2num($this->multicurrency_total_ht).""; + $sql .= " , multicurrency_total_tva=".price2num($this->multicurrency_total_tva).""; + $sql .= " , multicurrency_total_ttc=".price2num($this->multicurrency_total_ttc).""; $sql .= " WHERE rowid = ".$this->id; @@ -3309,182 +3218,178 @@ class SupplierInvoiceLine extends CommonObjectLine return 1; } - /** - * Insert line into database - * - * @param int $notrigger 1 no triggers - * @return int <0 if KO, >0 if OK - */ - public function insert($notrigger = 0) - { - global $user, $conf; + /** + * Insert line into database + * + * @param int $notrigger 1 no triggers + * @return int <0 if KO, >0 if OK + */ + public function insert($notrigger = 0) + { + global $user, $conf; - $error = 0; + $error = 0; - dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); + dol_syslog(get_class($this)."::insert rang=".$this->rang, LOG_DEBUG); - // Clean parameters - $this->desc = trim($this->desc); - if (empty($this->tva_tx)) $this->tva_tx = 0; - if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; - if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; - if (empty($this->localtax1_type)) $this->localtax1_type = '0'; - if (empty($this->localtax2_type)) $this->localtax2_type = '0'; - if (empty($this->total_tva)) $this->total_tva = 0; - if (empty($this->total_localtax1)) $this->total_localtax1 = 0; - if (empty($this->total_localtax2)) $this->total_localtax2 = 0; - if (empty($this->rang)) $this->rang = 0; - if (empty($this->remise_percent)) $this->remise_percent = 0; - if (empty($this->info_bits)) $this->info_bits = 0; - if (empty($this->subprice)) $this->subprice = 0; - if (empty($this->special_code)) $this->special_code = 0; - if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; - if (!isset($this->situation_percent) || $this->situation_percent > 100 || (string) $this->situation_percent == '') $this->situation_percent = 100; + // Clean parameters + $this->desc = trim($this->desc); + if (empty($this->tva_tx)) $this->tva_tx = 0; + if (empty($this->localtax1_tx)) $this->localtax1_tx = 0; + if (empty($this->localtax2_tx)) $this->localtax2_tx = 0; + if (empty($this->localtax1_type)) $this->localtax1_type = '0'; + if (empty($this->localtax2_type)) $this->localtax2_type = '0'; + if (empty($this->total_tva)) $this->total_tva = 0; + if (empty($this->total_localtax1)) $this->total_localtax1 = 0; + if (empty($this->total_localtax2)) $this->total_localtax2 = 0; + if (empty($this->rang)) $this->rang = 0; + if (empty($this->remise_percent)) $this->remise_percent = 0; + if (empty($this->info_bits)) $this->info_bits = 0; + if (empty($this->subprice)) $this->subprice = 0; + if (empty($this->special_code)) $this->special_code = 0; + if (empty($this->fk_parent_line)) $this->fk_parent_line = 0; + if (!isset($this->situation_percent) || $this->situation_percent > 100 || (string) $this->situation_percent == '') $this->situation_percent = 100; - if (empty($this->pa_ht)) $this->pa_ht = 0; - if (empty($this->multicurrency_subprice)) $this->multicurrency_subprice = 0; - if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht = 0; - if (empty($this->multicurrency_total_tva)) $this->multicurrency_total_tva = 0; - if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc = 0; + if (empty($this->pa_ht)) $this->pa_ht = 0; + if (empty($this->multicurrency_subprice)) $this->multicurrency_subprice = 0; + if (empty($this->multicurrency_total_ht)) $this->multicurrency_total_ht = 0; + if (empty($this->multicurrency_total_tva)) $this->multicurrency_total_tva = 0; + if (empty($this->multicurrency_total_ttc)) $this->multicurrency_total_ttc = 0; - // Check parameters - if ($this->product_type < 0) - { - $this->error = 'ErrorProductTypeMustBe0orMore'; - return -1; - } - if (!empty($this->fk_product)) - { - // Check product exists - $result = Product::isExistingObject('product', $this->fk_product); - if ($result <= 0) - { - $this->error = 'ErrorProductIdDoesNotExists'; - return -1; - } - } + // Check parameters + if ($this->product_type < 0) + { + $this->error = 'ErrorProductTypeMustBe0orMore'; + return -1; + } + if (!empty($this->fk_product)) + { + // Check product exists + $result = Product::isExistingObject('product', $this->fk_product); + if ($result <= 0) + { + $this->error = 'ErrorProductIdDoesNotExists'; + return -1; + } + } - $this->db->begin(); + $this->db->begin(); - // Insertion dans base de la ligne - $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' (fk_facture_fourn, fk_parent_line, label, description, ref, qty,'; - $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; - $sql .= ' fk_product, product_type, remise_percent, pu_ht, pu_ttc,'; - $sql .= ' date_start, date_end, fk_code_ventilation, rang, special_code,'; - $sql .= ' info_bits, total_ht, tva, total_ttc, total_localtax1, total_localtax2, fk_unit'; - $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; - $sql .= ')'; - $sql .= " VALUES (".$this->fk_facture_fourn.","; - $sql .= " ".($this->fk_parent_line > 0 ? "'".$this->db->escape($this->fk_parent_line)."'" : "null").","; - $sql .= " ".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; - $sql .= " '".$this->db->escape($this->desc ? $this->desc : $this->description)."',"; - $sql .= " '".$this->db->escape($this->ref_supplier)."',"; - $sql .= " ".price2num($this->qty).","; + // Insertion dans base de la ligne + $sql = 'INSERT INTO '.MAIN_DB_PREFIX.$this->table_element; + $sql .= ' (fk_facture_fourn, fk_parent_line, label, description, ref, qty,'; + $sql .= ' vat_src_code, tva_tx, localtax1_tx, localtax2_tx, localtax1_type, localtax2_type,'; + $sql .= ' fk_product, product_type, remise_percent, pu_ht, pu_ttc,'; + $sql .= ' date_start, date_end, fk_code_ventilation, rang, special_code,'; + $sql .= ' info_bits, total_ht, tva, total_ttc, total_localtax1, total_localtax2, fk_unit'; + $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc'; + $sql .= ')'; + $sql .= " VALUES (".$this->fk_facture_fourn.","; + $sql .= " ".($this->fk_parent_line > 0 ? "'".$this->db->escape($this->fk_parent_line)."'" : "null").","; + $sql .= " ".(!empty($this->label) ? "'".$this->db->escape($this->label)."'" : "null").","; + $sql .= " '".$this->db->escape($this->desc ? $this->desc : $this->description)."',"; + $sql .= " '".$this->db->escape($this->ref_supplier)."',"; + $sql .= " ".price2num($this->qty).","; - $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; - $sql .= " ".price2num($this->tva_tx).","; - $sql .= " ".price2num($this->localtax1_tx).","; - $sql .= " ".price2num($this->localtax2_tx).","; - $sql .= " '".$this->db->escape($this->localtax1_type)."',"; - $sql .= " '".$this->db->escape($this->localtax2_type)."',"; - $sql .= ' '.(!empty($this->fk_product) ? $this->fk_product : "null").','; - $sql .= " ".$this->product_type.","; - $sql .= " ".price2num($this->remise_percent).","; - $sql .= " ".price2num($this->subprice).","; - $sql .= " ".(!empty($this->qty) ?price2num($this->total_ttc / $this->qty) : price2num($this->total_ttc)).","; - $sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").","; - $sql .= " ".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null").","; - $sql .= ' '.(!empty($this->fk_code_ventilation) ? $this->fk_code_ventilation : 0).','; - $sql .= ' '.$this->rang.','; - $sql .= ' '.$this->special_code.','; - $sql .= " '".$this->db->escape($this->info_bits)."',"; - $sql .= " ".price2num($this->total_ht).","; - $sql .= " ".price2num($this->total_tva).","; - $sql .= " ".price2num($this->total_ttc).","; - $sql .= " ".price2num($this->total_localtax1).","; - $sql .= " ".price2num($this->total_localtax2); - $sql .= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit); - $sql .= ", ".(int) $this->fk_multicurrency; - $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; - $sql .= ", ".price2num($this->multicurrency_subprice); - $sql .= ", ".price2num($this->multicurrency_total_ht); - $sql .= ", ".price2num($this->multicurrency_total_tva); - $sql .= ", ".price2num($this->multicurrency_total_ttc); - $sql .= ')'; + $sql .= " ".(empty($this->vat_src_code) ? "''" : "'".$this->db->escape($this->vat_src_code)."'").","; + $sql .= " ".price2num($this->tva_tx).","; + $sql .= " ".price2num($this->localtax1_tx).","; + $sql .= " ".price2num($this->localtax2_tx).","; + $sql .= " '".$this->db->escape($this->localtax1_type)."',"; + $sql .= " '".$this->db->escape($this->localtax2_type)."',"; + $sql .= ' '.(!empty($this->fk_product) ? $this->fk_product : "null").','; + $sql .= " ".$this->product_type.","; + $sql .= " ".price2num($this->remise_percent).","; + $sql .= " ".price2num($this->subprice).","; + $sql .= " ".(!empty($this->qty) ?price2num($this->total_ttc / $this->qty) : price2num($this->total_ttc)).","; + $sql .= " ".(!empty($this->date_start) ? "'".$this->db->idate($this->date_start)."'" : "null").","; + $sql .= " ".(!empty($this->date_end) ? "'".$this->db->idate($this->date_end)."'" : "null").","; + $sql .= ' '.(!empty($this->fk_code_ventilation) ? $this->fk_code_ventilation : 0).','; + $sql .= ' '.$this->rang.','; + $sql .= ' '.$this->special_code.','; + $sql .= " '".$this->db->escape($this->info_bits)."',"; + $sql .= " ".price2num($this->total_ht).","; + $sql .= " ".price2num($this->total_tva).","; + $sql .= " ".price2num($this->total_ttc).","; + $sql .= " ".price2num($this->total_localtax1).","; + $sql .= " ".price2num($this->total_localtax2); + $sql .= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit); + $sql .= ", ".(int) $this->fk_multicurrency; + $sql .= ", '".$this->db->escape($this->multicurrency_code)."'"; + $sql .= ", ".price2num($this->multicurrency_subprice); + $sql .= ", ".price2num($this->multicurrency_total_ht); + $sql .= ", ".price2num($this->multicurrency_total_tva); + $sql .= ", ".price2num($this->multicurrency_total_ttc); + $sql .= ')'; - $resql = $this->db->query($sql); - if ($resql) - { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); - $this->rowid = $this->id; // backward compatibility + $resql = $this->db->query($sql); + if ($resql) + { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); + $this->rowid = $this->id; // backward compatibility - if (!$error) - { - $result = $this->insertExtraFields(); - if ($result < 0) - { - $error++; - } - } + if (!$error) + { + $result = $this->insertExtraFields(); + if ($result < 0) + { + $error++; + } + } - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('LINEBILL_SUPPLIER_CREATE', $user); - if ($result < 0) - { - $this->db->rollback(); - return -2; - } - // End call triggers - } + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('LINEBILL_SUPPLIER_CREATE', $user); + if ($result < 0) + { + $this->db->rollback(); + return -2; + } + // End call triggers + } - $this->db->commit(); - return $this->id; - } - else - { - $this->error = $this->db->error(); - $this->db->rollback(); - return -2; - } - } + $this->db->commit(); + return $this->id; + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -2; + } + } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Mise a jour de l'objet ligne de commande en base - * - * @return int <0 si ko, >0 si ok - */ - public function update_total() - { - // phpcs:enable - $this->db->begin(); + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Mise a jour de l'objet ligne de commande en base + * + * @return int <0 si ko, >0 si ok + */ + public function update_total() + { + // phpcs:enable + $this->db->begin(); - // Mise a jour ligne en base - $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; - $sql .= " total_ht='".price2num($this->total_ht)."'"; - $sql .= ", tva='".price2num($this->total_tva)."'"; - $sql .= ", total_localtax1='".price2num($this->total_localtax1)."'"; - $sql .= ", total_localtax2='".price2num($this->total_localtax2)."'"; - $sql .= ", total_ttc='".price2num($this->total_ttc)."'"; - $sql .= " WHERE rowid = ".$this->rowid; + // Mise a jour ligne en base + $sql = "UPDATE ".MAIN_DB_PREFIX."facture_fourn_det SET"; + $sql .= " total_ht='".price2num($this->total_ht)."'"; + $sql .= ", tva='".price2num($this->total_tva)."'"; + $sql .= ", total_localtax1='".price2num($this->total_localtax1)."'"; + $sql .= ", total_localtax2='".price2num($this->total_localtax2)."'"; + $sql .= ", total_ttc='".price2num($this->total_ttc)."'"; + $sql .= " WHERE rowid = ".$this->rowid; - dol_syslog("FactureFournisseurLigne.class.php::update_total", LOG_DEBUG); + dol_syslog("FactureFournisseurLigne.class.php::update_total", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - $this->db->commit(); - return 1; - } - else - { - $this->error = $this->db->error(); - $this->db->rollback(); - return -2; - } - } + $resql = $this->db->query($sql); + if ($resql) + { + $this->db->commit(); + return 1; + } else { + $this->error = $this->db->error(); + $this->db->rollback(); + return -2; + } + } } diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 1643ae69846..8752d17a5d8 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -149,9 +149,7 @@ class ProductFournisseur extends Product { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -287,8 +285,7 @@ class ProductFournisseur extends Product $localtax1 = $localtaxes_array['1']; $localtaxtype2 = $localtaxes_array['2']; $localtax2 = $localtaxes_array['3']; - } - else // old method. deprecated because ot can't retreive type + } else // old method. deprecated because ot can't retreive type { $localtaxtype1 = '0'; $localtax1 = get_localtax($newvat, 1); @@ -352,8 +349,8 @@ class ProductFournisseur extends Product // TODO Add localtax1 and localtax2 //$sql.= " localtax1_tx=".($localtax1>=0?$localtax1:'NULL').","; //$sql.= " localtax2_tx=".($localtax2>=0?$localtax2:'NULL').","; - //$sql.= " localtax1_type=".($localtaxtype1!=''?"'".$localtaxtype1."'":"'0'").","; - //$sql.= " localtax2_type=".($localtaxtype2!=''?"'".$localtaxtype2."'":"'0'").","; + //$sql.= " localtax1_type=".($localtaxtype1!=''?"'".$this->db->escape($localtaxtype1)."'":"'0'").","; + //$sql.= " localtax2_type=".($localtaxtype2!=''?"'".$this->db->escape($localtaxtype2)."'":"'0'").","; $sql .= " default_vat_code=".($newdefaultvatcode ? "'".$this->db->escape($newdefaultvatcode)."'" : "null").","; $sql .= " info_bits = ".$newnpr.","; $sql .= " charges = ".$charges.","; // deprecated @@ -384,22 +381,16 @@ class ProductFournisseur extends Product { $this->db->commit(); return $this->product_fourn_price_id; - } - else - { + } else { $this->db->rollback(); return -1; } - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -2; } - } - else - { + } else { dol_syslog(get_class($this).'::update_buyprice without knowing id of line, so we delete from company, quantity and supplier_ref and insert again', LOG_DEBUG); // Delete price for this quantity @@ -447,8 +438,7 @@ class ProductFournisseur extends Product $resql = $this->db->query($sql); if ($resql) { $this->product_fourn_price_id = $this->db->last_insert_id(MAIN_DB_PREFIX."product_fournisseur_price"); - } - else { + } else { $error++; } @@ -566,23 +556,17 @@ class ProductFournisseur extends Product if ($this->fourn_qty != 0) { $this->fourn_unitprice = price2num($this->fourn_price / $this->fourn_qty, 'MU'); - } - else - { + } else { $this->fourn_unitprice = ""; } } } return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -685,9 +669,7 @@ class ProductFournisseur extends Product if ($prodfourn->fourn_qty != 0) { $prodfourn->fourn_unitprice = price2num($prodfourn->fourn_price / $prodfourn->fourn_qty, 'MU'); - } - else - { + } else { $prodfourn->fourn_unitprice = ""; } } @@ -697,9 +679,7 @@ class ProductFournisseur extends Product $this->db->free($resql); return $retarray; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -775,9 +755,7 @@ class ProductFournisseur extends Product { $this->db->free($resql); return 0; - } - else - { + } else { $min = -1; foreach ($record_array as $record) { @@ -798,9 +776,7 @@ class ProductFournisseur extends Product if ($record["quantity"] != 0) { $fourn_unitprice = price2num($fourn_price / $record["quantity"], 'MU'); - } - else - { + } else { $fourn_unitprice = $fourn_price; } } @@ -835,9 +811,7 @@ class ProductFournisseur extends Product $this->db->free($resql); return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -868,9 +842,7 @@ class ProductFournisseur extends Product { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error()." sql=".$sql; $this->db->rollback(); return -1; @@ -997,9 +969,7 @@ class ProductFournisseur extends Product $this->db->free($resql); return $retarray; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -1087,8 +1057,7 @@ class ProductFournisseur extends Product } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 42f25a3a5ad..67133ed97b2 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -119,12 +119,11 @@ class PaiementFourn extends Paiement $this->entity = $obj->entity; $this->date = $this->db->jdate($obj->dp); $this->datepaye = $this->db->jdate($obj->dp); - $this->num_paiement = $obj->num_payment; $this->num_payment = $obj->num_payment; $this->bank_account = $obj->fk_account; $this->fk_account = $obj->fk_account; $this->bank_line = $obj->fk_bank; - $this->montant = $obj->amount; + $this->montant = $obj->amount; // deprecated $this->amount = $obj->amount; $this->multicurrency_amount = $obj->multicurrency_amount; $this->note = $obj->note; @@ -134,15 +133,11 @@ class PaiementFourn extends Paiement $this->statut = $obj->statut; $error = 1; - } - else - { + } else { $error = -2; // TODO Use 0 instead } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db); $error = -1; } @@ -174,16 +169,14 @@ class PaiementFourn extends Paiement { $amounts = &$this->amounts; $amounts_to_update = &$this->multicurrency_amounts; - } - else - { + } else { $amounts = &$this->multicurrency_amounts; $amounts_to_update = &$this->amounts; } foreach ($amounts as $key => $value) { - $value_converted = Multicurrency::getAmountConversionFromInvoiceRate($key, $value, $way, 'facture_fourn'); + $value_converted = Multicurrency::getAmountConversionFromInvoiceRate($key, $value? $value : 0, $way, 'facture_fourn'); $totalamount_converted += $value_converted; $amounts_to_update[$key] = price2num($value_converted, 'MT'); @@ -205,9 +198,7 @@ class PaiementFourn extends Paiement { $total = $totalamount; $mtotal = $totalamount_converted; // Maybe use price2num with MT for the converted value - } - else - { + } else { $total = $totalamount_converted; // Maybe use price2num with MT for the converted value $mtotal = $totalamount; } @@ -215,7 +206,7 @@ class PaiementFourn extends Paiement $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'paiementfourn ('; $sql .= 'ref, entity, datec, datep, amount, multicurrency_amount, fk_paiement, num_paiement, note, fk_user_author, fk_bank)'; $sql .= " VALUES ('".$this->db->escape($ref)."', ".$conf->entity.", '".$this->db->idate($now)."',"; - $sql .= " '".$this->db->idate($this->datepaye)."', '".$total."', '".$mtotal."', ".$this->paiementid.", '".$this->db->escape($this->num_paiement)."', '".$this->db->escape($this->note)."', ".$user->id.", 0)"; + $sql .= " '".$this->db->idate($this->datepaye)."', '".$total."', '".$mtotal."', ".$this->paiementid.", '".$this->db->escape($this->num_payment)."', '".$this->db->escape($this->note_private)."', ".$user->id.", 0)"; $resql = $this->db->query($sql); if ($resql) @@ -250,8 +241,7 @@ class PaiementFourn extends Paiement if ($remaintopay == 0) { $result = $invoice->set_paid($user, '', ''); - } - else dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing."); + } else dol_syslog("Remain to pay for invoice ".$facid." not null. We do nothing."); } // Regenerate documents of invoices @@ -265,21 +255,17 @@ class PaiementFourn extends Paiement $outputlangs->setDefaultLang($newlang); } $ret = $invoice->fetch($facid); // Reload to get new records - $result = $invoice->generateDocument($invoice->modelpdf, $outputlangs); + $result = $invoice->generateDocument($invoice->model_pdf, $outputlangs); if ($result < 0) { setEventMessages($invoice->error, $invoice->errors, 'errors'); $error++; } } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } - } - else - { + } else { dol_syslog(get_class($this).'::Create Amount line '.$key.' not a number. We discard it.'); } } @@ -291,15 +277,11 @@ class PaiementFourn extends Paiement if ($result < 0) $error++; // End call triggers } - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } - } - else - { + } else { $this->error = "ErrorTotalIsNull"; dol_syslog('PaiementFourn::Create Error '.$this->error, LOG_ERR); $error++; @@ -313,9 +295,7 @@ class PaiementFourn extends Paiement $this->db->commit(); dol_syslog('PaiementFourn::Create Ok Total = '.$this->total); return $this->id; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -349,9 +329,7 @@ class PaiementFourn extends Paiement $this->db->rollback(); return -1; } - } - else - { + } else { $this->db->rollback(); return -2; } @@ -417,9 +395,7 @@ class PaiementFourn extends Paiement $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error; $this->db->rollback(); return -5; @@ -463,9 +439,7 @@ class PaiementFourn extends Paiement $this->date_modification = $this->db->jdate($obj->tms); } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db); } } @@ -499,9 +473,7 @@ class PaiementFourn extends Paiement } return $billsarray; - } - else - { + } else { $this->error = $this->db->error(); dol_syslog(get_class($this).'::getBillsArray Error '.$this->error); return -1; @@ -708,9 +680,7 @@ class PaiementFourn extends Paiement } return $numref; - } - else - { + } else { $langs->load("errors"); print $langs->trans("Error")." ".$langs->trans("ErrorModuleSetupNotComplete", $langs->transnoentitiesnoconv("Supplier")); return ""; @@ -740,9 +710,7 @@ class PaiementFourn extends Paiement if (!empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF)) { $modele = $conf->global->SUPPLIER_PAYMENT_ADDON_PDF; - } - else - { + } else { $modele = ''; // No default value. For supplier invoice, we allow to disable all PDF generation } } @@ -750,9 +718,7 @@ class PaiementFourn extends Paiement if (empty($modele)) { return 0; - } - else - { + } else { $modelpath = "core/modules/supplier_payment/doc/"; return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams); diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 3fb7ae18cbc..7cbe020142f 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -99,8 +99,7 @@ if ($id > 0 || !empty($ref)) if ($ret < 0) dol_print_error($db, $object->error); $ret = $object->fetch_thirdparty(); if ($ret < 0) dol_print_error($db, $object->error); -} -elseif (!empty($socid) && $socid > 0) +} elseif (!empty($socid) && $socid > 0) { $fourn = new Fournisseur($db); $ret = $fourn->fetch($socid); @@ -110,10 +109,25 @@ elseif (!empty($socid) && $socid > 0) if ($ret < 0) dol_print_error($db, $object->error); } -$permissionnote = $user->rights->fournisseur->commande->creer; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->fournisseur->commande->creer; // Used by the include of actions_dellink.inc.php -$permissiontoedit = $user->rights->fournisseur->commande->creer; // Used by the include of actions_lineupdown.inc.php -$permissiontoadd = $user->rights->fournisseur->commande->creer; // Used by the include of actions_addupdatedelete.inc.php +// Common permissions +$usercanread = $user->rights->fournisseur->commande->lire; +$usercancreate = $user->rights->fournisseur->commande->creer; +$usercandelete = $user->rights->fournisseur->commande->supprimer; + +// Advanced permissions +$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_order_advance->validate))); + +// Additional area permissions +$usercanapprove = $user->rights->fournisseur->commande->approuver; +$usercanapprovesecond = $user->rights->fournisseur->commande->approve2; +$usercanorder = $user->rights->fournisseur->commande->commander; +$usercanreceived = $user->rights->fournisseur->commande->receptionner; + +// Permissions for includes +$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php +$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php /* @@ -142,128 +156,126 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once - if ($action == 'setref_supplier' && $user->rights->fournisseur->commande->creer) + if ($action == 'setref_supplier' && $usercancreate) { $result = $object->setValueFrom('ref_supplier', GETPOST('ref_supplier', 'alpha'), '', null, 'text', '', $user, 'ORDER_SUPPLIER_MODIFY'); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // Set incoterm - if ($action == 'set_incoterms' && $user->rights->fournisseur->commande->creer) + if ($action == 'set_incoterms' && $usercancreate) { $result = $object->setIncoterms(GETPOST('incoterm_id', 'int'), GETPOST('location_incoterms', 'alpha')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // payment conditions - if ($action == 'setconditions' && $user->rights->fournisseur->commande->creer) + if ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // payment mode - if ($action == 'setmode' && $user->rights->fournisseur->commande->creer) + if ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // Multicurrency Code - elseif ($action == 'setmulticurrencycode' && $user->rights->fournisseur->commande->creer) { + elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - elseif ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->commande->creer) { + elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx'))); } // bank account - if ($action == 'setbankaccount' && $user->rights->fournisseur->commande->creer) + if ($action == 'setbankaccount' && $usercancreate) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // date of delivery - if ($action == 'setdate_livraison' && $user->rights->fournisseur->commande->creer) + if ($action == 'setdate_livraison' && $usercancreate) { $result = $object->set_date_livraison($user, $datelivraison); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } // Set project - if ($action == 'classin' && $user->rights->fournisseur->commande->creer) + if ($action == 'classin' && $usercancreate) { $result = $object->setProject($projectid); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } - // Edit Thirdparty - if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && $action == 'set_thirdparty' && $user->rights->fournisseur->commande->creer && $object->statut == CommandeFournisseur::STATUS_DRAFT) - { - $new_socid = GETPOST('new_socid', 'int'); - if (!empty($new_socid) && $new_socid != $object->thirdparty->id) { - $db->begin(); + // Edit Thirdparty + if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && $action == 'set_thirdparty' && $usercancreate && $object->statut == CommandeFournisseur::STATUS_DRAFT) + { + $new_socid = GETPOST('new_socid', 'int'); + if (!empty($new_socid) && $new_socid != $object->thirdparty->id) { + $db->begin(); - // Update supplier - $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur'; - $sql .= ' SET fk_soc='.$new_socid; - $sql .= ' WHERE fk_soc='.$object->thirdparty->id; - $sql .= ' AND rowid='.$object->id; + // Update supplier + $sql = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur'; + $sql .= ' SET fk_soc='.$new_socid; + $sql .= ' WHERE fk_soc='.$object->thirdparty->id; + $sql .= ' AND rowid='.$object->id; - $res = $db->query($sql); + $res = $db->query($sql); - if (!$res) $db->rollback(); - else { - $db->commit(); + if (!$res) $db->rollback(); + else { + $db->commit(); - // Replace prices for each lines by new supplier prices - foreach ($object->lines as $l) { - $sql = 'SELECT price, unitprice, tva_tx, ref_fourn'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price'; - $sql .= ' WHERE fk_product='.$l->fk_product; - $sql .= ' AND fk_soc='.$new_socid; - $sql .= ' ORDER BY unitprice ASC'; + // Replace prices for each lines by new supplier prices + foreach ($object->lines as $l) { + $sql = 'SELECT price, unitprice, tva_tx, ref_fourn'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price'; + $sql .= ' WHERE fk_product='.$l->fk_product; + $sql .= ' AND fk_soc='.$new_socid; + $sql .= ' ORDER BY unitprice ASC'; - $resql = $db->query($sql); - if ($resql) { - $num_row = $db->num_rows($resql); - if (empty($num_row)) { - // No product price for this supplier ! - $l->subprice = 0; - $l->total_ht = 0; - $l->total_tva = 0; - $l->total_ttc = 0; - $l->ref_supplier = ''; - $l->update(); - } - else { - // No need for loop to keep best supplier price - $obj = $db->fetch_object($resql); - $l->subprice = $obj->unitprice; - $l->total_ht = $obj->price; - $l->tva_tx = $obj->tva_tx; - $l->total_tva = $l->total_ht * ($obj->tva_tx / 100); - $l->total_ttc = $l->total_ht + $l->total_tva; - $l->ref_supplier = $obj->ref_fourn; - $l->update(); - } - } - else { - dol_print_error($db); - } - $db->free($resql); - } - $object->update_price(); - } - } - header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); - exit; - } + $resql = $db->query($sql); + if ($resql) { + $num_row = $db->num_rows($resql); + if (empty($num_row)) { + // No product price for this supplier ! + $l->subprice = 0; + $l->total_ht = 0; + $l->total_tva = 0; + $l->total_ttc = 0; + $l->ref_supplier = ''; + $l->update(); + } else { + // No need for loop to keep best supplier price + $obj = $db->fetch_object($resql); + $l->subprice = $obj->unitprice; + $l->total_ht = $obj->price; + $l->tva_tx = $obj->tva_tx; + $l->total_tva = $l->total_ht * ($obj->tva_tx / 100); + $l->total_ttc = $l->total_ht + $l->total_tva; + $l->ref_supplier = $obj->ref_fourn; + $l->update(); + } + } else { + dol_print_error($db); + } + $db->free($resql); + } + $object->update_price(); + } + } + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); + exit; + } - if ($action == 'setremisepercent' && $user->rights->fournisseur->commande->creer) + if ($action == 'setremisepercent' && $usercancreate) { $result = $object->set_remise($user, $_POST['remise_percent']); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); @@ -284,8 +296,7 @@ if (empty($reshook)) //$newstatus=3; // Submited // TODO If there is at least one reception, we can set to Received->Received partially $newstatus = 4; // Received partially - } - elseif ($object->statut == 6) $newstatus = 2; // Canceled->Approved + } elseif ($object->statut == 6) $newstatus = 2; // Canceled->Approved elseif ($object->statut == 7) $newstatus = 3; // Canceled->Process running elseif ($object->statut == 9) $newstatus = 1; // Refused->Validated else $newstatus = 2; @@ -316,9 +327,7 @@ if (empty($reshook)) header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); @@ -329,7 +338,7 @@ if (empty($reshook)) /* * Classify supplier order as billed */ - if ($action == 'classifybilled' && $user->rights->fournisseur->commande->creer) + if ($action == 'classifybilled' && $usercancreate) { $ret = $object->classifyBilled($user); if ($ret < 0) { @@ -338,7 +347,7 @@ if (empty($reshook)) } // Add a product line - if ($action == 'addline' && $user->rights->fournisseur->commande->creer) + if ($action == 'addline' && $usercancreate) { $db->begin(); @@ -356,9 +365,7 @@ if (empty($reshook)) $idprod = 0; $price_ht = GETPOST('price_ht'); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $price_ht = GETPOST('price_ht'); $tva_tx = ''; @@ -399,7 +406,7 @@ if (empty($reshook)) setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Description')), null, 'errors'); $error++; } - if (!GETPOST('qty')) + if (GETPOST('qty', 'int') == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; @@ -441,14 +448,11 @@ if (empty($reshook)) { $productsupplier->ref_supplier = ''; } - } - else - { + } else { $fksoctosearch = $object->thirdparty->id; $productsupplier->get_buyprice(0, -1, $idprod, 'none', $fksoctosearch); // We force qty to -1 to be sure to find if a supplier price exist } - } - elseif (GETPOST('idprodfournprice', 'alpha') > 0) + } elseif (GETPOST('idprodfournprice', 'alpha') > 0) { $qtytosearch = $qty; // Just to see if a price exists for the quantity. Not used to found vat. //$qtytosearch=-1; // We force qty to -1 to be sure to find if a supplier price exist @@ -477,7 +481,7 @@ if (empty($reshook)) } // if we use supplier description of the products if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) { - $desc = $productsupplier->desc_supplier; + $desc = $productsupplier->desc_supplier; } if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); @@ -549,8 +553,7 @@ if (empty($reshook)) $langs->load("errors"); setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } - } - elseif (empty($error)) // $price_ht is already set + } elseif (empty($error)) // $price_ht is already set { $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); $tva_tx = str_replace('*', '', $tva_tx); @@ -570,9 +573,7 @@ if (empty($reshook)) if ($price_ht !== '') { $pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings - } - else - { + } else { $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); $pu_ht = price2num($pu_ttc / (1 + ($tva_tx / 100)), 'MU'); // $pu_ht must be rounded according to settings } @@ -600,7 +601,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -638,9 +639,7 @@ if (empty($reshook)) unset($_POST['date_endday']); unset($_POST['date_endmonth']); unset($_POST['date_endyear']); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } @@ -651,7 +650,7 @@ if (empty($reshook)) /* * Updating a line in the order */ - if ($action == 'updateline' && $user->rights->fournisseur->commande->creer && !GETPOST('cancel', 'alpha')) + if ($action == 'updateline' && $usercancreate && !GETPOST('cancel', 'alpha')) { $db->begin(); @@ -667,7 +666,7 @@ if (empty($reshook)) $productsupplier = new ProductFournisseur($db); if (!empty($conf->global->SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY)) { - if ($line->fk_product > 0 && $productsupplier->get_buyprice(0, price2num($_POST['qty']), $line->fk_product, 'none', GETPOST('socid', 'int')) < 0) + if ($line->fk_product > 0 && $productsupplier->get_buyprice(0, price2num(GETPOST('qty', 'int')), $line->fk_product, 'none', GETPOST('socid', 'int')) < 0) { setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'warnings'); } @@ -682,7 +681,7 @@ if (empty($reshook)) $info_bits |= 0x01; } - // Define vat_rate + // Define vat_rate $vat_rate = str_replace('*', '', $vat_rate); $localtax1_rate = get_localtax($vat_rate, 1, $mysoc, $object->thirdparty); $localtax2_rate = get_localtax($vat_rate, 2, $mysoc, $object->thirdparty); @@ -691,9 +690,7 @@ if (empty($reshook)) { $price_base_type = 'HT'; $ht = price2num(GETPOST('price_ht')); - } - else - { + } else { $vatratecleaned = $vat_rate; if (preg_match('/^(.*)\s*\((.*)\)$/', $vat_rate, $reg)) // If vat is "xx (yy)" { @@ -722,7 +719,7 @@ if (empty($reshook)) $lineid, $_POST['product_desc'], $ht, - $_POST['qty'], + GETPOST('qty', 'int'), $_POST['remise_percent'], $vat_rate, $localtax1_rate, @@ -779,7 +776,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -787,9 +784,7 @@ if (empty($reshook)) } $db->commit(); - } - else - { + } else { $db->rollback(); dol_print_error($db, $object->error); @@ -798,7 +793,7 @@ if (empty($reshook)) } // Remove a product line - if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer) + if ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $db->begin(); @@ -818,11 +813,9 @@ if (empty($reshook)) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); // Reset action to avoid asking again confirmation on failure @@ -840,10 +833,7 @@ if (empty($reshook)) } // Validate - if ($action == 'confirm_valid' && $confirm == 'yes' && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_order_advance->validate))) - ) + if ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $db->begin(); @@ -862,7 +852,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -871,15 +861,13 @@ if (empty($reshook)) dol_print_error($db, $result); } } - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); } // If we have permission, and if we don't need to provide the idwarehouse, we go directly on approved step - if (!$error && empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE) && $user->rights->fournisseur->commande->approuver && !(!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $object->hasProductsOrServices(1))) + if (!$error && empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE) && $usercanapprove && !(!empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_VALIDATE_ORDER) && $object->hasProductsOrServices(1))) { $action = 'confirm_approve'; // can make standard or first level approval also if permission is set } @@ -891,7 +879,7 @@ if (empty($reshook)) } } - if (($action == 'confirm_approve' || $action == 'confirm_approve2') && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver) + if (($action == 'confirm_approve' || $action == 'confirm_approve2') && $confirm == 'yes' && $usercanapprove) { $db->begin(); @@ -901,9 +889,7 @@ if (empty($reshook)) if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -932,11 +918,9 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -952,31 +936,29 @@ if (empty($reshook)) } } - if ($action == 'confirm_refuse' && $confirm == 'yes' && $user->rights->fournisseur->commande->approuver) + if ($action == 'confirm_refuse' && $confirm == 'yes' && $usercanapprove) { $result = $object->refuse($user); if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } // Force mandatory order method - if ($action == 'commande') { - $methodecommande = GETPOST('methodecommande', 'int'); + if ($action == 'commande') { + $methodecommande = GETPOST('methodecommande', 'int'); - if ($methodecommande <= 0) { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors'); - $action = 'makeorder'; - } - } + if ($methodecommande <= 0) { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("OrderMode")), null, 'errors'); + $action = 'makeorder'; + } + } - if ($action == 'confirm_commande' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander) + if ($action == 'confirm_commande' && $confirm == 'yes' && $usercanorder) { $db->begin(); @@ -993,12 +975,10 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } $action = ''; - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -1014,29 +994,25 @@ if (empty($reshook)) } - if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisseur->commande->supprimer) + if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { $result = $object->delete($user); if ($result > 0) { header("Location: ".DOL_URL_ROOT.'/fourn/commande/list.php?restore_lastsearch_values=1'); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } // Action clone object - if ($action == 'confirm_clone' && $confirm == 'yes' && $user->rights->fournisseur->commande->creer) + if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) { if (1 == 0 && !GETPOST('clone_content') && !GETPOST('clone_receivers')) { setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { + } else { if ($object->id > 0) { $orig = clone $object; @@ -1046,9 +1022,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $object = $orig; $action = ''; @@ -1058,7 +1032,7 @@ if (empty($reshook)) } // Set status of reception (complete, partial, ...) - if ($action == 'livraison' && $user->rights->fournisseur->commande->receptionner) + if ($action == 'livraison' && $usercanreceived) { $db->begin(); @@ -1072,20 +1046,15 @@ if (empty($reshook)) $langs->load("deliveries"); setEventMessages($langs->trans("DeliveryStateSaved"), null); $action = ''; - } - elseif ($result == -3) + } elseif ($result == -3) { $error++; setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Delivery")), null, 'errors'); } @@ -1097,16 +1066,14 @@ if (empty($reshook)) } } - if ($action == 'confirm_cancel' && $confirm == 'yes' && $user->rights->fournisseur->commande->commander) + if ($action == 'confirm_cancel' && $confirm == 'yes' && $usercanorder) { $result = $object->cancel($user); if ($result > 0) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1122,7 +1089,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->fournisseur->commande->dir_output; - $permissiontoadd = $user->rights->fournisseur->commande->creer; + $permissiontoadd = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; @@ -1131,7 +1098,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) @@ -1155,10 +1122,10 @@ if (empty($reshook)) /* * Create an order */ - if ($action == 'add' && $user->rights->fournisseur->commande->creer) + if ($action == 'add' && $usercancreate) { $error = 0; - $selectedLines = GETPOST('toselect', 'array'); + $selectedLines = GETPOST('toselect', 'array'); if ($socid < 1) { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Supplier')), null, 'errors'); @@ -1176,8 +1143,8 @@ if (empty($reshook)) $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); - $object->note_private = GETPOST('note_private', 'none'); - $object->note_public = GETPOST('note_public', 'none'); + $object->note_private = GETPOST('note_private', 'restricthtml'); + $object->note_public = GETPOST('note_public', 'restricthtml'); $object->date_livraison = $datelivraison; $object->fk_incoterms = GETPOST('incoterm_id', 'int'); $object->location_incoterms = GETPOST('location_incoterms', 'alpha'); @@ -1201,14 +1168,11 @@ if (empty($reshook)) { $classname = 'Propal'; $element = 'comm/propal'; $subelement = 'propal'; - } - elseif ($origin == 'order' || $origin == 'commande') + } elseif ($origin == 'order' || $origin == 'commande') { $classname = 'Commande'; $element = $subelement = 'commande'; - } - else - { + } else { $classname = 'SupplierProposal'; $element = 'supplier_proposal'; $subelement = 'supplier_proposal'; @@ -1280,9 +1244,7 @@ if (empty($reshook)) $ref_supplier = $productsupplier->ref_supplier; $product_fourn_price_id = $productsupplier->product_fourn_price_id; } - } - else - { + } else { $ref_supplier = $lines[$i]->ref_fourn; $product_fourn_price_id = 0; } @@ -1314,7 +1276,7 @@ if (empty($reshook)) '', null, null, - $array_option, + $array_option, $lines[$i]->fk_unit, 0, $element, @@ -1349,9 +1311,7 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $error++; } - } - else - { + } else { $id = $object->create($user); if ($id < 0) { @@ -1367,9 +1327,7 @@ if (empty($reshook)) $db->rollback(); $action = 'create'; $_GET['socid'] = $_POST['socid']; - } - else - { + } else { $db->commit(); header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); exit; @@ -1456,19 +1414,16 @@ if (empty($reshook)) if (empty($result_order["result"]["result_code"])) //No result, check error str { setEventMessages($langs->trans("SOAPError")." '".$soapclient_order->error_str."'", null, 'errors'); - } - elseif ($result_order["result"]["result_code"] != "OK") //Something went wrong + } elseif ($result_order["result"]["result_code"] != "OK") //Something went wrong { setEventMessages($langs->trans("SOAPError")." '".$result_order["result"]["result_code"]."' - '".$result_order["result"]["result_label"]."'", null, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RemoteOrderRef")." ".$result_order["ref"], null, 'mesgs'); } } } - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->fournisseur->commande->creer) + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) { if ($action == 'addcontact') { @@ -1482,16 +1437,12 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1512,8 +1463,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -1534,8 +1484,8 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; llxHeader('', $langs->trans("Order"), $help_url); - $now = dol_now(); + if ($action == 'create') { print load_fiche_titre($langs->trans('NewOrderSupplier'), '', 'supplier_order'); @@ -1565,14 +1515,11 @@ if ($action == 'create') { $classname = 'Propal'; $element = 'comm/propal'; $subelement = 'propal'; - } - elseif ($origin == 'order' || $origin == 'commande') + } elseif ($origin == 'order' || $origin == 'commande') { $classname = 'Commande'; $element = $subelement = 'commande'; - } - else - { + } else { $classname = 'SupplierProposal'; $element = 'supplier_proposal'; $subelement = 'supplier_proposal'; @@ -1617,9 +1564,7 @@ if ($action == 'create') // Object source contacts list $srccontactslist = $objectsrc->liste_contact(-1, 'external', 1); - } - else - { + } else { $cond_reglement_id = $societe->cond_reglement_supplier_id; $mode_reglement_id = $societe->mode_reglement_supplier_id; @@ -1657,9 +1602,7 @@ if ($action == 'create') { print $societe->getNomUrl(1); print ''; - } - else - { + } else { print $form->select_company((empty($socid) ? '' : $socid), 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); // reload page to retrieve customer informations if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) @@ -1760,7 +1703,7 @@ if ($action == 'create') print ''.$langs->trans('NotePublic').''; print ''; - $doleditor = new DolEditor('note_public', isset($note_public) ? $note_public : GETPOST('note_public', 'none'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', isset($note_public) ? $note_public : GETPOST('note_public', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print ''; //print ''; @@ -1768,7 +1711,7 @@ if ($action == 'create') print ''.$langs->trans('NotePrivate').''; print ''; - $doleditor = new DolEditor('note_private', isset($note_private) ? $note_private : GETPOST('note_private', 'none'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', isset($note_private) ? $note_private : GETPOST('note_private', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print ''; //print ''; @@ -1842,10 +1785,8 @@ if ($action == 'create') print ''; } - print "\n"; -} -elseif (!empty($object->id)) -{ + print "\n"; +} elseif (!empty($object->id)) { $result = $object->fetch($id, $ref); $societe = new Fournisseur($db); @@ -1892,16 +1833,13 @@ elseif (!empty($object->id)) if (preg_match('/^[\(]?PROV/i', $object->ref) || empty($object->ref)) // empty should not happened, but when it occurs, the test save life { $newref = $object->getNextNumRef($object->thirdparty); - } - else $newref = $object->ref; + } else $newref = $object->ref; if ($newref < 0) { setEventMessages($object->error, $object->errors, 'errors'); $action = ''; - } - else - { + } else { $text = $langs->trans('ConfirmValidateOrder', $newref); if (!empty($conf->notification->enabled)) { @@ -1922,9 +1860,7 @@ elseif (!empty($object->id)) if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -1995,60 +1931,57 @@ elseif (!empty($object->id)) $morehtmlref = '
'; // Ref supplier - $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->commande->creer, 'string', '', null, null, '', 1); + $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', null, null, '', 1); // Thirdparty $morehtmlref .= '
'.$langs->trans('ThirdParty'); - if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && !empty($user->rights->fournisseur->commande->creer) && $action == 'edit_thirdparty') { - $morehtmlref .= ' : '; - $morehtmlref .= '
'; - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= $form->select_company($object->thirdparty->id, 'new_socid', 's.fournisseur=1', '', 0, 0, array(), 0, 'minwidth300'); - $morehtmlref .= ''; - $morehtmlref .= '
'; - } - if (empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) || $action != 'edit_thirdparty') { - if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && $object->statut == CommandeFournisseur::STATUS_DRAFT) { - $morehtmlref .= '
'.img_edit($langs->transnoentitiesnoconv('SetThirdParty')).''; - } - $morehtmlref .= ' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherOrders").')'; - } + if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && !empty($usercancreate) && $action == 'edit_thirdparty') { + $morehtmlref .= ' : '; + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $form->select_company($object->thirdparty->id, 'new_socid', 's.fournisseur=1', '', 0, 0, array(), 0, 'minwidth300'); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } + if (empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) || $action != 'edit_thirdparty') { + if (!empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && $object->statut == CommandeFournisseur::STATUS_DRAFT) { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetThirdParty')).''; + } + $morehtmlref .= ' : '.$object->thirdparty->getNomUrl(1); + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherOrders").')'; + } // Project - if (!empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref .= '
'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) { - if ($action != 'classify') - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= '
'; - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500'); - $morehtmlref .= ''; - $morehtmlref .= '
'; - } - else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } - else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ''; - $morehtmlref .= $proj->ref; - $morehtmlref .= ''; - } - else { - $morehtmlref .= ''; - } - } - } + if (!empty($conf->projet->enabled)) { + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project').' '; + if ($usercancreate) { + if ($action != 'classify') + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1, 0, 'maxwidth500'); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } + } $morehtmlref .= '
'; @@ -2117,9 +2050,7 @@ elseif (!empty($object->id)) if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none'); } print ""; @@ -2137,9 +2068,7 @@ elseif (!empty($object->id)) if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'DBIT', 1, 1); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -2201,7 +2130,7 @@ elseif (!empty($object->id)) print ''; print '
'; print $langs->trans('BankAccount'); print ''; - if ($action != 'editbankaccount' && $user->rights->fournisseur->commande->creer) + if ($action != 'editbankaccount' && $usercancreate) print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
'; print ''; @@ -2232,9 +2161,7 @@ elseif (!empty($object->id)) print $form->selectDate($object->date_livraison ? $object->date_livraison : -1, 'liv_', $usehourmin, $usehourmin, '', "setdate_livraison"); print ''; print ''; - } - else - { + } else { $usehourmin = 'day'; if (!empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) $usehourmin = 'dayhour'; print $object->date_livraison ? dol_print_date($object->date_livraison, $usehourmin) : ' '; @@ -2257,17 +2184,15 @@ elseif (!empty($object->id)) print '
'; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->fournisseur->commande->creer) print ''.img_edit().''; + if ($usercancreate) print ''.img_edit().''; else print ' '; print '
'; print ''; print ''; if ($action != 'editincoterm') { - print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } - else - { + print $form->textwithpicto(dol_escape_htmltag($object->display_incoterms()), $object->label_incoterms, 1); + } else { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); } print ''; @@ -2397,7 +2322,7 @@ elseif (!empty($object->id)) $num = count($object->lines); // Form to add new line - if ($object->statut == CommandeFournisseur::STATUS_DRAFT && $user->rights->fournisseur->commande->creer) + if ($object->statut == CommandeFournisseur::STATUS_DRAFT && $usercancreate) { if ($action != 'editline') { @@ -2432,11 +2357,10 @@ elseif (!empty($object->id)) // Validate if ($object->statut == 0 && $num > 0) { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->commande->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_order_advance->validate))) + if ($usercanvalidate) { $tmpbuttonlabel = $langs->trans('Validate'); - if ($user->rights->fournisseur->commande->approuver && empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE)) $tmpbuttonlabel = $langs->trans("ValidateAndApprove"); + if ($usercanapprove && empty($conf->global->SUPPLIER_ORDER_NO_DIRECT_APPROVE)) $tmpbuttonlabel = $langs->trans("ValidateAndApprove"); print ''; print $tmpbuttonlabel; @@ -2452,7 +2376,7 @@ elseif (!empty($object->id)) // Modify if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { - if ($user->rights->fournisseur->commande->commander) + if ($usercanorder) { print ''.$langs->trans("Modify").''; } @@ -2461,19 +2385,15 @@ elseif (!empty($object->id)) // Approve if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { - if ($user->rights->fournisseur->commande->approuver) + if ($usercanapprove) { if (!empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED) && $object->total_ht >= $conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED && !empty($object->user_approve_id)) { print ''.$langs->trans("ApproveOrder").''; - } - else - { + } else { print ''.$langs->trans("ApproveOrder").''; } - } - else - { + } else { print ''.$langs->trans("ApproveOrder").''; } } @@ -2483,19 +2403,15 @@ elseif (!empty($object->id)) { if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { - if ($user->rights->fournisseur->commande->approve2) + if ($usercanapprovesecond) { if (!empty($object->user_approve_id2)) { print ''.$langs->trans("Approve2Order").''; - } - else - { + } else { print ''.$langs->trans("Approve2Order").''; } - } - else - { + } else { print ''.$langs->trans("Approve2Order").''; } } @@ -2504,12 +2420,10 @@ elseif (!empty($object->id)) // Refuse if ($object->statut == CommandeFournisseur::STATUS_VALIDATED) { - if ($user->rights->fournisseur->commande->approuver || $user->rights->fournisseur->commande->approve2) + if ($usercanapprove || $usercanapprovesecond) { print ''.$langs->trans("RefuseOrder").''; - } - else - { + } else { print ''.$langs->trans("RefuseOrder").''; } } @@ -2518,7 +2432,7 @@ elseif (!empty($object->id)) if (empty($user->socid)) { if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED, 3, 4, 5)) || !empty($conf->global->SUPPLIER_ORDER_SENDBYEMAIL_FOR_ALL_STATUS)) { - if ($user->rights->fournisseur->commande->commander) + if ($usercanorder) { print ''.$langs->trans('SendMail').''; } @@ -2529,7 +2443,7 @@ elseif (!empty($object->id)) if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED))) { $buttonshown = 0; - if (!$buttonshown && $user->rights->fournisseur->commande->approuver) + if (!$buttonshown && $usercanapprove) { if (empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER_ONLY) || (!empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER_ONLY) && $user->id == $object->user_approve_id)) @@ -2538,7 +2452,7 @@ elseif (!empty($object->id)) $buttonshown++; } } - if (!$buttonshown && $user->rights->fournisseur->commande->approve2 && !empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)) + if (!$buttonshown && $usercanapprovesecond && !empty($conf->global->SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED)) { if (empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER2_ONLY) || (!empty($conf->global->SUPPLIER_ORDER_REOPEN_BY_APPROVER2_ONLY) && $user->id == $object->user_approve_id2)) @@ -2549,7 +2463,7 @@ elseif (!empty($object->id)) } if (in_array($object->statut, array(3, 4, 5, 6, 7, 9))) { - if ($user->rights->fournisseur->commande->commander) + if ($usercanorder) { print ''.$langs->trans("ReOpen").''; } @@ -2563,7 +2477,7 @@ elseif (!empty($object->id)) if ($conf->reception->enabled) $labelofbutton = $langs->trans("CreateReception"); if (in_array($object->statut, array(3, 4, 5))) { - if ($conf->fournisseur->enabled && $user->rights->fournisseur->commande->receptionner) { + if ($conf->fournisseur->enabled && $usercanreceived) { print ''; } else { print ''; @@ -2573,12 +2487,10 @@ elseif (!empty($object->id)) if ($object->statut == CommandeFournisseur::STATUS_ACCEPTED) { - if ($user->rights->fournisseur->commande->commander) + if ($usercanorder) { print ''; - } - else - { + } else { print ''; } } @@ -2586,7 +2498,7 @@ elseif (!empty($object->id)) // Classify received (this does not record reception) if ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY) { - if ($user->rights->fournisseur->commande->receptionner) + if ($usercanreceived) { print ''; } @@ -2605,23 +2517,19 @@ elseif (!empty($object->id)) //} // Classify billed manually (need one invoice if module invoice is on, no condition on invoice if not) - if ($user->rights->fournisseur->commande->creer && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved + if ($usercancreate && $object->statut >= 2 && $object->statut != 7 && $object->billed != 1) // statut 2 means approved { if (empty($conf->facture->enabled)) { print ''.$langs->trans("ClassifyBilled").''; - } - else - { + } else { if (!empty($object->linkedObjectsIds['invoice_supplier'])) { if ($user->rights->fournisseur->facture->creer) { print ''.$langs->trans("ClassifyBilled").''; } - } - else - { + } else { print ''.$langs->trans("ClassifyBilled").''; } } @@ -2634,7 +2542,7 @@ elseif (!empty($object->id)) } // Clone - if ($user->rights->fournisseur->commande->creer) + if ($usercancreate) { print ''.$langs->trans("ToClone").''; } @@ -2642,16 +2550,16 @@ elseif (!empty($object->id)) // Cancel if ($object->statut == 2) { - if ($user->rights->fournisseur->commande->commander) + if ($usercanorder) { print ''.$langs->trans("CancelOrder").''; } } // Delete - if (!empty($user->rights->fournisseur->commande->supprimer) || ($object->statut == CommandeFournisseur::STATUS_DRAFT && !empty($user->rights->fournisseur->commande->creer))) + if (!empty($usercandelete) || ($object->statut == CommandeFournisseur::STATUS_DRAFT && !empty($usercancreate))) { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; } } @@ -2659,7 +2567,7 @@ elseif (!empty($object->id)) - if ($user->rights->fournisseur->commande->commander && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') + if ($usercanorder && $object->statut == CommandeFournisseur::STATUS_ACCEPTED && $action == 'makeorder') { // Set status to ordered (action=commande) print ''."\n"; @@ -2676,8 +2584,8 @@ elseif (!empty($object->id)) print $form->selectDate($date_com, '', 1, 1, '', "commande", 1, 1); print ''; - // Force mandatory order method - print ''.$langs->trans("OrderMode").''; + // Force mandatory order method + print ''.$langs->trans("OrderMode").''; $formorder->selectInputMethod(GETPOST('methodecommande'), "methodecommande", 1); print ''; @@ -2703,10 +2611,10 @@ elseif (!empty($object->id)) $relativepath = $objref.'/'.$objref.'.pdf'; $filedir = $conf->fournisseur->dir_output.'/commande/'.$objref; $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $user->rights->fournisseur->commande->lire; - $delallowed = $user->rights->fournisseur->commande->creer; + $genallowed = $usercanread; + $delallowed = $usercancreate; - print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang); + print $formfile->showdocuments('commande_fournisseur', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 0, 0, '', '', '', $object->thirdparty->default_lang); $somethingshown = $formfile->numoffiles; // Show links to link elements @@ -2717,7 +2625,7 @@ elseif (!empty($object->id)) if ($action == 'classifyreception') { - if ($user->rights->fournisseur->commande->receptionner && ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY)) + if ($usercanreceived && ($object->statut == CommandeFournisseur::STATUS_ORDERSENT || $object->statut == CommandeFournisseur::STATUS_RECEIVED_PARTIALLY)) { // Set status to received (action=livraison) print ''."\n"; @@ -2806,9 +2714,7 @@ elseif (!empty($object->id)) { print "
".$langs->trans("ErrorOccurredReviseAndRetry")."
"; print ''; - } - else - { + } else { $textinput_size = "50"; // Webservice url print ''.$langs->trans("WebServiceURL").''.dol_print_url($ws_url).''; @@ -2828,8 +2734,7 @@ elseif (!empty($object->id)) //End table/form print ''; print ''; - } - elseif ($mode == "check") + } elseif ($mode == "check") { $ws_entity = ''; $ws_thirdparty = ''; @@ -2855,9 +2760,7 @@ elseif (!empty($object->id)) { setEventMessages($langs->trans("RemoteUserMissingAssociatedSoc"), null, 'errors'); $error_occurred = true; - } - else - { + } else { //Create SOAP client and connect it to product/service $soapclient_product = new nusoap_client($ws_url."/webservices/server_productorservice.php"); $soapclient_product->soap_defencoding = 'UTF-8'; @@ -2886,15 +2789,12 @@ elseif (!empty($object->id)) if (empty($status_code)) //No result, check error str { setEventMessages($langs->trans("SOAPError")." '".$soapclient_order->error_str."'", null, 'errors'); - } - elseif ($status_code != "OK") //Something went wrong + } elseif ($status_code != "OK") //Something went wrong { if ($status_code == "NOT_FOUND") { setEventMessages($line_id.$langs->trans("SupplierMissingRef")." '".$ref_supplier."'", null, 'warnings'); - } - else - { + } else { setEventMessages($line_id.$langs->trans("ResponseNonOK")." '".$status_code."' - '".$result_product["result"]["result_label"]."'", null, 'errors'); $error_occurred = true; break; @@ -2929,19 +2829,15 @@ elseif (!empty($object->id)) } } } - } - elseif ($user_status_code == "PERMISSION_DENIED") + } elseif ($user_status_code == "PERMISSION_DENIED") { setEventMessages($langs->trans("RemoteUserNotPermission"), null, 'errors'); $error_occurred = true; - } - elseif ($user_status_code == "BAD_CREDENTIALS") + } elseif ($user_status_code == "BAD_CREDENTIALS") { setEventMessages($langs->trans("RemoteUserBadCredentials"), null, 'errors'); $error_occurred = true; - } - else - { + } else { setEventMessages($langs->trans("ResponseNonOK")." '".$user_status_code."'", null, 'errors'); $error_occurred = true; } @@ -2958,9 +2854,7 @@ elseif (!empty($object->id)) if ($error_occurred) { print "
".$langs->trans("ErrorOccurredReviseAndRetry")."
"; - } - else - { + } else { print ''; print '     '; } diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 7ff0dd1c85a..683658c791e 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -38,7 +38,7 @@ $langs->loadLangs(array("facture", "orders", "sendings", "companies")); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; @@ -65,16 +65,12 @@ if ($action == 'addcontact' && $user->rights->fournisseur->commande->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -86,9 +82,7 @@ elseif ($action == 'swapstatut' && $user->rights->fournisseur->commande->creer) if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db); } } @@ -103,8 +97,7 @@ elseif ($action == 'deletecontact' && $user->rights->fournisseur->commande->cree { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -193,9 +186,7 @@ if ($id > 0 || !empty($ref)) // Contacts lines include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'; - } - else - { + } else { // Contact not found print "ErrorRecordNotFound"; } diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 5e285f20457..03297d9f8fc 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -6,9 +6,9 @@ * Copyright (C) 2010-2019 Juanjo Menent * Copyright (C) 2014 Cedric Gross * Copyright (C) 2016 Florian Henry - * Copyright (C) 2017 Ferran Marcet + * Copyright (C) 2017-2020 Ferran Marcet * Copyright (C) 2018 Frédéric France - * Copyright (C) 2019 Christophe Battarel + * Copyright (C) 2019-2020 Christophe Battarel * * 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 @@ -38,6 +38,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.dispatch.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once DOL_DOCUMENT_ROOT . '/product/stock/class/mouvementstock.class.php'; + if (!empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; @@ -53,6 +55,8 @@ $ref = GETPOST('ref'); $lineid = GETPOST('lineid', 'int'); $action = GETPOST('action', 'aZ09'); $fk_default_warehouse = GETPOST('fk_default_warehouse', 'int'); +$cancel = GETPOST('cancel', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); if ($user->socid) $socid = $user->socid; @@ -128,9 +132,7 @@ if ($action == 'checkdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_ if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -171,9 +173,7 @@ if ($action == 'uncheckdispatchline' && !((empty($conf->global->MAIN_USE_ADVANCE if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -214,9 +214,7 @@ if ($action == 'denydispatchline' && !((empty($conf->global->MAIN_USE_ADVANCED_P if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } } @@ -245,7 +243,7 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2]); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); if (!empty($dto)) { $unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU'); } @@ -271,14 +269,14 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { - $dto = GETPOST("dto_".$reg[1].'_'.$reg[2]); + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); //update supplier price if (GETPOSTISSET($saveprice)) { // TODO Use class $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; $sql .= " SET unitprice='".GETPOST($pu)."'"; $sql .= ", price=".GETPOST($pu)."*quantity"; - $sql .= ", remise_percent='".$dto."'"; + $sql .= ", remise_percent='".(!empty($dto)?$dto:0)."'"; $sql .= " WHERE fk_soc=".$object->socid; $sql .= " AND fk_product=".GETPOST($prod, 'int'); @@ -308,6 +306,16 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) $fk_commandefourndet = 'fk_commandefourndet_'.$reg[1].'_'.$reg[2]; + if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { + if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); + if (!empty($dto)) { + $unit_price = price2num(GETPOST("pu_".$reg[1]) * (100 - $dto) / 100, 'MU'); + } + $saveprice = "saveprice_".$reg[1].'_'.$reg[2]; + } + } + // We ask to move a qty if (GETPOST($qty) > 0) { if (!(GETPOST($ent, 'int') > 0)) { @@ -330,6 +338,24 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) setEventMessages($object->error, $object->errors, 'errors'); $error++; } + + if (!$error && !empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { + if (empty($conf->multicurrency->enabled) && empty($conf->dynamicprices->enabled)) { + $dto = GETPOST("dto_".$reg[1].'_'.$reg[2], 'int'); + //update supplier price + if (GETPOSTISSET($saveprice)) { + // TODO Use class + $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price"; + $sql .= " SET unitprice='".GETPOST($pu)."'"; + $sql .= ", price=".GETPOST($pu)."*quantity"; + $sql .= ", remise_percent='".(!empty($dto)?$dto:0)."'"; + $sql .= " WHERE fk_soc=".$object->socid; + $sql .= " AND fk_product=".GETPOST($prod, 'int'); + + $resql = $db->query($sql); + } + } + } } } } @@ -366,6 +392,121 @@ if ($action == 'dispatch' && $user->rights->fournisseur->commande->receptionner) } } +// Remove a dispatched line +if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->commande->receptionner) +{ + $db->begin(); + + $supplierorderdispatch = new CommandeFournisseurDispatch($db); + $result = $supplierorderdispatch->fetch($lineid); + if ($result > 0) + { + $qty = $supplierorderdispatch->qty; + $entrepot = $supplierorderdispatch->fk_entrepot; + $product = $supplierorderdispatch->fk_product; + $price = GETPOST('price'); + $comment = $supplierorderdispatch->comment; + $eatby = $supplierorderdispatch->fk_product; + $sellby = $supplierorderdispatch->sellby; + $batch = $supplierorderdispatch->batch; + + $result = $supplierorderdispatch->delete($user); + } + if ($result < 0) + { + $errors = $object->errors; + $error++; + } + else { + // If module stock is enabled and the stock increase is done on purchase order dispatching + if ($entrepot > 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) + { + $mouv = new MouvementStock($db); + if ($product > 0) + { + $mouv->origin = &$object; + $result=$mouv->livraison($user, $product, $entrepot, $qty, $price, $comment, '', $eatby, $sellby, $batch); + if ($result < 0) + { + $errors=$mouv->errors; + $error++; + } + } + } + } + if ($error > 0) + { + $db->rollback(); + setEventMessages($error, $errors, 'errors'); + } + else { + $db->commit(); + } +} + +// Update a dispatched line +if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionner) +{ + $db->begin(); + $error = 0; + + $supplierorderdispatch = new CommandeFournisseurDispatch($db); + $result = $supplierorderdispatch->fetch($lineid); + if ($result > 0) + { + $qty = $supplierorderdispatch->qty; + $entrepot = $supplierorderdispatch->fk_entrepot; + $product = $supplierorderdispatch->fk_product; + $price = GETPOST('price'); + $comment = $supplierorderdispatch->comment; + $eatby = $supplierorderdispatch->fk_product; + $sellby = $supplierorderdispatch->sellby; + $batch = $supplierorderdispatch->batch; + + $supplierorderdispatch->qty = GETPOST('qty', 'int'); + $supplierorderdispatch->fk_entrepot = GETPOST('fk_entrepot'); + $result = $supplierorderdispatch->update($user); + } + if ($result < 0) + { + $error++; + $errors=$supplierorderdispatch->errors; + } + else { + // If module stock is enabled and the stock increase is done on purchase order dispatching + if ($entrepot > 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) + { + $mouv = new MouvementStock($db); + if ($product > 0) + { + $mouv->origin = &$object; + $result=$mouv->livraison($user, $product, $entrepot, $qty, $price, $comment, '', $eatby, $sellby, $batch); + if ($result < 0) + { + $errors=$mouv->errors; + $error++; + } + else { + $mouv->origin = &$object; + $result=$mouv->reception($user, $product, $supplierorderdispatch->fk_entrepot, $supplierorderdispatch->qty, $price, $comment, $eatby, $sellby, $batch); + if ($result < 0) + { + $errors=$mouv->errors; + $error++; + } + } + } + } + } + if ($error > 0) + { + $db->rollback(); + setEventMessages($error, $errors, 'errors'); + } + else { + $db->commit(); + } +} /* * View @@ -379,7 +520,7 @@ $warehouse_static = new Entrepot($db); $supplierorderdispatch = new CommandeFournisseurDispatch($db); $help_url = 'EN:Module_Suppliers_Orders|FR:CommandeFournisseur|ES:Módulo_Pedidos_a_proveedores'; -llxHeader('', $langs->trans("Order"), $help_url, '', 0, 0, array('/fourn/js/lib_dispatch.js.php')); +llxHeader('', $langs->trans("OrderDispatch"), $help_url, '', 0, 0, array('/fourn/js/lib_dispatch.js.php')); if ($id > 0 || !empty($ref)) { $soc = new Societe($db); @@ -393,6 +534,23 @@ if ($id > 0 || !empty($ref)) { $title = $langs->trans("SupplierOrder"); dol_fiche_head($head, 'dispatch', $title, -1, 'order'); + $formconfirm=''; + + // Confirmation to delete line + if ($action == 'ask_deleteline') + { + $formconfirm=$form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); + } + + // Call Hook formConfirm + $parameters = array('lineid' => $lineid); + // Note that $action and $object may be modified by hook + $reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); + if (empty($reshook)) $formconfirm.=$hookmanager->resPrint; + elseif ($reshook > 0) $formconfirm=$hookmanager->resPrint; + + // Print form confirm + print $formconfirm; // Supplier order card @@ -407,36 +565,36 @@ if ($id > 0 || !empty($ref)) { // Project if (!empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref .= '
'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->commande->creer) - { - if ($action != 'classify') { - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project').' '; + if ($user->rights->fournisseur->commande->creer) + { + if ($action != 'classify') { + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref .= ' : '; - } - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= '
'; - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= ''; - $morehtmlref .= '
'; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ''; - $morehtmlref .= $proj->ref; - $morehtmlref .= ''; - } else { - $morehtmlref .= ''; - } - } + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } } $morehtmlref .= '
'; @@ -467,8 +625,8 @@ if ($id > 0 || !empty($ref)) { print ''.$author->getNomUrl(1, '', 0, 0, 0).''; print ''; - $parameters = array(); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + $parameters = array(); + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print ""; @@ -493,9 +651,12 @@ if ($id > 0 || !empty($ref)) { require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; $formproduct = new FormProduct($db); $formproduct->loadWarehouses(); + $entrepot = new Entrepot($db); + $listwarehouses=$entrepot->list_array(1); + if (empty($conf->reception->enabled))print '
'; - else print ''; + else print ''; print ''; if (empty($conf->reception->enabled))print ''; @@ -530,16 +691,16 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT l.rowid, l.fk_product, l.subprice, l.remise_percent, l.ref AS sref, SUM(l.qty) as qty,"; $sql .= " p.ref, p.label, p.tobatch, p.fk_default_warehouse"; - // Enable hooks to alter the SQL query (SELECT) - $parameters = array(); - $reshook = $hookmanager->executeHooks( - 'printFieldListSelect', - $parameters, - $object, - $action - ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - $sql .= $hookmanager->resPrint; + // Enable hooks to alter the SQL query (SELECT) + $parameters = array(); + $reshook = $hookmanager->executeHooks( + 'printFieldListSelect', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."commande_fournisseurdet as l"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON l.fk_product=p.rowid"; @@ -547,16 +708,16 @@ if ($id > 0 || !empty($ref)) { if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) $sql .= " AND l.product_type = 0"; - // Enable hooks to alter the SQL query (WHERE) - $parameters = array(); - $reshook = $hookmanager->executeHooks( - 'printFieldListWhere', - $parameters, - $object, - $action - ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - $sql .= $hookmanager->resPrint; + // Enable hooks to alter the SQL query (WHERE) + $parameters = array(); + $reshook = $hookmanager->executeHooks( + 'printFieldListWhere', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + $sql .= $hookmanager->resPrint; $sql .= " GROUP BY p.ref, p.label, p.tobatch, l.rowid, l.fk_product, l.subprice, l.remise_percent, p.fk_default_warehouse"; // Calculation of amount dispatched is done per fk_product so we must group by fk_product $sql .= " ORDER BY p.ref, p.label"; @@ -567,20 +728,18 @@ if ($id > 0 || !empty($ref)) { $i = 0; if ($num) { - $entrepot = new Entrepot($db); - $listwarehouses = $entrepot->list_array(1); - print ''; print ''.$langs->trans("Description").''; - if (!empty($conf->productbatch->enabled)) - { + if (!empty($conf->productbatch->enabled)) { print ''.$langs->trans("batch_number").''; - print ''.$langs->trans("EatByDate").''; - print ''.$langs->trans("SellByDate").''; - } - else - { + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''.$langs->trans("EatByDate").''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print ''.$langs->trans("SellByDate").''; + } + } else { print ''; print ''; print ''; @@ -588,7 +747,8 @@ if ($id > 0 || !empty($ref)) { print ''.$langs->trans("SupplierRef").''; print ''.$langs->trans("QtyOrdered").''; print ''.$langs->trans("QtyDispatchedShort").''; - print ''.$langs->trans("QtyToDispatchShort").''; + print ' '.$langs->trans("QtyToDispatchShort"); + print '
'.$langs->trans("Reset").''; print ''; if (!empty($conf->global->SUPPLIER_ORDER_CAN_UPDATE_BUYINGPRICE_DURING_RECEIPT)) { @@ -602,27 +762,24 @@ if ($id > 0 || !empty($ref)) { print ''.$langs->trans("Warehouse"); // Select warehouse to force it everywhere - if (count($listwarehouses) > 1) - { + if (count($listwarehouses) > 1) { print '
'.$langs->trans("ForceTo").' '.$form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 1, 0, 0, '', 0, 0, $disabled); - } - elseif (count($listwarehouses) == 1) - { + } elseif (count($listwarehouses) == 1) { print '
'.$langs->trans("ForceTo").' '.$form->selectarray('fk_default_warehouse', $listwarehouses, $fk_default_warehouse, 0, 0, 0, '', 0, 0, $disabled); } print ''; - // Enable hooks to append additional columns - $parameters = array(); - $reshook = $hookmanager->executeHooks( - 'printFieldListTitle', - $parameters, - $object, - $action - ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - print $hookmanager->resPrint; + // Enable hooks to append additional columns + $parameters = array(); + $reshook = $hookmanager->executeHooks( + 'printFieldListTitle', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; print "\n"; } @@ -666,8 +823,12 @@ if ($id > 0 || !empty($ref)) { print $linktoprod; print ""; print ''; - print ''; - print ''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print ''; + } } else { print ''; print $linktoprod; @@ -675,8 +836,12 @@ if ($id > 0 || !empty($ref)) { print ''; print $langs->trans("ProductDoesNotUseBatchSerial"); print ''; - print ''; - print ''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print ''; + } } } else { print ''; @@ -707,21 +872,21 @@ if ($id > 0 || !empty($ref)) { print ''; // Dispatch column print ''; // Warehouse column - // Enable hooks to append additional columns - $parameters = array( - 'is_information_row' => true, // allows hook to distinguish between the - // rows with information and the rows with - // dispatch form input - 'objp' => $objp - ); - $reshook = $hookmanager->executeHooks( - 'printFieldListValue', - $parameters, - $object, - $action - ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - print $hookmanager->resPrint; + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => true, // allows hook to distinguish between the + // rows with information and the rows with + // dispatch form input + 'objp' => $objp + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; print ''; @@ -733,11 +898,9 @@ if ($id > 0 || !empty($ref)) { print ''; if (!empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) // Not tested ! { - print $langs->trans("BuyingPrice").': '; - } - else - { - print ''; + print $langs->trans("BuyingPrice").': '; + } else { + print ''; } print ''; @@ -745,17 +908,24 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; print ''; - print ''; - $dlcdatesuffix = dol_mktime(0, 0, 0, GETPOST('dlc'.$suffix.'month'), GETPOST('dlc'.$suffix.'day'), GETPOST('dlc'.$suffix.'year')); - print $form->selectDate($dlcdatesuffix, 'dlc'.$suffix, '', '', 1, ''); - print ''; - print ''; - $dluodatesuffix = dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year')); - print $form->selectDate($dluodatesuffix, 'dluo'.$suffix, '', '', 1, ''); - print ''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''; + $dlcdatesuffix = dol_mktime(0, 0, 0, GETPOST('dlc' . $suffix . 'month'), GETPOST('dlc' . $suffix . 'day'), GETPOST('dlc' . $suffix . 'year')); + print $form->selectDate($dlcdatesuffix, 'dlc' . $suffix, '', '', 1, ''); + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''; + $dluodatesuffix = dol_mktime(0, 0, 0, GETPOST('dluo'.$suffix.'month'), GETPOST('dluo'.$suffix.'day'), GETPOST('dluo'.$suffix.'year')); + print $form->selectDate($dluodatesuffix, 'dluo'.$suffix, '', '', 1, ''); + print ''; + } print ' '; // Supplier ref + Qty ordered + qty already dispatched } else { $type = 'dispatch'; + $colspan = 7; + $colspan = (!empty($conf->global->PRODUCT_DISABLE_EATBY)) ? --$colspan : $colspan; + $colspan = (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) ? --$colspan : $colspan; print ''; print ''; // Qty to dispatch print ''; @@ -763,37 +933,35 @@ if ($id > 0 || !empty($ref)) { print ''; // Dispatch column print ''; // Warehouse column - // Enable hooks to append additional columns - $parameters = array( - 'is_information_row' => true, // allows hook to distinguish between the - // rows with information and the rows with - // dispatch form input - 'objp' => $objp - ); - $reshook = $hookmanager->executeHooks( - 'printFieldListValue', - $parameters, - $object, - $action - ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - print $hookmanager->resPrint; + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => true, // allows hook to distinguish between the + // rows with information and the rows with + // dispatch form input + 'objp' => $objp + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; if (!empty($conf->global->SUPPLIER_ORDER_EDIT_BUYINGPRICE_DURING_RECEIPT)) // Not tested ! { - print $langs->trans("BuyingPrice").': '; - } - else - { - print ''; + print $langs->trans("BuyingPrice").': '; + } else { + print ''; } print ''; @@ -806,13 +974,11 @@ if ($id > 0 || !empty($ref)) { print ''; if (!empty($conf->productbatch->enabled) && $objp->tobatch == 1) { - $type = 'batch'; - print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$i.', \''.$type.'\')"'); - } - else - { - $type = 'dispatch'; - print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$i.', \''.$type.'\')"'); + $type = 'batch'; + print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$i.', \''.$type.'\')"'); + } else { + $type = 'dispatch'; + print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$i.', \''.$type.'\')"'); } print ''; @@ -825,7 +991,7 @@ if ($id > 0 || !empty($ref)) { // Discount print ''; - print ''; + print ''; print ''; // Save price @@ -847,18 +1013,18 @@ if ($id > 0 || !empty($ref)) { } print "\n"; - // Enable hooks to append additional columns - $parameters = array( - 'is_information_row' => false // this is a dispatch form row - ); - $reshook = $hookmanager->executeHooks( - 'printFieldListValue', - $parameters, - $object, - $action - ); - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - print $hookmanager->resPrint; + // Enable hooks to append additional columns + $parameters = array( + 'is_information_row' => false // this is a dispatch form row + ); + $reshook = $hookmanager->executeHooks( + 'printFieldListValue', + $parameters, + $object, + $action + ); + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print $hookmanager->resPrint; print "\n"; } @@ -883,20 +1049,20 @@ if ($id > 0 || !empty($ref)) { // modified by hook if (empty($reshook)) { - if (empty($conf->reception->enabled)) { - print $langs->trans("Comment").' : '; - print 'trans("DispatchSupplierOrder", $object->ref); - // print ' / '.$object->ref_supplier; // Not yet available - print '" class="flat">
'; + if (empty($conf->reception->enabled)) { + print $langs->trans("Comment").' : '; + print 'trans("DispatchSupplierOrder", $object->ref); + // print ' / '.$object->ref_supplier; // Not yet available + print '" class="flat">
'; - print ' '.$checkboxlabel; - } + print ' '.$checkboxlabel; + } - $dispatchBt = empty($conf->reception->enabled) ? $langs->trans("Receive") : $langs->trans("CreateReception"); + $dispatchBt = empty($conf->reception->enabled) ? $langs->trans("Receive") : $langs->trans("CreateReception"); - print '
'; } @@ -905,11 +1071,10 @@ if ($id > 0 || !empty($ref)) { // Message if nothing to dispatch if (!$nbproduct) { - print "
\n"; - if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) + print "
\n"; + if (empty($conf->global->SUPPLIER_ORDER_DISABLE_STOCK_DISPATCH_WHEN_TOTAL_REACHED)) print '
'.$langs->trans("NoPredefinedProductToDispatch").'
'; // No predefined line at all - else - print '
'.$langs->trans("NoMorePredefinedProductToDispatch").'
'; // No predefined line that remain to be dispatched. + else print '
'.$langs->trans("NoMorePredefinedProductToDispatch").'
'; // No predefined line that remain to be dispatched. } print '
'; @@ -923,7 +1088,16 @@ if ($id > 0 || !empty($ref)) { $("select[name=fk_default_warehouse]").change(function() { var fk_default_warehouse = $("option:selected", this).val(); $("select[name^=entrepot_]").val(fk_default_warehouse).change(); - }); + }); + + jQuery("#autoreset").click(function() {'; + $i = 0; + while ($i < $nbproduct) { + print ' jQuery("#qty_0_'.$i.'").val("");'; + $i++; + } + print ' + }); }); '; @@ -931,9 +1105,11 @@ if ($id > 0 || !empty($ref)) { $sql = "SELECT p.rowid as pid, p.ref, p.label,"; $sql .= " e.rowid as warehouse_id, e.ref as entrepot,"; $sql .= " cfd.rowid as dispatchlineid, cfd.fk_product, cfd.qty, cfd.eatby, cfd.sellby, cfd.batch, cfd.comment, cfd.status, cfd.datec"; + $sql.=" ,cd.rowid, cd.subprice"; if ($conf->reception->enabled)$sql .= " ,cfd.fk_reception, r.date_delivery"; $sql .= " FROM ".MAIN_DB_PREFIX."product as p,"; $sql .= " ".MAIN_DB_PREFIX."commande_fournisseur_dispatch as cfd"; + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "commande_fournisseurdet as cd ON cd.rowid = cfd.fk_commandefourndet"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."entrepot as e ON cfd.fk_entrepot = e.rowid"; if ($conf->reception->enabled)$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."reception as r ON cfd.fk_reception = r.rowid"; $sql .= " WHERE cfd.fk_commande = ".$object->id; @@ -961,30 +1137,41 @@ if ($id > 0 || !empty($ref)) { print ''.$langs->trans("DateDeliveryPlanned").''; if (!empty($conf->productbatch->enabled)) { print ''.$langs->trans("batch_number").''; - print ''.$langs->trans("EatByDate").''; - print ''.$langs->trans("SellByDate").''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print '' . $langs->trans("EatByDate") . ''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print '' . $langs->trans("SellByDate") . ''; + } } print ''.$langs->trans("QtyDispatched").''; - print ''; print ''.$langs->trans("Warehouse").''; print ''.$langs->trans("Comment").''; // Status if (!empty($conf->global->SUPPLIER_ORDER_USE_DISPATCH_STATUS) && empty($reception->rowid)) { print ''.$langs->trans("Status").''; - } - elseif (!empty($conf->reception->enabled)) { + } elseif (!empty($conf->reception->enabled)) { print ''; } - print ''; + print ''; print "\n"; while ($i < $num) { $objp = $db->fetch_object($resql); - print ""; + if ($action == 'editline' && $lineid == $objp->dispatchlineid) + { + print '
+ + + + '; + } + + print ''; if (!empty($conf->reception->enabled)) { print ''; @@ -1010,8 +1197,12 @@ if ($id > 0 || !empty($ref)) { $lot=new Productlot($db); $lot->fetch(0, $objp->pid, $objp->batch); print ''.$lot->getNomUrl(1).''; - print ''.dol_print_date($lot->eatby, 'day').''; - print ''.dol_print_date($lot->sellby, 'day').''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print '' . dol_print_date($lot->eatby, 'day') . ''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print '' . dol_print_date($lot->sellby, 'day') . ''; + } } else { print ''; print ''; @@ -1020,14 +1211,35 @@ if ($id > 0 || !empty($ref)) { } // Qty - print ''.$objp->qty.''; - print ' '; + print ''; + if ($action == 'editline' && $lineid == $objp->dispatchlineid) + { + print ''; + } + else { + print $objp->qty; + } + print ''; + print ''; // Warehouse print ''; - $warehouse_static->id = $objp->warehouse_id; - $warehouse_static->libelle = $objp->entrepot; - print $warehouse_static->getNomUrl(1); + if ($action == 'editline' && $lineid == $objp->dispatchlineid) + { + if (count($listwarehouses) > 1) { + print $formproduct->selectWarehouses(GETPOST("fk_entrepot")?GETPOST("fk_entrepot"):($objp->warehouse_id?$objp->warehouse_id:''), "fk_entrepot", '', 1, 0, $objp->fk_product, '', 1, 1, null, 'csswarehouse'); + } elseif (count($listwarehouses) == 1) { + print $formproduct->selectWarehouses(GETPOST("fk_entrepot")?GETPOST("fk_entrepot"):($objp->warehouse_id?$objp->warehouse_id:''), "fk_entrepot", '', 0, 0, $objp->fk_product, '', 1, 1, null, 'csswarehouse'); + } else { + $langs->load("errors"); + print $langs->trans("ErrorNoWarehouseDefined"); + } + } + else { + $warehouse_static->id = $objp->warehouse_id; + $warehouse_static->libelle = $objp->entrepot; + print $warehouse_static->getNomUrl(1); + } print ''; // Comment @@ -1078,9 +1290,32 @@ if ($id > 0 || !empty($ref)) { print ''; } - print ''; + if ($action != 'editline' || $lineid != $objp->dispatchlineid) + { + print ''; + print 'dispatchlineid .'#line_'. $objp->dispatchlineid . '">'; + print img_edit(); + print ''; + print ''; + + print ''; + print 'dispatchlineid . '#dispatch_received_products">'; + print img_delete(); + print ''; + print ''; + } + else { + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + } + print "\n"; + if ($action == 'editline' && $lineid == $objp->dispatchlineid) print '
'; $i++; } diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index 7db240abf94..e266a466e87 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -43,7 +43,7 @@ $langs->loadLangs(array("bills", "orders", "sendings", "companies", "deliveries" $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -177,9 +177,7 @@ if ($object->id > 0) $permtoedit = $user->rights->fournisseur->commande->creer; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { header('Location: index.php'); exit; } diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index c0272d58a03..6891e3bdf92 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -160,9 +160,7 @@ if ($resql) print ''.$langs->trans("Total").''.$total.''; print "

"; -} -else -{ +} else { dol_print_error($db); } @@ -226,9 +224,7 @@ if (!empty($conf->multicompany->enabled) && !empty($conf->global->MULTICOMPANY_T $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; $sql .= " OR u.entity = 0)"; // Show always superadmin -} -else -{ +} else { $sql .= " WHERE (u.entity IN (".getEntity('user')."))"; } $sql .= " AND u.fk_soc IS NULL"; // An external user can not approved @@ -269,9 +265,7 @@ if ($resql) } print "
"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -344,8 +338,7 @@ if ($resql) } } print "
"; -} -else dol_print_error($db); +} else dol_print_error($db); /* diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index f41e9e3fece..07c84a8fa12 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -38,7 +38,7 @@ $langs->loadLangs(array("suppliers", "orders", "companies", "stocks")); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); @@ -55,9 +55,7 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECTS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECTS)); } $search_agenda_label = GETPOST('search_agenda_label'); @@ -196,9 +194,7 @@ if (!empty($conf->agenda->enabled)) if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print ''.$langs->trans("AddAction").''; - } - else - { + } else { print ''.$langs->trans("AddAction").''; } } diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 417e78023a8..fb2e18a0de2 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -7,7 +7,7 @@ * Copyright (C) 2014 Juanjo Menent * Copyright (C) 2016 Ferran Marcet * Copyright (C) 2018 Frédéric France - * Copyright (C) 2018 Charlene Benke + * Copyright (C) 2018-2020 Charlene Benke * Copyright (C) 2019 Nicolas ZABOURI * * This program is free software; you can redistribute it and/or modify @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formorder.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; @@ -66,7 +67,7 @@ $search_refsupp = GETPOST('search_refsupp', 'alpha'); $search_company = GETPOST('search_company', 'alpha'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state", 'alpha')); +$search_state = GETPOST("search_state", 'alpha'); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); $search_user = GETPOST('search_user', 'int'); @@ -130,6 +131,9 @@ $fieldstosearchall = array( 'cf.ref_supplier'=>'RefSupplierOrder', 'pd.description'=>'Description', 's.nom'=>"ThirdParty", + 's.name_alias'=>"AliasNameShort", + 's.zip'=>"Zip", + 's.town'=>"Town", 'cf.note_public'=>'NotePublic', ); if (empty($user->socid)) $fieldstosearchall["cf.note_private"] = "NotePrivate"; @@ -180,7 +184,7 @@ $arrayfields = dol_sort_array($arrayfields, 'position'); */ if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } -if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend' && $massaction != 'confirm_createsupplierbills') { $massaction = ''; } $parameters = array('socid'=>$socid); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks @@ -244,7 +248,7 @@ if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; // TODO Move this into mass action include - if ($massaction == 'confirm_createbills') + if ($massaction == 'confirm_createsupplierbills') { $orders = GETPOST('toselect', 'array'); $createbills_onebythird = GETPOST('createbills_onebythird', 'int'); @@ -258,34 +262,36 @@ if (empty($reshook)) $db->begin(); foreach ($orders as $id_order) { - $cmd = new Commande($db); + $cmd = new CommandeFournisseur($db); if ($cmd->fetch($id_order) <= 0) continue; - $object = new Facture($db); - if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $object = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. + $objecttmp = new FactureFournisseur($db); + if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order. else { - $object->socid = $cmd->socid; - $object->type = Facture::TYPE_STANDARD; - $object->cond_reglement_id = $cmd->cond_reglement_id; - $object->mode_reglement_id = $cmd->mode_reglement_id; - $object->fk_project = $cmd->fk_project; + $objecttmp->socid = $cmd->socid; + $objecttmp->type = $objecttmp::TYPE_STANDARD; + $objecttmp->cond_reglement_id = $cmd->cond_reglement_id; + $objecttmp->mode_reglement_id = $cmd->mode_reglement_id; + $objecttmp->fk_project = $cmd->fk_project; + $objecttmp->multicurrency_code = $cmd->multicurrency_code; + if (empty($createbills_onebythird)) $objecttmp->ref_client = $cmd->ref_client; - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); + $datefacture = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); if (empty($datefacture)) { - $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); + $datefacture = dol_now(); } - $object->date = $datefacture; - $object->origin = 'commande'; - $object->origin_id = $id_order; + $objecttmp->date = $datefacture; + $objecttmp->origin = 'order_supplier'; + $objecttmp->origin_id = $id_order; - $res = $object->create($user); + $res = $objecttmp->create($user); if ($res > 0) $nb_bills_created++; } - if ($object->id > 0) + if ($objecttmp->id > 0) { $sql = "INSERT INTO ".MAIN_DB_PREFIX."element_element ("; $sql .= "fk_source"; @@ -294,9 +300,9 @@ if (empty($reshook)) $sql .= ", targettype"; $sql .= ") VALUES ("; $sql .= $id_order; - $sql .= ", '".$object->origin."'"; - $sql .= ", ".$object->id; - $sql .= ", '".$object->element."'"; + $sql .= ", '".$db->escape($objecttmp->origin)."'"; + $sql .= ", ".$objecttmp->id; + $sql .= ", '".$db->escape($objecttmp->element)."'"; $sql .= ")"; if (!$db->query($sql)) @@ -323,7 +329,7 @@ if (empty($reshook)) { // Negative line, we create a discount line $discount = new DiscountAbsolute($db); - $discount->fk_soc = $object->socid; + $discount->fk_soc = $objecttmp->socid; $discount->amount_ht = abs($lines[$i]->total_ht); $discount->amount_tva = abs($lines[$i]->total_tva); $discount->amount_ttc = abs($lines[$i]->total_ttc); @@ -333,18 +339,14 @@ if (empty($reshook)) $discountid = $discount->create($user); if ($discountid > 0) { - $result = $object->insert_discount($discountid); + $result = $objecttmp->insert_discount($discountid); //$result=$discount->link_to_invoice($lineid,$id); - } - else - { + } else { setEventMessages($discount->error, $discount->errors, 'errors'); $error++; break; } - } - else - { + } else { // Positive line $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); // Date start @@ -362,38 +364,35 @@ if (empty($reshook)) { $fk_parent_line = 0; } - $result = $object->addline( + $result = $objecttmp->addline( $desc, $lines[$i]->subprice, - $lines[$i]->qty, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, + $lines[$i]->qty, $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, - $ii, - $lines[$i]->special_code, - $object->origin, - $lines[$i]->rowid, - $fk_parent_line, - $lines[$i]->fk_fournprice, + $lines[$i]->rang, + false, + $lines[$i]->array_options, + $lines[$i]->fk_unit, + $objecttmp->origin_id, $lines[$i]->pa_ht, - $lines[$i]->label - ); + $lines[$i]->ref_supplier, + $lines[$i]->special_code, + $fk_parent_line + ); if ($result > 0) { $lineid = $result; - } - else - { + } else { $lineid = 0; $error++; break; @@ -410,8 +409,8 @@ if (empty($reshook)) $cmd->classifyBilled($user); // TODO Move this in workflow like done for customer orders - if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $object; - else $TFact[$object->id] = $object; + if (!empty($createbills_onebythird) && empty($TFactThird[$cmd->socid])) $TFactThird[$cmd->socid] = $objecttmp; + else $TFact[$objecttmp->id] = $objecttmp; } // Build doc with all invoices @@ -421,40 +420,67 @@ if (empty($reshook)) if (!$error && $validate_invoices) { $massaction = $action = 'builddoc'; - foreach ($TAllFact as &$object) + foreach ($TAllFact as &$objecttmp) { - $object->validate($user); + $objecttmp->validate($user); if ($result <= 0) { $error++; - setEventMessages($object->error, $object->errors, 'errors'); + setEventMessages($objecttmp->error, $objecttmp->errors, 'errors'); break; } - $id = $object->id; // For builddoc action + $id = $objecttmp->id; // For builddoc action // Fac builddoc $donotredirect = 1; - $upload_dir = $conf->facture->dir_output; - $permissiontoadd = $user->rights->facture->creer; - include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + $upload_dir = $conf->fournisseur->facture->dir_output; + $permissiontoadd = $user->rights->fournisseur->facture->creer; + //include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; } - $massaction = $action = 'confirm_createbills'; + $massaction = $action = 'confirm_createsupplierbills'; } if (!$error) { $db->commit(); setEventMessages($langs->trans('BillCreated', $nb_bills_created), null, 'mesgs'); - } - else - { + + // Make a redirect to avoid to bill twice if we make a refresh or back + $param = ''; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($sall) $param .= '&sall='.urlencode($sall); + if ($socid > 0) $param .= '&socid='.urlencode($socid); + if ($search_status != '') $param .= '&search_status='.urlencode($search_status); + if ($search_orderday) $param .= '&search_orderday='.urlencode($search_orderday); + if ($search_ordermonth) $param .= '&search_ordermonth='.urlencode($search_ordermonth); + if ($search_orderyear) $param .= '&search_orderyear='.urlencode($search_orderyear); + if ($search_deliveryday) $param .= '&search_deliveryday='.urlencode($search_deliveryday); + if ($search_deliverymonth) $param .= '&search_deliverymonth='.urlencode($search_deliverymonth); + if ($search_deliveryyear) $param .= '&search_deliveryyear='.urlencode($search_deliveryyear); + if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); + if ($search_company) $param .= '&search_company='.urlencode($search_company); + if ($search_ref_customer) $param .= '&search_ref_customer='.urlencode($search_ref_customer); + if ($search_user > 0) $param .= '&search_user='.urlencode($search_user); + if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale); + if ($search_total_ht != '') $param .= '&search_total_ht='.urlencode($search_total_ht); + if ($search_total_vat != '') $param .= '&search_total_vat='.urlencode($search_total_vat); + if ($search_total_ttc != '') $param .= '&search_total_ttc='.urlencode($search_total_ttc); + if ($search_project_ref >= 0) $param .= "&search_project_ref=".urlencode($search_project_ref); + if ($show_files) $param .= '&show_files='.urlencode($show_files); + if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + if ($billed != '') $param .= '&billed='.urlencode($billed); + + header("Location: ".$_SERVER['PHP_SELF'].'?'.$param); + exit; + } else { $db->rollback(); $action = 'create'; $_GET["origin"] = $_POST["origin"]; $_GET["originid"] = $_POST["originid"]; - setEventMessages($object->error, $object->errors, 'errors'); + setEventMessages("Error", null, 'errors'); $error++; } } @@ -511,7 +537,7 @@ if (!empty($extrafields->attributes[$object->table_element]['label'])) { } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; @@ -530,6 +556,9 @@ if ($search_user > 0) $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; $sql .= ' WHERE cf.fk_soc = s.rowid'; $sql .= ' AND cf.entity IN ('.getEntity('supplier_order').')'; if ($socid > 0) $sql .= " AND s.rowid = ".$socid; @@ -543,16 +572,16 @@ if ($search_billed != '' && $search_billed >= 0) $sql .= " AND cf.billed = ".$db if ($search_product_category > 0) $sql .= " AND cp.fk_categorie = ".$search_product_category; //Required triple check because statut=0 means draft filter if (GETPOST('statut', 'intcomma') !== '') - $sql .= " AND cf.fk_statut IN (".$db->escape($db->escape(GETPOST('statut', 'intcomma'))).")"; + $sql .= " AND cf.fk_statut IN (".$db->sanitize($db->escape(GETPOST('statut', 'intcomma'))).")"; if ($search_status != '' && $search_status >= 0) - $sql .= " AND cf.fk_statut IN (".$db->escape($search_status).")"; + $sql .= " AND cf.fk_statut IN (".$db->sanitize($db->escape($search_status)).")"; $sql .= dolSqlDateFilter("cf.date_commande", $search_orderday, $search_ordermonth, $search_orderyear); $sql .= dolSqlDateFilter("cf.date_livraison", $search_deliveryday, $search_deliverymonth, $search_deliveryyear); if ($search_town) $sql .= natural_search('s.town', $search_town); if ($search_zip) $sql .= natural_search("s.zip", $search_zip); if ($search_state) $sql .= natural_search("state.nom", $search_state); -if ($search_country) $sql .= " AND s.fk_pays IN (".$db->escape($search_country).')'; -if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search_type_thirdparty).')'; +if ($search_country) $sql .= " AND s.fk_pays IN (".$db->sanitize($db->escape($search_country)).')'; +if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->sanitize($db->escape($search_type_thirdparty)).')'; if ($search_company) $sql .= natural_search('s.nom', $search_company); if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale); if ($search_user > 0) $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='supplier_order' AND tc.source='internal' AND ec.element_id = cf.rowid AND ec.fk_socpeople = ".$db->escape($search_user); @@ -569,11 +598,12 @@ if ($search_project_ref != '') $sql .= natural_search("p.ref", $search_project_r include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= $db->order($sortfield, $sortorder); +// Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { @@ -587,6 +617,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) } $sql .= $db->plimit($limit + 1, $offset); +//print $sql; $resql = $db->query($sql); if ($resql) @@ -596,9 +627,7 @@ if ($resql) $soc = new Societe($db); $soc->fetch($socid); $title = $langs->trans('ListOfSupplierOrders').' - '.$soc->name; - } - else - { + } else { $title = $langs->trans('ListOfSupplierOrders'); } @@ -617,23 +646,24 @@ if ($resql) llxHeader('', $title, $help_url); $param = ''; - if ($socid > 0) $param .= '&socid='.$socid; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; - if ($sall) $param .= "&search_all=".$sall; - if ($search_orderday) $param .= '&search_orderday='.$search_orderday; - if ($search_ordermonth) $param .= '&search_ordermonth='.$search_ordermonth; - if ($search_orderyear) $param .= '&search_orderyear='.$search_orderyear; - if ($search_deliveryday) $param .= '&search_deliveryday='.$search_deliveryday; - if ($search_deliverymonth) $param .= '&search_deliverymonth='.$search_deliverymonth; - if ($search_deliveryyear) $param .= '&search_deliveryyear='.$search_deliveryyear; - if ($search_ref) $param .= '&search_ref='.$search_ref; - if ($search_company) $param .= '&search_company='.$search_company; - if ($search_user > 0) $param .= '&search_user='.$search_user; - if ($search_request_author) $param .= '&search_request_author='.$search_request_author; - if ($search_sale > 0) $param .= '&search_sale='.$search_sale; - if ($search_total_ht != '') $param .= '&search_total_ht='.$search_total_ht; - if ($search_total_ttc != '') $param .= "&search_total_ttc=".$search_total_ttc; + if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); + if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); + if ($sall) $param .= '&sall='.urlencode($sall); + if ($socid > 0) $param .= '&socid='.urlencode($socid); + if ($sall) $param .= "&search_all=".urlencode($sall); + if ($search_orderday) $param .= '&search_orderday='.urlencode($search_orderday); + if ($search_ordermonth) $param .= '&search_ordermonth='.urlencode($search_ordermonth); + if ($search_orderyear) $param .= '&search_orderyear='.urlencode($search_orderyear); + if ($search_deliveryday) $param .= '&search_deliveryday='.urlencode($search_deliveryday); + if ($search_deliverymonth) $param .= '&search_deliverymonth='.urlencode($search_deliverymonth); + if ($search_deliveryyear) $param .= '&search_deliveryyear='.urlencode($search_deliveryyear); + if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); + if ($search_company) $param .= '&search_company='.urlencode($search_company); + if ($search_user > 0) $param .= '&search_user='.urlencode($search_user); + if ($search_request_author) $param .= '&search_request_author='.urlencode($search_request_author); + if ($search_sale > 0) $param .= '&search_sale='.urlencode($search_sale); + if ($search_total_ht != '') $param .= '&search_total_ht='.urlencode($search_total_ht); + if ($search_total_ttc != '') $param .= "&search_total_ttc=".urlencode($search_total_ttc); if ($search_multicurrency_code != '') $param .= '&search_multicurrency_code='.urlencode($search_multicurrency_code); if ($search_multicurrency_tx != '') $param .= '&search_multicurrency_tx='.urlencode($search_multicurrency_tx); if ($search_multicurrency_montant_ht != '') $param .= '&search_multicurrency_montant_ht='.urlencode($search_multicurrency_montant_ht); @@ -648,32 +678,35 @@ if ($resql) // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + $parameters = array(); + $reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook + $param .= $hookmanager->resPrint; + // List of mass actions available $arrayofmassactions = array( 'generate_doc'=>$langs->trans("ReGeneratePDF"), 'builddoc'=>$langs->trans("PDFMerge"), - 'presend'=>$langs->trans("SendByMail"), + 'presend'=>$langs->trans("SendByMail"), ); - //if($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills']=$langs->trans("CreateInvoiceForThisCustomer"); + if ($user->rights->fournisseur->facture->creer) $arrayofmassactions['createbills'] = $langs->trans("CreateInvoiceForThisSupplier"); if ($user->rights->fournisseur->commande->supprimer) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - if ($user->rights->fournisseur->commande->creer) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/commande/card.php?action=create'); - } + $url = DOL_URL_ROOT.'/fourn/commande/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewOrder'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->commande->creer); - // Fields title search - print '
'; + // Lines of title fields + print ''; if ($optioncss != '') print ''; print ''; print ''; print ''; - print ''; print ''; print ''; + print ''; + print ''; print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'supplier_order', 0, $newcardbutton, '', $limit, 0, 0, 1); @@ -686,11 +719,11 @@ if ($resql) if ($massaction == 'createbills') { //var_dump($_REQUEST); - print ''; + print ''; - print ''; + print '
'; print ''; - print ''; print '
'; + print ''; print $langs->trans('DateInvoice'); print ''; @@ -749,7 +782,7 @@ if ($resql) $moreforfilter .= ''; } // If the user can view prospects other than his' - if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
'; @@ -772,7 +805,17 @@ if ($resql) $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + + if (GETPOST('autoselectall', 'int')) { + $selectedfields .= ''; + } print '
'; print ''."\n"; @@ -781,17 +824,17 @@ if ($resql) // Ref if (!empty($arrayfields['cf.ref']['checked'])) { - print ''; + print ''; } // Ref customer if (!empty($arrayfields['cf.ref_supplier']['checked'])) { - print ''; + print ''; } // Project ref if (!empty($arrayfields['p.project_ref']['checked'])) { - print ''; + print ''; } // Request author if (!empty($arrayfields['u.login']['checked'])) @@ -945,9 +988,10 @@ if ($resql) print "\n"; + // Fields title print ''; if (!empty($arrayfields['cf.ref']['checked'])) print_liste_field_titre($arrayfields['cf.ref']['label'], $_SERVER["PHP_SELF"], "cf.ref", "", $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['cf.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['cf.ref_supplier']['label'], $_SERVER["PHP_SELF"], "cf.ref_supplier", "", $param, '', $sortfield, $sortorder); + if (!empty($arrayfields['cf.ref_supplier']['checked'])) print_liste_field_titre($arrayfields['cf.ref_supplier']['label'], $_SERVER["PHP_SELF"], "cf.ref_supplier", "", $param, '', $sortfield, $sortorder, 'tdoverflowmax100imp '); if (!empty($arrayfields['p.project_ref']['checked'])) print_liste_field_titre($arrayfields['p.project_ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); if (!empty($arrayfields['u.login']['checked'])) print_liste_field_titre($arrayfields['u.login']['label'], $_SERVER["PHP_SELF"], "u.login", "", $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); @@ -995,6 +1039,12 @@ if ($resql) { $obj = $db->fetch_object($resql); + $notshippable = 0; + $warning = 0; + $text_info = ''; + $text_warning = ''; + $nbprod = 0; + $objectstatic->id = $obj->rowid; $objectstatic->ref = $obj->ref; $objectstatic->ref_supplier = $obj->ref_supplier; @@ -1232,23 +1282,26 @@ if ($resql) if (!$i) $totalarray['nbfield']++; print "\n"; + + $total += $obj->total_ht; + $subtotal += $obj->total_ht; $i++; } // Show total line include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; - - $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - print "
\n"; - print '
'; - print "\n"; - $db->free($resql); + $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); + $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + print '
'."\n"; + print ''; + + print ''."\n"; + $hidegeneratedfilelistifempty = 1; if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; @@ -1261,9 +1314,7 @@ if ($resql) $delallowed = $user->rights->fournisseur->commande->creer; print $formfile->showdocuments('massfilesarea_supplier_order', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 87effcd5863..53efd68faa6 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -145,9 +145,7 @@ if ($id > 0 || !empty($ref)) print ''; dol_fiche_end(); - } - else - { + } else { /* Order not found */ $langs->load("errors"); print $langs->trans("ErrorRecordNotFound"); diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php deleted file mode 100644 index 909dec03796..00000000000 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ /dev/null @@ -1,639 +0,0 @@ - - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005 Marc Barilley / Ocebo - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Andreu Bisquerra Gaya - * Copyright (C) 2012 David Rodriguez Martinez - * Copyright (C) 2012-2017 Juanjo Menent - * Copyright (C) 2014 Florian Henry - * Copyright (C) 2015 Marcos García - * Copyright (C) 2018 Frédéric France - * - * 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 . - */ - -/** - * \file htdocs/fourn/commande/orderstoinvoice.php - * \ingroup commande - * \brief Page to invoice multiple supplier orders - */ -require '../../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; -require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php'; -require_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_invoice/modules_facturefournisseur.php'; -if (!empty($conf->projet->enabled)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; -} - -// Load translation files required by the page -$langs->loadLangs(array("orders", "companies", "deliveries")); - -if (!$user->rights->fournisseur->facture->creer) - accessforbidden(); - -$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST("facid")); // For backward compatibility -$ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); -$sref = GETPOST('sref'); -$sref_client = GETPOST('sref_client'); -$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); -$socid = GETPOST('socid', 'int'); -$selected = GETPOST('orders_to_invoice'); -$sortfield = GETPOST("sortfield", 'alpha'); -$sortorder = GETPOST("sortorder", 'alpha'); -$search_status = GETPOST('search_status'); - -if (!$sortfield) - $sortfield = 'c.rowid'; -if (!$sortorder) - $sortorder = 'DESC'; - -$now = dol_now(); -$date_start = dol_mktime(0, 0, 0, $_REQUEST["date_startmonth"], $_REQUEST["date_startday"], $_REQUEST["date_startyear"]); // Date for local PHP server -$date_end = dol_mktime(23, 59, 59, $_REQUEST["date_endmonth"], $_REQUEST["date_endday"], $_REQUEST["date_endyear"]); -$date_starty = dol_mktime(0, 0, 0, $_REQUEST["date_start_delymonth"], $_REQUEST["date_start_delyday"], $_REQUEST["date_start_delyyear"]); // Date for local PHP server -$date_endy = dol_mktime(23, 59, 59, $_REQUEST["date_end_delymonth"], $_REQUEST["date_end_delyday"], $_REQUEST["date_end_delyyear"]); - -$extrafields = new ExtraFields($db); - -$object = new FactureFournisseur($db); - -// fetch optionals attributes and labels -$extrafields->fetch_name_optionals_label($object->table_element); - -if ($action == 'create') -{ - if (!GETPOST('createbill')) - { - $action = ''; - } - else - { - if (!is_array($selected)) - { - //$error++; - setEventMessages($langs->trans('Error_OrderNotChecked'), null, 'errors'); - $action = ''; - } else { - $origin = GETPOST('origin', 'alpha'); - $originid = GETPOST('originid', 'int'); - } - } -} - -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; -$hookmanager = new HookManager($db); -$hookmanager->initHooks(array('orderstoinvoicesupplier')); - - -/* - * Actions - */ - -if (($action == 'create' || $action == 'add') && !$error) { - require_once DOL_DOCUMENT_ROOT.'/core/lib/fourn.lib.php'; - if (!empty($conf->projet->enabled)) - require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - - // Load translation files required by the page - $langs->loadLangs(array("bills", "main", "products")); - - if (isset($_GET['orders_to_invoice'])) { - $orders_id = GETPOST('orders_to_invoice', '', 1); - $n = count($orders_id); - $i = 0; - - $originid = $orders_id[0]; - $_GET['originid'] = $orders_id[0]; - } - if (isset($_POST['orders_to_invoice'])) { - $orders_id = GETPOST('orders_to_invoice', '', 2); - $nn = count($orders_id); - $ii = 0; - - $originid = $orders_id[0]; - $_POST['originid'] = $orders_id[0]; - } - - $projectid = GETPOST('projectid', 'int') ? GETPOST('projectid', 'int') : 0; - $lineid = GETPOST('lineid', 'int'); - $userid = GETPOST('userid', 'int'); - $search_ref = GETPOST('sf_ref') ? GETPOST('sf_ref') : GETPOST('search_ref'); - - // Security check - if ($user->socid) - $socid = $user->socid; - $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); - - $usehm = $conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE; - $object = new FactureFournisseur($db); - - // Insert new invoice in database - if ($action == 'add' && $user->rights->fournisseur->facture->creer) { - $object->socid = GETPOST('socid'); - $db->begin(); - $error = 0; - - // Standard or deposit or proforma invoice - $datefacture = dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); - if (empty($datefacture)) { - $datefacture = dol_mktime(date("h"), date("M"), 0, date("m"), date("d"), date("Y")); - } - if (!$error) { - $object->ref = GETPOST('ref', 'nohtml'); - $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); - $object->socid = GETPOST('socid', 'int'); - $object->libelle = (GETPOSTISSET('libelle') ? GETPOST('libelle', 'nohtml') : GETPOST('label', 'nohtml')); - $object->label = (GETPOSTISSET('libelle') ? GETPOST('libelle', 'nohtml') : GETPOST('label', 'nohtml')); - $object->date = $datefacture; - $object->date_echeance = $datedue; - $object->note_public = GETPOST('note_public', 'none'); - $object->note_private = GETPOST('note_private', 'none'); - $object->cond_reglement_id = GETPOST('cond_reglement_id'); - $object->mode_reglement_id = GETPOST('mode_reglement_id'); - $projectid = GETPOST('projectid', 'int'); - if ($projectid > 0) - $object->fk_project = $projectid; - - // Auto calculation of date due if not filled by user - if (empty($object->date_echeance)) - $object->date_echeance = $object->calculate_date_lim_reglement(); - - $ret = $extrafields->setOptionalsFromPost(null, $object); - if ($ret < 0) $error++; - - if ($_POST['origin'] && $_POST['originid']) { - $linked_orders_ids = array(); - foreach ($orders_id as $origin => $origin_id) { - $origin_id = (!empty($origin_id) ? $origin_id : $orders_id[$ii]); - $linked_orders_ids[] = $origin_id; - } - $object->linked_objects = array(GETPOST('origin')=>$linked_orders_ids); - $id = $object->create($user); - - if ($id > 0) { - while ($ii < $nn) { - $objectsrc = new CommandeFournisseur($db); - dol_syslog("Try to find source object origin=".$object->origin." originid=".$object->origin_id." to add lines"); - $result = $objectsrc->fetch($orders_id[$ii]); - if ($result > 0) { - $lines = $objectsrc->lines; - if (empty($lines) && method_exists($objectsrc, 'fetch_lines')) { - $objectsrc->fetch_lines(); - $lines = $objectsrc->lines; - } - $fk_parent_line = 0; - $num = count($lines); - for ($i = 0; $i < $num; $i++) { - $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); - - $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); - $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); - - // Dates - // TODO mutualiser - $date_start = $lines[$i]->date_debut_prevue; - if ($lines[$i]->date_debut_reel) - $date_start = $lines[$i]->date_debut_reel; - if ($lines[$i]->date_start) - $date_start = $lines[$i]->date_start; - $date_end = $lines[$i]->date_fin_prevue; - if ($lines[$i]->date_fin_reel) - $date_end = $lines[$i]->date_fin_reel; - if ($lines[$i]->date_end) - $date_end = $lines[$i]->date_end; - - // Reset fk_parent_line for no child products and special product - if (($lines[$i]->product_type != 9 && empty($lines[$i]->fk_parent_line)) || $lines[$i]->product_type == 9) { - $fk_parent_line = 0; - } - // FIXME Missing $lines[$i]->ref_supplier and $lines[$i]->label into addline and updateline methods. They are filled when coming from order for example. - $result = $object->addline($desc, $lines[$i]->subprice, $lines[$i]->tva_tx, $lines[$i]->localtax1_tx, $lines[$i]->localtax2_tx, $lines[$i]->qty, $lines[$i]->fk_product, $lines[$i]->remise_percent, $date_start, $date_end, 0, $lines[$i]->info_bits, 'HT', $product_type, -1, false, 0, $lines[$i]->fk_unit, $line[$i]->id); - - if ($result > 0) { - $lineid = $result; - } else { - $lineid = 0; - $error++; - break; - } - // Defined the new fk_parent_line - if ($result > 0 && $lines[$i]->product_type == 9) { - $fk_parent_line = $result; - } - } - } else { - $mesgs[] = $objectsrc->error; - $error++; - } - $ii++; - } - } else { - $mesgs[] = $object->error; - $error++; - } - } - } - - // End of object creation, we show it - if ($id > 0 && !$error) { - foreach ($orders_id as $fk_supplier_order) { - $supplier_order = new CommandeFournisseur($db); - if ($supplier_order->fetch($fk_supplier_order) > 0 && $supplier_order->statut == 5) - { - if ($supplier_order->classifyBilled($user) < 0) - { - $db->rollback(); - $action = 'create'; - $_GET["origin"] = $_POST["origin"]; - $_GET["originid"] = $_POST["originid"]; - $mesgs[] = '
'.$object->error.'
'; - - $error++; - break; - } - } - } - - if (!$error) { - $db->commit(); - header('Location: '.DOL_URL_ROOT.'/fourn/facture/card.php?facid='.$id); - exit(); - } - } else { - $db->rollback(); - $action = 'create'; - $_GET["origin"] = $_POST["origin"]; - $_GET["originid"] = $_POST["originid"]; - $mesgs[] = '
'.$object->error.'
'; - } - } -} - -/* - * View - */ - -$html = new Form($db); -$htmlother = new FormOther($db); -$formfile = new FormFile($db); - -// Mode creation -if ($action == 'create' && !$error) { - llxHeader(); - print load_fiche_titre($langs->trans('NewBill')); - - $soc = new Societe($db); - if ($socid) - $res = $soc->fetch($socid); - if ($res) { - $cond_reglement_id = $soc->cond_reglement_supplier_id; - $mode_reglement_id = $soc->mode_reglement_supplier_id; - } - $dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE) ? -1 : ''; - - $objectsrc = new CommandeFournisseur($db); - $listoforders = array(); - foreach ($selected as $sel) { - $result = $objectsrc->fetch($sel); - if ($result > 0) { - $listoforders[] = $objectsrc->ref; - } - - if (empty($cond_reglement_id)) $cond_reglement_id = $objectsrc->cond_reglement_id; - if (empty($mode_reglement_id)) $mode_reglement_id = $objectsrc->mode_reglement_id; - } - - print '
'; - print ''; - print ''; - print ''."\n"; - print ''; - print ''; - print ''; - print ''; - - print ''; - - // Ref - print ''; - - // Ref supplier - print ''; - print ''; - - // Date invoice - print ''; - // Payment term - print ''; - // Payment mode - print ''; - // Project - if (!empty($conf->projet->enabled)) { - $formproject = new FormProjets($db); - - $langs->load('projects'); - print ''; - } - - // Other attributes - $parameters = array( - 'objectsrc' => $objectsrc, - 'idsrc' => $listoforders - ); - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - - if (empty($reshook)) - { - $object = new FactureFournisseur($db); - print $object->showOptionals($extrafields, 'edit'); - } - - // Modele PDF - print ''; - print '"; - - // Public note - print ''; - print ''; - print ''; - - // Private note - if (empty($user->socid)) { - print ''; - print ''; - print ''; - } - - print '
'.$langs->trans('Ref').''.$langs->trans('Draft').'
'.$langs->trans('RefSupplier').'
'.$langs->trans('Date').''; - print $html->selectDate('', '', '', '', '', "add", 1, 1); - print '
'.$langs->trans('PaymentConditionsShort').''; - $html->select_conditions_paiements(isset($_POST['cond_reglement_id']) ? $_POST['cond_reglement_id'] : $cond_reglement_id, 'cond_reglement_id'); - print '
'.$langs->trans('PaymentMode').''; - $html->select_types_paiements(isset($_POST['mode_reglement_id']) ? $_POST['mode_reglement_id'] : $mode_reglement_id, 'mode_reglement_id'); - print '
'.$langs->trans('Project').''; - $formproject->select_projects($soc->id, $projectid, 'projectid'); - print '
'.$langs->trans('Model').''; - $liste = ModelePDFSuppliersInvoices::liste_modeles($db); - print $html->selectarray('model', $liste, $conf->global->INVOICE_SUPPLIER_ADDON_PDF); - print "
'.$langs->trans('NotePublic').''; - print '
'.$langs->trans('NotePrivate').''; - print '
'; - - while ($i < $n) { - print ''; - - $i++; - } - - // Button "Create Draft" - print '
'; - print "
\n"; - - print ''; - print "\n"; -} - -// Mode liste -if (($action != 'create' && $action != 'add') && !$error) { - llxHeader(); - ?> - - rights->societe->client->voir && !$socid) - $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= ' WHERE c.entity = '.$conf->entity; - $sql .= ' AND c.fk_soc = s.rowid'; - - // Show orders we can bill - if (empty($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)) - { - $sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY.")"; // Must match filter in htdocs/fourn/card.php - } - else - { - // CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.", ".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY - $sql .= " AND c.fk_statut IN (".$db->escape($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS).")"; - } - - $sql .= " AND c.billed = 0"; - - // Find order that are not already invoiced - //No need due to the billed status - //$sql .= " AND c.rowid NOT IN (SELECT fk_source FROM " . MAIN_DB_PREFIX . "element_element WHERE targettype='invoice_supplier')"; - - if ($socid) - $sql .= ' AND s.rowid = '.$socid; - if (!$user->rights->societe->client->voir && !$socid) - $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($sref) { - $sql .= natural_search("c.ref", $sref); - } - if ($sall) { - $sql .= natural_search(array("c.ref", "c.note"), $sall); - } - - // Date filter - //$sql.= dolSqlDateFilter("c.date_commande", GETPOST("date_startday", 'int'), GETPOST("date_startmonth", 'int'), GETPOST("date_startyear", 'int')); - //$sql.= dolSqlDateFilter("c.date_livraison", $search_deliveryday, $search_deliverymonth, $search_deliveryyear); - if ($date_start) - $sql .= " AND c.date_commande >= '".$db->idate($date_start)."'"; - if ($date_end) - $sql .= " AND c.date_commande <= '".$db->idate($date_end)."'"; - if ($date_starty) - $sql .= " AND c.date_livraison >= '".$db->idate($date_starty)."'"; - if ($date_endy) - $sql .= " AND c.date_livraison <= '".$db->idate($date_endy)."'"; - - if (!empty($sref_client)) { - $sql .= natural_search('c.ref_supplier', $sref_client); - } - $sql .= ' ORDER BY '.$sortfield.' '.$sortorder; - dol_syslog('fourn/commande/ordertoinvoice.php sql='.$sql); - $resql = $db->query($sql); - - if ($resql) { - if ($socid) { - $soc = new Societe($db); - $soc->fetch($socid); - } - $title = $langs->trans('ListOfSupplierOrders'); - $title .= ' - '.$langs->trans('StatusOrderReceivedAllShort'); - $title .= ' - '.$soc->getNomUrl(1, 'supplier'); - - $num = $db->num_rows($resql); - - print load_fiche_titre($title); - - $i = 0; - $period = $html->selectDate($date_start, 'date_start', 0, 0, 1, '', 1, 0).' - '.$html->selectDate($date_end, 'date_end', 0, 0, 1, '', 1, 0); - $periodely = $html->selectDate($date_starty, 'date_start_dely', 0, 0, 1, '', 1, 0).' - '.$html->selectDate($date_endy, 'date_end_dely', 0, 0, 1, '', 1, 0); - - print '
'; - print ''; - print ''; - - - print ''; - print ''; - print_liste_field_titre('Ref', 'orderstoinvoice.php', 'c.ref', '', '&socid='.$socid, '', $sortfield, $sortorder); - print_liste_field_titre('RefSupplier', 'orderstoinvoice.php', 'c.ref_supplier', '', '&socid='.$socid, '', $sortfield, $sortorder); - print_liste_field_titre('OrderDate', 'orderstoinvoice.php', 'c.date_commande', '', '&socid='.$socid, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre('DeliveryDate', 'orderstoinvoice.php', 'c.date_livraison', '', '&socid='.$socid, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre('Status', '', '', '', '', '', '', '', 'right '); - print_liste_field_titre('GenerateBill', '', '', '', '', '', '', '', 'center '); - print "\n"; - - // Fields title search - print ''; - - print ''; - - // print ''; - - // DATE ORDER - print ''; - - // DATE DELIVERY - print ''; - - // SEARCH BUTTON - print ''; - - // ALL/NONE - print ''; - - print ''; - - $generic_commande = new CommandeFournisseur($db); - - while ($i < $num) { - $objp = $db->fetch_object($resql); - - print ''; - print ''; - - print ''; - - // Order date - print ''; - - // Delivery date - print ''; - - // Statut - print ''; - - // Checkbox - print ''; - - print ''; - - $total = $total + $objp->price; - $subtotal = $subtotal + $objp->price; - $i++; - } - print '
'; - // REF - print ''; - print ''; - print ''; - print ''; - print ''; - print $period; - print ''; - print $periodely; - print ''; - print ''; - print ''; - if ($conf->use_javascript_ajax) - print ''.$langs->trans("All").' / '.$langs->trans("None").''; - print '
'; - - $generic_commande->id = $objp->rowid; - $generic_commande->ref = $objp->ref; - - print ''; - print ''; - - print '
'; - print $generic_commande->getNomUrl(1, $objp->fk_statut); - print ''; - $filename = dol_sanitizeFileName($objp->ref); - $filedir = $conf->fournisseur->commande->dir_output.'/'.dol_sanitizeFileName($objp->ref); - $urlsource = $_SERVER['PHP_SELF'].'?id='.$objp->rowid; - print $formfile->getDocumentsLink($generic_commande->element, $filename, $filedir); - print '
'; - print '
'.$objp->ref_supplier.''; - print dol_print_date($db->jdate($objp->date_commande), 'day'); - print ''; - print dol_print_date($db->jdate($objp->date_livraison), 'day'); - print ''.$generic_commande->LibStatut($objp->fk_statut, 5).''; - print ''; - print '
'; - - /* - * Boutons actions - */ - print '
'; - print '
'; - print ''; - print ''; - print '
'; - // print ''.$langs->trans("GoBack").''; - print ''; - print '
'; - print '
'; - - print '
'; - - $db->free($resql); - } else { - dol_print_error($db); - } -} - -dol_htmloutput_mesg($mesg, $mesgs); - -// End of page -llxFooter(); -$db->close(); diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index 40773f0eca6..edcccbc6a88 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -124,9 +124,7 @@ if ($result) } print ""; $db->free($result); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 6e502b88ac0..029abf36058 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -100,12 +100,20 @@ if (!empty($user->socid)) $socid = $user->socid; $isdraft = (($object->statut == FactureFournisseur::STATUS_DRAFT) ? 1 : 0); $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture', 'fk_soc', 'rowid', $isdraft); -$usercancreate = $user->rights->fournisseur->facture->creer; +// Common permissions +$usercanread = $user->rights->fournisseur->facture->lire; +$usercancreate = $user->rights->fournisseur->facture->creer; +$usercandelete = $user->rights->fournisseur->facture->supprimer; -$permissionnote = $user->rights->fournisseur->facture->creer; // Used by the include of actions_setnotes.inc.php -$permissiondellink = $user->rights->fournisseur->facture->creer; // Used by the include of actions_dellink.inc.php -$permissiontoedit = $user->rights->fournisseur->facture->creer; // Used by the include of actions_lineupdown.inc.php -$permissiontoadd = $user->rights->fournisseur->facture->creer; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php +// Advanced permissions +$usercanvalidate = ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($usercancreate)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate))); +$usercansend = (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->fournisseur->supplier_invoice_advance->send); + +// Permissions for includes +$permissionnote = $usercancreate; // Used by the include of actions_setnotes.inc.php +$permissiondellink = $usercancreate; // Used by the include of actions_dellink.inc.php +$permissiontoedit = $usercancreate; // Used by the include of actions_lineupdown.inc.php +$permissiontoadd = $usercancreate; // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php /* @@ -145,30 +153,22 @@ if (empty($reshook)) // Action clone object if ($action == 'confirm_clone' && $confirm == 'yes' && $permissiontoadd) { - $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone. We use native clone to keep this->db valid. + $objectutil = dol_clone($object, 1); // To avoid to denaturate loaded object when setting some properties for clone. We use native clone to keep this->db valid. - if (GETPOST('newsupplierref', 'alphanohtml')) $objectutil->ref_supplier = GETPOST('newsupplierref', 'alphanohtml'); - $objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int')); + if (GETPOST('newsupplierref', 'alphanohtml')) $objectutil->ref_supplier = GETPOST('newsupplierref', 'alphanohtml'); + $objectutil->date = dol_mktime(12, 0, 0, GETPOST('newdatemonth', 'int'), GETPOST('newdateday', 'int'), GETPOST('newdateyear', 'int')); - $result = $objectutil->createFromClone($user, $id); - if ($result > 0) - { - header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); - exit; - } - else - { - $langs->load("errors"); - setEventMessages($objectutil->error, $objectutil->errors, 'errors'); - $action = ''; - } - } - - elseif ($action == 'confirm_valid' && $confirm == 'yes' && - ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->facture->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate))) - ) - { + $result = $objectutil->createFromClone($user, $id); + if ($result > 0) + { + header("Location: ".$_SERVER['PHP_SELF'].'?id='.$result); + exit; + } else { + $langs->load("errors"); + setEventMessages($objectutil->error, $objectutil->errors, 'errors'); + $action = ''; + } + } elseif ($action == 'confirm_valid' && $confirm == 'yes' && $usercanvalidate) { $idwarehouse = GETPOST('idwarehouse'); $object->fetch($id); @@ -178,9 +178,7 @@ if (empty($reshook)) if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } @@ -214,7 +212,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -222,33 +220,28 @@ if (empty($reshook)) } } } - } - - elseif ($action == 'confirm_delete' && $confirm == 'yes') + } elseif ($action == 'confirm_delete' && $confirm == 'yes') { $object->fetch($id); $object->fetch_thirdparty(); $isErasable = $object->is_erasable(); - if (($user->rights->fournisseur->facture->supprimer && $isErasable > 0) - || ($user->rights->fournisseur->facture->creer && $isErasable == 1)) + if (($usercandelete && $isErasable > 0) || ($usercancreate && $isErasable == 1)) { $result = $object->delete($user); if ($result > 0) { header('Location: list.php?restore_lastsearch_values=1'); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } } // Remove a product line - elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_deleteline' && $confirm == 'yes' && $usercancreate) { $result = $object->deleteline($lineid); if ($result > 0) @@ -266,14 +259,12 @@ if (empty($reshook)) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); }*/ header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); /* Fix bug 1485 : Reset action to avoid asking again confirmation on failure */ $action = ''; @@ -281,15 +272,12 @@ if (empty($reshook)) } // Delete link of credit note to invoice - elseif ($action == 'unlinkdiscount' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'unlinkdiscount' && $usercancreate) { $discount = new DiscountAbsolute($db); $result = $discount->fetch(GETPOST("discountid")); $discount->unlink_invoice(); - } - - elseif ($action == 'confirm_paid' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) - { + } elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); $result = $object->set_paid($user); if ($result < 0) @@ -299,15 +287,13 @@ if (empty($reshook)) } // Set supplier ref - if ($action == 'setref_supplier' && $user->rights->fournisseur->facture->creer) + if ($action == 'setref_supplier' && $usercancreate) { $object->ref_supplier = GETPOST('ref_supplier', 'alpha'); if ($object->update($user) < 0) { setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { // Define output language $outputlangs = $langs; $newlang = ''; @@ -323,13 +309,13 @@ if (empty($reshook)) } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $ret = $object->fetch($object->id); // Reload to get new records - $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); } } } // payments conditions - if ($action == 'setconditions' && $user->rights->fournisseur->facture->creer) + if ($action == 'setconditions' && $usercancreate) { $result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int')); } @@ -341,36 +327,34 @@ if (empty($reshook)) } // payment mode - elseif ($action == 'setmode' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'setmode' && $usercancreate) { $result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int')); } // Multicurrency Code - elseif ($action == 'setmulticurrencycode' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setmulticurrencycode' && $usercancreate) { $result = $object->setMulticurrencyCode(GETPOST('multicurrency_code', 'alpha')); } // Multicurrency rate - elseif ($action == 'setmulticurrencyrate' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setmulticurrencyrate' && $usercancreate) { $result = $object->setMulticurrencyRate(price2num(GETPOST('multicurrency_tx', 'alpha'))); } // bank account - elseif ($action == 'setbankaccount' && $user->rights->fournisseur->facture->creer) { + elseif ($action == 'setbankaccount' && $usercancreate) { $result = $object->setBankAccount(GETPOST('fk_account', 'int')); } // Set label - elseif ($action == 'setlabel' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'setlabel' && $usercancreate) { $object->fetch($id); $object->label = GETPOST('label'); $result = $object->update($user); if ($result < 0) dol_print_error($db); - } - elseif ($action == 'setdatef' && $user->rights->fournisseur->facture->creer) - { + } elseif ($action == 'setdatef' && $usercancreate) { $newdate = dol_mktime(0, 0, 0, $_POST['datefmonth'], $_POST['datefday'], $_POST['datefyear']); if ($newdate > (dol_now() + (empty($conf->global->INVOICE_MAX_OFFSET_IN_FUTURE) ? 0 : $conf->global->INVOICE_MAX_OFFSET_IN_FUTURE))) { @@ -393,9 +377,7 @@ if (empty($reshook)) $result = $object->update($user); if ($result < 0) dol_print_error($db, $object->error); - } - elseif ($action == 'setdate_lim_reglement' && $user->rights->fournisseur->facture->creer) - { + } elseif ($action == 'setdate_lim_reglement' && $usercancreate) { $object->fetch($id); $object->date_echeance = dol_mktime(12, 0, 0, $_POST['date_lim_reglementmonth'], $_POST['date_lim_reglementday'], $_POST['date_lim_reglementyear']); if (!empty($object->date_echeance) && $object->date_echeance < $object->date) @@ -405,8 +387,7 @@ if (empty($reshook)) } $result = $object->update($user); if ($result < 0) dol_print_error($db, $object->error); - } - elseif ($action == "setabsolutediscount" && $usercancreate) + } elseif ($action == "setabsolutediscount" && $usercancreate) { // POST[remise_id] or POST[remise_id_for_payment] @@ -459,7 +440,7 @@ if (empty($reshook)) } $ret = $object->fetch($id); // Reload to get new records - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) setEventMessages($object->error, $object->errors, 'errors'); } } @@ -595,18 +576,14 @@ if (empty($reshook)) if ($result >= 0) { $db->commit(); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } } else { $db->commit(); } - } - else - { + } else { setEventMessages($discount->error, $discount->errors, 'errors'); $db->rollback(); } @@ -615,7 +592,7 @@ if (empty($reshook)) // Delete payment - elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_delete_paiement' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0) @@ -674,8 +651,8 @@ if (empty($reshook)) $object->libelle = GETPOST('label', 'nohtml'); $object->date = $datefacture; $object->date_echeance = $datedue; - $object->note_public = GETPOST('note_public', 'none'); - $object->note_private = GETPOST('note_private', 'none'); + $object->note_public = GETPOST('note_public', 'restricthtml'); + $object->note_private = GETPOST('note_private', 'restricthtml'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); @@ -739,8 +716,8 @@ if (empty($reshook)) $object->label = GETPOST('label', 'nohtml'); $object->date = $datefacture; $object->date_echeance = $datedue; - $object->note_public = GETPOST('note_public', 'none'); - $object->note_private = GETPOST('note_private', 'none'); + $object->note_public = GETPOST('note_public', 'restricthtml'); + $object->note_private = GETPOST('note_private', 'restricthtml'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); @@ -851,8 +828,8 @@ if (empty($reshook)) $object->libelle = $_POST['label']; $object->date = $datefacture; $object->date_echeance = $datedue; - $object->note_public = GETPOST('note_public', 'none'); - $object->note_private = GETPOST('note_private', 'none'); + $object->note_public = GETPOST('note_public', 'restricthtml'); + $object->note_private = GETPOST('note_private', 'restricthtml'); $object->cond_reglement_id = GETPOST('cond_reglement_id'); $object->mode_reglement_id = GETPOST('mode_reglement_id'); $object->fk_account = GETPOST('fk_account', 'int'); @@ -973,9 +950,7 @@ if (empty($reshook)) { $pu = 0; $pu_currency = $lines[$i]->multicurrency_subprice; - } - else - { + } else { $pu = $lines[$i]->subprice; $pu_currency = 0; } @@ -1015,18 +990,13 @@ if (empty($reshook)) // Now reload line $object->fetch_lines(); - } - else - { + } else { $error++; } - } - else - { + } else { $error++; } - } - elseif (!$error) + } elseif (!$error) { $id = $object->create($user); if ($id < 0) @@ -1045,14 +1015,12 @@ if (empty($reshook)) setEventMessages($object->error, $object->errors, 'errors'); $action = 'create'; $_GET['socid'] = $_POST['socid']; - } - else - { + } else { $db->commit(); if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { $outputlangs = $langs; - $result = $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + $result = $object->generateDocument($object->model_pdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result < 0) { dol_print_error($db, $object->error, $object->errors); @@ -1066,22 +1034,20 @@ if (empty($reshook)) } // Edit line - elseif ($action == 'updateline' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'updateline' && $usercancreate) { $db->begin(); $object->fetch($id); $object->fetch_thirdparty(); - $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); + $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); if (GETPOST('price_ht') != '') { $up = price2num(GETPOST('price_ht')); $price_base_type = 'HT'; - } - else - { + } else { $up = price2num(GETPOST('price_ttc')); $price_base_type = 'TTC'; } @@ -1091,7 +1057,7 @@ if (empty($reshook)) $productsupplier = new ProductFournisseur($db); if (!empty($conf->global->SUPPLIER_INVOICE_WITH_PREDEFINED_PRICES_ONLY)) { - if (GETPOST('productid') > 0 && $productsupplier->get_buyprice(0, price2num($_POST['qty']), GETPOST('productid'), 'none', GETPOST('socid', 'int')) < 0) + if (GETPOST('productid') > 0 && $productsupplier->get_buyprice(0, price2num(GETPOST('qty')), GETPOST('productid', 'int'), 'restricthtml', GETPOST('socid', 'int')) < 0) { setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'warnings'); } @@ -1103,9 +1069,7 @@ if (empty($reshook)) if (trim($_POST['product_desc']) != trim($label)) $label = $_POST['product_desc']; $type = $prod->type; - } - else - { + } else { $label = $_POST['product_desc']; $type = $_POST["type"] ? $_POST["type"] : 0; } @@ -1113,17 +1077,17 @@ if (empty($reshook)) $date_start = dol_mktime(GETPOST('date_starthour'), GETPOST('date_startmin'), GETPOST('date_startsec'), GETPOST('date_startmonth'), GETPOST('date_startday'), GETPOST('date_startyear')); $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); - // Define info_bits - $info_bits = 0; - if (preg_match('/\*/', $tva_tx)) - $info_bits |= 0x01; + // Define info_bits + $info_bits = 0; + if (preg_match('/\*/', $tva_tx)) + $info_bits |= 0x01; - // Define vat_rate - $tva_tx = str_replace('*', '', $tva_tx); - $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); - $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); + // Define vat_rate + $tva_tx = str_replace('*', '', $tva_tx); + $localtax1_tx = get_localtax($tva_tx, 1, $mysoc, $object->thirdparty); + $localtax2_tx = get_localtax($tva_tx, 2, $mysoc, $object->thirdparty); - $remise_percent = GETPOST('remise_percent'); + $remise_percent = GETPOST('remise_percent'); $pu_ht_devise = GETPOST('multicurrency_subprice'); // Extrafields Lines @@ -1136,12 +1100,12 @@ if (empty($reshook)) } } - $result = $object->updateline(GETPOST('lineid'), $label, $up, $tva_tx, $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('productid'), $price_base_type, $info_bits, $type, $remise_percent, 0, $date_start, $date_end, $array_options, $_POST['units'], $pu_ht_devise, GETPOST('fourn_ref', 'alpha')); - if ($result >= 0) - { - unset($_POST['label']); - unset($_POST['fourn_ref']); - unset($_POST['date_starthour']); + $result = $object->updateline(GETPOST('lineid'), $label, $up, $tva_tx, $localtax1_tx, $localtax2_tx, GETPOST('qty'), GETPOST('productid'), $price_base_type, $info_bits, $type, $remise_percent, 0, $date_start, $date_end, $array_options, $_POST['units'], $pu_ht_devise, GETPOST('fourn_ref', 'alpha')); + if ($result >= 0) + { + unset($_POST['label']); + unset($_POST['fourn_ref']); + unset($_POST['date_starthour']); unset($_POST['date_startmin']); unset($_POST['date_startsec']); unset($_POST['date_startday']); @@ -1155,16 +1119,11 @@ if (empty($reshook)) unset($_POST['date_endyear']); $db->commit(); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } - } - - elseif ($action == 'addline' && $user->rights->fournisseur->facture->creer) - { + } elseif ($action == 'addline' && $usercancreate) { $db->begin(); $ret = $object->fetch($id); @@ -1190,9 +1149,7 @@ if (empty($reshook)) $idprod = 0; $price_ht = GETPOST('price_ht'); $tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); - } - else - { + } else { $idprod = GETPOST('idprod', 'int'); $price_ht = GETPOST('price_ht'); $tva_tx = ''; @@ -1275,14 +1232,11 @@ if (empty($reshook)) { $productsupplier->ref_supplier = ''; } - } - else - { + } else { $fksoctosearch = $object->thirdparty->id; $productsupplier->get_buyprice(0, -1, $idprod, 'none', $fksoctosearch); // We force qty to -1 to be sure to find if a supplier price exist } - } - elseif (GETPOST('idprodfournprice', 'alpha') > 0) + } elseif (GETPOST('idprodfournprice', 'alpha') > 0) { $qtytosearch = $qty; // Just to see if a price exists for the quantity. Not used to found vat. //$qtytosearch=-1; // We force qty to -1 to be sure to find if a supplier price exist @@ -1296,7 +1250,7 @@ if (empty($reshook)) // if we use supplier description of the products if (!empty($productsupplier->desc_supplier) && !empty($conf->global->PRODUIT_FOURN_TEXTS)) { - $desc = $productsupplier->desc_supplier; + $desc = $productsupplier->desc_supplier; } else $desc = $productsupplier->description; if (trim($product_desc) != trim($desc)) $desc = dol_concatdesc($desc, $product_desc, '', !empty($conf->global->MAIN_CHANGE_ORDER_CONCAT_DESCRIPTION)); @@ -1347,8 +1301,8 @@ if (empty($reshook)) $array_options, $productsupplier->fk_unit, 0, - $pu_ht_devise, - $ref_supplier, + $pu_ht_devise, + $ref_supplier, '' ); } @@ -1366,8 +1320,7 @@ if (empty($reshook)) $langs->load("errors"); setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'errors'); } - } - elseif (empty($error)) // $price_ht is already set + } elseif (empty($error)) // $price_ht is already set { $tva_npr = (preg_match('/\*/', $tva_tx) ? 1 : 0); $tva_tx = str_replace('*', '', $tva_tx); @@ -1387,9 +1340,7 @@ if (empty($reshook)) if ($price_ht !== '') { $pu_ht = price2num($price_ht, 'MU'); // $pu_ht must be rounded according to settings - } - else - { + } else { $pu_ttc = price2num(GETPOST('price_ttc'), 'MU'); $pu_ht = price2num($pu_ttc / (1 + ($tva_tx / 100)), 'MU'); // $pu_ht must be rounded according to settings } @@ -1415,7 +1366,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -1454,25 +1405,20 @@ if (empty($reshook)) unset($_POST['date_endday']); unset($_POST['date_endmonth']); unset($_POST['date_endyear']); - } - else - { + } else { $db->rollback(); setEventMessages($object->error, $object->errors, 'errors'); } $action = ''; - } - - elseif ($action == 'classin' && $user->rights->fournisseur->facture->creer) - { + } elseif ($action == 'classin' && $usercancreate) { $object->fetch($id); $result = $object->setProject($projectid); } // Set invoice to draft status - elseif ($action == 'confirm_edit' && $confirm == 'yes' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'confirm_edit' && $confirm == 'yes' && $usercancreate) { $object->fetch($id); @@ -1484,36 +1430,34 @@ if (empty($reshook)) if (!$ventilExportCompta) { - // On verifie si aucun paiement n'a ete effectue + // On verifie si aucun paiement n'a ete effectue if ($resteapayer == price2num($object->total_ttc, 'MT', 1) && $object->statut == FactureFournisseur::STATUS_VALIDATED) - { - $idwarehouse = GETPOST('idwarehouse'); + { + $idwarehouse = GETPOST('idwarehouse'); - $object->fetch_thirdparty(); + $object->fetch_thirdparty(); - $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change = $object->hasProductsOrServices(1); - } + $qualified_for_stock_change = 0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + $qualified_for_stock_change = $object->hasProductsOrServices(2); + } else { + $qualified_for_stock_change = $object->hasProductsOrServices(1); + } - // Check parameters - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - if (!$idwarehouse || $idwarehouse == -1) - { - $error++; - setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); - $action = ''; - } - } + // Check parameters + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + if (!$idwarehouse || $idwarehouse == -1) + { + $error++; + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); + $action = ''; + } + } - $object->setDraft($user, $idwarehouse); + $object->setDraft($user, $idwarehouse); // Define output language if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) @@ -1526,7 +1470,7 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -1539,7 +1483,7 @@ if (empty($reshook)) } // Set invoice to validated/unpaid status - elseif ($action == 'reopen' && $user->rights->fournisseur->facture->creer) + elseif ($action == 'reopen' && $usercancreate) { $result = $object->fetch($id); if ($object->statut == FactureFournisseur::STATUS_CLOSED @@ -1550,9 +1494,7 @@ if (empty($reshook)) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1570,7 +1512,7 @@ if (empty($reshook)) // Actions to build doc $upload_dir = $conf->fournisseur->facture->dir_output; - $permissiontoadd = $user->rights->fournisseur->facture->creer; + $permissiontoadd = $usercancreate; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; // Make calculation according to calculationrule @@ -1592,7 +1534,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) @@ -1612,7 +1554,7 @@ if (empty($reshook)) $action = 'edit_extras'; } - if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $user->rights->fournisseur->facture->creer) + if (!empty($conf->global->MAIN_DISABLE_CONTACTS_TAB) && $usercancreate) { if ($action == 'addcontact') { @@ -1628,16 +1570,12 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -1649,9 +1587,7 @@ if (empty($reshook)) if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db); } } @@ -1666,8 +1602,7 @@ if (empty($reshook)) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -1767,9 +1702,7 @@ if ($action == 'create') // Replicate extrafields $objectsrc->fetch_optionals(); $object->array_options = $objectsrc->array_options; - } - else - { + } else { $cond_reglement_id = $societe->cond_reglement_supplier_id; $mode_reglement_id = $societe->mode_reglement_supplier_id; $fk_account = $societe->fk_account; @@ -1781,6 +1714,19 @@ if ($action == 'create') if (!empty($conf->multicurrency->enabled) && !empty($soc->multicurrency_code)) $currency_code = $soc->multicurrency_code; } + // when payment condition is empty (means not override by payment condition form a other object, like third-party), try to use default value + if (empty($cond_reglement_id)) { + $cond_reglement_id = GETPOST("cond_reglement_id"); + } + + // when payment mode is empty (means not override by payment condition form a other object, like third-party), try to use default value + if (empty($mode_reglement_id)) { + $mode_reglement_id = GETPOST("mode_reglement_id"); + } + + $note_public = $object->getDefaultCreateValueFor('note_public', ((! empty($origin) && ! empty($originid) && is_object($objectsrc) && !empty($conf->global->FACTUREFOURN_REUSE_NOTES_ON_CREATE_FROM))?$objectsrc->note_public:null)); + $note_private = $object->getDefaultCreateValueFor('note_private', ((! empty($origin) && ! empty($originid) && is_object($objectsrc) && !empty($conf->global->FACTUREFOURN_REUSE_NOTES_ON_CREATE_FROM))?$objectsrc->note_private:null)); + print '
'; print ''; print ''; @@ -1805,9 +1751,7 @@ if ($action == 'create') $absolute_discount = $societe->getAvailableDiscounts('', '', 0, 1); print $societe->getNomUrl(1); print ''; - } - else - { + } else { print $form->select_company($societe->id, 'socid', 's.fournisseur=1', 'SelectThirdParty', 0, 0, null, 0, 'minwidth300'); // reload page to retrieve supplier informations if (!empty($conf->global->RELOAD_PAGE_ON_SUPPLIER_CHANGE)) @@ -1827,9 +1771,9 @@ if ($action == 'create') print ''; // Ref supplier - print ''.$langs->trans('RefSupplier').'id > 0) print ' autofocus'; - print '>'; + print ''.$langs->trans('RefSupplier').'id > 0) print ' autofocus'; + print '>'; print ''; print ''.$langs->trans('Type').''; @@ -2019,9 +1963,7 @@ if ($action == 'create') print ''; } - } - else - { + } else { print '
'; $tmp = ' '; $text = $tmp.$langs->trans("InvoiceAvoir").' '; @@ -2073,9 +2015,12 @@ if ($action == 'create') print ''; // Bank Account - print ''.$langs->trans('BankAccount').''; - $form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1); - print ''; + if (!empty($conf->banque->enabled)) + { + print ''.$langs->trans('BankAccount').''; + $form->select_comptes((GETPOSTISSET('fk_account') ?GETPOST('fk_account', 'alpha') : $fk_account), 'fk_account', 0, '', 1); + print ''; + } // Multicurrency if (!empty($conf->multicurrency->enabled)) @@ -2111,21 +2056,16 @@ if ($action == 'create') // Public note print ''.$langs->trans('NotePublic').''; print ''; - $note_public = $object->getDefaultCreateValueFor('note_public'); - if (empty($note_public))$note_public = $objectsrc->note_public; - $doleditor = new DolEditor('note_public', (GETPOSTISSET('note_public') ?GETPOST('note_public', 'none') : $note_public), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_public', (GETPOSTISSET('note_public') ?GETPOST('note_public', 'restricthtml') : $note_public), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print ''; - // print ''; + // print ''; print ''; // Private note print ''.$langs->trans('NotePrivate').''; print ''; - $note_private = $object->getDefaultCreateValueFor('note_private'); - if (empty($note_private))$note_private = $objectsrc->note_private; - - $doleditor = new DolEditor('note_private', (GETPOSTISSET('note_private') ?GETPOST('note_private', 'none') : $note_private), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + $doleditor = new DolEditor('note_private', (GETPOSTISSET('note_private') ?GETPOST('note_private', 'restricthtml') : $note_private), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); print $doleditor->Create(1); print ''; // print ''; @@ -2224,9 +2164,7 @@ if ($action == 'create') print ''; } -} -else -{ +} else { if ($id > 0 || !empty($ref)) { /* *************************************************************************** */ @@ -2303,8 +2241,8 @@ else { // Create an array for form $formquestion = array( - array('type' => 'text', 'name' => 'newsupplierref', 'label' => $langs->trans("RefSupplier"), 'value' => $langs->trans("CopyOf").' '.$object->ref_supplier), - array('type' => 'date', 'name' => 'newdate', 'label' => $langs->trans("Date"), 'value' => dol_now()) + array('type' => 'text', 'name' => 'newsupplierref', 'label' => $langs->trans("RefSupplier"), 'value' => $langs->trans("CopyOf").' '.$object->ref_supplier), + array('type' => 'date', 'name' => 'newdate', 'label' => $langs->trans("Date"), 'value' => dol_now()) ); // Ask confirmation to clone $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneInvoice', $object->ref), 'confirm_clone', $formquestion, 'yes', 1, 250); @@ -2319,9 +2257,7 @@ else { $savdate = $object->date; $numref = $object->getNextNumRef($societe); - } - else - { + } else { $numref = $object->ref; } @@ -2339,67 +2275,63 @@ else if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { + } else { $qualified_for_stock_change = $object->hasProductsOrServices(1); } - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - $formproduct = new FormProduct($db); - $warehouse = new Entrepot($db); - $warehouse_array = $warehouse->list_array(); - if (count($warehouse_array) == 1) { - $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("WarehouseForStockDecrease", current($warehouse_array)) : $langs->trans("WarehouseForStockIncrease", current($warehouse_array)); - $value = ''; - } else { - $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("SelectWarehouseForStockDecrease") : $langs->trans("SelectWarehouseForStockIncrease"); - $value = $formproduct->selectWarehouses(GETPOST('idwarehouse') ?GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1); - } - $formquestion = array( - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value) - ); - } + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $warehouse = new Entrepot($db); + $warehouse_array = $warehouse->list_array(); + if (count($warehouse_array) == 1) { + $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("WarehouseForStockDecrease", current($warehouse_array)) : $langs->trans("WarehouseForStockIncrease", current($warehouse_array)); + $value = ''; + } else { + $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("SelectWarehouseForStockDecrease") : $langs->trans("SelectWarehouseForStockIncrease"); + $value = $formproduct->selectWarehouses(GETPOST('idwarehouse') ?GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1); + } + $formquestion = array( + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value) + ); + } $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1); - } + } - // Confirmation edit (back to draft) - if ($action == 'edit') - { - $formquestion = array(); + // Confirmation edit (back to draft) + if ($action == 'edit') + { + $formquestion = array(); - $qualified_for_stock_change = 0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change = $object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change = $object->hasProductsOrServices(1); - } - if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; - $formproduct = new FormProduct($db); - $warehouse = new Entrepot($db); - $warehouse_array = $warehouse->list_array(); - if (count($warehouse_array) == 1) { - $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("WarehouseForStockIncrease", current($warehouse_array)) : $langs->trans("WarehouseForStockDecrease", current($warehouse_array)); - $value = ''; - } else { - $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("SelectWarehouseForStockIncrease") : $langs->trans("SelectWarehouseForStockDecrease"); - $value = $formproduct->selectWarehouses(GETPOST('idwarehouse') ?GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1); - } - $formquestion = array( - array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value) - ); - } - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnvalidateBill'), $langs->trans('ConfirmUnvalidateBill', $object->ref), 'confirm_edit', $formquestion, 1, 1); + $qualified_for_stock_change = 0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + $qualified_for_stock_change = $object->hasProductsOrServices(2); + } else { + $qualified_for_stock_change = $object->hasProductsOrServices(1); + } + if (!empty($conf->stock->enabled) && !empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new FormProduct($db); + $warehouse = new Entrepot($db); + $warehouse_array = $warehouse->list_array(); + if (count($warehouse_array) == 1) { + $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("WarehouseForStockIncrease", current($warehouse_array)) : $langs->trans("WarehouseForStockDecrease", current($warehouse_array)); + $value = ''; + } else { + $label = $object->type == FactureFournisseur::TYPE_CREDIT_NOTE ? $langs->trans("SelectWarehouseForStockIncrease") : $langs->trans("SelectWarehouseForStockDecrease"); + $value = $formproduct->selectWarehouses(GETPOST('idwarehouse') ?GETPOST('idwarehouse') : 'ifone', 'idwarehouse', '', 1); + } + $formquestion = array( + array('type' => 'other', 'name' => 'idwarehouse', 'label' => $label, 'value' => $value) + ); + } + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('UnvalidateBill'), $langs->trans('ConfirmUnvalidateBill', $object->ref), 'confirm_edit', $formquestion, 1, 1); } // Confirmation set paid @@ -2413,7 +2345,7 @@ else { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1); } - if ($action == 'deletepaiement') + if ($action == 'deletepayment') { $payment_id = GETPOST('paiement_id'); $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&paiement_id='.$payment_id, $langs->trans('DeletePayment'), $langs->trans('ConfirmDeletePayment'), 'confirm_delete_paiement', '', 0, 1); @@ -2437,109 +2369,109 @@ else print $formconfirm; - // Supplier invoice card - $linkback = ''.$langs->trans("BackToList").''; + // Supplier invoice card + $linkback = ''.$langs->trans("BackToList").''; - $morehtmlref = '
'; - // Ref supplier - $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $user->rights->fournisseur->facture->creer, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; - // Project - if (!empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref .= '
'.$langs->trans('Project').' '; - if ($user->rights->fournisseur->facture->creer) - { - if ($action != 'classify') { - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; - } - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= ''; - $morehtmlref .= ''; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ''; - $morehtmlref .= $proj->ref; - $morehtmlref .= ''; - } else { - $morehtmlref .= ''; - } - } - } - $morehtmlref .= '
'; + $morehtmlref = '
'; + // Ref supplier + $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + // Project + if (!empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project').' '; + if ($usercancreate) + { + if ($action != 'classify') { + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + } + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects((empty($conf->global->PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS) ? $object->socid : -1), $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } + } + $morehtmlref .= '
'; - $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status + $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); - print '
'; - print '
'; - print '
'; + print '
'; + print '
'; + print '
'; - print ''; + print '
'; - // Type - print ''; + $facidavoir = $object->getListIdAvoirFromInvoice(); + if (count($facidavoir) > 0) + { + print ' ('.$langs->transnoentities("InvoiceHasAvoir"); + $i = 0; + foreach ($facidavoir as $id) + { + if ($i == 0) print ' '; + else print ','; + $facavoir = new FactureFournisseur($db); + $facavoir->fetch($id); + print $facavoir->getNomUrl(1); + } + print ')'; + } + if (isset($facidnext) && $facidnext > 0) + { + $facthatreplace = new FactureFournisseur($db); + $facthatreplace->fetch($facidnext); + print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; + } + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) { + $discount = new DiscountAbsolute($db); + $result = $discount->fetch(0, 0, $object->id); + if ($result > 0) { + print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'
'; + } + } + print ''; - // Relative and absolute discounts + // Relative and absolute discounts print ''; - // Label - print ''; - print ''; - print ''; - print ''; + // Label + print ''; + print ''; + print ''; + print ''; - $form_permission = ($object->statut < FactureFournisseur::STATUS_CLOSED) && $user->rights->fournisseur->facture->creer && ($object->getSommePaiement() <= 0); + $form_permission = ($object->statut < FactureFournisseur::STATUS_CLOSED) && $usercancreate && ($object->getSommePaiement() <= 0); - // Date - print ''; + // Date + print ''; // Default terms of the settlement $langs->load('bills'); @@ -2569,7 +2501,7 @@ else print '
'.$langs->trans('Type').''; - print $object->getLibType(); - if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) - { - $facreplaced = new FactureFournisseur($db); - $facreplaced->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')'; - } - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) - { - $facusing = new FactureFournisseur($db); - $facusing->fetch($object->fk_facture_source); - print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; - } + // Type + print '
'.$langs->trans('Type').''; + print $object->getLibType(); + if ($object->type == FactureFournisseur::TYPE_REPLACEMENT) + { + $facreplaced = new FactureFournisseur($db); + $facreplaced->fetch($object->fk_facture_source); + print ' ('.$langs->transnoentities("ReplaceInvoice", $facreplaced->getNomUrl(1)).')'; + } + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE) + { + $facusing = new FactureFournisseur($db); + $facusing->fetch($object->fk_facture_source); + print ' ('.$langs->transnoentities("CorrectInvoice", $facusing->getNomUrl(1)).')'; + } - $facidavoir = $object->getListIdAvoirFromInvoice(); - if (count($facidavoir) > 0) - { - print ' ('.$langs->transnoentities("InvoiceHasAvoir"); - $i = 0; - foreach ($facidavoir as $id) - { - if ($i == 0) print ' '; - else print ','; - $facavoir = new FactureFournisseur($db); - $facavoir->fetch($id); - print $facavoir->getNomUrl(1); - } - print ')'; - } - if (isset($facidnext) && $facidnext > 0) - { - $facthatreplace = new FactureFournisseur($db); - $facthatreplace->fetch($facidnext); - print ' ('.$langs->transnoentities("ReplacedByInvoice", $facthatreplace->getNomUrl(1)).')'; - } - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) { - $discount = new DiscountAbsolute($db); - $result = $discount->fetch(0, 0, $object->id); - if ($result > 0) { - print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(1), $discount->getNomUrl(1, 'discount')).'
'; - } - } - print '
'.$langs->trans('Discounts'); print ''; @@ -2550,18 +2482,18 @@ else print '
'.$form->editfieldkey("Label", 'label', $object->label, $object, ($user->rights->fournisseur->facture->creer)).''.$form->editfieldval("Label", 'label', $object->label, $object, ($user->rights->fournisseur->facture->creer)).'
'.$form->editfieldkey("Label", 'label', $object->label, $object, ($usercancreate)).''.$form->editfieldval("Label", 'label', $object->label, $object, ($usercancreate)).'
'.$form->editfieldkey("DateInvoice", 'datef', $object->datep, $object, $form_permission, 'datepicker').''; - print $form->editfieldval("Date", 'datef', $object->datep, $object, $form_permission, 'datepicker'); - print '
'.$form->editfieldkey("DateInvoice", 'datef', $object->datep, $object, $form_permission, 'datepicker').''; + print $form->editfieldval("Date", 'datef', $object->datep, $object, $form_permission, 'datepicker'); + print '
'; } print '
'; print $langs->trans('PaymentConditions'); print ''; - if ($action != 'editconditions' && $user->rights->fournisseur->facture->creer) { + if ($action != 'editconditions' && $usercancreate) { print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
'; @@ -2577,9 +2509,7 @@ else if ($action == 'editconditions') { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'cond_reglement_id'); - } - else - { + } else { $form->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->cond_reglement_id, 'none'); } print ""; @@ -2599,7 +2529,7 @@ else print ''; - if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) { + if ($action != 'editmode' && $usercancreate) { print ''; } print '
'; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'
'; @@ -2607,9 +2537,7 @@ else if ($action == 'editmode') { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'mode_reglement_id', 'DBIT', 1, 1); - } - else - { + } else { $form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id, 'none'); } print ''; @@ -2664,21 +2592,24 @@ else } // Bank Account - print ''; - print ''; - print '
'; - print $langs->trans('BankAccount'); - print ''; - if ($action != 'editbankaccount' && $user->rights->fournisseur->facture->creer) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
'; - print ''; - if ($action == 'editbankaccount') { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); - } else { - $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + if (!empty($conf->banque->enabled)) + { + print ''; + print ''; + print '
'; + print $langs->trans('BankAccount'); + print ''; + if ($action != 'editbankaccount' && $usercancreate) + print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
'; + print ''; + if ($action == 'editbankaccount') { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'fk_account', 1); + } else { + $form->formSelectAccount($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_account, 'none'); + } + print ""; + print ''; } - print ""; - print ''; // Incoterms if (!empty($conf->incoterm->enabled)) @@ -2687,7 +2618,7 @@ else print '
'; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->fournisseur->facture->creer) print ''.img_edit().''; + if ($usercancreate) print ''.img_edit().''; else print ' '; print '
'; print ''; @@ -2695,9 +2626,7 @@ else if ($action != 'editincoterm') { print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } - else - { + } else { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); } print ''; @@ -2740,7 +2669,7 @@ else if (GETPOST('calculationrule')) $calculationrule = GETPOST('calculationrule', 'alpha'); else $calculationrule = (empty($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND) ? 'totalofround' : 'roundoftotal'); if ($calculationrule == 'totalofround') $calculationrulenum = 1; - else $calculationrulenum = 2; + else $calculationrulenum = 2; // Show link for "recalculate" if ($object->getVentilExportCompta() == 0) { $s = $langs->trans("ReCalculate").' '; @@ -2788,7 +2717,7 @@ else if ($societe->localtax1_assuj == "1") $nbrows++; if ($societe->localtax2_assuj == "1") $nbrows++; - $sql = 'SELECT p.datep as dp, p.ref, p.num_paiement, p.rowid, p.fk_bank,'; + $sql = 'SELECT p.datep as dp, p.ref, p.num_paiement as num_payment, p.rowid, p.fk_bank,'; $sql .= ' c.id as paiement_type,'; $sql .= ' pf.amount,'; $sql .= ' ba.rowid as baid, ba.ref as baref, ba.label, ba.number as banumber, ba.account_number, ba.fk_accountancy_journal'; @@ -2826,7 +2755,7 @@ else $paymentstatic->id = $objp->rowid; $paymentstatic->datepaye = $db->jdate($objp->dp); $paymentstatic->ref = ($objp->ref ? $objp->ref : $objp->rowid); - $paymentstatic->num_paiement = $objp->num_paiement; + $paymentstatic->num_payment = $objp->num_payment; $paymentstatic->payment_code = $objp->payment_code; print ''; @@ -2835,7 +2764,7 @@ else print ''; print ''.dol_print_date($db->jdate($objp->dp), 'day').''; print ''; - print $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_paiement; + print $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_payment; print ''; if (!empty($conf->banque->enabled)) { @@ -2860,7 +2789,7 @@ else print ''; if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) { - print 'rowid.'">'; + print 'rowid.'">'; print img_delete(); print ''; } @@ -2869,9 +2798,7 @@ else $totalpaye += $objp->amount; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } @@ -2889,9 +2816,7 @@ else */ $db->free($result); - } - else - { + } else { dol_print_error($db); } @@ -2901,8 +2826,7 @@ else print ''; if ($object->type != FactureFournisseur::TYPE_DEPOSIT) print $langs->trans('AlreadyPaidNoCreditNotesNoDeposits'); - else - print $langs->trans('AlreadyPaid'); + else print $langs->trans('AlreadyPaid'); print ' : 0) ? ' class="amountalreadypaid"' : '').'>'.price($totalpaye).' '; //$resteapayer = $object->total_ttc - $totalpaye; @@ -2991,13 +2915,11 @@ else print ''; if ($resteapayeraffiche >= 0) print $langs->trans('RemainderToPay'); - else - print $langs->trans('ExcessPaid'); + else print $langs->trans('ExcessPaid'); print ' :'; print ''.price($resteapayeraffiche).''; print ' '; - } - else // Credit note + } else // Credit note { $cssforamountpaymentcomplete = 'amountpaymentneutral'; @@ -3013,8 +2935,7 @@ else print ''; if ($resteapayeraffiche <= 0) print $langs->trans('RemainderToPayBack'); - else - print $langs->trans('ExcessPaid'); + else print $langs->trans('ExcessPaid'); print ' :'; print ''.price($sign * $resteapayeraffiche).''; print ' '; @@ -3080,7 +3001,7 @@ else $num = count($object->lines); // Form to add new line - if ($object->statut == FactureFournisseur::STATUS_DRAFT && $user->rights->fournisseur->facture->creer) + if ($object->statut == FactureFournisseur::STATUS_DRAFT && $usercancreate) { if ($action != 'editline') { @@ -3112,8 +3033,8 @@ else // modified by hook if (empty($reshook)) { - // Modify a validated invoice with no payments - if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $action != 'confirm_edit' && $object->getSommePaiement() == 0 && $user->rights->fournisseur->facture->creer) + // Modify a validated invoice with no payments + if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $action != 'confirm_edit' && $object->getSommePaiement() == 0 && $usercancreate) { // We check if lines of invoice are not already transfered into accountancy $ventilExportCompta = $object->getVentilExportCompta(); // Should be 0 since the sum of payments are zero. But we keep the protection. @@ -3121,9 +3042,7 @@ else if ($ventilExportCompta == 0) { print ''; - } - else - { + } else { print '
'.$langs->trans('Modify').'
'; } } @@ -3136,13 +3055,11 @@ else || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && empty($discount->id))) && ($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED)) // A paid invoice (partially or completely) { - if (!$facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice + if (!$facidnext && $object->close_code != 'replaced' && $usercancreate) // Not replaced by another invoice { print ''; - } - else - { - if ($user->rights->fournisseur->facture->creer) { + } else { + if ($usercancreate) { print '
'.$langs->trans('ReOpen').'
'; } elseif (empty($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED)) { print '
'.$langs->trans('ReOpen').'
'; @@ -3154,25 +3071,24 @@ else if (empty($user->socid)) { if (($object->statut == FactureFournisseur::STATUS_VALIDATED || $object->statut == FactureFournisseur::STATUS_CLOSED)) { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || $user->rights->fournisseur->supplier_invoice_advance->send) + if ($usercansend) { print ''; - } - else print '
'.$langs->trans('SendMail').'
'; + } else print '
'.$langs->trans('SendMail').'
'; } } - // Make payments - if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) - { - print ''; // must use facid because id is for payment id not invoice - } + // Make payments + if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE && $action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) + { + print ''; // must use facid because id is for payment id not invoice + } - // Classify paid - if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) - { - print ''; + // Classify paid + if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_VALIDATED && $object->paye == 0 && $user->socid == 0) + { + print ''; //print ''.$langs->trans('ClassifyPaid').''; } @@ -3185,49 +3101,44 @@ else if ($resteapayer == 0) { print '
'.$langs->trans('DoPaymentBack').'
'; - } - else - { + } else { print ''; } } // For standard invoice with excess paid - if ($object->type == FactureFournisseur::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $user->rights->fournisseur->facture->creer && empty($discount->id)) + if ($object->type == FactureFournisseur::TYPE_STANDARD && empty($object->paye) && ($object->total_ttc - $totalpaye - $totalcreditnotes - $totaldeposits) < 0 && $usercancreate && empty($discount->id)) { print ''; } // For credit note - if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $user->rights->fournisseur->facture->creer + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && $object->statut == 1 && $object->paye == 0 && $usercancreate && (!empty($conf->global->SUPPLIER_INVOICE_ALLOW_REUSE_OF_CREDIT_WHEN_PARTIALLY_REFUNDED) || $object->getSommePaiement() == 0) ) { print ''; } // For deposit invoice - if ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 1 && $resteapayer == 0 && $user->rights->fournisseur->facture->creer && empty($discount->id)) + if ($object->type == FactureFournisseur::TYPE_DEPOSIT && $object->paye == 1 && $resteapayer == 0 && $usercancreate && empty($discount->id)) { print ''; } } - // Validate - if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_DRAFT) - { - if (count($object->lines)) - { - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->facture->creer)) - || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->fournisseur->supplier_invoice_advance->validate))) - { - print ''; - } - else - { - print ''; - } - } - } + // Validate + if ($action != 'confirm_edit' && $object->statut == FactureFournisseur::STATUS_DRAFT) + { + if (count($object->lines)) + { + if ($usercanvalidate) + { + print ''; + } else { + print ''; + } + } + } // Create event /*if ($conf->agenda->enabled && ! empty($conf->global->MAIN_ADD_EVENT_ON_ELEMENT_CARD)) // Add hidden condition because this is not a "workflow" action so should appears somewhere else on page. @@ -3236,13 +3147,13 @@ else }*/ // Clone - if ($action != 'edit' && $user->rights->fournisseur->facture->creer) + if ($action != 'edit' && $usercancreate) { print ''; } // Create a credit note - if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut > 0 && $user->rights->fournisseur->facture->creer) + if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_DEPOSIT) && $object->statut > 0 && $usercancreate) { if (!$objectidnext) { @@ -3250,36 +3161,30 @@ else } } - // Delete + // Delete $isErasable = $object->is_erasable(); - if ($action != 'confirm_edit' && ($user->rights->fournisseur->facture->supprimer || ($user->rights->fournisseur->facture->creer && $isErasable == 1))) // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) - { - //var_dump($isErasable); - if ($isErasable == -4) { - print ''; - } - elseif ($isErasable == -3) { // Should never happen with supplier invoice - print ''; - } - elseif ($isErasable == -2) { // Should never happen with supplier invoice - print ''; - } - elseif ($isErasable == -1) { - print ''; - } - elseif ($isErasable <= 0) // Any other cases - { - print ''; - } - else - { - print ''; - } - } - print '
'; + if ($action != 'confirm_edit' && ($user->rights->fournisseur->facture->supprimer || ($usercancreate && $isErasable == 1))) // isErasable = 1 means draft with temporary ref (draft can always be deleted with no need of permissions) + { + //var_dump($isErasable); + if ($isErasable == -4) { + print ''; + } elseif ($isErasable == -3) { // Should never happen with supplier invoice + print ''; + } elseif ($isErasable == -2) { // Should never happen with supplier invoice + print ''; + } elseif ($isErasable == -1) { + print ''; + } elseif ($isErasable <= 0) // Any other cases + { + print ''; + } else { + print ''; + } + } + print '
'; - if ($action != 'confirm_edit') - { + if ($action != 'confirm_edit') + { print '
'; /* @@ -3289,9 +3194,9 @@ else $subdir = get_exdir($object->id, 2, 0, 0, $object, 'invoice_supplier').$ref; $filedir = $conf->fournisseur->facture->dir_output.'/'.$subdir; $urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id; - $genallowed = $user->rights->fournisseur->facture->lire; - $delallowed = $user->rights->fournisseur->facture->creer; - $modelpdf = (!empty($object->modelpdf) ? $object->modelpdf : (empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->INVOICE_SUPPLIER_ADDON_PDF)); + $genallowed = $usercanread; + $delallowed = $usercancreate; + $modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->INVOICE_SUPPLIER_ADDON_PDF) ? '' : $conf->global->INVOICE_SUPPLIER_ADDON_PDF)); print $formfile->showdocuments('facture_fournisseur', $subdir, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 40, 0, '', '', '', $societe->default_lang); $somethingshown = $formfile->numoffiles; diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index eca47acaef5..9be956b32ae 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -38,7 +38,7 @@ $langs->loadLangs(array("bills", "other", "companies")); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; @@ -65,16 +65,12 @@ if ($action == 'addcontact' && $user->rights->fournisseur->facture->creer) { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { if ($object->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') { $langs->load("errors"); setEventMessages($langs->trans("ErrorThisContactIsAlreadyDefinedAsThisType"), null, 'errors'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -86,9 +82,7 @@ elseif ($action == 'swapstatut' && $user->rights->fournisseur->facture->creer) if ($object->fetch($id)) { $result = $object->swapContactStatus(GETPOST('ligne')); - } - else - { + } else { dol_print_error($db); } } @@ -103,8 +97,7 @@ elseif ($action == 'deletecontact' && $user->rights->fournisseur->facture->creer { header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else { + } else { dol_print_error($db); } } @@ -267,9 +260,7 @@ if ($id > 0 || !empty($ref)) // Contacts lines include DOL_DOCUMENT_ROOT.'/core/tpl/contacts.tpl.php'; - } - else - { + } else { print "ErrorRecordNotFound"; } } diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 022028bb483..f43ef300b01 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -41,7 +41,7 @@ if (!empty($conf->projet->enabled)) { $langs->loadLangs(array('bills', 'other', 'companies')); $id = GETPOST('facid', 'int') ?GETPOST('facid', 'int') : GETPOST('id', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $ref = GETPOST('ref', 'alpha'); @@ -94,56 +94,56 @@ if ($object->id > 0) $totalpaye = $object->getSommePaiement(); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; - $morehtmlref = '
'; - // Ref supplier - $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1); - $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); - // Thirdparty - $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); - if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; - // Project - if (!empty($conf->projet->enabled)) - { - $langs->load("projects"); - $morehtmlref .= '
'.$langs->trans('Project').' '; - if ($user->rights->facture->creer) - { - if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; - $morehtmlref .= ' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= '
'; - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= ''; - $morehtmlref .= '
'; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ''; - $morehtmlref .= $proj->ref; - $morehtmlref .= ''; - } else { - $morehtmlref .= ''; - } - } - } - $morehtmlref .= '
'; + $morehtmlref = '
'; + // Ref supplier + $morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1); + $morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref .= '
'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1); + if (empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' ('.$langs->trans("OtherBills").')'; + // Project + if (!empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref .= '
'.$langs->trans('Project').' '; + if ($user->rights->facture->creer) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref .= ' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
'; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
'; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ''; + $morehtmlref .= $proj->ref; + $morehtmlref .= ''; + } else { + $morehtmlref .= ''; + } + } + } + $morehtmlref .= '
'; - $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status + $object->totalpaye = $totalpaye; // To give a chance to dol_banner_tab to use already paid amount to show correct status - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0); - print '
'; - print '
'; + print '
'; + print '
'; // Build file list $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); @@ -215,15 +215,15 @@ if ($object->id > 0) // Amount Local Taxes //TODO: Place into a function to control showing by country or study better option - if ($societe->localtax1_assuj == "1") //Localtax1 + if ($mysoc->localtax1_assuj == "1") //Localtax1 { - print ''.$langs->transcountry("AmountLT1", $societe->country_code).''; + print ''.$langs->transcountry("AmountLT1", $mysoc->country_code).''; print ''.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).''; print ''; } - if ($societe->localtax2_assuj == "1") //Localtax2 + if ($mysoc->localtax2_assuj == "1") //Localtax2 { - print ''.$langs->transcountry("AmountLT2", $societe->country_code).''; + print ''.$langs->transcountry("AmountLT2", $mysoc->country_code).''; print ''.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).''; print ''; } @@ -252,11 +252,26 @@ if ($object->id > 0) $permission = $user->rights->fournisseur->facture->creer; $permtoedit = $user->rights->fournisseur->facture->creer; $param = '&facid='.$object->id; - include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ - print $langs->trans('ErrorUnknown'); + + $defaulttpldir = '/core/tpl'; + $dirtpls = array_merge($conf->modules_parts['tpl'], array($defaulttpldir)); + foreach ($dirtpls as $module => $reldir) + { + if (!empty($module)) { + $tpl = dol_buildpath($reldir.'/document_actions_post_headers.tpl.php'); + } else { + $tpl = DOL_DOCUMENT_ROOT.$reldir.'/document_actions_post_headers.tpl.php'; + } + + if (empty($conf->file->strict_mode)) { + $res = @include $tpl; + } else { + $res = include $tpl; // for debug + } + if ($res) break; + } +} else { + print $langs->trans('ErrorUnknown'); } // End of page diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 5368b491728..804a78079d3 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -116,26 +116,26 @@ if ($user->rights->fournisseur->facture->lire) if ($search_ref) { - $sql .= " AND f.ref LIKE '%".$search_ref."%'"; + $sql .= " AND f.ref LIKE '%".$db->escape($search_ref)."%'"; } if ($search_ref_supplier) { - $sql .= " AND f.ref_supplier LIKE '%".$search_ref_supplier."%'"; + $sql .= " AND f.ref_supplier LIKE '%".$db->escape($search_ref_supplier)."%'"; } if ($search_company) { - $sql .= " AND s.nom LIKE '%".$search_company."%'"; + $sql .= " AND s.nom LIKE '%".$db->escape($search_company)."%'"; } if ($search_amount_no_tax) { - $sql .= " AND f.total_ht = '".$search_amount_no_tax."'"; + $sql .= " AND f.total_ht = '".$db->escape($search_amount_no_tax)."'"; } if ($search_amount_all_tax) { - $sql .= " AND f.total_ttc = '".$search_amount_all_tax."'"; + $sql .= " AND f.total_ttc = '".$db->escape($search_amount_all_tax)."'"; } if (dol_strlen(GETPOST('sf_re')) > 0) @@ -290,9 +290,7 @@ if ($user->rights->fournisseur->facture->lire) print ''; $db->free($resql); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/fourn/facture/index.php b/htdocs/fourn/facture/index.php new file mode 100644 index 00000000000..c3272544371 --- /dev/null +++ b/htdocs/fourn/facture/index.php @@ -0,0 +1,535 @@ + + * + * 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 . + */ + +/** + * \file htdocs/forun/facture/index.php +* \ingroup facture + * \brief Home page of customer invoices area + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; + +// Security check +restrictedArea($user, 'fournisseur', 0, '', 'facture'); + +// Load translation files required by the page +$langs->loadLangs(['bills', 'boxes']); + +// Filter to show only result of one supplier +$socid = GETPOST('socid', 'int'); +if (isset($user->socid) && $user->socid > 0) +{ + $action = ''; + $socid = $user->socid; +} + +// Maximum elements of the tables +$maxDraftCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD; +$maxLatestEditCount = 5; +$maxOpenCount = empty($conf->global->MAIN_MAXLIST_OVERLOAD) ? 500 : $conf->global->MAIN_MAXLIST_OVERLOAD; + +/* +* View +*/ + +llxHeader("", $langs->trans("SupplierInvoicesArea"), 'EN:Suppliers_Invoices|FR:FactureFournisseur|ES:Facturas_de_proveedores'); + +print load_fiche_titre($langs->trans("SupplierInvoicesArea"), '', 'bill'); + +print '
'; + +print '
'; + +// This is useless due to the global search combo +if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) +{ + print getAreaSearchFrom(); + print '
'; +} + +print getPieChart($socid); +print '
'; +print getDraftTable($maxDraftCount, $socid); + +print '
'; + +print '
'; +print '
'; + +print getLatestEditTable($maxLatestEditCount, $socid); +print '
'; +print getOpenTable($maxOpenCount, $socid); + +print '
'; +print '
'; + +print '
'; + +// End of page +llxFooter(); +$db->close(); + +/** + * Return a HTML string that contains a additional search form + * + * @return string A HTML string that contains a additional search form + */ +function getAreaSearchFrom() +{ + global $langs; + + $result = '
'; + $result .= '
'; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= "
'.$langs->trans("Search").'
'.$langs->trans("Invoice").':
"; + $result .= "
"; + $result .= "
"; + + return $result; +} + +/** + * Return a HTML table that contains a pie chart of supplier invoices + * + * @param int $socid (Optional) Show only results from the supplier with this id + * @return string A HTML table that contains a pie chart of supplier invoices + */ +function getPieChart($socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT count(f.rowid), f.fk_statut"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture_fourn').")"; + if ($user->socid) $sql .= ' AND f.fk_soc = '.$user->socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= " GROUP BY f.fk_statut"; + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + $i = 0; + + $total = 0; + $vals = []; + + while ($i < $num) + { + $row = $db->fetch_row($resql); + if ($row) + { + $vals[$row[1]] = $row[0]; + $total += $row[0]; + } + + $i++; + } + + $db->free($resql); + + $result = '
'; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $objectstatic = new FactureFournisseur($db); + $array = [FactureFournisseur::STATUS_DRAFT, FactureFournisseur::STATUS_VALIDATED, FactureFournisseur::STATUS_CLOSED, FactureFournisseur::STATUS_ABANDONED]; + $dataseries = []; + + foreach ($array as $status) + { + $objectstatic->statut = $status; + $objectstatic->paye = $status == FactureFournisseur::STATUS_CLOSED ? -1 : 0; + + $dataseries[] = [$objectstatic->getLibStatut(1), (isset($vals[$status]) ? (int) $vals[$status] : 0)]; + if (!$conf->use_javascript_ajax) + { + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + } + } + + if ($conf->use_javascript_ajax) + { + $dolgraph = new DolGraph(); + $dolgraph->SetData($dataseries); + $dolgraph->setShowLegend(1); + $dolgraph->setShowPercent(1); + $dolgraph->SetType(['pie']); + $dolgraph->setWidth('100%'); + $dolgraph->draw('idgraphthirdparties'); + + $result .= ''; + $result .= ''; + $result .= ''; + } + + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= '
'.$langs->trans("Statistics").' - '.$langs->trans("SupplierInvoice").'
'.$objectstatic->getLibStatut(0).''.(isset($vals[$status]) ? $vals[$status] : 0).'
'.$dolgraph->show($total ? 0 : 1).'
'.$langs->trans("Total").''.$total.'
'; + $result .= '
'; + + return $result; +} + +/** + * Return a HTML table that contains a list with supplier invoice drafts + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the supplier with this id + * @return string A HTML table that contains a list with supplier invoice drafts + */ +function getDraftTable($maxCount = 500, $socid = 0) +{ + global $db, $langs, $user; + + $sql = "SELECT f.rowid, f.ref, s.nom as socname, s.rowid as socid, s.canvas, s.client, f.total_ttc"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + $sql .= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture_fourn').")"; + $sql .= " AND f.fk_statut = ".FactureFournisseur::STATUS_DRAFT; + if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + + $result = '
'; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
'; + $result .= $langs->trans("SuppliersDraftInvoices"); + $result .= ' '; + $result .= ''.$num.''; + $result .= ''; + $result .= '
'; + $result .= '
'; + return $result; + } + + $objectstatic = new FactureFournisseur($db); + $companystatic = new Societe($db); + $nbofloop = min($num, $maxCount); + $total = 0; + $i = 0; + + while ($i < $nbofloop) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id = $obj->rowid; + $objectstatic->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $result .= ''; + $result .= ''.$objectstatic->getNomUrl(1).''; + $result .= ''.$companystatic->getNomUrl(1, 'supplier', 24).''; + $result .= ''.price($obj->total_ttc).''; + $result .= ''; + + $i++; + $total += $obj->total_ttc; + } + + if ($num > $nbofloop) + { + $result .= ''; + $result .= ''.$langs->trans("XMoreLines", ($num - $nbofloop)).''; + $result .= ''; + } + elseif ($total > 0) + { + $result .= ''; + $result .= ''.$langs->trans("Total").''; + $result .= ''.price($total).''; + $result .= ''; + } + + $result .= ''; + $result .= '
'; + return $result; +} + +/** + * Return a HTML table that contains a list with latest edited supplier invoices + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the supplier with this id + * @return string A HTML table that contains a list with latest edited supplier invoices + */ +function getLatestEditTable($maxCount = 5, $socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT f.rowid, f.entity, f.ref, f.fk_statut as status, f.paye, s.nom as socname, s.rowid as socid, s.canvas, s.client,"; + $sql .= " f.datec"; + $sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f"; + $sql .= ", ".MAIN_DB_PREFIX."societe as s"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture_fourn').")"; + if ($socid) $sql .= " AND f.fk_soc = ".$socid; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + $sql .= " ORDER BY f.tms DESC"; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + + $result = '
'; + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
'.$langs->trans("BoxTitleLastSupplierBills", $maxCount).'
'; + $result .= '
'; + return $result; + } + + $objectstatic = new FactureFournisseur($db); + $companystatic = new Societe($db); + $formfile = new FormFile($db); + $i = 0; + + while ($i < $num) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id = $obj->rowid; + $objectstatic->ref = $obj->ref; + $objectstatic->paye = $obj->paye; + $objectstatic->statut = $obj->status; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $filename = dol_sanitizeFileName($obj->ref); + $filedir = $conf->propal->multidir_output[$obj->entity].'/'.$filename; + + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= '
'.$objectstatic->getNomUrl(1).' '.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'
'; + $result .= ''; + + $result .= ''.$companystatic->getNomUrl(1, 'supplier').''; + $result .= ''.dol_print_date($db->jdate($obj->datec), 'day').''; + $result .= ''.$objectstatic->getLibStatut(5).''; + + $result .= ''; + + $i++; + } + + $result .= ''; + $result .= '
'; + return $result; +} + +/** + * Return a HTML table that contains a list with open (unpaid) supplier invoices + * + * @param int $maxCount (Optional) The maximum count of elements inside the table + * @param int $socid (Optional) Show only results from the supplier with this id + * @return string A HTML table that conatins a list with open (unpaid) supplier invoices + */ +function getOpenTable($maxCount = 500, $socid = 0) +{ + global $conf, $db, $langs, $user; + + $sql = "SELECT s.nom as socname, s.rowid as socid, s.canvas, s.client"; + $sql .= ", f.rowid as id, f.entity, f.total_ttc, f.total_ht, f.ref, f.fk_statut"; + $sql .= ", f.datef as df, f.date_lim_reglement as datelimite"; + $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; + $sql .= ", ".MAIN_DB_PREFIX."facture_fourn as f"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE f.fk_soc = s.rowid"; + $sql .= " AND f.entity IN (".getEntity('facture_fourn').")"; + $sql .= " AND f.fk_statut = ".FactureFournisseur::STATUS_VALIDATED; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($socid) $sql .= " AND s.rowid = ".$socid; + $sql .= " ORDER BY f.rowid DESC"; + $sql .= $db->plimit($maxCount, 0); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + return ''; + } + + $num = $db->num_rows($resql); + + $result = '
'; + $result .= ''; + $result .= ''; + $result .= ''; + $result .= ''; + + if ($num < 1) + { + $result .= '
'; + $result .= $langs->trans("BillsCustomersUnpaid"); + $result .= ' '; + $result .= ''.$num.''; + $result .= ''; + $result .= '
'; + $result .= '
'; + return $result; + } + + $objectstatic = new FactureFournisseur($db); + $companystatic = new Societe($db); + $formfile = new FormFile($db); + $nbofloop = min($num, $maxCount); + $now = dol_now(); + $total = 0; + $i = 0; + + while ($i < $nbofloop) + { + $obj = $db->fetch_object($resql); + + $objectstatic->id = $obj->id; + $objectstatic->ref = $obj->ref; + + $companystatic->id = $obj->socid; + $companystatic->name = $obj->socname; + $companystatic->client = $obj->client; + $companystatic->canvas = $obj->canvas; + + $filename = dol_sanitizeFileName($obj->ref); + $filedir = $conf->propal->multidir_output[$obj->entity].'/'.$filename; + + $result .= ''; + + $result .= ''; + $result .= ''; + $result .= ''; + + $result .= ''; + $result .= ''; + + $result .= ''; + + $result .= ''; + $result .= '
'.$objectstatic->getNomUrl(1).''; + + if ($db->jdate($obj->dfv) < ($now - $conf->propal->cloture->warning_delay)) + { + $result .= img_warning($langs->trans("Late")); + } + + $result .= ''.$formfile->getDocumentsLink($objectstatic->element, $filename, $filedir).'
'; + $result .= ''; + + $result .= ''.$companystatic->getNomUrl(1, 'customer', 44).''; + $result .= ''.dol_print_date($db->jdate($obj->df), 'day').''; + $result .= ''.price($obj->total_ttc).''; + + $result .= ''; + + $i++; + $total += $obj->total_ttc; + } + + if ($num > $nbofloop) + { + $result .= ''; + $result .= ''.$langs->trans("XMoreLines", ($num - $nbofloop)).''; + $result .= ''; + } + elseif ($total > 0) + { + $result .= ''; + $result .= ''.$langs->trans("Total").''; + $result .= ''.price($total).''; + $result .= ' '; + $result .= ''; + } + + $result .= ''; + $result .= '
'; + return $result; +} diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 0ebfd024658..2a63e040434 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -49,7 +49,7 @@ if (!$user->rights->fournisseur->facture->lire) accessforbidden(); // Load translation files required by the page $langs->loadLangs(array('products', 'bills', 'companies', 'projects')); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $massaction = GETPOST('massaction', 'alpha'); $show_files = GETPOST('show_files', 'int'); $confirm = GETPOST('confirm', 'alpha'); @@ -67,7 +67,7 @@ if ($user->socid > 0) $socid = $user->socid; } -$mode = GETPOST("mode"); +$mode = GETPOST("mode", 'aZ09'); $search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_label = GETPOST("search_label", "alpha"); @@ -92,9 +92,10 @@ $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha'); $search_status = GETPOST('search_status', 'int'); $search_paymentmode = GETPOST('search_paymentmode', 'int'); +$search_paymentcond = GETPOST('search_paymentcond', 'int'); $search_town = GETPOST('search_town', 'alpha'); $search_zip = GETPOST('search_zip', 'alpha'); -$search_state = trim(GETPOST("search_state")); +$search_state = GETPOST("search_state"); $search_country = GETPOST("search_country", 'int'); $search_type_thirdparty = GETPOST("search_type_thirdparty", 'int'); $search_user = GETPOST('search_user', 'int'); @@ -165,12 +166,13 @@ $arrayfields = array( 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1), - 'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), - 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax1_assuj == "1"), - 'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax2_assuj == "1"), - 'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), + 'f.fk_cond_reglement'=>array('label'=>$langs->trans("PaymentTerm"), 'checked'=>1, 'position'=>50), + 'f.fk_mode_reglement'=>array('label'=>$langs->trans("PaymentMode"), 'checked'=>1, 'position'=>52), + 'f.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1, 'position'=>105), + 'f.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0, 'position'=>110), + 'f.total_localtax1'=>array('label'=>$langs->transcountry("AmountLT1", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax1_assuj == "1", 'position'=>95), + 'f.total_localtax2'=>array('label'=>$langs->transcountry("AmountLT2", $mysoc->country_code), 'checked'=>0, 'enabled'=>$mysoc->localtax2_assuj == "1", 'position'=>100), + 'f.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0, 'position'=>115), 'u.login'=>array('label'=>"Author", 'checked'=>1), 'dynamount_payed'=>array('label'=>$langs->trans("Payed"), 'checked'=>0), 'rtp'=>array('label'=>$langs->trans("Rest"), 'checked'=>0), @@ -240,6 +242,7 @@ if (empty($reshook)) $search_multicurrency_montant_ttc = ''; $search_status = ''; $search_paymentmode = ''; + $search_paymentcond = ''; $search_town = ''; $search_zip = ""; $search_state = ""; @@ -318,6 +321,7 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count if (!$search_all) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid'; if ($search_all || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_det as pd ON f.rowid=pd.fk_facture_fourn'; if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid'; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = f.fk_projet"; // We'll need this table joined to the select in order to filter by sale if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; @@ -326,7 +330,6 @@ if ($search_user > 0) $sql .= ", ".MAIN_DB_PREFIX."element_contact as ec"; $sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc"; } -$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid'; $sql .= ' WHERE f.fk_soc = s.rowid'; $sql .= ' AND f.entity IN ('.getEntity('facture_fourn').')'; if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; @@ -367,7 +370,8 @@ if ($search_multicurrency_montant_vat != '') $sql .= natural_search('f.multicurr if ($search_multicurrency_montant_ttc != '') $sql .= natural_search('f.multicurrency_total_ttc', $search_multicurrency_montant_ttc, 1); if ($search_login) $sql .= natural_search('u.login', $search_login); if ($search_status != '' && $search_status >= 0) $sql .= " AND f.fk_statut = ".$db->escape($search_status); -if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$search_paymentmode.""; +if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".((int) $search_paymentmode); +if ($search_paymentcond > 0) $sql .= " AND f.fk_cond_reglement = ".((int) $search_paymentcond); $sql .= dolSqlDateFilter("f.datef", $day, $month, $year); $sql .= dolSqlDateFilter("f.date_lim_reglement", $day_lim, $month_lim, $year_lim); if ($option == 'late') $sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'"; @@ -385,7 +389,7 @@ if ($filter && $filter != -1) $sql .= ' AND '.$db->escape(trim($filt[0])).' = '.$db->escape(trim($filt[1])); } } -if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$db->escape($search_sale); +if ($search_sale > 0) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".((int) $search_sale); if ($search_user > 0) { $sql .= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='invoice_supplier' AND tc.source='internal' AND ec.element_id = f.rowid AND ec.fk_socpeople = ".$search_user; @@ -415,9 +419,7 @@ if (!$search_all) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ",ef.".$key : ''); } } -} -else -{ +} else { $sql .= natural_search(array_keys($fieldstosearchall), $search_all); } @@ -510,11 +512,9 @@ if ($resql) if (in_array($massaction, array('presend', 'predelete', 'createbills'))) $arrayofmassactions = array(); $massactionbutton = $form->selectMassAction('', $arrayofmassactions); - $newcardbutton = ''; - if ($user->rights->fournisseur->facture->creer) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/fourn/facture/card.php?action=create'); - } + $url = DOL_URL_ROOT.'/fourn/facture/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewBill'), '', 'fa fa-plus-circle', $url, '', $user->rights->fournisseur->facture->creer); $i = 0; print '
'."\n"; @@ -599,7 +599,7 @@ if ($resql) $moreforfilter .= '
'; } // If the user can view prospects other than his' - if ($conf->categorie->enabled && ($user->rights->produit->lire || $user->rights->service->lire)) + if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) { include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $moreforfilter .= '
'; @@ -724,11 +724,18 @@ if ($resql) print $form->selectarray("search_type_thirdparty", $formcompany->typent_array(0), $search_type_thirdparty, 0, 0, 0, '', 0, 0, 0, (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT)); print ''; } + // Condition of payment + if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) + { + print ''; + $form->select_conditions_paiements($search_paymentcond, 'search_paymentcond', -1, 1, 1, 'maxwidth100'); + print ''; + } // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { print ''; - $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 10); + $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 20, 1, 'maxwidth100'); print ''; } if (!empty($arrayfields['f.total_ht']['checked'])) @@ -877,6 +884,7 @@ if ($resql) 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, '', $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['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['f.total_ht']['checked'])) print_liste_field_titre($arrayfields['f.total_ht']['label'], $_SERVER['PHP_SELF'], 'f.total_ht', '', $param, '', $sortfield, $sortorder, 'right '); if (!empty($arrayfields['f.total_vat']['checked'])) print_liste_field_titre($arrayfields['f.total_vat']['label'], $_SERVER['PHP_SELF'], 'f.tva', '', $param, '', $sortfield, $sortorder, 'right '); @@ -1100,6 +1108,14 @@ if ($resql) if (!$i) $totalarray['nbfield']++; } + // Payment condition + if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) + { + print ''; + $form->form_conditions_reglement($_SERVER['PHP_SELF'], $obj->fk_cond_reglement, 'none', '', -1); + print ''; + if (!$i) $totalarray['nbfield']++; + } // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { @@ -1302,9 +1318,7 @@ if ($resql) $title = ''; print $formfile->showdocuments('massfilesarea_supplier_invoice', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index 48d84a3161b..57a0cd103ab 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -37,7 +37,7 @@ $langs->loadLangs(array("bills", "companies")); $id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check if ($user->socid) $socid = $user->socid; diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index e26357bd4ca..8c2fdbdb5b6 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -129,7 +129,8 @@ if (empty($reshook)) $datepaye = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')); $paiement_id = 0; $totalpayment = 0; - $atleastonepaymentnotnull = 0; + $atleastonepaymentnotnull = 0; + $multicurrency_totalpayment = 0; // Generate payment array and check if there is payment higher than invoice and payment date before invoice date $tmpinvoice = new FactureFournisseur($db); @@ -138,7 +139,7 @@ if (empty($reshook)) if (substr($key, 0, 7) == 'amount_') { $cursorfacid = substr($key, 7); - $amounts[$cursorfacid] = price2num(trim(GETPOST($key))); + $amounts[$cursorfacid] = price2num(GETPOST($key)); if (!empty($amounts[$cursorfacid])) { $atleastonepaymentnotnull++; if (is_numeric($amounts[$cursorfacid])) { @@ -168,11 +169,10 @@ if (empty($reshook)) } $formquestion[$i++] = array('type' => 'hidden', 'name' => $key, 'value' => $_POST[$key]); - } - elseif (substr($key, 0, 21) == 'multicurrency_amount_') + } elseif (substr($key, 0, 21) == 'multicurrency_amount_') { $cursorfacid = substr($key, 21); - $multicurrency_amounts[$cursorfacid] = price2num(trim(GETPOST($key))); + $multicurrency_amounts[$cursorfacid] = (GETPOST($key) ? price2num(GETPOST($key)) : 0); $multicurrency_totalpayment += $multicurrency_amounts[$cursorfacid]; if (!empty($multicurrency_amounts[$cursorfacid])) $atleastonepaymentnotnull++; $result = $tmpinvoice->fetch($cursorfacid); @@ -301,9 +301,7 @@ if (empty($reshook)) $paiement->num_payment = GETPOST('num_paiement', 'alphanohtml'); $paiement->note_private = GETPOST('comment', 'alpha'); - $paiement->num_paiement = $paiement->num_payment; // For backward compatibility $paiement->num_payment = $paiement->num_payment; - $paiement->note = $paiement->note_private; // For backward compatibility $paiement->note_private = $paiement->note_private; if (!$error) @@ -345,9 +343,7 @@ if (empty($reshook)) else $loc = DOL_URL_ROOT.'/fourn/paiement/card.php?id='.$paiement_id; header('Location: '.$loc); exit; - } - else - { + } else { $db->rollback(); } } @@ -497,9 +493,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''.$langs->trans('Account').''; $form->select_comptes(empty($accountid) ? $obj->fk_account : $accountid, 'accountid', 0, '', 2); print ''; - } - else - { + } else { print ' '; } print ''.$langs->trans('Numero').''; @@ -531,9 +525,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($object->type != FactureFournisseur::TYPE_CREDIT_NOTE) { $sql .= ' AND f.type IN (0,1,3,5)'; // Standard invoice, replacement, deposit, situation - } - else - { + } else { $sql .= ' AND f.type = 2'; // If paying back a credit note, we show all credit notes } // Group by because we have a total @@ -627,9 +619,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie { print ''; print dol_print_date($db->jdate($objp->df), 'day').''; - } - else - { + } else { print '!!!'; } @@ -645,9 +635,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie } print ''; - } - else - { + } else { print '--'; } @@ -700,9 +688,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $remaintopay)."'"); print ''; print ''; - } - else - { + } else { print ''; print ''; } @@ -725,9 +711,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmout' data-rowname='".$namef."' data-value='".($sign * $multicurrency_remaintopay)."'"); print ''; print ''; - } - else - { + } else { print ''; print ''; } @@ -767,9 +751,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print "
"; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -802,259 +784,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie print ''; } - } - else dol_print_error($db); -} - -/* - * Show list - */ -if (empty($action) || $action == 'list') -{ - $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; - $sortfield = GETPOST("sortfield", 'alpha'); - $sortorder = GETPOST("sortorder", 'alpha'); - $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); - if (empty($page) || $page == -1) { $page = 0; } - $offset = $limit * $page; - $pageprev = $page - 1; - $pagenext = $page + 1; - if (!$sortorder) $sortorder = 'DESC'; - if (!$sortfield) $sortfield = 'p.datep'; - - $sql = 'SELECT p.rowid as pid, p.ref, p.datep as dp, p.amount as pamount, p.num_paiement,'; - $sql .= ' s.rowid as socid, s.nom as name,'; - $sql .= ' c.code as paiement_type, c.libelle as paiement_libelle,'; - $sql .= ' ba.rowid as bid, ba.label,'; - if (!$user->rights->societe->client->voir) $sql .= ' sc.fk_soc, sc.fk_user,'; - $sql .= ' SUM(pf.amount)'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn AS p'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn AS pf ON p.rowid=pf.fk_paiementfourn'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn AS f ON f.rowid=pf.fk_facturefourn'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement AS c ON p.fk_paiement = c.id'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON s.rowid = f.fk_soc'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; - if (!$user->rights->societe->client->voir) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql .= " WHERE f.entity = ".$conf->entity; - if (!$user->rights->societe->client->voir) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; - if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid; - $sql .= dolSqlDateFilter('p.datep', $day, $month, $year); - if ($search_ref) $sql .= natural_search('p.rowid', $search_ref); - if ($search_account > 0) $sql .= " AND b.fk_account=".$search_account; - if ($search_paymenttype != "") $sql .= " AND c.code='".$db->escape($search_paymenttype)."'"; - if ($search_payment_num != '') $sql .= natural_search('p.num_paiement', $search_payment_num); - if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1); - if ($search_company) $sql .= natural_search('s.nom', $search_company); - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; - $sql .= " GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.code, c.libelle, ba.rowid, ba.label"; - if (!$user->rights->societe->client->voir) $sql .= ", sc.fk_soc, sc.fk_user"; - // Add where from extra fields - - $sql .= $db->order($sortfield, $sortorder); - - $nbtotalofrecords = ''; - if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) - { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 - { - $page = 0; - $offset = 0; - } - } - - $sql .= $db->plimit($limit + 1, $offset); - - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; - - $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); - if ($day) $param .= ($day ? "&day=".urlencode($day) : ""); - if ($month) $param .= ($month ? "&month=".urlencode($month) : ""); - if ($year) $param .= ($year ? "&year=".urlencode($year) : ""); - if ($search_ref) $param .= ($search_ref ? "&search_ref=".urlencode($search_ref) : ""); - if ($search_company) $param .= ($search_company ? "&search_company=".urlencode($search_company) : ""); - if ($search_amount != '') $param .= ($search_amount ? "&search_amount=".urlencode($search_amount) : ""); - if ($search_payment_num) $param .= ($search_payment_num ? "&search_payment_num=".urlencode($search_payment_num) : ""); - if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - // Add $param from extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - - $massactionbutton = $form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); - - print '
'; - if ($optioncss != '') print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - - print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'supplier_invoice', 0, '', '', $limit, 0, 0, 1); - - $moreforfilter = ''; - - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook - if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; - else $moreforfilter = $hookmanager->resPrint; - - if ($moreforfilter) - { - print '
'; - print $moreforfilter; - print '
'; - } - - $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - - print '
'; - print ''."\n"; - - // Lines for filters fields - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if (!empty($conf->banque->enabled)) - { - print ''; - } - print ''; - print ''; - print "\n"; - - print ''; - print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], 'p.rowid', '', $param, '', $sortfield, $sortorder); - print_liste_field_titre("Date", $_SERVER["PHP_SELF"], 'dp', '', $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("ThirdParty", $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); - print_liste_field_titre("Type", $_SERVER["PHP_SELF"], 'c.libelle', '', $param, '', $sortfield, $sortorder); - print_liste_field_titre("Numero", $_SERVER["PHP_SELF"], "p.num_paiement", "", $param, "", $sortfield, $sortorder); - if (!empty($conf->banque->enabled)) - { - print_liste_field_titre("Account", $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); - } - print_liste_field_titre("Amount", $_SERVER["PHP_SELF"], 'p.amount', '', $param, '', $sortfield, $sortorder, 'right '); - - $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; - - print_liste_field_titre('', $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch '); - print "\n"; - - $paymentfournstatic = new PaiementFourn($db); - - $i = 0; - $totalarray = array(); - while ($i < min($num, $limit)) - { - $objp = $db->fetch_object($resql); - - $paymentfournstatic->id = $objp->pid; - $paymentfournstatic->ref = $objp->ref; - $paymentfournstatic->datepaye = $objp->dp; - - print ''; - - // Ref payment - print ''; - if (!$i) $totalarray['nbfield']++; - - // Date - $dateformatforpayment = 'day'; - if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour'; - print '\n"; - if (!$i) $totalarray['nbfield']++; - - // Thirdparty - print ''; - if (!$i) $totalarray['nbfield']++; - - // Type - $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != ("PaymentType".$objp->paiement_type) ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle; - print '\n"; - if (!$i) $totalarray['nbfield']++; - - // Payment number - print ''; - if (!$i) $totalarray['nbfield']++; - - // Account - if (!empty($conf->banque->enabled)) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - - // Amount - print ''; - if (!$i) $totalarray['nbfield']++; - if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 'amount'; - $totalarray['val']['amount'] += $objp->pamount; - - // Ref invoice - /*$invoicesupplierstatic->ref=$objp->ref_supplier; - $invoicesupplierstatic->id=$objp->facid; - print '';*/ - - print ''; - if (!$i) $totalarray['nbfield']++; - - print ''; - $i++; - } - - // Show total line - include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; - - print "
'; - print ''; - print ''; - if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; - print ''; - $formother->select_year($year ? $year : -1, 'year', 1, 20, 5); - print ''; - print ''; - print ''; - $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1); - print ''; - print ''; - print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1); - print ''; - print ''; - print ''; - $searchpicto = $form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print '
'; - print $paymentfournstatic->getNomUrl(1); - print ''.dol_print_date($db->jdate($objp->dp), $dateformatforpayment)."'; - if ($objp->socid) print ''.img_object($langs->trans('ShowCompany'), 'company').' '.dol_trunc($objp->name, 32).''; - else print ' '; - print ''.$payment_type.' '.dol_trunc($objp->num_paiement, 32)."'.$objp->num_paiement.''; - if ($objp->bid) print ''.img_object($langs->trans("ShowAccount"), 'account').' '.dol_trunc($objp->label, 24).''; - else print ' '; - print ''.price($objp->pamount).''; - print $invoicesupplierstatic->getNomUrl(1); - print '
"; - print "
"; - print "
\n"; - } - else - { - dol_print_error($db); - } + } else dol_print_error($db); } // End of page diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index f0bf2d85dd1..1c068e19b7d 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -1,5 +1,6 @@ + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -24,6 +25,7 @@ require '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/modules/rapport/pdf_paiement_fourn.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->loadLangs(array('bills')); @@ -45,7 +47,7 @@ if ($user->socid > 0) $dir = $conf->fournisseur->facture->dir_output.'/payments'; if (!$user->rights->societe->client->voir || $socid) $dir .= '/private/'.$user->id; // If user has no permission to see all, output dir is specific to user -$year = $_GET["year"]; +$year = GETPOST("year", 'int'); if (!$year) { $year = date("Y"); } @@ -67,17 +69,15 @@ if ($action == 'builddoc') // We save charset_output to restore it because write_file can change it if needed for // output format that does not support UTF8. $sav_charset_output = $outputlangs->charset_output; - if ($rap->write_file($dir, $_POST["remonth"], $_POST["reyear"], $outputlangs) > 0) + if ($rap->write_file($dir, GETPOST("remonth", 'int'), GETPOST("reyear", 'int'), $outputlangs) > 0) { $outputlangs->charset_output = $sav_charset_output; - } - else - { + } else { $outputlangs->charset_output = $sav_charset_output; dol_print_error($db, $obj->error); } - $year = $_POST["reyear"]; + $year = GETPOST("reyear", 'int'); } @@ -86,6 +86,7 @@ if ($action == 'builddoc') */ $formother = new FormOther($db); +$formfile = new FormFile($db); $titre = ($year ? $langs->trans("PaymentsReportsForYear", $year) : $langs->trans("PaymentsReports")); @@ -157,7 +158,7 @@ if ($year) { $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; - print ''.img_pdf().' '.$file.''; + print ''.img_pdf().' '.$file.''.$formfile->showPreview($file, 'facture_fournisseur', 'payments/'.$relativepath, 0).''; print ''.dol_print_size(dol_filesize($tfile)).''; print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; } diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 1b85082616a..0826a4ab200 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -59,9 +59,7 @@ foreach ($linkedObjectBlock as $key => $objectlink) // If not abandonned $total = $total + $sign * $objectlink->total_ht; echo price($objectlink->total_ht); - } - else - { + } else { echo ''.price($objectlink->total_ht).''; } } ?> diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index 31638abf848..5d82021bf3c 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -89,9 +89,7 @@ if ($resql) print ""; print "
\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -210,9 +208,7 @@ if ((!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SU print "
\n"; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } } @@ -264,9 +260,7 @@ if ($resql) print "\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index e100fb3631d..82c6e1d18d3 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -54,14 +54,12 @@ if ($action == 'setnote' && $user->rights->fournisseur->facture->creer) $db->begin(); $object->fetch($id); - $result = $object->update_note(GETPOST('note', 'none')); + $result = $object->update_note(GETPOST('note', 'restricthtml')); if ($result > 0) { $db->commit(); $action = ''; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -76,11 +74,9 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->fournisse if ($result > 0) { $db->commit(); - header('Location: '.DOL_URL_ROOT.'/fourn/facture/paiement.php'); + header('Location: '.DOL_URL_ROOT.'/fourn/paiement/list.php'); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -99,9 +95,7 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $db->commit(); header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); } @@ -114,9 +108,7 @@ if ($action == 'setnum_paiement' && !empty($_POST['num_paiement'])) if ($res === 0) { setEventMessages($langs->trans('PaymentNumberUpdateSucceeded'), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans('PaymentNumberUpdateFailed'), null, 'errors'); } } @@ -129,9 +121,7 @@ if ($action == 'setdatep' && !empty($_POST['datepday'])) if ($res === 0) { setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans('PaymentDateUpdateFailed'), null, 'errors'); } } @@ -176,7 +166,7 @@ if ($result > 0) print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_valide'); } - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref'); @@ -199,7 +189,7 @@ if ($result > 0) // Payment mode $labeltype = $langs->trans("PaymentType".$object->type_code) != ("PaymentType".$object->type_code) ? $langs->trans("PaymentType".$object->type_code) : $object->type_label; print ''.$langs->trans('PaymentMode').''.$labeltype; - print $object->num_paiement ? ' - '.$object->num_paiement : ''; + print $object->num_payment ? ' - '.$object->num_payment : ''; print ''; // Payment numero @@ -261,9 +251,10 @@ if ($result > 0) print '
'; /** - * Liste des factures + * List of vendor invoices */ - $sql = 'SELECT f.rowid, f.ref, f.ref_supplier, f.total_ttc, pf.amount, f.rowid as facid, f.paye, f.fk_statut, s.nom as name, s.rowid as socid'; + $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,'; + $sql .= ' pf.amount, s.nom as name, s.rowid as socid'; $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid'; $sql .= ' AND pf.fk_paiementfourn = '.$object->id; @@ -295,6 +286,13 @@ if ($result > 0) $facturestatic->id = $objp->facid; $facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid); + $facturestatic->date = $db->jdate($objp->date); + $facturestatic->type = $objp->type; + $facturestatic->total_ht = $objp->total_ht; + $facturestatic->total_tva = $objp->total_tva; + $facturestatic->total_ttc = $objp->total_ttc; + $facturestatic->statut = $objp->status; + $facturestatic->alreadypaid = -1; // unknown print ''; // Ref @@ -310,7 +308,7 @@ if ($result > 0) // Payed print ''.price($objp->amount).''; // Status - print ''.$facturestatic->LibStatut($objp->paye, $objp->fk_statut, 6, 1).''; + print ''.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).''; print "\n"; if ($objp->paye == 1) @@ -326,9 +324,7 @@ if ($result > 0) print "\n"; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -357,10 +353,8 @@ if ($result > 0) { if ($allow_delete) { - print ''.$langs->trans('Delete').''; - } - else - { + print ''.$langs->trans('Delete').''; + } else { print ''.$langs->trans('Delete').''; } } @@ -381,7 +375,7 @@ if ($result > 0) $urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id; $genallowed = $user->rights->fournisseur->facture->lire; $delallowed = $user->rights->fournisseur->facture->creer; - $modelpdf = (!empty($object->modelpdf) ? $object->modelpdf : (empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF) ? '' : $conf->global->SUPPLIER_PAYMENT_ADDON_PDF)); + $modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : (empty($conf->global->SUPPLIER_PAYMENT_ADDON_PDF) ? '' : $conf->global->SUPPLIER_PAYMENT_ADDON_PDF)); print $formfile->showdocuments('supplier_payment', $ref, $filedir, $urlsource, $genallowed, $delallowed, $modelpdf, 1, 0, 0, 40, 0, '', '', '', $societe->default_lang); $somethingshown = $formfile->numoffiles; @@ -397,9 +391,7 @@ if ($result > 0) */ print '
'; -} -else -{ +} else { $langs->load("errors"); print $langs->trans("ErrorRecordNotFound"); } diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php new file mode 100644 index 00000000000..0310a75fe57 --- /dev/null +++ b/htdocs/fourn/paiement/list.php @@ -0,0 +1,446 @@ + + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2004-2020 Laurent Destailleur + * Copyright (C) 2004 Christophe Combelles + * Copyright (C) 2005 Marc Barilley / Ocebo + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> + * Copyright (C) 2015 Marcos García + * Copyright (C) 2015 Juanjo Menent + * Copyright (C) 2017 Alexandre Spangaro + * Copyright (C) 2018 Frédéric France + * Copyright (C) 2020 Tobias Sekan + * + * 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 . + */ + +/** + * \file htdocs/fourn/paiment/list.php +* \ingroup fournisseur,facture + * \brief Payment list for supplier invoices + */ + +require '../../main.inc.php'; + +// Security check +if ($user->socid) $socid = $user->socid; + +// doesn't work :-( +// restrictedArea($user, 'fournisseur'); + +// doesn't work :-( +// require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +// $object = new PaiementFourn($db); +// restrictedArea($user, $object->element); + +if (!$user->rights->fournisseur->facture->lire) { + accessforbidden(); +} + +require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; + + +// Load translation files required by the page +$langs->loadLangs(array('companies', 'bills', 'banks', 'compta')); + +$action = GETPOST('action', 'alpha'); +$massaction = GETPOST('massaction', 'alpha'); +$optioncss = GETPOST('optioncss', 'alpha'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'vendorpaymentlist'; + +$socid = GETPOST('socid', 'int'); + +$search_ref = GETPOST('search_ref', 'alpha'); +$search_day = GETPOST('search_day', 'int'); +$search_month = GETPOST('search_month', 'int'); +$search_year = GETPOST('search_year', 'int'); +$search_company = GETPOST('search_company', 'alpha'); +$search_payment_type = GETPOST('search_payment_type'); +$search_cheque_num = GETPOST('search_cheque_num', 'alpha'); +$search_bank_account = GETPOST('search_bank_account', 'int'); +$search_amount = GETPOST('search_amount', 'alpha'); // alpha because we must be able to search on '< x' + +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST('page', 'int'); + +if (empty($page) || $page == -1) $page = 0; // If $page is not defined, or '' or -1 +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; + +if (!$sortorder) $sortorder = "DESC"; +if (!$sortfield) $sortfield = "p.datep"; + +$search_all = trim(GETPOSTISSET("search_all") ? GETPOSTISSET("search_all", 'alpha') : GETPOST('sall')); + +// List of fields to search into when doing a "search in all" +$fieldstosearchall = array( + 'p.ref'=>"RefPayment", + 's.nom'=>"ThirdParty", + 'p.num_paiement'=>"Numero", + 'p.amount'=>"Amount", +); + +$arrayfields = array( + 'p.ref' =>array('label'=>"RefPayment", 'checked'=>1, 'position'=>10), + 'p.datep' =>array('label'=>"Date", 'checked'=>1, 'position'=>20), + 's.nom' =>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>30), + 'c.libelle' =>array('label'=>"Type", 'checked'=>1, 'position'=>40), + 'p.num_paiement' =>array('label'=>"Numero", 'checked'=>1, 'position'=>50, 'tooltip'=>"ChequeOrTransferNumber"), + 'ba.label' =>array('label'=>"Account", 'checked'=>1, 'position'=>60, 'enable'=>(!empty($conf->banque->enabled))), + 'p.amount' =>array('label'=>"Amount", 'checked'=>1, 'position'=>70), +); +$arrayfields = dol_sort_array($arrayfields, 'position'); + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('paymentsupplierlist')); +$object = new PaiementFourn($db); + +/* +* Actions +*/ + +$parameters = array('socid'=>$socid); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) { + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers + $search_ref = ''; + $search_day = ''; + $search_month = ''; + $search_year = ''; + $search_company = ''; + $search_payment_type = ''; + $search_cheque_num = ''; + $search_bank_account = ''; + $search_amount = ''; + } +} + +/* + * View + */ + +llxHeader('', $langs->trans('ListPayment')); + +$form = new Form($db); +$formother = new FormOther($db); +$companystatic = new Societe($db); +$paymentfournstatic = new PaiementFourn($db); + +$sql = 'SELECT p.rowid, p.ref, p.datep, p.amount as pamount, p.num_paiement'; +$sql .= ', s.rowid as socid, s.nom as name, s.email'; +$sql .= ', c.code as paiement_type, c.libelle as paiement_libelle'; +$sql .= ', ba.rowid as bid, ba.label'; +if (!$user->rights->societe->client->voir) $sql .= ', sc.fk_soc, sc.fk_user'; +$sql .= ', SUM(pf.amount)'; + +$sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn AS p'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn AS pf ON p.rowid=pf.fk_paiementfourn'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn AS f ON f.rowid=pf.fk_facturefourn'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_paiement AS c ON p.fk_paiement = c.id'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe AS s ON s.rowid = f.fk_soc'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON p.fk_bank = b.rowid'; +$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank_account as ba ON b.fk_account = ba.rowid'; +if (!$user->rights->societe->client->voir) $sql .= ', '.MAIN_DB_PREFIX.'societe_commerciaux as sc'; + +$sql .= ' WHERE f.entity = '.$conf->entity; +if (!$user->rights->societe->client->voir) $sql .= ' AND s.rowid = sc.fk_soc AND sc.fk_user = '.$user->id; +if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid; +if ($search_ref) $sql .= natural_search('p.ref', $search_ref); +$sql .= dolSqlDateFilter('p.datep', $search_day, $search_month, $search_year); +if ($search_company) $sql .= natural_search('s.nom', $search_company); +if ($search_payment_type != '') $sql .= " AND c.code='".$db->escape($search_payment_type)."'"; +if ($search_cheque_num != '') $sql .= natural_search('p.num_paiement', $search_cheque_num); +if ($search_amount) $sql .= natural_search('p.amount', $search_amount, 1); +if ($search_bank_account > 0) $sql .= ' AND b.fk_account='.$search_bank_account."'"; + +if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); + +// Add where from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; + +$sql .= ' GROUP BY p.rowid, p.datep, p.amount, p.num_paiement, s.rowid, s.nom, c.code, c.libelle, ba.rowid, ba.label'; +if (!$user->rights->societe->client->voir) $sql .= ', sc.fk_soc, sc.fk_user'; + +$sql .= $db->order($sortfield, $sortorder); + +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 + $page = 0; + $offset = 0; + } +} + +$sql .= $db->plimit($limit + 1, $offset); + +$resql = $db->query($sql); +if (!$resql) { + dol_print_error($db); + llxFooter(); + $db->close(); + exit; +} + +$num = $db->num_rows($resql); +$i = 0; + +$param = ''; +if (!empty($contextpage) && $contextpage != $_SERVER['PHP_SELF']) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); + +if ($search_ref) $param .= '&search_ref='.urlencode($search_ref); +if ($saerch_day) $param .= '&search_day='.urlencode($search_day); +if ($saerch_month) $param .= '&search_month='.urlencode($search_month); +if ($search_year) $param .= '&search_year='.urlencode($search_year); +if ($search_company) $param .= '&search_company='.urlencode($search_company); +if ($search_payment_type) $param .= '&search_company='.urlencode($search_payment_type); +if ($search_cheque_num) $param .= '&search_cheque_num='.urlencode($search_cheque_num); +if ($search_amount) $param .= '&search_amount='.urlencode($search_amount); + +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; + +print '
'; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'supplier_invoice', 0, '', '', $limit, 0, 0, 1); + +if ($search_all) +{ + foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + print '
'.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
'; +} + +$moreforfilter = ''; + +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; +else $moreforfilter = $hookmanager->resPrint; + +if ($moreforfilter) { + print '
'; + print $moreforfilter; + print '
'; +} + +$varpage = empty($contextpage) ? $_SERVER['PHP_SELF'] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +if ($massactionbutton) $selectedfields .= $form->showCheckAddButtons('checkforselect', 1); + +print '
'; +print ''; + +print ''; + +// Filter: Ref +if (!empty($arrayfields['p.ref']['checked'])) { + print ''; +} + +// Filter: Date +if (!empty($arrayfields['p.datep']['checked'])) { + print ''; +} + +// Filter: Thirdparty +if (!empty($arrayfields['s.nom']['checked'])) { + print ''; +} + +// Filter: Payment type +if (!empty($arrayfields['c.libelle']['checked'])) { + print ''; +} + +// Filter: Cheque number (fund transfer) +if (!empty($arrayfields['p.num_paiement']['checked'])) { + print ''; +} + +// Filter: Bank account +if (!empty($arrayfields['ba.label']['checked'])) { + print ''; +} + +// Filter: Amount +if (!empty($arrayfields['p.amount']['checked'])) { + print ''; +} + +// Fields from hook +$parameters = array('arrayfields'=>$arrayfields); +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +// Buttons +print ''; + +print ''; + +print ''; +if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) print_liste_field_titre('#', $_SERVER['PHP_SELF'], '', '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.rowid', '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.datep']['checked'])) print_liste_field_titre($arrayfields['p.datep']['label'], $_SERVER["PHP_SELF"], 'p.datep', '', $param, '', $sortfield, $sortorder, 'center '); +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['c.libelle']['checked'])) print_liste_field_titre($arrayfields['c.libelle']['label'], $_SERVER["PHP_SELF"], 'c.libelle', '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.num_paiement']['checked'])) print_liste_field_titre($arrayfields['p.num_paiement']['label'], $_SERVER["PHP_SELF"], "p.num_paiement", '', $param, '', $sortfield, $sortorder, '', $arrayfields['p.num_paiement']['tooltip']); +if (!empty($arrayfields['ba.label']['checked'])) print_liste_field_titre($arrayfields['ba.label']['label'], $_SERVER["PHP_SELF"], 'ba.label', '', $param, '', $sortfield, $sortorder); +if (!empty($arrayfields['p.amount']['checked'])) print_liste_field_titre($arrayfields['p.amount']['label'], $_SERVER["PHP_SELF"], 'p.amount', '', $param, '', $sortfield, $sortorder, 'right '); + +// 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; + +print_liste_field_titre($selectedfields, $_SERVER['PHP_SELF'], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch '); +print ''; + +$checkedCount = 0; +foreach ($arrayfields as $column) { + if ($column['checked']) { + $checkedCount++; + } +} + +$i = 0; +$totalarray = array(); +while ($i < min($num, $limit)) { + $objp = $db->fetch_object($resql); + + $paymentfournstatic->id = $objp->rowid; + $paymentfournstatic->ref = $objp->ref; + $paymentfournstatic->datepaye = $objp->datep; + + $companystatic->id = $objp->socid; + $companystatic->name = $objp->name; + $companystatic->email = $objp->email; + + print ''; + + // No + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER_IN_LIST)) { + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Ref + if (!empty($arrayfields['p.ref']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Date + if (!empty($arrayfields['p.datep']['checked'])) { + $dateformatforpayment = 'day'; + if (!empty($conf->global->INVOICE_USE_HOURS_FOR_PAYMENT)) $dateformatforpayment = 'dayhour'; + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Thirdparty + if (!empty($arrayfields['s.nom']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Pyament type + if (!empty($arrayfields['c.libelle']['checked'])) { + $payment_type = $langs->trans("PaymentType".$objp->paiement_type) != ("PaymentType".$objp->paiement_type) ? $langs->trans("PaymentType".$objp->paiement_type) : $objp->paiement_libelle; + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Cheque number (fund transfer) + if (!empty($arrayfields['p.num_paiement']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Account + if (!empty($arrayfields['ba.label']['checked'])) + { + print ''; + if (!$i) $totalarray['nbfield']++; + } + + // Amount + if (!empty($arrayfields['p.amount']['checked'])) { + print ''; + if (!$i) $totalarray['nbfield']++; + $totalarray['pos'][$checkedCount] = 'amount'; + $totalarray['val']['amount'] += $objp->pamount; + } + + // Buttons + print ''; + if (!$i) $totalarray['nbfield']++; + + print ''; + $i++; +} + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +print '
'; + print ''; + print ''; + if (!empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; + print ''; + $formother->select_year($search_year ? $search_year : -1, 'search_year', 1, 20, 5); + print ''; + print ''; + print ''; + $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1); + print ''; + print ''; + print ''; + $form->select_comptes($search_bank_account, 'search_bank_account', 0, '', 1); + print ''; + print ''; + print ''; +print $form->showFilterAndCheckAddButtons(0); +print '
'.(($offset * $limit) + $i).''.$paymentfournstatic->getNomUrl(1).''.dol_print_date($db->jdate($objp->datep), $dateformatforpayment).''; + if ($objp->socid > 0) { + print $companystatic->getNomUrl(1, '', 24); + } + print ''.$payment_type.' '.dol_trunc($objp->num_paiement, 32).''.$objp->num_paiement.''; + if ($objp->bid) print ''.img_object($langs->trans("ShowAccount"), 'account').' '.dol_trunc($objp->label, 24).''; + else print ' '; + print ''.price($objp->pamount).'
'; +print '
'; +print '
'; + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index 5e83ae93923..e3d2b5b91d2 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -43,8 +43,8 @@ $optioncss = GETPOST('optioncss', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -127,7 +127,7 @@ if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = $massactionbutton = $form->selectMassAction('', $arrayofmassactions); -$sql = "SELECT p.rowid, p.label, p.ref, p.fk_product_type, p.entity,"; +$sql = "SELECT p.rowid, p.label, p.ref, p.fk_product_type, p.entity, tosell, tobuy,"; $sql .= " ppf.fk_soc, ppf.ref_fourn, ppf.price as price, ppf.quantity as qty, ppf.unitprice,"; $sql .= " s.rowid as socid, s.nom as name"; // Add fields to SELECT from hooks @@ -296,6 +296,8 @@ if ($resql) $productstatic->ref = $objp->ref; $productstatic->type = $objp->fk_product_type; $productstatic->entity = $objp->entity; + $productstatic->status = $objp->tosell; + $productstatic->status_buy = $objp->tobuy; print $productstatic->getNomUrl(1, 'supplier'); print ''; @@ -331,9 +333,7 @@ if ($resql) print ""; print ''; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index 8cda5a20d98..540ed1cbc18 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -173,23 +173,17 @@ if ($socid > 0) } $db->free($resqlp); - } - else - { + } else { dol_print_error($db); } } - } - else - { + } else { dol_print_error($db); } print ""; } -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index 39f5cc61bd2..70a96546fc2 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -33,7 +33,7 @@ if (!$user->admin) accessforbidden(); $def = array(); $lastftpentry = 0; -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $entry = GETPOST('numero_entry', 'alpha'); @@ -50,9 +50,7 @@ if ($result) $obj = $db->fetch_object($result); preg_match('/([0-9]+)$/i', $obj->name, $reg); if ($reg[1]) $lastftpentry = $reg[1]; -} -else -{ +} else { dol_print_error($db); } @@ -96,9 +94,7 @@ if ($action == 'add' || GETPOST('modify', 'alpha')) $db->commit(); header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -123,9 +119,7 @@ if (GETPOST('delete', 'alpha')) $db->commit(); header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -148,9 +142,7 @@ print '
'; if (!function_exists('ftp_connect')) { print $langs->trans("FTPFeatureNotSupportedByYourPHP"); -} -else -{ +} else { // Formulaire ajout print '
'; print ''; @@ -300,9 +292,7 @@ else $i++; } - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 0c7f8409992..7c0eab0f352 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -87,7 +87,7 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; - $result = $ecmdir->fetch($_REQUEST["section"]); + $result = $ecmdir->fetch(GETPOST("section", 'int')); if (!$result > 0) { dol_print_error($db, $ecmdir->error); @@ -102,8 +102,7 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) if (is_numeric($resupload) && $resupload > 0) { $result = $ecmdir->changeNbOfFiles('+'); - } - else { + } else { $langs->load("errors"); if ($resupload < 0) // Unknown error { @@ -111,15 +110,12 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) } elseif (preg_match('/ErrorFileIsInfectedWithAVirus/', $resupload)) { // Files infected by a virus setEventMessages($langs->trans("ErrorFileIsInfectedWithAVirus"), null, 'errors'); - } - else // Known error + } else // Known error { setEventMessages($langs->trans($resupload), null, 'errors'); } } - } - else - { + } else { // Echec transfert (fichier depassant la limite ?) $langs->load("errors"); setEventMessages($langs->trans("ErrorFailToCreateDir", $upload_dir), null, 'errors'); @@ -129,25 +125,23 @@ if (GETPOST("sendit") && !empty($conf->global->MAIN_UPLOAD_DOC)) // Action ajout d'un rep if ($action == 'add' && $user->rights->ftp->setup) { - $ecmdir->ref = $_POST["ref"]; - $ecmdir->label = $_POST["label"]; - $ecmdir->description = $_POST["desc"]; + $ecmdir->ref = GETPOST("ref"); + $ecmdir->label = GETPOST("label"); + $ecmdir->description = GETPOST("desc"); $id = $ecmdir->create($user); if ($id > 0) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { setEventMessages($langs->trans("ErrorFailToCreateDir"), null, 'errors'); $action = "create"; } } -// Remove file -if ($action == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes') +// Remove 1 file +if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') { // set up a connection or die if (!$conn_id) @@ -161,22 +155,30 @@ if ($action == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes') if ($conn_id && $ok && !$mesg) { + $newsection = $section; + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) + { + $newsection = ssh2_sftp_realpath($conn_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 + } + $langs->load("other"); // Remote file $filename = $file; - $remotefile = $section.(preg_match('@[\\\/]$@', $section) ? '' : '/').$file; + $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); //print "x".$newremotefileiso; dol_syslog("ftp/index.php ftp_delete ".$newremotefileiso); - $result = @ftp_delete($conn_id, $newremotefileiso); + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + $result = ssh2_sftp_unlink($conn_id, $newremotefileiso); + } else { + $result = @ftp_delete($conn_id, $newremotefileiso); + } if ($result) { setEventMessages($langs->trans("FileWasRemoved", $file), null, 'mesgs'); - } - else - { + } else { dol_syslog("ftp/index.php ftp_delete", LOG_ERR); setEventMessages($langs->trans("FTPFailedToRemoveFile", $file), null, 'errors'); } @@ -184,15 +186,13 @@ if ($action == 'confirm_deletefile' && $_REQUEST['confirm'] == 'yes') //ftp_close($conn_id); Close later $action = ''; - } - else - { + } else { dol_print_error('', $mesg); } } // Delete several lines at once -if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("Delete")) +if (GETPOST("const", 'array') && GETPOST("delete") && GETPOST("delete") == $langs->trans("Delete")) { // set up a connection or die if (!$conn_id) @@ -206,7 +206,7 @@ if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("De if ($conn_id && $ok && !$mesg) { - foreach ($_POST["const"] as $const) + foreach (GETPOST('const', 'array') as $const) { if ($const["check"]) // Is checkbox checked { @@ -214,20 +214,26 @@ if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("De // Remote file $file = $const["file"]; - $section = $const["section"]; - $remotefile = $section.(preg_match('@[\\\/]$@', $section) ? '' : '/').$file; + $newsection = $const["section"]; + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) + { + $newsection = ssh2_sftp_realpath($conn_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 + } + $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); //print "x".$newremotefileiso; - dol_syslog("ftp/index.php ftp_delete ".$newremotefileiso); - $result = @ftp_delete($conn_id, $newremotefileiso); + dol_syslog("ftp/index.php ftp_delete n files for ".$newremotefileiso); + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + $result = ssh2_sftp_unlink($conn_id, $newremotefileiso); + } else { + $result = @ftp_delete($conn_id, $newremotefileiso); + } if ($result) { setEventMessages($langs->trans("FileWasRemoved", $file), null, 'mesgs'); - } - else - { - dol_syslog("ftp/index.php ftp_delete", LOG_ERR); + } else { + dol_syslog("ftp/index.php ftp_delete n files", LOG_ERR); setEventMessages($langs->trans("FTPFailedToRemoveFile", $file), null, 'errors'); } @@ -236,9 +242,7 @@ if ($_POST["const"] && $_POST["delete"] && $_POST["delete"] == $langs->trans("De $action = ''; } } - } - else - { + } else { dol_print_error('', $mesg); } } @@ -258,27 +262,33 @@ if ($action == 'confirm_deletesection' && $confirm == 'yes') if ($conn_id && $ok && !$mesg) { + $newsection = $section; + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) + { + $newsection = ssh2_sftp_realpath($conn_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 + } + // Remote file $filename = $file; - $remotefile = $section.(preg_match('@[\\\/]$@', $section) ? '' : '/').$file; + $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); - $result = @ftp_rmdir($conn_id, $newremotefileiso); + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + $result = ssh2_sftp_rmdir($conn_id, $newremotefileiso); + } else { + $result = @ftp_rmdir($conn_id, $newremotefileiso); + } if ($result) { setEventMessages($langs->trans("DirWasRemoved", $file), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("FTPFailedToRemoveDir", $file), null, 'errors'); } //ftp_close($conn_id); Close later $action = ''; - } - else - { + } else { dol_print_error('', $mesg); } } @@ -301,12 +311,22 @@ if ($action == 'download') // Local file $localfile = tempnam($download_dir, 'dol_'); + $newsection = $section; + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) + { + $newsection = ssh2_sftp_realpath($conn_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 + } + // Remote file $filename = $file; - $remotefile = $section.(preg_match('@[\\\/]$@', $section) ? '' : '/').$file; + $remotefile = $newsection.(preg_match('@[\\\/]$@', $newsection) ? '' : '/').$file; $newremotefileiso = utf8_decode($remotefile); - $result = ftp_get($conn_id, $localfile, $newremotefileiso, FTP_BINARY); + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + $result = fopen('ssh2.sftp://' . intval($conn_id) . $newremotefileiso, 'r'); + } else { + $result = ftp_get($conn_id, $localfile, $newremotefileiso, FTP_BINARY); + } if ($result) { if (!empty($conf->global->MAIN_UMASK)) @@ -314,13 +334,13 @@ if ($action == 'download') // Define mime type $type = 'application/octet-stream'; - if (!empty($_GET["type"])) $type = $_GET["type"]; - else $type = dol_mimetype($original_file); + if (GETPOSTISSET("type")) $type = GETPOST("type"); + else $type = dol_mimetype($file); // Define attachment (attachment=true to force choice popup 'open'/'save as') $attachment = true; - if ($encoding) header('Content-Encoding: '.$encoding); + //if ($encoding) header('Content-Encoding: '.$encoding); if ($type) header('Content-Type: '.$type); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"'); else header('Content-Disposition: inline; filename="'.$filename.'"'); @@ -334,14 +354,10 @@ if ($action == 'download') ftp_close($conn_id); exit; - } - else - { + } else { setEventMessages($langs->transnoentitiesnoconv('FailedToGetFile', $remotefile), null, 'errors'); } - } - else - { + } else { dol_print_error('', $mesg); } @@ -398,21 +414,19 @@ print $langs->trans("FTPAreaDesc")."
"; if (!function_exists('ftp_connect')) { print $langs->trans("FTPFeatureNotSupportedByYourPHP"); -} -else -{ +} else { if (!empty($ftp_server)) { // Confirm remove file if ($action == 'delete') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode(GETPOST('section')).'&file='.urlencode(GETPOST('file')), $langs->trans('DeleteFile'), $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile', '', '', 1); } // Confirmation de la suppression d'une ligne categorie if ($action == 'delete_section') { - print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode($_REQUEST["section"]).'&file='.urlencode($_GET["file"]), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $ecmdir->label), 'confirm_deletesection', '', '', 1); + print $form->formconfirm($_SERVER["PHP_SELF"].'?numero_ftp='.$numero_ftp.'§ion='.urlencode(GETPOST('section')).'&file='.urlencode(GETPOST('file')), $langs->trans('DeleteSection'), $langs->trans('ConfirmDeleteSection', $ecmdir->label), 'confirm_deletesection', '', '', 1); } print $langs->trans("Server").': '.$ftp_server.'
'; @@ -455,12 +469,12 @@ else print ''."\n"; print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; print ''; // Size @@ -581,25 +595,22 @@ else print $vals[0]; print ''; // Action - print ''; + print '
'.$langs->trans("Content").''.$langs->trans("Size").''.$langs->trans("Date").''.$langs->trans("Owner").''.$langs->trans("Group").''.$langs->trans("Permissions").''.$langs->trans("Content").''.$langs->trans("Size").''.$langs->trans("Date").''.$langs->trans("Owner").''.$langs->trans("Group").''.$langs->trans("Permissions").''; if ($conf->use_javascript_ajax) print ''.$langs->trans("All").' / '.$langs->trans("None").' '; print ''.img_picto($langs->trans("Refresh"), 'refresh').' '; @@ -488,18 +502,20 @@ else // List content of directory ($newsection = '/', '/home', ...) if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { - if ($newsection == '/') $newsection = '/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 + if ($newsection == '/') { + //$newsection = '/./'; + $newsection = ssh2_sftp_realpath($conn_id, ".").'/./'; // workaround for bug https://bugs.php.net/bug.php?id=64169 + } + //$newsection='/'; //$dirHandle = opendir("ssh2.sftp://$conn_id".$newsection); - //var_dump($dirHandle); - $contents = scandir('ssh2.sftp://'.$conn_id.$newsection); + //$dirHandle = opendir("ssh2.sftp://".intval($conn_id).ssh2_sftp_realpath($conn_id, ".").'/./'); + $contents = scandir('ssh2.sftp://'.intval($conn_id).$newsection); $buff = array(); foreach ($contents as $i => $key) { $buff[$i] = "---------- - root root 1234 Aug 01 2000 ".$key; } - } - else - { + } else { $buff = ftp_rawlist($conn_id, $newsectioniso); $contents = ftp_nlist($conn_id, $newsectioniso); // Sometimes rawlist fails but never nlist //var_dump($contents); @@ -534,9 +550,7 @@ else { if (preg_match('/^d/', $vals[0])) $is_directory = 1; if (preg_match('/^l/', $vals[0])) $is_link = 1; - } - else - { + } else { // Remote file $filename = $file; //print "section=".$section.' file='.$file.'X'; @@ -556,7 +570,7 @@ else $newsection = $section.(preg_match('@[\\\/]$@', $section) ? '' : '/').$file; $newsection = preg_replace('@[\\\/][^\\\/]+[\\\/]\.\.$@', '/', $newsection); // Change aaa/xxx/.. to new aaa if ($is_directory) print ''; - print $file; + print dol_escape_htmltag($file); if ($is_directory) print ''; print ''; + print ''; if ($is_directory) { - if ($file != '..') print ''.img_delete().''; + if ($file != '..') print ''.img_delete().''; else print ' '; - } - elseif ($is_link) + } elseif ($is_link) { $newfile = $file; $newfile = preg_replace('/ ->.*/', '', $newfile); - print ''.img_delete().''; - } - else - { - print ''.img_picto('', 'file').''; + print ''.img_delete().''; + } else { + print ''.img_picto('', 'file').''; print '   '; print ''; print '   '; - print ''.img_delete().''; + print ''.img_delete().''; print ''; print ''; } @@ -635,9 +646,7 @@ else print ''; print ""; - } - else - { + } else { $foundsetup = false; $MAXFTP = 20; $i = 1; @@ -655,9 +664,7 @@ else if (!$foundsetup) { print $langs->trans("SetupOfFTPClientModuleNotComplete"); - } - else - { + } else { print $langs->trans("ChooseAFTPEntryIntoMenu"); } } @@ -670,13 +677,10 @@ if ($conn_id) { if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { - } - elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) + } elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) { ftp_close($conn_id); - } - else - { + } else { ftp_close($conn_id); } } @@ -714,18 +718,13 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect if ($ok) { $connecttimeout = (empty($conf->global->FTP_CONNECT_TIMEOUT) ? 40 : $conf->global->FTP_CONNECT_TIMEOUT); - if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) - { + if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { dol_syslog('Try to connect with ssh2_ftp'); $tmp_conn_id = ssh2_connect($ftp_server, $ftp_port); - } - elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) - { + } elseif (!empty($conf->global->FTP_CONNECT_WITH_SSL)) { dol_syslog('Try to connect with ftp_ssl_connect'); $conn_id = ftp_ssl_connect($ftp_server, $ftp_port, $connecttimeout); - } - else - { + } else { dol_syslog('Try to connect with ftp_connect'); $conn_id = ftp_connect($ftp_server, $ftp_port, $connecttimeout); } @@ -735,6 +734,7 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect { if (!empty($conf->global->FTP_CONNECT_WITH_SFTP)) { + dol_syslog('Try to authenticate with ssh2_auth_password'); if (ssh2_auth_password($tmp_conn_id, $ftp_user, $ftp_password)) { // Turn on passive mode transfers (must be after a successful login @@ -746,20 +746,18 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect $conn_id = ssh2_sftp($tmp_conn_id); if (!$conn_id) { + dol_syslog('Failed to connect to SFTP after sssh authentication', LOG_DEBUG); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToSFTPAfterSSHAuthentication"); $ok = 0; $error++; } - } - else - { + } else { + dol_syslog('Failed to connect to FTP with login '.$ftp_user, LOG_DEBUG); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServerWithCredentials"); $ok = 0; $error++; } - } - else - { + } else { if (ftp_login($conn_id, $ftp_user, $ftp_password)) { // Turn on passive mode transfers (must be after a successful login @@ -768,18 +766,14 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect // Change the dir $newsectioniso = utf8_decode($section); ftp_chdir($conn_id, $newsectioniso); - } - else - { + } else { $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServerWithCredentials"); $ok = 0; $error++; } } } - } - else - { + } else { dol_syslog('FailedToConnectToFTPServer '.$ftp_server.' '.$ftp_port, LOG_ERR); $mesg = $langs->transnoentitiesnoconv("FailedToConnectToFTPServer", $ftp_server, $ftp_port); $ok = 0; @@ -804,9 +798,7 @@ function ftp_isdir($connect_id, $dir) { ftp_cdup($connect_id); return 1; - } - else - { + } else { return 0; } } diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 692b9639805..47f7744c5ae 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -69,20 +69,21 @@ $extrafields->fetch_name_optionals_label($object->table_element); if (($id > 0) || $ref) { - $object->fetch($id, $ref); + $object->fetch($id, $ref); - // Check current user can read this leave request - $canread = 0; - if (!empty($user->rights->holiday->read_all)) $canread = 1; - if (!empty($user->rights->holiday->read) && in_array($object->fk_user, $childids)) $canread = 1; - if (!$canread) - { - accessforbidden(); - } + // Check current user can read this leave request + $canread = 0; + if (!empty($user->rights->holiday->read_all)) $canread = 1; + if (!empty($user->rights->holiday->read) && in_array($object->fk_user, $childids)) $canread = 1; + if (!$canread) + { + accessforbidden(); + } } $cancreate = 0; -if (!empty($user->rights->holiday->write_all)) $cancreate = 1; + +if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)) $cancreate = 1; if (!empty($user->rights->holiday->write) && in_array($fuserid, $childids)) $cancreate = 1; $candelete = 0; @@ -111,156 +112,166 @@ if (empty($reshook)) header("Location: ".$backtopage); exit; } - $action = ''; + $action = ''; } - // If create a request - if ($action == 'create') + // Add leave request + if ($action == 'add') { - // If no right to create a request - if (!$cancreate) - { - $error++; - setEventMessages($langs->trans('CantCreateCP'), null, 'errors'); - $action = 'request'; - } + // If no right to create a request + if (!$cancreate) + { + $error++; + setEventMessages($langs->trans('CantCreateCP'), null, 'errors'); + $action = 'create'; + } - if (!$error) - { - $object = new Holiday($db); + if (!$error) + { + $object = new Holiday($db); - $db->begin(); + $db->begin(); - $date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year')); - $date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year')); - $date_debut_gmt = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'), 1); - $date_fin_gmt = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'), 1); - $starthalfday = GETPOST('starthalfday'); - $endhalfday = GETPOST('endhalfday'); - $type = GETPOST('type'); - $halfday = 0; - if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday = 2; - elseif ($starthalfday == 'afternoon') $halfday = -1; - elseif ($endhalfday == 'morning') $halfday = 1; + $date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year')); + $date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year')); + $date_debut_gmt = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'), 1); + $date_fin_gmt = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'), 1); + $starthalfday = GETPOST('starthalfday'); + $endhalfday = GETPOST('endhalfday'); + $type = GETPOST('type'); + $halfday = 0; + if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday = 2; + elseif ($starthalfday == 'afternoon') $halfday = -1; + elseif ($endhalfday == 'morning') $halfday = 1; - $valideur = GETPOST('valideur', 'int'); - $description = trim(GETPOST('description')); + $valideur = GETPOST('valideur', 'int'); + $description = trim(GETPOST('description', 'restricthtml')); - // If no type - if ($type <= 0) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); - $error++; - $action = 'create'; - } + // Check that leave is for a user inside the hierarchy or advanced permission for all is set + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) { + $error++; + setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); + } else { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { + if (! in_array($fuserid, $childids)) { + $error++; + setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); + $action = 'create'; + } + } + } - // If no start date - if (empty($date_debut)) - { - setEventMessages($langs->trans("NoDateDebut"), null, 'errors'); - $error++; - $action = 'create'; - } - // If no end date - if (empty($date_fin)) - { - setEventMessages($langs->trans("NoDateFin"), null, 'errors'); - $error++; - $action = 'create'; - } - // If start date after end date - if ($date_debut > $date_fin) - { - setEventMessages($langs->trans("ErrorEndDateCP"), null, 'errors'); - $error++; - $action = 'create'; - } + // If no type + if ($type <= 0) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors'); + $error++; + $action = 'create'; + } - // Check if there is already holiday for this period - $verifCP = $object->verifDateHolidayCP($fuserid, $date_debut, $date_fin, $halfday); - if (!$verifCP) - { - setEventMessages($langs->trans("alreadyCPexist"), null, 'errors'); - $error++; - $action = 'create'; - } + // If no start date + if (empty($date_debut)) + { + setEventMessages($langs->trans("NoDateDebut"), null, 'errors'); + $error++; + $action = 'create'; + } + // If no end date + if (empty($date_fin)) + { + setEventMessages($langs->trans("NoDateFin"), null, 'errors'); + $error++; + $action = 'create'; + } + // If start date after end date + if ($date_debut > $date_fin) + { + setEventMessages($langs->trans("ErrorEndDateCP"), null, 'errors'); + $error++; + $action = 'create'; + } - // If there is no Business Days within request - $nbopenedday = num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); - if ($nbopenedday < 0.5) - { - setEventMessages($langs->trans("ErrorDureeCP"), null, 'errors'); - $error++; - $action = 'create'; - } + // Check if there is already holiday for this period + $verifCP = $object->verifDateHolidayCP($fuserid, $date_debut, $date_fin, $halfday); + if (!$verifCP) + { + setEventMessages($langs->trans("alreadyCPexist"), null, 'errors'); + $error++; + $action = 'create'; + } - // If no validator designated - if ($valideur < 1) - { - setEventMessages($langs->transnoentitiesnoconv('InvalidValidatorCP'), null, 'errors'); - $error++; - } + // If there is no Business Days within request + $nbopenedday = num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); + if ($nbopenedday < 0.5) + { + setEventMessages($langs->trans("ErrorDureeCP"), null, 'errors'); // No working day + $error++; + $action = 'create'; + } - $result = 0; + // If no validator designated + if ($valideur < 1) + { + setEventMessages($langs->transnoentitiesnoconv('InvalidValidatorCP'), null, 'errors'); + $error++; + } - if (!$error) - { - $object->fk_user = $fuserid; - $object->description = $description; - $object->fk_validator = $valideur; - $object->fk_type = $type; - $object->date_debut = $date_debut; - $object->date_fin = $date_fin; - $object->halfday = $halfday; + $result = 0; - $result = $object->create($user); - if ($result <= 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - } - } + if (!$error) + { + $object->fk_user = $fuserid; + $object->description = $description; + $object->fk_validator = $valideur; + $object->fk_type = $type; + $object->date_debut = $date_debut; + $object->date_fin = $date_fin; + $object->halfday = $halfday; - // If no SQL error we redirect to the request card - if (!$error) - { + $result = $object->create($user); + if ($result <= 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + } + } + + // If no SQL error we redirect to the request card + if (!$error) + { $db->commit(); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - else - { - $db->rollback(); - } - } + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } else { + $db->rollback(); + } + } } if ($action == 'update' && GETPOSTISSET('savevalidator') && !empty($user->rights->holiday->approve)) { - $object->fetch($id); + $object->fetch($id); - $object->oldcopy = dol_clone($object); + $object->oldcopy = dol_clone($object); - $object->fk_validator = GETPOST('valideur', 'int'); + $object->fk_validator = GETPOST('valideur', 'int'); - if ($object->fk_validator != $object->oldcopy->fk_validator) - { - $verif = $object->update($user); + if ($object->fk_validator != $object->oldcopy->fk_validator) + { + $verif = $object->update($user); - if ($verif <= 0) - { - setEventMessages($object->error, $object->errors, 'warnings'); - $action = 'editvalidator'; - } - else - { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - } + if ($verif <= 0) + { + setEventMessages($object->error, $object->errors, 'warnings'); + $action = 'editvalidator'; + } else { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + } - $action = ''; + $action = ''; } if ($action == 'update' && !GETPOSTISSET('savevalidator')) @@ -276,60 +287,61 @@ if (empty($reshook)) elseif ($starthalfday == 'afternoon') $halfday = -1; elseif ($endhalfday == 'morning') $halfday = 1; - // If no right to modify a request - if (!$user->rights->holiday->write) - { - header('Location: '.$_SERVER["PHP_SELF"].'?action=request&error=CantUpdate'); - exit; - } + // If no right to modify a request + if (!$user->rights->holiday->write) + { + setEventMessages($langs->trans("CantUpdate"), null, 'errors'); + header('Location: '.$_SERVER["PHP_SELF"].'?action=create'); + exit; + } - $object->fetch($id); + $object->fetch($id); // If under validation - if ($object->statut == Holiday::STATUS_DRAFT) - { - // If this is the requestor or has read/write rights - if ($cancreate) - { - $valideur = GETPOST('valideur', 'int'); - $description = trim(GETPOST('description', 'none')); + if ($object->statut == Holiday::STATUS_DRAFT) + { + // If this is the requestor or has read/write rights + if ($cancreate) + { + $valideur = GETPOST('valideur', 'int'); + $description = trim(GETPOST('description', 'restricthtml')); - // If no start date - if (empty($_POST['date_debut_'])) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=nodatedebut'); - exit; - } + // If no start date + if (empty($_POST['date_debut_'])) { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=nodatedebut'); + exit; + } - // If no end date - if (empty($_POST['date_fin_'])) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=nodatefin'); - exit; - } + // If no end date + if (empty($_POST['date_fin_'])) { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=nodatefin'); + exit; + } - // If start date after end date - if ($date_debut > $date_fin) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=datefin'); - exit; - } + // If start date after end date + if ($date_debut > $date_fin) { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=datefin'); + exit; + } - // If no validator designated - if ($valideur < 1) { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=Valideur'); - exit; - } + // If no validator designated + if ($valideur < 1) { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=Valideur'); + exit; + } - // If there is no Business Days within request - $nbopenedday = num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); - if ($nbopenedday < 0.5) - { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=DureeHoliday'); - exit; - } + // If there is no Business Days within request + $nbopenedday = num_open_day($date_debut_gmt, $date_fin_gmt, 0, 1, $halfday); + if ($nbopenedday < 0.5) + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&error=DureeHoliday'); + exit; + } - $object->description = $description; - $object->date_debut = $date_debut; - $object->date_fin = $date_fin; - $object->fk_validator = $valideur; + $object->description = $description; + $object->date_debut = $date_debut; + $object->date_fin = $date_fin; + $object->fk_validator = $valideur; $object->halfday = $halfday; // Update @@ -339,24 +351,18 @@ if (empty($reshook)) { setEventMessages($object->error, $object->errors, 'warnings'); $action = 'edit'; - } - else - { + } else { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); exit; } - } - else - { - setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); - $action = ''; - } - } - else - { - setEventMessages($langs->trans("ErrorBadStatus"), null, 'errors'); - $action = ''; - } + } else { + setEventMessages($langs->trans("NotEnoughPermissions"), null, 'errors'); + $action = ''; + } + } else { + setEventMessages($langs->trans("ErrorBadStatus"), null, 'errors'); + $action = ''; + } } // If delete of request @@ -368,16 +374,14 @@ if (empty($reshook)) $object->fetch($id); - // If this is a rough draft, approved, canceled or refused + // If this is a rough draft, approved, canceled or refused if ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED) { // Si l'utilisateur à le droit de lire cette demande, il peut la supprimer if ($candelete) { $result = $object->delete($user); - } - else - { + } else { $error++; setEventMessages($langs->trans('ErrorCantDeleteCP'), null, 'errors'); $action = ''; @@ -389,9 +393,7 @@ if (empty($reshook)) $db->commit(); header('Location: list.php?restore_lastsearch_values=1'); exit; - } - else - { + } else { $db->rollback(); } } @@ -399,104 +401,100 @@ if (empty($reshook)) // Action validate (+ send email for approval) if ($action == 'confirm_send') { - $object->fetch($id); + $object->fetch($id); - // Si brouillon et créateur - if ($object->statut == Holiday::STATUS_DRAFT && $cancreate) - { - $object->oldcopy = dol_clone($object); + // Si brouillon et créateur + if ($object->statut == Holiday::STATUS_DRAFT && $cancreate) + { + $object->oldcopy = dol_clone($object); - $object->statut = Holiday::STATUS_VALIDATED; + $object->statut = Holiday::STATUS_VALIDATED; - $verif = $object->validate($user); + $verif = $object->validate($user); - // Si pas d'erreur SQL on redirige vers la fiche de la demande - if ($verif > 0) - { - // To - $destinataire = new User($db); - $destinataire->fetch($object->fk_validator); - $emailTo = $destinataire->email; + // Si pas d'erreur SQL on redirige vers la fiche de la demande + if ($verif > 0) + { + // To + $destinataire = new User($db); + $destinataire->fetch($object->fk_validator); + $emailTo = $destinataire->email; - if (!$emailTo) - { - dol_syslog("Expected validator has no email, so we redirect directly to finished page without sending email"); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } + if (!$emailTo) + { + dol_syslog("Expected validator has no email, so we redirect directly to finished page without sending email"); + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } - // From - $expediteur = new User($db); - $expediteur->fetch($object->fk_user); - $emailFrom = $expediteur->email; + // From + $expediteur = new User($db); + $expediteur->fetch($object->fk_user); + $emailFrom = $expediteur->email; - // Subject + // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; - $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysToValidate"); + $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysToValidate"); - // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; - $message .= "\n"; - $message .= $langs->transnoentities("HolidaysToValidateBody")."\n"; + // Content + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; + $message .= "\n"; + $message .= $langs->transnoentities("HolidaysToValidateBody")."\n"; - $delayForRequest = $object->getConfCP('delayForRequest'); - //$delayForRequest = $delayForRequest * (60*60*24); + $delayForRequest = $object->getConfCP('delayForRequest'); + //$delayForRequest = $delayForRequest * (60*60*24); - $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); + $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); - // Si l'option pour avertir le valideur en cas de délai trop court - if ($object->getConfCP('AlertValidatorDelay')) - { - if ($object->date_debut < $nextMonth) - { - $message .= "\n"; - $message .= $langs->transnoentities("HolidaysToValidateDelay", $object->getConfCP('delayForRequest'))."\n"; - } - } + // Si l'option pour avertir le valideur en cas de délai trop court + if ($object->getConfCP('AlertValidatorDelay')) + { + if ($object->date_debut < $nextMonth) + { + $message .= "\n"; + $message .= $langs->transnoentities("HolidaysToValidateDelay", $object->getConfCP('delayForRequest'))."\n"; + } + } - // Si l'option pour avertir le valideur en cas de solde inférieur à la demande - if ($object->getConfCP('AlertValidatorSolde')) - { - $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); - if ($nbopenedday > $object->getCPforUser($object->fk_user, $object->fk_type)) - { - $message .= "\n"; - $message .= $langs->transnoentities("HolidaysToValidateAlertSolde")."\n"; - } - } + // Si l'option pour avertir le valideur en cas de solde inférieur à la demande + if ($object->getConfCP('AlertValidatorSolde')) + { + $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); + if ($nbopenedday > $object->getCPforUser($object->fk_user, $object->fk_type)) + { + $message .= "\n"; + $message .= $langs->transnoentities("HolidaysToValidateAlertSolde")."\n"; + } + } - $message .= "\n"; - $message .= "- ".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message .= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut, 'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin, 'day')."\n"; - $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; - $message .= "\n"; + $message .= "\n"; + $message .= "- ".$langs->transnoentitiesnoconv("Name")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; + $message .= "- ".$langs->transnoentitiesnoconv("Period")." : ".dol_print_date($object->date_debut, 'day')." ".$langs->transnoentitiesnoconv("To")." ".dol_print_date($object->date_fin, 'day')."\n"; + $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; + $message .= "\n"; - $trackid = 'leav'.$object->id; + $trackid = 'leav'.$object->id; - $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail - $result = $mail->sendfile(); + // Envoi du mail + $result = $mail->sendfile(); - if (!$result) - { - setEventMessages($mail->error, $mail->errors, 'warnings'); - $action = ''; - } - else - { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - $action = ''; - } - } + if (!$result) + { + setEventMessages($mail->error, $mail->errors, 'warnings'); + $action = ''; + } else { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + } else { + setEventMessages($object->error, $object->errors, 'errors'); + $action = ''; + } + } } if ($action == 'update_extras') @@ -504,7 +502,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) @@ -525,210 +523,200 @@ if (empty($reshook)) // Approve leave request if ($action == 'confirm_valid') { - $object->fetch($id); + $object->fetch($id); - // Si statut en attente de validation et valideur = utilisateur - if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) - { - $object->oldcopy = dol_clone($object); + // Si statut en attente de validation et valideur = utilisateur + if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) + { + $object->oldcopy = dol_clone($object); - $object->date_valid = dol_now(); - $object->fk_user_valid = $user->id; - $object->statut = Holiday::STATUS_APPROVED; + $object->date_valid = dol_now(); + $object->fk_user_valid = $user->id; + $object->statut = Holiday::STATUS_APPROVED; - $db->begin(); + $db->begin(); - $verif = $object->approve($user); - if ($verif <= 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $error++; - } + $verif = $object->approve($user); + if ($verif <= 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + $error++; + } - // Si pas d'erreur SQL on redirige vers la fiche de la demande - if (!$error) - { - // Calculcate number of days consummed - $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); - $soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type); - $newSolde = ($soldeActuel - $nbopenedday); + // Si pas d'erreur SQL on redirige vers la fiche de la demande + if (!$error) + { + // Calculcate number of days consummed + $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); + $soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type); + $newSolde = ($soldeActuel - $nbopenedday); - // On ajoute la modification dans le LOG - $result = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type); - if ($result < 0) - { - $error++; - setEventMessages(null, $object->errors, 'errors'); - } + // On ajoute la modification dans le LOG + $result = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("Holidays"), $newSolde, $object->fk_type); + if ($result < 0) + { + $error++; + setEventMessages(null, $object->errors, 'errors'); + } - //Update balance - $result = $object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); - if ($result < 0) - { - $error++; - setEventMessages(null, $object->errors, 'errors'); - } - } + //Update balance + $result = $object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); + if ($result < 0) + { + $error++; + setEventMessages(null, $object->errors, 'errors'); + } + } - if (!$error) - { - // To - $destinataire = new User($db); - $destinataire->fetch($object->fk_user); - $emailTo = $destinataire->email; + if (!$error) + { + // To + $destinataire = new User($db); + $destinataire->fetch($object->fk_user); + $emailTo = $destinataire->email; - if (!$emailTo) - { - dol_syslog("User that request leave has no email, so we redirect directly to finished page without sending email"); - } - else - { - // From - $expediteur = new User($db); - $expediteur->fetch($object->fk_validator); - $emailFrom = $expediteur->email; + if (!$emailTo) + { + dol_syslog("User that request leave has no email, so we redirect directly to finished page without sending email"); + } else { + // From + $expediteur = new User($db); + $expediteur->fetch($object->fk_validator); + $emailFrom = $expediteur->email; - // Subject - $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; + // Subject + $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; - $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysValidated"); + $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysValidated"); - // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; - $message .= "\n"; - $message .= $langs->transnoentities("HolidaysValidatedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; + // Content + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; + $message .= "\n"; + $message .= $langs->transnoentities("HolidaysValidatedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; - $message .= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; + $message .= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; - $message .= "\n"; + $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; + $message .= "\n"; - $trackid = 'leav'.$object->id; + $trackid = 'leav'.$object->id; - $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail - $result = $mail->sendfile(); + // Envoi du mail + $result = $mail->sendfile(); - if (!$result) - { - setEventMessages($mail->error, $mail->errors, 'warnings'); // Show error, but do no make rollback, so $error is not set to 1 - $action = ''; - } - } - } + if (!$result) + { + setEventMessages($mail->error, $mail->errors, 'warnings'); // Show error, but do no make rollback, so $error is not set to 1 + $action = ''; + } + } + } - if (!$error) - { - $db->commit(); + if (!$error) + { + $db->commit(); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - else - { - $db->rollback(); - $action = ''; - } - } + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } else { + $db->rollback(); + $action = ''; + } + } } if ($action == 'confirm_refuse' && GETPOST('confirm', 'alpha') == 'yes') { if (!empty($_POST['detail_refuse'])) - { - $object->fetch($id); + { + $object->fetch($id); - // Si statut en attente de validation et valideur = utilisateur - if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) - { - $object->date_refuse = dol_print_date('dayhour', dol_now()); - $object->fk_user_refuse = $user->id; - $object->statut = Holiday::STATUS_REFUSED; - $object->detail_refuse = GETPOST('detail_refuse', 'alphanohtml'); + // Si statut en attente de validation et valideur = utilisateur + if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) + { + $object->date_refuse = dol_print_date('dayhour', dol_now()); + $object->fk_user_refuse = $user->id; + $object->statut = Holiday::STATUS_REFUSED; + $object->detail_refuse = GETPOST('detail_refuse', 'alphanohtml'); - $db->begin(); + $db->begin(); - $verif = $object->update($user); - if ($verif <= 0) - { - $error++; - setEventMessages($object->error, $object->errors, 'errors'); - } + $verif = $object->update($user); + if ($verif <= 0) + { + $error++; + setEventMessages($object->error, $object->errors, 'errors'); + } - // Si pas d'erreur SQL on redirige vers la fiche de la demande - if (!$error) - { - // To - $destinataire = new User($db); - $destinataire->fetch($object->fk_user); - $emailTo = $destinataire->email; + // Si pas d'erreur SQL on redirige vers la fiche de la demande + if (!$error) + { + // To + $destinataire = new User($db); + $destinataire->fetch($object->fk_user); + $emailTo = $destinataire->email; - if (!$emailTo) - { - dol_syslog("User that request leave has no email, so we redirect directly to finished page without sending email"); - } - else - { - // From - $expediteur = new User($db); - $expediteur->fetch($object->fk_validator); - $emailFrom = $expediteur->email; + if (!$emailTo) + { + dol_syslog("User that request leave has no email, so we redirect directly to finished page without sending email"); + } else { + // From + $expediteur = new User($db); + $expediteur->fetch($object->fk_validator); + $emailFrom = $expediteur->email; - // Subject - $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; + // Subject + $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; - $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysRefused"); + $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysRefused"); - // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; - $message .= "\n"; - $message .= $langs->transnoentities("HolidaysRefusedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; - $message .= GETPOST('detail_refuse', 'alpha')."\n\n"; + // Content + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; + $message .= "\n"; + $message .= $langs->transnoentities("HolidaysRefusedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; + $message .= GETPOST('detail_refuse', 'alpha')."\n\n"; - $message .= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; + $message .= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; - $message .= "\n"; + $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; + $message .= "\n"; - $trackid = 'leav'.$object->id; + $trackid = 'leav'.$object->id; - $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail - $result = $mail->sendfile(); + // Envoi du mail + $result = $mail->sendfile(); - if (!$result) - { - setEventMessages($mail->error, $mail->errors, 'warnings'); // Show error, but do no make rollback, so $error is not set to 1 - $action = ''; - } - } - } - else - { - $action = ''; - } + if (!$result) + { + setEventMessages($mail->error, $mail->errors, 'warnings'); // Show error, but do no make rollback, so $error is not set to 1 + $action = ''; + } + } + } else { + $action = ''; + } - if (!$error) - { - $db->commit(); + if (!$error) + { + $db->commit(); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - else - { - $db->rollback(); - $action = ''; - } - } - } else { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DetailRefusCP")), null, 'errors'); - $action = 'refuse'; - } + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } else { + $db->rollback(); + $action = ''; + } + } + } else { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DetailRefusCP")), null, 'errors'); + $action = 'refuse'; + } } @@ -737,29 +725,27 @@ if (empty($reshook)) { $error = 0; - $object->fetch($id); + $object->fetch($id); - $oldstatus = $object->statut; - $object->statut = Holiday::STATUS_DRAFT; + $oldstatus = $object->statut; + $object->statut = Holiday::STATUS_DRAFT; - $result = $object->update($user); - if ($result < 0) - { - $error++; - setEventMessages($langs->trans('ErrorBackToDraft').' '.$object->error, $object->errors, 'errors'); - } + $result = $object->update($user); + if ($result < 0) + { + $error++; + setEventMessages($langs->trans('ErrorBackToDraft').' '.$object->error, $object->errors, 'errors'); + } - if (!$error) - { - $db->commit(); + if (!$error) + { + $db->commit(); - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - else - { - $db->rollback(); - } + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } else { + $db->rollback(); + } } // Si confirmation of cancellation @@ -767,104 +753,101 @@ if (empty($reshook)) { $error = 0; - $object->fetch($id); + $object->fetch($id); - // Si statut en attente de validation et valideur = valideur ou utilisateur, ou droits de faire pour les autres - if (($object->statut == Holiday::STATUS_VALIDATED || $object->statut == Holiday::STATUS_APPROVED) && ($user->id == $object->fk_validator || in_array($object->fk_user, $childids) || !empty($user->rights->holiday->write_all))) - { - $db->begin(); + // Si statut en attente de validation et valideur = valideur ou utilisateur, ou droits de faire pour les autres + if (($object->statut == Holiday::STATUS_VALIDATED || $object->statut == Holiday::STATUS_APPROVED) && ($user->id == $object->fk_validator || in_array($object->fk_user, $childids) + || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)))) + { + $db->begin(); - $oldstatus = $object->statut; - $object->date_cancel = dol_now(); - $object->fk_user_cancel = $user->id; - $object->statut = Holiday::STATUS_CANCELED; + $oldstatus = $object->statut; + $object->date_cancel = dol_now(); + $object->fk_user_cancel = $user->id; + $object->statut = Holiday::STATUS_CANCELED; - $result = $object->update($user); + $result = $object->update($user); - if ($result >= 0 && $oldstatus == Holiday::STATUS_APPROVED) // holiday was already validated, status 3, so we must increase back the balance - { - // Calculcate number of days consummed - $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); + if ($result >= 0 && $oldstatus == Holiday::STATUS_APPROVED) // holiday was already validated, status 3, so we must increase back the balance + { + // Calculcate number of days consummed + $nbopenedday = num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); - $soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type); - $newSolde = ($soldeActuel + $nbopenedday); + $soldeActuel = $object->getCpforUser($object->fk_user, $object->fk_type); + $newSolde = ($soldeActuel + $nbopenedday); - // On ajoute la modification dans le LOG - $result1 = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("HolidaysCancelation"), $newSolde, $object->fk_type); + // On ajoute la modification dans le LOG + $result1 = $object->addLogCP($user->id, $object->fk_user, $langs->transnoentitiesnoconv("HolidaysCancelation"), $newSolde, $object->fk_type); - // Mise à jour du solde - $result2 = $object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); + // Mise à jour du solde + $result2 = $object->updateSoldeCP($object->fk_user, $newSolde, $object->fk_type); - if ($result1 < 0 || $result2 < 0) - { - $error++; - setEventMessages($langs->trans('ErrorCantDeleteCP').' '.$object->error, $object->errors, 'errors'); - } - } + if ($result1 < 0 || $result2 < 0) + { + $error++; + setEventMessages($langs->trans('ErrorCantDeleteCP').' '.$object->error, $object->errors, 'errors'); + } + } - if (!$error) - { - $db->commit(); - } - else - { - $db->rollback(); - } + if (!$error) + { + $db->commit(); + } else { + $db->rollback(); + } - // Si pas d'erreur SQL on redirige vers la fiche de la demande - if (!$error && $result > 0) - { - // To - $destinataire = new User($db); - $destinataire->fetch($object->fk_user); - $emailTo = $destinataire->email; + // Si pas d'erreur SQL on redirige vers la fiche de la demande + if (!$error && $result > 0) + { + // To + $destinataire = new User($db); + $destinataire->fetch($object->fk_user); + $emailTo = $destinataire->email; - if (!$emailTo) - { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } + if (!$emailTo) + { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } - // From - $expediteur = new User($db); - $expediteur->fetch($object->fk_user_cancel); - $emailFrom = $expediteur->email; + // From + $expediteur = new User($db); + $expediteur->fetch($object->fk_user_cancel); + $emailFrom = $expediteur->email; - // Subject + // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; - if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; + if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $societeName = $conf->global->MAIN_APPLICATION_TITLE; - $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysCanceled"); + $subject = $societeName." - ".$langs->transnoentitiesnoconv("HolidaysCanceled"); - // Content - $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; - $message .= "\n"; + // Content + $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; + $message .= "\n"; - $message .= $langs->transnoentities("HolidaysCanceledBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; - $message .= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; + $message .= $langs->transnoentities("HolidaysCanceledBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; + $message .= "- ".$langs->transnoentitiesnoconv("ModifiedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; - $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; - $message .= "\n"; + $message .= "- ".$langs->transnoentitiesnoconv("Link")." : ".$dolibarr_main_url_root."/holiday/card.php?id=".$object->id."\n\n"; + $message .= "\n"; - $trackid = 'leav'.$object->id; + $trackid = 'leav'.$object->id; - $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); + $mail = new CMailFile($subject, $emailTo, $emailFrom, $message, array(), array(), array(), '', '', 0, 0, '', '', $trackid); - // Envoi du mail - $result = $mail->sendfile(); + // Envoi du mail + $result = $mail->sendfile(); - if (!$result) - { - setEventMessages($mail->error, $mail->errors, 'warnings'); - $action = ''; - } - else - { - header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); - exit; - } - } - } + if (!$result) + { + setEventMessages($mail->error, $mail->errors, 'warnings'); + $action = ''; + } else { + header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id); + exit; + } + } + } } /* @@ -897,55 +880,53 @@ $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->t llxHeader('', $langs->trans('CPTitreMenu')); -if ((empty($id) && empty($ref)) || $action == 'add' || $action == 'request' || $action == 'create') +if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') { - // Si l'utilisateur n'a pas le droit de faire une demande - if (($fuserid == $user->id && empty($user->rights->holiday->write)) || ($fuserid != $user->id && empty($user->rights->holiday->write_all))) - { - $errors[] = $langs->trans('CantCreateCP'); - } - else - { - // Formulaire de demande de congés payés - print load_fiche_titre($langs->trans('MenuAddCP'), '', 'title_hrm.png'); + // If user has no permission to create a leave + if ((in_array($fuserid, $childids) && empty($user->rights->holiday->write)) || (!in_array($fuserid, $childids) && (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)))) + { + $errors[] = $langs->trans('CantCreateCP'); + } else { + // Form to add a leave request + print load_fiche_titre($langs->trans('MenuAddCP'), '', 'title_hrm.png'); - // Si il y a une erreur - if (GETPOST('error')) { - switch (GETPOST('error')) { - case 'datefin' : - $errors[] = $langs->trans('ErrorEndDateCP'); - break; - case 'SQL_Create' : - $errors[] = $langs->trans('ErrorSQLCreateCP').' '.htmlentities($_GET['msg']).''; - break; - case 'CantCreate' : - $errors[] = $langs->trans('CantCreateCP'); - break; - case 'Valideur' : - $errors[] = $langs->trans('InvalidValidatorCP'); - break; - case 'nodatedebut' : - $errors[] = $langs->trans('NoDateDebut'); - break; - case 'nodatefin' : - $errors[] = $langs->trans('NoDateFin'); - break; - case 'DureeHoliday' : - $errors[] = $langs->trans('ErrorDureeCP'); - break; - case 'alreadyCP' : - $errors[] = $langs->trans('alreadyCPexist'); - break; - } + // Error management + if (GETPOST('error')) { + switch (GETPOST('error')) { + case 'datefin' : + $errors[] = $langs->trans('ErrorEndDateCP'); + break; + case 'SQL_Create' : + $errors[] = $langs->trans('ErrorSQLCreateCP').' '.htmlentities($_GET['msg']).''; + break; + case 'CantCreate' : + $errors[] = $langs->trans('CantCreateCP'); + break; + case 'Valideur' : + $errors[] = $langs->trans('InvalidValidatorCP'); + break; + case 'nodatedebut' : + $errors[] = $langs->trans('NoDateDebut'); + break; + case 'nodatefin' : + $errors[] = $langs->trans('NoDateFin'); + break; + case 'DureeHoliday' : + $errors[] = $langs->trans('ErrorDureeCP'); + break; + case 'alreadyCP' : + $errors[] = $langs->trans('alreadyCPexist'); + break; + } - setEventMessages($errors, null, 'errors'); - } + setEventMessages($errors, null, 'errors'); + } - $delayForRequest = $object->getConfCP('delayForRequest'); - //$delayForRequest = $delayForRequest * (60*60*24); + $delayForRequest = $object->getConfCP('delayForRequest'); + //$delayForRequest = $delayForRequest * (60*60*24); - $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); + $nextMonth = dol_time_plus_duree($now, $delayForRequest, 'd'); print ''."\n"; - // Formulaire de demande - print '
'."\n"; - print ''."\n"; - print ''."\n"; + // Formulaire de demande + print ''."\n"; + print ''."\n"; + print ''."\n"; - if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) - { - dol_fiche_head('', '', '', -1); + if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) + { + dol_fiche_head('', '', '', -1); - $out = ''; - $typeleaves = $object->getTypes(1, 1); - foreach ($typeleaves as $key => $val) + $out = ''; + $typeleaves = $object->getTypes(1, 1); + foreach ($typeleaves as $key => $val) { $nb_type = $object->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; @@ -995,544 +976,536 @@ if ((empty($id) && empty($ref)) || $action == 'add' || $action == 'request' || $ $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': '.($nb_type ?price2num($nb_type) : 0).'
'; //$out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; } - print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; + print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; print $out; - dol_fiche_end(); - } - elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) - { - print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE).'
'; - } + dol_fiche_end(); + } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) + { + print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE).'
'; + } - dol_fiche_head(); + dol_fiche_head(); - //print ''.$langs->trans('DelayToRequestCP',$object->getConfCP('delayForRequest')).'

'; + //print ''.$langs->trans('DelayToRequestCP',$object->getConfCP('delayForRequest')).'

'; - print ''; - print ''; + print '
'; + print ''; - // User for leave request - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) + { + print $form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); + //print ''; + } else { + print $form->select_dolusers(GETPOST('fuserid', 'int') ? GETPOST('fuserid', 'int') : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); + } + print ''; + print ''; - // Type - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; + } + print $form->selectarray('type', $arraytypeleaves, (GETPOST('type', 'alpha') ?GETPOST('type', 'alpha') : ''), 1); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print ''; + print ''; - // Date start - print ''; - print ''; - print ''; - print ''; + // Date start + print ''; + print ''; + print ''; + print ''; - // Date end - print ''; - print ''; - print ''; - print ''; + // Date end + print ''; + print ''; + print ''; + print ''; - // Approver - print ''; - print ''; - print ''; + print ''; + print ''; - print ''; + //print $form->select_dolusers((GETPOST('valideur','int')>0?GETPOST('valideur','int'):$user->fk_user), "valideur", 1, ($user->admin ? '' : array($user->id)), 0, '', 0, 0, 0, 0, '', 0, '', '', 1); // By default, hierarchical parent + print ''; + print ''; - // Description - print ''; - print ''; - print ''; + // Description + print ''; + print ''; + print ''; - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; - print ''; - print '
'.$langs->trans("User").''; + // User for leave request + print '
'.$langs->trans("User").''; - if (empty($user->rights->holiday->write_all)) - { - print $form->select_dolusers(($fuserid ? $fuserid : $user->id), 'fuserid', 0, '', 0, 'hierarchyme', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); - //print ''; - } - else print $form->select_dolusers(GETPOST('fuserid', 'int') ?GETPOST('fuserid', 'int') : $user->id, 'fuserid', 0, '', 0, '', '', '0,'.$conf->entity, 0, 0, $morefilter, 0, '', 'maxwidth300'); - print '
'.$langs->trans("Type").''; - $typeleaves = $object->getTypes(1, -1); - $arraytypeleaves = array(); - foreach ($typeleaves as $key => $val) - { - $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']); - $labeltoshow .= ($val['delay'] > 0 ? ' ('.$langs->trans("NoticePeriod").': '.$val['delay'].' '.$langs->trans("days").')' : ''); + // Type + print '
'.$langs->trans("Type").''; + $typeleaves = $object->getTypes(1, -1); + $arraytypeleaves = array(); + foreach ($typeleaves as $key => $val) + { + $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']); + $labeltoshow .= ($val['delay'] > 0 ? ' ('.$langs->trans("NoticePeriod").': '.$val['delay'].' '.$langs->trans("days").')' : ''); $arraytypeleaves[$val['rowid']] = $labeltoshow; - } - print $form->selectarray('type', $arraytypeleaves, (GETPOST('type', 'alpha') ?GETPOST('type', 'alpha') : ''), 1); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
'; - print $langs->trans("DateDebCP"); - print ' ('.$langs->trans("FirstDayOfHoliday").')'; - print ''; - // Si la demande ne vient pas de l'agenda - if (!GETPOST('date_debut_')) { - print $form->selectDate(-1, 'date_debut_', 0, 0, 0, '', 1, 1); - } else { - $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_debut_month', 'int'), GETPOST('date_debut_day', 'int'), GETPOST('date_debut_year', 'int')); - print $form->selectDate($tmpdate, 'date_debut_', 0, 0, 0, '', 1, 1); - } - print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday', 'alpha') ?GETPOST('starthalfday', 'alpha') : 'morning')); - print '
'; + print $form->textwithpicto($langs->trans("DateDebCP"), $langs->trans("FirstDayOfHoliday")); + print ''; + // Si la demande ne vient pas de l'agenda + if (!GETPOST('date_debut_')) { + print $form->selectDate(-1, 'date_debut_', 0, 0, 0, '', 1, 1); + } else { + $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_debut_month', 'int'), GETPOST('date_debut_day', 'int'), GETPOST('date_debut_year', 'int')); + print $form->selectDate($tmpdate, 'date_debut_', 0, 0, 0, '', 1, 1); + } + print '     '; + print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday', 'alpha') ?GETPOST('starthalfday', 'alpha') : 'morning')); + print '
'; - print $langs->trans("DateFinCP"); - print ' ('.$langs->trans("LastDayOfHoliday").')'; - print ''; - // Si la demande ne vient pas de l'agenda - if (!GETPOST('date_fin_')) { - print $form->selectDate(-1, 'date_fin_', 0, 0, 0, '', 1, 1); - } else { - $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_fin_month', 'int'), GETPOST('date_fin_day', 'int'), GETPOST('date_fin_year', 'int')); - print $form->selectDate($tmpdate, 'date_fin_', 0, 0, 0, '', 1, 1); - } - print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday', 'alpha') ?GETPOST('endhalfday', 'alpha') : 'afternoon')); - print '
'; + print $form->textwithpicto($langs->trans("DateFinCP"), $langs->trans("LastDayOfHoliday")); + print ''; + // Si la demande ne vient pas de l'agenda + if (!GETPOST('date_fin_')) { + print $form->selectDate(-1, 'date_fin_', 0, 0, 0, '', 1, 1); + } else { + $tmpdate = dol_mktime(0, 0, 0, GETPOST('date_fin_month', 'int'), GETPOST('date_fin_day', 'int'), GETPOST('date_fin_year', 'int')); + print $form->selectDate($tmpdate, 'date_fin_', 0, 0, 0, '', 1, 1); + } + print '     '; + print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday', 'alpha') ?GETPOST('endhalfday', 'alpha') : 'afternoon')); + print '
'.$langs->trans("ReviewedByCP").''; + // Approver + print '
'.$langs->trans("ReviewedByCP").''; - $object = new Holiday($db); - $include_users = $object->fetch_users_approver_holiday(); - if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); - else - { - $defaultselectuser = (empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); // Will work only if supervisor has permission to approve so is inside include_users - if (!empty($conf->global->HOLIDAY_DEFAULT_VALIDATOR)) $defaultselectuser = $conf->global->HOLIDAY_DEFAULT_VALIDATOR; // Can force default approver - if (GETPOST('valideur', 'int') > 0) $defaultselectuser = GETPOST('valideur', 'int'); - $s = $form->select_dolusers($defaultselectuser, "valideur", 1, "", 0, $include_users); - print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); - } + $object = new Holiday($db); + $include_users = $object->fetch_users_approver_holiday(); + if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); + else { + $defaultselectuser = (empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); // Will work only if supervisor has permission to approve so is inside include_users + if (!empty($conf->global->HOLIDAY_DEFAULT_VALIDATOR)) $defaultselectuser = $conf->global->HOLIDAY_DEFAULT_VALIDATOR; // Can force default approver + if (GETPOST('valideur', 'int') > 0) $defaultselectuser = GETPOST('valideur', 'int'); + $s = $form->select_dolusers($defaultselectuser, "valideur", 1, "", 0, $include_users); + print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); + } - //print $form->select_dolusers((GETPOST('valideur','int')>0?GETPOST('valideur','int'):$user->fk_user), "valideur", 1, ($user->admin ? '' : array($user->id)), 0, '', 0, 0, 0, 0, '', 0, '', '', 1); // By default, hierarchical parent - print '
'.$langs->trans("DescCP").''; - $doleditor = new DolEditor('description', GETPOST('description', 'none'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - print '
'.$langs->trans("DescCP").''; + $doleditor = new DolEditor('description', GETPOST('description', 'restricthtml'), '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + print '
'; + print '
'; - dol_fiche_end(); + dol_fiche_end(); - print '
'; - print ''; - print '    '; - print ''; - print '
'; + print '
'; + print ''; + print '    '; + print ''; + print '
'; - print ''."\n"; - } -} -else -{ - if ($error) - { - print '
'; - print $error; - print '

'; - print '
'; - } - else - { - // Affichage de la fiche d'une demande de congés payés - if (($id > 0) || $ref) - { - $result = $object->fetch($id, $ref); + print ''."\n"; + } +} else { + if ($error) + { + print '
'; + print $error; + print '

'; + print '
'; + } else { + // Affichage de la fiche d'une demande de congés payés + if (($id > 0) || $ref) + { + $result = $object->fetch($id, $ref); - $valideur = new User($db); - $valideur->fetch($object->fk_validator); + $valideur = new User($db); + $valideur->fetch($object->fk_validator); - $userRequest = new User($db); - $userRequest->fetch($object->fk_user); + $userRequest = new User($db); + $userRequest->fetch($object->fk_user); - //print load_fiche_titre($langs->trans('TitreRequestCP')); + //print load_fiche_titre($langs->trans('TitreRequestCP')); - // Si il y a une erreur - if (GETPOST('error')) - { - switch (GETPOST('error')) - { - case 'datefin' : - $errors[] = $langs->transnoentitiesnoconv('ErrorEndDateCP'); - break; - case 'SQL_Create' : - $errors[] = $langs->transnoentitiesnoconv('ErrorSQLCreateCP').' '.$_GET['msg']; - break; - case 'CantCreate' : - $errors[] = $langs->transnoentitiesnoconv('CantCreateCP'); - break; - case 'Valideur' : - $errors[] = $langs->transnoentitiesnoconv('InvalidValidatorCP'); - break; - case 'nodatedebut' : - $errors[] = $langs->transnoentitiesnoconv('NoDateDebut'); - break; - case 'nodatefin' : - $errors[] = $langs->transnoentitiesnoconv('NoDateFin'); - break; - case 'DureeHoliday' : - $errors[] = $langs->transnoentitiesnoconv('ErrorDureeCP'); - break; - case 'NoMotifRefuse' : - $errors[] = $langs->transnoentitiesnoconv('NoMotifRefuseCP'); - break; - case 'mail' : - $errors[] = $langs->transnoentitiesnoconv('ErrorMailNotSend')."\n".$_GET['error_content']; - break; - } + // Si il y a une erreur + if (GETPOST('error')) + { + switch (GETPOST('error')) + { + case 'datefin' : + $errors[] = $langs->transnoentitiesnoconv('ErrorEndDateCP'); + break; + case 'SQL_Create' : + $errors[] = $langs->transnoentitiesnoconv('ErrorSQLCreateCP').' '.$_GET['msg']; + break; + case 'CantCreate' : + $errors[] = $langs->transnoentitiesnoconv('CantCreateCP'); + break; + case 'Valideur' : + $errors[] = $langs->transnoentitiesnoconv('InvalidValidatorCP'); + break; + case 'nodatedebut' : + $errors[] = $langs->transnoentitiesnoconv('NoDateDebut'); + break; + case 'nodatefin' : + $errors[] = $langs->transnoentitiesnoconv('NoDateFin'); + break; + case 'DureeHoliday' : + $errors[] = $langs->transnoentitiesnoconv('ErrorDureeCP'); + break; + case 'NoMotifRefuse' : + $errors[] = $langs->transnoentitiesnoconv('NoMotifRefuseCP'); + break; + case 'mail' : + $errors[] = $langs->transnoentitiesnoconv('ErrorMailNotSend')."\n".$_GET['error_content']; + break; + } - setEventMessages($errors, null, 'errors'); - } + setEventMessages($errors, null, 'errors'); + } - // On vérifie si l'utilisateur à le droit de lire cette demande - if ($cancreate) - { - $head = holiday_prepare_head($object); + // On vérifie si l'utilisateur à le droit de lire cette demande + if ($cancreate) + { + $head = holiday_prepare_head($object); - if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator')) - { - if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) $edit = true; + if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator')) + { + if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) $edit = true; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - } + print ''."\n"; + print ''."\n"; + print ''."\n"; + print ''."\n"; + } - dol_fiche_head($head, 'card', $langs->trans("CPTitreMenu"), -1, 'holiday'); + dol_fiche_head($head, 'card', $langs->trans("CPTitreMenu"), -1, 'holiday'); - $linkback = ''.$langs->trans("BackToList").''; + $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref'); - print '
'; - print '
'; - print '
'; + print '
'; + print '
'; + print '
'; - print ''; - print ''; + print '
'; + print ''; - // User - print ''; - print ''; - print ''; + // User + print ''; + print ''; + print ''; - // Type - print ''; - print ''; - print ''; - print ''; + // Type + print ''; + print ''; + print ''; + print ''; - $starthalfday = ($object->halfday == -1 || $object->halfday == 2) ? 'afternoon' : 'morning'; - $endhalfday = ($object->halfday == 1 || $object->halfday == 2) ? 'morning' : 'afternoon'; + $starthalfday = ($object->halfday == -1 || $object->halfday == 2) ? 'afternoon' : 'morning'; + $endhalfday = ($object->halfday == 1 || $object->halfday == 2) ? 'morning' : 'afternoon'; - if (!$edit) - { - print ''; - print ''; - print ''; - print ''; - } - else - { - print ''; - print ''; - print ''; - print ''; - } + if (!$edit) + { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + print ''; + } - if (!$edit) - { - print ''; - print ''; - print ''; - print ''; - } - else - { - print ''; - print ''; - print ''; - print ''; - } + if (!$edit) + { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + print ''; + } - // Nb of days - print ''; - print ''; - print ''; - print ''; + // Nb of days + print ''; + print ''; + print ''; + print ''; - if ($object->statut == Holiday::STATUS_REFUSED) - { - print ''; - print ''; - print ''; - print ''; - } + if ($object->statut == Holiday::STATUS_REFUSED) + { + print ''; + print ''; + print ''; + print ''; + } - // Description - if (!$edit) - { - print ''; - print ''; - print ''; - print ''; - } - else - { - print ''; - print ''; - print ''; - } + // Description + if (!$edit) + { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + } - // Other attributes - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; - print ''; - print '
'.$langs->trans("User").''; - print $userRequest->getNomUrl(-1, 'leave'); - print '
'.$langs->trans("User").''; + print $userRequest->getNomUrl(-1, 'leave'); + print '
'.$langs->trans("Type").''; - $typeleaves = $object->getTypes(1, -1); - $labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']); - print empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type) : $labeltoshow; - print '
'.$langs->trans("Type").''; + $typeleaves = $object->getTypes(1, -1); + $labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']); + print empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type) : $labeltoshow; + print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'.dol_print_date($object->date_debut, 'day'); - print '     '; - print ''.$langs->trans($listhalfday[$starthalfday]).''; - print '
'.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'; - print $form->selectDate($object->date_debut, 'date_debut_'); - print '     '; - print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday') ?GETPOST('starthalfday') : $starthalfday)); - print '
'; + print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday")); + print ''.dol_print_date($object->date_debut, 'day'); + print '     '; + print ''.$langs->trans($listhalfday[$starthalfday]).''; + print '
'; + print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday")); + print ''; + print $form->selectDate($object->date_debut, 'date_debut_'); + print '     '; + print $form->selectarray('starthalfday', $listhalfday, (GETPOST('starthalfday') ?GETPOST('starthalfday') : $starthalfday)); + print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'.dol_print_date($object->date_fin, 'day'); - print '     '; - print ''.$langs->trans($listhalfday[$endhalfday]).''; - print '
'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'; - print $form->selectDate($object->date_fin, 'date_fin_'); - print '     '; - print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday') ?GETPOST('endhalfday') : $endhalfday)); - print '
'; + print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday")); + print ''.dol_print_date($object->date_fin, 'day'); + print '     '; + print ''.$langs->trans($listhalfday[$endhalfday]).''; + print '
'; + print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday")); + print ''; + print $form->selectDate($object->date_fin, 'date_fin_'); + print '     '; + print $form->selectarray('endhalfday', $listhalfday, (GETPOST('endhalfday') ?GETPOST('endhalfday') : $endhalfday)); + print '
'; - $htmlhelp = $langs->trans('NbUseDaysCPHelp'); - $includesaturday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY : 1); - $includesunday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY : 1); - if ($includesaturday) $htmlhelp .= '
'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); - if ($includesunday) $htmlhelp .= '
'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); - print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp); - print '
'; - print num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); - print '
'; + $htmlhelp = $langs->trans('NbUseDaysCPHelp'); + $includesaturday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY : 1); + $includesunday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY : 1); + if ($includesaturday) $htmlhelp .= '
'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); + if ($includesunday) $htmlhelp .= '
'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); + print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp); + print '
'; + print num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday); + print '
'.$langs->trans('DetailRefusCP').''.$object->detail_refuse.'
'.$langs->trans('DetailRefusCP').''.$object->detail_refuse.'
'.$langs->trans('DescCP').''.nl2br($object->description).'
'.$langs->trans('DescCP').''; - $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); - print $doleditor->Create(1); - print '
'.$langs->trans('DescCP').''.nl2br($object->description).'
'.$langs->trans('DescCP').''; + $doleditor = new DolEditor('description', $object->description, '', 80, 'dolibarr_notes', 'In', 0, false, true, ROWS_3, '90%'); + print $doleditor->Create(1); + print '
'."\n"; + print ''; + print ''."\n"; - print '
'; - print '
'; - print '
'; + print '
'; + print '
'; + print '
'; - print '
'; + print '
'; // Info workflow - print ''."\n"; - print ''; + print '
'."\n"; + print ''; - if (!empty($object->fk_user_create)) - { - $userCreate = new User($db); - $userCreate->fetch($object->fk_user_create); - print ''; - print ''; - print ''; - print ''; - } + if (!empty($object->fk_user_create)) + { + $userCreate = new User($db); + $userCreate->fetch($object->fk_user_create); + print ''; + print ''; + print ''; + print ''; + } - // Approver - if (!$edit && $action != 'editvalidator') { - print ''; - print ''; - print ''; - print ''; - } else { - print ''; - print ''; - print ''; - print ''; - } + // Approver + if (!$edit && $action != 'editvalidator') { + print ''; + print ''; + print ''; + print ''; + } else { + print ''; + print ''; + print ''; + print ''; + } - print ''; - print ''; - print ''; - print ''; - if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) { - print ''; - print ''; - print ''; // warning: date_valid is approval date on holiday module - print ''; - } - if ($object->statut == Holiday::STATUS_CANCELED) { - print ''; - print ''; - print ''; - print ''; - } - if ($object->statut == Holiday::STATUS_REFUSED) { - print ''; - print ''; - print ''; - print ''; - } - print ''; - print '
'.$langs->trans('RequestByCP').''.$userCreate->getNomUrl(-1).'
'.$langs->trans('RequestByCP').''.$userCreate->getNomUrl(-1).'
'; - if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) print $langs->trans('ApprovedBy'); - else print $langs->trans('ReviewedByCP'); - print ''.$valideur->getNomUrl(-1); - $include_users = $object->fetch_users_approver_holiday(); - if (is_array($include_users) && in_array($user->id, $include_users) && $object->statut == Holiday::STATUS_VALIDATED) - { - print ''.img_edit($langs->trans("Edit")).''; - } - print '
'.$langs->trans('ReviewedByCP').''; - $include_users = $object->fetch_users_approver_holiday(); - if (!in_array($object->fk_validator, $include_users)) // Add the current validator to the list to not lose it when editing. - { - $include_users[] = $object->fk_validator; - } - if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); - else - { - $arrayofvalidatorstoexclude = (($user->admin || ($user->id != $userRequest->id)) ? '' : array($user->id)); // Nobody if we are admin or if we are not the user of the leave. - $s = $form->select_dolusers($object->fk_validator, "valideur", (($action == 'editvalidator') ? 0 : 1), $arrayofvalidatorstoexclude, 0, $include_users); - print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); - } - if ($action == 'editvalidator') - { - print ''; - print ''; - } - print '
'; + if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) print $langs->trans('ApprovedBy'); + else print $langs->trans('ReviewedByCP'); + print ''.$valideur->getNomUrl(-1); + $include_users = $object->fetch_users_approver_holiday(); + if (is_array($include_users) && in_array($user->id, $include_users) && $object->statut == Holiday::STATUS_VALIDATED) + { + print ''.img_edit($langs->trans("Edit")).''; + } + print '
'.$langs->trans('ReviewedByCP').''; + $include_users = $object->fetch_users_approver_holiday(); + if (!in_array($object->fk_validator, $include_users)) // Add the current validator to the list to not lose it when editing. + { + $include_users[] = $object->fk_validator; + } + if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); + else { + $arrayofvalidatorstoexclude = (($user->admin || ($user->id != $userRequest->id)) ? '' : array($user->id)); // Nobody if we are admin or if we are not the user of the leave. + $s = $form->select_dolusers($object->fk_validator, "valideur", (($action == 'editvalidator') ? 0 : 1), $arrayofvalidatorstoexclude, 0, $include_users); + print $form->textwithpicto($s, $langs->trans("AnyOtherInThisListCanValidate")); + } + if ($action == 'editvalidator') + { + print ''; + print ''; + } + print '
'.$langs->trans('DateCreation').''.dol_print_date($object->date_create, 'dayhour').'
'.$langs->trans('DateValidCP').''.dol_print_date($object->date_valid, 'dayhour').'
'.$langs->trans('DateCancelCP').''.dol_print_date($object->date_cancel, 'dayhour').'
'.$langs->trans('DateRefusCP').''.dol_print_date($object->date_refuse, 'dayhour').'
'; + print ''; + print ''.$langs->trans('DateCreation').''; + print ''.dol_print_date($object->date_create, 'dayhour').''; + print ''; + if ($object->statut == Holiday::STATUS_APPROVED || $object->statut == Holiday::STATUS_CANCELED) { + print ''; + print ''.$langs->trans('DateValidCP').''; + print ''.dol_print_date($object->date_valid, 'dayhour').''; // warning: date_valid is approval date on holiday module + print ''; + } + if ($object->statut == Holiday::STATUS_CANCELED) { + print ''; + print ''.$langs->trans('DateCancelCP').''; + print ''.dol_print_date($object->date_cancel, 'dayhour').''; + print ''; + } + if ($object->statut == Holiday::STATUS_REFUSED) { + print ''; + print ''.$langs->trans('DateRefusCP').''; + print ''.dol_print_date($object->date_refuse, 'dayhour').''; + print ''; + } + print ''; + print ''; - print '
'; - print '
'; - print '
'; + print '
'; + print '
'; + print '
'; - print '
'; + print '
'; - dol_fiche_end(); + dol_fiche_end(); - // Confirmation messages - if ($action == 'delete') - { - if ($user->rights->holiday->delete) - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleDeleteCP"), $langs->trans("ConfirmDeleteCP"), "confirm_delete", '', 0, 1); - } - } + // Confirmation messages + if ($action == 'delete') + { + if ($user->rights->holiday->delete) + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleDeleteCP"), $langs->trans("ConfirmDeleteCP"), "confirm_delete", '', 0, 1); + } + } - // Si envoi en validation - if ($action == 'sendToValidate' && $object->statut == Holiday::STATUS_DRAFT) - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleToValidCP"), $langs->trans("ConfirmToValidCP"), "confirm_send", '', 1, 1); - } + // Si envoi en validation + if ($action == 'sendToValidate' && $object->statut == Holiday::STATUS_DRAFT) + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleToValidCP"), $langs->trans("ConfirmToValidCP"), "confirm_send", '', 1, 1); + } - // Si validation de la demande - if ($action == 'valid') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleValidCP"), $langs->trans("ConfirmValidCP"), "confirm_valid", '', 1, 1); - } + // Si validation de la demande + if ($action == 'valid') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleValidCP"), $langs->trans("ConfirmValidCP"), "confirm_valid", '', 1, 1); + } - // Si refus de la demande - if ($action == 'refuse') - { - $array_input = array(array('type'=>"text", 'label'=> $langs->trans('DetailRefusCP'), 'name'=>"detail_refuse", 'size'=>"50", 'value'=>"")); - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); - } + // Si refus de la demande + if ($action == 'refuse') + { + $array_input = array(array('type'=>"text", 'label'=> $langs->trans('DetailRefusCP'), 'name'=>"detail_refuse", 'size'=>"50", 'value'=>"")); + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id."&action=confirm_refuse", $langs->trans("TitleRefuseCP"), $langs->trans('ConfirmRefuseCP'), "confirm_refuse", $array_input, 1, 0); + } - // Si annulation de la demande - if ($action == 'cancel') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleCancelCP"), $langs->trans("ConfirmCancelCP"), "confirm_cancel", '', 1, 1); - } + // Si annulation de la demande + if ($action == 'cancel') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleCancelCP"), $langs->trans("ConfirmCancelCP"), "confirm_cancel", '', 1, 1); + } - // Si back to draft - if ($action == 'backtodraft') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleSetToDraft"), $langs->trans("ConfirmSetToDraft"), "confirm_draft", '', 1, 1); - } + // Si back to draft + if ($action == 'backtodraft') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$object->id, $langs->trans("TitleSetToDraft"), $langs->trans("ConfirmSetToDraft"), "confirm_draft", '', 1, 1); + } - if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator')) - { - if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) - { - print '
'; - if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) - { - print ''; - } - print '
'; - } + if (($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) || ($action == 'editvalidator')) + { + if ($action == 'edit' && $object->statut == Holiday::STATUS_DRAFT) + { + print '
'; + if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) + { + print ''; + } + print '
'; + } - print ''; - } + print ''; + } - if (!$edit) - { - // Buttons for actions + if (!$edit) + { + // Buttons for actions - print '
'; + print '
'; - if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) - { - print ''.$langs->trans("EditCP").''; - } - if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) // If draft - { - print ''.$langs->trans("Validate").''; - } - if ($object->statut == Holiday::STATUS_VALIDATED) // If validated - { - if ($user->id == $object->fk_validator) - { - print ''.$langs->trans("Approve").''; - print ''.$langs->trans("ActionRefuseCP").''; - } - else - { - print ''.$langs->trans("Approve").''; - print ''.$langs->trans("ActionRefuseCP").''; - } - } - if (($user->id == $object->fk_validator || in_array($object->fk_user, $childids) || !empty($user->rights->holiday->write_all)) && ($object->statut == 2 || $object->statut == 3)) // Status validated or approved - { - if (($object->date_debut > dol_now()) || $user->admin) print ''.$langs->trans("ActionCancelCP").''; - else print ''.$langs->trans("ActionCancelCP").''; - } - if ($cancreate && $object->statut == Holiday::STATUS_CANCELED) - { - print ''.$langs->trans("SetToDraft").''; - } - if ($candelete && ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED)) // If draft or canceled or refused - { - print ''.$langs->trans("DeleteCP").''; - } + if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) + { + print ''.$langs->trans("EditCP").''; + } + if ($cancreate && $object->statut == Holiday::STATUS_DRAFT) // If draft + { + print ''.$langs->trans("Validate").''; + } + if ($object->statut == Holiday::STATUS_VALIDATED) // If validated + { + if ($user->id == $object->fk_validator) + { + print ''.$langs->trans("Approve").''; + print ''.$langs->trans("ActionRefuseCP").''; + } else { + print ''.$langs->trans("Approve").''; + print ''.$langs->trans("ActionRefuseCP").''; + } + } + if (($user->id == $object->fk_validator || in_array($object->fk_user, $childids) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance))) && ($object->statut == 2 || $object->statut == 3)) // Status validated or approved + { + if (($object->date_debut > dol_now()) || $user->admin) print ''.$langs->trans("ActionCancelCP").''; + else print ''.$langs->trans("ActionCancelCP").''; + } + if ($cancreate && $object->statut == Holiday::STATUS_CANCELED) + { + print ''.$langs->trans("SetToDraft").''; + } + if ($candelete && ($object->statut == Holiday::STATUS_DRAFT || $object->statut == Holiday::STATUS_CANCELED || $object->statut == Holiday::STATUS_REFUSED)) // If draft or canceled or refused + { + print ''.$langs->trans("DeleteCP").''; + } - print '
'; - } - } else { - print '
'; - print $langs->trans('ErrorUserViewCP'); - print '

'; - print '
'; - } - } else { - print '
'; - print $langs->trans('ErrorIDFicheCP'); - print '

'; - print '
'; - } - } + print '
'; + } + } else { + print '
'; + print $langs->trans('ErrorUserViewCP'); + print '

'; + print '
'; + } + } else { + print '
'; + print $langs->trans('ErrorIDFicheCP'); + print '

'; + print '
'; + } + } } // End of page diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index d2e32766088..b702bbf5353 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -204,16 +204,12 @@ class Holiday extends CommonObject if ($numref != "") { return $numref; - } - else - { + } else { $this->error = $obj->error; //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); return ""; } - } - else - { + } else { print $langs->trans("Error")." ".$langs->trans("Error_HOLIDAY_ADDON_NotDefined"); return ""; } @@ -238,9 +234,7 @@ class Holiday extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -344,9 +338,7 @@ class Holiday extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -427,16 +419,13 @@ class Holiday extends CommonObject $this->fetch_optionals(); $result = 1; - } - else { + } else { $result = 0; } $this->db->free($resql); return $result; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -560,9 +549,7 @@ class Holiday extends CommonObject // Returns 1 with the filled array $this->holiday = $tab_result; return 1; - } - else - { + } else { // SQL Error $this->error = "Error ".$this->db->lasterror(); return -1; @@ -685,9 +672,7 @@ class Holiday extends CommonObject // Returns 1 and adds the array to the variable $this->holiday = $tab_result; return 1; - } - else - { + } else { // SQL Error $this->error = "Error ".$this->db->lasterror(); return -1; @@ -711,9 +696,7 @@ class Holiday extends CommonObject if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref) || $this->ref == $this->id)) { $num = $this->getNextNumRef(null); - } - else - { + } else { $num = $this->ref; } $this->newref = dol_sanitizeFileName($num); @@ -757,9 +740,7 @@ class Holiday extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -871,9 +852,7 @@ class Holiday extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -984,9 +963,7 @@ class Holiday extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -1037,9 +1014,7 @@ class Holiday extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -1082,8 +1057,7 @@ class Holiday extends CommonObject { return false; } - } - elseif ($halfday == -1) + } elseif ($halfday == -1) { // new start afternoon, new end afternoon if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) @@ -1095,8 +1069,7 @@ class Holiday extends CommonObject if ($dateStart < $dateEnd) return false; if ($dateEnd < $infos_CP['date_fin'] || in_array($infos_CP['halfday'], array(0, -1))) return false; } - } - elseif ($halfday == 1) + } elseif ($halfday == 1) { // new start morning, new end morning if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) @@ -1108,8 +1081,7 @@ class Holiday extends CommonObject { if ($dateEnd > $infos_CP['date_debut'] || in_array($infos_CP['halfday'], array(0, 1))) return false; } - } - elseif ($halfday == 2) + } elseif ($halfday == 2) { // new start afternoon, new end morning if ($dateStart >= $infos_CP['date_debut'] && $dateStart <= $infos_CP['date_fin']) @@ -1120,9 +1092,7 @@ class Holiday extends CommonObject { if ($dateEnd > $infos_CP['date_debut'] || in_array($infos_CP['halfday'], array(0, 1))) return false; } - } - else - { + } else { dol_print_error('', 'Bad value of parameter halfday when calling function verifDateHolidayCP'); } } @@ -1152,7 +1122,7 @@ class Holiday extends CommonObject $sql .= " WHERE cp.entity IN (".getEntity('holiday').")"; $sql .= " AND cp.fk_user = ".(int) $fk_user; $sql .= " AND cp.date_debut <= '".$this->db->idate($timestamp)."' AND cp.date_fin >= '".$this->db->idate($timestamp)."'"; - if ($status != '-1') $sql .= " AND cp.statut IN (".$this->db->escape($status).")"; + if ($status != '-1') $sql .= " AND cp.statut IN (".$this->db->sanitize($this->db->escape($status)).")"; $resql = $this->db->query($sql); if ($resql) @@ -1189,8 +1159,7 @@ class Holiday extends CommonObject break; } } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return array('morning'=>$isavailablemorning, 'afternoon'=>$isavailableafternoon); } @@ -1209,7 +1178,11 @@ class Holiday extends CommonObject $result = ''; - $label = $langs->trans("Show").': '.$this->ref; + $label = img_picto('', $this->picto).' '.$langs->trans("Holiday").''; + $label .= '
'.$langs->trans('Ref').': '.$this->ref; + if (isset($this->statut)) { + $label .= '
'.$langs->trans("Status").": ".$this->getLibStatut(5); + } $url = DOL_URL_ROOT.'/holiday/card.php?id='.$this->id; @@ -1300,21 +1273,22 @@ class Holiday extends CommonObject $nb = count($name) + 1; // Select HTML - $statut = ''."\n"; + $out .= ''."\n"; // Boucle des statuts for ($i = 1; $i < $nb; $i++) { if ($i == $selected) { - $statut .= ''."\n"; - } - else { - $statut .= ''."\n"; + $out .= ''."\n"; + } else { + $out .= ''."\n"; } } - $statut .= ''."\n"; - print $statut; + $out .= ''."\n"; + $out .= ajax_combobox($htmlname); + + print $out; } /** @@ -1328,8 +1302,8 @@ class Holiday extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET"; - $sql .= " value = '".$value."'"; - $sql .= " WHERE name = '".$name."'"; + $sql .= " value = '".$this->db->escape($value)."'"; + $sql .= " WHERE name = '".$this->db->escape($name)."'"; dol_syslog(get_class($this).'::updateConfCP name='.$name.'', LOG_DEBUG); $result = $this->db->query($sql); @@ -1370,20 +1344,14 @@ class Holiday extends CommonObject if ($result) { return $createifnotfound; - } - else - { + } else { $this->error = $this->db->lasterror(); return -2; } - } - else - { + } else { return ''; } - } - else - { + } else { return $obj->value; } } else { @@ -1463,18 +1431,14 @@ class Holiday extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } } return 0; - } - else - { + } else { // Mise à jour pour un utilisateur $nbHoliday = price2num($nbHoliday, 5); @@ -1497,9 +1461,7 @@ class Holiday extends CommonObject $error++; $this->errors[] = $this->db->lasterror(); } - } - else - { + } else { // Insert for user $sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday_users(nb_holiday, fk_user, fk_type) VALUES ("; $sql .= $nbHoliday; @@ -1511,9 +1473,7 @@ class Holiday extends CommonObject $this->errors[] = $this->db->lasterror(); } } - } - else - { + } else { $this->errors[] = $this->db->lasterror(); $error++; } @@ -1521,9 +1481,7 @@ class Holiday extends CommonObject if (!$error) { return 1; - } - else - { + } else { return -1; } } @@ -1540,7 +1498,7 @@ class Holiday extends CommonObject $sql = "SELECT value"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday_config"; - $sql .= " WHERE name = '".$name."'"; + $sql .= " WHERE name = '".$this->db->escape($name)."'"; $result = $this->db->query($sql); @@ -1564,7 +1522,7 @@ class Holiday extends CommonObject */ public function createCPusers($single = false, $userid = '') { - // Si c'est l'ensemble des utilisateurs à ajouter + // do we have to add balance for all users ? if (!$single) { dol_syslog(get_class($this).'::createCPusers'); @@ -1574,17 +1532,15 @@ class Holiday extends CommonObject { $sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday_users"; $sql .= " (fk_user, nb_holiday)"; - $sql .= " VALUES ('".$users['rowid']."','0')"; + $sql .= " VALUES (".((int) $users['rowid'])."', '0')"; $resql = $this->db->query($sql); if (!$resql) dol_print_error($this->db); } - } - else - { + } else { $sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday_users"; $sql .= " (fk_user, nb_holiday)"; - $sql .= " VALUES ('".$userid."','0')"; + $sql .= " VALUES (".((int) $userid)."', '0')"; $resql = $this->db->query($sql); if (!$resql) dol_print_error($this->db); @@ -1601,7 +1557,7 @@ class Holiday extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."holiday_users"; - $sql .= " WHERE fk_user = '".$user_id."'"; + $sql .= " WHERE fk_user = ".((int) $user_id); $this->db->query($sql); } @@ -1629,9 +1585,7 @@ class Holiday extends CommonObject //return number_format($obj->nb_holiday,2); if ($obj) return $obj->nb_holiday; else return null; - } - else - { + } else { return null; } } @@ -1668,9 +1622,7 @@ class Holiday extends CommonObject $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; $sql .= " OR u.entity = 0)"; // Show always superadmin - } - else - { + } else { $sql .= " WHERE u.entity IN (".getEntity('user').")"; } $sql .= " AND u.statut > 0"; @@ -1699,16 +1651,12 @@ class Holiday extends CommonObject } // Retoune le tableau des utilisateurs return $stringlist; - } - else - { + } else { // Erreur SQL $this->error = "Error ".$this->db->lasterror(); return -1; } - } - else - { + } else { // We want only list of vacation balance for user ids $sql = "SELECT DISTINCT cpu.fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u"; @@ -1738,17 +1686,13 @@ class Holiday extends CommonObject } // Retoune le tableau des utilisateurs return $stringlist; - } - else - { + } else { // Erreur SQL $this->error = "Error ".$this->db->lasterror(); return -1; } } - } - else - { + } else { // Si faux donc return array // List for Dolibarr users if ($type) @@ -1767,9 +1711,7 @@ class Holiday extends CommonObject $sql .= " WHERE ((ug.fk_user = u.rowid"; $sql .= " AND ug.entity IN (".getEntity('usergroup')."))"; $sql .= " OR u.entity = 0)"; // Show always superadmin - } - else - { + } else { $sql .= " WHERE u.entity IN (".getEntity('user').")"; } @@ -1810,9 +1752,7 @@ class Holiday extends CommonObject $this->errors[] = "Error ".$this->db->lasterror(); return -1; } - } - else - { + } else { // List of vacation balance users $sql = "SELECT cpu.fk_type, cpu.nb_holiday, u.rowid, u.lastname, u.firstname, u.gender, u.photo, u.employee, u.statut, u.fk_user"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday_users as cpu, ".MAIN_DB_PREFIX."user as u"; @@ -1850,9 +1790,7 @@ class Holiday extends CommonObject } // Retoune le tableau des utilisateurs return $tab_result; - } - else - { + } else { // Erreur SQL $this->error = "Error ".$this->db->lasterror(); return -1; @@ -1895,9 +1833,7 @@ class Holiday extends CommonObject $i++; } return $users_validator; - } - else - { + } else { $this->error = $this->db->lasterror(); dol_syslog(get_class($this)."::fetch_users_approver_holiday Error ".$this->error, LOG_ERR); return -1; @@ -1989,11 +1925,11 @@ class Holiday extends CommonObject $sql .= "fk_type"; $sql .= ") VALUES ("; $sql .= " '".$this->db->idate(dol_now())."',"; - $sql .= " '".$fk_user_action."',"; - $sql .= " '".$fk_user_update."',"; + $sql .= " '".$this->db->escape($fk_user_action)."',"; + $sql .= " '".$this->db->escape($fk_user_update)."',"; $sql .= " '".$this->db->escape($label)."',"; - $sql .= " '".$prev_solde."',"; - $sql .= " '".$new_solde."',"; + $sql .= " '".$this->db->escape($prev_solde)."',"; + $sql .= " '".$this->db->escape($new_solde)."',"; $sql .= " ".$fk_type; $sql .= ")"; @@ -2018,9 +1954,7 @@ class Holiday extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->optRowid; } @@ -2091,9 +2025,7 @@ class Holiday extends CommonObject // Retourne 1 et ajoute le tableau à la variable $this->logs = $tab_result; return 1; - } - else - { + } else { // Erreur SQL $this->error = "Error ".$this->db->lasterror(); return -1; @@ -2131,8 +2063,7 @@ class Holiday extends CommonObject return $types; } - } - else dol_print_error($this->db); + } else dol_print_error($this->db); return array(); } @@ -2195,9 +2126,7 @@ class Holiday extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; @@ -2253,9 +2182,7 @@ class Holiday extends CommonObject } return $response; - } - else - { + } else { dol_print_error($this->db); $this->error = $this->db->error(); return -1; diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index 5e8798d901a..af646984045 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -41,8 +41,8 @@ $search_supervisor = GETPOST('search_supervisor', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -232,9 +232,7 @@ if (count($typeleaves) == 0) print $langs->trans("NoLeaveWithCounterDefined")."
\n"; print $langs->trans("GoIntoDictionaryHolidayTypes"); //print '
'; -} -else -{ +} else { $canedit = 0; if (!empty($user->rights->holiday->define_holiday)) $canedit = 1; @@ -260,9 +258,7 @@ else { print ''; } - } - else - { + } else { print ''; } print ''; @@ -285,9 +281,7 @@ else $labeltype = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']); print_liste_field_titre($labeltype, $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center '); } - } - else - { + } else { print_liste_field_titre('NoLeaveWithCounterDefined', $_SERVER["PHP_SELF"], '', '', '', ''); } print_liste_field_titre((empty($user->rights->holiday->define_holiday) ? '' : 'Note'), $_SERVER["PHP_SELF"]); @@ -342,9 +336,7 @@ else //print ' '.$langs->trans('days'); print ''."\n"; } - } - else - { + } else { print ''; } diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index a0f8723b92d..bdd791e80f1 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -41,7 +41,7 @@ $langs->loadLangs(array('other', 'holiday', 'companies')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -50,8 +50,8 @@ $result = restrictedArea($user, 'holiday', $id, 'holiday'); // Get parameters $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -130,7 +130,8 @@ if ($object->id) print ''.$langs->trans("Type").''; print ''; $typeleaves = $object->getTypes(1, -1); - print empty($typeleaves[$object->fk_type]['label']) ? $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type) : $typeleaves[$object->fk_type]['label']; + $labeltoshow = (($typeleaves[$object->fk_type]['code'] && $langs->trans($typeleaves[$object->fk_type]['code']) != $typeleaves[$object->fk_type]['code']) ? $langs->trans($typeleaves[$object->fk_type]['code']) : $typeleaves[$object->fk_type]['label']); + print empty($labeltoshow) ? $langs->trans("TypeWasDisabledOrRemoved", $object->fk_type) : $labeltoshow; print ''; print ''; @@ -140,17 +141,19 @@ if ($object->id) if (!$edit) { print ''; - print ''.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'; + print ''; + print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday")); + print ''; print ''.dol_print_date($object->date_debut, 'day'); print '     '; print ''.$langs->trans($listhalfday[$starthalfday]).''; print ''; print ''; - } - else - { + } else { print ''; - print ''.$langs->trans('DateDebCP').' ('.$langs->trans("FirstDayOfHoliday").')'; + print ''; + print $form->textwithpicto($langs->trans('DateDebCP'), $langs->trans("FirstDayOfHoliday")); + print ''; print ''; print $form->selectDate($object->date_debut, 'date_debut_'); print '     '; @@ -162,17 +165,19 @@ if ($object->id) if (!$edit) { print ''; - print ''.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'; + print ''; + print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday")); + print ''; print ''.dol_print_date($object->date_fin, 'day'); print '     '; print ''.$langs->trans($listhalfday[$endhalfday]).''; print ''; print ''; - } - else - { + } else { print ''; - print ''.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')'; + print ''; + print $form->textwithpicto($langs->trans('DateFinCP'), $langs->trans("LastDayOfHoliday")); + print ''; print ''; print $form->selectDate($object->date_fin, 'date_fin_'); print '     '; @@ -180,8 +185,17 @@ if ($object->id) print ''; print ''; } + + // Nb days consumed print ''; - print ''.$langs->trans('NbUseDaysCP').''; + print ''; + $htmlhelp = $langs->trans('NbUseDaysCPHelp'); + $includesaturday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY : 1); + $includesunday = (isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY) ? $conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY : 1); + if ($includesaturday) $htmlhelp .= '
'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Saturday")); + if ($includesunday) $htmlhelp .= '
'.$langs->trans("DayIsANonWorkingDay", $langs->trans("Sunday")); + print $form->textwithpicto($langs->trans('NbUseDaysCP'), $htmlhelp); + print ''; print ''.num_open_day($object->date_debut_gmt, $object->date_fin_gmt, 0, 1, $object->halfday).''; print ''; @@ -200,9 +214,7 @@ if ($object->id) print ''.$langs->trans('DescCP').''; print ''.nl2br($object->description).''; print ''; - } - else - { + } else { print ''; print ''.$langs->trans('DescCP').''; print ''; @@ -289,9 +301,7 @@ if ($object->id) $permtoedit = $user->rights->holiday->write; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 42faecc5588..0cd0489c701 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -83,8 +83,8 @@ $diroutputmassaction = $conf->holiday->dir_output.'/temp/massgeneration/'.$user- // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -106,7 +106,7 @@ $search_month_end = GETPOST('search_month_end', 'int'); $search_year_end = GETPOST('search_year_end', 'int'); $search_employee = GETPOST('search_employee', 'int'); $search_valideur = GETPOST('search_valideur', 'int'); -$search_statut = GETPOST('search_statut', 'int'); +$search_status = GETPOST('search_status', 'int'); $search_type = GETPOST('search_type', 'int'); // Initialize technical objects @@ -182,7 +182,7 @@ if (empty($reshook)) $search_year_end = ""; $search_employee = ""; $search_valideur = ""; - $search_statut = ""; + $search_status = ""; $search_type = ''; $toselect = ''; $search_array_options = array(); @@ -253,7 +253,7 @@ $sql .= " cp.description,"; $sql .= " cp.date_debut,"; $sql .= " cp.date_fin,"; $sql .= " cp.halfday,"; -$sql .= " cp.statut,"; +$sql .= " cp.statut as status,"; $sql .= " cp.fk_validator,"; $sql .= " cp.date_valid,"; $sql .= " cp.fk_user_valid,"; @@ -268,7 +268,7 @@ $sql .= " uu.firstname as user_firstname,"; $sql .= " uu.admin as user_admin,"; $sql .= " uu.email as user_email,"; $sql .= " uu.login as user_login,"; -$sql .= " uu.statut as user_statut,"; +$sql .= " uu.statut as user_status,"; $sql .= " uu.photo as user_photo,"; $sql .= " ua.lastname as validator_lastname,"; @@ -276,7 +276,7 @@ $sql .= " ua.firstname as validator_firstname,"; $sql .= " ua.admin as validator_admin,"; $sql .= " ua.email as validator_email,"; $sql .= " ua.login as validator_login,"; -$sql .= " ua.statut as validator_statut,"; +$sql .= " ua.statut as validator_status,"; $sql .= " ua.photo as validator_photo"; // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { @@ -311,11 +311,11 @@ if (!empty($search_valideur) && $search_valideur != -1) { } // Type if (!empty($search_type) && $search_type != -1) { - $sql .= ' AND cp.fk_type IN ('.$db->escape($search_type).')'; + $sql .= ' AND cp.fk_type IN ('.$db->sanitize($db->escape($search_type)).')'; } // Status -if (!empty($search_statut) && $search_statut != -1) { - $sql .= " AND cp.statut = '".$db->escape($search_statut)."'\n"; +if (!empty($search_status) && $search_status != -1) { + $sql .= " AND cp.statut = '".$db->escape($search_status)."'\n"; } if (empty($user->rights->holiday->read_all)) $sql .= ' AND cp.fk_user IN ('.join(',', $childids).')'; @@ -371,7 +371,7 @@ if ($resql) if ($search_employee > 0) $param .= '&search_employee='.urlencode($search_employee); if ($search_valideur > 0) $param .= '&search_valideur='.urlencode($search_valideur); if ($search_type > 0) $param .= '&search_type='.urlencode($search_type); - if ($search_statut > 0) $param .= '&search_statut='.urlencode($search_statut); + if ($search_status > 0) $param .= '&search_status='.urlencode($search_status); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; @@ -421,24 +421,18 @@ if ($resql) print '
'; - $canedit = (($user->id == $user_id && $user->rights->holiday->write) || ($user->id != $user_id && $user->rights->holiday->write_all)); + $canedit = (($user->id == $user_id && $user->rights->holiday->write) || ($user->id != $user_id && (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->holiday->writeall_advance)))); if ($canedit) { - print ''.$langs->trans("AddCP").''; + print ''.$langs->trans("AddCP").''; } print '
'; - } - else - { + } else { $title = $langs->trans("ListeCP"); - $newcardbutton = ''; - if ($user->rights->holiday->write) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=request'); - } + $newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=create', '', $user->rights->holiday->write); print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1); } @@ -506,7 +500,7 @@ if ($resql) } print ''; - print $form->select_dolusers($search_employee, "search_employee", 1, "", $disabled, $include, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); + print $form->select_dolusers($search_employee, "search_employee", 1, "", $disabled, $include, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth150'); print ''; } @@ -521,11 +515,9 @@ if ($resql) $valideurobjects = $validator->listUsersForGroup($excludefilter); $valideurarray = array(); foreach ($valideurobjects as $val) $valideurarray[$val->id] = $val->id; - print $form->select_dolusers($search_valideur, "search_valideur", 1, "", 0, $valideurarray, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); + print $form->select_dolusers($search_valideur, "search_valideur", 1, "", 0, $valideurarray, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth150'); print ''; - } - else - { + } else { print ' '; } } @@ -545,7 +537,7 @@ if ($resql) //$labeltoshow .= ($val['delay'] > 0 ? ' ('.$langs->trans("NoticePeriod").': '.$val['delay'].' '.$langs->trans("days").')':''); $arraytypeleaves[$val['rowid']] = $labeltoshow; } - print $form->selectarray('search_type', $arraytypeleaves, $search_type, 1); + print $form->selectarray('search_type', $arraytypeleaves, $search_type, 1, 0, 0, '', 0, 0, 0, '', '', 1); } print ''; } @@ -603,7 +595,7 @@ if ($resql) if (!empty($arrayfields['cp.statut']['checked'])) { print ''; - $object->selectStatutCP($search_statut, 'search_statut'); + $object->selectStatutCP($search_status, 'search_status'); print ''; } @@ -620,7 +612,7 @@ if ($resql) if (!empty($arrayfields['cp.fk_user']['checked'])) print_liste_field_titre($arrayfields['cp.fk_user']['label'], $_SERVER["PHP_SELF"], "cp.fk_user", "", $param, '', $sortfield, $sortorder); if (!empty($arrayfields['cp.fk_validator']['checked'])) print_liste_field_titre($arrayfields['cp.fk_validator']['label'], $_SERVER["PHP_SELF"], "cp.fk_validator", "", $param, '', $sortfield, $sortorder); if (!empty($arrayfields['cp.fk_type']['checked'])) print_liste_field_titre($arrayfields['cp.fk_type']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['duration']['checked'])) print_liste_field_titre($arrayfields['duration']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['duration']['checked'])) print_liste_field_titre($arrayfields['duration']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right maxwidth100'); if (!empty($arrayfields['cp.date_debut']['checked'])) print_liste_field_titre($arrayfields['cp.date_debut']['label'], $_SERVER["PHP_SELF"], "cp.date_debut", "", $param, '', $sortfield, $sortorder, 'center '); if (!empty($arrayfields['cp.date_fin']['checked'])) print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], "cp.date_fin", "", $param, '', $sortfield, $sortorder, 'center '); // Extra fields @@ -643,8 +635,7 @@ if ($resql) $langs->load("errors"); print ''.$langs->trans("NotEnoughPermissions").''; $result = 0; - } - elseif ($num > 0 && !empty($mysoc->country_id)) + } elseif ($num > 0 && !empty($mysoc->country_id)) { // Lines $userstatic = new User($db); @@ -661,6 +652,7 @@ if ($resql) // Leave request $holidaystatic->id = $obj->rowid; $holidaystatic->ref = ($obj->ref ? $obj->ref : $obj->rowid); + $holidaystatic->statut = $obj->status; // User $userstatic->id = $obj->fk_user; @@ -669,7 +661,7 @@ if ($resql) $userstatic->admin = $obj->user_admin; $userstatic->email = $obj->user_email; $userstatic->login = $obj->user_login; - $userstatic->statut = $obj->user_statut; + $userstatic->statut = $obj->user_status; $userstatic->photo = $obj->user_photo; // Validator @@ -679,7 +671,7 @@ if ($resql) $approbatorstatic->admin = $obj->validator_admin; $approbatorstatic->email = $obj->validator_email; $approbatorstatic->login = $obj->validator_login; - $approbatorstatic->statut = $obj->validator_statut; + $approbatorstatic->statut = $obj->validator_status; $approbatorstatic->photo = $obj->validator_photo; $date = $obj->date_create; @@ -699,12 +691,12 @@ if ($resql) } if (!empty($arrayfields['cp.fk_user']['checked'])) { - print ''.$userstatic->getNomUrl(-1, 'leave').''; + print ''.$userstatic->getNomUrl(-1, 'leave').''; if (!$i) $totalarray['nbfield']++; } if (!empty($arrayfields['cp.fk_validator']['checked'])) { - print ''.$approbatorstatic->getNomUrl(-1).''; + print ''.$approbatorstatic->getNomUrl(-1).''; if (!$i) $totalarray['nbfield']++; } if (!empty($arrayfields['cp.fk_type']['checked'])) @@ -727,7 +719,7 @@ if ($resql) { print ''; print dol_print_date($db->jdate($obj->date_debut), 'day'); - print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; + print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; print ''; if (!$i) $totalarray['nbfield']++; } @@ -735,7 +727,7 @@ if ($resql) { print ''; print dol_print_date($db->jdate($obj->date_fin), 'day'); - print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; + print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; print ''; if (!$i) $totalarray['nbfield']++; } @@ -760,7 +752,7 @@ if ($resql) } if (!empty($arrayfields['cp.statut']['checked'])) { - print ''.$holidaystatic->LibStatut($obj->statut, 5).''; + print ''.$holidaystatic->getLibStatut(5).''; if (!$i) $totalarray['nbfield']++; } @@ -793,9 +785,7 @@ if ($resql) print ''; print ''; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 0444157704b..7e7e7ed29f9 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -2,6 +2,7 @@ /* Copyright (C) 2007-2010 Laurent Destailleur * Copyright (C) 2011 François Legastelois * Copyright (C) 2018-2019 Frédéric France + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -42,13 +43,85 @@ if ($user->socid > 0) // Protection if external user } $result = restrictedArea($user, 'holiday', $id, ''); +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; +$massaction = GETPOST('massaction', 'alpha'); +$contextpage = GETPOST('contextpage', 'aZ'); +$optioncss = GETPOST('optioncss', 'aZ'); + +$search_ref = GETPOST('search_ref', 'alphanohtml'); +$search_employee = GETPOST('search_employee', 'int'); +$search_type = GETPOST('search_type', 'int'); +$search_description = GETPOST('search_description', 'alphanohtml'); + +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'alpha'); + +if (! $sortfield) $sortfield = "cp.rowid"; +if (! $sortorder) $sortorder = "ASC"; + +$hookmanager->initHooks(array('leavemovementlist')); + +$arrayfields = array(); +$arrayofmassactions = array(); + +/* + * Actions + */ + +if (GETPOST('cancel', 'alpha')) { $action = 'list'; $massaction = ''; } +if (!GETPOST('confirmmassaction', 'alpha') && $massaction != 'presend' && $massaction != 'confirm_presend') { $massaction = ''; } + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) +{ + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers + { + $search_ref = ''; + $search_employee = ''; + $search_type = ''; + $search_description = ''; + $toselect = ''; + $search_array_options = array(); + } + + if (GETPOST('button_removefilter_x', 'alpha') + || GETPOST('button_removefilter.x', 'alpha') + || GETPOST('button_removefilter', 'alpha') + || GETPOST('button_search_x', 'alpha') + || GETPOST('button_search.x', 'alpha') + || GETPOST('button_search', 'alpha')) + { + $massaction = ''; + } +} + +$arrayfields = array( + 'cp.ref'=>array('label'=>$langs->trans('Ref'), 'checked'=>1), + 'cp.fk_user'=>array('label'=>$langs->trans('Employee'), 'checked'=>1), + 'ct.label'=>array('label'=>$langs->trans('Type'), 'checked'=>1), + 'cp.date_debut'=>array('label'=>$langs->trans('DateDebCP'), 'checked'=>1), + 'cp.date_fin'=>array('label'=>$langs->trans('DateFinCP'), 'checked'=>1), + 'used_days'=>array('label'=>$langs->trans('NbUseDaysCPShort'), 'checked'=>1), + 'date_start_month'=>array('label'=>$langs->trans('DateStartInMonth'), 'checked'=>1), + 'date_end_month'=>array('label'=>$langs->trans('DateEndInMonth'), 'checked'=>1), + 'used_days_month'=>array('label'=>$langs->trans('NbUseDaysCPShortInMonth'), 'checked'=>1), + 'cp.description'=>array('label'=>$langs->trans('DescCP'), 'checked'=>1), +); /* * View */ -$html = new Form($db); +$form = new Form($db); $formother = new FormOther($db); $holidaystatic = new Holiday($db); @@ -56,36 +129,24 @@ $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->t llxHeader('', $langs->trans('CPTitreMenu')); -print load_fiche_titre($langs->trans('MenuReportMonth'), '', 'title_hrm'); - - -// Selection filter -print '
'; - -print '
'."\n"; - $search_month = GETPOST("remonth", 'int') ?GETPOST("remonth", 'int') : date("m", time()); $search_year = GETPOST("reyear", 'int') ?GETPOST("reyear", 'int') : date("Y", time()); - $year_month = sprintf("%04d", $search_year).'-'.sprintf("%02d", $search_month); -print $formother->select_month($search_month, 'remonth'); +$sql = "SELECT cp.rowid, cp.ref, cp.fk_user, cp.date_debut, cp.date_fin, ct.label, cp.description, cp.halfday"; +$sql.= " FROM ".MAIN_DB_PREFIX."holiday cp"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid"; +$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_holiday_types ct ON cp.fk_type = ct.rowid"; +$sql.= " WHERE cp.rowid > 0"; +$sql.= " AND cp.statut = 3"; // 3 = Approved +$sql.= " AND (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')"; -print $formother->select_year($search_year, 'reyear'); +if (!empty($search_ref)) $sql .= natural_search('cp.ref', $search_ref); +if (!empty($search_employee)) $sql .= " AND cp.fk_user = '".$db->escape($search_employee)."'"; +if (!empty($search_type)) $sql .= ' AND cp.fk_type IN ('.$db->escape($search_type).')'; +if (!empty($search_description)) $sql.= natural_search('cp.description', $search_description); -print ''; - -print '
'; - - -$sql = "SELECT cp.rowid, cp.fk_user, cp.date_debut, cp.date_fin, ct.label, cp.description, cp.halfday"; -$sql .= " FROM ".MAIN_DB_PREFIX."holiday cp"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid"; -$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_holiday_types ct ON cp.fk_type = ct.rowid"; -$sql .= " WHERE cp.rowid > 0"; -$sql .= " AND cp.statut = 3"; // Approved -$sql .= " AND (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')"; -$sql .= " ORDER BY u.lastname, cp.date_debut"; +$sql.= $db->order($sortfield, $sortorder); $resql = $db->query($sql); if (empty($resql)) @@ -96,33 +157,115 @@ if (empty($resql)) $num = $db->num_rows($resql); +$param = ''; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param.= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +if (!empty($search_ref)) $param .= '&search_ref='.urlencode($search_ref); +if (!empty($search_employee)) $param .= '&search_employee='.urlencode($search_employee); +if (!empty($search_type)) $param .= '&search_type='.urlencode($search_type); +if (!empty($search_description)) $param .= '&search_description='.urlencode($search_description); + +print '
'; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +print load_fiche_titre($langs->trans('MenuReportMonth'), '', 'title_hrm'); + +// Selection filter +print '
'; +print $formother->select_month($search_month, 'remonth'); +print $formother->select_year($search_year, 'reyear'); +print ''; print '
'; - - print '
'; +$moreforfilter = ''; + +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = ''; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields.= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); + print '
'; print ''; print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; + +// Filter: Ref +if (!empty($arrayfields['cp.ref']['checked'])) { + print ''; +} + +// Filter: Employee +if (!empty($arrayfields['cp.fk_user']['checked'])) { + print ''; +} + +// Filter: Type +if (!empty($arrayfields['ct.label']['checked'])) { + $typeleaves = $holidaystatic->getTypes(1, -1); + $arraytypeleaves = array(); + foreach ($typeleaves as $key => $val) + { + $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']); + $arraytypeleaves[$val['rowid']] = $labeltoshow; + } + + print ''; +} + +if (!empty($arrayfields['cp.date_debut']['checked'])) print ''; +if (!empty($arrayfields['cp.date_fin']['checked'])) print ''; +if (!empty($arrayfields['used_days']['checked'])) print ''; +if (!empty($arrayfields['date_start_month']['checked'])) print ''; +if (!empty($arrayfields['date_end_month']['checked'])) print ''; +if (!empty($arrayfields['used_days_month']['checked'])) print ''; + +// Filter: Description +if (!empty($arrayfields['cp.description']['checked'])) { + print ''; +} + +// Action column +print ''; +print ''; + +print ''; +if (!empty($arrayfields['cp.ref']['checked'])) print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], 'cp.ref', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cp.fk_user']['checked'])) print_liste_field_titre($arrayfields['cp.fk_user']['label'], $_SERVER["PHP_SELF"], 'cp.fk_user', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['ct.label']['checked'])) print_liste_field_titre($arrayfields['ct.label']['label'], $_SERVER["PHP_SELF"], 'ct.label', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cp.date_debut']['checked'])) print_liste_field_titre($arrayfields['cp.date_debut']['label'], $_SERVER["PHP_SELF"], 'cp.date_debut', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cp.date_fin']['checked'])) print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], 'cp.date_fin', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['used_days']['checked'])) print_liste_field_titre($arrayfields['used_days']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['date_start_month']['checked'])) print_liste_field_titre($arrayfields['date_start_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['date_end_month']['checked'])) print_liste_field_titre($arrayfields['date_end_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['used_days_month']['checked'])) print_liste_field_titre($arrayfields['used_days_month']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cp.description']['checked'])) print_liste_field_titre($arrayfields['cp.description']['label'], $_SERVER["PHP_SELF"], 'cp.description', '', '', '', $sortfield, $sortorder); +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; print ''; if ($num == 0) { print ''; } -else -{ +else { while ($obj = $db->fetch_object($resql)) { $user = new User($db); @@ -163,34 +306,54 @@ else // Leave request $holidaystatic->id = $obj->rowid; - $holidaystatic->ref = $obj->rowid; + $holidaystatic->ref = $obj->ref; print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; + + if (!empty($arrayfields['cp.ref']['checked'])) print ''; + if (!empty($arrayfields['cp.fk_user']['checked'])) print ''; + if (!empty($arrayfields['ct.label']['checked'])) print ''; + + if (!empty($arrayfields['cp.date_debut']['checked'])) + { + print ''; + } + + if (!empty($arrayfields['cp.date_fin']['checked'])) + { + print ''; + } + + if (!empty($arrayfields['used_days']['checked'])) print ''; + + if (!empty($arrayfields['date_start_month']['checked'])) + { + print ''; + } + + if (!empty($arrayfields['date_end_month']['checked'])) + { + print ''; + } + + if (!empty($arrayfields['used_days_month']['checked'])) print ''; + if (!empty($arrayfields['cp.description']['checked'])) print ''; + + print ''; print ''; } } print '
'.$langs->trans('Ref').''.$langs->trans('Employee').''.$langs->trans('Type').''.$langs->trans('DateDebCP').''.$langs->trans('DateFinCP').''.$langs->trans('NbUseDaysCPShort').''.$langs->trans('DateStartInMonth').''.$langs->trans('DateEndInMonth').''.$langs->trans('NbUseDaysCPShortInMonth').''.$langs->trans('DescCP').''; + print ''; + print ''; + print $form->select_dolusers($search_employee, "search_employee", 1, null, 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth200'); + print ''; + print $form->selectarray('search_type', $arraytypeleaves, $search_type, 1, 0, 0, '', 0, 0, 0, '', '', 1); + print ''; + print ''; + print ''; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +print '
'.$langs->trans('None').'
'; - print $holidaystatic->getNomUrl(1, 1); - print ''.$user->getFullName($langs).''.$obj->label.''.dol_print_date($db->jdate($obj->date_debut), 'day'); - print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; - print ''.dol_print_date($db->jdate($obj->date_fin), 'day'); - print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; - print ''.num_open_day($date_start, $date_end, 0, 1, $obj->halfday).''.dol_print_date($date_start_inmonth, 'day'); - print ' ('.$langs->trans($listhalfday[$starthalfdayinmonth]).')'; - print ''.dol_print_date($date_end_inmonth, 'day'); - print ' ('.$langs->trans($listhalfday[$endhalfdayinmonth]).')'; - print ''.num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth).''.dol_escape_htmltag(dolGetFirstLineOfText($obj->description)).''.$holidaystatic->getNomUrl(1, 1).''.$user->getFullName($langs).''.$obj->label.''.dol_print_date($db->jdate($obj->date_debut), 'day'); + print ' ('.$langs->trans($listhalfday[$starthalfday]).')'; + print ''.dol_print_date($db->jdate($obj->date_fin), 'day'); + print ' ('.$langs->trans($listhalfday[$endhalfday]).')'; + print ''.num_open_day($date_start, $date_end, 0, 1, $obj->halfday).''.dol_print_date($date_start_inmonth, 'day'); + print ' ('.$langs->trans($listhalfday[$starthalfdayinmonth]).')'; + print ''.dol_print_date($date_end_inmonth, 'day'); + print ' ('.$langs->trans($listhalfday[$endhalfdayinmonth]).')'; + print ''.num_open_day($date_start_inmonth, $date_end_inmonth, 0, 1, $halfdayinmonth).''.dol_escape_htmltag(dolGetFirstLineOfText($obj->description)).'
'; print '
'; +print '
'; // End of page llxFooter(); diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index ce394cbd691..7043f436e87 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -1,6 +1,7 @@ * Copyright (C) 2011 Dimitri Mouillard + * Copyright (C) 2020 Tobias Sekan * * 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 @@ -24,43 +25,48 @@ */ require '../main.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; -require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php'; -require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; -$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... -$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) -$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') - -$search_id = GETPOST('search_id', 'alpha'); -$year = GETPOST('year'); -if (empty($year)) -{ - $tmpdate = dol_getdate(dol_now()); - $year = $tmpdate['year']; +// Security check (access forbidden for external user too) +if (empty($user->rights->holiday->define_holiday) || $user->socid > 0) { + accessforbidden(); } +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; +require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php'; + +$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) +$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ? +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') + +$search_id = GETPOST('search_id', 'alphanohtml'); +$search_month = GETPOST('search_month', 'int'); +$search_year = GETPOST('search_year', 'int'); +$search_employee = GETPOST('search_employee', 'int'); +$search_validator = GETPOST('search_validator', 'int'); +$search_description = GETPOST('search_description', 'alphanohtml'); +$search_type = GETPOST('search_type', 'int'); +$search_prev_solde = GETPOST('search_prev_solde', 'alphanohtml'); +$search_new_solde = GETPOST('search_new_solde', 'alphanohtml'); + // Load variable for pagination -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; $pageprev = $page - 1; $pagenext = $page + 1; -//if (! $sortfield) $sortfield="p.date_fin"; -//if (! $sortorder) $sortorder="DESC"; - - -// Protection if external user -if ($user->socid > 0) accessforbidden(); +if (! $sortfield) $sortfield="cpl.rowid"; +if (! $sortorder) $sortorder="DESC"; // Si l'utilisateur n'a pas le droit de lire cette page if (!$user->rights->holiday->read_all) accessforbidden(); @@ -89,61 +95,126 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) -{ - // Selection of new fields - include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; +if (empty($reshook)) { + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; - // Purge search criteria - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers - { - $search_id = ''; - $toselect = ''; - $search_array_options = array(); - } - if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') - || GETPOST('button_search_x', 'alpha') || GETPOST('button_search.x', 'alpha') || GETPOST('button_search', 'alpha')) - { - $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation - } + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers + $search_id = ''; + $search_month = ''; + $search_year = ''; + $search_employee = ''; + $search_validator = ''; + $search_description = ''; + $search_type = ''; + $search_prev_solde = ''; + $search_new_solde = ''; + $toselect = ''; + $search_array_options = array(); + } - // Mass actions - /*$objectclass='MyObject'; - $objectlabel='MyObject'; - $permissiontoread = $user->rights->mymodule->read; - $permissiontodelete = $user->rights->mymodule->delete; - $uploaddir = $conf->mymodule->dir_output; - include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; - */ + if (GETPOST('button_removefilter_x', 'alpha') + || GETPOST('button_removefilter.x', 'alpha') + || GETPOST('button_removefilter', 'alpha') + || GETPOST('button_search_x', 'alpha') + || GETPOST('button_search.x', 'alpha') + || GETPOST('button_search', 'alpha')) + { + $massaction = ''; // Protection to avoid mass action if we force a new search during a mass action confirmation + } + + // Mass actions + /*$objectclass='MyObject'; + $objectlabel='MyObject'; + $permissiontoread = $user->rights->mymodule->read; + $permissiontodelete = $user->rights->mymodule->delete; + $uploaddir = $conf->mymodule->dir_output; + include DOL_DOCUMENT_ROOT.'/core/actions_massactions.inc.php'; + */ } +// Definition of fields for lists +$arrayfields = array( + 'cpl.rowid'=>array('label'=>$langs->trans("ID"), 'checked'=>1), + 'cpl.date_action'=>array('label'=>$langs->trans("Date"), 'checked'=>1), + 'cpl.fk_user_action'=>array('label'=>$langs->trans("ActionByCP"), 'checked'=>1), + 'cpl.fk_user_update'=>array('label'=>$langs->trans("UserUpdateCP"), 'checked'=>1), + 'cpl.type_action'=>array('label'=>$langs->trans("Description"), 'checked'=>1), + 'cpl.fk_type'=>array('label'=>$langs->trans("Type"), 'checked'=>1), + 'cpl.prev_solde'=>array('label'=>$langs->trans("PrevSoldeCP"), 'checked'=>1), + 'variation'=>array('label'=>$langs->trans("Variation"), 'checked'=>1), + 'cpl.new_solde'=>array('label'=>$langs->trans("NewSoldeCP"), 'checked'=>1), +); + /* * View */ $form = new Form($db); - +$formother = new FormOther($db); +$holidaylogstatic = new stdClass(); $alltypeleaves = $object->getTypes(1, -1); // To have labels -llxHeader('', $langs->trans('CPTitreMenu').' ('.$langs->trans("Year").' '.$year.')'); - - +llxHeader('', $langs->trans('CPTitreMenu')); $sqlwhere = ''; -$sqlwhere .= " AND date_action BETWEEN '".$db->idate(dol_get_first_day($year, 1, 1))."' AND '".$db->idate(dol_get_last_day($year, 12, 1))."'"; -if ($search_id != '') $sqlwhere .= natural_search('rowid', $search_id, 1); -$sqlorder = 'ORDER BY cpl.rowid DESC'; +if (!empty($search_year) && $search_year > 0) { + if (!empty($search_month) && $search_month > 0) { + $from_date = dol_get_first_day($search_year, $search_month, 1); + $to_date = dol_get_last_day($search_year, $search_month, 1); + } else { + $from_date = dol_get_first_day($search_year, 1, 1); + $to_date = dol_get_last_day($search_year, 12, 1); + } + + $sqlwhere .= "AND date_action BETWEEN '".$db->idate($from_date)."' AND '".$db->idate($to_date)."'"; +} + +if (!empty($search_id) && $search_id > 0) $sqlwhere.= natural_search('rowid', $search_id, 1); +if (!empty($search_validator) && $search_validator > 0) $sqlwhere.= natural_search('fk_user_action', $search_validator, 1); +if (!empty($search_employee) && $search_employee > 0) $sqlwhere.= natural_search('fk_user_update', $search_employee, 1); +if (!empty($search_description)) $sqlwhere.= natural_search('type_action', $search_description); +if (!empty($search_type) && $search_type > 0) $sqlwhere.= natural_search('fk_type', $search_type, 1); +if (!empty($search_prev_solde)) $sqlwhere.= natural_search('prev_solde', $search_prev_solde, 1); +if (!empty($search_new_solde)) $sqlwhere.= natural_search('new_solde', $search_new_solde, 1); + +$sqlorder = $db->order($sortfield, $sortorder); // Recent changes are more important than old changes $log_holiday = $object->fetchLog($sqlorder, $sqlwhere); // Load $object->logs +// Count total nb of records +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + //TODO: $result = $db->query($sql); + //TODO: $nbtotalofrecords = $db->num_rows($result); + $nbtotalofrecords = is_array($object->logs) ? count($object->logs) : 0; + + if (($page * $limit) > $nbtotalofrecords) { // if total resultset is smaller then paging size (filtering), goto and load page 0 + $page = 0; + $offset = 0; + } +} + +// TODO: $num = $db->num_rows($resql); +$num = is_array($object->logs) ? count($object->logs) : 0; + $param = ''; -if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); -if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); -if ($search_id) $param = '&search_id='.urlencode($search_id); +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +if (!empty($search_id)) $param .= '&search_statut='.urlencode($search_statut); +if (!empty($search_month) && $search_month > 0) $param .= '&search_month='.urlencode($search_month); +if (!empty($search_year) && $search_year > 0) $param .= '&search_year='.urlencode($search_year); +if (!empty($search_validator) && $search_validator > 0) $param .= '&search_validator='.urlencode($search_validator); +if (!empty($search_employee) && $search_employee > 0) $param .= '&search_employee='.urlencode($search_employee); +if (!empty($search_description)) $param .= '&search_description='.urlencode($search_description); +if (!empty($search_type) && $search_type > 0) $param .= '&search_type='.urlencode($search_type); +if (!empty($search_prev_solde)) $param .= '&search_prev_solde='.urlencode($search_prev_solde); +if (!empty($search_new_solde)) $param .= '&search_new_solde='.urlencode($search_new_solde); print '
'; if ($optioncss != '') print ''; @@ -155,43 +226,110 @@ print ''; print ''; print ''; -$pagination = ''; -print load_fiche_titre($langs->trans('LogCP'), $pagination, 'title_hrm.png'); +$newcardbutton = dolGetButtonTitle($langs->trans('MenuAddCP'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/holiday/card.php?action=request', '', $user->rights->holiday->write); +print_barre_liste($langs->trans('LogCP'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_hrm', 0, $newcardbutton, '', $limit, 0, 0, 1); + +print '
'.$langs->trans('LastUpdateCP').': '; -print '
'.$langs->trans('LastUpdateCP').': '."\n"; $lastUpdate = $object->getConfCP('lastUpdate'); -if ($lastUpdate) -{ - $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; - $yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3]; - print ''.dol_print_date($db->jdate($object->getConfCP('lastUpdate')), 'dayhour', 'tzuser').''; - print '
'.$langs->trans("MonthOfLastMonthlyUpdate").': '.$yearLastUpdate.'-'.$monthLastUpdate.''."\n"; +if ($lastUpdate) { + $monthLastUpdate = $lastUpdate[4].$lastUpdate[5]; + $yearLastUpdate = $lastUpdate[0].$lastUpdate[1].$lastUpdate[2].$lastUpdate[3]; + print ''.dol_print_date($db->jdate($object->getConfCP('lastUpdate')), 'dayhour', 'tzuser').''; + print '
'; + print $langs->trans("MonthOfLastMonthlyUpdate").': '.$yearLastUpdate.'-'.$monthLastUpdate.''; +} else { + print $langs->trans('None'); } -else print $langs->trans('None'); -print "

\n"; +print '
'; +print '
'; $moreforfilter = ''; $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; -//$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields -//$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); $selectedfields = ''; +$selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields.=(count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); print '
'; -print ''."\n"; +print '
'; -print ''; +print ''; + +// Filter Id +if (!empty($arrayfields['cpl.rowid']['checked'])) { + print ''; +} + +// Filter: Date +if (!empty($arrayfields['cpl.date_action']['checked'])) { + print ''; +} + +// Filter: Validator +if (!empty($arrayfields['cpl.fk_user_action']['checked'])) { + $validator = new UserGroup($db); + $excludefilter = $user->admin ? '' : 'u.rowid <> '.$user->id; + $valideurobjects = $validator->listUsersForGroup($excludefilter); + $valideurarray = array(); + + foreach ($valideurobjects as $val) { + $valideurarray[$val->id] = $val->id; + } + + print ''; +} + +// Filter: User +if (!empty($arrayfields['cpl.fk_user_update']['checked'])) { + print ''; +} + +// Filter: Description +if (!empty($arrayfields['cpl.type_action']['checked'])) { + print ''; +} + +// Filter: Type +if (!empty($arrayfields['cpl.fk_type']['checked'])) { + foreach ($alltypeleaves as $key => $val) { + $labeltoshow = ($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']); + $arraytypeleaves[$val['rowid']] = $labeltoshow; + } + + print ''; +} + +// Filter: Previous balance +if (!empty($arrayfields['cpl.prev_solde']['checked'])) { + print ''; +} + +// Filter: Variation (only placeholder) +if (!empty($arrayfields['variation']['checked'])) { + print ''; +} + +// Filter: New Balance +if (!empty($arrayfields['cpl.new_solde']['checked'])) { + print ''; +} -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; // Action column print ''; print ''; print ''; -print_liste_field_titre('ID'); -print_liste_field_titre('Date', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'center '); -print_liste_field_titre('ActionByCP'); -print_liste_field_titre('UserUpdateCP'); -print_liste_field_titre('Description'); -print_liste_field_titre('Type'); -print_liste_field_titre('PrevSoldeCP', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'right '); -print_liste_field_titre('Variation', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'right '); -print_liste_field_titre('NewSoldeCP', $_SERVER["PHP_SELF"], '', '', '', '', '', '', 'right '); -print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +if (!empty($arrayfields['cpl.rowid']['checked'])) print_liste_field_titre($arrayfields['cpl.rowid']['label'], $_SERVER["PHP_SELF"], 'rowid', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cpl.date_action']['checked'])) print_liste_field_titre($arrayfields['cpl.date_action']['label'], $_SERVER["PHP_SELF"], 'date_action', '', '', '', $sortfield, $sortorder, 'center '); +if (!empty($arrayfields['cpl.fk_user_action']['checked'])) print_liste_field_titre($arrayfields['cpl.fk_user_action']['label'], $_SERVER["PHP_SELF"], 'fk_user_action', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cpl.fk_user_update']['checked'])) print_liste_field_titre($arrayfields['cpl.fk_user_update']['label'], $_SERVER["PHP_SELF"], 'fk_user_update', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cpl.type_action']['checked'])) print_liste_field_titre($arrayfields['cpl.type_action']['label'], $_SERVER["PHP_SELF"], 'type_action', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cpl.fk_type']['checked'])) print_liste_field_titre($arrayfields['cpl.fk_type']['label'], $_SERVER["PHP_SELF"], 'fk_type', '', '', '', $sortfield, $sortorder); +if (!empty($arrayfields['cpl.prev_solde']['checked'])) print_liste_field_titre($arrayfields['cpl.prev_solde']['label'], $_SERVER["PHP_SELF"], 'prev_solde', '', '', '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['variation']['checked'])) print_liste_field_titre($arrayfields['variation']['label'], $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'right '); +if (!empty($arrayfields['cpl.new_solde']['checked'])) print_liste_field_titre($arrayfields['cpl.new_solde']['label'], $_SERVER["PHP_SELF"], 'new_solde', '', '', '', $sortfield, $sortorder, 'right '); +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print ''; +// TODO: $i = 0; +$i = 1; -foreach ($object->logs as $logs_CP) +while ($i < min($num, $limit)) { - $user_action = new User($db); - $user_action->fetch($logs_CP['fk_user_action']); + //TODO: $obj = $db->fetch_object($resql); + $obj = next($object->logs); - $user_update = new User($db); - $user_update->fetch($logs_CP['fk_user_update']); + $holidaylogstatic->id = $obj['rowid']; + $holidaylogstatic->date = $obj['date_action']; + $holidaylogstatic->validator = $obj['fk_user_action']; + $holidaylogstatic->employee = $obj['fk_user_update']; + $holidaylogstatic->description = $obj['type_action']; + $holidaylogstatic->type = $obj['fk_type']; + $holidaylogstatic->balance_previous = $obj['prev_solde']; + $holidaylogstatic->balance_new = $obj['new_solde']; - $delta = price2num($logs_CP['new_solde'] - $logs_CP['prev_solde'], 5); - $detasign = ($delta > 0 ? '+' : '-'); + print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''."\n"; + // Id + if (!empty($arrayfields['cpl.rowid']['checked'])) { + print ''; + } + + // Date + if (!empty($arrayfields['cpl.date_action']['checked'])) { + print ''; + } + + // Validator + if (!empty($arrayfields['cpl.fk_user_action']['checked'])) { + $user_action = new User($db); + $user_action->fetch($holidaylogstatic->validator); + print ''; + } + + // Emloyee + if (!empty($arrayfields['cpl.fk_user_update']['checked'])) { + $user_update = new User($db); + $user_update->fetch($holidaylogstatic->employee); + print ''; + } + + // Description + if (!empty($arrayfields['cpl.type_action']['checked'])) { + print ''; + } + + // Type + if (!empty($arrayfields['cpl.fk_type']['checked'])) { + if ($alltypeleaves[$holidaylogstatic->type]['code'] && $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']) != $alltypeleaves[$holidaylogstatic->type]['code']) { + $label = $langs->trans($alltypeleaves[$holidaylogstatic->type]['code']); + } else { + $label = $alltypeleaves[$holidaylogstatic->type]['label']; + } + + print ''; + } + + // Previous balance + if (!empty($arrayfields['cpl.prev_solde']['checked'])) { + print ''; + } + + // Variation + if (!empty($arrayfields['variation']['checked'])) { + $delta = price2num($holidaylogstatic->balance_new - $holidaylogstatic->balance_previous, 5); + $detasign = ($delta > 0 ? '+' : ''); + print ''; + } + + // New Balance + if (!empty($arrayfields['cpl.new_solde']['checked'])) { + print ''; + } + + // Buttons + print ''; + + print ''; + + $i++; } -if ($log_holiday == '2') -{ - print ''; - print ''; - print ''; +if ($log_holiday == '2') { + print ''; + print ''; + print ''; } -print ''."\n"; -print '
'; + print ''; + print $formother->selectyear($search_year, 'search_year', 1, 10, 5, 0, 0, '', 'maxwidth200', true); + print ''; + print $form->select_dolusers($search_validator, "search_validator", 1, "", 0, $valideurarray, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); + print ''; + print $form->select_dolusers($search_employee, "search_employee", 1, "", $disabled, $include, '', 0, 0, 0, $morefilter, 0, '', 'maxwidth200'); + print ''; + print ''; + print ''; + print $form->selectarray('search_type', $arraytypeleaves, $search_type, 1, 0, 0, '', 0, 0, 0, '', '', 1); + print ''; + print ''; + print ''; + print ''; + print '
'; $searchpicto = $form->showFilterButtons(); @@ -200,56 +338,111 @@ print '
'.$logs_CP['rowid'].''.$logs_CP['date_action'].''.$user_action->getNomUrl(-1).''.$user_update->getNomUrl(-1).''.$logs_CP['type_action'].''; - $label = (($alltypeleaves[$logs_CP['fk_type']]['code'] && $langs->trans($alltypeleaves[$logs_CP['fk_type']]['code']) != $alltypeleaves[$logs_CP['fk_type']]['code']) ? $langs->trans($alltypeleaves[$logs_CP['fk_type']]['code']) : $alltypeleaves[$logs_CP['fk_type']]['label']); - print $label ? $label : $logs_CP['fk_type']; - print ''.price2num($logs_CP['prev_solde'], 5).' '.$langs->trans('days').''.$detasign.$delta.''.price2num($logs_CP['new_solde'], 5).' '.$langs->trans('days').'
'.$holidaylogstatic->id.''.$holidaylogstatic->date.''.$user_action->getNomUrl(-1).''.$user_update->getNomUrl(-1).''.$holidaylogstatic->description.''; + print $label ? $label : $holidaylogstatic->type; + print ''.price2num($holidaylogstatic->balance_previous, 5).' '.$langs->trans('days').''.$detasign.$delta.''.price2num($holidaylogstatic->balance_new, 5).' '.$langs->trans('days').'
'.$langs->trans('NoRecordFound').'
'.$langs->trans('NoRecordFound').'
'."\n"; +print ''; print '
'; print '
'; diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index ba98812f1b2..ea266a644e0 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -32,13 +32,6 @@ if (!$user->admin) $error = 0; -// List of statut -static $tmpstatus2label = array( - '0'=>'OpenEtablishment', - '1'=>'CloseEtablishment' -); -$status2label = array(''); -foreach ($tmpstatus2label as $key => $val) $status2label[$key] = $langs->trans($val); /* * Actions @@ -51,11 +44,14 @@ foreach ($tmpstatus2label as $key => $val) $status2label[$key] = $langs->trans($ * View */ +$form = new Form($db); +$establishmenttmp = new Establishment($db); + llxHeader('', $langs->trans("Establishments")); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortorder = GETPOST("sortorder"); -$sortfield = GETPOST("sortfield"); +$sortorder = GETPOST("sortorder", 'alpha'); +$sortfield = GETPOST("sortfield", 'alpha'); if (!$sortorder) $sortorder = "DESC"; if (!$sortfield) $sortfield = "e.rowid"; @@ -68,11 +64,6 @@ $pageprev = $page - 1; $pagenext = $page + 1; $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$form = new Form($db); -$establishmenttmp = new Establishment($db); - -dol_htmloutput_mesg($mesg); - // Subheader $linkback = ''.$langs->trans("BackToModuleList").''; print load_fiche_titre($langs->trans("HRMSetup"), $linkback); @@ -81,7 +72,7 @@ print load_fiche_titre($langs->trans("HRMSetup"), $linkback); $head = hrm_admin_prepare_head(); dol_fiche_head($head, 'establishments', $langs->trans("HRM"), -1, "user"); -$sql = "SELECT e.rowid, e.name, e.address, e.zip, e.town, e.status"; +$sql = "SELECT e.rowid, e.label, e.address, e.zip, e.town, e.status"; $sql .= " FROM ".MAIN_DB_PREFIX."establishment as e"; $sql .= " WHERE e.entity IN (".getEntity('establishment').')'; $sql .= $db->order($sortfield, $sortorder); @@ -96,49 +87,47 @@ if ($result) // Load attribute_label print ''; print ''; - print_liste_field_titre("Name", $_SERVER["PHP_SELF"], "e.name", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "e.ref", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "e.label", "", "", "", $sortfield, $sortorder); print_liste_field_titre("Address", $_SERVER["PHP_SELF"], "e.address", "", "", "", $sortfield, $sortorder); - print_liste_field_titre("Zipcode", $_SERVER["PHP_SELF"], "e.zip", "", "", "", $sortfield, $sortorder); + print_liste_field_titre("Zip", $_SERVER["PHP_SELF"], "e.zip", "", "", "", $sortfield, $sortorder); print_liste_field_titre("Town", $_SERVER["PHP_SELF"], "e.town", "", "", "", $sortfield, $sortorder); print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "e.status", "", "", '', $sortfield, $sortorder, 'right '); print "\n"; if ($num > 0) - { - $establishmentstatic = new Establishment($db); + { + $establishmentstatic = new Establishment($db); while ($i < min($num, $limit)) { - $obj = $db->fetch_object($result); + $obj = $db->fetch_object($result); $establishmentstatic->id = $obj->rowid; - $establishmentstatic->name = $obj->name; + $establishmentstatic->ref = $obj->ref; + $establishmentstatic->label = $obj->label; $establishmentstatic->status = $obj->status; print ''; print ''; - print ''; + print ''; + print ''; print ''; print ''; - - print ''; - print "\n"; + print "\n"; - $i++; - } - } - else - { - print ''; - } + $i++; + } + } else { + print ''; + } print '
'.$establishmentstatic->getNomUrl(1).''.$obj->address.''.$obj->label.''.$obj->address.''.$obj->zip.''.$obj->town.''; + print ''; print $establishmentstatic->getLibStatut(5); print '
'.$langs->trans("None").'
'.$langs->trans("None").'
'; -} -else -{ +} else { dol_print_error($db); } @@ -146,7 +135,7 @@ dol_fiche_end(); // Buttons print ''; // End of page diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index c839e7c4cd4..79bf11f7ec9 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -30,11 +30,11 @@ $langs->loadLangs(array('admin', 'hrm')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Other parameters HRM_* $list = array( - 'HRM_EMAIL_EXTERNAL_SERVICE' // To prevent your public accountant for example +// 'HRM_EMAIL_EXTERNAL_SERVICE' // To prevent your public accountant for example ); /* @@ -58,9 +58,11 @@ if ($action == 'update') { } } + /* * View */ + llxHeader('', $langs->trans('Parameters')); $form = new Form($db); @@ -82,7 +84,7 @@ dol_fiche_head($head, 'parameters', $langs->trans("HRM"), -1, "user"); print ''; print ''; -print ''; +print ''; print "\n"; foreach ($list as $key) { diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 621f93ca247..d2b53337abe 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -60,12 +60,12 @@ class Establishment extends CommonObject */ public $picto = 'building'; - /** + /** * @var int ID */ public $id; - /** + /** * @var string Ref */ public $ref; @@ -75,7 +75,7 @@ class Establishment extends CommonObject */ public $rowid; - public $name; + public $label; /** * @var string Address @@ -97,8 +97,32 @@ class Establishment extends CommonObject public $country_id; - public $statuts = array(); - public $statuts_short = array(); + + const STATUS_OPEN = 1; + const STATUS_CLOSED = 0; + + + public $fields = array( + 'rowid' =>array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>10), + 'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>-2, 'notnull'=>1, 'position'=>15, 'index'=>1), + 'ref' =>array('type'=>'varchar(30)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'showoncombobox'=>1, 'position'=>20), + 'label' =>array('type'=>'varchar(128)', 'label'=>'Label', 'enabled'=>1, 'visible'=>-1, 'showoncombobox'=>1, 'position'=>22), + 'address' =>array('type'=>'varchar(255)', 'label'=>'Address', 'enabled'=>1, 'visible'=>-1, 'position'=>25), + 'zip' =>array('type'=>'varchar(25)', 'label'=>'Zip', 'enabled'=>1, 'visible'=>-1, 'position'=>30), + 'town' =>array('type'=>'varchar(50)', 'label'=>'Town', 'enabled'=>1, 'visible'=>-1, 'position'=>35), + 'fk_state' =>array('type'=>'integer', 'label'=>'Fkstate', 'enabled'=>1, 'visible'=>-1, 'position'=>40), + 'fk_country' =>array('type'=>'integer', 'label'=>'Fkcountry', 'enabled'=>1, 'visible'=>-1, 'position'=>45), + 'profid1' =>array('type'=>'varchar(20)', 'label'=>'Profid1', 'enabled'=>1, 'visible'=>-1, 'position'=>50), + 'profid2' =>array('type'=>'varchar(20)', 'label'=>'Profid2', 'enabled'=>1, 'visible'=>-1, 'position'=>55), + 'profid3' =>array('type'=>'varchar(20)', 'label'=>'Profid3', 'enabled'=>1, 'visible'=>-1, 'position'=>60), + 'phone' =>array('type'=>'varchar(20)', 'label'=>'Phone', 'enabled'=>1, 'visible'=>-1, 'position'=>65), + 'fk_user_author' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fkuserauthor', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>70), + 'fk_user_mod' =>array('type'=>'integer:User:user/class/user.class.php', 'label'=>'Fkusermod', 'enabled'=>1, 'visible'=>-1, 'position'=>75), + 'datec' =>array('type'=>'datetime', 'label'=>'DateCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>80), + 'tms' =>array('type'=>'timestamp', 'label'=>'DateModification', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>85), + 'status' =>array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>-1, 'position'=>500), + ); + /** * Constructor @@ -108,9 +132,6 @@ class Establishment extends CommonObject public function __construct($db) { $this->db = $db; - - $this->statuts_short = array(0 => 'Closed', 1 => 'Opened'); - $this->statuts = array(0 => 'Closed', 1 => 'Opened'); } /** @@ -124,19 +145,20 @@ class Establishment extends CommonObject global $conf, $langs; $error = 0; - $ret = 0; $now = dol_now(); - // Clean parameters - $this->address = ($this->address > 0 ? $this->address : $this->address); - $this->zip = ($this->zip > 0 ? $this->zip : $this->zip); - $this->town = ($this->town > 0 ? $this->town : $this->town); - $this->country_id = ($this->country_id > 0 ? $this->country_id : $this->country_id); + // Clean parameters + $this->address = trim($this->address); + $this->zip = trim($this->zip); + $this->town = trim($this->town); + + if (empty($this->ref)) $this->ref = '(PROV)'; $this->db->begin(); $sql = "INSERT INTO ".MAIN_DB_PREFIX."establishment ("; - $sql .= "name"; + $sql .= "ref"; + $sql .= ", label"; $sql .= ", address"; $sql .= ", zip"; $sql .= ", town"; @@ -147,10 +169,11 @@ class Establishment extends CommonObject $sql .= ", fk_user_author"; $sql .= ", fk_user_mod"; $sql .= ") VALUES ("; - $sql .= " '".$this->db->escape($this->name)."'"; + $sql .= "'".$this->db->escape($this->ref)."'"; + $sql .= ", '".$this->db->escape($this->label)."'"; $sql .= ", '".$this->db->escape($this->address)."'"; - $sql .= ", '".$this->db->escape($this->zip)."'"; - $sql .= ", '".$this->db->escape($this->town)."'"; + $sql .= ", '".$this->db->escape($this->zip)."'"; + $sql .= ", '".$this->db->escape($this->town)."'"; $sql .= ", ".$this->country_id; $sql .= ", ".$this->status; $sql .= ", ".$conf->entity; @@ -179,6 +202,12 @@ class Establishment extends CommonObject $this->db->rollback(); return -1 * $error; } else { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.'establishment'); + + $sql = 'UPDATE '.MAIN_DB_PREFIX."establishment SET ref = '".$this->db->escape($this->id)."'"; + $sql .= " WHERE rowid = ".$this->id; + $this->db->query($sql); + $this->db->commit(); return $this->id; } @@ -194,17 +223,18 @@ class Establishment extends CommonObject { global $langs; - // Check parameters - if (empty($this->name)) - { - $this->error = 'ErrorBadParameter'; - return -1; - } + // Check parameters + if (empty($this->label)) + { + $this->error = 'ErrorBadParameter'; + return -1; + } $this->db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."establishment"; - $sql .= " SET name = '".$this->db->escape($this->name)."'"; + $sql .= " SET ref = '".$this->db->escape($this->ref)."'"; + $sql .= ", label = '".$this->db->escape($this->label)."'"; $sql .= ", address = '".$this->db->escape($this->address)."'"; $sql .= ", zip = '".$this->db->escape($this->zip)."'"; $sql .= ", town = '".$this->db->escape($this->town)."'"; @@ -227,17 +257,17 @@ class Establishment extends CommonObject } /** - * Load an object from database - * - * @param int $id Id of record to load - * @return int <0 if KO, >0 if OK - */ + * Load an object from database + * + * @param int $id Id of record to load + * @return int <0 if KO, >0 if OK + */ public function fetch($id) { - $sql = "SELECT e.rowid, e.name, e.address, e.zip, e.town, e.status, e.fk_country as country_id, e.entity,"; + $sql = "SELECT e.rowid, e.ref, e.label, e.address, e.zip, e.town, e.status, e.fk_country as country_id, e.entity,"; $sql .= ' c.code as country_code, c.label as country'; $sql .= " FROM ".MAIN_DB_PREFIX."establishment as e"; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON e.fk_country = c.rowid'; + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as c ON e.fk_country = c.rowid'; $sql .= " WHERE e.rowid = ".$id; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); @@ -247,28 +277,26 @@ class Establishment extends CommonObject $obj = $this->db->fetch_object($result); $this->id = $obj->rowid; - $this->ref = $obj->rowid; - $this->name = $obj->name; + $this->ref = $obj->ref; + $this->label = $obj->label; $this->address = $obj->address; $this->zip = $obj->zip; $this->town = $obj->town; $this->status = $obj->status; $this->entity = $obj->entity; - $this->country_id = $obj->country_id; - $this->country_code = $obj->country_code; - $this->country = $obj->country; + $this->country_id = $obj->country_id; + $this->country_code = $obj->country_code; + $this->country = $obj->country; return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } } - /** + /** * Delete record * * @param int $id Id of record to delete @@ -286,9 +314,7 @@ class Establishment extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -298,57 +324,43 @@ class Establishment extends CommonObject /** * Give a label from a status * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * @return string Label + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto + * @return string Label of status */ public function getLibStatut($mode = 0) { return $this->LibStatut($this->status, $mode); } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Give a label from a status + * Return the status * - * @param int $status Id status - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * @return string Label + * @param int $status Id status + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto + * @return string Label of status */ public function LibStatut($status, $mode = 0) { - // phpcs:enable - global $langs; + // phpcs:enable + if (empty($this->labelStatus) || empty($this->labelStatusShort)) + { + global $langs; + //$langs->load("mymodule"); + $this->labelStatus[self::STATUS_OPEN] = $langs->trans('Open'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('Closed'); + $this->labelStatusShort[self::STATUS_OPEN] = $langs->trans('Open'); + $this->labelStatusShort[self::STATUS_CLOSED] = $langs->trans('Closed'); + } - if ($mode == 0) - { - return $langs->trans($this->statuts[$status]); - } - elseif ($mode == 1) - { - return $langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 2) - { - if ($status == 0) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts_short[$status]); - elseif ($status == 1) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts_short[$status]); - } - elseif ($mode == 3) - { - if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5'); - elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); - } - elseif ($mode == 4) - { - if ($status == 0 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut5').' '.$langs->trans($this->statuts[$status]); - elseif ($status == 1 && !empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]), 'statut4').' '.$langs->trans($this->statuts[$status]); - } - elseif ($mode == 5) - { - if ($status == 0 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut5'); - elseif ($status == 1 && !empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]), 'statut4'); - } + $statusType = 'status'.$status; + if ($status == self::STATUS_OPEN) $statusType = 'status4'; + if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); } + /** * Information on record * @@ -357,7 +369,7 @@ class Establishment extends CommonObject */ public function info($id) { - $sql = 'SELECT e.rowid, e.datec, e.fk_user_author, e.tms, e.fk_user_mod, e.entity'; + $sql = 'SELECT e.rowid, e.ref, e.datec, e.fk_user_author, e.tms, e.fk_user_mod, e.entity'; $sql .= ' FROM '.MAIN_DB_PREFIX.'establishment as e'; $sql .= ' WHERE e.rowid = '.$id; @@ -388,124 +400,65 @@ class Establishment extends CommonObject } } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } /** - * Get on record Establishment + * Return clicable name (with picto eventually) * - * @param int $id Id of record - * @return Object + * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto + * @return string String with URL */ - public function getEstablishment($id) + public function getNomUrl($withpicto = 0) { - $sql = 'SELECT e.rowid, e.name, e.datec, e.fk_user_author, e.tms, e.fk_user_mod, e.entity'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'establishment as e'; - $sql .= ' WHERE e.rowid = '.$id; + global $langs; - dol_syslog(get_class($this)."::fetch info", LOG_DEBUG); - $result = $this->db->query($sql); + $result = ''; - if ($result) - { - if ($this->db->num_rows($result)) - { - $obj = $this->db->fetch_object($result); - } - $this->db->free($result); - } - else - { - dol_print_error($this->db); - } + $link = ''; + $linkend = ''; - return $obj; + $picto = 'building'; + + $label = ''.$langs->trans("Establishment").''; + $label .= '
'.$langs->trans("Label").': '.$this->label; + + if ($withpicto) $result .= ($link.img_object($label, $picto).$linkend); + if ($withpicto && $withpicto != 2) $result .= ' '; + if ($withpicto != 2) $result .= $link.$this->label.$linkend; + return $result; } - /** - * Return clicable name (with picto eventually) - * - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @return string String with URL - */ - public function getNomUrl($withpicto = 0) - { - global $langs; + /** + * Return account country code + * + * @return string country code + */ + public function getCountryCode() + { + global $mysoc; - $result = ''; + // We return country code of bank account + if (!empty($this->country_code)) return $this->country_code; - $link = ''; - $linkend = ''; + // We return country code of managed company + if (!empty($mysoc->country_code)) return $mysoc->country_code; - $picto = 'building'; - - $label = $langs->trans("Show").': '.$this->name; - - if ($withpicto) $result .= ($link.img_object($label, $picto).$linkend); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.$this->name.$linkend; - return $result; - } + return ''; + } /** - * Return clicable name (with picto eventually) - * - * @param int $id Id of record - * @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto - * @return string String with URL - */ - public function getNomUrlParent($id = 0, $withpicto = 0) - { - global $langs, $conf; - - $result = ''; - - $obj = $this->getEstablishment(($id > 0) ? $id : $conf->entity); - - $link = ''; - $linkend = ''; - - $picto = 'building'; - - $label = $langs->trans("Show").': '.$obj->name; - - if ($withpicto) $result .= ($link.img_object($label, $picto).$linkend); - if ($withpicto && $withpicto != 2) $result .= ' '; - if ($withpicto != 2) $result .= $link.$obj->name.$linkend; - return $result; - } - - /** - * Return account country code - * - * @return string country code - */ - public function getCountryCode() - { - global $mysoc; - - // We return country code of bank account - if (!empty($this->country_code)) return $this->country_code; - - // We return country code of managed company - if (!empty($mysoc->country_code)) return $mysoc->country_code; - - return ''; - } - - /** - * Initialise object with example values - * Id must be 0 if object instance is a specimen - * - * @return void - */ - public function initAsSpecimen() - { - $this->id = 0; - $this->ref = 'DEAAA'; - } + * Initialise object with example values + * Id must be 0 if object instance is a specimen + * + * @return void + */ + public function initAsSpecimen() + { + $this->id = 0; + $this->ref = '0'; + $this->label = 'Department AAA'; + } } diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 0122e92090f..1f43878babf 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -33,7 +33,7 @@ if (!$user->admin) accessforbidden(); $error = 0; -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $id = GETPOST('id', 'int'); @@ -41,7 +41,7 @@ $id = GETPOST('id', 'int'); // List of status static $tmpstatus2label = array( '0'=>'CloseEtablishment', - '1'=>'OpenEtablishment' + '1'=>'OpenEtablishment' ); $status2label = array(''); foreach ($tmpstatus2label as $key => $val) $status2label[$key] = $langs->trans($val); @@ -58,33 +58,29 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ if ($action == 'confirm_delete' && $confirm == "yes") { - $result = $object->delete($id); - if ($result >= 0) - { - header("Location: ../admin/admin_establishment.php"); - exit; - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } -} - -elseif ($action == 'add') + $result = $object->delete($id); + if ($result >= 0) + { + header("Location: ../admin/admin_establishment.php"); + exit; + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } +} elseif ($action == 'add') { - if (!$cancel) - { - $error = 0; + if (!$cancel) + { + $error = 0; - $object->name = GETPOST('name', 'alpha'); - if (empty($object->name)) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors'); - $error++; - } + $object->label = GETPOST('label', 'alpha'); + if (empty($object->label)) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label")), null, 'errors'); + $error++; + } - if (empty($error)) - { + if (empty($error)) + { $object->address = GETPOST('address', 'alpha'); $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); @@ -96,26 +92,20 @@ elseif ($action == 'add') $id = $object->create($user); - if ($id > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } - else + if ($id > 0) { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { - $action = 'create'; - } - } - else - { - header("Location: ../admin/admin_establishment.php"); - exit; - } + } else { + $action = 'create'; + } + } else { + header("Location: ../admin/admin_establishment.php"); + exit; + } } // Update record @@ -124,15 +114,15 @@ elseif ($action == 'update') $error = 0; if (!$cancel) { - $name = GETPOST('name', 'alpha'); + $name = GETPOST('label', 'alpha'); if (empty($name)) { - setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Name')), null, 'errors'); + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Label')), null, 'errors'); $error++; } if (empty($error)) { - $object->name = GETPOST('name', 'alpha'); + $object->label = GETPOST('label', 'alphanohtml'); $object->address = GETPOST('address', 'alpha'); $object->zip = GETPOST('zipcode', 'alpha'); $object->town = GETPOST('town', 'alpha'); @@ -143,19 +133,17 @@ elseif ($action == 'update') $result = $object->update($user); - if ($result > 0) - { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_POST['id']); - exit; - } - else + if ($result > 0) { + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_POST['id']); + exit; + } else { setEventMessages($object->error, $object->errors, 'errors'); } } } else { - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_POST['id']); - exit; + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$_POST['id']); + exit; } } @@ -173,35 +161,38 @@ $formcompany = new FormCompany($db); */ if ($action == 'create') { - print load_fiche_titre($langs->trans("NewEstablishment")); + print load_fiche_titre($langs->trans("NewEstablishment")); - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; dol_fiche_head(); - print '
'.$langs->trans('Journaux').''.$langs->trans('Parameters').'
'; + print '
'; // Name print ''; - print ''; - print ''; + print ''; + print ''; print ''; - // Parent - print ''; - print ''; - print ''; - print ''; + // Entity + /* + if (! empty($conf->multicompany->enabled)) { + print ''; + print ''; + print ''; + print ''; + } */ // Address print ''; print ''; print ''; print ''; @@ -242,65 +233,68 @@ if ($action == 'create') print ''; // Status - print ''; - print ''; + print ''; + print ''; print ''; + print ''; - print '
'.$form->editfieldkey('Name', 'name', '', $object, 0, 'string', '', 1).''.$form->editfieldkey('Label', 'label', '', $object, 0, 'string', '', 1).'
'.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).''; - print $form->selectEstablishments(GETPOST('entity', 'int') > 0 ?GETPOST('entity', 'int') : $conf->entity, 'entity', 1); - print '
'.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).''; + print $form->selectEstablishments(GETPOST('entity', 'int') > 0 ?GETPOST('entity', 'int') : $conf->entity, 'entity', 1); + print '
'.$form->editfieldkey('Address', 'address', '', $object, 0).''; - print ''; + print ''; print '
'.$form->editfieldkey('Status', 'status', '', $object, 0, 'string', '', 1).'
'.$form->editfieldkey('Status', 'status', '', $object, 0, 'string', '', 1).''; print $form->selectarray('status', $status2label, GETPOSTISSET('status') ? GETPOST('status', 'alpha') : 1); - print '
'; + print ''; dol_fiche_end(); - print '
'; + print '
'; print ''; print '     '; - print ''; + print ''; print '
'; - print ''; + print ''; } // Part to edit record if (($id || $ref) && $action == 'edit') { - $result = $object->fetch($id); - if ($result > 0) - { - $head = establishment_prepare_head($object); + $result = $object->fetch($id); + if ($result > 0) + { + $head = establishment_prepare_head($object); - if ($action == 'edit') - { - dol_fiche_head($head, 'card', $langs->trans("Establishment"), 0, 'building'); + if ($action == 'edit') + { + dol_fiche_head($head, 'card', $langs->trans("Establishment"), 0, 'building'); - print '
'."\n"; - print ''; - print ''; - print ''; + print ''."\n"; + print ''; + print ''; + print ''; - print ''; + print '
'; - // Ref - print ""; - print ''; + // Ref + print ""; + print ''; - // Name - print ''; + // Name + print ''; - // Parent - print ''; - print ''; + // Entity + /* + if (! empty($conf->multicompany->enabled)) { + print ''; + print ''; + }*/ // Address print ''; print ''; // Zipcode / Town @@ -328,34 +322,33 @@ if (($id || $ref) && $action == 'edit') print $form->selectarray('status', $status2label, $object->status); print ''; - print '
'.$langs->trans("Ref").''; - print $object->id; - print '
'.$langs->trans("Ref").''; + print $object->id; + print '
'.$form->editfieldkey('Name', 'name', '', $object, 0, 'string', '', 1).''; - print ''; - print '
'.$form->editfieldkey('Label', 'label', '', $object, 0, 'string', '', 1).''; + print ''; + print '
'.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).''; - print $form->selectEstablishments($object->entity > 0 ? $object->entity : $conf->entity, 'entity', 1); - print '
'.$form->editfieldkey('Parent', 'entity', '', $object, 0, 'string', '', 1).''; + print $object->entity > 0 ? $object->entity : $conf->entity; + print '
'.$form->editfieldkey('Address', 'address', '', $object, 0).''; - print ''; + print ''; print '
'; + print ''; dol_fiche_end(); - print '
'; + print '
'; print ''; print '     '; - print ''; - print '
'; + print ''; + print '
'; - print '
'; - } - } - else dol_print_error($db); + print ''; + } + } else dol_print_error($db); } if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { - $res = $object->fetch_optionals(); + $res = $object->fetch_optionals(); - $head = establishment_prepare_head($object); - dol_fiche_head($head, 'card', $langs->trans("Establishment"), -1, 'building'); + $head = establishment_prepare_head($object); + dol_fiche_head($head, 'card', $langs->trans("Establishment"), -1, 'building'); - // Confirmation to delete - if ($action == 'delete') - { - print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteEstablishment"), $langs->trans("ConfirmDeleteEstablishment"), "confirm_delete"); - } + // Confirmation to delete + if ($action == 'delete') + { + print $form->formconfirm($_SERVER["PHP_SELF"]."?id=".$id, $langs->trans("DeleteEstablishment"), $langs->trans("ConfirmDeleteEstablishment"), "confirm_delete"); + } // Object card @@ -364,27 +357,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $linkback = ''.$langs->trans("BackToList").''; $morehtmlref = '
'; - $morehtmlref .= '
'; + $morehtmlref .= '
'; - dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'id', $morehtmlref); + dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'id', $morehtmlref); - print '
'; - //print '
'; - print '
'; - print ''."\n"; + print '
'; + //print '
'; + print '
'; + print '
'."\n"; // Name print ''; - print ''; - print ''; + print ''; + print ''; print ''; - // Parent - print ''; - print ''; - print ''; - print ''; + // Entity + /* + if ($conf->multicompany->enabled) { + print ''; + print ''; + print ''; + print ''; + }*/ // Address print ''; @@ -394,7 +390,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Zipcode print ''; - print ''; + print ''; print ''; print ''; @@ -417,21 +413,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; print ''; - print '
'.$langs->trans("Name").''.$object->name.''.$langs->trans("Label").''.$object->label.'
'.$langs->trans("Parent").''.$object->getNomUrlParent($object->entity).'
'.$langs->trans("Entity").''.$object->entity.'
'.$langs->trans("Zipcode").''.$langs->trans("Zip").''.$object->zip.'
'; - print '
'; + print ''; + print '
'; - print '

'; + print '

'; - dol_fiche_end(); + dol_fiche_end(); - /* + /* * Barre d'actions */ - print '
'; - print ''.$langs->trans('Modify').''; - print ''.$langs->trans('Delete').''; - print '
'; + print '
'; + print ''.$langs->trans('Modify').''; + print ''.$langs->trans('Delete').''; + print '
'; } // End of page diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index a9825ac7b3a..7bd6c5727b7 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -28,31 +28,157 @@ require_once DOL_DOCUMENT_ROOT.'/hrm/class/establishment.class.php'; // Load translation files required by the page $langs->loadLangs(array('admin', 'hrm')); -// Security check -if (!$user->admin) accessforbidden(); - +// Get parameters $id = GETPOST('id', 'int'); +$ref = GETPOST('ref', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$cancel = GETPOST('cancel', 'aZ09'); +$backtopage = GETPOST('backtopage', 'alpha'); -// View -llxHeader(); +if (GETPOST('actioncode', 'array')) { + $actioncode = GETPOST('actioncode', 'array', 3); + if (!count($actioncode)) $actioncode = '0'; +} else { + $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); +} +$search_agenda_label = GETPOST('search_agenda_label'); -if ($id) +$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$sortfield = GETPOST("sortfield", 'alpha'); +$sortorder = GETPOST("sortorder", 'alpha'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (!$sortfield) $sortfield = 'a.datep,a.id'; +if (!$sortorder) $sortorder = 'DESC,DESC'; + +// Initialize technical objects +$object = new Establishment($db); +$extrafields = new ExtraFields($db); +$diroutputmassaction = $conf->hrm->dir_output.'/temp/massgeneration/'.$user->id; +$hookmanager->initHooks(array('hrmagenda', 'globalcard')); // Note that conf->hooks_modules contains array +// Fetch optionals attributes and labels +$extrafields->fetch_name_optionals_label($object->table_element); + +// Load object +include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals +if ($id > 0 || !empty($ref)) $upload_dir = $conf->hrm->multidir_output[$object->entity]."/".$object->id; + +// Security check - Protection if external user +//if ($user->socid > 0) accessforbidden(); +//if ($user->socid > 0) $socid = $user->socid; +//$result = restrictedArea($user, 'mymodule', $object->id); + +$permissiontoadd = $user->rights->hrm->write; // Used by the include of actions_addupdatedelete.inc.php + + +/* + * Actions + */ + +$parameters = array('id'=>$id); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +if (empty($reshook)) { - $object = new Establishment($db); - $object->fetch($id); - $object->info($id); + // Cancel + if (GETPOST('cancel', 'alpha') && !empty($backtopage)) + { + header("Location: ".$backtopage); + exit; + } + // Purge search criteria + if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers + { + $actioncode = ''; + $search_agenda_label = ''; + } +} + + + +/* + * View + */ + +$form = new Form($db); + +if ($object->id > 0) +{ + $title = $langs->trans("Agenda"); + //if (! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/thirdpartynameonly/',$conf->global->MAIN_HTML_TITLE) && $object->name) $title=$object->name." - ".$title; + $help_url = ''; + llxHeader('', $title, $help_url); + + if (!empty($conf->notification->enabled)) $langs->load("mails"); $head = establishment_prepare_head($object); + dol_fiche_head($head, 'info', $langs->trans("Establishment"), -1, 'building'); - print '
'; - dol_print_object_info($object); - print '
'; + // Object card + // ------------------------------------------------------------ + $linkback = ''.$langs->trans("BackToList").''; - print '
'; + $morehtmlref = '
'; + /* + // Ref customer + $morehtmlref.=$form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', 0, 1); + $morehtmlref.=$form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, 0, 'string', '', null, null, '', 1); + // Thirdparty + $morehtmlref.='
'.$langs->trans('ThirdParty') . ' : ' . (is_object($object->thirdparty) ? $object->thirdparty->getNomUrl(1) : ''); + // Project + if (! empty($conf->projet->enabled)) + { + $langs->load("projects"); + $morehtmlref.='
'.$langs->trans('Project') . ' '; + if ($permissiontoadd) + { + if ($action != 'classify') + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.=' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref.='
'; + $morehtmlref.=''; + $morehtmlref.=''; + $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.=''; + $morehtmlref.='
'; + } else { + $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (! empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ': '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } + }*/ + $morehtmlref .= '
'; + + + dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref); + + print '
'; + print '
'; + + $object->info($object->id); + dol_print_object_info($object, 1); + + print '
'; + + dol_fiche_end(); } + // End of page llxFooter(); $db->close(); diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index ba33ecbbdb3..3955e3f849a 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -3,7 +3,7 @@ * Copyright (C) 2013-2015 Laurent Destailleur * Copyright (C) 2012-2014 Regis Houssin * Copyright (C) 2015-2016 Alexandre Spangaro - * Copyright (C) 2019 Nicolas ZABOURI + * Copyright (C) 2019 Nicolas ZABOURI * * 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 @@ -35,6 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; if ($conf->deplacement->enabled) require_once DOL_DOCUMENT_ROOT.'/compta/deplacement/class/deplacement.class.php'; if ($conf->expensereport->enabled) require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; +require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; $hookmanager = new HookManager($db); @@ -52,9 +53,9 @@ if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INF $holiday = new Holiday($db); $holidaystatic = new Holiday($db); +$staticrecruitmentcandidature = new RecruitmentCandidature($db); -$max = 3; - +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; /* @@ -95,42 +96,42 @@ print '
'; if (!empty($conf->global->MAIN_SEARCH_FORM_ON_HOME_AREAS)) // This is useless due to the global search combo { - if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) - { - $langs->load("holiday"); - $listofsearchfields['search_holiday'] = array('text'=>'TitreRequestCP'); - } - if (!empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) - { - $langs->load("trips"); - $listofsearchfields['search_deplacement'] = array('text'=>'ExpenseReport'); - } - if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) - { - $langs->load("trips"); - $listofsearchfields['search_expensereport'] = array('text'=>'ExpenseReport'); - } - if (count($listofsearchfields)) - { - print '
'; - print ''; - print '
'; - print ''; - $i = 0; - foreach ($listofsearchfields as $key => $value) - { - if ($i == 0) print ''; - print ''; - print ''; - if ($i == 0) print ''; - print ''; - $i++; - } - print '
'.$langs->trans("Search").'
'; - print '
'; - print '
'; - print '
'; - } + if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) + { + $langs->load("holiday"); + $listofsearchfields['search_holiday'] = array('text'=>'TitreRequestCP'); + } + if (!empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) + { + $langs->load("trips"); + $listofsearchfields['search_deplacement'] = array('text'=>'ExpenseReport'); + } + if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) + { + $langs->load("trips"); + $listofsearchfields['search_expensereport'] = array('text'=>'ExpenseReport'); + } + if (count($listofsearchfields)) + { + print '
'; + print ''; + print '
'; + print ''; + $i = 0; + foreach ($listofsearchfields as $key => $value) + { + if ($i == 0) print ''; + print ''; + print ''; + if ($i == 0) print ''; + print ''; + $i++; + } + print '
'.$langs->trans("Search").'
'; + print '
'; + print '
'; + print '
'; + } } @@ -140,28 +141,27 @@ if (!empty($conf->holiday->enabled)) { $user_id = $user->id; - print '
'; - print ''; - print ''; - print ''; - print ''; + print ''; + print '
'.$langs->trans("Holidays").'
'; + print '
'; + print ''; + print ''; + print ''; + print ''; - print ''; - print '
'.$langs->trans("Holidays").'
'; - $out = ''; - $typeleaves = $holiday->getTypes(1, 1); - foreach ($typeleaves as $key => $val) - { - $nb_type = $holiday->getCPforUser($user->id, $val['rowid']); - $nb_holiday += $nb_type; - $out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; - } - print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; - print $out; + $out = ''; + $typeleaves = $holiday->getTypes(1, 1); + foreach ($typeleaves as $key => $val) + { + $nb_type = $holiday->getCPforUser($user->id, $val['rowid']); + $nb_holiday += $nb_type; + $out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; + } + print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; + print $out; - print '

'; - } - elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) + print '

'; + } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) { print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE).'
'; } @@ -175,89 +175,88 @@ print '
'; // Latest leave requests if (!empty($conf->holiday->enabled) && $user->rights->holiday->read) { - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.statut, x.rowid, x.rowid as ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status"; - $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE u.rowid = x.fk_user"; - $sql .= " AND x.entity = ".$conf->entity; - if (empty($user->rights->holiday->read_all)) $sql .= ' AND x.fk_user IN ('.join(',', $childids).')'; - //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - //if (!empty($socid)) $sql.= " AND x.fk_soc = ".$socid; - $sql .= $db->order("x.tms", "DESC"); - $sql .= $db->plimit($max, 0); + $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.photo, u.statut as user_status,"; + $sql .= " x.rowid, x.rowid as ref, x.fk_type, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.tms as dm, x.statut as status"; + $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; + $sql .= " WHERE u.rowid = x.fk_user"; + $sql .= " AND x.entity = ".$conf->entity; + if (empty($user->rights->holiday->read_all)) $sql .= ' AND x.fk_user IN ('.join(',', $childids).')'; + //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= " AND x.fk_soc = s. rowid AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + //if (!empty($socid)) $sql.= " AND x.fk_soc = ".$socid; + $sql .= $db->order("x.tms", "DESC"); + $sql .= $db->plimit($max, 0); - $result = $db->query($sql); - if ($result) - { - $var = false; - $num = $db->num_rows($result); + $result = $db->query($sql); + if ($result) + { + $var = false; + $num = $db->num_rows($result); - $holidaystatic = new Holiday($db); - $userstatic = new User($db); + $holidaystatic = new Holiday($db); + $userstatic = new User($db); - $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon")); - $typeleaves = $holidaystatic->getTypes(1, -1); + $listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon")); + $typeleaves = $holidaystatic->getTypes(1, -1); - $i = 0; + $i = 0; - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if ($num) - { - while ($i < $num && $i < $max) - { - $obj = $db->fetch_object($result); + print '
'; + print '
'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num)).''.$langs->trans("from").''.$langs->trans("to").''.$langs->trans("DateModificationShort").' 
'; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + if ($num) + { + while ($i < $num && $i < $max) + { + $obj = $db->fetch_object($result); - $holidaystatic->id = $obj->rowid; - $holidaystatic->ref = $obj->ref; + $holidaystatic->id = $obj->rowid; + $holidaystatic->ref = $obj->ref; + $holidaystatic->statut = $obj->status; - $userstatic->id = $obj->uid; - $userstatic->lastname = $obj->lastname; - $userstatic->firstname = $obj->firstname; - $userstatic->login = $obj->login; - $userstatic->photo = $obj->photo; - $userstatic->email = $obj->email; - $userstatic->statut = $obj->statut; + $userstatic->id = $obj->uid; + $userstatic->lastname = $obj->lastname; + $userstatic->firstname = $obj->firstname; + $userstatic->login = $obj->login; + $userstatic->photo = $obj->photo; + $userstatic->email = $obj->email; + $userstatic->statut = $obj->user_status; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning'; - $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon'; + $starthalfday = ($obj->halfday == -1 || $obj->halfday == 2) ? 'afternoon' : 'morning'; + $endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon'; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; - $i++; - } - } - else - { - print ''; - } - print '
'.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num)).''.$langs->trans("from").''.$langs->trans("to").''.$langs->trans("FullList").'
'.$holidaystatic->getNomUrl(1).''.$userstatic->getNomUrl(-1, 'leave').''.$typeleaves[$obj->fk_type]['label'].'
'.$holidaystatic->getNomUrl(1).''.$userstatic->getNomUrl(-1, 'leave').''.$typeleaves[$obj->fk_type]['label'].''.dol_print_date($db->jdate($obj->date_start), 'day').' '.$langs->trans($listhalfday[$starthalfday]); - print ''.dol_print_date($db->jdate($obj->date_end), 'day').' '.$langs->trans($listhalfday[$endhalfday]); - print ''.dol_print_date($db->jdate($obj->dm), 'day').''.$holidaystatic->LibStatut($obj->status, 3).'
'.dol_print_date($db->jdate($obj->date_start), 'day').' '.$langs->trans($listhalfday[$starthalfday]).''; + print ''.dol_print_date($db->jdate($obj->date_end), 'day').' '.$langs->trans($listhalfday[$endhalfday]).''; + print ''.dol_print_date($db->jdate($obj->dm), 'day').''.$holidaystatic->LibStatut($obj->status, 3).'
'.$langs->trans("None").'
'; - print '
'; - print '
'; - } - else dol_print_error($db); + $i++; + } + } else { + print ''.$langs->trans("None").''; + } + print ''; + print '
'; + print '
'; + } else dol_print_error($db); } // Latest expense report if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) { - $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut, u.photo, x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status"; + $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.login, u.email, u.statut as user_status, u.photo,"; + $sql .= " x.rowid, x.ref, x.date_debut as date, x.tms as dm, x.total_ttc, x.fk_statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."expensereport as x, ".MAIN_DB_PREFIX."user as u"; //if (!$user->rights->societe->client->voir && !$user->socid) $sql.= ", ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE u.rowid = x.fk_user_author"; @@ -280,8 +279,7 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) print ''; print ''.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''; print ''.$langs->trans("TotalTTC").''; - print ''.$langs->trans("DateModificationShort").''; - print ' '; + print ''.$langs->trans("FullList").''; print ''; if ($num) { @@ -295,13 +293,14 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) $expensereportstatic->id = $obj->rowid; $expensereportstatic->ref = $obj->ref; + $expensereportstatic->statut = $obj->status; $userstatic->id = $obj->uid; $userstatic->lastname = $obj->lastname; $userstatic->firstname = $obj->firstname; - $userstatic->email = $obj->email; + $userstatic->email = $obj->email; $userstatic->login = $obj->login; - $userstatic->statut = $obj->statut; + $userstatic->statut = $obj->user_status; $userstatic->photo = $obj->photo; print ''; @@ -309,23 +308,85 @@ if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire) print ''.$userstatic->getNomUrl(-1).''; print ''.price($obj->total_ttc).''; print ''.dol_print_date($db->jdate($obj->dm), 'day').''; - print ''.$expensereportstatic->LibStatut($obj->status, 3).''; + print ''.$expensereportstatic->LibStatut($obj->status, 3).''; print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } print ''; print '
'; - } - else dol_print_error($db); + print '
'; + } else dol_print_error($db); } +// Last modified job position +if (!empty($conf->recruitment->enabled) && $user->rights->recruitment->recruitmentjobposition->read) +{ + $sql = "SELECT rc.rowid, rc.ref, rc.email, rc.lastname, rc.firstname, rc.date_creation, rc.tms, rc.status"; + $sql .= " FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rc"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."recruitment_recruitmentjobposition as s ON rc.fk_recruitmentjobposition = s.rowid"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql .= " WHERE rc.entity IN (".getEntity($staticrecruitmentjobposition->element).")"; + if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.fk_soc = sc.fk_soc AND sc.fk_user = ".$user->id; + if ($socid) $sql .= " AND s.fk_soc = $socid"; + $sql .= " ORDER BY rc.tms DESC"; + $sql .= $db->plimit($max, 0); + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + print '
'; + print ''; + print ''; + print ''; + print ''; + print ''; + if ($num) + { + while ($i < $num) + { + $objp = $db->fetch_object($resql); + $staticrecruitmentcandidature->id = $objp->rowid; + $staticrecruitmentcandidature->ref = $objp->ref; + $staticrecruitmentcandidature->email = $objp->email; + $staticrecruitmentcandidature->status = $objp->status; + $staticrecruitmentcandidature->date_creation = $objp->date_creation; + $staticrecruitmentcandidature->firstname = $objp->firstname; + $staticrecruitmentcandidature->lastname = $objp->lastname; + + print ''; + print ''; + print '"; + print '"; + print '"; + print ''; + $i++; + } + + $db->free($resql); + } else { + print ''; + } + print "
'; + print $langs->trans("BoxTitleLatestModifiedCandidatures", $max); + print ''.$langs->trans("FullList").'
'.$staticrecruitmentcandidature->getNomUrl(1, '').''; + print "'.dol_print_date($db->jdate($objp->tms), 'day')."'; + print $staticrecruitmentcandidature->getLibStatut(3); + print "
'.$langs->trans("None").'
"; + print "
"; + print "
"; + } else { + dol_print_error($db); + } +} + print '
'; // Initialize technical object to manage hooks. Note that conf->hooks_modules contains array diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index f2aad5baee3..3684d4d2d7e 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2016 Raphaël Doursenaud + * Copyright (C) 2020 Ahmad Jamaly Rabib * * 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 @@ -101,6 +102,8 @@ class Import // Defined if module is enabled $enabled = true; $part = strtolower(preg_replace('/^mod/i', '', $modulename)); + // Adds condition for propal module + if ($part === 'propale') $part = 'propal'; if (empty($conf->$part->enabled)) $enabled = false; if (empty($enabled)) continue; @@ -171,7 +174,7 @@ class Import // Sql request to run after import $this->array_import_run_sql_after[$i] = (isset($module->import_run_sql_after_array[$r]) ? $module->import_run_sql_after_array[$r] : ''); // Module - $this->array_import_module[$i] = $module; + $this->array_import_module[$i] = array('position_of_profile'=>($module->module_position.'-'.$module->import_code[$r]), 'module'=>$module); dol_syslog("Import loaded for module ".$modulename." with index ".$i.", dataset=".$module->import_code[$r].", nb of fields=".count($module->import_fields_array[$r])); $i++; @@ -260,9 +263,7 @@ class Import { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->errno = $this->db->lasterrno(); $this->db->rollback(); @@ -280,7 +281,7 @@ class Import { $sql = 'SELECT em.rowid, em.field, em.label, em.type'; $sql .= ' FROM '.MAIN_DB_PREFIX.'import_model as em'; - $sql .= ' WHERE em.rowid = '.$id; + $sql .= ' WHERE em.rowid = '.((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $result = $this->db->query($sql); @@ -295,15 +296,11 @@ class Import $this->datatoimport = $obj->type; $this->fk_user = $obj->fk_user; return 1; - } - else - { + } else { $this->error = "Model not found"; return -2; } - } - else - { + } else { dol_print_error($this->db); return -3; } @@ -353,9 +350,7 @@ class Import } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 0819ce0ac30..6c93d96619f 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -77,8 +77,8 @@ $importmodelid = GETPOST('importmodelid'); $excludefirstline = (GETPOST('excludefirstline') ? GETPOST('excludefirstline') : 1); $endatlinenb = (GETPOST('endatlinenb') ? GETPOST('endatlinenb') : ''); $updatekeys = (GETPOST('updatekeys', 'array') ? GETPOST('updatekeys', 'array') : array()); -$separator = (GETPOST('separator') ? GETPOST('separator') : (!empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE) ? $conf->global->IMPORT_CSV_SEPARATOR_TO_USE : ',')); -$enclosure = (GETPOST('enclosure') ? GETPOST('enclosure') : '"'); +$separator = (GETPOST('separator', 'nohtml') ? GETPOST('separator', 'nohtml') : (!empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE) ? $conf->global->IMPORT_CSV_SEPARATOR_TO_USE : ',')); +$enclosure = (GETPOST('enclosure', 'nohtml') ? GETPOST('enclosure', 'nohtml') : '"'); $objimport = new Import($db); $objimport->load_arrays($user, ($step == 1 ? '' : $datatoimport)); @@ -141,18 +141,16 @@ if ($action == 'builddoc') if ($result < 0) { setEventMessages($objimport->error, $objimport->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("FileSuccessfullyBuilt"), null, 'mesgs'); } } if ($action == 'deleteprof') { - if ($_GET["id"]) + if (GETPOST("id", 'int')) { - $objimport->fetch($_GET["id"]); + $objimport->fetch(GETPOST("id", 'int')); $result = $objimport->delete($user); } } @@ -178,21 +176,16 @@ if ($action == 'add_import_model') if ($result >= 0) { setEventMessages($langs->trans("ImportModelSaved", $objimport->model_name), null, 'mesgs'); - } - else - { + } else { $langs->load("errors"); if ($objimport->errno == 'DB_ERROR_RECORD_ALREADY_EXISTS') { setEventMessages($langs->trans("ErrorImportDuplicateProfil"), null, 'errors'); - } - else { + } else { setEventMessages($objimport->error, null, 'errors'); } } - } - else - { + } else { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("ImportModelName")), null, 'errors'); } } @@ -208,9 +201,7 @@ if ($step == 3 && $datatoimport) if (dol_move_uploaded_file($_FILES['userfile']['tmp_name'], $fullpath, 1) > 0) { dol_syslog("File ".$fullpath." was added for import"); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); } @@ -221,9 +212,9 @@ if ($step == 3 && $datatoimport) { $langs->load("other"); - $param = '&datatoimport='.$datatoimport.'&format='.$format; - if ($excludefirstline) $param .= '&excludefirstline='.$excludefirstline; - if ($endatlinenb) $param .= '&endatlinenb='.$endatlinenb; + $param = '&datatoimport='.urlencode($datatoimport).'&format='.urlencode($format); + if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); + if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); $file = $conf->import->dir_temp.'/'.GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP). $ret = dol_delete_file($file); @@ -330,8 +321,8 @@ if ($step == 1 || !$datatoimport) $_SESSION["dol_array_match_file_to_database"] = ''; $param = ''; - if ($excludefirstline) $param .= '&excludefirstline='.$excludefirstline; - if ($endatlinenb) $param .= '&endatlinenb='.$endatlinenb; + if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); + if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); if ($separator) $param .= '&separator='.urlencode($separator); if ($enclosure) $param .= '&enclosure='.urlencode($enclosure); @@ -355,32 +346,28 @@ if ($step == 1 || !$datatoimport) if (count($objimport->array_import_module)) { - $sortedarrayofmodules = dol_sort_array($objimport->array_import_module, 'module_position', 'asc', 0, 0, 1); + $sortedarrayofmodules = dol_sort_array($objimport->array_import_module, 'position_of_profile', 'asc', 0, 0, 1); foreach ($sortedarrayofmodules as $key => $value) { - //var_dump($objimport->array_import_code[$key]); + //var_dump($key.' '.$value['position_of_profile'].' '.$value['import_code'].' '.$objimport->array_import_module[$key]['module']->getName().' '.$objimport->array_import_code[$key]); print ''; - $titleofmodule = $objimport->array_import_module[$key]->getName(); + $titleofmodule = $objimport->array_import_module[$key]['module']->getName(); // Special cas for import common to module/services if (in_array($objimport->array_import_code[$key], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) $titleofmodule = $langs->trans("ProductOrService"); print $titleofmodule; print ''; - print img_object($objimport->array_import_module[$key]->getName(), $objimport->array_import_icon[$key]).' '; + print img_object($objimport->array_import_module[$key]['module']->getName(), $objimport->array_import_icon[$key]).' '; print $objimport->array_import_label[$key]; print ''; if ($objimport->array_import_perms[$key]) { - print ''.img_picto($langs->trans("NewImport"), 'filenew').''; - } - else - { + print ''.img_picto($langs->trans("NewImport"), 'next', 'class="fa-15x"').''; + } else { print $langs->trans("NotEnoughPermissions"); } print ''; } - } - else - { + } else { print ''.$langs->trans("NoImportableData").''; } print ''; @@ -393,9 +380,9 @@ if ($step == 1 || !$datatoimport) // STEP 2: Page to select input format file if ($step == 2 && $datatoimport) { - $param = '&datatoimport='.$datatoimport; - if ($excludefirstline) $param .= '&excludefirstline='.$excludefirstline; - if ($endatlinenb) $param .= '&endatlinenb='.$endatlinenb; + $param = '&datatoimport='.urlencode($datatoimport); + if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); + if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); if ($separator) $param .= '&separator='.urlencode($separator); if ($enclosure) $param .= '&enclosure='.urlencode($enclosure); @@ -413,7 +400,7 @@ if ($step == 2 && $datatoimport) // Module print ''.$langs->trans("Module").''; print ''; - $titleofmodule = $objimport->array_import_module[0]->getName(); + $titleofmodule = $objimport->array_import_module[0]['module']->getName(); // Special cas for import common to module/services if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) $titleofmodule = $langs->trans("ProductOrService"); print $titleofmodule; @@ -422,7 +409,7 @@ if ($step == 2 && $datatoimport) // Lot de donnees a importer print ''.$langs->trans("DatasetToImport").''; print ''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + print img_object($objimport->array_import_module[0]['module']->getName(), $objimport->array_import_icon[0]).' '; print $objimport->array_import_label[0]; print ''; @@ -437,7 +424,7 @@ if ($step == 2 && $datatoimport) print ''; print ''; - print ''.$langs->trans("ChooseFormatOfFileToImport", img_picto('', 'filenew')).'

'; + print ''.$langs->trans("ChooseFormatOfFileToImport", img_picto('', 'next', '')).'

'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; @@ -458,7 +445,7 @@ if ($step == 2 && $datatoimport) print ''; // Action button print ''; print ''; } @@ -473,9 +460,9 @@ if ($step == 2 && $datatoimport) // STEP 3: Page to select file if ($step == 3 && $datatoimport) { - $param = '&datatoimport='.$datatoimport.'&format='.$format; - if ($excludefirstline) $param .= '&excludefirstline='.$excludefirstline; - if ($endatlinenb) $param .= '&endatlinenb='.$endatlinenb; + $param = '&datatoimport='.urlencode($datatoimport).'&format='.urlencode($format); + if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); + if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); if ($separator) $param .= '&separator='.urlencode($separator); if ($enclosure) $param .= '&enclosure='.urlencode($enclosure); @@ -503,7 +490,7 @@ if ($step == 3 && $datatoimport) // Module print ''; print ''; print ''; @@ -562,7 +549,7 @@ if ($step == 3 && $datatoimport) print ''; print ''; - print ''.$langs->trans("ChooseFileToImport", img_picto('', 'filenew')).'

'; + print ''.$langs->trans("ChooseFileToImport", img_picto('', 'next')).'

'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print '
'.$langs->trans("DownloadEmptyExample").''; - print ''.img_picto($langs->trans("SelectFormat"), 'filenew').''; + print ''.img_picto($langs->trans("SelectFormat"), 'next', 'class="fa-15x"').''; print '
'.$langs->trans("Module").''; - $titleofmodule = $objimport->array_import_module[0]->getName(); + $titleofmodule = $objimport->array_import_module[0]['module']->getName(); // Special cas for import common to module/services if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) $titleofmodule = $langs->trans("ProductOrService"); print $titleofmodule; @@ -512,7 +499,7 @@ if ($step == 3 && $datatoimport) // Lot de donnees a importer print '
'.$langs->trans("DatasetToImport").''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + print img_object($objimport->array_import_module[0]['module']->getName(), $objimport->array_import_icon[0]).' '; print $objimport->array_import_label[0]; print '
'; @@ -612,9 +599,7 @@ if ($step == 3 && $datatoimport) $langs->load('other'); $out .= ' '; $out .= info_admin($langs->trans("ThisLimitIsDefinedInSetup", $max, $maxphptoshow), 1); - } - else - { + } else { $out .= ' ('.$langs->trans("UploadDisabled").')'; } print $out; @@ -654,11 +639,11 @@ if ($step == 3 && $datatoimport) // Affiche date fichier print ''; // Del button - print ''; // Action button print ''; print ''; } @@ -768,9 +753,9 @@ if ($step == 4 && $datatoimport) // Now $array_match_file_to_database contains fieldnb(1,2,3...)=>fielddatabase(key in $array_match_file_to_database) - $param = '&format='.$format.'&datatoimport='.$datatoimport.'&filetoimport='.urlencode($filetoimport); - if ($excludefirstline) $param .= '&excludefirstline='.$excludefirstline; - if ($endatlinenb) $param .= '&endatlinenb='.$endatlinenb; + $param = '&format='.$format.'&datatoimport='.urlencode($datatoimport).'&filetoimport='.urlencode($filetoimport); + if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); + if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); if ($separator) $param .= '&separator='.urlencode($separator); if ($enclosure) $param .= '&enclosure='.urlencode($enclosure); @@ -788,7 +773,7 @@ if ($step == 4 && $datatoimport) // Module print ''; print ''; print ''; @@ -977,15 +962,12 @@ if ($step == 4 && $datatoimport) // Source field info $htmltext = ''.$langs->trans("FieldSource").'
'; if ($filecolumn > count($fieldssource)) $htmltext .= $langs->trans("DataComeFromNoWhere").'
'; - else - { + else { if (empty($objimport->array_import_convertvalue[0][$code])) // If source file does not need convertion { $filecolumntoshow = $filecolumn; $htmltext .= $langs->trans("DataComeFromFileFieldNb", $filecolumntoshow).'
'; - } - else - { + } else { if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') $htmltext .= $langs->trans("DataComeFromIdFoundFromRef", $filecolumn, $langs->transnoentitiesnoconv($entitylang)).'
'; if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') $htmltext .= $langs->trans("DataComeFromIdFoundFromCodeId", $filecolumn, $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).'
'; } @@ -997,9 +979,7 @@ if ($step == 4 && $datatoimport) if (empty($objimport->array_import_convertvalue[0][$code])) // If source file does not need convertion { if ($example) $htmltext .= $langs->trans("SourceExample").': '.$example.'
'; - } - else - { + } else { if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') $htmltext .= $langs->trans("SourceExample").': '.$langs->transnoentitiesnoconv("ExampleAnyRefFoundIntoElement", $entitylang).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'
'; elseif ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') $htmltext .= $langs->trans("SourceExample").': '.$langs->trans("ExampleAnyCodeOrIdFoundIntoDictionary", $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$code]['dict'])).($example ? ' ('.$langs->transnoentitiesnoconv("Example").': '.$example.')' : '').'
'; elseif ($example) $htmltext .= $langs->trans("SourceExample").': '.$example.'
'; @@ -1015,9 +995,7 @@ if ($step == 4 && $datatoimport) if (empty($objimport->array_import_convertvalue[0][$code])) // If source file does not need convertion { $htmltext .= $langs->trans("DataIsInsertedInto").'
'; - } - else - { + } else { if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromref') $htmltext .= $langs->trans("DataIDSourceIsInsertedInto").'
'; if ($objimport->array_import_convertvalue[0][$code]['rule'] == 'fetchidfromcodeid') $htmltext .= $langs->trans("DataCodeIDSourceIsInsertedInto").'
'; } @@ -1127,9 +1105,7 @@ if ($step == 4 && $datatoimport) if ($mandatoryfieldshavesource) { print ''.$langs->trans("NextStep").''; - } - else - { + } else { print ''.$langs->trans("NextStep").''; } } @@ -1171,7 +1147,7 @@ if ($step == 4 && $datatoimport) // List of existing import profils $sql = "SELECT rowid, label"; $sql .= " FROM ".MAIN_DB_PREFIX."import_model"; - $sql .= " WHERE type = '".$datatoimport."'"; + $sql .= " WHERE type = '".$db->escape($datatoimport)."'"; $sql .= " ORDER BY rowid"; $resql = $db->query($sql); if ($resql) @@ -1184,14 +1160,13 @@ if ($step == 4 && $datatoimport) print ''; $i++; } - } - else { + } else { dol_print_error($db); } @@ -1238,10 +1213,10 @@ if ($step == 5 && $datatoimport) $nboflines = $obj->import_get_nb_of_lines($conf->import->dir_temp.'/'.$filetoimport); - $param = '&leftmenu=import&format='.$format.'&datatoimport='.$datatoimport.'&filetoimport='.urlencode($filetoimport).'&nboflines='.$nboflines.'&separator='.urlencode($separator).'&enclosure='.urlencode($enclosure); + $param = '&leftmenu=import&format='.urlencode($format).'&datatoimport='.urlencode($datatoimport).'&filetoimport='.urlencode($filetoimport).'&nboflines='.urlencode($nboflines).'&separator='.urlencode($separator).'&enclosure='.urlencode($enclosure); $param2 = $param; // $param2 = $param without excludefirstline and endatlinenb - if ($excludefirstline) $param .= '&excludefirstline='.$excludefirstline; - if ($endatlinenb) $param .= '&endatlinenb='.$endatlinenb; + if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); + if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); if (!empty($updatekeys)) $param .= '&updatekeys[]='.implode('&updatekeys[]=', $updatekeys); llxHeader('', $langs->trans("NewImport"), 'EN:Module_Imports_En|FR:Module_Imports|ES:Módulo_Importaciones'); @@ -1264,7 +1239,7 @@ if ($step == 5 && $datatoimport) // Module print ''; print ''; print ''; @@ -1328,9 +1303,7 @@ if ($step == 5 && $datatoimport) { print ''; print ''; - } - else - { + } else { print ''; print $form->textwithpicto("", $langs->trans("SetThisValueTo2ToExcludeFirstLine")); } @@ -1339,9 +1312,7 @@ if ($step == 5 && $datatoimport) { print ''; print ''; - } - else - { + } else { print ''; print $form->textwithpicto("", $langs->trans("KeepEmptyToGoToEndOfFile")); } @@ -1356,9 +1327,7 @@ if ($step == 5 && $datatoimport) if (count($updatekeys)) { print $form->multiselectarray('updatekeysbis', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%', 'disabled'); - } - else - { + } else { print ''.$langs->trans("NoUpdateAttempt").'   -'; } foreach ($updatekeys as $val) { @@ -1370,9 +1339,7 @@ if ($step == 5 && $datatoimport) { //TODO dropdown UL is created inside nested SPANS print $form->multiselectarray('updatekeys', $objimport->array_import_updatekeys[0], $updatekeys, 0, 0, '', 1, '80%'); print $form->textwithpicto("", $langs->trans("SelectPrimaryColumnsForUpdateAttempt")); - } - else - { + } else { print ''.$langs->trans("UpdateNotYetSupportedForThisImport").''; } } @@ -1427,8 +1394,7 @@ if ($step == 5 && $datatoimport) }*/ print $newval; } - } - else print $langs->trans("Error"); + } else print $langs->trans("Error"); print ''; // Fields imported @@ -1470,15 +1436,11 @@ if ($step == 5 && $datatoimport) if ($user->rights->import->run) { print ''; - } - else - { + } else { print ''.$langs->trans("RunSimulateImportFile").''; } print ''; - } - else - { + } else { // Launch import $arrayoferrors = array(); $arrayofwarnings = array(); @@ -1528,9 +1490,7 @@ if ($step == 5 && $datatoimport) } // Close file $obj->import_close_file(); - } - else - { + } else { print $langs->trans("ErrorFailedToOpenFile", $pathfile); } @@ -1560,8 +1520,7 @@ if ($step == 5 && $datatoimport) print '
'.img_picto($langs->trans("OK"), 'tick').' '.$langs->trans("NoError").'


'; print $langs->trans("NbInsert", $obj->nbinsert).'
'; print $langs->trans("NbUpdate", $obj->nbupdate).'

'; - } - else print $langs->trans("NbOfLinesOK", $nbok).'

'; + } else print $langs->trans("NbOfLinesOK", $nbok).'

'; // Show Errors //var_dump($arrayoferrors); @@ -1628,16 +1587,12 @@ if ($step == 5 && $datatoimport) if (empty($nboferrors)) { print ''.$langs->trans("RunImportFile").''; - } - else - { + } else { //print ''; print ''.$langs->trans("RunImportFile").''; } - } - else - { + } else { print ''.$langs->trans("RunSimulateImportFile").''; print ''.$langs->trans("RunImportFile").''; @@ -1687,9 +1642,9 @@ if ($step == 6 && $datatoimport) $nboflines = (!empty($_GET["nboflines"]) ? $_GET["nboflines"] : dol_count_nb_of_line($conf->import->dir_temp.'/'.$filetoimport)); - $param = '&format='.$format.'&datatoimport='.$datatoimport.'&filetoimport='.urlencode($filetoimport).'&nboflines='.$nboflines; - if ($excludefirstline) $param .= '&excludefirstline='.$excludefirstline; - if ($endatlinenb) $param .= '&endatlinenb='.$endatlinenb; + $param = '&format='.$format.'&datatoimport='.urlencode($datatoimport).'&filetoimport='.urlencode($filetoimport).'&nboflines='.urlencode($nboflines); + if ($excludefirstline) $param .= '&excludefirstline='.urlencode($excludefirstline); + if ($endatlinenb) $param .= '&endatlinenb='.urlencode($endatlinenb); if ($separator) $param .= '&separator='.urlencode($separator); if ($enclosure) $param .= '&enclosure='.urlencode($enclosure); @@ -1707,7 +1662,7 @@ if ($step == 6 && $datatoimport) // Module print ''; print ''; print ''; @@ -1823,8 +1778,7 @@ if ($step == 6 && $datatoimport) }*/ print $newval; } - } - else print $langs->trans("Error"); + } else print $langs->trans("Error"); print ''; // Fields imported @@ -1896,15 +1850,12 @@ if ($step == 6 && $datatoimport) } // Close file $obj->import_close_file(); - } - else - { + } else { print $langs->trans("ErrorFailedToOpenFile", $pathfile); } if (count($arrayoferrors) > 0) $db->rollback(); // We force rollback because this was errors. - else - { + else { $error = 0; // Run the sql after import if defined @@ -1989,8 +1940,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') print $langs->trans("NoFields"); print ''; print ''; - } - elseif ($key == 'none') // Empty line + } elseif ($key == 'none') // Empty line { print ''; print ''; print ''; - } - else // Print field of source file + } else // Print field of source file { print ''; print ''); $('
PHP DebugBar | Open
').addClass(csscls('header')).append(this.$closebtn).appendTo(this.$el); $('
'.dol_print_date(dol_filemtime($dir.'/'.$file), 'dayhour').''.img_delete().''; - print ''.img_picto($langs->trans("NewImport"), 'filenew').''; + print ''.img_picto($langs->trans("NewImport"), 'next', 'class="fa-15x"').''; print '
'.$langs->trans("Module").''; - $titleofmodule = $objimport->array_import_module[0]->getName(); + $titleofmodule = $objimport->array_import_module[0]['module']->getName(); // Special cas for import common to module/services if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) $titleofmodule = $langs->trans("ProductOrService"); print $titleofmodule; @@ -797,7 +782,7 @@ if ($step == 4 && $datatoimport) // Lot de donnees a importer print '
'.$langs->trans("DatasetToImport").''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + print img_object($objimport->array_import_module[0]['module']->getName(), $objimport->array_import_icon[0]).' '; print $objimport->array_import_label[0]; print '
'; print $obj->label; print ''; - print 'rowid.'&filetoimport='.urlencode($filetoimport).'">'; + print 'rowid.'&filetoimport='.urlencode($filetoimport).'">'; print img_delete(); print ''; print '
'.$langs->trans("Module").''; - $titleofmodule = $objimport->array_import_module[0]->getName(); + $titleofmodule = $objimport->array_import_module[0]['module']->getName(); // Special cas for import common to module/services if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) $titleofmodule = $langs->trans("ProductOrService"); print $titleofmodule; @@ -1273,7 +1248,7 @@ if ($step == 5 && $datatoimport) // Lot de donnees a importer print '
'.$langs->trans("DatasetToImport").''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + print img_object($objimport->array_import_module[0]['module']->getName(), $objimport->array_import_icon[0]).' '; print $objimport->array_import_label[0]; print '
'.$langs->trans("Module").''; - $titleofmodule = $objimport->array_import_module[0]->getName(); + $titleofmodule = $objimport->array_import_module[0]['module']->getName(); // Special cas for import common to module/services if (in_array($objimport->array_import_code[0], array('produit_supplierprices', 'produit_multiprice', 'produit_languages'))) $titleofmodule = $langs->trans("ProductOrService"); print $titleofmodule; @@ -1716,7 +1671,7 @@ if ($step == 6 && $datatoimport) // Lot de donnees a importer print '
'.$langs->trans("DatasetToImport").''; - print img_object($objimport->array_import_module[0]->getName(), $objimport->array_import_icon[0]).' '; + print img_object($objimport->array_import_module[0]['module']->getName(), $objimport->array_import_icon[0]).' '; print $objimport->array_import_label[0]; print '
'; @@ -2000,8 +1950,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '') print ' '; print '
'; diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index 365df6086f4..bc68b53cfd0 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -45,69 +45,18 @@ llxHeader('', $langs->trans("ImportArea"), 'EN:Module_Imports_En|FR:Module_Impor print load_fiche_titre($langs->trans("ImportArea")); print $langs->trans("FormatedImportDesc1").'
'; -//print $langs->trans("FormatedImportDesc2").'
'; print '
'; -//print '
'; - - -// List of import set -/* -print '
'; -print ''; -print ''; -print ''; -print ''; -//print ''; -print ''; - -if (count($import->array_import_code)) -{ - foreach ($import->array_import_code as $key => $value) - { - print ''; - // print ''; - print ''; - - } -} -else -{ - print ''; -} -print '
'.$langs->trans("Module").''.$langs->trans("ImportableDatas").' 
'; - print img_object($import->array_import_module[$key]->getName(),$import->array_import_module[$key]->picto).' '; - print $import->array_import_module[$key]->getName(); - print ''; - $string=$langs->trans($import->array_import_label[$key]); - print ($string!=$import->array_import_label[$key]?$string:$import->array_import_label[$key]); - print ''; - // print ''.img_picto($langs->trans("NewImport"),'filenew').''; - // print '
'.$langs->trans("NoImportableData").'
'; -print '
'; -print '
'; -*/ - print '
'; if (count($import->array_import_code)) { - //if ($user->rights->import->run) - //{ print dolGetButtonTitle($langs->trans('NewImport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/imports/import.php?leftmenu=import'); - //} - //else - //{ - // print ''.$langs->trans("NewImport").''; - //} } print '
'; print '
'; -//print '
'; - - // List of available import format print '
'; print ''; @@ -136,8 +85,6 @@ print '
'; print '
'; -//print '
'; - // End of page llxFooter(); $db->close(); diff --git a/htdocs/includes/DebugBar/DataCollector/AssetProvider.php b/htdocs/includes/DebugBar/DataCollector/AssetProvider.php deleted file mode 100644 index 6910f737e17..00000000000 --- a/htdocs/includes/DebugBar/DataCollector/AssetProvider.php +++ /dev/null @@ -1,28 +0,0 @@ -name = $name; - $this->data = $data; - } - - /** - * Sets the data - * - * @param array $data - */ - public function setData(array $data) - { - $this->data = $data; - } - - public function collect() - { - $data = array(); - foreach ($this->data as $k => $v) { - if (!is_string($v)) { - $v = $this->getDataFormatter()->formatVar($v); - } - $data[$k] = $v; - } - return $data; - } - - public function getName() - { - return $this->name; - } - - public function getWidgets() - { - $name = $this->getName(); - return array( - "$name" => array( - "icon" => "gear", - "widget" => "PhpDebugBar.Widgets.VariableListWidget", - "map" => "$name", - "default" => "{}" - ) - ); - } -} diff --git a/htdocs/includes/DebugBar/DataCollector/DataCollector.php b/htdocs/includes/DebugBar/DataCollector/DataCollector.php deleted file mode 100644 index 081f66e6872..00000000000 --- a/htdocs/includes/DebugBar/DataCollector/DataCollector.php +++ /dev/null @@ -1,90 +0,0 @@ -dataFormater = $formater; - return $this; - } - - public function getDataFormatter() - { - if ($this->dataFormater === null) { - $this->dataFormater = self::getDefaultDataFormatter(); - } - return $this->dataFormater; - } - - /** - * @deprecated - */ - public function formatVar($var) - { - return $this->getDataFormatter()->formatVar($var); - } - - /** - * @deprecated - */ - public function formatDuration($seconds) - { - return $this->getDataFormatter()->formatDuration($seconds); - } - - /** - * @deprecated - */ - public function formatBytes($size, $precision = 2) - { - return $this->getDataFormatter()->formatBytes($size, $precision); - } -} diff --git a/htdocs/includes/DebugBar/DataCollector/PDO/TraceablePDO.php b/htdocs/includes/DebugBar/DataCollector/PDO/TraceablePDO.php deleted file mode 100644 index 5f7688b978e..00000000000 --- a/htdocs/includes/DebugBar/DataCollector/PDO/TraceablePDO.php +++ /dev/null @@ -1,196 +0,0 @@ -pdo = $pdo; - $this->pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('DebugBar\DataCollector\PDO\TraceablePDOStatement', array($this))); - } - - public function beginTransaction() - { - return $this->pdo->beginTransaction(); - } - - public function commit() - { - return $this->pdo->commit(); - } - - public function errorCode() - { - return $this->pdo->errorCode(); - } - - public function errorInfo() - { - return $this->pdo->errorInfo(); - } - - public function exec($sql) - { - return $this->profileCall('exec', $sql, func_get_args()); - } - - public function getAttribute($attr) - { - return $this->pdo->getAttribute($attr); - } - - public function inTransaction() - { - return $this->pdo->inTransaction(); - } - - public function lastInsertId($name = null) - { - return $this->pdo->lastInsertId($name); - } - - public function prepare($sql, $driver_options = array()) - { - return $this->pdo->prepare($sql, $driver_options); - } - - public function query($sql) - { - return $this->profileCall('query', $sql, func_get_args()); - } - - public function quote($expr, $parameter_type = PDO::PARAM_STR) - { - return $this->pdo->quote($expr, $parameter_type); - } - - public function rollBack() - { - return $this->pdo->rollBack(); - } - - public function setAttribute($attr, $value) - { - return $this->pdo->setAttribute($attr, $value); - } - - /** - * Profiles a call to a PDO method - * - * @param string $method - * @param string $sql - * @param array $args - * @return mixed The result of the call - */ - protected function profileCall($method, $sql, array $args) - { - $trace = new TracedStatement($sql); - $trace->start(); - - $ex = null; - try { - $result = call_user_func_array(array($this->pdo, $method), $args); - } catch (PDOException $e) { - $ex = $e; - } - - if ($this->pdo->getAttribute(PDO::ATTR_ERRMODE) !== PDO::ERRMODE_EXCEPTION && $result === false) { - $error = $this->pdo->errorInfo(); - $ex = new PDOException($error[2], $error[0]); - } - - $trace->end($ex); - $this->addExecutedStatement($trace); - - if ($this->pdo->getAttribute(PDO::ATTR_ERRMODE) === PDO::ERRMODE_EXCEPTION && $ex !== null) { - throw $ex; - } - return $result; - } - - /** - * Adds an executed TracedStatement - * - * @param TracedStatement $stmt - */ - public function addExecutedStatement(TracedStatement $stmt) - { - $this->executedStatements[] = $stmt; - } - - /** - * Returns the accumulated execution time of statements - * - * @return int - */ - public function getAccumulatedStatementsDuration() - { - return array_reduce($this->executedStatements, function ($v, $s) { return $v + $s->getDuration(); }); - } - - /** - * Returns the peak memory usage while performing statements - * - * @return int - */ - public function getMemoryUsage() - { - return array_reduce($this->executedStatements, function ($v, $s) { return $v + $s->getMemoryUsage(); }); - } - - /** - * Returns the peak memory usage while performing statements - * - * @return int - */ - public function getPeakMemoryUsage() - { - return array_reduce($this->executedStatements, function ($v, $s) { $m = $s->getEndMemory(); return $m > $v ? $m : $v; }); - } - - /** - * Returns the list of executed statements as TracedStatement objects - * - * @return array - */ - public function getExecutedStatements() - { - return $this->executedStatements; - } - - /** - * Returns the list of failed statements - * - * @return array - */ - public function getFailedExecutedStatements() - { - return array_filter($this->executedStatements, function ($s) { return !$s->isSuccess(); }); - } - - public function __get($name) - { - return $this->pdo->$name; - } - - public function __set($name, $value) - { - $this->pdo->$name = $value; - } - - public function __call($name, $args) - { - return call_user_func_array(array($this->pdo, $name), $args); - } -} diff --git a/htdocs/includes/DebugBar/DataCollector/PDO/TraceablePDOStatement.php b/htdocs/includes/DebugBar/DataCollector/PDO/TraceablePDOStatement.php deleted file mode 100644 index b903b10c361..00000000000 --- a/htdocs/includes/DebugBar/DataCollector/PDO/TraceablePDOStatement.php +++ /dev/null @@ -1,74 +0,0 @@ -pdo = $pdo; - } - - public function bindColumn($column, &$param, $type = null, $maxlen = null, $driverdata = null) - { - $this->boundParameters[$column] = $param; - $args = array_merge(array($column, &$param), array_slice(func_get_args(), 2)); - return call_user_func_array(array("parent", 'bindColumn'), $args); - } - - public function bindParam($param, &$var, $data_type = PDO::PARAM_STR, $length = null, $driver_options = null) - { - $this->boundParameters[$param] = $var; - $args = array_merge(array($param, &$var), array_slice(func_get_args(), 2)); - return call_user_func_array(array("parent", 'bindParam'), $args); - } - - public function bindValue($param, $value, $data_type = PDO::PARAM_STR) - { - $this->boundParameters[$param] = $value; - return call_user_func_array(array("parent", 'bindValue'), func_get_args()); - } - - public function execute($params = null) - { - $preparedId = spl_object_hash($this); - $boundParameters = $this->boundParameters; - if (is_array($params)) { - $boundParameters = array_merge($boundParameters, $params); - } - - $trace = new TracedStatement($this->queryString, $boundParameters, $preparedId); - $trace->start(); - - $ex = null; - try { - $result = parent::execute($params); - } catch (PDOException $e) { - $ex = $e; - } - - if ($this->pdo->getAttribute(PDO::ATTR_ERRMODE) !== PDO::ERRMODE_EXCEPTION && $result === false) { - $error = $this->errorInfo(); - $ex = new PDOException($error[2], $error[0]); - } - - $trace->end($ex, $this->rowCount()); - $this->pdo->addExecutedStatement($trace); - - if ($this->pdo->getAttribute(PDO::ATTR_ERRMODE) === PDO::ERRMODE_EXCEPTION && $ex !== null) { - throw $ex; - } - return $result; - } -} diff --git a/htdocs/includes/DebugBar/DataCollector/RequestDataCollector.php b/htdocs/includes/DebugBar/DataCollector/RequestDataCollector.php deleted file mode 100644 index 1b8de32cb52..00000000000 --- a/htdocs/includes/DebugBar/DataCollector/RequestDataCollector.php +++ /dev/null @@ -1,48 +0,0 @@ -getDataFormatter()->formatVar($GLOBALS[$var]); - } - } - - return $data; - } - - public function getName() - { - return 'request'; - } - - public function getWidgets() - { - return array( - "request" => array( - "icon" => "tags", - "widget" => "PhpDebugBar.Widgets.VariableListWidget", - "map" => "request", - "default" => "{}" - ) - ); - } -} diff --git a/htdocs/includes/DebugBar/DataFormatter/DataFormatter.php b/htdocs/includes/DebugBar/DataFormatter/DataFormatter.php deleted file mode 100644 index 73269459838..00000000000 --- a/htdocs/includes/DebugBar/DataFormatter/DataFormatter.php +++ /dev/null @@ -1,169 +0,0 @@ -kintLite($data); - } - - public function formatDuration($seconds) - { - if ($seconds < 0.001) { - return round($seconds * 1000000) . 'μs'; - } elseif ($seconds < 1) { - return round($seconds * 1000, 2) . 'ms'; - } - return round($seconds, 2) . 's'; - } - - public function formatBytes($size, $precision = 2) - { - if ($size === 0 || $size === null) { - return "0B"; - } - $base = log($size) / log(1024); - $suffixes = array('B', 'KB', 'MB', 'GB', 'TB'); - return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; - } - - /** - * lightweight version of Kint::dump(). Uses whitespace for formatting instead of html - * sadly not DRY yet - * - * Extracted from Kint.class.php in raveren/kint, https://github.com/raveren/kint - * Copyright (c) 2013 Rokas Šleinius (raveren@gmail.com) - * - * @param mixed $var - * @param int $level - * - * @return string - */ - protected function kintLite(&$var, $level = 0) - { - // initialize function names into variables for prettier string output (html and implode are also DRY) - $html = "htmlspecialchars"; - $implode = "implode"; - $strlen = "strlen"; - $count = "count"; - $getClass = "get_class"; - - if ( $var === null ) { - return 'NULL'; - } elseif ( is_bool( $var ) ) { - return 'bool ' . ( $var ? 'TRUE' : 'FALSE' ); - } elseif ( is_float( $var ) ) { - return 'float ' . $var; - } elseif ( is_int( $var ) ) { - return 'integer ' . $var; - } elseif ( is_resource( $var ) ) { - if ( ( $type = get_resource_type( $var ) ) === 'stream' and $meta = stream_get_meta_data( $var ) ) { - if ( isset( $meta['uri'] ) ) { - $file = $meta['uri']; - - return "resource ({$type}) {$html( $file, 0 )}"; - } else { - return "resource ({$type})"; - } - } else { - return "resource ({$type})"; - } - } elseif ( is_string( $var ) ) { - return "string ({$strlen( $var )}) \"{$html( $var )}\""; - } elseif ( is_array( $var ) ) { - $output = array(); - $space = str_repeat( $s = ' ', $level ); - - static $marker; - - if ( $marker === null ) { - // Make a unique marker - $marker = uniqid( "\x00" ); - } - - if ( empty( $var ) ) { - return "array()"; - } elseif ( isset( $var[$marker] ) ) { - $output[] = "[\n$space$s*RECURSION*\n$space]"; - } elseif ( $level < 7 ) { - $isSeq = array_keys( $var ) === range( 0, count( $var ) - 1 ); - - $output[] = "["; - - $var[$marker] = true; - - foreach ( $var as $key => &$val ) { - if ( $key === $marker ) { - continue; - } - - $key = $space . $s . ( $isSeq ? "" : "'{$html( $key, 0 )}' => " ); - - $dump = $this->kintLite( $val, $level + 1 ); - $output[] = "{$key}{$dump}"; - } - - unset( $var[$marker] ); - $output[] = "$space]"; - } else { - $output[] = "[\n$space$s*depth too great*\n$space]"; - } - return "array({$count( $var )}) {$implode( "\n", $output )}"; - } elseif ( is_object( $var ) ) { - if ( $var instanceof SplFileInfo ) { - return "object SplFileInfo " . $var->getRealPath(); - } - - // Copy the object as an array - $array = (array) $var; - - $output = array(); - $space = str_repeat( $s = ' ', $level ); - - $hash = spl_object_hash( $var ); - - // Objects that are being dumped - static $objects = array(); - - if ( empty( $array ) ) { - return "object {$getClass( $var )} {}"; - } elseif ( isset( $objects[$hash] ) ) { - $output[] = "{\n$space$s*RECURSION*\n$space}"; - } elseif ( $level < 7 ) { - $output[] = "{"; - $objects[$hash] = true; - - foreach ( $array as $key => & $val ) { - if ( $key[0] === "\x00" ) { - $access = $key[1] === "*" ? "protected" : "private"; - - // Remove the access level from the variable name - $key = substr( $key, strrpos( $key, "\x00" ) + 1 ); - } else { - $access = "public"; - } - - $output[] = "$space$s$access $key -> " . $this->kintLite( $val, $level + 1 ); - } - unset( $objects[$hash] ); - $output[] = "$space}"; - } else { - $output[] = "{\n$space$s*depth too great*\n$space}"; - } - - return "object {$getClass( $var )} ({$count( $array )}) {$implode( "\n", $output )}"; - } else { - return gettype( $var ) . htmlspecialchars( var_export( $var, true ), ENT_NOQUOTES ); - } - } -} diff --git a/htdocs/includes/DebugBar/RequestIdGenerator.php b/htdocs/includes/DebugBar/RequestIdGenerator.php deleted file mode 100644 index 934f407ff8f..00000000000 --- a/htdocs/includes/DebugBar/RequestIdGenerator.php +++ /dev/null @@ -1,22 +0,0 @@ -li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"} \ No newline at end of file diff --git a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/FontAwesome.otf b/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/FontAwesome.otf deleted file mode 100644 index 81c9ad949b4..00000000000 Binary files a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/FontAwesome.otf and /dev/null differ diff --git a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.eot b/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.eot deleted file mode 100644 index 84677bc0c5f..00000000000 Binary files a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.svg b/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.svg deleted file mode 100644 index d907b25ae60..00000000000 --- a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,520 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.ttf b/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.ttf deleted file mode 100644 index 96a3639cdde..00000000000 Binary files a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff b/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff deleted file mode 100644 index 628b6a52a87..00000000000 Binary files a/htdocs/includes/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/htdocs/includes/DebugBar/Resources/vendor/highlightjs/styles/github.css b/htdocs/includes/DebugBar/Resources/vendor/highlightjs/styles/github.css deleted file mode 100644 index 71967a3739c..00000000000 --- a/htdocs/includes/DebugBar/Resources/vendor/highlightjs/styles/github.css +++ /dev/null @@ -1,125 +0,0 @@ -/* - -github.com style (c) Vasily Polovnyov - -*/ - -.hljs { - display: block; padding: 0.5em; - color: #333; - background: #f8f8f8 -} - -.hljs-comment, -.hljs-template_comment, -.diff .hljs-header, -.hljs-javadoc { - color: #998; - font-style: italic -} - -.hljs-keyword, -.css .rule .hljs-keyword, -.hljs-winutils, -.javascript .hljs-title, -.nginx .hljs-title, -.hljs-subst, -.hljs-request, -.hljs-status { - color: #333; - font-weight: bold -} - -.hljs-number, -.hljs-hexcolor, -.ruby .hljs-constant { - color: #099; -} - -.hljs-string, -.hljs-tag .hljs-value, -.hljs-phpdoc, -.tex .hljs-formula { - color: #d14 -} - -.hljs-title, -.hljs-id, -.coffeescript .hljs-params, -.scss .hljs-preprocessor { - color: #900; - font-weight: bold -} - -.javascript .hljs-title, -.lisp .hljs-title, -.clojure .hljs-title, -.hljs-subst { - font-weight: normal -} - -.hljs-class .hljs-title, -.haskell .hljs-type, -.vhdl .hljs-literal, -.tex .hljs-command { - color: #458; - font-weight: bold -} - -.hljs-tag, -.hljs-tag .hljs-title, -.hljs-rules .hljs-property, -.django .hljs-tag .hljs-keyword { - color: #000080; - font-weight: normal -} - -.hljs-attribute, -.hljs-variable, -.lisp .hljs-body { - color: #008080 -} - -.hljs-regexp { - color: #009926 -} - -.hljs-symbol, -.ruby .hljs-symbol .hljs-string, -.lisp .hljs-keyword, -.tex .hljs-special, -.hljs-prompt { - color: #990073 -} - -.hljs-built_in, -.lisp .hljs-title, -.clojure .hljs-built_in { - color: #0086b3 -} - -.hljs-preprocessor, -.hljs-pragma, -.hljs-pi, -.hljs-doctype, -.hljs-shebang, -.hljs-cdata { - color: #999; - font-weight: bold -} - -.hljs-deletion { - background: #fdd -} - -.hljs-addition { - background: #dfd -} - -.diff .hljs-change { - background: #0086b3 -} - -.hljs-chunk { - color: #aaa -} diff --git a/htdocs/includes/DebugBar/Storage/MemcachedStorage.php b/htdocs/includes/DebugBar/Storage/MemcachedStorage.php deleted file mode 100644 index 9c2eef70019..00000000000 --- a/htdocs/includes/DebugBar/Storage/MemcachedStorage.php +++ /dev/null @@ -1,91 +0,0 @@ -memcached = $memcached; - $this->keyNamespace = $keyNamespace; - } - - public function save($id, $data) - { - $key = $this->createKey($id); - $this->memcached->set($key, $data); - if (!$this->memcached->append($this->keyNamespace, "|$key")) { - $this->memcached->set($this->keyNamespace, $key); - } - } - - public function get($id) - { - return $this->memcached->get($this->createKey($id)); - } - - public function find(array $filters = array(), $max = 20, $offset = 0) - { - if (!($keys = $this->memcached->get($this->keyNamespace))) { - return array(); - } - - $results = array(); - foreach (explode('|', $keys) as $key) { - if ($data = $this->memcached->get($key)) { - $meta = $data['__meta']; - if ($this->filter($meta, $filters)) { - $results[] = $meta; - } - } - } - return array_slice($results, $offset, $max); - } - - /** - * Filter the metadata for matches. - */ - protected function filter($meta, $filters) - { - foreach ($filters as $key => $value) { - if (!isset($meta[$key]) || fnmatch($value, $meta[$key]) === false) { - return false; - } - } - return true; - } - - public function clear() - { - if (!($keys = $this->memcached->get($this->keyNamespace))) { - return; - } - $this->memcached->delete($this->keyNamespace); - $this->memcached->deleteMulti(explode('|', $keys)); - } - - protected function createKey($id) - { - return md5("{$this->keyNamespace}.$id"); - } -} diff --git a/htdocs/includes/OAuth/OAuth2/Service/Google.php b/htdocs/includes/OAuth/OAuth2/Service/Google.php index 0d49609dccb..5ab0f8a474b 100644 --- a/htdocs/includes/OAuth/OAuth2/Service/Google.php +++ b/htdocs/includes/OAuth/OAuth2/Service/Google.php @@ -116,6 +116,11 @@ class Google extends AbstractService // Android Publisher const SCOPE_ANDROID_PUBLISHER = 'https://www.googleapis.com/auth/androidpublisher'; + + // Google Gsuite + const SCOPE_ADMIN_DIRECTORY_USER = "https://www.googleapis.com/auth/admin.directory.user"; + const SCOPE_ADMIN_DIRECTORY_CUSTOMER = "https://www.googleapis.com/auth/admin.directory.customer"; + protected $accessType = 'online'; public function __construct( @@ -150,7 +155,7 @@ class Google extends AbstractService } $this->approvalPrompt = $prompt; } - + /** * {@inheritdoc} */ diff --git a/htdocs/includes/jquery/js/jquery.js b/htdocs/includes/jquery/js/jquery.js index 5b16efa11d4..f2fa5e85896 100644 --- a/htdocs/includes/jquery/js/jquery.js +++ b/htdocs/includes/jquery/js/jquery.js @@ -1,5 +1,5 @@ /*! - * jQuery JavaScript Library v3.4.1 + * jQuery JavaScript Library v3.5.1 * https://jquery.com/ * * Includes Sizzle.js @@ -9,7 +9,7 @@ * Released under the MIT license * https://jquery.org/license * - * Date: 2019-05-01T21:04Z + * Date: 2020-05-04T22:49Z */ ( function( global, factory ) { @@ -47,13 +47,16 @@ var arr = []; -var document = window.document; - var getProto = Object.getPrototypeOf; var slice = arr.slice; -var concat = arr.concat; +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + var push = arr.push; @@ -86,6 +89,8 @@ var isWindow = function isWindow( obj ) { }; +var document = window.document; + var preservedScriptAttributes = { @@ -142,7 +147,7 @@ function toType( obj ) { var - version = "3.4.1", + version = "3.5.1", // Define a local copy of jQuery jQuery = function( selector, context ) { @@ -150,11 +155,7 @@ var // The jQuery object is actually just the init constructor 'enhanced' // Need init if jQuery is called (just allow error to be thrown if not included) return new jQuery.fn.init( selector, context ); - }, - - // Support: Android <=4.0 only - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; + }; jQuery.fn = jQuery.prototype = { @@ -220,6 +221,18 @@ jQuery.fn = jQuery.prototype = { return this.eq( -1 ); }, + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + eq: function( i ) { var len = this.length, j = +i + ( i < 0 ? len : 0 ); @@ -353,9 +366,10 @@ jQuery.extend( { return true; }, - // Evaluates a script in a global context - globalEval: function( code, options ) { - DOMEval( code, { nonce: options && options.nonce } ); + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); }, each: function( obj, callback ) { @@ -379,13 +393,6 @@ jQuery.extend( { return obj; }, - // Support: Android <=4.0 only - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - // results is for internal usage only makeArray: function( arr, results ) { var ret = results || []; @@ -472,7 +479,7 @@ jQuery.extend( { } // Flatten any nested arrays - return concat.apply( [], ret ); + return flat( ret ); }, // A global GUID counter for objects @@ -489,7 +496,7 @@ if ( typeof Symbol === "function" ) { // Populate the class2type map jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), -function( i, name ) { +function( _i, name ) { class2type[ "[object " + name + "]" ] = name.toLowerCase(); } ); @@ -511,17 +518,16 @@ function isArrayLike( obj ) { } var Sizzle = /*! - * Sizzle CSS Selector Engine v2.3.4 + * Sizzle CSS Selector Engine v2.3.5 * https://sizzlejs.com/ * * Copyright JS Foundation and other contributors * Released under the MIT license * https://js.foundation/ * - * Date: 2019-04-08 + * Date: 2020-03-14 */ -(function( window ) { - +( function( window ) { var i, support, Expr, @@ -561,59 +567,70 @@ var i, }, // Instance methods - hasOwn = ({}).hasOwnProperty, + hasOwn = ( {} ).hasOwnProperty, arr = [], pop = arr.pop, - push_native = arr.push, + pushNative = arr.push, push = arr.push, slice = arr.slice, + // Use a stripped-down indexOf as it's faster than native // https://jsperf.com/thor-indexof-vs-for/5 indexOf = function( list, elem ) { var i = 0, len = list.length; for ( ; i < len; i++ ) { - if ( list[i] === elem ) { + if ( list[ i ] === elem ) { return i; } } return -1; }, - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", // Regular expressions // http://www.w3.org/TR/css3-selectors/#whitespace whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = "(?:\\\\.|[\\w-]|[^\0-\\xa0])+", + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + // Operator (capture 2) "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", pseudos = ":(" + identifier + ")(?:\\((" + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: // 1. quoted (capture 3; capture 4 or capture 5) "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + // 2. simple (capture 6) "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + // 3. anything else (capture 2) ".*" + ")\\)|)", // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), rdescend = new RegExp( whitespace + "|>" ), rpseudo = new RegExp( pseudos ), @@ -625,14 +642,16 @@ var i, "TAG": new RegExp( "^(" + identifier + "|[*])" ), "ATTR": new RegExp( "^" + attributes ), "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + // For use in libraries implementing .is() // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) }, rhtml = /HTML$/i, @@ -648,18 +667,21 @@ var i, // CSS escapes // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair high < 0 ? - // BMP codepoint String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); }, @@ -675,7 +697,8 @@ var i, } // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; } // Other potentially-special ASCII characters get backslash-escaped @@ -700,18 +723,20 @@ var i, // Optimize for push.apply( _, NodeList ) try { push.apply( - (arr = slice.call( preferredDoc.childNodes )), + ( arr = slice.call( preferredDoc.childNodes ) ), preferredDoc.childNodes ); + // Support: Android<4.0 // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions arr[ preferredDoc.childNodes.length ].nodeType; } catch ( e ) { push = { apply: arr.length ? // Leverage slice if possible function( target, els ) { - push_native.apply( target, slice.call(els) ); + pushNative.apply( target, slice.call( els ) ); } : // Support: IE<9 @@ -719,8 +744,9 @@ try { function( target, els ) { var j = target.length, i = 0; + // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} + while ( ( target[ j++ ] = els[ i++ ] ) ) {} target.length = j - 1; } }; @@ -744,24 +770,21 @@ function Sizzle( selector, context, results, seed ) { // Try to shortcut find operations (as opposed to filters) in HTML documents if ( !seed ) { - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } + setDocument( context ); context = context || document; if ( documentIsHTML ) { // If the selector is sufficiently simple, try using a "get*By*" DOM method // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { // ID selector - if ( (m = match[1]) ) { + if ( ( m = match[ 1 ] ) ) { // Document context if ( nodeType === 9 ) { - if ( (elem = context.getElementById( m )) ) { + if ( ( elem = context.getElementById( m ) ) ) { // Support: IE, Opera, Webkit // TODO: identify versions @@ -780,7 +803,7 @@ function Sizzle( selector, context, results, seed ) { // Support: IE, Opera, Webkit // TODO: identify versions // getElementById can match elements by name instead of ID - if ( newContext && (elem = newContext.getElementById( m )) && + if ( newContext && ( elem = newContext.getElementById( m ) ) && contains( context, elem ) && elem.id === m ) { @@ -790,12 +813,12 @@ function Sizzle( selector, context, results, seed ) { } // Type selector - } else if ( match[2] ) { + } else if ( match[ 2 ] ) { push.apply( results, context.getElementsByTagName( selector ) ); return results; // Class selector - } else if ( (m = match[3]) && support.getElementsByClassName && + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && context.getElementsByClassName ) { push.apply( results, context.getElementsByClassName( m ) ); @@ -806,11 +829,11 @@ function Sizzle( selector, context, results, seed ) { // Take advantage of querySelectorAll if ( support.qsa && !nonnativeSelectorCache[ selector + " " ] && - (!rbuggyQSA || !rbuggyQSA.test( selector )) && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && // Support: IE 8 only // Exclude object elements - (nodeType !== 1 || context.nodeName.toLowerCase() !== "object") ) { + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { newSelector = selector; newContext = context; @@ -819,27 +842,36 @@ function Sizzle( selector, context, results, seed ) { // descendant combinators, which is not what we want. // In such cases, we work around the behavior by prefixing every selector in the // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && rdescend.test( selector ) ) { + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { - // Capture the context ID, setting it first if necessary - if ( (nid = context.getAttribute( "id" )) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", (nid = expando) ); + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } } // Prefix every selector in the list groups = tokenize( selector ); i = groups.length; while ( i-- ) { - groups[i] = "#" + nid + " " + toSelector( groups[i] ); + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); } newSelector = groups.join( "," ); - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; } try { @@ -872,12 +904,14 @@ function createCache() { var keys = []; function cache( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) if ( keys.push( key + " " ) > Expr.cacheLength ) { + // Only keep the most recent entries delete cache[ keys.shift() ]; } - return (cache[ key + " " ] = value); + return ( cache[ key + " " ] = value ); } return cache; } @@ -896,17 +930,19 @@ function markFunction( fn ) { * @param {Function} fn Passed the created element and returns a boolean result */ function assert( fn ) { - var el = document.createElement("fieldset"); + var el = document.createElement( "fieldset" ); try { return !!fn( el ); - } catch (e) { + } catch ( e ) { return false; } finally { + // Remove from its parent by default if ( el.parentNode ) { el.parentNode.removeChild( el ); } + // release memory in IE el = null; } @@ -918,11 +954,11 @@ function assert( fn ) { * @param {Function} handler The method that will be applied */ function addHandle( attrs, handler ) { - var arr = attrs.split("|"), + var arr = attrs.split( "|" ), i = arr.length; while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; + Expr.attrHandle[ arr[ i ] ] = handler; } } @@ -944,7 +980,7 @@ function siblingCheck( a, b ) { // Check if b follows a if ( cur ) { - while ( (cur = cur.nextSibling) ) { + while ( ( cur = cur.nextSibling ) ) { if ( cur === b ) { return -1; } @@ -972,7 +1008,7 @@ function createInputPseudo( type ) { function createButtonPseudo( type ) { return function( elem ) { var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; + return ( name === "input" || name === "button" ) && elem.type === type; }; } @@ -1015,7 +1051,7 @@ function createDisabledPseudo( disabled ) { // Where there is no isDisabled, check manually /* jshint -W018 */ elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; + inDisabledFieldset( elem ) === disabled; } return elem.disabled === disabled; @@ -1037,21 +1073,21 @@ function createDisabledPseudo( disabled ) { * @param {Function} fn */ function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { + return markFunction( function( argument ) { argument = +argument; - return markFunction(function( seed, matches ) { + return markFunction( function( seed, matches ) { var j, matchIndexes = fn( [], seed.length, argument ), i = matchIndexes.length; // Match elements found at the specified indexes while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); } } - }); - }); + } ); + } ); } /** @@ -1073,7 +1109,7 @@ support = Sizzle.support = {}; */ isXML = Sizzle.isXML = function( elem ) { var namespace = elem.namespaceURI, - docElem = (elem.ownerDocument || elem).documentElement; + docElem = ( elem.ownerDocument || elem ).documentElement; // Support: IE <=8 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes @@ -1091,7 +1127,11 @@ setDocument = Sizzle.setDocument = function( node ) { doc = node ? node.ownerDocument || node : preferredDoc; // Return early if doc is invalid or already selected - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { return document; } @@ -1100,10 +1140,14 @@ setDocument = Sizzle.setDocument = function( node ) { docElem = document.documentElement; documentIsHTML = !isXML( document ); - // Support: IE 9-11, Edge + // Support: IE 9 - 11+, Edge 12 - 18+ // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - if ( preferredDoc !== document && - (subWindow = document.defaultView) && subWindow.top !== subWindow ) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { // Support: IE 11, Edge if ( subWindow.addEventListener ) { @@ -1115,25 +1159,36 @@ setDocument = Sizzle.setDocument = function( node ) { } } + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + /* Attributes ---------------------------------------------------------------------- */ // Support: IE<8 // Verify that getAttribute really returns attributes and not properties // (excepting IE8 booleans) - support.attributes = assert(function( el ) { + support.attributes = assert( function( el ) { el.className = "i"; - return !el.getAttribute("className"); - }); + return !el.getAttribute( "className" ); + } ); /* getElement(s)By* ---------------------------------------------------------------------- */ // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( el ) { - el.appendChild( document.createComment("") ); - return !el.getElementsByTagName("*").length; - }); + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); // Support: IE<9 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); @@ -1142,38 +1197,38 @@ setDocument = Sizzle.setDocument = function( node ) { // Check if getElementById returns elements by name // The broken getElementById methods don't pick up programmatically-set names, // so use a roundabout getElementsByName test - support.getById = assert(function( el ) { + support.getById = assert( function( el ) { docElem.appendChild( el ).id = expando; return !document.getElementsByName || !document.getElementsByName( expando ).length; - }); + } ); // ID filter and find if ( support.getById ) { - Expr.filter["ID"] = function( id ) { + Expr.filter[ "ID" ] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { - return elem.getAttribute("id") === attrId; + return elem.getAttribute( "id" ) === attrId; }; }; - Expr.find["ID"] = function( id, context ) { + Expr.find[ "ID" ] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var elem = context.getElementById( id ); return elem ? [ elem ] : []; } }; } else { - Expr.filter["ID"] = function( id ) { + Expr.filter[ "ID" ] = function( id ) { var attrId = id.replace( runescape, funescape ); return function( elem ) { var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode("id"); + elem.getAttributeNode( "id" ); return node && node.value === attrId; }; }; // Support: IE 6 - 7 only // getElementById is not reliable as a find shortcut - Expr.find["ID"] = function( id, context ) { + Expr.find[ "ID" ] = function( id, context ) { if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { var node, i, elems, elem = context.getElementById( id ); @@ -1181,7 +1236,7 @@ setDocument = Sizzle.setDocument = function( node ) { if ( elem ) { // Verify the id attribute - node = elem.getAttributeNode("id"); + node = elem.getAttributeNode( "id" ); if ( node && node.value === id ) { return [ elem ]; } @@ -1189,8 +1244,8 @@ setDocument = Sizzle.setDocument = function( node ) { // Fall back on getElementsByName elems = context.getElementsByName( id ); i = 0; - while ( (elem = elems[i++]) ) { - node = elem.getAttributeNode("id"); + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); if ( node && node.value === id ) { return [ elem ]; } @@ -1203,7 +1258,7 @@ setDocument = Sizzle.setDocument = function( node ) { } // Tag - Expr.find["TAG"] = support.getElementsByTagName ? + Expr.find[ "TAG" ] = support.getElementsByTagName ? function( tag, context ) { if ( typeof context.getElementsByTagName !== "undefined" ) { return context.getElementsByTagName( tag ); @@ -1218,12 +1273,13 @@ setDocument = Sizzle.setDocument = function( node ) { var elem, tmp = [], i = 0, + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too results = context.getElementsByTagName( tag ); // Filter out possible comments if ( tag === "*" ) { - while ( (elem = results[i++]) ) { + while ( ( elem = results[ i++ ] ) ) { if ( elem.nodeType === 1 ) { tmp.push( elem ); } @@ -1235,7 +1291,7 @@ setDocument = Sizzle.setDocument = function( node ) { }; // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { return context.getElementsByClassName( className ); } @@ -1256,10 +1312,14 @@ setDocument = Sizzle.setDocument = function( node ) { // See https://bugs.jquery.com/ticket/13378 rbuggyQSA = []; - if ( (support.qsa = rnative.test( document.querySelectorAll )) ) { + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + // Build QSA regex // Regex strategy adopted from Diego Perini - assert(function( el ) { + assert( function( el ) { + + var input; + // Select is set to empty string on purpose // This is to test IE's treatment of not explicitly // setting a boolean content attribute, @@ -1273,78 +1333,98 @@ setDocument = Sizzle.setDocument = function( node ) { // Nothing should be selected when empty strings follow ^= or $= or *= // The test attribute must be unknown in Opera but "safe" for WinRT // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll("[msallowcapture^='']").length ) { + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); } // Support: IE8 // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll("[selected]").length ) { + if ( !el.querySelectorAll( "[selected]" ).length ) { rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); } // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); } // Webkit/Opera - :checked should return selected option elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); } // Support: Safari 8+, iOS 8+ // https://bugs.webkit.org/show_bug.cgi?id=136851 // In-page `selector#id sibling-combinator selector` fails if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); + rbuggyQSA.push( ".#.+[+~]" ); } - }); - assert(function( el ) { + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { el.innerHTML = "" + ""; // Support: Windows 8 Native Apps // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement("input"); + var input = document.createElement( "input" ); input.setAttribute( "type", "hidden" ); el.appendChild( input ).setAttribute( "name", "D" ); // Support: IE8 // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll("[name=d]").length ) { + if ( el.querySelectorAll( "[name=d]" ).length ) { rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); } // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) // IE8 throws error here and will not see later tests - if ( el.querySelectorAll(":enabled").length !== 2 ) { + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } // Support: IE9-11+ // IE's :disabled selector does not pick up the children of disabled fieldsets docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll(":disabled").length !== 2 ) { + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { rbuggyQSA.push( ":enabled", ":disabled" ); } + // Support: Opera 10 - 11 only // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); } - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || docElem.webkitMatchesSelector || docElem.mozMatchesSelector || docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { - assert(function( el ) { // Check to see if it's possible to do matchesSelector // on a disconnected node (IE 9) support.disconnectedMatch = matches.call( el, "*" ); @@ -1353,11 +1433,11 @@ setDocument = Sizzle.setDocument = function( node ) { // Gecko does not error, returns false instead matches.call( el, "[s!='']:x" ); rbuggyMatches.push( "!=", pseudos ); - }); + } ); } - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); /* Contains ---------------------------------------------------------------------- */ @@ -1374,11 +1454,11 @@ setDocument = Sizzle.setDocument = function( node ) { adown.contains ? adown.contains( bup ) : a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); + ) ); } : function( a, b ) { if ( b ) { - while ( (b = b.parentNode) ) { + while ( ( b = b.parentNode ) ) { if ( b === a ) { return true; } @@ -1407,7 +1487,11 @@ setDocument = Sizzle.setDocument = function( node ) { } // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? a.compareDocumentPosition( b ) : // Otherwise we know they are disconnected @@ -1415,13 +1499,24 @@ setDocument = Sizzle.setDocument = function( node ) { // Disconnected nodes if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { // Choose the first element that is related to our preferred document - if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { return -1; } - if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { return 1; } @@ -1434,6 +1529,7 @@ setDocument = Sizzle.setDocument = function( node ) { return compare & 4 ? -1 : 1; } : function( a, b ) { + // Exit early if the nodes are identical if ( a === b ) { hasDuplicate = true; @@ -1449,8 +1545,14 @@ setDocument = Sizzle.setDocument = function( node ) { // Parentless nodes are either documents or disconnected if ( !aup || !bup ) { - return a === document ? -1 : - b === document ? 1 : + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ aup ? -1 : bup ? 1 : sortInput ? @@ -1464,26 +1566,32 @@ setDocument = Sizzle.setDocument = function( node ) { // Otherwise we need full lists of their ancestors for comparison cur = a; - while ( (cur = cur.parentNode) ) { + while ( ( cur = cur.parentNode ) ) { ap.unshift( cur ); } cur = b; - while ( (cur = cur.parentNode) ) { + while ( ( cur = cur.parentNode ) ) { bp.unshift( cur ); } // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { + while ( ap[ i ] === bp[ i ] ) { i++; } return i ? + // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : + siblingCheck( ap[ i ], bp[ i ] ) : // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ 0; }; @@ -1495,10 +1603,7 @@ Sizzle.matches = function( expr, elements ) { }; Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } + setDocument( elem ); if ( support.matchesSelector && documentIsHTML && !nonnativeSelectorCache[ expr + " " ] && @@ -1510,12 +1615,13 @@ Sizzle.matchesSelector = function( elem, expr ) { // IE 9's matchesSelector returns false on disconnected nodes if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { return ret; } - } catch (e) { + } catch ( e ) { nonnativeSelectorCache( expr, true ); } } @@ -1524,20 +1630,31 @@ Sizzle.matchesSelector = function( elem, expr ) { }; Sizzle.contains = function( context, elem ) { + // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { setDocument( context ); } return contains( context, elem ); }; Sizzle.attr = function( elem, name ) { + // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { setDocument( elem ); } var fn = Expr.attrHandle[ name.toLowerCase() ], + // Don't get fooled by Object.prototype properties (jQuery #13807) val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? fn( elem, name, !documentIsHTML ) : @@ -1547,13 +1664,13 @@ Sizzle.attr = function( elem, name ) { val : support.attributes || !documentIsHTML ? elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? + ( val = elem.getAttributeNode( name ) ) && val.specified ? val.value : null; }; Sizzle.escape = function( sel ) { - return (sel + "").replace( rcssescape, fcssescape ); + return ( sel + "" ).replace( rcssescape, fcssescape ); }; Sizzle.error = function( msg ) { @@ -1576,7 +1693,7 @@ Sizzle.uniqueSort = function( results ) { results.sort( sortOrder ); if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { + while ( ( elem = results[ i++ ] ) ) { if ( elem === results[ i ] ) { j = duplicates.push( i ); } @@ -1604,17 +1721,21 @@ getText = Sizzle.getText = function( elem ) { nodeType = elem.nodeType; if ( !nodeType ) { + // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { + while ( ( node = elem[ i++ ] ) ) { + // Do not traverse comment nodes ret += getText( node ); } } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements // innerText usage removed for consistency of new lines (jQuery #11153) if ( typeof elem.textContent === "string" ) { return elem.textContent; } else { + // Traverse its children for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { ret += getText( elem ); @@ -1623,6 +1744,7 @@ getText = Sizzle.getText = function( elem ) { } else if ( nodeType === 3 || nodeType === 4 ) { return elem.nodeValue; } + // Do not include comment or processing instruction nodes return ret; @@ -1650,19 +1772,21 @@ Expr = Sizzle.selectors = { preFilter: { "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; } return match.slice( 0, 4 ); }, "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] 1 type (only|nth|...) 2 what (child|of-type) @@ -1673,22 +1797,25 @@ Expr = Sizzle.selectors = { 7 sign of y-component 8 y of y-component */ - match[1] = match[1].toLowerCase(); + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { - if ( match[1].slice( 0, 3 ) === "nth" ) { // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); } // numeric x and y parameters for Expr.filter.CHILD // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); } return match; @@ -1696,26 +1823,28 @@ Expr = Sizzle.selectors = { "PSEUDO": function( match ) { var excess, - unquoted = !match[6] && match[2]; + unquoted = !match[ 6 ] && match[ 2 ]; - if ( matchExpr["CHILD"].test( match[0] ) ) { + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { return null; } // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; // Strip excess characters from unquoted arguments } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && + ( excess = tokenize( unquoted, true ) ) && + // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); } // Return only captures needed by the pseudo filter method (type and argument) @@ -1728,7 +1857,9 @@ Expr = Sizzle.selectors = { "TAG": function( nodeNameSelector ) { var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); return nodeNameSelector === "*" ? - function() { return true; } : + function() { + return true; + } : function( elem ) { return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; }; @@ -1738,10 +1869,16 @@ Expr = Sizzle.selectors = { var pattern = classCache[ className + " " ]; return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); }, "ATTR": function( name, operator, check ) { @@ -1757,6 +1894,8 @@ Expr = Sizzle.selectors = { result += ""; + /* eslint-disable max-len */ + return operator === "=" ? result === check : operator === "!=" ? result !== check : operator === "^=" ? check && result.indexOf( check ) === 0 : @@ -1765,10 +1904,12 @@ Expr = Sizzle.selectors = { operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : false; + /* eslint-enable max-len */ + }; }, - "CHILD": function( type, what, argument, first, last ) { + "CHILD": function( type, what, _argument, first, last ) { var simple = type.slice( 0, 3 ) !== "nth", forward = type.slice( -4 ) !== "last", ofType = what === "of-type"; @@ -1780,7 +1921,7 @@ Expr = Sizzle.selectors = { return !!elem.parentNode; } : - function( elem, context, xml ) { + function( elem, _context, xml ) { var cache, uniqueCache, outerCache, node, nodeIndex, start, dir = simple !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, @@ -1794,7 +1935,7 @@ Expr = Sizzle.selectors = { if ( simple ) { while ( dir ) { node = elem; - while ( (node = node[ dir ]) ) { + while ( ( node = node[ dir ] ) ) { if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { @@ -1802,6 +1943,7 @@ Expr = Sizzle.selectors = { return false; } } + // Reverse direction for :only-* (if we haven't yet done so) start = dir = type === "only" && !start && "nextSibling"; } @@ -1817,22 +1959,22 @@ Expr = Sizzle.selectors = { // ...in a gzip-friendly way node = parent; - outerCache = node[ expando ] || (node[ expando ] = {}); + outerCache = node[ expando ] || ( node[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); + ( outerCache[ node.uniqueID ] = {} ); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; diff = nodeIndex && cache[ 2 ]; node = nodeIndex && parent.childNodes[ nodeIndex ]; - while ( (node = ++nodeIndex && node && node[ dir ] || + while ( ( node = ++nodeIndex && node && node[ dir ] || // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { + ( diff = nodeIndex = 0 ) || start.pop() ) ) { // When found, cache indexes on `parent` and break if ( node.nodeType === 1 && ++diff && node === elem ) { @@ -1842,16 +1984,18 @@ Expr = Sizzle.selectors = { } } else { + // Use previously-cached element index if available if ( useCache ) { + // ...in a gzip-friendly way node = elem; - outerCache = node[ expando ] || (node[ expando ] = {}); + outerCache = node[ expando ] || ( node[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); + ( outerCache[ node.uniqueID ] = {} ); cache = uniqueCache[ type ] || []; nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; @@ -1861,9 +2005,10 @@ Expr = Sizzle.selectors = { // xml :nth-child(...) // or :nth-last-child(...) or :nth(-last)?-of-type(...) if ( diff === false ) { + // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { if ( ( ofType ? node.nodeName.toLowerCase() === name : @@ -1872,12 +2017,13 @@ Expr = Sizzle.selectors = { // Cache the index of each encountered element if ( useCache ) { - outerCache = node[ expando ] || (node[ expando ] = {}); + outerCache = node[ expando ] || + ( node[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) uniqueCache = outerCache[ node.uniqueID ] || - (outerCache[ node.uniqueID ] = {}); + ( outerCache[ node.uniqueID ] = {} ); uniqueCache[ type ] = [ dirruns, diff ]; } @@ -1898,6 +2044,7 @@ Expr = Sizzle.selectors = { }, "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive // http://www.w3.org/TR/selectors/#pseudo-classes // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters @@ -1917,15 +2064,15 @@ Expr = Sizzle.selectors = { if ( fn.length > 1 ) { args = [ pseudo, pseudo, "", argument ]; return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { + markFunction( function( seed, matches ) { var idx, matched = fn( seed, argument ), i = matched.length; while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); } - }) : + } ) : function( elem ) { return fn( elem, 0, args ); }; @@ -1936,8 +2083,10 @@ Expr = Sizzle.selectors = { }, pseudos: { + // Potentially complex pseudos - "not": markFunction(function( selector ) { + "not": markFunction( function( selector ) { + // Trim the selector passed to compile // to avoid treating leading and trailing // spaces as combinators @@ -1946,39 +2095,40 @@ Expr = Sizzle.selectors = { matcher = compile( selector.replace( rtrim, "$1" ) ); return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { + markFunction( function( seed, matches, _context, xml ) { var elem, unmatched = matcher( seed, null, xml, [] ), i = seed.length; // Match elements unmatched by `matcher` while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); } } - }) : - function( elem, context, xml ) { - input[0] = elem; + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; matcher( input, null, xml, results ); + // Don't keep the element (issue #299) - input[0] = null; + input[ 0 ] = null; return !results.pop(); }; - }), + } ), - "has": markFunction(function( selector ) { + "has": markFunction( function( selector ) { return function( elem ) { return Sizzle( selector, elem ).length > 0; }; - }), + } ), - "contains": markFunction(function( text ) { + "contains": markFunction( function( text ) { text = text.replace( runescape, funescape ); return function( elem ) { return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; }; - }), + } ), // "Whether an element is represented by a :lang() selector // is based solely on the element's language value @@ -1988,25 +2138,26 @@ Expr = Sizzle.selectors = { // The identifier C does not have to be a valid language name." // http://www.w3.org/TR/selectors/#lang-pseudo "lang": markFunction( function( lang ) { + // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { + if ( !ridentifier.test( lang || "" ) ) { Sizzle.error( "unsupported lang: " + lang ); } lang = lang.replace( runescape, funescape ).toLowerCase(); return function( elem ) { var elemLang; do { - if ( (elemLang = documentIsHTML ? + if ( ( elemLang = documentIsHTML ? elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { elemLang = elemLang.toLowerCase(); return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); return false; }; - }), + } ), // Miscellaneous "target": function( elem ) { @@ -2019,7 +2170,9 @@ Expr = Sizzle.selectors = { }, "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); }, // Boolean properties @@ -2027,16 +2180,20 @@ Expr = Sizzle.selectors = { "disabled": createDisabledPseudo( true ), "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); }, "selected": function( elem ) { + // Accessing this property makes selected-by-default // options in Safari work properly if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions elem.parentNode.selectedIndex; } @@ -2045,6 +2202,7 @@ Expr = Sizzle.selectors = { // Contents "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), // but not by others (comment: 8; processing instruction: 7; etc.) @@ -2058,7 +2216,7 @@ Expr = Sizzle.selectors = { }, "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); + return !Expr.pseudos[ "empty" ]( elem ); }, // Element/input types @@ -2082,39 +2240,40 @@ Expr = Sizzle.selectors = { // Support: IE<8 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); }, // Position-in-collection - "first": createPositionalPseudo(function() { + "first": createPositionalPseudo( function() { return [ 0 ]; - }), + } ), - "last": createPositionalPseudo(function( matchIndexes, length ) { + "last": createPositionalPseudo( function( _matchIndexes, length ) { return [ length - 1 ]; - }), + } ), - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { return [ argument < 0 ? argument + length : argument ]; - }), + } ), - "even": createPositionalPseudo(function( matchIndexes, length ) { + "even": createPositionalPseudo( function( matchIndexes, length ) { var i = 0; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; - }), + } ), - "odd": createPositionalPseudo(function( matchIndexes, length ) { + "odd": createPositionalPseudo( function( matchIndexes, length ) { var i = 1; for ( ; i < length; i += 2 ) { matchIndexes.push( i ); } return matchIndexes; - }), + } ), - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument > length ? @@ -2124,19 +2283,19 @@ Expr = Sizzle.selectors = { matchIndexes.push( i ); } return matchIndexes; - }), + } ), - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { var i = argument < 0 ? argument + length : argument; for ( ; ++i < length; ) { matchIndexes.push( i ); } return matchIndexes; - }) + } ) } }; -Expr.pseudos["nth"] = Expr.pseudos["eq"]; +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; // Add button/input type pseudos for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { @@ -2167,37 +2326,39 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) { while ( soFar ) { // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { if ( match ) { + // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; + soFar = soFar.slice( match[ 0 ].length ) || soFar; } - groups.push( (tokens = []) ); + groups.push( ( tokens = [] ) ); } matched = false; // Combinators - if ( (match = rcombinators.exec( soFar )) ) { + if ( ( match = rcombinators.exec( soFar ) ) ) { matched = match.shift(); - tokens.push({ + tokens.push( { value: matched, + // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); + type: match[ 0 ].replace( rtrim, " " ) + } ); soFar = soFar.slice( matched.length ); } // Filters for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { matched = match.shift(); - tokens.push({ + tokens.push( { value: matched, type: type, matches: match - }); + } ); soFar = soFar.slice( matched.length ); } } @@ -2214,6 +2375,7 @@ tokenize = Sizzle.tokenize = function( selector, parseOnly ) { soFar.length : soFar ? Sizzle.error( selector ) : + // Cache the tokens tokenCache( selector, groups ).slice( 0 ); }; @@ -2223,7 +2385,7 @@ function toSelector( tokens ) { len = tokens.length, selector = ""; for ( ; i < len; i++ ) { - selector += tokens[i].value; + selector += tokens[ i ].value; } return selector; } @@ -2236,9 +2398,10 @@ function addCombinator( matcher, combinator, base ) { doneName = done++; return combinator.first ? + // Check against closest ancestor/preceding element function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { + while ( ( elem = elem[ dir ] ) ) { if ( elem.nodeType === 1 || checkNonElements ) { return matcher( elem, context, xml ); } @@ -2253,7 +2416,7 @@ function addCombinator( matcher, combinator, base ) { // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching if ( xml ) { - while ( (elem = elem[ dir ]) ) { + while ( ( elem = elem[ dir ] ) ) { if ( elem.nodeType === 1 || checkNonElements ) { if ( matcher( elem, context, xml ) ) { return true; @@ -2261,27 +2424,29 @@ function addCombinator( matcher, combinator, base ) { } } } else { - while ( (elem = elem[ dir ]) ) { + while ( ( elem = elem[ dir ] ) ) { if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); // Support: IE <9 only // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {}); + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); if ( skip && skip === elem.nodeName.toLowerCase() ) { elem = elem[ dir ] || elem; - } else if ( (oldCache = uniqueCache[ key ]) && + } else if ( ( oldCache = uniqueCache[ key ] ) && oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); + return ( newCache[ 2 ] = oldCache[ 2 ] ); } else { + // Reuse newcache so results back-propagate to previous elements uniqueCache[ key ] = newCache; // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { return true; } } @@ -2297,20 +2462,20 @@ function elementMatcher( matchers ) { function( elem, context, xml ) { var i = matchers.length; while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { + if ( !matchers[ i ]( elem, context, xml ) ) { return false; } } return true; } : - matchers[0]; + matchers[ 0 ]; } function multipleContexts( selector, contexts, results ) { var i = 0, len = contexts.length; for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); + Sizzle( selector, contexts[ i ], results ); } return results; } @@ -2323,7 +2488,7 @@ function condense( unmatched, map, filter, context, xml ) { mapped = map != null; for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { + if ( ( elem = unmatched[ i ] ) ) { if ( !filter || filter( elem, context, xml ) ) { newUnmatched.push( elem ); if ( mapped ) { @@ -2343,14 +2508,18 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS if ( postFinder && !postFinder[ expando ] ) { postFinder = setMatcher( postFinder, postSelector ); } - return markFunction(function( seed, results, context, xml ) { + return markFunction( function( seed, results, context, xml ) { var temp, i, elem, preMap = [], postMap = [], preexisting = results.length, // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), // Prefilter to get matcher input, preserving a map for seed-results synchronization matcherIn = preFilter && ( seed || !selector ) ? @@ -2358,6 +2527,7 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS elems, matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, postFinder || ( seed ? preFilter : preexisting || postFilter ) ? @@ -2381,8 +2551,8 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS // Un-match failing elements by moving them back to matcherIn i = temp.length; while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); } } } @@ -2390,25 +2560,27 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS if ( seed ) { if ( postFinder || preFilter ) { if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts temp = []; i = matcherOut.length; while ( i-- ) { - if ( (elem = matcherOut[i]) ) { + if ( ( elem = matcherOut[ i ] ) ) { + // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); + temp.push( ( matcherIn[ i ] = elem ) ); } } - postFinder( null, (matcherOut = []), temp, xml ); + postFinder( null, ( matcherOut = [] ), temp, xml ); } // Move matched elements from seed to results to keep them synchronized i = matcherOut.length; while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { - seed[temp] = !(results[temp] = elem); + seed[ temp ] = !( results[ temp ] = elem ); } } } @@ -2426,14 +2598,14 @@ function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postS push.apply( results, matcherOut ); } } - }); + } ); } function matcherFromTokens( tokens ) { var checkContext, matcher, j, len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], i = leadingRelative ? 1 : 0, // The foundational matcher ensures that elements are reachable from top-level context(s) @@ -2445,38 +2617,43 @@ function matcherFromTokens( tokens ) { }, implicitRelative, true ), matchers = [ function( elem, context, xml ) { var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? + ( checkContext = context ).nodeType ? matchContext( elem, context, xml ) : matchAnyContext( elem, context, xml ) ); + // Avoid hanging onto element (issue #299) checkContext = null; return ret; } ]; for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); // Return special upon seeing a positional matcher if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling j = ++i; for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { + if ( Expr.relative[ tokens[ j ].type ] ) { break; } } return setMatcher( i > 1 && elementMatcher( matchers ), i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) ).replace( rtrim, "$1" ), matcher, i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), j < len && toSelector( tokens ) ); } @@ -2497,28 +2674,40 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { unmatched = seed && [], setMatched = [], contextBackup = outermostContext, + // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), len = elems.length; if ( outermost ) { - outermostContext = context === document || context || outermost; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; } // Add elements passing elementMatchers directly to results // Support: IE<9, Safari // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { if ( byElement && elem ) { j = 0; - if ( !context && elem.ownerDocument !== document ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { setDocument( elem ); xml = !documentIsHTML; } - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context || document, xml) ) { + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { results.push( elem ); break; } @@ -2530,8 +2719,9 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { // Track unmatched elements for set filters if ( bySet ) { + // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { + if ( ( elem = !matcher && elem ) ) { matchedCount--; } @@ -2555,16 +2745,17 @@ function matcherFromGroupMatchers( elementMatchers, setMatchers ) { // numerically zero. if ( bySet && i !== matchedCount ) { j = 0; - while ( (matcher = setMatchers[j++]) ) { + while ( ( matcher = setMatchers[ j++ ] ) ) { matcher( unmatched, setMatched, context, xml ); } if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting if ( matchedCount > 0 ) { while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); } } } @@ -2605,13 +2796,14 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { cached = compilerCache[ selector + " " ]; if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element if ( !match ) { match = tokenize( selector ); } i = match.length; while ( i-- ) { - cached = matcherFromTokens( match[i] ); + cached = matcherFromTokens( match[ i ] ); if ( cached[ expando ] ) { setMatchers.push( cached ); } else { @@ -2620,7 +2812,10 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { } // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); // Save selector and tokenization cached.selector = selector; @@ -2640,7 +2835,7 @@ compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { select = Sizzle.select = function( selector, context, results, seed ) { var i, tokens, token, type, find, compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); results = results || []; @@ -2649,11 +2844,12 @@ select = Sizzle.select = function( selector, context, results, seed ) { if ( match.length === 1 ) { // Reduce context if the leading compound selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[1].type ] ) { + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; if ( !context ) { return results; @@ -2666,20 +2862,22 @@ select = Sizzle.select = function( selector, context, results, seed ) { } // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; while ( i-- ) { - token = tokens[i]; + token = tokens[ i ]; // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { + if ( Expr.relative[ ( type = token.type ) ] ) { break; } - if ( (find = Expr.find[ type ]) ) { + if ( ( find = Expr.find[ type ] ) ) { + // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { // If seed is empty or no tokens remain, we can return early tokens.splice( i, 1 ); @@ -2710,7 +2908,7 @@ select = Sizzle.select = function( selector, context, results, seed ) { // One-time assignments // Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; // Support: Chrome 14-35+ // Always assume duplicates if they aren't passed to the comparison function @@ -2721,58 +2919,59 @@ setDocument(); // Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) // Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( el ) { +support.sortDetached = assert( function( el ) { + // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement("fieldset") ) & 1; -}); + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); // Support: IE<8 // Prevent attribute/property "interpolation" // https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( el ) { +if ( !assert( function( el ) { el.innerHTML = ""; - return el.firstChild.getAttribute("href") === "#" ; -}) ) { + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { addHandle( "type|href|height|width", function( elem, name, isXML ) { if ( !isXML ) { return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); } - }); + } ); } // Support: IE<9 // Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( el ) { +if ( !support.attributes || !assert( function( el ) { el.innerHTML = ""; el.firstChild.setAttribute( "value", "" ); return el.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { return elem.defaultValue; } - }); + } ); } // Support: IE<9 // Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( el ) { - return el.getAttribute("disabled") == null; -}) ) { +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { addHandle( booleans, function( elem, name, isXML ) { var val; if ( !isXML ) { return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? + ( val = elem.getAttributeNode( name ) ) && val.specified ? val.value : - null; + null; } - }); + } ); } return Sizzle; -})( window ); +} )( window ); @@ -3141,7 +3340,7 @@ jQuery.each( { parents: function( elem ) { return dir( elem, "parentNode" ); }, - parentsUntil: function( elem, i, until ) { + parentsUntil: function( elem, _i, until ) { return dir( elem, "parentNode", until ); }, next: function( elem ) { @@ -3156,10 +3355,10 @@ jQuery.each( { prevAll: function( elem ) { return dir( elem, "previousSibling" ); }, - nextUntil: function( elem, i, until ) { + nextUntil: function( elem, _i, until ) { return dir( elem, "nextSibling", until ); }, - prevUntil: function( elem, i, until ) { + prevUntil: function( elem, _i, until ) { return dir( elem, "previousSibling", until ); }, siblings: function( elem ) { @@ -3169,7 +3368,13 @@ jQuery.each( { return siblings( elem.firstChild ); }, contents: function( elem ) { - if ( typeof elem.contentDocument !== "undefined" ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + return elem.contentDocument; } @@ -3512,7 +3717,7 @@ jQuery.extend( { var fns = arguments; return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { + jQuery.each( tuples, function( _i, tuple ) { // Map tuples (progress, done, fail) to arguments (done, fail, progress) var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; @@ -3965,7 +4170,7 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { // ...except when executing function values } else { bulk = fn; - fn = function( elem, key, value ) { + fn = function( elem, _key, value ) { return bulk.call( jQuery( elem ), value ); }; } @@ -4000,7 +4205,7 @@ var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g; // Used by camelCase as callback to replace() -function fcamelCase( all, letter ) { +function fcamelCase( _all, letter ) { return letter.toUpperCase(); } @@ -4528,27 +4733,6 @@ var isHiddenWithinTree = function( elem, el ) { jQuery.css( elem, "display" ) === "none"; }; -var swap = function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - function adjustCSS( elem, prop, valueParts, tween ) { @@ -4719,11 +4903,40 @@ var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); -// We have to close these tags to support XHTML (#13200) -var wrapMap = { +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; // Support: IE <=9 only - option: [ 1, "" ], + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { // XHTML parsers do not magically insert elements in the // same way that tag soup parsers do. So we cannot shorten @@ -4736,12 +4949,14 @@ var wrapMap = { _default: [ 0, "", "" ] }; -// Support: IE <=9 only -wrapMap.optgroup = wrapMap.option; - wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; wrapMap.th = wrapMap.td; +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + function getAll( context, tag ) { @@ -4874,32 +5089,6 @@ function buildFragment( elems, context, scripts, selection, ignored ) { } -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -} )(); - - var rkeyEvent = /^key/, rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, @@ -5008,8 +5197,8 @@ jQuery.event = { special, handlers, type, namespaces, origType, elemData = dataPriv.get( elem ); - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { return; } @@ -5033,7 +5222,7 @@ jQuery.event = { // Init the element's event structure and main handler, if this is the first if ( !( events = elemData.events ) ) { - events = elemData.events = {}; + events = elemData.events = Object.create( null ); } if ( !( eventHandle = elemData.handle ) ) { eventHandle = elemData.handle = function( e ) { @@ -5191,12 +5380,15 @@ jQuery.event = { dispatch: function( nativeEvent ) { - // Make a writable jQuery.Event from the native event object - var event = jQuery.event.fix( nativeEvent ); - var i, j, ret, matched, handleObj, handlerQueue, args = new Array( arguments.length ), - handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [], + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], special = jQuery.event.special[ event.type ] || {}; // Use the fix-ed jQuery.Event rather than the (read-only) native event @@ -5771,13 +5963,6 @@ jQuery.fn.extend( { var - /* eslint-disable max-len */ - - // See https://github.com/eslint/eslint/issues/3229 - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi, - - /* eslint-enable */ - // Support: IE <=10 - 11, Edge 12 - 13 only // In IE/Edge using regex groups here causes severe slowdowns. // See https://connect.microsoft.com/IE/feedback/details/1736512/ @@ -5814,7 +5999,7 @@ function restoreScript( elem ) { } function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; + var i, l, type, pdataOld, udataOld, udataCur, events; if ( dest.nodeType !== 1 ) { return; @@ -5822,13 +6007,11 @@ function cloneCopyEvent( src, dest ) { // 1. Copy private data: events, handlers, etc. if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.access( src ); - pdataCur = dataPriv.set( dest, pdataOld ); + pdataOld = dataPriv.get( src ); events = pdataOld.events; if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; + dataPriv.remove( dest, "handle events" ); for ( type in events ) { for ( i = 0, l = events[ type ].length; i < l; i++ ) { @@ -5864,7 +6047,7 @@ function fixInput( src, dest ) { function domManip( collection, args, callback, ignored ) { // Flatten any nested arrays - args = concat.apply( [], args ); + args = flat( args ); var fragment, first, scripts, hasScripts, node, doc, i = 0, @@ -5939,7 +6122,7 @@ function domManip( collection, args, callback, ignored ) { if ( jQuery._evalUrl && !node.noModule ) { jQuery._evalUrl( node.src, { nonce: node.nonce || node.getAttribute( "nonce" ) - } ); + }, doc ); } } else { DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); @@ -5976,7 +6159,7 @@ function remove( elem, selector, keepData ) { jQuery.extend( { htmlPrefilter: function( html ) { - return html.replace( rxhtmlTag, "<$1>" ); + return html; }, clone: function( elem, dataAndEvents, deepDataAndEvents ) { @@ -6238,6 +6421,27 @@ var getStyles = function( elem ) { return view.getComputedStyle( elem ); }; +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); @@ -6295,7 +6499,7 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); } var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableMarginLeftVal, + reliableTrDimensionsVal, reliableMarginLeftVal, container = document.createElement( "div" ), div = document.createElement( "div" ); @@ -6330,6 +6534,35 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); scrollboxSize: function() { computeStyleTests(); return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px"; + tr.style.height = "1px"; + trChild.style.height = "9px"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = parseInt( trStyle.height ) > 3; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; } } ); } )(); @@ -6454,7 +6687,7 @@ var fontWeight: "400" }; -function setPositiveNumber( elem, value, subtract ) { +function setPositiveNumber( _elem, value, subtract ) { // Any relative (+/-) values have already been // normalized at this point @@ -6559,17 +6792,26 @@ function getWidthOrHeight( elem, dimension, extra ) { } - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - // Support: IE 9-11 only - // Also use offsetWidth/offsetHeight for when box sizing is unreliable - // We use getClientRects() to check for hidden/disconnected. - // In those cases, the computed value can be trusted to be border-box + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected elem.getClientRects().length ) { isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; @@ -6764,7 +7006,7 @@ jQuery.extend( { } } ); -jQuery.each( [ "height", "width" ], function( i, dimension ) { +jQuery.each( [ "height", "width" ], function( _i, dimension ) { jQuery.cssHooks[ dimension ] = { get: function( elem, computed, extra ) { if ( computed ) { @@ -7537,7 +7779,7 @@ jQuery.fn.extend( { clearQueue = type; type = undefined; } - if ( clearQueue && type !== false ) { + if ( clearQueue ) { this.queue( type || "fx", [] ); } @@ -7620,7 +7862,7 @@ jQuery.fn.extend( { } } ); -jQuery.each( [ "toggle", "show", "hide" ], function( i, name ) { +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { var cssFn = jQuery.fn[ name ]; jQuery.fn[ name ] = function( speed, easing, callback ) { return speed == null || typeof speed === "boolean" ? @@ -7841,7 +8083,7 @@ boolHook = { } }; -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { var getter = attrHandle[ name ] || jQuery.find.attr; attrHandle[ name ] = function( elem, name, isXML ) { @@ -8465,7 +8707,9 @@ jQuery.extend( jQuery.event, { special.bindType || type; // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && + handle = ( + dataPriv.get( cur, "events" ) || Object.create( null ) + )[ event.type ] && dataPriv.get( cur, "handle" ); if ( handle ) { handle.apply( cur, data ); @@ -8576,7 +8820,10 @@ if ( !support.focusin ) { jQuery.event.special[ fix ] = { setup: function() { - var doc = this.ownerDocument || this, + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, attaches = dataPriv.access( doc, fix ); if ( !attaches ) { @@ -8585,7 +8832,7 @@ if ( !support.focusin ) { dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); }, teardown: function() { - var doc = this.ownerDocument || this, + var doc = this.ownerDocument || this.document || this, attaches = dataPriv.access( doc, fix ) - 1; if ( !attaches ) { @@ -8601,7 +8848,7 @@ if ( !support.focusin ) { } var location = window.location; -var nonce = Date.now(); +var nonce = { guid: Date.now() }; var rquery = ( /\?/ ); @@ -8733,7 +8980,7 @@ jQuery.fn.extend( { rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && ( this.checked || !rcheckableType.test( type ) ); } ) - .map( function( i, elem ) { + .map( function( _i, elem ) { var val = jQuery( this ).val(); if ( val == null ) { @@ -9346,7 +9593,8 @@ jQuery.extend( { // Add or update anti-cache param if needed if ( s.cache === false ) { cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce++ ) + uncached; + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; } // Put hash and anti-cache on the URL that will be requested (gh-1732) @@ -9479,6 +9727,11 @@ jQuery.extend( { response = ajaxHandleResponses( s, jqXHR, responses ); } + // Use a noop converter for missing script + if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) { + s.converters[ "text script" ] = function() {}; + } + // Convert no matter what (that way responseXXX fields are always set) response = ajaxConvert( s, response, jqXHR, isSuccess ); @@ -9569,7 +9822,7 @@ jQuery.extend( { } } ); -jQuery.each( [ "get", "post" ], function( i, method ) { +jQuery.each( [ "get", "post" ], function( _i, method ) { jQuery[ method ] = function( url, data, callback, type ) { // Shift arguments if data argument was omitted @@ -9590,8 +9843,17 @@ jQuery.each( [ "get", "post" ], function( i, method ) { }; } ); +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); -jQuery._evalUrl = function( url, options ) { + +jQuery._evalUrl = function( url, options, doc ) { return jQuery.ajax( { url: url, @@ -9609,7 +9871,7 @@ jQuery._evalUrl = function( url, options ) { "text script": function() {} }, dataFilter: function( response ) { - jQuery.globalEval( response, options ); + jQuery.globalEval( response, options, doc ); } } ); }; @@ -9931,7 +10193,7 @@ var oldCallbacks = [], jQuery.ajaxSetup( { jsonp: "callback", jsonpCallback: function() { - var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); + var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); this[ callback ] = true; return callback; } @@ -10148,23 +10410,6 @@ jQuery.fn.load = function( url, params, callback ) { -// Attach a bunch of functions for handling common AJAX events -jQuery.each( [ - "ajaxStart", - "ajaxStop", - "ajaxComplete", - "ajaxError", - "ajaxSuccess", - "ajaxSend" -], function( i, type ) { - jQuery.fn[ type ] = function( fn ) { - return this.on( type, fn ); - }; -} ); - - - - jQuery.expr.pseudos.animated = function( elem ) { return jQuery.grep( jQuery.timers, function( fn ) { return elem === fn.elem; @@ -10221,6 +10466,12 @@ jQuery.offset = { options.using.call( elem, props ); } else { + if ( typeof props.top === "number" ) { + props.top += "px"; + } + if ( typeof props.left === "number" ) { + props.left += "px"; + } curElem.css( props ); } } @@ -10371,7 +10622,7 @@ jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 // getComputedStyle returns percent when specified for top/left/bottom/right; // rather than make the css module depend on the offset module, just check for it here -jQuery.each( [ "top", "left" ], function( i, prop ) { +jQuery.each( [ "top", "left" ], function( _i, prop ) { jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, function( elem, computed ) { if ( computed ) { @@ -10434,25 +10685,19 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { } ); -jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup contextmenu" ).split( " " ), - function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - return arguments.length > 0 ? - this.on( name, null, data, fn ) : - this.trigger( name ); +jQuery.each( [ + "ajaxStart", + "ajaxStop", + "ajaxComplete", + "ajaxError", + "ajaxSuccess", + "ajaxSend" +], function( _i, type ) { + jQuery.fn[ type ] = function( fn ) { + return this.on( type, fn ); }; } ); -jQuery.fn.extend( { - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -} ); - @@ -10474,9 +10719,33 @@ jQuery.fn.extend( { return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + }, + + hover: function( fnOver, fnOut ) { + return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); } } ); +jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + + "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + + "change select submit keydown keypress keyup contextmenu" ).split( " " ), + function( _i, name ) { + + // Handle event binding + jQuery.fn[ name ] = function( data, fn ) { + return arguments.length > 0 ? + this.on( name, null, data, fn ) : + this.trigger( name ); + }; + } ); + + + + +// Support: Android <=4.0 only +// Make sure we trim BOM and NBSP +var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; + // Bind a function to a context, optionally partially applying any // arguments. // jQuery.proxy is deprecated to promote standards (specifically Function#bind) @@ -10539,6 +10808,11 @@ jQuery.isNumeric = function( obj ) { !isNaN( obj - parseFloat( obj ) ); }; +jQuery.trim = function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); +}; @@ -10587,7 +10861,7 @@ jQuery.noConflict = function( deep ) { // Expose jQuery and $ identifiers, even in AMD // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) // and CommonJS for browser emulators (#13566) -if ( !noGlobal ) { +if ( typeof noGlobal === "undefined" ) { window.jQuery = window.$ = jQuery; } diff --git a/htdocs/includes/jquery/js/jquery.min.js b/htdocs/includes/jquery/js/jquery.min.js index 07c00cd227d..d467083b62c 100644 --- a/htdocs/includes/jquery/js/jquery.min.js +++ b/htdocs/includes/jquery/js/jquery.min.js @@ -1,2 +1,2 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0=5.6", + "psr/log": "^1.0", + "symfony/var-dumper": "^2.6|^3|^4" + }, + "require-dev": { + "phpunit/phpunit": "^5" + }, + "autoload": { + "psr-4": { + "DebugBar\\": "src/DebugBar/" + } + }, + "suggest": { + "kriswallsmith/assetic": "The best way to manage assets", + "monolog/monolog": "Log using Monolog", + "predis/predis": "Redis storage" + }, + "extra": { + "branch-alias": { + "dev-master": "1.15-dev" + } + } +} diff --git a/htdocs/includes/DebugBar/Bridge/CacheCacheCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/CacheCacheCollector.php similarity index 85% rename from htdocs/includes/DebugBar/Bridge/CacheCacheCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/CacheCacheCollector.php index 3d841c6784e..7e7f46f9ded 100644 --- a/htdocs/includes/DebugBar/Bridge/CacheCacheCollector.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/CacheCacheCollector.php @@ -31,6 +31,13 @@ class CacheCacheCollector extends MonologCollector { protected $logger; + /** + * CacheCacheCollector constructor. + * @param Cache|null $cache + * @param Logger|null $logger + * @param bool $level + * @param bool $bubble + */ public function __construct(Cache $cache = null, Logger $logger = null, $level = Logger::DEBUG, $bubble = true) { parent::__construct(null, $level, $bubble); @@ -45,6 +52,9 @@ class CacheCacheCollector extends MonologCollector } } + /** + * @param Cache $cache + */ public function addCache(Cache $cache) { $backend = $cache->getBackend(); @@ -55,6 +65,9 @@ class CacheCacheCollector extends MonologCollector $this->addLogger($backend->getLogger()); } + /** + * @return string + */ public function getName() { return 'cache'; diff --git a/htdocs/includes/DebugBar/Bridge/DoctrineCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/DoctrineCollector.php similarity index 91% rename from htdocs/includes/DebugBar/Bridge/DoctrineCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/DoctrineCollector.php index 6fa358e29ab..7c91da9bff7 100644 --- a/htdocs/includes/DebugBar/Bridge/DoctrineCollector.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/DoctrineCollector.php @@ -34,6 +34,11 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid { protected $debugStack; + /** + * DoctrineCollector constructor. + * @param $debugStackOrEntityManager + * @throws DebugBarException + */ public function __construct($debugStackOrEntityManager) { if ($debugStackOrEntityManager instanceof EntityManager) { @@ -45,6 +50,9 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid $this->debugStack = $debugStackOrEntityManager; } + /** + * @return array + */ public function collect() { $queries = array(); @@ -67,11 +75,17 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid ); } + /** + * @return string + */ public function getName() { return 'doctrine'; } + /** + * @return array + */ public function getWidgets() { return array( @@ -88,6 +102,9 @@ class DoctrineCollector extends DataCollector implements Renderable, AssetProvid ); } + /** + * @return array + */ public function getAssets() { return array( diff --git a/htdocs/includes/DebugBar/Bridge/MonologCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/MonologCollector.php similarity index 92% rename from htdocs/includes/DebugBar/Bridge/MonologCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/MonologCollector.php index 609d5c5f837..f24b296d574 100644 --- a/htdocs/includes/DebugBar/Bridge/MonologCollector.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/MonologCollector.php @@ -56,6 +56,9 @@ class MonologCollector extends AbstractProcessingHandler implements DataCollecto $logger->pushHandler($this); } + /** + * @param array $record + */ protected function write(array $record) { $this->records[] = array( @@ -66,11 +69,17 @@ class MonologCollector extends AbstractProcessingHandler implements DataCollecto ); } + /** + * @return array + */ public function getMessages() { return $this->records; } + /** + * @return array + */ public function collect() { return array( @@ -79,11 +88,17 @@ class MonologCollector extends AbstractProcessingHandler implements DataCollecto ); } + /** + * @return string + */ public function getName() { return $this->name; } + /** + * @return array + */ public function getWidgets() { $name = $this->getName(); diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Propel2Collector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Propel2Collector.php new file mode 100644 index 00000000000..3df4dcc6df4 --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Propel2Collector.php @@ -0,0 +1,307 @@ + + * $debugbar->addCollector(new \DebugBar\Bridge\Propel2Collector(\Propel\Runtime\Propel::getServiceContainer()->getReadConnection())); + * + */ +class Propel2Collector extends DataCollector implements Renderable, AssetProvider +{ + /** + * @var null|TestHandler + */ + protected $handler = null; + + /** + * @var null|Logger + */ + protected $logger = null; + + /** + * @var array + */ + protected $config = array(); + + /** + * @var array + */ + protected $errors = array(); + + /** + * @var int + */ + protected $queryCount = 0; + + /** + * @param ConnectionInterface $connection Propel connection + */ + public function __construct( + ConnectionInterface $connection, + array $logMethods = array( + 'beginTransaction', + 'commit', + 'rollBack', + 'forceRollBack', + 'exec', + 'query', + 'execute' + ) + ) { + if ($connection instanceof ProfilerConnectionWrapper) { + $connection->setLogMethods($logMethods); + + $this->config = $connection->getProfiler()->getConfiguration(); + + $this->handler = new TestHandler(); + + if ($connection->getLogger() instanceof Logger) { + $this->logger = $connection->getLogger(); + $this->logger->pushHandler($this->handler); + } else { + $this->errors[] = 'Supported only monolog logger'; + } + } else { + $this->errors[] = 'You need set ProfilerConnectionWrapper'; + } + } + + /** + * @return TestHandler|null + */ + public function getHandler() + { + return $this->handler; + } + + /** + * @return array + */ + public function getConfig() + { + return $this->config; + } + + /** + * @return Logger|null + */ + public function getLogger() + { + return $this->logger; + } + + /** + * @return LoggerInterface + */ + protected function getDefaultLogger() + { + return Propel::getServiceContainer()->getLogger(); + } + + /** + * @return int + */ + protected function getQueryCount() + { + return $this->queryCount; + } + + /** + * @param array $records + * @param array $config + * @return array + */ + protected function getStatements($records, $config) + { + $statements = array(); + foreach ($records as $record) { + $duration = null; + $memory = null; + + $isSuccess = ( LogLevel::INFO === strtolower($record['level_name']) ); + + $detailsCount = count($config['details']); + $parameters = explode($config['outerGlue'], $record['message'], $detailsCount + 1); + if (count($parameters) === ($detailsCount + 1)) { + $parameters = array_map('trim', $parameters); + $_details = array(); + foreach (array_splice($parameters, 0, $detailsCount) as $string) { + list($key, $value) = array_map('trim', explode($config['innerGlue'], $string, 2)); + $_details[$key] = $value; + } + + $details = array(); + foreach ($config['details'] as $key => $detail) { + if (isset($_details[$detail['name']])) { + $value = $_details[$detail['name']]; + if ('time' === $key) { + if (substr_count($value, 'ms')) { + $value = (float)$value / 1000; + } else { + $value = (float)$value; + } + } else { + $suffixes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); + $suffix = substr($value, -2); + $i = array_search($suffix, $suffixes, true); + $i = (false === $i) ? 0 : $i; + + $value = ((float)$value) * pow(1024, $i); + } + $details[$key] = $value; + } + } + + if (isset($details['time'])) { + $duration = $details['time']; + } + if (isset($details['memDelta'])) { + $memory = $details['memDelta']; + } + + $message = end($parameters); + + if ($isSuccess) { + $this->queryCount++; + } + + } else { + $message = $record['message']; + } + + $statement = array( + 'sql' => $message, + 'is_success' => $isSuccess, + 'duration' => $duration, + 'duration_str' => $this->getDataFormatter()->formatDuration($duration), + 'memory' => $memory, + 'memory_str' => $this->getDataFormatter()->formatBytes($memory), + ); + + if (false === $isSuccess) { + $statement['sql'] = ''; + $statement['error_code'] = $record['level']; + $statement['error_message'] = $message; + } + + $statements[] = $statement; + } + return $statements; + } + + /** + * @return array + */ + public function collect() + { + if (count($this->errors)) { + return array( + 'statements' => array_map(function ($message) { + return array('sql' => '', 'is_success' => false, 'error_code' => 500, 'error_message' => $message); + }, $this->errors), + 'nb_statements' => 0, + 'nb_failed_statements' => count($this->errors), + ); + } + + if ($this->getHandler() === null) { + return array(); + } + + $statements = $this->getStatements($this->getHandler()->getRecords(), $this->getConfig()); + + $failedStatement = count(array_filter($statements, function ($statement) { + return false === $statement['is_success']; + })); + $accumulatedDuration = array_reduce($statements, function ($accumulatedDuration, $statement) { + + $time = isset($statement['duration']) ? $statement['duration'] : 0; + return $accumulatedDuration += $time; + }); + $memoryUsage = array_reduce($statements, function ($memoryUsage, $statement) { + + $time = isset($statement['memory']) ? $statement['memory'] : 0; + return $memoryUsage += $time; + }); + + return array( + 'nb_statements' => $this->getQueryCount(), + 'nb_failed_statements' => $failedStatement, + 'accumulated_duration' => $accumulatedDuration, + 'accumulated_duration_str' => $this->getDataFormatter()->formatDuration($accumulatedDuration), + 'memory_usage' => $memoryUsage, + 'memory_usage_str' => $this->getDataFormatter()->formatBytes($memoryUsage), + 'statements' => $statements + ); + } + + /** + * @return string + */ + public function getName() + { + $additionalName = ''; + if ($this->getLogger() !== $this->getDefaultLogger()) { + $additionalName = ' ('.$this->getLogger()->getName().')'; + } + + return 'propel2'.$additionalName; + } + + /** + * @return array + */ + public function getWidgets() + { + return array( + $this->getName() => array( + 'icon' => 'bolt', + 'widget' => 'PhpDebugBar.Widgets.SQLQueriesWidget', + 'map' => $this->getName(), + 'default' => '[]' + ), + $this->getName().':badge' => array( + 'map' => $this->getName().'.nb_statements', + 'default' => 0 + ), + ); + } + + /** + * @return array + */ + public function getAssets() + { + return array( + 'css' => 'widgets/sqlqueries/widget.css', + 'js' => 'widgets/sqlqueries/widget.js' + ); + } +} diff --git a/htdocs/includes/DebugBar/Bridge/PropelCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/PropelCollector.php similarity index 100% rename from htdocs/includes/DebugBar/Bridge/PropelCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/PropelCollector.php diff --git a/htdocs/includes/DebugBar/Bridge/SlimCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/SlimCollector.php similarity index 100% rename from htdocs/includes/DebugBar/Bridge/SlimCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/SlimCollector.php diff --git a/htdocs/includes/DebugBar/Bridge/SwiftMailer/SwiftLogCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftLogCollector.php similarity index 100% rename from htdocs/includes/DebugBar/Bridge/SwiftMailer/SwiftLogCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftLogCollector.php diff --git a/htdocs/includes/DebugBar/Bridge/SwiftMailer/SwiftMailCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftMailCollector.php similarity index 100% rename from htdocs/includes/DebugBar/Bridge/SwiftMailer/SwiftMailCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/SwiftMailer/SwiftMailCollector.php diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TimeableTwigExtensionProfiler.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TimeableTwigExtensionProfiler.php new file mode 100644 index 00000000000..3611d2d8efa --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TimeableTwigExtensionProfiler.php @@ -0,0 +1,60 @@ +timeDataCollector = $timeDataCollector; + } + + public function __construct(\Twig_Profiler_Profile $profile, TimeDataCollector $timeDataCollector = null) + { + parent::__construct($profile); + + $this->timeDataCollector = $timeDataCollector; + } + + public function enter(Twig_Profiler_Profile $profile) + { + if ($this->timeDataCollector && $profile->isTemplate()) { + $this->timeDataCollector->startMeasure($profile->getName(), 'template ' . $profile->getName()); + } + parent::enter($profile); + } + + public function leave(Twig_Profiler_Profile $profile) + { + parent::leave($profile); + if ($this->timeDataCollector && $profile->isTemplate()) { + $this->timeDataCollector->stopMeasure($profile->getName()); + } + } +} \ No newline at end of file diff --git a/htdocs/includes/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php similarity index 98% rename from htdocs/includes/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php index 0d4c957f5b2..cdaae7a4525 100644 --- a/htdocs/includes/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigEnvironment.php @@ -118,9 +118,9 @@ class TraceableTwigEnvironment extends Twig_Environment return $this->twig->isStrictVariables(); } - public function getCache() + public function getCache($original = true) { - return $this->twig->getCache(); + return $this->twig->getCache($original); } public function setCache($cache) diff --git a/htdocs/includes/DebugBar/Bridge/Twig/TraceableTwigTemplate.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigTemplate.php similarity index 93% rename from htdocs/includes/DebugBar/Bridge/Twig/TraceableTwigTemplate.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigTemplate.php index dab53d15e1f..648f7baf4da 100644 --- a/htdocs/includes/DebugBar/Bridge/Twig/TraceableTwigTemplate.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TraceableTwigTemplate.php @@ -16,7 +16,7 @@ use Twig_TemplateInterface; /** * Wraps a Twig_Template to add profiling features */ -class TraceableTwigTemplate implements Twig_TemplateInterface +class TraceableTwigTemplate extends Twig_Template implements Twig_TemplateInterface { protected $template; @@ -35,6 +35,11 @@ class TraceableTwigTemplate implements Twig_TemplateInterface return call_user_func_array(array($this->template, $name), $arguments); } + public function doDisplay(array $context, array $blocks = array()) + { + return $this->template->doDisplay($context, $blocks); + } + public function getTemplateName() { return $this->template->getTemplateName(); diff --git a/htdocs/includes/DebugBar/Bridge/Twig/TwigCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TwigCollector.php similarity index 96% rename from htdocs/includes/DebugBar/Bridge/Twig/TwigCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TwigCollector.php index fde5a3f85ba..c571d835bcc 100644 --- a/htdocs/includes/DebugBar/Bridge/Twig/TwigCollector.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/Twig/TwigCollector.php @@ -68,7 +68,7 @@ class TwigCollector extends DataCollector implements Renderable, AssetProvider 'icon' => 'leaf', 'widget' => 'PhpDebugBar.Widgets.TemplatesWidget', 'map' => 'twig', - 'default' => '[]' + 'default' => json_encode(array('templates' => array())), ), 'twig:badge' => array( 'map' => 'twig.nb_templates', diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/TwigProfileCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/TwigProfileCollector.php new file mode 100644 index 00000000000..efd3a7d523e --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Bridge/TwigProfileCollector.php @@ -0,0 +1,197 @@ + + * $env = new Twig_Environment($loader); // Or from a PSR11-container + * $profile = new Twig_Profiler_Profile(); + * $env->addExtension(new Twig_Extension_Profile($profile)); + * $debugbar->addCollector(new TwigProfileCollector($profile, $env)); + * // or: $debugbar->addCollector(new TwigProfileCollector($profile, $loader)); + * + */ +class TwigProfileCollector extends DataCollector implements Renderable, AssetProvider +{ + /** + * @var \Twig_Profiler_Profile + */ + private $profile; + /** + * @var \Twig_LoaderInterface + */ + private $loader; + /** @var int */ + private $templateCount; + /** @var int */ + private $blockCount; + /** @var int */ + private $macroCount; + /** + * @var array[] { + * @var string $name + * @var int $render_time + * @var string $render_time_str + * @var string $memory_str + * @var string $xdebug_link + * } + */ + private $templates; + + /** + * TwigProfileCollector constructor. + * + * @param \Twig_Profiler_Profile $profile + * @param \Twig_LoaderInterface|\Twig_Environment $loaderOrEnv + */ + public function __construct(\Twig_Profiler_Profile $profile, $loaderOrEnv = null) + { + $this->profile = $profile; + if ($loaderOrEnv instanceof \Twig_Environment) { + $loaderOrEnv = $loaderOrEnv->getLoader(); + } + $this->loader = $loaderOrEnv; + } + + /** + * Returns a hash where keys are control names and their values + * an array of options as defined in {@see DebugBar\JavascriptRenderer::addControl()} + * + * @return array + */ + public function getWidgets() + { + return array( + 'twig' => array( + 'icon' => 'leaf', + 'widget' => 'PhpDebugBar.Widgets.TemplatesWidget', + 'map' => 'twig', + 'default' => json_encode(array('templates' => array())), + ), + 'twig:badge' => array( + 'map' => 'twig.badge', + 'default' => 0, + ), + ); + } + + /** + * @return array + */ + public function getAssets() + { + return array( + 'css' => 'widgets/templates/widget.css', + 'js' => 'widgets/templates/widget.js', + ); + } + + /** + * Called by the DebugBar when data needs to be collected + * + * @return array Collected data + */ + public function collect() + { + $this->templateCount = $this->blockCount = $this->macroCount = 0; + $this->templates = array(); + $this->computeData($this->profile); + + return array( + 'nb_templates' => $this->templateCount, + 'nb_blocks' => $this->blockCount, + 'nb_macros' => $this->macroCount, + 'templates' => $this->templates, + 'accumulated_render_time' => $this->profile->getDuration(), + 'accumulated_render_time_str' => $this->getDataFormatter()->formatDuration($this->profile->getDuration()), + 'memory_usage_str' => $this->getDataFormatter()->formatBytes($this->profile->getMemoryUsage()), + 'callgraph' => $this->getHtmlCallGraph(), + 'badge' => implode( + '/', + array( + $this->templateCount, + $this->blockCount, + $this->macroCount, + ) + ), + ); + } + + /** + * Returns the unique name of the collector + * + * @return string + */ + public function getName() + { + return 'twig'; + } + + public function getHtmlCallGraph() + { + $dumper = new \Twig_Profiler_Dumper_Html(); + + return $dumper->dump($this->profile); + } + + /** + * Get an Xdebug Link to a file + * + * @return array { + * @var string url + * @var bool ajax + * } + */ + public function getXdebugLink($template, $line = 1) + { + if (is_null($this->loader)) { + return null; + } + $file = $this->loader->getSourceContext($template)->getPath(); + + return parent::getXdebugLink($file, $line); + } + + private function computeData(\Twig_Profiler_Profile $profile) + { + $this->templateCount += ($profile->isTemplate() ? 1 : 0); + $this->blockCount += ($profile->isBlock() ? 1 : 0); + $this->macroCount += ($profile->isMacro() ? 1 : 0); + if ($profile->isTemplate()) { + $this->templates[] = array( + 'name' => $profile->getName(), + 'render_time' => $profile->getDuration(), + 'render_time_str' => $this->getDataFormatter()->formatDuration($profile->getDuration()), + 'memory_str' => $this->getDataFormatter()->formatBytes($profile->getMemoryUsage()), + 'xdebug_link' => $this->getXdebugLink($profile->getTemplate()), + ); + } + foreach ($profile as $p) { + $this->computeData($p); + } + } +} diff --git a/htdocs/includes/DebugBar/DataCollector/AggregatedCollector.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/DataCollector/AggregatedCollector.php similarity index 90% rename from htdocs/includes/DebugBar/DataCollector/AggregatedCollector.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/DataCollector/AggregatedCollector.php index 6c8e711ef76..c1fd96aef26 100644 --- a/htdocs/includes/DebugBar/DataCollector/AggregatedCollector.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/DataCollector/AggregatedCollector.php @@ -100,6 +100,9 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess return $this->sort; } + /** + * @return array + */ public function collect() { $aggregate = array(); @@ -136,6 +139,9 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess return $data; } + /** + * @return string + */ public function getName() { return $this->name; @@ -144,21 +150,38 @@ class AggregatedCollector implements DataCollectorInterface, ArrayAccess // -------------------------------------------- // ArrayAccess implementation + /** + * @param mixed $key + * @param mixed $value + * @throws DebugBarException + */ public function offsetSet($key, $value) { throw new DebugBarException("AggregatedCollector[] is read-only"); } + /** + * @param mixed $key + * @return mixed + */ public function offsetGet($key) { return $this->collectors[$key]; } + /** + * @param mixed $key + * @return bool + */ public function offsetExists($key) { return isset($this->collectors[$key]); } + /** + * @param mixed $key + * @throws DebugBarException + */ public function offsetUnset($key) { throw new DebugBarException("AggregatedCollector[] is read-only"); diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/DataCollector/AssetProvider.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/DataCollector/AssetProvider.php new file mode 100644 index 00000000000..58425d899cb --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/DataCollector/AssetProvider.php @@ -0,0 +1,43 @@ + tag) + * - inline_js: an array map of content ID to inline JS content (not including ' . "\n", $file); } - if ($this->enableJqueryNoConflict) { + foreach ($inlineJs as $content) { + $html .= sprintf('' . "\n", $content); + } + + foreach ($inlineHead as $content) { + $html .= $content . "\n"; + } + + if ($this->enableJqueryNoConflict && !$this->useRequireJs) { $html .= '' . "\n"; } @@ -764,6 +937,8 @@ class JavascriptRenderer * * @param boolean $here Set position of HTML. True if is to current position or false for end file * @param boolean $initialize Whether to render the de bug bar initialization code + * @param bool $renderStackedData + * @param bool $head * @return string Return "{--DEBUGBAR_OB_START_REPLACE_ME--}" or return an empty string if $here == false */ public function renderOnShutdown($here = true, $initialize = true, $renderStackedData = true, $head = false) @@ -795,6 +970,8 @@ class JavascriptRenderer * * @param boolean $here Set position of HTML. True if is to current position or false for end file * @param boolean $initialize Whether to render the de bug bar initialization code + * @param bool $renderStackedData + * @param bool $head */ public function replaceTagInBuffer($here = true, $initialize = true, $renderStackedData = true, $head = false) { @@ -815,7 +992,8 @@ class JavascriptRenderer * * AJAX request should not render the initialization code. * - * @param boolean $initialize Whether to render the de bug bar initialization code + * @param boolean $initialize Whether or not to render the debug bar initialization code + * @param boolean $renderStackedData Whether or not to render the stacked data * @return string */ public function render($initialize = true, $renderStackedData = true) @@ -835,7 +1013,12 @@ class JavascriptRenderer $suffix = !$initialize ? '(ajax)' : null; $js .= $this->getAddDatasetCode($this->debugBar->getCurrentRequestId(), $this->debugBar->getData(), $suffix); - return "\n"; + if ($this->useRequireJs){ + return "\n"; + } else { + return "\n"; + } + } /** @@ -856,7 +1039,15 @@ class JavascriptRenderer } if ($this->ajaxHandlerClass) { - $js .= sprintf("%s.ajaxHandler = new %s(%s);\n", $this->variableName, $this->ajaxHandlerClass, $this->variableName); + $js .= sprintf("%s.ajaxHandler = new %s(%s, undefined, %s);\n", + $this->variableName, + $this->ajaxHandlerClass, + $this->variableName, + $this->ajaxHandlerAutoShow ? 'true' : 'false' + ); + if ($this->ajaxHandlerBindToFetch) { + $js .= sprintf("%s.ajaxHandler.bindToFetch();\n", $this->variableName); + } if ($this->ajaxHandlerBindToXHR) { $js .= sprintf("%s.ajaxHandler.bindToXHR();\n", $this->variableName); } elseif ($this->ajaxHandlerBindToJquery) { @@ -945,6 +1136,7 @@ class JavascriptRenderer * * @param string $requestId * @param array $data + * @param mixed $suffix * @return string */ protected function getAddDatasetCode($requestId, $data, $suffix = null) diff --git a/htdocs/includes/DebugBar/OpenHandler.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/OpenHandler.php similarity index 90% rename from htdocs/includes/DebugBar/OpenHandler.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/OpenHandler.php index cbabea268ae..ee4df413792 100644 --- a/htdocs/includes/DebugBar/OpenHandler.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/OpenHandler.php @@ -19,6 +19,7 @@ class OpenHandler /** * @param DebugBar $debugBar + * @throws DebugBarException */ public function __construct(DebugBar $debugBar) { @@ -32,6 +33,10 @@ class OpenHandler * Handles the current request * * @param array $request Request data + * @param bool $echo + * @param bool $sendHeader + * @return string + * @throws DebugBarException */ public function handle($request = null, $echo = true, $sendHeader = true) { @@ -62,6 +67,8 @@ class OpenHandler /** * Find operation + * @param $request + * @return array */ protected function find($request) { @@ -87,6 +94,9 @@ class OpenHandler /** * Get operation + * @param $request + * @return array + * @throws DebugBarException */ protected function get($request) { diff --git a/htdocs/includes/DebugBar/PhpHttpDriver.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/PhpHttpDriver.php similarity index 74% rename from htdocs/includes/DebugBar/PhpHttpDriver.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/PhpHttpDriver.php index af07060d279..36e56f80bb0 100644 --- a/htdocs/includes/DebugBar/PhpHttpDriver.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/PhpHttpDriver.php @@ -15,6 +15,9 @@ namespace DebugBar; */ class PhpHttpDriver implements HttpDriverInterface { + /** + * @param array $headers + */ function setHeaders(array $headers) { foreach ($headers as $name => $value) { @@ -22,26 +25,44 @@ class PhpHttpDriver implements HttpDriverInterface } } + /** + * @return bool + */ function isSessionStarted() { return isset($_SESSION); } + /** + * @param string $name + * @param string $value + */ function setSessionValue($name, $value) { $_SESSION[$name] = $value; } + /** + * @param string $name + * @return bool + */ function hasSessionValue($name) { return array_key_exists($name, $_SESSION); } + /** + * @param string $name + * @return mixed + */ function getSessionValue($name) { return $_SESSION[$name]; } + /** + * @param string $name + */ function deleteSessionValue($name) { unset($_SESSION[$name]); diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/RequestIdGenerator.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/RequestIdGenerator.php new file mode 100644 index 00000000000..90c1728b0bb --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/RequestIdGenerator.php @@ -0,0 +1,43 @@ += 5.3.0, but OpenSSL may not always be available + return 'X' . bin2hex(openssl_random_pseudo_bytes(16)); + } else { + // Fall back to a rudimentary ID generator: + // * $_SERVER array will make the ID unique to this request. + // * spl_object_hash($this) will make the ID unique to this object instance. + // (note that object hashes can be reused, but the other data here should prevent issues here). + // * uniqid('', true) will use the current microtime(), plus additional random data. + // * $this->index guarantees the uniqueness of IDs from the current object. + $this->index++; + $entropy = serialize($_SERVER) . uniqid('', true) . spl_object_hash($this) . $this->index; + return 'X' . md5($entropy); + } + } +} diff --git a/htdocs/includes/DebugBar/RequestIdGeneratorInterface.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/RequestIdGeneratorInterface.php similarity index 52% rename from htdocs/includes/DebugBar/RequestIdGeneratorInterface.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/RequestIdGeneratorInterface.php index c72762484dd..3d9b4af7b2c 100644 --- a/htdocs/includes/DebugBar/RequestIdGeneratorInterface.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/RequestIdGeneratorInterface.php @@ -13,7 +13,11 @@ namespace DebugBar; interface RequestIdGeneratorInterface { /** - * Generates a unique id for the current request + * Generates a unique id for the current request. If called repeatedly, a new unique id must + * always be returned on each call to generate() - even across different object instances. + * + * To avoid any potential confusion in ID --> value maps, the returned value must be + * guaranteed to not be all-numeric. * * @return string */ diff --git a/htdocs/includes/DebugBar/Resources/debugbar.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/debugbar.css similarity index 55% rename from htdocs/includes/DebugBar/Resources/debugbar.css rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/debugbar.css index 61ca0aae538..502d2482954 100644 --- a/htdocs/includes/DebugBar/Resources/debugbar.css +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/debugbar.css @@ -11,15 +11,19 @@ div.phpdebugbar { left: 0; width: 100%; border-top: 0; - font-family: arial, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; background: #fff; z-index: 10000; font-size: 14px; color: #000; text-align: left; + line-height: 1; + letter-spacing: normal; + direction: ltr; } -div.phpdebugbar a { +div.phpdebugbar a, +div.phpdebugbar-openhandler { cursor: pointer; } @@ -32,7 +36,7 @@ div.phpdebugbar-drag-capture { z-index: 10001; background: none; display: none; - cursor: n-resize; + cursor: ns-resize; } div.phpdebugbar-closed { @@ -40,23 +44,57 @@ div.phpdebugbar-closed { } div.phpdebugbar * { + margin: 0; + padding: 0; + border: 0; + font-weight: normal; + text-decoration: none; + clear: initial; + width: auto; + -moz-box-sizing: content-box; + box-sizing: content-box; +} - -moz-box-sizing: content-box; - box-sizing: content-box; +div.phpdebugbar ol, div.phpdebugbar ul { + list-style: none; +} + +div.phpdebugbar table { + border-collapse: collapse; + border-spacing: 0; +} + +div.phpdebugbar input[type='text'], div.phpdebugbar input[type='password'] { + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; + background: #fff; + font-size: 14px; + color: #000; + border: 0; + padding: 0; + margin: 0; +} + +div.phpdebugbar code, div.phpdebugbar pre, div.phpdebugbar samp { + background: none; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; + font-size: 1em; + border: 0; + padding: 0; + margin: 0; } div.phpdebugbar code, div.phpdebugbar pre { - background: none; - font-family: monospace; - font-size: 1em; - border: 0; - padding: 0; - margin: 0; + color: #000; +} + +div.phpdebugbar pre.sf-dump { + color: #a0a000; + outline: 0; } a.phpdebugbar-restore-btn { float: left; - padding: 10px 8px; + padding: 5px 8px; font-size: 14px; color: #555; text-decoration: none; @@ -70,7 +108,7 @@ div.phpdebugbar-resize-handle { width: 100%; background: none; border-bottom: 1px solid #ccc; - cursor: n-resize; + cursor: ns-resize; } div.phpdebugbar-closed, div.phpdebugbar-minimized{ @@ -79,10 +117,10 @@ div.phpdebugbar-closed, div.phpdebugbar-minimized{ /* -------------------------------------- */ div.phpdebugbar-header, a.phpdebugbar-restore-btn { - background: #efefef url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADsAAAA7CAMAAADy+wKBAAABelBMVEUaSnYbS3ccTHgdTXkeTnofT3sgUHwhUX0iUn4jU38kVIAlVYEmVoInV4MoWIQpWYUqWoYrW4csXIgtXYkuXoovWoQvX4swW4UwX4wxYI0yYY4zYo80Y5A1ZJE2Yow2ZZI3ZpM4ZI04Z5Q5aJU6Zo86aZY7apc8a5g9aJI9bJk+bZo/bptAaI5Da5JFcZtGcptHcJZKcplPdJhPdZlbfZ5bgKRcfp9cgaVdfp9df6BegKFfgaJggqNghalhg6RihKVjhaZkhqdlh6dlh6hmiKlniapoiapoiqtpi6xqiadqjK1rja5sjq9tj7Bwjqx9mbOCnriCnrmDn7mEoLuFobyGoryHobmIobmJorqKo7uLpLyRqsKUrcWVrsaXq8GcscaftMqous2pu82pu863xtW3xta8zNvDz9vE0NzF0d3F0d7G0t7G09/H09/I1ODT2+TT3OXU3ebW3+fX4Onh6O3j6e/j6u/j6vDv8/bw8/bw8/fx9Pfx9Pj////KUJTtAAABt0lEQVR4AaXNZ1PVQBSH8WORWy5YROwIgr2IBbuigF2wKwj2HpXYS+R8eIcXnjzZTHLj7u/Vzn/OMyt7/ckef0Htbn9B7U5/Qe0Of0Htdn8ySEOTrqHBYtl2UvO+vXl8tqAdILb069GBgbzyFlBb208TWuznRL9D+ui6lrnfl5Vvq8fSS9e03L1eks3Urp0/zusqLcSZdhNd0Xbu4lo20mU1P2YXPIvns+1XXBe2sW2x0lG0G+gS2nS9w79n013W00U1c5hvo8Ve0sIcYrRr6QJa7rfQ7rJV1tA4Wu6H0I7bKt00puZjN6EdszGoXU2jaj5w34Z21FZZRefROrs5aGu19inadJWVdA4t5q1/1HxJZ1lBaN9jfq2pl+ksy2lETWTjllcKN9Lrtu3Ii4RpgmvpojNou25GUfRdHc9xLZ10Gm3nDBKzH9f/2c7wWlqE9l3rYT793CJp0im0zXybHGlSpRYpSYNOom1Mu+nhRpbU6QTautN+2ld3VG2T6XqO1OiYmre1KTW/p9bV8qSDhtF2PPj3enIVJ4DW1TO8oKf4QJb5k6X+gtol/oLaxf6C2kX+gtoAfwHyDK0lVxrWYgAAAABJRU5ErkJggg==) no-repeat 10px 8px / 20px 20px; + background: #efefef url(data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%2020%2020%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Ccircle%20fill%3D%22%23000%22%20cx%3D%2210%22%20cy%3D%2210%22%20r%3D%229%22%2F%3E%3Cpath%20d%3D%22M6.039%208.342c.463%200%20.772.084.927.251.154.168.191.455.11.862-.084.424-.247.727-.487.908-.241.182-.608.272-1.1.272h-.743l.456-2.293h.837zm-2.975%204.615h1.22l.29-1.457H5.62c.461%200%20.84-.047%201.139-.142.298-.095.569-.254.812-.477.205-.184.37-.387.497-.608.127-.222.217-.466.27-.734.13-.65.032-1.155-.292-1.518-.324-.362-.84-.543-1.545-.543H4.153l-1.089%205.479zM9.235%206.02h1.21l-.289%201.458h1.079c.679%200%201.147.115%201.405.347.258.231.335.607.232%201.125l-.507%202.55h-1.23l.481-2.424c.055-.276.035-.464-.06-.565-.095-.1-.298-.15-.608-.15H9.98L9.356%2011.5h-1.21l1.089-5.48M15.566%208.342c.464%200%20.773.084.928.251.154.168.19.455.11.862-.084.424-.247.727-.488.908-.24.182-.607.272-1.1.272h-.742l.456-2.293h.836zm-2.974%204.615h1.22l.29-1.457h1.046c.461%200%20.84-.047%201.139-.142.298-.095.569-.254.812-.477.205-.184.37-.387.497-.608.127-.222.217-.466.27-.734.129-.65.032-1.155-.292-1.518-.324-.362-.84-.543-1.545-.543H13.68l-1.089%205.479z%22%20fill%3D%22%23FFF%22%2F%3E%3C%2Fsvg%3E) no-repeat 5px 4px / 20px 20px; } div.phpdebugbar-header { - padding-left: 40px; + padding-left: 29px; min-height: 26px; line-height: 16px; } @@ -101,11 +139,10 @@ div.phpdebugbar-header-right { float: right; } div.phpdebugbar-header > div > * { - padding: 10px 10px; + padding: 5px 5px; font-size: 14px; color: #555; text-decoration: none; - outline: none; } div.phpdebugbar-header-left > * { float: left; @@ -126,25 +163,24 @@ a.phpdebugbar-close-btn { } a.phpdebugbar-tab.phpdebugbar-active { - background: #3d6c99; - color: #fff; + background: #ccc; + color: #444; + background-image: linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); + background-image: -o-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); + background-image: -moz-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); + background-image: -webkit-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); + background-image: -ms-linear-gradient(bottom, rgb(173,173,173) 41%, rgb(209,209,209) 71%); + background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0.41, rgb(173,173,173)), color-stop(0.71, rgb(209,209,209))); } - -a.phpdebugbar-tab.phpdebugbar-active span.phpdebugbar-badge { - background: #fff; - color: #3d6c99; -} - a.phpdebugbar-tab span.phpdebugbar-badge { display: none; margin-left: 5px; - float: right; font-size: 11px; line-height: 14px; - padding: 1px 7px; - background: #3d6c99; + padding: 0 6px; + background: #ccc; border-radius: 4px; - color: #fff; + color: #555; font-weight: normal; text-shadow: none; vertical-align: middle; @@ -153,23 +189,21 @@ a.phpdebugbar-tab.phpdebugbar-active span.phpdebugbar-badge { display: none; vertical-align: middle; } + a.phpdebugbar-tab span.phpdebugbar-badge.phpdebugbar-visible { + display: inline; + } a.phpdebugbar-tab span.phpdebugbar-badge.phpdebugbar-important { background: #ed6868; color: white; } -a.phpdebugbar-close-btn, a.phpdebugbar-open-btn, a.phpdebugbar-minimize-btn , a.phpdebugbar-maximize-btn { +a.phpdebugbar-close-btn, a.phpdebugbar-open-btn, a.phpdebugbar-restore-btn, a.phpdebugbar-minimize-btn , a.phpdebugbar-maximize-btn { width: 16px; height: 16px; } -a.phpdebugbar-restore-btn { - width: 26px; - height: 16px; -} - a.phpdebugbar-minimize-btn , a.phpdebugbar-maximize-btn { - padding-right: 0px !important; + padding-right: 0 !important; } a.phpdebugbar-maximize-btn { display: none} @@ -181,19 +215,19 @@ div.phpdebugbar-minimized a.phpdebugbar-maximize-btn { display: block} div.phpdebugbar-minimized a.phpdebugbar-minimize-btn { display: none} a.phpdebugbar-minimize-btn { - background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-down%22%3E%3Cpath%20d%3D%22M1683%20808l-742%20741q-19%2019-45%2019t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19%2045-19t45%2019l531%20531%20531-531q19-19%2045-19t45%2019l166%20165q19%2019%2019%2045.5t-19%2045.5z%22%2F%3E%3C%2Fsvg%3E) no-repeat 10px 10px / 14px 14px; + background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-down%22%3E%3Cpath%20d%3D%22M1683%20808l-742%20741q-19%2019-45%2019t-45-19l-742-741q-19-19-19-45.5t19-45.5l166-165q19-19%2045-19t45%2019l531%20531%20531-531q19-19%2045-19t45%2019l166%20165q19%2019%2019%2045.5t-19%2045.5z%22%2F%3E%3C%2Fsvg%3E) no-repeat 6px 6px / 14px 14px; } a.phpdebugbar-maximize-btn { - background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-up%22%3E%3Cpath%20d%3D%22M1683%201331l-166%20165q-19%2019-45%2019t-45-19l-531-531-531%20531q-19%2019-45%2019t-45-19l-166-165q-19-19-19-45.5t19-45.5l742-741q19-19%2045-19t45%2019l742%20741q19%2019%2019%2045.5t-19%2045.5z%22%2F%3E%3C%2Fsvg%3E) no-repeat 10px 10px / 14px 14px; + background:url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22chevron-up%22%3E%3Cpath%20d%3D%22M1683%201331l-166%20165q-19%2019-45%2019t-45-19l-531-531-531%20531q-19%2019-45%2019t-45-19l-166-165q-19-19-19-45.5t19-45.5l742-741q19-19%2045-19t45%2019l742%20741q19%2019%2019%2045.5t-19%2045.5z%22%2F%3E%3C%2Fsvg%3E) no-repeat 6px 6px / 14px 14px; } a.phpdebugbar-close-btn { - background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22close%22%3E%3Cpath%20d%3D%22M1490%201322q0%2040-28%2068l-136%20136q-28%2028-68%2028t-68-28l-294-294-294%20294q-28%2028-68%2028t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28%2068-28t68%2028l294%20294%20294-294q28-28%2068-28t68%2028l136%20136q28%2028%2028%2068t-28%2068l-294%20294%20294%20294q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) no-repeat 10px 10px / 14px 14px; + background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22close%22%3E%3Cpath%20d%3D%22M1490%201322q0%2040-28%2068l-136%20136q-28%2028-68%2028t-68-28l-294-294-294%20294q-28%2028-68%2028t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28%2068-28t68%2028l294%20294%20294-294q28-28%2068-28t68%2028l136%20136q28%2028%2028%2068t-28%2068l-294%20294%20294%20294q28%2028%2028%2068z%22%2F%3E%3C%2Fsvg%3E) no-repeat 9px 6px / 14px 14px; } a.phpdebugbar-open-btn { - background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22folder-open%22%3E%3Cpath%20d%3D%22M1815%20952q0%2031-31%2066l-336%20396q-43%2051-120.5%2086.5t-143.5%2035.5h-1088q-34%200-60.5-13t-26.5-43q0-31%2031-66l336-396q43-51%20120.5-86.5t143.5-35.5h1088q34%200%2060.5%2013t26.5%2043zm-343-344v160h-832q-94%200-197%2047.5t-164%20119.5l-337%20396-5%206q0-4-.5-12.5t-.5-12.5v-960q0-92%2066-158t158-66h320q92%200%20158%2066t66%20158v32h544q92%200%20158%2066t66%20158z%22%2F%3E%3C%2Fsvg%3E) no-repeat 10px 10px / 14px 14px; + background: url(data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201792%201792%22%20id%3D%22folder-open%22%3E%3Cpath%20d%3D%22M1815%20952q0%2031-31%2066l-336%20396q-43%2051-120.5%2086.5t-143.5%2035.5h-1088q-34%200-60.5-13t-26.5-43q0-31%2031-66l336-396q43-51%20120.5-86.5t143.5-35.5h1088q34%200%2060.5%2013t26.5%2043zm-343-344v160h-832q-94%200-197%2047.5t-164%20119.5l-337%20396-5%206q0-4-.5-12.5t-.5-12.5v-960q0-92%2066-158t158-66h320q92%200%20158%2066t66%20158v32h544q92%200%20158%2066t66%20158z%22%2F%3E%3C%2Fsvg%3E) no-repeat 8px 6px / 14px 14px; } .phpdebugbar-indicator { @@ -206,8 +240,9 @@ a.phpdebugbar-open-btn { .phpdebugbar-indicator span.phpdebugbar-tooltip { display: none; position: absolute; - bottom: 45px; + top: -30px; background: #efefef; + opacity: .7; border: 1px solid #ccc; color: #555; font-size: 11px; @@ -220,21 +255,11 @@ a.phpdebugbar-open-btn { .phpdebugbar-indicator:hover span.phpdebugbar-tooltip:not(.phpdebugbar-disabled) { display: block; } - .phpdebugbar-indicator span.phpdebugbar-tooltip-wide { - width: 300%; - } - .phpdebugbar-indicator span.phpdebugbar-tooltip-extra-wide { - width: 400%; - } - .phpdebugbar-indicator span.phpdebugbar-tooltip-html { - display: inline-block; - text-align: left; - } select.phpdebugbar-datasets-switcher { float: right; display: none; - margin: 8px 0 0 7px; + margin: 2px 0 0 7px; max-width: 200px; max-height: 23px; padding: 0; diff --git a/htdocs/includes/DebugBar/Resources/debugbar.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/debugbar.js similarity index 88% rename from htdocs/includes/DebugBar/Resources/debugbar.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/debugbar.js index 1dcbec2146f..09c3caebdc6 100644 --- a/htdocs/includes/DebugBar/Resources/debugbar.js +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/debugbar.js @@ -95,7 +95,7 @@ if (typeof(PhpDebugBar) == 'undefined') { // ------------------------------------------------------------------ - + /** * Base class for all elements with a visual component * @@ -123,7 +123,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Called after the constructor - * + * * @param {Object} options */ initialize: function(options) { @@ -137,7 +137,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Sets the value of an attribute - * + * * @param {String} attr Can also be an object to set multiple attributes at once * @param {Object} value */ @@ -159,7 +159,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Checks if an attribute exists and is not null - * + * * @param {String} attr * @return {[type]} [description] */ @@ -169,7 +169,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Returns the value of an attribute - * + * * @param {String} attr * @return {Object} */ @@ -181,7 +181,7 @@ if (typeof(PhpDebugBar) == 'undefined') { * Registers a callback function that will be called whenever the value of the attribute changes * * If cb is a jQuery element, text() will be used to fill the element - * + * * @param {String} attr * @param {Function} cb */ @@ -213,7 +213,7 @@ if (typeof(PhpDebugBar) == 'undefined') { * Creates a subclass * * Code from Backbone.js - * + * * @param {Array} props Prototype properties * @return {Function} */ @@ -223,7 +223,7 @@ if (typeof(PhpDebugBar) == 'undefined') { var child = function() { return parent.apply(this, arguments); }; $.extend(child, parent); - var Surrogate = function(){ this.constructor = child; }; + var Surrogate = function() { this.constructor = child; }; Surrogate.prototype = parent.prototype; child.prototype = new Surrogate; $.extend(child.prototype, props); @@ -237,7 +237,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Tab - * + * * A tab is composed of a tab label which is always visible and * a tab panel which is visible only when the tab is active. * @@ -260,7 +260,7 @@ if (typeof(PhpDebugBar) == 'undefined') { this.$icon = $('').appendTo(this.$tab); this.bindAttr('icon', function(icon) { if (icon) { - this.$icon.attr('class', 'fa fa-' + icon); + this.$icon.attr('class', 'phpdebugbar-fa phpdebugbar-fa-' + icon); } else { this.$icon.attr('class', ''); } @@ -272,9 +272,9 @@ if (typeof(PhpDebugBar) == 'undefined') { this.bindAttr('badge', function(value) { if (value !== null) { this.$badge.text(value); - this.$badge.show(); + this.$badge.addClass(csscls('visible')); } else { - this.$badge.hide(); + this.$badge.removeClass(csscls('visible')); } }); @@ -315,7 +315,7 @@ if (typeof(PhpDebugBar) == 'undefined') { this.$icon = $('').appendTo(this.$el); this.bindAttr('icon', function(icon) { if (icon) { - this.$icon.attr('class', 'fa fa-' + icon); + this.$icon.attr('class', 'phpdebugbar-fa phpdebugbar-fa-' + icon); } else { this.$icon.attr('class', ''); } @@ -350,7 +350,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Formats the title of a dataset - * + * * @this {DatasetTitleFormater} * @param {String} id * @param {Object} data @@ -409,17 +409,19 @@ if (typeof(PhpDebugBar) == 'undefined') { className: "phpdebugbar " + csscls('minimized'), + options: { + bodyMarginBottom: true, + bodyMarginBottomHeight: 0 + }, + initialize: function() { - this.options = { - bodyMarginBottom: true, - bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')), - }; this.controls = {}; this.dataMap = {}; this.datasets = {}; this.firstTabName = null; this.activePanelName = null; this.datesetTitleFormater = new DatasetTitleFormater(this); + this.options.bodyMarginBottomHeight = parseInt($('body').css('margin-bottom')); this.registerResizeHandler(); }, @@ -594,7 +596,7 @@ if (typeof(PhpDebugBar) == 'undefined') { */ createTab: function(name, widget, title) { var tab = new Tab({ - title: title || (name.replace(/[_\-]/g, ' ').charAt(0).toUpperCase() + name.slice(1)), + title: title || (name.replace(/[_\-]/g, ' ').charAt(0).toUpperCase() + name.slice(1)), widget: widget }); return this.addTab(name, tab); @@ -650,7 +652,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Adds an indicator - * + * * @this {DebugBar} * @param {String} name Internal name * @param {Indicator} indicator Indicator object @@ -673,7 +675,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Returns a control - * + * * @param {String} name * @return {Object} */ @@ -685,7 +687,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Checks if there's a control under the specified name - * + * * @this {DebugBar} * @param {String} name * @return {Boolean} @@ -696,7 +698,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Checks if a tab with the specified name exists - * + * * @this {DebugBar} * @param {String} name * @return {Boolean} @@ -707,7 +709,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Checks if an indicator with the specified name exists - * + * * @this {DebugBar} * @param {String} name * @return {Boolean} @@ -718,7 +720,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Removes all tabs and indicators from the debug bar and hides it - * + * * @this {DebugBar} */ reset: function() { @@ -735,7 +737,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Open the debug bar and display the specified tab - * + * * @this {DebugBar} * @param {String} name If not specified, display the first tab */ @@ -786,13 +788,13 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Checks if the panel is minimized - * + * * @return {Boolean} */ isMinimized: function() { return this.$el.hasClass(csscls('minimized')); }, - + /** * Close the debug bar * @@ -846,8 +848,8 @@ if (typeof(PhpDebugBar) == 'undefined') { if (this.isClosed()) { return $('body').css('margin-bottom', this.options.bodyMarginBottomHeight || ''); } - - var offset = parseInt(this.$el.height()) + this.options.bodyMarginBottomHeight; + + var offset = parseInt(this.$el.height()) + (this.options.bodyMarginBottomHeight || 0); $('body').css('margin-bottom', offset); } }, @@ -863,7 +865,7 @@ if (typeof(PhpDebugBar) == 'undefined') { * * Example: * {"memory": ["memory.peak_usage_str", "0B"]} - * + * * @this {DebugBar} * @param {Object} map */ @@ -887,7 +889,7 @@ if (typeof(PhpDebugBar) == 'undefined') { * * For this method to be usefull, you need to specify * a dataMap using setDataMap() - * + * * @this {DebugBar} * @param {Object} data * @return {String} Dataset's id @@ -902,17 +904,18 @@ if (typeof(PhpDebugBar) == 'undefined') { * * If more than one dataset are added, the dataset selector * will be displayed. - * + * * For this method to be usefull, you need to specify * a dataMap using setDataMap() - * + * * @this {DebugBar} * @param {Object} data * @param {String} id The name of this set, optional * @param {String} suffix + * @param {Bool} show Whether to show the new dataset, optional (default: true) * @return {String} Dataset's id */ - addDataSet: function(data, id, suffix) { + addDataSet: function(data, id, suffix, show) { var label = this.datesetTitleFormater.format(id, data, suffix); id = id || (getObjectSize(this.datasets) + 1); this.datasets[id] = data; @@ -922,29 +925,32 @@ if (typeof(PhpDebugBar) == 'undefined') { this.$datasets.show(); } - this.showDataSet(id); + if (typeof(show) == 'undefined' || show) { + this.showDataSet(id); + } return id; }, /** * Loads a dataset using the open handler - * + * * @param {String} id + * @param {Bool} show Whether to show the new dataset, optional (default: true) */ - loadDataSet: function(id, suffix, callback) { + loadDataSet: function(id, suffix, callback, show) { if (!this.openHandler) { throw new Error('loadDataSet() needs an open handler'); } var self = this; this.openHandler.load(id, function(data) { - self.addDataSet(data, id, suffix); + self.addDataSet(data, id, suffix, show); callback && callback(data); }); }, /** * Returns the data from a dataset - * + * * @this {DebugBar} * @param {String} id * @return {Object} @@ -955,7 +961,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Switch the currently displayed dataset - * + * * @this {DebugBar} * @param {String} id */ @@ -966,7 +972,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Called when the current dataset is modified. - * + * * @this {DebugBar} * @param {Object} data */ @@ -985,7 +991,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Sets the handler to open past dataset - * + * * @this {DebugBar} * @param {object} handler */ @@ -1000,7 +1006,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Returns the handler to open past dataset - * + * * @this {DebugBar} * @return {object} */ @@ -1014,43 +1020,68 @@ if (typeof(PhpDebugBar) == 'undefined') { DebugBar.Indicator = Indicator; // ------------------------------------------------------------------ - + /** * AjaxHandler * * Extract data from headers of an XMLHttpRequest and adds a new dataset + * + * @param {Bool} autoShow Whether to immediately show new datasets, optional (default: true) */ - var AjaxHandler = PhpDebugBar.AjaxHandler = function(debugbar, headerName) { + var AjaxHandler = PhpDebugBar.AjaxHandler = function(debugbar, headerName, autoShow) { this.debugbar = debugbar; this.headerName = headerName || 'phpdebugbar'; + this.autoShow = typeof(autoShow) == 'undefined' ? true : autoShow; }; $.extend(AjaxHandler.prototype, { /** - * Handles an XMLHttpRequest - * + * Handles a Fetch API Response or an XMLHttpRequest + * * @this {AjaxHandler} - * @param {XMLHttpRequest} xhr + * @param {Response|XMLHttpRequest} response * @return {Bool} */ - handle: function(xhr) { - if (!this.loadFromId(xhr)) { - return this.loadFromData(xhr); + handle: function(response) { + // Check if the debugbar header is available + if (this.isFetch(response) && !response.headers.has(this.headerName + '-id')) { + return true; + } else if (this.isXHR(response) && response.getAllResponseHeaders().indexOf(this.headerName) === -1) { + return true; + } + if (!this.loadFromId(response)) { + return this.loadFromData(response); } return true; }, + getHeader: function(response, header) { + if (this.isFetch(response)) { + return response.headers.get(header) + } + + return response.getResponseHeader(header) + }, + + isFetch: function(response) { + return Object.prototype.toString.call(response) == '[object Response]' + }, + + isXHR: function(response) { + return Object.prototype.toString.call(response) == '[object XMLHttpRequest]' + }, + /** * Checks if the HEADER-id exists and loads the dataset using the open handler - * - * @param {XMLHttpRequest} xhr + * + * @param {Response|XMLHttpRequest} response * @return {Bool} */ - loadFromId: function(xhr) { - var id = this.extractIdFromHeaders(xhr); + loadFromId: function(response) { + var id = this.extractIdFromHeaders(response); if (id && this.debugbar.openHandler) { - this.debugbar.loadDataSet(id, "(ajax)"); + this.debugbar.loadDataSet(id, "(ajax)", undefined, this.autoShow); return true; } return false; @@ -1058,22 +1089,22 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Extracts the id from the HEADER-id - * - * @param {XMLHttpRequest} xhr + * + * @param {Response|XMLHttpRequest} response * @return {String} */ - extractIdFromHeaders: function(xhr) { - return xhr.getResponseHeader(this.headerName + '-id'); + extractIdFromHeaders: function(response) { + return this.getHeader(response, this.headerName + '-id'); }, /** * Checks if the HEADER exists and loads the dataset - * - * @param {XMLHttpRequest} xhr + * + * @param {Response|XMLHttpRequest} response * @return {Bool} */ - loadFromData: function(xhr) { - var raw = this.extractDataFromHeaders(xhr); + loadFromData: function(response) { + var raw = this.extractDataFromHeaders(response); if (!raw) { return false; } @@ -1082,25 +1113,25 @@ if (typeof(PhpDebugBar) == 'undefined') { if (data.error) { throw new Error('Error loading debugbar data: ' + data.error); } else if(data.data) { - this.debugbar.addDataSet(data.data, data.id, "(ajax)"); + this.debugbar.addDataSet(data.data, data.id, "(ajax)", this.autoShow); } return true; }, /** * Extract the data as a string from headers of an XMLHttpRequest - * + * * @this {AjaxHandler} - * @param {XMLHttpRequest} xhr + * @param {Response|XMLHttpRequest} response * @return {string} */ - extractDataFromHeaders: function(xhr) { - var data = xhr.getResponseHeader(this.headerName); + extractDataFromHeaders: function(response) { + var data = this.getHeader(response, this.headerName); if (!data) { return; } for (var i = 1;; i++) { - var header = xhr.getResponseHeader(this.headerName + '-' + i); + var header = this.getHeader(response, this.headerName + '-' + i); if (!header) { break; } @@ -1111,7 +1142,7 @@ if (typeof(PhpDebugBar) == 'undefined') { /** * Parses the string data into an object - * + * * @this {AjaxHandler} * @param {string} data * @return {string} @@ -1120,9 +1151,35 @@ if (typeof(PhpDebugBar) == 'undefined') { return JSON.parse(data); }, + /** + * Attaches an event listener to fetch + * + * @this {AjaxHandler} + */ + bindToFetch: function() { + var self = this; + var proxied = window.fetch; + + if (proxied === undefined && proxied.polyfill !== undefined) { + return; + } + + window.fetch = function () { + var promise = proxied.apply(this, arguments); + + promise.then(function (response) { + self.handle(response); + }, function (e) { + self.handle(response); + }); + + return promise; + }; + }, + /** * Attaches an event listener to jQuery.ajaxComplete() - * + * * @this {AjaxHandler} * @param {jQuery} jq Optional */ @@ -1134,10 +1191,10 @@ if (typeof(PhpDebugBar) == 'undefined') { } }); }, - + /** * Attaches an event listener to XMLHttpRequest - * + * * @this {AjaxHandler} */ bindToXHR: function() { diff --git a/htdocs/includes/DebugBar/Resources/openhandler.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/openhandler.css similarity index 97% rename from htdocs/includes/DebugBar/Resources/openhandler.css rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/openhandler.css index d72aba5a6f6..863a8bd5849 100644 --- a/htdocs/includes/DebugBar/Resources/openhandler.css +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/openhandler.css @@ -19,10 +19,11 @@ div.phpdebugbar-openhandler { width: 70%; height: 70%; background: #fff; + color: #000; border: 2px solid #888; overflow: auto; z-index: 20001; - font-family: arial; + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; padding-bottom: 10px; } diff --git a/htdocs/includes/DebugBar/Resources/openhandler.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/openhandler.js similarity index 98% rename from htdocs/includes/DebugBar/Resources/openhandler.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/openhandler.js index 08d13b3fd27..5633043ff3a 100644 --- a/htdocs/includes/DebugBar/Resources/openhandler.js +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/openhandler.js @@ -20,9 +20,9 @@ if (typeof(PhpDebugBar) == 'undefined') { render: function() { var self = this; - + this.$el.appendTo('body').hide(); - this.$closebtn = $(''); + this.$closebtn = $(''); this.$table = $('
DateMethodURLIPFilter data
').append(this.$table).appendTo(this.$el); diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css new file mode 100644 index 00000000000..3559d52d8c2 --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'PhpDebugbarFontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.phpdebugbar-fa{display:inline-block;font:normal normal normal 14px/1 PhpDebugbarFontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.phpdebugbar-fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.phpdebugbar-fa-2x{font-size:2em}.phpdebugbar-fa-3x{font-size:3em}.phpdebugbar-fa-4x{font-size:4em}.phpdebugbar-fa-5x{font-size:5em}.phpdebugbar-fa-fw{width:1.28571429em;text-align:center}.phpdebugbar-fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.phpdebugbar-fa-ul>li{position:relative}.phpdebugbar-fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.phpdebugbar-fa-li.phpdebugbar-fa-lg{left:-1.85714286em}.phpdebugbar-fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.phpdebugbar-fa-pull-left{float:left}.phpdebugbar-fa-pull-right{float:right}.phpdebugbar-fa.phpdebugbar-fa-pull-left{margin-right:.3em}.phpdebugbar-fa.phpdebugbar-fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.phpdebugbar-fa.pull-left{margin-right:.3em}.phpdebugbar-fa.pull-right{margin-left:.3em}.phpdebugbar-fa-spin{-webkit-animation:phpdebugbar-fa-spin 2s infinite linear;animation:phpdebugbar-fa-spin 2s infinite linear}.phpdebugbar-fa-pulse{-webkit-animation:phpdebugbar-fa-spin 1s infinite steps(8);animation:phpdebugbar-fa-spin 1s infinite steps(8)}@-webkit-keyframes phpdebugbar-fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes phpdebugbar-fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.phpdebugbar-fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.phpdebugbar-fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.phpdebugbar-fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.phpdebugbar-fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.phpdebugbar-fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .phpdebugbar-fa-rotate-90,:root .phpdebugbar-fa-rotate-180,:root .phpdebugbar-fa-rotate-270,:root .phpdebugbar-fa-flip-horizontal,:root .phpdebugbar-fa-flip-vertical{filter:none}.phpdebugbar-fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.phpdebugbar-fa-stack-1x,.phpdebugbar-fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.phpdebugbar-fa-stack-1x{line-height:inherit}.phpdebugbar-fa-stack-2x{font-size:2em}.phpdebugbar-fa-inverse{color:#fff}.phpdebugbar-fa-glass:before{content:"\f000"}.phpdebugbar-fa-music:before{content:"\f001"}.phpdebugbar-fa-search:before{content:"\f002"}.phpdebugbar-fa-envelope-o:before{content:"\f003"}.phpdebugbar-fa-heart:before{content:"\f004"}.phpdebugbar-fa-star:before{content:"\f005"}.phpdebugbar-fa-star-o:before{content:"\f006"}.phpdebugbar-fa-user:before{content:"\f007"}.phpdebugbar-fa-film:before{content:"\f008"}.phpdebugbar-fa-th-large:before{content:"\f009"}.phpdebugbar-fa-th:before{content:"\f00a"}.phpdebugbar-fa-th-list:before{content:"\f00b"}.phpdebugbar-fa-check:before{content:"\f00c"}.phpdebugbar-fa-remove:before,.phpdebugbar-fa-close:before,.phpdebugbar-fa-times:before{content:"\f00d"}.phpdebugbar-fa-search-plus:before{content:"\f00e"}.phpdebugbar-fa-search-minus:before{content:"\f010"}.phpdebugbar-fa-power-off:before{content:"\f011"}.phpdebugbar-fa-signal:before{content:"\f012"}.phpdebugbar-fa-gear:before,.phpdebugbar-fa-cog:before{content:"\f013"}.phpdebugbar-fa-trash-o:before{content:"\f014"}.phpdebugbar-fa-home:before{content:"\f015"}.phpdebugbar-fa-file-o:before{content:"\f016"}.phpdebugbar-fa-clock-o:before{content:"\f017"}.phpdebugbar-fa-road:before{content:"\f018"}.phpdebugbar-fa-download:before{content:"\f019"}.phpdebugbar-fa-arrow-circle-o-down:before{content:"\f01a"}.phpdebugbar-fa-arrow-circle-o-up:before{content:"\f01b"}.phpdebugbar-fa-inbox:before{content:"\f01c"}.phpdebugbar-fa-play-circle-o:before{content:"\f01d"}.phpdebugbar-fa-rotate-right:before,.phpdebugbar-fa-repeat:before{content:"\f01e"}.phpdebugbar-fa-refresh:before{content:"\f021"}.phpdebugbar-fa-list-alt:before{content:"\f022"}.phpdebugbar-fa-lock:before{content:"\f023"}.phpdebugbar-fa-flag:before{content:"\f024"}.phpdebugbar-fa-headphones:before{content:"\f025"}.phpdebugbar-fa-volume-off:before{content:"\f026"}.phpdebugbar-fa-volume-down:before{content:"\f027"}.phpdebugbar-fa-volume-up:before{content:"\f028"}.phpdebugbar-fa-qrcode:before{content:"\f029"}.phpdebugbar-fa-barcode:before{content:"\f02a"}.phpdebugbar-fa-tag:before{content:"\f02b"}.phpdebugbar-fa-tags:before{content:"\f02c"}.phpdebugbar-fa-book:before{content:"\f02d"}.phpdebugbar-fa-bookmark:before{content:"\f02e"}.phpdebugbar-fa-print:before{content:"\f02f"}.phpdebugbar-fa-camera:before{content:"\f030"}.phpdebugbar-fa-font:before{content:"\f031"}.phpdebugbar-fa-bold:before{content:"\f032"}.phpdebugbar-fa-italic:before{content:"\f033"}.phpdebugbar-fa-text-height:before{content:"\f034"}.phpdebugbar-fa-text-width:before{content:"\f035"}.phpdebugbar-fa-align-left:before{content:"\f036"}.phpdebugbar-fa-align-center:before{content:"\f037"}.phpdebugbar-fa-align-right:before{content:"\f038"}.phpdebugbar-fa-align-justify:before{content:"\f039"}.phpdebugbar-fa-list:before{content:"\f03a"}.phpdebugbar-fa-dedent:before,.phpdebugbar-fa-outdent:before{content:"\f03b"}.phpdebugbar-fa-indent:before{content:"\f03c"}.phpdebugbar-fa-video-camera:before{content:"\f03d"}.phpdebugbar-fa-photo:before,.phpdebugbar-fa-image:before,.phpdebugbar-fa-picture-o:before{content:"\f03e"}.phpdebugbar-fa-pencil:before{content:"\f040"}.phpdebugbar-fa-map-marker:before{content:"\f041"}.phpdebugbar-fa-adjust:before{content:"\f042"}.phpdebugbar-fa-tint:before{content:"\f043"}.phpdebugbar-fa-edit:before,.phpdebugbar-fa-pencil-square-o:before{content:"\f044"}.phpdebugbar-fa-share-square-o:before{content:"\f045"}.phpdebugbar-fa-check-square-o:before{content:"\f046"}.phpdebugbar-fa-arrows:before{content:"\f047"}.phpdebugbar-fa-step-backward:before{content:"\f048"}.phpdebugbar-fa-fast-backward:before{content:"\f049"}.phpdebugbar-fa-backward:before{content:"\f04a"}.phpdebugbar-fa-play:before{content:"\f04b"}.phpdebugbar-fa-pause:before{content:"\f04c"}.phpdebugbar-fa-stop:before{content:"\f04d"}.phpdebugbar-fa-forward:before{content:"\f04e"}.phpdebugbar-fa-fast-forward:before{content:"\f050"}.phpdebugbar-fa-step-forward:before{content:"\f051"}.phpdebugbar-fa-eject:before{content:"\f052"}.phpdebugbar-fa-chevron-left:before{content:"\f053"}.phpdebugbar-fa-chevron-right:before{content:"\f054"}.phpdebugbar-fa-plus-circle:before{content:"\f055"}.phpdebugbar-fa-minus-circle:before{content:"\f056"}.phpdebugbar-fa-times-circle:before{content:"\f057"}.phpdebugbar-fa-check-circle:before{content:"\f058"}.phpdebugbar-fa-question-circle:before{content:"\f059"}.phpdebugbar-fa-info-circle:before{content:"\f05a"}.phpdebugbar-fa-crosshairs:before{content:"\f05b"}.phpdebugbar-fa-times-circle-o:before{content:"\f05c"}.phpdebugbar-fa-check-circle-o:before{content:"\f05d"}.phpdebugbar-fa-ban:before{content:"\f05e"}.phpdebugbar-fa-arrow-left:before{content:"\f060"}.phpdebugbar-fa-arrow-right:before{content:"\f061"}.phpdebugbar-fa-arrow-up:before{content:"\f062"}.phpdebugbar-fa-arrow-down:before{content:"\f063"}.phpdebugbar-fa-mail-forward:before,.phpdebugbar-fa-share:before{content:"\f064"}.phpdebugbar-fa-expand:before{content:"\f065"}.phpdebugbar-fa-compress:before{content:"\f066"}.phpdebugbar-fa-plus:before{content:"\f067"}.phpdebugbar-fa-minus:before{content:"\f068"}.phpdebugbar-fa-asterisk:before{content:"\f069"}.phpdebugbar-fa-exclamation-circle:before{content:"\f06a"}.phpdebugbar-fa-gift:before{content:"\f06b"}.phpdebugbar-fa-leaf:before{content:"\f06c"}.phpdebugbar-fa-fire:before{content:"\f06d"}.phpdebugbar-fa-eye:before{content:"\f06e"}.phpdebugbar-fa-eye-slash:before{content:"\f070"}.phpdebugbar-fa-warning:before,.phpdebugbar-fa-exclamation-triangle:before{content:"\f071"}.phpdebugbar-fa-plane:before{content:"\f072"}.phpdebugbar-fa-calendar:before{content:"\f073"}.phpdebugbar-fa-random:before{content:"\f074"}.phpdebugbar-fa-comment:before{content:"\f075"}.phpdebugbar-fa-magnet:before{content:"\f076"}.phpdebugbar-fa-chevron-up:before{content:"\f077"}.phpdebugbar-fa-chevron-down:before{content:"\f078"}.phpdebugbar-fa-retweet:before{content:"\f079"}.phpdebugbar-fa-shopping-cart:before{content:"\f07a"}.phpdebugbar-fa-folder:before{content:"\f07b"}.phpdebugbar-fa-folder-open:before{content:"\f07c"}.phpdebugbar-fa-arrows-v:before{content:"\f07d"}.phpdebugbar-fa-arrows-h:before{content:"\f07e"}.phpdebugbar-fa-bar-chart-o:before,.phpdebugbar-fa-bar-chart:before{content:"\f080"}.phpdebugbar-fa-twitter-square:before{content:"\f081"}.phpdebugbar-fa-facebook-square:before{content:"\f082"}.phpdebugbar-fa-camera-retro:before{content:"\f083"}.phpdebugbar-fa-key:before{content:"\f084"}.phpdebugbar-fa-gears:before,.phpdebugbar-fa-cogs:before{content:"\f085"}.phpdebugbar-fa-comments:before{content:"\f086"}.phpdebugbar-fa-thumbs-o-up:before{content:"\f087"}.phpdebugbar-fa-thumbs-o-down:before{content:"\f088"}.phpdebugbar-fa-star-half:before{content:"\f089"}.phpdebugbar-fa-heart-o:before{content:"\f08a"}.phpdebugbar-fa-sign-out:before{content:"\f08b"}.phpdebugbar-fa-linkedin-square:before{content:"\f08c"}.phpdebugbar-fa-thumb-tack:before{content:"\f08d"}.phpdebugbar-fa-external-link:before{content:"\f08e"}.phpdebugbar-fa-sign-in:before{content:"\f090"}.phpdebugbar-fa-trophy:before{content:"\f091"}.phpdebugbar-fa-github-square:before{content:"\f092"}.phpdebugbar-fa-upload:before{content:"\f093"}.phpdebugbar-fa-lemon-o:before{content:"\f094"}.phpdebugbar-fa-phone:before{content:"\f095"}.phpdebugbar-fa-square-o:before{content:"\f096"}.phpdebugbar-fa-bookmark-o:before{content:"\f097"}.phpdebugbar-fa-phone-square:before{content:"\f098"}.phpdebugbar-fa-twitter:before{content:"\f099"}.phpdebugbar-fa-facebook-f:before,.phpdebugbar-fa-facebook:before{content:"\f09a"}.phpdebugbar-fa-github:before{content:"\f09b"}.phpdebugbar-fa-unlock:before{content:"\f09c"}.phpdebugbar-fa-credit-card:before{content:"\f09d"}.phpdebugbar-fa-feed:before,.phpdebugbar-fa-rss:before{content:"\f09e"}.phpdebugbar-fa-hdd-o:before{content:"\f0a0"}.phpdebugbar-fa-bullhorn:before{content:"\f0a1"}.phpdebugbar-fa-bell:before{content:"\f0f3"}.phpdebugbar-fa-certificate:before{content:"\f0a3"}.phpdebugbar-fa-hand-o-right:before{content:"\f0a4"}.phpdebugbar-fa-hand-o-left:before{content:"\f0a5"}.phpdebugbar-fa-hand-o-up:before{content:"\f0a6"}.phpdebugbar-fa-hand-o-down:before{content:"\f0a7"}.phpdebugbar-fa-arrow-circle-left:before{content:"\f0a8"}.phpdebugbar-fa-arrow-circle-right:before{content:"\f0a9"}.phpdebugbar-fa-arrow-circle-up:before{content:"\f0aa"}.phpdebugbar-fa-arrow-circle-down:before{content:"\f0ab"}.phpdebugbar-fa-globe:before{content:"\f0ac"}.phpdebugbar-fa-wrench:before{content:"\f0ad"}.phpdebugbar-fa-tasks:before{content:"\f0ae"}.phpdebugbar-fa-filter:before{content:"\f0b0"}.phpdebugbar-fa-briefcase:before{content:"\f0b1"}.phpdebugbar-fa-arrows-alt:before{content:"\f0b2"}.phpdebugbar-fa-group:before,.phpdebugbar-fa-users:before{content:"\f0c0"}.phpdebugbar-fa-chain:before,.phpdebugbar-fa-link:before{content:"\f0c1"}.phpdebugbar-fa-cloud:before{content:"\f0c2"}.phpdebugbar-fa-flask:before{content:"\f0c3"}.phpdebugbar-fa-cut:before,.phpdebugbar-fa-scissors:before{content:"\f0c4"}.phpdebugbar-fa-copy:before,.phpdebugbar-fa-files-o:before{content:"\f0c5"}.phpdebugbar-fa-paperclip:before{content:"\f0c6"}.phpdebugbar-fa-save:before,.phpdebugbar-fa-floppy-o:before{content:"\f0c7"}.phpdebugbar-fa-square:before{content:"\f0c8"}.phpdebugbar-fa-navicon:before,.phpdebugbar-fa-reorder:before,.phpdebugbar-fa-bars:before{content:"\f0c9"}.phpdebugbar-fa-list-ul:before{content:"\f0ca"}.phpdebugbar-fa-list-ol:before{content:"\f0cb"}.phpdebugbar-fa-strikethrough:before{content:"\f0cc"}.phpdebugbar-fa-underline:before{content:"\f0cd"}.phpdebugbar-fa-table:before{content:"\f0ce"}.phpdebugbar-fa-magic:before{content:"\f0d0"}.phpdebugbar-fa-truck:before{content:"\f0d1"}.phpdebugbar-fa-pinterest:before{content:"\f0d2"}.phpdebugbar-fa-pinterest-square:before{content:"\f0d3"}.phpdebugbar-fa-google-plus-square:before{content:"\f0d4"}.phpdebugbar-fa-google-plus:before{content:"\f0d5"}.phpdebugbar-fa-money:before{content:"\f0d6"}.phpdebugbar-fa-caret-down:before{content:"\f0d7"}.phpdebugbar-fa-caret-up:before{content:"\f0d8"}.phpdebugbar-fa-caret-left:before{content:"\f0d9"}.phpdebugbar-fa-caret-right:before{content:"\f0da"}.phpdebugbar-fa-columns:before{content:"\f0db"}.phpdebugbar-fa-unsorted:before,.phpdebugbar-fa-sort:before{content:"\f0dc"}.phpdebugbar-fa-sort-down:before,.phpdebugbar-fa-sort-desc:before{content:"\f0dd"}.phpdebugbar-fa-sort-up:before,.phpdebugbar-fa-sort-asc:before{content:"\f0de"}.phpdebugbar-fa-envelope:before{content:"\f0e0"}.phpdebugbar-fa-linkedin:before{content:"\f0e1"}.phpdebugbar-fa-rotate-left:before,.phpdebugbar-fa-undo:before{content:"\f0e2"}.phpdebugbar-fa-legal:before,.phpdebugbar-fa-gavel:before{content:"\f0e3"}.phpdebugbar-fa-dashboard:before,.phpdebugbar-fa-tachometer:before{content:"\f0e4"}.phpdebugbar-fa-comment-o:before{content:"\f0e5"}.phpdebugbar-fa-comments-o:before{content:"\f0e6"}.phpdebugbar-fa-flash:before,.phpdebugbar-fa-bolt:before{content:"\f0e7"}.phpdebugbar-fa-sitemap:before{content:"\f0e8"}.phpdebugbar-fa-umbrella:before{content:"\f0e9"}.phpdebugbar-fa-paste:before,.phpdebugbar-fa-clipboard:before{content:"\f0ea"}.phpdebugbar-fa-lightbulb-o:before{content:"\f0eb"}.phpdebugbar-fa-exchange:before{content:"\f0ec"}.phpdebugbar-fa-cloud-download:before{content:"\f0ed"}.phpdebugbar-fa-cloud-upload:before{content:"\f0ee"}.phpdebugbar-fa-user-md:before{content:"\f0f0"}.phpdebugbar-fa-stethoscope:before{content:"\f0f1"}.phpdebugbar-fa-suitcase:before{content:"\f0f2"}.phpdebugbar-fa-bell-o:before{content:"\f0a2"}.phpdebugbar-fa-coffee:before{content:"\f0f4"}.phpdebugbar-fa-cutlery:before{content:"\f0f5"}.phpdebugbar-fa-file-text-o:before{content:"\f0f6"}.phpdebugbar-fa-building-o:before{content:"\f0f7"}.phpdebugbar-fa-hospital-o:before{content:"\f0f8"}.phpdebugbar-fa-ambulance:before{content:"\f0f9"}.phpdebugbar-fa-medkit:before{content:"\f0fa"}.phpdebugbar-fa-fighter-jet:before{content:"\f0fb"}.phpdebugbar-fa-beer:before{content:"\f0fc"}.phpdebugbar-fa-h-square:before{content:"\f0fd"}.phpdebugbar-fa-plus-square:before{content:"\f0fe"}.phpdebugbar-fa-angle-double-left:before{content:"\f100"}.phpdebugbar-fa-angle-double-right:before{content:"\f101"}.phpdebugbar-fa-angle-double-up:before{content:"\f102"}.phpdebugbar-fa-angle-double-down:before{content:"\f103"}.phpdebugbar-fa-angle-left:before{content:"\f104"}.phpdebugbar-fa-angle-right:before{content:"\f105"}.phpdebugbar-fa-angle-up:before{content:"\f106"}.phpdebugbar-fa-angle-down:before{content:"\f107"}.phpdebugbar-fa-desktop:before{content:"\f108"}.phpdebugbar-fa-laptop:before{content:"\f109"}.phpdebugbar-fa-tablet:before{content:"\f10a"}.phpdebugbar-fa-mobile-phone:before,.phpdebugbar-fa-mobile:before{content:"\f10b"}.phpdebugbar-fa-circle-o:before{content:"\f10c"}.phpdebugbar-fa-quote-left:before{content:"\f10d"}.phpdebugbar-fa-quote-right:before{content:"\f10e"}.phpdebugbar-fa-spinner:before{content:"\f110"}.phpdebugbar-fa-circle:before{content:"\f111"}.phpdebugbar-fa-mail-reply:before,.phpdebugbar-fa-reply:before{content:"\f112"}.phpdebugbar-fa-github-alt:before{content:"\f113"}.phpdebugbar-fa-folder-o:before{content:"\f114"}.phpdebugbar-fa-folder-open-o:before{content:"\f115"}.phpdebugbar-fa-smile-o:before{content:"\f118"}.phpdebugbar-fa-frown-o:before{content:"\f119"}.phpdebugbar-fa-meh-o:before{content:"\f11a"}.phpdebugbar-fa-gamepad:before{content:"\f11b"}.phpdebugbar-fa-keyboard-o:before{content:"\f11c"}.phpdebugbar-fa-flag-o:before{content:"\f11d"}.phpdebugbar-fa-flag-checkered:before{content:"\f11e"}.phpdebugbar-fa-terminal:before{content:"\f120"}.phpdebugbar-fa-code:before{content:"\f121"}.phpdebugbar-fa-mail-reply-all:before,.phpdebugbar-fa-reply-all:before{content:"\f122"}.phpdebugbar-fa-star-half-empty:before,.phpdebugbar-fa-star-half-full:before,.phpdebugbar-fa-star-half-o:before{content:"\f123"}.phpdebugbar-fa-location-arrow:before{content:"\f124"}.phpdebugbar-fa-crop:before{content:"\f125"}.phpdebugbar-fa-code-fork:before{content:"\f126"}.phpdebugbar-fa-unlink:before,.phpdebugbar-fa-chain-broken:before{content:"\f127"}.phpdebugbar-fa-question:before{content:"\f128"}.phpdebugbar-fa-info:before{content:"\f129"}.phpdebugbar-fa-exclamation:before{content:"\f12a"}.phpdebugbar-fa-superscript:before{content:"\f12b"}.phpdebugbar-fa-subscript:before{content:"\f12c"}.phpdebugbar-fa-eraser:before{content:"\f12d"}.phpdebugbar-fa-puzzle-piece:before{content:"\f12e"}.phpdebugbar-fa-microphone:before{content:"\f130"}.phpdebugbar-fa-microphone-slash:before{content:"\f131"}.phpdebugbar-fa-shield:before{content:"\f132"}.phpdebugbar-fa-calendar-o:before{content:"\f133"}.phpdebugbar-fa-fire-extinguisher:before{content:"\f134"}.phpdebugbar-fa-rocket:before{content:"\f135"}.phpdebugbar-fa-maxcdn:before{content:"\f136"}.phpdebugbar-fa-chevron-circle-left:before{content:"\f137"}.phpdebugbar-fa-chevron-circle-right:before{content:"\f138"}.phpdebugbar-fa-chevron-circle-up:before{content:"\f139"}.phpdebugbar-fa-chevron-circle-down:before{content:"\f13a"}.phpdebugbar-fa-html5:before{content:"\f13b"}.phpdebugbar-fa-css3:before{content:"\f13c"}.phpdebugbar-fa-anchor:before{content:"\f13d"}.phpdebugbar-fa-unlock-alt:before{content:"\f13e"}.phpdebugbar-fa-bullseye:before{content:"\f140"}.phpdebugbar-fa-ellipsis-h:before{content:"\f141"}.phpdebugbar-fa-ellipsis-v:before{content:"\f142"}.phpdebugbar-fa-rss-square:before{content:"\f143"}.phpdebugbar-fa-play-circle:before{content:"\f144"}.phpdebugbar-fa-ticket:before{content:"\f145"}.phpdebugbar-fa-minus-square:before{content:"\f146"}.phpdebugbar-fa-minus-square-o:before{content:"\f147"}.phpdebugbar-fa-level-up:before{content:"\f148"}.phpdebugbar-fa-level-down:before{content:"\f149"}.phpdebugbar-fa-check-square:before{content:"\f14a"}.phpdebugbar-fa-pencil-square:before{content:"\f14b"}.phpdebugbar-fa-external-link-square:before{content:"\f14c"}.phpdebugbar-fa-share-square:before{content:"\f14d"}.phpdebugbar-fa-compass:before{content:"\f14e"}.phpdebugbar-fa-toggle-down:before,.phpdebugbar-fa-caret-square-o-down:before{content:"\f150"}.phpdebugbar-fa-toggle-up:before,.phpdebugbar-fa-caret-square-o-up:before{content:"\f151"}.phpdebugbar-fa-toggle-right:before,.phpdebugbar-fa-caret-square-o-right:before{content:"\f152"}.phpdebugbar-fa-euro:before,.phpdebugbar-fa-eur:before{content:"\f153"}.phpdebugbar-fa-gbp:before{content:"\f154"}.phpdebugbar-fa-dollar:before,.phpdebugbar-fa-usd:before{content:"\f155"}.phpdebugbar-fa-rupee:before,.phpdebugbar-fa-inr:before{content:"\f156"}.phpdebugbar-fa-cny:before,.phpdebugbar-fa-rmb:before,.phpdebugbar-fa-yen:before,.phpdebugbar-fa-jpy:before{content:"\f157"}.phpdebugbar-fa-ruble:before,.phpdebugbar-fa-rouble:before,.phpdebugbar-fa-rub:before{content:"\f158"}.phpdebugbar-fa-won:before,.phpdebugbar-fa-krw:before{content:"\f159"}.phpdebugbar-fa-bitcoin:before,.phpdebugbar-fa-btc:before{content:"\f15a"}.phpdebugbar-fa-file:before{content:"\f15b"}.phpdebugbar-fa-file-text:before{content:"\f15c"}.phpdebugbar-fa-sort-alpha-asc:before{content:"\f15d"}.phpdebugbar-fa-sort-alpha-desc:before{content:"\f15e"}.phpdebugbar-fa-sort-amount-asc:before{content:"\f160"}.phpdebugbar-fa-sort-amount-desc:before{content:"\f161"}.phpdebugbar-fa-sort-numeric-asc:before{content:"\f162"}.phpdebugbar-fa-sort-numeric-desc:before{content:"\f163"}.phpdebugbar-fa-thumbs-up:before{content:"\f164"}.phpdebugbar-fa-thumbs-down:before{content:"\f165"}.phpdebugbar-fa-youtube-square:before{content:"\f166"}.phpdebugbar-fa-youtube:before{content:"\f167"}.phpdebugbar-fa-xing:before{content:"\f168"}.phpdebugbar-fa-xing-square:before{content:"\f169"}.phpdebugbar-fa-youtube-play:before{content:"\f16a"}.phpdebugbar-fa-dropbox:before{content:"\f16b"}.phpdebugbar-fa-stack-overflow:before{content:"\f16c"}.phpdebugbar-fa-instagram:before{content:"\f16d"}.phpdebugbar-fa-flickr:before{content:"\f16e"}.phpdebugbar-fa-adn:before{content:"\f170"}.phpdebugbar-fa-bitbucket:before{content:"\f171"}.phpdebugbar-fa-bitbucket-square:before{content:"\f172"}.phpdebugbar-fa-tumblr:before{content:"\f173"}.phpdebugbar-fa-tumblr-square:before{content:"\f174"}.phpdebugbar-fa-long-arrow-down:before{content:"\f175"}.phpdebugbar-fa-long-arrow-up:before{content:"\f176"}.phpdebugbar-fa-long-arrow-left:before{content:"\f177"}.phpdebugbar-fa-long-arrow-right:before{content:"\f178"}.phpdebugbar-fa-apple:before{content:"\f179"}.phpdebugbar-fa-windows:before{content:"\f17a"}.phpdebugbar-fa-android:before{content:"\f17b"}.phpdebugbar-fa-linux:before{content:"\f17c"}.phpdebugbar-fa-dribbble:before{content:"\f17d"}.phpdebugbar-fa-skype:before{content:"\f17e"}.phpdebugbar-fa-foursquare:before{content:"\f180"}.phpdebugbar-fa-trello:before{content:"\f181"}.phpdebugbar-fa-female:before{content:"\f182"}.phpdebugbar-fa-male:before{content:"\f183"}.phpdebugbar-fa-gittip:before,.phpdebugbar-fa-gratipay:before{content:"\f184"}.phpdebugbar-fa-sun-o:before{content:"\f185"}.phpdebugbar-fa-moon-o:before{content:"\f186"}.phpdebugbar-fa-archive:before{content:"\f187"}.phpdebugbar-fa-bug:before{content:"\f188"}.phpdebugbar-fa-vk:before{content:"\f189"}.phpdebugbar-fa-weibo:before{content:"\f18a"}.phpdebugbar-fa-renren:before{content:"\f18b"}.phpdebugbar-fa-pagelines:before{content:"\f18c"}.phpdebugbar-fa-stack-exchange:before{content:"\f18d"}.phpdebugbar-fa-arrow-circle-o-right:before{content:"\f18e"}.phpdebugbar-fa-arrow-circle-o-left:before{content:"\f190"}.phpdebugbar-fa-toggle-left:before,.phpdebugbar-fa-caret-square-o-left:before{content:"\f191"}.phpdebugbar-fa-dot-circle-o:before{content:"\f192"}.phpdebugbar-fa-wheelchair:before{content:"\f193"}.phpdebugbar-fa-vimeo-square:before{content:"\f194"}.phpdebugbar-fa-turkish-lira:before,.phpdebugbar-fa-try:before{content:"\f195"}.phpdebugbar-fa-plus-square-o:before{content:"\f196"}.phpdebugbar-fa-space-shuttle:before{content:"\f197"}.phpdebugbar-fa-slack:before{content:"\f198"}.phpdebugbar-fa-envelope-square:before{content:"\f199"}.phpdebugbar-fa-wordpress:before{content:"\f19a"}.phpdebugbar-fa-openid:before{content:"\f19b"}.phpdebugbar-fa-institution:before,.phpdebugbar-fa-bank:before,.phpdebugbar-fa-university:before{content:"\f19c"}.phpdebugbar-fa-mortar-board:before,.phpdebugbar-fa-graduation-cap:before{content:"\f19d"}.phpdebugbar-fa-yahoo:before{content:"\f19e"}.phpdebugbar-fa-google:before{content:"\f1a0"}.phpdebugbar-fa-reddit:before{content:"\f1a1"}.phpdebugbar-fa-reddit-square:before{content:"\f1a2"}.phpdebugbar-fa-stumbleupon-circle:before{content:"\f1a3"}.phpdebugbar-fa-stumbleupon:before{content:"\f1a4"}.phpdebugbar-fa-delicious:before{content:"\f1a5"}.phpdebugbar-fa-digg:before{content:"\f1a6"}.phpdebugbar-fa-pied-piper-pp:before{content:"\f1a7"}.phpdebugbar-fa-pied-piper-alt:before{content:"\f1a8"}.phpdebugbar-fa-drupal:before{content:"\f1a9"}.phpdebugbar-fa-joomla:before{content:"\f1aa"}.phpdebugbar-fa-language:before{content:"\f1ab"}.phpdebugbar-fa-fax:before{content:"\f1ac"}.phpdebugbar-fa-building:before{content:"\f1ad"}.phpdebugbar-fa-child:before{content:"\f1ae"}.phpdebugbar-fa-paw:before{content:"\f1b0"}.phpdebugbar-fa-spoon:before{content:"\f1b1"}.phpdebugbar-fa-cube:before{content:"\f1b2"}.phpdebugbar-fa-cubes:before{content:"\f1b3"}.phpdebugbar-fa-behance:before{content:"\f1b4"}.phpdebugbar-fa-behance-square:before{content:"\f1b5"}.phpdebugbar-fa-steam:before{content:"\f1b6"}.phpdebugbar-fa-steam-square:before{content:"\f1b7"}.phpdebugbar-fa-recycle:before{content:"\f1b8"}.phpdebugbar-fa-automobile:before,.phpdebugbar-fa-car:before{content:"\f1b9"}.phpdebugbar-fa-cab:before,.phpdebugbar-fa-taxi:before{content:"\f1ba"}.phpdebugbar-fa-tree:before{content:"\f1bb"}.phpdebugbar-fa-spotify:before{content:"\f1bc"}.phpdebugbar-fa-deviantart:before{content:"\f1bd"}.phpdebugbar-fa-soundcloud:before{content:"\f1be"}.phpdebugbar-fa-database:before{content:"\f1c0"}.phpdebugbar-fa-file-pdf-o:before{content:"\f1c1"}.phpdebugbar-fa-file-word-o:before{content:"\f1c2"}.phpdebugbar-fa-file-excel-o:before{content:"\f1c3"}.phpdebugbar-fa-file-powerpoint-o:before{content:"\f1c4"}.phpdebugbar-fa-file-photo-o:before,.phpdebugbar-fa-file-picture-o:before,.phpdebugbar-fa-file-image-o:before{content:"\f1c5"}.phpdebugbar-fa-file-zip-o:before,.phpdebugbar-fa-file-archive-o:before{content:"\f1c6"}.phpdebugbar-fa-file-sound-o:before,.phpdebugbar-fa-file-audio-o:before{content:"\f1c7"}.phpdebugbar-fa-file-movie-o:before,.phpdebugbar-fa-file-video-o:before{content:"\f1c8"}.phpdebugbar-fa-file-code-o:before{content:"\f1c9"}.phpdebugbar-fa-vine:before{content:"\f1ca"}.phpdebugbar-fa-codepen:before{content:"\f1cb"}.phpdebugbar-fa-jsfiddle:before{content:"\f1cc"}.phpdebugbar-fa-life-bouy:before,.phpdebugbar-fa-life-buoy:before,.phpdebugbar-fa-life-saver:before,.phpdebugbar-fa-support:before,.phpdebugbar-fa-life-ring:before{content:"\f1cd"}.phpdebugbar-fa-circle-o-notch:before{content:"\f1ce"}.phpdebugbar-fa-ra:before,.phpdebugbar-fa-resistance:before,.phpdebugbar-fa-rebel:before{content:"\f1d0"}.phpdebugbar-fa-ge:before,.phpdebugbar-fa-empire:before{content:"\f1d1"}.phpdebugbar-fa-git-square:before{content:"\f1d2"}.phpdebugbar-fa-git:before{content:"\f1d3"}.phpdebugbar-fa-y-combinator-square:before,.phpdebugbar-fa-yc-square:before,.phpdebugbar-fa-hacker-news:before{content:"\f1d4"}.phpdebugbar-fa-tencent-weibo:before{content:"\f1d5"}.phpdebugbar-fa-qq:before{content:"\f1d6"}.phpdebugbar-fa-wechat:before,.phpdebugbar-fa-weixin:before{content:"\f1d7"}.phpdebugbar-fa-send:before,.phpdebugbar-fa-paper-plane:before{content:"\f1d8"}.phpdebugbar-fa-send-o:before,.phpdebugbar-fa-paper-plane-o:before{content:"\f1d9"}.phpdebugbar-fa-history:before{content:"\f1da"}.phpdebugbar-fa-circle-thin:before{content:"\f1db"}.phpdebugbar-fa-header:before{content:"\f1dc"}.phpdebugbar-fa-paragraph:before{content:"\f1dd"}.phpdebugbar-fa-sliders:before{content:"\f1de"}.phpdebugbar-fa-share-alt:before{content:"\f1e0"}.phpdebugbar-fa-share-alt-square:before{content:"\f1e1"}.phpdebugbar-fa-bomb:before{content:"\f1e2"}.phpdebugbar-fa-soccer-ball-o:before,.phpdebugbar-fa-futbol-o:before{content:"\f1e3"}.phpdebugbar-fa-tty:before{content:"\f1e4"}.phpdebugbar-fa-binoculars:before{content:"\f1e5"}.phpdebugbar-fa-plug:before{content:"\f1e6"}.phpdebugbar-fa-slideshare:before{content:"\f1e7"}.phpdebugbar-fa-twitch:before{content:"\f1e8"}.phpdebugbar-fa-yelp:before{content:"\f1e9"}.phpdebugbar-fa-newspaper-o:before{content:"\f1ea"}.phpdebugbar-fa-wifi:before{content:"\f1eb"}.phpdebugbar-fa-calculator:before{content:"\f1ec"}.phpdebugbar-fa-paypal:before{content:"\f1ed"}.phpdebugbar-fa-google-wallet:before{content:"\f1ee"}.phpdebugbar-fa-cc-visa:before{content:"\f1f0"}.phpdebugbar-fa-cc-mastercard:before{content:"\f1f1"}.phpdebugbar-fa-cc-discover:before{content:"\f1f2"}.phpdebugbar-fa-cc-amex:before{content:"\f1f3"}.phpdebugbar-fa-cc-paypal:before{content:"\f1f4"}.phpdebugbar-fa-cc-stripe:before{content:"\f1f5"}.phpdebugbar-fa-bell-slash:before{content:"\f1f6"}.phpdebugbar-fa-bell-slash-o:before{content:"\f1f7"}.phpdebugbar-fa-trash:before{content:"\f1f8"}.phpdebugbar-fa-copyright:before{content:"\f1f9"}.phpdebugbar-fa-at:before{content:"\f1fa"}.phpdebugbar-fa-eyedropper:before{content:"\f1fb"}.phpdebugbar-fa-paint-brush:before{content:"\f1fc"}.phpdebugbar-fa-birthday-cake:before{content:"\f1fd"}.phpdebugbar-fa-area-chart:before{content:"\f1fe"}.phpdebugbar-fa-pie-chart:before{content:"\f200"}.phpdebugbar-fa-line-chart:before{content:"\f201"}.phpdebugbar-fa-lastfm:before{content:"\f202"}.phpdebugbar-fa-lastfm-square:before{content:"\f203"}.phpdebugbar-fa-toggle-off:before{content:"\f204"}.phpdebugbar-fa-toggle-on:before{content:"\f205"}.phpdebugbar-fa-bicycle:before{content:"\f206"}.phpdebugbar-fa-bus:before{content:"\f207"}.phpdebugbar-fa-ioxhost:before{content:"\f208"}.phpdebugbar-fa-angellist:before{content:"\f209"}.phpdebugbar-fa-cc:before{content:"\f20a"}.phpdebugbar-fa-shekel:before,.phpdebugbar-fa-sheqel:before,.phpdebugbar-fa-ils:before{content:"\f20b"}.phpdebugbar-fa-meanpath:before{content:"\f20c"}.phpdebugbar-fa-buysellads:before{content:"\f20d"}.phpdebugbar-fa-connectdevelop:before{content:"\f20e"}.phpdebugbar-fa-dashcube:before{content:"\f210"}.phpdebugbar-fa-forumbee:before{content:"\f211"}.phpdebugbar-fa-leanpub:before{content:"\f212"}.phpdebugbar-fa-sellsy:before{content:"\f213"}.phpdebugbar-fa-shirtsinbulk:before{content:"\f214"}.phpdebugbar-fa-simplybuilt:before{content:"\f215"}.phpdebugbar-fa-skyatlas:before{content:"\f216"}.phpdebugbar-fa-cart-plus:before{content:"\f217"}.phpdebugbar-fa-cart-arrow-down:before{content:"\f218"}.phpdebugbar-fa-diamond:before{content:"\f219"}.phpdebugbar-fa-ship:before{content:"\f21a"}.phpdebugbar-fa-user-secret:before{content:"\f21b"}.phpdebugbar-fa-motorcycle:before{content:"\f21c"}.phpdebugbar-fa-street-view:before{content:"\f21d"}.phpdebugbar-fa-heartbeat:before{content:"\f21e"}.phpdebugbar-fa-venus:before{content:"\f221"}.phpdebugbar-fa-mars:before{content:"\f222"}.phpdebugbar-fa-mercury:before{content:"\f223"}.phpdebugbar-fa-intersex:before,.phpdebugbar-fa-transgender:before{content:"\f224"}.phpdebugbar-fa-transgender-alt:before{content:"\f225"}.phpdebugbar-fa-venus-double:before{content:"\f226"}.phpdebugbar-fa-mars-double:before{content:"\f227"}.phpdebugbar-fa-venus-mars:before{content:"\f228"}.phpdebugbar-fa-mars-stroke:before{content:"\f229"}.phpdebugbar-fa-mars-stroke-v:before{content:"\f22a"}.phpdebugbar-fa-mars-stroke-h:before{content:"\f22b"}.phpdebugbar-fa-neuter:before{content:"\f22c"}.phpdebugbar-fa-genderless:before{content:"\f22d"}.phpdebugbar-fa-facebook-official:before{content:"\f230"}.phpdebugbar-fa-pinterest-p:before{content:"\f231"}.phpdebugbar-fa-whatsapp:before{content:"\f232"}.phpdebugbar-fa-server:before{content:"\f233"}.phpdebugbar-fa-user-plus:before{content:"\f234"}.phpdebugbar-fa-user-times:before{content:"\f235"}.phpdebugbar-fa-hotel:before,.phpdebugbar-fa-bed:before{content:"\f236"}.phpdebugbar-fa-viacoin:before{content:"\f237"}.phpdebugbar-fa-train:before{content:"\f238"}.phpdebugbar-fa-subway:before{content:"\f239"}.phpdebugbar-fa-medium:before{content:"\f23a"}.phpdebugbar-fa-yc:before,.phpdebugbar-fa-y-combinator:before{content:"\f23b"}.phpdebugbar-fa-optin-monster:before{content:"\f23c"}.phpdebugbar-fa-opencart:before{content:"\f23d"}.phpdebugbar-fa-expeditedssl:before{content:"\f23e"}.phpdebugbar-fa-battery-4:before,.phpdebugbar-fa-battery:before,.phpdebugbar-fa-battery-full:before{content:"\f240"}.phpdebugbar-fa-battery-3:before,.phpdebugbar-fa-battery-three-quarters:before{content:"\f241"}.phpdebugbar-fa-battery-2:before,.phpdebugbar-fa-battery-half:before{content:"\f242"}.phpdebugbar-fa-battery-1:before,.phpdebugbar-fa-battery-quarter:before{content:"\f243"}.phpdebugbar-fa-battery-0:before,.phpdebugbar-fa-battery-empty:before{content:"\f244"}.phpdebugbar-fa-mouse-pointer:before{content:"\f245"}.phpdebugbar-fa-i-cursor:before{content:"\f246"}.phpdebugbar-fa-object-group:before{content:"\f247"}.phpdebugbar-fa-object-ungroup:before{content:"\f248"}.phpdebugbar-fa-sticky-note:before{content:"\f249"}.phpdebugbar-fa-sticky-note-o:before{content:"\f24a"}.phpdebugbar-fa-cc-jcb:before{content:"\f24b"}.phpdebugbar-fa-cc-diners-club:before{content:"\f24c"}.phpdebugbar-fa-clone:before{content:"\f24d"}.phpdebugbar-fa-balance-scale:before{content:"\f24e"}.phpdebugbar-fa-hourglass-o:before{content:"\f250"}.phpdebugbar-fa-hourglass-1:before,.phpdebugbar-fa-hourglass-start:before{content:"\f251"}.phpdebugbar-fa-hourglass-2:before,.phpdebugbar-fa-hourglass-half:before{content:"\f252"}.phpdebugbar-fa-hourglass-3:before,.phpdebugbar-fa-hourglass-end:before{content:"\f253"}.phpdebugbar-fa-hourglass:before{content:"\f254"}.phpdebugbar-fa-hand-grab-o:before,.phpdebugbar-fa-hand-rock-o:before{content:"\f255"}.phpdebugbar-fa-hand-stop-o:before,.phpdebugbar-fa-hand-paper-o:before{content:"\f256"}.phpdebugbar-fa-hand-scissors-o:before{content:"\f257"}.phpdebugbar-fa-hand-lizard-o:before{content:"\f258"}.phpdebugbar-fa-hand-spock-o:before{content:"\f259"}.phpdebugbar-fa-hand-pointer-o:before{content:"\f25a"}.phpdebugbar-fa-hand-peace-o:before{content:"\f25b"}.phpdebugbar-fa-trademark:before{content:"\f25c"}.phpdebugbar-fa-registered:before{content:"\f25d"}.phpdebugbar-fa-creative-commons:before{content:"\f25e"}.phpdebugbar-fa-gg:before{content:"\f260"}.phpdebugbar-fa-gg-circle:before{content:"\f261"}.phpdebugbar-fa-tripadvisor:before{content:"\f262"}.phpdebugbar-fa-odnoklassniki:before{content:"\f263"}.phpdebugbar-fa-odnoklassniki-square:before{content:"\f264"}.phpdebugbar-fa-get-pocket:before{content:"\f265"}.phpdebugbar-fa-wikipedia-w:before{content:"\f266"}.phpdebugbar-fa-safari:before{content:"\f267"}.phpdebugbar-fa-chrome:before{content:"\f268"}.phpdebugbar-fa-firefox:before{content:"\f269"}.phpdebugbar-fa-opera:before{content:"\f26a"}.phpdebugbar-fa-internet-explorer:before{content:"\f26b"}.phpdebugbar-fa-tv:before,.phpdebugbar-fa-television:before{content:"\f26c"}.phpdebugbar-fa-contao:before{content:"\f26d"}.phpdebugbar-fa-500px:before{content:"\f26e"}.phpdebugbar-fa-amazon:before{content:"\f270"}.phpdebugbar-fa-calendar-plus-o:before{content:"\f271"}.phpdebugbar-fa-calendar-minus-o:before{content:"\f272"}.phpdebugbar-fa-calendar-times-o:before{content:"\f273"}.phpdebugbar-fa-calendar-check-o:before{content:"\f274"}.phpdebugbar-fa-industry:before{content:"\f275"}.phpdebugbar-fa-map-pin:before{content:"\f276"}.phpdebugbar-fa-map-signs:before{content:"\f277"}.phpdebugbar-fa-map-o:before{content:"\f278"}.phpdebugbar-fa-map:before{content:"\f279"}.phpdebugbar-fa-commenting:before{content:"\f27a"}.phpdebugbar-fa-commenting-o:before{content:"\f27b"}.phpdebugbar-fa-houzz:before{content:"\f27c"}.phpdebugbar-fa-vimeo:before{content:"\f27d"}.phpdebugbar-fa-black-tie:before{content:"\f27e"}.phpdebugbar-fa-fonticons:before{content:"\f280"}.phpdebugbar-fa-reddit-alien:before{content:"\f281"}.phpdebugbar-fa-edge:before{content:"\f282"}.phpdebugbar-fa-credit-card-alt:before{content:"\f283"}.phpdebugbar-fa-codiepie:before{content:"\f284"}.phpdebugbar-fa-modx:before{content:"\f285"}.phpdebugbar-fa-fort-awesome:before{content:"\f286"}.phpdebugbar-fa-usb:before{content:"\f287"}.phpdebugbar-fa-product-hunt:before{content:"\f288"}.phpdebugbar-fa-mixcloud:before{content:"\f289"}.phpdebugbar-fa-scribd:before{content:"\f28a"}.phpdebugbar-fa-pause-circle:before{content:"\f28b"}.phpdebugbar-fa-pause-circle-o:before{content:"\f28c"}.phpdebugbar-fa-stop-circle:before{content:"\f28d"}.phpdebugbar-fa-stop-circle-o:before{content:"\f28e"}.phpdebugbar-fa-shopping-bag:before{content:"\f290"}.phpdebugbar-fa-shopping-basket:before{content:"\f291"}.phpdebugbar-fa-hashtag:before{content:"\f292"}.phpdebugbar-fa-bluetooth:before{content:"\f293"}.phpdebugbar-fa-bluetooth-b:before{content:"\f294"}.phpdebugbar-fa-percent:before{content:"\f295"}.phpdebugbar-fa-gitlab:before{content:"\f296"}.phpdebugbar-fa-wpbeginner:before{content:"\f297"}.phpdebugbar-fa-wpforms:before{content:"\f298"}.phpdebugbar-fa-envira:before{content:"\f299"}.phpdebugbar-fa-universal-access:before{content:"\f29a"}.phpdebugbar-fa-wheelchair-alt:before{content:"\f29b"}.phpdebugbar-fa-question-circle-o:before{content:"\f29c"}.phpdebugbar-fa-blind:before{content:"\f29d"}.phpdebugbar-fa-audio-description:before{content:"\f29e"}.phpdebugbar-fa-volume-control-phone:before{content:"\f2a0"}.phpdebugbar-fa-braille:before{content:"\f2a1"}.phpdebugbar-fa-assistive-listening-systems:before{content:"\f2a2"}.phpdebugbar-fa-asl-interpreting:before,.phpdebugbar-fa-american-sign-language-interpreting:before{content:"\f2a3"}.phpdebugbar-fa-deafness:before,.phpdebugbar-fa-hard-of-hearing:before,.phpdebugbar-fa-deaf:before{content:"\f2a4"}.phpdebugbar-fa-glide:before{content:"\f2a5"}.phpdebugbar-fa-glide-g:before{content:"\f2a6"}.phpdebugbar-fa-signing:before,.phpdebugbar-fa-sign-language:before{content:"\f2a7"}.phpdebugbar-fa-low-vision:before{content:"\f2a8"}.phpdebugbar-fa-viadeo:before{content:"\f2a9"}.phpdebugbar-fa-viadeo-square:before{content:"\f2aa"}.phpdebugbar-fa-snapchat:before{content:"\f2ab"}.phpdebugbar-fa-snapchat-ghost:before{content:"\f2ac"}.phpdebugbar-fa-snapchat-square:before{content:"\f2ad"}.phpdebugbar-fa-pied-piper:before{content:"\f2ae"}.phpdebugbar-fa-first-order:before{content:"\f2b0"}.phpdebugbar-fa-yoast:before{content:"\f2b1"}.phpdebugbar-fa-themeisle:before{content:"\f2b2"}.phpdebugbar-fa-google-plus-circle:before,.phpdebugbar-fa-google-plus-official:before{content:"\f2b3"}.phpdebugbar-fa-fa:before,.phpdebugbar-fa-font-awesome:before{content:"\f2b4"}.phpdebugbar-fa-handshake-o:before{content:"\f2b5"}.phpdebugbar-fa-envelope-open:before{content:"\f2b6"}.phpdebugbar-fa-envelope-open-o:before{content:"\f2b7"}.phpdebugbar-fa-linode:before{content:"\f2b8"}.phpdebugbar-fa-address-book:before{content:"\f2b9"}.phpdebugbar-fa-address-book-o:before{content:"\f2ba"}.phpdebugbar-fa-vcard:before,.phpdebugbar-fa-address-card:before{content:"\f2bb"}.phpdebugbar-fa-vcard-o:before,.phpdebugbar-fa-address-card-o:before{content:"\f2bc"}.phpdebugbar-fa-user-circle:before{content:"\f2bd"}.phpdebugbar-fa-user-circle-o:before{content:"\f2be"}.phpdebugbar-fa-user-o:before{content:"\f2c0"}.phpdebugbar-fa-id-badge:before{content:"\f2c1"}.phpdebugbar-fa-drivers-license:before,.phpdebugbar-fa-id-card:before{content:"\f2c2"}.phpdebugbar-fa-drivers-license-o:before,.phpdebugbar-fa-id-card-o:before{content:"\f2c3"}.phpdebugbar-fa-quora:before{content:"\f2c4"}.phpdebugbar-fa-free-code-camp:before{content:"\f2c5"}.phpdebugbar-fa-telegram:before{content:"\f2c6"}.phpdebugbar-fa-thermometer-4:before,.phpdebugbar-fa-thermometer:before,.phpdebugbar-fa-thermometer-full:before{content:"\f2c7"}.phpdebugbar-fa-thermometer-3:before,.phpdebugbar-fa-thermometer-three-quarters:before{content:"\f2c8"}.phpdebugbar-fa-thermometer-2:before,.phpdebugbar-fa-thermometer-half:before{content:"\f2c9"}.phpdebugbar-fa-thermometer-1:before,.phpdebugbar-fa-thermometer-quarter:before{content:"\f2ca"}.phpdebugbar-fa-thermometer-0:before,.phpdebugbar-fa-thermometer-empty:before{content:"\f2cb"}.phpdebugbar-fa-shower:before{content:"\f2cc"}.phpdebugbar-fa-bathtub:before,.phpdebugbar-fa-s15:before,.phpdebugbar-fa-bath:before{content:"\f2cd"}.phpdebugbar-fa-podcast:before{content:"\f2ce"}.phpdebugbar-fa-window-maximize:before{content:"\f2d0"}.phpdebugbar-fa-window-minimize:before{content:"\f2d1"}.phpdebugbar-fa-window-restore:before{content:"\f2d2"}.phpdebugbar-fa-times-rectangle:before,.phpdebugbar-fa-window-close:before{content:"\f2d3"}.phpdebugbar-fa-times-rectangle-o:before,.phpdebugbar-fa-window-close-o:before{content:"\f2d4"}.phpdebugbar-fa-bandcamp:before{content:"\f2d5"}.phpdebugbar-fa-grav:before{content:"\f2d6"}.phpdebugbar-fa-etsy:before{content:"\f2d7"}.phpdebugbar-fa-imdb:before{content:"\f2d8"}.phpdebugbar-fa-ravelry:before{content:"\f2d9"}.phpdebugbar-fa-eercast:before{content:"\f2da"}.phpdebugbar-fa-microchip:before{content:"\f2db"}.phpdebugbar-fa-snowflake-o:before{content:"\f2dc"}.phpdebugbar-fa-superpowers:before{content:"\f2dd"}.phpdebugbar-fa-wpexplorer:before{content:"\f2de"}.phpdebugbar-fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/FontAwesome.otf b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/FontAwesome.otf new file mode 100644 index 00000000000..401ec0f36e4 Binary files /dev/null and b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/FontAwesome.otf differ diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.eot b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.eot new file mode 100644 index 00000000000..e9f60ca953f Binary files /dev/null and b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.eot differ diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.svg b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.svg new file mode 100644 index 00000000000..855c845e538 --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.ttf b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.ttf new file mode 100644 index 00000000000..35acda2fa11 Binary files /dev/null and b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.ttf differ diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff new file mode 100644 index 00000000000..400014a4b06 Binary files /dev/null and b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff differ diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff2 b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff2 new file mode 100644 index 00000000000..4d13fc60404 Binary files /dev/null and b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/font-awesome/fonts/fontawesome-webfont.woff2 differ diff --git a/htdocs/includes/DebugBar/Resources/vendor/highlightjs/highlight.pack.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/highlight.pack.js similarity index 100% rename from htdocs/includes/DebugBar/Resources/vendor/highlightjs/highlight.pack.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/highlight.pack.js diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/styles/github.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/styles/github.css new file mode 100644 index 00000000000..b1efcdb2480 --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/highlightjs/styles/github.css @@ -0,0 +1,125 @@ +/* + +github.com style (c) Vasily Polovnyov + +*/ + +div.phpdebugbar .hljs { + display: block; padding: 0.5em; + color: #333; + background: #f8f8f8 +} + +div.phpdebugbar .hljs-comment, +div.phpdebugbar .hljs-template_comment, +div.phpdebugbar .diff .hljs-header, +div.phpdebugbar .hljs-javadoc { + color: #998; + font-style: italic +} + +div.phpdebugbar .hljs-keyword, +div.phpdebugbar .css .rule .hljs-keyword, +div.phpdebugbar .hljs-winutils, +div.phpdebugbar .javascript .hljs-title, +div.phpdebugbar .nginx .hljs-title, +div.phpdebugbar .hljs-subst, +div.phpdebugbar .hljs-request, +div.phpdebugbar .hljs-status { + color: #333; + font-weight: bold +} + +div.phpdebugbar .hljs-number, +div.phpdebugbar .hljs-hexcolor, +div.phpdebugbar .ruby .hljs-constant { + color: #099; +} + +div.phpdebugbar .hljs-string, +div.phpdebugbar .hljs-tag .hljs-value, +div.phpdebugbar .hljs-phpdoc, +div.phpdebugbar .tex .hljs-formula { + color: #d14 +} + +div.phpdebugbar .hljs-title, +div.phpdebugbar .hljs-id, +div.phpdebugbar .coffeescript .hljs-params, +div.phpdebugbar .scss .hljs-preprocessor { + color: #900; + font-weight: bold +} + +div.phpdebugbar .javascript .hljs-title, +div.phpdebugbar .lisp .hljs-title, +div.phpdebugbar .clojure .hljs-title, +div.phpdebugbar .hljs-subst { + font-weight: normal +} + +div.phpdebugbar .hljs-class .hljs-title, +div.phpdebugbar .haskell .hljs-type, +div.phpdebugbar .vhdl .hljs-literal, +div.phpdebugbar .tex .hljs-command { + color: #458; + font-weight: bold +} + +div.phpdebugbar .hljs-tag, +div.phpdebugbar .hljs-tag .hljs-title, +div.phpdebugbar .hljs-rules .hljs-property, +div.phpdebugbar .django .hljs-tag .hljs-keyword { + color: #000080; + font-weight: normal +} + +div.phpdebugbar .hljs-attribute, +div.phpdebugbar .hljs-variable, +div.phpdebugbar .lisp .hljs-body { + color: #008080 +} + +div.phpdebugbar .hljs-regexp { + color: #009926 +} + +div.phpdebugbar .hljs-symbol, +div.phpdebugbar .ruby .hljs-symbol .hljs-string, +div.phpdebugbar .lisp .hljs-keyword, +div.phpdebugbar .tex .hljs-special, +div.phpdebugbar .hljs-prompt { + color: #990073 +} + +div.phpdebugbar .hljs-built_in, +div.phpdebugbar .lisp .hljs-title, +div.phpdebugbar .clojure .hljs-built_in { + color: #0086b3 +} + +div.phpdebugbar .hljs-preprocessor, +div.phpdebugbar .hljs-pragma, +div.phpdebugbar .hljs-pi, +div.phpdebugbar .hljs-doctype, +div.phpdebugbar .hljs-shebang, +div.phpdebugbar .hljs-cdata { + color: #999; + font-weight: bold +} + +div.phpdebugbar .hljs-deletion { + background: #fdd +} + +div.phpdebugbar .hljs-addition { + background: #dfd +} + +div.phpdebugbar .diff .hljs-change { + background: #0086b3 +} + +div.phpdebugbar .hljs-chunk { + color: #aaa +} diff --git a/htdocs/includes/DebugBar/Resources/vendor/jquery/dist/jquery.min.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/jquery/dist/jquery.min.js similarity index 100% rename from htdocs/includes/DebugBar/Resources/vendor/jquery/dist/jquery.min.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/vendor/jquery/dist/jquery.min.js diff --git a/htdocs/includes/DebugBar/Resources/widgets.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets.css similarity index 84% rename from htdocs/includes/DebugBar/Resources/widgets.css rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets.css index e8ad62ec475..b4d7b08727e 100644 --- a/htdocs/includes/DebugBar/Resources/widgets.css +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets.css @@ -28,13 +28,14 @@ pre.phpdebugbar-widgets-code-block { border-right: 1px solid #aaa; text-align: right; } + /* -------------------------------------- */ ul.phpdebugbar-widgets-list { margin: 0; padding: 0; list-style: none; - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; } ul.phpdebugbar-widgets-list li.phpdebugbar-widgets-list-item { padding: 3px 6px; @@ -56,7 +57,7 @@ div.phpdebugbar-widgets-messages { padding-bottom: 20px; } div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before { - font-family: FontAwesome; + font-family: PhpDebugbarFontAwesome; content: "\f071"; margin-right: 8px; font-size: 11px; @@ -66,12 +67,15 @@ div.phpdebugbar-widgets-messages { color: red; } div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error:before { - font-family: FontAwesome; + font-family: PhpDebugbarFontAwesome; content: "\f057"; margin-right: 8px; font-size: 11px; color: red; } + div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item pre.sf-dump { + display: inline; + } div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-collector, div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-label { float: right; @@ -93,9 +97,6 @@ div.phpdebugbar-widgets-messages { bottom: 0; width: 100%; background: #fff; - } - div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar i.fa-search { - margin-left: 7px; } div.phpdebugbar-widgets-messages div.phpdebugbar-widgets-toolbar input { border: 0; @@ -111,7 +112,7 @@ div.phpdebugbar-widgets-messages { float: right; font-size: 12px; padding: 2px 4px; - background: #3d6c99; + background: #7cacd5; margin: 0 2px; border-radius: 4px; color: #fff; @@ -148,9 +149,13 @@ dl.phpdebugbar-widgets-kvlist { /* -------------------------------------- */ -dl.phpdebugbar-widgets-varlist { - font-family: monospace; +dl.phpdebugbar-widgets-varlist, +dl.phpdebugbar-widgets-htmlvarlist { + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; } + dl.phpdebugbar-widgets-htmlvarlist dd { + cursor: initial; + } /* -------------------------------------- */ @@ -172,20 +177,21 @@ ul.phpdebugbar-widgets-timeline { ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-collector { position: absolute; font-size: 12px; - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; color: #555; top: 4px; left: 5px; background: none; text-shadow: none; font-weight: normal; + white-space: pre; } ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-collector { left: initial; right: 5px; } ul.phpdebugbar-widgets-timeline li span.phpdebugbar-widgets-value { - display: block; + display: block; position: absolute; height: 10px; background: #3db9ec; @@ -198,7 +204,7 @@ ul.phpdebugbar-widgets-timeline { width: 70%; margin: 10px; border: 1px solid #ddd; - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; border-collapse: collapse; } ul.phpdebugbar-widgets-timeline table.phpdebugbar-widgets-params td { @@ -239,5 +245,17 @@ div.phpdebugbar-widgets-exceptions li.phpdebugbar-widgets-list-item { margin: 10px; padding: 5px; border: 1px solid #ddd; - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; } + +div.phpdebugbar-widgets-exceptions a.phpdebugbar-widgets-editor-link:before { + font-family: PhpDebugbarFontAwesome; + margin-right: 4px; + font-size: 12px; + font-style: normal; +} + +div.phpdebugbar-widgets-exceptions a.phpdebugbar-widgets-editor-link:before { + content: "\f08e"; + margin-left: 4px; +} diff --git a/htdocs/includes/DebugBar/Resources/widgets.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets.js similarity index 76% rename from htdocs/includes/DebugBar/Resources/widgets.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets.js index 025a9618b74..b4a583dfc52 100644 --- a/htdocs/includes/DebugBar/Resources/widgets.js +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets.js @@ -65,7 +65,7 @@ if (typeof(PhpDebugBar) == 'undefined') { return code; }; - /** + /** * Creates a
 element with a block of code
      *
      * @param  {String} code
@@ -118,7 +118,6 @@ if (typeof(PhpDebugBar) == 'undefined') {
         return pre;
     };
 
-
     // ------------------------------------------------------------------
     // Generic widgets
     // ------------------------------------------------------------------
@@ -250,7 +249,28 @@ if (typeof(PhpDebugBar) == 'undefined') {
     });
 
     // ------------------------------------------------------------------
-    
+
+    /**
+     * An extension of KVListWidget where the data represents a list
+     * of variables whose contents are HTML; this is useful for showing
+     * variable output from VarDumper's HtmlDumper.
+     *
+     * Options:
+     *  - data
+     */
+    var HtmlVariableListWidget = PhpDebugBar.Widgets.HtmlVariableListWidget = KVListWidget.extend({
+
+        className: csscls('kvlist htmlvarlist'),
+
+        itemRenderer: function(dt, dd, key, value) {
+            $('').attr('title', key).text(key).appendTo(dt);
+            dd.html(value);
+        }
+
+    });
+
+    // ------------------------------------------------------------------
+
     /**
      * Iframe widget
      *
@@ -296,38 +316,42 @@ if (typeof(PhpDebugBar) == 'undefined') {
             var self = this;
 
             this.$list = new ListWidget({ itemRenderer: function(li, value) {
-                var m = value.message;
-                if (m.length > 100) {
-                    m = m.substr(0, 100) + "...";
-                }
-
-                var val = $('').addClass(csscls('value')).text(m).appendTo(li);
-                if (!value.is_string || value.message.length > 100) {
-                    var prettyVal = value.message;
-                    if (!value.is_string) {
-                        prettyVal = null;
+                if (value.message_html) {
+                    var val = $('').addClass(csscls('value')).html(value.message_html).appendTo(li);
+                } else {
+                    var m = value.message;
+                    if (m.length > 100) {
+                        m = m.substr(0, 100) + "...";
                     }
-                    li.css('cursor', 'pointer').click(function() {
-                        if (val.hasClass(csscls('pretty'))) {
-                            val.text(m).removeClass(csscls('pretty'));
-                        } else {
-                            prettyVal = prettyVal || createCodeBlock(value.message, 'php');
-                            val.addClass(csscls('pretty')).empty().append(prettyVal);
+
+                    var val = $('').addClass(csscls('value')).text(m).appendTo(li);
+                    if (!value.is_string || value.message.length > 100) {
+                        var prettyVal = value.message;
+                        if (!value.is_string) {
+                            prettyVal = null;
                         }
-                    });
+                        li.css('cursor', 'pointer').click(function () {
+                            if (val.hasClass(csscls('pretty'))) {
+                                val.text(m).removeClass(csscls('pretty'));
+                            } else {
+                                prettyVal = prettyVal || createCodeBlock(value.message, 'php');
+                                val.addClass(csscls('pretty')).empty().append(prettyVal);
+                            }
+                        });
+                    }
                 }
 
+                if (value.collector) {
+                    $('').addClass(csscls('collector')).text(value.collector).prependTo(li);
+                }
                 if (value.label) {
                     val.addClass(csscls(value.label));
-                    $('').addClass(csscls('label')).text(value.label).appendTo(li);
-                }
-                if (value.collector) {
-                    $('').addClass(csscls('collector')).text(value.collector).appendTo(li);
+                    $('').addClass(csscls('label')).text(value.label).prependTo(li);
                 }
             }});
 
             this.$list.$el.appendTo(this.$el);
-            this.$toolbar = $('
').addClass(csscls('toolbar')).appendTo(this.$el); + this.$toolbar = $('
').addClass(csscls('toolbar')).appendTo(this.$el); $('') .on('change', function() { self.set('search', this.value); }) @@ -404,10 +428,29 @@ if (typeof(PhpDebugBar) == 'undefined') { render: function() { this.bindAttr('data', function(data) { + + // ported from php DataFormatter + var formatDuration = function(seconds) { + if (seconds < 0.001) + return (seconds * 1000000).toFixed() + 'μs'; + else if (seconds < 1) + return (seconds * 1000).toFixed(2) + 'ms'; + return (seconds).toFixed(2) + 's'; + }; + this.$el.empty(); if (data.measures) { + var aggregate = {}; + for (var i = 0; i < data.measures.length; i++) { var measure = data.measures[i]; + + if(!aggregate[measure.label]) + aggregate[measure.label] = { count: 0, duration: 0 }; + + aggregate[measure.label]['count'] += 1; + aggregate[measure.label]['duration'] += measure.duration; + var m = $('
').addClass(csscls('measure')), li = $('
  • '), left = (measure.relative_start * 100 / data.duration).toFixed(2), @@ -444,6 +487,30 @@ if (typeof(PhpDebugBar) == 'undefined') { }); } } + + // convert to array and sort by duration + aggregate = $.map(aggregate, function(data, label) { + return { + label: label, + data: data + } + }).sort(function(a, b) { + return b.data.duration - a.data.duration + }); + + // build table and add + var aggregateTable = $('
    ').addClass(csscls('params')); + $.each(aggregate, function(i, aggregate) { + width = Math.min((aggregate.data.duration * 100 / data.duration).toFixed(2), 100); + + aggregateTable.append('' + aggregate.data.count + ' x ' + aggregate.label + ' (' + width + '%)' + + '
    ' + + '' + + '' + formatDuration(aggregate.data.duration) + '' + + '
    '); + }); + + this.$el.append('
  • ').find('li:last').append(aggregateTable); } }); } @@ -466,7 +533,17 @@ if (typeof(PhpDebugBar) == 'undefined') { this.$list = new ListWidget({ itemRenderer: function(li, e) { $('').addClass(csscls('message')).text(e.message).appendTo(li); if (e.file) { - $('').addClass(csscls('filename')).text(e.file + "#" + e.line).appendTo(li); + var header = $('').addClass(csscls('filename')).text(e.file + "#" + e.line); + if (e.xdebug_link) { + if (e.xdebug_link.ajax) { + $('').on('click', function () { + $.ajax(e.xdebug_link.url); + }).addClass(csscls('editor-link')).appendTo(header); + } else { + $('').addClass(csscls('editor-link')).appendTo(header); + } + } + header.appendTo(li); } if (e.type) { $('').addClass(csscls('type')).text(e.type).appendTo(li); @@ -481,6 +558,13 @@ if (typeof(PhpDebugBar) == 'undefined') { } }); } + if (e.stack_trace) { + e.stack_trace.split("\n").forEach(function(trace) { + var $traceLine = $('
    '); + $('').addClass(csscls('filename')).text(trace).appendTo($traceLine); + $traceLine.appendTo(li); + }); + } }}); this.$list.$el.appendTo(this.$el); diff --git a/htdocs/includes/DebugBar/Resources/widgets/mails/widget.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.css similarity index 74% rename from htdocs/includes/DebugBar/Resources/widgets/mails/widget.css rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.css index a43957a60ce..8e91858be63 100644 --- a/htdocs/includes/DebugBar/Resources/widgets/mails/widget.css +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.css @@ -8,5 +8,5 @@ div.phpdebugbar-widgets-mails li.phpdebugbar-widgets-list-item pre.phpdebugbar-w margin: 10px; padding: 5px; border: 1px solid #ddd; - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; } diff --git a/htdocs/includes/DebugBar/Resources/widgets/mails/widget.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.js similarity index 100% rename from htdocs/includes/DebugBar/Resources/widgets/mails/widget.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/mails/widget.js diff --git a/htdocs/includes/DebugBar/Resources/widgets/sqlqueries/widget.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.css similarity index 64% rename from htdocs/includes/DebugBar/Resources/widgets/sqlqueries/widget.css rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.css index 322f2ba7004..04fd0afb357 100644 --- a/htdocs/includes/DebugBar/Resources/widgets/sqlqueries/widget.css +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.css @@ -1,5 +1,5 @@ div.phpdebugbar-widgets-sqlqueries .phpdebugbar-widgets-status { - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; padding: 6px 6px; border-bottom: 1px solid #ddd; font-weight: bold; @@ -11,28 +11,37 @@ div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar- color: red; } +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id { float: right; margin-left: 8px; color: #888; } +div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-database, div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-duration, div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-memory, div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-row-count, +div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-copy-clipboard, div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-status span.phpdebugbar-widgets-stmt-id { color: #555; } +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before { - font-family: FontAwesome; + font-family: PhpDebugbarFontAwesome; margin-right: 4px; font-size: 12px; } +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before { + content: "\f1c0"; +} div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before { content: "\f017"; } @@ -45,12 +54,15 @@ div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before { div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before { content: "\f08d"; } +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before { + content: "\f0c5"; +} div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params { display: none; width: 70%; margin: 10px; border: 1px solid #ddd; - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; border-collapse: collapse; } div.phpdebugbar-widgets-sqlqueries table.phpdebugbar-widgets-params td { @@ -80,3 +92,27 @@ div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar- div.phpdebugbar-widgets-sqlqueries li.phpdebugbar-widgets-list-item.phpdebugbar-widgets-sql-duplicate:hover { background-color: #ffc; } + +div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar { + display:none; + position: fixed; + bottom: 0; + width: 100%; + background: #fff; + z-index: 1; +} + +div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter { + float: right; + font-size: 12px; + padding: 2px 4px; + background: #7cacd5; + margin: 0 2px; + border-radius: 4px; + color: #fff; + text-decoration: none; +} +div.phpdebugbar-widgets-sqlqueries div.phpdebugbar-widgets-toolbar a.phpdebugbar-widgets-filter.phpdebugbar-widgets-excluded { + background: #eee; + color: #888; +} diff --git a/htdocs/includes/DebugBar/Resources/widgets/sqlqueries/widget.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.js similarity index 54% rename from htdocs/includes/DebugBar/Resources/widgets/sqlqueries/widget.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.js index 80be93b80cc..514915c7613 100644 --- a/htdocs/includes/DebugBar/Resources/widgets/sqlqueries/widget.js +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/sqlqueries/widget.js @@ -12,10 +12,52 @@ className: csscls('sqlqueries'), + onFilterClick: function(el) { + $(el).toggleClass(csscls('excluded')); + + var excludedLabels = []; + this.$toolbar.find(csscls('.filter') + csscls('.excluded')).each(function() { + excludedLabels.push(this.rel); + }); + + this.$list.$el.find("li[connection=" + $(el).attr("rel") + "]").toggle(); + + this.set('exclude', excludedLabels); + }, + onCopyToClipboard: function (el) { + var code = $(el).parent('li').find('code').get(0); + var copy = function () { + try { + document.execCommand('copy'); + alert('Query copied to the clipboard'); + } catch (err) { + console.log('Oops, unable to copy'); + } + }; + var select = function (node) { + if (document.selection) { + var range = document.body.createTextRange(); + range.moveToElementText(node); + range.select(); + } else if (window.getSelection) { + var range = document.createRange(); + range.selectNodeContents(node); + window.getSelection().removeAllRanges(); + window.getSelection().addRange(range); + } + copy(); + window.getSelection().removeAllRanges(); + }; + select(code); + }, render: function() { this.$status = $('
    ').addClass(csscls('status')).appendTo(this.$el); - this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, stmt) { + this.$toolbar = $('
    ').addClass(csscls('toolbar')).appendTo(this.$el); + + var filters = [], self = this; + + this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, stmt) { $('').addClass(csscls('sql')).html(PhpDebugBar.Widgets.highlight(stmt.sql, 'sql')).appendTo(li); if (stmt.duration_str) { $('').addClass(csscls('duration')).text(stmt.duration_str).appendTo(li); @@ -23,21 +65,47 @@ if (stmt.memory_str) { $('').addClass(csscls('memory')).text(stmt.memory_str).appendTo(li); } - if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) { - li.addClass(csscls('error')); - li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message)); - } else if (typeof(stmt.row_count) != 'undefined') { + if (typeof(stmt.row_count) != 'undefined') { $('').addClass(csscls('row-count')).text(stmt.row_count).appendTo(li); } if (typeof(stmt.stmt_id) != 'undefined' && stmt.stmt_id) { $('').addClass(csscls('stmt-id')).text(stmt.stmt_id).appendTo(li); } + if (stmt.connection) { + $('').addClass(csscls('database')).text(stmt.connection).appendTo(li); + li.attr("connection",stmt.connection); + if ( $.inArray(stmt.connection, filters) == -1 ) { + filters.push(stmt.connection); + $('') + .addClass(csscls('filter')) + .text(stmt.connection) + .attr('rel', stmt.connection) + .on('click', function() { self.onFilterClick(this); }) + .appendTo(self.$toolbar); + if (filters.length>1) { + self.$toolbar.show(); + self.$list.$el.css("margin-bottom","20px"); + } + } + } + if (typeof(stmt.is_success) != 'undefined' && !stmt.is_success) { + li.addClass(csscls('error')); + li.append($('').addClass(csscls('error')).text("[" + stmt.error_code + "] " + stmt.error_message)); + } + $('') + .addClass(csscls('copy-clipboard')) + .css('cursor', 'pointer') + .on('click', function (event) { + self.onCopyToClipboard(this); + event.stopPropagation(); + }) + .appendTo(li); if (stmt.params && !$.isEmptyObject(stmt.params)) { var table = $('
    Params
    ').addClass(csscls('params')).appendTo(li); for (var key in stmt.params) { if (typeof stmt.params[key] !== 'function') { table.append('' + key + '' + stmt.params[key] + ''); + '">' + stmt.params[key] + ''); } } li.css('cursor', 'pointer').click(function() { @@ -52,11 +120,15 @@ this.$list.$el.appendTo(this.$el); this.bindAttr('data', function(data) { + // the PDO collector maybe is empty + if (data.length <= 0) { + return false; + } this.$list.set('data', data.statements); this.$status.empty(); // Search for duplicate statements. - for (var sql = {}, duplicate = 0, i = 0; i < data.statements.length; i++) { + for (var sql = {}, unique = 0, duplicate = 0, i = 0; i < data.statements.length; i++) { var stmt = data.statements[i].sql; if (data.statements[i].params && !$.isEmptyObject(data.statements[i].params)) { stmt += ' {' + $.param(data.statements[i].params, false) + '}'; @@ -67,11 +139,13 @@ // Add classes to all duplicate SQL statements. for (var stmt in sql) { if (sql[stmt].keys.length > 1) { - duplicate++; + duplicate += sql[stmt].keys.length; for (var i = 0; i < sql[stmt].keys.length; i++) { this.$list.$el.find('.' + csscls('list-item')).eq(sql[stmt].keys[i]) - .addClass(csscls('sql-duplicate')).addClass(csscls('sql-duplicate-'+duplicate)); + .addClass(csscls('sql-duplicate')); } + } else { + unique++; } } @@ -80,7 +154,8 @@ t.append(", " + data.nb_failed_statements + " of which failed"); } if (duplicate) { - t.append(", " + duplicate + " of which were duplicated"); + t.append(", " + duplicate + " of which were duplicates"); + t.append(", " + unique + " unique"); } if (data.accumulated_duration_str) { this.$status.append($('').addClass(csscls('duration')).text(data.accumulated_duration_str)); diff --git a/htdocs/includes/DebugBar/Resources/widgets/templates/widget.css b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.css similarity index 83% rename from htdocs/includes/DebugBar/Resources/widgets/templates/widget.css rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.css index 1fa9878d7ed..29f6ab979bc 100644 --- a/htdocs/includes/DebugBar/Resources/widgets/templates/widget.css +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.css @@ -1,6 +1,6 @@ div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status { - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; padding: 6px 6px; border-bottom: 1px solid #ddd; font-weight: bold; @@ -25,8 +25,10 @@ div.phpdebugbar-widgets-templates div.phpdebugbar-widgets-status span.phpdebugba div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time:before, div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory:before, div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before, -div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before { - font-family: FontAwesome; +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before, +div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before +{ + font-family: PhpDebugbarFontAwesome; margin-right: 4px; font-size: 12px; } @@ -42,12 +44,16 @@ div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before { div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before { content: "\f121"; } +div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before { + content: "\f08e"; + margin-left: 4px; +} div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params { display: none; width: 70%; margin: 10px; border: 1px solid #ddd; - font-family: monospace; + font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace; border-collapse: collapse; } div.phpdebugbar-widgets-templates table.phpdebugbar-widgets-params td { diff --git a/htdocs/includes/DebugBar/Resources/widgets/templates/widget.js b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.js similarity index 70% rename from htdocs/includes/DebugBar/Resources/widgets/templates/widget.js rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.js index 362d4a45a24..8763e7eda68 100644 --- a/htdocs/includes/DebugBar/Resources/widgets/templates/widget.js +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Resources/widgets/templates/widget.js @@ -17,6 +17,16 @@ this.$list = new PhpDebugBar.Widgets.ListWidget({ itemRenderer: function(li, tpl) { $('').addClass(csscls('name')).text(tpl.name).appendTo(li); + + if (typeof tpl.xdebug_link !== 'undefined' && tpl.xdebug_link !== null) { + if (tpl.xdebug_link.ajax) { + $('
    ').on('click', function () { + $.ajax(tpl.xdebug_link.url); + }).addClass(csscls('editor-link')).appendTo(li); + } else { + $('').addClass(csscls('editor-link')).appendTo(li); + } + } if (tpl.render_time_str) { $('').addClass(csscls('render-time')).text(tpl.render_time_str).appendTo(li); } @@ -47,13 +57,15 @@ } }}); this.$list.$el.appendTo(this.$el); + this.$callgraph = $('
    ').addClass(csscls('callgraph')).appendTo(this.$el); this.bindAttr('data', function(data) { this.$list.set('data', data.templates); this.$status.empty(); + this.$callgraph.empty(); var sentence = data.sentence || "templates were rendered"; - $('').text(data.templates.length + " " + sentence).appendTo(this.$status); + $('').text(data.nb_templates + " " + sentence).appendTo(this.$status); if (data.accumulated_render_time_str) { this.$status.append($('').addClass(csscls('render-time')).text(data.accumulated_render_time_str)); @@ -61,6 +73,15 @@ if (data.memory_usage_str) { this.$status.append($('').addClass(csscls('memory')).text(data.memory_usage_str)); } + if (data.nb_blocks > 0) { + $('
    ').text(data.nb_blocks + " blocks were rendered").appendTo(this.$status); + } + if (data.nb_macros > 0) { + $('
    ').text(data.nb_macros + " macros were rendered").appendTo(this.$status); + } + if (typeof data.callgraph !== 'undefined') { + this.$callgraph.html(data.callgraph); + } }); } diff --git a/htdocs/includes/DebugBar/StandardDebugBar.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/StandardDebugBar.php similarity index 100% rename from htdocs/includes/DebugBar/StandardDebugBar.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/StandardDebugBar.php diff --git a/htdocs/includes/DebugBar/Storage/FileStorage.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/FileStorage.php similarity index 90% rename from htdocs/includes/DebugBar/Storage/FileStorage.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/FileStorage.php index b37234976e2..98923e272b3 100644 --- a/htdocs/includes/DebugBar/Storage/FileStorage.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/FileStorage.php @@ -25,6 +25,9 @@ class FileStorage implements StorageInterface $this->dirname = rtrim($dirname, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; } + /** + * {@inheritdoc} + */ public function save($id, $data) { if (!file_exists($this->dirname)) { @@ -33,11 +36,17 @@ class FileStorage implements StorageInterface file_put_contents($this->makeFilename($id), json_encode($data)); } + /** + * {@inheritdoc} + */ public function get($id) { return json_decode(file_get_contents($this->makeFilename($id)), true); } + /** + * {@inheritdoc} + */ public function find(array $filters = array(), $max = 20, $offset = 0) { //Loop through all .json files and remember the modified time and id. @@ -81,6 +90,10 @@ class FileStorage implements StorageInterface /** * Filter the metadata for matches. + * + * @param array $meta + * @param array $filters + * @return bool */ protected function filter($meta, $filters) { @@ -92,6 +105,9 @@ class FileStorage implements StorageInterface return true; } + /** + * {@inheritdoc} + */ public function clear() { foreach (new \DirectoryIterator($this->dirname) as $file) { @@ -101,6 +117,10 @@ class FileStorage implements StorageInterface } } + /** + * @param string $id + * @return string + */ public function makeFilename($id) { return $this->dirname . basename($id). ".json"; diff --git a/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/MemcachedStorage.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/MemcachedStorage.php new file mode 100644 index 00000000000..c1ef873421b --- /dev/null +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/MemcachedStorage.php @@ -0,0 +1,158 @@ +memcached = $memcached; + $this->keyNamespace = $keyNamespace; + $this->expiration = $expiration; + } + + /** + * {@inheritdoc} + */ + public function save($id, $data) + { + $key = $this->createKey($id); + $this->memcached->set($key, $data, $this->expiration); + if (!$this->memcached->append($this->keyNamespace, "|$key")) { + $this->memcached->set($this->keyNamespace, $key, $this->expiration); + } else if ($this->expiration) { + // append doesn't support updating expiration, so do it here: + $this->memcached->touch($this->keyNamespace, $this->expiration); + } + } + + /** + * {@inheritdoc} + */ + public function get($id) + { + return $this->memcached->get($this->createKey($id)); + } + + /** + * {@inheritdoc} + */ + public function find(array $filters = array(), $max = 20, $offset = 0) + { + if (!($keys = $this->memcached->get($this->keyNamespace))) { + return array(); + } + + $results = array(); + $keys = array_reverse(explode('|', $keys)); // Reverse so newest comes first + $keyPosition = 0; // Index in $keys to try to get next items from + $remainingItems = $max + $offset; // Try to obtain this many remaining items + // Loop until we've found $remainingItems matching items or no more items may exist. + while ($remainingItems > 0 && $keyPosition < count($keys)) { + // Consume some keys from $keys: + $itemsToGet = array_slice($keys, $keyPosition, $remainingItems); + $keyPosition += $remainingItems; + // Try to get them, and filter them: + $newItems = $this->memcachedGetMulti($itemsToGet, Memcached::GET_PRESERVE_ORDER); + if ($newItems) { + foreach ($newItems as $data) { + $meta = $data['__meta']; + if ($this->filter($meta, $filters)) { + $remainingItems--; + // Keep the result only if we've discarded $offset items first + if ($offset <= 0) { + $results[] = $meta; + } else { + $offset--; + } + } + } + } + } + return $results; + } + + /** + * Filter the metadata for matches. + * + * @param array $meta + * @param array $filters + * @return bool + */ + protected function filter($meta, $filters) + { + foreach ($filters as $key => $value) { + if (!isset($meta[$key]) || fnmatch($value, $meta[$key]) === false) { + return false; + } + } + return true; + } + + /** + * {@inheritdoc} + */ + public function clear() + { + if (!($keys = $this->memcached->get($this->keyNamespace))) { + return; + } + $this->memcached->delete($this->keyNamespace); + $this->memcached->deleteMulti(explode('|', $keys)); + } + + /** + * @param string $id + * @return string + */ + protected function createKey($id) + { + return md5("{$this->keyNamespace}.$id"); + } + + /** + * The memcached getMulti function changed in version 3.0.0 to only have two parameters. + * + * @param array $keys + * @param int $flags + */ + protected function memcachedGetMulti($keys, $flags) + { + if ($this->newGetMultiSignature === null) { + $this->newGetMultiSignature = (new ReflectionMethod('Memcached', 'getMulti'))->getNumberOfParameters() === 2; + } + if ($this->newGetMultiSignature) { + return $this->memcached->getMulti($keys, $flags); + } else { + $null = null; + return $this->memcached->getMulti($keys, $null, $flags); + } + } +} diff --git a/htdocs/includes/DebugBar/Storage/PdoStorage.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/PdoStorage.php similarity index 86% rename from htdocs/includes/DebugBar/Storage/PdoStorage.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/PdoStorage.php index e7695ef69fa..ef9d568d275 100644 --- a/htdocs/includes/DebugBar/Storage/PdoStorage.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/PdoStorage.php @@ -24,12 +24,13 @@ class PdoStorage implements StorageInterface protected $sqlQueries = array( 'save' => "INSERT INTO %tablename% (id, data, meta_utime, meta_datetime, meta_uri, meta_ip, meta_method) VALUES (?, ?, ?, ?, ?, ?, ?)", 'get' => "SELECT data FROM %tablename% WHERE id = ?", - 'find' => "SELECT data FROM %tablename% %where% LIMIT %limit% OFFSET %offset%", + 'find' => "SELECT data FROM %tablename% %where% ORDER BY meta_datetime DESC LIMIT %limit% OFFSET %offset%", 'clear' => "DELETE FROM %tablename%" ); /** - * @param string $dirname Directories where to store files + * @param \PDO $pdo The PDO instance + * @param string $tableName * @param array $sqlQueries */ public function __construct(PDO $pdo, $tableName = 'phpdebugbar', array $sqlQueries = array()) @@ -49,6 +50,9 @@ class PdoStorage implements StorageInterface $this->sqlQueries = array_merge($this->sqlQueries, $queries); } + /** + * {@inheritdoc} + */ public function save($id, $data) { $sql = $this->getSqlQuery('save'); @@ -57,6 +61,9 @@ class PdoStorage implements StorageInterface $stmt->execute(array($id, serialize($data), $meta['utime'], $meta['datetime'], $meta['uri'], $meta['ip'], $meta['method'])); } + /** + * {@inheritdoc} + */ public function get($id) { $sql = $this->getSqlQuery('get'); @@ -68,6 +75,9 @@ class PdoStorage implements StorageInterface return null; } + /** + * {@inheritdoc} + */ public function find(array $filters = array(), $max = 20, $offset = 0) { $where = array(); @@ -100,11 +110,21 @@ class PdoStorage implements StorageInterface return $results; } + /** + * {@inheritdoc} + */ public function clear() { $this->pdo->exec($this->getSqlQuery('clear')); } + /** + * Get a SQL Query for a task, with the variables replaced + * + * @param string $name + * @param array $vars + * @return string + */ protected function getSqlQuery($name, array $vars = array()) { $sql = $this->sqlQueries[$name]; diff --git a/htdocs/includes/DebugBar/Storage/RedisStorage.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/RedisStorage.php similarity index 51% rename from htdocs/includes/DebugBar/Storage/RedisStorage.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/RedisStorage.php index 42d8e3ce4dc..f145369660b 100644 --- a/htdocs/includes/DebugBar/Storage/RedisStorage.php +++ b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/RedisStorage.php @@ -10,8 +10,6 @@ namespace DebugBar\Storage; -use Predis\Client; - /** * Stores collected data into Redis */ @@ -22,35 +20,57 @@ class RedisStorage implements StorageInterface protected $hash; /** - * @param string $dirname Directories where to store files + * @param \Predis\Client $redis Redis Client + * @param string $hash */ - public function __construct(Client $redis, $hash = 'phpdebugbar') + public function __construct($redis, $hash = 'phpdebugbar') { $this->redis = $redis; $this->hash = $hash; } + /** + * {@inheritdoc} + */ public function save($id, $data) { - $this->redis->hset($this->hash, $id, serialize($data)); + $this->redis->hset("$this->hash:meta", $id, serialize($data['__meta'])); + unset($data['__meta']); + $this->redis->hset("$this->hash:data", $id, serialize($data)); } + /** + * {@inheritdoc} + */ public function get($id) { - return unserialize($this->redis->hget($this->hash, $id)); + return array_merge(unserialize($this->redis->hget("$this->hash:data", $id)), + array('__meta' => unserialize($this->redis->hget("$this->hash:meta", $id)))); } + /** + * {@inheritdoc} + */ public function find(array $filters = array(), $max = 20, $offset = 0) { $results = array(); - foreach ($this->redis->hgetall($this->hash) as $id => $data) { - if ($data = unserialize($data)) { - $meta = $data['__meta']; - if ($this->filter($meta, $filters)) { - $results[] = $meta; + $cursor = "0"; + do { + list($cursor, $data) = $this->redis->hscan("$this->hash:meta", $cursor); + + foreach ($data as $meta) { + if ($meta = unserialize($meta)) { + if ($this->filter($meta, $filters)) { + $results[] = $meta; + } } } - } + } while($cursor); + + usort($results, function ($a, $b) { + return $a['utime'] < $b['utime']; + }); + return array_slice($results, $offset, $max); } @@ -67,6 +87,9 @@ class RedisStorage implements StorageInterface return true; } + /** + * {@inheritdoc} + */ public function clear() { $this->redis->del($this->hash); diff --git a/htdocs/includes/DebugBar/Storage/StorageInterface.php b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/StorageInterface.php similarity index 100% rename from htdocs/includes/DebugBar/Storage/StorageInterface.php rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/StorageInterface.php diff --git a/htdocs/includes/DebugBar/Storage/pdo_storage_schema.sql b/htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/pdo_storage_schema.sql similarity index 100% rename from htdocs/includes/DebugBar/Storage/pdo_storage_schema.sql rename to htdocs/includes/maximebf/debugbar/src/DebugBar/Storage/pdo_storage_schema.sql diff --git a/htdocs/includes/nnnick/chartjs/.gitignore b/htdocs/includes/nnnick/chartjs/.gitignore index c4998047b01..6a066b92f38 100644 --- a/htdocs/includes/nnnick/chartjs/.gitignore +++ b/htdocs/includes/nnnick/chartjs/.gitignore @@ -1,6 +1,7 @@ /_book /coverage /custom +/dist /docs/index.md /gh-pages /jsdoc diff --git a/htdocs/includes/odtphp/Segment.php b/htdocs/includes/odtphp/Segment.php index cd8bec8c4ff..ca8797ba577 100644 --- a/htdocs/includes/odtphp/Segment.php +++ b/htdocs/includes/odtphp/Segment.php @@ -231,14 +231,10 @@ class Segment implements IteratorAggregate, Countable //throw new SegmentException("var $key not found in {$this->getName()}"); } - $value=$this->odf->htmlToUTFAndPreOdf($value); + $tag = $this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT'); - $value = $encode ? htmlspecialchars($value) : $value; - $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; - - $value=$this->odf->preOdfToOdf($value); - - $this->vars[$this->odf->getConfig('DELIMITER_LEFT') . $key . $this->odf->getConfig('DELIMITER_RIGHT')] = $value; + $this->vars[$tag] = $this->odf->convertVarToOdf($value, $encode, $charset); + return $this; } /** diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index d84559eb459..f6e15b2e8a2 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -141,8 +141,24 @@ class Odf //} } + $this->vars[$tag] = $this->convertVarToOdf($value, $encode, $charset); + + return $this; + } + + /** + * Replaces html tags in odt tags and returns a compatible string + * @param string $key Name of the variable within the template + * @param string $value Replacement value + * @param bool $encode If true, special XML characters are encoded + * @param string $charset Charset + * @return string + */ + public function convertVarToOdf($value, $encode = true, $charset = 'ISO-8859') + { $value = $encode ? htmlspecialchars($value) : $value; $value = ($charset == 'ISO-8859') ? utf8_encode($value) : $value; + $convertedValue = $value; // Check if the value includes html tags if ($this->_hasHtmlTag($value) === true) { @@ -156,7 +172,7 @@ class Odf '' ); - $this->vars[$tag] = $this->_replaceHtmlWithOdtTag($this->_getDataFromHtml($value), $customStyles, $fontDeclarations); + $convertedValue = $this->_replaceHtmlWithOdtTag($this->_getDataFromHtml($value), $customStyles, $fontDeclarations); foreach ($customStyles as $key => $val) { array_push($automaticStyles, '' . $val . ''); @@ -180,9 +196,9 @@ class Odf } $this->contentXml = str_replace('', $fonts . '', $this->contentXml); } - else $this->vars[$tag] = preg_replace('/(\r\n|\r|\n)/i', "", $value); - - return $this; + else $convertedValue = preg_replace('/(\r\n|\r|\n)/i', "", $value); + + return $convertedValue; } /** @@ -321,7 +337,7 @@ class Odf $tempHtml = substr($tempHtml, $tagOffset); } // Extract the attribute data from the html tag - preg_match_all('/([0-9A-Za-z]+(?:="[0-9A-Za-z\:\-\s\,\;]*")?)+/', $matches[2][0], $explodedAttributes); + preg_match_all('/([0-9A-Za-z]+(?:="[0-9A-Za-z\:\-\s\,\;\#]*")?)+/', $matches[2][0], $explodedAttributes); $explodedAttributes = array_filter($explodedAttributes[0]); $attributes = array(); // Store each attribute with its name in the $attributes array diff --git a/htdocs/includes/symfony/var-dumper/CHANGELOG.md b/htdocs/includes/symfony/var-dumper/CHANGELOG.md new file mode 100644 index 00000000000..6b08aa77ac7 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/CHANGELOG.md @@ -0,0 +1,7 @@ +CHANGELOG +========= + +2.7.0 +----- + + * deprecated Cloner\Data::getLimitedClone(). Use withMaxDepth, withMaxItemsPerDepth or withRefHandles instead. diff --git a/htdocs/includes/symfony/var-dumper/Caster/AmqpCaster.php b/htdocs/includes/symfony/var-dumper/Caster/AmqpCaster.php new file mode 100644 index 00000000000..4e9b351c181 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/AmqpCaster.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Amqp related classes to array representation. + * + * @author Grégoire Pineau + */ +class AmqpCaster +{ + private static $flags = array( + AMQP_DURABLE => 'AMQP_DURABLE', + AMQP_PASSIVE => 'AMQP_PASSIVE', + AMQP_EXCLUSIVE => 'AMQP_EXCLUSIVE', + AMQP_AUTODELETE => 'AMQP_AUTODELETE', + AMQP_INTERNAL => 'AMQP_INTERNAL', + AMQP_NOLOCAL => 'AMQP_NOLOCAL', + AMQP_AUTOACK => 'AMQP_AUTOACK', + AMQP_IFEMPTY => 'AMQP_IFEMPTY', + AMQP_IFUNUSED => 'AMQP_IFUNUSED', + AMQP_MANDATORY => 'AMQP_MANDATORY', + AMQP_IMMEDIATE => 'AMQP_IMMEDIATE', + AMQP_MULTIPLE => 'AMQP_MULTIPLE', + AMQP_NOWAIT => 'AMQP_NOWAIT', + AMQP_REQUEUE => 'AMQP_REQUEUE', + ); + + private static $exchangeTypes = array( + AMQP_EX_TYPE_DIRECT => 'AMQP_EX_TYPE_DIRECT', + AMQP_EX_TYPE_FANOUT => 'AMQP_EX_TYPE_FANOUT', + AMQP_EX_TYPE_TOPIC => 'AMQP_EX_TYPE_TOPIC', + AMQP_EX_TYPE_HEADERS => 'AMQP_EX_TYPE_HEADERS', + ); + + public static function castConnection(\AMQPConnection $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + // BC layer in the ampq lib + if (method_exists($c, 'getReadTimeout')) { + $timeout = $c->getReadTimeout(); + } else { + $timeout = $c->getTimeout(); + } + + $a += array( + $prefix.'isConnected' => $c->isConnected(), + $prefix.'login' => $c->getLogin(), + $prefix.'password' => $c->getPassword(), + $prefix.'host' => $c->getHost(), + $prefix.'port' => $c->getPort(), + $prefix.'vhost' => $c->getVhost(), + $prefix.'readTimeout' => $timeout, + ); + + return $a; + } + + public static function castChannel(\AMQPChannel $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'isConnected' => $c->isConnected(), + $prefix.'channelId' => $c->getChannelId(), + $prefix.'prefetchSize' => $c->getPrefetchSize(), + $prefix.'prefetchCount' => $c->getPrefetchCount(), + $prefix.'connection' => $c->getConnection(), + ); + + return $a; + } + + public static function castQueue(\AMQPQueue $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'name' => $c->getName(), + $prefix.'flags' => self::extractFlags($c->getFlags()), + $prefix.'arguments' => $c->getArguments(), + $prefix.'connection' => $c->getConnection(), + $prefix.'channel' => $c->getChannel(), + ); + + return $a; + } + + public static function castExchange(\AMQPExchange $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'name' => $c->getName(), + $prefix.'flags' => self::extractFlags($c->getFlags()), + $prefix.'type' => isset(self::$exchangeTypes[$c->getType()]) ? new ConstStub(self::$exchangeTypes[$c->getType()], $c->getType()) : $c->getType(), + $prefix.'arguments' => $c->getArguments(), + $prefix.'channel' => $c->getChannel(), + $prefix.'connection' => $c->getConnection(), + ); + + return $a; + } + + public static function castEnvelope(\AMQPEnvelope $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $a += array($prefix.'body' => $c->getBody()); + } + + $a += array( + $prefix.'routingKey' => $c->getRoutingKey(), + $prefix.'deliveryTag' => $c->getDeliveryTag(), + $prefix.'deliveryMode' => new ConstStub($c->getDeliveryMode().(2 === $c->getDeliveryMode() ? ' (persistent)' : ' (non-persistent)'), $c->getDeliveryMode()), + $prefix.'exchangeName' => $c->getExchangeName(), + $prefix.'isRedelivery' => $c->isRedelivery(), + $prefix.'contentType' => $c->getContentType(), + $prefix.'contentEncoding' => $c->getContentEncoding(), + $prefix.'type' => $c->getType(), + $prefix.'timestamp' => $c->getTimestamp(), + $prefix.'priority' => $c->getPriority(), + $prefix.'expiration' => $c->getExpiration(), + $prefix.'userId' => $c->getUserId(), + $prefix.'appId' => $c->getAppId(), + $prefix.'messageId' => $c->getMessageId(), + $prefix.'replyTo' => $c->getReplyTo(), + $prefix.'correlationId' => $c->getCorrelationId(), + $prefix.'headers' => $c->getHeaders(), + ); + + return $a; + } + + private static function extractFlags($flags) + { + $flagsArray = array(); + + foreach (self::$flags as $value => $name) { + if ($flags & $value) { + $flagsArray[] = $name; + } + } + + if (!$flagsArray) { + $flagsArray = array('AMQP_NOPARAM'); + } + + return new ConstStub(implode('|', $flagsArray), $flags); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/Caster.php b/htdocs/includes/symfony/var-dumper/Caster/Caster.php new file mode 100644 index 00000000000..23e72e87701 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/Caster.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Helper for filtering out properties in casters. + * + * @author Nicolas Grekas + */ +class Caster +{ + const EXCLUDE_VERBOSE = 1; + const EXCLUDE_VIRTUAL = 2; + const EXCLUDE_DYNAMIC = 4; + const EXCLUDE_PUBLIC = 8; + const EXCLUDE_PROTECTED = 16; + const EXCLUDE_PRIVATE = 32; + const EXCLUDE_NULL = 64; + const EXCLUDE_EMPTY = 128; + const EXCLUDE_NOT_IMPORTANT = 256; + const EXCLUDE_STRICT = 512; + + const PREFIX_VIRTUAL = "\0~\0"; + const PREFIX_DYNAMIC = "\0+\0"; + const PREFIX_PROTECTED = "\0*\0"; + + /** + * Casts objects to arrays and adds the dynamic property prefix. + * + * @param object $obj The object to cast. + * @param \ReflectionClass $reflector The class reflector to use for inspecting the object definition. + * + * @return array The array-cast of the object, with prefixed dynamic properties. + */ + public static function castObject($obj, \ReflectionClass $reflector) + { + if ($reflector->hasMethod('__debugInfo')) { + $a = $obj->__debugInfo(); + } else { + $a = (array) $obj; + } + + if ($a) { + $p = array_keys($a); + foreach ($p as $i => $k) { + if (!isset($k[0]) || ("\0" !== $k[0] && !$reflector->hasProperty($k))) { + $p[$i] = self::PREFIX_DYNAMIC.$k; + } elseif (isset($k[16]) && "\0" === $k[16] && 0 === strpos($k, "\0class@anonymous\0")) { + $p[$i] = "\0".$reflector->getParentClass().'@anonymous'.strrchr($k, "\0"); + } + } + $a = array_combine($p, $a); + } + + return $a; + } + + /** + * Filters out the specified properties. + * + * By default, a single match in the $filter bit field filters properties out, following an "or" logic. + * When EXCLUDE_STRICT is set, an "and" logic is applied: all bits must match for a property to be removed. + * + * @param array $a The array containing the properties to filter. + * @param int $filter A bit field of Caster::EXCLUDE_* constants specifying which properties to filter out. + * @param string[] $listedProperties List of properties to exclude when Caster::EXCLUDE_VERBOSE is set, and to preserve when Caster::EXCLUDE_NOT_IMPORTANT is set. + * + * @return array The filtered array + */ + public static function filter(array $a, $filter, array $listedProperties = array()) + { + foreach ($a as $k => $v) { + $type = self::EXCLUDE_STRICT & $filter; + + if (null === $v) { + $type |= self::EXCLUDE_NULL & $filter; + } + if (empty($v)) { + $type |= self::EXCLUDE_EMPTY & $filter; + } + if ((self::EXCLUDE_NOT_IMPORTANT & $filter) && !in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_NOT_IMPORTANT; + } + if ((self::EXCLUDE_VERBOSE & $filter) && in_array($k, $listedProperties, true)) { + $type |= self::EXCLUDE_VERBOSE; + } + + if (!isset($k[1]) || "\0" !== $k[0]) { + $type |= self::EXCLUDE_PUBLIC & $filter; + } elseif ('~' === $k[1]) { + $type |= self::EXCLUDE_VIRTUAL & $filter; + } elseif ('+' === $k[1]) { + $type |= self::EXCLUDE_DYNAMIC & $filter; + } elseif ('*' === $k[1]) { + $type |= self::EXCLUDE_PROTECTED & $filter; + } else { + $type |= self::EXCLUDE_PRIVATE & $filter; + } + + if ((self::EXCLUDE_STRICT & $filter) ? $type === $filter : $type) { + unset($a[$k]); + } + } + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/ConstStub.php b/htdocs/includes/symfony/var-dumper/Caster/ConstStub.php new file mode 100644 index 00000000000..f20e03cdf0d --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/ConstStub.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a PHP constant and its value. + * + * @author Nicolas Grekas + */ +class ConstStub extends Stub +{ + public function __construct($name, $value) + { + $this->class = $name; + $this->value = $value; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/CutArrayStub.php b/htdocs/includes/symfony/var-dumper/Caster/CutArrayStub.php new file mode 100644 index 00000000000..f2a803053a6 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/CutArrayStub.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a cut array. + * + * @author Nicolas Grekas + */ +class CutArrayStub extends CutStub +{ + public $preservedSubset; + + public function __construct(array $value, array $preservedKeys) + { + parent::__construct($value); + + $this->preservedSubset = array_intersect_key($value, array_flip($preservedKeys)); + $this->cut -= count($this->preservedSubset); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/CutStub.php b/htdocs/includes/symfony/var-dumper/Caster/CutStub.php new file mode 100644 index 00000000000..8781f5cf3c6 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/CutStub.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents the main properties of a PHP variable, pre-casted by a caster. + * + * @author Nicolas Grekas + */ +class CutStub extends Stub +{ + public function __construct($value) + { + $this->value = $value; + + switch (gettype($value)) { + case 'object': + $this->type = self::TYPE_OBJECT; + $this->class = get_class($value); + $this->cut = -1; + break; + + case 'array': + $this->type = self::TYPE_ARRAY; + $this->class = self::ARRAY_ASSOC; + $this->cut = $this->value = count($value); + break; + + case 'resource': + case 'unknown type': + $this->type = self::TYPE_RESOURCE; + $this->handle = (int) $value; + $this->class = @get_resource_type($value); + $this->cut = -1; + break; + + case 'string': + $this->type = self::TYPE_STRING; + $this->class = preg_match('//u', $value) ? self::STRING_UTF8 : self::STRING_BINARY; + $this->cut = self::STRING_BINARY === $this->class ? strlen($value) : mb_strlen($value, 'UTF-8'); + $this->value = ''; + break; + } + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/DOMCaster.php b/htdocs/includes/symfony/var-dumper/Caster/DOMCaster.php new file mode 100644 index 00000000000..e04cf9534b3 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/DOMCaster.php @@ -0,0 +1,302 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts DOM related classes to array representation. + * + * @author Nicolas Grekas + */ +class DOMCaster +{ + private static $errorCodes = array( + DOM_PHP_ERR => 'DOM_PHP_ERR', + DOM_INDEX_SIZE_ERR => 'DOM_INDEX_SIZE_ERR', + DOMSTRING_SIZE_ERR => 'DOMSTRING_SIZE_ERR', + DOM_HIERARCHY_REQUEST_ERR => 'DOM_HIERARCHY_REQUEST_ERR', + DOM_WRONG_DOCUMENT_ERR => 'DOM_WRONG_DOCUMENT_ERR', + DOM_INVALID_CHARACTER_ERR => 'DOM_INVALID_CHARACTER_ERR', + DOM_NO_DATA_ALLOWED_ERR => 'DOM_NO_DATA_ALLOWED_ERR', + DOM_NO_MODIFICATION_ALLOWED_ERR => 'DOM_NO_MODIFICATION_ALLOWED_ERR', + DOM_NOT_FOUND_ERR => 'DOM_NOT_FOUND_ERR', + DOM_NOT_SUPPORTED_ERR => 'DOM_NOT_SUPPORTED_ERR', + DOM_INUSE_ATTRIBUTE_ERR => 'DOM_INUSE_ATTRIBUTE_ERR', + DOM_INVALID_STATE_ERR => 'DOM_INVALID_STATE_ERR', + DOM_SYNTAX_ERR => 'DOM_SYNTAX_ERR', + DOM_INVALID_MODIFICATION_ERR => 'DOM_INVALID_MODIFICATION_ERR', + DOM_NAMESPACE_ERR => 'DOM_NAMESPACE_ERR', + DOM_INVALID_ACCESS_ERR => 'DOM_INVALID_ACCESS_ERR', + DOM_VALIDATION_ERR => 'DOM_VALIDATION_ERR', + ); + + private static $nodeTypes = array( + XML_ELEMENT_NODE => 'XML_ELEMENT_NODE', + XML_ATTRIBUTE_NODE => 'XML_ATTRIBUTE_NODE', + XML_TEXT_NODE => 'XML_TEXT_NODE', + XML_CDATA_SECTION_NODE => 'XML_CDATA_SECTION_NODE', + XML_ENTITY_REF_NODE => 'XML_ENTITY_REF_NODE', + XML_ENTITY_NODE => 'XML_ENTITY_NODE', + XML_PI_NODE => 'XML_PI_NODE', + XML_COMMENT_NODE => 'XML_COMMENT_NODE', + XML_DOCUMENT_NODE => 'XML_DOCUMENT_NODE', + XML_DOCUMENT_TYPE_NODE => 'XML_DOCUMENT_TYPE_NODE', + XML_DOCUMENT_FRAG_NODE => 'XML_DOCUMENT_FRAG_NODE', + XML_NOTATION_NODE => 'XML_NOTATION_NODE', + XML_HTML_DOCUMENT_NODE => 'XML_HTML_DOCUMENT_NODE', + XML_DTD_NODE => 'XML_DTD_NODE', + XML_ELEMENT_DECL_NODE => 'XML_ELEMENT_DECL_NODE', + XML_ATTRIBUTE_DECL_NODE => 'XML_ATTRIBUTE_DECL_NODE', + XML_ENTITY_DECL_NODE => 'XML_ENTITY_DECL_NODE', + XML_NAMESPACE_DECL_NODE => 'XML_NAMESPACE_DECL_NODE', + ); + + public static function castException(\DOMException $e, array $a, Stub $stub, $isNested) + { + $k = Caster::PREFIX_PROTECTED.'code'; + if (isset($a[$k], self::$errorCodes[$a[$k]])) { + $a[$k] = new ConstStub(self::$errorCodes[$a[$k]], $a[$k]); + } + + return $a; + } + + public static function castLength($dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'length' => $dom->length, + ); + + return $a; + } + + public static function castImplementation($dom, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'Core' => '1.0', + Caster::PREFIX_VIRTUAL.'XML' => '2.0', + ); + + return $a; + } + + public static function castNode(\DOMNode $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), + 'parentNode' => new CutStub($dom->parentNode), + 'childNodes' => $dom->childNodes, + 'firstChild' => new CutStub($dom->firstChild), + 'lastChild' => new CutStub($dom->lastChild), + 'previousSibling' => new CutStub($dom->previousSibling), + 'nextSibling' => new CutStub($dom->nextSibling), + 'attributes' => $dom->attributes, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'namespaceURI' => $dom->namespaceURI, + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'baseURI' => $dom->baseURI, + 'textContent' => new CutStub($dom->textContent), + ); + + return $a; + } + + public static function castNameSpaceNode(\DOMNameSpaceNode $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'nodeName' => $dom->nodeName, + 'nodeValue' => new CutStub($dom->nodeValue), + 'nodeType' => new ConstStub(self::$nodeTypes[$dom->nodeType], $dom->nodeType), + 'prefix' => $dom->prefix, + 'localName' => $dom->localName, + 'namespaceURI' => $dom->namespaceURI, + 'ownerDocument' => new CutStub($dom->ownerDocument), + 'parentNode' => new CutStub($dom->parentNode), + ); + + return $a; + } + + public static function castDocument(\DOMDocument $dom, array $a, Stub $stub, $isNested, $filter = 0) + { + $a += array( + 'doctype' => $dom->doctype, + 'implementation' => $dom->implementation, + 'documentElement' => new CutStub($dom->documentElement), + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'xmlEncoding' => $dom->xmlEncoding, + 'standalone' => $dom->standalone, + 'xmlStandalone' => $dom->xmlStandalone, + 'version' => $dom->version, + 'xmlVersion' => $dom->xmlVersion, + 'strictErrorChecking' => $dom->strictErrorChecking, + 'documentURI' => $dom->documentURI, + 'config' => $dom->config, + 'formatOutput' => $dom->formatOutput, + 'validateOnParse' => $dom->validateOnParse, + 'resolveExternals' => $dom->resolveExternals, + 'preserveWhiteSpace' => $dom->preserveWhiteSpace, + 'recover' => $dom->recover, + 'substituteEntities' => $dom->substituteEntities, + ); + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + $formatOutput = $dom->formatOutput; + $dom->formatOutput = true; + $a += array(Caster::PREFIX_VIRTUAL.'xml' => $dom->saveXML()); + $dom->formatOutput = $formatOutput; + } + + return $a; + } + + public static function castCharacterData(\DOMCharacterData $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'data' => $dom->data, + 'length' => $dom->length, + ); + + return $a; + } + + public static function castAttr(\DOMAttr $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'name' => $dom->name, + 'specified' => $dom->specified, + 'value' => $dom->value, + 'ownerElement' => $dom->ownerElement, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ); + + return $a; + } + + public static function castElement(\DOMElement $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'tagName' => $dom->tagName, + 'schemaTypeInfo' => $dom->schemaTypeInfo, + ); + + return $a; + } + + public static function castText(\DOMText $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'wholeText' => $dom->wholeText, + ); + + return $a; + } + + public static function castTypeinfo(\DOMTypeinfo $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'typeName' => $dom->typeName, + 'typeNamespace' => $dom->typeNamespace, + ); + + return $a; + } + + public static function castDomError(\DOMDomError $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'severity' => $dom->severity, + 'message' => $dom->message, + 'type' => $dom->type, + 'relatedException' => $dom->relatedException, + 'related_data' => $dom->related_data, + 'location' => $dom->location, + ); + + return $a; + } + + public static function castLocator(\DOMLocator $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'lineNumber' => $dom->lineNumber, + 'columnNumber' => $dom->columnNumber, + 'offset' => $dom->offset, + 'relatedNode' => $dom->relatedNode, + 'uri' => $dom->uri, + ); + + return $a; + } + + public static function castDocumentType(\DOMDocumentType $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'name' => $dom->name, + 'entities' => $dom->entities, + 'notations' => $dom->notations, + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'internalSubset' => $dom->internalSubset, + ); + + return $a; + } + + public static function castNotation(\DOMNotation $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + ); + + return $a; + } + + public static function castEntity(\DOMEntity $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'publicId' => $dom->publicId, + 'systemId' => $dom->systemId, + 'notationName' => $dom->notationName, + 'actualEncoding' => $dom->actualEncoding, + 'encoding' => $dom->encoding, + 'version' => $dom->version, + ); + + return $a; + } + + public static function castProcessingInstruction(\DOMProcessingInstruction $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'target' => $dom->target, + 'data' => $dom->data, + ); + + return $a; + } + + public static function castXPath(\DOMXPath $dom, array $a, Stub $stub, $isNested) + { + $a += array( + 'document' => $dom->document, + ); + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/DoctrineCaster.php b/htdocs/includes/symfony/var-dumper/Caster/DoctrineCaster.php new file mode 100644 index 00000000000..f6573b34fd1 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/DoctrineCaster.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Doctrine\Common\Proxy\Proxy as CommonProxy; +use Doctrine\ORM\Proxy\Proxy as OrmProxy; +use Doctrine\ORM\PersistentCollection; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Doctrine related classes to array representation. + * + * @author Nicolas Grekas + */ +class DoctrineCaster +{ + public static function castCommonProxy(CommonProxy $proxy, array $a, Stub $stub, $isNested) + { + foreach (array('__cloner__', '__initializer__') as $k) { + if (array_key_exists($k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + + return $a; + } + + public static function castOrmProxy(OrmProxy $proxy, array $a, Stub $stub, $isNested) + { + foreach (array('_entityPersister', '_identifier') as $k) { + if (array_key_exists($k = "\0Doctrine\\ORM\\Proxy\\Proxy\0".$k, $a)) { + unset($a[$k]); + ++$stub->cut; + } + } + + return $a; + } + + public static function castPersistentCollection(PersistentCollection $coll, array $a, Stub $stub, $isNested) + { + foreach (array('snapshot', 'association', 'typeClass') as $k) { + if (array_key_exists($k = "\0Doctrine\\ORM\\PersistentCollection\0".$k, $a)) { + $a[$k] = new CutStub($a[$k]); + } + } + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/EnumStub.php b/htdocs/includes/symfony/var-dumper/Caster/EnumStub.php new file mode 100644 index 00000000000..67bb2e16390 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/EnumStub.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents an enumeration of values. + * + * @author Nicolas Grekas + */ +class EnumStub extends Stub +{ + public function __construct(array $values) + { + $this->value = $values; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/ExceptionCaster.php b/htdocs/includes/symfony/var-dumper/Caster/ExceptionCaster.php new file mode 100644 index 00000000000..a5a8773e859 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/ExceptionCaster.php @@ -0,0 +1,238 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Exception\ThrowingCasterException; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts common Exception classes to array representation. + * + * @author Nicolas Grekas + */ +class ExceptionCaster +{ + public static $srcContext = 1; + public static $traceArgs = true; + public static $errorTypes = array( + E_DEPRECATED => 'E_DEPRECATED', + E_USER_DEPRECATED => 'E_USER_DEPRECATED', + E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', + E_ERROR => 'E_ERROR', + E_WARNING => 'E_WARNING', + E_PARSE => 'E_PARSE', + E_NOTICE => 'E_NOTICE', + E_CORE_ERROR => 'E_CORE_ERROR', + E_CORE_WARNING => 'E_CORE_WARNING', + E_COMPILE_ERROR => 'E_COMPILE_ERROR', + E_COMPILE_WARNING => 'E_COMPILE_WARNING', + E_USER_ERROR => 'E_USER_ERROR', + E_USER_WARNING => 'E_USER_WARNING', + E_USER_NOTICE => 'E_USER_NOTICE', + E_STRICT => 'E_STRICT', + ); + + public static function castError(\Error $e, array $a, Stub $stub, $isNested, $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Error\0", $filter); + } + + public static function castException(\Exception $e, array $a, Stub $stub, $isNested, $filter = 0) + { + return self::filterExceptionArray($stub->class, $a, "\0Exception\0", $filter); + } + + public static function castErrorException(\ErrorException $e, array $a, Stub $stub, $isNested) + { + if (isset($a[$s = Caster::PREFIX_PROTECTED.'severity'], self::$errorTypes[$a[$s]])) { + $a[$s] = new ConstStub(self::$errorTypes[$a[$s]], $a[$s]); + } + + return $a; + } + + public static function castThrowingCasterException(ThrowingCasterException $e, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_PROTECTED; + $xPrefix = "\0Exception\0"; + + if (isset($a[$xPrefix.'previous'], $a[$xPrefix.'trace'])) { + $b = (array) $a[$xPrefix.'previous']; + array_unshift($b[$xPrefix.'trace'], array( + 'function' => 'new '.get_class($a[$xPrefix.'previous']), + 'file' => $b[$prefix.'file'], + 'line' => $b[$prefix.'line'], + )); + $a[$xPrefix.'trace'] = new TraceStub($b[$xPrefix.'trace'], false, 0, -1 - count($a[$xPrefix.'trace']->value)); + } + + unset($a[$xPrefix.'previous'], $a[$prefix.'code'], $a[$prefix.'file'], $a[$prefix.'line']); + + return $a; + } + + public static function castTraceStub(TraceStub $trace, array $a, Stub $stub, $isNested) + { + if (!$isNested) { + return $a; + } + $stub->class = ''; + $stub->handle = 0; + $frames = $trace->value; + + $a = array(); + $j = count($frames); + if (0 > $i = $trace->sliceOffset) { + $i = max(0, $j + $i); + } + if (!isset($trace->value[$i])) { + return array(); + } + $lastCall = isset($frames[$i]['function']) ? ' ==> '.(isset($frames[$i]['class']) ? $frames[0]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : ''; + + for ($j += $trace->numberingOffset - $i++; isset($frames[$i]); ++$i, --$j) { + $call = isset($frames[$i]['function']) ? (isset($frames[$i]['class']) ? $frames[$i]['class'].$frames[$i]['type'] : '').$frames[$i]['function'].'()' : '???'; + + $a[Caster::PREFIX_VIRTUAL.$j.'. '.$call.$lastCall] = new FrameStub( + array( + 'object' => isset($frames[$i]['object']) ? $frames[$i]['object'] : null, + 'class' => isset($frames[$i]['class']) ? $frames[$i]['class'] : null, + 'type' => isset($frames[$i]['type']) ? $frames[$i]['type'] : null, + 'function' => isset($frames[$i]['function']) ? $frames[$i]['function'] : null, + ) + $frames[$i - 1], + $trace->keepArgs, + true + ); + + $lastCall = ' ==> '.$call; + } + $a[Caster::PREFIX_VIRTUAL.$j.'. {main}'.$lastCall] = new FrameStub( + array( + 'object' => null, + 'class' => null, + 'type' => null, + 'function' => '{main}', + ) + $frames[$i - 1], + $trace->keepArgs, + true + ); + if (null !== $trace->sliceLength) { + $a = array_slice($a, 0, $trace->sliceLength, true); + } + + return $a; + } + + public static function castFrameStub(FrameStub $frame, array $a, Stub $stub, $isNested) + { + if (!$isNested) { + return $a; + } + $f = $frame->value; + $prefix = Caster::PREFIX_VIRTUAL; + + if (isset($f['file'], $f['line'])) { + if (preg_match('/\((\d+)\)(?:\([\da-f]{32}\))? : (?:eval\(\)\'d code|runtime-created function)$/', $f['file'], $match)) { + $f['file'] = substr($f['file'], 0, -strlen($match[0])); + $f['line'] = (int) $match[1]; + } + if (file_exists($f['file']) && 0 <= self::$srcContext) { + $src[$f['file'].':'.$f['line']] = self::extractSource(explode("\n", file_get_contents($f['file'])), $f['line'], self::$srcContext); + + if (!empty($f['class']) && is_subclass_of($f['class'], 'Twig_Template') && method_exists($f['class'], 'getDebugInfo')) { + $template = isset($f['object']) ? $f['object'] : new $f['class'](new \Twig_Environment(new \Twig_Loader_Filesystem())); + + try { + $templateName = $template->getTemplateName(); + $templateSrc = explode("\n", method_exists($template, 'getSource') ? $template->getSource() : $template->getEnvironment()->getLoader()->getSource($templateName)); + $templateInfo = $template->getDebugInfo(); + if (isset($templateInfo[$f['line']])) { + $src[$templateName.':'.$templateInfo[$f['line']]] = self::extractSource($templateSrc, $templateInfo[$f['line']], self::$srcContext); + } + } catch (\Twig_Error_Loader $e) { + } + } + } else { + $src[$f['file']] = $f['line']; + } + $a[$prefix.'src'] = new EnumStub($src); + } + + unset($a[$prefix.'args'], $a[$prefix.'line'], $a[$prefix.'file']); + if ($frame->inTraceStub) { + unset($a[$prefix.'class'], $a[$prefix.'type'], $a[$prefix.'function']); + } + foreach ($a as $k => $v) { + if (!$v) { + unset($a[$k]); + } + } + if ($frame->keepArgs && isset($f['args'])) { + $a[$prefix.'args'] = $f['args']; + } + + return $a; + } + + private static function filterExceptionArray($xClass, array $a, $xPrefix, $filter) + { + if (isset($a[$xPrefix.'trace'])) { + $trace = $a[$xPrefix.'trace']; + unset($a[$xPrefix.'trace']); // Ensures the trace is always last + } else { + $trace = array(); + } + + if (!($filter & Caster::EXCLUDE_VERBOSE)) { + array_unshift($trace, array( + 'function' => $xClass ? 'new '.$xClass : null, + 'file' => $a[Caster::PREFIX_PROTECTED.'file'], + 'line' => $a[Caster::PREFIX_PROTECTED.'line'], + )); + $a[$xPrefix.'trace'] = new TraceStub($trace); + } + if (empty($a[$xPrefix.'previous'])) { + unset($a[$xPrefix.'previous']); + } + unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']); + + return $a; + } + + private static function extractSource(array $srcArray, $line, $srcContext) + { + $src = array(); + + for ($i = $line - 1 - $srcContext; $i <= $line - 1 + $srcContext; ++$i) { + $src[] = (isset($srcArray[$i]) ? $srcArray[$i] : '')."\n"; + } + + $ltrim = 0; + while (' ' === $src[0][$ltrim] || "\t" === $src[0][$ltrim]) { + $i = $srcContext << 1; + while ($i > 0 && $src[0][$ltrim] === $src[$i][$ltrim]) { + --$i; + } + if ($i) { + break; + } + ++$ltrim; + } + if ($ltrim) { + foreach ($src as $i => $line) { + $src[$i] = substr($line, $ltrim); + } + } + + return implode('', $src); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/FrameStub.php b/htdocs/includes/symfony/var-dumper/Caster/FrameStub.php new file mode 100644 index 00000000000..1e1194dc85b --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/FrameStub.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +/** + * Represents a single backtrace frame as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class FrameStub extends EnumStub +{ + public $keepArgs; + public $inTraceStub; + + public function __construct(array $frame, $keepArgs = true, $inTraceStub = false) + { + $this->value = $frame; + $this->keepArgs = $keepArgs; + $this->inTraceStub = $inTraceStub; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/MongoCaster.php b/htdocs/includes/symfony/var-dumper/Caster/MongoCaster.php new file mode 100644 index 00000000000..92258f06fa2 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/MongoCaster.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts classes from the MongoDb extension to array representation. + * + * @author Nicolas Grekas + */ +class MongoCaster +{ + public static function castCursor(\MongoCursorInterface $cursor, array $a, Stub $stub, $isNested) + { + if ($info = $cursor->info()) { + foreach ($info as $k => $v) { + $a[Caster::PREFIX_VIRTUAL.$k] = $v; + } + } + $a[Caster::PREFIX_VIRTUAL.'dead'] = $cursor->dead(); + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/PdoCaster.php b/htdocs/includes/symfony/var-dumper/Caster/PdoCaster.php new file mode 100644 index 00000000000..e60b9275fd8 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/PdoCaster.php @@ -0,0 +1,114 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts PDO related classes to array representation. + * + * @author Nicolas Grekas + */ +class PdoCaster +{ + private static $pdoAttributes = array( + 'CASE' => array( + \PDO::CASE_LOWER => 'LOWER', + \PDO::CASE_NATURAL => 'NATURAL', + \PDO::CASE_UPPER => 'UPPER', + ), + 'ERRMODE' => array( + \PDO::ERRMODE_SILENT => 'SILENT', + \PDO::ERRMODE_WARNING => 'WARNING', + \PDO::ERRMODE_EXCEPTION => 'EXCEPTION', + ), + 'TIMEOUT', + 'PREFETCH', + 'AUTOCOMMIT', + 'PERSISTENT', + 'DRIVER_NAME', + 'SERVER_INFO', + 'ORACLE_NULLS' => array( + \PDO::NULL_NATURAL => 'NATURAL', + \PDO::NULL_EMPTY_STRING => 'EMPTY_STRING', + \PDO::NULL_TO_STRING => 'TO_STRING', + ), + 'CLIENT_VERSION', + 'SERVER_VERSION', + 'STATEMENT_CLASS', + 'EMULATE_PREPARES', + 'CONNECTION_STATUS', + 'STRINGIFY_FETCHES', + 'DEFAULT_FETCH_MODE' => array( + \PDO::FETCH_ASSOC => 'ASSOC', + \PDO::FETCH_BOTH => 'BOTH', + \PDO::FETCH_LAZY => 'LAZY', + \PDO::FETCH_NUM => 'NUM', + \PDO::FETCH_OBJ => 'OBJ', + ), + ); + + public static function castPdo(\PDO $c, array $a, Stub $stub, $isNested) + { + $attr = array(); + $errmode = $c->getAttribute(\PDO::ATTR_ERRMODE); + $c->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); + + foreach (self::$pdoAttributes as $k => $v) { + if (!isset($k[0])) { + $k = $v; + $v = array(); + } + + try { + $attr[$k] = 'ERRMODE' === $k ? $errmode : $c->getAttribute(constant('PDO::ATTR_'.$k)); + if ($v && isset($v[$attr[$k]])) { + $attr[$k] = new ConstStub($v[$attr[$k]], $attr[$k]); + } + } catch (\Exception $e) { + } + } + + $prefix = Caster::PREFIX_VIRTUAL; + $a += array( + $prefix.'inTransaction' => method_exists($c, 'inTransaction'), + $prefix.'errorInfo' => $c->errorInfo(), + $prefix.'attributes' => new EnumStub($attr), + ); + + if ($a[$prefix.'inTransaction']) { + $a[$prefix.'inTransaction'] = $c->inTransaction(); + } else { + unset($a[$prefix.'inTransaction']); + } + + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } + + $c->setAttribute(\PDO::ATTR_ERRMODE, $errmode); + + return $a; + } + + public static function castPdoStatement(\PDOStatement $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $a[$prefix.'errorInfo'] = $c->errorInfo(); + + if (!isset($a[$prefix.'errorInfo'][1], $a[$prefix.'errorInfo'][2])) { + unset($a[$prefix.'errorInfo']); + } + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/PgSqlCaster.php b/htdocs/includes/symfony/var-dumper/Caster/PgSqlCaster.php new file mode 100644 index 00000000000..88414e4ccff --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/PgSqlCaster.php @@ -0,0 +1,154 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts pqsql resources to array representation. + * + * @author Nicolas Grekas + */ +class PgSqlCaster +{ + private static $paramCodes = array( + 'server_encoding', + 'client_encoding', + 'is_superuser', + 'session_authorization', + 'DateStyle', + 'TimeZone', + 'IntervalStyle', + 'integer_datetimes', + 'application_name', + 'standard_conforming_strings', + ); + + private static $transactionStatus = array( + PGSQL_TRANSACTION_IDLE => 'PGSQL_TRANSACTION_IDLE', + PGSQL_TRANSACTION_ACTIVE => 'PGSQL_TRANSACTION_ACTIVE', + PGSQL_TRANSACTION_INTRANS => 'PGSQL_TRANSACTION_INTRANS', + PGSQL_TRANSACTION_INERROR => 'PGSQL_TRANSACTION_INERROR', + PGSQL_TRANSACTION_UNKNOWN => 'PGSQL_TRANSACTION_UNKNOWN', + ); + + private static $resultStatus = array( + PGSQL_EMPTY_QUERY => 'PGSQL_EMPTY_QUERY', + PGSQL_COMMAND_OK => 'PGSQL_COMMAND_OK', + PGSQL_TUPLES_OK => 'PGSQL_TUPLES_OK', + PGSQL_COPY_OUT => 'PGSQL_COPY_OUT', + PGSQL_COPY_IN => 'PGSQL_COPY_IN', + PGSQL_BAD_RESPONSE => 'PGSQL_BAD_RESPONSE', + PGSQL_NONFATAL_ERROR => 'PGSQL_NONFATAL_ERROR', + PGSQL_FATAL_ERROR => 'PGSQL_FATAL_ERROR', + ); + + private static $diagCodes = array( + 'severity' => PGSQL_DIAG_SEVERITY, + 'sqlstate' => PGSQL_DIAG_SQLSTATE, + 'message' => PGSQL_DIAG_MESSAGE_PRIMARY, + 'detail' => PGSQL_DIAG_MESSAGE_DETAIL, + 'hint' => PGSQL_DIAG_MESSAGE_HINT, + 'statement position' => PGSQL_DIAG_STATEMENT_POSITION, + 'internal position' => PGSQL_DIAG_INTERNAL_POSITION, + 'internal query' => PGSQL_DIAG_INTERNAL_QUERY, + 'context' => PGSQL_DIAG_CONTEXT, + 'file' => PGSQL_DIAG_SOURCE_FILE, + 'line' => PGSQL_DIAG_SOURCE_LINE, + 'function' => PGSQL_DIAG_SOURCE_FUNCTION, + ); + + public static function castLargeObject($lo, array $a, Stub $stub, $isNested) + { + $a['seek position'] = pg_lo_tell($lo); + + return $a; + } + + public static function castLink($link, array $a, Stub $stub, $isNested) + { + $a['status'] = pg_connection_status($link); + $a['status'] = new ConstStub(PGSQL_CONNECTION_OK === $a['status'] ? 'PGSQL_CONNECTION_OK' : 'PGSQL_CONNECTION_BAD', $a['status']); + $a['busy'] = pg_connection_busy($link); + + $a['transaction'] = pg_transaction_status($link); + if (isset(self::$transactionStatus[$a['transaction']])) { + $a['transaction'] = new ConstStub(self::$transactionStatus[$a['transaction']], $a['transaction']); + } + + $a['pid'] = pg_get_pid($link); + $a['last error'] = pg_last_error($link); + $a['last notice'] = pg_last_notice($link); + $a['host'] = pg_host($link); + $a['port'] = pg_port($link); + $a['dbname'] = pg_dbname($link); + $a['options'] = pg_options($link); + $a['version'] = pg_version($link); + + foreach (self::$paramCodes as $v) { + if (false !== $s = pg_parameter_status($link, $v)) { + $a['param'][$v] = $s; + } + } + + $a['param']['client_encoding'] = pg_client_encoding($link); + $a['param'] = new EnumStub($a['param']); + + return $a; + } + + public static function castResult($result, array $a, Stub $stub, $isNested) + { + $a['num rows'] = pg_num_rows($result); + $a['status'] = pg_result_status($result); + if (isset(self::$resultStatus[$a['status']])) { + $a['status'] = new ConstStub(self::$resultStatus[$a['status']], $a['status']); + } + $a['command-completion tag'] = pg_result_status($result, PGSQL_STATUS_STRING); + + if (-1 === $a['num rows']) { + foreach (self::$diagCodes as $k => $v) { + $a['error'][$k] = pg_result_error_field($result, $v); + } + } + + $a['affected rows'] = pg_affected_rows($result); + $a['last OID'] = pg_last_oid($result); + + $fields = pg_num_fields($result); + + for ($i = 0; $i < $fields; ++$i) { + $field = array( + 'name' => pg_field_name($result, $i), + 'table' => sprintf('%s (OID: %s)', pg_field_table($result, $i), pg_field_table($result, $i, true)), + 'type' => sprintf('%s (OID: %s)', pg_field_type($result, $i), pg_field_type_oid($result, $i)), + 'nullable' => (bool) pg_field_is_null($result, $i), + 'storage' => pg_field_size($result, $i).' bytes', + 'display' => pg_field_prtlen($result, $i).' chars', + ); + if (' (OID: )' === $field['table']) { + $field['table'] = null; + } + if ('-1 bytes' === $field['storage']) { + $field['storage'] = 'variable size'; + } elseif ('1 bytes' === $field['storage']) { + $field['storage'] = '1 byte'; + } + if ('1 chars' === $field['display']) { + $field['display'] = '1 char'; + } + $a['fields'][] = new EnumStub($field); + } + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/ReflectionCaster.php b/htdocs/includes/symfony/var-dumper/Caster/ReflectionCaster.php new file mode 100644 index 00000000000..936e11982ee --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/ReflectionCaster.php @@ -0,0 +1,310 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts Reflector related classes to array representation. + * + * @author Nicolas Grekas + */ +class ReflectionCaster +{ + private static $extraMap = array( + 'docComment' => 'getDocComment', + 'extension' => 'getExtensionName', + 'isDisabled' => 'isDisabled', + 'isDeprecated' => 'isDeprecated', + 'isInternal' => 'isInternal', + 'isUserDefined' => 'isUserDefined', + 'isGenerator' => 'isGenerator', + 'isVariadic' => 'isVariadic', + ); + + public static function castClosure(\Closure $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $c = new \ReflectionFunction($c); + + $stub->class = 'Closure'; // HHVM generates unique class names for closures + $a = static::castFunctionAbstract($c, $a, $stub, $isNested); + + if (isset($a[$prefix.'parameters'])) { + foreach ($a[$prefix.'parameters']->value as &$v) { + $param = $v; + $v = new EnumStub(array()); + foreach (static::castParameter($param, array(), $stub, true) as $k => $param) { + if ("\0" === $k[0]) { + $v->value[substr($k, 3)] = $param; + } + } + unset($v->value['position'], $v->value['isVariadic'], $v->value['byReference'], $v); + } + } + + if ($f = $c->getFileName()) { + $a[$prefix.'file'] = $f; + $a[$prefix.'line'] = $c->getStartLine().' to '.$c->getEndLine(); + } + + $prefix = Caster::PREFIX_DYNAMIC; + unset($a['name'], $a[$prefix.'0'], $a[$prefix.'this'], $a[$prefix.'parameter'], $a[Caster::PREFIX_VIRTUAL.'extra']); + + return $a; + } + + public static function castGenerator(\Generator $c, array $a, Stub $stub, $isNested) + { + return class_exists('ReflectionGenerator', false) ? self::castReflectionGenerator(new \ReflectionGenerator($c), $a, $stub, $isNested) : $a; + } + + public static function castType(\ReflectionType $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + $a += array( + $prefix.'type' => $c->__toString(), + $prefix.'allowsNull' => $c->allowsNull(), + $prefix.'isBuiltin' => $c->isBuiltin(), + ); + + return $a; + } + + public static function castReflectionGenerator(\ReflectionGenerator $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($c->getThis()) { + $a[$prefix.'this'] = new CutStub($c->getThis()); + } + $x = $c->getFunction(); + $frame = array( + 'class' => isset($x->class) ? $x->class : null, + 'type' => isset($x->class) ? ($x->isStatic() ? '::' : '->') : null, + 'function' => $x->name, + 'file' => $c->getExecutingFile(), + 'line' => $c->getExecutingLine(), + ); + if ($trace = $c->getTrace(DEBUG_BACKTRACE_IGNORE_ARGS)) { + $x = new \ReflectionGenerator($c->getExecutingGenerator()); + array_unshift($trace, array( + 'function' => 'yield', + 'file' => $x->getExecutingFile(), + 'line' => $x->getExecutingLine() - 1, + )); + $trace[] = $frame; + $a[$prefix.'trace'] = new TraceStub($trace, false, 0, -1, -1); + } else { + $x = new FrameStub($frame, false, true); + $x = ExceptionCaster::castFrameStub($x, array(), $x, true); + $a[$prefix.'executing'] = new EnumStub(array( + $frame['class'].$frame['type'].$frame['function'].'()' => $x[$prefix.'src'], + )); + } + + return $a; + } + + public static function castClass(\ReflectionClass $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + if ($n = \Reflection::getModifierNames($c->getModifiers())) { + $a[$prefix.'modifiers'] = implode(' ', $n); + } + + self::addMap($a, $c, array( + 'extends' => 'getParentClass', + 'implements' => 'getInterfaceNames', + 'constants' => 'getConstants', + )); + + foreach ($c->getProperties() as $n) { + $a[$prefix.'properties'][$n->name] = $n; + } + + foreach ($c->getMethods() as $n) { + $a[$prefix.'methods'][$n->name] = $n; + } + + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + + return $a; + } + + public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, array $a, Stub $stub, $isNested, $filter = 0) + { + $prefix = Caster::PREFIX_VIRTUAL; + + self::addMap($a, $c, array( + 'returnsReference' => 'returnsReference', + 'returnType' => 'getReturnType', + 'class' => 'getClosureScopeClass', + 'this' => 'getClosureThis', + )); + + if (isset($a[$prefix.'returnType'])) { + $a[$prefix.'returnType'] = (string) $a[$prefix.'returnType']; + } + if (isset($a[$prefix.'this'])) { + $a[$prefix.'this'] = new CutStub($a[$prefix.'this']); + } + + foreach ($c->getParameters() as $v) { + $k = '$'.$v->name; + if ($v->isPassedByReference()) { + $k = '&'.$k; + } + if (method_exists($v, 'isVariadic') && $v->isVariadic()) { + $k = '...'.$k; + } + $a[$prefix.'parameters'][$k] = $v; + } + if (isset($a[$prefix.'parameters'])) { + $a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']); + } + + if ($v = $c->getStaticVariables()) { + foreach ($v as $k => &$v) { + $a[$prefix.'use']['$'.$k] = &$v; + } + unset($v); + $a[$prefix.'use'] = new EnumStub($a[$prefix.'use']); + } + + if (!($filter & Caster::EXCLUDE_VERBOSE) && !$isNested) { + self::addExtra($a, $c); + } + + // Added by HHVM + unset($a[Caster::PREFIX_DYNAMIC.'static']); + + return $a; + } + + public static function castMethod(\ReflectionMethod $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + + return $a; + } + + public static function castParameter(\ReflectionParameter $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + + // Added by HHVM + unset($a['info']); + + self::addMap($a, $c, array( + 'position' => 'getPosition', + 'isVariadic' => 'isVariadic', + 'byReference' => 'isPassedByReference', + )); + + try { + if (method_exists($c, 'hasType')) { + if ($c->hasType()) { + $a[$prefix.'typeHint'] = $c->getType()->__toString(); + } + } elseif ($c->isArray()) { + $a[$prefix.'typeHint'] = 'array'; + } elseif (method_exists($c, 'isCallable') && $c->isCallable()) { + $a[$prefix.'typeHint'] = 'callable'; + } elseif ($v = $c->getClass()) { + $a[$prefix.'typeHint'] = $v->name; + } + } catch (\ReflectionException $e) { + if (preg_match('/^Class ([^ ]++) does not exist$/', $e->getMessage(), $m)) { + $a[$prefix.'typeHint'] = $m[1]; + } + } + + try { + $a[$prefix.'default'] = $v = $c->getDefaultValue(); + if (method_exists($c, 'isDefaultValueConstant') && $c->isDefaultValueConstant()) { + $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); + } + } catch (\ReflectionException $e) { + if (isset($a[$prefix.'typeHint']) && $c->allowsNull()) { + $a[$prefix.'default'] = null; + } + } + + return $a; + } + + public static function castProperty(\ReflectionProperty $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'modifiers'] = implode(' ', \Reflection::getModifierNames($c->getModifiers())); + self::addExtra($a, $c); + + return $a; + } + + public static function castExtension(\ReflectionExtension $c, array $a, Stub $stub, $isNested) + { + self::addMap($a, $c, array( + 'version' => 'getVersion', + 'dependencies' => 'getDependencies', + 'iniEntries' => 'getIniEntries', + 'isPersistent' => 'isPersistent', + 'isTemporary' => 'isTemporary', + 'constants' => 'getConstants', + 'functions' => 'getFunctions', + 'classes' => 'getClasses', + )); + + return $a; + } + + public static function castZendExtension(\ReflectionZendExtension $c, array $a, Stub $stub, $isNested) + { + self::addMap($a, $c, array( + 'version' => 'getVersion', + 'author' => 'getAuthor', + 'copyright' => 'getCopyright', + 'url' => 'getURL', + )); + + return $a; + } + + private static function addExtra(&$a, \Reflector $c) + { + $x = isset($a[Caster::PREFIX_VIRTUAL.'extra']) ? $a[Caster::PREFIX_VIRTUAL.'extra']->value : array(); + + if (method_exists($c, 'getFileName') && $m = $c->getFileName()) { + $x['file'] = $m; + $x['line'] = $c->getStartLine().' to '.$c->getEndLine(); + } + + self::addMap($x, $c, self::$extraMap, ''); + + if ($x) { + $a[Caster::PREFIX_VIRTUAL.'extra'] = new EnumStub($x); + } + } + + private static function addMap(&$a, \Reflector $c, $map, $prefix = Caster::PREFIX_VIRTUAL) + { + foreach ($map as $k => $m) { + if (method_exists($c, $m) && false !== ($m = $c->$m()) && null !== $m) { + $a[$prefix.$k] = $m instanceof \Reflector ? $m->name : $m; + } + } + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/ResourceCaster.php b/htdocs/includes/symfony/var-dumper/Caster/ResourceCaster.php new file mode 100644 index 00000000000..903641f69c6 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/ResourceCaster.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts common resource types to array representation. + * + * @author Nicolas Grekas + */ +class ResourceCaster +{ + public static function castCurl($h, array $a, Stub $stub, $isNested) + { + return curl_getinfo($h); + } + + public static function castDba($dba, array $a, Stub $stub, $isNested) + { + $list = dba_list(); + $a['file'] = $list[(int) $dba]; + + return $a; + } + + public static function castProcess($process, array $a, Stub $stub, $isNested) + { + return proc_get_status($process); + } + + public static function castStream($stream, array $a, Stub $stub, $isNested) + { + return stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested); + } + + public static function castStreamContext($stream, array $a, Stub $stub, $isNested) + { + return stream_context_get_params($stream); + } + + public static function castGd($gd, array $a, Stub $stub, $isNested) + { + $a['size'] = imagesx($gd).'x'.imagesy($gd); + $a['trueColor'] = imageistruecolor($gd); + + return $a; + } + + public static function castMysqlLink($h, array $a, Stub $stub, $isNested) + { + $a['host'] = mysql_get_host_info($h); + $a['protocol'] = mysql_get_proto_info($h); + $a['server'] = mysql_get_server_info($h); + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/SplCaster.php b/htdocs/includes/symfony/var-dumper/Caster/SplCaster.php new file mode 100644 index 00000000000..97f21463821 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/SplCaster.php @@ -0,0 +1,203 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts SPL related classes to array representation. + * + * @author Nicolas Grekas + */ +class SplCaster +{ + private static $splFileObjectFlags = array( + \SplFileObject::DROP_NEW_LINE => 'DROP_NEW_LINE', + \SplFileObject::READ_AHEAD => 'READ_AHEAD', + \SplFileObject::SKIP_EMPTY => 'SKIP_EMPTY', + \SplFileObject::READ_CSV => 'READ_CSV', + ); + + public static function castArrayObject(\ArrayObject $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $class = $stub->class; + $flags = $c->getFlags(); + + $b = array( + $prefix.'flag::STD_PROP_LIST' => (bool) ($flags & \ArrayObject::STD_PROP_LIST), + $prefix.'flag::ARRAY_AS_PROPS' => (bool) ($flags & \ArrayObject::ARRAY_AS_PROPS), + $prefix.'iteratorClass' => $c->getIteratorClass(), + $prefix.'storage' => $c->getArrayCopy(), + ); + + if ($class === 'ArrayObject') { + $a = $b; + } else { + if (!($flags & \ArrayObject::STD_PROP_LIST)) { + $c->setFlags(\ArrayObject::STD_PROP_LIST); + $a = Caster::castObject($c, new \ReflectionClass($class)); + $c->setFlags($flags); + } + + $a += $b; + } + + return $a; + } + + public static function castHeap(\Iterator $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'heap' => iterator_to_array(clone $c), + ); + + return $a; + } + + public static function castDoublyLinkedList(\SplDoublyLinkedList $c, array $a, Stub $stub, $isNested) + { + $prefix = Caster::PREFIX_VIRTUAL; + $mode = $c->getIteratorMode(); + $c->setIteratorMode(\SplDoublyLinkedList::IT_MODE_KEEP | $mode & ~\SplDoublyLinkedList::IT_MODE_DELETE); + + $a += array( + $prefix.'mode' => new ConstStub((($mode & \SplDoublyLinkedList::IT_MODE_LIFO) ? 'IT_MODE_LIFO' : 'IT_MODE_FIFO').' | '.(($mode & \SplDoublyLinkedList::IT_MODE_KEEP) ? 'IT_MODE_KEEP' : 'IT_MODE_DELETE'), $mode), + $prefix.'dllist' => iterator_to_array($c), + ); + $c->setIteratorMode($mode); + + return $a; + } + + public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'path' => 'getPath', + 'filename' => 'getFilename', + 'basename' => 'getBasename', + 'pathname' => 'getPathname', + 'extension' => 'getExtension', + 'realPath' => 'getRealPath', + 'aTime' => 'getATime', + 'mTime' => 'getMTime', + 'cTime' => 'getCTime', + 'inode' => 'getInode', + 'size' => 'getSize', + 'perms' => 'getPerms', + 'owner' => 'getOwner', + 'group' => 'getGroup', + 'type' => 'getType', + 'writable' => 'isWritable', + 'readable' => 'isReadable', + 'executable' => 'isExecutable', + 'file' => 'isFile', + 'dir' => 'isDir', + 'link' => 'isLink', + 'linkTarget' => 'getLinkTarget', + ); + + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if (isset($a[$prefix.'perms'])) { + $a[$prefix.'perms'] = new ConstStub(sprintf('0%o', $a[$prefix.'perms']), $a[$prefix.'perms']); + } + + static $mapDate = array('aTime', 'mTime', 'cTime'); + foreach ($mapDate as $key) { + if (isset($a[$prefix.$key])) { + $a[$prefix.$key] = new ConstStub(date('Y-m-d H:i:s', $a[$prefix.$key]), $a[$prefix.$key]); + } + } + + return $a; + } + + public static function castFileObject(\SplFileObject $c, array $a, Stub $stub, $isNested) + { + static $map = array( + 'csvControl' => 'getCsvControl', + 'flags' => 'getFlags', + 'maxLineLen' => 'getMaxLineLen', + 'fstat' => 'fstat', + 'eof' => 'eof', + 'key' => 'key', + ); + + $prefix = Caster::PREFIX_VIRTUAL; + + foreach ($map as $key => $accessor) { + try { + $a[$prefix.$key] = $c->$accessor(); + } catch (\Exception $e) { + } + } + + if (isset($a[$prefix.'flags'])) { + $flagsArray = array(); + foreach (self::$splFileObjectFlags as $value => $name) { + if ($a[$prefix.'flags'] & $value) { + $flagsArray[] = $name; + } + } + $a[$prefix.'flags'] = new ConstStub(implode('|', $flagsArray), $a[$prefix.'flags']); + } + + if (isset($a[$prefix.'fstat'])) { + $a[$prefix.'fstat'] = new CutArrayStub($a[$prefix.'fstat'], array('dev', 'ino', 'nlink', 'rdev', 'blksize', 'blocks')); + } + + return $a; + } + + public static function castFixedArray(\SplFixedArray $c, array $a, Stub $stub, $isNested) + { + $a += array( + Caster::PREFIX_VIRTUAL.'storage' => $c->toArray(), + ); + + return $a; + } + + public static function castObjectStorage(\SplObjectStorage $c, array $a, Stub $stub, $isNested) + { + $storage = array(); + unset($a[Caster::PREFIX_DYNAMIC."\0gcdata"]); // Don't hit https://bugs.php.net/65967 + + foreach ($c as $obj) { + $storage[spl_object_hash($obj)] = array( + 'object' => $obj, + 'info' => $c->getInfo(), + ); + } + + $a += array( + Caster::PREFIX_VIRTUAL.'storage' => $storage, + ); + + return $a; + } + + public static function castOuterIterator(\OuterIterator $c, array $a, Stub $stub, $isNested) + { + $a[Caster::PREFIX_VIRTUAL.'innerIterator'] = $c->getInnerIterator(); + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/StubCaster.php b/htdocs/includes/symfony/var-dumper/Caster/StubCaster.php new file mode 100644 index 00000000000..ebad5ba9844 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/StubCaster.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts a caster's Stub. + * + * @author Nicolas Grekas + */ +class StubCaster +{ + public static function castStub(Stub $c, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->type = $c->type; + $stub->class = $c->class; + $stub->value = $c->value; + $stub->handle = $c->handle; + $stub->cut = $c->cut; + + return array(); + } + } + + public static function castCutArray(CutArrayStub $c, array $a, Stub $stub, $isNested) + { + return $isNested ? $c->preservedSubset : $a; + } + + public static function cutInternals($obj, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->cut += count($a); + + return array(); + } + + return $a; + } + + public static function castEnum(EnumStub $c, array $a, Stub $stub, $isNested) + { + if ($isNested) { + $stub->class = ''; + $stub->handle = 0; + $stub->value = null; + + $a = array(); + + if ($c->value) { + foreach (array_keys($c->value) as $k) { + $keys[] = Caster::PREFIX_VIRTUAL.$k; + } + // Preserve references with array_combine() + $a = array_combine($keys, $c->value); + } + } + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/TraceStub.php b/htdocs/includes/symfony/var-dumper/Caster/TraceStub.php new file mode 100644 index 00000000000..59548acaee6 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/TraceStub.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Represents a backtrace as returned by debug_backtrace() or Exception->getTrace(). + * + * @author Nicolas Grekas + */ +class TraceStub extends Stub +{ + public $keepArgs; + public $sliceOffset; + public $sliceLength; + public $numberingOffset; + + public function __construct(array $trace, $keepArgs = true, $sliceOffset = 0, $sliceLength = null, $numberingOffset = 0) + { + $this->value = $trace; + $this->keepArgs = $keepArgs; + $this->sliceOffset = $sliceOffset; + $this->sliceLength = $sliceLength; + $this->numberingOffset = $numberingOffset; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Caster/XmlResourceCaster.php b/htdocs/includes/symfony/var-dumper/Caster/XmlResourceCaster.php new file mode 100644 index 00000000000..5d0207ee81d --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Caster/XmlResourceCaster.php @@ -0,0 +1,61 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Caster; + +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * Casts XML resources to array representation. + * + * @author Nicolas Grekas + */ +class XmlResourceCaster +{ + private static $xmlErrors = array( + XML_ERROR_NONE => 'XML_ERROR_NONE', + XML_ERROR_NO_MEMORY => 'XML_ERROR_NO_MEMORY', + XML_ERROR_SYNTAX => 'XML_ERROR_SYNTAX', + XML_ERROR_NO_ELEMENTS => 'XML_ERROR_NO_ELEMENTS', + XML_ERROR_INVALID_TOKEN => 'XML_ERROR_INVALID_TOKEN', + XML_ERROR_UNCLOSED_TOKEN => 'XML_ERROR_UNCLOSED_TOKEN', + XML_ERROR_PARTIAL_CHAR => 'XML_ERROR_PARTIAL_CHAR', + XML_ERROR_TAG_MISMATCH => 'XML_ERROR_TAG_MISMATCH', + XML_ERROR_DUPLICATE_ATTRIBUTE => 'XML_ERROR_DUPLICATE_ATTRIBUTE', + XML_ERROR_JUNK_AFTER_DOC_ELEMENT => 'XML_ERROR_JUNK_AFTER_DOC_ELEMENT', + XML_ERROR_PARAM_ENTITY_REF => 'XML_ERROR_PARAM_ENTITY_REF', + XML_ERROR_UNDEFINED_ENTITY => 'XML_ERROR_UNDEFINED_ENTITY', + XML_ERROR_RECURSIVE_ENTITY_REF => 'XML_ERROR_RECURSIVE_ENTITY_REF', + XML_ERROR_ASYNC_ENTITY => 'XML_ERROR_ASYNC_ENTITY', + XML_ERROR_BAD_CHAR_REF => 'XML_ERROR_BAD_CHAR_REF', + XML_ERROR_BINARY_ENTITY_REF => 'XML_ERROR_BINARY_ENTITY_REF', + XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF => 'XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF', + XML_ERROR_MISPLACED_XML_PI => 'XML_ERROR_MISPLACED_XML_PI', + XML_ERROR_UNKNOWN_ENCODING => 'XML_ERROR_UNKNOWN_ENCODING', + XML_ERROR_INCORRECT_ENCODING => 'XML_ERROR_INCORRECT_ENCODING', + XML_ERROR_UNCLOSED_CDATA_SECTION => 'XML_ERROR_UNCLOSED_CDATA_SECTION', + XML_ERROR_EXTERNAL_ENTITY_HANDLING => 'XML_ERROR_EXTERNAL_ENTITY_HANDLING', + ); + + public static function castXml($h, array $a, Stub $stub, $isNested) + { + $a['current_byte_index'] = xml_get_current_byte_index($h); + $a['current_column_number'] = xml_get_current_column_number($h); + $a['current_line_number'] = xml_get_current_line_number($h); + $a['error_code'] = xml_get_error_code($h); + + if (isset(self::$xmlErrors[$a['error_code']])) { + $a['error_code'] = new ConstStub(self::$xmlErrors[$a['error_code']], $a['error_code']); + } + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/AbstractCloner.php b/htdocs/includes/symfony/var-dumper/Cloner/AbstractCloner.php new file mode 100644 index 00000000000..2807ceb935b --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Cloner/AbstractCloner.php @@ -0,0 +1,313 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +use Symfony\Component\VarDumper\Caster\Caster; +use Symfony\Component\VarDumper\Exception\ThrowingCasterException; + +/** + * AbstractCloner implements a generic caster mechanism for objects and resources. + * + * @author Nicolas Grekas + */ +abstract class AbstractCloner implements ClonerInterface +{ + public static $defaultCasters = array( + 'Symfony\Component\VarDumper\Caster\CutStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', + 'Symfony\Component\VarDumper\Caster\CutArrayStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castCutArray', + 'Symfony\Component\VarDumper\Caster\ConstStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castStub', + 'Symfony\Component\VarDumper\Caster\EnumStub' => 'Symfony\Component\VarDumper\Caster\StubCaster::castEnum', + + 'Closure' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClosure', + 'Generator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castGenerator', + 'ReflectionType' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castType', + 'ReflectionGenerator' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castReflectionGenerator', + 'ReflectionClass' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castClass', + 'ReflectionFunctionAbstract' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castFunctionAbstract', + 'ReflectionMethod' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castMethod', + 'ReflectionParameter' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castParameter', + 'ReflectionProperty' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castProperty', + 'ReflectionExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castExtension', + 'ReflectionZendExtension' => 'Symfony\Component\VarDumper\Caster\ReflectionCaster::castZendExtension', + + 'Doctrine\Common\Persistence\ObjectManager' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Doctrine\Common\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castCommonProxy', + 'Doctrine\ORM\Proxy\Proxy' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castOrmProxy', + 'Doctrine\ORM\PersistentCollection' => 'Symfony\Component\VarDumper\Caster\DoctrineCaster::castPersistentCollection', + + 'DOMException' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castException', + 'DOMStringList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNameList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMImplementation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castImplementation', + 'DOMImplementationList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNode', + 'DOMNameSpaceNode' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNameSpaceNode', + 'DOMDocument' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocument', + 'DOMNodeList' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMNamedNodeMap' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLength', + 'DOMCharacterData' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castCharacterData', + 'DOMAttr' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castAttr', + 'DOMElement' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castElement', + 'DOMText' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castText', + 'DOMTypeinfo' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castTypeinfo', + 'DOMDomError' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDomError', + 'DOMLocator' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castLocator', + 'DOMDocumentType' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castDocumentType', + 'DOMNotation' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castNotation', + 'DOMEntity' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castEntity', + 'DOMProcessingInstruction' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castProcessingInstruction', + 'DOMXPath' => 'Symfony\Component\VarDumper\Caster\DOMCaster::castXPath', + + 'ErrorException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castErrorException', + 'Exception' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castException', + 'Error' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castError', + 'Symfony\Component\DependencyInjection\ContainerInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Symfony\Component\VarDumper\Exception\ThrowingCasterException' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castThrowingCasterException', + 'Symfony\Component\VarDumper\Caster\TraceStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castTraceStub', + 'Symfony\Component\VarDumper\Caster\FrameStub' => 'Symfony\Component\VarDumper\Caster\ExceptionCaster::castFrameStub', + + 'PHPUnit_Framework_MockObject_MockObject' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Prophecy\Prophecy\ProphecySubjectInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + 'Mockery\MockInterface' => 'Symfony\Component\VarDumper\Caster\StubCaster::cutInternals', + + 'PDO' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdo', + 'PDOStatement' => 'Symfony\Component\VarDumper\Caster\PdoCaster::castPdoStatement', + + 'AMQPConnection' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castConnection', + 'AMQPChannel' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castChannel', + 'AMQPQueue' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castQueue', + 'AMQPExchange' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castExchange', + 'AMQPEnvelope' => 'Symfony\Component\VarDumper\Caster\AmqpCaster::castEnvelope', + + 'ArrayObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castArrayObject', + 'SplDoublyLinkedList' => 'Symfony\Component\VarDumper\Caster\SplCaster::castDoublyLinkedList', + 'SplFileInfo' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileInfo', + 'SplFileObject' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFileObject', + 'SplFixedArray' => 'Symfony\Component\VarDumper\Caster\SplCaster::castFixedArray', + 'SplHeap' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', + 'SplObjectStorage' => 'Symfony\Component\VarDumper\Caster\SplCaster::castObjectStorage', + 'SplPriorityQueue' => 'Symfony\Component\VarDumper\Caster\SplCaster::castHeap', + 'OuterIterator' => 'Symfony\Component\VarDumper\Caster\SplCaster::castOuterIterator', + + 'MongoCursorInterface' => 'Symfony\Component\VarDumper\Caster\MongoCaster::castCursor', + + ':curl' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castCurl', + ':dba' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', + ':dba persistent' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castDba', + ':gd' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castGd', + ':mysql link' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castMysqlLink', + ':pgsql large object' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLargeObject', + ':pgsql link' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', + ':pgsql link persistent' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castLink', + ':pgsql result' => 'Symfony\Component\VarDumper\Caster\PgSqlCaster::castResult', + ':process' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castProcess', + ':stream' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStream', + ':stream-context' => 'Symfony\Component\VarDumper\Caster\ResourceCaster::castStreamContext', + ':xml' => 'Symfony\Component\VarDumper\Caster\XmlResourceCaster::castXml', + ); + + protected $maxItems = 2500; + protected $maxString = -1; + protected $useExt; + + private $casters = array(); + private $prevErrorHandler; + private $classInfo = array(); + private $filter = 0; + + /** + * @param callable[]|null $casters A map of casters. + * + * @see addCasters + */ + public function __construct(array $casters = null) + { + if (null === $casters) { + $casters = static::$defaultCasters; + } + $this->addCasters($casters); + $this->useExt = extension_loaded('symfony_debug'); + } + + /** + * Adds casters for resources and objects. + * + * Maps resources or objects types to a callback. + * Types are in the key, with a callable caster for value. + * Resource types are to be prefixed with a `:`, + * see e.g. static::$defaultCasters. + * + * @param callable[] $casters A map of casters. + */ + public function addCasters(array $casters) + { + foreach ($casters as $type => $callback) { + $this->casters[strtolower($type)][] = $callback; + } + } + + /** + * Sets the maximum number of items to clone past the first level in nested structures. + * + * @param int $maxItems + */ + public function setMaxItems($maxItems) + { + $this->maxItems = (int) $maxItems; + } + + /** + * Sets the maximum cloned length for strings. + * + * @param int $maxString + */ + public function setMaxString($maxString) + { + $this->maxString = (int) $maxString; + } + + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable. + * @param int $filter A bit field of Caster::EXCLUDE_* constants. + * + * @return Data The cloned variable represented by a Data object. + */ + public function cloneVar($var, $filter = 0) + { + $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context) { + if (E_RECOVERABLE_ERROR === $type || E_USER_ERROR === $type) { + // Cloner never dies + throw new \ErrorException($msg, 0, $type, $file, $line); + } + + if ($this->prevErrorHandler) { + return call_user_func($this->prevErrorHandler, $type, $msg, $file, $line, $context); + } + + return false; + }); + $this->filter = $filter; + + try { + $data = $this->doClone($var); + } catch (\Exception $e) { + } + restore_error_handler(); + $this->prevErrorHandler = null; + + if (isset($e)) { + throw $e; + } + + return new Data($data); + } + + /** + * Effectively clones the PHP variable. + * + * @param mixed $var Any PHP variable. + * + * @return array The cloned variable represented in an array. + */ + abstract protected function doClone($var); + + /** + * Casts an object to an array representation. + * + * @param Stub $stub The Stub for the casted object. + * @param bool $isNested True if the object is nested in the dumped structure. + * + * @return array The object casted as array. + */ + protected function castObject(Stub $stub, $isNested) + { + $obj = $stub->value; + $class = $stub->class; + + if (isset($class[15]) && "\0" === $class[15] && 0 === strpos($class, "class@anonymous\x00")) { + $stub->class = get_parent_class($class).'@anonymous'; + } + if (isset($this->classInfo[$class])) { + $classInfo = $this->classInfo[$class]; + } else { + $classInfo = array( + new \ReflectionClass($class), + array_reverse(array($class => $class) + class_parents($class) + class_implements($class) + array('*' => '*')), + ); + + $this->classInfo[$class] = $classInfo; + } + + $a = $this->callCaster('Symfony\Component\VarDumper\Caster\Caster::castObject', $obj, $classInfo[0], null, $isNested); + + foreach ($classInfo[1] as $p) { + if (!empty($this->casters[$p = strtolower($p)])) { + foreach ($this->casters[$p] as $p) { + $a = $this->callCaster($p, $obj, $a, $stub, $isNested); + } + } + } + + return $a; + } + + /** + * Casts a resource to an array representation. + * + * @param Stub $stub The Stub for the casted resource. + * @param bool $isNested True if the object is nested in the dumped structure. + * + * @return array The resource casted as array. + */ + protected function castResource(Stub $stub, $isNested) + { + $a = array(); + $res = $stub->value; + $type = $stub->class; + + if (!empty($this->casters[':'.$type])) { + foreach ($this->casters[':'.$type] as $c) { + $a = $this->callCaster($c, $res, $a, $stub, $isNested); + } + } + + return $a; + } + + /** + * Calls a custom caster. + * + * @param callable $callback The caster. + * @param object|resource $obj The object/resource being casted. + * @param array $a The result of the previous cast for chained casters. + * @param Stub $stub The Stub for the casted object/resource. + * @param bool $isNested True if $obj is nested in the dumped structure. + * + * @return array The casted object/resource. + */ + private function callCaster($callback, $obj, $a, $stub, $isNested) + { + try { + $cast = call_user_func($callback, $obj, $a, $stub, $isNested, $this->filter); + + if (is_array($cast)) { + $a = $cast; + } + } catch (\Exception $e) { + $a[(Stub::TYPE_OBJECT === $stub->type ? Caster::PREFIX_VIRTUAL : '').'⚠'] = new ThrowingCasterException($e); + } + + return $a; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/ClonerInterface.php b/htdocs/includes/symfony/var-dumper/Cloner/ClonerInterface.php new file mode 100644 index 00000000000..c1df5933dbf --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Cloner/ClonerInterface.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +interface ClonerInterface +{ + /** + * Clones a PHP variable. + * + * @param mixed $var Any PHP variable. + * + * @return Data The cloned variable represented by a Data object. + */ + public function cloneVar($var); +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/Cursor.php b/htdocs/includes/symfony/var-dumper/Cloner/Cursor.php new file mode 100644 index 00000000000..162f3293cf2 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Cloner/Cursor.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * Represents the current state of a dumper while dumping. + * + * @author Nicolas Grekas + */ +class Cursor +{ + const HASH_INDEXED = Stub::ARRAY_INDEXED; + const HASH_ASSOC = Stub::ARRAY_ASSOC; + const HASH_OBJECT = Stub::TYPE_OBJECT; + const HASH_RESOURCE = Stub::TYPE_RESOURCE; + + public $depth = 0; + public $refIndex = 0; + public $softRefTo = 0; + public $softRefCount = 0; + public $softRefHandle = 0; + public $hardRefTo = 0; + public $hardRefCount = 0; + public $hardRefHandle = 0; + public $hashType; + public $hashKey; + public $hashKeyIsBinary; + public $hashIndex = 0; + public $hashLength = 0; + public $hashCut = 0; + public $stop = false; +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/Data.php b/htdocs/includes/symfony/var-dumper/Cloner/Data.php new file mode 100644 index 00000000000..43a7b67971e --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Cloner/Data.php @@ -0,0 +1,218 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +class Data +{ + private $data; + private $maxDepth = 20; + private $maxItemsPerDepth = -1; + private $useRefHandles = -1; + + /** + * @param array $data A array as returned by ClonerInterface::cloneVar(). + */ + public function __construct(array $data) + { + $this->data = $data; + } + + /** + * @return array The raw data structure. + */ + public function getRawData() + { + return $this->data; + } + + /** + * Returns a depth limited clone of $this. + * + * @param int $maxDepth The max dumped depth level. + * + * @return self A clone of $this. + */ + public function withMaxDepth($maxDepth) + { + $data = clone $this; + $data->maxDepth = (int) $maxDepth; + + return $data; + } + + /** + * Limits the numbers of elements per depth level. + * + * @param int $maxItemsPerDepth The max number of items dumped per depth level. + * + * @return self A clone of $this. + */ + public function withMaxItemsPerDepth($maxItemsPerDepth) + { + $data = clone $this; + $data->maxItemsPerDepth = (int) $maxItemsPerDepth; + + return $data; + } + + /** + * Enables/disables objects' identifiers tracking. + * + * @param bool $useRefHandles False to hide global ref. handles. + * + * @return self A clone of $this. + */ + public function withRefHandles($useRefHandles) + { + $data = clone $this; + $data->useRefHandles = $useRefHandles ? -1 : 0; + + return $data; + } + + /** + * Dumps data with a DumperInterface dumper. + */ + public function dump(DumperInterface $dumper) + { + $refs = array(0); + $this->dumpItem($dumper, new Cursor(), $refs, $this->data[0][0]); + } + + /** + * Depth-first dumping of items. + * + * @param DumperInterface $dumper The dumper being used for dumping. + * @param Cursor $cursor A cursor used for tracking dumper state position. + * @param array &$refs A map of all references discovered while dumping. + * @param mixed $item A Stub object or the original value being dumped. + */ + private function dumpItem($dumper, $cursor, &$refs, $item) + { + $cursor->refIndex = 0; + $cursor->softRefTo = $cursor->softRefHandle = $cursor->softRefCount = 0; + $cursor->hardRefTo = $cursor->hardRefHandle = $cursor->hardRefCount = 0; + $firstSeen = true; + + if (!$item instanceof Stub) { + $type = gettype($item); + } elseif (Stub::TYPE_REF === $item->type) { + if ($item->handle) { + if (!isset($refs[$r = $item->handle - (PHP_INT_MAX >> 1)])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->hardRefTo = $refs[$r]; + $cursor->hardRefHandle = $this->useRefHandles & $item->handle; + $cursor->hardRefCount = $item->refCount; + } + $type = $item->class ?: gettype($item->value); + $item = $item->value; + } + if ($item instanceof Stub) { + if ($item->refCount) { + if (!isset($refs[$r = $item->handle])) { + $cursor->refIndex = $refs[$r] = $cursor->refIndex ?: ++$refs[0]; + } else { + $firstSeen = false; + } + $cursor->softRefTo = $refs[$r]; + } + $cursor->softRefHandle = $this->useRefHandles & $item->handle; + $cursor->softRefCount = $item->refCount; + $cut = $item->cut; + + if ($item->position && $firstSeen) { + $children = $this->data[$item->position]; + + if ($cursor->stop) { + if ($cut >= 0) { + $cut += count($children); + } + $children = array(); + } + } else { + $children = array(); + } + switch ($item->type) { + case Stub::TYPE_STRING: + $dumper->dumpString($cursor, $item->value, Stub::STRING_BINARY === $item->class, $cut); + break; + + case Stub::TYPE_ARRAY: + $item = clone $item; + $item->type = $item->class; + $item->class = $item->value; + // No break; + case Stub::TYPE_OBJECT: + case Stub::TYPE_RESOURCE: + $withChildren = $children && $cursor->depth !== $this->maxDepth && $this->maxItemsPerDepth; + $dumper->enterHash($cursor, $item->type, $item->class, $withChildren); + if ($withChildren) { + $cut = $this->dumpChildren($dumper, $cursor, $refs, $children, $cut, $item->type); + } elseif ($children && 0 <= $cut) { + $cut += count($children); + } + $dumper->leaveHash($cursor, $item->type, $item->class, $withChildren, $cut); + break; + + default: + throw new \RuntimeException(sprintf('Unexpected Stub type: %s', $item->type)); + } + } elseif ('array' === $type) { + $dumper->enterHash($cursor, Cursor::HASH_INDEXED, 0, false); + $dumper->leaveHash($cursor, Cursor::HASH_INDEXED, 0, false, 0); + } elseif ('string' === $type) { + $dumper->dumpString($cursor, $item, false, 0); + } else { + $dumper->dumpScalar($cursor, $type, $item); + } + } + + /** + * Dumps children of hash structures. + * + * @param DumperInterface $dumper + * @param Cursor $parentCursor The cursor of the parent hash. + * @param array &$refs A map of all references discovered while dumping. + * @param array $children The children to dump. + * @param int $hashCut The number of items removed from the original hash. + * @param string $hashType A Cursor::HASH_* const. + * + * @return int The final number of removed items. + */ + private function dumpChildren($dumper, $parentCursor, &$refs, $children, $hashCut, $hashType) + { + $cursor = clone $parentCursor; + ++$cursor->depth; + $cursor->hashType = $hashType; + $cursor->hashIndex = 0; + $cursor->hashLength = count($children); + $cursor->hashCut = $hashCut; + foreach ($children as $key => $child) { + $cursor->hashKeyIsBinary = isset($key[0]) && !preg_match('//u', $key); + $cursor->hashKey = $key; + $this->dumpItem($dumper, $cursor, $refs, $child); + if (++$cursor->hashIndex === $this->maxItemsPerDepth || $cursor->stop) { + $parentCursor->stop = true; + + return $hashCut >= 0 ? $hashCut + $cursor->hashLength - $cursor->hashIndex : $hashCut; + } + } + + return $hashCut; + } +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/DumperInterface.php b/htdocs/includes/symfony/var-dumper/Cloner/DumperInterface.php new file mode 100644 index 00000000000..eba23d42297 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Cloner/DumperInterface.php @@ -0,0 +1,60 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * DumperInterface used by Data objects. + * + * @author Nicolas Grekas + */ +interface DumperInterface +{ + /** + * Dumps a scalar value. + * + * @param Cursor $cursor The Cursor position in the dump. + * @param string $type The PHP type of the value being dumped. + * @param scalar $value The scalar value being dumped. + */ + public function dumpScalar(Cursor $cursor, $type, $value); + + /** + * Dumps a string. + * + * @param Cursor $cursor The Cursor position in the dump. + * @param string $str The string being dumped. + * @param bool $bin Whether $str is UTF-8 or binary encoded. + * @param int $cut The number of characters $str has been cut by. + */ + public function dumpString(Cursor $cursor, $str, $bin, $cut); + + /** + * Dumps while entering an hash. + * + * @param Cursor $cursor The Cursor position in the dump. + * @param int $type A Cursor::HASH_* const for the type of hash. + * @param string $class The object class, resource type or array count. + * @param bool $hasChild When the dump of the hash has child item. + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild); + + /** + * Dumps while leaving an hash. + * + * @param Cursor $cursor The Cursor position in the dump. + * @param int $type A Cursor::HASH_* const for the type of hash. + * @param string $class The object class, resource type or array count. + * @param bool $hasChild When the dump of the hash has child item. + * @param int $cut The number of items the hash has been cut by. + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut); +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/Stub.php b/htdocs/includes/symfony/var-dumper/Cloner/Stub.php new file mode 100644 index 00000000000..f58a57a7276 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Cloner/Stub.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * Represents the main properties of a PHP variable. + * + * @author Nicolas Grekas + */ +class Stub +{ + const TYPE_REF = 'ref'; + const TYPE_STRING = 'string'; + const TYPE_ARRAY = 'array'; + const TYPE_OBJECT = 'object'; + const TYPE_RESOURCE = 'resource'; + + const STRING_BINARY = 'bin'; + const STRING_UTF8 = 'utf8'; + + const ARRAY_ASSOC = 'assoc'; + const ARRAY_INDEXED = 'indexed'; + + public $type = self::TYPE_REF; + public $class = ''; + public $value; + public $cut = 0; + public $handle = 0; + public $refCount = 0; + public $position = 0; +} diff --git a/htdocs/includes/symfony/var-dumper/Cloner/VarCloner.php b/htdocs/includes/symfony/var-dumper/Cloner/VarCloner.php new file mode 100644 index 00000000000..98d6e9e51c1 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Cloner/VarCloner.php @@ -0,0 +1,300 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Cloner; + +/** + * @author Nicolas Grekas + */ +class VarCloner extends AbstractCloner +{ + private static $hashMask = 0; + private static $hashOffset = 0; + + /** + * {@inheritdoc} + */ + protected function doClone($var) + { + $useExt = $this->useExt; + $i = 0; // Current iteration position in $queue + $len = 1; // Length of $queue + $pos = 0; // Number of cloned items past the first level + $refs = 0; // Hard references counter + $queue = array(array($var)); // This breadth-first queue is the return value + $arrayRefs = array(); // Map of queue indexes to stub array objects + $hardRefs = array(); // Map of original zval hashes to stub objects + $objRefs = array(); // Map of original object handles to their stub object couterpart + $resRefs = array(); // Map of original resource handles to their stub object couterpart + $values = array(); // Map of stub objects' hashes to original values + $maxItems = $this->maxItems; + $maxString = $this->maxString; + $cookie = (object) array(); // Unique object used to detect hard references + $gid = uniqid(mt_rand(), true); // Unique string used to detect the special $GLOBALS variable + $a = null; // Array cast for nested structures + $stub = null; // Stub capturing the main properties of an original item value + // or null if the original value is used directly + $zval = array( // Main properties of the current value + 'type' => null, + 'zval_isref' => null, + 'zval_hash' => null, + 'array_count' => null, + 'object_class' => null, + 'object_handle' => null, + 'resource_type' => null, + ); + if (!self::$hashMask) { + self::initHashMask(); + } + $hashMask = self::$hashMask; + $hashOffset = self::$hashOffset; + + for ($i = 0; $i < $len; ++$i) { + $indexed = true; // Whether the currently iterated array is numerically indexed or not + $j = -1; // Position in the currently iterated array + $step = $queue[$i]; // Copy of the currently iterated array used for hard references detection + foreach ($step as $k => $v) { + // $k is the original key + // $v is the original value or a stub object in case of hard references + if ($indexed && $k !== ++$j) { + $indexed = false; + } + if ($useExt) { + $zval = symfony_zval_info($k, $step); + } else { + $step[$k] = $cookie; + if ($zval['zval_isref'] = $queue[$i][$k] === $cookie) { + $zval['zval_hash'] = $v instanceof Stub ? spl_object_hash($v) : null; + } + $zval['type'] = gettype($v); + } + if ($zval['zval_isref']) { + $queue[$i][$k] = &$stub; // Break hard references to make $queue completely + unset($stub); // independent from the original structure + if (isset($hardRefs[$zval['zval_hash']])) { + $queue[$i][$k] = $useExt ? ($v = $hardRefs[$zval['zval_hash']]) : ($step[$k] = $v); + if ($v->value instanceof Stub && (Stub::TYPE_OBJECT === $v->value->type || Stub::TYPE_RESOURCE === $v->value->type)) { + ++$v->value->refCount; + } + ++$v->refCount; + continue; + } + } + // Create $stub when the original value $v can not be used directly + // If $v is a nested structure, put that structure in array $a + switch ($zval['type']) { + case 'string': + if (isset($v[0]) && !preg_match('//u', $v)) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_BINARY; + if (0 <= $maxString && 0 < $cut = strlen($v) - $maxString) { + $stub->cut = $cut; + $stub->value = substr($v, 0, -$cut); + } else { + $stub->value = $v; + } + } elseif (0 <= $maxString && isset($v[1 + ($maxString >> 2)]) && 0 < $cut = iconv_strlen($v, 'UTF-8') - $maxString) { + $stub = new Stub(); + $stub->type = Stub::TYPE_STRING; + $stub->class = Stub::STRING_UTF8; + $stub->cut = $cut; + $stub->value = iconv_substr($v, 0, $maxString, 'UTF-8'); + } + break; + + case 'integer': + break; + + case 'array': + if ($v) { + $stub = $arrayRefs[$len] = new Stub(); + $stub->type = Stub::TYPE_ARRAY; + $stub->class = Stub::ARRAY_ASSOC; + + // Copies of $GLOBALS have very strange behavior, + // let's detect them with some black magic + $a = $v; + $a[$gid] = true; + + // Happens with copies of $GLOBALS + if (isset($v[$gid])) { + unset($v[$gid]); + $a = array(); + foreach ($v as $gk => &$gv) { + $a[$gk] = &$gv; + } + } else { + $a = $v; + } + + $stub->value = $zval['array_count'] ?: count($a); + } + break; + + case 'object': + if (empty($objRefs[$h = $zval['object_handle'] ?: ($hashMask ^ hexdec(substr(spl_object_hash($v), $hashOffset, PHP_INT_SIZE)))])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_OBJECT; + $stub->class = $zval['object_class'] ?: get_class($v); + $stub->value = $v; + $stub->handle = $h; + $a = $this->castObject($stub, 0 < $i); + if ($v !== $stub->value) { + if (Stub::TYPE_OBJECT !== $stub->type || null === $stub->value) { + break; + } + if ($useExt) { + $zval['type'] = $stub->value; + $zval = symfony_zval_info('type', $zval); + $h = $zval['object_handle']; + } else { + $h = $hashMask ^ hexdec(substr(spl_object_hash($stub->value), $hashOffset, PHP_INT_SIZE)); + } + $stub->handle = $h; + } + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos) { + $stub->cut = count($a); + $a = null; + } + } + if (empty($objRefs[$h])) { + $objRefs[$h] = $stub; + } else { + $stub = $objRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + + case 'resource': + case 'unknown type': + if (empty($resRefs[$h = (int) $v])) { + $stub = new Stub(); + $stub->type = Stub::TYPE_RESOURCE; + $stub->class = $zval['resource_type'] ?: get_resource_type($v); + $stub->value = $v; + $stub->handle = $h; + $a = $this->castResource($stub, 0 < $i); + $stub->value = null; + if (0 <= $maxItems && $maxItems <= $pos) { + $stub->cut = count($a); + $a = null; + } + } + if (empty($resRefs[$h])) { + $resRefs[$h] = $stub; + } else { + $stub = $resRefs[$h]; + ++$stub->refCount; + $a = null; + } + break; + } + + if (isset($stub)) { + if ($zval['zval_isref']) { + if ($useExt) { + $queue[$i][$k] = $hardRefs[$zval['zval_hash']] = $v = new Stub(); + $v->value = $stub; + } else { + $step[$k] = new Stub(); + $step[$k]->value = $stub; + $h = spl_object_hash($step[$k]); + $queue[$i][$k] = $hardRefs[$h] = &$step[$k]; + $values[$h] = $v; + } + $queue[$i][$k]->handle = ++$refs; + } else { + $queue[$i][$k] = $stub; + } + + if ($a) { + if ($i && 0 <= $maxItems) { + $k = count($a); + if ($pos < $maxItems) { + if ($maxItems < $pos += $k) { + $a = array_slice($a, 0, $maxItems - $pos); + if ($stub->cut >= 0) { + $stub->cut += $pos - $maxItems; + } + } + } else { + if ($stub->cut >= 0) { + $stub->cut += $k; + } + $stub = $a = null; + unset($arrayRefs[$len]); + continue; + } + } + $queue[$len] = $a; + $stub->position = $len++; + } + $stub = $a = null; + } elseif ($zval['zval_isref']) { + if ($useExt) { + $queue[$i][$k] = $hardRefs[$zval['zval_hash']] = new Stub(); + $queue[$i][$k]->value = $v; + } else { + $step[$k] = $queue[$i][$k] = new Stub(); + $step[$k]->value = $v; + $h = spl_object_hash($step[$k]); + $hardRefs[$h] = &$step[$k]; + $values[$h] = $v; + } + $queue[$i][$k]->handle = ++$refs; + } + } + + if (isset($arrayRefs[$i])) { + if ($indexed) { + $arrayRefs[$i]->class = Stub::ARRAY_INDEXED; + } + unset($arrayRefs[$i]); + } + } + + foreach ($values as $h => $v) { + $hardRefs[$h] = $v; + } + + return $queue; + } + + private static function initHashMask() + { + $obj = (object) array(); + self::$hashOffset = 16 - PHP_INT_SIZE; + self::$hashMask = -1; + + if (defined('HHVM_VERSION')) { + self::$hashOffset += 16; + } else { + // check if we are nested in an output buffering handler to prevent a fatal error with ob_start() below + $obFuncs = array('ob_clean', 'ob_end_clean', 'ob_flush', 'ob_end_flush', 'ob_get_contents', 'ob_get_flush'); + foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $frame) { + if (isset($frame['function'][0]) && !isset($frame['class']) && 'o' === $frame['function'][0] && in_array($frame['function'], $obFuncs)) { + $frame['line'] = 0; + break; + } + } + if (!empty($frame['line'])) { + ob_start(); + debug_zval_dump($obj); + self::$hashMask = substr(ob_get_clean(), 17); + } + } + + self::$hashMask ^= hexdec(substr(spl_object_hash($obj), self::$hashOffset, PHP_INT_SIZE)); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Dumper/AbstractDumper.php b/htdocs/includes/symfony/var-dumper/Dumper/AbstractDumper.php new file mode 100644 index 00000000000..f8b9c107779 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Dumper/AbstractDumper.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; +use Symfony\Component\VarDumper\Cloner\DumperInterface; + +/** + * Abstract mechanism for dumping a Data object. + * + * @author Nicolas Grekas + */ +abstract class AbstractDumper implements DataDumperInterface, DumperInterface +{ + public static $defaultOutput = 'php://output'; + + protected $line = ''; + protected $lineDumper; + protected $outputStream; + protected $decimalPoint; // This is locale dependent + protected $indentPad = ' '; + + private $charset; + + /** + * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path, defaults to static::$defaultOutput. + * @param string $charset The default character encoding to use for non-UTF8 strings. + */ + public function __construct($output = null, $charset = null) + { + $this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8'); + $this->decimalPoint = (string) 0.5; + $this->decimalPoint = $this->decimalPoint[1]; + $this->setOutput($output ?: static::$defaultOutput); + if (!$output && is_string(static::$defaultOutput)) { + static::$defaultOutput = $this->outputStream; + } + } + + /** + * Sets the output destination of the dumps. + * + * @param callable|resource|string $output A line dumper callable, an opened stream or an output path. + * + * @return callable|resource|string The previous output destination. + */ + public function setOutput($output) + { + $prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper; + + if (is_callable($output)) { + $this->outputStream = null; + $this->lineDumper = $output; + } else { + if (is_string($output)) { + $output = fopen($output, 'wb'); + } + $this->outputStream = $output; + $this->lineDumper = array($this, 'echoLine'); + } + + return $prev; + } + + /** + * Sets the default character encoding to use for non-UTF8 strings. + * + * @param string $charset The default character encoding to use for non-UTF8 strings. + * + * @return string The previous charset. + */ + public function setCharset($charset) + { + $prev = $this->charset; + + $charset = strtoupper($charset); + $charset = null === $charset || 'UTF-8' === $charset || 'UTF8' === $charset ? 'CP1252' : $charset; + + $this->charset = $charset; + + return $prev; + } + + /** + * Sets the indentation pad string. + * + * @param string $pad A string the will be prepended to dumped lines, repeated by nesting level. + * + * @return string The indent pad. + */ + public function setIndentPad($pad) + { + $prev = $this->indentPad; + $this->indentPad = $pad; + + return $prev; + } + + /** + * Dumps a Data object. + * + * @param Data $data A Data object. + * @param callable|resource|string|null $output A line dumper callable, an opened stream or an output path. + */ + public function dump(Data $data, $output = null) + { + $exception = null; + if ($output) { + $prevOutput = $this->setOutput($output); + } + try { + $data->dump($this); + $this->dumpLine(-1); + } catch (\Exception $exception) { + // Re-thrown below + } + if ($output) { + $this->setOutput($prevOutput); + } + if (null !== $exception) { + throw $exception; + } + } + + /** + * Dumps the current line. + * + * @param int $depth The recursive depth in the dumped structure for the line being dumped. + */ + protected function dumpLine($depth) + { + call_user_func($this->lineDumper, $this->line, $depth, $this->indentPad); + $this->line = ''; + } + + /** + * Generic line dumper callback. + * + * @param string $line The line to write. + * @param int $depth The recursive depth in the dumped structure. + */ + protected function echoLine($line, $depth, $indentPad) + { + if (-1 !== $depth) { + fwrite($this->outputStream, str_repeat($indentPad, $depth).$line."\n"); + } + } + + /** + * Converts a non-UTF-8 string to UTF-8. + * + * @param string $s The non-UTF-8 string to convert. + * + * @return string The string converted to UTF-8. + */ + protected function utf8Encode($s) + { + if (false !== $c = @iconv($this->charset, 'UTF-8', $s)) { + return $c; + } + if ('CP1252' !== $this->charset && false !== $c = @iconv('CP1252', 'UTF-8', $s)) { + return $c; + } + + return iconv('CP850', 'UTF-8', $s); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Dumper/CliDumper.php b/htdocs/includes/symfony/var-dumper/Dumper/CliDumper.php new file mode 100644 index 00000000000..bca2abcb3d0 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Dumper/CliDumper.php @@ -0,0 +1,471 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Cursor; + +/** + * CliDumper dumps variables for command line output. + * + * @author Nicolas Grekas + */ +class CliDumper extends AbstractDumper +{ + public static $defaultColors; + public static $defaultOutput = 'php://stdout'; + + protected $colors; + protected $maxStringWidth = 0; + protected $styles = array( + // See http://en.wikipedia.org/wiki/ANSI_escape_code#graphics + 'default' => '38;5;208', + 'num' => '1;38;5;38', + 'const' => '1;38;5;208', + 'str' => '1;38;5;113', + 'note' => '38;5;38', + 'ref' => '38;5;247', + 'public' => '', + 'protected' => '', + 'private' => '', + 'meta' => '38;5;170', + 'key' => '38;5;113', + 'index' => '38;5;38', + ); + + protected static $controlCharsRx = '/[\x00-\x1F\x7F]+/'; + protected static $controlCharsMap = array( + "\t" => '\t', + "\n" => '\n', + "\v" => '\v', + "\f" => '\f', + "\r" => '\r', + "\033" => '\e', + ); + + /** + * {@inheritdoc} + */ + public function __construct($output = null, $charset = null) + { + parent::__construct($output, $charset); + + if ('\\' === DIRECTORY_SEPARATOR && false !== @getenv('ANSICON')) { + // Use only the base 16 xterm colors when using ANSICON + $this->setStyles(array( + 'default' => '31', + 'num' => '1;34', + 'const' => '1;31', + 'str' => '1;32', + 'note' => '34', + 'ref' => '1;30', + 'meta' => '35', + 'key' => '32', + 'index' => '34', + )); + } + } + + /** + * Enables/disables colored output. + * + * @param bool $colors + */ + public function setColors($colors) + { + $this->colors = (bool) $colors; + } + + /** + * Sets the maximum number of characters per line for dumped strings. + * + * @param int $maxStringWidth + */ + public function setMaxStringWidth($maxStringWidth) + { + $this->maxStringWidth = (int) $maxStringWidth; + } + + /** + * Configures styles. + * + * @param array $styles A map of style names to style definitions. + */ + public function setStyles(array $styles) + { + $this->styles = $styles + $this->styles; + } + + /** + * {@inheritdoc} + */ + public function dumpScalar(Cursor $cursor, $type, $value) + { + $this->dumpKey($cursor); + + $style = 'const'; + $attr = array(); + + switch ($type) { + case 'integer': + $style = 'num'; + break; + + case 'double': + $style = 'num'; + + switch (true) { + case INF === $value: $value = 'INF'; break; + case -INF === $value: $value = '-INF'; break; + case is_nan($value): $value = 'NAN'; break; + default: + $value = (string) $value; + if (false === strpos($value, $this->decimalPoint)) { + $value .= $this->decimalPoint.'0'; + } + break; + } + break; + + case 'NULL': + $value = 'null'; + break; + + case 'boolean': + $value = $value ? 'true' : 'false'; + break; + + default: + $attr['value'] = isset($value[0]) && !preg_match('//u', $value) ? $this->utf8Encode($value) : $value; + $value = isset($type[0]) && !preg_match('//u', $type) ? $this->utf8Encode($type) : $type; + break; + } + + $this->line .= $this->style($style, $value, $attr); + + $this->dumpLine($cursor->depth, true); + } + + /** + * {@inheritdoc} + */ + public function dumpString(Cursor $cursor, $str, $bin, $cut) + { + $this->dumpKey($cursor); + + if ($bin) { + $str = $this->utf8Encode($str); + } + if ('' === $str) { + $this->line .= '""'; + $this->dumpLine($cursor->depth, true); + } else { + $attr = array( + 'length' => 0 <= $cut ? iconv_strlen($str, 'UTF-8') + $cut : 0, + 'binary' => $bin, + ); + $str = explode("\n", $str); + if (isset($str[1]) && !isset($str[2]) && !isset($str[1][0])) { + unset($str[1]); + $str[0] .= "\n"; + } + $m = count($str) - 1; + $i = $lineCut = 0; + + if ($bin) { + $this->line .= 'b'; + } + + if ($m) { + $this->line .= '"""'; + $this->dumpLine($cursor->depth); + } else { + $this->line .= '"'; + } + + foreach ($str as $str) { + if ($i < $m) { + $str .= "\n"; + } + if (0 < $this->maxStringWidth && $this->maxStringWidth < $len = iconv_strlen($str, 'UTF-8')) { + $str = iconv_substr($str, 0, $this->maxStringWidth, 'UTF-8'); + $lineCut = $len - $this->maxStringWidth; + } + if ($m && 0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + if ('' !== $str) { + $this->line .= $this->style('str', $str, $attr); + } + if ($i++ == $m) { + if ($m) { + if ('' !== $str) { + $this->dumpLine($cursor->depth); + if (0 < $cursor->depth) { + $this->line .= $this->indentPad; + } + } + $this->line .= '"""'; + } else { + $this->line .= '"'; + } + if ($cut < 0) { + $this->line .= '…'; + $lineCut = 0; + } elseif ($cut) { + $lineCut += $cut; + } + } + if ($lineCut) { + $this->line .= '…'.$lineCut; + $lineCut = 0; + } + + $this->dumpLine($cursor->depth, $i > $m); + } + } + } + + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild) + { + $this->dumpKey($cursor); + + if (!preg_match('//u', $class)) { + $class = $this->utf8Encode($class); + } + if (Cursor::HASH_OBJECT === $type) { + $prefix = $class && 'stdClass' !== $class ? $this->style('note', $class).' {' : '{'; + } elseif (Cursor::HASH_RESOURCE === $type) { + $prefix = $this->style('note', $class.' resource').($hasChild ? ' {' : ' '); + } else { + $prefix = $class ? $this->style('note', 'array:'.$class).' [' : '['; + } + + if ($cursor->softRefCount || 0 < $cursor->softRefHandle) { + $prefix .= $this->style('ref', (Cursor::HASH_RESOURCE === $type ? '@' : '#').(0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->softRefTo), array('count' => $cursor->softRefCount)); + } elseif ($cursor->hardRefTo && !$cursor->refIndex && $class) { + $prefix .= $this->style('ref', '&'.$cursor->hardRefTo, array('count' => $cursor->hardRefCount)); + } elseif (!$hasChild && Cursor::HASH_RESOURCE === $type) { + $prefix = substr($prefix, 0, -1); + } + + $this->line .= $prefix; + + if ($hasChild) { + $this->dumpLine($cursor->depth); + } + } + + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + $this->line .= Cursor::HASH_OBJECT === $type ? '}' : (Cursor::HASH_RESOURCE !== $type ? ']' : ($hasChild ? '}' : '')); + $this->dumpLine($cursor->depth, true); + } + + /** + * Dumps an ellipsis for cut children. + * + * @param Cursor $cursor The Cursor position in the dump. + * @param bool $hasChild When the dump of the hash has child item. + * @param int $cut The number of items the hash has been cut by. + */ + protected function dumpEllipsis(Cursor $cursor, $hasChild, $cut) + { + if ($cut) { + $this->line .= ' …'; + if (0 < $cut) { + $this->line .= $cut; + } + if ($hasChild) { + $this->dumpLine($cursor->depth + 1); + } + } + } + + /** + * Dumps a key in a hash structure. + * + * @param Cursor $cursor The Cursor position in the dump. + */ + protected function dumpKey(Cursor $cursor) + { + if (null !== $key = $cursor->hashKey) { + if ($cursor->hashKeyIsBinary) { + $key = $this->utf8Encode($key); + } + $attr = array('binary' => $cursor->hashKeyIsBinary); + $bin = $cursor->hashKeyIsBinary ? 'b' : ''; + $style = 'key'; + switch ($cursor->hashType) { + default: + case Cursor::HASH_INDEXED: + $style = 'index'; + case Cursor::HASH_ASSOC: + if (is_int($key)) { + $this->line .= $this->style($style, $key).' => '; + } else { + $this->line .= $bin.'"'.$this->style($style, $key).'" => '; + } + break; + + case Cursor::HASH_RESOURCE: + $key = "\0~\0".$key; + // No break; + case Cursor::HASH_OBJECT: + if (!isset($key[0]) || "\0" !== $key[0]) { + $this->line .= '+'.$bin.$this->style('public', $key).': '; + } elseif (0 < strpos($key, "\0", 1)) { + $key = explode("\0", substr($key, 1), 2); + + switch ($key[0]) { + case '+': // User inserted keys + $attr['dynamic'] = true; + $this->line .= '+'.$bin.'"'.$this->style('public', $key[1], $attr).'": '; + break 2; + case '~': + $style = 'meta'; + break; + case '*': + $style = 'protected'; + $bin = '#'.$bin; + break; + default: + $attr['class'] = $key[0]; + $style = 'private'; + $bin = '-'.$bin; + break; + } + + $this->line .= $bin.$this->style($style, $key[1], $attr).': '; + } else { + // This case should not happen + $this->line .= '-'.$bin.'"'.$this->style('private', $key, array('class' => '')).'": '; + } + break; + } + + if ($cursor->hardRefTo) { + $this->line .= $this->style('ref', '&'.($cursor->hardRefCount ? $cursor->hardRefTo : ''), array('count' => $cursor->hardRefCount)).' '; + } + } + } + + /** + * Decorates a value with some style. + * + * @param string $style The type of style being applied. + * @param string $value The value being styled. + * @param array $attr Optional context information. + * + * @return string The value with style decoration. + */ + protected function style($style, $value, $attr = array()) + { + if (null === $this->colors) { + $this->colors = $this->supportsColors(); + } + + $style = $this->styles[$style]; + + $map = static::$controlCharsMap; + $startCchr = $this->colors ? "\033[m\033[{$this->styles['default']}m" : ''; + $endCchr = $this->colors ? "\033[m\033[{$style}m" : ''; + $value = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $startCchr, $endCchr) { + $s = $startCchr; + $c = $c[$i = 0]; + do { + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + } while (isset($c[++$i])); + + return $s.$endCchr; + }, $value, -1, $cchrCount); + + if ($this->colors) { + if ($cchrCount && "\033" === $value[0]) { + $value = substr($value, strlen($startCchr)); + } else { + $value = "\033[{$style}m".$value; + } + if ($cchrCount && $endCchr === substr($value, -strlen($endCchr))) { + $value = substr($value, 0, -strlen($endCchr)); + } else { + $value .= "\033[{$this->styles['default']}m"; + } + } + + return $value; + } + + /** + * @return bool Tells if the current output stream supports ANSI colors or not. + */ + protected function supportsColors() + { + if ($this->outputStream !== static::$defaultOutput) { + return @(is_resource($this->outputStream) && function_exists('posix_isatty') && posix_isatty($this->outputStream)); + } + if (null !== static::$defaultColors) { + return static::$defaultColors; + } + if (isset($_SERVER['argv'][1])) { + $colors = $_SERVER['argv']; + $i = count($colors); + while (--$i > 0) { + if (isset($colors[$i][5])) { + switch ($colors[$i]) { + case '--ansi': + case '--color': + case '--color=yes': + case '--color=force': + case '--color=always': + return static::$defaultColors = true; + + case '--no-ansi': + case '--color=no': + case '--color=none': + case '--color=never': + return static::$defaultColors = false; + } + } + } + } + + if ('\\' === DIRECTORY_SEPARATOR) { + static::$defaultColors = @(false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM')); + } elseif (function_exists('posix_isatty')) { + $h = stream_get_meta_data($this->outputStream) + array('wrapper_type' => null); + $h = 'Output' === $h['stream_type'] && 'PHP' === $h['wrapper_type'] ? fopen('php://stdout', 'wb') : $this->outputStream; + static::$defaultColors = @posix_isatty($h); + } else { + static::$defaultColors = false; + } + + return static::$defaultColors; + } + + /** + * {@inheritdoc} + */ + protected function dumpLine($depth, $endOfValue = false) + { + if ($this->colors) { + $this->line = sprintf("\033[%sm%s\033[m", $this->styles['default'], $this->line); + } + parent::dumpLine($depth); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Dumper/DataDumperInterface.php b/htdocs/includes/symfony/var-dumper/Dumper/DataDumperInterface.php new file mode 100644 index 00000000000..ee6060cebf6 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Dumper/DataDumperInterface.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * DataDumperInterface for dumping Data objects. + * + * @author Nicolas Grekas + */ +interface DataDumperInterface +{ + /** + * Dumps a Data object. + * + * @param Data $data A Data object. + */ + public function dump(Data $data); +} diff --git a/htdocs/includes/symfony/var-dumper/Dumper/HtmlDumper.php b/htdocs/includes/symfony/var-dumper/Dumper/HtmlDumper.php new file mode 100644 index 00000000000..28af8e4cb22 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Dumper/HtmlDumper.php @@ -0,0 +1,452 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Dumper; + +use Symfony\Component\VarDumper\Cloner\Cursor; +use Symfony\Component\VarDumper\Cloner\Data; + +/** + * HtmlDumper dumps variables as HTML. + * + * @author Nicolas Grekas + */ +class HtmlDumper extends CliDumper +{ + public static $defaultOutput = 'php://output'; + + protected $dumpHeader; + protected $dumpPrefix = '
    ';
    +    protected $dumpSuffix = '
    '; + protected $dumpId = 'sf-dump'; + protected $colors = true; + protected $headerIsDumped = false; + protected $lastDepth = -1; + protected $styles = array( + 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:100000; word-break: normal', + 'num' => 'font-weight:bold; color:#1299DA', + 'const' => 'font-weight:bold', + 'str' => 'font-weight:bold; color:#56DB3A', + 'note' => 'color:#1299DA', + 'ref' => 'color:#A0A0A0', + 'public' => 'color:#FFFFFF', + 'protected' => 'color:#FFFFFF', + 'private' => 'color:#FFFFFF', + 'meta' => 'color:#B729D9', + 'key' => 'color:#56DB3A', + 'index' => 'color:#1299DA', + ); + + /** + * {@inheritdoc} + */ + public function __construct($output = null, $charset = null) + { + AbstractDumper::__construct($output, $charset); + $this->dumpId = 'sf-dump-'.mt_rand(); + } + + /** + * {@inheritdoc} + */ + public function setOutput($output) + { + if ($output !== $prev = parent::setOutput($output)) { + $this->headerIsDumped = false; + } + + return $prev; + } + + /** + * {@inheritdoc} + */ + public function setStyles(array $styles) + { + $this->headerIsDumped = false; + $this->styles = $styles + $this->styles; + } + + /** + * Sets an HTML header that will be dumped once in the output stream. + * + * @param string $header An HTML string. + */ + public function setDumpHeader($header) + { + $this->dumpHeader = $header; + } + + /** + * Sets an HTML prefix and suffix that will encapse every single dump. + * + * @param string $prefix The prepended HTML string. + * @param string $suffix The appended HTML string. + */ + public function setDumpBoundaries($prefix, $suffix) + { + $this->dumpPrefix = $prefix; + $this->dumpSuffix = $suffix; + } + + /** + * {@inheritdoc} + */ + public function dump(Data $data, $output = null) + { + parent::dump($data, $output); + $this->dumpId = 'sf-dump-'.mt_rand(); + } + + /** + * Dumps the HTML header. + */ + protected function getDumpHeader() + { + $this->headerIsDumped = true; + + if (null !== $this->dumpHeader) { + return $this->dumpHeader; + } + + $line = <<<'EOHTML' + +'.$this->dumpHeader; + } + + /** + * {@inheritdoc} + */ + public function enterHash(Cursor $cursor, $type, $class, $hasChild) + { + parent::enterHash($cursor, $type, $class, false); + + if ($hasChild) { + if ($cursor->refIndex) { + $r = Cursor::HASH_OBJECT !== $type ? 1 - (Cursor::HASH_RESOURCE !== $type) : 2; + $r .= $r && 0 < $cursor->softRefHandle ? $cursor->softRefHandle : $cursor->refIndex; + + $this->line .= sprintf('', $this->dumpId, $r); + } else { + $this->line .= ''; + } + $this->dumpLine($cursor->depth); + } + } + + /** + * {@inheritdoc} + */ + public function leaveHash(Cursor $cursor, $type, $class, $hasChild, $cut) + { + $this->dumpEllipsis($cursor, $hasChild, $cut); + if ($hasChild) { + $this->line .= ''; + } + parent::leaveHash($cursor, $type, $class, $hasChild, 0); + } + + /** + * {@inheritdoc} + */ + protected function style($style, $value, $attr = array()) + { + if ('' === $value) { + return ''; + } + + $v = htmlspecialchars($value, ENT_QUOTES, 'UTF-8'); + + if ('ref' === $style) { + if (empty($attr['count'])) { + return sprintf('%s', $v); + } + $r = ('#' !== $v[0] ? 1 - ('@' !== $v[0]) : 2).substr($value, 1); + + return sprintf('%s', $this->dumpId, $r, 1 + $attr['count'], $v); + } + + if ('const' === $style && array_key_exists('value', $attr)) { + $style .= sprintf(' title="%s"', htmlspecialchars(json_encode($attr['value']), ENT_QUOTES, 'UTF-8')); + } elseif ('public' === $style) { + $style .= sprintf(' title="%s"', empty($attr['dynamic']) ? 'Public property' : 'Runtime added dynamic property'); + } elseif ('str' === $style && 1 < $attr['length']) { + $style .= sprintf(' title="%s%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); + } elseif ('note' === $style && false !== $c = strrpos($v, '\\')) { + return sprintf('%s', $v, $style, substr($v, $c + 1)); + } elseif ('protected' === $style) { + $style .= ' title="Protected property"'; + } elseif ('private' === $style) { + $style .= sprintf(' title="Private property defined in class: `%s`"', $attr['class']); + } + + $map = static::$controlCharsMap; + $style = ""; + $v = preg_replace_callback(static::$controlCharsRx, function ($c) use ($map, $style) { + $s = ''; + $c = $c[$i = 0]; + do { + $s .= isset($map[$c[$i]]) ? $map[$c[$i]] : sprintf('\x%02X', ord($c[$i])); + } while (isset($c[++$i])); + + return $s.$style; + }, $v, -1, $cchrCount); + + if ($cchrCount && '<' === $v[0]) { + $v = substr($v, 7); + } else { + $v = $style.$v; + } + if ($cchrCount && '>' === substr($v, -1)) { + $v = substr($v, 0, -strlen($style)); + } else { + $v .= ''; + } + + return $v; + } + + /** + * {@inheritdoc} + */ + protected function dumpLine($depth, $endOfValue = false) + { + if (-1 === $this->lastDepth) { + $this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line; + } + if (!$this->headerIsDumped) { + $this->line = $this->getDumpHeader().$this->line; + } + + if (-1 === $depth) { + $this->line .= sprintf($this->dumpSuffix, $this->dumpId); + } + $this->lastDepth = $depth; + + $this->line = mb_convert_encoding($this->line, 'HTML-ENTITIES', 'UTF-8'); + + if (-1 === $depth) { + AbstractDumper::dumpLine(0); + } + AbstractDumper::dumpLine($depth); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Exception/ThrowingCasterException.php b/htdocs/includes/symfony/var-dumper/Exception/ThrowingCasterException.php new file mode 100644 index 00000000000..976f4439b67 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Exception/ThrowingCasterException.php @@ -0,0 +1,26 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Exception; + +/** + * @author Nicolas Grekas + */ +class ThrowingCasterException extends \Exception +{ + /** + * @param \Exception $prev The exception thrown from the caster + */ + public function __construct(\Exception $prev) + { + parent::__construct('Unexpected '.get_class($prev).' thrown from a caster: '.$prev->getMessage(), 0, $prev); + } +} diff --git a/htdocs/includes/symfony/var-dumper/LICENSE b/htdocs/includes/symfony/var-dumper/LICENSE new file mode 100644 index 00000000000..ef1cde91a61 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2015 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/htdocs/includes/symfony/var-dumper/README.md b/htdocs/includes/symfony/var-dumper/README.md new file mode 100644 index 00000000000..71bff335a70 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/README.md @@ -0,0 +1,14 @@ +Symfony mechanism for exploring and dumping PHP variables +========================================================= + +This component provides a mechanism that allows exploring then dumping +any PHP variable. + +It handles scalars, objects and resources properly, taking hard and soft +references into account. More than being immune to infinite recursion +problems, it allows dumping where references link to each other. +It explores recursive structures using a breadth-first algorithm. + +The component exposes all the parts involved in the different steps of +cloning then dumping a PHP variable, while applying size limits and having +specialized output formats and methods. diff --git a/htdocs/includes/symfony/var-dumper/Resources/functions/dump.php b/htdocs/includes/symfony/var-dumper/Resources/functions/dump.php new file mode 100644 index 00000000000..b6c243c8b6e --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Resources/functions/dump.php @@ -0,0 +1,24 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\VarDumper\VarDumper; + +if (!function_exists('dump')) { + /** + * @author Nicolas Grekas + */ + function dump($var) + { + foreach (func_get_args() as $var) { + VarDumper::dump($var); + } + } +} diff --git a/htdocs/includes/symfony/var-dumper/Test/VarDumperTestTrait.php b/htdocs/includes/symfony/var-dumper/Test/VarDumperTestTrait.php new file mode 100644 index 00000000000..e5f6bf5b98e --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Test/VarDumperTestTrait.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Test; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; + +/** + * @author Nicolas Grekas + */ +trait VarDumperTestTrait +{ + public function assertDumpEquals($dump, $data, $message = '') + { + $this->assertSame(rtrim($dump), $this->getDump($data), $message); + } + + public function assertDumpMatchesFormat($dump, $data, $message = '') + { + $this->assertStringMatchesFormat(rtrim($dump), $this->getDump($data), $message); + } + + protected function getDump($data) + { + $h = fopen('php://memory', 'r+b'); + $cloner = new VarCloner(); + $cloner->setMaxItems(-1); + $dumper = new CliDumper($h); + $dumper->setColors(false); + $dumper->dump($cloner->cloneVar($data)->withRefHandles(false)); + $data = stream_get_contents($h, -1, 0); + fclose($h); + + return rtrim($data); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/CasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/CasterTest.php new file mode 100644 index 00000000000..43d389ce1c0 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/CasterTest.php @@ -0,0 +1,180 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use Symfony\Component\VarDumper\Caster\Caster; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Nicolas Grekas + */ +class CasterTest extends \PHPUnit_Framework_TestCase +{ + use VarDumperTestTrait; + + private $referenceArray = array( + 'null' => null, + 'empty' => false, + 'public' => 'pub', + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0*\0protected" => 'prot', + "\0Foo\0private" => 'priv', + ); + + /** + * @dataProvider provideFilter + */ + public function testFilter($filter, $expectedDiff, $listedProperties = null) + { + if (null === $listedProperties) { + $filteredArray = Caster::filter($this->referenceArray, $filter); + } else { + $filteredArray = Caster::filter($this->referenceArray, $filter, $listedProperties); + } + + $this->assertSame($expectedDiff, array_diff_assoc($this->referenceArray, $filteredArray)); + } + + public function provideFilter() + { + return array( + array( + 0, + array(), + ), + array( + Caster::EXCLUDE_PUBLIC, + array( + 'null' => null, + 'empty' => false, + 'public' => 'pub', + ), + ), + array( + Caster::EXCLUDE_NULL, + array( + 'null' => null, + ), + ), + array( + Caster::EXCLUDE_EMPTY, + array( + 'null' => null, + 'empty' => false, + ), + ), + array( + Caster::EXCLUDE_VIRTUAL, + array( + "\0~\0virtual" => 'virt', + ), + ), + array( + Caster::EXCLUDE_DYNAMIC, + array( + "\0+\0dynamic" => 'dyn', + ), + ), + array( + Caster::EXCLUDE_PROTECTED, + array( + "\0*\0protected" => 'prot', + ), + ), + array( + Caster::EXCLUDE_PRIVATE, + array( + "\0Foo\0private" => 'priv', + ), + ), + array( + Caster::EXCLUDE_VERBOSE, + array( + 'public' => 'pub', + "\0*\0protected" => 'prot', + ), + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT, + array( + 'null' => null, + 'empty' => false, + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0Foo\0private" => 'priv', + ), + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_VIRTUAL | Caster::EXCLUDE_DYNAMIC, + array( + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + ), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_VERBOSE, + $this->referenceArray, + array('public', "\0*\0protected"), + ), + array( + Caster::EXCLUDE_NOT_IMPORTANT | Caster::EXCLUDE_EMPTY, + array( + 'null' => null, + 'empty' => false, + "\0~\0virtual" => 'virt', + "\0+\0dynamic" => 'dyn', + "\0*\0protected" => 'prot', + "\0Foo\0private" => 'priv', + ), + array('public', 'empty'), + ), + array( + Caster::EXCLUDE_VERBOSE | Caster::EXCLUDE_EMPTY | Caster::EXCLUDE_STRICT, + array( + 'empty' => false, + ), + array('public', 'empty'), + ), + ); + } + + /** + * @requires PHP 7.0 + */ + public function testAnonymousClass() + { + $c = eval('return new class extends stdClass { private $foo = "foo"; };'); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +stdClass@anonymous { + -foo: "foo" +} +EOTXT + , $c + ); + + $c = eval('return new class { private $foo = "foo"; };'); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +@anonymous { + -foo: "foo" +} +EOTXT + , $c + ); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/PdoCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/PdoCasterTest.php new file mode 100644 index 00000000000..faa65341170 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/PdoCasterTest.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use Symfony\Component\VarDumper\Caster\PdoCaster; +use Symfony\Component\VarDumper\Cloner\Stub; + +/** + * @author Nicolas Grekas + */ +class PdoCasterTest extends \PHPUnit_Framework_TestCase +{ + /** + * @requires extension pdo_sqlite + */ + public function testCastPdo() + { + $pdo = new \PDO('sqlite::memory:'); + $pdo->setAttribute(\PDO::ATTR_STATEMENT_CLASS, array('PDOStatement', array($pdo))); + + $cast = PdoCaster::castPdo($pdo, array(), new Stub(), false); + + $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\EnumStub', $cast["\0~\0attributes"]); + + $attr = $cast["\0~\0attributes"] = $cast["\0~\0attributes"]->value; + $this->assertInstanceOf('Symfony\Component\VarDumper\Caster\ConstStub', $attr['CASE']); + $this->assertSame('NATURAL', $attr['CASE']->class); + $this->assertSame('BOTH', $attr['DEFAULT_FETCH_MODE']->class); + + $xCast = array( + "\0~\0inTransaction" => $pdo->inTransaction(), + "\0~\0attributes" => array( + 'CASE' => $attr['CASE'], + 'ERRMODE' => $attr['ERRMODE'], + 'PERSISTENT' => false, + 'DRIVER_NAME' => 'sqlite', + 'ORACLE_NULLS' => $attr['ORACLE_NULLS'], + 'CLIENT_VERSION' => $pdo->getAttribute(\PDO::ATTR_CLIENT_VERSION), + 'SERVER_VERSION' => $pdo->getAttribute(\PDO::ATTR_SERVER_VERSION), + 'STATEMENT_CLASS' => array('PDOStatement'), + 'DEFAULT_FETCH_MODE' => $attr['DEFAULT_FETCH_MODE'], + ), + ); + unset($cast["\0~\0attributes"]['STATEMENT_CLASS'][1]); + + $this->assertSame($xCast, $cast); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php new file mode 100644 index 00000000000..0d7147fbcd2 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php @@ -0,0 +1,228 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; +use Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo; + +/** + * @author Nicolas Grekas + */ +class ReflectionCasterTest extends \PHPUnit_Framework_TestCase +{ + use VarDumperTestTrait; + + public function testReflectionCaster() + { + $var = new \ReflectionClass('ReflectionClass'); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionClass { + +name: "ReflectionClass" +%Aimplements: array:%d [ + 0 => "Reflector" +%A] + constants: array:3 [ + "IS_IMPLICIT_ABSTRACT" => 16 + "IS_EXPLICIT_ABSTRACT" => 32 + "IS_FINAL" => %d + ] + properties: array:%d [ + "name" => ReflectionProperty { +%A +name: "name" + +class: "ReflectionClass" +%A modifiers: "public" + } +%A] + methods: array:%d [ +%A + "export" => ReflectionMethod { + +name: "export" + +class: "ReflectionClass" + parameters: { + $%s: ReflectionParameter { +%A position: 0 +%A +} +EOTXT + , $var + ); + } + + public function testClosureCaster() + { + $a = $b = 123; + $var = function ($x) use ($a, &$b) {}; + + $this->assertDumpMatchesFormat( + <<assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionParameter { + +name: "arg1" + position: 0 + typeHint: "Symfony\Component\VarDumper\Tests\Caster\NotExistingClass" + default: null +} +EOTXT + , $var + ); + } + + /** + * @requires PHP 7.0 + */ + public function testReflectionParameterScalar() + { + $f = eval('return function (int $a) {};'); + $var = new \ReflectionParameter($f, 0); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionParameter { + +name: "a" + position: 0 + typeHint: "int" +} +EOTXT + , $var + ); + } + + /** + * @requires PHP 7.0 + */ + public function testReturnType() + { + $f = eval('return function ():int {};'); + $line = __LINE__ - 1; + + $this->assertDumpMatchesFormat( + <<baz(); + $r = new \ReflectionGenerator($g); + + $xDump = <<<'EODUMP' +Generator { + this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …} + executing: { + Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz(): { + %sGeneratorDemo.php:14: """ + {\n + yield from bar();\n + }\n + """ + } + } +} +EODUMP; + + $this->assertDumpMatchesFormat($xDump, $g); + + foreach ($g as $v) { + break; + } + + $xDump = <<<'EODUMP' +array:2 [ + 0 => ReflectionGenerator { + this: Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo { …} + trace: { + 3. Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo() ==> yield(): { + src: { + %sGeneratorDemo.php:9: """ + {\n + yield 1;\n + }\n + """ + } + } + 2. Symfony\Component\VarDumper\Tests\Fixtures\bar() ==> Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo(): { + src: { + %sGeneratorDemo.php:20: """ + {\n + yield from GeneratorDemo::foo();\n + }\n + """ + } + } + 1. Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo->baz() ==> Symfony\Component\VarDumper\Tests\Fixtures\bar(): { + src: { + %sGeneratorDemo.php:14: """ + {\n + yield from bar();\n + }\n + """ + } + } + } + } + 1 => Generator { + executing: { + Symfony\Component\VarDumper\Tests\Fixtures\GeneratorDemo::foo(): { + %sGeneratorDemo.php:10: """ + yield 1;\n + }\n + \n + """ + } + } + } +] +EODUMP; + + $this->assertDumpMatchesFormat($xDump, array($r, $r->getExecutingGenerator())); + } +} + +function reflectionParameterFixture(NotExistingClass $arg1 = null, $arg2) +{ +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Caster/SplCasterTest.php b/htdocs/includes/symfony/var-dumper/Tests/Caster/SplCasterTest.php new file mode 100644 index 00000000000..5d71e8d379d --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Caster/SplCasterTest.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Caster; + +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Grégoire Pineau + */ +class SplCasterTest extends \PHPUnit_Framework_TestCase +{ + use VarDumperTestTrait; + + public function getCastFileInfoTests() + { + return array( + array(__FILE__, <<<'EOTXT' +SplFileInfo { +%Apath: "%sCaster" + filename: "SplCasterTest.php" + basename: "SplCasterTest.php" + pathname: "%sSplCasterTest.php" + extension: "php" + realPath: "%sSplCasterTest.php" + aTime: %s-%s-%d %d:%d:%d + mTime: %s-%s-%d %d:%d:%d + cTime: %s-%s-%d %d:%d:%d + inode: %d + size: %d + perms: 0%d + owner: %d + group: %d + type: "file" + writable: true + readable: true + executable: false + file: true + dir: false + link: false +%A} +EOTXT + ), + array('https://google.com/about', <<<'EOTXT' +SplFileInfo { +%Apath: "https://google.com" + filename: "about" + basename: "about" + pathname: "https://google.com/about" + extension: "" + realPath: false + writable: false + readable: false + executable: false + file: false + dir: false + link: false +%A} +EOTXT + ), + ); + } + + /** @dataProvider getCastFileInfoTests */ + public function testCastFileInfo($file, $dump) + { + $this->assertDumpMatchesFormat($dump, new \SplFileInfo($file)); + } + + public function testCastFileObject() + { + $var = new \SplFileObject(__FILE__); + $var->setFlags(\SplFileObject::DROP_NEW_LINE | \SplFileObject::SKIP_EMPTY); + $dump = <<<'EOTXT' +SplFileObject { +%Apath: "%sCaster" + filename: "SplCasterTest.php" + basename: "SplCasterTest.php" + pathname: "%sSplCasterTest.php" + extension: "php" + realPath: "%sSplCasterTest.php" + aTime: %s-%s-%d %d:%d:%d + mTime: %s-%s-%d %d:%d:%d + cTime: %s-%s-%d %d:%d:%d + inode: %d + size: %d + perms: 0%d + owner: %d + group: %d + type: "file" + writable: true + readable: true + executable: false + file: true + dir: false + link: false +%AcsvControl: array:2 [ + 0 => "," + 1 => """ + ] + flags: DROP_NEW_LINE|SKIP_EMPTY + maxLineLen: 0 + fstat: array:26 [ + "dev" => %d + "ino" => %d + "nlink" => %d + "rdev" => 0 + "blksize" => %i + "blocks" => %i + …20 + ] + eof: false + key: 0 +} +EOTXT; + $this->assertDumpMatchesFormat($dump, $var); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/CliDumperTest.php b/htdocs/includes/symfony/var-dumper/Tests/CliDumperTest.php new file mode 100644 index 00000000000..cd6d64d1c03 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/CliDumperTest.php @@ -0,0 +1,441 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +/** + * @author Nicolas Grekas + */ +class CliDumperTest extends \PHPUnit_Framework_TestCase +{ + use VarDumperTestTrait; + + public function testGet() + { + require __DIR__.'/Fixtures/dumb-var.php'; + + $dumper = new CliDumper('php://output'); + $dumper->setColors(false); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['uri'], $a['wrapper_data']); + + return $a; + }, + )); + $data = $cloner->cloneVar($var); + + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $out = preg_replace('/[ \t]+$/m', '', $out); + $intMax = PHP_INT_MAX; + $res = (int) $var['res']; + + $r = defined('HHVM_VERSION') ? '' : '#%d'; + $this->assertStringMatchesFormat( + << 1 + 0 => &1 null + "const" => 1.1 + 1 => true + 2 => false + 3 => NAN + 4 => INF + 5 => -INF + 6 => {$intMax} + "str" => "déjà\\n" + 7 => b"é\\x00" + "[]" => [] + "res" => stream resource {@{$res} + wrapper_type: "plainfile" + stream_type: "STDIO" + mode: "r" + unread_bytes: 0 + seekable: true + timed_out: false + blocked: true + eof: false + options: [] + } + "obj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d + +foo: "foo" + +"bar": "bar" + } + "closure" => Closure {{$r} + class: "Symfony\Component\VarDumper\Tests\CliDumperTest" + this: Symfony\Component\VarDumper\Tests\CliDumperTest {{$r} …} + parameters: { + \$a: {} + &\$b: { + typeHint: "PDO" + default: null + } + } + file: "{$var['file']}" + line: "{$var['line']} to {$var['line']}" + } + "line" => {$var['line']} + "nobj" => array:1 [ + 0 => &3 {#%d} + ] + "recurs" => &4 array:1 [ + 0 => &4 array:1 [&4] + ] + 8 => &1 null + "sobj" => Symfony\Component\VarDumper\Tests\Fixture\DumbFoo {#%d} + "snobj" => &3 {#%d} + "snobj2" => {#%d} + "file" => "{$var['file']}" + b"bin-key-é" => "" +] + +EOTXT + , + $out + ); + } + + /** + * @requires extension xml + */ + public function testXmlResource() + { + $var = xml_parser_create(); + + $this->assertDumpMatchesFormat( + <<markTestSkipped(); + } + + $var = fopen(__FILE__, 'r'); + fclose($var); + + $dumper = new CliDumper('php://output'); + $dumper->setColors(false); + $cloner = new VarCloner(); + $data = $cloner->cloneVar($var); + + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $res = (int) $var; + + $this->assertStringMatchesFormat( + <<setColors(false); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['wrapper_data']); + + return $a; + }, + )); + $cloner->addCasters(array( + ':stream' => eval('return function () use ($twig) { + try { + $twig->render(array()); + } catch (\Twig_Error_Runtime $e) { + throw $e->getPrevious(); + } + };'), + )); + $line = __LINE__ - 2; + $ref = (int) $out; + + $data = $cloner->cloneVar($out); + $dumper->dump($data, $out); + rewind($out); + $out = stream_get_contents($out); + + if (method_exists($twig, 'getSource')) { + $twig = <<assertStringMatchesFormat( + <<doDisplay() ==> new Exception(): { + src: { + %sTwig.php:19: """ + // line 2\\n + throw new \Exception('Foobar');\\n + }\\n + """ +{$twig} } + } + %d. Twig_Template->displayWithErrorHandling() ==> __TwigTemplate_VarDumperFixture_u75a09->doDisplay(): { + src: { + %sTemplate.php:%d: """ + try {\\n + \$this->doDisplay(\$context, \$blocks);\\n + } catch (Twig_Error \$e) {\\n + """ + } + } + %d. Twig_Template->display() ==> Twig_Template->displayWithErrorHandling(): { + src: { + %sTemplate.php:%d: """ + {\\n + \$this->displayWithErrorHandling(\$this->env->mergeGlobals(\$context), array_merge(\$this->blocks, \$blocks));\\n + }\\n + """ + } + } + %d. Twig_Template->render() ==> Twig_Template->display(): { + src: { + %sTemplate.php:%d: """ + try {\\n + \$this->display(\$context);\\n + } catch (Exception \$e) {\\n + """ + } + } + %d. %slosure%s() ==> Twig_Template->render(): { + src: { + %sCliDumperTest.php:{$line}: """ + }\\n + };'),\\n + ));\\n + """ + } + } + } + } +} + +EOTXT + , + $out + ); + } + + public function testRefsInProperties() + { + $var = (object) array('foo' => 'foo'); + $var->bar = &$var->foo; + + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); + + $out = fopen('php://memory', 'r+b'); + $data = $cloner->cloneVar($var); + $dumper->dump($data, $out); + rewind($out); + $out = stream_get_contents($out); + + $r = defined('HHVM_VERSION') ? '' : '#%d'; + $this->assertStringMatchesFormat( + <<getSpecialVars(); + + $this->assertDumpEquals( + << array:1 [ + 0 => &1 array:1 [ + 0 => &1 array:1 [&1] + ] + ] + 1 => array:1 [ + "GLOBALS" => &2 array:1 [ + "GLOBALS" => &2 array:1 [&2] + ] + ] + 2 => &2 array:1 [&2] +] +EOTXT + , + $var + ); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testGlobalsNoExt() + { + $var = $this->getSpecialVars(); + unset($var[0]); + $out = ''; + + $dumper = new CliDumper(function ($line, $depth) use (&$out) { + if ($depth >= 0) { + $out .= str_repeat(' ', $depth).$line."\n"; + } + }); + $dumper->setColors(false); + $cloner = new VarCloner(); + + $refl = new \ReflectionProperty($cloner, 'useExt'); + $refl->setAccessible(true); + $refl->setValue($cloner, false); + + $data = $cloner->cloneVar($var); + $dumper->dump($data); + + $this->assertSame( + << array:1 [ + "GLOBALS" => &1 array:1 [ + "GLOBALS" => &1 array:1 [&1] + ] + ] + 2 => &1 array:1 [&1] +] + +EOTXT + , + $out + ); + } + + /** + * @runInSeparateProcess + * @preserveGlobalState disabled + */ + public function testBuggyRefs() + { + if (PHP_VERSION_ID >= 50600) { + $this->markTestSkipped('PHP 5.6 fixed refs counting'); + } + + $var = $this->getSpecialVars(); + $var = $var[0]; + + $dumper = new CliDumper(); + $dumper->setColors(false); + $cloner = new VarCloner(); + + $data = $cloner->cloneVar($var)->withMaxDepth(3); + $out = ''; + $dumper->dump($data, function ($line, $depth) use (&$out) { + if ($depth >= 0) { + $out .= str_repeat(' ', $depth).$line."\n"; + } + }); + + $this->assertSame( + << array:1 [ + 0 => array:1 [ + 0 => array:1 [ …1] + ] + ] +] + +EOTXT + , + $out + ); + } + + private function getSpecialVars() + { + foreach (array_keys($GLOBALS) as $var) { + if ('GLOBALS' !== $var) { + unset($GLOBALS[$var]); + } + } + + $var = function &() { + $var = array(); + $var[] = &$var; + + return $var; + }; + + return array($var(), $GLOBALS, &$GLOBALS); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Fixtures/GeneratorDemo.php b/htdocs/includes/symfony/var-dumper/Tests/Fixtures/GeneratorDemo.php new file mode 100644 index 00000000000..e2d24c8c0ea --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Fixtures/GeneratorDemo.php @@ -0,0 +1,21 @@ +parent = false; + + $this->blocks = array( + ); + } + + protected function doDisplay(array $context, array $blocks = array()) + { + // line 2 + throw new \Exception('Foobar'); + } + + public function getTemplateName() + { + return 'foo.twig'; + } + + public function getDebugInfo() + { + return array (19 => 2); + } +} +/* foo bar*/ +/* twig source*/ +/* */ diff --git a/htdocs/includes/symfony/var-dumper/Tests/Fixtures/dumb-var.php b/htdocs/includes/symfony/var-dumper/Tests/Fixtures/dumb-var.php new file mode 100644 index 00000000000..59ee19bdad1 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Fixtures/dumb-var.php @@ -0,0 +1,40 @@ +bar = 'bar'; + +$g = fopen(__FILE__, 'r'); + +$var = array( + 'number' => 1, null, + 'const' => 1.1, true, false, NAN, INF, -INF, PHP_INT_MAX, + 'str' => "déjà\n", "\xE9\x00", + '[]' => array(), + 'res' => $g, + 'obj' => $foo, + 'closure' => function ($a, \PDO &$b = null) {}, + 'line' => __LINE__ - 1, + 'nobj' => array((object) array()), +); + +$r = array(); +$r[] = &$r; + +$var['recurs'] = &$r; +$var[] = &$var[0]; +$var['sobj'] = $var['obj']; +$var['snobj'] = &$var['nobj'][0]; +$var['snobj2'] = $var['nobj'][0]; +$var['file'] = __FILE__; +$var["bin-key-\xE9"] = ''; + +unset($g, $r); diff --git a/htdocs/includes/symfony/var-dumper/Tests/HtmlDumperTest.php b/htdocs/includes/symfony/var-dumper/Tests/HtmlDumperTest.php new file mode 100644 index 00000000000..3090435c5d4 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/HtmlDumperTest.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +/** + * @author Nicolas Grekas + */ +class HtmlDumperTest extends \PHPUnit_Framework_TestCase +{ + public function testGet() + { + require __DIR__.'/Fixtures/dumb-var.php'; + + $dumper = new HtmlDumper('php://output'); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); + $cloner->addCasters(array( + ':stream' => function ($res, $a) { + unset($a['uri'], $a['wrapper_data']); + + return $a; + }, + )); + $data = $cloner->cloneVar($var); + + ob_start(); + $dumper->dump($data); + $out = ob_get_clean(); + $out = preg_replace('/[ \t]+$/m', '', $out); + $var['file'] = htmlspecialchars($var['file'], ENT_QUOTES, 'UTF-8'); + $intMax = PHP_INT_MAX; + preg_match('/sf-dump-\d+/', $out, $dumpId); + $dumpId = $dumpId[0]; + $res = (int) $var['res']; + + $r = defined('HHVM_VERSION') ? '' : '#%d'; + $this->assertStringMatchesFormat( + <<array:24 [ + "number" => 1 + 0 => &1 null + "const" => 1.1 + 1 => true + 2 => false + 3 => NAN + 4 => INF + 5 => -INF + 6 => {$intMax} + "str" => "d&%s;j&%s;\\n" + 7 => b"&%s;\\x00" + "[]" => [] + "res" => stream resource @{$res} + wrapper_type: "plainfile" + stream_type: "STDIO" + mode: "r" + unread_bytes: 0 + seekable: true + timed_out: false + blocked: true + eof: false + options: [] + } + "obj" => DumbFoo {#%d + +foo: "foo" + +"bar": "bar" + } + "closure" => Closure {{$r} + class: "Symfony\Component\VarDumper\Tests\HtmlDumperTest" + this: HtmlDumperTest {{$r} &%s;} + parameters: { + \$a: {} + &\$b: { + typeHint: "PDO" + default: null + } + } + file: "{$var['file']}" + line: "{$var['line']} to {$var['line']}" + } + "line" => {$var['line']} + "nobj" => array:1 [ + 0 => &3 {#%d} + ] + "recurs" => &4 array:1 [ + 0 => &4 array:1 [&4] + ] + 8 => &1 null + "sobj" => DumbFoo {#%d} + "snobj" => &3 {#%d} + "snobj2" => {#%d} + "file" => "{$var['file']}" + b"bin-key-&%s;" => "" +] + + +EOTXT + , + + $out + ); + } + + public function testCharset() + { + $var = mb_convert_encoding('Словарь', 'CP1251', 'UTF-8'); + + $dumper = new HtmlDumper('php://output', 'CP1251'); + $dumper->setDumpHeader(''); + $dumper->setDumpBoundaries('', ''); + $cloner = new VarCloner(); + + $data = $cloner->cloneVar($var); + $out = fopen('php://memory', 'r+b'); + $dumper->dump($data, $out); + rewind($out); + $out = stream_get_contents($out); + + $this->assertStringMatchesFormat( + <<b"Словарь" + + +EOTXT + , + + $out + ); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php b/htdocs/includes/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php new file mode 100644 index 00000000000..3295797179c --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/Test/VarDumperTestTraitTest.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests\Test; + +use Symfony\Component\VarDumper\Test\VarDumperTestTrait; + +class VarDumperTestTraitTest extends \PHPUnit_Framework_TestCase +{ + use VarDumperTestTrait; + + public function testItComparesLargeData() + { + $howMany = 700; + $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd')); + + $expected = sprintf("array:%d [\n", $howMany + 1); + for ($i = 0; $i <= $howMany; ++$i) { + $expected .= << array:4 [ + 0 => "a" + 1 => "b" + 2 => "c" + 3 => "d" + ]\n +EODUMP; + } + $expected .= "]\n"; + + $this->assertDumpEquals($expected, $data); + } +} diff --git a/htdocs/includes/symfony/var-dumper/Tests/VarClonerTest.php b/htdocs/includes/symfony/var-dumper/Tests/VarClonerTest.php new file mode 100644 index 00000000000..31e3a40ae04 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/Tests/VarClonerTest.php @@ -0,0 +1,187 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper\Tests; + +use Symfony\Component\VarDumper\Cloner\VarCloner; + +/** + * @author Nicolas Grekas + */ +class VarClonerTest extends \PHPUnit_Framework_TestCase +{ + public function testMaxIntBoundary() + { + $data = array(PHP_INT_MAX => 123); + + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($data); + + $expected = << Array + ( + [0] => Array + ( + [0] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => array + [class] => assoc + [value] => 1 + [cut] => 0 + [handle] => 0 + [refCount] => 0 + [position] => 1 + ) + + ) + + [1] => Array + ( + [%s] => 123 + ) + + ) + + [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 + [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 + [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 +) + +EOTXT; + $this->assertSame(sprintf($expected, PHP_INT_MAX), print_r($clone, true)); + } + + public function testClone() + { + $json = json_decode('{"1":{"var":"val"},"2":{"var":"val"}}'); + + $cloner = new VarCloner(); + $clone = $cloner->cloneVar($json); + + $expected = << Array + ( + [0] => Array + ( + [0] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => stdClass + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 1 + ) + + ) + + [1] => Array + ( + [\000+\0001] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => stdClass + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 2 + ) + + [\000+\0002] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => stdClass + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 3 + ) + + ) + + [2] => Array + ( + [\000+\000var] => val + ) + + [3] => Array + ( + [\000+\000var] => val + ) + + ) + + [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 + [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 + [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 +) + +EOTXT; + $this->assertStringMatchesFormat($expected, print_r($clone, true)); + } + + public function testCaster() + { + $cloner = new VarCloner(array( + '*' => function ($obj, $array) { + return array('foo' => 123); + }, + __CLASS__ => function ($obj, $array) { + ++$array['foo']; + + return $array; + }, + )); + $clone = $cloner->cloneVar($this); + + $expected = << Array + ( + [0] => Array + ( + [0] => Symfony\Component\VarDumper\Cloner\Stub Object + ( + [type] => object + [class] => %s + [value] => + [cut] => 0 + [handle] => %i + [refCount] => 0 + [position] => 1 + ) + + ) + + [1] => Array + ( + [foo] => 124 + ) + + ) + + [maxDepth:Symfony\Component\VarDumper\Cloner\Data:private] => 20 + [maxItemsPerDepth:Symfony\Component\VarDumper\Cloner\Data:private] => -1 + [useRefHandles:Symfony\Component\VarDumper\Cloner\Data:private] => -1 +) + +EOTXT; + $this->assertStringMatchesFormat($expected, print_r($clone, true)); + } +} diff --git a/htdocs/includes/symfony/var-dumper/VarDumper.php b/htdocs/includes/symfony/var-dumper/VarDumper.php new file mode 100644 index 00000000000..8c610c5d33b --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/VarDumper.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\VarDumper; + +use Symfony\Component\VarDumper\Cloner\VarCloner; +use Symfony\Component\VarDumper\Dumper\CliDumper; +use Symfony\Component\VarDumper\Dumper\HtmlDumper; + +// Load the global dump() function +require_once __DIR__.'/Resources/functions/dump.php'; + +/** + * @author Nicolas Grekas + */ +class VarDumper +{ + private static $handler; + + public static function dump($var) + { + if (null === self::$handler) { + $cloner = new VarCloner(); + $dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper(); + self::$handler = function ($var) use ($cloner, $dumper) { + $dumper->dump($cloner->cloneVar($var)); + }; + } + + return call_user_func(self::$handler, $var); + } + + public static function setHandler(callable $callable = null) + { + $prevHandler = self::$handler; + self::$handler = $callable; + + return $prevHandler; + } +} diff --git a/htdocs/includes/symfony/var-dumper/composer.json b/htdocs/includes/symfony/var-dumper/composer.json new file mode 100644 index 00000000000..a90729b6bbe --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/composer.json @@ -0,0 +1,44 @@ +{ + "name" : "symfony/var-dumper", + "type" : "library", + "description" : "Symfony mechanism for exploring and dumping PHP variables", + "keywords" : [ + "dump", + "debug" + ], + "homepage" : "https://symfony.com", + "license" : "MIT", + "authors" : [{ + "name" : "Nicolas Grekas", + "email" : "p@tchwork.com" + }, { + "name" : "Symfony Community", + "homepage" : "https://symfony.com/contributors" + } + ], + "require" : { + "php" : ">=5.5.9", + "symfony/polyfill-mbstring" : "~1.0" + }, + "require-dev" : { + "twig/twig" : "~1.20|~2.0" + }, + "suggest" : {}, + "autoload" : { + "files" : [ + "Resources/functions/dump.php" + ], + "psr-4" : { + "Symfony\\Component\\VarDumper\\" : "" + }, + "exclude-from-classmap" : [ + "/Tests/" + ] + }, + "minimum-stability" : "dev", + "extra" : { + "branch-alias" : { + "dev-master" : "3.0-dev" + } + } +} \ No newline at end of file diff --git a/htdocs/includes/tcpdi/tcpdi_parser.php b/htdocs/includes/tcpdi/tcpdi_parser.php index d8374ec8c00..13e9839f2b4 100644 --- a/htdocs/includes/tcpdi/tcpdi_parser.php +++ b/htdocs/includes/tcpdi/tcpdi_parser.php @@ -703,11 +703,11 @@ class tcpdi_parser { $objtype = ''; // object type to be returned $objval = ''; // object value to be returned // skip initial white space chars: \x00 null (NUL), \x09 horizontal tab (HT), \x0A line feed (LF), \x0C form feed (FF), \x0D carriage return (CR), \x20 space (SP) - while (strspn($data{$offset}, "\x00\x09\x0a\x0c\x0d\x20") == 1) { + while (strspn($data[$offset], "\x00\x09\x0a\x0c\x0d\x20") == 1) { $offset++; } // get first char - $char = $data{$offset}; + $char = $data[$offset]; // get object type switch ($char) { case '%': { // \x25 PERCENT SIGN @@ -738,10 +738,10 @@ class tcpdi_parser { if ($char == '(') { $open_bracket = 1; while ($open_bracket > 0) { - if (!isset($data{$strpos})) { + if (!isset($data[$strpos])) { break; } - $ch = $data{$strpos}; + $ch = $data[$strpos]; switch ($ch) { case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash) // skip next character @@ -786,7 +786,7 @@ class tcpdi_parser { } case '<': // \x3C LESS-THAN SIGN case '>': { // \x3E GREATER-THAN SIGN - if (isset($data{($offset + 1)}) AND ($data{($offset + 1)} == $char)) { + if (isset($data[($offset + 1)]) AND ($data[($offset + 1)] == $char)) { // dictionary object $objtype = PDF_TYPE_DICTIONARY; if ($char == '<') { @@ -809,7 +809,7 @@ class tcpdi_parser { break; } default: { - $frag = $data{$offset} . @$data{$offset+1} . @$data{$offset+2} . @$data{$offset+3}; + $frag = $data[$offset] . @$data[$offset+1] . @$data[$offset+2] . @$data[$offset+3]; switch ($frag) { case 'endo': // indirect object @@ -886,16 +886,16 @@ class tcpdi_parser { $dict = ''; $offset += 2; do { - if ($data{$offset} == '>' && $data{$offset+1} == '>') { + if ($data[$offset] == '>' && $data[$offset+1] == '>') { $i--; $dict .= '>>'; $offset += 2; - } else if ($data{$offset} == '<' && $data{$offset+1} == '<') { + } else if ($data[$offset] == '<' && $data[$offset+1] == '<') { $i++; $dict .= '<<'; $offset += 2; } else { - $dict .= $data{$offset}; + $dict .= $data[$offset]; $offset++; } } while ($i>0); diff --git a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php index 67bb255d187..969bb165e62 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php @@ -1814,19 +1814,14 @@ class TCPDF_STATIC { */ public static function fopenLocal($filename, $mode) { - if (strpos($filename, '//') === 0) - { + if (strpos($filename, '//') === 0) { // Share folder on a (windows) server // e.g.: "//[MyServerName]/[MySharedFolder]/" // // nothing to change - } - elseif (strpos($filename, '://') === false) - { + } elseif (strpos($filename, '://') === false) { $filename = 'file://'.$filename; - } - elseif (stream_is_local($filename) !== true) - { + } elseif (stream_is_local($filename) !== true) { return false; } @@ -1862,8 +1857,8 @@ class TCPDF_STATIC { * Wrapper for file_exists. * Checks whether a file or directory exists. * Only allows some protocols and local files. - * @param filename (string) Path to the file or directory. - * @return Returns TRUE if the file or directory specified by filename exists; FALSE otherwise. + * @param filename (string) Path to the file or directory. + * @return Returns TRUE if the file or directory specified by filename exists; FALSE otherwise. * @public static */ public static function file_exists($filename) { @@ -1880,7 +1875,7 @@ class TCPDF_STATIC { * Reads entire file into a string. * The file can be also an URL. * @param $file (string) Name of the file or URL to read. - * @return The function returns the read data or FALSE on failure. + * @return The function returns the read data or FALSE on failure. * @author Nicola Asuni * @since 6.0.025 * @public static @@ -2110,7 +2105,7 @@ class TCPDF_STATIC { return $a['i']; } - + /** * Array of page formats * measures are calculated in this way: (inches * 72) or (millimeters * 72 / 25.4) diff --git a/htdocs/index.php b/htdocs/index.php index dc0a05ae98b..4eea2353d3e 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -43,13 +43,13 @@ $hookmanager->initHooks(array('index')); // Check if company name is defined (first install) if (!isset($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_NOM)) { - header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); - exit; + header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); + exit; } if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) // If only user module enabled { - header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); - exit; + header("Location: ".DOL_URL_ROOT."/admin/index.php?mainmenu=home&leftmenu=setup&mesg=setupnotcomplete"); + exit; } if (GETPOST('addbox')) // Add box (when submit is done from a form when ajax disabled) { @@ -84,19 +84,19 @@ print load_fiche_titre(' ', $resultboxes['selectboxlist'], '', 0, '', 'titl if (!empty($conf->global->MAIN_MOTD)) { - $conf->global->MAIN_MOTD = preg_replace('//i', '
    ', $conf->global->MAIN_MOTD); - if (!empty($conf->global->MAIN_MOTD)) - { - $substitutionarray = getCommonSubstitutionArray($langs); - complete_substitutions_array($substitutionarray, $langs); - $texttoshow = make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs); + $conf->global->MAIN_MOTD = preg_replace('//i', '
    ', $conf->global->MAIN_MOTD); + if (!empty($conf->global->MAIN_MOTD)) + { + $substitutionarray = getCommonSubstitutionArray($langs); + complete_substitutions_array($substitutionarray, $langs); + $texttoshow = make_substitutions($conf->global->MAIN_MOTD, $substitutionarray, $langs); - print "\n\n"; - print '
    '; - print dol_htmlentitiesbr($texttoshow); - print '

    '; - print "\n\n"; - } + print "\n\n"; + print '
    '; + print dol_htmlentitiesbr($texttoshow); + print '

    '; + print "\n\n"; + } } @@ -117,210 +117,211 @@ $langs->loadLangs(array('commercial', 'bills', 'orders', 'contracts')); // Load global statistics of objects if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { - $object = new stdClass(); - $parameters = array(); - $action = ''; - $reshook = $hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - $boxstatFromHook = $hookmanager->resPrint; + $object = new stdClass(); + $parameters = array(); + $action = ''; + $reshook = $hookmanager->executeHooks('addStatisticLine', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + $boxstatFromHook = $hookmanager->resPrint; - if (empty($reshook)) - { - // Cle array returned by the method load_state_board for each line - $keys = array( - 'users', - 'members', - 'expensereports', - 'holidays', - 'customers', - 'prospects', - 'suppliers', - 'contacts', - 'products', - 'services', - 'projects', - 'proposals', - 'orders', - 'invoices', - 'donations', - 'supplier_proposals', - 'supplier_orders', - 'supplier_invoices', - 'contracts', - 'interventions', - 'ticket' - ); + if (empty($reshook)) + { + // Cle array returned by the method load_state_board for each line + $keys = array( + 'users', + 'members', + 'expensereports', + 'holidays', + 'customers', + 'prospects', + 'suppliers', + 'contacts', + 'products', + 'services', + 'projects', + 'proposals', + 'orders', + 'invoices', + 'donations', + 'supplier_proposals', + 'supplier_orders', + 'supplier_invoices', + 'contracts', + 'interventions', + 'ticket' + ); - // Condition to be checked for each display line dashboard - $conditions = array( - 'users' => $user->rights->user->user->lire, - 'members' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire, - 'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), - 'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), - 'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), - 'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, - 'products' => !empty($conf->product->enabled) && $user->rights->produit->lire, - 'services' => !empty($conf->service->enabled) && $user->rights->service->lire, - 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, - 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, - 'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire, - 'donations' => !empty($conf->don->enabled) && $user->rights->don->lire, - 'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire, - 'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire, + // Condition to be checked for each display line dashboard + $conditions = array( + 'users' => $user->rights->user->user->lire, + 'members' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire, + 'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS), + 'prospects' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS), + 'suppliers' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS), + 'contacts' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire, + 'products' => !empty($conf->product->enabled) && $user->rights->produit->lire, + 'services' => !empty($conf->service->enabled) && $user->rights->service->lire, + 'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire, + 'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire, + 'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire, + 'donations' => !empty($conf->don->enabled) && $user->rights->don->lire, + 'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire, + 'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire, 'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS), 'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS), 'supplier_proposals' => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS), - 'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire, - 'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire, - 'holidays' => !empty($conf->holiday->enabled) && $user->rights->holiday->read, - 'ticket' => !empty($conf->ticket->enabled) && $user->rights->ticket->read - ); - // Class file containing the method load_state_board for each line - $includes = array( - 'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php", - 'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php", - 'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", - 'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", - 'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php", - 'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php", - 'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", - 'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", - 'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php", - 'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php", - 'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php", - 'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php", - 'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php", - 'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php", - 'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php", - 'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php", - 'supplier_proposals' => DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php", - 'projects' => DOL_DOCUMENT_ROOT."/projet/class/project.class.php", - 'expensereports' => DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php", - 'holidays' => DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php", - 'ticket' => DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php" - ); - // Name class containing the method load_state_board for each line - $classes = array( - 'users' => 'User', - 'members' => 'Adherent', - 'customers' => 'Client', - 'prospects' => 'Client', - 'suppliers' => 'Fournisseur', - 'contacts' => 'Contact', - 'products' => 'Product', - 'services' => 'ProductService', - 'proposals' => 'Propal', - 'orders' => 'Commande', - 'invoices' => 'Facture', - 'donations' => 'Don', - 'contracts' => 'Contrat', - 'interventions' => 'Fichinter', - 'supplier_orders' => 'CommandeFournisseur', - 'supplier_invoices' => 'FactureFournisseur', - 'supplier_proposals' => 'SupplierProposal', - 'projects' => 'Project', - 'expensereports' => 'ExpenseReport', - 'holidays' => 'Holiday', - 'ticket' => 'Ticket', - ); - // Translation keyword - $titres = array( - 'users' => "Users", - 'members' => "Members", - 'customers' => "ThirdPartyCustomersStats", - 'prospects' => "ThirdPartyProspectsStats", - 'suppliers' => "Suppliers", - 'contacts' => "Contacts", - 'products' => "Products", - 'services' => "Services", - 'proposals' => "CommercialProposalsShort", - 'orders' => "CustomersOrders", - 'invoices' => "BillsCustomers", - 'donations' => "Donations", - 'contracts' => "Contracts", - 'interventions' => "Interventions", - 'supplier_orders' => "SuppliersOrders", - 'supplier_invoices' => "SuppliersInvoices", - 'supplier_proposals' => "SupplierProposalShort", - 'projects' => "Projects", - 'expensereports' => "ExpenseReports", - 'holidays' => "Holidays", - 'ticket' => "Ticket", - ); - // Dashboard Link lines - $links = array( - 'users' => DOL_URL_ROOT.'/user/list.php', - 'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members', - 'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies', - 'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies', - 'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies', - 'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies', - 'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products', - 'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products', - 'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', - 'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders', - 'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills', - 'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations', - 'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts', - 'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter', - 'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', - 'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills', - 'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=', - 'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project', - 'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport', - 'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday', - 'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket' - ); - // Translation lang files - $langfile = array( - 'customers' => "companies", - 'contacts' => "companies", - 'services' => "products", - 'proposals' => "propal", - 'invoices' => "bills", - 'supplier_orders' => "orders", - 'supplier_invoices' => "bills", - 'supplier_proposals' => 'supplier_proposal', - 'expensereports' => "trips", - 'holidays' => "holiday", - ); + 'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire, + 'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire, + 'holidays' => !empty($conf->holiday->enabled) && $user->rights->holiday->read, + 'ticket' => !empty($conf->ticket->enabled) && $user->rights->ticket->read + ); + // Class file containing the method load_state_board for each line + $includes = array( + 'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php", + 'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php", + 'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", + 'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php", + 'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php", + 'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php", + 'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", + 'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php", + 'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php", + 'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php", + 'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php", + 'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php", + 'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php", + 'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php", + 'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php", + 'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php", + 'supplier_proposals' => DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php", + 'projects' => DOL_DOCUMENT_ROOT."/projet/class/project.class.php", + 'expensereports' => DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php", + 'holidays' => DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php", + 'ticket' => DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php" + ); + // Name class containing the method load_state_board for each line + $classes = array( + 'users' => 'User', + 'members' => 'Adherent', + 'customers' => 'Client', + 'prospects' => 'Client', + 'suppliers' => 'Fournisseur', + 'contacts' => 'Contact', + 'products' => 'Product', + 'services' => 'ProductService', + 'proposals' => 'Propal', + 'orders' => 'Commande', + 'invoices' => 'Facture', + 'donations' => 'Don', + 'contracts' => 'Contrat', + 'interventions' => 'Fichinter', + 'supplier_orders' => 'CommandeFournisseur', + 'supplier_invoices' => 'FactureFournisseur', + 'supplier_proposals' => 'SupplierProposal', + 'projects' => 'Project', + 'expensereports' => 'ExpenseReport', + 'holidays' => 'Holiday', + 'ticket' => 'Ticket', + ); + // Translation keyword + $titres = array( + 'users' => "Users", + 'members' => "Members", + 'customers' => "ThirdPartyCustomersStats", + 'prospects' => "ThirdPartyProspectsStats", + 'suppliers' => "Suppliers", + 'contacts' => "Contacts", + 'products' => "Products", + 'services' => "Services", + 'proposals' => "CommercialProposalsShort", + 'orders' => "CustomersOrders", + 'invoices' => "BillsCustomers", + 'donations' => "Donations", + 'contracts' => "Contracts", + 'interventions' => "Interventions", + 'supplier_orders' => "SuppliersOrders", + 'supplier_invoices' => "SuppliersInvoices", + 'supplier_proposals' => "SupplierProposalShort", + 'projects' => "Projects", + 'expensereports' => "ExpenseReports", + 'holidays' => "Holidays", + 'ticket' => "Ticket", + ); + // Dashboard Link lines + $links = array( + 'users' => DOL_URL_ROOT.'/user/list.php', + 'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members', + 'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies', + 'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies', + 'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies', + 'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies', + 'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products', + 'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products', + 'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals', + 'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders', + 'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills', + 'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations', + 'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts', + 'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter', + 'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers', + 'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills', + 'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=', + 'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project', + 'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport', + 'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday', + 'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket' + ); + // Translation lang files + $langfile = array( + 'customers' => "companies", + 'contacts' => "companies", + 'services' => "products", + 'proposals' => "propal", + 'invoices' => "bills", + 'supplier_orders' => "orders", + 'supplier_invoices' => "bills", + 'supplier_proposals' => 'supplier_proposal', + 'expensereports' => "trips", + 'holidays' => "holiday", + ); - // Loop and displays each line of table + // Loop and displays each line of table $boardloaded = array(); - foreach ($keys as $val) - { - if ($conditions[$val]) - { - $boxstatItem = ''; - $class = $classes[$val]; - // Search in cache if load_state_board is already realized - if (!isset($boardloaded[$class]) || !is_object($boardloaded[$class])) - { - include_once $includes[$val]; // Loading a class cost around 1Mb + foreach ($keys as $val) + { + if ($conditions[$val]) + { + $boxstatItem = ''; + $class = $classes[$val]; + // Search in cache if load_state_board is already realized + $classkeyforcache = $class; + if ($classkeyforcache == 'ProductService') $classkeyforcache = 'Product'; // ProductService use same load_state_board than Product - $board = new $class($db); - $board->load_state_board(); - $boardloaded[$class] = $board; - } - else - { - $board = $boardloaded[$class]; - } + if (!isset($boardloaded[$classkeyforcache]) || !is_object($boardloaded[$classkeyforcache])) + { + include_once $includes[$val]; // Loading a class cost around 1Mb - $langs->load(empty($langfile[$val]) ? $val : $langfile[$val]); + $board = new $class($db); + $board->load_state_board(); + $boardloaded[$class] = $board; + } else { + $board = $boardloaded[$classkeyforcache]; + } - $text = $langs->trans($titres[$val]); - $boxstatItem .= ''; - $boxstatItem .= '
    '; - $boxstatItem .= ''.$text.'
    '; - $boxstatItem .= ''.img_object("", $board->picto, 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).''; - $boxstatItem .= '
    '; - $boxstatItem .= '
    '; + $langs->load(empty($langfile[$val]) ? $val : $langfile[$val]); - $boxstatItems[$val] = $boxstatItem; - } - } - } + $text = $langs->trans($titres[$val]); + $boxstatItem .= ''; + $boxstatItem .= '
    '; + $boxstatItem .= ''.$text.'
    '; + $boxstatItem .= ''.img_object("", $board->picto, 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).''; + $boxstatItem .= '
    '; + $boxstatItem .= '
    '; + + $boxstatItems[$val] = $boxstatItem; + } + } + } } @@ -329,549 +330,549 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) // Dolibarr Working Board with weather if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { - $showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0; - - //Array that contains all WorkboardResponse classes to process them - $dashboardlines = array(); - - // Do not include sections without management permission - require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php'; - - // Number of actions to do (late) - if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) { - include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; - $board = new ActionComm($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - // Number of project opened - if (!empty($conf->projet->enabled) && $user->rights->projet->lire) { - include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; - $board = new Project($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - // Number of tasks to do (late) - if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) { - include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; - $board = new Task($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - // Number of commercial proposals open (expired) - if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { - include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; - $board = new Propal($db); - $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); - // Number of commercial proposals CLOSED signed (billed) - $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed"); - } - - // Number of commercial proposals open (expired) - if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { - include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; - $board = new SupplierProposal($db); - $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); - // Number of commercial proposals CLOSED signed (billed) - $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed"); - } - - // Number of customer orders a deal - if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { - include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - $board = new Commande($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - // Number of suppliers orders a deal - if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) { - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; - $board = new CommandeFournisseur($db); - $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); - $dashboardlines[$board->element.'_awaiting'] = $board->load_board($user, 'awaiting'); - } - - // Number of contract / services enabled (delayed) - if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { - include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; - $board = new Contrat($db); - $dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive"); - // Number of active services (expired) - $dashboardlines[$board->element.'_active'] = $board->load_board($user, "active"); - } - - // Number of tickets open - if (!empty($conf->ticket->enabled) && $user->rights->ticket->read) { - include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; - $board = new Ticket($db); - $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); - // Number of active services (expired) - //$dashboardlines[$board->element.'_active'] = $board->load_board($user, "active"); - } - - // Number of invoices customers (paid) - if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { - include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; - $board = new Facture($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - // Number of supplier invoices (paid) - if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) { - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; - $board = new FactureFournisseur($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - // Number of transactions to conciliate - if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid) { - include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; - $board = new Account($db); - $nb = $board::countAccountToReconcile(); // Get nb of account to reconciliate - if ($nb > 0) { - $dashboardlines[$board->element] = $board->load_board($user); - } - } - - // Number of cheque to send - if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) { - include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; - $board = new RemiseCheque($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - // Number of foundation members - if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) { - include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; - $board = new Adherent($db); - $dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift'); - $dashboardlines[$board->element.'_expired'] = $board->load_board($user, 'expired'); - } - - // Number of expense reports to approve - if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) { - include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; - $board = new ExpenseReport($db); - $dashboardlines[$board->element . '_toapprove'] = $board->load_board($user, 'toapprove'); - } - - // Number of expense reports to pay - if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) { - include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; - $board = new ExpenseReport($db); - $dashboardlines[$board->element . '_topay'] = $board->load_board($user, 'topay'); - } - - // Number of holidays to approve - if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) { - include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; - $board = new Holiday($db); - $dashboardlines[$board->element] = $board->load_board($user); - } - - $object = new stdClass(); - $parameters = array(); - $action = ''; - $reshook = $hookmanager->executeHooks('addOpenElementsDashboardLine', $parameters, $object, - $action); // Note that $action and $object may have been modified by some hooks - if ($reshook == 0) { - $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray); - } - - /* Open object dashboard */ - $dashboardgroup = array( - 'action' => - array( - 'groupName' => 'Agenda', - 'stats' => array('action'), - ), - 'project' => - array( - 'groupName' => 'Projects', - 'globalStatsKey' => 'projects', - 'stats' => array('project', 'project_task'), - ), - 'propal' => - array( - 'groupName' => 'Proposals', - 'globalStatsKey' => 'proposals', - 'stats' => - array('propal_opened', 'propal_signed'), - ), - 'commande' => - array( - 'groupName' => 'Orders', - 'globalStatsKey' => 'orders', - 'stats' => - array('commande'), - ), - 'facture' => - array( - 'groupName' => 'Invoices', - 'globalStatsKey' => 'invoices', - 'stats' => - array('facture'), - ), - 'supplier_proposal' => - array( - 'groupName' => 'SupplierProposals', - 'globalStatsKey' => 'askprice', - 'stats' => - array('supplier_proposal_opened', 'supplier_proposal_signed'), - ), - 'order_supplier' => - array( - 'groupName' => 'SuppliersOrders', - 'globalStatsKey' => 'supplier_orders', - 'stats' => - array('order_supplier_opened', 'order_supplier_awaiting'), - ), - 'invoice_supplier' => - array( - 'groupName' => 'BillsSuppliers', - 'globalStatsKey' => 'supplier_invoices', - 'stats' => - array('invoice_supplier'), - ), - 'contrat' => - array( - 'groupName' => 'Contracts', - 'globalStatsKey' => 'Contracts', - 'stats' => - array('contrat_inactive', 'contrat_active'), - ), - 'ticket' => - array( - 'groupName' => 'Tickets', - 'globalStatsKey' => 'ticket', - 'stats' => - array('ticket_opened'), - ), - 'bank_account' => - array( - 'groupName' => 'BankAccount', - 'stats' => - array('bank_account', 'chequereceipt'), - ), - 'member' => - array( - 'groupName' => 'Members', - 'globalStatsKey' => 'members', - 'stats' => - array('member_shift', 'member_expired'), - ), - 'expensereport' => - array( - 'groupName' => 'ExpenseReport', - 'globalStatsKey' => 'expensereports', - 'stats' => - array('expensereport_toapprove', 'expensereport_topay'), - ), - 'holiday' => - array( - 'groupName' => 'Holidays', - 'globalStatsKey' => 'holidays', - 'stats' => - array('holiday'), - ), - ); - - $object = new stdClass(); - $parameters = array( - 'dashboardgroup' => $dashboardgroup - ); - $reshook = $hookmanager->executeHooks('addOpenElementsDashboardGroup', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook == 0) { - $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray); - } - - - // Calculate total nb of late - $totallate = $totaltodo = 0; - - //Remove any invalid response - //load_board can return an integer if failed or WorkboardResponse if OK - $valid_dashboardlines = array(); - foreach ($dashboardlines as $infoKey => $tmp) { - if ($tmp instanceof WorkboardResponse) { - $valid_dashboardlines[$infoKey] = $tmp; - } - } - - // We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop - foreach ($valid_dashboardlines as $board) { - if ($board->nbtodolate > 0) { - $totaltodo += $board->nbtodo; - $totallate += $board->nbtodolate; - } - } - - $openedDashBoardSize = 'info-box-sm'; // use sm by default - foreach ($dashboardgroup as $dashbordelement) { - if (is_array($dashbordelement['stats']) && count($dashbordelement['stats']) > 2) { - $openedDashBoardSize = ''; // use default info box size : big - break; - } - } - - $totalLateNumber = $totallate; - $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0); - if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { - $totallate = $totallatePercentage; - } - - $boxwork = ''; - $boxwork .= '
    '; - $boxwork .= ''."\n"; - $boxwork .= ''; - $boxwork .= ''; - $boxwork .= ''."\n"; - - // Show dashboard - $nbworkboardempty = 0; - $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array(); - if (!empty($valid_dashboardlines)) { - $openedDashBoard = ''; - - $boxwork .= ''; - } else { - $boxwork .= ''; - $boxwork .= ''; - $boxwork .= ''; - } - - $boxwork .= ''; - - $boxwork .= '
    '.$langs->trans("DolibarrWorkBoard").'
    '; - if ($showweather) { - if ($totallate > 0) { - $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate", - $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')'; - } else { - $text = $langs->transnoentitiesnoconv("NoItemLate"); - } - $text .= '. '.$langs->transnoentitiesnoconv("LateDesc"); - //$text.=$form->textwithpicto('',$langs->trans("LateDesc")); - $options = 'height="24px" style="float: right"'; - $boxwork .= showWeather($totallate, $text, $options, 'inline-block valignmiddle'); - } - $boxwork .= '
    '; - - foreach ($dashboardgroup as $groupKey => $groupElement) { - $boards = array(); - - if (empty($conf->global->MAIN_DISABLE_NEW_OPENED_DASH_BOARD)) { - foreach ($groupElement['stats'] as $infoKey) { - if (!empty($valid_dashboardlines[$infoKey])) { - $boards[] = $valid_dashboardlines[$infoKey]; - $isIntopOpenedDashBoard[] = $infoKey; - } - } - } - - if (!empty($boards)) { - $groupName = $langs->trans($groupElement['groupName']); - $groupKeyLowerCase = strtolower($groupKey); - $nbTotalForGroup = 0; - - // global stats - $globalStatsKey = false; - if (!empty($groupElement['globalStatsKey']) && empty($groupElement['globalStats'])) { // can be filled by hook - $globalStatsKey = $groupElement['globalStatsKey']; - $groupElement['globalStats'] = array(); - - if (is_array($keys) && in_array($globalStatsKey, $keys)) - { - // get key index of stats used in $includes, $classes, $keys, $icons, $titres, $links - $keyIndex = array_search($globalStatsKey, $keys); - - $classe = $classes[$keyIndex]; - if (isset($boardloaded[$classe]) && is_object($boardloaded[$classe])) - { - $groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey] ? $boardloaded[$classe]->nb[$globalStatsKey] : 0; - $nbTotal = doubleval($groupElement['globalStats']['total']); - if ($nbTotal >= 10000) { $nbTotal = round($nbTotal / 1000, 2).'k'; } - $groupElement['globalStats']['text'] = $langs->trans('Total').' : '.$langs->trans($titres[$keyIndex]).' ('.$groupElement['globalStats']['total'].')'; - $groupElement['globalStats']['total'] = $nbTotal; - $groupElement['globalStats']['link'] = $links[$keyIndex]; - } - } - } - - $openedDashBoard .= '
    '."\n"; - $openedDashBoard .= '
    '."\n"; - $openedDashBoard .= ' '."\n"; - $openedDashBoard .= ' '."\n"; - - // Show the span for the total of record - if (!empty($groupElement['globalStats'])) { - $globalStatInTopOpenedDashBoard[] = $globalStatsKey; - $openedDashBoard .= ' '.$nbTotal.''."\n"; - } - - $openedDashBoard .= ' '."\n"; - $openedDashBoard .= '
    '."\n"; - - $openedDashBoard .= ' '.$groupName.''."\n"; - - foreach ($boards as $board) { - if (!empty($board->labelShort)) { - $infoName = ''.$board->labelShort.''; - } else { - $infoName = $board->label; - } - - $textLateTitle = $langs->trans("NActionsLate", $board->nbtodolate); - $textLateTitle .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; - - $textLate = ''; - if ($board->nbtodolate > 0) { - $textLate .= ''; - $textLate .= ' '.$board->nbtodolate; - $textLate .= ''; - } - - $openedDashBoard .= '
    '; - - $nbtodClass = ''; - if ($board->nbtodo > 0) { - $nbtodClass = 'badge badge-info'; - } - - $openedDashBoard .= ' '.$infoName.' : '.$board->nbtodo.''; - if ($textLate) { - if ($board->url_late) { - $openedDashBoard .= ''; - $openedDashBoard .= ' '; - } else { - $openedDashBoard .= ' '; - } - $openedDashBoard .= $textLate; - } - $openedDashBoard .= ''."\n"; - - if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) { - $openedDashBoard .= ''.$langs->trans('Total').' : '.price($board->total).''; - } - - $openedDashBoard .= '
    '; - } - - $openedDashBoard .= '
    '."\n"; - $openedDashBoard .= '
    '."\n"; - $openedDashBoard .= '
    '."\n"; - $openedDashBoard .= '
    '."\n"; - $openedDashBoard .= "\n"; - } - } - - if ($showweather && !empty($isIntopOpenedDashBoard)) { - $appendClass = $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : ''; - $weather = getWeatherStatus($totallate); - - $text = ''; - if ($totallate > 0) { - $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate", - $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')'; - } else { - $text = $langs->transnoentitiesnoconv("NoItemLate"); - } - $text .= '. '.$langs->transnoentitiesnoconv("LateDesc"); - - $weatherDashBoard = '
    '."\n"; - $weatherDashBoard .= '
    '."\n"; - $weatherDashBoard .= ' '; - $weatherDashBoard .= img_weather('', $weather->level, '', 0, 'valignmiddle width50'); - $weatherDashBoard .= ' '."\n"; - $weatherDashBoard .= '
    '."\n"; - $weatherDashBoard .= ' '.$langs->trans('GlobalOpenedElemView').''."\n"; - - if ($totallatePercentage > 0 && !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { - $weatherDashBoard .= ' '.$langs->transnoentitiesnoconv("NActionsLate", - price($totallatePercentage).'%').''."\n"; - $weatherDashBoard .= ' '.$langs->trans('NActionsLate', - $totalLateNumber).''."\n"; - } else { - $weatherDashBoard .= ' '.$langs->transnoentitiesnoconv("NActionsLate", - $totalLateNumber).''."\n"; - if ($totallatePercentage > 0) { - $weatherDashBoard .= ' '.$langs->trans('NActionsLate', - price($totallatePercentage).'%').''."\n"; - } - } - - $weatherDashBoard .= '
    '."\n"; - $weatherDashBoard .= '
    '."\n"; - $weatherDashBoard .= '
    '."\n"; - $weatherDashBoard .= '
    '."\n"; - $weatherDashBoard .= "\n"; - - $openedDashBoard = $weatherDashBoard.$openedDashBoard; - } - - if (!empty($isIntopOpenedDashBoard)) { - for ($i = 1; $i <= 10; $i++) { - $openedDashBoard .= '
    '; - } - } - - $nbworkboardcount = 0; - foreach ($valid_dashboardlines as $infoKey => $board) { - if (in_array($infoKey, $isIntopOpenedDashBoard)) { - // skip if info is present on top - continue; - } - - if (empty($board->nbtodo)) { - $nbworkboardempty++; - } - $nbworkboardcount++; - - - $textlate = $langs->trans("NActionsLate", $board->nbtodolate); - $textlate .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; - - - $boxwork .= '
    '; - $boxwork .= '
    '; - $boxwork .= ''.$board->img.' '.$board->label.'
    '; - $boxwork .= ''.$board->nbtodo.''; - if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) { - $boxwork .= ' / '.price($board->total).''; - } - $boxwork .= '
    '; - if ($board->nbtodolate > 0) { - $boxwork .= ''; - } - $boxwork .= '
    '; - $boxwork .= "\n"; - } - - $boxwork .= '
    '; - $boxwork .= '
    '; - $boxwork .= '
    '; - $boxwork .= '
    '; - - $boxwork .= '
    '; - $boxwork .= '
    '; - $boxwork .= $langs->trans("NoOpenedElementToProcess"); - $boxwork .= '
    '; // End table array of working board - $boxwork .= '
    '; - - if (!empty($isIntopOpenedDashBoard)) { - print '
    '; - print '
    '.$openedDashBoard.'
    '; - print '
    '; - } + $showweather = (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METEO == 2) ? 1 : 0; + + //Array that contains all WorkboardResponse classes to process them + $dashboardlines = array(); + + // Do not include sections without management permission + require_once DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php'; + + // Number of actions to do (late) + if (!empty($conf->agenda->enabled) && $user->rights->agenda->myactions->read) { + include_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php'; + $board = new ActionComm($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + // Number of project opened + if (!empty($conf->projet->enabled) && $user->rights->projet->lire) { + include_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php'; + $board = new Project($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + // Number of tasks to do (late) + if (!empty($conf->projet->enabled) && empty($conf->global->PROJECT_HIDE_TASKS) && $user->rights->projet->lire) { + include_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php'; + $board = new Task($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + // Number of commercial proposals open (expired) + if (!empty($conf->propal->enabled) && $user->rights->propale->lire) { + include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; + $board = new Propal($db); + $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); + // Number of commercial proposals CLOSED signed (billed) + $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed"); + } + + // Number of commercial proposals open (expired) + if (!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire) { + include_once DOL_DOCUMENT_ROOT.'/supplier_proposal/class/supplier_proposal.class.php'; + $board = new SupplierProposal($db); + $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); + // Number of commercial proposals CLOSED signed (billed) + $dashboardlines[$board->element.'_signed'] = $board->load_board($user, "signed"); + } + + // Number of customer orders a deal + if (!empty($conf->commande->enabled) && $user->rights->commande->lire) { + include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + $board = new Commande($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + // Number of suppliers orders a deal + if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) { + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; + $board = new CommandeFournisseur($db); + $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); + $dashboardlines[$board->element.'_awaiting'] = $board->load_board($user, 'awaiting'); + } + + // Number of contract / services enabled (delayed) + if (!empty($conf->contrat->enabled) && $user->rights->contrat->lire) { + include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; + $board = new Contrat($db); + $dashboardlines[$board->element.'_inactive'] = $board->load_board($user, "inactive"); + // Number of active services (expired) + $dashboardlines[$board->element.'_active'] = $board->load_board($user, "active"); + } + + // Number of tickets open + if (!empty($conf->ticket->enabled) && $user->rights->ticket->read) { + include_once DOL_DOCUMENT_ROOT.'/ticket/class/ticket.class.php'; + $board = new Ticket($db); + $dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened"); + // Number of active services (expired) + //$dashboardlines[$board->element.'_active'] = $board->load_board($user, "active"); + } + + // Number of invoices customers (paid) + if (!empty($conf->facture->enabled) && $user->rights->facture->lire) { + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $board = new Facture($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + // Number of supplier invoices (paid) + if (!empty($conf->supplier_invoice->enabled) && !empty($user->rights->fournisseur->facture->lire)) { + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; + $board = new FactureFournisseur($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + // Number of transactions to conciliate + if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid) { + include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $board = new Account($db); + $nb = $board->countAccountToReconcile(); // Get nb of account to reconciliate + if ($nb > 0) { + $dashboardlines[$board->element] = $board->load_board($user); + } + } + + // Number of cheque to send + if (!empty($conf->banque->enabled) && $user->rights->banque->lire && !$user->socid && empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT)) { + include_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; + $board = new RemiseCheque($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + // Number of foundation members + if (!empty($conf->adherent->enabled) && $user->rights->adherent->lire && !$user->socid) { + include_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php'; + $board = new Adherent($db); + $dashboardlines[$board->element.'_shift'] = $board->load_board($user, 'shift'); + $dashboardlines[$board->element.'_expired'] = $board->load_board($user, 'expired'); + } + + // Number of expense reports to approve + if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->approve) { + include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; + $board = new ExpenseReport($db); + $dashboardlines[$board->element.'_toapprove'] = $board->load_board($user, 'toapprove'); + } + + // Number of expense reports to pay + if (!empty($conf->expensereport->enabled) && $user->rights->expensereport->to_paid) { + include_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; + $board = new ExpenseReport($db); + $dashboardlines[$board->element.'_topay'] = $board->load_board($user, 'topay'); + } + + // Number of holidays to approve + if (!empty($conf->holiday->enabled) && $user->rights->holiday->approve) { + include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; + $board = new Holiday($db); + $dashboardlines[$board->element] = $board->load_board($user); + } + + $object = new stdClass(); + $parameters = array(); + $action = ''; + $reshook = $hookmanager->executeHooks('addOpenElementsDashboardLine', $parameters, $object, + $action); // Note that $action and $object may have been modified by some hooks + if ($reshook == 0) { + $dashboardlines = array_merge($dashboardlines, $hookmanager->resArray); + } + + /* Open object dashboard */ + $dashboardgroup = array( + 'action' => + array( + 'groupName' => 'Agenda', + 'stats' => array('action'), + ), + 'project' => + array( + 'groupName' => 'Projects', + 'globalStatsKey' => 'projects', + 'stats' => array('project', 'project_task'), + ), + 'propal' => + array( + 'groupName' => 'Proposals', + 'globalStatsKey' => 'proposals', + 'stats' => + array('propal_opened', 'propal_signed'), + ), + 'commande' => + array( + 'groupName' => 'Orders', + 'globalStatsKey' => 'orders', + 'stats' => + array('commande'), + ), + 'facture' => + array( + 'groupName' => 'Invoices', + 'globalStatsKey' => 'invoices', + 'stats' => + array('facture'), + ), + 'supplier_proposal' => + array( + 'groupName' => 'SupplierProposals', + 'globalStatsKey' => 'askprice', + 'stats' => + array('supplier_proposal_opened', 'supplier_proposal_signed'), + ), + 'order_supplier' => + array( + 'groupName' => 'SuppliersOrders', + 'globalStatsKey' => 'supplier_orders', + 'stats' => + array('order_supplier_opened', 'order_supplier_awaiting'), + ), + 'invoice_supplier' => + array( + 'groupName' => 'BillsSuppliers', + 'globalStatsKey' => 'supplier_invoices', + 'stats' => + array('invoice_supplier'), + ), + 'contrat' => + array( + 'groupName' => 'Contracts', + 'globalStatsKey' => 'Contracts', + 'stats' => + array('contrat_inactive', 'contrat_active'), + ), + 'ticket' => + array( + 'groupName' => 'Tickets', + 'globalStatsKey' => 'ticket', + 'stats' => + array('ticket_opened'), + ), + 'bank_account' => + array( + 'groupName' => 'BankAccount', + 'stats' => + array('bank_account', 'chequereceipt'), + ), + 'member' => + array( + 'groupName' => 'Members', + 'globalStatsKey' => 'members', + 'stats' => + array('member_shift', 'member_expired'), + ), + 'expensereport' => + array( + 'groupName' => 'ExpenseReport', + 'globalStatsKey' => 'expensereports', + 'stats' => + array('expensereport_toapprove', 'expensereport_topay'), + ), + 'holiday' => + array( + 'groupName' => 'Holidays', + 'globalStatsKey' => 'holidays', + 'stats' => + array('holiday'), + ), + ); + + $object = new stdClass(); + $parameters = array( + 'dashboardgroup' => $dashboardgroup + ); + $reshook = $hookmanager->executeHooks('addOpenElementsDashboardGroup', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook == 0) { + $dashboardgroup = array_merge($dashboardgroup, $hookmanager->resArray); + } + + + // Calculate total nb of late + $totallate = $totaltodo = 0; + + //Remove any invalid response + //load_board can return an integer if failed or WorkboardResponse if OK + $valid_dashboardlines = array(); + foreach ($dashboardlines as $infoKey => $tmp) { + if ($tmp instanceof WorkboardResponse) { + $valid_dashboardlines[$infoKey] = $tmp; + } + } + + // We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop + foreach ($valid_dashboardlines as $board) { + if ($board->nbtodolate > 0) { + $totaltodo += $board->nbtodo; + $totallate += $board->nbtodolate; + } + } + + $openedDashBoardSize = 'info-box-sm'; // use sm by default + foreach ($dashboardgroup as $dashbordelement) { + if (is_array($dashbordelement['stats']) && count($dashbordelement['stats']) > 2) { + $openedDashBoardSize = ''; // use default info box size : big + break; + } + } + + $totalLateNumber = $totallate; + $totallatePercentage = ((!empty($totaltodo)) ? round($totallate / $totaltodo * 100, 2) : 0); + if (!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { + $totallate = $totallatePercentage; + } + + $boxwork = ''; + $boxwork .= '
    '; + $boxwork .= ''."\n"; + $boxwork .= ''; + $boxwork .= ''; + $boxwork .= ''."\n"; + + // Show dashboard + $nbworkboardempty = 0; + $isIntopOpenedDashBoard = $globalStatInTopOpenedDashBoard = array(); + if (!empty($valid_dashboardlines)) { + $openedDashBoard = ''; + + $boxwork .= ''; + } else { + $boxwork .= ''; + $boxwork .= ''; + $boxwork .= ''; + } + + $boxwork .= ''; + + $boxwork .= '
    '.$langs->trans("DolibarrWorkBoard").'
    '; + if ($showweather) { + if ($totallate > 0) { + $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate", + $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')'; + } else { + $text = $langs->transnoentitiesnoconv("NoItemLate"); + } + $text .= '. '.$langs->transnoentitiesnoconv("LateDesc"); + //$text.=$form->textwithpicto('',$langs->trans("LateDesc")); + $options = 'height="24px" style="float: right"'; + $boxwork .= showWeather($totallate, $text, $options, 'inline-block valignmiddle'); + } + $boxwork .= '
    '; + + foreach ($dashboardgroup as $groupKey => $groupElement) { + $boards = array(); + + if (empty($conf->global->MAIN_DISABLE_NEW_OPENED_DASH_BOARD)) { + foreach ($groupElement['stats'] as $infoKey) { + if (!empty($valid_dashboardlines[$infoKey])) { + $boards[] = $valid_dashboardlines[$infoKey]; + $isIntopOpenedDashBoard[] = $infoKey; + } + } + } + + if (!empty($boards)) { + $groupName = $langs->trans($groupElement['groupName']); + $groupKeyLowerCase = strtolower($groupKey); + $nbTotalForGroup = 0; + + // global stats + $globalStatsKey = false; + if (!empty($groupElement['globalStatsKey']) && empty($groupElement['globalStats'])) { // can be filled by hook + $globalStatsKey = $groupElement['globalStatsKey']; + $groupElement['globalStats'] = array(); + + if (is_array($keys) && in_array($globalStatsKey, $keys)) + { + // get key index of stats used in $includes, $classes, $keys, $icons, $titres, $links + $keyIndex = array_search($globalStatsKey, $keys); + + $classe = $classes[$keyIndex]; + if (isset($boardloaded[$classe]) && is_object($boardloaded[$classe])) + { + $groupElement['globalStats']['total'] = $boardloaded[$classe]->nb[$globalStatsKey] ? $boardloaded[$classe]->nb[$globalStatsKey] : 0; + $nbTotal = doubleval($groupElement['globalStats']['total']); + if ($nbTotal >= 10000) { $nbTotal = round($nbTotal / 1000, 2).'k'; } + $groupElement['globalStats']['text'] = $langs->trans('Total').' : '.$langs->trans($titres[$keyIndex]).' ('.$groupElement['globalStats']['total'].')'; + $groupElement['globalStats']['total'] = $nbTotal; + $groupElement['globalStats']['link'] = $links[$keyIndex]; + } + } + } + + $openedDashBoard .= '
    '."\n"; + $openedDashBoard .= '
    '."\n"; + $openedDashBoard .= ' '."\n"; + $openedDashBoard .= ' '."\n"; + + // Show the span for the total of record + if (!empty($groupElement['globalStats'])) { + $globalStatInTopOpenedDashBoard[] = $globalStatsKey; + $openedDashBoard .= ' '.$nbTotal.''."\n"; + } + + $openedDashBoard .= ' '."\n"; + $openedDashBoard .= '
    '."\n"; + + $openedDashBoard .= ' '.$groupName.''."\n"; + + foreach ($boards as $board) { + if (!empty($board->labelShort)) { + $infoName = ''.$board->labelShort.''; + } else { + $infoName = $board->label; + } + + $textLateTitle = $langs->trans("NActionsLate", $board->nbtodolate); + $textLateTitle .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; + + $textLate = ''; + if ($board->nbtodolate > 0) { + $textLate .= ''; + $textLate .= ' '.$board->nbtodolate; + $textLate .= ''; + } + + $openedDashBoard .= '
    '; + + $nbtodClass = ''; + if ($board->nbtodo > 0) { + $nbtodClass = 'badge badge-info'; + } + + $openedDashBoard .= ' '.$infoName.' : '.$board->nbtodo.''; + if ($textLate) { + if ($board->url_late) { + $openedDashBoard .= ''; + $openedDashBoard .= ' '; + } else { + $openedDashBoard .= ' '; + } + $openedDashBoard .= $textLate; + } + $openedDashBoard .= ''."\n"; + + if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) { + $openedDashBoard .= ''.$langs->trans('Total').' : '.price($board->total).''; + } + + $openedDashBoard .= '
    '; + } + + $openedDashBoard .= '
    '."\n"; + $openedDashBoard .= '
    '."\n"; + $openedDashBoard .= '
    '."\n"; + $openedDashBoard .= '
    '."\n"; + $openedDashBoard .= "\n"; + } + } + + if ($showweather && !empty($isIntopOpenedDashBoard)) { + $appendClass = $conf->global->MAIN_DISABLE_METEO == 2 ? ' hideonsmartphone' : ''; + $weather = getWeatherStatus($totallate); + + $text = ''; + if ($totallate > 0) { + $text = $langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate", + $totallate.(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE) ? '%' : '')).')'; + } else { + $text = $langs->transnoentitiesnoconv("NoItemLate"); + } + $text .= '. '.$langs->transnoentitiesnoconv("LateDesc"); + + $weatherDashBoard = '
    '."\n"; + $weatherDashBoard .= '
    '."\n"; + $weatherDashBoard .= ' '; + $weatherDashBoard .= img_weather('', $weather->level, '', 0, 'valignmiddle width50'); + $weatherDashBoard .= ' '."\n"; + $weatherDashBoard .= '
    '."\n"; + $weatherDashBoard .= ' '.$langs->trans('GlobalOpenedElemView').''."\n"; + + if ($totallatePercentage > 0 && !empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) { + $weatherDashBoard .= ' '.$langs->transnoentitiesnoconv("NActionsLate", + price($totallatePercentage).'%').''."\n"; + $weatherDashBoard .= ' '.$langs->trans('NActionsLate', + $totalLateNumber).''."\n"; + } else { + $weatherDashBoard .= ' '.$langs->transnoentitiesnoconv("NActionsLate", + $totalLateNumber).''."\n"; + if ($totallatePercentage > 0) { + $weatherDashBoard .= ' '.$langs->trans('NActionsLate', + price($totallatePercentage).'%').''."\n"; + } + } + + $weatherDashBoard .= '
    '."\n"; + $weatherDashBoard .= '
    '."\n"; + $weatherDashBoard .= '
    '."\n"; + $weatherDashBoard .= '
    '."\n"; + $weatherDashBoard .= "\n"; + + $openedDashBoard = $weatherDashBoard.$openedDashBoard; + } + + if (!empty($isIntopOpenedDashBoard)) { + for ($i = 1; $i <= 10; $i++) { + $openedDashBoard .= '
    '; + } + } + + $nbworkboardcount = 0; + foreach ($valid_dashboardlines as $infoKey => $board) { + if (in_array($infoKey, $isIntopOpenedDashBoard)) { + // skip if info is present on top + continue; + } + + if (empty($board->nbtodo)) { + $nbworkboardempty++; + } + $nbworkboardcount++; + + + $textlate = $langs->trans("NActionsLate", $board->nbtodolate); + $textlate .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; + + + $boxwork .= '
    '; + $boxwork .= '
    '; + $boxwork .= ''.$board->img.' '.$board->label.'
    '; + $boxwork .= ''.$board->nbtodo.''; + if ($board->total > 0 && !empty($conf->global->MAIN_WORKBOARD_SHOW_TOTAL_WO_TAX)) { + $boxwork .= ' / '.price($board->total).''; + } + $boxwork .= '
    '; + if ($board->nbtodolate > 0) { + $boxwork .= ''; + } + $boxwork .= '
    '; + $boxwork .= "\n"; + } + + $boxwork .= '
    '; + $boxwork .= '
    '; + $boxwork .= '
    '; + $boxwork .= '
    '; + + $boxwork .= '
    '; + $boxwork .= '
    '; + $boxwork .= $langs->trans("NoOpenedElementToProcess"); + $boxwork .= '
    '; // End table array of working board + $boxwork .= '
    '; + + if (!empty($isIntopOpenedDashBoard)) { + print '
    '; + print '
    '.$openedDashBoard.'
    '; + print '
    '; + } } @@ -899,46 +900,46 @@ $boxlist .= '
    '; if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { - // Remove allready present info in new dash board - if (!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0) { - foreach ($boxstatItems as $boxstatItemKey => $boxstatItemHtml) { - if (in_array($boxstatItemKey, $globalStatInTopOpenedDashBoard)) { - unset($boxstatItems[$boxstatItemKey]); - } - } - } + // Remove allready present info in new dash board + if (!empty($conf->global->MAIN_INCLUDE_GLOBAL_STATS_IN_OPENED_DASHBOARD) && is_array($boxstatItems) && count($boxstatItems) > 0) { + foreach ($boxstatItems as $boxstatItemKey => $boxstatItemHtml) { + if (in_array($boxstatItemKey, $globalStatInTopOpenedDashBoard)) { + unset($boxstatItems[$boxstatItemKey]); + } + } + } - if (!empty($boxstatFromHook) || !empty($boxstatItems)) { - $boxstat .= ''."\n"; - $boxstat .= '
    '; - $boxstat .= ''; - $boxstat .= ''; - $boxstat .= ''; - $boxstat .= ''; - $boxstat .= ''; + $boxstat .= '
    '; - $boxstat .= '
    '.$langs->trans("DolibarrStateBoard").'
    '; - $boxstat .= '
    '; + if (!empty($boxstatFromHook) || !empty($boxstatItems)) { + $boxstat .= ''."\n"; + $boxstat .= '
    '; + $boxstat .= ''; + $boxstat .= ''; + $boxstat .= ''; + $boxstat .= ''; + $boxstat .= ''; - $boxstat .= '
    '; + $boxstat .= '
    '.$langs->trans("DolibarrStateBoard").'
    '; + $boxstat .= '
    '; - $boxstat .= $boxstatFromHook; + $boxstat .= $boxstatFromHook; - if (is_array($boxstatItems) && count($boxstatItems) > 0) - { - $boxstat .= implode('', $boxstatItems); - } + if (is_array($boxstatItems) && count($boxstatItems) > 0) + { + $boxstat .= implode('', $boxstatItems); + } - $boxstat .= '
    '; - $boxstat .= '
    '; - $boxstat .= '
    '; - $boxstat .= '
    '; - $boxstat .= '
    '; - $boxstat .= '
    '; - $boxstat .= '
    '; - $boxstat .= '
    '; + $boxstat .= '
    '; + $boxstat .= '
    '; + $boxstat .= '
    '; + $boxstat .= '
    '; + $boxstat .= '
    '; + $boxstat .= '
    '; + $boxstat .= '
    '; + $boxstat .= '
    '; - $boxstat .= '
    '; - $boxstat .= '
    '; - } + $boxstat .= '
    '; + $boxstat .= '
    '; + } } $boxlist .= '
    '; @@ -964,32 +965,32 @@ print '
    '; // Security warning repertoire install existe (si utilisateur admin) if ($user->admin && empty($conf->global->MAIN_REMOVE_INSTALL_WARNING)) { - $message = ''; + $message = ''; - // Check if install lock file is present - $lockfile = DOL_DATA_ROOT.'/install.lock'; - if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) - { - $langs->load("errors"); - //if (! empty($message)) $message.='
    '; - $message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); - } + // Check if install lock file is present + $lockfile = DOL_DATA_ROOT.'/install.lock'; + if (!empty($lockfile) && !file_exists($lockfile) && is_dir(DOL_DOCUMENT_ROOT."/install")) + { + $langs->load("errors"); + //if (! empty($message)) $message.='
    '; + $message .= info_admin($langs->trans("WarningLockFileDoesNotExists", DOL_DATA_ROOT).' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); + } - // Conf files must be in read only mode - if (is_writable($conffile)) - { - $langs->load("errors"); - //$langs->load("other"); - //if (! empty($message)) $message.='
    '; - $message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); - } + // Conf files must be in read only mode + if (is_writable($conffile)) + { + $langs->load("errors"); + //$langs->load("other"); + //if (! empty($message)) $message.='
    '; + $message .= info_admin($langs->transnoentities("WarningConfFileMustBeReadOnly").' '.$langs->trans("WarningUntilDirRemoved", DOL_DOCUMENT_ROOT."/install"), 0, 0, '1', 'clearboth'); + } - if ($message) - { - print $message; - //$message.='
    '; - //print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install")); - } + if ($message) + { + print $message; + //$message.='
    '; + //print info_admin($langs->trans("WarningUntilDirRemoved",DOL_DOCUMENT_ROOT."/install")); + } } //print 'mem='.memory_get_usage().' - '.memory_get_peak_usage(); @@ -1011,10 +1012,10 @@ $db->close(); */ function showWeather($totallate, $text, $options, $morecss = '') { - global $conf; + global $conf; - $weather = getWeatherStatus($totallate); - return img_weather($text, $weather->picto, $options, 0, $morecss); + $weather = getWeatherStatus($totallate); + return img_weather($text, $weather->picto, $options, 0, $morecss); } diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 1b7ac620057..267e1629f36 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -82,14 +82,11 @@ if (versioncompare(versionphparray(), $arrayphpminversionerror) < 0) // M { print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionerror)); $checksok = 0; // 0=error, 1=warning -} -elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0) // Minimum supported (warning if lower) +} elseif (versioncompare(versionphparray(), $arrayphpminversionwarning) < 0) // Minimum supported (warning if lower) { print 'Error '.$langs->trans("ErrorPHPVersionTooLow", versiontostring($arrayphpminversionwarning)); $checksok = 0; // 0=error, 1=warning -} -else -{ +} else { print 'Ok '.$langs->trans("PHPVersion")." ".versiontostring(versionphparray()); } if (empty($force_install_nophpinfo)) print ' ('.$langs->trans("MoreInformation").')'; @@ -103,9 +100,7 @@ if (!isset($_GET["testget"]) && !isset($_POST["testpost"])) print ' ('.$langs->trans("Recheck").')'; print "
    \n"; $checksok = 0; -} -else -{ +} else { print 'Ok '.$langs->trans("PHPSupportPOSTGETOk")."
    \n"; } @@ -115,9 +110,7 @@ if (!function_exists("session_id")) { print 'Error '.$langs->trans("ErrorPHPDoesNotSupportSessions")."
    \n"; $checksok = 0; -} -else -{ +} else { print 'Ok '.$langs->trans("PHPSupportSessions")."
    \n"; } @@ -128,9 +121,7 @@ if (!function_exists("imagecreate")) $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupportGD")."
    \n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) -} -else -{ +} else { print 'Ok '.$langs->trans("PHPSupportGD")."
    \n"; } @@ -141,9 +132,7 @@ if (!function_exists("curl_init")) $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupportCurl")."
    \n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) -} -else -{ +} else { print 'Ok '.$langs->trans("PHPSupportCurl")."
    \n"; } @@ -151,9 +140,7 @@ else if (!function_exists("easter_date")) { print 'Error '.$langs->trans("ErrorPHPDoesNotSupportCalendar")."
    \n"; -} -else -{ +} else { print 'Ok '.$langs->trans("PHPSupportCalendar")."
    \n"; } @@ -164,9 +151,7 @@ if (!function_exists("utf8_encode")) $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupportUTF8")."
    \n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) -} -else -{ +} else { print 'Ok '.$langs->trans("PHPSupportUTF8")."
    \n"; } @@ -179,9 +164,7 @@ if (empty($_SERVER["SERVER_ADMIN"]) || $_SERVER["SERVER_ADMIN"] != 'doliwamp@loc $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupportIntl")."
    \n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) - } - else - { + } else { print 'Ok '.$langs->trans("PHPSupportIntl")."
    \n"; } } @@ -191,9 +174,7 @@ if (!class_exists('ZipArchive')) $langs->load("errors"); print 'Error '.$langs->trans("ErrorPHPDoesNotSupport", "ZIP")."
    \n"; // $checksok = 0; // If ko, just warning. So check must still be 1 (otherwise no way to install) -} -else -{ +} else { print 'Ok '.$langs->trans("PHPSupport", "ZIP")."
    \n"; } @@ -214,9 +195,7 @@ if ($memmaxorig != '') if ($memmax >= $memrequired || $memmax == -1) { print 'Ok '.$langs->trans("PHPMemoryOK", $memmaxorig, $memrequiredorig)."
    \n"; - } - else - { + } else { print 'Warning '.$langs->trans("PHPMemoryTooLow", $memmaxorig, $memrequiredorig)."
    \n"; } } @@ -235,14 +214,10 @@ if (is_readable($conffile) && filesize($conffile) > 8) { // Already installed for all parts (config and database). We can propose upgrade. $allowupgrade = true; - } - else - { + } else { $allowupgrade = false; } -} -else -{ +} else { // If not, we create it dolibarr_install_syslog("check: we try to create conf file '".$conffile."'"); $confexists = 0; @@ -252,9 +227,7 @@ else { // Success dolibarr_install_syslog("check: successfully copied file ".$conffile.".example into ".$conffile); - } - else - { + } else { // If failed, we try to create an empty file dolibarr_install_syslog("check: failed to copy file ".$conffile.".example into ".$conffile.". We try to create it.", LOG_WARNING); @@ -264,8 +237,7 @@ else @fwrite($fp, 'trans("CorrectProblemAndReloadPage", $_SERVER['PHP_SELF'].'?testget=ok'); $err++; -} -else -{ +} else { if (dol_is_dir($conffile)) { print 'Warning '.$langs->trans("ConfFileMustBeAFileNotADir", $conffiletoshow); @@ -299,9 +269,7 @@ else if ($confexists) { print 'Ok '.$langs->trans("ConfFileExists", $conffiletoshow); - } - else - { + } else { print 'Ok '.$langs->trans("ConfFileCouldBeCreated", $conffiletoshow); } print "
    "; @@ -311,14 +279,11 @@ else $allowinstall = 0; } // File exists and can be modified - else - { + else { if ($confexists) { print 'Ok '.$langs->trans("ConfFileExists", $conffiletoshow); - } - else - { + } else { print 'Ok '.$langs->trans("ConfFileCouldBeCreated", $conffiletoshow); } print "
    "; @@ -344,9 +309,7 @@ else { print 'A '.$conffiletoshow.' file exists with a dolibarr_main_document_root to '.$dolibarr_main_document_root.' that seems wrong. Try to fix or remove the '.$conffiletoshow.' file.
    '."\n"; dol_syslog("A '".$conffiletoshow."' file exists with a dolibarr_main_document_root to ".$dolibarr_main_document_root." that seems wrong. Try to fix or remove the '".$conffiletoshow."' file.", LOG_WARNING); - } - else - { + } else { require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php'; // If password is encoded, we decode it @@ -357,8 +320,7 @@ else { $dolibarr_main_db_encrypted_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); // We need to set this as it is used to know the password was initially crypted $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); - } - else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } // $conf already created in inc.php @@ -404,8 +366,7 @@ else //print ' '.img_warning($langs->trans("RunningUpdateProcessMayBeRequired")); print '
    '; print '
    '; - } - else print "
    \n"; + } else print "
    \n"; //print $langs->trans("InstallEasy")." "; print '

    '.$langs->trans("ChooseYourSetupMode").'

    '; @@ -439,9 +400,7 @@ else if ($allowinstall) { $choice .= ''.$langs->trans("Start").''; - } - else - { + } else { $choice .= ($foundrecommandedchoice ? '' : '').$langs->trans("InstallNotAllowed").($foundrecommandedchoice ? '' : ''); } $choice .= ''."\n"; @@ -479,7 +438,8 @@ else array('from'=>'8.0.0', 'to'=>'9.0.0'), array('from'=>'9.0.0', 'to'=>'10.0.0'), array('from'=>'10.0.0', 'to'=>'11.0.0'), - array('from'=>'11.0.0', 'to'=>'12.0.0') + array('from'=>'11.0.0', 'to'=>'12.0.0'), + array('from'=>'12.0.0', 'to'=>'13.0.0') ); $count = 0; @@ -516,8 +476,7 @@ else $foundrecommandedchoice = 1; // To show only once $recommended_choice = true; } - } - else { + } else { // We cannot recommend a choice. // A version of install may be known, but we need last upgrade. } @@ -558,14 +517,10 @@ else if ($disabled) { $choice .= ''.$langs->trans("NotYetAvailable").''; - } - else - { + } else { $choice .= ''.$langs->trans("Start").''; } - } - else - { + } else { $choice .= $langs->trans("NotAvailable"); } $choice .= ''; diff --git a/htdocs/install/doctemplates/products/template_product.odt b/htdocs/install/doctemplates/products/template_product.odt index 344fcfa391a..c73fa69d92d 100644 Binary files a/htdocs/install/doctemplates/products/template_product.odt and b/htdocs/install/doctemplates/products/template_product.odt differ diff --git a/htdocs/install/doctemplates/stocks/template_warehouse.odt b/htdocs/install/doctemplates/stocks/template_warehouse.odt new file mode 100644 index 00000000000..5d4340230a1 Binary files /dev/null and b/htdocs/install/doctemplates/stocks/template_warehouse.odt differ diff --git a/htdocs/install/doctemplates/websites/website_template-corporate.zip b/htdocs/install/doctemplates/websites/website_template-corporate.zip index 80f16714c78..9186b95fdb6 100644 Binary files a/htdocs/install/doctemplates/websites/website_template-corporate.zip and b/htdocs/install/doctemplates/websites/website_template-corporate.zip differ diff --git a/htdocs/install/doctemplates/websites/website_template-stellar.zip b/htdocs/install/doctemplates/websites/website_template-stellar.zip index 5cf573d21d2..399a32e579d 100644 Binary files a/htdocs/install/doctemplates/websites/website_template-stellar.zip and b/htdocs/install/doctemplates/websites/website_template-stellar.zip differ diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index 3a3adc2322c..ff983618c41 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -123,14 +123,10 @@ if (!defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile) > $includeconferror = 'ErrorBadValueForDolibarrMainDBType'; } } - } - else - { + } else { $includeconferror = 'ErrorBadValueForDolibarrMainDocumentRoot'; } - } - else - { + } else { $includeconferror = 'ErrorBadFormatForConfFile'; } } @@ -209,9 +205,7 @@ if (@file_exists($lockfile)) print ''; print $langs->trans("ClickHereToGoToApp"); print ''; - } - else - { + } else { print 'If you always reach this page, you must remove install.lock file manually.
    '; } exit; @@ -364,9 +358,7 @@ function pHeader($subtitle, $next, $action = 'set', $param = '', $forcejqueryurl { $jQueryCustomPath = $forcejqueryurl; $jQueryUiCustomPath = $forcejqueryurl; - } - else - { + } else { $jQueryCustomPath = (defined('JS_JQUERY') && constant('JS_JQUERY')) ? JS_JQUERY : false; $jQueryUiCustomPath = (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) ? JS_JQUERY_UI : false; } @@ -547,11 +539,9 @@ function detect_dolibarr_main_url_root() $proto = ((!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') || (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) ? 'https' : 'http'; if (!empty($_SERVER["HTTP_HOST"])) { $serverport = $_SERVER["HTTP_HOST"]; - } - elseif (!empty($_SERVER["SERVER_NAME"])) { + } elseif (!empty($_SERVER["SERVER_NAME"])) { $serverport = $_SERVER["SERVER_NAME"]; - } - else { + } else { $serverport = 'localhost'; } $dolibarr_main_url_root = $proto."://".$serverport.$_SERVER["SCRIPT_NAME"]; diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index 9e58ac4230f..1a05dad1b77 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -40,8 +40,7 @@ function checkElementExist($id, $table) $num = $db->num_rows($resql); if ($num > 0) return true; else return false; - } - else return true; // for security + } else return true; // for security } /** @@ -131,14 +130,13 @@ function clean_data_ecm_directories() $newlabel = dol_sanitizeFileName($label); if ($label != $newlabel) { - $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$newlabel."' WHERE rowid=".$id; + $sqlupdate = "UPDATE ".MAIN_DB_PREFIX."ecm_directories set label='".$db->escape($newlabel)."' WHERE rowid=".$id; print ''.$sqlupdate."\n"; $resqlupdate = $db->query($sqlupdate); if (!$resqlupdate) dol_print_error($db, 'Failed to update'); } } - } - else dol_print_error($db, 'Failed to run request'); + } else dol_print_error($db, 'Failed to run request'); return; } diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index dee1200389c..eeca137dbc0 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -124,11 +124,25 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',652); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662); -insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','mrp',660); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','mrp',661); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','mrp',662); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','mrp',663); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact address record','contact',51); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52); + +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516); + -- actions not enabled by default : they are excluded when we enable the module Agenda (except TASK_...) insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_CREATE','Task created','Executed when a project task is created','project',150); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',151); insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_DELETE','Task deleted','Executed when a project task is deleted','project',152); + diff --git a/htdocs/install/mysql/data/llx_c_actioncomm.sql b/htdocs/install/mysql/data/llx_c_actioncomm.sql index 238a096fcb2..9a0d8c223b6 100644 --- a/htdocs/install/mysql/data/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql @@ -36,6 +36,7 @@ insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 2,'AC_FAX','system','Send Fax',NULL, 1, 3); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 4,'AC_EMAIL','system','Send Email',NULL, 1, 4); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 5,'AC_RDV','system','Rendez-vous',NULL, 1, 1); +insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4); insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values (11,'AC_INT','system','Intervention on site',NULL, 1, 4); -- Code kept for backward compatibility < 3.3 --insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 3,'AC_PROP','systemauto', 'Send commercial proposal by email','propal',0,10); diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql index f417804ff93..253ace246e7 100644 --- a/htdocs/install/mysql/data/llx_c_email_templates.sql +++ b/htdocs/install/mysql/data/llx_c_email_templates.sql @@ -30,3 +30,5 @@ INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_u INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,

    \n\n__(YourMembershipWasCanceled)__
    \n

    \n__(Sincerely)__
    __USER_SIGNATURE__',null, 0); INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,

    \n\n__(ThisIsContentOfYourCard)__
    \n__(ID)__ : __ID__
    \n__(Civiliyty)__ : __MEMBER_CIVILITY__
    \n__(Firstname)__ : __MEMBER_FIRSTNAME__
    \n__(Lastname)__ : __MEMBER_LASTNAME__
    \n__(Fullname)__ : __MEMBER_FULLNAME__
    \n__(Company)__ : __MEMBER_COMPANY__
    \n__(Address)__ : __MEMBER_ADDRESS__
    \n__(Zip)__ : __MEMBER_ZIP__
    \n__(Town)__ : __MEMBER_TOWN__
    \n__(Country)__ : __MEMBER_COUNTRY__
    \n__(Email)__ : __MEMBER_EMAIL__
    \n__(Birthday)__ : __MEMBER_BIRTH__
    \n__(Photo)__ : __MEMBER_PHOTO__
    \n__(Login)__ : __MEMBER_LOGIN__
    \n__(Password)__ : __MEMBER_PASSWORD__
    \n__(Phone)__ : __MEMBER_PHONE__
    \n__(PhonePerso)__ : __MEMBER_PHONEPRO__
    \n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__

    \n__(Sincerely)__
    __USER_SIGNATURE__',null, 0); +INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,

    \n\n__(YourCandidatureAnswerMessage)__
    __ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n

    \n__(Sincerely)__
    __USER_SIGNATURE__',null, 0); + diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index 628d42d4144..a51b2bbd70f 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -326,3 +326,14 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17804', 'Sociedad Civil', 1); INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (178, '17805', 'Sociedad Anónima', 1); +-- Algeria (id country=13) +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1300','Personne physique'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1301','Société à responsabilité limitée (SARL)'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1302','Entreprise unipersonnelle à responsabilité limitée (EURL)'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1303','Société en Nom Collectif (SNC)'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1304','société par actions (SPA)'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1305','Société en Commandite Simple (SCS)'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1306','Société en commandite par actions (SCA)'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1307','Société en participation'); +insert into llx_c_forme_juridique (fk_pays, code, libelle) values (13, '1308','Groupe de sociétés'); + diff --git a/htdocs/install/mysql/data/llx_c_incoterms.sql b/htdocs/install/mysql/data/llx_c_incoterms.sql index 3f2e4cbac2e..b77e58d1ae5 100644 --- a/htdocs/install/mysql/data/llx_c_incoterms.sql +++ b/htdocs/install/mysql/data/llx_c_incoterms.sql @@ -5,6 +5,7 @@ -- Copyright (C) 2004 Guillaume Delecourt -- Copyright (C) 2005-2009 Regis Houssin -- Copyright (C) 2007 Patrick Raguin +-- Copyright (C) 2020 Udo Tamm -- -- 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 @@ -21,21 +22,24 @@ -- -- +-- +-- Do not place a comment at the end of the line, this file is parsed when +-- from the install and all '--' are removed. -- -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors -- de l'install et tous les sigles '--' sont supprimés. -- -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('EXW', 'Ex Works, au départ non chargé, non dédouané sortie d''usine (uniquement adapté aux flux domestiques, nationaux)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FCA', 'Free Carrier, marchandises dédouanées et chargées dans le pays de départ, chez le vendeur ou chez le commissionnaire de transport de l''acheteur', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FAS', 'Free Alongside Ship, sur le quai du port de départ', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('FOB', 'Free On Board, chargé sur le bateau, les frais de chargement dans celui-ci étant fonction du liner term indiqué par la compagnie maritime (à la charge du vendeur)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CFR', 'Cost and Freight, chargé dans le bateau, livraison au port de départ, frais payés jusqu''au port d''arrivée, sans assurance pour le transport, non déchargé du navire à destination (les frais de déchargement sont inclus ou non au port d''arrivée)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CIF', 'Cost, Insurance and Freight, chargé sur le bateau, frais jusqu''au port d''arrivée, avec l''assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CPT', 'Carriage Paid To, livraison au premier transporteur, frais jusqu''au déchargement du mode de transport, sans assurance pour le transport', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('CIP', 'Carriage and Insurance Paid to, idem CPT, avec assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DAT', 'Delivered At Terminal, marchandises (déchargées) livrées sur quai, dans un terminal maritime, fluvial, aérien, routier ou ferroviaire désigné (dédouanement import, et post-acheminement payés par l''acheteur)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DAP', 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1); -INSERT INTO llx_c_incoterms (code, libelle, active) VALUES ('DDP', 'Delivered Duty Paid, marchandises (non déchargées) livrées à destination finale, dédouanement import et taxes à la charge du vendeur ; l''acheteur prend en charge uniquement le déchargement (si exclusion des taxes type TVA, le préciser clairement)', 1); - +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('EXW', 'Ex Works', 'Ex Works, au départ non chargé, non dédouané sortie d''usine (uniquement adapté aux flux domestiques, nationaux)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FCA', 'Free Carrier', 'Free Carrier, marchandises dédouanées et chargées dans le pays de départ, chez le vendeur ou chez le commissionnaire de transport de l''acheteur', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FAS', 'Free Alongside Ship', 'Free Alongside Ship, sur le quai du port de départ', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('FOB', 'Free On Board', 'Free On Board, chargé sur le bateau, les frais de chargement dans celui-ci étant fonction du liner term indiqué par la compagnie maritime (à la charge du vendeur)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CFR', 'Cost and Freight', 'Cost and Freight, chargé dans le bateau, livraison au port de départ, frais payés jusqu''au port d''arrivée, sans assurance pour le transport, non déchargé du navire à destination (les frais de déchargement sont inclus ou non au port d''arrivée)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIF', 'Cost, Insurance, Freight', 'Cost, Insurance and Freight, chargé sur le bateau, frais jusqu''au port d''arrivée, avec l''assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CPT', 'Carriage Paid To', 'Carriage Paid To, livraison au premier transporteur, frais jusqu''au déchargement du mode de transport, sans assurance pour le transport', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('CIP', 'Carriage Insurance Paid', 'Carriage and Insurance Paid to, idem CPT, avec assurance marchandise transportée souscrite par le vendeur pour le compte de l''acheteur', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAT', 'Delivered At Terminal', 'Delivered At Terminal, marchandises (déchargées) livrées sur quai, dans un terminal maritime, fluvial, aérien, routier ou ferroviaire désigné (dédouanement import, et post-acheminement payés par l''acheteur)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DAP', 'Delivered At Place', 'Delivered At Place, marchandises (non déchargées) mises à disposition de l''acheteur dans le pays d''importation au lieu précisé dans le contrat (déchargement, dédouanement import payé par l''acheteur)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DDP', 'Delivered Duty Paid', 'Delivered Duty Paid, marchandises (non déchargées) livrées à destination finale, dédouanement import et taxes à la charge du vendeur ; l''acheteur prend en charge uniquement le déchargement (si exclusion des taxes type TVA, le préciser clairement)', 1); +INSERT INTO llx_c_incoterms (code, label, libelle, active) VALUES ('DPU', 'Delivered at Place Unloaded', 'Delivered at Place unloaded', 1); diff --git a/htdocs/install/mysql/data/llx_c_prospectcontactlevel.sql b/htdocs/install/mysql/data/llx_c_prospectcontactlevel.sql new file mode 100644 index 00000000000..b45239ca992 --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_prospectcontactlevel.sql @@ -0,0 +1,31 @@ +-- Copyright (C) 2020 Open-Dsi +-- +-- 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 . +-- +-- + +-- +-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors +-- de l'install et tous les sigles '--' sont supprimés. +-- + +-- +-- Prospect level for contacts +-- + +--delete from llx_c_prospectcontactlevel; +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1); +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2); +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3); +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_HIGH', 'High', 4); diff --git a/htdocs/install/mysql/data/llx_c_stcommcontact.sql b/htdocs/install/mysql/data/llx_c_stcommcontact.sql new file mode 100644 index 00000000000..53e6aad1cca --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_stcommcontact.sql @@ -0,0 +1,32 @@ +-- Copyright (C) 2020 Open-Dsi +-- +-- 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 . +-- +-- + +-- +-- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors +-- de l'install et tous les sigles '--' sont supprimés. +-- + +-- +-- Types action st for contacts +-- + +delete from llx_c_stcommcontact; +insert into llx_c_stcommcontact (id,code,libelle) values (-1, 'ST_NO', 'Do not contact'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 0, 'ST_NEVER', 'Never contacted'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 1, 'ST_TODO', 'To contact'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 2, 'ST_PEND', 'Contact in progress'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 3, 'ST_DONE', 'Contacted'); diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index 8138711e8a0..831097ebf48 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -360,6 +360,10 @@ insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (23 insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1); insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1); +-- ALGERIA(id country=13) +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 131, 13, '0','0','TVA 0%', 1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 132, 13, '9','0','TVA 9%',1); +insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 133, 13, '19','0','TVA 19%', 1); -- Example of code to insert a vat rate 0 for each country diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index ced4a0d8427..99da23f53a5 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -97,3 +97,9 @@ insert into llx_const (name, value, type, visible, entity) VALUES ('CONTRACT_ADD insert into llx_const (name, value, type, visible, entity) VALUES ('USERGROUP_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/usergroups', 'chaine', 0, 1); insert into llx_const (name, value, type, visible, entity) VALUES ('USER_ADDON_PDF_ODT_PATH', 'DOL_DATA_ROOT/doctemplates/users', 'chaine', 0, 1); + +-- +-- PRODUCTS +-- +INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0); + diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index b66d205ef40..9bb097d10b2 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -119,7 +119,7 @@ ALTER TABLE llx_categorie_warehouse ADD CONSTRAINT fk_categorie_warehouse_fk_war create table llx_holiday_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -135,7 +135,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value create table llx_entrepot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -165,7 +165,7 @@ ALTER TABLE llx_events ADD COLUMN prefix_session varchar(255) NULL; create table llx_payment_salary_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- salary payment id import_key varchar(14) -- import key )ENGINE=innodb; @@ -183,8 +183,8 @@ ALTER TABLE llx_oauth_token ADD COLUMN fk_soc integer DEFAULT NULL after token; ALTER TABLE llx_adherent_type ADD COLUMN duration varchar(6) DEFAULT NULL after morphy; -ALTER TABLE llx_mailing ADD COLUMN tms timestamp; -ALTER TABLE llx_mailing_cibles ADD COLUMN tms timestamp; +ALTER TABLE llx_mailing ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +ALTER TABLE llx_mailing_cibles ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_projet ADD COLUMN usage_opportunity integer DEFAULT 0; ALTER TABLE llx_projet ADD COLUMN usage_task integer DEFAULT 1; @@ -458,7 +458,7 @@ create table llx_c_shipment_package_type CREATE TABLE llx_product_fournisseur_price_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -478,7 +478,7 @@ CREATE TABLE llx_mrp_mo( note_private text, date_creation datetime NOT NULL, date_valid datetime NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, @@ -514,7 +514,7 @@ ALTER TABLE llx_mrp_mo ADD INDEX idx_mrp_mo_fk_project (fk_project); create table llx_mrp_mo_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -551,7 +551,7 @@ CREATE TABLE llx_mrp_production( fk_mrp_production integer, -- if role = 'consumed', id of line with role 'toconsume', if role = 'produced' id of line with role 'toproduce' fk_stock_movement integer, -- id of stock movement when movements are validated date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14) @@ -576,7 +576,7 @@ ALTER TABLE llx_facture_rec MODIFY COLUMN fk_cond_reglement integer NOT NULL DEF create table llx_commande_fournisseur_dispatch_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -587,7 +587,7 @@ ALTER TABLE llx_commande_fournisseur_dispatch_extrafields ADD INDEX idx_commande create table llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql index 994e5d89495..488548ae8b1 100644 --- a/htdocs/install/mysql/migration/11.0.0-12.0.0.sql +++ b/htdocs/install/mysql/migration/11.0.0-12.0.0.sql @@ -36,7 +36,7 @@ UPDATE llx_c_units set scale = 86400 where code = 'D' and unit_type = 'time'; create table llx_commande_fournisseur_dispatch_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -57,7 +57,7 @@ create table llx_c_shipment_package_type create table llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -69,7 +69,7 @@ ALTER TABLE llx_facture_rec MODIFY COLUMN titre varchar(200) NOT NULL; create table llx_mrp_mo_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -303,7 +303,7 @@ ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_ ALTER TABLE llx_categorie_website_page ADD CONSTRAINT fk_categorie_website_page_website_page_rowid FOREIGN KEY (fk_website_page) REFERENCES llx_website_page (rowid); ALTER TABLE llx_categorie ADD COLUMN date_creation datetime; -ALTER TABLE llx_categorie ADD COLUMN tms timestamp; +ALTER TABLE llx_categorie ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_categorie ADD COLUMN fk_user_creat integer; ALTER TABLE llx_categorie ADD COLUMN fk_user_modif integer; diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql new file mode 100644 index 00000000000..8820fe1968c --- /dev/null +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -0,0 +1,368 @@ +-- +-- Be carefull to requests order. +-- This file must be loaded by calling /install/index.php page +-- when current version is 13.0.0 or higher. +-- +-- To restrict request to Mysql version x.y minimum use -- VMYSQLx.y +-- To restrict request to Pgsql version x.y minimum use -- VPGSQLx.y +-- To rename a table: ALTER TABLE llx_table RENAME TO llx_table_new; +-- To add a column: ALTER TABLE llx_table ADD COLUMN newcol varchar(60) NOT NULL DEFAULT '0' AFTER existingcol; +-- To rename a column: ALTER TABLE llx_table CHANGE COLUMN oldname newname varchar(60); +-- To drop a column: ALTER TABLE llx_table DROP COLUMN oldname; +-- To change type of field: ALTER TABLE llx_table MODIFY COLUMN name varchar(60); +-- To drop a foreign key: ALTER TABLE llx_table DROP FOREIGN KEY fk_name; +-- To create a unique index ALTER TABLE llx_table ADD UNIQUE INDEX uk_table_field (field); +-- To drop an index: -- VMYSQL4.1 DROP INDEX nomindex on llx_table +-- To drop an index: -- VPGSQL8.2 DROP INDEX nomindex +-- To make pk to be auto increment (mysql): -- VMYSQL4.3 ALTER TABLE llx_table CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; +-- To make pk to be auto increment (postgres): +-- -- VPGSQL8.2 CREATE SEQUENCE llx_table_rowid_seq OWNED BY llx_table.rowid; +-- -- VPGSQL8.2 ALTER TABLE llx_table ADD PRIMARY KEY (rowid); +-- -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN rowid SET DEFAULT nextval('llx_table_rowid_seq'); +-- -- VPGSQL8.2 SELECT setval('llx_table_rowid_seq', MAX(rowid)) FROM llx_table; +-- To set a field as NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NULL; +-- To set a field as NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name DROP NOT NULL; +-- To set a field as NOT NULL: -- VMYSQL4.3 ALTER TABLE llx_table MODIFY COLUMN name varchar(60) NOT NULL; +-- To set a field as NOT NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET NOT NULL; +-- To set a field as default NULL: -- VPGSQL8.2 ALTER TABLE llx_table ALTER COLUMN name SET DEFAULT NULL; +-- Note: fields with type BLOB/TEXT can't have default value. + + +-- Missing in v12 or lower + +ALTER TABLE llx_payment_salary MODIFY COLUMN ref varchar(30) NULL; +ALTER TABLE llx_payment_various MODIFY COLUMN ref varchar(30) NULL; + +ALTER TABLE llx_prelevement_bons ADD COLUMN type varchar(16) DEFAULT 'debit-order'; + +ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture (fk_facture); +ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture_fourn (fk_facture_fourn); + +ALTER TABLE llx_document_model MODIFY COLUMN type varchar(64); + +ALTER TABLE llx_bom_bom MODIFY COLUMN duration double(24,8); + +ALTER TABLE llx_bom_bom_extrafields ADD INDEX idx_bom_bom_extrafields_fk_object (fk_object); + +create table llx_mrp_mo_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_mrp_mo_extrafields DROP INDEX idx_fk_object; + +ALTER TABLE llx_mrp_mo_extrafields ADD INDEX idx_mrp_mo_fk_object(fk_object); + + +-- For v13 + +ALTER TABLE llx_bom_bom ADD COLUMN bomtype integer DEFAULT 0; + +UPDATE llx_emailcollector_emailcollector SET ref = 'Collect_Ticket_Requests' WHERE ref = 'Collect_Ticket_Requets'; +UPDATE llx_emailcollector_emailcollector SET ref = 'Collect_Responses_In' WHERE ref = 'Collect_Responses'; + + +UPDATE llx_document_model set nom = 'standard' where nom = 'Standard' and type ='stock'; +UPDATE llx_document_model set nom = 'stdmovement', type = 'movement' where nom = 'StdMouvement' and type ='mouvement'; + + +UPDATE llx_const SET value = 0 WHERE name = 'FACTURE_TVAOPTION' and value = 'franchise'; +UPDATE llx_const SET value = 1 WHERE name = 'FACTURE_TVAOPTION' and value <> 'franchise' AND value <> '0' AND value <> '1'; + +ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME; + +ALTER TABLE llx_website ADD COLUMN position integer DEFAULT 0; + +ALTER TABLE llx_establishment ADD COLUMN ref varchar(30); +ALTER TABLE llx_establishment ADD COLUMN label varchar(128); +UPDATE llx_establishment SET ref = rowid WHERE ref IS NULL; +ALTER TABLE llx_establishment MODIFY COLUMN ref varchar(30) NOT NULL; +ALTER TABLE llx_establishment MODIFY COLUMN label varchar(128); + +INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0); + +ALTER TABLE llx_subscription MODIFY COLUMN datef DATETIME; + +ALTER TABLE llx_loan_schedule ADD column fk_payment_loan INTEGER; + + +ALTER TABLE llx_user DROP COLUMN jabberid; +ALTER TABLE llx_user DROP COLUMN skype; +ALTER TABLE llx_user DROP COLUMN twitter; +ALTER TABLE llx_user DROP COLUMN facebook; +ALTER TABLE llx_user DROP COLUMN linkedin; +ALTER TABLE llx_user DROP COLUMN instagram; +ALTER TABLE llx_user DROP COLUMN snapchat; +ALTER TABLE llx_user DROP COLUMN googleplus; +ALTER TABLE llx_user DROP COLUMN youtube; +ALTER TABLE llx_user DROP COLUMN whatsapp; + +ALTER TABLE llx_user ADD COLUMN datestartvalidity datetime; +ALTER TABLE llx_user ADD COLUMN dateendvalidity datetime; + +ALTER TABLE llx_c_incoterms ADD COLUMN label varchar(100) NULL; + + + +CREATE TABLE llx_recruitment_recruitmentjobposition( + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + entity INTEGER DEFAULT 1 NOT NULL, + label varchar(255) NOT NULL, + qty integer DEFAULT 1 NOT NULL, + fk_soc integer, + fk_project integer, + fk_user_recruiter integer, + fk_user_supervisor integer, + fk_establishment integer, + date_planned date, + remuneration_suggested varchar(255), + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status smallint NOT NULL +) ENGINE=innodb; + +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_rowid (rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_ref (ref); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_soc (fk_soc); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_project (fk_project); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_recruiter FOREIGN KEY (fk_user_recruiter) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_supervisor FOREIGN KEY (fk_user_supervisor) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_establishment FOREIGN KEY (fk_establishment) REFERENCES llx_establishment(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_status (status); + +ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN email_recruiter varchar(255); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN entity INTEGER DEFAULT 1 NOT NULL; +ALTER TABLE llx_recruitment_recruitmentjobposition ADD COLUMN remuneration_suggested varchar(255); + +create table llx_recruitment_recruitmentjobposition_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_recruitment_recruitmentjobposition_extrafields ADD INDEX idx_recruitmentjobposition_fk_object(fk_object); + + + +CREATE TABLE llx_recruitment_recruitmentcandidature( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + entity integer NOT NULL DEFAULT 1, + fk_recruitmentjobposition INTEGER NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + import_key varchar(14), + model_pdf varchar(255), + status smallint NOT NULL, + firstname varchar(128), + lastname varchar(128), + email varchar(255), + phone varchar(64), + date_birth date, + remuneration_requested integer, + remuneration_proposed integer, + email_msgid varchar(255), + fk_recruitment_origin INTEGER NULL + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; + +ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN entity integer NOT NULL DEFAULT 1; +ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN email_msgid varchar(255); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN fk_recruitment_origin INTEGER NULL; +ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN date_birth date; + +ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_rowid (rowid); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_ref (ref); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_recruitment_recruitmentcandidature_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_status (status); + +create table llx_recruitment_recruitmentcandidature_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_recruitment_recruitmentcandidature_extrafields ADD INDEX idx_recruitmentcandidature_fk_object(fk_object); + +ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid); + + +ALTER TABLE llx_product_attribute ADD COLUMN ref_ext VARCHAR(255) after ref; +ALTER TABLE llx_product_attribute_combination ADD COLUMN variation_ref_ext varchar(255) AFTER variation_weight; + + +CREATE TABLE llx_product_attribute_combination_price_level +( + rowid INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + fk_product_attribute_combination INTEGER DEFAULT 1 NOT NULL, + fk_price_level INTEGER DEFAULT 1 NOT NULL, + variation_price DOUBLE(24,8) NOT NULL, + variation_price_percentage INTEGER NULL +)ENGINE=innodb; + +ALTER TABLE llx_product_attribute_combination_price_level ADD UNIQUE( fk_product_attribute_combination, fk_price_level); + + + +-- Add dictionary for prospect level and action commercial on contacts (Using this is not recommanded) + +create table llx_c_prospectcontactlevel +( + code varchar(12) PRIMARY KEY, + label varchar(30), + sortorder smallint, + active smallint DEFAULT 1 NOT NULL, + module varchar(32) NULL +) ENGINE=innodb; +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1); +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2); +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3); +insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_HIGH', 'High', 4); + +create table llx_c_stcommcontact +( + id integer PRIMARY KEY, + code varchar(12) NOT NULL, + libelle varchar(30), + picto varchar(128), + active tinyint default 1 NOT NULL +)ENGINE=innodb; +ALTER TABLE llx_c_stcommcontact ADD UNIQUE INDEX uk_c_stcommcontact(code); + +insert into llx_c_stcommcontact (id,code,libelle) values (-1, 'ST_NO', 'Do not contact'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 0, 'ST_NEVER', 'Never contacted'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 1, 'ST_TODO', 'To contact'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 2, 'ST_PEND', 'Contact in progress'); +insert into llx_c_stcommcontact (id,code,libelle) values ( 3, 'ST_DONE', 'Contacted'); + +ALTER TABLE llx_socpeople ADD COLUMN fk_prospectcontactlevel varchar(12) AFTER priv; +ALTER TABLE llx_socpeople ADD COLUMN fk_stcommcontact integer DEFAULT 0 NOT NULL AFTER fk_prospectcontactlevel; + +create table llx_c_recruitment_origin +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(32) NOT NULL, + label varchar(64) NOT NULL, + active tinyint DEFAULT 1 NOT NULL +)ENGINE=innodb; + + +ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid); + + +ALTER TABLE llx_product MODIFY COLUMN seuil_stock_alerte float; +ALTER TABLE llx_product MODIFY COLUMN desiredstock float; +ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN seuil_stock_alerte float; +ALTER TABLE llx_product_warehouse_properties MODIFY COLUMN desiredstock float; + +ALTER TABLE llx_product ADD COLUMN fk_state integer DEFAULT NULL; + +ALTER TABLE llx_projet ADD COLUMN email_msgid varchar(255); +ALTER TABLE llx_ticket ADD COLUMN email_msgid varchar(255); +ALTER TABLE llx_actioncomm ADD COLUMN reply_to varchar(255); + +ALTER TABLE llx_paiement ADD pos_change DOUBLE(24,8) DEFAULT 0 AFTER fk_export_compta; + +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52); + +ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; +ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + +INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,

    \n\n__(YourCandidatureAnswer)__
    \n

    \n__(Sincerely)__
    __USER_SIGNATURE__',null, 0); + +ALTER TABLE llx_c_action_trigger MODIFY COLUMN code varchar(64) NOT NULL; + +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514); +insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516); + +ALTER TABLE llx_actioncomm_reminder ADD COLUMN entity integer NOT NULL DEFAULT 1; +ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_actioncomm integer NOT NULL; +ALTER TABLE llx_actioncomm_reminder ADD COLUMN fk_email_template integer; + +ALTER TABLE llx_actioncomm_reminder DROP INDEX uk_actioncomm_reminder_unique; +ALTER TABLE llx_actioncomm_reminder ADD UNIQUE uk_actioncomm_reminder_unique (fk_user, typeremind, offsetvalue, offsetunit, fk_actioncomm); + +ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_status (status); + + +ALTER TABLE llx_inventorydet ADD UNIQUE uk_inventorydet(fk_inventory, fk_warehouse, fk_product, batch); + +ALTER TABLE llx_commandedet ADD COLUMN ref_ext varchar(255) AFTER label; +ALTER TABLE llx_facturedet ADD COLUMN ref_ext varchar(255) AFTER multicurrency_total_ttc; + +ALTER TABLE llx_c_ticket_category ADD COLUMN fk_parent integer DEFAULT 0 NOT NULL; +ALTER TABLE llx_c_ticket_category ADD COLUMN force_severity varchar(32) NULL; + +ALTER TABLE llx_expensereport_ik ADD COLUMN ikoffset double DEFAULT 0 NOT NULL; + +ALTER TABLE llx_paiement ADD COLUMN ref_ext varchar(255) AFTER ref; + +ALTER TABLE llx_bank ADD COLUMN origin_id integer; +ALTER TABLE llx_bank ADD COLUMN origin_type varchar(64) NULL; +ALTER TABLE llx_bank ADD COLUMN import_key varchar(14); + +ALTER TABLE llx_menu MODIFY COLUMN enabled text; + +CREATE TABLE llx_ecm_files_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_ecm_files_extrafields ADD INDEX idx_ecm_files_extrafields (fk_object); + +CREATE TABLE llx_ecm_directories_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + +ALTER TABLE llx_ecm_directories_extrafields ADD INDEX idx_ecm_directories_extrafields (fk_object); +ALTER TABLE llx_website_page ADD COLUMN object_type varchar(255); +ALTER TABLE llx_website_page ADD COLUMN fk_object varchar(255); + +DELETE FROM llx_const WHERE name in ('MAIN_INCLUDE_ZERO_VAT_IN_REPORTS'); + +UPDATE llx_projet_task_time SET tms = null WHERE tms = 0; +ALTER TABLE llx_projet_task_time MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; + +ALTER TABLE llx_projet_task_time MODIFY COLUMN datec datetime; + +DELETE FROM llx_user_rights WHERE fk_id IN (SELECT id FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous'); +DELETE FROM llx_rights_def where module = 'holiday' and perms = 'lire_tous'; + diff --git a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql index a4ab666299d..4104d74da51 100644 --- a/htdocs/install/mysql/migration/3.0.0-3.1.0.sql +++ b/htdocs/install/mysql/migration/3.0.0-3.1.0.sql @@ -419,19 +419,19 @@ update llx_actioncomm set elementtype='order' where elementtype='commande'; update llx_actioncomm set elementtype='contract' where elementtype='contrat'; -alter table llx_propal add column tms timestamp after fk_projet; +alter table llx_propal add column tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP after fk_projet; create table llx_product_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL ) ENGINE=innodb; create table llx_societe_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL ) ENGINE=innodb; @@ -487,7 +487,7 @@ ALTER TABLE llx_don ADD phone varchar(24) after email; ALTER TABLE llx_element_element MODIFY sourcetype varchar(32) NOT NULL; ALTER TABLE llx_element_element MODIFY targettype varchar(32) NOT NULL; -ALTER TABLE llx_societe_prices MODIFY tms timestamp NULL; +ALTER TABLE llx_societe_prices MODIFY tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- ALTER TABLE llx_societe_prices ALTER COLUMN tms DROP NOT NULL; -- Fix: It seems this is missing for some users diff --git a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql index 044b1652029..c7356cc18ff 100644 --- a/htdocs/install/mysql/migration/3.1.0-3.2.0.sql +++ b/htdocs/install/mysql/migration/3.1.0-3.2.0.sql @@ -62,7 +62,7 @@ ALTER TABLE llx_societe MODIFY code_compta varchar(24); ALTER TABLE llx_societe MODIFY code_compta_fournisseur varchar(24); -ALTER TABLE llx_chargesociales ADD COLUMN tms timestamp; +ALTER TABLE llx_chargesociales ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_chargesociales ADD COLUMN date_creation datetime; ALTER TABLE llx_chargesociales ADD COLUMN date_valid datetime; @@ -118,7 +118,7 @@ CREATE TABLE llx_localtax ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer NOT NULL DEFAULT '1', - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep date DEFAULT NULL, datev date DEFAULT NULL, amount double NOT NULL DEFAULT '0', diff --git a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql index c0efe6d68b3..07b390f32c4 100644 --- a/htdocs/install/mysql/migration/3.2.0-3.3.0.sql +++ b/htdocs/install/mysql/migration/3.2.0-3.3.0.sql @@ -39,7 +39,7 @@ ALTER TABLE llx_societe DROP COLUMN description; ALTER TABLE llx_societe DROP COLUMN services; ALTER TABLE llx_societe MODIFY COLUMN ref_ext varchar(128); -ALTER TABLE llx_bank ADD COLUMN tms timestamp after datec; +ALTER TABLE llx_bank ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP after datec; -- Monaco VAT Rates insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values ( 271, 27,'19.6','0','VAT standard rate (France hors DOM-TOM)',1); @@ -267,7 +267,7 @@ ALTER TABLE llx_extrafields ADD COLUMN fieldrequired INTEGER DEFAULT 0; create table llx_socpeople_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -276,7 +276,7 @@ ALTER TABLE llx_socpeople_extrafields ADD INDEX idx_socpeople_extrafields (fk_ob create table llx_actioncomm_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -835,7 +835,7 @@ CREATE TABLE llx_product_price_by_qty ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_product_price integer NOT NULL, - date_price timestamp, + date_price timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, price double (24,8) DEFAULT 0, price_ttc double (24,8) DEFAULT 0, qty_min real DEFAULT 0 @@ -910,7 +910,7 @@ ALTER TABLE llx_bank_account MODIFY COLUMN code_banque varchar(8); create table llx_user_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- member id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql index 88d9ae1b685..edc2c931ee1 100644 --- a/htdocs/install/mysql/migration/3.3.0-3.4.0.sql +++ b/htdocs/install/mysql/migration/3.3.0-3.4.0.sql @@ -23,7 +23,7 @@ ALTER TABLE llx_menu MODIFY COLUMN leftmenu varchar(100); create table llx_adherent_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -115,7 +115,7 @@ ALTER TABLE llx_c_shipment_mode ADD COLUMN tracking VARCHAR(255) NOT NULL DEFAUL -- VMYSQL4.3 ALTER TABLE llx_c_shipment_mode CHANGE COLUMN rowid rowid INTEGER NOT NULL AUTO_INCREMENT; -- VPGSQL8.2 DROP table llx_c_shipment_mode; --- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(255) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL); +-- VPGSQL8.2 CREATE TABLE llx_c_shipment_mode (rowid SERIAL PRIMARY KEY, tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, tracking varchar(255) NOT NULL, active integer DEFAULT 0, module varchar(32) NULL); -- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (1,'CATCH','Catch','Catch by client','',1); -- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1); -- VPGSQL8.2 INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0); @@ -136,7 +136,7 @@ ALTER TABLE llx_stock_mouvement MODIFY COLUMN value real; create table llx_propal_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -145,7 +145,7 @@ ALTER TABLE llx_propal_extrafields ADD INDEX idx_propal_extrafields (fk_object); create table llx_facture_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -205,7 +205,7 @@ ALTER TABLE llx_facturedet DROP COLUMN fk_export_compta; CREATE TABLE llx_cronjob ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, jobtype varchar(10) NOT NULL, label text NOT NULL, @@ -249,7 +249,7 @@ DROP TABLE llx_printer_ipp; CREATE TABLE llx_printer_ipp ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, printer_name text NOT NULL, printer_location text NOT NULL, @@ -265,7 +265,7 @@ ALTER TABLE llx_adherent MODIFY COLUMN ref_ext varchar(128); create table llx_commande_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -299,7 +299,7 @@ ALTER TABLE llx_socpeople CHANGE COLUMN note note_private text; create table llx_projet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -308,7 +308,7 @@ ALTER TABLE llx_projet_extrafields ADD INDEX idx_projet_extrafields (fk_object); create table llx_projet_task_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -319,7 +319,7 @@ CREATE TABLE llx_opensurvey_comments ( id_comment INTEGER unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, id_sondage CHAR(16) NOT NULL, comment text NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, usercomment text ) ENGINE=InnoDB; @@ -336,7 +336,7 @@ CREATE TABLE llx_opensurvey_sondage ( survey_link_visible integer DEFAULT 1, canedit integer DEFAULT 0, origin varchar(64), - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, sujet TEXT ) ENGINE=InnoDB; CREATE TABLE llx_opensurvey_user_studs ( @@ -344,7 +344,7 @@ CREATE TABLE llx_opensurvey_user_studs ( nom VARCHAR(64) NOT NULL, id_sondage VARCHAR(16) NOT NULL, reponses VARCHAR(100) NOT NULL, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=InnoDB; ALTER TABLE llx_opensurvey_sondage ADD COLUMN id_sondage_admin CHAR(24); @@ -367,7 +367,7 @@ UPDATE llx_extrafields SET elementtype='societe' WHERE elementtype='company'; create table llx_commande_fournisseur_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -376,7 +376,7 @@ ALTER TABLE llx_commande_fournisseur_extrafields ADD INDEX idx_commande_fourniss create table llx_facture_fourn_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index c6dc0ff9bd7..af3ea13fa5c 100644 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -43,7 +43,7 @@ ALTER TABLE llx_socpeople ADD COLUMN statut tinyint DEFAULT 1 NOT NULL AFTER imp create table llx_fichinter_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -55,7 +55,7 @@ ALTER TABLE llx_product ADD COLUMN desiredstock integer DEFAULT 0; create table llx_commandedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) )ENGINE=innodb; @@ -69,7 +69,7 @@ ALTER TABLE llx_facturedet_rec ADD COLUMN info_bits integer DEFAULT 0 after tota create table llx_facturedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -79,7 +79,7 @@ ALTER TABLE llx_facturedet_extrafields ADD INDEX idx_facturedet_extrafields (fk_ create table llx_propaldet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -314,7 +314,7 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc -- Add ref_ext on bordereau_cheque ALTER TABLE llx_bordereau_cheque ADD ref_ext VARCHAR(255); -ALTER TABLE llx_bordereau_cheque ADD tms timestamp; +ALTER TABLE llx_bordereau_cheque ADD tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- Task 1011 @@ -337,7 +337,7 @@ ALTER TABLE llx_contratdet ADD column product_type integer DEFAULT 1 after total create table llx_contrat_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql index 5727b946bcb..32ed4c32538 100644 --- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql +++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql @@ -74,7 +74,7 @@ ALTER TABLE llx_bookmark MODIFY COLUMN url varchar(255) NOT NULL; -- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL; --- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP; +-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_opensurvey_sondage ADD COLUMN entity integer DEFAULT 1 NOT NULL; @@ -108,7 +108,7 @@ create table llx_product_customer_price rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_soc integer NOT NULL, price double(24,8) DEFAULT 0, @@ -164,7 +164,7 @@ ALTER TABLE llx_product ADD COLUMN tobatch tinyint DEFAULT 0 NOT NULL; CREATE TABLE llx_product_batch ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product_stock integer NOT NULL, eatby datetime DEFAULT NULL, sellby datetime DEFAULT NULL, @@ -187,7 +187,7 @@ CREATE TABLE llx_expeditiondet_batch ( --DROP TABLE llx_payment_salary CREATE TABLE llx_payment_salary ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user integer NOT NULL, datep date, datev date, @@ -229,7 +229,7 @@ ALTER TABLE llx_projet_task_time ADD thm double(24,8) AFTER fk_user; create table llx_categories_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -283,7 +283,7 @@ CREATE TABLE llx_resource fk_code_type_resource varchar(32), note_public text, note_private text, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_resource ADD INDEX fk_code_type_resource_idx (fk_code_type_resource); @@ -298,7 +298,7 @@ CREATE TABLE llx_element_resources busy integer, mandatory integer, fk_user_create integer, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_element_resources ADD UNIQUE INDEX idx_element_resources_idx1 (resource_id, resource_type, element_id, element_type); diff --git a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql index 6dc2521ca5d..640f22e4bee 100644 --- a/htdocs/install/mysql/migration/3.6.0-3.7.0.sql +++ b/htdocs/install/mysql/migration/3.6.0-3.7.0.sql @@ -137,7 +137,7 @@ DROP TABLE llx_compta_compte_generaux; -- Align size for accounting account ALTER TABLE llx_accountingaccount MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_accountingaccount MODIFY COLUMN account_parent varchar(32); -ALTER TABLE llx_accountingaccount add column tms timestamp AFTER datec; +ALTER TABLE llx_accountingaccount add column tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER datec; ALTER TABLE llx_accountingdebcred MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_bank_account MODIFY COLUMN account_number varchar(32); ALTER TABLE llx_c_chargesociales MODIFY COLUMN accountancy_code varchar(32); @@ -233,7 +233,7 @@ create table llx_accounting_fiscalyear statut tinyint DEFAULT 0 NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer NULL, fk_user_modif integer NULL )ENGINE=innodb; @@ -1050,7 +1050,7 @@ create table llx_c_email_templates private smallint DEFAULT 0 NOT NULL, -- Template public or private fk_user integer, -- Id utilisateur si modele prive, sinon null datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(255), -- Label of predefined email position smallint, -- Position active tinyint DEFAULT 1 NOT NULL, @@ -1112,7 +1112,7 @@ ALTER TABLE llx_projet_task MODIFY COLUMN planned_workload real DEFAULT 0 NULL; CREATE TABLE llx_fichinterdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -1121,7 +1121,7 @@ ALTER TABLE llx_fichinterdet_extrafields ADD INDEX idx_ficheinterdet_extrafields CREATE TABLE llx_usergroup_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql index ca677fc5224..00bf30f6672 100644 --- a/htdocs/install/mysql/migration/3.7.0-3.8.0.sql +++ b/htdocs/install/mysql/migration/3.7.0-3.8.0.sql @@ -49,7 +49,7 @@ create table llx_loan rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(80) NOT NULL, fk_bank integer, capital real DEFAULT 0 NOT NULL, @@ -75,7 +75,7 @@ create table llx_payment_loan rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, amount_capital real DEFAULT 0, amount_insurance real DEFAULT 0, @@ -145,7 +145,7 @@ ALTER TABLE llx_product ADD COLUMN lifo double(24,8) AFTER fifo; CREATE TABLE llx_printing ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, printer_name text NOT NULL, printer_location text NOT NULL, @@ -177,7 +177,7 @@ DELETE from llx_const where name = 'MAIN_USE_JQUERY_MULTISELECT' and value = '1' create table llx_bank_account_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -198,7 +198,7 @@ ALTER TABLE llx_bank_account_extrafields ADD INDEX idx_bank_account_extrafields create table llx_contratdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -210,7 +210,7 @@ ALTER TABLE llx_product_fournisseur_price ADD COLUMN delivery_time_days integer; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN comment varchar(255); ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN status integer; -ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN tms timestamp; +ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN batch varchar(30) DEFAULT NULL; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN eatby date DEFAULT NULL; ALTER TABLE llx_commande_fournisseur_dispatch ADD COLUMN sellby date DEFAULT NULL; @@ -240,7 +240,7 @@ CREATE TABLE llx_expensereport ( date_approve datetime, date_refuse datetime, date_cancel datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer NOT NULL, fk_user_modif integer DEFAULT NULL, fk_user_valid integer DEFAULT NULL, @@ -297,7 +297,7 @@ create table llx_payment_expensereport rowid integer AUTO_INCREMENT PRIMARY KEY, fk_expensereport integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount real DEFAULT 0, fk_typepayment integer NOT NULL, @@ -316,7 +316,7 @@ ALTER TABLE llx_societe ADD COLUMN name_alias varchar(128) NULL; create table llx_commande_fournisseurdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -327,7 +327,7 @@ ALTER TABLE llx_commande_fournisseurdet_extrafields ADD INDEX idx_commande_fourn create table llx_facture_fourn_det_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -357,7 +357,7 @@ CREATE TABLE llx_askpricesupplier ( ref_int varchar(255) DEFAULT NULL, fk_soc integer DEFAULT NULL, fk_projet integer DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime DEFAULT NULL, date_valid datetime DEFAULT NULL, date_cloture datetime DEFAULT NULL, @@ -422,14 +422,14 @@ CREATE TABLE llx_askpricesupplierdet ( CREATE TABLE llx_askpricesupplier_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; CREATE TABLE llx_askpricesupplierdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; @@ -491,7 +491,7 @@ ALTER TABLE llx_don CHANGE COLUMN fk_project fk_projet integer NULL; create table llx_don_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -503,7 +503,7 @@ create table llx_payment_donation rowid integer AUTO_INCREMENT PRIMARY KEY, fk_donation integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount real DEFAULT 0, fk_typepayment integer NOT NULL, @@ -585,7 +585,7 @@ CREATE TABLE IF NOT EXISTS llx_propal_merge_pdf_product ( fk_user_author integer DEFAULT NULL, fk_user_mod integer NOT NULL, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) DEFAULT NULL ) ENGINE=InnoDB; diff --git a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql index f749e57b432..363288708d4 100644 --- a/htdocs/install/mysql/migration/3.8.0-3.9.0.sql +++ b/htdocs/install/mysql/migration/3.8.0-3.9.0.sql @@ -146,7 +146,7 @@ CREATE TABLE llx_ecm_files cover text, -- is this file a file to use for a cover extraparams varchar(255), -- for stock other parameters with json format date_c datetime, - date_m timestamp, + date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, acl text -- for future permission 'per file' @@ -227,7 +227,7 @@ CREATE TABLE IF NOT EXISTS llx_establishment ( fk_user_author integer NOT NULL, fk_user_mod integer NOT NULL, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, status smallint DEFAULT 1 ) ENGINE=InnoDB; @@ -236,7 +236,7 @@ CREATE TABLE IF NOT EXISTS llx_user_rib ( fk_user integer NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(30), bank varchar(255), -- bank name code_banque varchar(128), -- bank code @@ -263,7 +263,7 @@ create table llx_stock_lotserial eatby date DEFAULT NULL, -- Eatby date sellby date DEFAULT NULL, -- Sellby date datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -282,7 +282,7 @@ create table llx_budget date_start date, date_end date, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -296,7 +296,7 @@ create table llx_budget_lines fk_project_ids varchar(255) NOT NULL, -- List of project ids related to this budget. If budget is dedicated to projects not yet started, we recommand to create a project 'Projects to come'. amount double(24,8) NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -369,7 +369,7 @@ create table llx_categorie_project create table llx_expedition_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -379,7 +379,7 @@ ALTER TABLE llx_expedition_extrafields ADD INDEX idx_expedition_extrafields (fk_ create table llx_expeditiondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -392,7 +392,7 @@ ALTER TABLE llx_expeditiondet_extrafields ADD INDEX idx_expeditiondet_extrafield create table llx_livraison_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -402,7 +402,7 @@ ALTER TABLE llx_livraison_extrafields ADD INDEX idx_livraison_extrafields (fk_ob create table llx_livraisondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; @@ -595,7 +595,7 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN doc_ref varchar(300) NOT NULL; -ALTER TABLE llx_holiday ADD COLUMN tms timestamp; +ALTER TABLE llx_holiday ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_holiday ADD COLUMN entity integer DEFAULT 1 NOT NULL; ALTER TABLE llx_holiday ADD INDEX idx_holiday_entity (entity); diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 6ec4fc35f92..6bf230df12a 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -54,7 +54,7 @@ CREATE TABLE llx_product_lot ( eatby date DEFAULT NULL, -- Eatby date sellby date DEFAULT NULL, -- Sellby date datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer @@ -140,7 +140,7 @@ CREATE TABLE llx_website fk_default_home integer, date_creation datetime, date_modification datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_website ADD COLUMN fk_default_home integer; ALTER TABLE llx_website CHANGE COLUMN shortname ref varchar(24) NOT NULL; @@ -158,7 +158,7 @@ CREATE TABLE llx_website_page status integer, date_creation datetime, date_modification datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_website_page ADD UNIQUE INDEX uk_website_page_url (fk_website,pageurl); @@ -475,7 +475,7 @@ CREATE TABLE llx_advtargetemailing fk_user_author integer NOT NULL, datec datetime NOT NULL, fk_user_mod integer NOT NULL, - tms timestamp NOT NULL + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=InnoDB; ALTER TABLE llx_advtargetemailing ADD UNIQUE INDEX uk_advtargetemailing_name (name); diff --git a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql index 175e03ec179..7578c633be4 100644 --- a/htdocs/install/mysql/migration/4.0.0-5.0.0.sql +++ b/htdocs/install/mysql/migration/4.0.0-5.0.0.sql @@ -114,7 +114,7 @@ ALTER TABLE llx_societe_remise ADD COLUMN entity integer DEFAULT 1 NOT NULL afte create table llx_expensereport_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -133,7 +133,7 @@ UPDATE llx_adherent_type SET subscription = '1' WHERE subscription = 'yes'; CREATE TABLE llx_product_lot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -145,7 +145,7 @@ ALTER TABLE llx_website_page MODIFY COLUMN content MEDIUMTEXT; CREATE TABLE llx_product_warehouse_properties ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_entrepot integer NOT NULL, seuil_stock_alerte integer DEFAULT 0, @@ -156,7 +156,7 @@ CREATE TABLE llx_product_warehouse_properties ALTER TABLE llx_accounting_bookkeeping ADD COLUMN entity integer DEFAULT 1 NOT NULL; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN fk_user_modif integer; ALTER TABLE llx_accounting_bookkeeping ADD COLUMN date_creation datetime; -ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms timestamp; +ALTER TABLE llx_accounting_bookkeeping ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN numero_compte varchar(32) NOT NULL; -- VMYSQL4.3 ALTER TABLE llx_accounting_bookkeeping MODIFY COLUMN code_journal varchar(32) NOT NULL; -- VPGSQL8.2 ALTER TABLE llx_accounting_bookkeeping ALTER COLUMN numero_compte SET NOT NULL; @@ -186,7 +186,7 @@ ALTER TABLE llx_entrepot ADD COLUMN fk_parent integer DEFAULT 0; create table llx_resource_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -222,7 +222,7 @@ create table llx_user_employment ref_ext varchar(50), -- reference into an external system (not used by dolibarr) fk_user integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, job varchar(128), -- job position. may be a dictionary diff --git a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql index b53b25f93b1..87eda0668b1 100644 --- a/htdocs/install/mysql/migration/5.0.0-6.0.0.sql +++ b/htdocs/install/mysql/migration/5.0.0-6.0.0.sql @@ -61,7 +61,7 @@ ALTER TABLE llx_supplier_proposaldet CHANGE COLUMN fk_askpricesupplier fk_suppli -- VMYSQL4.3 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN date_fin DATETIME NULL DEFAULT NULL; -- VPGSQL8.2 ALTER TABLE llx_opensurvey_sondage ALTER COLUMN date_fin DROP NOT NULL; --- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP; +-- VMYSQL4.1 ALTER TABLE llx_opensurvey_sondage MODIFY COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_opensurvey_sondage ADD COLUMN fk_user_creat integer NOT NULL DEFAULT 0; ALTER TABLE llx_opensurvey_sondage ADD COLUMN status integer DEFAULT 1 after date_fin; @@ -160,7 +160,7 @@ ALTER TABLE llx_projet ADD COLUMN fk_user_modif integer; ALTER TABLE llx_projet_task ADD COLUMN fk_user_modif integer; ALTER TABLE llx_projet_task_time ADD COLUMN datec date; -ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp; +ALTER TABLE llx_projet_task_time ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price ADD COLUMN fk_multicurrency integer; ALTER TABLE llx_product_price ADD COLUMN multicurrency_code varchar(255); @@ -171,12 +171,12 @@ ALTER TABLE llx_product_price ADD COLUMN multicurrency_price_ttc double(24,8) DE ALTER TABLE llx_product_price_by_qty ADD COLUMN fk_user_creat integer; ALTER TABLE llx_product_price_by_qty ADD COLUMN fk_user_modif integer; ALTER TABLE llx_product_price_by_qty DROP COLUMN date_price; -ALTER TABLE llx_product_price_by_qty ADD COLUMN tms timestamp; +ALTER TABLE llx_product_price_by_qty ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_product_price_by_qty ADD COLUMN import_key varchar(14); ALTER TABLE llx_user ADD COLUMN import_key varchar(14); -ALTER TABLE llx_facture_rec ADD COLUMN tms timestamp; +ALTER TABLE llx_facture_rec ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; UPDATE llx_facture_rec SET tms = datec where tms < '2000-01-01'; CREATE TABLE llx_product_attribute @@ -295,7 +295,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | date last modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | date last modification import_key varchar(14), code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib @@ -391,7 +391,7 @@ ALTER TABLE llx_contratdet ADD COLUMN vat_src_code varchar(10) DEFAULT ''; CREATE TABLE llx_payment_various ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, datep date, datev date, @@ -438,7 +438,7 @@ rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 0, ref varchar(48), datec datetime DEFAULT NULL, -tms timestamp, +tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer, fk_user_modif integer, fk_user_valid integer, @@ -453,7 +453,7 @@ CREATE TABLE llx_inventorydet ( rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, -tms timestamp, +tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_inventory integer DEFAULT 0, fk_warehouse integer DEFAULT 0, fk_product integer DEFAULT 0, @@ -467,7 +467,7 @@ new_pmp double DEFAULT 0 )ENGINE=InnoDB; ALTER TABLE llx_inventory ADD COLUMN datec datetime DEFAULT NULL; -ALTER TABLE llx_inventory ADD COLUMN tms timestamp; +ALTER TABLE llx_inventory ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; ALTER TABLE llx_inventory ADD INDEX idx_inventory_tms (tms); ALTER TABLE llx_inventory ADD INDEX idx_inventory_datec (datec); @@ -502,7 +502,7 @@ CREATE TABLE llx_loan_schedule rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, amount_capital real DEFAULT 0, amount_insurance real DEFAULT 0, @@ -547,7 +547,7 @@ CREATE TABLE llx_website_page fk_user_create integer, fk_user_modif integer, date_creation datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_website_page ADD UNIQUE INDEX uk_website_page_url (fk_website,pageurl); @@ -566,7 +566,7 @@ UPDATE llx_extrafields set elementtype='categorie' where elementtype='categories CREATE TABLE llx_blockedlog ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, action varchar(50), amounts real NOT NULL, signature varchar(100) NOT NULL, @@ -593,7 +593,7 @@ CREATE TABLE llx_blockedlog_authority rowid integer AUTO_INCREMENT PRIMARY KEY, blockchain longtext NOT NULL, signature varchar(100) NOT NULL, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; ALTER TABLE llx_blockedlog_authority ADD INDEX signature (signature); @@ -613,7 +613,7 @@ ALTER TABLE llx_mailing_cibles MODIFY COLUMN source_url varchar(255); CREATE TABLE llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -623,7 +623,7 @@ ALTER TABLE llx_facture_rec_extrafields ADD INDEX idx_facture_rec_extrafields (f CREATE TABLE llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql index ff6a1fe03fb..93a7a447c18 100644 --- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql +++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql @@ -265,7 +265,7 @@ ALTER TABLE llx_menu MODIFY fk_leftmenu varchar(100); CREATE TABLE llx_website_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -285,7 +285,7 @@ CREATE TABLE llx_website_account( date_last_login datetime, date_previous_login datetime, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -307,7 +307,7 @@ ALTER TABLE llx_website_account ADD CONSTRAINT llx_website_account_fk_website FO CREATE TABLE llx_website_account_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -326,7 +326,7 @@ alter table llx_user add column pass_encoding varchar(24) NULL; CREATE TABLE IF NOT EXISTS llx_expensereport_ik ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL, fk_range integer DEFAULT 0 NOT NULL, coef double DEFAULT 0 NOT NULL, @@ -441,7 +441,7 @@ INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active CREATE TABLE llx_expensereport_rules ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dates datetime NOT NULL, datee datetime NOT NULL, amount numeric(24,8) NOT NULL, @@ -464,7 +464,7 @@ ALTER TABLE llx_extrafields ADD COLUMN fk_user_author integer; ALTER TABLE llx_extrafields ADD COLUMN fk_user_modif integer; ALTER TABLE llx_extrafields ADD COLUMN datec datetime; ALTER TABLE llx_extrafields ADD COLUMN enabled varchar(255) DEFAULT '1'; -ALTER TABLE llx_extrafields ADD COLUMN tms timestamp; +ALTER TABLE llx_extrafields ADD COLUMN tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; -- We fix value of 'list' from 0 to 1 for all extrafields created before this migration --VMYSQL4.1 UPDATE llx_extrafields SET list = 1 WHERE list = 0 AND fk_user_author IS NULL and fk_user_modif IS NULL and datec IS NULL; @@ -528,7 +528,7 @@ DROP TABLE llx_projet_task_comment; CREATE TABLE llx_comment ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, description text NOT NULL, fk_user_author integer DEFAULT NULL, fk_element integer DEFAULT NULL, @@ -572,7 +572,7 @@ create table llx_c_email_senderprofile entity integer DEFAULT 1 NOT NULL, -- multi company id private smallint DEFAULT 0 NOT NULL, -- Template public or private date_creation datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(255), -- Label of predefined email email varchar(255), -- Email signature text, -- Predefined signature @@ -655,7 +655,7 @@ create table llx_onlinesignature object_type varchar(32) NOT NULL, object_id integer NOT NULL, datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, name varchar(255) NOT NULL, ip varchar(128), pathoffile varchar(255) @@ -709,7 +709,7 @@ ALTER TABLE llx_resource ADD CONSTRAINT fk_resource_fk_country FOREIGN KEY (fk_c create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index 380c64c28fc..888f4fefdd0 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -149,7 +149,7 @@ CREATE TABLE llx_societe_remise_supplier rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user remise_supplier double(6,3) DEFAULT 0 NOT NULL, -- discount @@ -246,7 +246,7 @@ CREATE TABLE llx_ticket date_read datetime, date_close datetime, notify_tiers_at_create tinyint, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_ticket ADD COLUMN notify_tiers_at_create integer; @@ -271,7 +271,7 @@ ALTER TABLE llx_ticket_msg ADD CONSTRAINT fk_ticket_msg_fk_track_id FOREIGN KEY CREATE TABLE llx_ticket_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) )ENGINE=innodb; @@ -279,7 +279,7 @@ CREATE TABLE llx_ticket_extrafields create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -371,7 +371,7 @@ CREATE TABLE llx_societe_account( date_last_login datetime, date_previous_login datetime, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -433,7 +433,7 @@ CREATE TABLE llx_asset( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -449,7 +449,7 @@ ALTER TABLE llx_asset ADD INDEX idx_asset_fk_asset_type (fk_asset_type); create table llx_asset_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -458,7 +458,7 @@ create table llx_asset_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(50) NOT NULL, accountancy_code_asset varchar(32), accountancy_code_depreciation_asset varchar(32), @@ -473,7 +473,7 @@ ALTER TABLE llx_asset ADD CONSTRAINT fk_asset_asset_type FOREIGN KEY (fk_asset_t create table llx_asset_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql index b7fe131c3f9..36a15d5b85d 100644 --- a/htdocs/install/mysql/migration/8.0.0-9.0.0.sql +++ b/htdocs/install/mysql/migration/8.0.0-9.0.0.sql @@ -43,7 +43,7 @@ ALTER TABLE llx_facture ADD COLUMN pos_source varchar(32); create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; @@ -182,7 +182,7 @@ CREATE TABLE llx_emailcollector_emailcollector( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -202,7 +202,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter( type varchar(128) NOT NULL, rulevalue varchar(128) NULL, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), @@ -217,7 +217,7 @@ CREATE TABLE llx_emailcollector_emailcollectoraction( type varchar(128) NOT NULL, actionparam varchar(255) NULL, date_creation datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, position integer DEFAULT 0, diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index a56cb45e4fe..b9a406515ec 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -87,7 +87,7 @@ create table llx_mailing_unsubscribe unsubscribegroup varchar(128) DEFAULT '', ip varchar(128), date_creat datetime, -- creation date - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup); @@ -223,7 +223,7 @@ CREATE TABLE llx_bom_bom( qty double(24,8), efficiency double(8,4), date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_valid datetime, fk_user_creat integer NOT NULL, fk_user_modif integer, @@ -240,7 +240,7 @@ ALTER TABLE llx_bom_bom ADD COLUMN date_valid datetime; create table llx_bom_bom_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -266,7 +266,7 @@ ALTER TABLE llx_bom_bomline ADD COLUMN position integer NOT NULL; create table llx_bom_bomline_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; @@ -335,7 +335,7 @@ UPDATE llx_c_shipment_mode SET label = 'https://www.laposte.fr/outils/suivre-vos create table llx_reception ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, @@ -383,7 +383,7 @@ ALTER TABLE llx_reception ADD INDEX idx_reception_fk_shipping_method (fk_shippin create table llx_reception_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/migration/repair.sql b/htdocs/install/mysql/migration/repair.sql index aa5ab65d3ff..c9c916ed3ad 100644 --- a/htdocs/install/mysql/migration/repair.sql +++ b/htdocs/install/mysql/migration/repair.sql @@ -383,6 +383,7 @@ delete from llx_commande_fournisseur_dispatch where fk_commandefourndet = 0 or f delete from llx_menu where menu_handler = 'smartphone'; update llx_expedition set date_valid = date_creation where fk_statut = 1 and date_valid IS NULL; +update llx_expedition set date_valid = NOW() where fk_statut = 1 and date_valid IS NULL; -- Detect bad consistency between duraction_effective of a task and sum of time of tasks -- select pt.rowid, pt.duration_effective, SUM(ptt.task_duration) as y from llx_projet_task as pt, llx_projet_task_time as ptt where ptt.fk_task = pt.rowid group by pt.rowid, pt.duration_effective having pt.duration_effective <> y; diff --git a/htdocs/install/mysql/tables/llx_accounting_account.sql b/htdocs/install/mysql/tables/llx_accounting_account.sql index 7af83585c7f..893cb19d9ab 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.sql @@ -24,7 +24,7 @@ create table llx_accounting_account rowid bigint AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_pcg_version varchar(32) NOT NULL, -- Chart system pcg_type varchar(20) NOT NULL, -- First part of Key for predefined groups account_number varchar(32) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index cf1c3334092..23e7d489e09 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -45,7 +45,7 @@ CREATE TABLE llx_accounting_bookkeeping fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | date last modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | last modification date fk_user integer NULL, -- The id of user that validate the accounting source document code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql index cbf387b9b70..2b8277c70bd 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql @@ -44,7 +44,7 @@ CREATE TABLE llx_accounting_bookkeeping_tmp fk_user_author integer NOT NULL, -- | user creating fk_user_modif integer, -- | user making last change date_creation datetime, -- FEC:EcritureDate | creation date - tms timestamp, -- | date last modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- | last modification date fk_user integer NULL, -- The id of user that validate the accounting source document code_journal varchar(32) NOT NULL, -- FEC:JournalCode journal_label varchar(255), -- FEC:JournalLib diff --git a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql index 90590fb427d..17e9d9dccfb 100644 --- a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql +++ b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql @@ -25,7 +25,7 @@ create table llx_accounting_fiscalyear statut tinyint DEFAULT 0 NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer DEFAULT NULL, fk_user_modif integer DEFAULT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index f335a93cfeb..82d97d3ec98 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -33,7 +33,7 @@ create table llx_actioncomm code varchar(50) NULL, -- code of action for automatic action ('AC_OTH_AUTO' for automatic actions, 'AC_EMAILIN_AUTO' for email input, 'AC_xxx' for manual action...) datec datetime, -- date creation - tms timestamp, -- date modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date fk_user_author integer, -- user id of user that has created record fk_user_mod integer, -- user id of user that has modified record @@ -66,6 +66,7 @@ create table llx_actioncomm email_tocc varchar(255), -- when event was an email, we store here the email_tocc email_tobcc varchar(255), -- when event was an email, we store here the email_tobcc errors_to varchar(255), -- when event was an email, we store here the erros_to + reply_to varchar(255), -- when event was an email, we store here the reply_to recurid varchar(128), -- used to store event id to link each other all the repeating event record. It can be the 'iCalUID' as in RFC5545 (an id similar for all the same serie) recurrule varchar(128), -- contains string with ical format recurring rule like 'FREQ=MONTHLY;INTERVAL=2;BYMONTHDAY=19' or 'FREQ=WEEKLY;BYDAY=MO' diff --git a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql index c820feac430..95a415116ab 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql @@ -19,7 +19,7 @@ create table llx_actioncomm_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql b/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql index 94e50d05634..6cc9a8cbd37 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql @@ -15,11 +15,11 @@ -- BEGIN MODULEBUILDER INDEXES -ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_rowid (rowid); ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_dateremind (dateremind); ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_fk_user (fk_user); +ALTER TABLE llx_actioncomm_reminder ADD INDEX idx_actioncomm_reminder_status (status); -- END MODULEBUILDER INDEXES -ALTER TABLE llx_actioncomm_reminder ADD UNIQUE INDEX uk_actioncomm_reminder_unique(fk_user, typeremind, offsetvalue, offsetunit); +ALTER TABLE llx_actioncomm_reminder ADD UNIQUE INDEX uk_actioncomm_reminder_unique(fk_actioncomm, fk_user, typeremind, offsetvalue, offsetunit); diff --git a/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql b/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql index 2edb11c45c5..78dd00d6ea5 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql @@ -22,6 +22,10 @@ CREATE TABLE llx_actioncomm_reminder( fk_user integer NOT NULL, offsetvalue integer NOT NULL, offsetunit varchar(1) NOT NULL, - status integer NOT NULL DEFAULT 0 + status integer NOT NULL DEFAULT 0, + entity integer NOT NULL DEFAULT 1, + fk_actioncomm integer NOT NULL, + fk_email_template integer + -- END MODULEBUILDER FIELDS ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 1917e80c81a..6b5490b282d 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -72,7 +72,7 @@ create table llx_adherent model_pdf varchar(255), datevalid datetime, -- date de validation datec datetime, -- date de creation - tms timestamp, -- date de modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date fk_user_author integer, -- can be null because member can be create by a guest fk_user_mod integer, fk_user_valid integer, diff --git a/htdocs/install/mysql/tables/llx_adherent_extrafields.sql b/htdocs/install/mysql/tables/llx_adherent_extrafields.sql index 50f47c7954b..6b67944a321 100644 --- a/htdocs/install/mysql/tables/llx_adherent_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_adherent_extrafields.sql @@ -21,7 +21,7 @@ create table llx_adherent_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- member id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql index 7e9270b89dc..bdce18ef0bc 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.sql @@ -26,7 +26,7 @@ create table llx_adherent_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, statut smallint NOT NULL DEFAULT 0, libelle varchar(50) NOT NULL, morphy varchar(3) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql index 2950147730b..d13056a2894 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql @@ -19,7 +19,7 @@ create table llx_adherent_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_advtargetemailing.sql b/htdocs/install/mysql/tables/llx_advtargetemailing.sql index 22d49768887..34bd7eb53bf 100644 --- a/htdocs/install/mysql/tables/llx_advtargetemailing.sql +++ b/htdocs/install/mysql/tables/llx_advtargetemailing.sql @@ -28,5 +28,5 @@ CREATE TABLE llx_advtargetemailing fk_user_author integer NOT NULL, datec datetime NOT NULL, fk_user_mod integer NOT NULL, - tms timestamp NOT NULL + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_asset.sql b/htdocs/install/mysql/tables/llx_asset.sql index b5bb1d1bfe2..52eeda3ba58 100644 --- a/htdocs/install/mysql/tables/llx_asset.sql +++ b/htdocs/install/mysql/tables/llx_asset.sql @@ -26,7 +26,7 @@ CREATE TABLE llx_asset( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_asset_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_extrafields.sql index 364f0e3d08f..c93fac7b20a 100644 --- a/htdocs/install/mysql/tables/llx_asset_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_extrafields.sql @@ -16,7 +16,7 @@ create table llx_asset_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_asset_type.sql b/htdocs/install/mysql/tables/llx_asset_type.sql index bd1c300d087..1205acb959b 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.sql @@ -17,7 +17,7 @@ create table llx_asset_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(50) NOT NULL, accountancy_code_asset varchar(32), accountancy_code_depreciation_asset varchar(32), diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql index 59ebe94c7d8..7ff09176216 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql @@ -16,7 +16,7 @@ create table llx_asset_type_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bank.sql b/htdocs/install/mysql/tables/llx_bank.sql index eb04e314545..0e1dbc403da 100644 --- a/htdocs/install/mysql/tables/llx_bank.sql +++ b/htdocs/install/mysql/tables/llx_bank.sql @@ -21,7 +21,7 @@ create table llx_bank ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datev date, -- date de valeur dateo date, -- date operation amount double(24,8) NOT NULL default 0, @@ -32,11 +32,14 @@ create table llx_bank fk_type varchar(6), -- TIP,VIR,PRE,CB,CHQ,... (Code in llx_c_paiement) num_releve varchar(50), num_chq varchar(50), - numero_compte varchar(32) NULL, -- FEC:CompteNum | account number + numero_compte varchar(32) NULL, -- FEC:CompteNum | account number rappro tinyint default 0, note text, fk_bordereau integer DEFAULT 0, - banque varchar(255), -- banque pour les cheques - emetteur varchar(255), -- emetteur du cheque - author varchar(40) -- a supprimer apres migration + banque varchar(255), -- banque pour les cheques + emetteur varchar(255), -- emetteur du cheque + author varchar(40), -- a supprimer apres migration + origin_id integer, + origin_type varchar(64) NULL, + import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index 28a1a0baf34..4ac90dd961d 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -26,7 +26,7 @@ create table llx_bank_account ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(12) NOT NULL, label varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id diff --git a/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql index 5d9d8847154..a30e81ab96c 100644 --- a/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql @@ -19,7 +19,7 @@ create table llx_bank_account_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_blockedlog.sql b/htdocs/install/mysql/tables/llx_blockedlog.sql index 889b28d7a73..f8145718ea6 100644 --- a/htdocs/install/mysql/tables/llx_blockedlog.sql +++ b/htdocs/install/mysql/tables/llx_blockedlog.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_blockedlog rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, date_creation datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, action varchar(50), amounts double(24,8) NOT NULL, element varchar(50), diff --git a/htdocs/install/mysql/tables/llx_blockedlog_authority.sql b/htdocs/install/mysql/tables/llx_blockedlog_authority.sql index 9e7dae8f23c..eb491f93af4 100644 --- a/htdocs/install/mysql/tables/llx_blockedlog_authority.sql +++ b/htdocs/install/mysql/tables/llx_blockedlog_authority.sql @@ -3,5 +3,5 @@ CREATE TABLE llx_blockedlog_authority rowid integer AUTO_INCREMENT PRIMARY KEY, blockchain longtext NOT NULL, signature varchar(100) NOT NULL, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bom_bom.sql b/htdocs/install/mysql/tables/llx_bom_bom.sql index d61b404806d..01ec2e63a3e 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom.sql @@ -18,7 +18,8 @@ CREATE TABLE llx_bom_bom( -- BEGIN MODULEBUILDER FIELDS rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, entity integer DEFAULT 1 NOT NULL, - ref varchar(128) NOT NULL, + ref varchar(128) NOT NULL, + bomtype integer DEFAULT 0, -- 0 for a BOM to manufacture, 1 for a BOM to dismantle label varchar(255), fk_product integer, description text, @@ -30,7 +31,7 @@ CREATE TABLE llx_bom_bom( duration double(24,8) DEFAULT NULL, date_creation datetime NOT NULL, date_valid datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, diff --git a/htdocs/install/mysql/tables/llx_bom_bom_extrafields.key.sql b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.key.sql new file mode 100644 index 00000000000..e0b217c2917 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.key.sql @@ -0,0 +1,21 @@ +-- =================================================================== +-- Copyright (C) 2014 Florian Henry +-- +-- 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 . +-- +-- =================================================================== + + +ALTER TABLE llx_bom_bom_extrafields ADD INDEX idx_bom_bom_extrafields_fk_object (fk_object); + diff --git a/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql index 10c44459a8b..15210546fda 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql @@ -16,7 +16,7 @@ create table llx_bom_bom_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql b/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql index 1b468da3a22..8ed3e96bd11 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql @@ -16,7 +16,7 @@ create table llx_bom_bomline_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql index 3050b831eec..9b1d6e24ad4 100644 --- a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql +++ b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql @@ -33,7 +33,7 @@ create table llx_bordereau_cheque fk_bank_account integer, fk_user_author integer, statut smallint NOT NULL DEFAULT 0, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, note text, entity integer DEFAULT 1 NOT NULL -- multi company id )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_boxes_def.sql b/htdocs/install/mysql/tables/llx_boxes_def.sql index 285bbc22603..fbdf0e3ed36 100644 --- a/htdocs/install/mysql/tables/llx_boxes_def.sql +++ b/htdocs/install/mysql/tables/llx_boxes_def.sql @@ -23,6 +23,6 @@ create table llx_boxes_def rowid integer AUTO_INCREMENT PRIMARY KEY, file varchar(200) NOT NULL, -- Do not increase this as file+note must be small to allow index entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, note varchar(130) -- Do not increase this as file+note must be small to allow index )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_budget.sql b/htdocs/install/mysql/tables/llx_budget.sql index d67e65e8f2b..ab9ed79a64a 100644 --- a/htdocs/install/mysql/tables/llx_budget.sql +++ b/htdocs/install/mysql/tables/llx_budget.sql @@ -26,7 +26,7 @@ create table llx_budget date_start date, date_end date, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer diff --git a/htdocs/install/mysql/tables/llx_budget_lines.sql b/htdocs/install/mysql/tables/llx_budget_lines.sql index 1397b604316..ffdf33aa38f 100644 --- a/htdocs/install/mysql/tables/llx_budget_lines.sql +++ b/htdocs/install/mysql/tables/llx_budget_lines.sql @@ -23,7 +23,7 @@ create table llx_budget_lines fk_project_ids varchar(180) NOT NULL, -- 'IDS:x,y' = List of project ids related to this budget. If budget is dedicated to projects not yet started, we recommand to create a project 'Projects to come'. 'FILTER:ref=*ABC' or 'FILTER:categid=123' = Can also be a dynamic rule to select projects. amount double(24,8) NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer diff --git a/htdocs/install/mysql/tables/llx_c_action_trigger.sql b/htdocs/install/mysql/tables/llx_c_action_trigger.sql index c29f13b9fd4..8f7450d0fe9 100644 --- a/htdocs/install/mysql/tables/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/tables/llx_c_action_trigger.sql @@ -23,7 +23,7 @@ create table llx_c_action_trigger ( rowid integer AUTO_INCREMENT PRIMARY KEY, elementtype varchar(64) NOT NULL, - code varchar(32) NOT NULL, + code varchar(64) NOT NULL, label varchar(128) NOT NULL, description varchar(255), rang integer DEFAULT 0 diff --git a/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql b/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql index cd81eb4c42a..8b99059acdd 100644 --- a/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql +++ b/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql @@ -23,7 +23,7 @@ create table llx_c_email_senderprofile entity integer DEFAULT 1 NOT NULL, -- multi company id private smallint DEFAULT 0 NOT NULL, -- Template public (0) or private (id of user) date_creation datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(255), -- Label of predefined email email varchar(255) NOT NULL, -- Email signature text, -- Predefined signature diff --git a/htdocs/install/mysql/tables/llx_c_email_templates.sql b/htdocs/install/mysql/tables/llx_c_email_templates.sql index 3fd97fb2804..04130a208fe 100644 --- a/htdocs/install/mysql/tables/llx_c_email_templates.sql +++ b/htdocs/install/mysql/tables/llx_c_email_templates.sql @@ -27,7 +27,7 @@ create table llx_c_email_templates private smallint DEFAULT 0 NOT NULL, -- Template public or private fk_user integer, -- Id user owner if template is private, or null datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(180), -- Label of predefined email position smallint, -- Position enabled varchar(255) DEFAULT '1', -- Condition to have this module visible diff --git a/htdocs/install/mysql/tables/llx_c_field_list.sql b/htdocs/install/mysql/tables/llx_c_field_list.sql index c99bfe91690..9177228b363 100644 --- a/htdocs/install/mysql/tables/llx_c_field_list.sql +++ b/htdocs/install/mysql/tables/llx_c_field_list.sql @@ -24,7 +24,7 @@ create table llx_c_field_list ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, element varchar(64) NOT NULL, -- name of element list entity integer DEFAULT 1 NOT NULL, -- entity id name varchar(32) NOT NULL, -- name of field with table alias (ex: p.ref) diff --git a/htdocs/install/mysql/tables/llx_c_incoterms.sql b/htdocs/install/mysql/tables/llx_c_incoterms.sql index 5b4dc3f60e2..aa690d6ce07 100644 --- a/htdocs/install/mysql/tables/llx_c_incoterms.sql +++ b/htdocs/install/mysql/tables/llx_c_incoterms.sql @@ -1,5 +1,6 @@ -- ======================================================================== -- Copyright (C) 2015 Laurent Destailleur +-- Copyright (C) 2020 Udo Tamm -- -- 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 @@ -19,6 +20,7 @@ CREATE TABLE llx_c_incoterms ( rowid integer AUTO_INCREMENT PRIMARY KEY, code varchar(3) NOT NULL, + label varchar(100), libelle varchar(255) NOT NULL, active tinyint DEFAULT 1 NOT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_prospectcontactlevel.sql b/htdocs/install/mysql/tables/llx_c_prospectcontactlevel.sql new file mode 100644 index 00000000000..421b3452371 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_prospectcontactlevel.sql @@ -0,0 +1,27 @@ +-- =================================================================== +-- Copyright (C) 2020 Open-Dsi +-- +-- 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 . +-- +-- =================================================================== + +create table llx_c_prospectcontactlevel +( + code varchar(12) PRIMARY KEY, + label varchar(30), + sortorder smallint, + active smallint DEFAULT 1 NOT NULL, + module varchar(32) NULL +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_c_recruitment_origin.sql b/htdocs/install/mysql/tables/llx_c_recruitment_origin.sql new file mode 100644 index 00000000000..b18f7eb383c --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_recruitment_origin.sql @@ -0,0 +1,33 @@ +-- ======================================================================== +-- Copyright (C) 2005-2016 Laurent Destailleur +-- +-- 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 . +-- +-- Defini les types de contact d'un element sert de reference pour +-- la table llx_element_contact +-- +-- element est le nom de la table utilisant le type de contact. +-- i.e. contact, facture, projet, societe (sans le llx_ devant). +-- Libelle est un texte decrivant le type de contact. +-- active precise si cette valeur est 'active' ou 'archive'. +-- +-- ======================================================================== + +create table llx_c_recruitment_origin +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + code varchar(32) NOT NULL, + label varchar(64) NOT NULL, + active tinyint DEFAULT 1 NOT NULL +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql index 9adc6b3cb0c..6f49f682f24 100644 --- a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql @@ -20,7 +20,7 @@ create table llx_c_shipment_mode ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, code varchar(30) NOT NULL, libelle varchar(50) NOT NULL, description text, diff --git a/htdocs/install/mysql/tables/llx_c_stcommcontact.key.sql b/htdocs/install/mysql/tables/llx_c_stcommcontact.key.sql new file mode 100644 index 00000000000..12402658a65 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_stcommcontact.key.sql @@ -0,0 +1,19 @@ +-- ======================================================================== +-- Copyright (C) 2020 Open-Dsi +-- +-- 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 . +-- +-- ======================================================================== + +ALTER TABLE llx_c_stcommcontact ADD UNIQUE INDEX uk_c_stcommcontact(code); diff --git a/htdocs/install/mysql/tables/llx_c_stcommcontact.sql b/htdocs/install/mysql/tables/llx_c_stcommcontact.sql new file mode 100644 index 00000000000..c906e4f5103 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_c_stcommcontact.sql @@ -0,0 +1,27 @@ +-- ======================================================================== +-- Copyright (C) 2020 Open-Dsi +-- +-- 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 . +-- +-- ======================================================================== + +create table llx_c_stcommcontact +( + id integer PRIMARY KEY, + code varchar(12) NOT NULL, + libelle varchar(30), + picto varchar(128), + active tinyint default 1 NOT NULL +)ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_c_ticket_category.sql b/htdocs/install/mysql/tables/llx_c_ticket_category.sql index 2ccfe4d0758..58126633ce1 100644 --- a/htdocs/install/mysql/tables/llx_c_ticket_category.sql +++ b/htdocs/install/mysql/tables/llx_c_ticket_category.sql @@ -17,12 +17,14 @@ create table llx_c_ticket_category ( - rowid integer AUTO_INCREMENT PRIMARY KEY, - entity integer DEFAULT 1, - code varchar(32) NOT NULL, - pos varchar(32) NOT NULL, - label varchar(128) NOT NULL, - active integer DEFAULT 1, - use_default integer DEFAULT 1, - description varchar(255) + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1, + code varchar(32) NOT NULL, + pos varchar(32) NOT NULL, + label varchar(128) NOT NULL, + active integer DEFAULT 1, + use_default integer DEFAULT 1, + fk_parent integer DEFAULT 0 NOT NULL, -- Parent group + force_severity varchar(32) NULL, -- To force the severity if we choosed this category + description varchar(255) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_categorie.sql b/htdocs/install/mysql/tables/llx_categorie.sql index cf1df953ba5..29cb5a260e6 100644 --- a/htdocs/install/mysql/tables/llx_categorie.sql +++ b/htdocs/install/mysql/tables/llx_categorie.sql @@ -32,7 +32,7 @@ create table llx_categorie fk_soc integer DEFAULT NULL, -- not used by default. Used when option CATEGORY_ASSIGNED_TO_A_CUSTOMER is set. visible tinyint DEFAULT 1 NOT NULL, -- determine if the products are visible or not date_creation datetime, -- date creation - tms timestamp, -- date modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date fk_user_creat integer, -- user making creation fk_user_modif integer, -- user making last change import_key varchar(14) -- Import key diff --git a/htdocs/install/mysql/tables/llx_categories_extrafields.sql b/htdocs/install/mysql/tables/llx_categories_extrafields.sql index 8a2a82f7382..82c52f1b7ee 100644 --- a/htdocs/install/mysql/tables/llx_categories_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_categories_extrafields.sql @@ -19,7 +19,7 @@ create table llx_categories_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_chargesociales.sql b/htdocs/install/mysql/tables/llx_chargesociales.sql index 57434c93d98..db9e82ac779 100644 --- a/htdocs/install/mysql/tables/llx_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_chargesociales.sql @@ -25,7 +25,7 @@ create table llx_chargesociales date_ech datetime NOT NULL, -- date echeance libelle varchar(80) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime, -- date de creation date_valid datetime, -- date de validation fk_user_author integer, -- user making creation diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index 676e768c73b..add836ce5d5 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -32,7 +32,7 @@ create table llx_commande fk_soc integer NOT NULL, fk_projet integer DEFAULT NULL, -- projet auquel est rattache la commande - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime, -- date de creation date_valid datetime, -- date de validation date_cloture datetime, -- date de cloture @@ -64,8 +64,8 @@ create table llx_commande fk_currency varchar(3), -- currency code fk_cond_reglement integer, -- condition de reglement fk_mode_reglement integer, -- mode de reglement - - date_livraison date default NULL, + + date_livraison datetime default NULL, fk_shipping_method integer, -- shipping method id fk_warehouse integer default NULL, fk_availability integer NULL, diff --git a/htdocs/install/mysql/tables/llx_commande_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_extrafields.sql index e6f3f768489..922bcd820a1 100644 --- a/htdocs/install/mysql/tables/llx_commande_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_extrafields.sql @@ -19,7 +19,7 @@ create table llx_commande_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql index bc5cadea228..a9f155a2abb 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql @@ -32,7 +32,7 @@ create table llx_commande_fournisseur fk_soc integer NOT NULL, fk_projet integer DEFAULT 0, -- project id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, date_creation datetime, -- date de creation date_valid datetime, -- date de validation date_approve datetime, -- date de approve diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql index 22a0e241dd6..b5f85fea250 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql @@ -36,5 +36,5 @@ create table llx_commande_fournisseur_dispatch sellby date DEFAULT NULL, status integer, datec datetime, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql index c30cc1c75dd..2c85521ea84 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql @@ -19,7 +19,7 @@ create table llx_commande_fournisseur_dispatch_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql index 6f72a447f10..40c5785dbad 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql @@ -23,7 +23,7 @@ create table llx_commande_fournisseur_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql index 4c576f16f51..c75e9718526 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql @@ -20,7 +20,7 @@ create table llx_commande_fournisseur_log ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datelog datetime NOT NULL, fk_commande integer NOT NULL, fk_statut smallint NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql index 189b4d7d593..cc22da09720 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql @@ -24,7 +24,7 @@ create table llx_commande_fournisseurdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_commandedet.sql b/htdocs/install/mysql/tables/llx_commandedet.sql index 615ec8f269c..c7b94a46add 100644 --- a/htdocs/install/mysql/tables/llx_commandedet.sql +++ b/htdocs/install/mysql/tables/llx_commandedet.sql @@ -57,6 +57,7 @@ create table llx_commandedet rang integer DEFAULT 0, fk_unit integer DEFAULT NULL, -- lien vers table des unités import_key varchar(14), + ref_ext varchar(255) DEFAULT NULL, fk_commandefourndet integer DEFAULT NULL, -- link to detail line of commande fourn (resplenish) diff --git a/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql b/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql index 37b7dd6a349..331a3fbe54a 100644 --- a/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_commandedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_comment.sql b/htdocs/install/mysql/tables/llx_comment.sql index 22b2c40b9f1..3e839d83b4c 100644 --- a/htdocs/install/mysql/tables/llx_comment.sql +++ b/htdocs/install/mysql/tables/llx_comment.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_comment ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, description text NOT NULL, fk_user_author integer DEFAULT NULL, fk_user_modif integer DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_const.sql b/htdocs/install/mysql/tables/llx_const.sql index fcca5f57023..96594bb60b4 100644 --- a/htdocs/install/mysql/tables/llx_const.sql +++ b/htdocs/install/mysql/tables/llx_const.sql @@ -32,7 +32,7 @@ create table llx_const type varchar(64) DEFAULT 'string', -- null or 'encrypted' if param has been encrypted visible tinyint DEFAULT 1 NOT NULL, note text, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; -- diff --git a/htdocs/install/mysql/tables/llx_contrat.sql b/htdocs/install/mysql/tables/llx_contrat.sql index fbb36a5674b..dcdc1288d37 100644 --- a/htdocs/install/mysql/tables/llx_contrat.sql +++ b/htdocs/install/mysql/tables/llx_contrat.sql @@ -26,7 +26,7 @@ create table llx_contrat ref_supplier varchar(255), -- supplier contract ref ref_ext varchar(255), -- external contract ref entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date date_contrat datetime, statut smallint DEFAULT 0, -- not used. deprecated diff --git a/htdocs/install/mysql/tables/llx_contrat_extrafields.sql b/htdocs/install/mysql/tables/llx_contrat_extrafields.sql index 7ab3dfbbdc9..f93ab94d4ca 100644 --- a/htdocs/install/mysql/tables/llx_contrat_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_contrat_extrafields.sql @@ -19,7 +19,7 @@ create table llx_contrat_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_contratdet.sql b/htdocs/install/mysql/tables/llx_contratdet.sql index 4705bbab218..933fc50ec54 100644 --- a/htdocs/install/mysql/tables/llx_contratdet.sql +++ b/htdocs/install/mysql/tables/llx_contratdet.sql @@ -20,7 +20,7 @@ create table llx_contratdet ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_contrat integer NOT NULL, fk_product integer NULL, -- doit pouvoir etre nul pour ligne detail sans produits diff --git a/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql index 8933fa66e16..ccd0846e81e 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_contratdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_contratdet_log.sql b/htdocs/install/mysql/tables/llx_contratdet_log.sql index b13791f4832..f52ced561c7 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_log.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_log.sql @@ -19,7 +19,7 @@ create table llx_contratdet_log ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_contratdet integer NOT NULL, date datetime NOT NULL, statut smallint NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql index 97057e6f41e..a9aa8960991 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_cronjob ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, jobtype varchar(10) NOT NULL, label text NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_deplacement.sql b/htdocs/install/mysql/tables/llx_deplacement.sql index 8b9fa2a04ae..50bfe8d7cfd 100644 --- a/htdocs/install/mysql/tables/llx_deplacement.sql +++ b/htdocs/install/mysql/tables/llx_deplacement.sql @@ -24,7 +24,7 @@ create table llx_deplacement ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL) entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dated datetime, fk_user integer NOT NULL, fk_user_author integer, diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index f03e82d6143..95181a3b30e 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -25,7 +25,7 @@ create table llx_don rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30) DEFAULT NULL, -- Ref donation (TODO change to NOT NULL) entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_statut smallint NOT NULL DEFAULT 0, -- Status of donation promise or validate datedon datetime, -- Date of the donation/promise amount double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.sql b/htdocs/install/mysql/tables/llx_don_extrafields.sql index bf2b780fcee..a4a560d0f8a 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.sql @@ -19,7 +19,7 @@ create table llx_don_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ecm_directories.sql b/htdocs/install/mysql/tables/llx_ecm_directories.sql index 1fa1467e296..a02a72118b2 100644 --- a/htdocs/install/mysql/tables/llx_ecm_directories.sql +++ b/htdocs/install/mysql/tables/llx_ecm_directories.sql @@ -30,7 +30,7 @@ CREATE TABLE llx_ecm_directories fullpath varchar(750), extraparams varchar(255), -- for stock other parameters with json format date_c datetime, - date_m timestamp, + date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, acl text diff --git a/htdocs/install/mysql/tables/llx_ecm_directories_extrafields.key.sql b/htdocs/install/mysql/tables/llx_ecm_directories_extrafields.key.sql new file mode 100644 index 00000000000..a84fa2c845c --- /dev/null +++ b/htdocs/install/mysql/tables/llx_ecm_directories_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2020 Frédéric France +-- +-- 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 . +-- +-- =================================================================== + + +ALTER TABLE llx_ecm_directories_extrafields ADD INDEX idx_ecm_directories_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_ecm_directories_extrafileds.sql b/htdocs/install/mysql/tables/llx_ecm_directories_extrafileds.sql new file mode 100644 index 00000000000..8bb7d98c592 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_ecm_directories_extrafileds.sql @@ -0,0 +1,26 @@ +-- ======================================================================== +-- Copyright (C) 2020 Frédéric France +-- +-- 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 . +-- +-- ======================================================================== + +CREATE TABLE llx_ecm_directories_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_ecm_files.sql b/htdocs/install/mysql/tables/llx_ecm_files.sql index c459e2ca219..52521e2af3e 100644 --- a/htdocs/install/mysql/tables/llx_ecm_files.sql +++ b/htdocs/install/mysql/tables/llx_ecm_files.sql @@ -35,7 +35,7 @@ CREATE TABLE llx_ecm_files gen_or_uploaded varchar(12), -- 'generated' or 'uploaded' extraparams varchar(255), -- for stocking other parameters with json format date_c datetime, - date_m timestamp, + date_m timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_c integer, fk_user_m integer, acl text -- for future permission 'per file' diff --git a/htdocs/install/mysql/tables/llx_ecm_files_extrafields.key.sql b/htdocs/install/mysql/tables/llx_ecm_files_extrafields.key.sql new file mode 100644 index 00000000000..3ebd3712184 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_ecm_files_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2020 Frédéric France +-- +-- 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 . +-- +-- =================================================================== + + +ALTER TABLE llx_ecm_files_extrafields ADD INDEX idx_ecm_files_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_ecm_files_extrafields.sql b/htdocs/install/mysql/tables/llx_ecm_files_extrafields.sql new file mode 100644 index 00000000000..485db3a0f72 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_ecm_files_extrafields.sql @@ -0,0 +1,26 @@ +-- ======================================================================== +-- Copyright (C) 2020 Frédéric France +-- +-- 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 . +-- +-- ======================================================================== + +CREATE TABLE llx_ecm_files_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_element_resources.sql b/htdocs/install/mysql/tables/llx_element_resources.sql index 95ee9b5a751..693a2f990f0 100644 --- a/htdocs/install/mysql/tables/llx_element_resources.sql +++ b/htdocs/install/mysql/tables/llx_element_resources.sql @@ -28,5 +28,5 @@ CREATE TABLE llx_element_resources mandatory integer, duree real, -- total duration of using ressource fk_user_create integer, - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index 87581f418e8..389093241ce 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -35,7 +35,7 @@ CREATE TABLE llx_emailcollector_emailcollector( note_public text, note_private text, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql index 226f74ce884..c45a3dcd1c4 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_emailcollector_emailcollectoraction( type varchar(128) NOT NULL, actionparam varchar(255) NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, position integer DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql index 5f49227f655..4e708116e21 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql @@ -21,7 +21,7 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter( type varchar(128) NOT NULL, rulevalue varchar(128) NULL, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_entrepot.sql b/htdocs/install/mysql/tables/llx_entrepot.sql index 2cabb457016..2a390f008e2 100644 --- a/htdocs/install/mysql/tables/llx_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_entrepot.sql @@ -23,7 +23,7 @@ create table llx_entrepot rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(255) NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, entity integer DEFAULT 1 NOT NULL, -- multi company id description text, lieu varchar(64), -- resume lieu situation diff --git a/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql b/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql index 9fa75455f19..95a78b4ce6c 100644 --- a/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql @@ -19,7 +19,7 @@ create table llx_entrepot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql index 83cfadb7307..7159a53059c 100644 --- a/htdocs/install/mysql/tables/llx_establishment.sql +++ b/htdocs/install/mysql/tables/llx_establishment.sql @@ -22,7 +22,8 @@ CREATE TABLE llx_establishment ( rowid integer NOT NULL auto_increment PRIMARY KEY, entity integer NOT NULL DEFAULT 1, - name varchar(50), + ref varchar(30), + name varchar(128), address varchar(255), zip varchar(25), town varchar(50), @@ -35,7 +36,7 @@ CREATE TABLE llx_establishment ( fk_user_author integer NOT NULL, fk_user_mod integer, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL, status tinyint DEFAULT 1 ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_events.sql b/htdocs/install/mysql/tables/llx_events.sql index c3ae55f47e2..ffa4f1029e7 100644 --- a/htdocs/install/mysql/tables/llx_events.sql +++ b/htdocs/install/mysql/tables/llx_events.sql @@ -24,7 +24,7 @@ create table llx_events ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, -- date creation/modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date type varchar(32) NOT NULL, -- action type entity integer DEFAULT 1 NOT NULL, -- multi company id prefix_session varchar(255) NULL, -- prefix of session, obtained with dol_getprefix diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index e4c216f3da4..4214fef7f44 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -22,7 +22,7 @@ create table llx_expedition ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_expedition_extrafields.sql b/htdocs/install/mysql/tables/llx_expedition_extrafields.sql index af4228efb41..6b9721a2826 100644 --- a/htdocs/install/mysql/tables/llx_expedition_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expedition_extrafields.sql @@ -19,7 +19,7 @@ create table llx_expedition_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql index 112e41e9578..a71b45946a1 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_expeditiondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expensereport.sql b/htdocs/install/mysql/tables/llx_expensereport.sql index a212bc55273..1f13a5a90b5 100644 --- a/htdocs/install/mysql/tables/llx_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_expensereport.sql @@ -34,7 +34,7 @@ CREATE TABLE llx_expensereport ( date_approve datetime, date_refuse datetime, date_cancel datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_author integer NOT NULL, -- not the user author but the user the expense report is for fk_user_modif integer DEFAULT NULL, fk_user_valid integer DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql b/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql index 8b6ad4e998f..1e78afb8513 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql @@ -19,7 +19,7 @@ create table llx_expensereport_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expensereport_ik.sql b/htdocs/install/mysql/tables/llx_expensereport_ik.sql index 3e767a8c396..839fbac8e9a 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_ik.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_ik.sql @@ -21,10 +21,10 @@ CREATE TABLE IF NOT EXISTS llx_expensereport_ik ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_c_exp_tax_cat integer DEFAULT 0 NOT NULL, fk_range integer DEFAULT 0 NOT NULL, coef double DEFAULT 0 NOT NULL, - ikoffset double DEFAULT 0 NOT NULL, + ikoffset double DEFAULT 0 NOT NULL, active integer DEFAULT 1 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expensereport_rules.sql b/htdocs/install/mysql/tables/llx_expensereport_rules.sql index 2a10cc24a7d..ae8f9b09496 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_rules.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_rules.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_expensereport_rules ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dates datetime NOT NULL, datee datetime NOT NULL, amount double(24,8) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql index 3578414d98b..1ade8502bf5 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.sql @@ -43,5 +43,5 @@ create table llx_extrafields fk_user_author integer, -- user making creation fk_user_modif integer, -- user making last change datec datetime, -- date de creation - tms timestamp -- date of last update + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP -- last modification date )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index 429095e1111..82319a4beef 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -39,7 +39,7 @@ create table llx_facture datef date, -- date invoice date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation - tms timestamp, -- date creation/modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date date_closing datetime, -- date de cloture paye smallint DEFAULT 0 NOT NULL, --amount double(24,8) DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_extrafields.sql index 4f7b902c97f..bc826d72ce4 100644 --- a/htdocs/install/mysql/tables/llx_facture_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index 78b06370d8d..1d5fdcf13bf 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -35,7 +35,7 @@ create table llx_facture_fourn datef date, -- date de la facture date_pointoftax date DEFAULT NULL, -- date point of tax (for GB) date_valid date, -- date validation - tms timestamp, -- date creation/modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date libelle varchar(255), paye smallint DEFAULT 0 NOT NULL, amount double(24,8) DEFAULT 0 NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql index 7be8ff1c552..7fca2588bdf 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_fourn_det_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql index 8fb018cbfcc..48556ec6d33 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_fourn_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index 220c1fa608a..0db78d62252 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -26,7 +26,7 @@ create table llx_facture_rec entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, datec datetime, -- date de creation - tms timestamp, -- date creation/modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date suspended integer DEFAULT 0, -- 1=suspended diff --git a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql index 6895a7e2291..8a51efb2914 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facture_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facturedet.sql b/htdocs/install/mysql/tables/llx_facturedet.sql index ff2b28d9a7f..73e64fa1c6a 100644 --- a/htdocs/install/mysql/tables/llx_facturedet.sql +++ b/htdocs/install/mysql/tables/llx_facturedet.sql @@ -74,12 +74,7 @@ create table llx_facturedet multicurrency_subprice double(24,8) DEFAULT 0, multicurrency_total_ht double(24,8) DEFAULT 0, multicurrency_total_tva double(24,8) DEFAULT 0, - multicurrency_total_ttc double(24,8) DEFAULT 0 + multicurrency_total_ttc double(24,8) DEFAULT 0, + ref_ext varchar(255) DEFAULT NULL )ENGINE=innodb; --- --- List of codes for special_code --- --- 1 : frais de port --- 2 : ecotaxe --- diff --git a/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql b/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql index 693abf00001..99f0b87a943 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facturedet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql index da2314ecffb..c220a7e0f0f 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql @@ -19,7 +19,7 @@ create table llx_facturedet_rec_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_fichinter.sql b/htdocs/install/mysql/tables/llx_fichinter.sql index e2508c372ca..7c1ef4cf184 100644 --- a/htdocs/install/mysql/tables/llx_fichinter.sql +++ b/htdocs/install/mysql/tables/llx_fichinter.sql @@ -26,7 +26,7 @@ create table llx_fichinter ref varchar(30) NOT NULL, -- number ref_ext varchar(255), entity integer DEFAULT 1 NOT NULL, -- multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- date de creation date_valid datetime, -- date de validation datei date, -- date de livraison du bon d'intervention diff --git a/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql b/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql index 13c7dd15dab..c866669d667 100644 --- a/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql @@ -19,7 +19,7 @@ create table llx_fichinter_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql index 65584c02201..f2ced33ec0d 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_fichinterdet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_holiday.sql b/htdocs/install/mysql/tables/llx_holiday.sql index e8116c477a8..3cd5727d867 100644 --- a/htdocs/install/mysql/tables/llx_holiday.sql +++ b/htdocs/install/mysql/tables/llx_holiday.sql @@ -42,7 +42,7 @@ fk_user_cancel integer DEFAULT NULL, detail_refuse varchar( 250 ) DEFAULT NULL, note_private text, note_public text, -tms timestamp, +tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14), extraparams varchar(255) -- for other parameters with json format ) diff --git a/htdocs/install/mysql/tables/llx_holiday_extrafields.sql b/htdocs/install/mysql/tables/llx_holiday_extrafields.sql index 29881bbb0cb..8b6e3ef8dc9 100644 --- a/htdocs/install/mysql/tables/llx_holiday_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_holiday_extrafields.sql @@ -19,7 +19,7 @@ create table llx_holiday_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_inventory.sql b/htdocs/install/mysql/tables/llx_inventory.sql index 4ccb234e26e..aa35ebb0c42 100644 --- a/htdocs/install/mysql/tables/llx_inventory.sql +++ b/htdocs/install/mysql/tables/llx_inventory.sql @@ -23,7 +23,7 @@ CREATE TABLE llx_inventory entity integer DEFAULT 0, ref varchar(48), date_creation datetime DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, -- user making creation fk_user_modif integer, -- user making last change fk_user_valid integer, -- valideur de la fiche diff --git a/htdocs/install/mysql/tables/llx_inventorydet.key.sql b/htdocs/install/mysql/tables/llx_inventorydet.key.sql index 44890608b7e..cfe82448fd6 100644 --- a/htdocs/install/mysql/tables/llx_inventorydet.key.sql +++ b/htdocs/install/mysql/tables/llx_inventorydet.key.sql @@ -20,3 +20,6 @@ ALTER TABLE llx_inventorydet ADD INDEX idx_inventorydet_tms (tms); ALTER TABLE llx_inventorydet ADD INDEX idx_inventorydet_datec (datec); ALTER TABLE llx_inventorydet ADD INDEX idx_inventorydet_fk_inventory (fk_inventory); + +ALTER TABLE llx_inventorydet ADD UNIQUE uk_inventorydet(fk_inventory, fk_warehouse, fk_product, batch); + diff --git a/htdocs/install/mysql/tables/llx_inventorydet.sql b/htdocs/install/mysql/tables/llx_inventorydet.sql index 161e34183a0..ce23fe0f749 100644 --- a/htdocs/install/mysql/tables/llx_inventorydet.sql +++ b/htdocs/install/mysql/tables/llx_inventorydet.sql @@ -19,15 +19,15 @@ CREATE TABLE llx_inventorydet ( -rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, -datec datetime DEFAULT NULL, -tms timestamp, -fk_inventory integer DEFAULT 0, -fk_warehouse integer DEFAULT 0, -fk_product integer DEFAULT 0, -batch varchar(128) DEFAULT NULL, -- Lot or serial number -qty_stock double DEFAULT NULL, -- The targeted value. can be filled during draft edition -qty_view double DEFAULT NULL, -- must be filled once regulation is done -qty_regulated double DEFAULT NULL -- must be filled once regulation is done + rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, + datec datetime DEFAULT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_inventory integer DEFAULT 0, + fk_warehouse integer DEFAULT 0, + fk_product integer DEFAULT 0, + batch varchar(128) DEFAULT NULL, -- Lot or serial number + qty_stock double DEFAULT NULL, -- The targeted value. can be filled during draft edition + qty_view double DEFAULT NULL, -- must be filled once regulation is done + qty_regulated double DEFAULT NULL -- must be filled once regulation is done ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_livraison.sql b/htdocs/install/mysql/tables/llx_livraison.sql index 31af38edfb6..e58e8c3c0bd 100644 --- a/htdocs/install/mysql/tables/llx_livraison.sql +++ b/htdocs/install/mysql/tables/llx_livraison.sql @@ -20,7 +20,7 @@ create table llx_livraison ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, -- delivery number entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_livraison_extrafields.sql b/htdocs/install/mysql/tables/llx_livraison_extrafields.sql index 70248d0ceca..d1fc611bfdd 100644 --- a/htdocs/install/mysql/tables/llx_livraison_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_livraison_extrafields.sql @@ -19,7 +19,7 @@ create table llx_livraison_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql index cb6300a8ca1..667f66ae0a8 100644 --- a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_livraisondet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_loan.sql b/htdocs/install/mysql/tables/llx_loan.sql index a1a187b5ba4..f82597c71c5 100644 --- a/htdocs/install/mysql/tables/llx_loan.sql +++ b/htdocs/install/mysql/tables/llx_loan.sql @@ -22,7 +22,7 @@ create table llx_loan rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(80) NOT NULL, fk_bank integer, diff --git a/htdocs/install/mysql/tables/llx_loan_schedule.sql b/htdocs/install/mysql/tables/llx_loan_schedule.sql index 42592815526..dd68a426e61 100644 --- a/htdocs/install/mysql/tables/llx_loan_schedule.sql +++ b/htdocs/install/mysql/tables/llx_loan_schedule.sql @@ -22,7 +22,7 @@ create table llx_loan_schedule rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, -- creation date - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount_capital double(24,8) DEFAULT 0, amount_insurance double(24,8) DEFAULT 0, @@ -32,6 +32,7 @@ create table llx_loan_schedule note_private text, note_public text, fk_bank integer NOT NULL, + fk_payment_loan integer, fk_user_creat integer, -- creation user fk_user_modif integer -- last modification user )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_localtax.sql b/htdocs/install/mysql/tables/llx_localtax.sql index b7aa682567f..b883c710f7b 100644 --- a/htdocs/install/mysql/tables/llx_localtax.sql +++ b/htdocs/install/mysql/tables/llx_localtax.sql @@ -22,7 +22,7 @@ create table llx_localtax rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, localtaxtype tinyint, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep date, -- date of payment datev date, -- date of value amount double, diff --git a/htdocs/install/mysql/tables/llx_mailing.sql b/htdocs/install/mysql/tables/llx_mailing.sql index 8706159ad46..d9fc0832045 100644 --- a/htdocs/install/mysql/tables/llx_mailing.sql +++ b/htdocs/install/mysql/tables/llx_mailing.sql @@ -43,7 +43,7 @@ create table llx_mailing date_valid datetime, -- date_appro datetime, -- date_envoi datetime, -- date d'envoi - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, -- user creator fk_user_valid integer, -- user validator fk_user_appro integer, -- not used diff --git a/htdocs/install/mysql/tables/llx_mailing_cibles.sql b/htdocs/install/mysql/tables/llx_mailing_cibles.sql index b523c1d11eb..096142b10ad 100644 --- a/htdocs/install/mysql/tables/llx_mailing_cibles.sql +++ b/htdocs/install/mysql/tables/llx_mailing_cibles.sql @@ -34,6 +34,6 @@ create table llx_mailing_cibles source_id integer, source_type varchar(16), date_envoi datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, error_text varchar(255) -- text with error if statut is -1 )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql index 00424256957..543015f5829 100644 --- a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql +++ b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql @@ -26,5 +26,5 @@ create table llx_mailing_unsubscribe unsubscribegroup varchar(128) DEFAULT '', ip varchar(128), date_creat datetime, -- creation date - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index cb279cb5c56..9cff110981a 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -39,8 +39,8 @@ CREATE TABLE llx_menu langs varchar(100), -- Lang file to load for translation level smallint, -- Deprecated. Not used. perms text, -- Condition to show enabled or disabled - enabled varchar(255) NULL default '1', -- Condition to show or hide + enabled text NULL, -- Condition to show or hide usertype integer NOT NULL DEFAULT 0, -- 0 if menu for all users, 1 for external only, 2 for internal only - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mrp_mo.sql b/htdocs/install/mysql/tables/llx_mrp_mo.sql index d3aa294104b..de1933ccfed 100644 --- a/htdocs/install/mysql/tables/llx_mrp_mo.sql +++ b/htdocs/install/mysql/tables/llx_mrp_mo.sql @@ -27,7 +27,7 @@ CREATE TABLE llx_mrp_mo( note_private text, date_creation datetime NOT NULL, date_valid datetime NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, fk_user_valid integer, diff --git a/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql index 97eab584cc7..517c269cf0f 100644 --- a/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_mrp_mo_extrafields.sql @@ -16,7 +16,7 @@ create table llx_mrp_mo_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_mrp_production.sql b/htdocs/install/mysql/tables/llx_mrp_production.sql index 509d78a5c0e..bd0cd722f1a 100644 --- a/htdocs/install/mysql/tables/llx_mrp_production.sql +++ b/htdocs/install/mysql/tables/llx_mrp_production.sql @@ -28,7 +28,7 @@ CREATE TABLE llx_mrp_production( fk_mrp_production integer, -- if role = 'consumed', id of line with role 'toconsume', if role = 'produced' id of line with role 'toproduce' fk_stock_movement integer, -- id of stock movement when movements are validated date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14) diff --git a/htdocs/install/mysql/tables/llx_notify.sql b/htdocs/install/mysql/tables/llx_notify.sql index 3ec7d05268e..d2e3bf93076 100644 --- a/htdocs/install/mysql/tables/llx_notify.sql +++ b/htdocs/install/mysql/tables/llx_notify.sql @@ -22,7 +22,7 @@ create table llx_notify ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, daten datetime, -- date de la notification fk_action integer NOT NULL, fk_soc integer NULL, diff --git a/htdocs/install/mysql/tables/llx_notify_def.sql b/htdocs/install/mysql/tables/llx_notify_def.sql index bb516444b04..aed10027347 100644 --- a/htdocs/install/mysql/tables/llx_notify_def.sql +++ b/htdocs/install/mysql/tables/llx_notify_def.sql @@ -21,7 +21,7 @@ create table llx_notify_def ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec date, -- date de creation fk_action integer NOT NULL, fk_soc integer, diff --git a/htdocs/install/mysql/tables/llx_online_signatures.sql b/htdocs/install/mysql/tables/llx_online_signatures.sql index 312cde50671..fbba814dd4d 100644 --- a/htdocs/install/mysql/tables/llx_online_signatures.sql +++ b/htdocs/install/mysql/tables/llx_online_signatures.sql @@ -22,7 +22,7 @@ create table llx_onlinesignature object_type varchar(32) NOT NULL, object_id integer NOT NULL, datec datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, name varchar(255) NOT NULL, ip varchar(128), pathoffile varchar(255) diff --git a/htdocs/install/mysql/tables/llx_opensurvey_comments.sql b/htdocs/install/mysql/tables/llx_opensurvey_comments.sql index 3fcc5a0abf9..52d938b7c47 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_comments.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_comments.sql @@ -19,7 +19,7 @@ CREATE TABLE llx_opensurvey_comments ( id_comment INTEGER unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY, id_sondage CHAR(16) NOT NULL, comment text NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, usercomment text ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql index a2ddafa1b54..03ad9b35ec5 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql @@ -20,5 +20,5 @@ CREATE TABLE llx_opensurvey_user_studs ( nom VARCHAR(64) NOT NULL, id_sondage VARCHAR(16) NOT NULL, reponses VARCHAR(100) NOT NULL, -- Not used for 'F' surveys - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_paiement.sql b/htdocs/install/mysql/tables/llx_paiement.sql index d0cfd727d95..bbf7d52e6c7 100644 --- a/htdocs/install/mysql/tables/llx_paiement.sql +++ b/htdocs/install/mysql/tables/llx_paiement.sql @@ -22,9 +22,10 @@ create table llx_paiement ( rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30) NULL, -- payment reference number + ref_ext varchar(255) NULL, -- payment external reference entity integer DEFAULT 1 NOT NULL, -- Multi company id datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, -- amount paid in Dolibarr currency multicurrency_amount double(24,8) DEFAULT 0, -- amount paid in invoice currency @@ -37,5 +38,6 @@ create table llx_paiement fk_user_creat integer, -- utilisateur qui a cree l'info fk_user_modif integer, -- utilisateur qui a modifie l'info statut smallint DEFAULT 0 NOT NULL, -- Satut, 0 ou 1, 1 n'est plus supprimable - fk_export_compta integer DEFAULT 0 NOT NULL -- fk_export_compta 0 pas exporte + fk_export_compta integer DEFAULT 0 NOT NULL, -- fk_export_compta 0 pas exporte + pos_change double(24,8) DEFAULT 0 -- Excess received in TakePOS cash payment )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_paiementcharge.sql b/htdocs/install/mysql/tables/llx_paiementcharge.sql index b489588777a..640f5f0af54 100644 --- a/htdocs/install/mysql/tables/llx_paiementcharge.sql +++ b/htdocs/install/mysql/tables/llx_paiementcharge.sql @@ -21,7 +21,7 @@ create table llx_paiementcharge rowid integer AUTO_INCREMENT PRIMARY KEY, fk_charge integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepaiement integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_paiementfourn.sql b/htdocs/install/mysql/tables/llx_paiementfourn.sql index 519526f764a..04066435f20 100644 --- a/htdocs/install/mysql/tables/llx_paiementfourn.sql +++ b/htdocs/install/mysql/tables/llx_paiementfourn.sql @@ -22,7 +22,7 @@ create table llx_paiementfourn rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30), entity integer DEFAULT 1, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- date de creation de l'enregistrement datep datetime, -- date de paiement amount double(24,8) DEFAULT 0, -- montant diff --git a/htdocs/install/mysql/tables/llx_payment_donation.sql b/htdocs/install/mysql/tables/llx_payment_donation.sql index 6573bcb7119..088138bf96f 100644 --- a/htdocs/install/mysql/tables/llx_payment_donation.sql +++ b/htdocs/install/mysql/tables/llx_payment_donation.sql @@ -21,7 +21,7 @@ create table llx_payment_donation rowid integer AUTO_INCREMENT PRIMARY KEY, fk_donation integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepayment integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_payment_expensereport.sql b/htdocs/install/mysql/tables/llx_payment_expensereport.sql index 8a75bfcdbfd..a83c0c926a4 100644 --- a/htdocs/install/mysql/tables/llx_payment_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_payment_expensereport.sql @@ -21,7 +21,7 @@ create table llx_payment_expensereport rowid integer AUTO_INCREMENT PRIMARY KEY, fk_expensereport integer, datec datetime, -- date de creation - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount double(24,8) DEFAULT 0, fk_typepayment integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_payment_loan.sql b/htdocs/install/mysql/tables/llx_payment_loan.sql index a646ba1917b..0e080a1bdb7 100644 --- a/htdocs/install/mysql/tables/llx_payment_loan.sql +++ b/htdocs/install/mysql/tables/llx_payment_loan.sql @@ -22,7 +22,7 @@ create table llx_payment_loan rowid integer AUTO_INCREMENT PRIMARY KEY, fk_loan integer, datec datetime, -- creation date - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datep datetime, -- payment date amount_capital double(24,8) DEFAULT 0, amount_insurance double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_payment_salary.sql b/htdocs/install/mysql/tables/llx_payment_salary.sql index cc4aaf94ccb..d6ad2ffcfed 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.sql @@ -20,7 +20,7 @@ create table llx_payment_salary ( rowid integer AUTO_INCREMENT PRIMARY KEY, ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet) - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- Create date fk_user integer NOT NULL, datep date, -- payment date diff --git a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql index 3bfed602cff..5f15918ef18 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql @@ -19,7 +19,7 @@ create table llx_payment_salary_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- salary payment id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_payment_various.sql b/htdocs/install/mysql/tables/llx_payment_various.sql index 4b48c649578..17bbf7c7a16 100644 --- a/htdocs/install/mysql/tables/llx_payment_various.sql +++ b/htdocs/install/mysql/tables/llx_payment_various.sql @@ -22,7 +22,7 @@ create table llx_payment_various ref varchar(30) NULL, -- payment reference number (currently NULL because there is no numbering manager yet) num_payment varchar(50), -- num cheque or other label varchar(255), - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- Create date datep date, -- date de paiement datev date, -- date de valeur (this field should not be here, only into bank tables) diff --git a/htdocs/install/mysql/tables/llx_printing.sql b/htdocs/install/mysql/tables/llx_printing.sql index 0f0c7c71d1b..ecfe050240b 100644 --- a/htdocs/install/mysql/tables/llx_printing.sql +++ b/htdocs/install/mysql/tables/llx_printing.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_printing ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, printer_name text NOT NULL, printer_location text NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index b360b4d7f9d..bc583a76ce2 100644 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -30,7 +30,7 @@ create table llx_product ref_ext varchar(128), -- reference into an external system (not used by dolibarr) datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_parent integer DEFAULT 0, -- Not used. Used by external modules. Virtual product id label varchar(255) NOT NULL, @@ -39,6 +39,7 @@ create table llx_product note text, customcode varchar(32), -- Optionnal custom code fk_country integer DEFAULT NULL, -- Optionnal id of original country + fk_state integer DEFAULT NULL, -- Optionnal id of original state/province price double(24,8) DEFAULT 0, price_ttc double(24,8) DEFAULT 0, price_min double(24,8) DEFAULT 0, @@ -60,7 +61,7 @@ create table llx_product tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management) fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module) duration varchar(6), - seuil_stock_alerte integer DEFAULT NULL, + seuil_stock_alerte float DEFAULT NULL, url varchar(255), barcode varchar(180) DEFAULT NULL, -- barcode fk_barcode_type integer DEFAULT NULL, -- barcode type @@ -96,7 +97,7 @@ create table llx_product import_key varchar(14), -- Import key model_pdf varchar(255), -- model save dodument used fk_price_expression integer, -- Link to the rule for dynamic price calculation - desiredstock integer DEFAULT 0, + desiredstock float DEFAULT 0, fk_unit integer DEFAULT NULL, price_autogen tinyint DEFAULT 0, fk_project integer DEFAULT NULL -- Used when product was generated by a project or is specifif to a project diff --git a/htdocs/install/mysql/tables/llx_product_attribute.sql b/htdocs/install/mysql/tables/llx_product_attribute.sql index f7ebee3cc23..362c104b95c 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute.sql @@ -1,5 +1,6 @@ -- ============================================================================ -- Copyright (C) 2016 Marcos García +-- Copyright (C) 2020 Laurent Destailleur -- -- 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 @@ -14,12 +15,15 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -- +-- llx_product_attribute is table for labels of product variants attributes. For exemple: COLOR, SIZE, ... +-- The different possible values (for example BLUE, GREEN, ... for COLOR) are defined into llx_product_attribute_value. -- ============================================================================ CREATE TABLE llx_product_attribute ( rowid INT PRIMARY KEY NOT NULL AUTO_INCREMENT, ref VARCHAR(255) NOT NULL, + ref_ext VARCHAR(255) NULL, label VARCHAR(255) NOT NULL, rang INT DEFAULT 0 NOT NULL, entity INT DEFAULT 1 NOT NULL diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination.sql index 2e80a4b2af2..ce64eafde0e 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute_combination.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute_combination.sql @@ -1,5 +1,6 @@ -- ============================================================================ -- Copyright (C) 2016 Marcos García +-- Copyright (C) 2020 Laurent Destailleur -- -- 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 @@ -14,15 +15,17 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -- +-- Table to store links between a parent product and its variant products. -- ============================================================================ CREATE TABLE llx_product_attribute_combination ( rowid INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, - fk_product_parent INTEGER NOT NULL, - fk_product_child INTEGER NOT NULL, + fk_product_parent INTEGER NOT NULL, -- id of product id that is parent product + fk_product_child INTEGER NOT NULL, -- id of product id that is variant (child) product variation_price DOUBLE(24,8) NOT NULL, variation_price_percentage INTEGER NULL, variation_weight REAL NOT NULL, + variation_ref_ext VARCHAR(255) NULL, entity INTEGER DEFAULT 1 NOT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.key.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.key.sql new file mode 100644 index 00000000000..4c191193754 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.key.sql @@ -0,0 +1,21 @@ +-- ============================================================================ +-- Copyright (C) 2020 John BOTELLA +-- +-- 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 . +-- +-- ============================================================================ + + +ALTER TABLE llx_product_attribute_combination_price_level ADD UNIQUE( fk_product_attribute_combination, fk_price_level); + diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.sql new file mode 100644 index 00000000000..70086f82068 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.sql @@ -0,0 +1,27 @@ +-- ============================================================================ +-- Copyright (C) 2020 John BOTELLA +-- +-- 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 . +-- +-- ============================================================================ + +CREATE TABLE llx_product_attribute_combination_price_level +( + rowid INTEGER PRIMARY KEY NOT NULL AUTO_INCREMENT, + fk_product_attribute_combination INTEGER DEFAULT 1 NOT NULL, + fk_price_level INTEGER DEFAULT 1 NOT NULL, + variation_price DOUBLE(24,8) NOT NULL, + variation_price_percentage INTEGER NULL +)ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_product_attribute_value.sql b/htdocs/install/mysql/tables/llx_product_attribute_value.sql index c4e0ec91459..09e7d325d0d 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute_value.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute_value.sql @@ -15,6 +15,8 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see . -- +-- llx_product_attribute_value is table for different available values of a product variants attributes. +-- For example BLUE, GREEN, ... for the product attribute COLOR. -- ============================================================================ CREATE TABLE llx_product_attribute_value diff --git a/htdocs/install/mysql/tables/llx_product_batch.sql b/htdocs/install/mysql/tables/llx_product_batch.sql index 9b736278e3a..7300c49874f 100644 --- a/htdocs/install/mysql/tables/llx_product_batch.sql +++ b/htdocs/install/mysql/tables/llx_product_batch.sql @@ -20,7 +20,7 @@ CREATE TABLE llx_product_batch ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product_stock integer NOT NULL, eatby datetime DEFAULT NULL, -- deprecated. should not be used here but should be stored into a table llx_product_lot sellby datetime DEFAULT NULL, -- deprecated. should not be used here but should be stored into a table llx_product_lot diff --git a/htdocs/install/mysql/tables/llx_product_customer_price.sql b/htdocs/install/mysql/tables/llx_product_customer_price.sql index c7b6f1eb1a2..7cd481c3c75 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price.sql @@ -25,7 +25,7 @@ create table llx_product_customer_price rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_soc integer NOT NULL, price double(24,8) DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_product_extrafields.sql b/htdocs/install/mysql/tables/llx_product_extrafields.sql index b265340d11c..24e53d9bda6 100644 --- a/htdocs/install/mysql/tables/llx_product_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_extrafields.sql @@ -19,7 +19,7 @@ create table llx_product_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index 7e61a2df6b1..20d4db7492b 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -24,7 +24,7 @@ create table llx_product_fournisseur_price rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer, fk_soc integer, ref_fourn varchar(30), diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql index 51d5499e825..728915521a7 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price_extrafields.sql @@ -18,7 +18,7 @@ Create Table llx_product_fournisseur_price_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_product_lot.sql b/htdocs/install/mysql/tables/llx_product_lot.sql index 4d59a46c153..86cca7d0f04 100644 --- a/htdocs/install/mysql/tables/llx_product_lot.sql +++ b/htdocs/install/mysql/tables/llx_product_lot.sql @@ -25,7 +25,7 @@ CREATE TABLE llx_product_lot ( eatby date DEFAULT NULL, -- Eatby date sellby date DEFAULT NULL, -- Sellby date datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, import_key integer diff --git a/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql b/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql index b3843ed9ba6..8fbbbde1bc5 100644 --- a/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql @@ -19,7 +19,7 @@ create table llx_product_lot_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql index 75a5355afe7..ff862e427e0 100644 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -25,7 +25,7 @@ create table llx_product_price ( rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- Multi company id - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, date_price datetime NOT NULL, price_level smallint NULL DEFAULT 1, diff --git a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql index 7cb8b327b4d..dc3a21bfedb 100644 --- a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql +++ b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql @@ -40,6 +40,6 @@ create table llx_product_price_by_qty multicurrency_price double(24,8) DEFAULT NULL, multicurrency_price_ttc double(24,8) DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_stock.sql b/htdocs/install/mysql/tables/llx_product_stock.sql index 586c5b410c7..c5a2f4ad005 100644 --- a/htdocs/install/mysql/tables/llx_product_stock.sql +++ b/htdocs/install/mysql/tables/llx_product_stock.sql @@ -21,7 +21,7 @@ create table llx_product_stock ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_entrepot integer NOT NULL, reel real, -- physical stock diff --git a/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql b/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql index b5d69defd9e..d6d5e57e549 100644 --- a/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql @@ -21,11 +21,11 @@ create table llx_product_warehouse_properties ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_product integer NOT NULL, fk_entrepot integer NOT NULL, - seuil_stock_alerte integer DEFAULT '0', - desiredstock integer DEFAULT '0', + seuil_stock_alerte float DEFAULT '0', + desiredstock float DEFAULT '0', import_key varchar(14) -- Import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_projet.sql b/htdocs/install/mysql/tables/llx_projet.sql index 940ee03bea2..a36adb3a672 100644 --- a/htdocs/install/mysql/tables/llx_projet.sql +++ b/htdocs/install/mysql/tables/llx_projet.sql @@ -22,7 +22,7 @@ create table llx_projet rowid integer AUTO_INCREMENT PRIMARY KEY, fk_soc integer, datec datetime, -- date creation project - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, dateo date, -- date start project datee date, -- date end project ref varchar(50), @@ -39,6 +39,7 @@ create table llx_projet fk_user_close integer DEFAULT NULL, note_private text, note_public text, + email_msgid varchar(255), -- if project or lead is created by email collector, we store here MSG ID --budget_days real, -- budget in days is sum of field planned_workload of tasks opp_amount double(24,8), budget_amount double(24,8), diff --git a/htdocs/install/mysql/tables/llx_projet_extrafields.sql b/htdocs/install/mysql/tables/llx_projet_extrafields.sql index 8a96a715b05..0001d4e8876 100644 --- a/htdocs/install/mysql/tables/llx_projet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_projet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_projet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_projet_task.sql b/htdocs/install/mysql/tables/llx_projet_task.sql index cc1088cf7a7..01edb857738 100644 --- a/htdocs/install/mysql/tables/llx_projet_task.sql +++ b/htdocs/install/mysql/tables/llx_projet_task.sql @@ -25,7 +25,7 @@ create table llx_projet_task fk_projet integer NOT NULL, fk_task_parent integer DEFAULT 0 NOT NULL, datec datetime, -- date creation - tms timestamp, -- date creation/modification + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date dateo datetime, -- date start task datee datetime, -- date end task datev datetime, -- date validation diff --git a/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql b/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql index 256c9025dc0..bf3d25e6922 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql @@ -19,7 +19,7 @@ create table llx_projet_task_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.sql b/htdocs/install/mysql/tables/llx_projet_task_time.sql index e1c857af2c3..786d8907588 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_time.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_time.sql @@ -29,7 +29,7 @@ create table llx_projet_task_time invoice_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice id here invoice_line_id integer DEFAULT NULL, -- If we need to invoice each line of timespent, we can save invoice line id here import_key varchar(14), -- Import key - datec date, -- Date creation time - tms timestamp, -- Date update time + datec datetime, -- date creation time + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date note text -- A comment )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propal.sql b/htdocs/install/mysql/tables/llx_propal.sql index d21d9ef2d7e..662db791094 100644 --- a/htdocs/install/mysql/tables/llx_propal.sql +++ b/htdocs/install/mysql/tables/llx_propal.sql @@ -32,7 +32,7 @@ create table llx_propal fk_soc integer, fk_projet integer DEFAULT NULL, -- projet auquel est rattache la propale - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- date de creation datep date, -- date de la propal fin_validite datetime, -- date de fin de validite diff --git a/htdocs/install/mysql/tables/llx_propal_extrafields.sql b/htdocs/install/mysql/tables/llx_propal_extrafields.sql index f6ccb68b39b..31201e37b55 100644 --- a/htdocs/install/mysql/tables/llx_propal_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_propal_extrafields.sql @@ -19,7 +19,7 @@ create table llx_propal_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql index 0c636b2507c..b599702d560 100644 --- a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql +++ b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql @@ -22,7 +22,7 @@ CREATE TABLE llx_propal_merge_pdf_product ( fk_user_author integer DEFAULT NULL, fk_user_mod integer NOT NULL, datec datetime NOT NULL, - tms timestamp NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql b/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql index 74986b1c641..7235d65eccd 100644 --- a/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql @@ -19,7 +19,7 @@ create table llx_propaldet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- object id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_reception.sql b/htdocs/install/mysql/tables/llx_reception.sql index 05ed6ca4604..71cc000ffc1 100644 --- a/htdocs/install/mysql/tables/llx_reception.sql +++ b/htdocs/install/mysql/tables/llx_reception.sql @@ -22,7 +22,7 @@ create table llx_reception ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, ref varchar(30) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_reception_extrafields.sql b/htdocs/install/mysql/tables/llx_reception_extrafields.sql index e2f83794a0b..13d3be5fe77 100644 --- a/htdocs/install/mysql/tables/llx_reception_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_reception_extrafields.sql @@ -19,7 +19,7 @@ create table llx_reception_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.key.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.key.sql new file mode 100644 index 00000000000..eae967704b4 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.key.sql @@ -0,0 +1,27 @@ +-- Copyright (C) 2020 Laurent Destailleur +-- +-- 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 https://www.gnu.org/licenses/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_rowid (rowid); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_ref (ref); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_recruitment_recruitmentcandidature_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_status (status); +-- END MODULEBUILDER INDEXES + +ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid); + +-- ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_mymodule_myobject_fk_field FOREIGN KEY (fk_field) REFERENCES llx_mymodule_myotherobject(rowid); + diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql new file mode 100644 index 00000000000..ded61d49e8b --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql @@ -0,0 +1,43 @@ +-- Copyright (C) 2020 Laurent Destailleur +-- +-- 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 https://www.gnu.org/licenses/. + + +CREATE TABLE llx_recruitment_recruitmentcandidature( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + entity integer NOT NULL DEFAULT 1, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + fk_recruitmentjobposition INTEGER NULL, + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + import_key varchar(14), + model_pdf varchar(255), + status smallint NOT NULL, + firstname varchar(128), + lastname varchar(128), + email varchar(255), + phone varchar(64), + date_birth date, + remuneration_requested integer, + remuneration_proposed integer, + email_msgid varchar(255), + fk_recruitment_origin INTEGER NULL + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.key.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.key.sql new file mode 100644 index 00000000000..72a90391471 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.key.sql @@ -0,0 +1,19 @@ +-- Copyright (C) 2020 Laurent Destailleur +-- +-- 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 https://www.gnu.org/licenses/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_recruitment_recruitmentcandidature_extrafields ADD INDEX idx_recruitmentcandidature_fk_object(fk_object); +-- END MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.sql new file mode 100644 index 00000000000..77cf71b9b00 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature_extrafields.sql @@ -0,0 +1,23 @@ +-- Copyright (C) 2020 Laurent Destailleur +-- +-- 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 https://www.gnu.org/licenses/. + +create table llx_recruitment_recruitmentcandidature_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.key.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.key.sql new file mode 100644 index 00000000000..32f6701a6a2 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.key.sql @@ -0,0 +1,32 @@ +-- Copyright (C) ---Put here your own copyright and developer email--- +-- +-- 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 https://www.gnu.org/licenses/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_rowid (rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_ref (ref); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_soc (fk_soc); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_fk_project (fk_project); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_recruiter FOREIGN KEY (fk_user_recruiter) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_supervisor FOREIGN KEY (fk_user_supervisor) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_establishment FOREIGN KEY (fk_establishment) REFERENCES llx_establishment(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid); +ALTER TABLE llx_recruitment_recruitmentjobposition ADD INDEX idx_recruitment_recruitmentjobposition_status (status); +-- END MODULEBUILDER INDEXES + +--ALTER TABLE llx_recruitment_recruitmentjobposition ADD UNIQUE INDEX uk_recruitment_recruitmentjobposition_fieldxy(fieldx, fieldy); + +--ALTER TABLE llx_recruitment_recruitmentjobposition ADD CONSTRAINT llx_recruitment_recruitmentjobposition_fk_field FOREIGN KEY (fk_field) REFERENCES llx_recruitment_myotherobject(rowid); + diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.sql new file mode 100644 index 00000000000..4ad1198d808 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition.sql @@ -0,0 +1,44 @@ +-- Copyright (C) ---Put here your own copyright and developer email--- +-- +-- 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 https://www.gnu.org/licenses/. + + +CREATE TABLE llx_recruitment_recruitmentjobposition( + -- BEGIN MODULEBUILDER FIELDS + rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, + ref varchar(128) DEFAULT '(PROV)' NOT NULL, + entity INTEGER DEFAULT 1 NOT NULL, + label varchar(255) NOT NULL, + qty integer DEFAULT 1 NOT NULL, + fk_soc integer, + fk_project integer, + fk_user_recruiter integer, + email_recruiter varchar(255), + fk_user_supervisor integer, + fk_establishment integer, + date_planned date, + remuneration_suggested varchar(255), + description text, + note_public text, + note_private text, + date_creation datetime NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_user_creat integer NOT NULL, + fk_user_modif integer, + last_main_doc varchar(255), + import_key varchar(14), + model_pdf varchar(255), + status smallint NOT NULL + -- END MODULEBUILDER FIELDS +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.key.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.key.sql new file mode 100644 index 00000000000..dfb495c3efc --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.key.sql @@ -0,0 +1,19 @@ +-- Copyright (C) ---Put here your own copyright and developer email--- +-- +-- 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 https://www.gnu.org/licenses/. + + +-- BEGIN MODULEBUILDER INDEXES +ALTER TABLE llx_recruitment_recruitmentjobposition_extrafields ADD INDEX idx_recruitmentjobposition_fk_object(fk_object); +-- END MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.sql new file mode 100644 index 00000000000..21b1ec081bf --- /dev/null +++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentjobposition_extrafields.sql @@ -0,0 +1,23 @@ +-- Copyright (C) ---Put here your own copyright and developer email--- +-- +-- 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 https://www.gnu.org/licenses/. + +create table llx_recruitment_recruitmentjobposition_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + diff --git a/htdocs/install/mysql/tables/llx_resource.sql b/htdocs/install/mysql/tables/llx_resource.sql index 7dc709ad83a..30bd2bcbbf3 100644 --- a/htdocs/install/mysql/tables/llx_resource.sql +++ b/htdocs/install/mysql/tables/llx_resource.sql @@ -34,5 +34,5 @@ CREATE TABLE llx_resource import_key varchar(14), extraparams varchar(255), -- for stock other parameters with json format fk_country integer DEFAULT NULL, -- Optional id of original country - tms timestamp + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_resource_extrafields.sql b/htdocs/install/mysql/tables/llx_resource_extrafields.sql index 6e828258339..88bcc7606c8 100644 --- a/htdocs/install/mysql/tables/llx_resource_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_resource_extrafields.sql @@ -19,7 +19,7 @@ create table llx_resource_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index a98be7912f7..88a0fcbda46 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -114,7 +114,7 @@ create table llx_societe webservices_url varchar(255), -- supplier webservice url webservices_key varchar(128), -- supplier webservice key - tms timestamp, -- last modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date datec datetime, -- creation date fk_user_creat integer NULL, -- utilisateur qui a cree l'info fk_user_modif integer, -- utilisateur qui a modifie l'info diff --git a/htdocs/install/mysql/tables/llx_societe_account.sql b/htdocs/install/mysql/tables/llx_societe_account.sql index 6a78a9a7839..b200d4f3854 100644 --- a/htdocs/install/mysql/tables/llx_societe_account.sql +++ b/htdocs/install/mysql/tables/llx_societe_account.sql @@ -33,7 +33,7 @@ CREATE TABLE llx_societe_account( date_last_login datetime, date_previous_login datetime, date_creation datetime NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer NOT NULL, fk_user_modif integer, import_key varchar(14), diff --git a/htdocs/install/mysql/tables/llx_societe_address.sql b/htdocs/install/mysql/tables/llx_societe_address.sql index 626b0155519..2b5f2d57146 100644 --- a/htdocs/install/mysql/tables/llx_societe_address.sql +++ b/htdocs/install/mysql/tables/llx_societe_address.sql @@ -21,7 +21,7 @@ create table llx_societe_address ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, -- creation date - tms timestamp, -- modification date + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification date label varchar(30), -- fk_soc integer DEFAULT 0, -- name varchar(60), -- company name diff --git a/htdocs/install/mysql/tables/llx_societe_extrafields.sql b/htdocs/install/mysql/tables/llx_societe_extrafields.sql index e277db15821..a4b5b269358 100644 --- a/htdocs/install/mysql/tables/llx_societe_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_societe_extrafields.sql @@ -19,7 +19,7 @@ create table llx_societe_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe_prices.sql b/htdocs/install/mysql/tables/llx_societe_prices.sql index 2b88340e611..2e9178774f5 100644 --- a/htdocs/install/mysql/tables/llx_societe_prices.sql +++ b/htdocs/install/mysql/tables/llx_societe_prices.sql @@ -20,7 +20,7 @@ create table llx_societe_prices ( rowid integer AUTO_INCREMENT PRIMARY KEY, fk_soc integer DEFAULT 0, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, fk_user_author integer, price_level tinyint DEFAULT 1 diff --git a/htdocs/install/mysql/tables/llx_societe_remise.sql b/htdocs/install/mysql/tables/llx_societe_remise.sql index a3a265cce5f..2d4e3a9c258 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise.sql @@ -24,7 +24,7 @@ create table llx_societe_remise rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user remise_client double(6,3) DEFAULT 0 NOT NULL, -- discount diff --git a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql index 3786b16b76a..d6dfdc20d9d 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql @@ -24,7 +24,7 @@ create table llx_societe_remise_supplier rowid integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 1 NOT NULL, -- multi company id fk_soc integer NOT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- creation date fk_user_author integer, -- creation user remise_supplier double(6,3) DEFAULT 0 NOT NULL, -- discount diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index 7d00d9fb1dd..ece4b2edffe 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -27,7 +27,7 @@ create table llx_societe_rib label varchar(200), fk_soc integer NOT NULL, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- For BAN bank varchar(255), -- bank name diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index fceb2044649..decc229e3e7 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -2,6 +2,7 @@ -- Copyright (C) 2001-2004 Rodolphe Quiedeville -- Copyright (C) 2008 Laurent Destailleur -- Copyright (C) 2005-2010 Regis Houssin +-- Copyright (C) 2020 Open-Dsi -- -- 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 @@ -22,7 +23,7 @@ create table llx_socpeople ( rowid integer AUTO_INCREMENT PRIMARY KEY, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_soc integer, -- lien vers la societe entity integer DEFAULT 1 NOT NULL, -- multi company id ref_ext varchar(255), -- reference into an external system (not used by dolibarr) @@ -57,6 +58,8 @@ create table llx_socpeople photo varchar(255), no_email smallint NOT NULL DEFAULT 0, -- deprecated. Use table llx_mailing_unsubscribe instead priv smallint NOT NULL DEFAULT 0, + fk_prospectcontactlevel varchar(12), -- prospect level (in llx_c_prospectcontactlevel) + fk_stcommcontact integer DEFAULT 0 NOT NULL, -- commercial statut fk_user_creat integer DEFAULT 0, -- user qui a creel'enregistrement fk_user_modif integer, note_private text, diff --git a/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql b/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql index 66220ce7e98..f2f594e12f3 100644 --- a/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql @@ -19,7 +19,7 @@ create table llx_socpeople_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.sql index 94501a516dd..2cd094c1b05 100644 --- a/htdocs/install/mysql/tables/llx_stock_mouvement.sql +++ b/htdocs/install/mysql/tables/llx_stock_mouvement.sql @@ -20,7 +20,7 @@ create table llx_stock_mouvement ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datem datetime, -- Date and hour of movement fk_product integer NOT NULL, -- Id of product batch varchar(128) DEFAULT NULL, -- Lot or serial number diff --git a/htdocs/install/mysql/tables/llx_subscription.sql b/htdocs/install/mysql/tables/llx_subscription.sql index a3562f12c57..8e86e216d3f 100644 --- a/htdocs/install/mysql/tables/llx_subscription.sql +++ b/htdocs/install/mysql/tables/llx_subscription.sql @@ -19,12 +19,12 @@ create table llx_subscription ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, fk_adherent integer, fk_type integer, dateadh datetime, - datef date, + datef datetime, subscription double(24,8), fk_bank integer DEFAULT NULL, fk_user_creat integer DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal.sql b/htdocs/install/mysql/tables/llx_supplier_proposal.sql index 5e7393112d8..e63c4ff64c7 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal.sql @@ -23,7 +23,7 @@ CREATE TABLE llx_supplier_proposal ( ref_int varchar(255) DEFAULT NULL, fk_soc integer DEFAULT NULL, fk_projet integer DEFAULT NULL, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime DEFAULT NULL, date_valid datetime DEFAULT NULL, date_cloture datetime DEFAULT NULL, diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql index a13c74d0d04..8dfed18bbbc 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql @@ -17,7 +17,7 @@ CREATE TABLE llx_supplier_proposal_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql index 0501aecc68b..df6b5216c21 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql @@ -17,7 +17,7 @@ CREATE TABLE llx_supplier_proposaldet_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) DEFAULT NULL ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ticket.sql b/htdocs/install/mysql/tables/llx_ticket.sql index 82e692a7f0d..c053e787dfa 100644 --- a/htdocs/install/mysql/tables/llx_ticket.sql +++ b/htdocs/install/mysql/tables/llx_ticket.sql @@ -38,6 +38,7 @@ CREATE TABLE llx_ticket date_read datetime, date_close datetime, notify_tiers_at_create tinyint, - tms timestamp, + email_msgid varchar(255), -- if ticket is created by email collector, we store here MSG ID + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_ticket_extrafields.sql b/htdocs/install/mysql/tables/llx_ticket_extrafields.sql index 538da09692e..31f82064461 100644 --- a/htdocs/install/mysql/tables/llx_ticket_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_ticket_extrafields.sql @@ -18,7 +18,7 @@ create table llx_ticket_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- ticket id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_tva.sql b/htdocs/install/mysql/tables/llx_tva.sql index 2804d410e7d..6cf97e6b4c6 100644 --- a/htdocs/install/mysql/tables/llx_tva.sql +++ b/htdocs/install/mysql/tables/llx_tva.sql @@ -20,7 +20,7 @@ create table llx_tva ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, datec datetime, -- Create date datep date, -- date de paiement datev date, -- date de valeur diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 16170267bee..c734192ad64 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -29,7 +29,7 @@ create table llx_user fk_establishment integer DEFAULT 0, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, login varchar(50) NOT NULL, @@ -57,32 +57,27 @@ create table llx_user personal_email varchar(255), socialnetworks text DEFAULT NULL, -- json with socialnetworks - jabberid varchar(255), - skype varchar(255), - twitter varchar(255), -- - facebook varchar(255), -- - linkedin varchar(255), -- - instagram varchar(255), -- - snapchat varchar(255), -- - googleplus varchar(255), -- - youtube varchar(255), -- - whatsapp varchar(255), -- signature text DEFAULT NULL, admin smallint DEFAULT 0, + module_comm smallint DEFAULT 1, module_compta smallint DEFAULT 1, + fk_soc integer, fk_socpeople integer, fk_member integer, fk_user integer, -- Hierarchic parent fk_user_expense_validator integer, fk_user_holiday_validator integer, + note_public text, note text DEFAULT NULL, model_pdf varchar(255) DEFAULT NULL, datelastlogin datetime, datepreviouslogin datetime, + datestartvalidity datetime, + dateendvalidity datetime, iplastlogin varchar(250), ippreviouslogin varchar(250), egroupware_id integer, @@ -90,7 +85,7 @@ create table llx_user openid varchar(255), statut tinyint DEFAULT 1, photo varchar(255), -- filename or url of photo - lang varchar(6), + lang varchar(6), -- default language for communication. Note that language selected by user as interface language is savec into llx_user_param. color varchar(6), barcode varchar(255) DEFAULT NULL, fk_barcode_type integer DEFAULT 0, diff --git a/htdocs/install/mysql/tables/llx_user_employment.sql b/htdocs/install/mysql/tables/llx_user_employment.sql index ff2a87028d4..c06df0189d2 100644 --- a/htdocs/install/mysql/tables/llx_user_employment.sql +++ b/htdocs/install/mysql/tables/llx_user_employment.sql @@ -25,7 +25,7 @@ create table llx_user_employment ref_ext varchar(50), -- reference into an external system (not used by dolibarr) fk_user integer, datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_user_creat integer, fk_user_modif integer, job varchar(128), -- job position. may be a dictionary diff --git a/htdocs/install/mysql/tables/llx_user_extrafields.sql b/htdocs/install/mysql/tables/llx_user_extrafields.sql index b7ba9116630..c38e9435a63 100644 --- a/htdocs/install/mysql/tables/llx_user_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_user_extrafields.sql @@ -21,7 +21,7 @@ create table llx_user_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, -- member id import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql index 1349e77a77b..4463a1f6f2b 100644 --- a/htdocs/install/mysql/tables/llx_user_rib.sql +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -22,7 +22,7 @@ create table llx_user_rib fk_user integer NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, label varchar(30), bank varchar(255), -- bank name code_banque varchar(128), -- bank code diff --git a/htdocs/install/mysql/tables/llx_usergroup.sql b/htdocs/install/mysql/tables/llx_usergroup.sql index 43bbba9dbb1..959dfbca3d9 100644 --- a/htdocs/install/mysql/tables/llx_usergroup.sql +++ b/htdocs/install/mysql/tables/llx_usergroup.sql @@ -24,7 +24,7 @@ create table llx_usergroup nom varchar(180) NOT NULL, entity integer DEFAULT 1 NOT NULL, -- multi company id datec datetime, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, note text, model_pdf varchar(255) DEFAULT NULL )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql index e2e96f142d9..ea358509eff 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql @@ -18,7 +18,7 @@ CREATE TABLE llx_usergroup_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key )ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_website.sql b/htdocs/install/mysql/tables/llx_website.sql index 743d4ec9ca8..b2103177972 100644 --- a/htdocs/install/mysql/tables/llx_website.sql +++ b/htdocs/install/mysql/tables/llx_website.sql @@ -35,6 +35,7 @@ CREATE TABLE llx_website fk_user_creat integer, fk_user_modif integer, date_creation datetime, - tms timestamp, + position integer DEFAULT 0, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_website_extrafields.sql b/htdocs/install/mysql/tables/llx_website_extrafields.sql index ff39e2c51c4..b3fd6786a09 100644 --- a/htdocs/install/mysql/tables/llx_website_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_website_extrafields.sql @@ -16,7 +16,7 @@ CREATE TABLE llx_website_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_website_page.sql b/htdocs/install/mysql/tables/llx_website_page.sql index bacbc8e802b..4b1b3045d6b 100644 --- a/htdocs/install/mysql/tables/llx_website_page.sql +++ b/htdocs/install/mysql/tables/llx_website_page.sql @@ -38,6 +38,8 @@ CREATE TABLE llx_website_page fk_user_modif integer, author_alias varchar(64), date_creation datetime, - tms timestamp, - import_key varchar(14) -- import key + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + import_key varchar(14), -- import key + object_type varchar(255), + fk_object varchar(255) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_zapier_hook.sql b/htdocs/install/mysql/tables/llx_zapier_hook.sql index 27d56352bff..b54fbc0d348 100644 --- a/htdocs/install/mysql/tables/llx_zapier_hook.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook.sql @@ -22,8 +22,8 @@ CREATE TABLE llx_zapier_hook( module varchar(128), action varchar(128), status integer, - date_creation DATETIME NOT NULL, + date_creation datetime NOT NULL, fk_user integer NOT NULL, - tms TIMESTAMP NOT NULL, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, import_key varchar(14) ) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql index 09fef4cc399..0b4f6e97238 100644 --- a/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql @@ -16,7 +16,7 @@ create table llx_zapier_hook_extrafields ( rowid integer AUTO_INCREMENT PRIMARY KEY, - tms timestamp, + tms timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, fk_object integer NOT NULL, import_key varchar(14) -- import key ) ENGINE=innodb; diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql index 22c122a1164..309343b7789 100644 --- a/htdocs/install/pgsql/functions/functions.sql +++ b/htdocs/install/pgsql/functions/functions.sql @@ -102,6 +102,8 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_cronjob FOR EACH ROW CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_deplacement FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_files FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_element_resources FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_emailcollector_emailcollector FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_emailcollector_emailcollectoraction FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); @@ -150,6 +152,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_customer_pri CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_fournisseur_price FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price_by_qty FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_stock FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_projet FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_projet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); @@ -161,6 +164,10 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propal_extrafields F CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propal_merge_pdf_product FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propaldet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_resource FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentjobposition FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentjobposition_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentcandidature FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); +CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentcandidature_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_address FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); @@ -178,13 +185,5 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user FOR EACH ROW EX CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_usergroup FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_usergroup_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); -CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price_by_qty FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_website FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_website_page FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); -CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms(); - - --- Add triggers for timestamp fields named date_m -CREATE OR REPLACE FUNCTION update_modified_column_date_m() RETURNS TRIGGER AS $$ BEGIN NEW.date_m = now(); RETURN NEW; END; $$ LANGUAGE plpgsql; -CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_m(); -CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_files FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_m(); diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 034741c7c7e..e8965adedb3 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -30,7 +30,6 @@ include_once $dolibarr_main_document_root.'/core/lib/images.lib.php'; require_once $dolibarr_main_document_root.'/core/class/extrafields.class.php'; require_once 'lib/repair.lib.php'; -$grant_query = ''; $step = 2; $ok = 0; @@ -93,14 +92,13 @@ $error = 0; // If password is encoded, we decode it if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_db_encrypted_pass)) { - require_once $dolibarr_main_document_root.'/core/lib/security.lib.php'; - if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) - { - $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); - $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); - $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted - } - else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + require_once $dolibarr_main_document_root.'/core/lib/security.lib.php'; + if (preg_match('/crypted:/i', $dolibarr_main_db_pass)) + { + $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); + $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); + $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted + } else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } // $conf is already instancied inside inc.php @@ -119,44 +117,40 @@ $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf if ($db->connected) { - print ''; - print $langs->trans("ServerConnection")." : $dolibarr_main_db_host".$langs->trans("OK").""; - dolibarr_install_syslog("repair: ".$langs->transnoentities("ServerConnection").": ".$dolibarr_main_db_host.$langs->transnoentities("OK")); - $ok = 1; -} -else -{ - print "".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."".$langs->transnoentities("Error").""; - dolibarr_install_syslog("repair: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)); - $ok = 0; + print ''; + print $langs->trans("ServerConnection")." : $dolibarr_main_db_host".$langs->trans("OK").""; + dolibarr_install_syslog("repair: ".$langs->transnoentities("ServerConnection").": ".$dolibarr_main_db_host.$langs->transnoentities("OK")); + $ok = 1; +} else { + print "".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."".$langs->transnoentities("Error").""; + dolibarr_install_syslog("repair: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)); + $ok = 0; } if ($ok) { - if ($db->database_selected) - { - print ''; - print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name."".$langs->trans("OK").""; - dolibarr_install_syslog("repair: database connection successful: ".$dolibarr_main_db_name); - $ok = 1; - } - else - { - print "".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."".$langs->trans("Error").""; - dolibarr_install_syslog("repair: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)); - $ok = 0; - } + if ($db->database_selected) + { + print ''; + print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name."".$langs->trans("OK").""; + dolibarr_install_syslog("repair: database connection successful: ".$dolibarr_main_db_name); + $ok = 1; + } else { + print "".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."".$langs->trans("Error").""; + dolibarr_install_syslog("repair: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)); + $ok = 0; + } } // Show database version if ($ok) { - $version = $db->getVersion(); - $versionarray = $db->getVersionArray(); - print ''.$langs->trans("ServerVersion").''; - print ''.$version.''; - dolibarr_install_syslog("repair: ".$langs->transnoentities("ServerVersion").": ".$version); - //print ''.join('.',$versionarray).''; + $version = $db->getVersion(); + $versionarray = $db->getVersionArray(); + print ''.$langs->trans("ServerVersion").''; + print ''.$version.''; + dolibarr_install_syslog("repair: ".$langs->transnoentities("ServerVersion").": ".$version); + //print ''.join('.',$versionarray).''; } $conf->setValues($db); @@ -185,41 +179,41 @@ if ($ok && GETPOST('standard', 'alpha')) { $dir = "mysql/migration/"; - $filelist = array(); - $i = 0; - $ok = 0; + $filelist = array(); + $i = 0; + $ok = 0; - // Recupere list fichier - $filesindir = array(); - $handle = opendir($dir); - if (is_resource($handle)) - { - while (($file = readdir($handle)) !== false) - { - if (preg_match('/\.sql$/i', $file)) $filesindir[] = $file; - } - } - sort($filesindir); + // Recupere list fichier + $filesindir = array(); + $handle = opendir($dir); + if (is_resource($handle)) + { + while (($file = readdir($handle)) !== false) + { + if (preg_match('/\.sql$/i', $file)) $filesindir[] = $file; + } + } + sort($filesindir); - foreach ($filesindir as $file) - { - if (preg_match('/repair/i', $file)) - { - $filelist[] = $file; - } - } + foreach ($filesindir as $file) + { + if (preg_match('/repair/i', $file)) + { + $filelist[] = $file; + } + } - // Loop on each file - foreach ($filelist as $file) - { - print '*** '; - print $langs->trans("Script").''.$file.''; + // Loop on each file + foreach ($filelist as $file) + { + print '*** '; + print $langs->trans("Script").''.$file.''; - $name = substr($file, 0, dol_strlen($file) - 4); + $name = substr($file, 0, dol_strlen($file) - 4); - // Run sql script - $ok = run_sql($dir.$file, 0, '', 1); - } + // Run sql script + $ok = run_sql($dir.$file, 0, '', 1); + } } @@ -236,106 +230,98 @@ if ($ok && GETPOST('standard', 'alpha')) print '
    *** Check fields into extra table structure match table of definition. If not add column into table'; foreach ($listofmodulesextra as $tablename => $elementtype) { - // Get list of fields - $tableextra = MAIN_DB_PREFIX.$tablename.'_extrafields'; + // Get list of fields + $tableextra = MAIN_DB_PREFIX.$tablename.'_extrafields'; - // Define $arrayoffieldsdesc - $arrayoffieldsdesc = $extrafields->fetch_name_optionals_label($elementtype); + // Define $arrayoffieldsdesc + $arrayoffieldsdesc = $extrafields->fetch_name_optionals_label($elementtype); - // Define $arrayoffieldsfound - $arrayoffieldsfound = array(); - $resql = $db->DDLDescTable($tableextra); - if ($resql) - { - print 'Check availability of extra field for '.$tableextra."
    \n"; - $i = 0; - while ($obj = $db->fetch_object($resql)) - { - $fieldname = $fieldtype = ''; - if (preg_match('/mysql/', $db->type)) - { - $fieldname = $obj->Field; - $fieldtype = $obj->Type; - } - else - { - $fieldname = isset($obj->Key) ? $obj->Key : $obj->attname; - $fieldtype = isset($obj->Type) ? $obj->Type : 'varchar'; - } + // Define $arrayoffieldsfound + $arrayoffieldsfound = array(); + $resql = $db->DDLDescTable($tableextra); + if ($resql) + { + print 'Check availability of extra field for '.$tableextra."
    \n"; + $i = 0; + while ($obj = $db->fetch_object($resql)) + { + $fieldname = $fieldtype = ''; + if (preg_match('/mysql/', $db->type)) + { + $fieldname = $obj->Field; + $fieldtype = $obj->Type; + } else { + $fieldname = isset($obj->Key) ? $obj->Key : $obj->attname; + $fieldtype = isset($obj->Type) ? $obj->Type : 'varchar'; + } - if (empty($fieldname)) continue; - if (in_array($fieldname, array('rowid', 'tms', 'fk_object', 'import_key'))) continue; - $arrayoffieldsfound[$fieldname] = array('type'=>$fieldtype); - } + if (empty($fieldname)) continue; + if (in_array($fieldname, array('rowid', 'tms', 'fk_object', 'import_key'))) continue; + $arrayoffieldsfound[$fieldname] = array('type'=>$fieldtype); + } - // If it does not match, we create fields - foreach ($arrayoffieldsdesc as $code => $label) - { - if (!in_array($code, array_keys($arrayoffieldsfound))) - { - print 'Found field '.$code.' declared into '.MAIN_DB_PREFIX.'extrafields table but not found into desc of table '.$tableextra." -> "; - $type = $extrafields->attributes[$elementtype]['type'][$code]; $length = $extrafields->attributes[$elementtype]['size'][$code]; $attribute = ''; $default = ''; $extra = ''; $null = 'null'; + // If it does not match, we create fields + foreach ($arrayoffieldsdesc as $code => $label) + { + if (!in_array($code, array_keys($arrayoffieldsfound))) + { + print 'Found field '.$code.' declared into '.MAIN_DB_PREFIX.'extrafields table but not found into desc of table '.$tableextra." -> "; + $type = $extrafields->attributes[$elementtype]['type'][$code]; $length = $extrafields->attributes[$elementtype]['size'][$code]; $attribute = ''; $default = ''; $extra = ''; $null = 'null'; - if ($type == 'boolean') { - $typedb = 'int'; - $lengthdb = '1'; - } elseif ($type == 'price') { - $typedb = 'double'; - $lengthdb = '24,8'; - } elseif ($type == 'phone') { - $typedb = 'varchar'; - $lengthdb = '20'; - }elseif ($type == 'mail') { - $typedb = 'varchar'; - $lengthdb = '128'; - } elseif (($type == 'select') || ($type == 'sellist') || ($type == 'radio') || ($type == 'checkbox') || ($type == 'chkbxlst')) { - $typedb = 'text'; - $lengthdb = ''; - } elseif ($type == 'link') { - $typedb = 'int'; - $lengthdb = '11'; - } else { - $typedb = $type; - $lengthdb = $length; - } + if ($type == 'boolean') { + $typedb = 'int'; + $lengthdb = '1'; + } elseif ($type == 'price') { + $typedb = 'double'; + $lengthdb = '24,8'; + } elseif ($type == 'phone') { + $typedb = 'varchar'; + $lengthdb = '20'; + } elseif ($type == 'mail') { + $typedb = 'varchar'; + $lengthdb = '128'; + } elseif (($type == 'select') || ($type == 'sellist') || ($type == 'radio') || ($type == 'checkbox') || ($type == 'chkbxlst')) { + $typedb = 'text'; + $lengthdb = ''; + } elseif ($type == 'link') { + $typedb = 'int'; + $lengthdb = '11'; + } else { + $typedb = $type; + $lengthdb = $length; + } - $field_desc = array( - 'type'=>$typedb, - 'value'=>$lengthdb, - 'attribute'=>$attribute, - 'default'=>$default, - 'extra'=>$extra, - 'null'=>$null - ); - //var_dump($field_desc);exit; + $field_desc = array( + 'type'=>$typedb, + 'value'=>$lengthdb, + 'attribute'=>$attribute, + 'default'=>$default, + 'extra'=>$extra, + 'null'=>$null + ); + //var_dump($field_desc);exit; - $result = 0; - if (GETPOST('standard', 'alpha') == 'confirmed') - { - $result = $db->DDLAddField($tableextra, $code, $field_desc, ""); + $result = 0; + if (GETPOST('standard', 'alpha') == 'confirmed') + { + $result = $db->DDLAddField($tableextra, $code, $field_desc, ""); - if ($result < 0) - { - print "KO ".$db->lasterror."
    \n"; - } - else - { - print "OK
    \n"; - } - } - else - { - print ' - Mode test, no column added.'; - } - } - } + if ($result < 0) + { + print "KO ".$db->lasterror."
    \n"; + } else { + print "OK
    \n"; + } + } else { + print ' - Mode test, no column added.'; + } + } + } - print " \n"; - } - else - { - dol_print_error($db); - } + print " \n"; + } else { + dol_print_error($db); + } } } @@ -398,14 +384,10 @@ if ($ok && GETPOST('standard', 'alpha')) $db->query($sqldelete); print 'Widget '.$obj->name.' set in entity '.$obj->entity.' with value '.$obj->value.' -> Module '.$name.' not enabled in entity '.$obj->entity.', we delete record'; - } - else - { + } else { print 'Widget '.$obj->name.' set in entity '.$obj->entity.' with value '.$obj->value.' -> Module '.$name.' not enabled in entity '.$obj->entity.', we should delete record (not done, mode test)'; } - } - else - { + } else { //print 'Constant '.$obj->name.' set in entity '.$obj->entity.' with value '.$obj->value.' -> Module found in entity '.$obj->entity.', we keep record'; } } @@ -462,8 +444,8 @@ if ($ok && GETPOST('standard', 'alpha')) if ($obj2 && $obj2->nb == 0) { // Module not found, so we canremove entry - $sqldeletea = "DELETE FROM ".MAIN_DB_PREFIX."boxes WHERE entity = ".$obj->entity." AND box_id IN (SELECT rowid FROM ".MAIN_DB_PREFIX."boxes_def WHERE file = '".$obj->file."' AND entity = ".$obj->entity.")"; - $sqldeleteb = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def WHERE file = '".$obj->file."' AND entity = ".$obj->entity; + $sqldeletea = "DELETE FROM ".MAIN_DB_PREFIX."boxes WHERE entity = ".$obj->entity." AND box_id IN (SELECT rowid FROM ".MAIN_DB_PREFIX."boxes_def WHERE file = '".$db->escape($obj->file)."' AND entity = ".$obj->entity.")"; + $sqldeleteb = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def WHERE file = '".$db->escape($obj->file)."' AND entity = ".$obj->entity; if (GETPOST('standard', 'alpha') == 'confirmed') { @@ -471,14 +453,10 @@ if ($ok && GETPOST('standard', 'alpha')) $db->query($sqldeleteb); print 'Constant '.$obj->file.' set in boxes_def for entity '.$obj->entity.' but MAIN_MODULE_'.strtoupper($module).' not defined in entity '.$obj->entity.', we delete record'; - } - else - { + } else { print 'Constant '.$obj->file.' set in boxes_def for entity '.$obj->entity.' but MAIN_MODULE_'.strtoupper($module).' not defined in entity '.$obj->entity.', we should delete record (not done, mode test)'; } - } - else - { + } else { //print 'Constant '.$obj->name.' set in entity '.$obj->entity.' with value '.$obj->value.' -> Module found in entity '.$obj->entity.', we keep record'; } } @@ -566,9 +544,7 @@ if ($ok && GETPOST('restore_thirdparties_logos')) $i++; } - } - else - { + } else { $ok = 0; dol_print_error($db); } @@ -670,9 +646,7 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha')) $i++; } - } - else - { + } else { $ok = 0; dol_print_error($db); } @@ -684,65 +658,63 @@ if ($ok && GETPOST('restore_user_pictures', 'alpha')) // rebuild_product_thumbs: Rebuild thumbs for product files if ($ok && GETPOST('rebuild_product_thumbs', 'alpha')) { - $ext = ''; - global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini; + $ext = ''; + global $maxwidthsmall, $maxheightsmall, $maxwidthmini, $maxheightmini; - print '
    *** Rebuild product thumbs
    '; + print '
    *** Rebuild product thumbs
    '; - $sql = "SELECT s.rowid, s.ref FROM ".MAIN_DB_PREFIX."product as s ORDER BY s.ref"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - $i = 0; + $sql = "SELECT s.rowid, s.ref FROM ".MAIN_DB_PREFIX."product as s ORDER BY s.ref"; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); + while ($i < $num) + { + $obj = $db->fetch_object($resql); - if (!empty($obj->ref)) - { - $files = dol_dir_list($dolibarr_main_data_root.'/produit/'.$obj->ref, 'files', 0); - foreach ($files as $file) - { + if (!empty($obj->ref)) + { + $files = dol_dir_list($dolibarr_main_data_root.'/produit/'.$obj->ref, 'files', 0); + foreach ($files as $file) + { // Generate thumbs. if (image_format_supported($file['fullname']) == 1) { - $imgThumbSmall = 'notbuild'; - if (GETPOST('rebuild_product_thumbs', 'alpha') == 'confirmed') - { - // Used on logon for example - $imgThumbSmall = vignette($file['fullname'], $maxwidthsmall, $maxheightsmall, '_small', 50, "thumbs"); - } - print 'Check product '.$obj->rowid.", file ".$file['fullname']." -> ".$imgThumbSmall." maxwidthsmall=".$maxwidthsmall." maxheightsmall=".$maxheightsmall."
    \n"; - $imgThumbMini = 'notbuild'; - if (GETPOST('rebuild_product_thumbs', 'alpha') == 'confirmed') - { - // Create mini thumbs for image (Ratio is near 16/9) - // Used on menu or for setup page for example - $imgThumbMini = vignette($file['fullname'], $maxwidthmini, $maxheightmini, '_mini', 50, "thumbs"); - } - print 'Check product '.$obj->rowid.", file ".$file['fullname']." -> ".$imgThumbMini." maxwidthmini=".$maxwidthmini." maxheightmini=".$maxheightmini."
    \n"; + $imgThumbSmall = 'notbuild'; + if (GETPOST('rebuild_product_thumbs', 'alpha') == 'confirmed') + { + // Used on logon for example + $imgThumbSmall = vignette($file['fullname'], $maxwidthsmall, $maxheightsmall, '_small', 50, "thumbs"); + } + print 'Check product '.$obj->rowid.", file ".$file['fullname']." -> ".$imgThumbSmall." maxwidthsmall=".$maxwidthsmall." maxheightsmall=".$maxheightsmall."
    \n"; + $imgThumbMini = 'notbuild'; + if (GETPOST('rebuild_product_thumbs', 'alpha') == 'confirmed') + { + // Create mini thumbs for image (Ratio is near 16/9) + // Used on menu or for setup page for example + $imgThumbMini = vignette($file['fullname'], $maxwidthmini, $maxheightmini, '_mini', 50, "thumbs"); + } + print 'Check product '.$obj->rowid.", file ".$file['fullname']." -> ".$imgThumbMini." maxwidthmini=".$maxwidthmini." maxheightmini=".$maxheightmini."
    \n"; } - } - } + } + } - $i++; - } - } - else - { - $ok = 0; - dol_print_error($db); - } + $i++; + } + } else { + $ok = 0; + dol_print_error($db); + } - print ''; + print ''; } // clean_linked_elements: Check and clean linked elements if ($ok && GETPOST('clean_linked_elements', 'alpha')) { - print '
    *** Check table of linked elements and delete orphelins links'; + print '
    *** Check table of linked elements and delete orphelins links'; // propal => order print ''.checkLinkedElements('propal', 'commande')."\n"; @@ -809,23 +781,17 @@ if ($ok && GETPOST('clean_menus', 'alpha')) print ' - Module condition '.$modulecond.' seems ko, we delete menu entry.'; if (GETPOST('clean_menus') == 'confirmed') { - $sql2 = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE module = '".$modulecond."'"; + $sql2 = "DELETE FROM ".MAIN_DB_PREFIX."menu WHERE module = '".$db->escape($modulecond)."'"; $resql2 = $db->query($sql2); if (!$resql2) { $error++; dol_print_error($db); - } - else - print ' - Cleaned'; - } - else - { + } else print ' - Cleaned'; + } else { print ' - Canceled (test mode)'; } - } - else - { + } else { print ' - Module condition '.$modulecond.' is ok, we do nothing.'; } } @@ -839,14 +805,10 @@ if ($ok && GETPOST('clean_menus', 'alpha')) $i++; } - } - else - { + } else { print 'No menu entries of disabled menus found'; } - } - else - { + } else { dol_print_error($db); } } @@ -856,442 +818,414 @@ if ($ok && GETPOST('clean_menus', 'alpha')) // clean_orphelin_dir: Run purge of directory if ($ok && GETPOST('clean_orphelin_dir', 'alpha')) { - $listmodulepart = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'tax'); - foreach ($listmodulepart as $modulepart) - { - $filearray = array(); - $upload_dir = isset($conf->$modulepart->dir_output) ? $conf->$modulepart->dir_output : ''; - if ($modulepart == 'company') $upload_dir = $conf->societe->dir_output; // TODO change for multicompany sharing - if ($modulepart == 'invoice') $upload_dir = $conf->facture->dir_output; - if ($modulepart == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; - if ($modulepart == 'order') $upload_dir = $conf->commande->dir_output; - if ($modulepart == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; - if ($modulepart == 'contract') $upload_dir = $conf->contrat->dir_output; + $listmodulepart = array('company', 'invoice', 'invoice_supplier', 'propal', 'order', 'order_supplier', 'contract', 'tax'); + foreach ($listmodulepart as $modulepart) + { + $filearray = array(); + $upload_dir = isset($conf->$modulepart->dir_output) ? $conf->$modulepart->dir_output : ''; + if ($modulepart == 'company') $upload_dir = $conf->societe->dir_output; // TODO change for multicompany sharing + if ($modulepart == 'invoice') $upload_dir = $conf->facture->dir_output; + if ($modulepart == 'invoice_supplier') $upload_dir = $conf->fournisseur->facture->dir_output; + if ($modulepart == 'order') $upload_dir = $conf->commande->dir_output; + if ($modulepart == 'order_supplier') $upload_dir = $conf->fournisseur->commande->dir_output; + if ($modulepart == 'contract') $upload_dir = $conf->contrat->dir_output; - if (empty($upload_dir)) continue; + if (empty($upload_dir)) continue; - print '
    *** Clean orphelins files into files '.$upload_dir.''; + print '
    *** Clean orphelins files into files '.$upload_dir.''; - $filearray = dol_dir_list($upload_dir, "files", 1, '', array('^SPECIMEN\.pdf$', '^\.', '(\.meta|_preview.*\.png)$', '^temp$', '^payments$', '^CVS$', '^thumbs$'), '', SORT_DESC, 1, true); + $filearray = dol_dir_list($upload_dir, "files", 1, '', array('^SPECIMEN\.pdf$', '^\.', '(\.meta|_preview.*\.png)$', '^temp$', '^payments$', '^CVS$', '^thumbs$'), '', SORT_DESC, 1, true); - // To show ref or specific information according to view to show (defined by $module) - if ($modulepart == 'company') - { - include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; - $object_instance = new Societe($db); - } - if ($modulepart == 'invoice') - { - include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; - $object_instance = new Facture($db); - } - elseif ($modulepart == 'invoice_supplier') - { - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; - $object_instance = new FactureFournisseur($db); - } - elseif ($modulepart == 'propal') - { - include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; - $object_instance = new Propal($db); - } - elseif ($modulepart == 'order') - { - include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; - $object_instance = new Commande($db); - } - elseif ($modulepart == 'order_supplier') - { - include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; - $object_instance = new CommandeFournisseur($db); - } - elseif ($modulepart == 'contract') - { - include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; - $object_instance = new Contrat($db); - } - elseif ($modulepart == 'tax') - { - include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; - $object_instance = new ChargeSociales($db); - } + // To show ref or specific information according to view to show (defined by $module) + if ($modulepart == 'company') + { + include_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; + $object_instance = new Societe($db); + } + if ($modulepart == 'invoice') + { + include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; + $object_instance = new Facture($db); + } elseif ($modulepart == 'invoice_supplier') + { + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php'; + $object_instance = new FactureFournisseur($db); + } elseif ($modulepart == 'propal') + { + include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php'; + $object_instance = new Propal($db); + } elseif ($modulepart == 'order') + { + include_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; + $object_instance = new Commande($db); + } elseif ($modulepart == 'order_supplier') + { + include_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; + $object_instance = new CommandeFournisseur($db); + } elseif ($modulepart == 'contract') + { + include_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; + $object_instance = new Contrat($db); + } elseif ($modulepart == 'tax') + { + include_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'; + $object_instance = new ChargeSociales($db); + } - foreach ($filearray as $key => $file) - { - if (!is_dir($file['name']) - && $file['name'] != '.' - && $file['name'] != '..' - && $file['name'] != 'CVS' - ) - { - // Define relative path used to store the file - $relativefile = preg_replace('/'.preg_quote($upload_dir.'/', '/').'/', '', $file['fullname']); + foreach ($filearray as $key => $file) + { + if (!is_dir($file['name']) + && $file['name'] != '.' + && $file['name'] != '..' + && $file['name'] != 'CVS' + ) + { + // Define relative path used to store the file + $relativefile = preg_replace('/'.preg_quote($upload_dir.'/', '/').'/', '', $file['fullname']); - //var_dump($file); - $id = 0; $ref = ''; $object_instance->id = 0; $object_instance->ref = ''; $label = ''; + //var_dump($file); + $id = 0; $ref = ''; $object_instance->id = 0; $object_instance->ref = ''; $label = ''; - // To show ref or specific information according to view to show (defined by $module) - if ($modulepart == 'invoice') { - preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; - } - if ($modulepart == 'invoice_supplier') { - preg_match('/(\d+)\/[^\/]+$/', $relativefile, $reg); $id = empty($reg[1]) ? '' : $reg[1]; - } - if ($modulepart == 'propal') { - preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; - } - if ($modulepart == 'order') { - preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; - } - if ($modulepart == 'order_supplier') { - preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; - } - if ($modulepart == 'contract') { - preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; - } - if ($modulepart == 'tax') { - preg_match('/(\d+)\/[^\/]+$/', $relativefile, $reg); $id = $reg[1]; - } + // To show ref or specific information according to view to show (defined by $module) + if ($modulepart == 'invoice') { + preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; + } + if ($modulepart == 'invoice_supplier') { + preg_match('/(\d+)\/[^\/]+$/', $relativefile, $reg); $id = empty($reg[1]) ? '' : $reg[1]; + } + if ($modulepart == 'propal') { + preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; + } + if ($modulepart == 'order') { + preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; + } + if ($modulepart == 'order_supplier') { + preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; + } + if ($modulepart == 'contract') { + preg_match('/(.*)\/[^\/]+$/', $relativefile, $reg); $ref = $reg[1]; + } + if ($modulepart == 'tax') { + preg_match('/(\d+)\/[^\/]+$/', $relativefile, $reg); $id = $reg[1]; + } - if ($id || $ref) - { - //print 'Fetch '.$id.' or '.$ref.'
    '; - $result = $object_instance->fetch($id, $ref); - //print $result.'
    '; - if ($result == 0) // Not found but no error - { - // Clean of orphelins directories are done into repair.php - print ''; - print 'Delete orphelins file '.$file['fullname'].'
    '; - if (GETPOST('clean_orphelin_dir', 'alpha') == 'confirmed') - { - dol_delete_file($file['fullname'], 1, 1, 1); - dol_delete_dir(dirname($file['fullname']), 1); - } - print ""; - } - elseif ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'
    '; - } - } - } - } + if ($id || $ref) + { + //print 'Fetch '.$id.' or '.$ref.'
    '; + $result = $object_instance->fetch($id, $ref); + //print $result.'
    '; + if ($result == 0) // Not found but no error + { + // Clean of orphelins directories are done into repair.php + print ''; + print 'Delete orphelins file '.$file['fullname'].'
    '; + if (GETPOST('clean_orphelin_dir', 'alpha') == 'confirmed') + { + dol_delete_file($file['fullname'], 1, 1, 1); + dol_delete_dir(dirname($file['fullname']), 1); + } + print ""; + } elseif ($result < 0) print 'Error in '.get_class($object_instance).'.fetch of id'.$id.' ref='.$ref.', result='.$result.'
    '; + } + } + } + } } // clean_linked_elements: Check and clean linked elements if ($ok && GETPOST('clean_product_stock_batch', 'alpha')) { - $methodtofix = GETPOST('methodtofix', 'alpha') ?GETPOST('methodtofix', 'alpha') : 'updatestock'; + $methodtofix = GETPOST('methodtofix', 'alpha') ?GETPOST('methodtofix', 'alpha') : 'updatestock'; - print '
    *** Clean table product_batch, methodtofix='.$methodtofix.' (possible values: updatestock or updatebatch)'; + print '
    *** Clean table product_batch, methodtofix='.$methodtofix.' (possible values: updatestock or updatebatch)'; - $sql = "SELECT p.rowid, p.ref, p.tobatch, ps.rowid as psrowid, ps.fk_entrepot, ps.reel, SUM(pb.qty) as reelbatch"; - $sql .= " FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."product_stock as ps LEFT JOIN ".MAIN_DB_PREFIX."product_batch as pb ON ps.rowid = pb.fk_product_stock"; - $sql .= " WHERE p.rowid = ps.fk_product"; - $sql .= " AND p.tobatch = 1"; - $sql .= " GROUP BY p.rowid, p.ref, p.tobatch, ps.rowid, ps.fk_entrepot, ps.reel"; - $sql .= " HAVING reel != SUM(pb.qty) or SUM(pb.qty) IS NULL"; - print $sql; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); + $sql = "SELECT p.rowid, p.ref, p.tobatch, ps.rowid as psrowid, ps.fk_entrepot, ps.reel, SUM(pb.qty) as reelbatch"; + $sql .= " FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."product_stock as ps LEFT JOIN ".MAIN_DB_PREFIX."product_batch as pb ON ps.rowid = pb.fk_product_stock"; + $sql .= " WHERE p.rowid = ps.fk_product"; + $sql .= " AND p.tobatch = 1"; + $sql .= " GROUP BY p.rowid, p.ref, p.tobatch, ps.rowid, ps.fk_entrepot, ps.reel"; + $sql .= " HAVING reel != SUM(pb.qty) or SUM(pb.qty) IS NULL"; + print $sql; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); - if ($num) - { - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - print 'Product '.$obj->rowid.'-'.$obj->ref.' in warehose '.$obj->fk_entrepot.' -> '.$obj->psrowid.': '.$obj->reel.' (product_stock.reel) != '.($obj->reelbatch ? $obj->reelbatch : '0').' (sum product_batch)'; + if ($num) + { + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + print 'Product '.$obj->rowid.'-'.$obj->ref.' in warehose '.$obj->fk_entrepot.' -> '.$obj->psrowid.': '.$obj->reel.' (product_stock.reel) != '.($obj->reelbatch ? $obj->reelbatch : '0').' (sum product_batch)'; - // Fix - if ($obj->reel != $obj->reelbatch) - { - if ($methodtofix == 'updatebatch') - { - // Method 1 - print ' -> Insert qty '.($obj->reel - $obj->reelbatch).' with lot 000000 linked to fk_product_stock='.$obj->psrowid; - if (GETPOST('clean_product_stock_batch') == 'confirmed') - { - $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_batch(fk_product_stock, batch, qty)"; - $sql2 .= "VALUES(".$obj->psrowid.", '000000', ".($obj->reel - $obj->reelbatch).")"; - $resql2 = $db->query($sql2); - if (!$resql2) - { - // TODO If it fails, we must make update - //$sql2 ="UPDATE ".MAIN_DB_PREFIX."product_batch"; - //$sql2.=" SET ".$obj->psrowid.", '000000', ".($obj->reel - $obj->reelbatch).")"; - //$sql2.=" WHERE fk_product_stock = ".$obj->psrowid" - } - } - } - if ($methodtofix == 'updatestock') - { - // Method 2 - print ' -> Update qty of product_stock with qty = '.($obj->reelbatch ? $obj->reelbatch : '0').' for ps.rowid = '.$obj->psrowid; - if (GETPOST('clean_product_stock_batch') == 'confirmed') - { - $error = 0; + // Fix + if ($obj->reel != $obj->reelbatch) + { + if ($methodtofix == 'updatebatch') + { + // Method 1 + print ' -> Insert qty '.($obj->reel - $obj->reelbatch).' with lot 000000 linked to fk_product_stock='.$obj->psrowid; + if (GETPOST('clean_product_stock_batch') == 'confirmed') + { + $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."product_batch(fk_product_stock, batch, qty)"; + $sql2 .= "VALUES(".$obj->psrowid.", '000000', ".($obj->reel - $obj->reelbatch).")"; + $resql2 = $db->query($sql2); + if (!$resql2) + { + // TODO If it fails, we must make update + //$sql2 ="UPDATE ".MAIN_DB_PREFIX."product_batch"; + //$sql2.=" SET ".$obj->psrowid.", '000000', ".($obj->reel - $obj->reelbatch).")"; + //$sql2.=" WHERE fk_product_stock = ".$obj->psrowid" + } + } + } + if ($methodtofix == 'updatestock') + { + // Method 2 + print ' -> Update qty of product_stock with qty = '.($obj->reelbatch ? $obj->reelbatch : '0').' for ps.rowid = '.$obj->psrowid; + if (GETPOST('clean_product_stock_batch') == 'confirmed') + { + $error = 0; - $db->begin(); + $db->begin(); - $sql2 = "UPDATE ".MAIN_DB_PREFIX."product_stock"; - $sql2 .= " SET reel = ".($obj->reelbatch ? $obj->reelbatch : '0')." WHERE rowid = ".$obj->psrowid; - $resql2 = $db->query($sql2); - if ($resql2) - { - // We update product_stock, so we must field stock into product too. - $sql3 = 'UPDATE '.MAIN_DB_PREFIX.'product p SET p.stock= (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid)'; - $resql3 = $db->query($sql3); - if (!$resql3) - { - $error++; - dol_print_error($db); - } - } - else - { - $error++; - dol_print_error($db); - } + $sql2 = "UPDATE ".MAIN_DB_PREFIX."product_stock"; + $sql2 .= " SET reel = ".($obj->reelbatch ? $obj->reelbatch : '0')." WHERE rowid = ".$obj->psrowid; + $resql2 = $db->query($sql2); + if ($resql2) + { + // We update product_stock, so we must fill p.stock into product too. + $sql3 = 'UPDATE '.MAIN_DB_PREFIX.'product p SET p.stock= (SELECT SUM(ps.reel) FROM '.MAIN_DB_PREFIX.'product_stock ps WHERE ps.fk_product = p.rowid)'; + $resql3 = $db->query($sql3); + if (!$resql3) + { + $error++; + dol_print_error($db); + } + } else { + $error++; + dol_print_error($db); + } - if (!$error) $db->commit(); - else $db->rollback(); - } - } - } + if (!$error) $db->commit(); + else $db->rollback(); + } + } + } - print''; + print''; - $i++; - } - } - else - { - print 'Nothing to do'; - } - } - else - { - dol_print_error($db); - } + $i++; + } + } else { + print 'Nothing to do'; + } + } else { + dol_print_error($db); + } } // clean_product_stock_negative_if_batch if ($ok && GETPOST('clean_product_stock_negative_if_batch', 'alpha')) { - print '
    Clean table product_batch, methodtofix='.$methodtofix.' (possible values: updatestock or updatebatch)'; + print '
    Clean table product_batch, methodtofix='.$methodtofix.' (possible values: updatestock or updatebatch)'; - $sql = "SELECT p.rowid, p.ref, p.tobatch, ps.rowid as psrowid, ps.fk_entrepot, ps.reel, SUM(pb.qty) as reelbatch"; - $sql .= " FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product_batch as pb"; - $sql .= " WHERE p.rowid = ps.fk_product AND ps.rowid = pb.fk_product_stock"; - $sql .= " AND p.tobatch = 1"; - $sql .= " GROUP BY p.rowid, p.ref, p.tobatch, ps.rowid, ps.fk_entrepot, ps.reel"; - $sql .= " HAVING reel != SUM(pb.qty)"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); + $sql = "SELECT p.rowid, p.ref, p.tobatch, ps.rowid as psrowid, ps.fk_entrepot, ps.reel, SUM(pb.qty) as reelbatch"; + $sql .= " FROM ".MAIN_DB_PREFIX."product as p, ".MAIN_DB_PREFIX."product_stock as ps, ".MAIN_DB_PREFIX."product_batch as pb"; + $sql .= " WHERE p.rowid = ps.fk_product AND ps.rowid = pb.fk_product_stock"; + $sql .= " AND p.tobatch = 1"; + $sql .= " GROUP BY p.rowid, p.ref, p.tobatch, ps.rowid, ps.fk_entrepot, ps.reel"; + $sql .= " HAVING reel != SUM(pb.qty)"; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); - if ($num) - { - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - print ''.$obj->rowid.'-'.$obj->ref.'-'.$obj->fk_entrepot.' -> '.$obj->psrowid.': '.$obj->reel.' != '.$obj->reelbatch; + if ($num) + { + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + print ''.$obj->rowid.'-'.$obj->ref.'-'.$obj->fk_entrepot.' -> '.$obj->psrowid.': '.$obj->reel.' != '.$obj->reelbatch; - // TODO - } - } - } + // TODO + } + } + } } // set_empty_time_spent_amount if ($ok && GETPOST('set_empty_time_spent_amount', 'alpha')) { - print '
    *** Set value of time spent without amount'; + print '
    *** Set value of time spent without amount'; - $sql = "SELECT COUNT(ptt.rowid) as nb, u.rowid as user_id, u.login, u.thm as user_thm"; - $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as ptt, ".MAIN_DB_PREFIX."user as u"; - $sql .= " WHERE ptt.fk_user = u.rowid"; - $sql .= " AND ptt.thm IS NULL and u.thm > 0"; - $sql .= " GROUP BY u.rowid, u.login, u.thm"; + $sql = "SELECT COUNT(ptt.rowid) as nb, u.rowid as user_id, u.login, u.thm as user_thm"; + $sql .= " FROM ".MAIN_DB_PREFIX."projet_task_time as ptt, ".MAIN_DB_PREFIX."user as u"; + $sql .= " WHERE ptt.fk_user = u.rowid"; + $sql .= " AND ptt.thm IS NULL and u.thm > 0"; + $sql .= " GROUP BY u.rowid, u.login, u.thm"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); - if ($num) - { - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - print ''.$obj->login.'-'.$obj->user_id.' ('.$obj->nb.' lines to fix) -> '.$obj->user_thm; + if ($num) + { + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + print ''.$obj->login.'-'.$obj->user_id.' ('.$obj->nb.' lines to fix) -> '.$obj->user_thm; - $db->begin(); + $db->begin(); - if (GETPOST('set_empty_time_spent_amount') == 'confirmed') - { - $sql2 = "UPDATE ".MAIN_DB_PREFIX."projet_task_time"; - $sql2 .= " SET thm = ".$obj->user_thm." WHERE thm IS NULL AND fk_user = ".$obj->user_id; - $resql2 = $db->query($sql2); - if (!$resql2) - { - $error++; - dol_print_error($db); - } - } + if (GETPOST('set_empty_time_spent_amount') == 'confirmed') + { + $sql2 = "UPDATE ".MAIN_DB_PREFIX."projet_task_time"; + $sql2 .= " SET thm = ".$obj->user_thm." WHERE thm IS NULL AND fk_user = ".$obj->user_id; + $resql2 = $db->query($sql2); + if (!$resql2) + { + $error++; + dol_print_error($db); + } + } - if (!$error) $db->commit(); - else $db->rollback(); + if (!$error) $db->commit(); + else $db->rollback(); - print''; + print''; - if ($error) break; + if ($error) break; - $i++; - } - } - else - { - print 'No time spent with empty line on users with a hourly rate defined'; - } - } - else - { - dol_print_error($db); - } + $i++; + } + } else { + print 'No time spent with empty line on users with a hourly rate defined'; + } + } else { + dol_print_error($db); + } } // force_disable_of_modules_not_found if ($ok && GETPOST('force_disable_of_modules_not_found', 'alpha')) { - print '
    *** Force modules not found physicaly to be disabled (only modules adding js, css or hooks can be detected as removed physicaly)'; + print '
    *** Force modules not found physicaly to be disabled (only modules adding js, css or hooks can be detected as removed physicaly)'; - $arraylistofkey = array('hooks', 'js', 'css'); + $arraylistofkey = array('hooks', 'js', 'css'); - foreach ($arraylistofkey as $key) - { - $sql = "SELECT DISTINCT name, value"; - $sql .= " FROM ".MAIN_DB_PREFIX."const as c"; - $sql .= " WHERE name LIKE 'MAIN_MODULE_%_".strtoupper($key)."'"; - $sql .= " ORDER BY name"; + foreach ($arraylistofkey as $key) + { + $sql = "SELECT DISTINCT name, value"; + $sql .= " FROM ".MAIN_DB_PREFIX."const as c"; + $sql .= " WHERE name LIKE 'MAIN_MODULE_%_".strtoupper($key)."'"; + $sql .= " ORDER BY name"; - $resql = $db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - if ($num) - { - $i = 0; - while ($i < $num) - { - $obj = $db->fetch_object($resql); - $constantname = $obj->name; // Name of constant for hook or js or css declaration + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + if ($num) + { + $i = 0; + while ($i < $num) + { + $obj = $db->fetch_object($resql); + $constantname = $obj->name; // Name of constant for hook or js or css declaration - print ''; - print $constantname; + print ''; + print $constantname; - $db->begin(); + $db->begin(); - $reg = array(); - if (preg_match('/MAIN_MODULE_(.*)_'.strtoupper($key).'/i', $constantname, $reg)) - { - $name = strtolower($reg[1]); + $reg = array(); + if (preg_match('/MAIN_MODULE_(.*)_'.strtoupper($key).'/i', $constantname, $reg)) + { + $name = strtolower($reg[1]); - if ($name) // An entry for key $key and module $name was found in database. - { - $reloffile = ''; + if ($name) // An entry for key $key and module $name was found in database. + { + $reloffile = ''; $result = 'found'; - if ($key == 'hooks') $reloffile = $name.'/class/actions_'.$name.'.class.php'; - if ($key == 'js') - { - $value = $obj->value; - $valuearray = json_decode($value); - $reloffile = $valuearray[0]; - $reloffile = preg_replace('/^\//', '', $valuearray[0]); - } - if ($key == 'css') - { - $value = $obj->value; - $valuearray = json_decode($value); - if ($value && count($valuearray) == 0) $valuearray[0] = $value; // If value was not a json array but a string - $reloffile = preg_replace('/^\//', '', $valuearray[0]); - } + if ($key == 'hooks') $reloffile = $name.'/class/actions_'.$name.'.class.php'; + if ($key == 'js') + { + $value = $obj->value; + $valuearray = json_decode($value); + $reloffile = $valuearray[0]; + $reloffile = preg_replace('/^\//', '', $valuearray[0]); + } + if ($key == 'css') + { + $value = $obj->value; + $valuearray = json_decode($value); + if ($value && count($valuearray) == 0) $valuearray[0] = $value; // If value was not a json array but a string + $reloffile = preg_replace('/^\//', '', $valuearray[0]); + } - if ($reloffile) - { - //var_dump($key.' - '.$value.' - '.$reloffile); - try { - $result = dol_buildpath($reloffile, 0, 2); - } - catch (Exception $e) - { + if ($reloffile) + { + //var_dump($key.' - '.$value.' - '.$reloffile); + try { + $result = dol_buildpath($reloffile, 0, 2); + } catch (Exception $e) + { // No catch yet $result = 'found'; // If error, we force lke if we found to avoid any deletion - } - } + } + } - if (!$result) - { - print ' - File of '.$key.' ('.$reloffile.') NOT found, we disable the module.'; - if (GETPOST('force_disable_of_modules_not_found') == 'confirmed') - { - $sql2 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'MAIN_MODULE_".strtoupper($name)."_".strtoupper($key)."'"; - $resql2 = $db->query($sql2); - if (!$resql2) - { - $error++; - dol_print_error($db); - } - $sql3 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'MAIN_MODULE_".strtoupper($name)."'"; - $resql3 = $db->query($sql3); - if (!$resql3) - { - $error++; - dol_print_error($db); - } - else - print ' - Cleaned'; - } - else - { - print ' - Canceled (test mode)'; - } - } - else - { - print ' - File of '.$key.' ('.$reloffile.') found, we do nothing.'; - } - } + if (!$result) + { + print ' - File of '.$key.' ('.$reloffile.') NOT found, we disable the module.'; + if (GETPOST('force_disable_of_modules_not_found') == 'confirmed') + { + $sql2 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'MAIN_MODULE_".strtoupper($name)."_".strtoupper($key)."'"; + $resql2 = $db->query($sql2); + if (!$resql2) + { + $error++; + dol_print_error($db); + } + $sql3 = "DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = 'MAIN_MODULE_".strtoupper($name)."'"; + $resql3 = $db->query($sql3); + if (!$resql3) + { + $error++; + dol_print_error($db); + } else print ' - Cleaned'; + } else { + print ' - Canceled (test mode)'; + } + } else { + print ' - File of '.$key.' ('.$reloffile.') found, we do nothing.'; + } + } - if (!$error) $db->commit(); - else $db->rollback(); - } + if (!$error) $db->commit(); + else $db->rollback(); + } - print''; + print''; - if ($error) break; + if ($error) break; - $i++; - } - } - else - { - print 'No active module with missing files found by searching on MAIN_MODULE_(.*)_'.strtoupper($key).''; - } - } - else - { - dol_print_error($db); - } - } + $i++; + } + } else { + print 'No active module with missing files found by searching on MAIN_MODULE_(.*)_'.strtoupper($key).''; + } + } else { + dol_print_error($db); + } + } } @@ -1333,14 +1267,10 @@ if ($ok && GETPOST('clean_perm_table', 'alpha')) } $i++; } - } - else - { + } else { print 'No lines of a disabled external module (with id > 100000) found into table rights_def'; } - } - else - { + } else { dol_print_error($db); } } @@ -1350,57 +1280,54 @@ if ($ok && GETPOST('clean_perm_table', 'alpha')) // force utf8 on tables if ($ok && GETPOST('force_utf8_on_tables', 'alpha')) { - print '
    *** Force page code and collation of tables into utf8/utf8_unicode_ci (for mysql/mariadb only)'; + print '
    *** Force page code and collation of tables into utf8/utf8_unicode_ci (for mysql/mariadb only)'; - if ($db->type == "mysql" || $db->type == "mysqli") - { - $force_utf8_on_tables = GETPOST('force_utf8_on_tables', 'alpha'); + if ($db->type == "mysql" || $db->type == "mysqli") + { + $force_utf8_on_tables = GETPOST('force_utf8_on_tables', 'alpha'); - $listoftables = $db->DDLListTables($db->database_name); + $listoftables = $db->DDLListTables($db->database_name); - // Disable foreign key checking for avoid errors - if ($force_utf8_on_tables == 'confirmed') - { - $sql = 'SET FOREIGN_KEY_CHECKS=0'; - print ''; - $resql = $db->query($sql); - } + // Disable foreign key checking for avoid errors + if ($force_utf8_on_tables == 'confirmed') + { + $sql = 'SET FOREIGN_KEY_CHECKS=0'; + print ''; + $resql = $db->query($sql); + } - foreach ($listoftables as $table) - { - // do not convert llx_const if mysql encrypt/decrypt is used - if ($conf->db->dolibarr_main_db_encryption != 0 && preg_match('/\_const$/', $table)) continue; + foreach ($listoftables as $table) + { + // do not convert llx_const if mysql encrypt/decrypt is used + if ($conf->db->dolibarr_main_db_encryption != 0 && preg_match('/\_const$/', $table)) continue; - print ''; - print $table; - $sql = 'ALTER TABLE '.$table.' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci'; - print ''; - if ($force_utf8_on_tables == 'confirmed') - { - $resql = $db->query($sql); - print ' - Done ('.($resql ? 'OK' : 'KO').')'; - } - else print ' - Disabled'; - print ''; - } + print ''; + print $table; + $sql = 'ALTER TABLE '.$table.' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci'; + print ''; + if ($force_utf8_on_tables == 'confirmed') + { + $resql = $db->query($sql); + print ' - Done ('.($resql ? 'OK' : 'KO').')'; + } else print ' - Disabled'; + print ''; + } - // Enable foreign key checking - if ($force_utf8_on_tables == 'confirmed') - { - $sql = 'SET FOREIGN_KEY_CHECKS=1'; - print ''; - $resql = $db->query($sql); - } - } - else - { - print 'Not available with database type '.$db->type.''; - } + // Enable foreign key checking + if ($force_utf8_on_tables == 'confirmed') + { + $sql = 'SET FOREIGN_KEY_CHECKS=1'; + print ''; + $resql = $db->query($sql); + } + } else { + print 'Not available with database type '.$db->type.''; + } } // if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { - /* + /* * This script is meant to be run when upgrading from a dolibarr version < 3.8 * to a newer version. * @@ -1426,115 +1353,113 @@ if ($ok && GETPOST('repair_link_dispatch_lines_supplier_order_lines')) { $repair_link_dispatch_lines_supplier_order_lines = GETPOST('repair_link_dispatch_lines_supplier_order_lines', 'alpha'); - echo 'Repair llx_commande_fournisseur_dispatch.fk_commandefourndet'; - echo 'Repair in progress. This may take a while.'; + echo 'Repair llx_commande_fournisseur_dispatch.fk_commandefourndet'; + echo 'Repair in progress. This may take a while.'; - $sql_dispatch = 'SELECT * FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch WHERE COALESCE(fk_commandefourndet, 0) = 0'; - $db->begin(); - $resql_dispatch = $db->query($sql_dispatch); - $n_processed_rows = 0; - $errors = array(); - if ($resql_dispatch) { - if ($db->num_rows($resql_dispatch) == 0) { - echo 'Nothing to do.'; - exit; - } - while ($obj_dispatch = $db->fetch_object($resql_dispatch)) { - $sql_line = 'SELECT line.rowid, line.qty FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet AS line'; - $sql_line .= ' WHERE line.fk_commande = '.$obj_dispatch->fk_commande; - $sql_line .= ' AND line.fk_product = '.$obj_dispatch->fk_product; - $resql_line = $db->query($sql_line); + $sql_dispatch = 'SELECT * FROM '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch WHERE COALESCE(fk_commandefourndet, 0) = 0'; + $db->begin(); + $resql_dispatch = $db->query($sql_dispatch); + $n_processed_rows = 0; + $errors = array(); + if ($resql_dispatch) { + if ($db->num_rows($resql_dispatch) == 0) { + echo 'Nothing to do.'; + exit; + } + while ($obj_dispatch = $db->fetch_object($resql_dispatch)) { + $sql_line = 'SELECT line.rowid, line.qty FROM '.MAIN_DB_PREFIX.'commande_fournisseurdet AS line'; + $sql_line .= ' WHERE line.fk_commande = '.$obj_dispatch->fk_commande; + $sql_line .= ' AND line.fk_product = '.$obj_dispatch->fk_product; + $resql_line = $db->query($sql_line); - // s’il y a plusieurs lignes avec le même produit sur cette commande fournisseur, - // on divise la ligne de dispatch en autant de lignes qu’on en a sur la commande pour le produit - // et on met la quantité de la ligne dans la limite du "budget" indiqué par dispatch.qty + // s’il y a plusieurs lignes avec le même produit sur cette commande fournisseur, + // on divise la ligne de dispatch en autant de lignes qu’on en a sur la commande pour le produit + // et on met la quantité de la ligne dans la limite du "budget" indiqué par dispatch.qty - $remaining_qty = $obj_dispatch->qty; - $first_iteration = true; - if (!$resql_line) { - echo 'Unable to find a matching supplier order line for dispatch #'.$obj_dispatch->rowid.''; - $errors[] = $sql_line; - $n_processed_rows++; - continue; - } - if ($db->num_rows($resql_line) == 0) continue; - while ($obj_line = $db->fetch_object($resql_line)) { - if (!$remaining_qty) break; - if (!$obj_line->rowid) { - continue; - } - $qty_for_line = min($remaining_qty, $obj_line->qty); - if ($first_iteration) { - $sql_attach = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; - $sql_attach .= ' SET fk_commandefourndet = '.$obj_line->rowid.', qty = '.$qty_for_line; - $sql_attach .= ' WHERE rowid = '.$obj_dispatch->rowid; - $first_iteration = false; - } else { - $sql_attach_values = array( - $obj_dispatch->fk_commande, - $obj_dispatch->fk_product, - $obj_line->rowid, - $qty_for_line, - $obj_dispatch->fk_entrepot, - $obj_dispatch->fk_user, - $obj_dispatch->datec ? '"'.$db->escape($obj_dispatch->datec).'"' : 'NULL', - $obj_dispatch->comment ? '"'.$db->escape($obj_dispatch->comment).'"' : 'NULL', - $obj_dispatch->status ?: 'NULL', - $obj_dispatch->tms ? '"'.$db->escape($obj_dispatch->tms).'"' : 'NULL', - $obj_dispatch->batch ?: 'NULL', - $obj_dispatch->eatby ? '"'.$db->escape($obj_dispatch->eatby).'"' : 'NULL', - $obj_dispatch->sellby ? '"'.$db->escape($obj_dispatch->sellby).'"' : 'NULL' - ); - $sql_attach_values = join(', ', $sql_attach_values); + $remaining_qty = $obj_dispatch->qty; + $first_iteration = true; + if (!$resql_line) { + echo 'Unable to find a matching supplier order line for dispatch #'.$obj_dispatch->rowid.''; + $errors[] = $sql_line; + $n_processed_rows++; + continue; + } + if ($db->num_rows($resql_line) == 0) continue; + while ($obj_line = $db->fetch_object($resql_line)) { + if (!$remaining_qty) break; + if (!$obj_line->rowid) { + continue; + } + $qty_for_line = min($remaining_qty, $obj_line->qty); + if ($first_iteration) { + $sql_attach = 'UPDATE '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; + $sql_attach .= ' SET fk_commandefourndet = '.$obj_line->rowid.', qty = '.$qty_for_line; + $sql_attach .= ' WHERE rowid = '.$obj_dispatch->rowid; + $first_iteration = false; + } else { + $sql_attach_values = array( + $obj_dispatch->fk_commande, + $obj_dispatch->fk_product, + $obj_line->rowid, + $qty_for_line, + $obj_dispatch->fk_entrepot, + $obj_dispatch->fk_user, + $obj_dispatch->datec ? '"'.$db->escape($obj_dispatch->datec).'"' : 'NULL', + $obj_dispatch->comment ? '"'.$db->escape($obj_dispatch->comment).'"' : 'NULL', + $obj_dispatch->status ?: 'NULL', + $obj_dispatch->tms ? '"'.$db->escape($obj_dispatch->tms).'"' : 'NULL', + $obj_dispatch->batch ?: 'NULL', + $obj_dispatch->eatby ? '"'.$db->escape($obj_dispatch->eatby).'"' : 'NULL', + $obj_dispatch->sellby ? '"'.$db->escape($obj_dispatch->sellby).'"' : 'NULL' + ); + $sql_attach_values = join(', ', $sql_attach_values); - $sql_attach = 'INSERT INTO '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; - $sql_attach .= ' (fk_commande, fk_product, fk_commandefourndet, qty, fk_entrepot, fk_user, datec, comment, status, tms, batch, eatby, sellby)'; - $sql_attach .= ' VALUES ('.$sql_attach_values.')'; - } + $sql_attach = 'INSERT INTO '.MAIN_DB_PREFIX.'commande_fournisseur_dispatch'; + $sql_attach .= ' (fk_commande, fk_product, fk_commandefourndet, qty, fk_entrepot, fk_user, datec, comment, status, tms, batch, eatby, sellby)'; + $sql_attach .= ' VALUES ('.$sql_attach_values.')'; + } - if ($repair_link_dispatch_lines_supplier_order_lines == 'confirmed') - { - $resql_attach = $db->query($sql_attach); - } - else - { - $resql_attach = true; // Force success in test mode - } + if ($repair_link_dispatch_lines_supplier_order_lines == 'confirmed') + { + $resql_attach = $db->query($sql_attach); + } else { + $resql_attach = true; // Force success in test mode + } - if ($resql_attach) { - $remaining_qty -= $qty_for_line; - } else { - $errors[] = $sql_attach; - } + if ($resql_attach) { + $remaining_qty -= $qty_for_line; + } else { + $errors[] = $sql_attach; + } - $first_iteration = false; - } - $n_processed_rows++; + $first_iteration = false; + } + $n_processed_rows++; - // report progress every 256th row - if (!($n_processed_rows & 0xff)) { - echo 'Processed '.$n_processed_rows.' rows with '.count($errors).' errors…'."\n"; - flush(); - ob_flush(); - } - } - } else { - echo 'Unable to find any dispatch without an fk_commandefourndet.'."\n"; - echo $sql_dispatch."\n"; - } - echo 'Fixed '.$n_processed_rows.' rows with '.count($errors).' errors…'."\n"; - echo 'DONE.'."\n"; + // report progress every 256th row + if (!($n_processed_rows & 0xff)) { + echo 'Processed '.$n_processed_rows.' rows with '.count($errors).' errors…'."\n"; + flush(); + ob_flush(); + } + } + } else { + echo 'Unable to find any dispatch without an fk_commandefourndet.'."\n"; + echo $sql_dispatch."\n"; + } + echo 'Fixed '.$n_processed_rows.' rows with '.count($errors).' errors…'."\n"; + echo 'DONE.'."\n"; - if (count($errors)) { - $db->rollback(); - echo 'The transaction was rolled back due to errors: nothing was changed by the script.'; - } else { - $db->commit(); - } - $db->close(); + if (count($errors)) { + $db->rollback(); + echo 'The transaction was rolled back due to errors: nothing was changed by the script.'; + } else { + $db->commit(); + } + $db->close(); - echo '

    SQL queries with errors:

    '; - echo ''.join('', $errors).''; + echo '

    SQL queries with errors:

    '; + echo ''.join('', $errors).''; } print ''; @@ -1543,7 +1468,7 @@ print ''; if (empty($actiondone)) { - print '
    '.$langs->trans("ErrorWrongParameters").'
    '; + print '
    '.$langs->trans("ErrorWrongParameters").'
    '; } if ($oneoptionset) @@ -1551,9 +1476,7 @@ if ($oneoptionset) print ''; -} -else -{ +} else { print '
    '; print $langs->trans("SetAtLeastOneOptionAsUrlParameter"); print '
    '; diff --git a/htdocs/install/sqlite3/functions/index.html b/htdocs/install/sqlite3/functions/index.html new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/htdocs/install/sqlite3/functions/index.html @@ -0,0 +1 @@ + diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index a5e6b9d3377..9d0d0a99038 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -55,8 +55,8 @@ $db_user = GETPOST('db_user', 'alpha') ?GETPOST('db_user', 'alpha') : (empty($ar $db_pass = GETPOST('db_pass', 'none') ?GETPOST('db_pass', 'none') : (empty($argv[12]) ? '' : $argv[12]); $db_port = GETPOST('db_port', 'int') ?GETPOST('db_port', 'int') : (empty($argv[13]) ? '' : $argv[13]); $db_prefix = GETPOST('db_prefix', 'aZ09') ?GETPOST('db_prefix', 'aZ09') : (empty($argv[14]) ? '' : $argv[14]); -$db_create_database = GETPOST('db_create_database', 'none') ?GETPOST('db_create_database', 'none') : (empty($argv[15]) ? '' : $argv[15]); -$db_create_user = GETPOST('db_create_user', 'none') ?GETPOST('db_create_user', 'none') : (empty($argv[16]) ? '' : $argv[16]); +$db_create_database = GETPOST('db_create_database', 'alpha') ?GETPOST('db_create_database', 'alpha') : (empty($argv[15]) ? '' : $argv[15]); +$db_create_user = GETPOST('db_create_user', 'alpha') ?GETPOST('db_create_user', 'alpha') : (empty($argv[16]) ? '' : $argv[16]); // Force https $main_force_https = ((GETPOST("main_force_https", 'alpha') && (GETPOST("main_force_https", 'alpha') == "on" || GETPOST("main_force_https", 'alpha') == 1)) ? '1' : '0'); // Use alternative directory @@ -226,13 +226,10 @@ if (!$error) { if ($db_type == 'mysql' || $db_type == 'mysqli') { $databasefortest = 'mysql'; - } - elseif ($db_type == 'pgsql') + } elseif ($db_type == 'pgsql') { $databasefortest = 'postgres'; - } - else - { + } else { $databasefortest = 'master'; } } @@ -274,9 +271,7 @@ if (!$error) { $error++; } } - } - else - { + } else { print "
    \nFailed to include_once(\"".$main_dir."/core/db/".$db_type.".class.php\")
    \n"; print '
    '.$langs->trans("ErrorWrongValueForParameter", $langs->transnoentities("WebPagesDirectory")).'
    '; //print ''; @@ -284,10 +279,7 @@ if (!$error) { //print ''; $error++; } -} - -else -{ +} else { if (isset($db)) print $db->lasterror(); if (isset($db) && !$db->connected) print '
    '.$langs->trans("BecauseConnectionFailedParametersMayBeWrong").'

    '; print $langs->trans("ErrorGoBackAndCorrectParameters"); @@ -317,8 +309,7 @@ if (!$error && $db->connected) $defaultCharacterSet = $db->forcecharset; $defaultDBSortingCollation = $db->forcecollate; - } - else // If already created, we take current value + } else // If already created, we take current value { $defaultCharacterSet = $db->getDefaultCharacterSetDatabase(); $defaultDBSortingCollation = $db->getDefaultCollationDatabase(); @@ -400,9 +391,7 @@ if (!$error && $db->connected && $action == "set") print ""; print '
    '.$langs->trans("CorrectProblemAndReloadPage", $_SERVER['PHP_SELF'].'?testget=ok').''; $error++; - } - else - { + } else { // Create .htaccess file in document directory $pathhtaccess = $main_data_dir.'/.htaccess'; if (!file_exists($pathhtaccess)) @@ -437,9 +426,7 @@ if (!$error && $db->connected && $action == "set") if (is_dir($dir[$i])) { dolibarr_install_syslog("step1: directory '".$dir[$i]."' exists"); - } - else - { + } else { if (dol_mkdir($dir[$i]) < 0) { print ""; @@ -448,9 +435,7 @@ if (!$error && $db->connected && $action == "set") print $langs->trans("Error"); print ""; $error++; - } - else - { + } else { dolibarr_install_syslog("step1: directory '".$dir[$i]."' created"); } } @@ -471,9 +456,7 @@ if (!$error && $db->connected && $action == "set") print ''.$langs->trans("Error").''; print ""; print '
    '.$langs->trans("CorrectProblemAndReloadPage", $_SERVER['PHP_SELF'].'?testget=ok').''; - } - else - { + } else { //ODT templates $srcroot = $main_dir.'/install/doctemplates'; $destroot = $main_data_dir.'/doctemplates'; @@ -546,12 +529,10 @@ if (!$error && $db->connected && $action == "set") if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') { $databasefortest = 'mysql'; - } - elseif ($conf->db->type == 'pgsql') + } elseif ($conf->db->type == 'pgsql') { $databasefortest = 'postgres'; - } - elseif ($conf->db->type == 'mssql') + } elseif ($conf->db->type == 'mssql') { $databasefortest = 'master'; } @@ -591,9 +572,7 @@ if (!$error && $db->connected && $action == "set") print $dolibarr_main_db_user; print ''; print 'Ok'; - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS' || $db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS' || $db->errno() == 'DB_ERROR_USER_ALREADY_EXISTS') @@ -604,9 +583,7 @@ if (!$error && $db->connected && $action == "set") print $dolibarr_main_db_user; print ''; print ''.$langs->trans("LoginAlreadyExists").''; - } - else - { + } else { dolibarr_install_syslog("step1: failed to create user", LOG_ERR); print ''; print $langs->trans("UserCreation").' : '; @@ -617,9 +594,7 @@ if (!$error && $db->connected && $action == "set") } $db->close(); - } - else - { + } else { print ''; print $langs->trans("UserCreation").' : '; print $dolibarr_main_db_user; @@ -667,9 +642,7 @@ if (!$error && $db->connected && $action == "set") // If values differs, we save conf file again //if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('step1: value for character_set is not the one asked for database creation', LOG_WARNING); //if ($check2 != $dolibarr_main_db_collation) dolibarr_install_syslog('step1: value for collation is not the one asked for database creation', LOG_WARNING); - } - else - { + } else { // warning message print '
    '; print $langs->trans("ErrorFailedToCreateDatabase", $dolibarr_main_db_name).'
    '; @@ -682,8 +655,7 @@ if (!$error && $db->connected && $action == "set") $error++; } $newdb->close(); - } - else { + } else { print ''; print $langs->trans("DatabaseCreation")." (".$langs->trans("User")." ".$userroot.") : "; print $dolibarr_main_db_name; @@ -734,9 +706,7 @@ if (!$error && $db->connected && $action == "set") print ""; $error = 0; - } - else - { + } else { dolibarr_install_syslog("step1: connection to database ".$conf->db->name." by user ".$conf->db->user." failed", LOG_ERR); print ""; print $langs->trans("DatabaseConnection")." (".$langs->trans("User")." ".$conf->db->user.") : "; @@ -754,9 +724,7 @@ if (!$error && $db->connected && $action == "set") $error++; } - } - else - { + } else { dolibarr_install_syslog("step1: connection to server by user ".$conf->db->user." failed", LOG_ERR); print ""; print $langs->trans("ServerConnection")." (".$langs->trans("User")." ".$conf->db->user.") : "; @@ -871,7 +839,7 @@ function write_conf_file($conffile) global $force_dolibarr_lib_TCPDF_PATH, $force_dolibarr_lib_FPDI_PATH; global $force_dolibarr_lib_PHPEXCEL_PATH, $force_dolibarr_lib_GEOIP_PATH; global $force_dolibarr_lib_ODTPHP_PATH, $force_dolibarr_lib_ODTPHP_PATHTOPCLZIP; - global $force_dolibarr_js_CKEDITOR, $force_dolibarr_js_JQUERY, $force_dolibarr_js_JQUERY_UI, $force_dolibarr_js_JQUERY_FLOT; + global $force_dolibarr_js_CKEDITOR, $force_dolibarr_js_JQUERY, $force_dolibarr_js_JQUERY_UI; global $force_dolibarr_font_DOL_DEFAULT_TTF, $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD; $error = 0; @@ -1004,9 +972,6 @@ function write_conf_file($conffile) if (empty($force_dolibarr_js_JQUERY_UI)) { fputs($fp, '//'); $force_dolibarr_js_JQUERY_UI = ''; } fputs($fp, '$dolibarr_js_JQUERY_UI=\''.$force_dolibarr_js_JQUERY_UI.'\';'); fputs($fp, "\n"); - if (empty($force_dolibarr_js_JQUERY_FLOT)) { fputs($fp, '//'); $force_dolibarr_js_JQUERY_FLOT = ''; } - fputs($fp, '$dolibarr_js_JQUERY_FLOT=\''.$force_dolibarr_js_JQUERY_FLOT.'\';'); - fputs($fp, "\n"); // Write params to overwrites default font path fputs($fp, "\n"); @@ -1030,9 +995,7 @@ function write_conf_file($conffile) print ""; print 'Ok'; print ""; - } - else - { + } else { $error++; } } diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php index 4f4accf6fa7..25fde52dd58 100644 --- a/htdocs/install/step2.php +++ b/htdocs/install/step2.php @@ -99,9 +99,7 @@ if ($action == "set") print ""; print $langs->trans("ServerConnection")." : ".$conf->db->host.'Ok'; $ok = 1; - } - else - { + } else { print "Failed to connect to server : ".$conf->db->host.'Error'; } @@ -110,9 +108,7 @@ if ($action == "set") if ($db->database_selected) { dolibarr_install_syslog("step2: successful connection to database: ".$conf->db->name); - } - else - { + } else { dolibarr_install_syslog("step2: failed connection to database :".$conf->db->name, LOG_ERR); print "Failed to select database ".$conf->db->name.'Error'; $ok = 0; @@ -201,9 +197,7 @@ if ($action == "set") if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') // For Mysql 5.5+, we must replace type=innodb with ENGINE=innodb { $buffer = preg_replace('/type=innodb/i', 'ENGINE=innodb', $buffer); - } - else - { + } else { // Keyword ENGINE is MySQL-specific, so scrub it for // other database types (mssql, pgsql) $buffer = preg_replace('/type=innodb/i', '', $buffer); @@ -225,16 +219,12 @@ if ($action == "set") { // print "OK requete ==== $buffer"; $db->free($resql); - } - else - { + } else { if ($db->errno() == 'DB_ERROR_TABLE_ALREADY_EXISTS' || $db->errno() == 'DB_ERROR_TABLE_OR_KEY_ALREADY_EXISTS') { //print "Deja existante"; - } - else - { + } else { print "".$langs->trans("CreateTableAndPrimaryKey", $name); print "
    \n".$langs->trans("Request").' '.$requestnb.' : '.$buffer.'
    Executed query : '.$db->lastquery; print "\n"; @@ -242,9 +232,7 @@ if ($action == "set") $error++; } } - } - else - { + } else { print "".$langs->trans("CreateTableAndPrimaryKey", $name); print ""; print ''.$langs->trans("Error").' Failed to open file '.$dir.$file.''; @@ -261,9 +249,7 @@ if ($action == "set") print $langs->trans("TablesAndPrimaryKeysCreation").'Ok'; $ok = 1; } - } - else - { + } else { print ''.$langs->trans("ErrorFailedToFindSomeFiles", $dir).'Error'; dolibarr_install_syslog("step2: failed to find files to create database in directory ".$dir, LOG_ERR); } @@ -368,9 +354,7 @@ if ($action == "set") { //print "OK requete ==== $buffer"; $db->free($resql); - } - else - { + } else { if ($db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS' || $db->errno() == 'DB_ERROR_CANNOT_CREATE' || $db->errno() == 'DB_ERROR_PRIMARY_KEY_ALREADY_EXISTS' || @@ -379,9 +363,7 @@ if ($action == "set") { //print "Deja existante"; $key_exists = 1; - } - else - { + } else { print "".$langs->trans("CreateOtherKeysForTable", $name); print "
    \n".$langs->trans("Request").' '.$requestnb.' : '.$db->lastqueryerror(); print "\n"; @@ -391,9 +373,7 @@ if ($action == "set") } } } - } - else - { + } else { print "".$langs->trans("CreateOtherKeysForTable", $name); print ""; print ''.$langs->trans("Error")." Failed to open file ".$dir.$file.""; @@ -464,16 +444,12 @@ if ($action == "set") { $ok = 1; $db->free($resql); - } - else - { + } else { if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS' || $db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS') { //print "Insert line : ".$buffer."
    \n"; - } - else - { + } else { $ok = 0; print "".$langs->trans("FunctionsCreation"); @@ -490,9 +466,7 @@ if ($action == "set") if ($ok) { print 'Ok'; - } - else - { + } else { print 'Error'; $ok = 1; } @@ -588,15 +562,11 @@ if ($action == "set") if ($resql) { //$db->free($resql); // Not required as request we launch here does not return memory needs. - } - else - { + } else { if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS') { //print "Insertion ligne : $buffer"; - } - else - { + } else { $ok = 0; $okallfile = 0; print ''.$langs->trans("ErrorSQL")." : ".$db->lasterrno()." - ".$db->lastqueryerror()." - ".$db->lasterror()."
    "; @@ -613,17 +583,13 @@ if ($action == "set") if ($ok) { print 'Ok'; - } - else - { + } else { print 'Error'; $ok = 1; // Data loading are not blocking errors } } print ''; -} -else -{ +} else { print 'Parameter action=set not defined'; } diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index b74594ce8da..ed64de7cbb1 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -130,8 +130,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted - } - else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } $conf->db->type = $dolibarr_main_db_type; @@ -187,8 +186,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) dolibarr_set_const($db, "MAIN_SECURITY_SALT", dol_print_date(dol_now(), 'dayhourlog'), 'chaine', 0, '', 0); // All entities if (function_exists('password_hash')) dolibarr_set_const($db, "MAIN_SECURITY_HASH_ALGO", 'password_hash', 'chaine', 0, '', 0); // All entities - else - dolibarr_set_const($db, "MAIN_SECURITY_HASH_ALGO", 'sha1md5', 'chaine', 0, '', 0); // All entities + else dolibarr_set_const($db, "MAIN_SECURITY_HASH_ALGO", 'sha1md5', 'chaine', 0, '', 0); // All entities } dolibarr_install_syslog('step5: DATABASE_PWD_ENCRYPTED = '.$conf->global->DATABASE_PWD_ENCRYPTED.' MAIN_SECURITY_HASH_ALGO = '.$conf->global->MAIN_SECURITY_HASH_ALGO, LOG_INFO); @@ -214,17 +212,13 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) { print $langs->trans("AdminLoginCreatedSuccessfuly", $login)."
    "; $success = 1; - } - else - { + } else { if ($newuser->error == 'ErrorLoginAlreadyExists') { dolibarr_install_syslog('step5: AdminLoginAlreadyExists', LOG_WARNING); print '
    '.$langs->trans("AdminLoginAlreadyExists", $login)."

    "; $success = 1; - } - else - { + } else { dolibarr_install_syslog('step5: FailedToCreateAdminLogin '.$newuser->error, LOG_ERR); print '
    '.$langs->trans("FailedToCreateAdminLogin").' '.$newuser->error.'


    '; } @@ -240,9 +234,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) { $conf->global->MAIN_VERSION_FIRST_INSTALL = $targetversion; $db->commit(); - } - else - { + } else { //if (! $resql) dol_print_error($db,'Error in setup program'); // We ignore errors. Key may already exists $db->commit(); } @@ -292,9 +284,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) $db->commit(); } - } - else - { + } else { print $langs->trans("ErrorFailedToConnect")."
    "; } } @@ -311,8 +301,7 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) // Define if we need to update the MAIN_VERSION_LAST_UPGRADE value in database $tagdatabase = false; if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) $tagdatabase = true; // We don't know what it was before, so now we consider we are version choosed. - else - { + else { $mainversionlastupgradearray = preg_split('/[.-]/', $conf->global->MAIN_VERSION_LAST_UPGRADE); $targetversionarray = preg_split('/[.-]/', $targetversion); if (versioncompare($targetversionarray, $mainversionlastupgradearray) > 0) $tagdatabase = true; @@ -326,19 +315,13 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i', $action)) $resql = $db->query("INSERT INTO ".MAIN_DB_PREFIX."const(name,value,type,visible,note,entity) VALUES (".$db->encrypt('MAIN_VERSION_LAST_UPGRADE', 1).",".$db->encrypt($targetversion, 1).",'chaine',0,'Dolibarr version for last upgrade',0)"); if (!$resql) dol_print_error($db, 'Error in setup program'); $conf->global->MAIN_VERSION_LAST_UPGRADE = $targetversion; - } - else - { + } else { dolibarr_install_syslog('step5: we run an upgrade to version '.$targetversion.' but database was already upgraded to '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'. We keep MAIN_VERSION_LAST_UPGRADE as it is.'); } - } - else - { + } else { print $langs->trans("ErrorFailedToConnect")."
    "; } - } - else - { + } else { dol_print_error('', 'step5.php: unknown choice of action'); } @@ -389,9 +372,7 @@ if ($action == "set" && $success) print ''; - } - else - { + } else { // If here MAIN_VERSION_LAST_UPGRADE is not empty print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
    '; print $langs->trans("VersionProgram").': '.DOL_VERSION.'
    '; @@ -437,9 +418,7 @@ elseif (empty($action) || preg_match('/upgrade/i', $action)) print '
    '; - } - else - { + } else { // If here MAIN_VERSION_LAST_UPGRADE is not empty print $langs->trans("VersionLastUpgrade").': '.$conf->global->MAIN_VERSION_LAST_UPGRADE.'
    '; print $langs->trans("VersionProgram").': '.DOL_VERSION.''; @@ -450,9 +429,7 @@ elseif (empty($action) || preg_match('/upgrade/i', $action)) print ' '.$langs->trans("GoToUpgradePage"); print '
    '; } -} -else -{ +} else { dol_print_error('', 'step5.php: unknown choice of action'); } diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index b71707bef4b..af05fb374d2 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -120,8 +120,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted - } - else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } // $conf is already instancied inside inc.php @@ -150,9 +149,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print $langs->trans("ServerConnection")." : $dolibarr_main_db_host".$langs->trans("OK")."\n"; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ServerConnection").": $dolibarr_main_db_host ".$langs->transnoentities("OK")); $ok = 1; - } - else - { + } else { print "".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."".$langs->transnoentities("Error")."\n"; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)); $ok = 0; @@ -166,9 +163,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name."".$langs->trans("OK")."\n"; dolibarr_install_syslog("upgrade: Database connection successful: ".$dolibarr_main_db_name); $ok = 1; - } - else - { + } else { print "".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."".$langs->trans("Error")."\n"; dolibarr_install_syslog("upgrade: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)); $ok = 0; @@ -292,9 +287,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $i++; } $db->free($resql); - } - else - { + } else { if ($db->lasterrno() != 'DB_ERROR_NOSUCHTABLE') { print ''.$sql.' : '.$db->lasterror()."\n"; @@ -334,9 +327,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ if (preg_match('/\.sql$/i', $file)) $filesindir[] = $file; } sort($filesindir); - } - else - { + } else { print '
    '.$langs->trans("ErrorCanNotReadDir", $dir).'
    '; } @@ -346,8 +337,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ if (preg_match('/'.$from.'/i', $file)) { $filelist[] = $file; - } - elseif (preg_match('/'.$to.'/i', $file)) // First test may be false if we migrate from x.y.* to x.y.* + } elseif (preg_match('/'.$to.'/i', $file)) // First test may be false if we migrate from x.y.* to x.y.* { $filelist[] = $file; } @@ -356,9 +346,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ if (count($filelist) == 0) { print '
    '.$langs->trans("ErrorNoMigrationFilesFoundForParameters").'
    '; - } - else - { + } else { $listoffileprocessed = array(); // Protection to avoid to process twice the same file // Loop on each migrate files diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 765a8796a76..6c154ca062a 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -1,6 +1,4 @@ * Copyright (C) 2005-2018 Laurent Destailleur * Copyright (C) 2005-2011 Regis Houssin @@ -68,8 +66,7 @@ $err = error_reporting(); error_reporting(0); if (!empty($conf->global->MAIN_OVERRIDE_TIME_LIMIT)) @set_time_limit((int) $conf->global->MAIN_OVERRIDE_TIME_LIMIT); -else - @set_time_limit(600); +else @set_time_limit(600); error_reporting($err); $setuplang = GETPOST("selectlang", 'aZ09', 3) ?GETPOST("selectlang", 'aZ09', 3) : 'auto'; @@ -127,8 +124,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ $dolibarr_main_db_pass = preg_replace('/crypted:/i', '', $dolibarr_main_db_pass); $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_pass); $dolibarr_main_db_encrypted_pass = $dolibarr_main_db_pass; // We need to set this as it is used to know the password was initially crypted - } - else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); + } else $dolibarr_main_db_pass = dol_decode($dolibarr_main_db_encrypted_pass); } // $conf is already instancied inside inc.php @@ -158,9 +154,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ if ($db->database_selected) { dolibarr_install_syslog('upgrade2: database connection successful :'.$dolibarr_main_db_name); - } - else - { + } else { $error++; } } @@ -535,17 +529,13 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ print $hookmanager->error; print ""; print ''; - } - else - { + } else { print ''; print ''.$langs->trans('UpgradeExternalModule').': OK'; print ""; print ''; } - } - else - { + } else { //if (! empty($conf->modules)) if (!empty($conf->modules_parts['hooks'])) // If there is at least one module with one hook, we show message to say nothing was done { @@ -584,9 +574,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ migrate_rename_directories($db, $langs, $conf, '/banque/bordereau', '/bank/checkdeposits'); print '

    '.$langs->trans("MigrationFinished").'
    '; -} -else -{ +} else { print '
    '.$langs->trans('ErrorWrongParameters').'
    '; $error++; } @@ -645,9 +633,7 @@ function migrate_paiements($db, $langs, $conf) $row[$i][2] = $obj->amount; $i++; } - } - else - { + } else { dol_print_error($db); } @@ -677,20 +663,14 @@ function migrate_paiements($db, $langs, $conf) { $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."
    "; - } - else - { + } else { $db->rollback(); print $langs->trans('MigrationUpdateFailed').'
    '; } - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingToUpdate')."
    \n"; } - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingToUpdate')."
    \n"; } @@ -752,9 +732,7 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) } $i++; } - } - else - { + } else { dol_print_error($db); } @@ -793,9 +771,7 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) print $langs->trans('MigrationProcessPaymentUpdate', 'facid='.$facid.'-paymentid='.$row[$i]['paymentid'].'-amount='.$row[$i]['pamount'])."
    \n"; } - } - else - { + } else { print 'ERROR'; } } @@ -803,21 +779,15 @@ function migrate_paiements_orphelins_1($db, $langs, $conf) if ($res > 0) { print $langs->trans('MigrationSuccessfullUpdate')."
    "; - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."
    \n"; } $db->commit(); - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."
    \n"; } - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."
    \n"; } @@ -878,9 +848,7 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) } $i++; } - } - else - { + } else { dol_print_error($db); } @@ -920,9 +888,7 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) print $langs->trans('MigrationProcessPaymentUpdate', 'facid='.$facid.'-paymentid='.$row[$i]['paymentid'].'-amount='.$row[$i]['pamount'])."
    \n"; } - } - else - { + } else { print 'ERROR'; $nberr++; } @@ -931,16 +897,12 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) if ($res > 0) { print $langs->trans('MigrationSuccessfullUpdate')."
    "; - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."
    \n"; } $db->commit(); - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."
    \n"; } @@ -953,15 +915,11 @@ function migrate_paiements_orphelins_2($db, $langs, $conf) if (!$nberr) { $db->commit(); - } - else - { + } else { print 'ERROR'; $db->rollback(); } - } - else - { + } else { print $langs->trans('MigrationPaymentsNothingUpdatable')."
    \n"; } @@ -1020,20 +978,18 @@ function migrate_contracts_det($db, $langs, $conf) $sql .= $obj->cref.", ".($obj->fk_product ? $obj->fk_product : 0).", "; $sql .= "0, "; $sql .= "'".$db->escape($obj->label)."', null, "; - $sql .= ($obj->date_contrat ? "'".$obj->date_contrat."'" : "null").", "; + $sql .= ($obj->date_contrat ? "'".$db->escape($obj->date_contrat)."'" : "null").", "; $sql .= "null, "; $sql .= "null, "; - $sql .= "'".$obj->tva_tx."' , 1, "; - $sql .= "'".$obj->price."', '".$obj->price."', ".$obj->fk_user_author.","; + $sql .= "'".$db->escape($obj->tva_tx)."' , 1, "; + $sql .= "'".$db->escape($obj->price)."', '".$db->escape($obj->price)."', ".$obj->fk_user_author.","; $sql .= "null"; $sql .= ")"; if ($db->query($sql)) { print $langs->trans('MigrationContractsLineCreation', $obj->cref)."
    \n"; - } - else - { + } else { dol_print_error($db); $nberr++; } @@ -1046,20 +1002,14 @@ function migrate_contracts_det($db, $langs, $conf) // $db->rollback(); $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."
    "; - } - else - { + } else { $db->rollback(); print $langs->trans('MigrationUpdateFailed').'
    '; } - } - else - { + } else { print $langs->trans('MigrationContractsNothingToUpdate')."
    \n"; } - } - else - { + } else { print $langs->trans('MigrationContractsFieldDontExist')."
    \n"; // dol_print_error($db); } @@ -1132,19 +1082,14 @@ function migrate_links_transfert($db, $langs, $conf) // $db->rollback(); $db->commit(); print $langs->trans('MigrationSuccessfullUpdate')."
    "; - } - else - { + } else { $db->rollback(); print $langs->trans('MigrationUpdateFailed').'
    '; } - } - else { + } else { print $langs->trans('MigrationBankTransfertsNothingToUpdate')."
    \n"; } - } - else - { + } else { dol_print_error($db); } @@ -1172,8 +1117,7 @@ function migrate_contracts_date1($db, $langs, $conf) if (!$resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) print $langs->trans('MigrationContractsEmptyDatesUpdateSuccess')."
    \n"; - else - print $langs->trans('MigrationContractsEmptyDatesNothingToUpdate')."
    \n"; + else print $langs->trans('MigrationContractsEmptyDatesNothingToUpdate')."
    \n"; $sql = "update ".MAIN_DB_PREFIX."contrat set datec=tms where datec is null"; dolibarr_install_syslog("upgrade2::migrate_contracts_date1"); @@ -1181,8 +1125,7 @@ function migrate_contracts_date1($db, $langs, $conf) if (!$resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) print $langs->trans('MigrationContractsEmptyCreationDatesUpdateSuccess')."
    \n"; - else - print $langs->trans('MigrationContractsEmptyCreationDatesNothingToUpdate')."
    \n"; + else print $langs->trans('MigrationContractsEmptyCreationDatesNothingToUpdate')."
    \n"; print ''; } @@ -1228,9 +1171,11 @@ function migrate_contracts_date2($db, $langs, $conf) $obj = $db->fetch_object($resql); if ($obj->date_contrat > $obj->datemin) { + $datemin = $db->jdate($obj->datemin); + print $langs->trans('MigrationContractsInvalidDateFix', $obj->cref, $obj->date_contrat, $obj->datemin)."
    \n"; $sql = "UPDATE ".MAIN_DB_PREFIX."contrat"; - $sql .= " SET date_contrat='".$obj->datemin."'"; + $sql .= " SET date_contrat='".$db->idate($datemin)."'"; $sql .= " WHERE rowid=".$obj->cref; $resql2 = $db->query($sql); if (!$resql2) dol_print_error($db); @@ -1244,12 +1189,9 @@ function migrate_contracts_date2($db, $langs, $conf) if ($nbcontratsmodifie) print $langs->trans('MigrationContractsInvalidDatesNumber', $nbcontratsmodifie)."
    \n"; - else - print $langs->trans('MigrationContractsInvalidDatesNothingToUpdate')."
    \n"; + else print $langs->trans('MigrationContractsInvalidDatesNothingToUpdate')."
    \n"; } - } - else - { + } else { dol_print_error($db); } @@ -1277,8 +1219,7 @@ function migrate_contracts_date3($db, $langs, $conf) if (!$resql) dol_print_error($db); if ($db->affected_rows($resql) > 0) print $langs->trans('MigrationContractsIncoherentCreationDateUpdateSuccess')."
    \n"; - else - print $langs->trans('MigrationContractsIncoherentCreationDateNothingToUpdate')."
    \n"; + else print $langs->trans('MigrationContractsIncoherentCreationDateNothingToUpdate')."
    \n"; print ''; } @@ -1333,11 +1274,9 @@ function migrate_contracts_open($db, $langs, $conf) if ($nbcontratsmodifie) print $langs->trans('MigrationReopenedContractsNumber', $nbcontratsmodifie)."
    \n"; - else - print $langs->trans('MigrationReopeningContractsNothingToUpdate')."
    \n"; + else print $langs->trans('MigrationReopeningContractsNothingToUpdate')."
    \n"; } - } - else print $langs->trans('MigrationReopeningContractsNothingToUpdate')."
    \n"; + } else print $langs->trans('MigrationReopeningContractsNothingToUpdate')."
    \n"; print ''; } @@ -1415,24 +1354,18 @@ function migrate_paiementfourn_facturefourn($db, $langs, $conf) { $nb++; print ''.$langs->trans("OK").''; - } - else - { + } else { print 'Error on insert'; $error++; } print ''; } - } - else - { + } else { $error++; } $i++; } - } - else - { + } else { $error++; } @@ -1446,15 +1379,11 @@ function migrate_paiementfourn_facturefourn($db, $langs, $conf) $sql = "ALTER TABLE ".MAIN_DB_PREFIX."paiementfourn DROP COLUMN fk_facture_fourn"; $db->query($sql); - } - else - { + } else { print ''.$langs->trans("Error").''; $db->rollback(); } - } - else - { + } else { print ''.$langs->trans("AlreadyDone").''; } } @@ -1539,15 +1468,11 @@ function migrate_price_facture($db, $langs, $conf) if ($facture->update_price() > 0) { //print $facture->id; - } - else - { + } else { print "Error id=".$facture->id; $err++; } - } - else - { + } else { print "Error #3"; $err++; } @@ -1556,17 +1481,13 @@ function migrate_price_facture($db, $langs, $conf) $i++; } - } - else - { + } else { print $langs->trans("AlreadyDone"); } $db->free($resql); $db->commit(); - } - else - { + } else { print "Error #1 ".$db->error(); $err++; @@ -1664,18 +1585,14 @@ function migrate_price_propal($db, $langs, $conf) */ $i++; } - } - else - { + } else { print $langs->trans("AlreadyDone"); } $db->free($resql); $db->commit(); - } - else - { + } else { print "Error #1 ".$db->error(); $db->rollback(); @@ -1753,18 +1670,14 @@ function migrate_price_contrat($db, $langs, $conf) $i++; } - } - else - { + } else { print $langs->trans("AlreadyDone"); } $db->free($resql); $db->commit(); - } - else - { + } else { print "Error #1 ".$db->error(); $db->rollback(); @@ -1860,9 +1773,7 @@ function migrate_price_commande($db, $langs, $conf) */ $i++; } - } - else - { + } else { print $langs->trans("AlreadyDone"); } @@ -1879,9 +1790,7 @@ function migrate_price_commande($db, $langs, $conf) */ $db->commit(); - } - else - { + } else { print "Error #1 ".$db->error(); $db->rollback(); @@ -1977,9 +1886,7 @@ function migrate_price_commande_fournisseur($db, $langs, $conf) */ $i++; } - } - else - { + } else { print $langs->trans("AlreadyDone"); } @@ -1996,9 +1903,7 @@ function migrate_price_commande_fournisseur($db, $langs, $conf) */ $db->commit(); - } - else - { + } else { print "Error #1 ".$db->error(); $db->rollback(); @@ -2125,20 +2030,14 @@ function migrate_commande_expedition($db, $langs, $conf) $sql = "ALTER TABLE ".MAIN_DB_PREFIX."expedition DROP COLUMN fk_commande"; print $langs->trans('FieldRenamed')."
    \n"; $db->query($sql); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } print ''; @@ -2191,9 +2090,11 @@ function migrate_commande_livraison($db, $langs, $conf) if ($resql2) { + $date_livraison = $db->jdate($obj->date_livraison); + $sqlu = "UPDATE ".MAIN_DB_PREFIX."livraison SET"; - $sqlu .= " ref_client='".$obj->ref_client."'"; - $sqlu .= ", date_livraison='".$obj->date_livraison."'"; + $sqlu .= " ref_client='".$db->escape($obj->ref_client)."'"; + $sqlu .= ", date_livraison='".$db->idate($date_livraison)."'"; $sqlu .= " WHERE rowid = ".$obj->rowid; $resql3 = $db->query($sqlu); if (!$resql3) @@ -2201,9 +2102,7 @@ function migrate_commande_livraison($db, $langs, $conf) $error++; dol_print_error($db); } - } - else - { + } else { $error++; dol_print_error($db); } @@ -2218,20 +2117,14 @@ function migrate_commande_livraison($db, $langs, $conf) $sql = "ALTER TABLE ".MAIN_DB_PREFIX."livraison DROP COLUMN fk_commande"; print $langs->trans('FieldRenamed')."
    \n"; $db->query($sql); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } print ''; @@ -2283,8 +2176,8 @@ function migrate_detail_livraison($db, $langs, $conf) $sql = "UPDATE ".MAIN_DB_PREFIX."livraisondet SET"; $sql .= " fk_product=".$obj->fk_product; $sql .= ",description='".$db->escape($obj->description)."'"; - $sql .= ",subprice='".$obj->subprice."'"; - $sql .= ",total_ht='".$obj->total_ht."'"; + $sql .= ",subprice='".$db->escape($obj->subprice)."'"; + $sql .= ",total_ht='".$db->escape($obj->total_ht)."'"; $sql .= " WHERE fk_commande_ligne = ".$obj->rowid; $resql2 = $db->query($sql); @@ -2301,7 +2194,7 @@ function migrate_detail_livraison($db, $langs, $conf) $total_ht = $obju->total_ht + $obj->total_ht; $sqlu = "UPDATE ".MAIN_DB_PREFIX."livraison SET"; - $sqlu .= " total_ht='".$total_ht."'"; + $sqlu .= " total_ht='".$db->escape($total_ht)."'"; $sqlu .= " WHERE rowid=".$obj->fk_livraison; $resql4 = $db->query($sqlu); if (!$resql4) @@ -2309,15 +2202,11 @@ function migrate_detail_livraison($db, $langs, $conf) $error++; dol_print_error($db); } - } - else - { + } else { $error++; dol_print_error($db); } - } - else - { + } else { $error++; dol_print_error($db); } @@ -2332,20 +2221,14 @@ function migrate_detail_livraison($db, $langs, $conf) $sql = "ALTER TABLE ".MAIN_DB_PREFIX."livraisondet CHANGE fk_commande_ligne fk_origin_line integer"; print $langs->trans('FieldRenamed')."
    \n"; $db->query($sql); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { $result = $db->DDLDescTable(MAIN_DB_PREFIX."livraisondet", "fk_origin_line"); $obj = $db->fetch_object($result); if (!$obj) @@ -2395,15 +2278,13 @@ function migrate_stocks($db, $langs, $conf) $obj = $db->fetch_object($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."product SET"; - $sql .= " stock = '".$obj->total."'"; + $sql .= " stock = '".$db->escape($obj->total)."'"; $sql .= " WHERE rowid=".$obj->fk_product; $resql2 = $db->query($sql); if ($resql2) { - } - else - { + } else { $error++; dol_print_error($db); } @@ -2415,14 +2296,10 @@ function migrate_stocks($db, $langs, $conf) if ($error == 0) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -2470,16 +2347,14 @@ function migrate_menus($db, $langs, $conf) $obj = $db->fetch_object($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."menu SET"; - $sql .= " enabled = '".$obj->action."'"; + $sql .= " enabled = '".$db->escape($obj->action)."'"; $sql .= " WHERE rowid=".$obj->rowid; $sql .= " AND enabled = '1'"; $resql2 = $db->query($sql); if ($resql2) { - } - else - { + } else { $error++; dol_print_error($db); } @@ -2491,20 +2366,14 @@ function migrate_menus($db, $langs, $conf) if ($error == 0) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -2554,7 +2423,7 @@ function migrate_commande_deliveryaddress($db, $langs, $conf) $obj = $db->fetch_object($resql); $sql = "UPDATE ".MAIN_DB_PREFIX."expedition SET"; - $sql .= " fk_adresse_livraison = '".$obj->fk_adresse_livraison."'"; + $sql .= " fk_adresse_livraison = '".$db->escape($obj->fk_adresse_livraison)."'"; $sql .= " WHERE rowid=".$obj->fk_expedition; $resql2 = $db->query($sql); @@ -2566,29 +2435,21 @@ function migrate_commande_deliveryaddress($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if ($error == 0) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -2651,7 +2512,7 @@ function migrate_restore_missing_links($db, $langs, $conf) print 'Line '.$obj->rowid.' in '.$table1.' is linked to record '.$obj->field.' in '.$table2.' that has no link to '.$table1.'. We fix this.
    '; $sql = "UPDATE ".MAIN_DB_PREFIX.$table2." SET"; - $sql .= " ".$field2." = '".$obj->rowid."'"; + $sql .= " ".$field2." = '".$db->escape($obj->rowid)."'"; $sql .= " WHERE rowid=".$obj->field; $resql2 = $db->query($sql); @@ -2663,20 +2524,15 @@ function migrate_restore_missing_links($db, $langs, $conf) //print ". "; $i++; } - } - else print $langs->trans('AlreadyDone')."
    \n"; + } else print $langs->trans('AlreadyDone')."
    \n"; if ($error == 0) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -2716,7 +2572,7 @@ function migrate_restore_missing_links($db, $langs, $conf) print 'Line '.$obj->rowid.' in '.$table1.' is linked to record '.$obj->field.' in '.$table2.' that has no link to '.$table1.'. We fix this.
    '; $sql = "UPDATE ".MAIN_DB_PREFIX.$table2." SET"; - $sql .= " ".$field2." = '".$obj->rowid."'"; + $sql .= " ".$field2." = '".$db->escape($obj->rowid)."'"; $sql .= " WHERE rowid=".$obj->field; $resql2 = $db->query($sql); @@ -2728,23 +2584,17 @@ function migrate_restore_missing_links($db, $langs, $conf) //print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if ($error == 0) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -2825,25 +2675,17 @@ function migrate_project_user_resp($db, $langs, $conf) if ($db->query($sqlDrop)) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } print ''; @@ -2917,25 +2759,17 @@ function migrate_project_task_actors($db, $langs, $conf) if ($db->query($sqlDrop)) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } print ''; @@ -2991,9 +2825,9 @@ function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $so $sqlInsert .= ", targettype"; $sqlInsert .= ") VALUES ("; $sqlInsert .= $obj->$fk_source; - $sqlInsert .= ", '".$sourcetype."'"; + $sqlInsert .= ", '".$db->escape($sourcetype)."'"; $sqlInsert .= ", ".$obj->$fk_target; - $sqlInsert .= ", '".$targettype."'"; + $sqlInsert .= ", '".$db->escape($targettype)."'"; $sqlInsert .= ")"; $result = $db->query($sqlInsert); @@ -3005,9 +2839,7 @@ function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $so print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -3017,25 +2849,17 @@ function migrate_relationship_tables($db, $langs, $conf, $table, $fk_source, $so if ($db->query($sqlDrop)) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -3103,9 +2927,7 @@ function migrate_project_task_time($db, $langs, $conf) $oldtime++; if (!empty($totaltime[$obj->fk_task])) $totaltime[$obj->fk_task] += $newtime; else $totaltime[$obj->fk_task] = $newtime; - } - else - { + } else { if (!empty($totaltime[$obj->fk_task])) $totaltime[$obj->fk_task] += $obj->task_duration; else $totaltime[$obj->fk_task] = $obj->task_duration; } @@ -3130,33 +2952,23 @@ function migrate_project_task_time($db, $langs, $conf) dol_print_error($db); } } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } - } - else - { + } else { dol_print_error($db); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } - } - else - { + } else { dol_print_error($db); } if ($error == 0) { $db->commit(); - } - else - { + } else { $db->rollback(); } @@ -3215,8 +3027,8 @@ function migrate_customerorder_shipping($db, $langs, $conf) $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."expedition SET"; - $sqlUpdate .= " ref_customer = '".$obj->ref_client."'"; - $sqlUpdate .= ", date_delivery = '".($obj->date_livraison ? $obj->date_livraison : 'null')."'"; + $sqlUpdate .= " ref_customer = '".$db->escape($obj->ref_client)."'"; + $sqlUpdate .= ", date_delivery = '".$db->escape($obj->date_livraison ? $obj->date_livraison : 'null')."'"; $sqlUpdate .= " WHERE rowid = ".$obj->shipping_id; $result = $db->query($sqlUpdate); @@ -3228,36 +3040,26 @@ function migrate_customerorder_shipping($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if ($error == 0) { $db->commit(); - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -3330,17 +3132,13 @@ function migrate_shipping_delivery($db, $langs, $conf) dol_print_error($db); } print ". "; - } - else - { + } else { $error++; dol_print_error($db); } $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -3354,21 +3152,15 @@ function migrate_shipping_delivery($db, $langs, $conf) // DDL commands must not be inside a transaction $sqlDrop = "ALTER TABLE ".MAIN_DB_PREFIX."livraison DROP COLUMN fk_expedition"; $db->query($sqlDrop); - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -3422,8 +3214,8 @@ function migrate_shipping_delivery2($db, $langs, $conf) $obj = $db->fetch_object($resql); $sqlUpdate = "UPDATE ".MAIN_DB_PREFIX."livraison SET"; - $sqlUpdate .= " ref_customer = '".$obj->ref_customer."',"; - $sqlUpdate .= " date_delivery = ".($obj->date_delivery ? "'".$obj->date_delivery."'" : 'null'); + $sqlUpdate .= " ref_customer = '".$db->escape($obj->ref_customer)."',"; + $sqlUpdate .= " date_delivery = ".($obj->date_delivery ? "'".$db->escape($obj->date_delivery)."'" : 'null'); $sqlUpdate .= " WHERE rowid = ".$obj->delivery_id; $result = $db->query($sqlUpdate); @@ -3435,24 +3227,18 @@ function migrate_shipping_delivery2($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if ($error == 0) { $db->commit(); - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -3495,7 +3281,7 @@ function migrate_actioncomm_element($db, $langs, $conf) $db->begin(); $sql = "UPDATE ".MAIN_DB_PREFIX."actioncomm SET "; - $sql .= "fk_element = ".$field.", elementtype = '".$type."'"; + $sql .= "fk_element = ".$field.", elementtype = '".$db->escape($type)."'"; $sql .= " WHERE ".$field." IS NOT NULL"; $sql .= " AND fk_element IS NULL"; $sql .= " AND elementtype IS NULL"; @@ -3510,15 +3296,11 @@ function migrate_actioncomm_element($db, $langs, $conf) //$sqlDrop = "ALTER TABLE ".MAIN_DB_PREFIX."actioncomm DROP COLUMN ".$field; //$db->query($sqlDrop); //print ". "; - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } } @@ -3558,7 +3340,7 @@ function migrate_mode_reglement($db, $langs, $conf) $sqlSelect = "SELECT id"; $sqlSelect .= " FROM ".MAIN_DB_PREFIX."c_paiement"; $sqlSelect .= " WHERE id = ".$old_id; - $sqlSelect .= " AND code = '".$elements['code'][$key]."'"; + $sqlSelect .= " AND code = '".$db->escape($elements['code'][$key])."'"; $resql = $db->query($sqlSelect); if ($resql) @@ -3573,13 +3355,13 @@ function migrate_mode_reglement($db, $langs, $conf) $sqla = "UPDATE ".MAIN_DB_PREFIX."paiement SET "; $sqla .= "fk_paiement = ".$elements['new_id'][$key]; $sqla .= " WHERE fk_paiement = ".$old_id; - $sqla .= " AND fk_paiement IN (SELECT id FROM ".MAIN_DB_PREFIX."c_paiement WHERE id = ".$old_id." AND code = '".$elements['code'][$key]."')"; + $sqla .= " AND fk_paiement IN (SELECT id FROM ".MAIN_DB_PREFIX."c_paiement WHERE id = ".$old_id." AND code = '".$db->escape($elements['code'][$key])."')"; $resqla = $db->query($sqla); $sql = "UPDATE ".MAIN_DB_PREFIX."c_paiement SET "; $sql .= "id = ".$elements['new_id'][$key]; $sql .= " WHERE id = ".$old_id; - $sql .= " AND code = '".$elements['code'][$key]."'"; + $sql .= " AND code = '".$db->escape($elements['code'][$key])."'"; $resql = $db->query($sql); if ($resqla && $resql) @@ -3602,15 +3384,11 @@ function migrate_mode_reglement($db, $langs, $conf) if (!$error) { $db->commit(); - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -3693,17 +3471,13 @@ function migrate_clean_association($db, $langs, $conf) print ''.$langs->trans("MigrationCategorieAssociation").''; print ''.$langs->trans("RemoveDuplicates").' '.$langs->trans("Success").' ('.$num.'=>'.count($couples).')'; $db->commit(); - } - else - { + } else { print ''.$langs->trans("MigrationCategorieAssociation").''; print ''.$langs->trans("RemoveDuplicates").' '.$langs->trans("Failed").''; $db->rollback(); } } - } - else - { + } else { print ''.$langs->trans("Error").''; print '
    '.$db->lasterror().'
    '; } @@ -3763,9 +3537,7 @@ function migrate_categorie_association($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -3785,20 +3557,14 @@ function migrate_categorie_association($db, $langs, $conf) */ $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } @@ -3857,23 +3623,17 @@ function migrate_event_assignement($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -3934,23 +3694,17 @@ function migrate_event_assignement_contact($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -4021,9 +3775,7 @@ function migrate_reset_blocked_log($db, $langs, $conf) { $error++; dol_print_error($db); - } - else - { + } else { // Add set line $object = new stdClass(); $object->id = 1; @@ -4040,36 +3792,26 @@ function migrate_reset_blocked_log($db, $langs, $conf) $error++; } } - } - else - { + } else { print ' - '.$langs->trans('AlreadyInV7').'
    '; } - } - else - { + } else { dol_print_error($db); } $i++; } - } - else - { + } else { print $langs->trans('NothingToDo')."
    \n"; } if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -4131,23 +3873,17 @@ function migrate_remise_entity($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -4199,16 +3935,13 @@ function migrate_remise_except_entity($db, $langs, $conf) $sqlSelect2 = "SELECT f.entity"; $sqlSelect2 .= " FROM ".MAIN_DB_PREFIX."facture as f"; $sqlSelect2 .= " WHERE f.rowid = ".$fk_facture; - } - elseif (!empty($obj->fk_facture_line)) + } elseif (!empty($obj->fk_facture_line)) { $sqlSelect2 = "SELECT f.entity"; $sqlSelect2 .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."facturedet as fd"; $sqlSelect2 .= " WHERE fd.rowid = ".$obj->fk_facture_line; $sqlSelect2 .= " AND fd.fk_facture = f.rowid"; - } - else - { + } else { $sqlSelect2 = "SELECT s.entity"; $sqlSelect2 .= " FROM ".MAIN_DB_PREFIX."societe as s"; $sqlSelect2 .= " WHERE s.rowid = ".$obj->fk_soc; @@ -4232,9 +3965,7 @@ function migrate_remise_except_entity($db, $langs, $conf) dol_print_error($db); } } - } - else - { + } else { $error++; dol_print_error($db); } @@ -4242,23 +3973,17 @@ function migrate_remise_except_entity($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -4318,23 +4043,17 @@ function migrate_user_rights_entity($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -4394,23 +4113,17 @@ function migrate_usergroup_rights_entity($db, $langs, $conf) print ". "; $i++; } - } - else - { + } else { print $langs->trans('AlreadyDone')."
    \n"; } if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } - } - else - { + } else { dol_print_error($db); $db->rollback(); } @@ -4593,8 +4306,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_API') + } elseif ($moduletoreload == 'MAIN_MODULE_API') { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Rest API module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modApi.class.php'; @@ -4603,8 +4315,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_BARCODE') + } elseif ($moduletoreload == 'MAIN_MODULE_BARCODE') { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Barcode module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modBarcode.class.php'; @@ -4613,8 +4324,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_CRON') + } elseif ($moduletoreload == 'MAIN_MODULE_CRON') { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Cron module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modCron.class.php'; @@ -4623,8 +4333,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_SOCIETE') + } elseif ($moduletoreload == 'MAIN_MODULE_SOCIETE') { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Societe module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modSociete.class.php'; @@ -4633,8 +4342,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_PRODUIT') // Permission has changed into 2.7 + } elseif ($moduletoreload == 'MAIN_MODULE_PRODUIT') // Permission has changed into 2.7 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Produit module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modProduct.class.php'; @@ -4643,8 +4351,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7 + } elseif ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Service module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php'; @@ -4653,8 +4360,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9 + } elseif ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Commande module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php'; @@ -4663,8 +4369,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9 + } elseif ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Facture module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php'; @@ -4673,8 +4378,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_FOURNISSEUR') // Permission has changed into 2.9 + } elseif ($moduletoreload == 'MAIN_MODULE_FOURNISSEUR') // Permission has changed into 2.9 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Fournisseur module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php'; @@ -4683,8 +4387,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_HOLIDAY') // Permission and tabs has changed into 3.8 + } elseif ($moduletoreload == 'MAIN_MODULE_HOLIDAY') // Permission and tabs has changed into 3.8 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Leave Request module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modHoliday.class.php'; @@ -4693,8 +4396,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_DEPLACEMENT') // Permission has changed into 3.0 + } elseif ($moduletoreload == 'MAIN_MODULE_DEPLACEMENT') // Permission has changed into 3.0 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Deplacement module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modDeplacement.class.php'; @@ -4703,8 +4405,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_EXPENSEREPORT') + } elseif ($moduletoreload == 'MAIN_MODULE_EXPENSEREPORT') { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Expense Report module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modExpenseReport.class.php'; @@ -4713,8 +4414,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_DON') // Permission has changed into 3.0 + } elseif ($moduletoreload == 'MAIN_MODULE_DON') // Permission has changed into 3.0 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Don module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modDon.class.php'; @@ -4723,8 +4423,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo //$mod->remove('noboxes'); $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1 + } elseif ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate ECM module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php'; @@ -4733,8 +4432,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); // We need to remove because a permission id has been removed $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_PAYBOX') // Permission has changed into 3.0 + } elseif ($moduletoreload == 'MAIN_MODULE_PAYBOX') // Permission has changed into 3.0 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Paybox module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modPaybox.class.php'; @@ -4743,8 +4441,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); // We need to remove because id of module has changed $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_SUPPLIERPROPOSAL') // Module after 3.5 + } elseif ($moduletoreload == 'MAIN_MODULE_SUPPLIERPROPOSAL') // Module after 3.5 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Supplier Proposal module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modSupplierProposal.class.php'; @@ -4753,8 +4450,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); // We need to remove because id of module has changed $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_OPENSURVEY') // Permission has changed into 3.0 + } elseif ($moduletoreload == 'MAIN_MODULE_OPENSURVEY') // Permission has changed into 3.0 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Opensurvey module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modOpenSurvey.class.php'; @@ -4763,8 +4459,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); // We need to remove because menu entries has changed $mod->init($reloadmode); } - } - elseif ($moduletoreload == 'MAIN_MODULE_TAKEPOS') // Permission has changed into 10.0 + } elseif ($moduletoreload == 'MAIN_MODULE_TAKEPOS') // Permission has changed into 10.0 { dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Takepos module"); $res = @include_once DOL_DOCUMENT_ROOT.'/core/modules/modTakePos.class.php'; @@ -4773,9 +4468,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod->remove('noboxes'); // We need to remove because menu entries has changed $mod->init($reloadmode); } - } - else - { + } else { $reg = array(); $tmp = preg_match('/MAIN_MODULE_([a-zA-Z0-9]+)/', $moduletoreload, $reg); if (!empty($reg[1])) @@ -4783,8 +4476,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo if (strtoupper($moduletoreload) == $moduletoreload) // If key is un uppercase { $moduletoreloadshort = ucfirst(strtolower($reg[1])); - } - else // If key is a mix of up and low case + } else // If key is a mix of up and low case { $moduletoreloadshort = $reg[1]; } @@ -4795,9 +4487,7 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod = new $classname($db); //$mod->remove('noboxes'); $mod->init($reloadmode); - } - else - { + } else { dolibarr_install_syslog('Failed to include '.DOL_DOCUMENT_ROOT.'/core/modules/mod'.$moduletoreloadshort.'.class.php'); $res = @dol_include_once(strtolower($moduletoreloadshort).'/core/modules/mod'.$moduletoreloadshort.'.class.php'); @@ -4806,15 +4496,11 @@ function migrate_reload_modules($db, $langs, $conf, $listofmodule = array(), $fo $mod = new $classname($db); //$mod->remove('noboxes'); $mod->init($reloadmode); - } - else - { + } else { dolibarr_install_syslog('Failed to include '.strtolower($moduletoreloadshort).'/core/modules/mod'.$moduletoreloadshort.'.class.php'); } } - } - else - { + } else { dolibarr_install_syslog("Error, can't find module with name ".$moduletoreload, LOG_WARNING); print "Error, can't find module with name ".$moduletoreload; } @@ -4948,8 +4634,7 @@ function migrate_user_photospath() } // dol_delete_dir($origin.'/'.$file); } - } - else // it is a file + } else // it is a file { if (!dol_is_file($destin.'/'.$file)) { diff --git a/htdocs/langs/am_ET/accountancy.lang b/htdocs/langs/am_ET/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/am_ET/accountancy.lang +++ b/htdocs/langs/am_ET/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/am_ET/admin.lang b/htdocs/langs/am_ET/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/am_ET/admin.lang +++ b/htdocs/langs/am_ET/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/am_ET/agenda.lang b/htdocs/langs/am_ET/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/am_ET/agenda.lang +++ b/htdocs/langs/am_ET/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/am_ET/boxes.lang b/htdocs/langs/am_ET/boxes.lang index bd62684421a..d6fd298a3a7 100644 --- a/htdocs/langs/am_ET/boxes.lang +++ b/htdocs/langs/am_ET/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/am_ET/cashdesk.lang b/htdocs/langs/am_ET/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/am_ET/cashdesk.lang +++ b/htdocs/langs/am_ET/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/am_ET/compta.lang b/htdocs/langs/am_ET/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/am_ET/compta.lang +++ b/htdocs/langs/am_ET/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/am_ET/contracts.lang b/htdocs/langs/am_ET/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/am_ET/contracts.lang +++ b/htdocs/langs/am_ET/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/am_ET/errors.lang b/htdocs/langs/am_ET/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/am_ET/errors.lang +++ b/htdocs/langs/am_ET/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/am_ET/languages.lang b/htdocs/langs/am_ET/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/am_ET/languages.lang +++ b/htdocs/langs/am_ET/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/am_ET/mails.lang b/htdocs/langs/am_ET/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/am_ET/mails.lang +++ b/htdocs/langs/am_ET/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/am_ET/main.lang b/htdocs/langs/am_ET/main.lang index adbc443198f..0af5c66f0e0 100644 --- a/htdocs/langs/am_ET/main.lang +++ b/htdocs/langs/am_ET/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/am_ET/members.lang b/htdocs/langs/am_ET/members.lang index dd0a5bf49e2..5ef946ddf67 100644 --- a/htdocs/langs/am_ET/members.lang +++ b/htdocs/langs/am_ET/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/am_ET/mrp.lang b/htdocs/langs/am_ET/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/am_ET/mrp.lang +++ b/htdocs/langs/am_ET/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/am_ET/other.lang b/htdocs/langs/am_ET/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/am_ET/other.lang +++ b/htdocs/langs/am_ET/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/am_ET/products.lang b/htdocs/langs/am_ET/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/am_ET/products.lang +++ b/htdocs/langs/am_ET/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/am_ET/projects.lang b/htdocs/langs/am_ET/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/am_ET/projects.lang +++ b/htdocs/langs/am_ET/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/am_ET/propal.lang b/htdocs/langs/am_ET/propal.lang index 273996ab1b1..95085002f66 100644 --- a/htdocs/langs/am_ET/propal.lang +++ b/htdocs/langs/am_ET/propal.lang @@ -85,3 +85,7 @@ ProposalCustomerSignature=Written acceptance, company stamp, date and signature ProposalsStatisticsSuppliers=Vendor proposals statistics CaseFollowedBy=Case followed by SignedOnly=Signed only +IdProposal=Proposal ID +IdProduct=Product ID +PrParentLine=Proposal Parent Line +LineBuyPriceHT=Buy Price Amount net of tax for line diff --git a/htdocs/langs/am_ET/recruitment.lang b/htdocs/langs/am_ET/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/am_ET/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/am_ET/stocks.lang b/htdocs/langs/am_ET/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/am_ET/stocks.lang +++ b/htdocs/langs/am_ET/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/am_ET/suppliers.lang b/htdocs/langs/am_ET/suppliers.lang index b69b11272b4..51562b8bb7a 100644 --- a/htdocs/langs/am_ET/suppliers.lang +++ b/htdocs/langs/am_ET/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/am_ET/ticket.lang b/htdocs/langs/am_ET/ticket.lang index a9cff9391d0..59519282c80 100644 --- a/htdocs/langs/am_ET/ticket.lang +++ b/htdocs/langs/am_ET/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/am_ET/users.lang b/htdocs/langs/am_ET/users.lang index 41a5ebd0981..25d9205457b 100644 --- a/htdocs/langs/am_ET/users.lang +++ b/htdocs/langs/am_ET/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/am_ET/withdrawals.lang b/htdocs/langs/am_ET/withdrawals.lang index cccd8196481..114a8d9dd6c 100644 --- a/htdocs/langs/am_ET/withdrawals.lang +++ b/htdocs/langs/am_ET/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Paid StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/am_ET/workflow.lang b/htdocs/langs/am_ET/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/am_ET/workflow.lang +++ b/htdocs/langs/am_ET/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/am_ET/zapier.lang b/htdocs/langs/am_ET/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/am_ET/zapier.lang +++ b/htdocs/langs/am_ET/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ar_EG/assets.lang b/htdocs/langs/ar_EG/assets.lang new file mode 100644 index 00000000000..9fd138a21f5 --- /dev/null +++ b/htdocs/langs/ar_EG/assets.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - assets +Settings =الإعدادات diff --git a/htdocs/langs/ar_EG/members.lang b/htdocs/langs/ar_EG/members.lang index d03eb406cea..f8082fe9fe8 100644 --- a/htdocs/langs/ar_EG/members.lang +++ b/htdocs/langs/ar_EG/members.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - members MemberStatusDraft=مسودة(مطلوب الاعتماد) MemberStatusActiveShort=معتمد +MemberStatusNoSubscriptionShort=معتمد diff --git a/htdocs/langs/ar_EG/recruitment.lang b/htdocs/langs/ar_EG/recruitment.lang new file mode 100644 index 00000000000..1ed064a91d3 --- /dev/null +++ b/htdocs/langs/ar_EG/recruitment.lang @@ -0,0 +1,4 @@ +# Dolibarr language file - Source file is en_US - recruitment +ModuleRecruitmentName =توظيف +ModuleRecruitmentDesc =إدارة ومتابعة حملات التوظيف لشغل وظائف جديدة +RecruitmentSetup =إعداد التوظيف diff --git a/htdocs/langs/ar_EG/ticket.lang b/htdocs/langs/ar_EG/ticket.lang index 4185fd359c1..9aadaa6918b 100644 --- a/htdocs/langs/ar_EG/ticket.lang +++ b/htdocs/langs/ar_EG/ticket.lang @@ -1,2 +1,3 @@ # Dolibarr language file - Source file is en_US - ticket Closed=مقفول +TicketSettings=الإعدادات diff --git a/htdocs/langs/ar_SA/accountancy.lang b/htdocs/langs/ar_SA/accountancy.lang index d016d076e00..cf3e6a34fc5 100644 --- a/htdocs/langs/ar_SA/accountancy.lang +++ b/htdocs/langs/ar_SA/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=دفتر البيع اليومي ACCOUNTING_PURCHASE_JOURNAL=دفتر الشراء اليومي @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=لم يتم تسويتة ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/ar_SA/admin.lang b/htdocs/langs/ar_SA/admin.lang index 2ffea4af0ba..2e014d03b3f 100644 --- a/htdocs/langs/ar_SA/admin.lang +++ b/htdocs/langs/ar_SA/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=ميزة لا تتوفر على مثل أنظمة يونكس. sendmail برنامج الاختبار الخاص بك محليا. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=إذا ترجمة لهذه اللغة ليست كاملة أو تجد الأخطاء، يمكنك تصحيح هذا عن طريق تحرير الملفات إلى دليل LANGS /%s وتقديم الملفات التي تم تعديلها على dolibarr.org/forum أو للمطورين على github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=إعداد وحدة ModulesSetup=Modules/Application setup ModuleFamilyBase=نظام @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=يجب تمكين وحدة%s أولا إذا ك SecurityToken=المفتاح لعناوين المواقع الآمنة NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=تعديل على الأسعار مع القيمة الم MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=سلسلة +String1Line=String (1 line) TextLong=نص طويل +TextLongNLines=Long text (n lines) HtmlText=Html text Int=عدد صحيح Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcodes إدارة Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=انقر للاتصال Module58Desc=ClickToDial التكامل Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=إنشاء / تعديل الخدمات Permission534=حذف خدمات Permission536=انظر / إدارة الخدمات الخفية Permission538=تصدير الخدمات +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=قراءة التبرعات Permission702=إنشاء / تعديل والهبات Permission703=حذف التبرعات @@ -848,6 +858,8 @@ Permission773=حذف تقارير المصاريف Permission774=قراءة جميع التقارير حساب (حتى للمستخدم لا المرؤوسين) Permission775=الموافقة على التقارير حساب Permission776=دفع نفقة تقارير +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=تقارير حساب التصدير Permission1001=قراءة مخزونات Permission1002=إنشاء / تعديل المستودعات @@ -900,6 +912,7 @@ Permission2515=إعداد وثائق وأدلة Permission2801=استخدام عميل FTP في وضع القراءة (تصفح وتحميل فقط) Permission2802=العميل استخدام بروتوكول نقل الملفات في وضع الكتابة (حذف أو تحميل الملفات) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=آفاق محتملة +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=المناطق DictionaryCountry=الدول @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=الوحدات DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=آفاق الوضع +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=دائم البحث عن شكل القائمة اليمنى DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=يجب على الأقل تمكين 1 وحدة ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=نعم في الصيف @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=علامة التبويب التي تريد فتح افتراضيا عند اختيار القائمة جدول الأعمال +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=انقر لإعداد وحدة الاتصال الهاتفي ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=مجرد استخدام الرابط "الهاتف:" على أرقام الهواتف ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=يحتوي هذا الحقل على إشارة لتحديد الخ Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=موقف خط في قوائم السرد SellTaxRate=بيع معدل الضريبة RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=عقود +MailToSendReception=Receptions MailToThirdparty=أطراف ثالثة MailToMember=أعضاء MailToUser=المستخدمين @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=الرمز البريدي MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ar_SA/agenda.lang b/htdocs/langs/ar_SA/agenda.lang index 74e5281b488..98168cd43b1 100644 --- a/htdocs/langs/ar_SA/agenda.lang +++ b/htdocs/langs/ar_SA/agenda.lang @@ -14,7 +14,7 @@ EventsNb=عدد الأحداث ListOfActions=قائمة الأحداث EventReports=تقارير الحدث Location=الموقع -ToUserOfGroup=إلي أى مستخدم في المجموعة +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=الأحداث في كامل اليوم (أيام) MenuToDoActions=جميع الأحداث الغير مكتملة MenuDoneActions=جميع الأحداث الملغية @@ -86,6 +86,8 @@ ProposalDeleted=تم حذف العرض OrderDeleted=تم حذف الطلب InvoiceDeleted=تم حذف الفاتورة DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=المنتج %s تم انشاؤه PRODUCT_MODIFYInDolibarr=المنتج %sتم تعديلة PRODUCT_DELETEInDolibarr=المنتج%s تم حذفة @@ -158,3 +160,9 @@ DateStartPlusOne=تاريخ بدء + 1 ساعة SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ar_SA/boxes.lang b/htdocs/langs/ar_SA/boxes.lang index 27d8107738d..58b9e904429 100644 --- a/htdocs/langs/ar_SA/boxes.lang +++ b/htdocs/langs/ar_SA/boxes.lang @@ -21,14 +21,14 @@ BoxFicheInter=Latest interventions BoxCurrentAccounts=ميزان الحسابات المفتوحة BoxTitleMemberNextBirthdays=Birthdays of this month (members) BoxTitleLastRssInfos=Latest %s news from %s -BoxTitleLastProducts=Products/Services: latest %s modified +BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert BoxTitleLastSuppliers=Latest %s recorded suppliers -BoxTitleLastModifiedSuppliers=Vendors: latest %s modified -BoxTitleLastModifiedCustomers=Customers: latest %s modified +BoxTitleLastModifiedSuppliers=Vendors: last %s modified +BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=عملاء الفواتير ForCustomersOrders=أوامر العملاء ForProposals=اقتراحات @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=المحاسبة diff --git a/htdocs/langs/ar_SA/cashdesk.lang b/htdocs/langs/ar_SA/cashdesk.lang index 65dc5675c49..bdad092c1c5 100644 --- a/htdocs/langs/ar_SA/cashdesk.lang +++ b/htdocs/langs/ar_SA/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ar_SA/compta.lang b/htdocs/langs/ar_SA/compta.lang index 7eb313a3d83..b83bfef9a8a 100644 --- a/htdocs/langs/ar_SA/compta.lang +++ b/htdocs/langs/ar_SA/compta.lang @@ -69,6 +69,7 @@ SocialContribution=الضريبة الاجتماعية أو المالية SocialContributions=الضرائب الاجتماعية أو المالية SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=المصروفات الخاصة @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/ar_SA/contracts.lang b/htdocs/langs/ar_SA/contracts.lang index ed4cf534d90..896c170b296 100644 --- a/htdocs/langs/ar_SA/contracts.lang +++ b/htdocs/langs/ar_SA/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=ادارة الخدمات MenuExpiredServices=انتهت الخدمات MenuClosedServices=أغلقت الخدمات NewContract=العقد الجديد -NewContractSubscription=العقد الجديد / الاشتراك +NewContractSubscription=New contract or subscription AddContract=إنشاء العقد DeleteAContract=الغاء العقد ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/ar_SA/errors.lang b/htdocs/langs/ar_SA/errors.lang index 5a14435d323..8348252dd0b 100644 --- a/htdocs/langs/ar_SA/errors.lang +++ b/htdocs/langs/ar_SA/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=قيمة جديدة لا يمكن أن يكون ErrorFailedToValidatePasswordReset=فشل في reinit كلمة المرور. قد يكون وقد تم بالفعل reinit (هذا الرابط يمكن استخدامها مرة واحدة فقط). إن لم يكن، في محاولة لاستئناف عملية reinit. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=فشل في إضافة جهة اتصال -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=وتم تشكيل لطريقة الدفع لكتابة٪ الصورة ولكن لم يكتمل الإعداد من وحدة الفاتورة لتحديد المعلومات لاظهار هذه طريقة الدفع. ErrorPHPNeedModule=خطأ، يجب PHP الخاص بتثبيت وحدة٪ s إلى استخدام هذه الميزة. ErrorOpenIDSetupNotComplete=يمكنك إعداد Dolibarr ملف التكوين للسماح بالمصادقة رض، ولكن لم يتم تعريف URL الخدمة رض إلى المستمر٪ الصورة @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=تم تعيين كلمة مرور لهذا العضو. ومع ذلك، تم إنشاء أي حساب المستخدم. لذلك يتم تخزين كلمة المرور هذه ولكن لا يمكن استخدامها للدخول إلى Dolibarr. ويمكن استخدامه من قبل وحدة / واجهة خارجية ولكن إذا كنت لا تحتاج إلى تعريف أي تسجيل دخول أو كلمة المرور لأحد أفراد، يمكنك تعطيل خيار "إدارة تسجيل دخول لكل عضو" من إعداد وحدة الأعضاء. إذا كنت بحاجة إلى إدارة تسجيل الدخول ولكن لا تحتاج إلى أي كلمة المرور، يمكنك الحفاظ على هذا الحقل فارغا لتجنب هذا التحذير. ملاحظة: يمكن أيضا أن تستخدم البريد الإلكتروني لتسجيل الدخول إذا تم ربط عضو إلى المستخدم. diff --git a/htdocs/langs/ar_SA/languages.lang b/htdocs/langs/ar_SA/languages.lang index 35b01886b06..065aec3d17b 100644 --- a/htdocs/langs/ar_SA/languages.lang +++ b/htdocs/langs/ar_SA/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=العربية Language_ar_EG=Arabic (Egypt) Language_ar_SA=العربية +Language_az_AZ=Azerbaijani Language_bn_BD=بنغالي +Language_bn_IN=Bengali (India) Language_bg_BG=البلغارية Language_bs_BA=البوسنية Language_ca_ES=كاتالاني @@ -20,6 +23,7 @@ Language_en_GB=الانجليزية (المملكة المتحدة) Language_en_IN=الإنكليزية (الهند) Language_en_NZ=الإنجليزية (نيوزيلندا) Language_en_SA=الإنجليزية (المملكة العربية السعودية) +Language_en_SG=English (Singapore) Language_en_US=الإنكليزية (الولايات المتحدة) Language_en_ZA=الإنكليزية (جنوب أفريقيا) Language_es_ES=الأسبانية @@ -29,6 +33,7 @@ Language_es_CL=الإسبانية (تشيلي) Language_es_CO=الأسبانية (كولومبيا) Language_es_DO=الأسبانية (جمهورية الدومنيكان) Language_es_EC=الإسبانية (إكوادور) +Language_es_GT=Spanish (Guatemala) Language_es_HN=الأسبانية (هندوراس) Language_es_MX=الإسبانية (المكسيك) Language_es_PA=الإسبانية (بنما) @@ -36,6 +41,7 @@ Language_es_PY=الأسبانية (باراغواي) Language_es_PE=الإسبانية (بيرو) Language_es_PR=الأسبانية (بورتو ريكو) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=الإسبانية (فنزويلا) Language_et_EE=الإستونية Language_eu_ES=الباسكي @@ -44,15 +50,22 @@ Language_fi_FI=اللغة الفنلندية Language_fr_BE=الفرنسية (بلجيكا) Language_fr_CA=الفرنسية (كندا) Language_fr_CH=الفرنسية (سويسرا) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=الفرنسية +Language_fr_GA=French (Gabon) Language_fr_NC=الفرنسية (كاليدونيا الجديدة) +Language_fr_SN=French (Senegal) Language_fy_NL=الفريزية +Language_gl_ES=Galician Language_he_IL=اللغة العبرية +Language_hi_IN=Hindi (India) Language_hr_HR=الكرواتية Language_hu_HU=المجري Language_id_ID=الأندونيسية Language_is_IS=الآيسلندي Language_it_IT=الإيطالي +Language_it_CH=Italian (Switzerland) Language_ja_JP=اليابانية Language_ka_GE=الجورجية Language_km_KH=الخمير @@ -64,6 +77,7 @@ Language_lv_LV=اللاتفية Language_mk_MK=المقدونية Language_mn_MN=المنغولية Language_nb_NO=النرويجية (بوكمال) +Language_ne_NP=Nepali Language_nl_BE=الهولندية (بلجيكا) Language_nl_NL=Dutch Language_pl_PL=بولندي @@ -86,4 +100,5 @@ Language_uz_UZ=الأوزبكي Language_vi_VN=الفيتنامية Language_zh_CN=الصينية Language_zh_TW=الصينية (التقليدية) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/ar_SA/mails.lang b/htdocs/langs/ar_SA/mails.lang index 0f3ece4cca0..8e4e3308318 100644 --- a/htdocs/langs/ar_SA/mails.lang +++ b/htdocs/langs/ar_SA/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=معلومات ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/ar_SA/main.lang b/htdocs/langs/ar_SA/main.lang index 43d429b67e5..aab36cc5808 100644 --- a/htdocs/langs/ar_SA/main.lang +++ b/htdocs/langs/ar_SA/main.lang @@ -355,8 +355,8 @@ PriceUTTC=UP (شركة الضريبة) Amount=كمية AmountInvoice=قيمة الفاتورة AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=مبلغ الدفع AmountHTShort=Amount (excl.) AmountTTCShort=المبلغ (المؤتمر الوطني العراقي. الضريبية) @@ -485,6 +485,7 @@ Categories=الكلمات / فئات Category=العلامة / فئة By=بواسطة From=من عند +FromDate=من عند FromLocation=من عند to=إلى To=إلى @@ -687,6 +688,7 @@ Method=الطريقة Receive=استقبال CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=جزئي TotalWoman=المجموع NeverReceived=لم يتلق @@ -703,6 +705,7 @@ MenuECM=وثائق MenuAWStats=AWStats MenuMembers=أعضاء MenuAgendaGoogle=جوجل جدول الأعمال +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup= NoFileFound=لا الوثائق المحفوظة في هذا المجلد CurrentUserLanguage=الصيغة الحالية @@ -725,7 +728,7 @@ Page=صفحة Notes=وتلاحظ AddNewLine=إضافة خط جديد AddFile=إضافة ملف -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=استنساخ وجوه مع السمات الرئيسية ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=تي ShortFriday=واو ShortSaturday=دإ ShortSunday=دإ +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=تعيين المرجع Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=معلومات +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ar_SA/members.lang b/htdocs/langs/ar_SA/members.lang index 364db7f969f..8793c6b77cd 100644 --- a/htdocs/langs/ar_SA/members.lang +++ b/htdocs/langs/ar_SA/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=أعضاء مشروع MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=التحقق من صحة +SubscriptionNotNeeded=No subscription needed NewCotisation=مساهمة جديدة PaymentSubscription=دفع مساهمة جديدة SubscriptionEndDate=تاريخ انتهاء الاكتتاب @@ -78,7 +81,7 @@ DeleteType=حذف VoteAllowed=يسمح التصويت Physical=المادية Moral=الأخلاقية -MorPhy=المعنوية / المادية +MorPhy=طبيعة Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/ar_SA/mrp.lang b/htdocs/langs/ar_SA/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/ar_SA/mrp.lang +++ b/htdocs/langs/ar_SA/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/ar_SA/other.lang b/htdocs/langs/ar_SA/other.lang index 7f5d46312d3..cd09294d71d 100644 --- a/htdocs/langs/ar_SA/other.lang +++ b/htdocs/langs/ar_SA/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/ar_SA/products.lang b/htdocs/langs/ar_SA/products.lang index be4388b23b3..6515241f6e6 100644 --- a/htdocs/langs/ar_SA/products.lang +++ b/htdocs/langs/ar_SA/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=حدد نوع الباركود BarcodeValue=قيمة الباركود NoteNotVisibleOnBill=ملحوظة(غيرمرئية على الفواتير والعروض...) ServiceLimitedDuration=إذا كان المنتج هو خدمة لفترة محدودة : +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=عدد من السعر DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=بلد المنشأ Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=التسمية قصيرة Unit=وحدة p=ش. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=جديد السمة NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/ar_SA/projects.lang b/htdocs/langs/ar_SA/projects.lang index 001ab2e2466..044268aa210 100644 --- a/htdocs/langs/ar_SA/projects.lang +++ b/htdocs/langs/ar_SA/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=مساهم TypeContact_project_task_external_TASKCONTRIBUTOR=مساهم SelectElement=حدد العنصر AddElement=تصل إلى العنصر +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=إحصاءات عن المشاريع / يؤدي -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=المهمة الموكلة. يجب دخول الوقت على هذه المهمة يكون ممكنا. IdTaskTime=الوقت مهمة معرف YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/ar_SA/recruitment.lang b/htdocs/langs/ar_SA/recruitment.lang new file mode 100644 index 00000000000..a3f61ffc4ff --- /dev/null +++ b/htdocs/langs/ar_SA/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = حول +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ar_SA/stocks.lang b/htdocs/langs/ar_SA/stocks.lang index 8e02fb0a3a5..681a987ef17 100644 --- a/htdocs/langs/ar_SA/stocks.lang +++ b/htdocs/langs/ar_SA/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=حذف ارسال Stock=الأسهم Stocks=الاسهم MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=الأسهم عن طريق القرعة / المسلسل @@ -95,14 +95,16 @@ RealStock=الحقيقية للاسهم RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=الأسهم الافتراضية -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=معرف مخزن DescWareHouse=وصف المخزن LieuWareHouse=المكان مخزن WarehousesAndProducts=والمستودعات والمنتجات WarehousesAndProductsBatchDetail=مستودعات والمنتجات (مع التفاصيل في الكثير / مسلسل) -AverageUnitPricePMPShort=متوسط أسعار المدخلات -AverageUnitPricePMP=متوسط أسعار المدخلات +AverageUnitPricePMPShort=المتوسط المرجح لسعر +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=بيع سعر الوحدة EstimatedStockValueSellShort=قيمة للبيع EstimatedStockValueSell=قيمة للبيع @@ -141,7 +143,7 @@ Replenishments=التجديد NbOfProductBeforePeriod=كمية من الناتج٪ الصورة في الأوراق المالية قبل الفترة المختارة (<٪ ق) NbOfProductAfterPeriod=كمية من الناتج٪ الصورة في الأوراق المالية بعد الفترة المختارة (>٪ ق) MassMovement=حركة جماهيرية -SelectProductInAndOutWareHouse=حدد المنتج، والكمية، ومستودع مصدر ومستودع الهدف، ثم انقر فوق "٪ الصورة". حالما يتم ذلك لجميع الحركات المطلوبة، انقر على "٪ الصورة". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=إيصالات لهذا النظام StockMovementRecorded=تحركات الأسهم سجلت @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ar_SA/suppliers.lang b/htdocs/langs/ar_SA/suppliers.lang index 68a3ee5d152..dfdc55be12c 100644 --- a/htdocs/langs/ar_SA/suppliers.lang +++ b/htdocs/langs/ar_SA/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=بعض المنتجات الفرعية التي لا AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=ويرتبط هذا المورد بالفعل مرجع مع مرجع : %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=توفر -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=الموافقة على هذا النظام ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=إنكار هذا النظام @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=ملف الانسحاب +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=تعيين إلى حالة "المرسلة ملف" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=إحصاءات عن طريق وضع خطوط @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=المبلغ: %s
    Metode: %s
    تاريخ: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=لم يتم تعيين خيار الوضع الحقيقي، ونحن بعد توقف هذه المحاكاة +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/ar_SA/workflow.lang b/htdocs/langs/ar_SA/workflow.lang index 46316c36c49..30d0fdd1c87 100644 --- a/htdocs/langs/ar_SA/workflow.lang +++ b/htdocs/langs/ar_SA/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=إعداد وحدة تدفق العمل -WorkflowDesc=تم تصميم هذه الوحدة لتعديل سلوك الإجراءات التلقائية إلى التطبيق. افتراضيا، سير العمل مفتوح (يمكنك القيام بالأشياء بالترتيب الذي تريده). يمكنك تفعيل الإجراءات التلقائية التي تهمك. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=لا توجد تعديلات على سير العمل متوفرة مع الوحدات النشطة. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=إنشاء طلب عميل تلقائيا بعد التوقيع على اقتراح تجاري (سيكون الطلب الجديد بنفس المبلغ من الاقتراح) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=إنشاء فاتورة العملاء تلقائيا بعد التوقيع على اقتراح تجاري (سيكون للفاتورة الجديدة نفس المبلغ من الاقتراح) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=إنشاء فاتورة العميل تلقائيا بعد التحقق من صحة العقد -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=إنشاء فاتورة العميل تلقائيا بعد إغلاق طلب العميل (فاتورة جديدة سيكون لها نفس المبلغ من النظام) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=تصنيف اقتراح (مقترحات) المصدر المرتبط بالفوترة عند تعيين طلب العميل على الفاتورة (وإذا كان مقدار الطلب هو نفسه من إجمالي مبلغ الاقتراحات المرتبطة التي تم توقيعها) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=تصنيف مقترح (مقترحات) المصدر المرتبط بالفوترة عندما يتم التحقق من صحة فاتورة العميل (وإذا كان مبلغ الفاتورة هو نفسه من إجمالي مبلغ الاقتراحات المرتبطة التي تم توقيعها) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=تصنيف طلب (أوامر) العميل المصدر المرتبط بالفوترة عندما يتم التحقق من صحة فاتورة العميل (وإذا كان مبلغ الفاتورة هو نفسه من إجمالي مبلغ الطلبات المرتبطة) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=تصنيف طلب (أوامر) العميل المصدر المرتبط إلى الفاتورة عندما يتم تعيين فاتورة العميل على الدفع (وإذا كان مبلغ الفاتورة هو نفسه من إجمالي مبلغ الطلبات المرتبطة) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=تصنيف مرتبط النظام العميل المصدر لشحنها عندما يتم التحقق من صحة الشحنة (وإذا الكمية التي يتم شحنها من قبل جميع الشحنات هو نفسه كما في الأمر لتحديث) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=إنشاء تلقائي AutomaticClassification=التصنيف التلقائي diff --git a/htdocs/langs/ar_SA/zapier.lang b/htdocs/langs/ar_SA/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/ar_SA/zapier.lang +++ b/htdocs/langs/ar_SA/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/az_AZ/accountancy.lang b/htdocs/langs/az_AZ/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/az_AZ/accountancy.lang +++ b/htdocs/langs/az_AZ/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/az_AZ/admin.lang b/htdocs/langs/az_AZ/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/az_AZ/admin.lang +++ b/htdocs/langs/az_AZ/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/az_AZ/agenda.lang b/htdocs/langs/az_AZ/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/az_AZ/agenda.lang +++ b/htdocs/langs/az_AZ/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/az_AZ/boxes.lang b/htdocs/langs/az_AZ/boxes.lang index bd62684421a..d6fd298a3a7 100644 --- a/htdocs/langs/az_AZ/boxes.lang +++ b/htdocs/langs/az_AZ/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/az_AZ/cashdesk.lang b/htdocs/langs/az_AZ/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/az_AZ/cashdesk.lang +++ b/htdocs/langs/az_AZ/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/az_AZ/compta.lang b/htdocs/langs/az_AZ/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/az_AZ/compta.lang +++ b/htdocs/langs/az_AZ/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/az_AZ/contracts.lang b/htdocs/langs/az_AZ/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/az_AZ/contracts.lang +++ b/htdocs/langs/az_AZ/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/az_AZ/errors.lang b/htdocs/langs/az_AZ/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/az_AZ/errors.lang +++ b/htdocs/langs/az_AZ/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/az_AZ/languages.lang b/htdocs/langs/az_AZ/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/az_AZ/languages.lang +++ b/htdocs/langs/az_AZ/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/az_AZ/mails.lang b/htdocs/langs/az_AZ/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/az_AZ/mails.lang +++ b/htdocs/langs/az_AZ/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/az_AZ/main.lang b/htdocs/langs/az_AZ/main.lang index adbc443198f..0af5c66f0e0 100644 --- a/htdocs/langs/az_AZ/main.lang +++ b/htdocs/langs/az_AZ/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/az_AZ/members.lang b/htdocs/langs/az_AZ/members.lang index dd0a5bf49e2..5ef946ddf67 100644 --- a/htdocs/langs/az_AZ/members.lang +++ b/htdocs/langs/az_AZ/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/az_AZ/mrp.lang b/htdocs/langs/az_AZ/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/az_AZ/mrp.lang +++ b/htdocs/langs/az_AZ/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/az_AZ/other.lang b/htdocs/langs/az_AZ/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/az_AZ/other.lang +++ b/htdocs/langs/az_AZ/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/az_AZ/products.lang b/htdocs/langs/az_AZ/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/az_AZ/products.lang +++ b/htdocs/langs/az_AZ/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/az_AZ/projects.lang b/htdocs/langs/az_AZ/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/az_AZ/projects.lang +++ b/htdocs/langs/az_AZ/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/az_AZ/recruitment.lang b/htdocs/langs/az_AZ/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/az_AZ/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/az_AZ/stocks.lang b/htdocs/langs/az_AZ/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/az_AZ/stocks.lang +++ b/htdocs/langs/az_AZ/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/az_AZ/suppliers.lang b/htdocs/langs/az_AZ/suppliers.lang index b69b11272b4..51562b8bb7a 100644 --- a/htdocs/langs/az_AZ/suppliers.lang +++ b/htdocs/langs/az_AZ/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/az_AZ/ticket.lang b/htdocs/langs/az_AZ/ticket.lang index a9cff9391d0..59519282c80 100644 --- a/htdocs/langs/az_AZ/ticket.lang +++ b/htdocs/langs/az_AZ/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/az_AZ/users.lang b/htdocs/langs/az_AZ/users.lang index 41a5ebd0981..25d9205457b 100644 --- a/htdocs/langs/az_AZ/users.lang +++ b/htdocs/langs/az_AZ/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/az_AZ/withdrawals.lang b/htdocs/langs/az_AZ/withdrawals.lang index cccd8196481..114a8d9dd6c 100644 --- a/htdocs/langs/az_AZ/withdrawals.lang +++ b/htdocs/langs/az_AZ/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Paid StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/az_AZ/workflow.lang b/htdocs/langs/az_AZ/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/az_AZ/workflow.lang +++ b/htdocs/langs/az_AZ/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/az_AZ/zapier.lang b/htdocs/langs/az_AZ/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/az_AZ/zapier.lang +++ b/htdocs/langs/az_AZ/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/bg_BG/accountancy.lang b/htdocs/langs/bg_BG/accountancy.lang index 0b88b5b2253..2841467f8c7 100644 --- a/htdocs/langs/bg_BG/accountancy.lang +++ b/htdocs/langs/bg_BG/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Разрешава управление на различ BANK_DISABLE_DIRECT_INPUT=Деактивиране на директно добавяне на транзакция в банкова сметка ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Активиране на експортиране на журнали в състояние на чернова ACCOUNTANCY_COMBO_FOR_AUX=Активиране на комбиниран списък за дъщерна сметка (може да създаде забавяне, ако имате много контрагенти) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Журнал за продажби ACCOUNTING_PURCHASE_JOURNAL=Журнал за покупки @@ -284,6 +285,7 @@ ShowTutorial=Показване на урок NotReconciled=Не е съгласувано ## Admin +BindingOptions=Binding options ApplyMassCategories=Прилагане на масови категории AddAccountFromBookKeepingWithNoCategories=Наличната сметка не е част от персонализирана група CategoryDeleted=Категорията за счетоводната сметка е премахната diff --git a/htdocs/langs/bg_BG/admin.lang b/htdocs/langs/bg_BG/admin.lang index 68f6effb731..cd0b1e059b1 100644 --- a/htdocs/langs/bg_BG/admin.lang +++ b/htdocs/langs/bg_BG/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Имейл на подателя по подразб UserEmail=Имейл на потребител CompanyEmail=Имейл на фирмата FeatureNotAvailableOnLinux=Функцията не е налична в Unix подобни системи. Тествайте вашата програма Sendmail локално. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Ако преводът за този език не е завършен или сте открили грешки, може да ги коригирате като редактирате файловете в директорията langs/%s и предоставите вашите промени в www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Ако преводът за този език не е завършен или ако сте открили грешки, може да коригирате това, като редактирате файловете в директорията langs/%s и предоставите вашите промени на dolibarr.org/forum или за разработчици на github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Настройка на модул ModulesSetup=Настройка на Модули / Приложения ModuleFamilyBase=Система @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Модулът %s трябва да бъде а SecurityToken=Ключ за защитени URL адреси NoSmsEngine=Няма наличен мениджър за подател на SMS. Мениджърът на подателя на SMS не е инсталиран по подразбиране, защото зависи от външен доставчик, но можете да намерите някои от тях на адрес %s PDF=PDF -PDFDesc=Глобални настройки за генериране на PDF. -PDFAddressForging=Правила за адресни кутии +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Скриване на цялата информация, свързана с данък върху продажбите / ДДС PDFRulesForSalesTax=Правила за данък върху продажбите / ДДС PDFLocaltax=Правила за %s -HideLocalTaxOnPDF=Скриване на %s ставка в колоната ДДС +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Скриване на описанието на продукти HideRefOnPDF=Скриване на продуктови номера HideDetailsOnPDF=Скриване на подробности за продуктовите линии @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Променяне на цените с базова ре MassConvert=Стартиране на групово превръщане PriceFormatInCurrentLanguage=Формат на цената в текущия език String=Низ +String1Line=String (1 line) TextLong=Дълъг текст +TextLongNLines=Long text (n lines) HtmlText=HTML текст Int=Цяло число Float=Десетично число @@ -543,9 +546,9 @@ Module54Desc=Управление на договори (услуги или п Module55Name=Баркодове Module55Desc=Управление на баркодове Module56Name=Плащане с кредитен превод -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Банкови плащания с директен дебит -Module57Desc=Управление на платежни нареждания за директен дебит. Включва генериране на SEPA файл за европейските страни. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Интегриране на система ClickToDial (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Създаване / променяне на услуги Permission534=Изтриване на услуги Permission536=Преглед / управление на скрити услуги Permission538=Експортиране на услуги +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Преглед на спецификации Permission651=Създаване / променяне на спецификации Permission652=Изтриване на спецификации +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Преглед на дарения Permission702=Създаване / променяне на дарения Permission703=Изтриване на дарения @@ -848,6 +858,8 @@ Permission773=Изтриване на разходни отчети Permission774=Преглед на всички разходни отчети (дори на служители които не са подчинени на служителя) Permission775=Одобряване на разходни отчети Permission776=Плащане на разходни отчети +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Експортиране на разходни отчети Permission1001=Преглед на наличности Permission1002=Създаване / променяне на складове @@ -900,6 +912,7 @@ Permission2515=Настройка на директории за докумен Permission2801=Използване на FTP клиент в режим на четене (само за преглед и изтегляне) Permission2802=Използване на FTP клиент в режим на писане (изтриване или качване на файлове) Permission3200=Преглед на архивирани събития и пръстови отпечатъци +Permission3301=Generate new modules Permission4001=Преглед на служители Permission4002=Създаване на служители Permission4003=Изтриване на служители @@ -947,7 +960,8 @@ Permission63003=Изтриване на ресурси Permission63004=Свързване на ресурси към събития от календара DictionaryCompanyType=Видове контрагенти DictionaryCompanyJuridicalType=Правна форма на контрагенти -DictionaryProspectLevel=Потенциал на потенциални клиенти +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Области / Региони DictionaryRegion=Региони DictionaryCountry=Държави @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Шаблони за имейли DictionaryUnits=Единици DictionaryMeasuringUnits=Измервателни единици DictionarySocialNetworks=Социални мрежи -DictionaryProspectStatus=Статус на потенциален клиент +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Видове отпуск DictionaryOpportunityStatus=Статус на възможността за проект / възможност DictionaryExpenseTaxCat=Разходен отчет - Транспортни категории @@ -1076,7 +1091,7 @@ LoginPage=Входна страница BackgroundImageLogin=Фоново изображение PermanentLeftSearchForm=Формуляр за постоянно търсене в лявото меню DefaultLanguage=Език по подразбиране -EnableMultilangInterface=Активиране на многоезикова поддръжка +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Показване на фирменото лого в менюто CompanyInfo=Фирма / Организация CompanyIds=Идентификационни данни на фирма / организация @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Изисква се критерий за NewTranslationStringToShow=Нов преводен низ, който да се покаже OriginalValueWas=Оригиналния превод е презаписан. Първоначалната стойност е:

    %s TransKeyWithoutOriginalValue=Наложихте нов превод за ключа за превод "%s", който не съществува в нито един от езиковите файлове -TotalNumberOfActivatedModules=Активирани приложения / модули: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Трябва да активирате поне 1 модул ClassNotFoundIntoPathWarning=Не е намерен клас %s в описания PHP път YesInSummer=Да през лятото @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Използване на видове събития (у AGENDA_USE_EVENT_TYPE_DEFAULT=Автоматично задаване на стойност по подразбиране за вид събитие във формуляра при създаване на събитие AGENDA_DEFAULT_FILTER_TYPE=Автоматично задаване на стойност по подразбиране за вид събитие във филтъра за търсене на календара AGENDA_DEFAULT_FILTER_STATUS=Автоматично задаване на стойност по подразбиране за статус на събитие във филтъра за търсене на календара -AGENDA_DEFAULT_VIEW=Кой раздел да се зарежда по подразбиране, когато се отваря календара +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Активиране на напомняне за събития, чрез имейли (опцията за напомняне / закъснение може да бъде определена за всяко събитие). Забележка: Модулът %s трябва да бъде активиран и правилно настроен, за да се изпращат напомняния в определеното време. AGENDA_REMINDER_BROWSER=Активиране на напомняне за събития в браузъра на потребителя (когато бъде достигната датата на събитието, всеки потребител може да отхвърли известието от браузъра) AGENDA_REMINDER_BROWSER_SOUND=Активиране на звуково известяване @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Показване на свързания обект ##### Clicktodial ##### ClickToDialSetup=Настройка на модула за набиране (ClickToDial) ClickToDialUrlDesc=URL, който се извиква при кликване върху телефонен номер. В URL адреса може да използвате маркери
    __PHONETO__, който ще бъде заменен с телефонния номер на лицето, на което ще се обаждате
    __PHONEFROM__, който ще бъде заменен с телефонния номер на обаждащия се (вашият)
    __LOGIN__, който ще бъде заменен с clicktodial потребителско име (дефиниран в картата на потребителя)
    __PASS__, който ще бъде заменен с clicktodial парола (дефинирана в картата на потребителя). -ClickToDialDesc=Този модул прави възможно кликването върху телефонни номера. С едно щракване върху иконата ще наберете телефонният номер. Това може да се използва за извикване на Call-Center система от Dolibarr, която може да избере например телефонен номер в SIP система. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Просто използвайте връзката "tel:" за телефонни номера ClickToDialUseTelLinkDesc=Използвайте този метод, ако вашите потребители имат softphone или софтуерен интерфейс, инсталиран на същия компютър заедно с браузъра и се обаждат, когато кликнете върху връзка във вашия браузър, която започва "tel:". Ако имате нужда от пълно сървърно решение (няма нужда от локална софтуерна инсталация), трябва да изберете стойност "Не" и да попълните следващото поле. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Това поле съдържа референция за иден Enter0or1=Въведете 0 или 1 UnicodeCurrency=Въведете тук между скобите, десетичен код, който представлява символа на валутата. Например: за $, въведете [36] - за Бразилски Реал R$ [82,36] - за €, въведете [8364] ColorFormat=RGB цвета е в HEX формат, например: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Позиция на реда в комбинирани списъци SellTaxRate=Ставка на данъка върху продажби RecuperableOnly=Да за ДДС "Не възприеман, но възстановим", предназначен за някои области във Франция. Запазете стойността "Не" във всички останали случаи. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Запитване за оферта MailToSendSupplierOrder=Поръчки за покупка MailToSendSupplierInvoice=Фактури за доставка MailToSendContract=Договори +MailToSendReception=Стокови разписки MailToThirdparty=Контрагенти MailToMember=Членове MailToUser=Потребители @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s е наличен. В ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s е наличен. Версия %s е поддържаща версия, така че съдържа само корекции на грешки. Препоръчваме на всички потребители да актуализират до тази версия. Изданието за поддръжка не въвежда нови функции или промени в базата данни. Може да се изтегли от раздела за изтегляне в портала https://www.dolibarr.org (подраздел Стабилни версии). Прочетете ChangeLog за пълен списък с промените. MultiPriceRuleDesc=Когато опцията "Няколко нива на цени за продукт / услуга" е активирана може да определите различни цени (по едно за ниво цена) за всеки продукт. За да спестите време тук може да въведете правило за автоматично изчисляване на цена за всяко ниво на базата на цената от първото ниво, така че ще трябва да въведете само цена за първото ниво за всеки продукт. Тази страница е предназначена да ви спести време, но е полезна само ако цените за всяко ниво са относителни към първо ниво. В повечето случаи може да игнорирате тази страница. ModelModulesProduct=Шаблони за продуктови документи +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=За да можете автоматично да генерирате кодове, първо трябва да определите мениджър, за да дефинирате автоматично номера на баркода. SeeSubstitutionVars=Вижте * Забележка за списък на възможните заместващи променливи SeeChangeLog=Вижте файла ChangeLog (само на английски) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Лява граница в PDF MAIN_PDF_MARGIN_RIGHT=Дясна граница в PDF MAIN_PDF_MARGIN_TOP=Горна граница в PDF MAIN_PDF_MARGIN_BOTTOM=Долна граница в PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=За този модул не е необходима специфична настройка. SetToYesIfGroupIsComputationOfOtherGroups=Посочете стойност 'Да', ако тази група е съвкупност от други групи. EnterCalculationRuleIfPreviousFieldIsYes=Въведете правило за изчисление, ако предишното поле е настроено на "Да" (например "CODEGRP1 + CODEGRP2") @@ -1933,13 +1953,14 @@ NothingProcessed=Нищо не е направено XEmailsDoneYActionsDone=Открити са %s имейл адреса, %s имейл адреса са успешно обработени (за %s записа / действия) RecordEvent=Записване на имейл събитие CreateLeadAndThirdParty=Създаване на възможност (и контрагент, ако е необходимо) -CreateTicketAndThirdParty=Създаване на тикет (и контрагент, ако е необходимо) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Код на последния резултат NbOfEmailsInInbox=Брой имейли в директорията източник LoadThirdPartyFromName=Зареждане на името на контрагента от %s (само за зареждане) LoadThirdPartyFromNameOrCreate=Зареждане на името на контрагента от %s (да се създаде, ако не е намерено) -WithDolTrackingID=Намерена е Dolibarr референция в идентификационния номер на съобщението -WithoutDolTrackingID=Не е намерена Dolibarr референция в идентификационния номер на съобщението +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Код на меню (главно меню) ECMAutoTree=Показване на автоматично ECM дърво @@ -1981,7 +2002,7 @@ ImportSetup=Настройка на модула за импортиране н InstanceUniqueID=Уникален идентификатор на инстанцията SmallerThan=По-малък от LargerThan=По-голям от -IfTrackingIDFoundEventWillBeLinked=Обърнете внимание, че ако е намерен проследяващ код във входящата електронна поща, събитието ще бъде автоматично свързано със свързаните обекти. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=С GMail акаунт, ако сте активирали валидирането в 2 стъпки е препоръчително да създадете специална втора парола за приложението, вместо да използвате своята парола за акаунта от https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=Може да използвате това действие, за да намерите и заредите съществуващ контрагент във вашата база данни, чрез съдържанието на имейла. Намереният (или създаден) контрагент ще бъде използван при следващи действия, които се нуждаят от това. В полето на параметъра може да използвате, например 'EXTRACT:BODY:Name:\\s([^\\s]*)', ако искате да извлечете името на контрагента от низ 'Name: name to find', който е открит в съдържанието на имейла. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/bg_BG/agenda.lang b/htdocs/langs/bg_BG/agenda.lang index 497307d363d..d2fbae50f13 100644 --- a/htdocs/langs/bg_BG/agenda.lang +++ b/htdocs/langs/bg_BG/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Брой събития ListOfActions=Списък на събития EventReports=Справки за събития Location=Местоположение -ToUserOfGroup=на всеки потребител от група +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Целодневно събитие MenuToDoActions=Всички незавършени събития MenuDoneActions=Всички завършени събития @@ -86,6 +86,8 @@ ProposalDeleted=Предложението е изтрито OrderDeleted=Поръчката е изтрита InvoiceDeleted=Фактурата е изтрита DraftInvoiceDeleted=Черновата фактура е изтрита +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Продукт %s е създаден PRODUCT_MODIFYInDolibarr=Продукт %s е променен PRODUCT_DELETEInDolibarr=Продукт %s е изтрит @@ -158,3 +160,9 @@ DateStartPlusOne=Начална дата + 1 час SetAllEventsToTodo=Задаване на статус 'За извършване' за всички събития SetAllEventsToInProgress=Задаване на статус 'В процес' за всички събития SetAllEventsToFinished=Задаване на статус 'Завършено' за всички събития +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/bg_BG/boxes.lang b/htdocs/langs/bg_BG/boxes.lang index 5d283cd67d8..f360c2f0d01 100644 --- a/htdocs/langs/bg_BG/boxes.lang +++ b/htdocs/langs/bg_BG/boxes.lang @@ -27,20 +27,20 @@ BoxTitleLastSuppliers=Доставчици: %s последно добавени BoxTitleLastModifiedSuppliers=Доставчици: %s последно променени BoxTitleLastModifiedCustomers=Клиенти: %s последно променени BoxTitleLastCustomersOrProspects=Клиенти или потенциални клиенти: %s последно добавени -BoxTitleLastCustomerBills=Фактури за продажба: %s последно добавени -BoxTitleLastSupplierBills=Фактури за доставка: %s последно добавени +BoxTitleLastCustomerBills=Фактури за продажба: %s последно променени +BoxTitleLastSupplierBills=Фактури за доставка: %s последно променени BoxTitleLastModifiedProspects=Потенциални клиенти: %s последно променени BoxTitleLastModifiedMembers=Членове: %s последно добавени BoxTitleLastFicheInter=Интервенции: %s последно променени BoxTitleOldestUnpaidCustomerBills=Фактури за продажба: %s най-стари неплатени BoxTitleOldestUnpaidSupplierBills=Фактури за доставка: %s най-стари неплатени -BoxTitleCurrentAccounts=Отворени сметки: баланси +BoxTitleCurrentAccounts=Активни сметки: баланси BoxTitleSupplierOrdersAwaitingReception=Поръчки за покупка в очакване за получаване BoxTitleLastModifiedContacts=Контакти / Адреси: %s последно променени BoxMyLastBookmarks=Отметки: %s последни BoxOldestExpiredServices=Най-стари изтекли активни услуги BoxLastExpiredServices=Договори: %s най-стари договори с активни изтекли услуги -BoxTitleLastActionsToDo=Действия за извършване: %s последни +BoxTitleLastActionsToDo=Действия: %s последни за извършване BoxTitleLastContracts=Договори: %s последно променени BoxTitleLastModifiedDonations=Дарения: %s последно променени BoxTitleLastModifiedExpenses=Разходни отчети: %s последно променени @@ -51,11 +51,11 @@ BoxGoodCustomers=Добри клиенти BoxTitleGoodCustomers=%s Добри клиенти FailedToRefreshDataInfoNotUpToDate=Неуспешно опресняване на RSS поток. Последното успешно опресняване е на дата: %s LastRefreshDate=Последна дата на опресняване -NoRecordedBookmarks=Не са дефинирани отметки +NoRecordedBookmarks=Не са дефинирани отметки. ClickToAdd=Кликнете тук, за да добавите. NoRecordedCustomers=Няма регистрирани клиенти NoRecordedContacts=Няма регистрирани контакти -NoActionsToDo=Няма дейности за извършване +NoActionsToDo=Няма действия за извършване NoRecordedOrders=Няма регистрирани поръчки за продажба NoRecordedProposals=Няма регистрирани предложения NoRecordedInvoices=Няма регистрирани фактури за продажба @@ -77,12 +77,14 @@ BoxSuppliersOrdersPerMonth=Поръчки за покупка на месец BoxProposalsPerMonth=Търговски предложения за месец NoTooLowStockProducts=Няма продукти в наличност, които да са под желания минимум. BoxProductDistribution=Дистрибуция на продукти / услуги -ForObject=По %s +ForObject=по %s BoxTitleLastModifiedSupplierBills=Фактури за доставка: %s последно променени BoxTitleLatestModifiedSupplierOrders=Поръчки за покупка: %s последно променени BoxTitleLastModifiedCustomerBills=Фактури за продажба: %s последно променени BoxTitleLastModifiedCustomerOrders=Поръчки за продажба: %s последно променени BoxTitleLastModifiedPropals=Търговски предложения: %s последно променени +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Фактури за продажба ForCustomersOrders=Поръчки на продажба ForProposals=Предложения @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Не е дефинирана временна смет BoxLastCustomerShipments=Последни пратки към клиенти BoxTitleLastCustomerShipments=Пратки: %s последни към клиенти NoRecordedShipments=Няма регистрирани пратки към клиенти +# Pages +AccountancyHome=Счетоводство diff --git a/htdocs/langs/bg_BG/cashdesk.lang b/htdocs/langs/bg_BG/cashdesk.lang index b79c6547916..a30ed1b0a22 100644 --- a/htdocs/langs/bg_BG/cashdesk.lang +++ b/htdocs/langs/bg_BG/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=ПОС модул BasicPhoneLayout=Използване на просто оформление за телефони SetupOfTerminalNotComplete=Настройката на терминала %s не е завършена DirectPayment=Директно плащане -DirectPaymentButton=Бутон за директно плащане в брой +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Фактурата вече е валидирана NoLinesToBill=Няма редове за фактуриране CustomReceipt=Персонализирана разписка @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Метод на отпечатване ReceiptPrinterMethodDescription=Мощен метод с много параметри. Пълно персонализиране с шаблони. Не може да отпечатва от облака. ByTerminal=По терминал -TakeposNumpadUsePaymentIcon=Използване на икона за плащане в цифровия панел +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} тагът се използва за добавяне на номера на терминала TakeposGroupSameProduct=Групиране на едни и същи продукти StartAParallelSale=Стартиране на нова паралелна продажба -ControlCashOpening=Контролиране на каса при стартиране на ПОС +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Паричен отчет MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/bg_BG/compta.lang b/htdocs/langs/bg_BG/compta.lang index 3f0f420a1d3..c9dd8bc51e4 100644 --- a/htdocs/langs/bg_BG/compta.lang +++ b/htdocs/langs/bg_BG/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Социален или фискален данък SocialContributions=Социални или фискални данъци SocialContributionsDeductibles=Приспадащи се социални или фискални данъци SocialContributionsNondeductibles=Не приспадащи се социални или фискални данъци +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Име на вноска TypeContrib=Тип вноска MenuSpecialExpenses=Специални разходи diff --git a/htdocs/langs/bg_BG/contracts.lang b/htdocs/langs/bg_BG/contracts.lang index eb9fd5776c3..5ab3eed1309 100644 --- a/htdocs/langs/bg_BG/contracts.lang +++ b/htdocs/langs/bg_BG/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Активни услуги MenuExpiredServices=Изтекли услуги MenuClosedServices=Прекратени услуги NewContract=Нов договор -NewContractSubscription=Нов договор / абонамент +NewContractSubscription=New contract or subscription AddContract=Създаване на договор DeleteAContract=Изтриване на договор ActivateAllOnContract=Активиране на всички услуги diff --git a/htdocs/langs/bg_BG/errors.lang b/htdocs/langs/bg_BG/errors.lang index 0224767c9de..622d5c15041 100644 --- a/htdocs/langs/bg_BG/errors.lang +++ b/htdocs/langs/bg_BG/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Новата стойност не може да ErrorFailedToValidatePasswordReset=Неуспешно преинициализиране на паролата. Може би преинициализирането вече е било направено (този линк може да се използва само веднъж). Ако не е така, опитайте да рестартирате преинициализиращия процес. ErrorToConnectToMysqlCheckInstance=Връзката с базата данни е неуспешна. Проверете дали сървърът на базата данни работи (например за mysql/mariadb можете да го стартирате от командния ред със 'sudo service mysql start'). ErrorFailedToAddContact=Неуспешно добавяне на контакт -ErrorDateMustBeBeforeToday=Датата не може да бъде по-голяма от днешната +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Режим на заплащане е зададен като тип %s, но настройката на модул Фактури не е попълнена с информация, която да се показва за този режим на плащане. ErrorPHPNeedModule=Грешка, вашето PHP трябва да им инсталиран %s модул, за да използвате тази функция. ErrorOpenIDSetupNotComplete=Задали сте в конфирурационния файл на Dolibarr да се позволява OpenID удостоверяване, но URL на OpenID услугата не е зададено в константата %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Няма достатъчн ErrorOnlyOneFieldForGroupByIsPossible=Възможно е само едно поле за 'Групиране по' (другите се пренебрегват) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Вашата стойност на PHP параметър upload_max_filesize (%s) е по-голяма от стойността на PHP параметър post_max_size (%s). Това не е последователна настройка. WarningPasswordSetWithNoAccount=За този член бе зададена парола. Въпреки това, не е създаден потребителски акаунт. Така че тази парола е съхранена, но не може да се използва за влизане в Dolibarr. Може да се използва от външен модул/интерфейс, но ако не е необходимо да дефинирате потребителско име или парола за член може да деактивирате опцията "Управление на вход за всеки член" от настройката на модула Членове. Ако трябва да управлявате вход, но не се нуждаете от парола, можете да запазите това поле празно, за да избегнете това предупреждение. Забележка: Имейлът може да се използва и като вход, ако членът е свързан с потребител. diff --git a/htdocs/langs/bg_BG/install.lang b/htdocs/langs/bg_BG/install.lang index 42ec6841727..6de645ed856 100644 --- a/htdocs/langs/bg_BG/install.lang +++ b/htdocs/langs/bg_BG/install.lang @@ -84,7 +84,7 @@ PleaseTypePassword=Моля, въведете парола, празно пол PleaseTypeALogin=Моля, въведете данни за вход! PasswordsMismatch=Паролите са различни, моля, опитайте отново! SetupEnd=Край на настройката -SystemIsInstalled=Инсталация е завършена. +SystemIsInstalled=Инсталацията е завършена. SystemIsUpgraded=Dolibarr е успешно актуализиран. YouNeedToPersonalizeSetup=Трябва да конфигурирате Dolibarr според вашите нужди (външен вид, функции, ...). За да направите това, моля последвайте връзката по-долу: AdminLoginCreatedSuccessfuly=Администраторския профил ' %s ' за Dolibarr е успешно създаден. @@ -139,7 +139,7 @@ MigrationCustomerOrderShipping=Миграция на хранилище за д MigrationShippingDelivery=Надграждане на хранилище на доставки MigrationShippingDelivery2=Надграждане на хранилище на доставки 2 MigrationFinished=Миграцията завърши -LastStepDesc= Последна стъпка : Определете тук потребителското име и паролата, които искате да използвате, за да се свържете с Dolibarr. Не губете това, тъй като това е главният акаунт за администриране на всички други / допълнителни потребителски акаунти. +LastStepDesc=Последна стъпка: Създаване на потребителско име и парола, които да използвате за свързване с Dolibarr. Не ги губете, тъй като това е главният акаунт за администриране на всички други / допълнителни потребителски акаунти. ActivateModule=Активиране на модул %s ShowEditTechnicalParameters=Кликнете тук, за да покажете / редактирате разширените параметри (експертен режим) WarningUpgrade=Внимание:\nАрхивирахте ли преди това базата данни?\nТова е силно препоръчително. Загубата на данни (поради грешки в mysql версия 5.5.40/41/42/43) може да е възможна по време на този процес, така че е важно да се направи пълно архивиране на базата данни преди започване на миграция.\n\nКликнете върху „OK“, за да започнете процеса на мигриране... diff --git a/htdocs/langs/bg_BG/languages.lang b/htdocs/langs/bg_BG/languages.lang index 28dac2e4a02..a6d388a20f9 100644 --- a/htdocs/langs/bg_BG/languages.lang +++ b/htdocs/langs/bg_BG/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Арабски Language_ar_EG=Арабски (Египет) Language_ar_SA=Арабски +Language_az_AZ=Azerbaijani Language_bn_BD=Бенгали +Language_bn_IN=Bengali (India) Language_bg_BG=Български Language_bs_BA=Босненски Language_ca_ES=Каталонски @@ -20,6 +23,7 @@ Language_en_GB=Английски (Обединено кралство) Language_en_IN=Английски (Индия) Language_en_NZ=Английски (Нова Зеландия) Language_en_SA=Английски (Саудитска Арабия) +Language_en_SG=English (Singapore) Language_en_US=Английски (САЩ) Language_en_ZA=Английски (Южна Африка) Language_es_ES=Испански @@ -29,6 +33,7 @@ Language_es_CL=Испански (Чили) Language_es_CO=Испански (Колумбия) Language_es_DO=Испански (Доминиканска република) Language_es_EC=Испански (Еквадор) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Испански (Хондурас) Language_es_MX=Испански (Мексико) Language_es_PA=Испански (Панама) @@ -36,6 +41,7 @@ Language_es_PY=Испански (Парагвай) Language_es_PE=Испански (Перу) Language_es_PR=Испански (Пуерто Рико) Language_es_UY=Испански (Уругвай) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Испански (Венецуела) Language_et_EE=Естонски Language_eu_ES=Баскски @@ -44,15 +50,22 @@ Language_fi_FI=Фински Language_fr_BE=Френски (Белгия) Language_fr_CA=Френски (Канада) Language_fr_CH=Френски (Швейцария) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Френски +Language_fr_GA=French (Gabon) Language_fr_NC=Френски (Нова Каледония) +Language_fr_SN=French (Senegal) Language_fy_NL=Фризийски +Language_gl_ES=Galician Language_he_IL=Иврит +Language_hi_IN=Hindi (India) Language_hr_HR=Хърватски Language_hu_HU=Унгарски Language_id_ID=Инодонезийски Language_is_IS=Исландски Language_it_IT=Италиански +Language_it_CH=Italian (Switzerland) Language_ja_JP=Японски Language_ka_GE=Грузински Language_km_KH=Кхмерски @@ -64,6 +77,7 @@ Language_lv_LV=Латвийски Language_mk_MK=Македонски Language_mn_MN=Монголски Language_nb_NO=Норвежки (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Холандски (Белгия) Language_nl_NL=Холандски Language_pl_PL=Полски @@ -86,4 +100,5 @@ Language_uz_UZ=Узбекски Language_vi_VN=Виетнамски Language_zh_CN=Китайски Language_zh_TW=Китайски (традиционен) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Малайски diff --git a/htdocs/langs/bg_BG/mails.lang b/htdocs/langs/bg_BG/mails.lang index 561646e7805..998b2de9d97 100644 --- a/htdocs/langs/bg_BG/mails.lang +++ b/htdocs/langs/bg_BG/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Настройка на изходяща елек DefaultOutgoingEmailSetup=Настройка на изходящата поща по подразбиране Information=Информация ContactsWithThirdpartyFilter=Контакти с филтър за контрагент +Unanswered=Unanswered +Answered=Отговорен +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/bg_BG/main.lang b/htdocs/langs/bg_BG/main.lang index e9cfd3c09ec..f0cf63d6366 100644 --- a/htdocs/langs/bg_BG/main.lang +++ b/htdocs/langs/bg_BG/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Ед. цена (с ДДС) Amount=Сума AmountInvoice=Фактурна стойност AmountInvoiced=Фактурирана сума -AmountInvoicedHT=Фактурирана сума (с ДДС) -AmountInvoicedTTC=Фактурирана сума (без ДДС) +AmountInvoicedHT=Фактурирана сума (без ДДС) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Сума за плащане AmountHTShort=Сума (без ДДС) AmountTTCShort=Сума (с ДДС) @@ -485,6 +485,7 @@ Categories=Тагове / Категории Category=Таг / Категория By=От From=От +FromDate=От FromLocation=От to=за To=за @@ -687,6 +688,7 @@ Method=Метод Receive=Получаване CompleteOrNoMoreReceptionExpected=Завършено или не се очаква нищо повече ExpectedValue=Очаквана стойност +ExpectedQty=Expected Qty PartialWoman=Частично TotalWoman=Обща NeverReceived=Никога не е получавано @@ -703,6 +705,7 @@ MenuECM=Документи MenuAWStats=AWStats MenuMembers=Членове MenuAgendaGoogle=Google календар +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Ограничение на системата (Меню Начало - Настройка - Сигурност): %s Kb, ограничение на PHP: %s Kb NoFileFound=Няма записани документи в тази директория CurrentUserLanguage=Текущ език @@ -725,7 +728,7 @@ Page=Страница Notes=Бележки AddNewLine=Добавяне на нов ред AddFile=Добавяне на файл -FreeZone=Не е предварително определен продукт / услуга +FreeZone=Free-text product FreeLineOfType=Елемент със свободен текст, тип: CloneMainAttributes=Клониране на обекта с неговите основни атрибути ReGeneratePDF=Повторно генериране на PDF @@ -942,6 +945,39 @@ ShortThursday=Чт ShortFriday=Пт ShortSaturday=Сб ShortSunday=Нд +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Изберете шаблон за имейл SetRef=Задаване на референция Select2ResultFoundUseArrows=Намерени са някои резултати. Използвайте стрелките, за да изберете. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Превключете в режим на ре NotUsedForThisCustomer=Не се използва за този клиент AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Информация +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/bg_BG/members.lang b/htdocs/langs/bg_BG/members.lang index 7174efa4909..49b94a21117 100644 --- a/htdocs/langs/bg_BG/members.lang +++ b/htdocs/langs/bg_BG/members.lang @@ -81,7 +81,7 @@ DeleteType=Изтриване VoteAllowed=Може да гласува Physical=Реален Moral=Морален -MorPhy=Морален / Реален +MorPhy=Същност Reenable=Повторно активиране ResiliateMember=Деактивиране на член ConfirmResiliateMember=Сигурни ли сте, че искате да деактивирате този член? diff --git a/htdocs/langs/bg_BG/mrp.lang b/htdocs/langs/bg_BG/mrp.lang index f7de7b6522b..a3c2904513a 100644 --- a/htdocs/langs/bg_BG/mrp.lang +++ b/htdocs/langs/bg_BG/mrp.lang @@ -1,5 +1,6 @@ Mrp=Поръчки за производство MO=Поръчка за производство +MOs=Manufacturing orders MRPDescription=Модул за управление на поръчки за производство (ПП) MRPArea=Секция за планиране на материални изисквания MrpSetupPage=Настройка на модул за планиране на материални изисквания diff --git a/htdocs/langs/bg_BG/other.lang b/htdocs/langs/bg_BG/other.lang index ff7d312e709..b256d336fd7 100644 --- a/htdocs/langs/bg_BG/other.lang +++ b/htdocs/langs/bg_BG/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Здравейте)__,\n\nМоля, в PredefinedMailContentSendSupplierInvoice=__(Здравейте)__,\n\nМоля, вижте приложената фактура __REF__\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Здравейте)__,\n\nМоля, вижте приложената доставка __REF__\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Здравейте)__,\n\nМоля, вижте приложената интервенция __REF__\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Здравейте)__,\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Здравейте)__,\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Здравейте)__,\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Може да кликнете върху връзката по-долу, за да направите плащане, в случай, че не сте го извършили.\n\n%s\n\n +PredefinedMailContentGeneric=__(Здравейте)__,\n\n\n__(Поздрави)__,\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr е компактна ERP / CRM система, която поддържа различни работни модули. Няма смисъл от демонстрация, показваща всички модули, тъй като такъв сценарий никога не се случва (на разположение са стотици модули). Налични са няколко демо профила. ChooseYourDemoProfil=Изберете демо профила, който най-добре отговаря на вашите нужди... ChooseYourDemoProfilMore=...или създайте свой собствен профил
    (свободен избор на модули) @@ -280,7 +278,9 @@ LinesToImport=Редове за импортиране MemoryUsage=Използване на памет RequestDuration=Продължителност на заявлението +ProductsPerPopularity=Products/Services by popularity PopuProp=Продукти / Услуги по популярност в предложения PopuCom=Продукти / Услуги по популярност в поръчки ProductStatistics=Статистика за продукти / услуги NbOfQtyInOrders=Количество в поръчки +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/bg_BG/products.lang b/htdocs/langs/bg_BG/products.lang index cd841756739..48218d729b0 100644 --- a/htdocs/langs/bg_BG/products.lang +++ b/htdocs/langs/bg_BG/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Задаване на тип баркод BarcodeValue=Баркод стойност NoteNotVisibleOnBill=Бележка (не се вижда на фактури, предложения...) ServiceLimitedDuration=Ако продуктът е услуга с ограничена продължителност: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Множество ценови сегменти за продукт / услуга (всеки клиент е в един ценови сегмент) MultiPricesNumPrices=Брой цени DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Доставни цени (на продук CustomCode=Митнически / Стоков / ХС код CountryOrigin=Държава на произход Nature=Произход на продукта (суровина / произведен) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Кратко означение Unit=Мярка p=е. @@ -359,6 +362,9 @@ SelectCombination=Избиране на комбинация ProductCombinationGenerator=Генератор на варианти Features=Характеристики PriceImpact=Въздействие върху цената +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Въздействие върху теглото NewProductAttribute=Нов атрибут NewProductAttributeValue=Нова стойност на атрибута diff --git a/htdocs/langs/bg_BG/projects.lang b/htdocs/langs/bg_BG/projects.lang index a7d2b3a46c5..a60103602e1 100644 --- a/htdocs/langs/bg_BG/projects.lang +++ b/htdocs/langs/bg_BG/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Сътрудник TypeContact_project_task_external_TASKCONTRIBUTOR=Сътрудник SelectElement=Избиране на елемент AddElement=Връзка към елемент +LinkToElementShort=Връзка към # Documents models DocumentModelBeluga=Шаблон на проектен документ за преглед на свързани елементи DocumentModelBaleine=Шаблон на проектен документ за задачи @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Брой създадени проекти на месе ProjectNbTaskByMonth=Брой създадени задачи на месец ProjectOppAmountOfProjectsByMonth=Сума на възможностите на месец ProjectWeightedOppAmountOfProjectsByMonth=Изчислена сума на възможностите на месец -ProjectOpenedProjectByOppStatus=Активен проект / възможност по статус на възможността -ProjectsStatistics=Статистики на проекти / възможности -TasksStatistics=Статистика на задачи +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Задачата е възложена. Въвеждането на време по тази задача трябва да е възможно. IdTaskTime=Идентификатор на време на задача YouCanCompleteRef=Ако искате да завършите номера с някакъв суфикс, препоръчително е да добавите символ "-", за да го отделите, така че автоматичното номериране да продължи да работи правилно за следващите проекти. Например %s-Суфикс diff --git a/htdocs/langs/bg_BG/recruitment.lang b/htdocs/langs/bg_BG/recruitment.lang new file mode 100644 index 00000000000..30dc001edfa --- /dev/null +++ b/htdocs/langs/bg_BG/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Настройки +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Относно +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/bg_BG/stocks.lang b/htdocs/langs/bg_BG/stocks.lang index c9e8f72b3dc..49166064915 100644 --- a/htdocs/langs/bg_BG/stocks.lang +++ b/htdocs/langs/bg_BG/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Изтриване на изпращане Stock=Наличност Stocks=Наличности MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Наличности по партида / сериен № @@ -95,14 +95,16 @@ RealStock=Реална наличност RealStockDesc=Физическа / реална наличност е наличността, която в момента се намира в складовете. RealStockWillAutomaticallyWhen=Реалната наличност ще бъде модифицирана според това правило (както е определено в модула на Наличности): VirtualStock=Виртуална наличност -VirtualStockDesc=Виртуална наличност е изчислената наличност, която се образува след като всички активни / предстоящи действия (които засягат наличности) са приключени (получени поръчки за покупка, изпратени поръчки за продажба и т.н.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Идентификатор на склад DescWareHouse=Описание на склад LieuWareHouse=Местоположение на склад WarehousesAndProducts=Складове и продукти WarehousesAndProductsBatchDetail=Складове и продукти (с подробности за партида / сериен №) -AverageUnitPricePMPShort=Средно измерена входна цена -AverageUnitPricePMP=Средно измерена входна цена +AverageUnitPricePMPShort=Средно измерена цена +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Единична продажна цена EstimatedStockValueSellShort=Стойност за продажба EstimatedStockValueSell=Стойност за продажба @@ -141,7 +143,7 @@ Replenishments=Попълвания на наличности NbOfProductBeforePeriod=Количество на продукта %s в наличност преди избрания период (< %s) NbOfProductAfterPeriod=Количество на продукта %s в наличност след избрания период (> %s) MassMovement=Масово движение -SelectProductInAndOutWareHouse=Изберете продукт, количество, изпращащ и получаващ склад, след което кликнете върху '%s'. След като направите това за всички необходими движения, кликнете върху '%s'. +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Регистриране на прехвърляне ReceivingForSameOrder=Разписки за тази поръчка StockMovementRecorded=Движенията на наличностите са регистрирани @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/bg_BG/suppliers.lang b/htdocs/langs/bg_BG/suppliers.lang index d04a4d622aa..125f6e9a528 100644 --- a/htdocs/langs/bg_BG/suppliers.lang +++ b/htdocs/langs/bg_BG/suppliers.lang @@ -9,8 +9,8 @@ ShowSupplier=Показване на доставчик OrderDate=Дата на поръчка BuyingPriceMin=Най-добра покупна цена BuyingPriceMinShort=Най-добра покупна цена -TotalBuyingPriceMinShort=Обща сума от покупните цени на субпродукти -TotalSellingPriceMinShort=Обща сума от продажните цени на субпродукти +TotalBuyingPriceMinShort=Обща сума от покупни цени на подпродукти +TotalSellingPriceMinShort=Обща сума от продажни цени на подпродукти SomeSubProductHaveNoPrices=Някои субпродукти нямат дефинирана цена AddSupplierPrice=Добавяне на покупна цена ChangeSupplierPrice=Промяна на покупна цена @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Ниско качество ReputationForThisProduct=Репутация BuyerName=Име на купувача AllProductServicePrices=Всички цени на продукти / услуги -AllProductReferencesOfSupplier=Всички референтни номера за продукти / услуги на доставчик +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Доставни цени diff --git a/htdocs/langs/bg_BG/ticket.lang b/htdocs/langs/bg_BG/ticket.lang index ddb9d38d96b..196f2f14856 100644 --- a/htdocs/langs/bg_BG/ticket.lang +++ b/htdocs/langs/bg_BG/ticket.lang @@ -72,7 +72,6 @@ Deleted=Изтрит # Dict Type=Вид -Category=Категория Severity=Приоритет # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Автоматично възлагане на тике TicketsAutoAssignTicketHelp=При създаване на тикет, той може автоматично да бъде възложен на потребителя, който го е създал. TicketNumberingModules=Модул за номериране на тикети TicketNotifyTiersAtCreation=Уведомяване на контрагента при създаване -TicketGroup=Група TicketsDisableCustomerEmail=Деактивиране на имейлите, когато тикетът е създаден от публичния интерфейс TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Създаден от NewTicket=Нов тикет SubjectAnswerToTicket=Отговор на тикет TicketTypeRequest=Вид на тикета -TicketCategory=Категория +TicketCategory=Група SeeTicket=Преглед на тикет TicketMarkedAsRead=Тикетът е маркиран като прочетен TicketReadOn=Прочетен на diff --git a/htdocs/langs/bg_BG/users.lang b/htdocs/langs/bg_BG/users.lang index 1b4c5498b36..9ffab6ba5ab 100644 --- a/htdocs/langs/bg_BG/users.lang +++ b/htdocs/langs/bg_BG/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Деактивиран в режим на поддръж UserAccountancyCode=Счетоводен код на потребителя UserLogoff=Излизане от потребителя UserLogged=Потребителят е регистриран +DateOfEmployment=Employment date DateEmployment=Дата на назначаване DateEmploymentEnd=Дата на освобождаване CantDisableYourself=Не можете да забраните собствения си потребителски запис @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Принудително валидиране на м ValidatorIsSupervisorByDefault=По подразбиране валидиращият е ръководителя на потребителя. Оставете празно, за да запазите това поведение. UserPersonalEmail=Личен имейл UserPersonalMobile=Личен моб. телефон +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/bg_BG/withdrawals.lang b/htdocs/langs/bg_BG/withdrawals.lang index 4717d36e8f5..00e2744c5ba 100644 --- a/htdocs/langs/bg_BG/withdrawals.lang +++ b/htdocs/langs/bg_BG/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Нареждания с директен дебит WithdrawalReceipt=Нареждане с директен дебит -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Файлове с директен дебит: %s последни @@ -63,7 +63,9 @@ InvoiceRefused=Фактурата е отказана (Таксувай отхв StatusDebitCredit=Статус дебит / кредит StatusWaiting=Очаквано StatusTrans=Изпратено +StatusDebited=Debited StatusCredited=Кредитирано +StatusPaid=Платена StatusRefused=Отхвърлено StatusMotif0=Неуточнено StatusMotif1=Недостатъчни средства @@ -77,13 +79,13 @@ StatusMotif8=Друга причина CreateForSepaFRST=Създаване на файл с директен дебит (SEPA FRST) CreateForSepaRCUR=Създаване на файл с директен дебит (SEPA RCUR) CreateAll=Създаване на файл с директен дебит (всички) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Само офис CreateBanque=Само банка OrderWaiting=Очаква обработка -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Национален номер на наредителя WithBankUsingRIB=За банкови сметки, използващи RIB WithBankUsingBANBIC=За банкови сметки, използващи IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Кредит на WithdrawalFileNotCapable=Не може да се генерира файл с разписка за теглене за вашата държава %s (Вашата държава не се поддържа) ShowWithdraw=Показване на нареждане с директен дебит IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Ако обаче фактурата има поне едно нареждане за плащане с директен дебит, което е все още необработено, то няма да бъде зададено като платено, за да позволи предварително управление на тегленето. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Файл за теглене +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Задаване на статус 'Изпратен файл' ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Статистика по статус на редове @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Начин на плащане ModeRECUR=Периодично плащане ModeFRST=Еднократно плащане PleaseCheckOne=Моля, проверете само един +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Създадена е поръчка с директен дебит %s AmountRequested=Заявена сума SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Сума: %s
    Метод: %s
    Дата: %s InfoRejectSubject=Платежното нареждане с директен дебит е отхвърлено InfoRejectMessage=Здравейте,

    Платежното нареждане с директен дебит по фактура %s, отнасящо се до фирма %s, със сума от %s е отказано от банката.

    --
    %s ModeWarning=Опцията за реален режим не беше зададена, спираме след тази симулация +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/bg_BG/workflow.lang b/htdocs/langs/bg_BG/workflow.lang index dec1f41bc78..ed2fb4312cf 100644 --- a/htdocs/langs/bg_BG/workflow.lang +++ b/htdocs/langs/bg_BG/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Класифициране на с # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Класифициране на свързаното за запитване към доставчик - първоизточник като фактурираното след валидиране на доставната фактура (и ако стойността на фактурата е същата като общата сума на свързаното запитване) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Класифициране на свързаната поръчка за покупка - първоизточник като фактурирана след валидиране на доставна фактура (и ако стойността на фактурата е същата като общата сума на свързаната поръчка) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Автоматично създаване AutomaticClassification=Автоматично класифициране diff --git a/htdocs/langs/bg_BG/zapier.lang b/htdocs/langs/bg_BG/zapier.lang index 36779e36087..36b711c3fae 100644 --- a/htdocs/langs/bg_BG/zapier.lang +++ b/htdocs/langs/bg_BG/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Модул Zapier за Dolibarr # Admin page # ZapierForDolibarrSetup = Настройка на Zapier за Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/bn_BD/accountancy.lang b/htdocs/langs/bn_BD/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/bn_BD/accountancy.lang +++ b/htdocs/langs/bn_BD/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/bn_BD/admin.lang b/htdocs/langs/bn_BD/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/bn_BD/admin.lang +++ b/htdocs/langs/bn_BD/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/bn_BD/agenda.lang b/htdocs/langs/bn_BD/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/bn_BD/agenda.lang +++ b/htdocs/langs/bn_BD/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/bn_BD/boxes.lang b/htdocs/langs/bn_BD/boxes.lang index 8fe1f84b149..d6fd298a3a7 100644 --- a/htdocs/langs/bn_BD/boxes.lang +++ b/htdocs/langs/bn_BD/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/bn_BD/cashdesk.lang b/htdocs/langs/bn_BD/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/bn_BD/cashdesk.lang +++ b/htdocs/langs/bn_BD/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/bn_BD/compta.lang b/htdocs/langs/bn_BD/compta.lang index 6cd046c5607..8f4f058bb87 100644 --- a/htdocs/langs/bn_BD/compta.lang +++ b/htdocs/langs/bn_BD/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/bn_BD/contracts.lang b/htdocs/langs/bn_BD/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/bn_BD/contracts.lang +++ b/htdocs/langs/bn_BD/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/bn_BD/errors.lang b/htdocs/langs/bn_BD/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/bn_BD/errors.lang +++ b/htdocs/langs/bn_BD/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/bn_BD/languages.lang b/htdocs/langs/bn_BD/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/bn_BD/languages.lang +++ b/htdocs/langs/bn_BD/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/bn_BD/mails.lang b/htdocs/langs/bn_BD/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/bn_BD/mails.lang +++ b/htdocs/langs/bn_BD/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/bn_BD/main.lang b/htdocs/langs/bn_BD/main.lang index dd0f4362996..0149ae4d2ce 100644 --- a/htdocs/langs/bn_BD/main.lang +++ b/htdocs/langs/bn_BD/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/bn_BD/members.lang b/htdocs/langs/bn_BD/members.lang index 5886c598d52..5ef946ddf67 100644 --- a/htdocs/langs/bn_BD/members.lang +++ b/htdocs/langs/bn_BD/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/bn_BD/mrp.lang b/htdocs/langs/bn_BD/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/bn_BD/mrp.lang +++ b/htdocs/langs/bn_BD/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/bn_BD/other.lang b/htdocs/langs/bn_BD/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/bn_BD/other.lang +++ b/htdocs/langs/bn_BD/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/bn_BD/products.lang b/htdocs/langs/bn_BD/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/bn_BD/products.lang +++ b/htdocs/langs/bn_BD/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/bn_BD/projects.lang b/htdocs/langs/bn_BD/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/bn_BD/projects.lang +++ b/htdocs/langs/bn_BD/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/bn_BD/recruitment.lang b/htdocs/langs/bn_BD/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/bn_BD/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/bn_BD/stocks.lang b/htdocs/langs/bn_BD/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/bn_BD/stocks.lang +++ b/htdocs/langs/bn_BD/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/bn_BD/suppliers.lang b/htdocs/langs/bn_BD/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/bn_BD/suppliers.lang +++ b/htdocs/langs/bn_BD/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/bn_BD/workflow.lang b/htdocs/langs/bn_BD/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/bn_BD/workflow.lang +++ b/htdocs/langs/bn_BD/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/bn_BD/zapier.lang b/htdocs/langs/bn_BD/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/bn_BD/zapier.lang +++ b/htdocs/langs/bn_BD/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/bn_IN/accountancy.lang b/htdocs/langs/bn_IN/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/bn_IN/accountancy.lang +++ b/htdocs/langs/bn_IN/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/bn_IN/admin.lang b/htdocs/langs/bn_IN/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/bn_IN/admin.lang +++ b/htdocs/langs/bn_IN/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/bn_IN/agenda.lang b/htdocs/langs/bn_IN/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/bn_IN/agenda.lang +++ b/htdocs/langs/bn_IN/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/bn_IN/boxes.lang b/htdocs/langs/bn_IN/boxes.lang index bd62684421a..d6fd298a3a7 100644 --- a/htdocs/langs/bn_IN/boxes.lang +++ b/htdocs/langs/bn_IN/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/bn_IN/cashdesk.lang b/htdocs/langs/bn_IN/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/bn_IN/cashdesk.lang +++ b/htdocs/langs/bn_IN/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/bn_IN/compta.lang b/htdocs/langs/bn_IN/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/bn_IN/compta.lang +++ b/htdocs/langs/bn_IN/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/bn_IN/contracts.lang b/htdocs/langs/bn_IN/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/bn_IN/contracts.lang +++ b/htdocs/langs/bn_IN/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/bn_IN/errors.lang b/htdocs/langs/bn_IN/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/bn_IN/errors.lang +++ b/htdocs/langs/bn_IN/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/bn_IN/languages.lang b/htdocs/langs/bn_IN/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/bn_IN/languages.lang +++ b/htdocs/langs/bn_IN/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/bn_IN/mails.lang b/htdocs/langs/bn_IN/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/bn_IN/mails.lang +++ b/htdocs/langs/bn_IN/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/bn_IN/main.lang b/htdocs/langs/bn_IN/main.lang index adbc443198f..0af5c66f0e0 100644 --- a/htdocs/langs/bn_IN/main.lang +++ b/htdocs/langs/bn_IN/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/bn_IN/members.lang b/htdocs/langs/bn_IN/members.lang index dd0a5bf49e2..5ef946ddf67 100644 --- a/htdocs/langs/bn_IN/members.lang +++ b/htdocs/langs/bn_IN/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/bn_IN/mrp.lang b/htdocs/langs/bn_IN/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/bn_IN/mrp.lang +++ b/htdocs/langs/bn_IN/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/bn_IN/other.lang b/htdocs/langs/bn_IN/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/bn_IN/other.lang +++ b/htdocs/langs/bn_IN/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/bn_IN/products.lang b/htdocs/langs/bn_IN/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/bn_IN/products.lang +++ b/htdocs/langs/bn_IN/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/bn_IN/projects.lang b/htdocs/langs/bn_IN/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/bn_IN/projects.lang +++ b/htdocs/langs/bn_IN/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/bn_IN/recruitment.lang b/htdocs/langs/bn_IN/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/bn_IN/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/bn_IN/stocks.lang b/htdocs/langs/bn_IN/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/bn_IN/stocks.lang +++ b/htdocs/langs/bn_IN/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/bn_IN/suppliers.lang b/htdocs/langs/bn_IN/suppliers.lang index b69b11272b4..51562b8bb7a 100644 --- a/htdocs/langs/bn_IN/suppliers.lang +++ b/htdocs/langs/bn_IN/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/bn_IN/ticket.lang b/htdocs/langs/bn_IN/ticket.lang index a9cff9391d0..59519282c80 100644 --- a/htdocs/langs/bn_IN/ticket.lang +++ b/htdocs/langs/bn_IN/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/bn_IN/users.lang b/htdocs/langs/bn_IN/users.lang index 41a5ebd0981..25d9205457b 100644 --- a/htdocs/langs/bn_IN/users.lang +++ b/htdocs/langs/bn_IN/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/bn_IN/withdrawals.lang b/htdocs/langs/bn_IN/withdrawals.lang index cccd8196481..114a8d9dd6c 100644 --- a/htdocs/langs/bn_IN/withdrawals.lang +++ b/htdocs/langs/bn_IN/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Paid StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/bn_IN/workflow.lang b/htdocs/langs/bn_IN/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/bn_IN/workflow.lang +++ b/htdocs/langs/bn_IN/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/bn_IN/zapier.lang b/htdocs/langs/bn_IN/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/bn_IN/zapier.lang +++ b/htdocs/langs/bn_IN/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/bs_BA/accountancy.lang b/htdocs/langs/bs_BA/accountancy.lang index e57fc06e4a3..b21215a1589 100644 --- a/htdocs/langs/bs_BA/accountancy.lang +++ b/htdocs/langs/bs_BA/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Dnevnik prodaje ACCOUNTING_PURCHASE_JOURNAL=Dnevnik nabavki @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Nije izmireno ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/bs_BA/admin.lang b/htdocs/langs/bs_BA/admin.lang index 5db1c28e5a3..48a667ba744 100644 --- a/htdocs/langs/bs_BA/admin.lang +++ b/htdocs/langs/bs_BA/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Postavke modula ModulesSetup=Modules/Application setup ModuleFamilyBase=Sistem @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Postavke direktorija za dokumente Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Potencijal mogućeg klijenta +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Jedinice DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Status mogućeg klijenta +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Kompanija/organizacija CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Narudžbe za nabavku MailToSendSupplierInvoice=Fakture prodavača MailToSendContract=Ugovori +MailToSendReception=Receptions MailToThirdparty=Subjekti MailToMember=Članovi MailToUser=Korisnici @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/bs_BA/agenda.lang b/htdocs/langs/bs_BA/agenda.lang index 5fe55463a70..e3fd4c2b551 100644 --- a/htdocs/langs/bs_BA/agenda.lang +++ b/htdocs/langs/bs_BA/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Broj događaja ListOfActions=Lista događaja EventReports=Event reports Location=Lokacija -ToUserOfGroup=Bilo koji korisnik u grupi +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Događaj za cijeli dan(e) MenuToDoActions=Svi nepotpuni događaji MenuDoneActions=Sve završeni događaji @@ -86,6 +86,8 @@ ProposalDeleted=Ponuda obrisana OrderDeleted=Narudžba obrisana InvoiceDeleted=Faktura obrisana DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Datum početka + 1 sat SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/bs_BA/boxes.lang b/htdocs/langs/bs_BA/boxes.lang index 7a65920bf0d..7106f0a31c4 100644 --- a/htdocs/langs/bs_BA/boxes.lang +++ b/htdocs/langs/bs_BA/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Posljednjih %s unesenih dobavljača BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Posljednjih %s kupaca ili prospekata -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Najnovijih %s članova BoxTitleLastFicheInter=Posljednjih %s izmijenjenih intervencija @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Posljednjih %s izmijenjenih ponuda +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Fakture kupaca ForCustomersOrders=Narudžbe kupaca ForProposals=Prijedlozi @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Računovodstvo diff --git a/htdocs/langs/bs_BA/cashdesk.lang b/htdocs/langs/bs_BA/cashdesk.lang index e415d20f155..b0ffb1d3f05 100644 --- a/htdocs/langs/bs_BA/cashdesk.lang +++ b/htdocs/langs/bs_BA/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/bs_BA/compta.lang b/htdocs/langs/bs_BA/compta.lang index 488ffaee0e9..90a8289d2d9 100644 --- a/htdocs/langs/bs_BA/compta.lang +++ b/htdocs/langs/bs_BA/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/bs_BA/contracts.lang b/htdocs/langs/bs_BA/contracts.lang index 9ec496057d1..9198e656369 100644 --- a/htdocs/langs/bs_BA/contracts.lang +++ b/htdocs/langs/bs_BA/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Aktivne usluge MenuExpiredServices=Istekle usluge MenuClosedServices=Završene usluge NewContract=Novi ugovor -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Obrisati ugovor ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/bs_BA/errors.lang b/htdocs/langs/bs_BA/errors.lang index 7ea5c6cef62..d3460403a51 100644 --- a/htdocs/langs/bs_BA/errors.lang +++ b/htdocs/langs/bs_BA/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/bs_BA/languages.lang b/htdocs/langs/bs_BA/languages.lang index b5fe554d77e..f30cffc94c2 100644 --- a/htdocs/langs/bs_BA/languages.lang +++ b/htdocs/langs/bs_BA/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arapski Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arapski +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bugarski Language_bs_BA=Bosanski Language_ca_ES=Katalonski @@ -20,6 +23,7 @@ Language_en_GB=Engleski (United Kingdom) Language_en_IN=Engleski (Indija) Language_en_NZ=Engleski (Novi Zeland) Language_en_SA=Engleski (Saudijska Arabija) +Language_en_SG=English (Singapore) Language_en_US=Engleski (United States) Language_en_ZA=Engleski (Južna Afrika) Language_es_ES=Španski @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Španjolski (Honduras) Language_es_MX=Španjolski (Meksiko) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Španjolski (Paragvaj) Language_es_PE=Španjolski (Peru) Language_es_PR=Španjolski (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonski Language_eu_ES=Baskijski @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Francuski (Belgija) Language_fr_CA=Francuski (Kanada) Language_fr_CH=Francuski (Švajcarska) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francuski +Language_fr_GA=French (Gabon) Language_fr_NC=Francuski (Nova Kaledonija) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Jevrejski +Language_hi_IN=Hindi (India) Language_hr_HR=Hrvatski Language_hu_HU=Mađarski Language_id_ID=Indonesian Language_is_IS=Islandski Language_it_IT=Italijanski +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanski Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Letonski Language_mk_MK=Makedonski Language_mn_MN=Mongolian Language_nb_NO=Norveški (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgija) Language_nl_NL=Dutch Language_pl_PL=Poljski @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vijetnamski Language_zh_CN=Kineski Language_zh_TW=Kineski (tradicionalni) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/bs_BA/mails.lang b/htdocs/langs/bs_BA/mails.lang index 3b41f698ef6..93bde73c33f 100644 --- a/htdocs/langs/bs_BA/mails.lang +++ b/htdocs/langs/bs_BA/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Inromacije ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/bs_BA/main.lang b/htdocs/langs/bs_BA/main.lang index 19185a7375f..477e64c7237 100644 --- a/htdocs/langs/bs_BA/main.lang +++ b/htdocs/langs/bs_BA/main.lang @@ -355,8 +355,8 @@ PriceUTTC=J.C. (uklj. PDV) Amount=Iznos AmountInvoice=Iznos fakture AmountInvoiced=Fakturisani iznos -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Iznos plaćanja AmountHTShort=Amount (excl.) AmountTTCShort=Iznos (uklj. PDV) @@ -485,6 +485,7 @@ Categories=Oznake/kategorije Category=Oznaka/kategorija By=Od From=Od +FromDate=Od FromLocation=Od to=za To=za @@ -687,6 +688,7 @@ Method=Metoda Receive=Primiti CompleteOrNoMoreReceptionExpected=Završeno ili se ne očekuje više ExpectedValue=Očekivana vrijednost +ExpectedQty=Expected Qty PartialWoman=Djelimično TotalWoman=Ukupno NeverReceived=Nikad primljeno @@ -703,6 +705,7 @@ MenuECM=Dokumenti MenuAWStats=AWStats MenuMembers=Članovi MenuAgendaGoogle=Google kalendar +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr ograničenje (Meni Početna-Postavke-Sigurnost): %s Kb, PHP ograničenje: %s Kb NoFileFound=Nema dokumenata spremljenih u ovom direktoriju CurrentUserLanguage=Trenutni jezik @@ -725,7 +728,7 @@ Page=Stranica Notes=Napomene AddNewLine=Dodaj novi red AddFile=Dodaj datoteku -FreeZone=Nije predefinisan proizvod/usluga +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Kloniraj objekt sa njegovim osnovnim osobinama ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=Č ShortFriday=P ShortSaturday=S ShortSunday=N +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Odaberite šablon emaila SetRef=Postavi ref. Select2ResultFoundUseArrows=Pronađeni neki rezultati. Koristite strelice za odabir. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Inromacije +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/bs_BA/members.lang b/htdocs/langs/bs_BA/members.lang index 415317e90cf..70359336519 100644 --- a/htdocs/langs/bs_BA/members.lang +++ b/htdocs/langs/bs_BA/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Potvrđeno +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Obriši VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/bs_BA/mrp.lang b/htdocs/langs/bs_BA/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/bs_BA/mrp.lang +++ b/htdocs/langs/bs_BA/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/bs_BA/other.lang b/htdocs/langs/bs_BA/other.lang index 3b543fcee8d..024bf6013d5 100644 --- a/htdocs/langs/bs_BA/other.lang +++ b/htdocs/langs/bs_BA/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Linija za uvoz MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/bs_BA/products.lang b/htdocs/langs/bs_BA/products.lang index 990bc66d759..4b43f471d39 100644 --- a/htdocs/langs/bs_BA/products.lang +++ b/htdocs/langs/bs_BA/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Jedinica p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Novi atribut NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/bs_BA/projects.lang b/htdocs/langs/bs_BA/projects.lang index 76ce913f66e..2a1023dec52 100644 --- a/htdocs/langs/bs_BA/projects.lang +++ b/htdocs/langs/bs_BA/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link ka # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/bs_BA/recruitment.lang b/htdocs/langs/bs_BA/recruitment.lang new file mode 100644 index 00000000000..babb96232f7 --- /dev/null +++ b/htdocs/langs/bs_BA/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = O programu +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/bs_BA/stocks.lang b/htdocs/langs/bs_BA/stocks.lang index 22d0df4aa79..73ea1445906 100644 --- a/htdocs/langs/bs_BA/stocks.lang +++ b/htdocs/langs/bs_BA/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Obriši slanje Stock=Zaliha Stocks=Zalihe MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Stvarna zaliha RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Viruelna zaliha -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=ID skladišta DescWareHouse=Opis skladišta LieuWareHouse=Lokalizacija skladišta WarehousesAndProducts=Skladišta i proizvodi WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Ponderirani prosjek ulazne cijene -AverageUnitPricePMP=Ponderirani prosjek ulazne cijene +AverageUnitPricePMPShort=Ponderirana/vagana aritmetička sredina - PAS +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Prodajna cijena jedinice EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Nadopune NbOfProductBeforePeriod=Količina proizvoda %s u zalihi prije odabranog perioda (%s) NbOfProductAfterPeriod=Količina proizvoda %s u zalihi poslije odabranog perioda (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Odaberite proizvod, kolilinu, izvordno skladište i ciljano skladište. zatim kliknite "%s". Kada je ovo završeno za sva potrebna kretanja, kliknite "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Kretanja zalihe zapisana @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/bs_BA/suppliers.lang b/htdocs/langs/bs_BA/suppliers.lang index 2131b7bfec6..eb8fe5c46fb 100644 --- a/htdocs/langs/bs_BA/suppliers.lang +++ b/htdocs/langs/bs_BA/suppliers.lang @@ -1,29 +1,29 @@ -# Dolibarr language file - Source file is en_US - suppliers -Suppliers=Vendors +# Dolibarr language file - Source file is en_US - vendors +Suppliers=Dobavljači SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor +NewSupplier=Novi dobavljač History=Historija -ListOfSuppliers=List of vendors +ListOfSuppliers=Spisak dobavljača ShowSupplier=Show vendor OrderDate=Datum narudžbe BuyingPriceMin=Best buying price BuyingPriceMinShort=Best buying price TotalBuyingPriceMinShort=Ukupan iznos za kupovne cijene podproizvoda -TotalSellingPriceMinShort=Total of subproducts selling prices +TotalSellingPriceMinShort=Ukupno za prodajne cijene podproizvoda SomeSubProductHaveNoPrices=Neki podproizvodi nemaju definisanu cijenu AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Ova referentni dobavljač je već povezan sa referencom: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area -RefSupplierShort=Ref. vendor +RefSupplierShort=Ref. prodavača Availability=Dostupnost -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Odobri ovu narudžbu ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/bs_BA/workflow.lang b/htdocs/langs/bs_BA/workflow.lang index d2b25e8b01a..81f8088f74d 100644 --- a/htdocs/langs/bs_BA/workflow.lang +++ b/htdocs/langs/bs_BA/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Postavke workflow modula -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/bs_BA/zapier.lang b/htdocs/langs/bs_BA/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/bs_BA/zapier.lang +++ b/htdocs/langs/bs_BA/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ca_ES/accountancy.lang b/htdocs/langs/ca_ES/accountancy.lang index 80a469ad9eb..3cee41a264d 100644 --- a/htdocs/langs/ca_ES/accountancy.lang +++ b/htdocs/langs/ca_ES/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Gestiona un nombre diferent de zero al final d'un compte BANK_DISABLE_DIRECT_INPUT=Des-habilitar l'enregistrament directe de transaccions al compte bancari ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Habilita l'exportació d'esborrany en el diari ACCOUNTANCY_COMBO_FOR_AUX=Activa la llista de combo per al compte subsidiari (pot ser lent si tens molts tercers) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Diari de venda ACCOUNTING_PURCHASE_JOURNAL=Diari de compra @@ -284,6 +285,7 @@ ShowTutorial=Mostrar Tutorial NotReconciled=No conciliat ## Admin +BindingOptions=Binding options ApplyMassCategories=Aplica categories massives AddAccountFromBookKeepingWithNoCategories=Compte disponible encara no al grup personalitzat CategoryDeleted=La categoria per al compte contable ha sigut eliminada diff --git a/htdocs/langs/ca_ES/admin.lang b/htdocs/langs/ca_ES/admin.lang index 2a4317379b9..b524a7b8a73 100644 --- a/htdocs/langs/ca_ES/admin.lang +++ b/htdocs/langs/ca_ES/admin.lang @@ -219,7 +219,7 @@ Nouveauté=Novetat AchatTelechargement=Comprar / Descarregar GoModuleSetupArea=Per desplegar / instal·lar un nou mòdul, aneu a l'àrea de configuració del mòdul: %s . DoliStoreDesc=DoliStore, el lloc oficial de mòduls complementaris per Dolibarr ERP / CRM -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. +DoliPartnersDesc=Llista d’empreses que ofereixen mòduls o funcions desenvolupades a mida.
    Nota: ja que Dolibarr és una aplicació de codi obert, qualsevol usuari experimentat en la programació PHP hauria de poder desenvolupar un mòdul. WebSiteDesc=Llocs web de referència per trobar més mòduls (no core)... DevelopYourModuleDesc=Algunes solucions per desenvolupar el vostre propi mòdul... URL=URL @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Remitent per defecte per a correus enviats manualment UserEmail=Correu electrònic de l'usuari CompanyEmail=Correu electrònic de l'empresa FeatureNotAvailableOnLinux=Funcionalitat no disponible en sistemes Unix. Proveu el seu sendmail localment. +FixOnTransifex=Corregeix la traducció a la plataforma de traducció en línia del projecte SubmitTranslation=Si la traducció d'aquest idioma no està completa o trobes errors, pots corregir-ho editant els arxius en el directorilangs/%s i enviant els canvis a www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Si la traducció d'aquest idioma no està completa o trobes errors, pots corregir-ho editant els fitxers en el directorilangs/%s i enviant els fitxers modificats al fòrum de www.dolibarr.es o pels desenvolupadors a github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=Si la traducció d’aquest idioma no és completa o si trobeu errors, podeu corregir-la editant fitxers al directori langs / %s i envieu fitxers modificats a dolibarr.org/forum o, si sou un desenvolupador, amb un PR a github .com / Dolibarr / dolibarr ModuleSetup=Configuració del mòdul ModulesSetup=Configuració de mòduls/aplicacions ModuleFamilyBase=Sistema @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=El mòdul "%s" ha d'habilitar-se primer si neces SecurityToken=Clau per encriptar urls NoSmsEngine=No hi ha cap gestor d'enviament de SMS. Els gestors d'enviament de SMS no s'instal·len per defecte ja que depenen de cada proveïdor, però pot trobar-los a la plataforma %s PDF=PDF -PDFDesc=Opcions globals per a la generació de PDF. -PDFAddressForging=Regles per als quadres d'adreces +PDFDesc=Opcions globals de generació de PDF +PDFAddressForging=Regles per a la secció d’adreces HideAnyVATInformationOnPDF=Amaga tota la informació relacionada amb l'IVA PDFRulesForSalesTax=Regles per l'IVA PDFLocaltax=Regles per %s -HideLocalTaxOnPDF=Amagar %s de taxa a la columna d'impostos de venda +HideLocalTaxOnPDF=Amagueu la tarifa %s a la columna Impost de venda / IVA HideDescOnPDF=Amaga la descripció dels productes HideRefOnPDF=Amaga la ref. dels productes HideDetailsOnPDF=Amaga els detalls de les línies de producte @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Canviar el preu on la referència de base és MassConvert=Inicia la conversió massiva PriceFormatInCurrentLanguage=Format del preu en idioma actual String=Cadena +String1Line=Cadena (1 línia) TextLong=Text llarg +TextLongNLines=Text llarg (n línies) HtmlText=Text Html Int=Enter Float=Decimal @@ -542,10 +545,10 @@ Module54Name=Contractes/Subscripcions Module54Desc=Gestió de contractes (serveis o subscripcions recurrents) Module55Name=Codis de barra Module55Desc=Gestió dels codis de barra -Module56Name=Pagaments per transferència de crèdit -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Pagaments directes de deute bancari -Module57Desc=Gestió de domiciliacions. També inclou generació del fitxer SEPA per als països europeus. +Module56Name=Pagament per transferència bancària +Module56Desc=Gestió del pagament de proveïdors mitjançant comandes de transferència de crèdit. Inclou la generació de fitxers SEPA per a països europeus. +Module57Name=Pagaments mitjançant dèbit directe +Module57Desc=Gestió de comandes de dèbit directe. Inclou la generació de fitxers SEPA per a països europeus. Module58Name=ClickToDial Module58Desc=Integració amb ClickToDial Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Crear/modificar serveis Permission534=Eliminar serveis Permission536=Veure / gestionar els serveis ocults Permission538=Exportar serveis -Permission650=Llegiu factures de materials -Permission651=Crear / actualitzar factures de materials -Permission652=Eliminar factures de materials +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer +Permission650=Llegeix llistes de materials +Permission651=Crea / actualitza llistes de materials +Permission652=Elimina llistes de materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Consultar donacions Permission702=Crear/modificar donacions Permission703=Eliminar donacions @@ -848,6 +858,8 @@ Permission773=Eliminar els informes de despeses Permission774=Consulta tots els informes de despeses (inclòs els usuaris no subordinats) Permission775=Aprovar els informes de despeses Permission776=Pagar informes de despeses +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Exportar informes de despeses Permission1001=Consultar stocks Permission1002=Crear/modificar els magatzems @@ -900,6 +912,7 @@ Permission2515=Configuració carpetes de documents Permission2801=Utilitzar el client FTP en mode lectura (només explorar i descarregar) Permission2802=Utilitzar el client FTP en mode escriptura (esborrar o pujar arxius) Permission3200=Llegiu els esdeveniments arxivats i les empremtes dactilars +Permission3301=Generate new modules Permission4001=Vegeu empleats Permission4002=Crea empleats Permission4003=Suprimeix els empleats @@ -947,7 +960,8 @@ Permission63003=Elimina recursos Permission63004=Enllaça recursos en esdeveniments de l'agenda DictionaryCompanyType=Tipus de tercer DictionaryCompanyJuridicalType=Formes jurídiques de tercers -DictionaryProspectLevel=Nivell de client potencial +DictionaryProspectLevel=Nivell potencial de perspectiva per a empreses +DictionaryProspectContactLevel=Nivell potencial de perspectiva dels contactes DictionaryCanton=Estats/Províncies DictionaryRegion=Regions DictionaryCountry=Països @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Plantilles Email DictionaryUnits=Unitats DictionaryMeasuringUnits=Unitats de mesura DictionarySocialNetworks=Xarxes socials -DictionaryProspectStatus=Estat del pressupost +DictionaryProspectStatus=Estat de perspectiva de les empreses +DictionaryProspectContactStatus=Estat de perspectiva dels contactes DictionaryHolidayTypes=Tipus de dies lliures DictionaryOpportunityStatus=Estat de d'oportunitat pel projecte/oportunitat DictionaryExpenseTaxCat=Informe de despeses - Categories de transport @@ -1076,7 +1091,7 @@ LoginPage=Pàgina de login BackgroundImageLogin=Imatge de fons PermanentLeftSearchForm=Zona de recerca permanent del menú de l'esquerra DefaultLanguage=Idioma per defecte -EnableMultilangInterface=Habilita el suport multiidioma +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Mostra el logotip de l'organització al menú CompanyInfo=Empresa/Organització CompanyIds=Identitats d'empresa/organització @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Es necessita un criteri de cerca com a m NewTranslationStringToShow=Nova cadena de traducció a mostrar OriginalValueWas=La traducció original s'ha sobreescrit. El valor original era:

    %s TransKeyWithoutOriginalValue=Heu obligat una nova traducció de la clau de traducció ' %s ' que no existeix en cap fitxer d'idioma -TotalNumberOfActivatedModules=Mòduls/Aplicacions activats: %s / %s +TitleNumberOfActivatedModules=Mòduls activats +TotalNumberOfActivatedModules=Mòduls activats: %s / %s YouMustEnableOneModule=Ha d'activar almenys 1 mòdul. ClassNotFoundIntoPathWarning=La classe %s no s'ha trobat a la ruta PHP YesInSummer=Sí a l'estiu @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Utilitzeu tipus d'esdeveniments (gestionats en el menú Co AGENDA_USE_EVENT_TYPE_DEFAULT=Estableix automàticament aquest valor predeterminat per al tipus d'esdeveniment en el formulari de creació de l'esdeveniment AGENDA_DEFAULT_FILTER_TYPE=Estableix automàticament aquest tipus d'esdeveniment al filtre de cerca de la vista d'agenda AGENDA_DEFAULT_FILTER_STATUS=Estableix automàticament aquest estat per a esdeveniments al filtre de cerca de la visualització d'agenda -AGENDA_DEFAULT_VIEW=Establir la pestanya per defecte al seleccionar el menú Agenda +AGENDA_DEFAULT_VIEW=Quina vista voleu obrir de manera predeterminada en seleccionar el menú Agenda AGENDA_REMINDER_EMAIL=Activar el recordatori d'esdeveniments per correu electrònic (es pot definir l'opció retard en cada esdeveniment). Nota: el mòdul %s ha d'estar habilitat i configurat correctament per tenir un recordatori enviat amb la freqüència correcta. AGENDA_REMINDER_BROWSER=Activa el recordatori de l'esdeveniment al navegador de l'usuari (quan s'aconsegueix la data de l'esdeveniment, cada usuari pot rebutjar això des de la pregunta de confirmació del navegador) AGENDA_REMINDER_BROWSER_SOUND=Habilita les notificacions sonores @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Mostra l'objecte vinculat a la vista d'agenda ##### Clicktodial ##### ClickToDialSetup=Configuració del mòdul Click To Dial ClickToDialUrlDesc=Es crida l'URL quan es fa un clic a la imatge miniatura de telèfon. A l'URL, pots utilitzar les etiquetes
    __PHONETO__ que serà reemplaçada pel número de telèfon de la persona a trucar
    __PHONEFROM__ que serà reemplaçada pel número de telèfon de la persona que truca (el vostre)
    __LOGIN__ que serà reemplaçada pel teu usuari d'inici de clicktodial (definit a la fitxa d'usuari)
    __PASS__ que serà reemplaçada per la contrasenya de clicktodial (definida a la fitxa d'usuari). -ClickToDialDesc=Aquest mòdul makea números de telèfon enllaços clics. Un clic a la icona farà que el telèfon truqui al número. Això es pot utilitzar per trucar a un sistema de centre de trucades de Dolibarr que pot trucar al número de telèfon d'un sistema SIP, per exemple. +ClickToDialDesc=Aquest mòdul canvia els números de telèfon quan s'utilitza un ordinador d'escriptori en enllaços clicables. Un clic trucarà al número. Es pot utilitzar per iniciar la trucada telefònica quan s'utilitza un telèfon suau a l'escriptori o quan s'utilitza un sistema CTI basat en el protocol SIP per exemple. Nota: quan utilitzeu un telèfon intel·ligent, els números de telèfon sempre es poden fer clic. ClickToDialUseTelLink=Utilitzar sols l'enllaç "tel:" als números de telèfon ClickToDialUseTelLinkDesc=Utilitzeu aquest mètode si els vostres usuaris tenen un softphone o una interfície de programari instal·lada a la mateixa computadora que el navegador, i us demani quan feu clic a un enllaç al vostre navegador que comença per "tel:". Si necessiteu una solució completa de servidor (no cal instal·lar programari local), heu d'establir això a "No" i omplir el camp següent. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Aquest camp conté una referència a un identificador de línia. In Enter0or1=Introdueix 0 o 1 UnicodeCurrency=Introduïu aquí entre claudàtors, llista del número de bytes que representa el símbol monetari. Per exemple: per $, introduïu [36] - per Brasil real R $ [82,36] - per €, introduïu [8364] ColorFormat=El color RGB es troba en format HEX, per exemple: FF0000 +PictoHelp=Nom de la icona en format dolibarr ("image.png" si es troba al directori temàtic actual, "image.png@nom_du_module" si es troba al directori / img / d'un mòdul) PositionIntoComboList=Posició de la línia en llistes combo SellTaxRate=Valor de l'IVA RecuperableOnly=Sí per l'IVA "No percebut sinó recuperable" dedicat per a algun estat a França. Manteniu el valor "No" en tots els altres casos. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Sol·licitud de cotització MailToSendSupplierOrder=Comandes de compra MailToSendSupplierInvoice=Factures del proveïdor MailToSendContract=Contractes +MailToSendReception=Recepcions MailToThirdparty=Tercers MailToMember=Socis MailToUser=Usuaris @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Disponible ERP/CRM Dolibarr %s. La versió % ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s està disponible. La versió %s és una versió de manteniment, de manera que només conté correccions d'errors. Us recomanem que tots els usuaris actualitzeu aquesta versió. Un llançament de manteniment no introdueix novetats ni canvis a la base de dades. Podeu descarregar-lo des de l'àrea de descàrrega del portal https://www.dolibarr.org (subdirectori de les versions estables). Podeu llegir el ChangeLog per obtenir una llista completa dels canvis. MultiPriceRuleDesc=Quan s'activa l'opció "Diversos nivells de preus per producte / servei", podeu definir preus diferents (un per preu) per a cada producte. Per estalviar-vos temps, aquí podeu introduir una regla per calcular automàticament un preu per a cada nivell en funció del preu del primer nivell, de manera que només haureu d'introduir un preu del primer nivell per a cada producte. Aquesta pàgina està dissenyada per estalviar temps, però és útil només si els preus de cada nivell són relatius al primer nivell. Podeu ignorar aquesta pàgina en la majoria dels casos. ModelModulesProduct=Plantilles per documents de productes +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Per poder generar codis automàticament, primer heu de definir un gestor per definir automàticament el número del codi de barres. SeeSubstitutionVars=Veure * nota per llistat de possibles variables de substitució SeeChangeLog=Veure el fitxer ChangeLog (només en anglès) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Marge esquerre al PDF MAIN_PDF_MARGIN_RIGHT=Marge dret al PDF MAIN_PDF_MARGIN_TOP=Marge superior al PDF MAIN_PDF_MARGIN_BOTTOM=Marge inferior al PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Alçada del logotip en PDF NothingToSetup=No hi ha cap configuració específica necessària per a aquest mòdul. SetToYesIfGroupIsComputationOfOtherGroups=Estableixi a SÍ si aquest grup és un càlcul d'altres grups EnterCalculationRuleIfPreviousFieldIsYes=Introduïu la regla de càlcul si el camp anterior estava establert a Sí (Per exemple 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=No s'ha fet res XEmailsDoneYActionsDone=%s correus electrònics qualificats, %s correus electrònics processats amb èxit (per %s registre / accions realitzades) RecordEvent=Registre d'esdeveniments de correu electrònic CreateLeadAndThirdParty=Crea Client Potencial (i tercer si és necessari) -CreateTicketAndThirdParty=Crear tiquet (i tercers si cal) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Últim codi retornat NbOfEmailsInInbox=Nombre de correus electrònics en el directori font LoadThirdPartyFromName=Carregueu la cerca de tercers al %s (només carrega) LoadThirdPartyFromNameOrCreate=Carregueu la cerca de tercers a %s (crear si no es troba) -WithDolTrackingID=S'ha trobat la referència de Dolibarr a l'ID del missatge -WithoutDolTrackingID=No s'ha trobat la referència de Dolibarr a l'ID del missatge +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Codi postal MainMenuCode=Codi d'entrada del menú (menu principal) ECMAutoTree=Mostra l'arbre ECM automàtic @@ -1981,9 +2002,9 @@ ImportSetup=Configuració del mòdul Import InstanceUniqueID=ID únic de la instància SmallerThan=Menor que LargerThan=Major que -IfTrackingIDFoundEventWillBeLinked=Tingueu en compte que si es troba un identificador de seguiment al correu electrònic entrant, l’esdeveniment s’enllaçarà automàticament als objectes relacionats. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Amb un compte de GMail, si heu activat la validació de dos passos, es recomana crear una segona contrasenya dedicada a l’aplicació en comptes d’utilitzar la contrasenya del vostre compte des de https://myaccount.google.com/. -EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. +EmailCollectorTargetDir=Pot ser un comportament desitjat traslladar el correu electrònic a una altra etiqueta / directori quan s'ha processat correctament. Només heu de definir el nom del directori per utilitzar aquesta funció (NO utilitzeu caràcters especials en nom). Tingueu en compte que també heu d'utilitzar un compte d'inici de sessió de lectura / escriptura. EmailCollectorLoadThirdPartyHelp=Podeu utilitzar aquesta acció per utilitzar el contingut de correu electrònic per cercar i carregar una tercera part existent a la base de dades. La tercera part trobada (o creada) s'utilitzarà per a les accions que ho necessitin. Al camp del paràmetre podeu fer servir, per exemple, 'EXTRACT:BODY:Name:\\s([^\\s]*)' si voleu extreure el nom de la tercera part d'una cadena "Name: nom a trobar" que es troba a la cos. EndPointFor=Punt final per %s: %s DeleteEmailCollector=Suprimeix el recollidor de correu electrònic @@ -2005,3 +2026,7 @@ RssNote=Nota: Cada definició de canal RSS proporciona un giny que heu d'habilit JumpToBoxes=Vés a Configuració -> Ginys MeasuringUnitTypeDesc=Utilitzeu aquí un valor com "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=La escala és el nombre de llocs que heu de moure la part decimal per coincidir amb la unitat de referència predeterminada. Per al tipus d'unitat "temps", és el nombre de segons. Valors entre 80 i 99 són valors reservats. +TemplateAdded=S'ha afegit la plantilla +TemplateUpdated=Plantilla actualitzada +TemplateDeleted=S'ha suprimit la plantilla +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ca_ES/agenda.lang b/htdocs/langs/ca_ES/agenda.lang index 8fbb5f56fa7..04ba47cdfb9 100644 --- a/htdocs/langs/ca_ES/agenda.lang +++ b/htdocs/langs/ca_ES/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Nombre d'esdeveniments ListOfActions=Llista d'esdeveniments EventReports=Informes d'esdeveniments Location=Localització -ToUserOfGroup=A qualsevol usuari del grup +ToUserOfGroup=Esdeveniment assignat a qualsevol usuari del grup EventOnFullDay=Esdeveniment per tot el dia MenuToDoActions=Tots els esdeveniments incomplets MenuDoneActions=Esdeveniments acabats @@ -63,7 +63,7 @@ ShipmentClassifyClosedInDolibarr=Expedició %s classificada com a facturada ShipmentUnClassifyCloseddInDolibarr=Enviament %s classificat com a re-obert ShipmentBackToDraftInDolibarr=Enviament %s retornat a l'estat d'esborrany ShipmentDeletedInDolibarr=Expedició %s eliminada -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=S'ha validat la recepció %s OrderCreatedInDolibarr=Comanda %s creada OrderValidatedInDolibarr=Comanda %s validada OrderDeliveredInDolibarr=Comanda %s classificada com a enviada @@ -86,6 +86,8 @@ ProposalDeleted=Pressupost esborrat OrderDeleted=Comanda esborrada InvoiceDeleted=Factura esborrada DraftInvoiceDeleted=S'ha suprimit l'esborrany de factura +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Producte %s creat PRODUCT_MODIFYInDolibarr=Producte %s modificat PRODUCT_DELETEInDolibarr=Producte %s eliminat @@ -158,3 +160,9 @@ DateStartPlusOne=Data d'inici + 1 hora SetAllEventsToTodo=Definir tots els events com a pendents SetAllEventsToInProgress=Definir tots els events en progrés SetAllEventsToFinished=Definir tots els events com a enllestits +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ca_ES/banks.lang b/htdocs/langs/ca_ES/banks.lang index 47dc59c574d..d3ed5063135 100644 --- a/htdocs/langs/ca_ES/banks.lang +++ b/htdocs/langs/ca_ES/banks.lang @@ -37,9 +37,9 @@ IbanValid=BAN vàlid IbanNotValid=BAN no vàlid StandingOrders=Domiciliacions StandingOrder=Domiciliació -PaymentByDirectDebit=Payment by direct debit -PaymentByBankTransfers=Pagaments per transferència de crèdit -PaymentByBankTransfer=Pagaments per transferència de crèdit +PaymentByDirectDebit=Cobrament per domiciliació bancària +PaymentByBankTransfers=Pagaments per transferència bancària +PaymentByBankTransfer=Pagament per transferència bancària AccountStatement=Extracte AccountStatementShort=Extracte AccountStatements=Extractes @@ -106,8 +106,8 @@ SupplierInvoicePayment=Pagament al proveïdor SubscriptionPayment=Pagament de quota WithdrawalPayment=Ordre de pagament de dèbit SocialContributionPayment=Pagament d'impostos varis -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=Transferència bancària +BankTransfers=Transferències bancàries MenuBankInternalTransfer=Transferència interna TransferDesc=Traspassa d'un compte a un altre, Dolibarr generarà dos registres (dèbit en compte origen i crèdit en compte destí). Per aquesta transacció s'utilitzarà el mateix import (excepte el signe), l'etiqueta i la data). TransferFrom=De diff --git a/htdocs/langs/ca_ES/bills.lang b/htdocs/langs/ca_ES/bills.lang index c351345b199..725581fa07d 100644 --- a/htdocs/langs/ca_ES/bills.lang +++ b/htdocs/langs/ca_ES/bills.lang @@ -561,7 +561,7 @@ ToCreateARecurringInvoiceGeneAuto=Si necessites tenir cada factura generada auto DeleteRepeatableInvoice=Elimina la factura recurrent ConfirmDeleteRepeatableInvoice=Vols eliminar la plantilla de factura? CreateOneBillByThird=Crea una factura per tercer (per la resta, una factura per comanda) -BillCreated=%s càrrec(s) creats +BillCreated=%s factura(es) creades StatusOfGeneratedDocuments=Estat de la generació de documents DoNotGenerateDoc=No generar cap fitxer de document AutogenerateDoc=Genera automàticament el fitxer del document diff --git a/htdocs/langs/ca_ES/boxes.lang b/htdocs/langs/ca_ES/boxes.lang index e9f06e9626b..e82b52c32a0 100644 --- a/htdocs/langs/ca_ES/boxes.lang +++ b/htdocs/langs/ca_ES/boxes.lang @@ -44,7 +44,7 @@ BoxTitleLastActionsToDo=Últims %s events a realitzar BoxTitleLastContracts=Últims %s contractes modificats BoxTitleLastModifiedDonations=Últimes %s donacions modificades BoxTitleLastModifiedExpenses=Últimes %s despeses modificades -BoxTitleLatestModifiedBoms=Últimes %s factures de material modificades +BoxTitleLatestModifiedBoms=Últimes %s llistes de material modificades BoxTitleLatestModifiedMos=Últimes %s Ordres de Fabricació modificades BoxGlobalActivity=Activitat global BoxGoodCustomers=Bons clients @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Comandes a Proveïdor: últimes %s modifica BoxTitleLastModifiedCustomerBills=Factures del client: últimes %s modificades BoxTitleLastModifiedCustomerOrders=Comandes de venda: últimes %s modificades BoxTitleLastModifiedPropals=Últims %s pressupostos modificats +BoxTitleLatestModifiedJobPositions=Els darrers %s treballs modificats +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Factures a clients ForCustomersOrders=Comandes de clients ForProposals=Pressupostos @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=El compte de suspens no està definit BoxLastCustomerShipments=Últims enviaments de clients BoxTitleLastCustomerShipments=Últims %s enviaments de clients NoRecordedShipments=Cap enviament de client registrat +# Pages +AccountancyHome=Comptabilitat diff --git a/htdocs/langs/ca_ES/cashdesk.lang b/htdocs/langs/ca_ES/cashdesk.lang index 998b9816314..c18d86147d6 100644 --- a/htdocs/langs/ca_ES/cashdesk.lang +++ b/htdocs/langs/ca_ES/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=Mòdul TPV BasicPhoneLayout=Utilitzeu el disseny bàsic dels telèfons SetupOfTerminalNotComplete=La configuració del terminal %s no està completa DirectPayment=Pagament directe -DirectPaymentButton=Botó de pagament directe en efectiu +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=La factura ja està validada NoLinesToBill=No hi ha línies a facturar CustomReceipt=Rebut personalitzat @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Mòdul extern amb funcions addicionals. Possib PrintMethod=Mètode d'impressió ReceiptPrinterMethodDescription=Mètode potent amb molts paràmetres. Completament personalitzable amb plantilles. No es pot imprimir des del núvol. ByTerminal=Per terminal -TakeposNumpadUsePaymentIcon=Utilitzar la icona de pagament al teclat numèric +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Mòdul de numeració per a vendes del Punt de Venda (POS) CashDeskGenericMaskCodes6 =
    l'etiqueta {TN} s'utilitza per afegir el numero de terminal TakeposGroupSameProduct=Agrupa les mateixes línies de productes StartAParallelSale=Inicia una nova venda paral·lela -ControlCashOpening=Control de caixa en obrir el Punt de Venda (POS) +ControlCashOpening=Control cash box at opening POS CloseCashFence=Tanca el recompte d'efectiu CashReport=Informe d'efectiu MainPrinterToUse=Impressora principal a utilitzar @@ -110,10 +110,15 @@ BarRestaurant=Bar Restaurant AutoOrder=Comanda del propi client RestaurantMenu=Menú CustomerMenu=Menú de clients -ScanToMenu=Scan QR code to see the menu -ScanToOrder=Scan QR code to order -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +ScanToMenu=Escaneja el codi QR per veure el menú +ScanToOrder=Escaneja el codi QR per demanar +Appearance=Aparença +HideCategoryImages=Amaga les imatges de la categoria +HideProductImages=Amaga les imatges del producte +NumberOfLinesToShow=Nombre de línies d'imatges a mostrar +DefineTablePlan=Definiu el pla de les taules +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Rebut de regal +ModuleReceiptPrinterMustBeEnabled=La impressora de recepció del mòdul deu haver estat habilitada primer +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ca_ES/companies.lang b/htdocs/langs/ca_ES/companies.lang index d4ddc530767..25f37badd76 100644 --- a/htdocs/langs/ca_ES/companies.lang +++ b/htdocs/langs/ca_ES/companies.lang @@ -425,7 +425,7 @@ ListSuppliersShort=Llistat de proveïdors ListProspectsShort=Llistat de clients potencials ListCustomersShort=Llistat de clients ThirdPartiesArea=Àrea de tercers i contactes -LastModifiedThirdParties=Latest %s modified Third Parties +LastModifiedThirdParties=Últims %s tercers modificats UniqueThirdParties=Total de Tercers InActivity=Actiu ActivityCeased=Tancat diff --git a/htdocs/langs/ca_ES/compta.lang b/htdocs/langs/ca_ES/compta.lang index 4b0f9440d26..a12ab3ac428 100644 --- a/htdocs/langs/ca_ES/compta.lang +++ b/htdocs/langs/ca_ES/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Impost varis SocialContributions=Impostos varis SocialContributionsDeductibles=Impostos varis deduïbles SocialContributionsNondeductibles=Impostos varis no deduïbles +DateOfSocialContribution=Data de l’impost social o fiscal LabelContrib=Etiqueta de aportació TypeContrib=Tipus d'aportació MenuSpecialExpenses=Pagaments especials diff --git a/htdocs/langs/ca_ES/contracts.lang b/htdocs/langs/ca_ES/contracts.lang index f0a12b9b39a..4d1ade9a707 100644 --- a/htdocs/langs/ca_ES/contracts.lang +++ b/htdocs/langs/ca_ES/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Serveis actius MenuExpiredServices=Serveis expirats MenuClosedServices=Serveis tancats NewContract=Nou contracte -NewContractSubscription=Nou contracte/subscripció +NewContractSubscription=Nou contracte o subscripció AddContract=Crear contracte DeleteAContract=Eliminar un contracte ActivateAllOnContract=Activar tots els serveis diff --git a/htdocs/langs/ca_ES/errors.lang b/htdocs/langs/ca_ES/errors.lang index 07fabc3059c..5a2ffeb9abf 100644 --- a/htdocs/langs/ca_ES/errors.lang +++ b/htdocs/langs/ca_ES/errors.lang @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Sintaxi incorrecta per al codi del proveïdor ErrorSupplierCodeRequired=Es requereix el codi del proveïdor ErrorSupplierCodeAlreadyUsed=Codi de proveïdor ja utilitzat ErrorBadParameters=Paràmetres incorrectes -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Falten paràmetres o són incorrectes ErrorBadValueForParameter=Valor incorrecte '%s' del paràmetre '%s' ErrorBadImageFormat=L'arxiu de la imatge no és un format suportat (El seu PHP no suporta les funciones de conversió d'aquest format d'imatge) ErrorBadDateFormat=El valor '%s' té un format de data no reconegut @@ -120,7 +120,7 @@ ErrorLoginHasNoEmail=Aquest usuari no té e-mail. Impossible continuar. ErrorBadValueForCode=Valor incorrecte per codi de seguretat. Torna a intentar-ho amb un nou valor... ErrorBothFieldCantBeNegative=Els camps %s i %s no poden ser negatius ErrorFieldCantBeNegativeOnInvoice=El camp %s no pot ser negatiu en aquest tipus de factura. Si voleu afegir una línia de descompte, només cal que creeu el descompte en primer lloc (amb el camp "%s" de la fitxa del tercer) i després apliqueu-lo a la factura. -ErrorLinesCantBeNegativeForOneVATRate=Total of lines (net of tax) can't be negative for a given not null VAT rate (Found a negative total for VAT rate %s%%). +ErrorLinesCantBeNegativeForOneVATRate=El total de línies (net d’impostos) no pot ser negatiu per a un tipus d’IVA determinat no nul (s’ha trobat un total negatiu per a l’IVA %s %%). ErrorLinesCantBeNegativeOnDeposits=Les línies no poden ser negatives en un dipòsit. Si ho feu, podreu tenir problemes quan necessiteu consumir el dipòsit a la factura final ErrorQtyForCustomerInvoiceCantBeNegative=La quantitat a les línies de factures a client no poden ser negatives ErrorWebServerUserHasNotPermission=El compte d'execució del servidor web %s no disposa dels permisos per això @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=El Nou valor no pot ser igual al antic ErrorFailedToValidatePasswordReset=No s'ha pogut restablir la contrasenya. És possible que aquest enllaç ja s'hagi utilitzat (aquest enllaç només es pot utilitzar una vegada). Si no és el cas prova de reiniciar el procés de restabliment de contrasenya des del principi. ErrorToConnectToMysqlCheckInstance=Error de connexió amb la base de dades. Comprovi que el servidor de la base de dades està funcionant (per exemple, amb mysql/mariadb, pot iniciar-lo amb el comandament 'sudo service mysql start') ErrorFailedToAddContact=Error en l'addició del contacte -ErrorDateMustBeBeforeToday=La data no pot ser més gran que avui +ErrorDateMustBeBeforeToday=La data ha de ser inferior a la d’avui +ErrorDateMustBeInFuture=La data ha de ser major que avui ErrorPaymentModeDefinedToWithoutSetup=S'ha establert la forma de pagament al tipus %s però a la configuració del mòdul de factures no s'ha indicat la informació per mostrar aquesta forma de pagament. ErrorPHPNeedModule=Error, el seu PHP ha de tenir instal·lat el mòdul %s per utilitzar aquesta funcionalitat. ErrorOpenIDSetupNotComplete=Ha configurat Dolibarr per acceptar l'autentificació OpenID, però la URL del servei OpenID no es troba definida a la constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No hi ha quantitat suficien ErrorOnlyOneFieldForGroupByIsPossible=Només és possible un camp per a "GROUP BY" -agrupar per- (els altres són descartats) ErrorTooManyDifferentValueForSelectedGroupBy=S'han trobat massa valors diferents (més que %s ) per al camp " %s ", de manera que no es pot utilitzar com a 'GROUP BY' per gràfics. El camp 'GROUP BY' s'ha suprimit. Pot ser que vulgueu utilitzar-ho com a eix X? ErrorReplaceStringEmpty=Error, la cadena a on fer la substitució és buida +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=El paràmetre PHP upload_max_filesize (%s) és superior al paràmetre PHP post_max_size (%s). No es tracta d’una configuració consistent. WarningPasswordSetWithNoAccount=S'ha indicat una contrasenya per aquest soci. En canvi, no s'ha creat cap compte d'usuari, de manera que aquesta contrasenya s'ha desat però no pot ser utilitzada per entrar a Dolibarr. Es pot utilitzar per un mòdul/interfície extern, però si no cal definir cap usuari i contrasenya per un soci, pots deshabilitar la opció "Gestiona l'entrada per tots els socis" des de la configuració del mòdul Socis. Si necessites gestionar una entrada sense contrasenya, pots mantenir aquest camp buit i permetre aquest avís. Nota: El correu electrònic es pot utilitzar per entrar si el soci està enllaçat a un usuarí @@ -265,4 +269,4 @@ WarningNumberOfRecipientIsRestrictedInMassAction=Advertència: el nombre de dest WarningDateOfLineMustBeInExpenseReportRange=Advertència, la data de la línia no està dins del rang de l'informe de despeses WarningProjectClosed=El projecte està tancat. Heu de tornar a obrir primer. WarningSomeBankTransactionByChequeWereRemovedAfter=Algunes transaccions bancàries es van suprimir després que es generés el rebut que les conté. Per tant, el nombre de xecs i el total de rebuts poden diferir del nombre i el total a la llista. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +WarningFailedToAddFileIntoDatabaseIndex=Alerta, no s'ha pogut afegir l'entrada al fitxer a la taula d'índexs de base de dades ECM diff --git a/htdocs/langs/ca_ES/hrm.lang b/htdocs/langs/ca_ES/hrm.lang index 94f979c4114..ad4ee4e00b6 100644 --- a/htdocs/langs/ca_ES/hrm.lang +++ b/htdocs/langs/ca_ES/hrm.lang @@ -11,7 +11,7 @@ CloseEtablishment=Tanca l'establiment # Dictionary DictionaryPublicHolidays=HRM - Festius DictionaryDepartment=HRM - Llistat de departament -DictionaryFunction=HRM - Job positions +DictionaryFunction=HRM: llocs de treball # Module Employees=Empleats Employee=Empleat diff --git a/htdocs/langs/ca_ES/install.lang b/htdocs/langs/ca_ES/install.lang index e42c3dfa8ac..fe7dcfae281 100644 --- a/htdocs/langs/ca_ES/install.lang +++ b/htdocs/langs/ca_ES/install.lang @@ -218,6 +218,6 @@ ErrorFoundDuringMigration=S'han reportat error(s) durant el procés de migració YouTryInstallDisabledByDirLock=L'aplicació ha intentat actualitzar-se automàticament, però les pàgines d'instal·lació / actualització s'han desactivat per a la seguretat (el directori rep el nom amb el sufix .lock).
    YouTryInstallDisabledByFileLock=L'aplicació s'ha intentat actualitzar automàticament, però les pàgines d'instal·lació / actualització s'han desactivat per a la seguretat (per l'existència d'un fitxer de bloqueig install.lock al directori de documents del dolibarr).
    ClickHereToGoToApp=Fes clic aquí per anar a la teva aplicació -ClickOnLinkOrRemoveManualy=If an upgrade is in progress, please wait. If not, click on the following link. If you always see this same page, you must remove/rename the file install.lock in the documents directory. +ClickOnLinkOrRemoveManualy=Si una actualització està en curs, espereu. Si no, feu clic al següent enllaç. Si sempre veieu aquesta mateixa pàgina, heu de suprimir / canviar el nom del fitxer install.lock del directori de documents. Loaded=Carregat FunctionTest=Prova de funció diff --git a/htdocs/langs/ca_ES/languages.lang b/htdocs/langs/ca_ES/languages.lang index cc4178420f1..4cd7b0a8c33 100644 --- a/htdocs/langs/ca_ES/languages.lang +++ b/htdocs/langs/ca_ES/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Etíop Language_ar_AR=Àrab Language_ar_EG=Àrab (Egipte) Language_ar_SA=Àrab +Language_az_AZ=Azerbaidjan Language_bn_BD=Bengalí +Language_bn_IN=Bengalí (Índia) Language_bg_BG=Búlgar Language_bs_BA=Bosni Language_ca_ES=Català @@ -20,6 +23,7 @@ Language_en_GB=Anglès (Regne Unit) Language_en_IN=Anglès (Índia) Language_en_NZ=Anglès (Nova Zelanda) Language_en_SA=Anglès (Aràbia Saudita) +Language_en_SG=Anglès (Singapur) Language_en_US=Anglès (Estats Units) Language_en_ZA=Anglès (Àfrica del Sud) Language_es_ES=Espanyol @@ -29,6 +33,7 @@ Language_es_CL=Espanyol (Chile) Language_es_CO=Espanyol (Colòmbia) Language_es_DO=Espenyol (Republica Dominicana) Language_es_EC=Espanyol (Equador) +Language_es_GT=Espanyol (Guatemala) Language_es_HN=Espanyol (Honduras) Language_es_MX=Espanyol (Mèxic) Language_es_PA=Espanyol (Panamà) @@ -36,6 +41,7 @@ Language_es_PY=Espanyol (Paraguai) Language_es_PE=Espanyol (Perú) Language_es_PR=Espanyol (Puerto Rico) Language_es_UY=Espanyol (Uruguai) +Language_es_GT=Espanyol (Guatemala) Language_es_VE=Espanyol (Veneçuela) Language_et_EE=Estonià Language_eu_ES=Basc @@ -44,15 +50,22 @@ Language_fi_FI=Finès Language_fr_BE=Francès (Bèlgica) Language_fr_CA=Francès (Canadà) Language_fr_CH=Francès (Suïssa) +Language_fr_CI=Francès (Costa d'Ivori) +Language_fr_CM=Francès (Camerun) Language_fr_FR=Francès +Language_fr_GA=Francès (Gabon) Language_fr_NC=Francès (Nova Caledònia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Gallec Language_he_IL=Hebreu +Language_hi_IN=Hindi (Índia) Language_hr_HR=Croat Language_hu_HU=Hongarès Language_id_ID=Indonesia Language_is_IS=Islandès Language_it_IT=Italià +Language_it_CH=Italià (Suïssa) Language_ja_JP=Japonès Language_ka_GE=Georgià Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Letó Language_mk_MK=Macedoni Language_mn_MN=Mongol Language_nb_NO=Noruec (Bokmal) +Language_ne_NP=Nepalí Language_nl_BE=Neerlandès (Bèlgica) Language_nl_NL=Holandès Language_pl_PL=Polonès @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamita Language_zh_CN=Xinès Language_zh_TW=Xinès (Tradicional) +Language_zh_HK=Xinès (Hong Kong) Language_bh_MY=Malai diff --git a/htdocs/langs/ca_ES/loan.lang b/htdocs/langs/ca_ES/loan.lang index 6f71107fa0d..18f46dd529c 100644 --- a/htdocs/langs/ca_ES/loan.lang +++ b/htdocs/langs/ca_ES/loan.lang @@ -23,9 +23,9 @@ AddLoan=Crea un préstec FinancialCommitment=Compromís financer InterestAmount=Interessos CapitalRemain=Capital restant -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Aquest termini ja està pagat +CantUseScheduleWithLoanStartedToPaid = No es pot utilitzar el planificador per a un préstec amb el pagament iniciat +CantModifyInterestIfScheduleIsUsed = No pots modificar l’interès si fas servir la programació # Admin ConfigLoan=Configuració del mòdul de préstecs LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Compte comptable del capital per defecte diff --git a/htdocs/langs/ca_ES/mails.lang b/htdocs/langs/ca_ES/mails.lang index ad93c59173d..be984d41323 100644 --- a/htdocs/langs/ca_ES/mails.lang +++ b/htdocs/langs/ca_ES/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Configuració del correu sortint (per al mòdul %s DefaultOutgoingEmailSetup=Configuració per defecte del correu electrònic sortint Information=Informació ContactsWithThirdpartyFilter=Contactes amb filtre de tercers +Unanswered=Unanswered +Answered=Respost +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/ca_ES/main.lang b/htdocs/langs/ca_ES/main.lang index bb4106af37c..f38f6109954 100644 --- a/htdocs/langs/ca_ES/main.lang +++ b/htdocs/langs/ca_ES/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Preu unitari (IVA inclòs) Amount=Import AmountInvoice=Import factura AmountInvoiced=Import facturat -AmountInvoicedHT=Import facturat (amb impostos) -AmountInvoicedTTC=Import facturat (sense impostos) +AmountInvoicedHT=Import facturat (sense impostos) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Import pagament AmountHTShort=Import (exclòs) AmountTTCShort=Import @@ -485,6 +485,7 @@ Categories=Etiquetes Category=Etiqueta By=Per From=De +FromDate=De FromLocation=De to=a To=a @@ -687,6 +688,7 @@ Method=Mètode Receive=Recepció CompleteOrNoMoreReceptionExpected=Completat o no s'espera res més ExpectedValue=Valor esperat +ExpectedQty=Quantitat esperada PartialWoman=Parcial TotalWoman=Total NeverReceived=Mai rebut @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Socis MenuAgendaGoogle=Agenda Google +MenuTaxesAndSpecialExpenses=Impostos | Despeses especials ThisLimitIsDefinedInSetup=Límit Dolibarr (Menú inici-configuració-seguretat): %s Kb, PHP limit: %s Kb NoFileFound=No hi ha documents guardats en aquesta carpeta CurrentUserLanguage=Idioma actual @@ -725,7 +728,7 @@ Page=Pàgina Notes=Notes AddNewLine=Afegir nova línia AddFile=Afegir arxiu -FreeZone=No hi ha un producte/servei predefinit +FreeZone=Producte de text lliure FreeLineOfType=Element de text lliure, escriviu: CloneMainAttributes=Clonar l'objecte amb aquests atributs principals ReGeneratePDF=Tornar a generar PDF @@ -843,7 +846,7 @@ Sincerely=Sincerament ConfirmDeleteObject=Esteu segur que voleu suprimir aquest objecte? DeleteLine=Elimina la línia ConfirmDeleteLine=Esteu segur de voler eliminar aquesta línia ? -ErrorPDFTkOutputFileNotFound=Error: the file was not generated. Please check that the 'pdftk' command is installed in a directory included in the $PATH environment variable (linux/unix only) or contact your system administrator. +ErrorPDFTkOutputFileNotFound=Error: el fitxer no s'ha generat. Comproveu que la comanda "pdftk" estigui instal·lada en un directori inclòs a la variable d'entorn $ PATH (només linux / unix) o poseu-vos en contacte amb l'administrador del vostre sistema. NoPDFAvailableForDocGenAmongChecked=No hi havia PDF disponibles per a la generació de document entre els registre comprovats TooManyRecordForMassAction=S'ha seleccionat massa registres per a l'acció massiva. L'acció està restringida a una llista de %s registres. NoRecordSelected=No s'han seleccionat registres @@ -942,6 +945,39 @@ ShortThursday=Dj ShortFriday=Dv ShortSaturday=Ds ShortSunday=Dg +one=un +two=dos +three=tres +four=quatre +five=cinc +six=sis +seven=set +eight=vuit +nine=nou +ten=deu +eleven=onze +twelve=dotze +thirteen=setze +fourteen=catorze +fifteen=quinze +sixteen=setze +seventeen=disset +eighteen=divuit +nineteen=dinou +twenty=vint +thirty=trenta +forty=quaranta +fifty=cinquanta +sixty=seixanta +seventy=setanta +eighty=vuitanta +ninety=noranta +hundred=cent +thousand=mil +million=milions +billion=mil milions +trillion=bilions +quadrillion=quadril·ló SelectMailModel=Seleccioneu una plantilla de correu electrònic SetRef=Indica ref Select2ResultFoundUseArrows=Alguns resultats trobats. Fes servir les fletxes per seleccionar. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Canviar a mode d'edició per afegir traduccions NotUsedForThisCustomer=No s'utilitza per a aquest client AmountMustBePositive=L'import ha de ser positiu ByStatus=Per estat +InformationMessage=Informació +Used=Used +ASAP=El més aviat possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ca_ES/members.lang b/htdocs/langs/ca_ES/members.lang index 7bd9de33351..7f27a36f24c 100644 --- a/htdocs/langs/ca_ES/members.lang +++ b/htdocs/langs/ca_ES/members.lang @@ -81,7 +81,7 @@ DeleteType=Elimina VoteAllowed=Vot autoritzat Physical=Físic Moral=Moral -MorPhy=Moral/Físic +MorPhy=Caràcter Reenable=Reactivar ResiliateMember=Dona de baixa un soci ConfirmResiliateMember=Vols donar de baixa aquest soci? diff --git a/htdocs/langs/ca_ES/modulebuilder.lang b/htdocs/langs/ca_ES/modulebuilder.lang index 0877d3aed5c..7c607a0e6d3 100644 --- a/htdocs/langs/ca_ES/modulebuilder.lang +++ b/htdocs/langs/ca_ES/modulebuilder.lang @@ -139,4 +139,4 @@ ForeignKey=Clau forània TypeOfFieldsHelp=Tipus de camps:
    varchar(99), double (24,8), real, text, html, datetime, timestamp, integer, integer:ClassName: relativepath/to/classfile.class.php[:1[:filter]] ('1' significa que afegim un botó + després del desplegable per crear el registre, 'filtre' pot ser 'status=1 AND fk_user=__USER_ID AND entity IN (__SHARED_ENTITIES__)' per exemple) AsciiToHtmlConverter=Convertidor Ascii a HTML AsciiToPdfConverter=Convertidor Ascii a PDF -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. +TableNotEmptyDropCanceled=La taula no està buida. S'ha cancel·lat l'eliminació. diff --git a/htdocs/langs/ca_ES/mrp.lang b/htdocs/langs/ca_ES/mrp.lang index a143763ecb2..b37b577475c 100644 --- a/htdocs/langs/ca_ES/mrp.lang +++ b/htdocs/langs/ca_ES/mrp.lang @@ -1,17 +1,18 @@ Mrp=Comandes de Fabricació MO=Comanda de fabricació +MOs=Manufacturing orders MRPDescription=Mòdul per gestionar ordres de producció i fabricació (MO). MRPArea=Àrea MRP MrpSetupPage=Configuració del mòdul MRP -MenuBOM=Factures de material -LatestBOMModified=Últimes %s Factures de materials modificades +MenuBOM=Llistes de material +LatestBOMModified=Últimes %s llistes de materials modificades LatestMOModified=Últimes %s Ordres de Fabricació modificades Bom=Llista de materials -BillOfMaterials=Llista de materials +BillOfMaterials=Llista de material BOMsSetup=Configuració del mòdul BOM ListOfBOMs=Llista de factures de material - BOM ListOfManufacturingOrders=Llista de comandes de fabricació -NewBOM=Nova factura de material +NewBOM=Nova llista de material ProductBOMHelp=Producte a crear amb aquest BOM.
    Nota: els productes amb la propietat "Natura del producte" = "Matèria primera" no són visibles a aquesta llista. BOMsNumberingModules=Plantilles de numeració BOM BOMsModelModule=Plantilles de document BOM @@ -27,9 +28,9 @@ ManufacturingEfficiency=Eficiència en la fabricació ConsumptionEfficiency=Eficiència del consum ValueOfMeansLoss=El valor de 0,95 significa una mitjana de 5%% de pèrdues durant la producció ValueOfMeansLossForProductProduced=Un valor de 0,95 significa una mitjana de 5%% de pèrdues de producte produït -DeleteBillOfMaterials=Suprimeix la factura de materials +DeleteBillOfMaterials=Suprimeix la llista de materials DeleteMo=Eliminar Ordre de Fabricació -ConfirmDeleteBillOfMaterials=Esteu segur que voleu suprimir aquesta factura de material? +ConfirmDeleteBillOfMaterials=Estàs segur que vols suprimir aquesta llista de material? ConfirmDeleteMo=Esteu segur que voleu suprimir aquesta factura de material? MenuMRP=Comandes de Fabricació NewMO=Nova comanda de fabricació @@ -38,7 +39,7 @@ DateStartPlannedMo=Data d’inici prevista DateEndPlannedMo=Data prevista de finalització KeepEmptyForAsap=Buit significa "el més aviat possible" EstimatedDuration=Durada estimada -EstimatedDurationDesc=Durada estimada per fabricar aquest producte mitjançant aquesta BOM (llista de material) +EstimatedDurationDesc=Durada estimada per fabricar aquest producte mitjançant aquesta llista de material ConfirmValidateBom=Segur que voleu validar la llista de material amb la referència %s (podreu utilitzar-lo per crear noves Ordres de Fabricació) ConfirmCloseBom=Esteu segur que voleu cancel·lar aquesta llista de materials (ja no la podreu utilitzar per crear noves Ordres de Fabricació)? ConfirmReopenBom=Segur que voleu tornar a obrir aquesta llista de material (podreu utilitzar-lo per crear noves Ordres de Fabricació) @@ -48,12 +49,12 @@ QuantityFrozen=Quantitat congelada QuantityConsumedInvariable=Quan és actiu aquest indicador, la quantitat consumida sempre és el valor definit i no té relació a la quantitat produïda. DisableStockChange=Canvi d'estoc desactivat DisableStockChangeHelp=Quan és actiu aquest indicador, no hi ha cap canvi d’estoc en aquest producte, sigui quina sigui la quantitat consumida -BomAndBomLines=Factures de material i línies +BomAndBomLines=Llistes de material i línies BOMLine=Línia BOM WarehouseForProduction=Magatzem per a la producció CreateMO=Crear OF ToConsume=Consumir -ToProduce=Poduïr +ToProduce=Produïr QtyAlreadyConsumed=Qnt. ja consumida QtyAlreadyProduced=Qnt. ja produïda QtyRequiredIfNoLoss=Quantitat necessària sense pèrdues (Eficiència de fabricació del 100%%) @@ -74,4 +75,4 @@ ProductsToConsume=Productes a consumir ProductsToProduce=Productes a produir UnitCost=Cost unitari TotalCost=Cost total -BOMTotalCost=El cost de produir aquesta BOM (Llista de materials) en funció del cost de cada quantitat i producte a consumir (utilitza el preu de cost si està definit, altrament el preu mitjà ponderat si està definit, altrament el millor preu de compra) +BOMTotalCost=El cost de produir aquesta Llista de materials en funció del cost de cada quantitat i producte a consumir (utilitza el preu de cost si està definit, altrament el preu mitjà ponderat si està definit, altrament el millor preu de compra) diff --git a/htdocs/langs/ca_ES/other.lang b/htdocs/langs/ca_ES/other.lang index fc3f4c9c3da..ac055c9738c 100644 --- a/htdocs/langs/ca_ES/other.lang +++ b/htdocs/langs/ca_ES/other.lang @@ -85,8 +85,8 @@ MaxSize=Tamany màxim AttachANewFile=Adjuntar nou arxiu/document LinkedObject=Objecte adjuntat NbOfActiveNotifications=Nombre de notificacions (número de correus electrònics del destinatari) -PredefinedMailTest=__(Hello)__\nThis is a test mail sent to __EMAIL__.\nThe lines are separated by a carriage return.\n\n__USER_SIGNATURE__ -PredefinedMailTestHtml=__(Hello)__
    This is a test mail sent to __EMAIL__ (the word test must be in bold).
    The lines are separated by a carriage return.

    __USER_SIGNATURE__ +PredefinedMailTest=__(Hola)__\nAquest és un missatge de prova enviat a __EMAIL__.\nLes línies estan separades per una tornada de carro.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__ (Hola) __
    Aquesta és una prova enviada a __EMAIL__ (la paraula test ha de ser en negreta).
    Les línies estan separades per una tornada de carro.

    __USER_SIGNATURE__ PredefinedMailContentContract=__(Hello)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoice=__(Hola)__\n\nTrobeu la factura __REF__ adjunta\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__ (Atentament) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoiceReminder=__(Hola)__\n\nUs recordem que la factura __REF__ sembla que no s'ha pagat. S'adjunta una còpia de la factura com a recordatori.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__ (Atentament) __\n\n__USER_SIGNATURE__ @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hola)__\n\nTrobeu la nostra comanda __ PredefinedMailContentSendSupplierInvoice=__(Hola)__\n\nTrobeu la factura __REF__ adjunta\n\n\n__ (Atentament) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hola)__\n\nTrobeu l'enviament __REF__ adjuntat\n\n\n__ (Atentament) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hola)__\n\nTrobeu la intervenció __REF__ adjunta\n\n\n__ (Atentament) __\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Podeu fer clic a l'enllaç següent per fer el pagament si encara no està fet.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr és un ERP/CRM per a la gestió de negocis (professionals o associacions), compost de mòduls funcionals independents i opcionals. Una demostració que incloga tots aquests mòduls no té sentit perquè no utilitzarà tots els mòduls al mateix temps. Per això, hi han disponibles diferents tipus de perfils de demostració. ChooseYourDemoProfil=Selecciona el perfil de demo que cobreixi millor les teves necessitats... ChooseYourDemoProfilMore=o construeix el teu perfil
    (selecció de mòduls manual) @@ -280,7 +278,9 @@ LinesToImport=Línies per importar MemoryUsage=Ús de memòria RequestDuration=Durada de la sol·licitud +ProductsPerPopularity=Productes / Serveis per popularitat PopuProp=Productes / Serveis per popularitat als pressupostos PopuCom=Productes / Serveis per popularitat a les comandes ProductStatistics=Productes / Serveis Estadístiques NbOfQtyInOrders=Quantitat en comandes +SelectTheTypeOfObjectToAnalyze=Seleccioneu el tipus d'objecte a analitzar ... diff --git a/htdocs/langs/ca_ES/products.lang b/htdocs/langs/ca_ES/products.lang index 3e887f35f7c..b588c475cf3 100644 --- a/htdocs/langs/ca_ES/products.lang +++ b/htdocs/langs/ca_ES/products.lang @@ -43,7 +43,7 @@ ServicesOnSaleOnly=Serveis només en venda ServicesOnPurchaseOnly=Serveis només per compra ServicesNotOnSell=Serveis no a la venda i no per a la compra ServicesOnSellAndOnBuy=Serveis en venda o de compra -LastModifiedProductsAndServices=Latest %s modified products/services +LastModifiedProductsAndServices=Els %s últims productes/serveis modificats LastRecordedProducts=Últims %s productes registrats LastRecordedServices=Últims %s serveis registrats CardProduct0=Producte @@ -104,9 +104,10 @@ SetDefaultBarcodeType=Indica el tipus de codi de barres BarcodeValue=Valor del codi de barres NoteNotVisibleOnBill=Nota (no visible en les factures, pressupostos, etc.) ServiceLimitedDuration=Si el servei és de durada limitada: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Segments de preus múltiples per producte / servei (cada client està en un segment de preus) MultiPricesNumPrices=Nº de preus -DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices +DefaultPriceType=Base de preus per defecte (contra impostos) en afegir preus de venda nous AssociatedProductsAbility=Activa els productes virtuals (kits) AssociatedProducts=Productes virtuals AssociatedProductsNumber=Nº de productes que composen aquest producte @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Preus del venedor (de productes o serveis) CustomCode=Duana / mercaderia / codi HS CountryOrigin=País d'origen Nature=Naturalesa del producte (material/acabat) +NatureOfProductShort=Naturalesa del producte +NatureOfProductDesc=Matèria primera o producte acabat ShortLabel=Etiqueta curta Unit=Unitat p=u. @@ -359,6 +362,9 @@ SelectCombination=Selecciona la combinació ProductCombinationGenerator=Generador de variants Features=Funcionalitats PriceImpact=Impacte en el preu +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Impacte en el pes NewProductAttribute=Nou atribut NewProductAttributeValue=Nou valor de l'atribut diff --git a/htdocs/langs/ca_ES/projects.lang b/htdocs/langs/ca_ES/projects.lang index fec5786b759..b1ca69ba454 100644 --- a/htdocs/langs/ca_ES/projects.lang +++ b/htdocs/langs/ca_ES/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Participant TypeContact_project_task_external_TASKCONTRIBUTOR=Participant SelectElement=Seleccioni element AddElement=Vincular a element +LinkToElementShort=Enllaça a # Documents models DocumentModelBeluga=Plantilla de document del projecte per a la descripció general dels objectes vinculats DocumentModelBaleine=Plantilla de document del projecte per a tasques @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Nombre de projectes creats per mes ProjectNbTaskByMonth=Nº de tasques creades per mes ProjectOppAmountOfProjectsByMonth=Quantitat de clients potencials per mes ProjectWeightedOppAmountOfProjectsByMonth=Quantitat ponderada de clients potencials per mes -ProjectOpenedProjectByOppStatus=Projectes oberts per estats d'oportunitat -ProjectsStatistics=Estadístiques en projectes/leads -TasksStatistics=Estadístiques de tasques de projecte/lideratge +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Tasca assignada. És possible entrar els temps en aquesta tasca. IdTaskTime=Id de temps de tasca YouCanCompleteRef=Si voleu completar la referència amb algun sufix, es recomana afegir un caràcter per separar-lo, de manera que la numeració automàtica encara funcionarà correctament per als propers projectes. Per exemple %s-MYSUFFIX diff --git a/htdocs/langs/ca_ES/receptions.lang b/htdocs/langs/ca_ES/receptions.lang index 447ce65cffc..ec31d8c4e8e 100644 --- a/htdocs/langs/ca_ES/receptions.lang +++ b/htdocs/langs/ca_ES/receptions.lang @@ -43,5 +43,5 @@ ProductQtyInSuppliersReceptionAlreadyRecevied=Quantitat de producte des de coman ValidateOrderFirstBeforeReception=Primer has de validar la comanda abans de poder fer recepcions. ReceptionsNumberingModules=Mòdul de numeració per a recepcions ReceptionsReceiptModel=Plantilles de documents per a recepcions -NoMorePredefinedProductToDispatch=No more predefined products to dispatch +NoMorePredefinedProductToDispatch=No hi ha més productes predefinits per ser enviats diff --git a/htdocs/langs/ca_ES/recruitment.lang b/htdocs/langs/ca_ES/recruitment.lang new file mode 100644 index 00000000000..47d4fb8d555 --- /dev/null +++ b/htdocs/langs/ca_ES/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Contractació +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Gestiona i segueix les campanyes de contractació de nous llocs de treball + +# +# Admin page +# +RecruitmentSetup = Configuració de la contractació +Settings = Configuració +RecruitmentSetupPage = Introduïu aquí la configuració de les opcions principals del mòdul de contractació +RecruitmentArea=Àrea de contractació +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Sobre +RecruitmentAbout = Quant a la contractació +RecruitmentAboutPage = Pàgina quant a la contractació +NbOfEmployeesExpected=Nº previst d'empleats +JobLabel=Descripció del lloc de treball +WorkPlace=Lloc de treball +DateExpected=Data prevista +FutureManager=Futur gerent +ResponsibleOfRecruitement=Responsable de la contractació +IfJobIsLocatedAtAPartner=Si la feina es troba en l'espai del client +PositionToBeFilled=Oferta de feina a emplenar +PositionsToBeFilled=S'han d'omplir les ofertes de treball +ListOfPositionsToBeFilled=Llista d’ofertes de treball a complir +NewPositionToBeFilled=S'han d'omplir les noves ofertes de treball + +JobOfferToBeFilled=Oferta de feina a emplenar +ThisIsInformationOnJobPosition=Informació del lloc de treball a ocupar +ContactForRecruitment=Contacte per contractació +EmailRecruiter=El reclutador de correu electrònic +ToUseAGenericEmail=Per utilitzar un correu electrònic genèric. Si no està definit, s’utilitzarà el correu electrònic del responsable de la contractació +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ca_ES/stocks.lang b/htdocs/langs/ca_ES/stocks.lang index ee0225cf434..080bbfd1d2c 100644 --- a/htdocs/langs/ca_ES/stocks.lang +++ b/htdocs/langs/ca_ES/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Cancel·la l'enviament DeleteSending=Elimina l'enviament Stock=Estoc Stocks=Estocs -MissingStocks=Missing stocks -StockAtDate=Stock at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Estoc que falta +StockAtDate=Existències en data +StockAtDateInPast=Data passada +StockAtDateInFuture=Data en el futur StocksByLotSerial=Estocs per lot/sèrie LotSerial=Lots/Sèries LotSerialList=Llista de lots/sèries @@ -34,7 +34,7 @@ StockMovementForId=ID de moviment %d ListMouvementStockProject=Llista de moviments d'estoc associats al projecte StocksArea=Àrea de magatzems AllWarehouses=Tots els magatzems -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock=Incloure també estoc desitjat indefinit IncludeAlsoDraftOrders=Inclou també projectes d'ordre Location=Lloc LocationSummary=Nom curt del lloc @@ -65,8 +65,8 @@ RuleForWarehouse=Regles per als magatzems WarehouseAskWarehouseDuringOrder=Estableix un magatzem per a les comandes de venda UserDefaultWarehouse=Estableix un magatzem per Usuaris MainDefaultWarehouse=Magatzem predeterminat -MainDefaultWarehouseUser=Use a default warehouse for each user -MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. +MainDefaultWarehouseUser=Utilitzeu un magatzem per defecte per a cada usuari +MainDefaultWarehouseUserDesc=Si activeu aquesta opció, durant la creació d’un producte, es definirà el magatzem assignat al producte en aquest. Si no es defineix cap magatzem per a l'usuari, es defineix el magatzem per defecte. IndependantSubProductStock=L'estoc de productes i subproductes són independents QtyDispatched=Quantitat desglossada QtyDispatchedShort=Quant. rebuda @@ -95,14 +95,16 @@ RealStock=Estoc real RealStockDesc=L'estoc físic o real és l'estoc que tens actualment als teus magatzems/emplaçaments interns. RealStockWillAutomaticallyWhen=L'estoc real es modificarà d'acord amb aquesta regla (tal com es defineix al mòdul d'accions): VirtualStock=Estoc virtual -VirtualStockDesc=L'existència virtual és l'estoc calculat disponible quan es tanquen totes les accions obertes / pendents (que afecten les accions) que es reben (les ordres de compra rebudes, les comandes de venda enviades, etc.) +VirtualStockAtDate=Estoc virtual a la data +VirtualStockAtDateDesc=Estoc virtual un cop totes les comandes pendents que es preveu fer abans de la data finalitzin +VirtualStockDesc=L’acció virtual és l’estoc calculat disponible disponible un cop tancades totes les accions obertes / pendents (que afectin a les existències) (comandes de compra rebudes, comandes de venda enviades, comandes de fabricació produïdes, etc.) IdWarehouse=Id. magatzem DescWareHouse=Descripció magatzem LieuWareHouse=Localització magatzem WarehousesAndProducts=Magatzems i productes WarehousesAndProductsBatchDetail=Magatzems i productes (amb detalls per lot/serie) -AverageUnitPricePMPShort=Preu mitjà ponderat (PMP) -AverageUnitPricePMP=Preu mitjà ponderat (PMP) d'aquisició +AverageUnitPricePMPShort=Valor (PMP) +AverageUnitPricePMPDesc=El preu unitari mitjà d’entrada que hem de pagar als proveïdors per incorporar el producte a les nostres existències. SellPriceMin=Preu de venda unitari EstimatedStockValueSellShort=Valor per vendre EstimatedStockValueSell=Valor per vendre @@ -130,18 +132,18 @@ CurentlyUsingPhysicalStock=Estoc físic RuleForStockReplenishment=Regla pels reaprovisionaments d'estoc SelectProductWithNotNullQty=Seleccioneu com a mínim un producte amb un valor no nul i un proveïdor AlertOnly= Només alertes -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Incloure també estocs negatius per als productes sense la quantitat desitjada definida, per restaurar-los a 0 WarehouseForStockDecrease=Per la disminució d'estoc s'utilitzara el magatzem %s WarehouseForStockIncrease=Pe l'increment d'estoc s'utilitzara el magatzem %s ForThisWarehouse=Per aquest magatzem ReplenishmentStatusDesc=Es tracta d'una llista de tots els productes amb una borsa menor que l'estoc desitjat (o inferior al valor d'alerta si la casella de verificació "només alerta" està marcada). Amb la casella de verificació, podeu crear comandes de compra per omplir la diferència. -ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. +ReplenishmentStatusDescPerWarehouse=Si voleu una reposició basada en la quantitat desitjada definida per magatzem, heu d’afegir un filtre al magatzem. ReplenishmentOrdersDesc=Aquesta és una llista de totes les comandes de compra oberta incloent productes predefinits. Només s'obren ordres amb productes predefinits, de manera que les comandes que poden afectar les existències, són visibles aquí. Replenishments=reaprovisionament NbOfProductBeforePeriod=Quantitat del producte %s en estoc abans del periode seleccionat (< %s) NbOfProductAfterPeriod=Quantitat del producte %s en estoc despres del periode seleccionat (> %s) MassMovement=Moviments en massa -SelectProductInAndOutWareHouse=Seleccioni un producte, una quantitat, un magatzem origen i un magatzem destí, seguidament faci clic "%s". Una vegada seleccionats tots els moviments, faci clic en "%s". +SelectProductInAndOutWareHouse=Seleccioneu un magatzem d'origen i un magatzem destí, un producte i una quantitat i feu clic a "%s". Un cop fet això per a tots els moviments necessaris, feu clic a "%s". RecordMovement=Registre de transferència ReceivingForSameOrder=Recepcions d'aquesta comanda StockMovementRecorded=Moviments d'estoc registrat @@ -232,6 +234,9 @@ InventoryForASpecificProduct=Inventari d’un producte específic StockIsRequiredToChooseWhichLotToUse=Es requereix estoc per escollir el lot que cal fer servir ForceTo=Obligar a AlwaysShowFullArbo=Mostra l'arbre complet de magatzems a la finestra emergent dels enllaços de magatzem (Advertència: pot disminuir el rendiment de manera espectacular) -StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past -StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future -CurrentStock=Current stock +StockAtDatePastDesc=Podeu veure aquí el valor (accions reals) en una data determinada en el passat +StockAtDateFutureDesc=Podeu veure aquí l'estoc (accions virtuals) en una data determinada en endavant +CurrentStock=Estoc actual +InventoryRealQtyHelp=Estableix el valor a 0 per restablir qty
    Mantenir el camp buit o suprimir la línia per mantenir-la sense canvis +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ca_ES/suppliers.lang b/htdocs/langs/ca_ES/suppliers.lang index 65f34605229..2c6d50ed7a0 100644 --- a/htdocs/langs/ca_ES/suppliers.lang +++ b/htdocs/langs/ca_ES/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Baixa qualitat ReputationForThisProduct=Reputació BuyerName=Nom del comprador AllProductServicePrices=Tots els preus de producte / servei -AllProductReferencesOfSupplier=Totes les referències de producte / servei del proveïdor +AllProductReferencesOfSupplier=Totes les referències del proveïdor BuyingPriceNumShort=Preus del proveïdor diff --git a/htdocs/langs/ca_ES/ticket.lang b/htdocs/langs/ca_ES/ticket.lang index 9b9d2cb3e16..712924a9dbd 100644 --- a/htdocs/langs/ca_ES/ticket.lang +++ b/htdocs/langs/ca_ES/ticket.lang @@ -72,7 +72,6 @@ Deleted=Esborrat # Dict Type=Tipus -Category=Codi analític Severity=Gravetat # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Assigna automàticament l'usuari que va crear el tiquet TicketsAutoAssignTicketHelp=Quan es crea un tiquet, l'usuari pot assignar-se automàticament al tiquet. TicketNumberingModules=Mòdul de numeració de tiquets TicketNotifyTiersAtCreation=Notifica la creació de tercers -TicketGroup=Grup TicketsDisableCustomerEmail=Desactiveu sempre els correus electrònics quan es crea un tiquet des de la interfície pública TicketsPublicNotificationNewMessage=Enviar correu(s) electonic(s) quan s'afegeix un nou missatge TicketsPublicNotificationNewMessageHelp=Enviar correu(s) electrònic(s) quan un nou missatge s'afegeix des d'una interfície pública (cap a l'usuari assignat o la notificació del correu electrònic cap a (actualitzar) i/o les notificacions del correu electrònic cap a) @@ -162,7 +160,7 @@ CreatedBy=Creat per NewTicket=Nou tiquet SubjectAnswerToTicket=Resposta de tiquet TicketTypeRequest=Tipus de sol·licitud -TicketCategory=Codi analític +TicketCategory=Grup SeeTicket=Consultar tiquet TicketMarkedAsRead=Tiquet ha estat marcat com llegit TicketReadOn=Segueix llegint diff --git a/htdocs/langs/ca_ES/users.lang b/htdocs/langs/ca_ES/users.lang index 06cd3247a05..bc3479618ed 100644 --- a/htdocs/langs/ca_ES/users.lang +++ b/htdocs/langs/ca_ES/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Deshabilitat en mode manteniment UserAccountancyCode=Codi comptable de l'usuari UserLogoff=Usuari desconnectat UserLogged=Usuari connectat +DateOfEmployment=Data de treball DateEmployment=Data d'inici de l'ocupació DateEmploymentEnd=Data de finalització de l'ocupació CantDisableYourself=No podeu desactivar el vostre propi registre d'usuari @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Forçar validador de sol·licitud d'abandonament ValidatorIsSupervisorByDefault=Per defecte, el validador és el supervisor de l’usuari. Deixar buit per mantenir aquest comportament. UserPersonalEmail=Correu electrònic personal UserPersonalMobile=Telèfon mòbil personal +WarningNotLangOfInterface=Avís, aquest és l'idioma principal que parla l'usuari, no el llenguatge de la interfície que va triar per veure. Per canviar l’idioma de la interfície visible per aquest usuari, aneu a la pestanya %s diff --git a/htdocs/langs/ca_ES/website.lang b/htdocs/langs/ca_ES/website.lang index f2048c17676..5b5dac6c952 100644 --- a/htdocs/langs/ca_ES/website.lang +++ b/htdocs/langs/ca_ES/website.lang @@ -58,10 +58,10 @@ NoPageYet=Encara sense pàgines YouCanCreatePageOrImportTemplate=Podeu crear una pàgina nova o importar una plantilla completa del lloc web SyntaxHelp=Ajuda sobre consells de sintaxi específics YouCanEditHtmlSourceckeditor=Podeu editar el codi font HTML usant el botó "Codi font" a l'editor. -YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">

    To include an image stored into the documents directory, use the viewimage.php wrapper:
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    +YouCanEditHtmlSource=
    Podeu incloure el codi PHP en aquesta font mitjançant les etiquetes <? php? > a0a65d071f6fc9z Estan disponibles les variables globals següents: $ conf, $ db, $ mysoc, $ user, $ lloc web, $ pàgina web, $ weblangs, $ pagelangs.

    També podeu incloure contingut d'una altra pàgina / contenidor amb la següent sintaxi:
    a03900dfdf ? >

    Vostè pot fer una redirecció a una altra pàgina / Contenidor amb la següent sintaxi (Nota: no emeten cap contingut abans d'una redirecció) :?
    < php redirectToContainer ( 'alias_of_container_to_redirect_to'); ? >

    Per afegir un vincle a una altra pàgina, utilitzeu la sintaxi:
    <a href = "alias_of_page_to_link_to.php" >mylink<a>

    Per incloure un enllaç per a descàrrega un arxiu emmagatzemat en els documents un directori , utilitzeu el document document.php embolcall:
    Exemple, per a un fitxer a documents / ecm (cal registrar-se)? ] nom de fitxer.ext ">

    Per a un fitxer a documents / suports (directori obert per a accés públic), la sintaxi és:
    a03900dfre31ecz "/document.php?modulepart=medias&file=[relative_dir/ Alanfilename.ext">
    Per a un fitxer compartit amb un enllaç compartit (accés obert mitjançant la tecla hash compartida del fitxer), una sintaxis es0a0z0z0a009 /document.php?hashp=publicsharekeyoffile">

    per incloure un imatge emmagatzemat en els documents directori, utilitzeu el viewimage.php embolcall:
    exemple, per a una imatge en documents / arxius multimèdia (obert directori d’accés públic), la sintaxi és:
    <img src = "/ viewimage.php? modulepart = medias&file = [relative_dir /] filename.ext" a0129 #YouCanEditHtmlSource2=
    To include a image shared publicaly, use the viewimage.php wrapper:
    Example with a shared key 123456789, syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSourceMore=
    More examples of HTML or dynamic code available on the wiki documentation
    . +YouCanEditHtmlSource2=Per a una imatge compartida amb un enllaç compartit (accés obert mitjançant la tecla hash compartida del fitxer), la sintaxi és:
    <img src = "/ viewimage.php? Hashp = 12345679012 ..." a0012c7dcbe087987 +YouCanEditHtmlSourceMore=
    Més exemples de codi HTML o dinàmic disponibles a la documentació wiki
    . ClonePage=Clona la pàgina/contenidor CloneSite=Clona el lloc SiteAdded=S'ha afegit el lloc web @@ -124,7 +124,7 @@ ShowSubContainersOnOff=El mode per executar "contingut dinàmic" és % GlobalCSSorJS=Fitxer CSS / JS / Capçalera global del lloc web BackToHomePage=Torna a la pàgina principal... TranslationLinks=Enllaços de traducció -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) +YouTryToAccessToAFileThatIsNotAWebsitePage=Intenteu accedir a una pàgina que no està disponible.
    (ref = %s, type = %s, status = %s) UseTextBetween5And70Chars=Per seguir bones pràctiques de SEO, utilitzeu un text entre 5 i 70 caràcters MainLanguage=Idioma principal OtherLanguages=Altres idiomes @@ -134,4 +134,4 @@ AvailableLanguagesAreDefinedIntoWebsiteProperties=Els idiomes disponibles es def ReplacementDoneInXPages=Substitució realitzada %s pàgines o contenidors RSSFeed=Fils RSS RSSFeedDesc=Podeu obtenir un feed RSS dels darrers articles amb el tipus "blogpost" mitjançant aquesta URL -PagesRegenerated=%s page(s)/container(s) regenerated +PagesRegenerated=%s pàgina (es) / contenidor (s) regenerada diff --git a/htdocs/langs/ca_ES/withdrawals.lang b/htdocs/langs/ca_ES/withdrawals.lang index 5ac7a352381..76f4b8e84ae 100644 --- a/htdocs/langs/ca_ES/withdrawals.lang +++ b/htdocs/langs/ca_ES/withdrawals.lang @@ -1,46 +1,46 @@ # Dolibarr language file - Source file is en_US - withdrawals -CustomersStandingOrdersArea=Payments by Direct debit orders -SuppliersStandingOrdersArea=Payments by Credit transfer -StandingOrdersPayment=Ordres de pagament mitjançant domiciliació bancària -StandingOrderPayment=Ordre de pagament de domiciliació +CustomersStandingOrdersArea=Pagaments per ordres de domiciliació bancària +SuppliersStandingOrdersArea=Pagaments per transferència bancària +StandingOrdersPayment=Ordres de cobrament per domiciliació +StandingOrderPayment=Ordre de cobrament per domiciliació NewStandingOrder=Nova ordre de domiciliació bancària -NewPaymentByBankTransfer=New payment by credit transfer +NewPaymentByBankTransfer=Nou pagament mitjançant transferència bancària StandingOrderToProcess=A processar -PaymentByBankTransferReceipts=Credit transfer orders -PaymentByBankTransferLines=Credit transfer order lines +PaymentByBankTransferReceipts=Ordres de transferència bancària +PaymentByBankTransferLines=Línies d'ordres de transferència bancària WithdrawalsReceipts=Domiciliacions WithdrawalReceipt=Domiciliació -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order -LatestBankTransferReceipts=Latest %s credit transfer orders +BankTransferReceipts=Ordres de transferència bancària +BankTransferReceipt=Ordre de transferència bancària +LatestBankTransferReceipts=Les %s últimes ordres de transferència bancària LastWithdrawalReceipts=Últims %s fitxers per a la domiciliació bancària -WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line -WithdrawalsLines=Línies de ordres de domiciliació bancària -CreditTransferLines=Credit transfer lines -RequestStandingOrderToTreat=Requests for direct debit payment order to process -RequestStandingOrderTreated=Requests for direct debit payment order processed -RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed +WithdrawalsLine=Línia d'ordre de domiciliació +CreditTransferLine=Línia de transferència bancària +WithdrawalsLines=Línies d'ordre de domiciliació +CreditTransferLines=Línies de transferència bancària +RequestStandingOrderToTreat=Peticions per a processar ordres de pagament per domiciliació +RequestStandingOrderTreated=Peticions processades d'ordres de pagament per domiciliació +RequestPaymentsByBankTransferToTreat=Peticions de transferència bancària a processar +RequestPaymentsByBankTransferTreated=Peticions de transferència bancària processades NotPossibleForThisStatusOfWithdrawReceiptORLine=Encara no és possible. L'estat de la domiciliació ter que ser 'abonada' abans de poder realitzar devolucions a les seves línies -NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order +NbOfInvoiceToWithdraw=Nº de factures de client qualificades que esperen una ordre de domiciliació NbOfInvoiceToWithdrawWithInfo=Número de factures a client en espera de domiciliació per a clients que tenen el número de compte definida -NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer -SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer +NbOfInvoiceToPayByBankTransfer=Nº de factures de proveïdors qualificats que esperen un pagament per transferència bancària +SupplierInvoiceWaitingWithdraw=Factura de venedor en espera de pagament mitjançant transferència bancària InvoiceWaitingWithdraw=Factura esperant per domiciliació bancària -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +InvoiceWaitingPaymentByBankTransfer=Factura en espera de transferència bancària AmountToWithdraw=Import a domiciliar -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. +NoInvoiceToWithdraw=No hi ha cap factura oberta per a '%s'. Vés a la fitxa "%s" de la targeta de factura per sol·licitar una sol·licitud. NoSupplierInvoiceToWithdraw=No hi ha cap factura de proveïdor pendent amb "sol·licituds de crèdit directe" obertes. Aneu a la pestanya "%s" de la fitxa de la factura per fer una sol·licitud. ResponsibleUser=Usuari responsable WithdrawalsSetup=Configuració del pagament mitjançant domiciliació bancària -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Configuració de transferència bancària WithdrawStatistics=Estadístiques del pagament mitjançant domiciliació bancària -CreditTransferStatistics=Credit transfer statistics +CreditTransferStatistics=Estadístiques de transferència bancària Rejects=Devolucions LastWithdrawalReceipt=Últims %s rebuts domiciliats MakeWithdrawRequest=Fer una petició de pagament per domiciliació bancària -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Fes una petició de transferència bancària WithdrawRequestsDone=%s domiciliacions registrades ThirdPartyBankCode=Codi bancari de tercers NoInvoiceCouldBeWithdrawed=Cap factura s'ha carregat amb èxit. Comproveu que els tercers de les factures tenen un IBAN vàlid i que IBAN té un RUM (Referència de mandat exclusiva) amb mode %s. @@ -53,7 +53,7 @@ Lines=línies StandingOrderReject=Emetre una devolució WithdrawsRefused=Domiciliació bancària refusada WithdrawalRefused=Devolució de domiciliació -CreditTransfersRefused=Credit transfers refused +CreditTransfersRefused=Transferències bancàries rebutjades WithdrawalRefusedConfirm=¿Està segur de voler crear una devolució de domiciliació per a l'empresa RefusedData=Data de devolució RefusedReason=Motiu de devolució @@ -63,12 +63,14 @@ InvoiceRefused=Factura rebutjada (Carregar les despeses al client) StatusDebitCredit=Estat dèbit/crèdit StatusWaiting=En espera StatusTrans=Enviada +StatusDebited=Debitat StatusCredited=Abonada +StatusPaid=Tractada StatusRefused=Tornada StatusMotif0=No especificat StatusMotif1=Provisió insuficient StatusMotif2=Ordre del client -StatusMotif3=No pagament per domiciliació bancària +StatusMotif3=No hi ha cobrament per domiciliació StatusMotif4=Comanda de vendes StatusMotif5=Compte inexistent StatusMotif6=Compte sense saldo @@ -77,27 +79,28 @@ StatusMotif8=Altre motiu CreateForSepaFRST=Crear un fitxer de domiciliació bancària (SEPA FRST) CreateForSepaRCUR=Crea un fitxer de domiciliació bancària (SEPA RCUR) CreateAll=Crear un fitxer de domiciliació bancària (tot) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateFileForPaymentByBankTransfer=Crea un fitxer per a transferència de crèdit +CreateSepaFileForPaymentByBankTransfer=Crea un fitxer de transferència bancària (SEPA) CreateGuichet=Només oficina CreateBanque=Només banc OrderWaiting=A l'espera de procés -NotifyTransmision=Enviament de domiciliació -NotifyCredit=Abonament de domiciliació +NotifyTransmision=Registre la transmissió del fitxer de la comanda +NotifyCredit=Registre de crèdit de la comanda NumeroNationalEmetter=Número Nacional del Emissor WithBankUsingRIB=Per als comptes bancaris que utilitzen CCC WithBankUsingBANBIC=Per als comptes bancaris que utilitzen el codi BAN/BIC/SWIFT BankToReceiveWithdraw=Recepció del compte bancari -BankToPayCreditTransfer=Bank Account used as source of payments +BankToPayCreditTransfer=Compte bancari utilitzat com a font de pagaments CreditDate=Abonada el WithdrawalFileNotCapable=No és possible generar el fitxer bancari de domiciliació pel país %s (El país no esta suportat) -ShowWithdraw=Mostra la comanda de domiciliació directa +ShowWithdraw=Mostra l'ordre de domiciliació IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Tanmateix, si la factura té com a mínim una ordre de pagament de domiciliació bancària que encara no ha estat processada, no es definirà com a pagament per permetre la gestió prèvia de la retirada. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Arxiu de la domiciliació +DoStandingOrdersBeforePayments=Aquesta pestanya et permet sol·licitar una ordre de domiciliació. Un cop fet, ves al menú Banc->Cobrament per domiciliació per generar i gestionar l’ordre de domiciliació. Quan es tanqui l’ordre de domiciliació, es registrarà automàticament el cobrament de les factures i es tancaran les factures si no queda cobrament pendent. +DoCreditTransferBeforePayments=Aquesta pestanya et permet sol·licitar una ordre de transferència bancària. Un cop fet, ves al menú Banc->Pagament per transferència bancària per generar i gestionar l’ordre de transferència bancària. Quan es tanqui l’ordre de transferència bancària, es registrarà automàticament el pagament de les factures i es tancaran les factures si no queda pagament pendent. +WithdrawalFile=Fitxer de comanda de dèbit +CreditTransferFile=Fitxer de transferència de crèdit SetToStatusSent=Classificar com "Arxiu enviat" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null +ThisWillAlsoAddPaymentOnInvoice=També registrarà els pagaments en les factures i els classificarà com a "Pagats" si resten a pagar és nul StatisticsByLineStatus=Estadístiques per estats de línies RUM=UMR DateRUM=Data de signatura del mandat @@ -105,7 +108,7 @@ RUMLong=Referència de mandat única (UMR) RUMWillBeGenerated=Si està buit, es generarà una UMR (Referència de mandat únic) una vegada que es guardi la informació del compte bancari. WithdrawMode=Modo de domiciliació bancària (FRST o RECUR) WithdrawRequestAmount=Import de la domiciliació -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Import de la petició de transferència bancària: WithdrawRequestErrorNilAmount=No és possible crear una domiciliació sense import SepaMandate=Mandat de domiciliació bancària SEPA SepaMandateShort=Mandat SEPA @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Tipus de pagament ModeRECUR=Pagament recurrent ModeFRST=Pagament únic PleaseCheckOne=Si us plau marqui només una +CreditTransferOrderCreated=S'ha creat una ordre de transferència de crèdit %s DirectDebitOrderCreated=S'ha creat l'ordre de domiciliació bancària %s AmountRequested=Quantitat sol·licitada SEPARCUR=SEPA CUR @@ -133,7 +137,7 @@ USTRD=Etiqueta XML de la SEPA "no estructurada" ADDDAYS=Afegiu dies a la data d'execució NoDefaultIBANFound=No s'ha trobat IBAN per defecte per a aquest tercer ### Notifications -InfoCreditSubject=Pagament de rebuts domiciliats %s pel banc +InfoCreditSubject=Cobrament de l'ordre de domiciliació %s pel banc InfoCreditMessage=El rebut domiciliat %s ha estat pagat pel banc
    Data de pagament: %s InfoTransSubject=Transmissió de rebuts domiciliats %s al banc InfoTransMessage=El rebut domiciliat %s ha estat enviat al banc per %s %s.

    @@ -141,3 +145,4 @@ InfoTransData=Import: %s
    Mètode: %s
    Data: %s InfoRejectSubject=Rebut de domiciliació bancària rebutjat InfoRejectMessage=Hola,

    el rebut domiciliat de la factura %s relacionada amb la companyia %s, amb un import de %s ha estat rebutjada pel banc.

    --
    %s ModeWarning=No s'ha establert l'opció de treball en real, ens aturarem després d'aquesta simulació +ErrorCompanyHasDuplicateDefaultBAN=L’empresa amb l’identificador %s té més d’un compte bancari per defecte. No hi ha manera de saber quin utilitzar. diff --git a/htdocs/langs/ca_ES/workflow.lang b/htdocs/langs/ca_ES/workflow.lang index e8b2b8956e1..dfbe8ee6172 100644 --- a/htdocs/langs/ca_ES/workflow.lang +++ b/htdocs/langs/ca_ES/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classifica les comandes vinculades # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classifica el pressupost de proveïdor vinculat com facturat quan la factura de proveïdor és validada (i si l'import de la factura és igual a l'import total del pressupost vinculat) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classifica la comanda de proveïdor vinculada com facturada quan la factura de proveïdor és validada (i si l'import de la factura és igual a l'import total de la comanda vinculada) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Creació automàtica AutomaticClassification=Classificació automàtica diff --git a/htdocs/langs/ca_ES/zapier.lang b/htdocs/langs/ca_ES/zapier.lang index d1cf95a01f8..4918d3bcb0f 100644 --- a/htdocs/langs/ca_ES/zapier.lang +++ b/htdocs/langs/ca_ES/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Mòdul Zapier per a Dolibarr # Admin page # ZapierForDolibarrSetup = Configuració de Zapier per a Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/cs_CZ/accountancy.lang b/htdocs/langs/cs_CZ/accountancy.lang index cceb4acf21f..d95720c9bfd 100644 --- a/htdocs/langs/cs_CZ/accountancy.lang +++ b/htdocs/langs/cs_CZ/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Umožňuje spravovat různé počty nul na konci účetn BANK_DISABLE_DIRECT_INPUT=Zakázat přímé nahrávání transakce v bankovním účtu ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Povolit návrh exportu v žurnálu ACCOUNTANCY_COMBO_FOR_AUX=Povolit seznam combo pro pomocný účet (může být pomalý, pokud máte spoustu třetích stran) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Prodejní deník ACCOUNTING_PURCHASE_JOURNAL=Nákupní deník @@ -284,6 +285,7 @@ ShowTutorial=Zobrazit výuku NotReconciled=Nesladěno ## Admin +BindingOptions=Binding options ApplyMassCategories=Aplikovat hmotnostní kategorie AddAccountFromBookKeepingWithNoCategories=Dostupný účet ještě není v personalizované skupině CategoryDeleted=Kategorie účetního účtu byla odstraněna diff --git a/htdocs/langs/cs_CZ/admin.lang b/htdocs/langs/cs_CZ/admin.lang index e0e91baaff7..966a28af104 100644 --- a/htdocs/langs/cs_CZ/admin.lang +++ b/htdocs/langs/cs_CZ/admin.lang @@ -219,7 +219,7 @@ Nouveauté=Novinka AchatTelechargement=Koupit / stáhnout GoModuleSetupArea=Chcete-li nasadit / nainstalovat nový modul, přejděte do oblasti nastavení modulu: %s . DoliStoreDesc=DoliStore, oficiální trh pro download externích modulů Dolibarr ERP / CRM -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. +DoliPartnersDesc=Seznam společností poskytujících moduly nebo funkce vyvinuté na míru.
    Poznámka: Protože Dolibarr je open source aplikace, kdokoli , který má zkušenosti s programováním PHP, by měl být schopen vyvinout modul. WebSiteDesc=Externí webové stránky pro další (doplňkové) moduly ... DevelopYourModuleDesc=Některá řešení pro vývoj vlastního modulu ... URL=URL @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=E-mail odesílatele ve výchozím nastavení pro manu UserEmail=Uživatelský e-mail CompanyEmail=Společnost Email FeatureNotAvailableOnLinux=Funkce není k dispozici na Unixových systémech. Otestujte svůj sendmail program lokálně. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Pokud překlad pro tento jazyk je neúplný, nebo chybný, můžete jej opravit editací souborů v adresáři langs/%s a předložit změněné soubory na fóru www.dolibarr.org.\n\nAktuální překlady získáte na https://www.transifex.com/dolibarr-association/dolibarr/dashboard/ kde se také můžete po vytvoření účtu na překladech podílet. -SubmitTranslationENUS=Pokud překlad pro tento jazyk není úplný nebo najdete chyby, můžete to opravit úpravou souborů do adresáře langs / %s a odeslat modifikované soubory na dolibarr.org/forum nebo vývojáři na github.com/Dolibarr/dolibarr. Překlady lze editovat online také na www.transifex.com/dolibarr-association/\nPoznámka: překlady je třeba doupravit podle kontextu, většina překladů byla provedena pomocí překladače +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Nastavení modulu ModulesSetup=Nastavení modulu/aplikace ModuleFamilyBase=Systém @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul %s musí být aktivován nejprve, pokud SecurityToken=Klíč k zabezpečené URL NoSmsEngine=Není k dispozici správce odesílatelů SMS. Správce odesílatele SMS není nainstalován s výchozím rozdělením, protože závisí na externím dodavateli, ale některé můžete najít na %s PDF=PDF -PDFDesc=Globální možnosti generování PDF. -PDFAddressForging=Pravidla pro pole adres +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Skrýt všechny informace týkající se daně z prodeje / DPH PDFRulesForSalesTax=Pravidla pro daň z prodeje / DPH PDFLocaltax=Pravidla pro %s -HideLocalTaxOnPDF=Skrýt hodnotu %s ve sloupci Výprodej daní +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Skrýt popis produktů HideRefOnPDF=Skrýt produkty ref. HideDetailsOnPDF=Skryjte podrobnosti o produktech @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Změňte ceny podle základní referenční hodnoty defino MassConvert=Spusťte hromadnou konverzi PriceFormatInCurrentLanguage=Formát ceny v aktuálním jazyce String=Řetěz +String1Line=String (1 line) TextLong=Dlouhý text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Celé číslo Float=Plovoucí @@ -543,9 +546,9 @@ Module54Desc=Správa smluv (služby nebo opakované předplatné) Module55Name=Čárové kódy Module55Desc=Správa čárových kódů Module56Name=Platba převodem -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit platby -Module57Desc=Správa platebních příkazů inkasních příkazů. Zahrnuje generování souboru SEPA pro evropské země. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integrace ClickToDial systému (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Vytvářejte/upravujte služby Permission534=Smazat služby Permission536=Zobrazení/správa skrytých služeb Permission538=Export služeb +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Přečtěte si kusovníky Permission651=Vytvářejte/aktualizujte kusovníky Permission652=Smazat kusovníky +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Přečtěte si dary Permission702=Vytvářejte/upravujte dary Permission703=Odstranit dary @@ -848,6 +858,8 @@ Permission773=Odstraňte přehledy výdajů Permission774=Přečtěte si všechny přehledy výdajů (i pro uživatele, kteří nejsou podřízenými) Permission775=Schvalovat zprávy o výdajích Permission776=Zaplatit vyúčtování výdajů +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export výkazů o výdajích Permission1001=Přečtěte si zásoby Permission1002=Vytvářejte/upravujte sklady @@ -900,6 +912,7 @@ Permission2515=Nastavení adresářů dokumentů Permission2801=Používejte FTP klienta v režimu čtení (pouze procházení a stahování) Permission2802=Použití FTP klienta v režimu zápisu (mazání nebo odesílání souborů) Permission3200=Přečtěte si archivované události a otisky prstů +Permission3301=Generate new modules Permission4001=Viz zaměstnanci Permission4002=Vytvářejte zaměstnance Permission4003=Smazat zaměstnance @@ -947,7 +960,8 @@ Permission63003=Odstranit zdroje Permission63004=Propojte zdroje s událostmi programu DictionaryCompanyType=Typy subjektů DictionaryCompanyJuridicalType=Právní formy subjektů -DictionaryProspectLevel=Potenciální cíl +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Stát/Okres DictionaryRegion=Regiony DictionaryCountry=Země @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Šablony e-mailů DictionaryUnits=Jednotky DictionaryMeasuringUnits=Měřící jednotky DictionarySocialNetworks=Sociální sítě -DictionaryProspectStatus=Stav cíle +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Druhy dovolené DictionaryOpportunityStatus=Stav olova pro projekt / vedoucí DictionaryExpenseTaxCat=Zpráva o výdajích - Kategorie dopravy @@ -1076,7 +1091,7 @@ LoginPage=přihlašovací stránka BackgroundImageLogin=obrázek na pozadí PermanentLeftSearchForm=Permanentní vyhledávací formulář na levém menu DefaultLanguage=Základní jazyk -EnableMultilangInterface=Povolit vícejazyčnou podporu +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Zobrazte v nabídce logo společnosti CompanyInfo=Společnost/Organizace CompanyIds=Identita společnosti/organizace @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Kritéria vyhledávání jsou požadován NewTranslationStringToShow=Nový překladový řetězec se zobrazí OriginalValueWas=Původní překlad je přepsán. Původní hodnota byla:

    %s TransKeyWithoutOriginalValue=Vynutili jste nový překlad překladového klíče " %s ", který neexistuje v žádných jazykových souborech -TotalNumberOfActivatedModules=Aktivní aplikace / moduly: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Musíte povolit alespoň jeden modul ClassNotFoundIntoPathWarning=Třída %s nebyla nalezena v PHP cestě YesInSummer=Ano v létě @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Používejte typy událostí (spravované v menu Nastaven AGENDA_USE_EVENT_TYPE_DEFAULT=Automaticky nastavte tuto výchozí hodnotu pro typ události ve formuláři pro tvorbu událostí AGENDA_DEFAULT_FILTER_TYPE=Automaticky nastavte tento typ události ve filtru vyhledávání v agendě AGENDA_DEFAULT_FILTER_STATUS=Automaticky nastavte tento stav událostí ve filtru vyhledávání v agendě -AGENDA_DEFAULT_VIEW=Karta, kterou chcete otevřít ve výchozím nastavení při výběru v menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Povolení připomenutí události pomocí e-mailů (pro každou událost lze definovat možnost připomenutí / zpoždění). Poznámka: Modul %s musí být povolen a správně nastaven tak, aby bylo upozornění odesláno na správnou frekvenci. AGENDA_REMINDER_BROWSER=Povolení připomenutí události v prohlížeči uživatele (při dosažení data události je každý uživatel schopen odmítnout tuto otázku z potvrzení prohlížeče) AGENDA_REMINDER_BROWSER_SOUND=Povolit zvukové upozornění @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Zobrazit propojený objekt do zobrazení agendy ##### Clicktodial ##### ClickToDialSetup=Klepněte na tlačítko Nastavení vytáčení modulu ClickToDialUrlDesc=Url volal po kliknutí na telefonní pikto. V URL, můžete použít tagy
    __PHONETO__ který bude nahrazen s telefonním číslem osoby volat
    __PHONEFROM__ , které budou nahrazeny telefonní číslo volajícího (vy)
    __LOGIN__ , které budou nahrazeny clicktodial přihlášení (definováno na uživatelské kartě)
    __PASS__ , který bude nahrazen heslem pro heslo (definováno na kartě uživatele). -ClickToDialDesc=Tento modul vytváří telefonní čísla, na kterých lze kliknout na odkazy. Klepnutím na ikonu telefon zavoláte na číslo. To může být použito k volání systému call centra od společnosti Dolibarr, který může volat například telefonní číslo v systému SIP. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Na telefonních číslech použijte pouze odkaz "tel:" ClickToDialUseTelLinkDesc=Tuto metodu použijte, pokud mají uživatelé softwarové rozhraní nebo softwarové rozhraní nainstalované ve stejném počítači jako prohlížeč a volaly po kliknutí na odkaz v prohlížeči, který začíná na "tel:". Pokud potřebujete úplné řešení serveru (není potřeba lokální instalace softwaru), musíte jej nastavit na "Ne" a vyplnit další pole. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Toto pole obsahuje odkaz k identifikaci řádku. Zadat libovolnou h Enter0or1=Zadejte 0 nebo 1 UnicodeCurrency=Zde zadejte mezi zarážkami, seznam čísel bytu, který představuje symbol měny. Například: pro $, zadejte [36] - pro Brazílii skutečné R $ [82,36] - za €, zadejte [8364] ColorFormat=RGB barva je ve formátu HEX, např. FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Umístění řádku do seznamů combo SellTaxRate=Sazba daně z prodeje RecuperableOnly=Ano pro DPH "Neočekávané, ale obnovitelné" určené pro některé státy ve Francii. U všech ostatních případů udržujte hodnotu "Ne". @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Žádost o nabídku MailToSendSupplierOrder=Objednávky MailToSendSupplierInvoice=Faktury dodavatele MailToSendContract=Smlouvy +MailToSendReception=Recepce MailToThirdparty=Subjekty MailToMember=Členové MailToUser=Uživatelé @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP a CRM %s je k dispozici. Verze ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP a CRM %s je k dispozici. Verze %s je verze pro údržbu, takže obsahuje pouze opravy chyb. Doporučujeme všem uživatelům přejít na tuto verzi. Uvolnění údržby nezavádí do databáze nové funkce ani změny. Můžete jej stáhnout z oblasti stahování https://www.dolibarr.org portálu (podadresář Stable verze). Můžete přečíst ChangeLog pro úplný seznam změn. MultiPriceRuleDesc=Pokud je povolena možnost "Několik úrovní cen na produkt / službu", můžete pro každý produkt definovat různé ceny (jedna za cenovou úroveň). Chcete-li ušetřit čas, můžete zde zadat pravidlo pro automatickou kalkulaci ceny za každou úroveň na základě ceny první úrovně, takže budete muset zadat pouze cenu za první úroveň pro každý produkt. Tato stránka je navržena tak, aby vám šetřila čas, ale je užitečná pouze tehdy, pokud jsou ceny pro každou úroveň relativní vzhledem k první úrovni. Tuto stránku můžete ignorovat ve většině případů. ModelModulesProduct=Šablony pro dokumenty produktů +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Chcete-li automaticky generovat kódy, musíte nejprve definovat správce, který automaticky definuje číslo čárového kódu. SeeSubstitutionVars=Viz * Poznámka k seznamu možných substitučních proměnných SeeChangeLog=Viz soubor ChangeLog (pouze v angličtině) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Levý okraj ve formátu PDF MAIN_PDF_MARGIN_RIGHT=Pravý okraj v PDF MAIN_PDF_MARGIN_TOP=Nejvyšší okraj ve formátu PDF MAIN_PDF_MARGIN_BOTTOM=Dolní okraj v PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Pro tento modul není požadováno žádné zvláštní nastavení. SetToYesIfGroupIsComputationOfOtherGroups=Pokud je tato skupina výpočtem jiných skupin, nastavte to na ano EnterCalculationRuleIfPreviousFieldIsYes=Zadejte pravidlo výpočtu, pokud bylo předchozí pole nastaveno na Ano (Například 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nic se nestalo XEmailsDoneYActionsDone=%s e-maily kvalifikovány, %s úspěšně zpracovány emaily (pro %s záznam / akce provedeny) podle sběratele RecordEvent=Nahrávat událost e-mailu CreateLeadAndThirdParty=Vytvoření vedení (a případně subjekty) -CreateTicketAndThirdParty=Vytvořit lístek (a případně subjekt) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Výstup posledního kódu NbOfEmailsInInbox=Počet e-mailů ve zdrojovém adresáři LoadThirdPartyFromName=Načíst vyhledávání subjektem na adrese %s (pouze načíst) LoadThirdPartyFromNameOrCreate=Načíst vyhledávání subjektů na adrese %s (vytvořit, pokud nebyly nalezeny) -WithDolTrackingID=Odkaz Dolibarr nalezen v ID zprávy -WithoutDolTrackingID=Odkaz Dolibarr nebyl nalezen v ID zprávy +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Vstupní kód nabídky (hlavní menu) ECMAutoTree=Zobrazit automatický strom ECM @@ -1981,9 +2002,9 @@ ImportSetup=Nastavení modulu Import InstanceUniqueID=Jedinečné ID instance SmallerThan=Menší než LargerThan=Větší než -IfTrackingIDFoundEventWillBeLinked=Všimněte si, že je-li ID ID nalezeno v příchozím e-mailu, bude událost automaticky propojena s příslušnými objekty. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Pokud jste s účtem GMail povolili ověření ve 2 - dvou krocích, doporučuje se pro aplikaci vytvořit vyhrazené druhé heslo namísto použití hesla pro vlastní účet z adresy https://myaccount.google.com/. -EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. +EmailCollectorTargetDir=Po úspěšném zpracování může být žádoucí chování při přesunu e-mailu do jiné značky/adresáře. Chcete-li tuto funkci použít, stačí zadat název adresáře (NEPOUŽÍVEJTE v názvu speciální znaky). Musíte také použít přihlašovací účet pro čtení a zápis. EmailCollectorLoadThirdPartyHelp=Pomocí této akce můžete pomocí obsahu e-mailu najít a načíst existující třetí stranu ve vaší databázi. Nalezená (nebo vytvořená) třetí strana bude použita pro následující akce, které ji potřebují. V poli parametrů můžete použít například 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)', pokud chcete extrahovat jméno třetí strany z řetězce 'Name: name to find' nalezeného do tělo. EndPointFor=Koncový bod pro %s: %s DeleteEmailCollector=Smazat sběratele e-mailu @@ -2005,3 +2026,7 @@ RssNote=Poznámka: Každá definice zdroje RSS obsahuje widget, který musíte p JumpToBoxes=Přejít na nastavení -> Widgety MeasuringUnitTypeDesc=Použijte zde hodnotu jako „velikost“, „povrch“, „objem“, „hmotnost“, „čas“ MeasuringScaleDesc=Měřítko je počet míst, která musíte přesunout desítkovou část tak, aby odpovídala výchozí referenční jednotce. U typu „čas“ je to počet sekund. Hodnoty mezi 80 a 99 jsou rezervované hodnoty. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/cs_CZ/agenda.lang b/htdocs/langs/cs_CZ/agenda.lang index 62ba1fc0337..15134263d8e 100644 --- a/htdocs/langs/cs_CZ/agenda.lang +++ b/htdocs/langs/cs_CZ/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Počet událostí ListOfActions=Seznam událostí EventReports=Přehledy událostí Location=Umístění -ToUserOfGroup=Každému uživateli ve skupině +ToUserOfGroup=Událost přiřazená každému uživateli ve skupině EventOnFullDay=Událost pro celý den (y) MenuToDoActions=Všechny neúplné události MenuDoneActions=Všechny ukončené události @@ -63,7 +63,7 @@ ShipmentClassifyClosedInDolibarr=Zásilka %s klasifikováno účtoval ShipmentUnClassifyCloseddInDolibarr=Zásilka %s byla znovu otevřena ShipmentBackToDraftInDolibarr=Doprava %s se vrátí zpět na stav konceptu ShipmentDeletedInDolibarr=Doprava %s odstraněna -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=Příjem %s byl ověřen OrderCreatedInDolibarr=Objednat %s vytvořil OrderValidatedInDolibarr=Objednávka %s ověřena OrderDeliveredInDolibarr=Objednávka %s označena jako dodaná @@ -86,6 +86,8 @@ ProposalDeleted=Návrh odstraněn OrderDeleted=Příkaz odstraněn InvoiceDeleted=faktura smazána DraftInvoiceDeleted=Koncept faktury byl smazán +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Produkt %s byl vytvořen PRODUCT_MODIFYInDolibarr=Produkt %s byl upraven PRODUCT_DELETEInDolibarr=Produkt %s byl smazán @@ -158,3 +160,9 @@ DateStartPlusOne=Datum zahájení + 1 hodina SetAllEventsToTodo=Nastavte všechny události na todo SetAllEventsToInProgress=Nastavit všechny probíhající události SetAllEventsToFinished=Nastavit všechny události na konec +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/cs_CZ/banks.lang b/htdocs/langs/cs_CZ/banks.lang index 2c7dd9202ef..8188134be65 100644 --- a/htdocs/langs/cs_CZ/banks.lang +++ b/htdocs/langs/cs_CZ/banks.lang @@ -37,7 +37,7 @@ IbanValid=BAN platný IbanNotValid=BAN není platná StandingOrders=příkazy k inkasu StandingOrder=Trvalý příkaz -PaymentByDirectDebit=Payment by direct debit +PaymentByDirectDebit=Platba inkasem PaymentByBankTransfers=Platby převodem PaymentByBankTransfer=Platba převodem AccountStatement=Výpis z účtu @@ -106,8 +106,8 @@ SupplierInvoicePayment=Dodavatelská platba SubscriptionPayment=Platba předplatného WithdrawalPayment=Debetní platební příkaz SocialContributionPayment=Social/fiscal tax payment -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=Převod peněz +BankTransfers=Kreditní převody MenuBankInternalTransfer=Internal transfer TransferDesc=Převod z jednoho účtu na jiný, Dolibarr zapíše dva záznamy (debet na zdrojovém účtu a kredit na cílový účet). Pro tuto transakci bude použita stejná částka (kromě znaménka), štítek a datum) TransferFrom=Z diff --git a/htdocs/langs/cs_CZ/bills.lang b/htdocs/langs/cs_CZ/bills.lang index e593c83b92d..75b7c51af59 100644 --- a/htdocs/langs/cs_CZ/bills.lang +++ b/htdocs/langs/cs_CZ/bills.lang @@ -441,8 +441,8 @@ BankAccountNumberKey=Kontrolní součet Residence=Adresa IBANNumber=Číslo účtu IBAN IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=IBAN zákazníka +SupplierIBAN=IBAN prodejce BIC=BIC/SWIFT BICNumber=BIC / SWIFT kód ExtraInfos=Extra informace diff --git a/htdocs/langs/cs_CZ/boxes.lang b/htdocs/langs/cs_CZ/boxes.lang index f99108a20da..b7104985e78 100644 --- a/htdocs/langs/cs_CZ/boxes.lang +++ b/htdocs/langs/cs_CZ/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Objednávky dodavatele: poslední %s změn BoxTitleLastModifiedCustomerBills=Zákaznické faktury: poslední změna %s BoxTitleLastModifiedCustomerOrders=Prodejní objednávky: poslední %s změny BoxTitleLastModifiedPropals=Poslední modifikované návrhy %s +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Zákaznické faktury ForCustomersOrders=Zákaznické objednávky ForProposals=Nabídky @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Účet pozastavení není definován BoxLastCustomerShipments=Poslední zásilky zákazníků BoxTitleLastCustomerShipments=Nejnovější %s zásilky zákazníků NoRecordedShipments=Žádná zaznamenaná zásilka zákazníka +# Pages +AccountancyHome=Účetnictví diff --git a/htdocs/langs/cs_CZ/cashdesk.lang b/htdocs/langs/cs_CZ/cashdesk.lang index dc85e287c65..e83a9e313de 100644 --- a/htdocs/langs/cs_CZ/cashdesk.lang +++ b/htdocs/langs/cs_CZ/cashdesk.lang @@ -4,20 +4,20 @@ CashDesk=Prodejní místo CashDeskBankCash=Bankovní účet (hotovost) CashDeskBankCB=Bankovní účet (karta) CashDeskBankCheque=Bankovní účet (šek) -CashDeskWarehouse=Skladiště +CashDeskWarehouse=Sklad CashdeskShowServices=Prodej služeb CashDeskProducts=Produkty -CashDeskStock=Sklad +CashDeskStock=Skladem CashDeskOn=na -CashDeskThirdParty=Třetí strana +CashDeskThirdParty=Subjekt ShoppingCart=Nákupní vozík NewSell=Nový prodej AddThisArticle=Přidat tento článek RestartSelling=Vraťte se na prodej -SellFinished=Sale complete +SellFinished=Prodej dokončen PrintTicket=Tisk dokladu SendTicket=Odeslat lístek -NoProductFound=Žádný článek nalezen +NoProductFound=Nebyl nalezen žádný článek ProductFound=vyhledané výrobky NoArticle=Žádný článek Identification=Identifikace @@ -25,10 +25,10 @@ Article=Článek Difference=Rozdíl TotalTicket=Celkem účtenka NoVAT=Bez DPH pro tento prodej -Change=Nadbytek obdržel +Change=Přebytek byl přijat BankToPay=Účet pro platbu ShowCompany=Zobrazit společnost -ShowStock=Zobrazit skladiště +ShowStock=Zobrazit sklad DeleteArticle=Klepnutím odeberete tento článek FilterRefOrLabelOrBC=Vyhledávání (Ref./Štítekl) UserNeedPermissionToEditStockToUsePos=Ptáte se na snížení zásoby na vytvořené faktuře, ale uživatel, který používá POS musí mít oprávnění k úpravám zásob. @@ -77,7 +77,7 @@ POSModule=POS modul BasicPhoneLayout=Použít základní rozvržení pro telefony SetupOfTerminalNotComplete=Nastavení terminálu %s není dokončeno DirectPayment=Přímá platba -DirectPaymentButton=Tlačítko přímé platby v hotovosti +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Faktura je již ověřena NoLinesToBill=Žádné řádky k vyúčtování CustomReceipt=Vlastní příjem @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Externí modul s extra funkcemi. Možnost tisk PrintMethod=Metoda tisku ReceiptPrinterMethodDescription=Výkonná metoda se spoustou parametrů. Plně přizpůsobitelné pomocí šablon. Nelze tisknout z cloudu. ByTerminal=Terminálem -TakeposNumpadUsePaymentIcon=Použijte ikonu platby na numpadu +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Modul číslování pro prodej POS CashDeskGenericMaskCodes6 =
    {TN} se používá k přidání čísla terminálu TakeposGroupSameProduct=Seskupte stejné produktové řady StartAParallelSale=Zahajte nový paralelní prodej -ControlCashOpening=Kontrolní pokladna při otevření poz +ControlCashOpening=Control cash box at opening POS CloseCashFence=Zavřete hotovostní plot CashReport=Hotovostní zpráva MainPrinterToUse=Hlavní tiskárna k použití @@ -107,13 +107,18 @@ OrderPrinterToUse=Objednejte tiskárnu k použití MainTemplateToUse=Hlavní šablona k použití OrderTemplateToUse=Objednejte šablonu k použití BarRestaurant=Barová restaurace -AutoOrder=Order by the customer himself +AutoOrder=Objednávka samotným zákazníkem RestaurantMenu=Menu CustomerMenu=Zákaznické menu -ScanToMenu=Scan QR code to see the menu -ScanToOrder=Scan QR code to order -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +ScanToMenu=Naskenujte QR kód a zobrazí se nabídka +ScanToOrder=Naskenujte QR kód +Appearance=Vzhled +HideCategoryImages=Skrýt obrázky kategorií +HideProductImages=Skrýt obrázky produktů +NumberOfLinesToShow=Počet řádků obrázků k zobrazení +DefineTablePlan=Definujte plán tabulek +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/cs_CZ/compta.lang b/htdocs/langs/cs_CZ/compta.lang index 108f4511ac7..9e64b689ff2 100644 --- a/htdocs/langs/cs_CZ/compta.lang +++ b/htdocs/langs/cs_CZ/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Sociální nebo daňová daň SocialContributions=Sociální nebo daně za SocialContributionsDeductibles=Odečitatelné sociální či daně za SocialContributionsNondeductibles=Nondeductible sociální či daně za +DateOfSocialContribution=Datum sociální nebo daňové daně LabelContrib=Příspěvek štítek TypeContrib=Typ příspěvku MenuSpecialExpenses=Zvláštní výdaje diff --git a/htdocs/langs/cs_CZ/contracts.lang b/htdocs/langs/cs_CZ/contracts.lang index dacdba6b57d..a8be703a483 100644 --- a/htdocs/langs/cs_CZ/contracts.lang +++ b/htdocs/langs/cs_CZ/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Spuštěné služby MenuExpiredServices=Expirované služby MenuClosedServices=Uzavřené služby NewContract=Nová smlouva -NewContractSubscription=Nová smlouva / předplatné +NewContractSubscription=Nová smlouva nebo předplatné AddContract=Vytvoření smlouvy DeleteAContract=Odstranit smlouvu ActivateAllOnContract=Aktivujte všechny služby @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Obchodní zástupce následující-up TypeContact_contrat_external_BILLING=Fakturační kontakt zákazníka TypeContact_contrat_external_CUSTOMER=Navazující kontakt se zákazníkem TypeContact_contrat_external_SALESREPSIGN=Podepsání smlouvy kontakt se zákazníkem -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Ve výchozím nastavení skrýt uzavřené služby +ShowClosedServices=Zobrazit uzavřené služby +HideClosedServices=Skrýt uzavřené služby diff --git a/htdocs/langs/cs_CZ/errors.lang b/htdocs/langs/cs_CZ/errors.lang index 30660856858..a9028d01278 100644 --- a/htdocs/langs/cs_CZ/errors.lang +++ b/htdocs/langs/cs_CZ/errors.lang @@ -23,7 +23,7 @@ ErrorFailToGenerateFile=Nepodařilo se vytvořit soubor ' %s. ErrorThisContactIsAlreadyDefinedAsThisType=Tento kontakt je již definován jako kontakt pro tento typ. ErrorCashAccountAcceptsOnlyCashMoney=Tento bankovní účet je hotovostní účet, takže přijímá pouze platby typu hotovosti. ErrorFromToAccountsMustDiffers=Zdrojové a cílové bankovní účty musí být různé. -ErrorBadThirdPartyName=Špatná hodnota názvu subjektu +ErrorBadThirdPartyName=Špatná hodnota názvu subjektu nebo třetí strany ErrorProdIdIsMandatory=%s je povinné ErrorBadCustomerCodeSyntax=Špatná syntaxe kódu zákazníka ErrorBadBarCodeSyntax=Špatná syntaxe pro čárový kód. Možná jste nastavili špatný typ čárového kódu nebo jste definovali masku čárového kódu pro číslování, které nesouhlasí s naskenovanou hodnotou. @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Špatná syntaxe pro kód dodavatele ErrorSupplierCodeRequired=Je vyžadován kód dodavatele ErrorSupplierCodeAlreadyUsed=Kód dodavatele je již použit ErrorBadParameters=Špatné parametry. Tak takto opravdu ne ...... -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Chybné nebo chybějící parametry ErrorBadValueForParameter=Chybná hodnota ‚%s‘ pro parametr ‚%s‘ ErrorBadImageFormat=Obrázek nemá podporovaný formát (Váš PHP nepodporuje funkce pro převod obrázků z tohoto formátu) ErrorBadDateFormat=Hodnota '%s' má nesprávný formát data @@ -120,7 +120,7 @@ ErrorLoginHasNoEmail=Tento uživatel nemá žádnou e-mailovou adresu. Proces p ErrorBadValueForCode=Špatná hodnota pro bezpečnostní kód. Zkuste znovu s novou hodnotou ... ErrorBothFieldCantBeNegative=Pole %s a %s nemohou být záporná ErrorFieldCantBeNegativeOnInvoice=Pole %s nemůže být u tohoto typu faktury záporné. Pokud potřebujete přidat řádek slevy, nejprve vytvořte slevu (z pole „%s“ na kartě subjektu) a přiložte ji na fakturu. -ErrorLinesCantBeNegativeForOneVATRate=Total of lines (net of tax) can't be negative for a given not null VAT rate (Found a negative total for VAT rate %s%%). +ErrorLinesCantBeNegativeForOneVATRate=Celkový počet řádků (bez daně) nemůže být záporný pro danou neplatnou sazbu DPH (Nalezený záporný součet pro sazbu DPH %s %%). ErrorLinesCantBeNegativeOnDeposits=Linky nemohou být v záloze záporné. Pokud tak učiníte, budete čelit problémům, kdy budete muset složit zálohu v konečné faktuře. ErrorQtyForCustomerInvoiceCantBeNegative=Množství řádku do zákaznických faktur nemůže být záporné ErrorWebServerUserHasNotPermission=Uživatelský účet %s , který byl použit k provádění webového serveru, nemá k tomu povolení @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nová hodnota nemůže být stejná jako stará ErrorFailedToValidatePasswordReset=Nepodařilo se obnovit heslo. Může být reinit byl již hotový (tento odkaz může být použit pouze jednou). Pokud tomu tak není, pokuste se znovu spustit proces obnovení. ErrorToConnectToMysqlCheckInstance=Připojení k databázi selhalo. Zkontrolujte, zda je databázový server spuštěn (například pomocí mysql / mariadb můžete spustit z příkazového řádku s 'sudo service mysql start'). ErrorFailedToAddContact=Nepodařilo se přidat kontakt -ErrorDateMustBeBeforeToday=Datum nemůže být větší než dnešní. Nejsme v SSSR. +ErrorDateMustBeBeforeToday=Datum musí být nižší než dnes +ErrorDateMustBeInFuture=Datum musí být delší než dnes ErrorPaymentModeDefinedToWithoutSetup=Platební režim byl nastaven na typ %s, ale nastavení modulu Faktura nebylo dokončeno pro definování informací, které se mají zobrazit v tomto režimu platby. ErrorPHPNeedModule=Chyba, váš PHP musí mít nainstalovaný modul %s pro použití této funkce. ErrorOpenIDSetupNotComplete=Nastavíte konfigurační soubor Dolibarr, abyste povolili ověřování OpenID, ale URL služby OpenID není definována do konstantního %s @@ -184,7 +185,7 @@ ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Špatná definice pole nabídek ErrorSavingChanges=Při ukládání změn došlo k chybě ErrorWarehouseRequiredIntoShipmentLine=Sklad je vyžadován na lince k odeslání ErrorFileMustHaveFormat=Soubor musí mít formát %s -ErrorFilenameCantStartWithDot=Filename can't start with a '.' +ErrorFilenameCantStartWithDot=Název souboru nemůže začínat znakem „.“ ErrorSupplierCountryIsNotDefined=Země pro tohoto dodavatele není definována. Nejprve to opravte. ErrorsThirdpartyMerge=Nepodařilo se sloučit dva záznamy. Požadavek zrušen. ErrorStockIsNotEnoughToAddProductOnOrder=Zásoba nestačí na produkt %s, který ji přidá do nové objednávky. @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Na produkt „%s“ ve skla ErrorOnlyOneFieldForGroupByIsPossible=Je možné pouze 1 - slovy jedno pole pro „Group by“ (ostatní jsou zahozeny) ErrorTooManyDifferentValueForSelectedGroupBy=Bylo nalezeno příliš mnoho různých hodnot (více než %s ) pro pole „ %s “, takže ji nelze použít jako grafiku a. Pole „Skupina podle“ bylo odstraněno. Možná budete chtít použít jako X-Axis? ErrorReplaceStringEmpty=Chyba, řetězec, který chcete nahradit, je prázdný +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Váš parametr PHP upload_max_filesize (%s) je vyšší než parametr PHP post_max_size (%s). Toto není konzistentní nastavení. WarningPasswordSetWithNoAccount=Pro tohoto člena bylo nastaveno heslo. Nebyl však vytvořen žádný uživatelský účet. Toto heslo je uloženo, ale nemůže být použito pro přihlášení k Dolibarr. Může být použito externím modulem / rozhraním, ale pokud nemáte pro člena definováno žádné přihlašovací jméno ani heslo, můžete vypnout možnost "Správa přihlášení pro každého člena" z nastavení modulu člena. Pokud potřebujete spravovat přihlašovací údaje, ale nepotřebujete žádné heslo, můžete toto pole ponechat prázdné, abyste se tomuto varování vyhnuli. Poznámka: E-mail může být také použit jako přihlašovací jméno, pokud je člen připojen k uživateli. diff --git a/htdocs/langs/cs_CZ/languages.lang b/htdocs/langs/cs_CZ/languages.lang index 53bbcc27024..b551ca150a1 100644 --- a/htdocs/langs/cs_CZ/languages.lang +++ b/htdocs/langs/cs_CZ/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Etiopský Language_ar_AR=Arabština Language_ar_EG=Arabština (Egypt) Language_ar_SA=Arabština +Language_az_AZ=Ázerbájdžán Language_bn_BD=Bengálština +Language_bn_IN=Bengálština (Indie) Language_bg_BG=Bulharština Language_bs_BA=Bosenština Language_ca_ES=Katalánština @@ -20,6 +23,7 @@ Language_en_GB=Angličtina (Velká Británie) Language_en_IN=Angličtina (Indie) Language_en_NZ=Angličtina (Nový Zéland) Language_en_SA=Angličtina (Saúdská Arábie) +Language_en_SG=Angličtina (Singapur) Language_en_US=Angličtina (Spojené státy) Language_en_ZA=Angličtina (Jižní Afrika) Language_es_ES=Španělština @@ -29,6 +33,7 @@ Language_es_CL=Španělština (Chile) Language_es_CO=Španělština (Kolumbie) Language_es_DO=Španělština (Dominikánská republika) Language_es_EC=Španělština (Ekvádor) +Language_es_GT=Španělština (Guatemala) Language_es_HN=Španělština (Honduras) Language_es_MX=Španělština (Mexiko) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Španělština (Paraguay) Language_es_PE=Španělština (Peru) Language_es_PR=Španělština (Puerto Rico) Language_es_UY=Španělština (Urugway) +Language_es_GT=Španělština (Guatemala) Language_es_VE=Španělština (Venezuela) Language_et_EE=Estonština Language_eu_ES=Baskičtina @@ -44,15 +50,22 @@ Language_fi_FI=Finština Language_fr_BE=Francouzština (Belgie) Language_fr_CA=Francouzština (Kanada) Language_fr_CH=Francouzština (Švýcarsko) +Language_fr_CI=Francouzština (Cost Ivory) +Language_fr_CM=Francouzština (Cameroun) Language_fr_FR=Francouzsky +Language_fr_GA=Francouzština (Gabun) Language_fr_NC=Francouzština (Nová Kaledonie) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galicijština Language_he_IL=Hebrejština +Language_hi_IN=Hindština (Indie) Language_hr_HR=Chorvatský Language_hu_HU=Maďarština Language_id_ID=Indonésie Language_is_IS=Islandština Language_it_IT=Italština +Language_it_CH=Italština (Švýcarsko) Language_ja_JP=Japonsky Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Lotyština Language_mk_MK=Makedonský Language_mn_MN=Mongolian Language_nb_NO=Norština (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Nizozemí (Belgie) Language_nl_NL=holandský Language_pl_PL=Polsky @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbecký Language_vi_VN=Vietnamština Language_zh_CN=Čínština Language_zh_TW=Čínština (tradiční) +Language_zh_HK=Čínština (Hongkong) Language_bh_MY=Malajština diff --git a/htdocs/langs/cs_CZ/loan.lang b/htdocs/langs/cs_CZ/loan.lang index 43660683731..a4760506519 100644 --- a/htdocs/langs/cs_CZ/loan.lang +++ b/htdocs/langs/cs_CZ/loan.lang @@ -23,9 +23,9 @@ AddLoan=vytvoření úvěru FinancialCommitment=Finanční závazek InterestAmount=Zájem CapitalRemain=Zůstatek kapitálu -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Tento termín je již zaplacen +CantUseScheduleWithLoanStartedToPaid = Nelze použít plánovač pro půjčku se zaplacením +CantModifyInterestIfScheduleIsUsed = Pokud používáte plán, nemůžete změnit zájem # Admin ConfigLoan=Konfigurace modulu úvěru LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Účetní účetní kapitál ve výchozím nastavení diff --git a/htdocs/langs/cs_CZ/mails.lang b/htdocs/langs/cs_CZ/mails.lang index a8bbd0da669..aad25597cf4 100644 --- a/htdocs/langs/cs_CZ/mails.lang +++ b/htdocs/langs/cs_CZ/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Nastavení odchozí pošty (pro modul %s) DefaultOutgoingEmailSetup=Výchozí nastavení odchozí pošty Information=Informace ContactsWithThirdpartyFilter=Kontakty s filtrem subjektu +Unanswered=Unanswered +Answered=Odpovězeno +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/cs_CZ/main.lang b/htdocs/langs/cs_CZ/main.lang index 3683f0ce169..94780679f14 100644 --- a/htdocs/langs/cs_CZ/main.lang +++ b/htdocs/langs/cs_CZ/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (Včetně daně) Amount=Množství AmountInvoice=Fakturovaná částka AmountInvoiced=Fakturovaná částka -AmountInvoicedHT=Fakturovaná částka (včetně daně) -AmountInvoicedTTC=Fakturovaná částka (bez daně) +AmountInvoicedHT=Fakturovaná částka (bez daně) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Částka platby AmountHTShort=Částka (bez) AmountTTCShort=Částka (vč. DPH) @@ -485,6 +485,7 @@ Categories=Tagy/kategorie Category=Tag/kategorie By=Podle From=Z +FromDate=Z FromLocation=Z to=na To=na @@ -687,6 +688,7 @@ Method=Metoda Receive=Přijmout CompleteOrNoMoreReceptionExpected=Dokončeno nebo nic víc očekávaného ExpectedValue=Očekávaná hodnota +ExpectedQty=Expected Qty PartialWoman=Částečný TotalWoman=Celkový NeverReceived=Nikdy nedostal @@ -703,6 +705,7 @@ MenuECM=Dokumenty MenuAWStats=AW Statistiky MenuMembers=Členové MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Daně/Zvláštní výdaje ThisLimitIsDefinedInSetup=Dolibarr limit (menu Domů-nastavení-zabezpečení): %s Kb, PHP limit: %s Kb NoFileFound=Žádné dokumenty nejsou uložené v tomto adresáři CurrentUserLanguage=Aktuální jazyk @@ -725,7 +728,7 @@ Page=Strana Notes=Poznámky AddNewLine=Přidat nový řádek AddFile=Přidat soubor -FreeZone=Nejedná se o předdefinovaný produkt/službu +FreeZone=Produkt s volným textem FreeLineOfType=Volně textová položka, typ: CloneMainAttributes=Duplikovat objekt s jeho hlavními atributy ReGeneratePDF=Znovu generovat PDF @@ -942,6 +945,39 @@ ShortThursday=Č ShortFriday=PÁ ShortSaturday=S ShortSunday=N +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Vyberte šablonu e-mailu SetRef=nastavit ref Select2ResultFoundUseArrows=Byly nalezeny některé výsledky. Pomocí šipek vyberte. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Přepnutím v režimu úprav přidáte překlad NotUsedForThisCustomer=Nepoužívá se pro tohoto zákazníka AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informace +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/cs_CZ/members.lang b/htdocs/langs/cs_CZ/members.lang index e173badf8d6..50770d35641 100644 --- a/htdocs/langs/cs_CZ/members.lang +++ b/htdocs/langs/cs_CZ/members.lang @@ -81,7 +81,7 @@ DeleteType=Vymazat VoteAllowed=Hlasování povoleno Physical=Fyzický Moral=Morální -MorPhy=Morální / fyzický +MorPhy=Příroda Reenable=Znovu povolit ResiliateMember=Ukončit člena ConfirmResiliateMember=Jste si jisti, že chcete ukončit tyto členy? diff --git a/htdocs/langs/cs_CZ/mrp.lang b/htdocs/langs/cs_CZ/mrp.lang index 85aecf46280..ee97c7b368f 100644 --- a/htdocs/langs/cs_CZ/mrp.lang +++ b/htdocs/langs/cs_CZ/mrp.lang @@ -1,5 +1,6 @@ Mrp=Výrobní zakázky MO=Výrobní zakázka +MOs=Manufacturing orders MRPDescription=Modul pro správu výrobních a výrobních objednávek (MO). MRPArea=Oblast MRP MrpSetupPage=Nastavení modulu MRP diff --git a/htdocs/langs/cs_CZ/other.lang b/htdocs/langs/cs_CZ/other.lang index f544f4da7d6..ba0a69321c7 100644 --- a/htdocs/langs/cs_CZ/other.lang +++ b/htdocs/langs/cs_CZ/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Ahoj)__\n\nObraťte se na naši objedn PredefinedMailContentSendSupplierInvoice=__(Ahoj)__\n\nNajděte fakturu __REF__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Ahoj)__\n\nNajděte prosím dodací lhůtu __REF__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Ahoj)__\n\nNajděte zásah __REF__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Ahoj)__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Ahoj)__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Ahoj)__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Klepnutím na níže uvedený odkaz proveďte platbu, pokud ještě není hotovo.\n\n%s\n\n +PredefinedMailContentGeneric=__(Ahoj)__\n\n\n__(S pozdravem)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr je kompaktní ERP/CRM systém, který se skládá z více funkčních modulů. Demo, které obsahuje všechny moduly vám nepředstaví všechny možnosti, protože v reálné situaci všechny moduly najednou používat nebudete. Pro lepší a snadnější seznámení s celým systémem máte k dispozici několik demo profilů lépe vystihujících vaše požadavky. ChooseYourDemoProfil=Vyberte demo profil, který nejlépe odpovídá vaší činnosti, nebo zaměření ... ChooseYourDemoProfilMore=... nebo vytvořit vlastní profil
    (manuální výběr požadovaných modulů) @@ -280,7 +278,9 @@ LinesToImport=Řádky, které chcete importovat MemoryUsage=Využití paměti RequestDuration=Doba trvání žádosti +ProductsPerPopularity=Products/Services by popularity PopuProp=Produkty / služby podle oblíbenosti v návrzích PopuCom=Produkty / služby podle oblíbenosti v objednávkách ProductStatistics=Statistika produktů / služeb NbOfQtyInOrders=Množství v objednávkách +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/cs_CZ/products.lang b/htdocs/langs/cs_CZ/products.lang index 28779340308..4a14c6581fc 100644 --- a/htdocs/langs/cs_CZ/products.lang +++ b/htdocs/langs/cs_CZ/products.lang @@ -104,9 +104,10 @@ SetDefaultBarcodeType=Nastavte typ čárového kódu BarcodeValue=Hodnota čárového kódu NoteNotVisibleOnBill=Poznámka (není vidět na návrzích faktury, ...) ServiceLimitedDuration=Je-li výrobek službou s omezeným trváním: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Více cenových segmentů na produkt / službu (každý zákazník je v jednom cenovém segmentu) MultiPricesNumPrices=Počet cen -DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices +DefaultPriceType=Základ cen za prodlení (s versus bez daně) při přidávání nových prodejních cen AssociatedProductsAbility=Aktivovat virtuální produkty (sady) AssociatedProducts=Virtuální produkty AssociatedProductsNumber=Počet výrobků tvořících tento virtuální produkt @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Ceny prodejců (produktů nebo služeb) CustomCode=Kód cla / komodity / HS CountryOrigin=Země původu Nature=Druh produktu (materiál / hotový) +NatureOfProductShort=Druh produktu +NatureOfProductDesc=Surovina nebo hotový produkt ShortLabel=Krátký štítek Unit=Jednotka p=u. @@ -359,6 +362,9 @@ SelectCombination=Vyberte kombinaci ProductCombinationGenerator=Generátor variant Features=Funkce PriceImpact=Dopad na ceny +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Hmotnostní dopady NewProductAttribute=Nový atribut NewProductAttributeValue=Nová hodnota atributu diff --git a/htdocs/langs/cs_CZ/projects.lang b/htdocs/langs/cs_CZ/projects.lang index 2458223a877..e75df1f5d9e 100644 --- a/htdocs/langs/cs_CZ/projects.lang +++ b/htdocs/langs/cs_CZ/projects.lang @@ -7,7 +7,7 @@ ProjectsArea=Oblast projektů ProjectStatus=Stav projektu SharedProject=Všichni PrivateProject=Kontakty projektu -ProjectsImContactFor=Projects for which I am explicitly a contact +ProjectsImContactFor=Projekty, pro které jsem výslovně kontakt AllAllowedProjects=Celý projekt mohu číst (moje + veřejnost) AllProjects=Všechny projekty MyProjectsDesc=Tento pohled je omezen na projekty u kterých jste uveden jako kontakt @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Přispěvatel TypeContact_project_task_external_TASKCONTRIBUTOR=Přispěvatel SelectElement=Vyberte prvek AddElement=Odkaz na prvek +LinkToElementShort=odkaz na # Documents models DocumentModelBeluga=Šablona dokumentu dokumentu pro přehled propojených objektů DocumentModelBaleine=Šablona dokumentu projektu pro úkoly @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Počet vytvořených projektů podle měsíce ProjectNbTaskByMonth=Počet vytvořených úkolů měsíčně ProjectOppAmountOfProjectsByMonth=Množství potenciálních zákazníků měsíčně ProjectWeightedOppAmountOfProjectsByMonth=Vážená částka vedoucích podle měsíce -ProjectOpenedProjectByOppStatus=Otevření projektu / vedení podle stavu vedení -ProjectsStatistics=Statistiky týkající se projektů / vodičů -TasksStatistics=Statistiky projektů / vedoucích úkolů +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Úkol přidělen. Zadání času na tomto úkolu by mělo být možné. IdTaskTime=Čas úlohy Id YouCanCompleteRef=Chcete-li doplnit odkaz nějakou příponou, doporučujeme přidat znak - aby se oddělil, takže automatické číslování bude fungovat správně pro další projekty. Například %s-MYSUFFIX @@ -265,4 +266,4 @@ NewInvoice=Nová faktura OneLinePerTask=Jeden řádek na úkol OneLinePerPeriod=Jeden řádek za období RefTaskParent=Ref. Nadřazený úkol -ProfitIsCalculatedWith=Profit is calculated using +ProfitIsCalculatedWith=Zisk se vypočítá pomocí diff --git a/htdocs/langs/cs_CZ/propal.lang b/htdocs/langs/cs_CZ/propal.lang index 5578239af42..a945b46a66a 100644 --- a/htdocs/langs/cs_CZ/propal.lang +++ b/htdocs/langs/cs_CZ/propal.lang @@ -84,4 +84,4 @@ DefaultModelPropalClosed=Výchozí šablona při uzavírání obchodní nabídky ProposalCustomerSignature=Písemný souhlas, razítko firmy, datum a podpis ProposalsStatisticsSuppliers=Statistika návrhů dodavatelů CaseFollowedBy=Případ následovaný -SignedOnly=Signed only +SignedOnly=Podepsáno pouze diff --git a/htdocs/langs/cs_CZ/receiptprinter.lang b/htdocs/langs/cs_CZ/receiptprinter.lang index b141c33ce18..ae6a4880b0b 100644 --- a/htdocs/langs/cs_CZ/receiptprinter.lang +++ b/htdocs/langs/cs_CZ/receiptprinter.lang @@ -77,6 +77,6 @@ DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Zůstatek na účtu zákazníka DOL_VALUE_MYSOC_NAME=Název vaší společnosti VendorLastname=Příjmení dodavatele VendorFirstname=Jméno dodavatele -VendorEmail=Vendor email +VendorEmail=E-mail dodavatele DOL_VALUE_CUSTOMER_POINTS=Zákaznické body DOL_VALUE_OBJECT_POINTS=Body bodů diff --git a/htdocs/langs/cs_CZ/receptions.lang b/htdocs/langs/cs_CZ/receptions.lang index 015132d8d84..f5217377215 100644 --- a/htdocs/langs/cs_CZ/receptions.lang +++ b/htdocs/langs/cs_CZ/receptions.lang @@ -43,5 +43,5 @@ ProductQtyInSuppliersReceptionAlreadyRecevied=Množství produktu již obdrženo ValidateOrderFirstBeforeReception=Nejprve musíte potvrdit objednávku, než budete moci přijímat recepce. ReceptionsNumberingModules=Modul číslování pro recepce ReceptionsReceiptModel=Šablony dokumentů pro recepce -NoMorePredefinedProductToDispatch=No more predefined products to dispatch +NoMorePredefinedProductToDispatch=Žádné další předdefinované produkty k odeslání diff --git a/htdocs/langs/cs_CZ/recruitment.lang b/htdocs/langs/cs_CZ/recruitment.lang new file mode 100644 index 00000000000..25cc7d16349 --- /dev/null +++ b/htdocs/langs/cs_CZ/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Nastavení +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = O aplikaci +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/cs_CZ/stocks.lang b/htdocs/langs/cs_CZ/stocks.lang index 2e524586ff4..ef9fbfdb1eb 100644 --- a/htdocs/langs/cs_CZ/stocks.lang +++ b/htdocs/langs/cs_CZ/stocks.lang @@ -1,32 +1,32 @@ # Dolibarr language file - Source file is en_US - stocks -WarehouseCard=Karta skladiště +WarehouseCard=Karta skladu Warehouse=Sklad Warehouses=Sklady ParentWarehouse=Nadřazený sklad -NewWarehouse=Nový sklad / umístění skladu +NewWarehouse=Nový sklad/umístění skladu WarehouseEdit=Upravit sklad MenuNewWarehouse=Nový sklad WarehouseSource=Zdrojový sklad -WarehouseSourceNotDefined=Není definován žádné skladiště +WarehouseSourceNotDefined=Není definován žádný sklad, AddWarehouse=Vytvořte sklad -AddOne=Přidat jedno +AddOne=Přidejte jeden DefaultWarehouse=Výchozí sklad WarehouseTarget=Cílový sklad -ValidateSending=Smazat odeslání -CancelSending=Zrušit zasílání +ValidateSending=Smazat odesílání +CancelSending=Zrušit odesílání DeleteSending=Smazat odeslání -Stock=Sklad -Stocks=Sklady -MissingStocks=Missing stocks -StockAtDate=Stock at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future -StocksByLotSerial=Sklad množství/série -LotSerial=Loty / seriály -LotSerialList=Seznam partitur / seriálů +Stock=Skladem +Stocks=Zásoby +MissingStocks=Chybějící zásoby +StockAtDate=Zásoby k datu +StockAtDateInPast=Datum v minulosti +StockAtDateInFuture=Datum v budoucnosti +StocksByLotSerial=Zásoby podle šarže/serie +LotSerial=Šarže/série +LotSerialList=Seznam šarže/serie Movements=Pohyby ErrorWarehouseRefRequired=Referenční jméno skladiště je povinné -ListOfWarehouses=Seznam skladišť +ListOfWarehouses=Seznam skladů ListOfStockMovements=Přehled skladových pohybů ListOfInventories=Seznam zásob MovementId=ID pohybu @@ -34,7 +34,7 @@ StockMovementForId=ID pohybu %d ListMouvementStockProject=Seznam pohybů zásob spojené s projektem StocksArea=Skladové prostory AllWarehouses=Všechny sklady -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock=Zahrňte také nedefinované požadované zásoby IncludeAlsoDraftOrders=Zahrnout také návrhy objednávek Location=Umístění LocationSummary=Krátký název umístění @@ -65,9 +65,9 @@ RuleForWarehouse=Pravidlo pro sklady WarehouseAskWarehouseDuringOrder=Nastavit sklad na prodejní objednávky UserDefaultWarehouse=Nastavit sklad na Uživatelé MainDefaultWarehouse=Výchozí sklad -MainDefaultWarehouseUser=Use a default warehouse for each user -MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. -IndependantSubProductStock=Produktová skladová zásoba a podprojekt jsou nezávislé +MainDefaultWarehouseUser=Použijte výchozí sklad pro každého uživatele +MainDefaultWarehouseUserDesc=Aktivací této možnosti bude při vytváření produktu v tomto skladu definován sklad přiřazený k produktu. Není-li u uživatele definován žádný sklad, je definován výchozí sklad. +IndependantSubProductStock=Sklad produktu a dílčí produkt jsou nezávislé QtyDispatched=Množství odesláno QtyDispatchedShort=Odeslané množství QtyToDispatchShort=Odesílané množství @@ -95,25 +95,27 @@ RealStock=Skutečný sklad RealStockDesc=Fyzické / skutečné zásoby jsou zásoby, které jsou v současné době ve skladech. RealStockWillAutomaticallyWhen=Reálná aktiva bude upravena podle tohoto pravidla (jak je definováno v modulu Akcie): VirtualStock=Virtuální sklad -VirtualStockDesc=Virtuální zásoba je vypočítaná zásoba, jakmile jsou všechny otevřené / čekající akce (které ovlivňují akcie) uzavřeny (přijaté nákupní objednávky, zaslané objednávky atd.) +VirtualStockAtDate=Virtuální sklad k datu +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtuální sklad je vypočítaná zásoba dostupná po uzavření všech otevřených/čekajících akcí (které mají vliv na zásoby) (přijaté objednávky, dodané prodejní objednávky, vyrobené výrobní objednávky atd.) IdWarehouse=ID skladu -DescWareHouse=Popis skladiště -LieuWareHouse=Lokalizace skladiště -WarehousesAndProducts=Skladiště a produkty -WarehousesAndProductsBatchDetail=Skladiště a výrobky (s detaily na množství/série) -AverageUnitPricePMPShort=Vážený průměr cen vstupů -AverageUnitPricePMP=Vážený průměr cen vstupů -SellPriceMin=Prodejní jednotka Cena +DescWareHouse=Popis skladu +LieuWareHouse=Lokalizace skladu +WarehousesAndProducts=Sklady a výrobky +WarehousesAndProductsBatchDetail=Sklady a produkty (s podrobnostmi o šarži/sérii) +AverageUnitPricePMPShort=Vážená průměrná cena +AverageUnitPricePMPDesc=Vstupní průměrná jednotková cena, kterou jsme museli platit dodavatelům, aby dostali produkt do naší zásoby. +SellPriceMin=Prodejní jednotková cena EstimatedStockValueSellShort=Hodnota k prodeji EstimatedStockValueSell=Hodnota k prodeji EstimatedStockValueShort=Vstupní hodnota zásob EstimatedStockValue=Vstupní hodnota zásob -DeleteAWarehouse=Odstranění skladiště +DeleteAWarehouse=Odstranit sklad ConfirmDeleteWarehouse=Opravdu chcete vymazat sklad %s ? PersonalStock=Osobní sklad %s ThisWarehouseIsPersonalStock=Tento sklad představuje osobní zásobu %s %s -SelectWarehouseForStockDecrease=Zvolte skladiště pro použití snížení zásob -SelectWarehouseForStockIncrease=Zvolte skladiště pro zvýšení stavu zásob +SelectWarehouseForStockDecrease=Vyberte sklad, který chcete použít pro snížení zásob +SelectWarehouseForStockIncrease=Vyberte sklad, který chcete použít pro zvýšení zásob NoStockAction=Žádné akce ve skladu DesiredStock=Požadované optimální zásoby DesiredStockDesc=Tato částka bude hodnota použitá k vyplnění zásoby podle funkce doplnění. @@ -130,18 +132,18 @@ CurentlyUsingPhysicalStock=Fyzické zásoby RuleForStockReplenishment=Pravidlo pro doplňování zásob SelectProductWithNotNullQty=Vyberte alespoň jeden produkt s množství větším než 0 a dodavatelem AlertOnly= Pouze upozornění -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 -WarehouseForStockDecrease=Skladiště %s budou použity pro snížení skladu -WarehouseForStockIncrease=Skladiště %s budou použity pro zvýšení stavu zásob -ForThisWarehouse=Z tohoto skladiště +IncludeProductWithUndefinedAlerts = Zahrňte také negativní zásobu produktů bez definovaného požadovaného množství, abyste je obnovili na 0 +WarehouseForStockDecrease=Sklad %s bude použit pro snížení zásob +WarehouseForStockIncrease=Ke zvýšení zásob bude použit sklad %s . +ForThisWarehouse=Pro tento sklad ReplenishmentStatusDesc=Toto je seznam všech produktů, jejichž zásoba je nižší než požadovaná zásoba (nebo je nižší než hodnota výstrahy, pokud je zaškrtnuto políčko "pouze výstraha"). Pomocí zaškrtávacího políčka můžete vytvořit objednávky k vyplnění rozdílu. -ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. +ReplenishmentStatusDescPerWarehouse=Pokud chcete doplnění na základě požadovaného množství definovaného pro sklad, musíte do skladu přidat filtr. ReplenishmentOrdersDesc=Jedná se o seznam všech otevřených objednávek včetně předdefinovaných produktů. Otevřeny jsou pouze objednávky s předdefinovanými produkty, takže objednávky, které mohou ovlivnit zásoby, jsou zde viditelné. Replenishments=Splátky NbOfProductBeforePeriod=Množství produktů %s na skladě, než zvolené období (< %s) NbOfProductAfterPeriod=Množství produktů %s na skladě po zvolené období (> %s) MassMovement=Hromadný pohyb -SelectProductInAndOutWareHouse=Vyberte produkt, množství, zdrojový sklad a cílový sklad, pak klikněte na "%s". Jakmile se tak stane pro všechny požadované pohyby, klikněte na "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Záznam přenosu ReceivingForSameOrder=Příjmy pro tuto objednávku StockMovementRecorded=Zaznamenány pohyby zásob @@ -232,6 +234,9 @@ InventoryForASpecificProduct=Inventář konkrétního produktu StockIsRequiredToChooseWhichLotToUse=Zásoba je povinna zvolit, které množství se má použít ForceTo=Vynutit AlwaysShowFullArbo=Zobrazit plný strom skladu v rozbalovacím seznamu propojení skladu (Upozornění: Může to dramaticky snížit výkon) -StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past -StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future -CurrentStock=Current stock +StockAtDatePastDesc=Zde si můžete zobrazit akcie (skutečné zásoby) k danému datu v minulosti +StockAtDateFutureDesc=Zde si můžete v budoucnu zobrazit akcie (virtuální akcie) k danému datu +CurrentStock=Aktuální stav +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/cs_CZ/suppliers.lang b/htdocs/langs/cs_CZ/suppliers.lang index 37ac3549c00..ce2434b6a84 100644 --- a/htdocs/langs/cs_CZ/suppliers.lang +++ b/htdocs/langs/cs_CZ/suppliers.lang @@ -1,47 +1,47 @@ -# Dolibarr language file - Source file is en_US - suppliers -Suppliers=Vendors -SuppliersInvoice=Vendor invoice -ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor +# Dolibarr language file - Source file is en_US - vendors +Suppliers=Dodavatelé +SuppliersInvoice=Faktura dodavatele +ShowSupplierInvoice=Zobrazit fakturu dodavatele +NewSupplier=Nový dodavatel History=Historie -ListOfSuppliers=List of vendors -ShowSupplier=Show vendor +ListOfSuppliers=Seznam dodavatelů +ShowSupplier=Zobrazit dodavatele OrderDate=Datum objednávky -BuyingPriceMin=Best buying price -BuyingPriceMinShort=Best buying price +BuyingPriceMin=Nejlepší nákupní cena +BuyingPriceMinShort=Nejlepší nákupní cena TotalBuyingPriceMinShort=Nákupní ceny vedlejších produktů celkem -TotalSellingPriceMinShort=Total of subproducts selling prices +TotalSellingPriceMinShort=Celkem podprodávané prodejní ceny SomeSubProductHaveNoPrices=Některé vedlejší produkty nemají stanovené žádné ceny -AddSupplierPrice=Add buying price -ChangeSupplierPrice=Change buying price -SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Tato referenční dodavatel je již spojeno s odkazem: %s -NoRecordedSuppliers=No vendor recorded -SupplierPayment=Vendor payment -SuppliersArea=Vendor area -RefSupplierShort=Ref. vendor +AddSupplierPrice=Přidat nákupní cenu +ChangeSupplierPrice=Změna nákupní ceny +SupplierPrices=Ceny prodejců +ReferenceSupplierIsAlreadyAssociatedWithAProduct=Tato referenční nabídka dodavatele je již spojena s produktem: %s +NoRecordedSuppliers=Žádný dodavatel nebyl zaznamenán +SupplierPayment=Dodavatelská platba +SuppliersArea=Oblast dodavatelů +RefSupplierShort=Ref. dodavatel Availability=Dostupnost -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines -ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_1=Prodejní faktury a fakturační údaje +ExportDataset_fournisseur_2=Prodejní faktury a platby +ExportDataset_fournisseur_3=Nákupní objednávky a podrobnosti o objednávce ApproveThisOrder=Schválit tuto objednávku -ConfirmApproveThisOrder=Are you sure you want to approve order %s? +ConfirmApproveThisOrder=Jste si jisti, že chcete schválit tuto objednávku %s? DenyingThisOrder=Zakázat tuto objednávku -ConfirmDenyingThisOrder=Are you sure you want to deny this order %s? -ConfirmCancelThisOrder=Are you sure you want to cancel this order %s? -AddSupplierOrder=Create Purchase Order -AddSupplierInvoice=Create vendor invoice -ListOfSupplierProductForSupplier=List of products and prices for vendor %s -SentToSuppliers=Sent to vendors -ListOfSupplierOrders=List of purchase orders -MenuOrdersSupplierToBill=Purchase orders to invoice -NbDaysToDelivery=Zpoždění dodávky ve dnech -DescNbDaysToDelivery=Největší zpoždění dodávek z produktů z této objednávky -SupplierReputation=Vendor reputation -DoNotOrderThisProductToThisSupplier=Do not order -NotTheGoodQualitySupplier=Wrong quality -ReputationForThisProduct=Reputation -BuyerName=Buyer name -AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of supplier -BuyingPriceNumShort=Vendor prices +ConfirmDenyingThisOrder=Opravdu chcete zakázat tuto objednávku %s ? +ConfirmCancelThisOrder=Jste si jisti, že chcete zrušit tuto objednávku %s ? +AddSupplierOrder=Vytvořit objednávku +AddSupplierInvoice=Vytvořte fakturu dodavatele +ListOfSupplierProductForSupplier=Seznam produktů a cen pro dodavatele %s +SentToSuppliers=Odesláno prodejcům +ListOfSupplierOrders=Seznam objednávek +MenuOrdersSupplierToBill=Objednávky k fakturám +NbDaysToDelivery=Dodací lhůta (dny) +DescNbDaysToDelivery=Nejdelší dodací lhůta produktů z této objednávky +SupplierReputation=Reputace prodejce +DoNotOrderThisProductToThisSupplier=Ne objednávejte +NotTheGoodQualitySupplier=Nízká kvalita +ReputationForThisProduct=Pověst +BuyerName=Jméno kupujícího +AllProductServicePrices=Všechny ceny produktů / služeb +AllProductReferencesOfSupplier=Všechny reference dodavatele +BuyingPriceNumShort=Ceny prodejců diff --git a/htdocs/langs/cs_CZ/ticket.lang b/htdocs/langs/cs_CZ/ticket.lang index 7584a4ffc07..83a4e3cd4e6 100644 --- a/htdocs/langs/cs_CZ/ticket.lang +++ b/htdocs/langs/cs_CZ/ticket.lang @@ -72,7 +72,6 @@ Deleted=Smazáno # Dict Type=Typ -Category=Analytický kód Severity=Vážnost # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automaticky přiřadit uživateli, který vytvořil lís TicketsAutoAssignTicketHelp=Při tvorbě vstupenky může být uživateli automaticky přiřazen lístek. TicketNumberingModules=Modul číslování vstupenek TicketNotifyTiersAtCreation=Upozornit subjekt na vytvoření -TicketGroup=Skupina TicketsDisableCustomerEmail=Pokud je lístek vytvořen z veřejného rozhraní, vždy zakažte e-maily TicketsPublicNotificationNewMessage=Po přidání nové zprávy odešlete e-mail(y) TicketsPublicNotificationNewMessageHelp=Odeslat e-mail(y) při přidání nové zprávy z veřejného rozhraní (přiřazenému uživateli nebo e-mailu s oznámením do (aktualizace) a/nebo e-mailu s oznámením do) @@ -162,7 +160,7 @@ CreatedBy=Vytvořil NewTicket=Nová vstupenka SubjectAnswerToTicket=Odpověď na lístek TicketTypeRequest=Typ požadavku -TicketCategory=Analytický kód +TicketCategory=Skupina SeeTicket=Viz lístek TicketMarkedAsRead=Lístek byl označen jako přečtený TicketReadOn=Číst dál diff --git a/htdocs/langs/cs_CZ/users.lang b/htdocs/langs/cs_CZ/users.lang index 83d483648c6..3346f1c50ef 100644 --- a/htdocs/langs/cs_CZ/users.lang +++ b/htdocs/langs/cs_CZ/users.lang @@ -20,11 +20,11 @@ DeleteAUser=Vymazat uživatele EnableAUser=Povolit uživatele DeleteGroup=Vymazat DeleteAGroup=Smazat skupinu -ConfirmDisableUser=Jste si jisti, že chcete zakázat uživatele %s ? -ConfirmDeleteUser=Jste si jisti, že chcete smazat uživatele %s ? -ConfirmDeleteGroup=Jste si jisti, že chcete smazat skupinu %s ? +ConfirmDisableUser=Opravdu chcete deaktivovat uživatele %s ? +ConfirmDeleteUser=Opravdu chcete smazat uživatele %s ? +ConfirmDeleteGroup=Opravdu chcete smazat skupinu %s ? ConfirmEnableUser=Jste si jisti, že chcete povolit uživatele %s? -ConfirmReinitPassword=Jste si jisti, že chcete vytvořit nové heslo pro uživatele %s ? +ConfirmReinitPassword=Opravdu chcete vygenerovat nové heslo pro uživatele %s ? ConfirmSendNewPassword=Jste si jisti, že chcete vytvořit a odeslat nové heslo uživateli %s? NewUser=Nový uživatel CreateUser=Vytvořit uživatele @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Zakázán v režimu údržby UserAccountancyCode=Účetní kód uživatele UserLogoff=odhlášení uživatele UserLogged=přihlášený uživatel +DateOfEmployment=Datum zaměstnání DateEmployment=Datum zahájení zaměstnání DateEmploymentEnd=Datum ukončení zaměstnání CantDisableYourself=Nelze zakázat vlastní uživatelský záznam @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Vynutit validátor žádosti o dovolenou ValidatorIsSupervisorByDefault=Ve výchozím nastavení je validátor nadřazený nad uživatelem. Chcete-li zachovat toto chování, ponechte prázdné. UserPersonalEmail=Osobní email UserPersonalMobile=Osobní mobilní telefon +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/cs_CZ/website.lang b/htdocs/langs/cs_CZ/website.lang index d986b10c558..a91cf601e84 100644 --- a/htdocs/langs/cs_CZ/website.lang +++ b/htdocs/langs/cs_CZ/website.lang @@ -16,7 +16,7 @@ WEBSITE_ROBOT=Soubor pro roboty (soubor robots.txt) WEBSITE_HTACCESS=Soubor .htaccess WEBSITE_MANIFEST_JSON=Soubor manifest.json webové stránky WEBSITE_README=Soubor README.md -WEBSITE_KEYWORDSDesc=Use a comma to separate values +WEBSITE_KEYWORDSDesc=Hodnoty oddělte čárkou EnterHereLicenseInformation=Sem zadejte metadata nebo licenční informace a vyplňte soubor README.md. Pokud distribuujete svůj web jako šablonu, bude soubor zahrnut do temptátového balíčku. HtmlHeaderPage=Záhlaví HTML (pouze pro tuto stránku) PageNameAliasHelp=Název nebo alias stránky.
    Tento alias je také používán k vytvoření adresy URL při běhu webových stránek z virtuálního hostitele webového serveru (jako Apacke, Nginx, ...). Pomocí tlačítka " %s " upravte tento alias. @@ -60,8 +60,8 @@ SyntaxHelp=Nápověda ke konkrétním tipům pro syntaxi YouCanEditHtmlSourceckeditor=Zdrojový kód HTML můžete upravit pomocí tlačítka "Zdroj" v editoru. YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">

    To include an image stored into the documents directory, use the viewimage.php wrapper:
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    #YouCanEditHtmlSource2=
    To include a image shared publicaly, use the viewimage.php wrapper:
    Example with a shared key 123456789, syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSourceMore=
    More examples of HTML or dynamic code available on the wiki documentation
    . +YouCanEditHtmlSource2=Pro obraz sdílený pomocí sdíleného odkazu (otevřený přístup pomocí klíče sdílení hash souboru) je syntaxe:
    <img src="/viewimage.php?hashp=12345679012...">
    +YouCanEditHtmlSourceMore=
    Další příklady HTML nebo dynamického kódu jsou k dispozici na wiki dokumentaci
    . ClonePage=Klonovat stránku / kontejner CloneSite=Kopie stránky SiteAdded=Webová stránka byla přidána @@ -124,7 +124,7 @@ ShowSubContainersOnOff=Režim provádění „dynamického obsahu“ je %s GlobalCSSorJS=Globální soubor CSS / JS / Header na webové stránce BackToHomePage=Zpět na domovskou stránku... TranslationLinks=Překladové odkazy -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) +YouTryToAccessToAFileThatIsNotAWebsitePage=Pokusíte se o přístup na stránku, která není k dispozici.
    (ref = %s, typ = %s, status = %s) UseTextBetween5And70Chars=Pro osvědčené postupy SEO použijte text mezi 5 a 70 znaky MainLanguage=Hlavní jazyk OtherLanguages=Jiné jazyky @@ -134,4 +134,4 @@ AvailableLanguagesAreDefinedIntoWebsiteProperties=Dostupné jazyky jsou definov ReplacementDoneInXPages=Výměna se provádí na stránkách nebo kontejnerech %s RSSFeed=RSS Feed RSSFeedDesc=Pomocí této adresy URL můžete získat RSS kanál nejnovějších článků typu blogpost -PagesRegenerated=%s page(s)/container(s) regenerated +PagesRegenerated=%s regenerováno stránky / kontejnery diff --git a/htdocs/langs/cs_CZ/withdrawals.lang b/htdocs/langs/cs_CZ/withdrawals.lang index 153688ffecf..1d5f1bb8ada 100644 --- a/htdocs/langs/cs_CZ/withdrawals.lang +++ b/htdocs/langs/cs_CZ/withdrawals.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - withdrawals -CustomersStandingOrdersArea=Payments by Direct debit orders -SuppliersStandingOrdersArea=Payments by Credit transfer +CustomersStandingOrdersArea=Platby příkazu k inkasu +SuppliersStandingOrdersArea=Platby převodem StandingOrdersPayment=Inkasní příkazy k úhradě StandingOrderPayment=Příkaz k inkasu NewStandingOrder=Nový příkaz k inkasu @@ -10,37 +10,37 @@ PaymentByBankTransferReceipts=Příkazy k úhradě PaymentByBankTransferLines=Řádky bankovních převodů WithdrawalsReceipts=příkazy k inkasu WithdrawalReceipt=Trvalý příkaz -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order +BankTransferReceipts=Příkazy k úhradě +BankTransferReceipt=Příkaz k převodu LatestBankTransferReceipts=Poslední příkazy k úhradě %s LastWithdrawalReceipts=Poslední %s soubory inkasní -WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line +WithdrawalsLine=Řádek přímého inkasa +CreditTransferLine=Řádek na úhradu WithdrawalsLines=Řádky výběrů -CreditTransferLines=Credit transfer lines -RequestStandingOrderToTreat=Requests for direct debit payment order to process -RequestStandingOrderTreated=Requests for direct debit payment order processed -RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed +CreditTransferLines=Řádky na úhradu +RequestStandingOrderToTreat=Žádosti o zpracování příkazu k inkasu +RequestStandingOrderTreated=Byly zpracovány žádosti o příkaz k inkasu +RequestPaymentsByBankTransferToTreat=Žádosti o převod kreditu ke zpracování +RequestPaymentsByBankTransferTreated=Žádosti o úhradu zpracovány NotPossibleForThisStatusOfWithdrawReceiptORLine=Zatím to není možné. Před prohlášením o odmítnutí na konkrétních řádcích musí být stav výběru zrušen. NbOfInvoiceToWithdraw=Počet kvalifikovaných zákaznických faktur s čekající inkasní objednávkou NbOfInvoiceToWithdrawWithInfo=Počet zákaznických faktur s inkasními platebními příkazy s definovanými informacemi o bankovním účtu NbOfInvoiceToPayByBankTransfer=Počet faktur kvalifikovaných dodavatelů čekajících na platbu převodem SupplierInvoiceWaitingWithdraw=Faktura dodavatele čekající na platbu převodem InvoiceWaitingWithdraw=Faktura čeká na inkaso -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +InvoiceWaitingPaymentByBankTransfer=Faktura čeká na převod peněz AmountToWithdraw=Částka výběru -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. +NoInvoiceToWithdraw=Neexistuje žádná otevřená faktura pro „%s“. Na kartě faktury přejděte na kartu „%s“ a požádejte o ni. NoSupplierInvoiceToWithdraw=Čeká dodavatelská faktura s otevřeným „přímým požadavkem na kredit“. Na kartě faktury přejděte na kartu „%s“ a požádejte o ni. ResponsibleUser=Odpovědný uživatel WithdrawalsSetup=Nastavení platby inkasem -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Nastavení úhrady WithdrawStatistics=Statistiky plateb přímého inkasa -CreditTransferStatistics=Credit transfer statistics +CreditTransferStatistics=Statistiky převodů Rejects=Odmítnuto LastWithdrawalReceipt=Poslední %s přímého inkasa debetní MakeWithdrawRequest=Zadejte žádost o platbu inkasem -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Proveďte žádost o převod WithdrawRequestsDone=%s zaznamenané žádosti o inkaso ThirdPartyBankCode=Kód banky subjektu NoInvoiceCouldBeWithdrawed=Žádná faktura nebyla odepsána úspěšně. Zkontrolujte, zda jsou faktury u společností s platným IBAN a zda má IBAN UMR (Unique Mandate Reference) s režimem %s . @@ -53,7 +53,7 @@ Lines=Řádky StandingOrderReject=Vydat odmítnutí WithdrawsRefused=Přímé inkaso odmítnuto WithdrawalRefused=Výběr odmítnut -CreditTransfersRefused=Credit transfers refused +CreditTransfersRefused=Kreditní převody odmítnuty WithdrawalRefusedConfirm=Opravdu chcete zadat odmítnutí výběru společnosti RefusedData=Datum odmítnutí RefusedReason=Důvod odmítnutí @@ -63,7 +63,9 @@ InvoiceRefused=Faktura odmítnuta (Účtujte odmítnutí k zákazníkovi) StatusDebitCredit=Stav debetní / kreditní StatusWaiting=Čekání StatusTrans=odesláno +StatusDebited=Debited StatusCredited=Připsání +StatusPaid=Placeno StatusRefused=Odmítnutí StatusMotif0=Nespecifikovaný StatusMotif1=Nedostatek finančních prostředků @@ -77,13 +79,13 @@ StatusMotif8=Jiný důvod CreateForSepaFRST=Vytvoření souboru s inkasem (SEPA FRST) CreateForSepaRCUR=Vytvořte soubor inkasa (SEPA RCUR) CreateAll=Vytvořit soubor s inkasem (všechny) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateSepaFileForPaymentByBankTransfer=Vytvoření souboru pro převod kreditů (SEPA) CreateGuichet=Pouze kancelář CreateBanque=Pouze banky OrderWaiting=Čekání na léčbu -NotifyTransmision=Převod výběru -NotifyCredit=Výběr kreditu +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Národní převodní číslo WithBankUsingRIB=U bankovních účtů pomocí RIB WithBankUsingBANBIC=U bankovních účtů pomocí IBAN/BIC/SWIFT @@ -93,25 +95,26 @@ CreditDate=Kredit na WithdrawalFileNotCapable=Nelze generovat soubor výběru příjmu pro vaši zemi %s (Vaše země není podporována) ShowWithdraw=Zobrazit příkaz k inkasu IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Pokud však na faktuře dosud nebyl zpracován alespoň jeden příkaz k inkasu, nebude nastavena jako zaplacená, aby bylo možné provést předchozí výběr. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Soubor výběru +DoStandingOrdersBeforePayments=Na této kartě můžete požádat o příkaz k inkasu. Po dokončení přejděte do nabídky Bank-> Platba inkasem a vygenerujte a spravujte příkaz k inkasu. Když je příkaz k inkasu uzavřen, platby na fakturách budou automaticky zaznamenány a faktury uzavřeny, pokud je zbývající částka k platbě nulová. +DoCreditTransferBeforePayments=Tato karta umožňuje vyžádat si příkaz k úhradě. Po dokončení přejděte do nabídky Bank-> Platba převodem, abyste vygenerovali a spravovali příkaz k úhradě. Když je příkaz k úhradě uzavřen, bude automaticky zaznamenána platba na fakturách a faktury uzavřeny, pokud je zbývající částka k platbě nulová. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Nastavte na stav "Odeslaný soubor" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null +ThisWillAlsoAddPaymentOnInvoice=Zaznamenají se také platby na fakturách a klasifikují se jako „placené“, pokud je zbývající částka k zaplacení nulová StatisticsByLineStatus=Statistika podle stavu řádků RUM=UMR DateRUM=Povinné datum podpisu -RUMLong=Unikátní Mandát Referenční +RUMLong=Unikátní odkaz na mandát RUMWillBeGenerated=Pokud je prázdná, po uložení informací o bankovním účtu se vytvoří UMR (jedinečný mandátový odkaz). WithdrawMode=Režim přímé inkaso (FRST nebo opakovat) WithdrawRequestAmount=Množství přání inkasa -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Částka žádosti o převod: WithdrawRequestErrorNilAmount=Nelze vytvořit inkasa Žádost o prázdnou hodnotu. SepaMandate=Mandát přímého inkasa SEPA SepaMandateShort=SEPA Mandát PleaseReturnMandate=Prosím, vraťte tento mandát formulář poštou na adresu %s nebo poštou na adresu SEPALegalText=Podpisem tohoto mandátu formuláře opravňujete (A) %s zaslat instrukce do své banky, aby vrub vašeho účtu a (b) vaše banka k tíži účtu v souladu s pokyny od %s. Jako součást svých práv, máte nárok na vrácení peněz od banky v souladu s podmínkami a podmínkami vaší smlouvy se svou bankou. Náhrada musí být uplatněna nejpozději do 8 týdnů od data, kdy byl váš účet odepsána. Vaše práva týkající se výše uvedeného pověření jsou vysvětleny v prohlášení, které můžete získat od své banky. -CreditorIdentifier=věřitel Identifier +CreditorIdentifier=Identifikátor věřitele CreditorName=Název věřitele SEPAFillForm=(B) Vyplňte prosím všechna pole označená * SEPAFormYourName=Vaše jméno @@ -120,7 +123,8 @@ SEPAFormYourBIC=Váš identifikační kód banky (BIC) SEPAFrstOrRecur=Způsob platby ModeRECUR=Opakovaná platba ModeFRST=Jednorázová platba -PleaseCheckOne=Zkontrolujte prosím jen jeden +PleaseCheckOne=Zkontrolujte prosím pouze jednu +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Byla vytvořena objednávka inkasa %s AmountRequested=Požadovaná částka SEPARCUR=SEPA CUR @@ -131,7 +135,7 @@ ICS=Identifikátor věřitele CI END_TO_END="EndToEndId" SEPA XML tag - jedinečný identifikátor přiřazený ke každé transakci USTRD="Nestrukturovaná" značka SEPA XML ADDDAYS=Přidání dnů do data provedení -NoDefaultIBANFound=No default IBAN found for this third party +NoDefaultIBANFound=U tohoto subjektu nebyl nalezen žádný výchozí IBAN ### Notifications InfoCreditSubject=Placení inkasní příkaz k úhradě %s bankou InfoCreditMessage=Trvalý příkaz %s byl vyplacen bankou
    Údaje o platbě: %s @@ -141,3 +145,4 @@ InfoTransData=Částka: %s
    Metoda: %s
    Datum: %s InfoRejectSubject=Příkaz k inkasu odmítnut InfoRejectMessage=Dobrý den,

    příkaz k inkasu faktury %s týkající se společnosti %s, částkou %s, byla bankou odmítnuta.

    -
    %s ModeWarning=Volba pro reálný režim nebyl nastaven, můžeme zastavit tuto simulaci +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/cs_CZ/workflow.lang b/htdocs/langs/cs_CZ/workflow.lang index efd2eed1d14..3e06aed94aa 100644 --- a/htdocs/langs/cs_CZ/workflow.lang +++ b/htdocs/langs/cs_CZ/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Nastavení workflow modulu -WorkflowDesc=Tento modul je určen k úpravě chování automatických akcí, v aplikaci. Ve výchozím nastavení workflow je otevřen (uděláte něco, co chcete). Můžete aktivovat automatické akce, které jsou zajímavé. +WorkflowDesc=Tento modul poskytuje několik automatických akcí. Ve výchozím nastavení je pracovní postup otevřený (můžete dělat věci v pořadí, které chcete), ale zde můžete aktivovat některé automatické akce. ThereIsNoWorkflowToModify=Workflow zde není nastaven, můžete upravit modul pokud ho chcete aktivovat. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatické vytvoření objednávky prodeje po podpisu obchodního návrhu (nová objednávka bude mít stejnou částku jako návrh) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automaticky vytvořit zákaznickou fakturu po podpisu obchodního návrhu (nová faktura bude mít stejnou částku jako návrh) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automaticky vytvoří zákaznickou faktury poté, co smlouva byla ověřena -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automaticky vytvořit zákaznickou fakturu po uzavření prodejní objednávky (nová faktura bude mít stejnou částku jako objednávka) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Zařadit návrh propojeného zdroje jako fakturovaný, když je objednávka prodeje nastavena na fakturaci (a pokud je výše objednávky shodná s celkovou částkou podepsaného propojeného návrhu) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Zařadit návrh propojeného zdroje jako fakturovaný při potvrzení faktury zákazníka (a pokud je částka faktury shodná s celkovou částkou podepsaného propojeného návrhu) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Zařadit propojenou prodejní objednávku jako fakturovanou při ověření faktury zákazníka (a pokud je částka faktury shodná s celkovou částkou propojené objednávky) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Zařadit propojenou prodejní objednávku jako fakturovanou, když je zákaznická faktura nastavena jako zaplacená (a pokud je částka faktury shodná s celkovou částkou propojené objednávky) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klasifikujte propojenou prodejní objednávku dodávanou při ověření zásilky (a pokud je množství odeslané všemi zásilkami stejné jako v aktualizovaném pořadí) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Označte návrh dodavatele propojeného zdroje jako fakturovaný při validaci dodavatele (a pokud je částka faktury shodná s celkovou částkou propojeného návrhu) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Zařadit propojenou objednávku zdroje jako fakturovanou fakturaci dodavatele (a pokud je částka faktury shodná s celkovou částkou propojené objednávky) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatická tvorba AutomaticClassification=Automatická klasifikace diff --git a/htdocs/langs/cs_CZ/zapier.lang b/htdocs/langs/cs_CZ/zapier.lang index 406cc11f80d..605cf509252 100644 --- a/htdocs/langs/cs_CZ/zapier.lang +++ b/htdocs/langs/cs_CZ/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier pro Dolibarr modul # Admin page # ZapierForDolibarrSetup = Nastavení Zapieru pro Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/da_DK/accountancy.lang b/htdocs/langs/da_DK/accountancy.lang index 9952ccdde2a..b600c4805fe 100644 --- a/htdocs/langs/da_DK/accountancy.lang +++ b/htdocs/langs/da_DK/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Tillad at administrere forskellige antal nuller i slutnin BANK_DISABLE_DIRECT_INPUT=Deaktiver direkte registrering af transaktionen på bankkonto ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Aktivér udkast til eksport på Journal ACCOUNTANCY_COMBO_FOR_AUX=Aktivér kombinationsliste for subsidiær konto (kan være langsom, hvis du har en masse tredjeparter) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Salgskladde ACCOUNTING_PURCHASE_JOURNAL=Indkøbskladde @@ -284,6 +285,7 @@ ShowTutorial=Vis selvstudie NotReconciled=Ikke afstemt ## Admin +BindingOptions=Binding options ApplyMassCategories=Anvend massekategorier AddAccountFromBookKeepingWithNoCategories=Tilgængelig konto endnu ikke i den personaliserede gruppe CategoryDeleted=Kategori for regnskabskonto er blevet slettet diff --git a/htdocs/langs/da_DK/admin.lang b/htdocs/langs/da_DK/admin.lang index 21c89acd158..2d6fe963905 100644 --- a/htdocs/langs/da_DK/admin.lang +++ b/htdocs/langs/da_DK/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Standard afsender email til manuel afsendelse (Bruger UserEmail=Bruger e-mail CompanyEmail=Firma Email FeatureNotAvailableOnLinux=Funktionen ikke til rådighed på Unix-lignende systemer. Test din sendmail program lokalt. +FixOnTransifex=Fix oversættelsen på projektets online oversættelsesplatform SubmitTranslation=Hvis oversættelsen for dette sprog ikke er komplet, eller du finder fejl, kan du rette det ved at redigere filer i mappen langs / %s og indsende din ændring til www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Hvis oversættelsen for dette sprog ikke er færdigt, eller du finder fejl, kan du rette dette ved at redigere filer i mappen langs / %s og indsende ændrede filer på dolibarr.org/forum eller til udviklere på github.com/ Dolibarr / Dolibarr. +SubmitTranslationENUS=Hvis oversættelsen til dette sprog ikke er komplet, eller du finder fejl, kan du rette dette ved at redigere filer i bibliotek langs /%s og indsende ændrede filer på dolibarr.org/forum eller, hvis du er en udvikler, med en PR på github.com/ Dolibarr / Dolibarr ModuleSetup=Modulopsætning ModulesSetup=Moduler / Applikation sætop ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul %s skal være aktiveret, hvis du har brug SecurityToken=Nøglen til sikker URL'er NoSmsEngine=Ingen SMS afsender manager tilgængelig. En SMS-afsender manager er ikke installeret med standardfordelingen, fordi de afhænger af en ekstern leverandør, men du kan finde nogle på %s PDF=PDF -PDFDesc=Globale muligheder for PDF generation. -PDFAddressForging=Regler for adressekasser +PDFDesc=Globale muligheder for PDF generation +PDFAddressForging=Regler for adresse sektion HideAnyVATInformationOnPDF=Skjul alle oplysninger relateret til salgsafgift / moms PDFRulesForSalesTax=Regler for salgs moms PDFLocaltax=Regler for %s -HideLocalTaxOnPDF=Skjul %s sats i kolonne Skatteudsalg +HideLocalTaxOnPDF=Skjul %s sats i kolonnen Salgsmoms / moms HideDescOnPDF=Skjul produktbeskrivelse HideRefOnPDF=Skjul produkter ref. HideDetailsOnPDF=Skjul produktlinjer detaljer @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Rediger priser med basisreferenceværdi defineret på MassConvert=Start bulkkonvertering PriceFormatInCurrentLanguage=Prisformat på nuværende sprog String=String +String1Line=String (1 line) TextLong=Lang tekst +TextLongNLines=Long text (n lines) HtmlText=Html tekst Int=Heltal Float=Float @@ -543,9 +546,9 @@ Module54Desc=Forvaltning af kontrakter (tjenester eller tilbagevendende abonneme Module55Name=Stregkoder Module55Desc=Stregkoder administration Module56Name=Betaling med kreditoverførsel -Module56Desc=Håndtering af betaling af leverandører ved kredit overførsels ordrer. Det inkluderer generation af SEPA-filer til europæiske lande. -Module57Name=Bank Direkte Debit betalinger -Module57Desc=Forvaltning af ordrer med direkte debitering. Det omfatter generering af SEPA-fil for europæiske lande. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDial integration Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Opret/rediger ydelser Permission534=Slet ydelser Permission536=Se/administrer skjulte ydelser Permission538=Eksport af tjenesteydelser +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Læs regninger af materialer Permission651=Opret / opdater materialeregninger Permission652=Slet materialeregninger +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Læs donationer Permission702=Opret/rediger donationer Permission703=Slet donationer @@ -848,6 +858,8 @@ Permission773=Slet udgiftsrapporter Permission774=Læs alle udgiftsrapporter (selv for brugere, der ikke er underordnede) Permission775=Godkendelse af udgiftsrapporter Permission776=Betalingsomkostningsrapporter +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Eksportudgiftsrapporter Permission1001=Læs bestande Permission1002=Opret/rediger varehuse @@ -900,6 +912,7 @@ Permission2515=Opsæt dokumentdokumenter Permission2801=Brug FTP-klient i læsemodus (kun gennemse og download) Permission2802=Brug FTP-klient i skrivefunktion (slet eller upload filer) Permission3200=Læs arkiverede begivenheder og fingeraftryk +Permission3301=Generate new modules Permission4001=Se medarbejdere Permission4002=Opret medarbejdere Permission4003=Slet medarbejdere @@ -947,7 +960,8 @@ Permission63003=Slet ressourcer Permission63004=Link ressourcer til begivenheder i tidsplan DictionaryCompanyType=Tredjepartstyper DictionaryCompanyJuridicalType=Tredjeparts juridiske enheder -DictionaryProspectLevel=Kundepotentiale +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Stater / provinser DictionaryRegion=Regioner DictionaryCountry=Lande @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email skabeloner DictionaryUnits=Enheder DictionaryMeasuringUnits=Måleenheder DictionarySocialNetworks=Sociale netværk -DictionaryProspectStatus=Status på potentielle kunde +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Typer af orlov DictionaryOpportunityStatus=Ledestatus for projekt / bly DictionaryExpenseTaxCat=Udgiftsrapport - Transportkategorier @@ -1076,7 +1091,7 @@ LoginPage=Login side BackgroundImageLogin=Baggrundsbillede PermanentLeftSearchForm=Faste search form på venstre menu DefaultLanguage=Standard sprog -EnableMultilangInterface=Aktivér multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Vis firmaets logo i menuen CompanyInfo=Virksomhed/Organisation CompanyIds=Virksomhed / Organisations identiteter @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Et søgekriterium kræves i det mindste f NewTranslationStringToShow=Ny oversættelsestreng, der skal vises OriginalValueWas=Den oprindelige oversættelse overskrives. Oprindelig værdi var:

    %s TransKeyWithoutOriginalValue=Du har tvinget en ny oversættelse til oversættelsessnøglen ' %s ', der ikke findes i nogen sprogfiler -TotalNumberOfActivatedModules=Aktiveret applikation / moduler: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Du skal i det mindste aktivere 1 modul ClassNotFoundIntoPathWarning=Klasse %s ikke fundet i PHP-sti YesInSummer=Ja om sommeren @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Brug begivenhedstyper (styret i menuopsætning -> Ordbøge AGENDA_USE_EVENT_TYPE_DEFAULT=Indstil denne standardværdi automatisk for type begivenhed i begivenhedsoprettelsesformular AGENDA_DEFAULT_FILTER_TYPE=Indstil denne type begivenhed automatisk i søgefilter i dagsordblik AGENDA_DEFAULT_FILTER_STATUS=Indstil denne status automatisk for begivenheder i søgefilter i dagsordblik -AGENDA_DEFAULT_VIEW=Hvilket faneblad, der skal åbnes som standard, når menuen Tidsplan vælges +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Aktivér hændelsespåmindelse via e-mails (påmindelsesindstilling / forsinkelse kan defineres på hver hændelse). Bemærk: Modul %s skal være aktiveret og korrekt konfigureret for at få påmindelse sendt med den korrekte frekvens. AGENDA_REMINDER_BROWSER=Aktivér hændelsespåmindelse på brugerens browser (når hændelsesdatoen er nået, kan hver bruger nægte dette fra browserbekræftelsesspørgsmålet) AGENDA_REMINDER_BROWSER_SOUND=Aktivér lydmeddelelse @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Vis linkede objekter i tidsplanvisning ##### Clicktodial ##### ClickToDialSetup=Opsætning af Klik-for-at-ringe-modulet ClickToDialUrlDesc=Url kaldes, når man klikke på telefon billed. I URL kan du bruge tags
    __ PHONETO __ , der vil blive erstattet med telefonnummeret til den person, der skal ringe
    __ PHONEFROM __ , der vil blive erstattet med telefonnummeret til opkaldet person (din)
    __ LOGIN __ , der vil blive erstattet med clicktodial login (defineret på brugerkort)
    __ PASS __ , der vil blive erstattet med clicktodial adgangskode (defineret på bruger kort). -ClickToDialDesc=Dette modul gør telefonnumre til klikbare links. Et klik på ikonet vil få dit telefonopkald til nummeret. Dette kan bruges til at ringe til et callcenter-system fra Dolibarr, der f.eks. Kan ringe til telefonnummeret på et SIP-system. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Brug kun et link "tel:" på telefonnumre ClickToDialUseTelLinkDesc=Brug denne metode, hvis dine brugere har en softphone eller en software-grænseflade installeret på samme computer som browseren, og kaldes, når du klikker på et link i din browser, der starter med "tel:". Hvis du har brug for en fuld serverløsning (uden brug af lokal softwareinstallation), skal du indstille dette til "Nej" og udfylde næste felt. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Dette felt indeholder en reference til at identificere linje. Indta Enter0or1=Tryk 0 eller 1 UnicodeCurrency=Indtast her mellem seler, liste over byte nummer, der repræsenterer valutasymbolet. For eksempel: for $, indtast [36] - for Brasilien real R $ [82,36] - for €, indtast [8364] ColorFormat=RGB-farven er i HEX-format, fx: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Linjens placering i kombinationslister SellTaxRate=Salgsskattesats RecuperableOnly=Ja for moms "Ikke opfattet, men genoprettelig" dedikeret til nogle stater i Frankrig. Hold værdi til "Nej" i alle andre tilfælde. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Anmodning om citat MailToSendSupplierOrder=Indkøbsordre MailToSendSupplierInvoice=Leverandørfakturaer MailToSendContract=Kontrakter +MailToSendReception=Modtagelse MailToThirdparty=Tredjepart MailToMember=Medlemmer MailToUser=Brugere @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s er tilgængelig. Versi ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s er tilgængelig. Version %s er en vedligeholdelsesversion, der indeholder kun fejlrettelser. Vi anbefaler alle brugere at opgradere til denne version. En vedligeholdelsesfrigivelse introducerer ikke nye funktioner eller ændringer i databasen. Du kan hente den fra downloadområdet på https://www.dolibarr.org portal (underkatalog Stable versioner). Du kan læse ChangeLog for en komplet liste over ændringer. MultiPriceRuleDesc=Når valgmuligheden "Flere prisniveauer pr. Produkt / service" er aktiveret, kan du definere forskellige priser (et pr. Prisniveau) for hvert produkt. For at spare tid, kan du her angive en regel for at autokalulere en pris for hvert niveau baseret på prisen på første niveau, så du skal kun angive en pris for første niveau for hvert produkt. Denne side er designet til at spare dig tid, men er kun nyttig, hvis dine priser for hvert niveau er i forhold til første niveau. Du kan ignorere denne side i de fleste tilfælde. ModelModulesProduct=Skabeloner til produktdokumenter +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=For at kunne generere koder automatisk skal du først definere en manager for at definere stregkodenummeret automatisk. SeeSubstitutionVars=Se * note for liste over mulige substitutionsvariabler SeeChangeLog=Se ChangeLog-fil (kun engelsk) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Venstre margin på PDF MAIN_PDF_MARGIN_RIGHT=Højre margin på PDF MAIN_PDF_MARGIN_TOP=Top margin på PDF MAIN_PDF_MARGIN_BOTTOM=Bundmargen på PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Højde for logo på PDF NothingToSetup=Der kræves ingen specifik opsætning for dette modul. SetToYesIfGroupIsComputationOfOtherGroups=Indstil dette til ja, hvis denne gruppe er en beregning af andre grupper EnterCalculationRuleIfPreviousFieldIsYes=Indtast beregningsregel, hvis tidligere felt blev sat til Ja (For eksempel 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Intet gjort XEmailsDoneYActionsDone=%s e-mails kvalificerede, %s e-mails er behandlet (for %s-registrering / handlinger udført) RecordEvent=Optag email-begivenhed CreateLeadAndThirdParty=Opret ledelse (og tredjepart om nødvendigt) -CreateTicketAndThirdParty=Opret billet (og eventuelt tredjepart) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Antal e-mails i kildekataloget LoadThirdPartyFromName=Indlæs tredjeparts søgning på %s (kun belastning) LoadThirdPartyFromNameOrCreate=Indlæs tredjepartssøgning på %s (opret hvis ikke fundet) -WithDolTrackingID=Dolibarr Reference findes i meddelelses-ID -WithoutDolTrackingID=Dolibarr Reference findes ikke i meddelelses-ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Postnummer MainMenuCode=Menu indtastningskode (hovedmenu) ECMAutoTree=Vis automatisk ECM-træ @@ -1981,7 +2002,7 @@ ImportSetup=Opsætning af modul til import InstanceUniqueID=Forekomstets unikke ID SmallerThan=Mindre end LargerThan=Større end -IfTrackingIDFoundEventWillBeLinked=Bemærk, at hvis der findes et sporings-ID i indgående e-mail, vil begivenheden automatisk blive knyttet til de relaterede objekter. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Hvis du aktiverer valideringen af 2 trin med en GMail konto, anbefales det at oprette en dedikeret anden adgangskode til applikationen i stedet for at bruge dit eget kontos kodeord fra https://myaccount.google.com/. EmailCollectorTargetDir=Det kan være en ønsket opførsel at flytte e-mailen til et andet tag/bibliotek, når den blev behandlet med succes. Angiv blot navnet på kataloget her for at bruge denne funktion (Brug IKKE specialtegn i navnet). Bemærk, at du også skal bruge en læse/skrive logind konto. EmailCollectorLoadThirdPartyHelp=Du kan bruge denne handling til at bruge e-mail-indholdet til at finde og indlæse en eksisterende tredjepart i din database. Den fundne (eller oprettede) tredjepart bruges til følgende handlinger, der har brug for det. I parameterfeltet kan du bruge f.eks. 'UDTAGELSE: KROPP: Navn: \\ s ([^ \\ s] *)', hvis du vil udpakke navnet på tredjeparten fra en streng 'Navn: navn for at finde' fundet i legeme. @@ -2005,3 +2026,7 @@ RssNote=Bemærk: Hver RSS-feed-definition indeholder en widget, som du skal akti JumpToBoxes=Gå til Opsætning -> Widgets MeasuringUnitTypeDesc=Brug her en værdi som "størrelse", "overflade", "volumen", "vægt", "tid" MeasuringScaleDesc=Skalaen er antallet af steder, du skal flytte decimaldelen for at matche standardreferenceenheden. For "tid" -enhedstype er det antallet af sekunder. Værdier mellem 80 og 99 er reserverede værdier. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/da_DK/agenda.lang b/htdocs/langs/da_DK/agenda.lang index d825358e737..e9673610b68 100644 --- a/htdocs/langs/da_DK/agenda.lang +++ b/htdocs/langs/da_DK/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Antal begivenheder ListOfActions=Liste over begivenheder EventReports=Hændelsesrapporter Location=Placering -ToUserOfGroup=Til enhver bruger i gruppe +ToUserOfGroup=Begivenhed tildelt enhver bruger i gruppen EventOnFullDay=Begivenhed varer hele dagen MenuToDoActions=Alle udestående MenuDoneActions=Alle gennemførte @@ -86,6 +86,8 @@ ProposalDeleted=Forslag slettet OrderDeleted=Ordre slettet InvoiceDeleted=Faktura slettet DraftInvoiceDeleted=Udkast til faktura slettet +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Vare %s oprettet PRODUCT_MODIFYInDolibarr=Vare %s ændret PRODUCT_DELETEInDolibarr=Vare %s slettet @@ -158,3 +160,9 @@ DateStartPlusOne=Dato start + 1 time SetAllEventsToTodo=Indstil alle begivenheder til at gøre SetAllEventsToInProgress=Indstil alle begivenheder til at være i gang SetAllEventsToFinished=Indstil alle begivenheder til færdige +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/da_DK/banks.lang b/htdocs/langs/da_DK/banks.lang index 1fc45108615..81e842e525c 100644 --- a/htdocs/langs/da_DK/banks.lang +++ b/htdocs/langs/da_DK/banks.lang @@ -37,7 +37,7 @@ IbanValid=BAN gyldig IbanNotValid=BAN er ikke gyldigt StandingOrders="Direkte debit" ordre StandingOrder="Direkte debit" bestiling -PaymentByDirectDebit=Payment by direct debit +PaymentByDirectDebit=Betaling med direct debit PaymentByBankTransfers=Betalinger ved kreditoverførsel PaymentByBankTransfer=Betaling med kreditoverførsel AccountStatement=Kontoudtog diff --git a/htdocs/langs/da_DK/boxes.lang b/htdocs/langs/da_DK/boxes.lang index 4947d3f111b..1481c03b97f 100644 --- a/htdocs/langs/da_DK/boxes.lang +++ b/htdocs/langs/da_DK/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Leverandør Ordrer: senest %s ændret BoxTitleLastModifiedCustomerBills=Kundefakturaer: sidst %s ændret BoxTitleLastModifiedCustomerOrders=Salgsordrer: sidst %s ændret BoxTitleLastModifiedPropals=Seneste %s tilrettede tilbud +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Kundernes fakturaer ForCustomersOrders=Customers orders ForProposals=Tilbud @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Midlertidig konto er ikke defineret BoxLastCustomerShipments=Sidste kunde forsendelser BoxTitleLastCustomerShipments=Nyeste %s forsendelser kunde NoRecordedShipments=Ingen registreret kundeforsendelse +# Pages +AccountancyHome=Bogføring diff --git a/htdocs/langs/da_DK/cashdesk.lang b/htdocs/langs/da_DK/cashdesk.lang index 824c06fea82..bcba80e2087 100644 --- a/htdocs/langs/da_DK/cashdesk.lang +++ b/htdocs/langs/da_DK/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Modulet BasicPhoneLayout=Brug grundlæggende layout til telefoner SetupOfTerminalNotComplete=Opsætning af terminal %s er ikke afsluttet DirectPayment=Direkte betaling -DirectPaymentButton=Knap med direkte kontant betaling +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Fakturaen er allerede valideret NoLinesToBill=Ingen linjer til fakturering CustomReceipt=Tilpasset kvittering @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Eksternt modul med ekstra funktioner. Mulighed PrintMethod=Udskrivningsmetode ReceiptPrinterMethodDescription=Kraftig metode med en masse parametre. Fuld tilpasning med skabeloner. Kan ikke udskrive fra cloud. ByTerminal=Med terminal -TakeposNumpadUsePaymentIcon=Brug betalingsikonet på numerisktastatur +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Nummereringsmodul til POS-salg CashDeskGenericMaskCodes6 =
    {TN} tag bruges til at tilføje terminal nummere TakeposGroupSameProduct=Grupper sammen produktlinjer StartAParallelSale=Start et nyt parallelt salg -ControlCashOpening=Optæl kassen ved åbning af pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Luk kontantindhold CashReport=Kontantrapport MainPrinterToUse=Fortrukket printer til brug @@ -112,8 +112,13 @@ RestaurantMenu=Menu CustomerMenu=Kunde menu ScanToMenu=Scan QR-kode for at se menuen ScanToOrder=Scan QR-kode for at bestille -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +Appearance=Udseende +HideCategoryImages=Skjul Kategori billeder +HideProductImages=Skjul produktbilleder +NumberOfLinesToShow=Antal linjer af billeder, der skal vises +DefineTablePlan=Definer tabeller planlægger +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/da_DK/compta.lang b/htdocs/langs/da_DK/compta.lang index bc98ecb15b4..22641410445 100644 --- a/htdocs/langs/da_DK/compta.lang +++ b/htdocs/langs/da_DK/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Skat/afgift SocialContributions=Skatter/afgifter SocialContributionsDeductibles=Fradragsberettigede skatter/afgifter SocialContributionsNondeductibles=Ikke-fradragsberettigede skatter/afgifter +DateOfSocialContribution=Dato for social eller skattemæssig skat LabelContrib=Etiketbidrag TypeContrib=Type bidrag MenuSpecialExpenses=Særlige udgifter diff --git a/htdocs/langs/da_DK/contracts.lang b/htdocs/langs/da_DK/contracts.lang index c4130a2f644..346be77971c 100644 --- a/htdocs/langs/da_DK/contracts.lang +++ b/htdocs/langs/da_DK/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Kørsel tjenester MenuExpiredServices=Udløbet tjenester MenuClosedServices=Lukket tjenester NewContract=Ny kontrakt -NewContractSubscription=New contract/subscription +NewContractSubscription=Ny kontrakt eller abonnement AddContract=Create contract DeleteAContract=Slet en kontrakt ActivateAllOnContract=Aktivér alle tjenester diff --git a/htdocs/langs/da_DK/errors.lang b/htdocs/langs/da_DK/errors.lang index 92cc702a224..9306acbcee1 100644 --- a/htdocs/langs/da_DK/errors.lang +++ b/htdocs/langs/da_DK/errors.lang @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Dårlig syntax for leverandør kode ErrorSupplierCodeRequired=Leverandørkode kræves ErrorSupplierCodeAlreadyUsed=Leverandørkode allerede brugt ErrorBadParameters=Bad parametre -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Forkerte eller manglende parametre ErrorBadValueForParameter=Wrong value '%s' for parameter '%s' ErrorBadImageFormat=Image file has not a supported format (Your PHP does not support functions to convert images of this format) ErrorBadDateFormat=Værdi '%s' har forkert datoformat @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Forbindelse til database fejler. Check databaseserveren kører (for eksempel med mysql / mariadb kan du starte det fra kommandolinjen med 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=Datoen skal være før end i dag +ErrorDateMustBeInFuture=Datoen skal være efter dags dato ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Ikke tilstrækkelig mængde ErrorOnlyOneFieldForGroupByIsPossible=Kun 1 felt for 'Group by' er muligt (andre kasseres) ErrorTooManyDifferentValueForSelectedGroupBy=Fundet for mange forskellig værdi (mere end %s) til feltet '%s', så vi ikke kan bruge det som en 'gruppe af' for grafik. Feltet 'Gruppe Af' er blevet fjernet. Kan være du ønskede at bruge det som en X-akse? ErrorReplaceStringEmpty=Fejl, strengen, der skal erstattes til, er tom +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Din PHP-parameter upload_max_filesize (%s) er højere end PHP-parameter post_max_size (%s). Dette er ikke en ensartet opsætning. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/da_DK/languages.lang b/htdocs/langs/da_DK/languages.lang index ab6bd973969..9a8b424fdfe 100644 --- a/htdocs/langs/da_DK/languages.lang +++ b/htdocs/langs/da_DK/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=etiopiske Language_ar_AR=Arabisk Language_ar_EG=Arabisk (Egypten) Language_ar_SA=Arabisk +Language_az_AZ=Aserbajdsjansk Language_bn_BD=Bengali +Language_bn_IN=Bengali (Indien) Language_bg_BG=Bulgarsk Language_bs_BA=Bosnisk Language_ca_ES=Catalansk @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=Engelsk (Indien) Language_en_NZ=Engelsk (New Zealand) Language_en_SA=English (Saudi-Arabien) +Language_en_SG=Engelsk (Singapore) Language_en_US=Engelsk (USA) Language_en_ZA=Engelsk (Sydafrika) Language_es_ES=Spansk @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spansk (Guatemala) Language_es_HN=Spansk (Honduras) Language_es_MX=Spansk (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spansk (Paraguay) Language_es_PE=Spansk (Peru) Language_es_PR=Spansk (Puerto Rico) Language_es_UY=Spansk (Uruguay) +Language_es_GT=Spansk (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estisk Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Fransk (Belgien) Language_fr_CA=Fransk (Canada) Language_fr_CH=Fransk (Schweiz) +Language_fr_CI=Fransk (Cost Ivory) +Language_fr_CM=Fransk (Cameroun) Language_fr_FR=Fransk +Language_fr_GA=Fransk (Gabon) Language_fr_NC=Fransk (Ny Kaledonien) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=galicisk Language_he_IL=Hebræisk +Language_hi_IN=Hindi (Indien) Language_hr_HR=Kroatisk Language_hu_HU=Ungarsk Language_id_ID=Indonesian Language_is_IS=Islandsk Language_it_IT=Italiensk +Language_it_CH=Italiensk (Schweiz) Language_ja_JP=Japansk Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,8 +77,9 @@ Language_lv_LV=Lettisk Language_mk_MK=Makedonsk Language_mn_MN=Mongolian Language_nb_NO=Norsk (Bokmål) +Language_ne_NP=nepalesisk Language_nl_BE=Hollandsk (Belgien) -Language_nl_NL=Dutch +Language_nl_NL=Hollandske Language_pl_PL=Polsk Language_pt_BR=Portugisisk (Brasilien) Language_pt_PT=Portugisisk @@ -86,4 +100,5 @@ Language_uz_UZ=Usbekisk Language_vi_VN=Vietnamesisk Language_zh_CN=Kinesisk Language_zh_TW=Kinesisk (traditionelt) +Language_zh_HK=Kinesisk (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/da_DK/mails.lang b/htdocs/langs/da_DK/mails.lang index a2fcde474c6..bfd9b1dd5ea 100644 --- a/htdocs/langs/da_DK/mails.lang +++ b/htdocs/langs/da_DK/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Udgående e-mail opsætning (til modul%s) DefaultOutgoingEmailSetup=Standard udgående e-mail opsætning Information=Information ContactsWithThirdpartyFilter=Kontakter med tredjepart filter +Unanswered=Unanswered +Answered=Besvaret +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/da_DK/main.lang b/htdocs/langs/da_DK/main.lang index ccec15bd0f5..3ca6eed1fa6 100644 --- a/htdocs/langs/da_DK/main.lang +++ b/htdocs/langs/da_DK/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Brutto(Inkl.Moms) Amount=Beløb AmountInvoice=Fakturabeløbet AmountInvoiced=Beløb faktureres -AmountInvoicedHT=Faktureret beløb (inkl. Moms) -AmountInvoicedTTC=Faktureret beløb (ekskl. Moms) +AmountInvoicedHT=Faktureret beløb (ekskl. Moms) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Indbetalingsbeløb AmountHTShort=Beløb (ekskl.) AmountTTCShort=Beløb (inkl. moms) @@ -485,6 +485,7 @@ Categories=Tags/kategorier Category=Tags/kategori By=Ved From=Fra +FromDate=Fra FromLocation=Fra to=til To=til @@ -687,6 +688,7 @@ Method=Metode Receive=Modtag CompleteOrNoMoreReceptionExpected=Komplet eller intet mere at forvente ExpectedValue=Forventet værdi +ExpectedQty=Expected Qty PartialWoman=Delvis TotalWoman=I alt NeverReceived=Aldrig modtaget @@ -703,6 +705,7 @@ MenuECM=Dokumenter MenuAWStats=AWStats MenuMembers=Medlemmer MenuAgendaGoogle=Google dagsorden +MenuTaxesAndSpecialExpenses=Skatter | Særlige udgifter ThisLimitIsDefinedInSetup=Dolibarr grænse (Menu hjemme-setup-sikkerhed): %s Kb, PHP grænse: %s Kb NoFileFound=Ingen dokumenter gemt i denne mappe CurrentUserLanguage=Valgt sprog @@ -725,7 +728,7 @@ Page=Side Notes=Noter AddNewLine=Tilføj ny linje AddFile=Tilføj fil -FreeZone=Ingen registrerede varer/ydelser +FreeZone=Fritekst produkt FreeLineOfType=Fritekst artikel, type: CloneMainAttributes=Klon formål med sine vigtigste attributter ReGeneratePDF=Re-generer PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=L ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Vælg en Email-skabelon SetRef=Sæt ref. Select2ResultFoundUseArrows=Nogle resultater fundet. Brug pilene til at vælge. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Skift i redigeringsfunktion for at tilføje ove NotUsedForThisCustomer=Ikke brugt til denne kunde AmountMustBePositive=Beløbet skal være positivt ByStatus=Efter status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/da_DK/members.lang b/htdocs/langs/da_DK/members.lang index 3bd92cbd594..13cf5a491bc 100644 --- a/htdocs/langs/da_DK/members.lang +++ b/htdocs/langs/da_DK/members.lang @@ -81,7 +81,7 @@ DeleteType=Slet VoteAllowed=Afstemning tilladt Physical=Fysisk Moral=Moral -MorPhy=Moralske / Fysisk +MorPhy=Natur Reenable=Genaktivere ResiliateMember=Afslut en medlem ConfirmResiliateMember=Er du sikker på at du vil opsige denne medlem? diff --git a/htdocs/langs/da_DK/mrp.lang b/htdocs/langs/da_DK/mrp.lang index fb16840d5aa..f9474dbaaf5 100644 --- a/htdocs/langs/da_DK/mrp.lang +++ b/htdocs/langs/da_DK/mrp.lang @@ -1,5 +1,6 @@ Mrp=Fremstillingsordrer MO=Fremstillingsordre +MOs=Manufacturing orders MRPDescription=Modul til styring af produktions- og produktionsordrer (MO). MRPArea=MRP-område MrpSetupPage=Opsætning af modul MRP diff --git a/htdocs/langs/da_DK/other.lang b/htdocs/langs/da_DK/other.lang index d4108e1bf13..31fb1453cd4 100644 --- a/htdocs/langs/da_DK/other.lang +++ b/htdocs/langs/da_DK/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nDu kan finde vores ordre _ PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nVedlagt faktura __REF__ vedhæftet\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nFind forsendelse __REF__ vedhæftet\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nFind intervention __REF__ vedhæftet\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hej)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hej)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hej)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Du kan klikke på linket herunder for at foretage din betaling, hvis den ikke allerede er færdig.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hej)__\n\n\n__ (Sincerely) __\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr er en kompakt ERP / CRM, der understøtter flere forretningsmoduler. En demo, der viser alle moduler, giver ingen mening, da dette scenario aldrig forekommer (flere hundrede tilgængelige). Så flere demo profiler er tilgængelige. ChooseYourDemoProfil=Vælg den demoprofil, der passer bedst til dine behov ... ChooseYourDemoProfilMore=... eller bygg din egen profil
    (manuel modulvalg) @@ -280,7 +278,9 @@ LinesToImport=Linjer at importere MemoryUsage=Brug af hukommelse RequestDuration=Anmodningens varighed +ProductsPerPopularity=Products/Services by popularity PopuProp=Produkter/tjenester efter popularitet i forslag PopuCom=Produkter/tjenester efter popularitet i ordrer ProductStatistics=Produkter / services statistik NbOfQtyInOrders=Antal i ordrer +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/da_DK/products.lang b/htdocs/langs/da_DK/products.lang index 91863253ba2..9a5409b6002 100644 --- a/htdocs/langs/da_DK/products.lang +++ b/htdocs/langs/da_DK/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Vælg stregkodetype BarcodeValue=Stregkodeværdi NoteNotVisibleOnBill=Note (ikke synlig på fakturaer, tilbud ...) ServiceLimitedDuration=Hvis varen er en ydelse med begrænset varighed: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Flere prissegmenter pr. Produkt / service (hver kunde er i et prissegment) MultiPricesNumPrices=Antal priser DefaultPriceType=Prisgrundlag pr. Standard (med eller uden skat) ved tilføjelse af nye salgspriser @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Sælgerpriser (af produkter eller tjenester) CustomCode=Told / vare / HS-kode CountryOrigin=Oprindelsesland Nature=Produktets art (materiale / færdig) +NatureOfProductShort=Produktets art +NatureOfProductDesc=Råmateriale eller færdigt produkt ShortLabel=Kort etiket Unit=Enhed p=u. @@ -359,6 +362,9 @@ SelectCombination=Vælg kombination ProductCombinationGenerator=Varianter generator Features=Funktioner PriceImpact=Prispåvirkning +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Vægtpåvirkning NewProductAttribute=Ny attribut NewProductAttributeValue=Ny attributværdi diff --git a/htdocs/langs/da_DK/projects.lang b/htdocs/langs/da_DK/projects.lang index 645fe6db7bc..b0bac561043 100644 --- a/htdocs/langs/da_DK/projects.lang +++ b/htdocs/langs/da_DK/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Bidragyder TypeContact_project_task_external_TASKCONTRIBUTOR=Bidragyder SelectElement=Vælg element AddElement=Link til element +LinkToElementShort=Link til # Documents models DocumentModelBeluga=Projektdokumentskabelon for oversigt over objekter DocumentModelBaleine=Projektdokumentskabelon til opgaver @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Antal oprettet projekter pr. Måned ProjectNbTaskByMonth=Antal oprettet opgaver efter måned ProjectOppAmountOfProjectsByMonth=Mængden af ​​kundeemner pr. Måned ProjectWeightedOppAmountOfProjectsByMonth=Vægtet antal kundeemner pr. Måned -ProjectOpenedProjectByOppStatus=Åbn projekt / bly med blystatus -ProjectsStatistics=Statistik over projekter / ledere -TasksStatistics=Statistik over projekt / hovedopgaver +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Opgave tildelt. Indtastning af tid på denne opgave skal være muligt. IdTaskTime=Id opgave tid YouCanCompleteRef=Hvis du ønsker at afslutte ref med et eller flere suffiks, anbefales det at tilføje et - tegn for at adskille det, så den automatiske nummerering stadig fungerer korrekt til næste projekter. For eksempel %s-MYSUFFIX diff --git a/htdocs/langs/da_DK/recruitment.lang b/htdocs/langs/da_DK/recruitment.lang new file mode 100644 index 00000000000..c17570af6f4 --- /dev/null +++ b/htdocs/langs/da_DK/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Rekruttering +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Administrer og følg rekrutteringskampagner til nye stillinger + +# +# Admin page +# +RecruitmentSetup = Rekrutteringsopsætning +Settings = Indstillinger +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Rekrutteringsområde +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Om +RecruitmentAbout = Om rekruttering +RecruitmentAboutPage = Rekruttering om side +NbOfEmployeesExpected=Forventet nb af medarbejdere +JobLabel=Mærkning af jobposition +WorkPlace=Arbejdsplads +DateExpected=Forventet dato +FutureManager=Fremtidig leder +ResponsibleOfRecruitement=Ansættelsesansvarlig +IfJobIsLocatedAtAPartner=Hvis jobbet er placeret på en partner sted +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/da_DK/stocks.lang b/htdocs/langs/da_DK/stocks.lang index 04226ca8ff6..b2db5f656a3 100644 --- a/htdocs/langs/da_DK/stocks.lang +++ b/htdocs/langs/da_DK/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Annuller afsendelse DeleteSending=Slet afsendelse Stock=Lager Stocks=Lagre -MissingStocks=Missing stocks -StockAtDate=Lager på dato -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Manglende lagre +StockAtDate=Lagrene på dato +StockAtDateInPast=Over dato +StockAtDateInFuture=Dato i fremtiden StocksByLotSerial=Lagerført efter parti/seriel LotSerial=Parti/Serienr LotSerialList=Liste over partier/seriernr. @@ -34,7 +34,7 @@ StockMovementForId=Bevægelses-id %d ListMouvementStockProject=Liste over lagerbevægelser forbundet med projektet StocksArea=Pakhuse AllWarehouses=Alle lagre -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock=Medtag også udefineret ønsket lager IncludeAlsoDraftOrders=Medtag også udkast til ordrer Location=Placering LocationSummary=Kort placerings navn @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Fysisk / reel materiel er den aktuel lager i lageret. RealStockWillAutomaticallyWhen=Den reelle bestand ændres i henhold til denne regel (som defineret i Aktiemodulet): VirtualStock=Virtual lager -VirtualStockDesc=Virtuelt lager er det beregnede lager, der er tilgængeligt, når alle åbne / afventende handlinger (som påvirker lagrene) er lukket (modtagne ordreordrer, salgsordrer sendt osv.) +VirtualStockAtDate=Virtuelt lager på dato +VirtualStockAtDateDesc=Virtuelt lager, når alle ventende ordrer, der er planlagt udført før datoen, er afsluttet +VirtualStockDesc=Virtuelt lager er det beregnede lager, der er tilgængeligt, når alle åbne / afventende handlinger (som påvirker lagrene) er lukket (modtagne indkøbsordrer, salgsordrer, produktionsordrer produceret osv.) IdWarehouse=Lager ID DescWareHouse=Beskrivelse lager LieuWareHouse=Lager placering WarehousesAndProducts=Varelagre og varer WarehousesAndProductsBatchDetail=Lager og produkter (med detaljer pr. Lot / serie) -AverageUnitPricePMPShort=Gennemsnitlig input pris -AverageUnitPricePMP=Gennemsnitlig input pris +AverageUnitPricePMPShort=Værdi +AverageUnitPricePMPDesc=Den gennemsnitlige input-enhedspris, vi var nødt til at betale til leverandører for at få produktet i vores lager. SellPriceMin=Salgsenhed Pris EstimatedStockValueSellShort=Værdi for salg EstimatedStockValueSell=Værdi for salg @@ -130,7 +132,7 @@ CurentlyUsingPhysicalStock=Fysiske lager RuleForStockReplenishment=Regel for lageropfyldning SelectProductWithNotNullQty=Vælg mindst et produkt med et antal ikke nul og en leverandør AlertOnly= Kun advarsler -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Medtag også negativt lager for produkter uden defineret ønsket mængde for at gendanne dem til 0 WarehouseForStockDecrease=Lageret %s vil blive brugt til lagernedgang WarehouseForStockIncrease=Lageret %s vil blive brugt til lagerforhøjelse ForThisWarehouse=Til dette lager @@ -141,7 +143,7 @@ Replenishments=genopfyldninger NbOfProductBeforePeriod=Mængde af produkt %s på lager inden valgt periode (<%s) NbOfProductAfterPeriod=Mængde af produkt %s på lager efter valgt periode (> %s) MassMovement=Massebehandling -SelectProductInAndOutWareHouse=Vælg et produkt, en mængde, et kildelager og et mållager, og klik derefter på "%s". Når dette er gjort for alle nødvendige bevægelser, skal du klikke på "%s". +SelectProductInAndOutWareHouse=Vælg et kildelager og et mållager, et produkt og en mængde, og klik derefter på "%s". Når dette er gjort for alle nødvendige bevægelser, skal du klikke på "%s". RecordMovement=Optag overførsel ReceivingForSameOrder=Kvitteringer for denne ordre StockMovementRecorded=Aktiebevægelser registreret @@ -234,4 +236,7 @@ ForceTo=Tving til AlwaysShowFullArbo=Vis hele træets lagertrin ved pop op af warehouse-links (Advarsel: Dette kan mindske ydeevne dramatisk) StockAtDatePastDesc=Du kan her se aktien (ægte aktier) på en given dato i fortiden StockAtDateFutureDesc=Du kan her se bestanden (virtuel bestand) på en given dato fremover -CurrentStock=Current stock +CurrentStock=Aktuel lager +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/da_DK/suppliers.lang b/htdocs/langs/da_DK/suppliers.lang index 955fae6de5c..8a16ebe031f 100644 --- a/htdocs/langs/da_DK/suppliers.lang +++ b/htdocs/langs/da_DK/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Lav kvalitet ReputationForThisProduct=Omdømme BuyerName=Navn på køber AllProductServicePrices=Alle produkt- / servicepriser -AllProductReferencesOfSupplier=Alle produkt / servicereferencer hos leverandøren +AllProductReferencesOfSupplier=Alle henvisninger til leverandør BuyingPriceNumShort=Leverandørpriser diff --git a/htdocs/langs/da_DK/ticket.lang b/htdocs/langs/da_DK/ticket.lang index f45b737fe9f..9bc8f5b81c7 100644 --- a/htdocs/langs/da_DK/ticket.lang +++ b/htdocs/langs/da_DK/ticket.lang @@ -72,7 +72,6 @@ Deleted=Slettet # Dict Type=Type -Category=Analytisk kode Severity=Alvorlighed # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Tildel automatisk brugeren, der oprettede opgaven TicketsAutoAssignTicketHelp=Når du opretter en opgave, kan brugeren automatisk tildeles opgaven. TicketNumberingModules=Opgave nummerering modul TicketNotifyTiersAtCreation=Underret tredjepart ved oprettelsen -TicketGroup=Gruppe TicketsDisableCustomerEmail=Deaktiver altid Emails, når en opgave oprettes fra den offentlige grænseflade TicketsPublicNotificationNewMessage=Send e-mail (s), når en ny besked tilføjes TicketsPublicNotificationNewMessageHelp=Send e-mail (s), når en ny meddelelse tilføjes fra den offentlige grænseflade (til den tildelte bruger eller meddelelses-e-mailen til (opdatering) og / eller meddelelses-e-mailen til) @@ -162,7 +160,7 @@ CreatedBy=Lavet af NewTicket=Ny opgave SubjectAnswerToTicket=Opgave svar TicketTypeRequest=Anmodningstype -TicketCategory=Analytisk kode +TicketCategory=Gruppe SeeTicket=Se opgave TicketMarkedAsRead=Opgaven er blevet markeret som læst TicketReadOn=Læs videre diff --git a/htdocs/langs/da_DK/users.lang b/htdocs/langs/da_DK/users.lang index 60ddd269457..88f93206be6 100644 --- a/htdocs/langs/da_DK/users.lang +++ b/htdocs/langs/da_DK/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Deaktiveret i vedligeholdelsestilstand UserAccountancyCode=Regnskabskode for bruger UserLogoff=Bruger logout UserLogged=Bruger logget +DateOfEmployment=Ansættelsesdato DateEmployment=Ansættelsesstartdato DateEmploymentEnd=Ansættelses slutdato CantDisableYourself=Du kan ikke deaktivere din egen brugerpost @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Tving orlov anmodning validator ValidatorIsSupervisorByDefault=Som standard validatoren er supervisor for brugeren. Hold tom for at bevare denne opførsel. UserPersonalEmail=Personlig e-mail UserPersonalMobile=Personlig mobiltelefon +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/da_DK/withdrawals.lang b/htdocs/langs/da_DK/withdrawals.lang index 20d2be9829f..0ae1c22b6f9 100644 --- a/htdocs/langs/da_DK/withdrawals.lang +++ b/htdocs/langs/da_DK/withdrawals.lang @@ -10,8 +10,8 @@ PaymentByBankTransferReceipts=Kredit overførsels ordrer PaymentByBankTransferLines=kredit overførsels ordrer Linjer WithdrawalsReceipts=Direkte debitordre WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order +BankTransferReceipts=Kredit overførsels ordrer +BankTransferReceipt=Kredit overførsels ordre LatestBankTransferReceipts=Seneste %s kredit overførsels ordrer LastWithdrawalReceipts=Seneste %s direkte debit-filer WithdrawalsLine=Linje med direkte debitering @@ -63,7 +63,9 @@ InvoiceRefused=Faktura nægtet (Oplad afvisningen til kunden) StatusDebitCredit=Status debet / kredit StatusWaiting=Venter StatusTrans=Transmitteret +StatusDebited=Debited StatusCredited=Krediteres +StatusPaid=Betalt StatusRefused=Afviste StatusMotif0=Uspecificeret StatusMotif1=Levering insuffisante @@ -77,13 +79,13 @@ StatusMotif8=Andre grunde CreateForSepaFRST=Opret direkte debit fil (SEPA FRST) CreateForSepaRCUR=Opret direkte debitering fil (SEPA RCUR) CreateAll=Opret direkte debitfil (alle) -CreateFileForPaymentByBankTransfer=Opret kreditoverførsel (alle) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Opret kreditoverførselsfil (SEPA) CreateGuichet=Kun kontor CreateBanque=Kun bank OrderWaiting=Venter på behandling -NotifyTransmision=Tilbagetrækning Transmission -NotifyCredit=Tilbagetrækning Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Antal WithBankUsingRIB=For bankkonti ved hjælp af RIB WithBankUsingBANBIC=For bankkonti ved hjælp af IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Kredit på WithdrawalFileNotCapable=Kan ikke generere tilbagekøbskvitteringsfil for dit land %s (Dit land understøttes ikke) ShowWithdraw=Vis direkte debiteringsordre IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Hvis fakturaen dog har mindst en betalingsordre til direkte debitering, der endnu ikke er behandlet, indstilles den ikke til at blive betalt for at tillade forudgående udtræksstyring. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Udtagelsesfil +DoStandingOrdersBeforePayments=Denne fane giver dig mulighed for at anmode om en betalingsordre med direkte debitering. Når det er gjort, skal du gå til menuen Bank-> Betaling med direkte debet for at generere og administrere direkte debetordre. Når ordre med direkte debitering lukkes, registreres betaling på fakturaer automatisk, og fakturaer lukkes, hvis resten til betaling er null. +DoCreditTransferBeforePayments=Denne fane giver dig mulighed for at anmode om en kredit overførselsordre. Når det er gjort, skal du gå til menuen Bank-> Betaling med kreditoverførsel for at generere og administrere kredit overførselsordren. Når pengeoverførsel er lukket, vil betaling på fakturaer oplysninger registreres automatisk, og fakturaer lukkes, hvis resten til løn er nul.\n  +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Sæt til status "Fil sendt" ThisWillAlsoAddPaymentOnInvoice=Dette registrerer også betalinger på fakturaer og klassificerer dem som "Betalt", hvis resterende betaling er null StatisticsByLineStatus=Statistikker efter status af linjer @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Betalings type ModeRECUR=Tilbagevendende betaling ModeFRST=Engangsbetaling PleaseCheckOne=Tjek venligst kun en +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direkte debitering %s oprettet AmountRequested=Beløb anmodet SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Beløb: %s
    Methodology: %s
    Dato: %s InfoRejectSubject=Betalingsordren afvises InfoRejectMessage=Hej,

    Betalingsordre for faktura %s relateret til firmaet %s, med et beløb på %s er blevet afvist af banken.



    %s ModeWarning=Mulighed for real mode ikke var indstillet, vi stopper efter denne simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/da_DK/workflow.lang b/htdocs/langs/da_DK/workflow.lang index 1da27b225ad..a9659eb77ee 100644 --- a/htdocs/langs/da_DK/workflow.lang +++ b/htdocs/langs/da_DK/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klassificer den tilknyttede kildes # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Klassificer tilsluttet kildeleverandørforslag som faktureret, når leverandørfakturaen er bekræftet (og hvis fakturaens størrelse er det samme som det samlede beløb for det linkede forslag) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klassificer købt købsordre med kilden som faktureret, når leverandørfakturaen er bekræftet (og hvis fakturaens størrelse er den samme som det samlede beløb for den tilknyttede ordre) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatisk oprettelse AutomaticClassification=Automatisk klassificering diff --git a/htdocs/langs/da_DK/zapier.lang b/htdocs/langs/da_DK/zapier.lang index 81c99c875b9..27884d7005a 100644 --- a/htdocs/langs/da_DK/zapier.lang +++ b/htdocs/langs/da_DK/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier til Dolibarr-modul # Admin page # ZapierForDolibarrSetup = Opsætning af Zapier til Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/de_AT/admin.lang b/htdocs/langs/de_AT/admin.lang index 3c086bfecd7..1e86ef15672 100644 --- a/htdocs/langs/de_AT/admin.lang +++ b/htdocs/langs/de_AT/admin.lang @@ -152,7 +152,6 @@ MailToSendShipment=Sendungen MailToSendIntervention=Eingriffe OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. MAIN_OPTIMIZEFORCOLORBLINDDesc=Aktiviere diese Option wenn Sie Farbenblind sind, in machen Fällen wird die Farbeinstellung geändert um den Kontrast zu erhöhen. -IfTrackingIDFoundEventWillBeLinked=Beachten Sie, dass das Ereignis automatisch mit den zugehörigen Objekten verknüpft wird, wenn in der eingehenden E-Mail eine Tracking-ID gefunden wird. WithGMailYouCanCreateADedicatedPassword=Wenn Sie bei einem GMail-Konto die Überprüfung in zwei Schritten aktiviert haben, wird empfohlen, ein dediziertes zweites Kennwort für die Anwendung zu erstellen, anstatt Ihr eigenes Kontokennwort von https://myaccount.google.com/ zu verwenden. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. EndPointFor=Endpunkt für %s: %s diff --git a/htdocs/langs/de_AT/main.lang b/htdocs/langs/de_AT/main.lang index 545ae518ec7..124392e3512 100644 --- a/htdocs/langs/de_AT/main.lang +++ b/htdocs/langs/de_AT/main.lang @@ -19,7 +19,6 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias NoRecordFound=Kein Eintrag gefunden NoRecordDeleted=Kein Eintrag gelöscht NoError=Kein Fehler diff --git a/htdocs/langs/de_AT/members.lang b/htdocs/langs/de_AT/members.lang index fbbc8af7928..6686b3d49f0 100644 --- a/htdocs/langs/de_AT/members.lang +++ b/htdocs/langs/de_AT/members.lang @@ -16,6 +16,5 @@ SubscriptionLate=Versätet NewMemberType=Neues Mitgliedsrt Physical=Physisch Moral=Rechtlich -MorPhy=Physisch/Rechtlich Filehtpasswd=htpasswd-Datei HTPasswordExport=htpassword-Dateierstellung diff --git a/htdocs/langs/de_AT/projects.lang b/htdocs/langs/de_AT/projects.lang index febb477ca2a..0b737b1d55e 100644 --- a/htdocs/langs/de_AT/projects.lang +++ b/htdocs/langs/de_AT/projects.lang @@ -12,3 +12,4 @@ ProjectContact=Projektansprechpartner DoNotShowMyTasksOnly=Zeige auch die Aufgaben Anderer TypeContact_project_task_internal_TASKEXECUTIVE=Task Exekutive TypeContact_project_task_external_TASKEXECUTIVE=Task Exekutive +LinkToElementShort=Verknüpfen mit... diff --git a/htdocs/langs/de_AT/propal.lang b/htdocs/langs/de_AT/propal.lang index 56b3659b888..c96a462a74a 100644 --- a/htdocs/langs/de_AT/propal.lang +++ b/htdocs/langs/de_AT/propal.lang @@ -1,7 +1,6 @@ # Dolibarr language file - Source file is en_US - propal PropalsDraft=Entwurf PropalStatusSigned=Unterzeichnet (auf Rechnung) -PropalStatusClosedShort=geschlossen RefProposal=Angebots Nr. DatePropal=Datum des Angebots DateEndPropal=Ablauf der Bindefrist diff --git a/htdocs/langs/de_AT/stocks.lang b/htdocs/langs/de_AT/stocks.lang index 1ce29517677..4ca91729c42 100644 --- a/htdocs/langs/de_AT/stocks.lang +++ b/htdocs/langs/de_AT/stocks.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - stocks Location=Ort PMPValue=Warenwert +AverageUnitPricePMPShort=Warenwert diff --git a/htdocs/langs/de_CH/admin.lang b/htdocs/langs/de_CH/admin.lang index ae4d1317412..07ca78d80ee 100644 --- a/htdocs/langs/de_CH/admin.lang +++ b/htdocs/langs/de_CH/admin.lang @@ -160,7 +160,6 @@ MAIN_MAIL_DEFAULT_FROMTYPE=E-Mail - Absender für manuell erzeugte Nachrichten ( UserEmail=Email des Benutzers CompanyEmail=Firmen - E-Mailadresse SubmitTranslation=Du hast Übersetzungsfehler gefunden? Hilf uns, indem du die Sprachdateien im Verzeichnis 'langs/%s' anpasst und die Verbesserungen auf "www.transifex.com/dolibarr-association/dolibarr/" einreichst. -SubmitTranslationENUS=Sollte die Übersetzung für eine Sprache nicht vollständig sein oder Fehler beinhalten, können Sie die entsprechenden Sprachdateien im Verzeichnis langs/%s bearbeiten und anschliessend Ihre Änderungen an dolibarr.org/forum oder für Entwickler auf github.com/Dolibarr/dolibarr. übertragen. ModulesSetup=Modul-/Applikationseinstellung ModuleFamilySrm=Lieferantenbeziehungsmanagement (VRM) ModuleFamilyProducts=Produktmanagement (PM) @@ -202,11 +201,8 @@ ThisForceAlsoTheme=Dieser Menu Manager übersteuert die Benutzereinstellung. Er ConnectionTimeout=Zeitüberschreitung in der Verbindung ResponseTimeout=Antwort Timeout NoSmsEngine=Es ist kein SMS Sendedienst verfügbar.\nIn der Standardinstallation ist keiner installiert, denn das gibt es bei externen Anbietern.\nFinde deinen Anbieter via %s. -PDFDesc=Globale Einstellungen für automatisch generierte PDFs -PDFAddressForging=Regeln für Adressfelder HideAnyVATInformationOnPDF=Verstecke MWST - Informationen. PDFRulesForSalesTax=Regeln für die MWST -HideLocalTaxOnPDF=Verstecke den %s Satz HideDescOnPDF=Verstecke Produktbeschreibungen HideRefOnPDF=Verstecke Produktnummern HideDetailsOnPDF=Verstecke Produktzeilen @@ -281,7 +277,6 @@ Module50Desc=Produkteverwaltung Module52Name=Produktbestände Module53Desc=Dienstleistungen Module54Name=Verträge/Abonnements -Module57Name=Debit - Zahlungen Module70Name=Arbeitseinsätze Module80Name=Auslieferungen Module80Desc=Versand und Lieferverfolgung @@ -392,7 +387,6 @@ Permission2414=Aktionen und Aufgaben anderer exportieren Permission59002=Gewinspanne definieren DictionaryCompanyType=Geschäftspartner Typen DictionaryCompanyJuridicalType=Rechtsformen von Unternehmen -DictionaryProspectLevel=Lead-Potenzial DictionaryActions=Arten von Kalenderereignissen DictionaryVAT=MwSt.-Sätze DictionaryPaperFormat=Papierformate @@ -525,6 +519,7 @@ TypeOfTemplate=Type der Vorlage MailToSendProposal=Angebote Kunde MailToSendOrder=Kundenbestellungen MailToSendIntervention=Arbeitseinsätze +MailToSendReception=Lieferungen MailToThirdparty=Geschäftspartner ModelModulesProduct=Vorlage für Produktdokumente SeeSubstitutionVars=Siehe * für eine Liste der Verfügbaren Variablen diff --git a/htdocs/langs/de_CH/agenda.lang b/htdocs/langs/de_CH/agenda.lang index a3b8a81a70b..69537fa3a04 100644 --- a/htdocs/langs/de_CH/agenda.lang +++ b/htdocs/langs/de_CH/agenda.lang @@ -1,9 +1,10 @@ # Dolibarr language file - Source file is en_US - agenda +IdAgenda=ID Veranstaltung Agenda=Terminplanung EventReports=Ereignisberichte -ToUserOfGroup=Für alle Benutzer in der Gruppe MenuDoneActions=Alle abgeschl. Termine MenuDoneMyActions=Meine abgeschl. Termine +ActionsAskedBy=Termine eingetragen von ViewCal=Kalenderansicht ViewPerUser=Benutzeransicht ViewPerType=Ansicht pro Typ @@ -12,6 +13,8 @@ AgendaSetupOtherDesc=Hier gibst Du die Exportoptionen zu externen Kalendern, wie EventRemindersByEmailNotEnabled=Benachrichtigungen sind in den Moduleinstellungen deaktiviert (%s). NewCompanyToDolibarr=Partner %s erzeugt COMPANY_DELETEInDolibarr=Partner %s gelöscht. +PropalValidatedInDolibarr=Angebot freigegeben +InvoiceValidatedInDolibarr=Rechnung freigegeben MemberModifiedInDolibarr=Mitglied %s bearbeitet MemberResiliatedInDolibarr=Mitlglied %s geschlossen. MemberSubscriptionAddedInDolibarr=Abonnement %s für Mitlglied %s hinzugefügt @@ -21,7 +24,12 @@ ShipmentClassifyClosedInDolibarr=Lieferung %s auf verrechnet gesetzt ShipmentUnClassifyCloseddInDolibarr=Lieferung %s auf wiedereröffnet gesetzt ShipmentBackToDraftInDolibarr=Lieferung %s ist wieder im Entwurfsstatus. OrderCreatedInDolibarr=Bestellung %s erzeugt +OrderDeliveredInDolibarr=Bestellung %s als geliefert markieren OrderCanceledInDolibarr=Auftrag storniert %s +OrderBilledInDolibarr=Bestellung %s als bezahlt markieren +OrderApprovedInDolibarr=Bestellen %s genehmigt +OrderRefusedInDolibarr=Bestellung %s abgelehnt +OrderBackToDraftInDolibarr=Bestellen %s zurück nach Draft-Status ProposalSentByEMail=Offerte %s per E-Mail versandt ContractSentByEMail=Contract %s per E-Mail versandt OrderSentByEMail=Bestellung %sper E-Mail versandt @@ -30,6 +38,7 @@ SupplierOrderSentByEMail=Lieferantenbestellung %sper E-Mail versandt ORDER_SUPPLIER_DELETEInDolibarr=Lieferantenbestellung %s gelöscht SupplierInvoiceSentByEMail=Lieferantenrechnung %sper E-Mail versandt ShippingSentByEMail=Lieferung %s per E-Mail versandt +OrderDeleted=Bestellung gelöscht PRODUCT_CREATEInDolibarr=Produkt %s erzeugt PRODUCT_MODIFYInDolibarr=Produkt %s bearbeitet HOLIDAY_CREATEInDolibarr=Ferienantrag %s erzeugt @@ -55,12 +64,16 @@ MRP_MO_VALIDATEInDolibarr=Arbeitsauftrag (MO) genehmigt MRP_MO_PRODUCEDInDolibarr=Arbeitsauftrag (MO) fertig gestellt. MRP_MO_DELETEInDolibarr=Arbeitsauftrag (MO) gelöscht AgendaModelModule=Vorlagen zum Ereignis +DateActionEnd=Endet AgendaUrlOptionsNotAdmin=logina=!%s ,zum Aktionen, die nicht vom Benutzer %s sind, anzuzeigen. AgendaUrlOptions4=logint=%s ,um Einträge für dem Benutzer %s zugewiesene Aktionen anzuzeigen. AgendaUrlOptionsProject=project=__PROJECT_ID__ um Aktionen vom Projekt __PROJECT_ID__ anzuzeigen. AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto, um automatische Einträge auszublenden. AgendaUrlOptionsIncludeHolidays=Setze includeholidays=1 um Ferien im Kalender anzuzeigen. AgendaHideBirthdayEvents=Geburtstage von Kontakten verstecken +Busy=Besetzt +DefaultWorkingHours=Reguläre Arbeitszeit pro Tag (z.B. 9-18) +ExportCal=Export Kalender ExtSitesEnableThisTool=Externe Kalender gemäss systemweiten Einstellungen anzeigen. Externe Kalender, die Benutzer definiert haben, sind davon nicht betroffen. DateActionBegin=Beginnzeit des Ereignis ConfirmCloneEvent=Willst du das Ereignis %s wirklich duplizieren? diff --git a/htdocs/langs/de_CH/boxes.lang b/htdocs/langs/de_CH/boxes.lang index 9b8ff55d675..e597dd56def 100644 --- a/htdocs/langs/de_CH/boxes.lang +++ b/htdocs/langs/de_CH/boxes.lang @@ -21,8 +21,7 @@ BoxTitleLastRssInfos=%s neueste News von %s BoxTitleLastProducts=%s zuletzt bearbeitete Produkte/Leistungen BoxTitleLastModifiedSuppliers=%s zuletzt bearbeitete Lieferanten BoxTitleLastModifiedCustomers=%s zuletzt bearbeitete Kunden -BoxTitleLastCustomerBills=%s neueste Kundenrechnungen -BoxTitleLastSupplierBills=%s neueste Lieferantenrechnungen +BoxTitleLastCustomersOrProspects=%s neueste Kunden oder Interessenten BoxTitleLastModifiedProspects=Interessenten: zuletzt %s geändert BoxTitleLastFicheInter=%s zuletzt bearbietet Eingriffe BoxTitleOldestUnpaidCustomerBills=Älteste %s offene Kundenrechnungen @@ -49,6 +48,7 @@ NoTooLowStockProducts=Keine Produkte unter der min. Warenlimite BoxProductDistribution=Vertrieb Produkte / Dienstleistungen ForObject=Am %s BoxTitleLastModifiedSupplierBills=Älteste %s geänderte Lieferantenrechnungen +BoxTitleLatestModifiedSupplierOrders=%s zuletzt bearbeitete Lieferantenbestellungen BoxTitleLastModifiedCustomerBills=Älteste %s geänderte Kundenrechnungen BoxTitleLastModifiedCustomerOrders=%s zuletzt bearbeitete Kundenbestellungen BoxTitleLastModifiedPropals=%s neueste geänderte Offerten @@ -65,3 +65,4 @@ SuspenseAccountNotDefined=Es ist kein Wartestellungskonto festgelegt. BoxLastCustomerShipments=Letzte Lieferungen an Kunden BoxTitleLastCustomerShipments=Die neuesten %s Lieferungen an Kunden NoRecordedShipments=Es gibt noch keine Lieferungen an Kunden. +AccountancyHome=Rechnungswesen diff --git a/htdocs/langs/de_CH/cashdesk.lang b/htdocs/langs/de_CH/cashdesk.lang index d2e628d9fca..2c7addd512e 100644 --- a/htdocs/langs/de_CH/cashdesk.lang +++ b/htdocs/langs/de_CH/cashdesk.lang @@ -4,3 +4,4 @@ CashDeskBankCheque=Bankkonto(Scheckzahlung) TotalTicket=Gesamtanzahl Ticket BankToPay=Zahlungskonto FilterRefOrLabelOrBC=Suche (Art-Nr./Name) +Receipt=Beleg diff --git a/htdocs/langs/de_CH/errors.lang b/htdocs/langs/de_CH/errors.lang index ff7bc4d6bcb..aa7f34b7ea1 100644 --- a/htdocs/langs/de_CH/errors.lang +++ b/htdocs/langs/de_CH/errors.lang @@ -27,7 +27,6 @@ ErrorPleaseTypeBankTransactionReportName=Gib hier den Bankkontoauszug im Format ErrorProdIdAlreadyExist=%s wurde bereits einem Geschäftspartner zugewiesen ErrorForbidden3=Es scheint keine ordnungsgemässe Authentifizierung für das System vorzuliegen. Bitte werfen Sie einen Blick auf die Systemdokumentation um die entsprechenden Authentifizierungsoptionen zu verwalten (htaccess, mod_auth oder andere...) ErrorBadValueForCode=Unzulässiger Code-Wert. Versuchen Sie es mit einem anderen Wert erneut... -ErrorDateMustBeBeforeToday=Datum darf nicht in der Zukunft sein ErrorWarehouseRequiredIntoShipmentLine=Warenlager ist auf der Lieferzeile erforderlich. ErrorFileMustHaveFormat=Datei muss das Format %s haben ErrorsThirdpartyMerge=Die zwei Einträge können nicht zusammengeführt werden. Aktion abgebrochen. diff --git a/htdocs/langs/de_CH/hrm.lang b/htdocs/langs/de_CH/hrm.lang index 4b7bc012ad1..cd212704e9a 100644 --- a/htdocs/langs/de_CH/hrm.lang +++ b/htdocs/langs/de_CH/hrm.lang @@ -8,6 +8,5 @@ ConfirmDeleteEstablishment=Willst du diesen Betrieb wirklich löschen? OpenEtablishment=Betrieb wählen CloseEtablishment=Betrieb schliessen DictionaryDepartment=Personalverwaltung - Abteilungsliste -Employees=Mitarbeiter Employee=Mitarbeiter NewEmployee=Neuer Mitarbeiter diff --git a/htdocs/langs/de_CH/mails.lang b/htdocs/langs/de_CH/mails.lang index 4bd3ed40bc9..3bcda95e62c 100644 --- a/htdocs/langs/de_CH/mails.lang +++ b/htdocs/langs/de_CH/mails.lang @@ -4,6 +4,7 @@ MailTitle=Titel MailFrom=Absender MailErrorsTo=Fehler an MailText=E-Mail-Text +MailMessage=E-Mail Text MailingStatusSent=Gesendet MailingStatusSentPartialy=Teileweise gesendet MailingStatusSentCompletely=Vollständig gesendet @@ -26,6 +27,7 @@ LimitSendingEmailing=Hinweis: Aus Sicherheits- und Zeitüberschreitungsgründen ToAddRecipientsChooseHere=Fügen Sie Empfänger über die Listenauswahl hinzu NbOfEMailingsSend=E-Mail-Kampagne versandt TagUnsubscribe=Abmelde Link +NoEmailSentBadSenderOrRecipientEmail=Kein E-Mail gesendet. Ungültige Absender oder Empfänger Adresse. Benutzerprofil kontrollieren. NoNotificationsWillBeSent=Für dieses Ereignis und diesen Geschäftspartner sind keine Benachrichtigungen geplant ANotificationsWillBeSent=Eine Benachrichtigung wird per E-Mail versandt SomeNotificationsWillBeSent=%s Benachrichtigungen werden per E-Mail versandt diff --git a/htdocs/langs/de_CH/main.lang b/htdocs/langs/de_CH/main.lang index 60ec3c2adff..3e5caad9224 100644 --- a/htdocs/langs/de_CH/main.lang +++ b/htdocs/langs/de_CH/main.lang @@ -21,7 +21,6 @@ FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M NoTemplateDefined=Für diesen Emailtyp habe ich keine Vorlage.. AvailableVariables=Verfügbare Ersatzvariablen -EmptySearchString=Enter non empty search criterias NoRecordDeleted=Es wurde kein Datensatz gelöscht NotEnoughDataYet=Nicht genügend Daten NoError=Kein Fehler @@ -100,6 +99,8 @@ DurationOfLine=Dauer Model=Dokumentenvorlage DefaultModel=Standardvorlage Connection=Anmeldung +Alert=Warnung +Card=Karte DateToday=Aktuelles Datum DateModificationShort=Änd.Datum DateLastModification=Zuletzt geändert am @@ -182,6 +183,8 @@ DolibarrStateBoard=Datenbankstatistiken DolibarrWorkBoard=Offene Aktionen NoOpenedElementToProcess=Keine offenen Aktionen Categories=Suchwörter/Kategorien +Category=Stichwort / Kategorie +FromDate=Von FromLocation=Von OtherInformations=Weitere Informationen Qty=Anz. @@ -192,6 +195,7 @@ Opened=Offen ClosedAll=Geschlossen (alle Typen) Size=Grösse OriginalSize=Originalgrösse +Topic=Thema ByCompanies=Von Geschäftspartnern ByUsers=Nach Benutzer NoneOrSeveral=Keine oder einige @@ -214,6 +218,8 @@ UndoExpandAll=Ausklappen rückgängig machen SeeAll=Zeige alles an CloseWindow=Fenster schliessen SendAcknowledgementByMail=Bestätigungsemail senden +SendMail=sende E-Mail +NoEMail=Keine E-Mail AlreadyRead=Gelesen NoMobilePhone=Kein Mobiltelefon ValueIsNotValid=Der Wert ist leider ungültig. @@ -221,6 +227,7 @@ RecordCreatedSuccessfully=Eintrag erfolgreich erstellt RecordsModified=Geänderte Einträge: %s RecordsDeleted=Gelöschte Einträge: %s RecordsGenerated=Erzeugte Einträge: %s +MoveBox=Box verschieben CompleteOrNoMoreReceptionExpected=Vollständig oder keine Aktionen mehr erwartet YouCanChangeValuesForThisListFromDictionarySetup=Du kannst die Werte für diese Liste in Einstellungen -> Stammdaten anpassen. YouCanChangeValuesForThisListFrom=Du kannst die Werte für diese Liste im Menu %s einstellen. @@ -229,7 +236,6 @@ CurrentTheme=Aktuelle Oberfläche Screen=Bildschirm DateOfSignature=Unterschriftsdatum RootOfMedias=Stammverzeichnis für öffentliche Bilder (/medias) -FreeZone=Nicht hinterlegte Position vom Typ FreeLineOfType=Freitext vom Typ ReGeneratePDF=PDF erneut erzeugen DocumentModelStandardPDF=Standardvorlage (PDF) diff --git a/htdocs/langs/de_CH/members.lang b/htdocs/langs/de_CH/members.lang index 567980cd881..4f52f16aa71 100644 --- a/htdocs/langs/de_CH/members.lang +++ b/htdocs/langs/de_CH/members.lang @@ -1,5 +1,6 @@ # Dolibarr language file - Source file is en_US - members MemberCard=Mitgliederkarte +SubscriptionCard=Abo-Karte ShowMember=Mitgliederkarte anzeigen UserNotLinkedToMember=Benutzer nicht mit einem Mitglied verknüpft FundationMembers=Gründungsmitglieder @@ -13,35 +14,66 @@ MembersListValid=Liste der verifizierten Mitglieder MembersListUpToDate=Liste der verifizierten aktiven Mitglieder DateSubscription=Start des Abonnements DateEndSubscription=Ende des Abonnements +EndSubscription=Abo-Ende SubscriptionId=Abo-ID MemberId=Mitgliedernummer MemberType=Mitgliederart MembersTypes=Mitgliederarten MemberStatusDraft=Entwürfe (benötigen Bestätigung) +MemberStatusNoSubscriptionShort=Bestätigt +SubscriptionEndDate=Enddatum des Abonnements +NewSubscription=Neues Abonnement NewSubscriptionDesc=Mit diesem Formular können Sie Ihr Abonnement als neues Mitglied der Stiftung registrieren. Wenn Sie Ihr Abonnement verlängern möchten (falls Sie bereits Mitglied sind), wenden Sie sich stattdessen per E-Mail an den Stiftungsrat. %s. +Subscription=Abonnement Subscriptions=Abonnemente +SubscriptionNotReceived=Abonnement nie erhalten ListOfSubscriptions=Liste der Abonnemente NewMemberType=Neue Mitgliederart WelcomeEMail=Begrüssungs-E-Mail SubscriptionRequired=Abonnement notwendig VoteAllowed=Abstimmen erlaubt +DeleteSubscription=Abonnement löschen +ConfirmDeleteSubscription=Möchten Sie dieses Abonnement wirklich löschen? +BlankSubscriptionForm=Öffentliches Formular zur Selbstregistrierung +BlankSubscriptionFormDesc=Dolibarr kann Ihnen eine öffentliche URL / Website zur Verfügung stellen, über die externe Besucher ein Abonnement der Stiftung anfragen können. Wenn ein Online-Zahlungsmodul aktiviert ist, kann auch automatisch ein Zahlungsformular bereitgestellt werden. +EnablePublicSubscriptionForm=Aktivieren Sie die öffentliche Website mit dem Formular zur Selbstregistrierung +LastSubscriptionsModified=Letzte %s geänderte Abonnements +SubscriptionNotRecorded=Abo nicht erfasst +AddSubscription=Abonnement erstellen ShowSubscription=Abonnement anzeigen +SendingEmailOnAutoSubscription=E-Mail bei automatischer Registrierung senden +SendingEmailOnNewSubscription=E-Mail bei neuem Abonnement senden +SendingReminderForExpiredSubscription=Erinnerung für abgelaufene Abonnements senden +YourSubscriptionWasRecorded=Ihr neues Abonnement wurde aufgenommen +SubscriptionReminderEmail=Abo-Erinnerung CardContent=Inhalt Ihrer Mitgliederkarte +ThisIsContentOfYourMembershipRequestWasReceived=Wir möchten Sie darüber informieren, dass Ihre Mitgliedschaftsanfrage eingegangen ist.

    +ThisIsContentOfYourMembershipWasValidated=Wir möchten Sie darüber informieren, dass Ihre Mitgliedschaft mit den folgenden Informationen bestätigt wurde:

    +ThisIsContentOfYourSubscriptionWasRecorded=Wir möchten Sie darüber informieren, dass Ihr neues Abonnement erfasst wurde.

    +ThisIsContentOfSubscriptionReminderEmail=Wir möchten Sie darüber informieren, dass Ihr Abonnement in Kürze abläuft oder bereits abgelaufen ist (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Wir hoffen, dass Sie es erneuern.

    DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Betreff der Benachrichtigungs-E-Mail bei automatischer Anmeldung eines Gastes DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Inhalt der Benachrichtigungs-E-Mail, bei automatischer Anmeldung eines Gastes DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=E-Mail-Vorlage zum Senden von E-Mails an ein Mitglied bei Mitglieder-Autoabonnements DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=E-Mail-Vorlage zum Senden von E-Mails an ein Mitglied bei der Mitgliederüberprüfung -DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=E-Mail-Vorlage zum Senden einer E-Mail an ein Mitglied bei der Aufnahme eines neuen Abonnements +DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=E-Mail-Vorlage zum Senden einer E-Mail an ein Mitglied bei der Erfassung eines neuen Abonnements DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=E-Mail-Vorlage zum Senden einer E-Mail-Erinnerung, wenn das Abonnement abläuft DescADHERENT_EMAIL_TEMPLATE_CANCELATION=E-Mail-Vorlage zum Senden von E-Mails an ein Mitglied bei Kündigung der Mitgliedschaft DescADHERENT_MAIL_FROM=Absender E-Mail für automatische E-Mails HTPasswordExport=htpassword Datei generieren MembersAndSubscriptions=Mitglieder und Abonnemente SubscriptionPayment=Zahlung des Mitgliedsbeitrags +LastSubscriptionDate=Datum der letzten Abo-Zahlung +LastSubscriptionAmount=Betrag des letzten Abonnements MembersStatisticsByCountries=Mitgliederstatistik nach Land MembersStatisticsByState=Mitgliederstatistik nach Kanton MembersStatisticsByTown=Mitgliederstatistik nach Ort +MembersStatisticsByRegion=Mitgliederstatistik nach Region NoValidatedMemberYet=Keine verifizierten Mitglieder gefunden LatestSubscriptionDate=Enddatum des Abonnementes -Public=Informationen sind öffentlich -NewMemberbyWeb=Neues Mitglied hinzugefügt. Warten auf Genehmigung +NewMemberbyWeb=Neues Mitglied wurde hinzugefügt. Warten auf Genehmigung +SubscriptionsStatistics=Statistiken zu Abonnements +NbOfSubscriptions=Anzahl der Abonnements +AmountOfSubscriptions=Anzahl der Abonnements +SubscriptionRecorded=Abo erfasst +SendReminderForExpiredSubscriptionTitle=Erinnerung per E-Mail senden, wenn das Abonnement abgelaufen ist +SendReminderForExpiredSubscription=Erinnerung per E-Mail an Mitglieder senden, wenn das Abonnement abläuft (Parameter ist die Anzahl der Tage vor dem Ende des Abonnements, um die Erinnerung zu senden. Dies kann eine durch ein Semikolon getrennte Liste von Tagen sein, z. B. '10; 5; 0; -5') diff --git a/htdocs/langs/de_CH/other.lang b/htdocs/langs/de_CH/other.lang index 4f942e32521..bc73e4c58b0 100644 --- a/htdocs/langs/de_CH/other.lang +++ b/htdocs/langs/de_CH/other.lang @@ -8,10 +8,8 @@ Notify_FICHINTER_SENTBYMAIL=Service per E-Mail versendet TotalSizeOfAttachedFiles=Gesamtgrösse der angehängten Dateien/Dokumente MaxSize=Maximalgrösse PredefinedMailContentContract=__(Hallo)__\n\n\n__(Mit freundlichen Grüssen)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__ (Hallo) __ __ (Mit freundlichen Grüssen) __ __USER_SIGNATURE__ -PredefinedMailContentContact=__ (Hallo) __ __ (Mit freundlichen Grüssen) __ __USER_SIGNATURE__ -PredefinedMailContentUser=__ (Hallo) __ __ (Mit freundlichen Grüssen) __ __USER_SIGNATURE__ PredefinedMailContentLink=Sie können auf den unten stehenden Link klicken, um Ihre Zahlung zu tätigen, falls dies noch nicht geschehen ist. %s +PredefinedMailContentGeneric=__(Hallo)__\n\n\n__(Mit freundlichen Grüssen)__\n\n__USER_SIGNATURE__ ChooseYourDemoProfil=Bitte wählen Sie das Demo-Profil das Ihrem Einsatzgebiet am ehesten entspricht ModifiedById=Letzte Änderung durch User ModifiedByLogin=Letzte Änderung durch Userlogin diff --git a/htdocs/langs/de_CH/products.lang b/htdocs/langs/de_CH/products.lang index 0f2072b4e04..1d7fd648719 100644 --- a/htdocs/langs/de_CH/products.lang +++ b/htdocs/langs/de_CH/products.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - products +Service=Leistung Create=Erstelle Reference=Referenz ProductVatMassChange=Globale MWST - Änderung @@ -19,6 +20,7 @@ ServicesOnSaleOnly=Dienstleistungen nur für den Verkauf ServicesOnPurchaseOnly=Dienstleistungen nur für den Einkauf ServicesNotOnSell=Dienstleistungen weder für den Ein-, noch Verkauf LastRecordedProducts=%s zuletzt erfasste Produkte +LastRecordedServices=%s zuletzt erfasste Leistungen MenuStocks=Warenbestände Stocks=Lagerbestände und Lagerorte (Warenlager) AppliedPricesFrom=Angelegt von @@ -54,6 +56,7 @@ NoPriceDefinedForThisSupplier=Ich habe weder Preis- noch Mengenangaben für dies NoSupplierPriceDefinedForThisProduct=Ich habe weder Preis- noch Mengenangaben für diesen Anbiter und seine Produkte. PredefinedProductsToSell=Vordefiniertes Verkaufsprodukt PredefinedServicesToSell=Vordefinierte Dienstleistung zum Verkauf +PredefinedProductsAndServicesToSell=Vordefinierte Produkte/Leistungen für Verkauf PredefinedProductsToPurchase=Vordefinierte Einkaufs-Produkte PredefinedProductsAndServicesToPurchase=Vordefinierte Produkte / Dienstleistungen für den Einkauf ConfirmCloneProduct=Bist du sicher, dass du diese Position %s duplizieren willst? @@ -69,6 +72,8 @@ CustomerPrices=Kunden Preise SuppliersPrices=Lieferantenpreise SuppliersPricesOfProductsOrServices=Anbieterpreise CustomCode=Zolltarifnummer (z.B. HSN) +set=gesetzt +se=gesetzt kilogram=Kilo unitP=Teil unitSET=Satz diff --git a/htdocs/langs/de_CH/stocks.lang b/htdocs/langs/de_CH/stocks.lang index a7776df946c..b9344b1a49c 100644 --- a/htdocs/langs/de_CH/stocks.lang +++ b/htdocs/langs/de_CH/stocks.lang @@ -13,8 +13,6 @@ StockLimitShort=Alarmschwelle StockLimit=Sicherungsbestand für autom. Benachrichtigung RealStock=Realer Lagerbestand VirtualStock=Theoretisches Warenlager -AverageUnitPricePMPShort=Gewichteter Durchschnitts-Einstandspreis -AverageUnitPricePMP=Gewichteter Durchschnittpreis bei Erwerb DesiredStockDesc=Dieser Bestand wird für die Nachbestellfunktion verwendet. UseVirtualStockByDefault=Nutze theoretische Lagerbestände anstatt des physischem Bestands für die Nachbestellungsfunktion UseVirtualStock=theoretisches Warenlager verwenden diff --git a/htdocs/langs/de_CH/ticket.lang b/htdocs/langs/de_CH/ticket.lang index 9a55f674e15..2c200f923ce 100644 --- a/htdocs/langs/de_CH/ticket.lang +++ b/htdocs/langs/de_CH/ticket.lang @@ -2,7 +2,5 @@ TypeContact_ticket_external_SUPPORTCLI=Kundenkontakt / Störfallverfolgung NotRead=Ungelesen InProgress=In Bearbeitung -Category=Analysecode -TicketCategory=Analysecode TicketCloseOn=Schliessungsdatum TicketAddIntervention=Einsatz erstellen diff --git a/htdocs/langs/de_CH/users.lang b/htdocs/langs/de_CH/users.lang index e3216933e71..18929f1b851 100644 --- a/htdocs/langs/de_CH/users.lang +++ b/htdocs/langs/de_CH/users.lang @@ -15,8 +15,10 @@ DefaultRightsDesc=Hier kannst du alle Berechtigungen setzen, die jeder neue Benu ListOfGroups=Liste von Gruppen PasswordChangeRequest=Antrag zur Passwortänderung von %s ConfirmPasswordReset=Bestätige das Zurücksetzen des Passwortes. +MenuUsersAndGroups=Benutzer & Gruppen LastGroupsCreated=Die %s neuesten Benutzergruppen LastUsersCreated=%s neueste Benutzer +NonAffectedUsers=Nicht betroffene Benutzer LinkToCompanyContact=Mit Geschäftspartner/Kontakt verknüpfen LinkedToDolibarrThirdParty=Mit Geschäftspartner verknüpft CreateDolibarrThirdParty=Neuen Geschäftspartner erstellen diff --git a/htdocs/langs/de_CH/withdrawals.lang b/htdocs/langs/de_CH/withdrawals.lang index 67f56d21654..4a0aee41836 100644 --- a/htdocs/langs/de_CH/withdrawals.lang +++ b/htdocs/langs/de_CH/withdrawals.lang @@ -2,4 +2,7 @@ StandingOrderPayment=Bankeinzug/Lastschrift WithdrawalReceipt=Bankeinzug / Lastschrift WithdrawalRefusedConfirm=Möchten Sie wirklich eine Abbuchungsablehnung zu diesem Geschäftspartner erstellen? +StatusPaid=Verarbeitet StatusMotif4=Kundenbestellungen +OrderWaiting=Wartend +NumeroNationalEmetter=Nat. Überweisernummer diff --git a/htdocs/langs/de_CH/workflow.lang b/htdocs/langs/de_CH/workflow.lang index 9daef2f4ba4..663b51e6c16 100644 --- a/htdocs/langs/de_CH/workflow.lang +++ b/htdocs/langs/de_CH/workflow.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - workflow +WorkflowSetup=Workflow Moduleinstellungen WorkflowDesc=Grundsätzlich sind alle Abläufe frei definierbar. Trotzdem kannst du hier einige vorgefertigte Abläufe aktivieren. ThereIsNoWorkflowToModify=Für die aktiven Module sind keine Workflow - Änderungen möglich. descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Erzeuge automatisch eine Kundenbestellung, sobald die Offerte unterzeichnet ist (Positionen und Beträge, wie offeriert). diff --git a/htdocs/langs/de_DE/accountancy.lang b/htdocs/langs/de_DE/accountancy.lang index 2a92500e6f2..296314e7df6 100644 --- a/htdocs/langs/de_DE/accountancy.lang +++ b/htdocs/langs/de_DE/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Verwalten der Null am Ende eines Buchhaltungskontos. \nIn BANK_DISABLE_DIRECT_INPUT=Deaktivieren der direkte Aufzeichnung von Transaktion auf dem Bankkonto ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Entwurfexport für Journal aktivieren ACCOUNTANCY_COMBO_FOR_AUX=Kombinationsliste für Nebenkonto aktivieren \n(kann langsam sein, wenn Sie viele Geschäftspartner haben) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Verkaufsjournal ACCOUNTING_PURCHASE_JOURNAL=Einkaufsjournal @@ -284,6 +285,7 @@ ShowTutorial=Tutorial anzeigen NotReconciled=nicht ausgeglichen ## Admin +BindingOptions=Binding options ApplyMassCategories=Massenaktualisierung der Kategorien AddAccountFromBookKeepingWithNoCategories=Verfügbares Konto noch nicht in der personalisierten Gruppe CategoryDeleted=Die Gruppe für das Buchhaltungskonto wurde entfernt diff --git a/htdocs/langs/de_DE/admin.lang b/htdocs/langs/de_DE/admin.lang index 448fe83ac82..c93ae8157fe 100644 --- a/htdocs/langs/de_DE/admin.lang +++ b/htdocs/langs/de_DE/admin.lang @@ -219,7 +219,7 @@ Nouveauté=Neuheit AchatTelechargement=Kaufen / Herunterladen GoModuleSetupArea=Um ein neues Modul zu installieren/verteilen, gehen Sie in den Modul-Setup Bereich %s. DoliStoreDesc=DoliStore, der offizielle Marktplatz für dolibarr Module/Erweiterungen -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. +DoliPartnersDesc=Liste der Unternehmen, die speziell entwickelte Module oder Funktionen bereitstellen.
    Hinweis: Da Dolibarr eine Open Source-Anwendung ist, kann jeder, der Erfahrung mit PHP-Programmierung hat, ein Modul entwickeln. WebSiteDesc=Externe Webseiten mit zusätzlichen Add-on (nicht zum Grundumfang gehörend) Modulen ... DevelopYourModuleDesc=einige Lösungen um eigene Module zu entwickeln ... URL=Link @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Standard Absender e-Mail für manuelle Sendungen (Ben UserEmail=E-Mail des Benutzers CompanyEmail=Unternehmens-E-Mail FeatureNotAvailableOnLinux=Diese Funktion ist auf Unix-Umgebungen nicht verfügbar. Testen Sie Ihr Programm sendmail lokal. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Wenn die Übersetzung für diese Sprache nicht vollständig ist oder Sie Fehler finden, können Sie dies korrigieren, indem Sie Dateien im Verzeichnis langs/%s bearbeiten und Ihre Änderung an www.transifex.com/dolibarr-association/dolibarr/ senden. -SubmitTranslationENUS=Sollte die Übersetzung für eine Sprache nicht vollständig sein oder Fehler beinhalten, können Sie die entsprechenden Sprachdateien im Verzeichnis langs/%s bearbeiten und anschließend Ihre Änderungen mit der Entwicklergemeinschaft auf www.dolibarr.org teilen. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Moduleinstellung ModulesSetup=Modul-/Anwendungseinstellungen ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul %s muss aktiviert sein, wenn Sie dieses Fe SecurityToken=Schlüssel um die URLs zu entschlüsseln NoSmsEngine=Kein SMS-Sendermanager verfügbar. Ein SMS-Sendermanager ist nicht mit der Standardverteilung installiert, da er von einem externen Anbieter abhängig ist, können Sie einige davon finden unter %s PDF=PDF -PDFDesc=Globale Einstellungen für die PDF-Erzeugung -PDFAddressForging=Zusätzliche Felder im Adressfeld +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Alle Informationen zu Steuern und MWSt. im generierten PDF ausblenden PDFRulesForSalesTax=Regeln für Umsatzsteuer / MwSt. PDFLocaltax=Regeln für %s -HideLocalTaxOnPDF=Steuersatz%s in der Spalte Steuerverkauf ausblenden +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Verstecke Produktbeschreibung HideRefOnPDF=Artikelnummer nicht anzeigen HideDetailsOnPDF=Verstecke Produkt-Zeilen Details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Ändern Sie den Basispreis definierte nach MassConvert=Starte Massenkonvertierung PriceFormatInCurrentLanguage=Preisformat in der aktuellen Sprache String=Zeichenkette +String1Line=String (1 line) TextLong=Langer Text +TextLongNLines=Long text (n lines) HtmlText=HTML-Text Int=Ganzzahl Float=Fließkommazahl @@ -543,9 +546,9 @@ Module54Desc=Verwaltung von Verträgen (Dienstleistungen oder wiederkehrende Abo Module55Name=Barcodes Module55Desc=Barcode-Verwaltung Module56Name=Zahlung per Überweisung -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Lastschrifteinzug -Module57Desc=Verwaltung von Lastschriftzahlungsaufträgen. Es beinhaltet die Erstellung einer SEPA-Datei für europäische Länder. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDial-Integration Module59Name=Bookmark4u @@ -573,7 +576,7 @@ Module240Desc=Werkzeug zum Datenexport (mit Assistenten) Module250Name=Daten Importe Module250Desc=Werkzeug zum Datenimport (mit Assistenten) Module310Name=Mitglieder -Module310Desc=Mitgiederverwaltung für Stiftungen und Vereine +Module310Desc=Mitgliederverwaltung für Stiftungen und Vereine Module320Name=RSS Feed Module320Desc=Einen RSS-Feed zu den Dolibarr-Seiten hinzufügen Module330Name=Lesezeichen @@ -836,9 +839,16 @@ Permission532=Leistungen erstellen/bearbeiten Permission534=Leistungen löschen Permission536=Versteckte Leistungen einsehen/verwalten Permission538=Leistungen exportieren +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Stücklisten anzeigen Permission651=Stücklisten erstellen / aktualisieren Permission652=Stücklisten löschen +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Spenden anzeigen Permission702=Spenden erstellen/bearbeiten Permission703=Spenden löschen @@ -848,6 +858,8 @@ Permission773=Spesenabrechnung löschen Permission774=Spesenabrechnungen einsehen (Alle Benutzer auch die nicht Untergebenen) Permission775=Spesenabrechnung genehmigen Permission776=Spesenabrechnung bezahlen +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Spesenabrechnung exportieren Permission1001=Warenbestände einsehen Permission1002=Warenlager erstellen/ändern @@ -900,6 +912,7 @@ Permission2515=Dokumentverzeichnisse verwalten Permission2801=FTP-Client im Lesemodus nutzen (nur ansehen und herunterladen) Permission2802=FTP-Client im Schreibmodus nutzen (Dateien löschen oder hochladen) Permission3200=Eingetragene Ereignisse und Fingerprints lesen +Permission3301=Generate new modules Permission4001=Mitarbeiter anzeigen Permission4002=Mitarbeiter erstellen Permission4003=Mitarbeiter löschen @@ -947,7 +960,8 @@ Permission63003=Ressource löschen Permission63004=Verbinden von Ressourcen zu Ereignissen DictionaryCompanyType=Arten von Partnern DictionaryCompanyJuridicalType=Rechtsformen von Partnern -DictionaryProspectLevel=Interessenten-Potenzial +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Bundesland/Kanton DictionaryRegion=Regionen DictionaryCountry=Länder @@ -977,7 +991,8 @@ DictionaryEMailTemplates=E-Mail-Vorlagen DictionaryUnits=Einheiten DictionaryMeasuringUnits=Maßeinheiten DictionarySocialNetworks=Soziale Netzwerke -DictionaryProspectStatus=Lead-Status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Urlaubsarten DictionaryOpportunityStatus=Verkaufschancen für Projekt/Lead DictionaryExpenseTaxCat=Spesenbericht - Mobilität @@ -1076,7 +1091,7 @@ LoginPage=Anmeldeseite BackgroundImageLogin=Hintergrundbild PermanentLeftSearchForm=Ständiges Suchfeld auf der linken Seite DefaultLanguage=Standardsprache -EnableMultilangInterface=Mehrsprachen-Support zulassen +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Firmenlogo im Menü anzgeigen CompanyInfo=Firma oder Institution CompanyIds=Firmen-/Organisations-IDs @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Es sind mindestens ein Suchkriterium erfo NewTranslationStringToShow=Meine Übersetzung OriginalValueWas=Original-Übersetzung überschrieben. Der frühere Wert war:

    %s TransKeyWithoutOriginalValue=Sie haben eine neue Übersetzung für den Schlüssel '%s' erzwungen, der in keiner der Sprachdateien vorhanden ist. -TotalNumberOfActivatedModules=Aktivierte Anwendungen/Module: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Sie müssen mindestens 1 Modul aktivieren ClassNotFoundIntoPathWarning=Klasse %s nicht im PHP-Pfad gefunden YesInSummer=Ja im Sommer @@ -1361,8 +1377,8 @@ WatermarkOnDraftContractCards=Wasserzeichen auf Vertragsentwurf (leerlassen wenn MembersSetup=Modul Mitglieder - Einstellungen MemberMainOptions=Haupteinstellungen AdherentLoginRequired= Verwalten Sie eine Anmeldung für jedes Mitglied -AdherentMailRequired=Für die Anlage eines neuen Mitgliedes ist eine E-Mail-Adresse erforderlich -MemberSendInformationByMailByDefault=Das Kontrollkästchen für den automatischen Mail-Bestätigungsversand an Mitglieder (bei Freigabe oder neuem Abonnement) ist standardmäßig aktiviert +AdherentMailRequired=Für das Anlegen eines neuen Mitglieds ist eine E-Mail-Adresse erforderlich +MemberSendInformationByMailByDefault=Das Kontrollkästchen für den automatischen Versand einer E-Mail-Bestätigung an Mitglieder (bei Freigabe oder neuem Abonnement) ist standardmäßig aktiviert VisitorCanChooseItsPaymentMode=Der Besucher kann aus verschiedenen Zahlungsmethoden auswählen MEMBER_REMINDER_EMAIL=Aktivieren Sie die automatische Erinnerung per E-Mail an abgelaufene Abonnements. Hinweis: Das Modul %s muss aktiviert und ordnungsgemäß eingerichtet sein, damit Erinnerungen gesendet werden können. ##### LDAP setup ##### @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Verwenden Ereignissarten \nEinstellen unter (Start -> Eins AGENDA_USE_EVENT_TYPE_DEFAULT=Diesen Standardwert automatisch als Ereignistyp im Ereignis Erstell-Formular verwenden. AGENDA_DEFAULT_FILTER_TYPE=Diesen Ereignisstatus automatisch in den Suchfilter für die Agenda-Ansicht übernehmen AGENDA_DEFAULT_FILTER_STATUS=Diesen Ereignisstatus automatisch in den Suchfilter für die Agenda-Ansicht übernehmen -AGENDA_DEFAULT_VIEW=Welchen Reiter möchten Sie beim Öffnen der Agenda automatisch anzeigen +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Aktiviere Terminbenachrichtigungen via E-Mail (Die Benachrichtigungszeit/Frequenz kann auf dem jeweiligen Termin eingestellt werden). Info: Modul %s muss aktiviert und richtig konfiguriert sein, damit die Erinnerungen korrekt versendet werden können. AGENDA_REMINDER_BROWSER=Ereigniserinnerung aktivieren im Browser des Benutzers (Wenn das Ereignisdatum erreicht ist, kann jeder Benutzer dies in der Frage zur Browserbestätigung ablehnen.) AGENDA_REMINDER_BROWSER_SOUND=Aktiviere Tonbenachrichtigung @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Verknüpfte Objekte in Agenda anzeigen ##### Clicktodial ##### ClickToDialSetup=Click-to-Dial Moduleinstellungen ClickToDialUrlDesc=URL, die bei einem Klick auf das Telefonsymbol aufgerufen werden soll. In dieser URL können die folgenden Tags verwendet werden:
    __PHONETO__ Telefonnummer des Angerufenen
    __PHONEFROM__ Telefonnummer des Anrufers (Ihre)
    __LOGIN__ Ihren Benutzernamen für Click-to-Dial (siehe Benutzerdaten)
    __PASS__ Ihr Click-to-Dial-Passwort (siehe Benutzerdaten). -ClickToDialDesc=Dieses Modul macht aus Telefonnummern anklickbare Links. Ein Klick auf das Symbol bewirkt, dass Ihr Telefon die Nummer anruft. Dies kann verwendet werden, um ein Call-Center-System von Dolibarr aus anzurufen, das beispielsweise die Telefonnummer eines SIP-Systems anrufen kann. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Nur einen Link "Tel:" bei Telefonnummern verwenden ClickToDialUseTelLinkDesc=Benutzen Sie diese Methode, wenn Ihre Benutzer ein Software-Telefon oder ein Interface für ein Telefon auf demselben Computer wie der Browser installiert haben. Dieses Telefon/Interface wird aufgerufen, wenn Sie auf einen Link klicken, der mit "tel:" beginnt. Wenn Sie eine vollständige Server-Lösung nutzen wollen (ohne lokale Software-Installation), wählen Sie hier "Nein" und füllen das nächste Feld. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Dieses Feld enthält eine Referenz um die Zeile zu identifizieren. Enter0or1=Gib 0 oder 1 ein UnicodeCurrency=Geben Sie hier zwischen geschweiften Klammern die Liste der Bytes ein, die das Währungssymbol darstellen. Zum Beispiel: Geben Sie für $ [36] ein - für brasilianische Real-R $ [82,36] - geben Sie für € [8364] ein ColorFormat=Die RGB Farben sind im Hexformat, zB. FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Zeilenposition in der Combo-Listen SellTaxRate=Mehrwertsteuersatz RecuperableOnly=Ja für USt. "Wahrgenommene nicht Erstattungsfähig" für einige Regionen in Frankreich. Nein für alle anderen Fälle. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Offertanfrage MailToSendSupplierOrder=Lieferantenbestellungen MailToSendSupplierInvoice=Lieferantenrechnungen MailToSendContract=Verträge +MailToSendReception=Wareneingänge MailToThirdparty=Partner MailToMember=Mitglieder MailToUser=Benutzer @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s ist verfügbar. Versio ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s ist verfügbar. Version %s ist ein Wartungsupdate, das nur Fehlerbereinigungen enthält. Wir empfehlen allen Benutzern ein Upgrade auf diese Version. Wie bei jedem Wartungsupdate sind keinen neuen Features oder Änderungen in den Datenstrukturen enthalten. Sie können die Version aus dem Downloadbereich des Portals https://www.dolibarr.org laden (Unterverzeichnis "stabile Versionen"). Lesen Sie die komplette Liste der Änderungen im ChangeLog. MultiPriceRuleDesc=Wenn die Option "Mehrere Preisstufen pro Produkt / Dienstleistung" aktiviert ist, können Sie für jedes Produkt unterschiedliche Preise definieren (einen pro Preisstufe). Um Zeit zu sparen, können Sie hier eine Regel eingeben, um einen Preis für jede Ebene auf der Grundlage des Preises der ersten Ebene automatisch zu berechnen, sodass Sie für jedes Produkt nur einen Preis für die erste Ebene eingeben müssen. Diese Seite soll Ihnen Zeit sparen, ist jedoch nur dann nützlich, wenn Ihre Preise für jedes Level im Verhältnis zum ersten Level stehen. Sie können diese Seite in den meisten Fällen ignorieren. ModelModulesProduct=Vorlagen für Produktdokumente +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Um Codes automatisch generieren zu können, muß zuerst ein Manager für die automatische Generierung von Barcode-Nummer festgelegt werden. SeeSubstitutionVars=Siehe * für einen Liste möglicher Ersetzungsvariablen SeeChangeLog=Siehe ChangeLog-Datei (nur Englisch) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Linker Rand im PDF MAIN_PDF_MARGIN_RIGHT=Rechter Rand im PDF MAIN_PDF_MARGIN_TOP=Oberer Rand im PDF MAIN_PDF_MARGIN_BOTTOM=Unterer Rand im PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Dieses Modul benötigt keine speziellen Einstellungen. SetToYesIfGroupIsComputationOfOtherGroups=Setzen Sie dieses Fehld auf Ja, wenn diese Gruppe eine Berechnung von anderen Gruppen ist EnterCalculationRuleIfPreviousFieldIsYes=Berechnungsregel eingeben, falls das vorangehende Feld auf Ja gesetzt ist. (Beispiel: 'CODEGPR1+CODEGRP2') @@ -1920,7 +1940,7 @@ EMailHost=Hostname des IMAP-Servers MailboxSourceDirectory=Quellverzechnis des eMail-Kontos MailboxTargetDirectory=Zielverzechnis des eMail-Kontos EmailcollectorOperations=Aktivitäten, die der eMail-Collector ausführen soll -MaxEmailCollectPerCollect=Maximale Anzahl an einzusammelnden eMails je Collect-Vorgang +MaxEmailCollectPerCollect=Maximale Anzahl an einzusammelnden E-Mails je Collect-Vorgang CollectNow=Jetzt abrufen ConfirmCloneEmailCollector=Sind Sie sicher, dass Sie den eMail-Collektor %s duplizieren möchten? DateLastCollectResult=Datum des letzten eMail-Collect-Versuchs @@ -1930,16 +1950,17 @@ EmailCollectorConfirmCollectTitle=eMail-Collect-Bestätigung EmailCollectorConfirmCollect=Möchten Sie den Einsammelvorgang für diesen eMail-Collector starten? NoNewEmailToProcess=Keine neue e-Mail (passende Filter) zum Verarbeiten NothingProcessed=Nicht ausgeführt -XEmailsDoneYActionsDone=%seMails qualifiziert, %seMails erfolgreich verarbeitet (für %sAufzeichnungen/Aktionen durchgeführt) +XEmailsDoneYActionsDone=%sE-Mail(s) qualifiziert, %s E-Mail(s) erfolgreich verarbeitet (für %s Aufzeichnung(en) / Aktion(en) durchgeführt) RecordEvent=eMail-Ereignis aufzeichnen/registrieren CreateLeadAndThirdParty=als potentiellen Verkaufskontakt anlegen -CreateTicketAndThirdParty=als (Support-)Ticket anlegen +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Letzter Resultatcode NbOfEmailsInInbox=Anzahl E-Mails im Quellverzeichnis LoadThirdPartyFromName=Drittanbieter-Suche auf %s laden (nur laden) LoadThirdPartyFromNameOrCreate=Drittanbieter-Suche auf %s laden (erstellen, wenn nicht gefunden) -WithDolTrackingID=Dolibarr-Referenz in Nachrichten-ID gefunden -WithoutDolTrackingID=Dolibarr-Referenz nicht in Nachrichten-ID gefunden +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=PLZ MainMenuCode=Menüpunktcode (Hauptmenü) ECMAutoTree=Automatischen ECM-Baum anzeigen @@ -1981,7 +2002,7 @@ ImportSetup=Einrichtung des Modulimports InstanceUniqueID=Eindeutige ID dieser Instanz SmallerThan=Kleiner als LargerThan=Größer als -IfTrackingIDFoundEventWillBeLinked=Beachten Sie, dass,wenn in eingehenden e-Mail eine Tracking-ID gefunden wird, das Ereignis automatisch mit den verwanten/verknüpfte Objekte verknüpft wird. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Wenn Sie bei einem GMail-Konto die 2-stufige Validierung aktiviert haben, wird empfohlen, ein spezielles zweites Passwort für die Anwendung zu erstellen, anstatt Ihr eigenes Konto-Passwort von https://myaccount.google.com/. zu verwenden. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=Mit dieser Aktion können Sie den E-Mail-Inhalt verwenden, um einen vorhandenen Dritten in Ihrer Datenbank zu suchen und zu laden. Der gefundene (oder erstellte) Drittanbieter wird für die folgenden erforderlichen Aktionen verwendet. Im Parameterfeld können Sie zum Beispiel 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' verwenden, wenn Sie den Namen des Drittanbieters aus einer Zeichenfolge 'Name: Name zu finden' extrahieren, und in den body einfügen möchten. @@ -2005,3 +2026,7 @@ RssNote=Hinweis: Jede RSS-Feed-Definition enthält ein Widget, das Sie aktiviere JumpToBoxes=Wechseln Sie zu Einstellungen -> Widgets MeasuringUnitTypeDesc=Verwenden Sie hier einen Wert wie "Größe", "Oberfläche", "Volumen", "Gewicht", "Zeit". MeasuringScaleDesc=Die Skala gibt die Anzahl der Stellen an, an denen Sie den Dezimalteil verschieben müssen, um mit der Standardreferenzeinheit übereinzustimmen. Für den Einheitentyp "Zeit" ist dies die Anzahl der Sekunden. Werte zwischen 80 und 99 sind reservierte Werte. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/de_DE/agenda.lang b/htdocs/langs/de_DE/agenda.lang index 8dcb1a0339a..84e9a4c07dd 100644 --- a/htdocs/langs/de_DE/agenda.lang +++ b/htdocs/langs/de_DE/agenda.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - agenda -IdAgenda=ID Veranstaltung +IdAgenda=Ereignis-ID Actions=Ereignisse Agenda=Terminplan TMenuAgenda=Terminplanung @@ -14,14 +14,14 @@ EventsNb=Anzahl der Ereignisse ListOfActions=Liste Ereignisse EventReports=Ereignisbericht Location=Ort -ToUserOfGroup=für jeden Benutzer in der Gruppe +ToUserOfGroup=Ereignis, für jeden Benutzer in einer Gruppe zugewiesen ist EventOnFullDay=Ganztägig MenuToDoActions=Alle unvollst. Termine MenuDoneActions=Alle abgeschlossenen Termine MenuToDoMyActions=Meine unvollst. Termine MenuDoneMyActions=Meine abgeschlossenen Termine ListOfEvents=Liste Ereignisse (interner Kalender) -ActionsAskedBy=Termine eingetragen von +ActionsAskedBy=Ereignisse eingetragen von ActionsToDoBy=Ereignisse zugewiesen an ActionsDoneBy=Termine erledigt von ActionAssignedTo=Ereignis zugewiesen an @@ -43,9 +43,9 @@ ContractValidatedInDolibarr=Vertrag %s freigegeben CONTRACT_DELETEInDolibarr=Vertrag %s gelöscht PropalClosedSignedInDolibarr=Angebot %s unterschrieben PropalClosedRefusedInDolibarr=Angebot %s abgelehnt -PropalValidatedInDolibarr=Angebot freigegeben +PropalValidatedInDolibarr=Angebot %s freigegeben PropalClassifiedBilledInDolibarr=Angebot %s als verrechnet eingestuft -InvoiceValidatedInDolibarr=Rechnung freigegeben +InvoiceValidatedInDolibarr=Rechnung %s freigegeben InvoiceValidatedInDolibarrFromPos=Rechnung %s von POS validiert InvoiceBackToDraftInDolibarr=Rechnung %s in den Entwurf Status zurücksetzen InvoiceDeleteDolibarr=Rechnung %s gelöscht @@ -63,37 +63,39 @@ ShipmentClassifyClosedInDolibarr=Lieferung %s als verrechnet markiert ShipmentUnClassifyCloseddInDolibarr=Lieferung %s als wiedereröffnet markieren ShipmentBackToDraftInDolibarr=Sendung %s zurück zum Entwurfsstatus ShipmentDeletedInDolibarr=Lieferung %s gelöscht -ReceptionValidatedInDolibarr=Reception %s validated -OrderCreatedInDolibarr= Auftragserteilung %s erstellt +ReceptionValidatedInDolibarr=Empfang %s validiert +OrderCreatedInDolibarr= Auftrag %s erstellt OrderValidatedInDolibarr=Auftrag %s freigegeben -OrderDeliveredInDolibarr=Bestellung %s als geliefert markieren +OrderDeliveredInDolibarr=Auftrag %s als geliefert markiert OrderCanceledInDolibarr=Auftrag %s storniert -OrderBilledInDolibarr=Bestellung %s als bezahlt markieren -OrderApprovedInDolibarr=Bestellen %s genehmigt -OrderRefusedInDolibarr=Bestellung %s abgelehnt -OrderBackToDraftInDolibarr=Bestellen %s zurück nach Draft-Status +OrderBilledInDolibarr=Auftrag %s als bezahlt markiert +OrderApprovedInDolibarr=Auftrag %s genehmigt +OrderRefusedInDolibarr=Auftrag %s abgelehnt +OrderBackToDraftInDolibarr=Auftrag %s zurück in Entwurf-Status ProposalSentByEMail=Angebot %s per E-Mail gesendet ContractSentByEMail=Vertrag %s per E-Mail gesendet OrderSentByEMail=Kundenauftrag %s per E-Mail gesendet InvoiceSentByEMail=Kundenrechnung %s per E-Mail versendet -SupplierOrderSentByEMail=Bestellung %s per E-Mail gesendet -ORDER_SUPPLIER_DELETEInDolibarr=Bestellung %s gelöscht +SupplierOrderSentByEMail=Lieferantenbestellung %s per E-Mail gesendet +ORDER_SUPPLIER_DELETEInDolibarr=Lieferantenbestellung %s gelöscht SupplierInvoiceSentByEMail=Lieferantenrechnung %s per E-Mail gesendet ShippingSentByEMail=Lieferung %s per E-Mail versendet ShippingValidated= Lieferung %s freigegeben InterventionSentByEMail=Serviceauftrag %s per E-Mail versendet ProposalDeleted=Angebot gelöscht -OrderDeleted=Bestellung gelöscht +OrderDeleted=Auftrag gelöscht InvoiceDeleted=Rechnung gelöscht DraftInvoiceDeleted=Rechnungsentwurf gelöscht +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Produkt %s erstellt -PRODUCT_MODIFYInDolibarr=Produkt %s aktualisiert +PRODUCT_MODIFYInDolibarr=Produkt %s geändert PRODUCT_DELETEInDolibarr=Produkt %s gelöscht -HOLIDAY_CREATEInDolibarr=Anfrage für Urlaubsantrag %s erstellt -HOLIDAY_MODIFYInDolibarr=Anfrage für Urlaubsantrag %s bearbeitet -HOLIDAY_APPROVEInDolibarr=Anfrage für Urlaubsantrag %s genehmigt -HOLIDAY_VALIDATEInDolibarr=Anfrage für Urlaubsantrag %s validiert -HOLIDAY_DELETEInDolibarr=Anfrage für Urlaubsantrag %s gelöscht +HOLIDAY_CREATEInDolibarr=Urlaubsantrag %s erstellt +HOLIDAY_MODIFYInDolibarr=Urlaubsantrag %s bearbeitet +HOLIDAY_APPROVEInDolibarr=Urlaubsantrag %s genehmigt +HOLIDAY_VALIDATEInDolibarr=Urlaubsantrag %s validiert +HOLIDAY_DELETEInDolibarr=Urlaubsantrag %s gelöscht EXPENSE_REPORT_CREATEInDolibarr=Spesenabrechnung %s erstellt EXPENSE_REPORT_VALIDATEInDolibarr=Ausgabenbericht %s validiert EXPENSE_REPORT_APPROVEInDolibarr=Spesenabrechnung %s genehmigt @@ -113,14 +115,14 @@ BOM_CLOSEInDolibarr=Stückliste deaktiviert BOM_REOPENInDolibarr=Stückliste wiedereröffnet BOM_DELETEInDolibarr=Stückliste gelöscht MRP_MO_VALIDATEInDolibarr=Fertigungsauftrag freigegeben -MRP_MO_UNVALIDATEInDolibarr=Setze Fertigungsauftrag auf Status 'Entwurf' +MRP_MO_UNVALIDATEInDolibarr=Fertigungsauftrag auf Status 'Entwurf' gesetzt MRP_MO_PRODUCEDInDolibarr=Fertigungsauftrag produziert MRP_MO_DELETEInDolibarr=Fertigungsauftrag gelöscht MRP_MO_CANCELInDolibarr=Fertigungsauftrag storniert ##### End agenda events ##### AgendaModelModule=Dokumentvorlagen für Ereignisse DateActionStart=Beginnt -DateActionEnd=Endet +DateActionEnd=Ende AgendaUrlOptions1=Sie können die Ausgabe über folgende Parameter filtern: AgendaUrlOptions3=logina=%s begrenzt die Ausgabe auf den Benutzer %s erstellte Ereignissen. AgendaUrlOptionsNotAdmin=logina=!%s begrenzt die Ausgabe auf dem Benutzer %s nicht als Eigentümer zugewiesene Aktionen. @@ -130,12 +132,12 @@ AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto um automatische Eve AgendaUrlOptionsIncludeHolidays= includeseholidays = 1 , um Ereignisse von Feiertagen einzuschließen. AgendaShowBirthdayEvents=Geburtstage von Kontakten anzeigen AgendaHideBirthdayEvents=Geburtstage von Kontakten nicht anzeigen -Busy=Besetzt +Busy=Beschäftigt ExportDataset_event1=Liste Ereignisse des Kalender DefaultWorkingDays=Standard-Werktage der Woche (z.B. 1-5, 1-6) -DefaultWorkingHours=Reguläre Arbeitszeit pro Tag (z.B. 9-18) +DefaultWorkingHours=Reguläre Arbeitszeit pro Tag (z.B. 9-17) # External Sites ical -ExportCal=Export Kalender +ExportCal=Kalender exportieren ExtSites=Importieren von externen Kalendern ExtSitesEnableThisTool=Zeige externe Kalender (im globalen Setup definiert) in der Agenda. \nBetrifft nicht benutzerdefinierte externe Kalender. ExtSitesNbOfAgenda=Anzahl der Kalender @@ -155,6 +157,12 @@ EveryMonth=Jeden Monat DayOfMonth=Tag des Monat DayOfWeek=Tag der Woche DateStartPlusOne=Startdatum + 1 Stunde -SetAllEventsToTodo=Setze alle Ereignisse auf Status 'ToDo' -SetAllEventsToInProgress=Setze alle Ereignisse auf Status 'In Bearbeitung' +SetAllEventsToTodo=Setze alle Ereignisse auf Status 'zu erledigen' +SetAllEventsToInProgress=Setze alle Ereignisse auf Status 'in Bearbeitung' SetAllEventsToFinished=Setze alle Ereignisse auf Status 'Abgeschlossen' +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/de_DE/banks.lang b/htdocs/langs/de_DE/banks.lang index 7eeb4e7f05f..dd8f1a9db3e 100644 --- a/htdocs/langs/de_DE/banks.lang +++ b/htdocs/langs/de_DE/banks.lang @@ -37,7 +37,7 @@ IbanValid=Bankkonto gültig IbanNotValid=Bankkonto nicht gültig StandingOrders=Lastschriften StandingOrder=Lastschrift -PaymentByDirectDebit=Payment by direct debit +PaymentByDirectDebit=Zahlung per Lastschrift PaymentByBankTransfers=Zahlung per Überweisung PaymentByBankTransfer=Bezahlung per Überweisung AccountStatement=Kontoauszug diff --git a/htdocs/langs/de_DE/bills.lang b/htdocs/langs/de_DE/bills.lang index 1a542a7e675..43059614877 100644 --- a/htdocs/langs/de_DE/bills.lang +++ b/htdocs/langs/de_DE/bills.lang @@ -5,10 +5,10 @@ BillsCustomers=Kundenrechnungen BillsCustomer=Kundenrechnung BillsSuppliers=Lieferantenrechnungen BillsCustomersUnpaid=unbezahlte Kundenrechnungen -BillsCustomersUnpaidForCompany=Offene Kundenrechnungen von %s -BillsSuppliersUnpaid=Unbezahlte Lieferantenrechnungen +BillsCustomersUnpaidForCompany=offene Kundenrechnungen von %s +BillsSuppliersUnpaid=unbezahlte Lieferantenrechnungen BillsSuppliersUnpaidForCompany=Unbezahlte Rechnungen des Lieferanten %s -BillsLate=Verspätete Zahlungen +BillsLate=verspätete Zahlungen BillsStatistics=Statistik Kundenrechnungen BillsStatisticsSuppliers=Statistik Lieferantenrechnungen DisabledBecauseDispatchedInBookkeeping=Deaktiviert, da die Rechnung schon in die Buchhaltung übernommen wurde @@ -573,5 +573,5 @@ MaxNumberOfGenerationReached=Maximal Anzahl Generierungen erreicht BILL_DELETEInDolibarr=Rechnung gelöscht BILL_SUPPLIER_DELETEInDolibarr=Lieferantenrechnung gelöscht UnitPriceXQtyLessDiscount=Stückpreis x Anzahl - Rabatt -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area +CustomersInvoicesArea=Abrechnungsbereich Kunden +SupplierInvoicesArea=Abrechnungsbereich Lieferanten diff --git a/htdocs/langs/de_DE/boxes.lang b/htdocs/langs/de_DE/boxes.lang index 69626d33d65..b633a2ef019 100644 --- a/htdocs/langs/de_DE/boxes.lang +++ b/htdocs/langs/de_DE/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=zuletzt bearbeitete Lieferantenbestellungen BoxTitleLastModifiedCustomerBills=Zuletzt bearbeitete Kundenrechnungen (maximal %s) BoxTitleLastModifiedCustomerOrders=Zuletzt bearbeitete Kundenaufträge (maximal %s) BoxTitleLastModifiedPropals=Zuletzt bearbeitete Angebote (maximal %s) +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Kundenrechnungen ForCustomersOrders=Kundenaufträge ForProposals=Angebote @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Zwischenkonto ist nicht definiert BoxLastCustomerShipments=Letzte Kundenlieferungen BoxTitleLastCustomerShipments=Neueste %s Kundensendungen NoRecordedShipments=Keine erfasste Kundensendung +# Pages +AccountancyHome=Buchführung diff --git a/htdocs/langs/de_DE/cashdesk.lang b/htdocs/langs/de_DE/cashdesk.lang index df753f166bc..095e3d6e1f8 100644 --- a/htdocs/langs/de_DE/cashdesk.lang +++ b/htdocs/langs/de_DE/cashdesk.lang @@ -43,8 +43,8 @@ Place=Tisch TakeposConnectorNecesary='TakePOS Connector' erforderlich OrderPrinters=Bondrucker SearchProduct=Produkt suchen -Receipt=Beleg -Header=Header +Receipt=globale Druckeinstellungen +Header=Kopfzeile Footer=Fußzeile AmountAtEndOfPeriod=Betrag am Ende der Periode (Tag, Monat oder Jahr) TheoricalAmount=Theoretischer Betrag @@ -76,8 +76,8 @@ POSTerminal=POS-Terminal POSModule=POS-Modul BasicPhoneLayout=Verwenden Sie das Basislayout für Telefone SetupOfTerminalNotComplete=Die Einrichtung von Terminal %s ist nicht abgeschlossen -DirectPayment=Direkte Zahlung -DirectPaymentButton=Taste für direkte Barzahlung +DirectPayment=Direktzahlung +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Rechnung ist bereits geprüft NoLinesToBill=Keine Zeilen zu berechnen CustomReceipt=Benutzerdefinierte Quittung @@ -94,26 +94,31 @@ TakeposConnectorMethodDescription=Externes Modul mit zusätzlichen Funktionen. M PrintMethod=Druckmethode ReceiptPrinterMethodDescription=Leistungsstarke Methode mit vielen Parametern. Vollständig anpassbar mit Vorlagen. Kann nicht aus der Cloud drucken. ByTerminal=über Terminal -TakeposNumpadUsePaymentIcon=Verwenden Sie das Zahlungssymbol auf dem Nummernblock +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Nummerierungsmodul für POS-Verkäufe CashDeskGenericMaskCodes6 =  Das Tag
    {TN} wird zum Hinzufügen der Terminalnummer verwendet TakeposGroupSameProduct=Gruppieren Sie dieselben Produktlinien StartAParallelSale=Starten Sie einen neuen Parallelverkauf -ControlCashOpening=Kassenkontrolle bei POS-Öffnung +ControlCashOpening=Control cash box at opening POS CloseCashFence=Kasse schließen CashReport=Kassenbericht -MainPrinterToUse=Zu verwendender Hauptdrucker -OrderPrinterToUse=Drucker zur Verwendung bestellen -MainTemplateToUse=Hauptvorlage zu verwenden -OrderTemplateToUse=Bestellvorlage zur Verwendung +MainPrinterToUse=Quittungsdrucker +OrderPrinterToUse=Drucker für Bestellungen +MainTemplateToUse=Vorlage für Quittungsdrucker +OrderTemplateToUse=Vorlage für Bestelldrucker BarRestaurant=Bar Restaurant -AutoOrder=Order by the customer himself -RestaurantMenu=Menu -CustomerMenu=Customer menu -ScanToMenu=Scan QR code to see the menu -ScanToOrder=Scan QR code to order -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +AutoOrder=Bestellung durch den Kunden selbst +RestaurantMenu=Menü +CustomerMenu=Kundenmenü +ScanToMenu=Scannen Sie den QR-Code, um das Menü anzuzeigen +ScanToOrder=Scannen Sie den QR-Code auf Bestellung +Appearance=Aussehen +HideCategoryImages=Kategorie Bilder ausblenden +HideProductImages=Produktbilder ausblenden +NumberOfLinesToShow=Anzahl der anzuzeigenden Bildzeilen +DefineTablePlan=Tabellenplan definieren +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/de_DE/compta.lang b/htdocs/langs/de_DE/compta.lang index b2d9a2b4c1f..6d646740b35 100644 --- a/htdocs/langs/de_DE/compta.lang +++ b/htdocs/langs/de_DE/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Sozialabgabe oder Steuersatz SocialContributions= Steuern- oder Sozialabgaben SocialContributionsDeductibles=Abzugsberechtigte Sozialabgaben oder Steuern SocialContributionsNondeductibles=Nicht abzugsberechtigte Sozialabgaben oder Steuern +DateOfSocialContribution=Datum der Sozial- oder Fiskalsteuer LabelContrib=Beitrag Bezeichnung TypeContrib=Beitrag Typ MenuSpecialExpenses=Sonstige Ausgaben diff --git a/htdocs/langs/de_DE/contracts.lang b/htdocs/langs/de_DE/contracts.lang index 057d4dc37cf..1aa291c6ab2 100644 --- a/htdocs/langs/de_DE/contracts.lang +++ b/htdocs/langs/de_DE/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Laufende Leistungen MenuExpiredServices=Abgelaufene Leistungen MenuClosedServices=Geschlossene Services NewContract=Neuer Vertrag -NewContractSubscription=Neuer Vertrag/Abonnement +NewContractSubscription=Neuer Vertrag oder Abonnement AddContract=Vertrag erstellen DeleteAContract=Löschen eines Vertrages ActivateAllOnContract=Alle Dienstleistungen aktivieren @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Vertrag Nachbetreuung durch Vertreter TypeContact_contrat_external_BILLING=Rechnungskontakt des Kunden TypeContact_contrat_external_CUSTOMER=Nachbetreuung durch Kundenkontakt TypeContact_contrat_external_SALESREPSIGN=Vertragsunterzeichnung durch Kundenkontakt -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Verstecke beendete Dienste (standard) +ShowClosedServices=Zeige beendete Dienste +HideClosedServices=Verstecke beendete Dienste diff --git a/htdocs/langs/de_DE/errors.lang b/htdocs/langs/de_DE/errors.lang index a7972415afc..77988952bc9 100644 --- a/htdocs/langs/de_DE/errors.lang +++ b/htdocs/langs/de_DE/errors.lang @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Ungültige Syntax für Lieferantennummer. ErrorSupplierCodeRequired=Lieferantennummer notwendig ErrorSupplierCodeAlreadyUsed=Lieferanten Nr. bereits vergeben. ErrorBadParameters=Ungültige Werte -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Falsche oder fehlende Parameter ErrorBadValueForParameter=Ungültiger Wert '%s' für Paramter '%s' ErrorBadImageFormat=Bildformat nicht unsterstützt (Ihr PHP hat keine Konvertierungsfunktion für dieses Format) ErrorBadDateFormat=Eintrag '%s' hat falsche Datumsformat @@ -120,7 +120,7 @@ ErrorLoginHasNoEmail=Dieser Benutzer hat keine E-Mail-Adresse. Prozess abgebroch ErrorBadValueForCode=Sicherheitsschlüssel falsch ErrorBothFieldCantBeNegative=Die Felder %s und %s können nicht gleichzeitig negativ sein ErrorFieldCantBeNegativeOnInvoice=Das Feld %s darf für diesen Rechnungstyp nicht negativ sein. Wenn Sie eine Rabattzeile hinzufügen müssen, erstellen Sie zuerst den Rabatt (aus dem Feld '%s' auf der Karte eines Drittanbieters) und wenden Sie ihn dann auf die Rechnung an. -ErrorLinesCantBeNegativeForOneVATRate=Total of lines (net of tax) can't be negative for a given not null VAT rate (Found a negative total for VAT rate %s%%). +ErrorLinesCantBeNegativeForOneVATRate=Die Summe der Zeilen (nach Steuern) kann für einen bestimmten nicht null Mehrwertsteuersatz nicht negativ sein (Es wurde eine negative Summe für den Mehrwertsteuersatz %s %% gefunden). ErrorLinesCantBeNegativeOnDeposits=Zeilen in einer Anzahlung können nicht negativ sein. Es entstehen Probleme, wenn die Anzahlung in einer Rechnung verrechnet wird. ErrorQtyForCustomerInvoiceCantBeNegative=Mengen in Kundenrechnungen dürfen nicht negativ sein ErrorWebServerUserHasNotPermission=Der Benutzerkonto %s wurde verwendet um auf dem Webserver etwas auszuführen, hat aber keine Rechte dafür. @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Neuer Wert darf nicht altem Wert entsprechen ErrorFailedToValidatePasswordReset=Kennwort konnte nicht zurückgesetzt werden. Möglicherweise wurde dies bereits getan (dieser Link kann nur einmal verwendet werden). Wenn nicht, versuchen Sie den Rücksetz-Prozess neu zu starten. ErrorToConnectToMysqlCheckInstance=Verbindung zur Datenbank fehlgeschlagen. Prüfen Sie, ob der Mysql-Server läuft (in den meisten Fällen können Sie ihn von der Kommandozeile mit 'sudo service mysql start' starten). ErrorFailedToAddContact=Fehler beim Hinzufügen des Kontakts -ErrorDateMustBeBeforeToday=Das Datum kann nicht in der Zukunft sein +ErrorDateMustBeBeforeToday=Das Datum muss früher sein als heute +ErrorDateMustBeInFuture=Das Datum muss älter sein als heute ErrorPaymentModeDefinedToWithoutSetup=Eine Zahlungsart wurde auf Typ %s gesetzt, aber das Rechnungsmodul wurde noch nicht konfiguriert dies anzuzeigen. ErrorPHPNeedModule=Fehler, Ihr PHP muss das Modul %s installiert haben um diese Option zu benutzen. ErrorOpenIDSetupNotComplete=Sie haben im Dolibarr Konfigurationsfile eingestellt, dass die Anmeldung mit OpenID möglich ist, aber die URL zum OpenID Service ist noch nicht in %s definiert. @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Bestand nicht ausreichend f ErrorOnlyOneFieldForGroupByIsPossible=Nur ein Feld ist für 'Gruppieren nach' möglich (andere werden verworfen) ErrorTooManyDifferentValueForSelectedGroupBy=Es wurden zu viele unterschiedliche Werte (mehr als %s ) für das Feld ' %s ' gefunden um 'Gruppieren nach' anzuzeigen. Das Feld 'Gruppieren nach' wurde entfernt. Vielleicht wollten Sie es als X-Achse verwenden? ErrorReplaceStringEmpty=Fehler: die zu ersetzende Zeichenfolge ist leer +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Ihr PHP Parameter upload_max_filesize (%s) ist größer als Parameter post_max_size (%s). Dies ist eine inkonsistente Einstellung. WarningPasswordSetWithNoAccount=Es wurde ein Passwort für dieses Mitglied vergeben, aber kein Benutzer erstellt. Das Passwort wird gespeichert, aber kann nicht für die Anmeldung an Dolibarr verwendet werden. Es kann von einem externen Modul/einer Schnittstelle verwendet werden, aber wenn Sie kein Login oder Passwort für dieses Mitglied definiert müssen, können Sie die Option "Login für jedes Mitglied verwalten" in den Mitgliedseinstellungen deaktivieren. Wenn Sie ein Login aber kein Passwort benötige, lassen Sie dieses Feld leer, um diese Meldung zu deaktivieren. Anmerkung: Die E-Mail-Adresse kann auch zur Anmeldung verwendet werden, wenn das Mitglied mit einem Benutzer verbunden wird. @@ -265,4 +269,4 @@ WarningNumberOfRecipientIsRestrictedInMassAction=Achtung, die Anzahl der verschi WarningDateOfLineMustBeInExpenseReportRange=Das Datum dieser Positionszeile ist ausserhalb der Datumsspanne dieser Spesenabrechnung WarningProjectClosed=Projekt ist geschlossen. Sie müssen es zuerst wieder öffnen. WarningSomeBankTransactionByChequeWereRemovedAfter=Einige Bank-Transaktionen wurden entfernt, nachdem der Kassenbon, der diese enthielt, erzeugt wurde. Daher wird sich die Anzahl der Checks und die Endsumme auf dem Kassenbon von der Anzahl und Endsumme in der Liste unterscheiden. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +WarningFailedToAddFileIntoDatabaseIndex=Warnung, Dateieintrag zur ECM-Datenbankindextabelle konnte nicht hinzugefügt werden. diff --git a/htdocs/langs/de_DE/hrm.lang b/htdocs/langs/de_DE/hrm.lang index f5c3dfb7a5c..dcfae812e33 100644 --- a/htdocs/langs/de_DE/hrm.lang +++ b/htdocs/langs/de_DE/hrm.lang @@ -11,8 +11,8 @@ CloseEtablishment=Einrichtung schliessen # Dictionary DictionaryPublicHolidays=PV - Öffentliche Feiertage DictionaryDepartment=PV - Abteilungsliste -DictionaryFunction=HRM - Job positions +DictionaryFunction=HRM - Stellenangebote # Module -Employees=die Mitarbeiter +Employees=Mitarbeiter Employee=Mitarbeiter/in NewEmployee=neuer Mitarbeiter diff --git a/htdocs/langs/de_DE/install.lang b/htdocs/langs/de_DE/install.lang index 84260f8cc78..b38d1b4b6d9 100644 --- a/htdocs/langs/de_DE/install.lang +++ b/htdocs/langs/de_DE/install.lang @@ -218,6 +218,6 @@ ErrorFoundDuringMigration=Während des Migrationsprozesses wurden Fehler gemelde YouTryInstallDisabledByDirLock=Die Anwendung hat versucht, sich selbst zu aktualisieren, aber die Installations- / Aktualisierungsseiten wurden aus Sicherheitsgründen deaktiviert (Verzeichnis umbenannt mit .lock-Suffix).
    YouTryInstallDisabledByFileLock=Die Anwendung hat versucht, sich selbst zu aktualisieren, aber die Installations-/Upgrade-Seiten wurden aus Sicherheitsgründen deaktiviert (durch die Existenz einer Sperrdatei install.lock im Dokumenten-Verzeichnis).
    ClickHereToGoToApp=Hier klicken um zu Ihrer Anwendung zu kommen -ClickOnLinkOrRemoveManualy=If an upgrade is in progress, please wait. If not, click on the following link. If you always see this same page, you must remove/rename the file install.lock in the documents directory. +ClickOnLinkOrRemoveManualy=Wenn ein Upgrade durchgeführt wird, warten Sie bitte. Wenn nicht, klicken Sie auf den folgenden Link. Wenn Sie immer dieselbe Seite sehen, müssen Sie die Datei install.lock im Dokumentenverzeichnis entfernen / umbenennen. Loaded=Geladen FunctionTest=Funktionstest diff --git a/htdocs/langs/de_DE/languages.lang b/htdocs/langs/de_DE/languages.lang index 8f3d78eafb9..8cb1b4fe32c 100644 --- a/htdocs/langs/de_DE/languages.lang +++ b/htdocs/langs/de_DE/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopisch Language_ar_AR=Arabisch Language_ar_EG=Arabisch (Ägypten) Language_ar_SA=Arabisch +Language_az_AZ=Aserbaidschanisch Language_bn_BD=Bengali +Language_bn_IN=Bengali (Indien) Language_bg_BG=Bulgarisch Language_bs_BA=Bosnisch Language_ca_ES=Katalanisch @@ -20,6 +23,7 @@ Language_en_GB=Englisch (Großbritannien) Language_en_IN=Englisch (Indien) Language_en_NZ=Englisch (Neuseeland) Language_en_SA=Englisch (Saudi-Arabien) +Language_en_SG=Englisch (Singapur) Language_en_US=Englisch (USA) Language_en_ZA=Englisch (Südafrika) Language_es_ES=Spanisch @@ -29,6 +33,7 @@ Language_es_CL=Spanisch (Chile) Language_es_CO=Spanisch (Kolumbien) Language_es_DO=Spanisch (Dominikanische Republik) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanisch (Guatemala) Language_es_HN=Spanisch (Honduras) Language_es_MX=Spanisch (Mexiko) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanisch (Paraguay) Language_es_PE=Spanisch (Peru) Language_es_PR=Spanisch (Puerto Rico) Language_es_UY=Spanisch (Uruguay) +Language_es_GT=Spanisch (Guatemala) Language_es_VE=Spanisch (Venezuela) Language_et_EE=Estnisch Language_eu_ES=Baskisch @@ -44,15 +50,22 @@ Language_fi_FI=Finnisch Language_fr_BE=Französisch (Belgien) Language_fr_CA=Französisch (Kanada) Language_fr_CH=Französisch (Schweiz) +Language_fr_CI=Französisch (Elfenbeinküste) +Language_fr_CM=Französisch (Kamerun) Language_fr_FR=Französisch +Language_fr_GA=Französisch (Gabon) Language_fr_NC=Französisch (Neukaledonien) +Language_fr_SN=French (Senegal) Language_fy_NL=Friesisch +Language_gl_ES=Galizisch Language_he_IL=Hebräisch +Language_hi_IN=Hindi (Indien) Language_hr_HR=Kroatisch Language_hu_HU=Ungarisch Language_id_ID=Indonesisch Language_is_IS=Isländisch Language_it_IT=Italienisch +Language_it_CH=Italienisch (Schweiz) Language_ja_JP=Japanisch Language_ka_GE=Georgisch Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Litauisch Language_mk_MK=Mazedonisch Language_mn_MN=Mongolian Language_nb_NO=Norwegisch (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Niederländisch (Belgien) Language_nl_NL=Niederländisch Language_pl_PL=Polnisch @@ -86,4 +100,5 @@ Language_uz_UZ=Usbekisch Language_vi_VN=Vietnamesisch Language_zh_CN=Chinesisch Language_zh_TW=Chinesisch (Traditionell) +Language_zh_HK=Chinesisch (Hong Kong) Language_bh_MY=Malaiisch diff --git a/htdocs/langs/de_DE/loan.lang b/htdocs/langs/de_DE/loan.lang index e83223dd36d..fce87a5e38b 100644 --- a/htdocs/langs/de_DE/loan.lang +++ b/htdocs/langs/de_DE/loan.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - loan Loan=Kredit Loans=Kredite -NewLoan=Neuer Kredit -ShowLoan=Zeige Kredit -PaymentLoan=Kreditauszahlung -LoanPayment=Kreditauszahlung -ShowLoanPayment=Zeige Kreditauszahlung +NewLoan=neuer Kredit +ShowLoan=zeige Kredit +PaymentLoan=Kreditzahlung +LoanPayment=Kreditzahlung +ShowLoanPayment=zeige Kreditzahlung LoanCapital=Kapital Insurance=Versicherung -Interest=Zins +Interest=Zinsen Nbterms=Anzahl der Bedingungen Term=Bedingungen LoanAccountancyCapitalCode=Buchhaltungskonto Kapital @@ -21,11 +21,11 @@ LoanPaid=Kredit bezahlt ListLoanAssociatedProject=Liste der Darlehen in dem Projekt AddLoan=Darlehen erstellen FinancialCommitment=Finanzielle Verpflichtung -InterestAmount=Zins +InterestAmount=Zinsen CapitalRemain=Verbleibendes Kapital -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Diese Laufzeit ist bereits bezahlt +CantUseScheduleWithLoanStartedToPaid = Der Scheduler kann nicht für ein Darlehen verwendet werden, bei dem die Zahlung gestartet wurde. +CantModifyInterestIfScheduleIsUsed = Sie können die Zinsen nicht ändern, wenn Sie den Zeitplan verwenden. # Admin ConfigLoan=Konfiguration des Modul Kredite LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Standard-Buchhaltungskonto Kapital diff --git a/htdocs/langs/de_DE/mails.lang b/htdocs/langs/de_DE/mails.lang index 43b147f90a6..413cb8e07f1 100644 --- a/htdocs/langs/de_DE/mails.lang +++ b/htdocs/langs/de_DE/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Einrichtung ausgehender E-Mails (für Modul %s) DefaultOutgoingEmailSetup=Standardeinstellungen für ausgehende E-Mails Information=Information ContactsWithThirdpartyFilter=Kontakte mit Drittanbieter-Filter +Unanswered=Unanswered +Answered=Beantwortet +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/de_DE/main.lang b/htdocs/langs/de_DE/main.lang index 72d62e9e4de..24a97f6c837 100644 --- a/htdocs/langs/de_DE/main.lang +++ b/htdocs/langs/de_DE/main.lang @@ -355,8 +355,8 @@ PriceUTTC=St.-Pr. (inkl. Steuern) Amount=Betrag AmountInvoice=Rechnungsbetrag AmountInvoiced=berechneter Betrag -AmountInvoicedHT=Rechnungsbetrag (inkl. MwSt.) -AmountInvoicedTTC=Rechnungsbetrag (ohne MwSt.) +AmountInvoicedHT=Rechnungsbetrag (ohne MwSt.) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Zahlungsbetrag AmountHTShort=Nettobetrag AmountTTCShort=Bruttobetrag @@ -485,6 +485,7 @@ Categories=Kategorien Category=Suchwort/Kategorie By=Durch From=Von +FromDate=von FromLocation=von to=An To=An @@ -658,7 +659,7 @@ TextUsedInTheMessageBody=E-Mail Text SendAcknowledgementByMail=Bestätigungsmail senden SendMail=E-Mail versenden Email=E-Mail -NoEMail=Keine E-Mail +NoEMail=Keine E-Mail-Adresse(n) vorhanden AlreadyRead=Bereits gelesen NotRead=Nicht gelesen NoMobilePhone=Kein Handy @@ -687,6 +688,7 @@ Method=Methode Receive=Erhalten CompleteOrNoMoreReceptionExpected=Vollständig oder nichts mehr erwartet ExpectedValue=Erwarteter Wert +ExpectedQty=Expected Qty PartialWoman=Teilweise TotalWoman=Vollständig NeverReceived=Nie erhalten @@ -703,6 +705,7 @@ MenuECM=Dokumente MenuAWStats=Statistiken MenuMembers=Mitglieder MenuAgendaGoogle=Google-Agenda +MenuTaxesAndSpecialExpenses=Steuern | Sonderausgaben ThisLimitIsDefinedInSetup=Gesetzte Dolibarr-Limits (Menü Start-Einstellungen-Sicherheit): %s Kb, PHP Limit: %s Kb NoFileFound=Keine Dokumente in diesem Verzeichnis CurrentUserLanguage=Aktuelle Benutzersprache @@ -725,7 +728,7 @@ Page=Seite Notes=Hinweise AddNewLine=Neue Zeile hinzufügen AddFile=Datei hinzufügen -FreeZone=Freier Text +FreeZone=Freitextprodukt FreeLineOfType=Freitextelement, Typ: CloneMainAttributes=Objekt mit Haupteigenschaften duplizieren ReGeneratePDF=PDF neu erstellen @@ -942,6 +945,39 @@ ShortThursday=Do ShortFriday=Fr ShortSaturday=Sa ShortSunday=So +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Wähle E-Mail-Vorlage SetRef=Set Ref Select2ResultFoundUseArrows=Einige Ergebnisse gefunden. Nutzen Sie die Pfeiltasten um auszuwählen. @@ -1037,5 +1073,13 @@ DeleteFileText=Möchten Sie diese Datei wirklich löschen? ShowOtherLanguages=Andere Sprachen anzeigen SwitchInEditModeToAddTranslation=Wechseln Sie in den Bearbeitungsmodus, um Übersetzungen für diese Sprache hinzuzufügen NotUsedForThisCustomer=Wird für diesen Kunden nicht verwendet -AmountMustBePositive=Amount must be positive -ByStatus=By status +AmountMustBePositive=Der Betrag muss positiv sein +ByStatus=Nach Status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/de_DE/members.lang b/htdocs/langs/de_DE/members.lang index 4ebec8377c0..a500c379f9a 100644 --- a/htdocs/langs/de_DE/members.lang +++ b/htdocs/langs/de_DE/members.lang @@ -77,11 +77,11 @@ NoTypeDefinedGoToSetup=Sie haben noch keine Mitgliedsart definiert.\nSie können NewMemberType=Neue Mitgliedsart WelcomeEMail=Willkommen per E-Mail SubscriptionRequired=Beitrag erforderlich -DeleteType=Lösche Gruppe +DeleteType=Löschen VoteAllowed=Stimmrecht Physical=natürliche Person Moral=juristische Person -MorPhy=juristisch/natürlich +MorPhy=Art Reenable=Reaktivieren ResiliateMember=Mitglied deaktivieren ConfirmResiliateMember=Möchten Sie dieses Mitglied wirklich deaktivieren? @@ -176,15 +176,15 @@ MenuMembersStats=Statistik LastMemberDate=Letztes Mitgliedschaftsdatum LatestSubscriptionDate=Letztes Beitragsdatum MemberNature=Art des Mitglieds -Public=Informationen sind öffentlich (nein = privat) +Public=Informationen sind öffentlich NewMemberbyWeb=Neues Mitglied hinzugefügt, wartet auf Genehmigung. NewMemberForm=Formular neues Mitglied SubscriptionsStatistics=Statistik der Beiträge NbOfSubscriptions=Anzahl der Beiträge AmountOfSubscriptions=Betrag der Beiträge TurnoverOrBudget=Umsatz (Firma) oder Budget (Verein/Stiftung) -DefaultAmount=Standardbetrag für den Beitrag -CanEditAmount=Besucher können die Beitragshöhe auswählen oder ändern +DefaultAmount=Standardhöhe des Mitgliedsbeitrags +CanEditAmount=Besucher können die Höhe des Mitgliedsbeitrags anpassen MEMBER_NEWFORM_PAYONLINE=Zur integrierten Bezahlseite gehen ByProperties=Natürlich MembersStatisticsByProperties=Natürliche Mitgliederstatistiken @@ -192,7 +192,7 @@ MembersByNature=Anzeige der Mitgliederstatistiken MembersByRegion=Anzeige der Mitgliederstatistiken nach Regionen. VATToUseForSubscriptions=Mehrwertsteuersatz für Beitrag NoVatOnSubscription=Beitrag ohne Mehrwertsteuer -ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Produkt/Leistung verwendet für den Beitrag in der Rechnungszeile: %s +ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Verwendete(s) Produkt / Leistung für den Beitrag in der Rechnungszeile: %s NameOrCompany=Name oder Firma SubscriptionRecorded=Beitrag erfasst NoEmailSentToMember=Keine E-Mail an Mitglied gesendet diff --git a/htdocs/langs/de_DE/modulebuilder.lang b/htdocs/langs/de_DE/modulebuilder.lang index 9b189cac632..04d3f86d971 100644 --- a/htdocs/langs/de_DE/modulebuilder.lang +++ b/htdocs/langs/de_DE/modulebuilder.lang @@ -18,19 +18,19 @@ ModuleBuilderDescobjects=Definieren Sie hier die Objekte, die Sie mit Ihrem Modu ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module. ModuleBuilderDescpermissions=Diese Registerkarte dient zur Definition der neuen Berechtigungen, die Sie mit Ihrem Modul bereitstellen möchten. ModuleBuilderDesctriggers=Dies ist die Ansicht der von Ihrem Modul bereitgestellten Trigger. Um Code einzufügen, der beim Start eines ausgelösten Ereignisses ausgeführt wird, bearbeiten Sie einfach diese Datei. -ModuleBuilderDeschooks=This tab is dedicated to hooks. -ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets. +ModuleBuilderDeschooks=Registerkarte zum Verwalten von Hooks +ModuleBuilderDescwidgets=Diese Registerkarte dient zum Verwalten / Erstellen von Widgets. ModuleBuilderDescbuildpackage=Sie können hier eine "ready to distribute" Paketdatei (eine normalisierte.zip-Datei) Ihres Moduls und eine "ready to distribute" Dokumentationsdatei erzeugen. Klicken Sie einfach auf die Schaltfläche, um das Paket oder die Dokumentationsdatei zu erstellen. EnterNameOfModuleToDeleteDesc=Sie können Ihr Modul löschen. WARNUNG: Alle Codedateien des Moduls (generiert oder manuell erstellt) UND strukturierte Daten und Dokumentationen werden gelöscht! EnterNameOfObjectToDeleteDesc=Sie können ein Objekt löschen. WARNUNG: Alle Codedateien (generiert oder manuell erstellt), die sich auf das Objekt beziehen, werden gelöscht! DangerZone=Gefahrenzone -BuildPackage=Packet erstellen +BuildPackage=Paket erstellen BuildPackageDesc=Sie können ein Zip-Paket Ihrer Anwendung erstellen, um es auf Dolibarr-Installationen verteilen können. Sie können es auch vertreiben oder auf einem Marktplatz wie DoliStore.com verkaufen. BuildDocumentation=Dokumentation erstellen ModuleIsNotActive=Dieses Modul ist noch nicht aktiviert. Gehe zu %s zum aktivieren oder klicke hier ModuleIsLive=Dieses Modul wurde aktiviert. Jede Änderung kann aktuelle Live-Funktionen beeinträchtigen. -DescriptionLong=Long description -EditorName=Name of editor +DescriptionLong=Lange Beschreibung +EditorName=Name des Erstellers EditorUrl=URL of editor DescriptorFile=Descriptor file of module ClassFile=File for PHP DAO CRUD class @@ -43,7 +43,7 @@ PageForNoteTab=PHP page for note tab PathToModulePackage=Pfad des zu komprimierenden Moduls/Anwendungspakets PathToModuleDocumentation=Pfad zur Datei der Modul- / Anwendungsdokumentation (%s) SpaceOrSpecialCharAreNotAllowed=Leer- oder Sonderzeichen sind nicht erlaubt. -FileNotYetGenerated=File not yet generated +FileNotYetGenerated=Datei noch nicht generiert RegenerateClassAndSql=Erzwinge die Aktualisierung von .class und .sql Dateien RegenerateMissingFiles=Generate missing files SpecificationFile=Dokumentationsdatei @@ -65,7 +65,7 @@ JSFile=Javascript-Datei ReadmeFile=Readme Datei ChangeLog=ChangeLog Datei TestClassFile=Datei für PHP Unit Testklasse -SqlFile=Sql Datei +SqlFile=SQL Datei PageForLib=Datei für die gemeinsame PHP-Bibliothek PageForObjLib=Datei für die Objekt-PHP-Bibliothek SqlFileExtraFields=SQL Datei für zusätzliche Eigenschaften @@ -73,7 +73,7 @@ SqlFileKey=SQL Datei für Schlüsselwerte SqlFileKeyExtraFields=SQL-Datei für die Schlüssel der Extrafields AnObjectAlreadyExistWithThisNameAndDiffCase=An object already exists with this name and a different case UseAsciiDocFormat=Sie können das Markdown-Format verwenden, empfohlen wird jedoch, das Asciidoc-Format zu verwenden (Vergleich zwischen .md und .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) -IsAMeasure=Is a measure +IsAMeasure=Ist eine Maßnahme DirScanned=Verzeichnis gescannt NoTrigger=Kein Trigger NoWidget=Kein Widget @@ -100,7 +100,7 @@ HooksDefDesc=Definieren Sie in der Eigenschaft module_parts ['hooks'] i TriggerDefDesc=Define in the trigger file the code you want to execute for each business event executed. SeeIDsInUse=Zeige die ID's die in Ihrer Installation verwendet werden SeeReservedIDsRangeHere=Zeige die reservierten ID Bereiche -ToolkitForDevelopers=Toolir für Dolibarr Entwickler +ToolkitForDevelopers=Toolkit für Dolibarr Entwickler TryToUseTheModuleBuilder=Sind Kenntnisse in SQL und PHP vorhanden, können Sie den Assistenten zum Erstellen nativer Module verwenden.
    Aktivieren Sie das Modul %s und verwenden Sie den Assistenten, indem Sie oben rechts auf klicken.
    Warnung: Dies ist eine erweiterte Entwicklerfunktion. Keine Experimente auf Produktivseiten! SeeTopRightMenu=Siehe im Menü Oben Rechts AddLanguageFile=Sprachdatei hinzufügen @@ -108,7 +108,7 @@ YouCanUseTranslationKey=You can use here a key that is the translation key found DropTableIfEmpty=(Tabelle löschen wenn leer) TableDoesNotExists=Die Tabelle %s existiert nicht TableDropped=Tabelle %s gelöscht -InitStructureFromExistingTable=Build the structure array string of an existing table +InitStructureFromExistingTable=Erstelle die Struktur-Array-Zeichenfolge einer vorhandenen Tabelle UseAboutPage=About-Seite deaktivieren UseDocFolder=Deaktiviere den Dokumentationsordner UseSpecificReadme=Ein spezifisches Readme verwenden @@ -139,4 +139,4 @@ ForeignKey=Unbekannter Schlüssel TypeOfFieldsHelp=Feldtypen:
    varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' heißt, wir ergänzen eine + Schaltfläche nach der Kombobox, um den Eintrag zu erstellen, 'filter' kann sein 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' zum Beispiel) AsciiToHtmlConverter=Ascii zu HTML Konverter AsciiToPdfConverter=Ascii zu PDF Konverter -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. +TableNotEmptyDropCanceled=Tabelle nicht leer. Löschen wurde abgebrochen. diff --git a/htdocs/langs/de_DE/mrp.lang b/htdocs/langs/de_DE/mrp.lang index b99efb6f04f..abb37ad22ba 100644 --- a/htdocs/langs/de_DE/mrp.lang +++ b/htdocs/langs/de_DE/mrp.lang @@ -1,5 +1,6 @@ Mrp=Fertigungsaufträge MO=Fertigungsauftrag +MOs=Manufacturing orders MRPDescription=Modul zur Verwaltung von Produktions- und Fertigungsaufträgen (MO). MRPArea=MRP Bereich MrpSetupPage=Einrichtung des Moduls MRP diff --git a/htdocs/langs/de_DE/opensurvey.lang b/htdocs/langs/de_DE/opensurvey.lang index 146e47c971d..7825d264d61 100644 --- a/htdocs/langs/de_DE/opensurvey.lang +++ b/htdocs/langs/de_DE/opensurvey.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - opensurvey Survey=Umfrage Surveys=Umfragen -OrganizeYourMeetingEasily=Organisieren Sie Ihre Meetings und Umfragen ganz einfach. \nWählen Sie zuerst die Art der Umfrage ... +OrganizeYourMeetingEasily=Lassen Sie über Termine und andere Optionen ganz einfach abstimmen. Bitte wählen Sie zuerst den Umfragen-Typ: NewSurvey=Neue Umfrage OpenSurveyArea=Umfragen-Übersicht AddACommentForPoll=Hier können Sie einen Kommentar zur Umfrage hinzufügen: @@ -21,17 +21,17 @@ TheBestChoices=Die besten Optionen / Möglichkeiten sind momentan with=mit OpenSurveyHowTo=Wenn Sie an dieser Abstimmung teilnehmen möchten, tragen Sie Ihren Namen ein, wählen Sie die für Sie beste Option / Möglichkeit und bestätigen mit dem Plus-Zeichen am Ende der Zeile. CommentsOfVoters=Kommentare der Teilnehmer -ConfirmRemovalOfPoll=Sind Sie sicher, dass Sie diese Umfrage löschen wollen (inklusive aller gespeicherten Stimmen) -RemovePoll=Entferne Umfrage +ConfirmRemovalOfPoll=Sind Sie sicher, dass Sie diese Umfrage inklusive aller gespeicherten Stimmen löschen wollen? +RemovePoll=Umfrage löschen UrlForSurvey=URL für einen Direktzugriff auf die Umfrage PollOnChoice=Sie erstellen eine Multiple-Choice-Umfrage. Geben Sie alle möglichen Varianten für die Abstimmung ein und wählen Sie den gewünschten Typ. CreateSurveyDate=Erstelle Datums-Umfrage CreateSurveyStandard=Erstelle Standard-Umfrage CheckBox=Einfaches Kontrollkästchen YesNoList=Liste (leer/ja/nein) -PourContreList=Liste (leer/dafür/dagegen) +PourContreList=Liste ([leer]/dafür/dagegen) AddNewColumn=Neue Spalte hinzufügen -TitleChoice=Beschreibung wählen +TitleChoice=Option ExportSpreadsheet=Exportiere Abstimmungsergebnis ExpireDate=Frist NbOfSurveys=Anzahl an Umfragen diff --git a/htdocs/langs/de_DE/orders.lang b/htdocs/langs/de_DE/orders.lang index 58a72f1e1f8..042c7fe53c8 100644 --- a/htdocs/langs/de_DE/orders.lang +++ b/htdocs/langs/de_DE/orders.lang @@ -103,8 +103,8 @@ DraftSuppliersOrders=Entwürfe Lieferantenbestellungen OnProcessOrders=Bestellungen in Bearbeitung RefOrder=Bestell-Nr. RefCustomerOrder=Kunden-BestellNr. -RefOrderSupplier=Bestell Nr. für Lieferant -RefOrderSupplierShort=Lieferanten-BestellNr. +RefOrderSupplier=Best.-Nr. für Lieferant +RefOrderSupplierShort=Lieferanten-Best.-Nr. SendOrderByMail=Bestellung per Post versenden ActionsOnOrder=Ereignisse zu dieser Bestellung NoArticleOfTypeProduct=Keine Artikel vom Typ 'Produkt' und deshalb keine Versandkostenposition diff --git a/htdocs/langs/de_DE/other.lang b/htdocs/langs/de_DE/other.lang index 8d226cac1cc..49c7e511d24 100644 --- a/htdocs/langs/de_DE/other.lang +++ b/htdocs/langs/de_DE/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hallo)__\n\nBitte entnehmen Sie dem An PredefinedMailContentSendSupplierInvoice=__(Hallo)__\n\nAnbei erhalten Sie die Rechnung __REF__\n\n\n__(Mit freundlichen Grüßen)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hallo)__\n\nAls Anlage erhalten Sie unsere Lieferung \n\n\n__(Mit freundlichen Grüßen)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hallo)__\n\nBitte finden Sie den Serviceauftrag __REF__ im Anhang\n\n\n__(Mit freundlichen Grüßen)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Sie können den folgenden Link anklicken um die Zahlung auszuführen, falls sie noch nicht getätigt wurde.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr ist eine Management-Software die mehrere Business-Module anbietet. Eine Demo, die alle Module beinhaltet ist nicht sinnvoll , weil der Fall nie existiert (Hunderte von verfügbaren Module). Es stehen auch einige Demo-Profile Typen zur Verfügung. ChooseYourDemoProfil=Bitte wählen Sie das Demo-Profil das Ihrem Anwendgsfall am ehesten entspricht ChooseYourDemoProfilMore=...oder bauen Sie Ihr eigenes Profil
    (manuelle Auswahl der Module) @@ -280,7 +278,9 @@ LinesToImport=Positionen zum importieren MemoryUsage=Speichernutzung RequestDuration=Dauer der Anfrage +ProductsPerPopularity=Products/Services by popularity PopuProp=Produkte / Dienstleistungen nach Beliebtheit in Angeboten PopuCom=Produkte / Dienstleistungen nach Beliebtheit in Bestellungen ProductStatistics=Produkt- / Dienstleistungsstatistik NbOfQtyInOrders=Menge in Bestellungen +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/de_DE/products.lang b/htdocs/langs/de_DE/products.lang index a9a2266b6c3..b3b7d721c8a 100644 --- a/htdocs/langs/de_DE/products.lang +++ b/htdocs/langs/de_DE/products.lang @@ -73,7 +73,7 @@ SellingPrice=Verkaufspreis SellingPriceHT=Verkaufspreis (ohne Steuern) SellingPriceTTC=Verkaufspreis (inkl. USt.) SellingMinPriceTTC=Mindest-Verkaufspreis (inkl. MwSt.) -CostPriceDescription=In diesem Preisfeld (ohne MwSt.) Können Sie den Durchschnittsbetrag speichern, den dieses Produkt für Ihr Unternehmen kostet. Dies kann jeder Preis sein, den Sie selbst berechnen, beispielsweise aus dem durchschnittlichen Einkaufspreis zuzüglich der durchschnittlichen Produktions- und Vertriebskosten. +CostPriceDescription=In diesem Preisfeld (ohne MwSt.) können Sie den Durchschnittsbetrag speichern, den dieses Produkt Ihr Unternehmen kostet. Dies kann jeder Preis sein, den Sie selbst berechnen, beispielsweise aus dem durchschnittlichen Einkaufspreis zuzüglich der durchschnittlichen Produktions- und Vertriebskosten. CostPriceUsage=Dieser Wert könnte für Margenberechnung genutzt werden. SoldAmount=Verkaufte Menge PurchasedAmount=angeschaffte Menge @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Wählen Sie den standardmäßigen Barcode-Typ BarcodeValue=Barcode-Wert NoteNotVisibleOnBill=Anmerkung (nicht sichtbar auf Rechnungen, Angeboten,...) ServiceLimitedDuration=Ist die Erbringung einer Dienstleistung zeitlich beschränkt: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Mehrere Preissegmente pro Produkt / Dienstleistung (jeder Kunde befindet sich in einem Preissegment) MultiPricesNumPrices=Anzahl Preise DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,11 +170,13 @@ SuppliersPricesOfProductsOrServices=Herstellerpreise (von Produkten oder Dienstl CustomCode=Zolltarifnummer CountryOrigin=Urspungsland Nature=Produkttyp (Material / Fertig) +NatureOfProductShort=Art des Produkts +NatureOfProductDesc=Rohstoff oder Fertigprodukt ShortLabel=Kurzbezeichnung Unit=Einheit p=u. -set=gesetzt -se=gesetzt +set=set +se=set second=Sekunde s=s hour=Stunde @@ -192,7 +195,7 @@ m3=m³ liter=Liter l=L unitP=Stück -unitSET=Set +unitSET=Zusammenstellung unitS=Sekunden unitH=Stunden unitD=Tag @@ -359,6 +362,9 @@ SelectCombination=Kombination wählen ProductCombinationGenerator=Varianten-Generator Features=Funktionen PriceImpact=Auswirkungen auf die Preise +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Auswirkungen auf Gewicht NewProductAttribute=Neues Attribut NewProductAttributeValue=Wert des neuen Attributs diff --git a/htdocs/langs/de_DE/projects.lang b/htdocs/langs/de_DE/projects.lang index 346fad6180e..9b5ba8768f6 100644 --- a/htdocs/langs/de_DE/projects.lang +++ b/htdocs/langs/de_DE/projects.lang @@ -7,7 +7,7 @@ ProjectsArea=Projekte - Übersicht ProjectStatus=Projekt Status SharedProject=Jeder PrivateProject=Projektkontakte -ProjectsImContactFor=Projects for which I am explicitly a contact +ProjectsImContactFor=Projekte, für die ich ausdrücklich ein Ansprechpartner bin AllAllowedProjects=Alle Projekte die ich sehen kann (eigene + öffentliche) AllProjects=alle Projekte MyProjectsDesc=Ansicht beschränkt auf Projekte mit mir als Ansprechpartner @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Mitwirkender TypeContact_project_task_external_TASKCONTRIBUTOR=Mitwirkender SelectElement=Element wählen AddElement=Mit Element verknüpfen +LinkToElementShort=Link zu # Documents models DocumentModelBeluga=Projektdokumentvorlage für eine Übersicht der verknüpften Objekte DocumentModelBaleine=Projektdokumentvorlage für Aufgaben @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Anzahl der erstellten Projekte pro Monat ProjectNbTaskByMonth=Anzahl der erstellten Aufgaben pro Monat ProjectOppAmountOfProjectsByMonth=Anzahl der Leads pro Monat ProjectWeightedOppAmountOfProjectsByMonth=Gewichtete Anzahl von Leads pro Monat -ProjectOpenedProjectByOppStatus=Projekt / Lead nach Leadstatus öffnen -ProjectsStatistics=Statistik über Projekte und Leads -TasksStatistics=Statistik über Projekte und Lead Aufgaben +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Aufgabe zugewiesen. Eingabe der Zeit zu diese Aufgabe sollte möglich sein. IdTaskTime=ID Zeit Aufgabe YouCanCompleteRef=Wenn die Referenz mit einem Suffix ergänzt werden soll, ist es empfehlenswert, ein Trennstrich '-' zu verwenden, so dass die automatische Numerierung für weitere Projekte funktioniert. Zum Beispiel %s-MYSUFFIX @@ -265,4 +266,4 @@ NewInvoice=Neue Rechnung OneLinePerTask=Eine Zeile pro Aufgabe OneLinePerPeriod=Eine Zeile pro Zeitraum RefTaskParent=Übergeordnete Aufgabe -ProfitIsCalculatedWith=Profit is calculated using +ProfitIsCalculatedWith=Der Gewinn wird berechnet mit diff --git a/htdocs/langs/de_DE/propal.lang b/htdocs/langs/de_DE/propal.lang index b3918b87ca6..0956cf4900f 100644 --- a/htdocs/langs/de_DE/propal.lang +++ b/htdocs/langs/de_DE/propal.lang @@ -34,7 +34,7 @@ PropalStatusNotSigned=Nicht unterzeichnet (geschlossen) PropalStatusBilled=Verrechnet PropalStatusDraftShort=Entwurf PropalStatusValidatedShort=Bestätigt (offen) -PropalStatusClosedShort=Geschlossen +PropalStatusClosedShort=geschlossen PropalStatusSignedShort=beauftragt PropalStatusNotSignedShort=abgelehnt PropalStatusBilledShort=Verrechnet @@ -84,4 +84,8 @@ DefaultModelPropalClosed=Standard Schablone wenn sie ein Geschäftsangebot schli ProposalCustomerSignature=Bei Beauftragung: Name in Klarschrift, Ort, Datum, Unterschrift ProposalsStatisticsSuppliers=Statistik Lieferantenanfragen CaseFollowedBy=Fall gefolgt von -SignedOnly=Signed only +SignedOnly=nur signiert +IdProposal=Angebots-ID +IdProduct=Produkt ID +PrParentLine=Übergeordnete Zeile des Vorschlags +LineBuyPriceHT=Kaufpreis Betrag abzüglich Steuern für Linie diff --git a/htdocs/langs/de_DE/receiptprinter.lang b/htdocs/langs/de_DE/receiptprinter.lang index e496b5877b6..dd8f3e068d1 100644 --- a/htdocs/langs/de_DE/receiptprinter.lang +++ b/htdocs/langs/de_DE/receiptprinter.lang @@ -3,12 +3,12 @@ ReceiptPrinterSetup=Einstellungen für das Quittungsdrucker-Modul PrinterAdded=Drucker %s zugefügt PrinterUpdated=Drucker %s geändert PrinterDeleted=Drucker %s gelöscht -TestSentToPrinter=Sende Test zu Drucker %s +TestSentToPrinter=Sende Testseite zu Drucker %s ReceiptPrinter=Quittungsdrucker ReceiptPrinterDesc=Einstellungen Quittungsdrucker ReceiptPrinterTemplateDesc=Einrichtung von Vorlagen -ReceiptPrinterTypeDesc=Beschreibung des Typs des Quittungsdruckers -ReceiptPrinterProfileDesc=Beschreibung des Profils des Quittungsdruckers +ReceiptPrinterTypeDesc=Einzustellende Parameter nach Druckertyp +ReceiptPrinterProfileDesc=Auswahlhilfe für die Dropdown-Liste "Profile" ListPrinters=Druckerliste SetupReceiptTemplate=Vorlagen Setup CONNECTOR_DUMMY=Dummy Drucker diff --git a/htdocs/langs/de_DE/recruitment.lang b/htdocs/langs/de_DE/recruitment.lang new file mode 100644 index 00000000000..18910b48d3d --- /dev/null +++ b/htdocs/langs/de_DE/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Rekrutierung +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Einstellungen +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Über +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Arbeitsplatz +DateExpected=Erwartetes Datum +FutureManager=Zukünftiger Manager +ResponsibleOfRecruitement=Verantwortlich für die Rekrutierung +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Zu besetzendes Stellenangebot +PositionsToBeFilled=Zu besetzende Stellenangebote +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Zu besetzendes Stellenangebot +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/de_DE/sendings.lang b/htdocs/langs/de_DE/sendings.lang index 1f06b8460f2..71c8092fb07 100644 --- a/htdocs/langs/de_DE/sendings.lang +++ b/htdocs/langs/de_DE/sendings.lang @@ -36,7 +36,7 @@ StatusSendingProcessed=Verarbeitete StatusSendingDraftShort=Entwurf StatusSendingValidatedShort=Freigegeben StatusSendingProcessedShort=Fertig -SendingSheet=Auslieferungen +SendingSheet=Lieferschein ConfirmDeleteSending=Möchten Sie diesen Versand wirklich löschen? ConfirmValidateSending=Möchten Sie diesen Versand mit der Referenz %s wirklich freigeben? ConfirmCancelSending=Möchten Sie diesen Versand wirklich abbrechen? diff --git a/htdocs/langs/de_DE/stocks.lang b/htdocs/langs/de_DE/stocks.lang index be581d24234..c134bf06907 100644 --- a/htdocs/langs/de_DE/stocks.lang +++ b/htdocs/langs/de_DE/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Lieferung stornieren DeleteSending=Lieferung löschen Stock=Warenbestand Stocks=Warenbestände -MissingStocks=Missing stocks -StockAtDate=Stock at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Fehlende Bestände +StockAtDate=Lagerbestände zum Datum +StockAtDateInPast=Datum in der Vergangenheit +StockAtDateInFuture=Datum in der Zukunft StocksByLotSerial=Lagerbestand nach Chargen-/Seriennummer LotSerial=Chargen/Serien-Nummern LotSerialList=Liste der Chargen-/Seriennummern @@ -34,7 +34,7 @@ StockMovementForId=Lagerbewegung Nr. %d ListMouvementStockProject=Lagerbewegungen für Projekt StocksArea=Warenlager - Übersicht AllWarehouses=Alle Warenlager -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock=Schließen Sie auch undefinierten gewünschten Bestand ein IncludeAlsoDraftOrders=Fügen Sie auch Auftragsentwürfe hinzu Location=Standort LocationSummary=Kurzbezeichnung Standort @@ -61,11 +61,11 @@ PMPValueShort=DSWP EnhancedValueOfWarehouses=Lagerwert UserWarehouseAutoCreate=Automatisch ein Lager erstellen wenn ein neuer Benutzer erstellt wird AllowAddLimitStockByWarehouse=Verwalten Sie zusätzlich zum Wert für den Mindest- und den gewünschten Bestand pro Paar (Produktlager) auch den Wert für den Mindest- und den gewünschten Bestand pro Produkt -RuleForWarehouse=Rule for warehouses -WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders -UserDefaultWarehouse=Set a warehouse on Users +RuleForWarehouse=Regel für Lager +WarehouseAskWarehouseDuringOrder=Legen Sie ein Lager für Verkaufsaufträge fest +UserDefaultWarehouse=Legen Sie ein Lager für Benutzer fest MainDefaultWarehouse=Standardlager -MainDefaultWarehouseUser=Use a default warehouse for each user +MainDefaultWarehouseUser=Verwenden Sie für jeden Benutzer ein Standardlager MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. IndependantSubProductStock=Produkt- und Unterproduktbestände sind unabhängig voneinander QtyDispatched=Versandmenge @@ -95,14 +95,16 @@ RealStock=Realer Bestand RealStockDesc=Der aktuelle Lagerbestand ist die Stückzahl, die aktuell und physikalisch in Ihren Warenlagern vorhanden ist. RealStockWillAutomaticallyWhen=Der reale Bestand wird gemäß dieser Regel geändert (wie im Bestandsmodul definiert): VirtualStock=Theoretischer Lagerbestand -VirtualStockDesc=Der virtuelle Bestand entspricht dem berechnete Bestand, der dann verfügbar ist, wenn alle offenen / anstehenden Aktionen (mit Bestandsauswirkung) abgeschlossen sind (Bestellungen erhalten, Kundenaufträge versendet usw.). +VirtualStockAtDate=Virtueller Bestand zum Datum +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Warenlager ID DescWareHouse=Beschreibung Warenlager LieuWareHouse=Standort Warenlager WarehousesAndProducts=Warenlager und Produkte WarehousesAndProductsBatchDetail=Warenlager und Produkte (mit Detail per lot / serial) -AverageUnitPricePMPShort=Gewogener durchschnittlicher Einkaufspreis -AverageUnitPricePMP=Gewogener durchschnittlicher Einkaufspreis +AverageUnitPricePMPShort=Gewichteter Warenwert +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Verkaufspreis EstimatedStockValueSellShort=Verkaufswert EstimatedStockValueSell=Verkaufswert @@ -141,7 +143,7 @@ Replenishments=Nachbestellung NbOfProductBeforePeriod=Menge des Produkts %s im Lager vor der gewählten Periode (< %s) NbOfProductAfterPeriod=Menge des Produkts %s im Lager nach der gewählten Periode (> %s) MassMovement=Massenbewegung -SelectProductInAndOutWareHouse=Wählen Sie ein Produkt, eine Menge, ein Quellen- und ein Ziel-Lager und klicken Sie dann auf "%s". Sobald Sie dies für alle erforderlichen Bewegungen getan haben, klicken Sie auf "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Umbuchung ReceivingForSameOrder=Verbuchungen zu dieser Bestellung StockMovementRecorded=Lagerbewegungen aufgezeichnet @@ -234,4 +236,7 @@ ForceTo=Erzwingen AlwaysShowFullArbo=Anzeige des vollständigen Angebots (Popup des Lager-Links). Warnung: Dies kann die Leistung erheblich beeinträchtigen. StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future -CurrentStock=Current stock +CurrentStock=Aktueller Lagerbestand +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/de_DE/suppliers.lang b/htdocs/langs/de_DE/suppliers.lang index 1b7a9d0e773..ecd657c9db9 100644 --- a/htdocs/langs/de_DE/suppliers.lang +++ b/htdocs/langs/de_DE/suppliers.lang @@ -37,11 +37,11 @@ ListOfSupplierOrders=Liste der Lieferantenbestellungen MenuOrdersSupplierToBill=Bestellungen zu Rechnungen NbDaysToDelivery=Lieferverzug (Tage) DescNbDaysToDelivery=Die längste Lieferverzögerung der Produkte aus dieser Bestellung -SupplierReputation=Lieferanten Reputation -DoNotOrderThisProductToThisSupplier=Nicht sortieren +SupplierReputation=Lieferanten-Reputation +DoNotOrderThisProductToThisSupplier=hier nicht bestellen NotTheGoodQualitySupplier=Geringe Qualität ReputationForThisProduct=Reputation BuyerName=Käufer AllProductServicePrices=Alle Produkt/Leistung Preise -AllProductReferencesOfSupplier=Alle Produkt- / Servicereferenzen des Anbieters +AllProductReferencesOfSupplier=alle Referenzen des Anbieters BuyingPriceNumShort=Lieferantenpreise diff --git a/htdocs/langs/de_DE/ticket.lang b/htdocs/langs/de_DE/ticket.lang index cf6b92fca90..697e9678441 100644 --- a/htdocs/langs/de_DE/ticket.lang +++ b/htdocs/langs/de_DE/ticket.lang @@ -72,7 +72,6 @@ Deleted=Gelöscht # Dict Type=Typ -Category=Analyse-Code Severity=Dringlichkeit # Email templates @@ -128,11 +127,10 @@ TicketsAutoAssignTicket=Den Ersteller automatisch dem Ticket zuweisen TicketsAutoAssignTicketHelp=Wenn ein Ticket erstellt wird, kann der Ersteller automatisch dem Ticket zugewiesen werden. TicketNumberingModules=Ticketnummerierungsmodul TicketNotifyTiersAtCreation=Partner über Ticketerstellung informieren -TicketGroup=Gruppe TicketsDisableCustomerEmail=E-Mails immer deaktivieren, wenn ein Ticket über die öffentliche Oberfläche erstellt wird -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessage=Senden Sie E-Mails, wenn eine neue Nachricht hinzugefügt wird TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) -TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update) +TicketPublicNotificationNewMessageDefaultEmail=Benachrichtigungen per E-Mail an (Update) TicketPublicNotificationNewMessageDefaultEmailHelp=Send email new message notifications to this address if the ticket don't have a user assigned or the user don't have a email. # # Index & list page @@ -162,7 +160,7 @@ CreatedBy=Erstellt durch NewTicket=Ticket erstellen SubjectAnswerToTicket=Ticketantwort TicketTypeRequest=Anfrageart -TicketCategory=Analyse-Code +TicketCategory=Gruppe SeeTicket=Ticket zeigen TicketMarkedAsRead=Ticket als gelesen markiert TicketReadOn=Gelesen um diff --git a/htdocs/langs/de_DE/users.lang b/htdocs/langs/de_DE/users.lang index 6ab47a75663..fc859a67ca4 100644 --- a/htdocs/langs/de_DE/users.lang +++ b/htdocs/langs/de_DE/users.lang @@ -52,7 +52,7 @@ LastGroupsCreated=Zuletzt erstellte Gruppen (%s) LastUsersCreated=Zuletzt erstellte Benutzer (%s) ShowGroup=Zeige Gruppe ShowUser=Zeige Benutzer -NonAffectedUsers=Nicht betroffene Benutzer +NonAffectedUsers=Noch nicht zugeordnete Benutzer UserModified=Benutzer erfolgreich bearbeitet PhotoFile=Bilddatei ListOfUsersInGroup=Liste der Benutzer in dieser Gruppe @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Deaktiviert im Wartungsmodus UserAccountancyCode=Buchhaltungscode Benutzer UserLogoff=Benutzer abmelden UserLogged=Benutzer angemeldet +DateOfEmployment=Anstellungsdatum DateEmployment=Beschäftigungsbeginn DateEmploymentEnd=Beschäftigungsende CantDisableYourself=Sie können nicht ihr eigenes Benutzerkonto deaktivieren @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Gültigkeitsprüfer für Urlaubsanträge erzwingen ValidatorIsSupervisorByDefault=Standardmäßig ist der Prüfer der Supervisor des Benutzers. Leer lassen, um dieses Verhalten beizubehalten. UserPersonalEmail=Private E-Mail-Adresse UserPersonalMobile=Private Mobiltelefonnummer +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/de_DE/website.lang b/htdocs/langs/de_DE/website.lang index b70dc7d183c..7d91f729fba 100644 --- a/htdocs/langs/de_DE/website.lang +++ b/htdocs/langs/de_DE/website.lang @@ -16,7 +16,7 @@ WEBSITE_ROBOT=Roboterdatei (robots.txt) WEBSITE_HTACCESS=Website .htaccess Datei WEBSITE_MANIFEST_JSON=Website manifest.json Datei WEBSITE_README=Datei README.md -WEBSITE_KEYWORDSDesc=Use a comma to separate values +WEBSITE_KEYWORDSDesc=Verwenden Sie ein Komma, um Werte zu trennen EnterHereLicenseInformation=Geben Sie hier Metadaten oder Lizenzinformationen ein, um eine README.md-Datei zu füllen. Wenn Sie Ihre Website als Vorlage verteilen, wird die Datei in die Vorlage aufgenommen. HtmlHeaderPage=HTML Header (Nur für diese Seite) PageNameAliasHelp=Name oder Alias der Seite.
    Dieser Alias wird auch zum erstellen einer SEO URL verwendet, wenn die Webseite auf einem Virtuellen Webserver läuft. Verwenden Sie der Button "%s" um den Alias zu ändern. @@ -134,4 +134,4 @@ AvailableLanguagesAreDefinedIntoWebsiteProperties=Verfügbare Sprachen werden in ReplacementDoneInXPages=Ersetzt in %s Seiten oder Containern RSSFeed=RSS Feed RSSFeedDesc=Über diese URL können Sie einen RSS-Feed mit den neuesten Artikeln vom Typ "Blogpost" abrufen -PagesRegenerated=%s page(s)/container(s) regenerated +PagesRegenerated=%s Seite(n) / Container neu generiert diff --git a/htdocs/langs/de_DE/withdrawals.lang b/htdocs/langs/de_DE/withdrawals.lang index 776347748f1..8ed5c2711fc 100644 --- a/htdocs/langs/de_DE/withdrawals.lang +++ b/htdocs/langs/de_DE/withdrawals.lang @@ -1,23 +1,23 @@ # Dolibarr language file - Source file is en_US - withdrawals CustomersStandingOrdersArea=Zahlungen per Lastschriftauftrag -SuppliersStandingOrdersArea=Payments by Credit transfer +SuppliersStandingOrdersArea=Zahlungen per Überweisung StandingOrdersPayment=SEPA Lastschrift StandingOrderPayment=Lastschrift NewStandingOrder=Neue Bestellung mit Zahlart Lastschrift -NewPaymentByBankTransfer=New payment by credit transfer +NewPaymentByBankTransfer=neue Zahlung per Überweisung StandingOrderToProcess=Zu bearbeiten -PaymentByBankTransferReceipts=Credit transfer orders -PaymentByBankTransferLines=Credit transfer order lines +PaymentByBankTransferReceipts=Überweisungsaufträge +PaymentByBankTransferLines=Überweisungsauftragspositionen WithdrawalsReceipts=Lastschriften WithdrawalReceipt=Lastschrift -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order -LatestBankTransferReceipts=Latest %s credit transfer orders +BankTransferReceipts=Überweisungsaufträge +BankTransferReceipt=Überweisungsauftrag +LatestBankTransferReceipts=Neueste %s Überweisungsaufträge LastWithdrawalReceipts=Letzte %s Abbuchungsbelege WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line +CreditTransferLine=Überweisungspositionen WithdrawalsLines=Abbuchungszeilen -CreditTransferLines=Credit transfer lines +CreditTransferLines=Überweisungszeilen RequestStandingOrderToTreat=Requests for direct debit payment order to process RequestStandingOrderTreated=Requests for direct debit payment order processed RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process @@ -28,21 +28,21 @@ NbOfInvoiceToWithdrawWithInfo=Anzahl der Kundenrechnungen mit Lastschriftaufträ NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer InvoiceWaitingWithdraw=Rechnung wartet auf Lastschrifteinzug -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +InvoiceWaitingPaymentByBankTransfer=Rechnung wartet auf Überweisung AmountToWithdraw=Abbuchungsbetrag NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. NoSupplierInvoiceToWithdraw=Es wartet keine Lieferantenrechnung mit offenen 'Direktgutschriftsanträgen'. Gehen Sie auf die Registerkarte '%s' auf der Rechnungskarte, um eine Anfrage zu stellen. ResponsibleUser=Verantwortlicher Benutzer WithdrawalsSetup=Einstellungen für Lastschriftaufträge -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Setup Überweisungen WithdrawStatistics=Statistik Lastschriftzahlungen -CreditTransferStatistics=Credit transfer statistics +CreditTransferStatistics=Statistiken Überweisungen Rejects=Ablehnungen LastWithdrawalReceipt=Letzte 1%s Einnahmen per Lastschrift MakeWithdrawRequest=Erstelle eine Lastschrift MakeBankTransferOrder=Make a credit transfer request WithdrawRequestsDone=%s Lastschrift-Zahlungsaufforderungen aufgezeichnet -ThirdPartyBankCode=BLZ Partner +ThirdPartyBankCode=Bankcode Geschäftspartner NoInvoiceCouldBeWithdrawed=Keine Rechnung mit Erfolg eingezogen. Überprüfen Sie, ob die Rechnungen auf Unternehmen mit einer gültigen IBAN Nummer verweisen und die IBAN Nummer eine eindeutige Mandatsreferenz besitzt %s. ClassCredited=Als eingegangen markieren ClassCreditedConfirm=Möchten Sie diesen Abbuchungsbeleg wirklich als auf Ihrem Konto eingegangen markieren? @@ -53,7 +53,7 @@ Lines=Zeilen StandingOrderReject=Ablehnung ausstellen WithdrawsRefused=Lastschrift-Einzug abgelehnt WithdrawalRefused=Abbuchung abgelehnt -CreditTransfersRefused=Credit transfers refused +CreditTransfersRefused=Überweisungen abgelehnt WithdrawalRefusedConfirm=Möchten Sie wirklich eine Abbuchungsablehnung zu diesem Partner erstellen? RefusedData=Ablehnungsdatum RefusedReason=Ablehnungsgrund @@ -63,7 +63,9 @@ InvoiceRefused=Rechnung abgelehnt (Abweisung dem Kunden berechnen) StatusDebitCredit=Status Debit/Kredit StatusWaiting=Wartend StatusTrans=Gesendet +StatusDebited=Debited StatusCredited=Eingelöst +StatusPaid=Bezahlt StatusRefused=Abgelehnt StatusMotif0=Nicht spezifiziert StatusMotif1=Unzureichende Deckung @@ -77,25 +79,26 @@ StatusMotif8=Andere Gründe CreateForSepaFRST=Lastschriftdatei erstellen (SEPA FRST) CreateForSepaRCUR=Lastschriftdatei erstellen (SEPA RCUR) CreateAll=Lastschriftdatei erstellen (alle) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateSepaFileForPaymentByBankTransfer=Überweisungsdatei erstellen (SEPA) CreateGuichet=Nur Büro CreateBanque=Nur Bank -OrderWaiting=Wartend -NotifyTransmision=Abbuchungsüberweisung -NotifyCredit=Abbuchungsgutschrift -NumeroNationalEmetter=Nat. Überweisernummer +OrderWaiting=Warte auf Bearbeitung +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order +NumeroNationalEmetter=Nationale Sendernummer WithBankUsingRIB=Bankkonten mit RIB WithBankUsingBANBIC=Bankkonten mit IBAN/BIC BankToReceiveWithdraw=Bankkonto für Abbuchungen -BankToPayCreditTransfer=Bank Account used as source of payments +BankToPayCreditTransfer=Bankkonto als Zahlungsquelle verwendet CreditDate=Am WithdrawalFileNotCapable=Abbuchungsformular für Ihr Land %s konnte nicht erstellt werden (Dieses Land wird nicht unterstützt). ShowWithdraw=Zeige Lastschrift IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Wenn auf der Rechnung mindestens ein Lastschrift-Zahlungsauftrag noch nicht verarbeitet wurde, wird dieser nicht als bezahlt festgelegt, um eine vorherige Abhebungsverwaltung zu ermöglichen. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Datei abbuchen +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Setze in Status "Datei versandt" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistiken nach Statuszeilen @@ -105,7 +108,7 @@ RUMLong=Eindeutige Mandatsreferenz RUMWillBeGenerated=Wenn leer, wird die Mandatsreferenz generiert, sobald die Bankkontodaten gespeichert sind WithdrawMode=Lastschriftmodus (FRST oder RECUR) WithdrawRequestAmount=Lastschrifteinzug Einzugs Betrag: -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Betrag der Überweisungsanforderung: WithdrawRequestErrorNilAmount=Es kann keine Lastschriftanforderung für einen leeren Betrag erstellt werden. SepaMandate=SEPA-Lastschriftmandat SepaMandateShort=SEPA-Mandate @@ -121,10 +124,11 @@ SEPAFrstOrRecur=Zahlungsart ModeRECUR=Wiederkehrende Zahlungen ModeFRST=Einmalzahlung PleaseCheckOne=Bitte prüfen sie nur eine +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Lastschrift %s erstellt AmountRequested=angeforderter Betrag SEPARCUR=SEPA CUR -SEPAFRST=SEPA ERST +SEPAFRST=SEPA FRST ExecutionDate=Ausführungsdatum CreateForSepa=Erstellen Sie eine Lastschriftdatei ICS=Gläubigeridentifikator CI @@ -141,3 +145,4 @@ InfoTransData=Betrag: %s
    Verwendungszweck: %s
    Datum: %s InfoRejectSubject=Lastschriftauftrag abgelehnt InfoRejectMessage=Hallo,

    der Lastschrift-Zahlungsauftrag der Rechnung %s im Zusammenhang mit dem Unternehmen %s, mit einem Betrag von %s wurde von der Bank abgelehnt
    --
    %s ModeWarning=Echtzeit-Modus wurde nicht aktiviert, wir stoppen nach der Simulation. +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/de_DE/workflow.lang b/htdocs/langs/de_DE/workflow.lang index 2303c72355e..9cde674b9e3 100644 --- a/htdocs/langs/de_DE/workflow.lang +++ b/htdocs/langs/de_DE/workflow.lang @@ -1,9 +1,9 @@ # Dolibarr language file - Source file is en_US - workflow -WorkflowSetup=Workflow Moduleinstellungen +WorkflowSetup=Einstellungen Modul Workflow WorkflowDesc=Dieses Modul liefert verschiedene, automatisierte Aktionen. Standardmäßig ist der Workflow flexibel (d.h. Sie sind frei in der Reihenfolge der Abarbeitung) aber über diesen Modul können Sie einige Aktionen automatisiert ablaufen lassen. ThereIsNoWorkflowToModify=Es sind keine Workflow-Änderungen möglich mit den aktivierten Modulen. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Erstellt automatisch eine Bestellung, nachdem ein Angebot als "unterzeichnet" markiert wurde. Die neue Bestellung hat dann den selben Wert wie das Angebot. +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Erstelle automatisch einen Kundenauftrag, nachdem ein Angebot auf "unterzeichnet" gesetzt wurde. Die neue Bestellung hat dann den selben Wert wie das Angebot. descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Erstellt automatisch eine Kundenrechnung, nachdem ein Angebot als "unterzeichnet" markiert wurde. Diese neue Kundenrechnung lautet über den selben Betrag wie das Angebot. descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Erstelle automatisch eine Kundenrechnung, nachdem der Vertrag bestätigt wurde. descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Erstellt automatisch eine Kundenrechnung, nachdem eine Bestellung geschlossen wurde. Die neue Kundenrechnung lautet über den selben Betrag wie die Bestellung. @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Kennzeichne die verknüpften Auftr # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Setzt das verknüpfte Lieferantenangebot auf "abgerechnet", sofern die Lieferanrenrechnung erstellt wurde und sofern der Rechnungsbetrag identisch zur Angebotsumme ist. descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Kennzeichne die verknüpfte Einkaufsbestellung als abgerechnet wenn die Lieferantenrechnung erstellt wurde und wenn die Beträge überein stimmen. +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=automatische Erstellung AutomaticClassification=Automatische Klassifikation diff --git a/htdocs/langs/de_DE/zapier.lang b/htdocs/langs/de_DE/zapier.lang index 5922ed95485..4d874ef8f7f 100644 --- a/htdocs/langs/de_DE/zapier.lang +++ b/htdocs/langs/de_DE/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Modul: Zapier für Dolibarr # Admin page # ZapierForDolibarrSetup = Zapier für Dolibarr einrichten +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/el_GR/accountancy.lang b/htdocs/langs/el_GR/accountancy.lang index 57d08cd31b7..598f5dc9ab5 100644 --- a/htdocs/langs/el_GR/accountancy.lang +++ b/htdocs/langs/el_GR/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Να επιτρέπεται η διαχείριση δι BANK_DISABLE_DIRECT_INPUT=Απενεργοποιήστε την απευθείας εγγραφή συναλλαγής σε τραπεζικό λογαριασμό ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Ενεργοποιήστε το σχέδιο εξαγωγής στο περιοδικό ACCOUNTANCY_COMBO_FOR_AUX=Ενεργοποίηση σύνθετης λίστας για επικουρικό λογαριασμό (μπορεί να είναι αργή αν έχετε πολλούς τρίτους) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Ημερολόγιο πωλήσεων ACCOUNTING_PURCHASE_JOURNAL=Ημερολόγιο αγορών @@ -284,6 +285,7 @@ ShowTutorial=Εμφάνιση εκπαιδευτικού προγράμματο NotReconciled=Δεν ταιριάζουν ## Admin +BindingOptions=Binding options ApplyMassCategories=Εφαρμογή κατηγοριών μάζας AddAccountFromBookKeepingWithNoCategories=Διαθέσιμος λογαριασμός που δεν έχει ακόμα εγγραφεί στην εξατομικευμένη ομάδα CategoryDeleted=Η κατηγορία για τον λογαριασμό λογιστηρίου έχει καταργηθεί diff --git a/htdocs/langs/el_GR/admin.lang b/htdocs/langs/el_GR/admin.lang index ce2117d1079..a5208c3615a 100644 --- a/htdocs/langs/el_GR/admin.lang +++ b/htdocs/langs/el_GR/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Προεπιλεγμένο μήνυμα αποστο UserEmail=Ηλεκτρονικό ταχυδρομείο χρήστη CompanyEmail=Εταιρεία ηλεκτρονικού ταχυδρομείου FeatureNotAvailableOnLinux=Αυτή η λειτουργία δεν είναι διαθέσιμη σε συστήματα Unix like. Δοκιμάστε το πρόγραμμα sendmail τοπικά. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Εάν η μετάφραση για αυτήν τη γλώσσα δεν είναι πλήρης ή βρίσκετε σφάλματα, μπορείτε να διορθώσετε αυτό με την επεξεργασία αρχείων στον κατάλογο langs / %s και να υποβάλετε την αλλαγή σας στο www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Εάν η μετάφραση για αυτήν τη γλώσσα δεν είναι πλήρης ή βρίσκετε σφάλματα, μπορείτε να διορθώσετε αυτήν την ενέργεια επεξεργάζοντας τα αρχεία σε langs / %s και να υποβάλλετε τροποποιημένα αρχεία σε dolibarr.org/forum ή για προγραμματιστές στο github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Διαχείριση Αρθρώματος ModulesSetup=Ενότητες / Ρύθμιση εφαρμογής ModuleFamilyBase=Σύστημα @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Το άρθρωμα %s πρέπει να ενε SecurityToken=Security Token NoSmsEngine=Δεν διατίθεται διαχειριστής αποστολέων SMS. Ένας διαχειριστής αποστολέα SMS δεν είναι εγκατεστημένος με την προεπιλεγμένη διανομή επειδή εξαρτάται από έναν εξωτερικό προμηθευτή, αλλά μπορείτε να βρείτε μερικούς από τους %s PDF=PDF -PDFDesc=Γενικές επιλογές για δημιουργία PDF. -PDFAddressForging=Κανόνες για πλαίσια διευθύνσεων +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Απόκρυψη όλων των πληροφοριών που σχετίζονται με το φόρο επί των πωλήσεων / ΦΠΑ PDFRulesForSalesTax=Κανόνες φόρου επί των πωλήσεων / ΦΠΑ PDFLocaltax=Κανόνες για %s -HideLocalTaxOnPDF=Απόκρυψη συντελεστή %s στη στήλη Φόρος Πωλήσεων +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Απόκρυψη περιγραφής προϊόντων HideRefOnPDF=Απόκρυψη προϊόντων ref. HideDetailsOnPDF=Απόκρυψη λεπτομερειών γραμμών προϊόντων @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Τροποποίηση τιμών με βάση την τ MassConvert=Ξεκινήστε τη μαζική μετατροπή PriceFormatInCurrentLanguage=Μορφή τιμής στην τρέχουσα γλώσσα String=String +String1Line=String (1 line) TextLong=Μεγάλο κείμενο +TextLongNLines=Long text (n lines) HtmlText=Html κείμενο Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Διαχείριση συμβολαίων (υπηρεσίες ή ε Module55Name=Barcodes Module55Desc=Διαχείριση barcode Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Πληρωμές με χρεώσεις της Τράπεζας Direct -Module57Desc=Διαχείριση εντολών πληρωμής άμεσης χρέωσης. Περιλαμβάνει τη δημιουργία αρχείου SEPA για τις ευρωπαϊκές χώρες. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Ενοποίηση ενός συστήματος ClickToDial (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Δημιουργία / τροποποίηση υπηρεσιών Permission534=Διαγραφή υπηρεσιών Permission536=Δείτε / διαχειριστείτε τις κρυφές υπηρεσίες Permission538=Εξαγωγή υπηρεσιών +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Διαβάστε τα Γραμμάτια Υλικών Permission651=Δημιουργία / Ενημέρωση τιμολογίων Permission652=Διαγραφή λογαριασμών +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Διαβάστε τις δωρεές Permission702=Δημιουργία / τροποποίηση δωρεές Permission703=Διαγραφή δωρεές @@ -848,6 +858,8 @@ Permission773=Διαγραφή αναφοράς εξόδων Permission774=Διαβάστε όλες τις αναφορές δαπανών (ακόμη και για χρήστες που δεν είναι υφιστάμενοι) Permission775=Έγκριση σε αναφορές εξόδων Permission776=Πληρωμή αναφοράς εξόδων +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Εξαγωγή αναφοράς εξόδων Permission1001=Διαβάστε τα αποθέματα Permission1002=Δημιουργία/τροποποίηση αποθηκών @@ -900,6 +912,7 @@ Permission2515=Ρύθμιση καταλόγων εγγράφων Permission2801=Χρησιμοποίησε FTP πελάτη σε λειτουργία ανάγνωσης (περιήγηση και λήψη μόνο) Permission2802=Χρησιμοποίησε FTP πελάτη σε λειτουργία εγγραφής (διαγραφή ή μεταφόρτωση αρχείων) Permission3200=Διαβάστε αρχειακά συμβάντα και δακτυλικά αποτυπώματα +Permission3301=Generate new modules Permission4001=Δείτε τους υπαλλήλους Permission4002=Δημιουργήστε υπαλλήλους Permission4003=Διαγράψτε τους υπαλλήλους @@ -947,7 +960,8 @@ Permission63003=Διαγράψτε τους πόρους Permission63004=Συνδέστε τους πόρους στις εκδηλώσεις της ατζέντας DictionaryCompanyType=Τύποι τρίτου μέρους DictionaryCompanyJuridicalType=Νομικές οντότητες τρίτων -DictionaryProspectLevel=Δυναμική προοπτικής +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Κράτη / Επαρχίες DictionaryRegion=Περιοχές DictionaryCountry=Χώρες @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Πρότυπα ηλεκτρονικού ταχυδρο DictionaryUnits=Μονάδες DictionaryMeasuringUnits=Μονάδες μέτρησης DictionarySocialNetworks=Κοινωνικά Δίκτυα -DictionaryProspectStatus=Κατάσταση προοπτικής +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Είδη αδειών DictionaryOpportunityStatus=Κατάσταση μολύβδου για έργο / μόλυβδο DictionaryExpenseTaxCat=Έκθεση δαπανών - Κατηγορίες μεταφορών @@ -1076,7 +1091,7 @@ LoginPage=Σελίδα σύνδεσης BackgroundImageLogin=Εικόνα φόντου PermanentLeftSearchForm=Μόνιμη φόρμα αναζήτησης στο αριστερό μενού DefaultLanguage=Προεπιλεγμένη γλώσσα -EnableMultilangInterface=Ενεργοποιήστε την πολυγλωσσική υποστήριξη +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Εμφανίστε το λογότυπο της εταιρείας στο μενού CompanyInfo=Εταιρεία / Οργανισμός CompanyIds=Ταυτότητα εταιρείας / οργανισμού @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Απαιτείται ένα κριτήρ NewTranslationStringToShow=Νέα συμβολοσειρά μετάφρασης για εμφάνιση OriginalValueWas=Η αρχική μετάφραση αντικαθίσταται. Η αρχική τιμή ήταν:

    %s TransKeyWithoutOriginalValue=Αναγκάσθηκε μια νέα μετάφραση για το κλειδί μετάφρασης ' %s ' που δεν υπάρχει σε κανένα αρχείο γλώσσας -TotalNumberOfActivatedModules=Ενεργοποιημένη εφαρμογή / ενότητες: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Η κλάση %s δεν βρέθηκε στη διαδρομή PHP YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Χρήση τύπων συμβάντων (διαχειρί AGENDA_USE_EVENT_TYPE_DEFAULT=Αυτόματη ρύθμιση αυτής της προεπιλεγμένης τιμής για τον τύπο συμβάντος στη φόρμα δημιουργίας συμβάντος AGENDA_DEFAULT_FILTER_TYPE=Αυτόματη ρύθμιση αυτού του τύπου συμβάντος στο φίλτρο αναζήτησης της προβολής ατζέντας AGENDA_DEFAULT_FILTER_STATUS=Αυτόματη ρύθμιση αυτής της κατάστασης για συμβάντα στο φίλτρο αναζήτησης της προβολής ατζέντας -AGENDA_DEFAULT_VIEW=Ποια καρτέλα θέλετε να ανοίξετε από προεπιλογή κατά την επιλογή του μενού Ατζέντα +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Ενεργοποιήστε την υπενθύμιση συμβάντων μέσω μηνυμάτων ηλεκτρονικού ταχυδρομείου (η επιλογή επιλογής / καθυστέρησης μπορεί να οριστεί σε κάθε συμβάν). Σημείωση: Η ενότητα %s πρέπει να ενεργοποιηθεί και να ρυθμιστεί σωστά ώστε να έχει αποσταλεί υπενθύμιση στη σωστή συχνότητα. AGENDA_REMINDER_BROWSER=Ενεργοποίηση υπενθύμισης συμβάντων στο πρόγραμμα περιήγησης του χρήστη (όταν φτάσει η ημερομηνία συμβάντος, κάθε χρήστης μπορεί να το αρνηθεί από την ερώτηση επιβεβαίωσης του προγράμματος περιήγησης) AGENDA_REMINDER_BROWSER_SOUND=Ενεργοποίηση ειδοποίησης ήχου @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Εμφάνιση συνδεδεμένου αντικε ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Η διεύθυνση URL ονομάζεται όταν γίνεται κλικ στο τηλέφωνο picto. Στη διεύθυνση URL, μπορείτε να χρησιμοποιήσετε ετικέτες
    __PHONETO__ που θα αντικατασταθεί με τον αριθμό τηλεφώνου του ατόμου που καλεί
    __PHONEFROM__ που θα αντικατασταθεί με τον αριθμό τηλεφώνου του καλούντος (του δικού σας)
    __LOGIN__ που θα αντικατασταθεί με σύνδεση με κλικ (καθορισμένη στην κάρτα χρήστη)
    __PASS__ που θα αντικατασταθεί με κωδικό πρόσβασης (που ορίζεται στην κάρτα χρήστη). -ClickToDialDesc=Αυτή η ενότητα δημιουργεί τηλεφωνικούς αριθμούς με συνδέσμους με δυνατότητα κλικ. Κάνοντας κλικ στο εικονίδιο, το τηλέφωνό σας θα καλέσει τον αριθμό. Αυτό μπορεί να χρησιμοποιηθεί για να καλέσετε ένα σύστημα τηλεφωνικού κέντρου από το Dolibarr που μπορεί να καλέσει τον αριθμό τηλεφώνου σε ένα σύστημα SIP, για παράδειγμα. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Χρησιμοποιήστε μόνο έναν σύνδεσμο "τηλ::" σε αριθμούς τηλεφώνου ClickToDialUseTelLinkDesc=Χρησιμοποιήστε αυτή τη μέθοδο εάν οι χρήστες σας έχουν ένα λογισμικό softphone ή μια διασύνδεση λογισμικού που είναι εγκατεστημένος στον ίδιο υπολογιστή με το πρόγραμμα περιήγησης και καλούνται όταν κάνετε κλικ σε ένα σύνδεσμο στο πρόγραμμα περιήγησης που ξεκινάει με "tel:". Αν χρειάζεστε μια λύση πλήρους διακομιστή (δεν χρειάζεται τοπική εγκατάσταση λογισμικού), πρέπει να το ορίσετε σε "Όχι" και να συμπληρώσετε το επόμενο πεδίο. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Αυτό το πεδίο περιέχει μια αναφορά γ Enter0or1=Εισαγάγετε 0 ή 1 UnicodeCurrency=Εισαγάγετε εδώ μεταξύ τιράντες, λίστα αριθμού byte που αντιπροσωπεύει το σύμβολο νομίσματος. Για παράδειγμα: για το $, πληκτρολογήστε [36] - για την Βραζιλία, το πραγματικό R $ [82,36] - για €, πληκτρολογήστε [8364] ColorFormat=Το χρώμα RGB είναι σε μορφή HEX, π.χ.: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Θέση γραμμής σε σύνθετο πλαίσιο SellTaxRate=Φόρος πωλήσεων RecuperableOnly=Ναι για ΦΠΑ "Δεν γίνεται αντιληπτό αλλά ανακτήσιμο" αφιερωμένο σε κάποια χώρα στη Γαλλία. Διατηρήστε την τιμή "Όχι" σε όλες τις άλλες περιπτώσεις. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Αίτημα προσφοράς MailToSendSupplierOrder=Εντολές αγοράς MailToSendSupplierInvoice=Τιμολόγια προμηθευτή MailToSendContract=Συμβόλαια +MailToSendReception=Receptions MailToThirdparty=Πελ./Προμ. MailToMember=Μέλη MailToUser=Χρήστες @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Το Dolibarr ERP & CRM %s είναι δ ExampleOfNewsMessageForMaintenanceRelease=Το Dolibarr ERP & CRM %s είναι διαθέσιμο. Η έκδοση %s είναι μια έκδοση συντήρησης, έτσι περιέχει μόνο διορθώσεις σφαλμάτων. Συνιστούμε σε όλους τους χρήστες να αναβαθμίσουν σε αυτήν την έκδοση. Μια έκδοση συντήρησης δεν εισάγει νέες λειτουργίες ή αλλαγές στη βάση δεδομένων. Μπορείτε να το κατεβάσετε από την περιοχή λήψης της πύλης https://www.dolibarr.org (υποκατάστατο Σταθερές εκδόσεις). Μπορείτε να διαβάσετε το ChangeLog για την πλήρη λίστα των αλλαγών. MultiPriceRuleDesc=Όταν είναι ενεργοποιημένη η επιλογή "Πολλά επίπεδα τιμών ανά προϊόν / υπηρεσία", μπορείτε να ορίσετε διαφορετικές τιμές (μία ανά επίπεδο τιμής) για κάθε προϊόν. Για να εξοικονομήσετε χρόνο, μπορείτε να εισαγάγετε έναν κανόνα για να υπολογίσετε αυτόματα μια τιμή για κάθε επίπεδο με βάση την τιμή του πρώτου επιπέδου, οπότε θα πρέπει να εισαγάγετε μόνο μια τιμή για το πρώτο επίπεδο για κάθε προϊόν. Αυτή η σελίδα έχει σχεδιαστεί για να σας εξοικονομήσει χρόνο αλλά είναι χρήσιμη μόνο αν οι τιμές σας για κάθε επίπεδο είναι σχετικές με το πρώτο επίπεδο. Μπορείτε να αγνοήσετε αυτή τη σελίδα στις περισσότερες περιπτώσεις. ModelModulesProduct=Πρότυπα για έγγραφα προϊόντων +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Για να μπορείτε να δημιουργείτε αυτόματα κωδικούς, πρέπει πρώτα να ορίσετε έναν διαχειριστή για τον αυτόματο ορισμό του αριθμού γραμμικού κώδικα. SeeSubstitutionVars=Δείτε τη σημείωση * για λίστα πιθανών μεταβλητών υποκατάστασης SeeChangeLog=Δείτε το αρχείο ChangeLog (μόνο στα αγγλικά) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Αριστερό περιθώριο σε PDF MAIN_PDF_MARGIN_RIGHT=Δεξί περιθώριο στο PDF MAIN_PDF_MARGIN_TOP=Κορυφή περιθώριο σε PDF MAIN_PDF_MARGIN_BOTTOM=Κάτω περιθώριο σε PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Δεν απαιτείται συγκεκριμένη ρύθμιση για αυτήν την ενότητα. SetToYesIfGroupIsComputationOfOtherGroups=Ορίστε αυτό το ναι αν αυτή η ομάδα είναι ένας υπολογισμός άλλων ομάδων EnterCalculationRuleIfPreviousFieldIsYes=Εισαγάγετε τον κανόνα υπολογισμού εάν το προηγούμενο πεδίο είχε οριστεί σε Ναι (για παράδειγμα 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Τίποτα δεν έγινε XEmailsDoneYActionsDone=%s τα κατάλληλα μηνύματα ηλεκτρονικού ταχυδρομείου, τα emails %s υποβλήθηκαν σε επιτυχή επεξεργασία (για %s η εγγραφή / οι ενέργειες έγιναν) RecordEvent=Εγγραφή συμβάντος ηλεκτρονικού ταχυδρομείου CreateLeadAndThirdParty=Δημιουργία μολύβδου (και τρίτου εάν είναι απαραίτητο) -CreateTicketAndThirdParty=Δημιουργία εισιτηρίου (και τρίτου εάν είναι απαραίτητο) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Τελευταίος κωδικός αποτελέσματος NbOfEmailsInInbox=Αριθμός μηνυμάτων ηλεκτρονικού ταχυδρομείου στον κατάλογο προέλευσης LoadThirdPartyFromName=Φόρτωση αναζήτησης τρίτου μέρους στο %s (μόνο φόρτωση) LoadThirdPartyFromNameOrCreate=Φόρτωση αναζήτησης τρίτου μέρους στο %s (δημιουργία αν δεν βρεθεί) -WithDolTrackingID=Αναφορά Dolibarr που βρίσκεται στο ID του μηνύματος -WithoutDolTrackingID= \nΑναφορά Dolibarr που δεν βρίσκεται στο ID του μηνύματος +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Κωδικός εισόδου μενού (mainmenu) ECMAutoTree=Εμφάνιση αυτόματης δομής ECM @@ -1981,7 +2002,7 @@ ImportSetup=Ρύθμιση εισαγωγής λειτουργικής μονά InstanceUniqueID=Μοναδικό αναγνωριστικό της παρουσίας SmallerThan=Μικρότερη από LargerThan=Μεγαλύτερο από -IfTrackingIDFoundEventWillBeLinked=Σημειώστε ότι Εάν εντοπιστεί ένα αναγνωριστικό παρακολούθησης στα εισερχόμενα μηνύματα ηλεκτρονικού ταχυδρομείου, το συμβάν θα συνδεθεί αυτόματα με τα σχετικά αντικείμενα. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Με ένα λογαριασμό GMail, εάν έχετε ενεργοποιήσει την επικύρωση 2 βημάτων, σας συνιστούμε να δημιουργήσετε έναν ειδικό δευτερεύοντα κωδικό πρόσβασης για την εφαρμογή αντί να χρησιμοποιήσετε τη δική σας passsword από https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=Μπορείτε να χρησιμοποιήσετε αυτήν την ενέργεια για να χρησιμοποιήσετε το περιεχόμενο ηλεκτρονικού ταχυδρομείου για να βρείτε και να φορτώσετε ένα υπάρχον τρίτο μέρος στη βάση δεδομένων σας. Το τρίτο μέρος που βρέθηκε (ή δημιουργήθηκε) θα χρησιμοποιηθεί για τις ακόλουθες ενέργειες που το χρειάζονται. Στο πεδίο παραμέτρων μπορείτε να χρησιμοποιήσετε για παράδειγμα το EXTRACT: BODY: Name: \\ s ([^ \\ s] *) εάν θέλετε να εξαγάγετε το όνομα του τρίτου μέρους από μια συμβολοσειρά 'Name: name to find' μέσα στο σώμα της εντολής. @@ -2005,3 +2026,7 @@ RssNote=Σημείωση: Κάθε ορισμός τροφοδοσίας RSS π JumpToBoxes=Μετάβαση στη ρύθμιση -> Widgets MeasuringUnitTypeDesc=Χρησιμοποιήστε εδώ μια τιμή όπως "μέγεθος", "επιφάνεια", "όγκος", "βάρος", "χρόνος" MeasuringScaleDesc=Η κλίμακα είναι ο αριθμός των θέσεων που πρέπει να μετακινήσετε το δεκαδικό μέρος ώστε να ταιριάζει με την προεπιλεγμένη μονάδα αναφοράς. Για τον τύπο μονάδας "time", είναι ο αριθμός των δευτερολέπτων. Οι τιμές μεταξύ 80 και 99 είναι δεσμευμένες τιμές. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/el_GR/agenda.lang b/htdocs/langs/el_GR/agenda.lang index 299f3af2faf..f4220eb7dc8 100644 --- a/htdocs/langs/el_GR/agenda.lang +++ b/htdocs/langs/el_GR/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Αριθμός γεγονότων ListOfActions=Λίστα γεγονότων EventReports=Αναφορές συμβάντων Location=Τοποθεσία -ToUserOfGroup=Σε κάθε χρήστη της ομάδας +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Ολοήμερο Γεγονός MenuToDoActions=Όλες οι ημιτελής ενέργειες MenuDoneActions=Όλες οι ολοκληρ. ενέργειες @@ -86,6 +86,8 @@ ProposalDeleted=Η προσφορά διαγράφηκε OrderDeleted=Η παραγγελία διαγράφηκε InvoiceDeleted=Το τιμολόγιο διαγράφηκε DraftInvoiceDeleted=Το πρόχειρο τιμολόγιο διαγράφηκε +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Το προϊόν %s δημιουργήθηκε PRODUCT_MODIFYInDolibarr=Το προϊόν %s τροποποιήθηκε PRODUCT_DELETEInDolibarr=Το προϊόν %s διαγράφηκε @@ -158,3 +160,9 @@ DateStartPlusOne=Έναρξη ημέρας + 1 ώρα SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/el_GR/boxes.lang b/htdocs/langs/el_GR/boxes.lang index adbaf333776..bc59ca654da 100644 --- a/htdocs/langs/el_GR/boxes.lang +++ b/htdocs/langs/el_GR/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Οι τελευταίοι %s κατέγραψαν προμ BoxTitleLastModifiedSuppliers=Προμηθευτές: τελευταία τροποποίηση %s BoxTitleLastModifiedCustomers=Πελάτες: τελευταία τροποποίηση %s BoxTitleLastCustomersOrProspects=Τελευταίοι %s πελάτες ή προοπτικές -BoxTitleLastCustomerBills=Τελευταία %s Τιμολόγια πελατών -BoxTitleLastSupplierBills=Τελευταία %s Τιμολόγια προμηθευτή +BoxTitleLastCustomerBills=Τελευταία τιμολόγια πελατών τροποποιημένα %s +BoxTitleLastSupplierBills=Τελευταία %s τροποποιημένα τιμολόγια προμηθευτών BoxTitleLastModifiedProspects=Προοπτικές: τελευταία τροποποίηση %s BoxTitleLastModifiedMembers=Τελευταία %s Μέλη BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Παραγγελίες προμηθευτή BoxTitleLastModifiedCustomerBills=Τιμολόγια πελατών: τροποποιήθηκε τελευταία %s BoxTitleLastModifiedCustomerOrders=Παραγγελίες πώλησης: τελευταία τροποποίηση %s BoxTitleLastModifiedPropals=Τελευταίες τροποποιημένες προτάσεις %s +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Τιμολόγια Πελάτη ForCustomersOrders=Παραγγελίες πελατών ForProposals=Προσφορές @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Ο λογαριασμός Suspense δεν έχει ο BoxLastCustomerShipments=Τελευταίες αποστολές πελάτη BoxTitleLastCustomerShipments=Τελευταίες %s αποστολές πελάτη NoRecordedShipments=Καμία καταγεγραμμένη αποστολή πελάτη +# Pages +AccountancyHome=Λογιστική diff --git a/htdocs/langs/el_GR/cashdesk.lang b/htdocs/langs/el_GR/cashdesk.lang index cad08d2b11d..53dcd336847 100644 --- a/htdocs/langs/el_GR/cashdesk.lang +++ b/htdocs/langs/el_GR/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=Μονάδα POS BasicPhoneLayout=Χρησιμοποιήστε τη βασική διάταξη για τα τηλέφωνα SetupOfTerminalNotComplete=Η εγκατάσταση του τερματικού %s δεν έχει ολοκληρωθεί DirectPayment=Άμεση πληρωμή -DirectPaymentButton=Πλήκτρο άμεσης πληρωμής μετρητών +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Το τιμολόγιο έχει ήδη επικυρωθεί NoLinesToBill=Δεν υπάρχουν γραμμές που να χρεώνουν CustomReceipt=Προσαρμοσμένη παραλαβή @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Εξωτερική μονάδα με επιπ PrintMethod=Μέθοδος εκτύπωσης ReceiptPrinterMethodDescription=Ισχυρή μέθοδος με πολλές παραμέτρους. Πλήρως προσαρμόσιμο με πρότυπα. Δεν είναι δυνατή η εκτύπωση από το σύννεφο. ByTerminal=Από τερματικό -TakeposNumpadUsePaymentIcon=Χρησιμοποιήστε το εικονίδιο πληρωμής στο Numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =  
    {TN} ετικέτα χρησιμοποιείται για την προσθήκη του αριθμού τερματικού TakeposGroupSameProduct=Ομαδοποιήστε τις ίδιες σειρές προϊόντων StartAParallelSale=Ξεκινήστε μια νέα παράλληλη πώληση -ControlCashOpening=Ελέγξτε το κουτί μετρητών κατά το άνοιγμα θέσης +ControlCashOpening=Control cash box at opening POS CloseCashFence=Κλείστε το φράχτη μετρητών CashReport=Έκθεση μετρητών MainPrinterToUse=Κύριος εκτυπωτής προς χρήση @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/el_GR/compta.lang b/htdocs/langs/el_GR/compta.lang index d187476e8bb..274e8851e74 100644 --- a/htdocs/langs/el_GR/compta.lang +++ b/htdocs/langs/el_GR/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Κοινωνική ή φορολογική εισφορά SocialContributions=Κοινωνικές ή φορολογικές εισφορές SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Ειδικά έξοδα @@ -157,9 +158,9 @@ SeeReportInInputOutputMode=Ανατρέξτε στο %sanalysis of payments%s γ SeeReportInDueDebtMode=Ανατρέξτε στο %sanalysis των τιμολογίων%s για έναν υπολογισμό βασισμένο σε γνωστά καταγεγραμμένα τιμολόγια, ακόμη και αν δεν έχουν ακόμη καταλογιστεί στο Ledger. SeeReportInBookkeepingMode=Δείτε %sBookeeping report%s για έναν υπολογισμό στον πίνακα " Λογαριασμός Λογιστηρίου" RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included -RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.
    - It is based on the billing date of invoices and on the due date for expenses or tax payments. For salaries defined with Salary module, the value date of payment is used. +RulesResultDue=- Περιλαμβάνει εκκρεμή τιμολόγια, έξοδα, ΦΠΑ, δωρεές είτε πληρώνονται είτε όχι. Περιλαμβάνει επίσης πληρωμένους μισθούς.
    - Βασίζεται στην ημερομηνία χρέωσης των τιμολογίων και στην ημερομηνία λήξης των εξόδων ή των φόρων. Για τους μισθούς που ορίζονται με την ενότητα Μισθός, χρησιμοποιείται η ημερομηνία αξίας πληρωμής. RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries.
    - It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation. -RulesCADue=- It includes the customer's due invoices whether they are paid or not.
    - It is based on the billing date of these invoices.
    +RulesCADue=- Περιλαμβάνει τα οφειλόμενα τιμολόγια του πελάτη, είτε πληρώνονται είτε όχι.
    - Βασίζεται στην ημερομηνία χρέωσης αυτών των τιμολογίων.
    RulesCAIn=- Περιλαμβάνει όλες τις πραγματικές πληρωμές τιμολογίων που εισπράττονται από πελάτες.
    - Βασίζεται στην ημερομηνία πληρωμής αυτών των τιμολογίων
    RulesCATotalSaleJournal=Περιλαμβάνει όλες τις πιστωτικές γραμμές από το περιοδικό Sale. RulesAmountOnInOutBookkeepingRecord=Περιλαμβάνει την εγγραφή στον Λογαριασμό σας με Λογαριασμούς Λογαριασμού που έχει την ομάδα "ΕΞΟΔΑ" ή "ΕΙΣΟΔΟΣ" @@ -255,10 +256,12 @@ TurnoverbyVatrate=Ο κύκλος εργασιών τιμολογείται απ TurnoverCollectedbyVatrate=Ο κύκλος εργασιών που εισπράττεται από το φορολογικό συντελεστή πώλησης PurchasebyVatrate=Ποσοστό φόρου επί των πωλήσεων LabelToShow=Σύντομη ετικέτα -PurchaseTurnover=Purchase turnover -PurchaseTurnoverCollected=Purchase turnover collected -RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not.
    - It is based on the invoice date of these invoices.
    -RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.
    - It is based on the payment date of these invoices
    -RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. -ReportPurchaseTurnover=Purchase turnover invoiced -ReportPurchaseTurnoverCollected=Purchase turnover collected +PurchaseTurnover=Κύκλος εργασιών αγοράς +PurchaseTurnoverCollected=Συλλέχθηκε ο κύκλος εργασιών αγοράς +RulesPurchaseTurnoverDue=- Περιλαμβάνει τα οφειλόμενα τιμολόγια του προμηθευτή, είτε πληρώνονται είτε όχι.
    - Βασίζεται στην ημερομηνία τιμολογίου αυτών των τιμολογίων.
    +RulesPurchaseTurnoverIn=- Περιλαμβάνει όλες τις αποτελεσματικές πληρωμές τιμολογίων που πραγματοποιούνται σε προμηθευτές.
    - Βασίζεται στην ημερομηνία πληρωμής αυτών των τιμολογίων
    +RulesPurchaseTurnoverTotalPurchaseJournal=Περιλαμβάνει όλες τις χρεωστικές γραμμές από το περιοδικό αγορών. +ReportPurchaseTurnover=Τιμολόγηση κύκλου εργασιών αγοράς +ReportPurchaseTurnoverCollected=Συλλέχθηκε ο κύκλος εργασιών αγοράς +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/el_GR/contracts.lang b/htdocs/langs/el_GR/contracts.lang index 44e5a7b609b..f97abb6769c 100644 --- a/htdocs/langs/el_GR/contracts.lang +++ b/htdocs/langs/el_GR/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Ενεργές Υπηρεσίες MenuExpiredServices=Ληγμένες Υπηρεσίες MenuClosedServices=Τερματισμένες Υπηρεσίες NewContract=Νέο Συμβόλαιο -NewContractSubscription=Νέα σύμβαση/συνδρομή +NewContractSubscription=New contract or subscription AddContract=Δημιουργία σύμβασης DeleteAContract=Διαγραφή Συμβολαίου ActivateAllOnContract=Ενεργοποιήστε όλες τις υπηρεσίες diff --git a/htdocs/langs/el_GR/errors.lang b/htdocs/langs/el_GR/errors.lang index 126a486b0c4..393b97c7174 100644 --- a/htdocs/langs/el_GR/errors.lang +++ b/htdocs/langs/el_GR/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Η σύνδεση με τη βάση δεδομένων αποτυγχάνει. Ελέγξτε ότι ο διακομιστής βάσης δεδομένων εκτελείται (για παράδειγμα, με το mysql / mariadb, μπορείτε να το ξεκινήσετε από τη γραμμή εντολών με το 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=Η ημερομηνία δεν μπορεί να είναι μεταγενέστερη από τη σημερινή +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Σφάλμα, η PHP σας πρέπει να έχει το module %s εγκατεστημένο για να χρησιμοποιήσετε αυτήν τη δυνατότητα. ErrorOpenIDSetupNotComplete=Μπορείτε να ρυθμίσετε το Dolibarr αρχείο config να επιτρέψει OpenID ταυτότητα, αλλά το URL OpenID υπηρεσίας δεν ορίζεται σε συνεχή %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Δεν υπάρχει αρ ErrorOnlyOneFieldForGroupByIsPossible=Είναι δυνατό μόνο 1 πεδίο για την «Ομάδα κατά» (άλλα απορρίπτονται) ErrorTooManyDifferentValueForSelectedGroupBy=Βρέθηκαν πάρα πολλές διαφορετικές τιμές (περισσότερες από %s ) για το πεδίο " %s ", οπότε δεν μπορούμε να το χρησιμοποιήσουμε ως γραφικά " Το πεδίο "Group By" έχει αφαιρεθεί. Μπορεί να θέλετε να το χρησιμοποιήσετε ως άξονα X; ErrorReplaceStringEmpty=Σφάλμα, η συμβολοσειρά για αντικατάσταση είναι κενή +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Η παράμετρος PHP upload_max_filesize (%s) είναι υψηλότερη από την παράμετρο PHP post_max_size (%s). Αυτό δεν είναι μια σταθερή ρύθμιση. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/el_GR/languages.lang b/htdocs/langs/el_GR/languages.lang index d5115d8c6c6..da99fbcb992 100644 --- a/htdocs/langs/el_GR/languages.lang +++ b/htdocs/langs/el_GR/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Αραβικά Language_ar_EG=Αραβικά (Αίγυπτος) Language_ar_SA=Αραβικά +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Βουλγαρικά Language_bs_BA=Βοσνιακά Language_ca_ES=Καταλανικά @@ -20,6 +23,7 @@ Language_en_GB=Αγγλικά (Ηνωμένο Βασίλειο) Language_en_IN=Αγγλικά (Ινδία) Language_en_NZ=Αγγλικά (Νέα Ζηλανδία) Language_en_SA=Αγγλικά (Σαουδική Αραβία) +Language_en_SG=English (Singapore) Language_en_US=Αγγλικά (Ηνωμένων Πολιτειών) Language_en_ZA=Αγγλικά (Νότια Αφρική) Language_es_ES=Ισπανικά @@ -29,6 +33,7 @@ Language_es_CL=Ισπανικά (Χιλή) Language_es_CO=Ισπανικά (Κολομβίας) Language_es_DO=Ισπανικά (Δομινικανή Δημοκρατία) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Ισπανικά (Ονδούρα) Language_es_MX=Ισπανικά (Μεξικό) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Ισπανικά (Παραγουάη) Language_es_PE=Ισπανικά (Περού) Language_es_PR=Ισπανικά (Πουέρτο Ρίκο) Language_es_UY=Ισπανικά (Ουρουγουάη) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Ισπανικά (Βενεζουέλας) Language_et_EE=Εσθονίας Language_eu_ES=Βάσκων @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Γαλλικά (Βέλγιο) Language_fr_CA=Γαλλικά (Καναδά) Language_fr_CH=Γαλλικά (Ελβετία) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Γαλλικά +Language_fr_GA=French (Gabon) Language_fr_NC=Γαλλικά (Νέα Καληδονία) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Εβραϊκά +Language_hi_IN=Hindi (India) Language_hr_HR=Κροατία Language_hu_HU=Ουγγρικά Language_id_ID=Ινδονησίας Language_is_IS=Ισλανδικά Language_it_IT=Ιταλικά +Language_it_CH=Italian (Switzerland) Language_ja_JP=Ιαπωνικά Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,8 +77,9 @@ Language_lv_LV=Λετονίας Language_mk_MK=πΓΔΜ Language_mn_MN=Mongolian Language_nb_NO=Νορβηγικά (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Ολλανδικά (Βέλγιο) -Language_nl_NL=Dutch +Language_nl_NL=Ολλανδός Language_pl_PL=Πολωνικά Language_pt_BR=Πορτογαλικά (Βραζιλίας) Language_pt_PT=Πορτογαλικά @@ -86,4 +100,5 @@ Language_uz_UZ=Ουζμπεκιστάν Language_vi_VN=Βιετνάμ Language_zh_CN=Κινέζικα Language_zh_TW=Κινέζικα (παραδοσιακά) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/el_GR/mails.lang b/htdocs/langs/el_GR/mails.lang index 42f4399baf0..cd95cc106e2 100644 --- a/htdocs/langs/el_GR/mails.lang +++ b/htdocs/langs/el_GR/mails.lang @@ -164,7 +164,11 @@ NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found OutGoingEmailSetup=Outgoing email setup InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=Εγκατάσταση εξερχόμενου email (για ενότητα %s) DefaultOutgoingEmailSetup=Προεπιλεγμένη ρύθμιση εξερχόμενων email Information=Πληροφορίες ContactsWithThirdpartyFilter=Επαφές με φίλτρο τρίτου μέρους +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/el_GR/main.lang b/htdocs/langs/el_GR/main.lang index f616bc7c169..fcac93efc25 100644 --- a/htdocs/langs/el_GR/main.lang +++ b/htdocs/langs/el_GR/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Τιμή μον. (συμπ. Φ.Π.Α.) Amount=Ποσό AmountInvoice=Ποσό Τιμολογίου AmountInvoiced=Ποσό τιμολογημένο -AmountInvoicedHT=Ποσό που έχει τιμολογηθεί (συμπεριλαμβανομένου του φόρου) -AmountInvoicedTTC=Ποσό που έχει τιμολογηθεί (χωρίς φόρο) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Ποσό Πληρωμής AmountHTShort=Ποσό (εκτός) AmountTTCShort=Ποσό (με Φ.Π.Α.) @@ -485,6 +485,7 @@ Categories=Ετικέτες/Κατηγορίες Category=Ετικέτα/Κατηγορία By=Από From=Από +FromDate=Από FromLocation=Από to=πρός To=πρός @@ -687,6 +688,7 @@ Method=Μέθοδος Receive=Παραλαβή CompleteOrNoMoreReceptionExpected=Ολοκληρώθηκε ή δεν αναμένετε κάτι περισσότερο ExpectedValue=Αναμενόμενη αξία +ExpectedQty=Expected Qty PartialWoman=Μερική TotalWoman=Συνολικές NeverReceived=Δεν παραλήφθηκε @@ -703,6 +705,7 @@ MenuECM=Έγγραφα MenuAWStats=AWStats MenuMembers=Μέλη MenuAgendaGoogle=Ημερολόγιο Google +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Όριο Dolibarr (Μενού Ρυθμίσεις-Ασφάλεια): %s Kb, Όριο PHP: %s Kb NoFileFound=Δεν υπάρχουν έγγραφα σε αυτόν τον φάκελο CurrentUserLanguage=Τρέχουσα Γλώσσα @@ -725,7 +728,7 @@ Page=Σελίδα Notes=Σημειώσεις AddNewLine=Προσθήκη Γραμμής AddFile=Προσθήκη Αρχείου -FreeZone=Δεν είναι ένα προκαθορισμένο προϊόν / υπηρεσία +FreeZone=Free-text product FreeLineOfType=Στοιχείο ελεύθερου κειμένου, πληκτρολογήστε: CloneMainAttributes=Κλωνοποίηση αντικειμένου με τα βασικά του χαρακτηριστικά ReGeneratePDF=Επαναπαραγωγή PDF @@ -942,6 +945,39 @@ ShortThursday=Π ShortFriday=Π ShortSaturday=Σ ShortSunday=Κ +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Επιλέξτε ένα πρότυπο ηλεκτρονικού ταχυδρομείου SetRef=Ρύθμιση αναφ Select2ResultFoundUseArrows=Βρέθηκαν αποτελέσματα. Χρησιμοποιήστε τα βέλη για να επιλέξετε. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Μεταβείτε στη λειτουργία NotUsedForThisCustomer=Δεν χρησιμοποιείται για αυτόν τον πελάτη AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Πληροφορίες +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/el_GR/members.lang b/htdocs/langs/el_GR/members.lang index 895cb0c460c..5cc7769499e 100644 --- a/htdocs/langs/el_GR/members.lang +++ b/htdocs/langs/el_GR/members.lang @@ -6,7 +6,7 @@ Member=Μέλος Members=Μέλη ShowMember=Εμφάνιση καρτέλα μέλους UserNotLinkedToMember=Ο χρήστης δεν συνδέετε με κάποιο μέλος -ThirdpartyNotLinkedToMember=Third party not linked to a member +ThirdpartyNotLinkedToMember=Τρίτο μέρος που δεν συνδέεται με κάποιο μέλος MembersTickets=Tickets Μελών FundationMembers=Μέλη οργανισμού ListOfValidatedPublicMembers=Λίστα πιστοποιημένων δημοσίων μελών @@ -21,15 +21,15 @@ MembersListToValid=Λίστα πρόχειρων Μελών (προς επικύ MembersListValid=Λίστα έγκυρων μελών MembersListUpToDate=Λίστα επικυρωμένων μελών που έχουν συνδρομή MembersListNotUpToDate=Λίστα επικυρωμένων μελών που δεν έχουν συνδρομή -MembersListResiliated=List of terminated members +MembersListResiliated=Κατάλογος καταγγελθέντων μελών MembersListQualified=Λίστα επικυρωμένων μελών MenuMembersToValidate=Πρόχειρα Μέλη MenuMembersValidated=Επικυρωμένα μέλη MenuMembersUpToDate=Up to date members MenuMembersNotUpToDate=Out of date members -MenuMembersResiliated=Terminated members +MenuMembersResiliated=Καταλήγοντας μέλη MembersWithSubscriptionToReceive=Μέλη αναμένοντα για λήψη συνδρομής -MembersWithSubscriptionToReceiveShort=Subscription to receive +MembersWithSubscriptionToReceiveShort=Εγγραφή για λήψη DateSubscription=Ημερομηνία συνδρομής DateEndSubscription=Ημερομηνία Λήξης Συνδρομής EndSubscription=Λήξη συνδρομής @@ -49,9 +49,12 @@ MemberStatusActiveLateShort=Ληγμένη MemberStatusPaid=Συνδρομή σε εξέλιξη MemberStatusPaidShort=Up to date MemberStatusResiliated=Μέλος χωρίς Συνδρομή -MemberStatusResiliatedShort=Terminated +MemberStatusResiliatedShort=Τερματίστηκε MembersStatusToValid=Πρόχειρα Μέλη -MembersStatusResiliated=Terminated members +MembersStatusResiliated=Καταλήγοντας μέλη +MemberStatusNoSubscription=Επικυρωμένο (δεν απαιτείται εγγραφή) +MemberStatusNoSubscriptionShort=Επικυρώθηκε +SubscriptionNotNeeded=Δεν απαιτείται συνδρομή NewCotisation=Νέα Δωρεά PaymentSubscription=New contribution payment SubscriptionEndDate=Ημερομηνία Λήξης Συνδρομής @@ -68,19 +71,19 @@ Subscriptions=Συνδρομές SubscriptionLate=Καθυστ. SubscriptionNotReceived=Ποσό Συνδρομής δεν έχει παραληφθεί ListOfSubscriptions=Λίστα Συνδρομών -SendCardByMail=Send card by email +SendCardByMail=Στείλτε την κάρτα με email AddMember=Δημιουργία μέλους NoTypeDefinedGoToSetup=Νέος τύπος μέλους. Πηγαίνετε στις Ρυθμίσεις -> Τύποι μελών NewMemberType=Νέος τύπος μέλους -WelcomeEMail=Welcome email +WelcomeEMail=Καλώς ήλθατε SubscriptionRequired=Απαιτείται Συνδρομή DeleteType=Διαγραφή VoteAllowed=Δικαίωμα ψήφου Physical=Φυσικό Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Επανενεργοποίηση -ResiliateMember=Terminate a member +ResiliateMember=Τερματίστε ένα μέλος ConfirmResiliateMember=Είστε σίγουροι για τη διακοπή της συνδρομής του Μέλους; DeleteMember=Διαγραφή ενός μέλους ConfirmDeleteMember=Είστε σίγουροι ότι θέλετε να διαγράψετε οριστικά αυτο το μέλος (Η διαγραφή ενός Μέλους συνεπάγεται και την αυτόματη διαγραφή των συνδρομών του)? @@ -88,13 +91,13 @@ DeleteSubscription=Διαγραφή συνδρομής ConfirmDeleteSubscription=Είστε σίγουροι ότι θέλετε να διαγράψετε αυτή την συνδρομή? Filehtpasswd=htpasswd file ValidateMember=Επικύρωση ενός μέλους -ConfirmValidateMember=Are you sure you want to validate this member? -FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission. They are not formatted pages, provided as example to show how to list members database. +ConfirmValidateMember=Είστε βέβαιοι ότι θέλετε να επιβεβαιώσετε αυτό το μέλος; +FollowingLinksArePublic=Οι παρακάτω σύνδεσμοι είναι ανοιχτές σελίδες που δεν προστατεύονται από οποιαδήποτε άδεια Dolibarr. Δεν είναι μορφοποιημένες σελίδες, παρέχονται ως παράδειγμα για να παρουσιάσουν τον τρόπο ταξινόμησης της βάσης δεδομένων των μελών. PublicMemberList=Λίστα δημόσιων μελών -BlankSubscriptionForm=Public self-subscription form -BlankSubscriptionFormDesc=Dolibarr can provide you a public URL/website to allow external visitors to ask to subscribe to the foundation. If an online payment module is enabled, a payment form may also be automatically provided. -EnablePublicSubscriptionForm=Enable the public website with self-subscription form -ForceMemberType=Force the member type +BlankSubscriptionForm=Δημόσια μορφή αυτοπροβολής +BlankSubscriptionFormDesc=Το Dolibarr μπορεί να σας παράσχει ένα δημόσιο URL / ιστοσελίδα για να επιτρέψει στους εξωτερικούς επισκέπτες να ζητήσουν να εγγραφούν στο ίδρυμα. Εάν είναι ενεργοποιημένη μια ηλεκτρονική ενότητα πληρωμής, μπορεί να παρέχεται αυτόματα και μια φόρμα πληρωμής. +EnablePublicSubscriptionForm=Ενεργοποιήστε τον δημόσιο ιστότοπο με φόρμα αυτοεξυπηρέτησης +ForceMemberType=Αναγκάστε τον τύπο μέλους ExportDataset_member_1=Μέλη & Συνδρομές ImportDataset_member_1=Μέλη LastMembersModified=Τελευταία %s μέλη που τροποποιήθηκαν @@ -108,33 +111,33 @@ SubscriptionNotRecorded=Η συνδρομή δεν καταγράφηκε AddSubscription=Δημιουργία εγγραφής ShowSubscription=Δείτε τη Συνδρομή # Label of email templates -SendingAnEMailToMember=Sending information email to member -SendingEmailOnAutoSubscription=Sending email on auto registration -SendingEmailOnMemberValidation=Sending email on new member validation -SendingEmailOnNewSubscription=Sending email on new subscription -SendingReminderForExpiredSubscription=Sending reminder for expired subscriptions -SendingEmailOnCancelation=Sending email on cancelation +SendingAnEMailToMember=Αποστολή ηλεκτρονικού μηνύματος ηλεκτρονικού ταχυδρομείου στο μέλος +SendingEmailOnAutoSubscription=Αποστολή ηλεκτρονικού ταχυδρομείου στην αυτόματη εγγραφή +SendingEmailOnMemberValidation=Αποστολή μηνύματος ηλεκτρονικού ταχυδρομείου σχετικά με την επικύρωση νέου μέλους +SendingEmailOnNewSubscription=Αποστολή μηνύματος ηλεκτρονικού ταχυδρομείου σε νέα συνδρομή +SendingReminderForExpiredSubscription=Αποστολή υπενθύμισης για συνδρομές που έχουν λήξει +SendingEmailOnCancelation=Αποστολή μηνύματος ηλεκτρονικού ταχυδρομείου σχετικά με την ακύρωση # Topic of email templates -YourMembershipRequestWasReceived=Your membership was received. -YourMembershipWasValidated=Your membership was validated -YourSubscriptionWasRecorded=Your new subscription was recorded -SubscriptionReminderEmail=Subscription reminder -YourMembershipWasCanceled=Your membership was canceled +YourMembershipRequestWasReceived=Η πρόσβασή σας έγινε δεκτή. +YourMembershipWasValidated=Η ιδιότητα μέλους σας επικυρώθηκε +YourSubscriptionWasRecorded=Η νέα συνδρομή σας καταγράφηκε +SubscriptionReminderEmail=Υπενθύμιση εγγραφής +YourMembershipWasCanceled=Η εγγραφή σας ακυρώθηκε CardContent=Περιεχόμενα καρτέλας # Text of email templates -ThisIsContentOfYourMembershipRequestWasReceived=We want to let you know that your membership request was received.

    -ThisIsContentOfYourMembershipWasValidated=We want to let you know that your membership was validated with the following information:

    -ThisIsContentOfYourSubscriptionWasRecorded=We want to let you know that your new subscription was recorded.

    -ThisIsContentOfSubscriptionReminderEmail=We want to let you know that your subscription is about to expire or has already expired (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). We hope you will renew it.

    -ThisIsContentOfYourCard=This is a summary of the information we have about you. Please contact us if anything is incorrect.

    -DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Subject of the notification email received in case of auto-inscription of a guest -DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Content of the notification email received in case of auto-inscription of a guest -DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Email template to use to send email to a member on member autosubscription -DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Email template to use to send email to a member on member validation -DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Email template to use to send email to a member on new subscription recording -DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Email template to use to send email reminder when subscription is about to expire -DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Email template to use to send email to a member on member cancelation -DescADHERENT_MAIL_FROM=Sender Email for automatic emails +ThisIsContentOfYourMembershipRequestWasReceived=Θα θέλαμε να σας ενημερώσουμε ότι το αίτημά σας για συμμετοχή έγινε δεκτό.

    +ThisIsContentOfYourMembershipWasValidated=Θέλουμε να σας ενημερώσουμε ότι η ιδιότητα μέλους σας έχει επικυρωθεί με τις ακόλουθες πληροφορίες:

    +ThisIsContentOfYourSubscriptionWasRecorded=Θέλουμε να σας ενημερώσουμε ότι η νέα συνδρομή σας έχει καταγραφεί.

    +ThisIsContentOfSubscriptionReminderEmail=Θα θέλαμε να σας ενημερώσουμε ότι η συνδρομή σας πρόκειται να λήξει ή έχει ήδη λήξει (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Ελπίζουμε ότι θα το ανανεώσετε.

    +ThisIsContentOfYourCard=Αυτή είναι μια περίληψη των πληροφοριών που έχουμε σχετικά με εσάς. Επικοινωνήστε μαζί μας αν κάτι είναι λανθασμένο.

    +DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Αντικείμενο του μηνύματος ηλεκτρονικού ταχυδρομείου ειδοποίησης που λαμβάνεται σε περίπτωση αυτόματης εγγραφής επισκέπτη +DescADHERENT_AUTOREGISTER_NOTIF_MAIL=Περιεχόμενο του μηνύματος ηλεκτρονικού ταχυδρομείου ειδοποίησης που λαμβάνεται σε περίπτωση αυτόματης εγγραφής επισκέπτη +DescADHERENT_EMAIL_TEMPLATE_AUTOREGISTER=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου σε ένα μέλος που είναι μέλος της αυτόματης εγγραφής +DescADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου σε μέλος σχετικά με την επικύρωση μέλους +DescADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου σε ένα μέλος στη νέα εγγραφή εγγραφής +DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου όταν η συνδρομή λήγει +DescADHERENT_EMAIL_TEMPLATE_CANCELATION=Πρότυπο ηλεκτρονικού ταχυδρομείου που θα χρησιμοποιηθεί για την αποστολή μηνυμάτων ηλεκτρονικού ταχυδρομείου σε μέλος σχετικά με την ακύρωση μέλους +DescADHERENT_MAIL_FROM=Email αποστολέα για αυτόματα μηνύματα ηλεκτρονικού ταχυδρομείου DescADHERENT_ETIQUETTE_TYPE=Format of labels page DescADHERENT_ETIQUETTE_TEXT=Text printed on member address sheets DescADHERENT_CARD_TYPE=Format of cards page @@ -148,8 +151,8 @@ NoThirdPartyAssociatedToMember=Κανένας Πελ./Προμ. δεν είνα MembersAndSubscriptions= Μέλη & Συνδρομές MoreActions=Complementary action on recording MoreActionsOnSubscription=Συμπληρωματικές δράσεις, που προτείνονται από προεπιλογή κατά την συνδρομή -MoreActionBankDirect=Create a direct entry on bank account -MoreActionBankViaInvoice=Create an invoice, and a payment on bank account +MoreActionBankDirect=Δημιουργήστε μια απευθείας εγγραφή σε τραπεζικό λογαριασμό +MoreActionBankViaInvoice=Δημιουργήστε ένα τιμολόγιο και μια πληρωμή σε τραπεζικό λογαριασμό MoreActionInvoiceOnly=Create an invoice with no payment LinkToGeneratedPages=Generate visit cards LinkToGeneratedPagesDesc=This screen allows you to generate PDF files with business cards for all your members or a particular member. @@ -157,8 +160,8 @@ DocForAllMembersCards=Generate business cards for all members (Format for output DocForOneMemberCards=Generate business cards for a particular member (Format for output actually setup: %s) DocForLabels=Generate address sheets (Format for output actually setup: %s) SubscriptionPayment=Πληρωμή συνδρομής -LastSubscriptionDate=Date of latest subscription payment -LastSubscriptionAmount=Amount of latest subscription +LastSubscriptionDate=Ημερομηνία της τελευταίας πληρωμής εγγραφής +LastSubscriptionAmount=Ποσό τελευταίας συνδρομής MembersStatisticsByCountries=Μέλη στατιστικές ανά χώρα MembersStatisticsByState=Τα μέλη στατιστικών στοιχείων από πολιτεία / επαρχία MembersStatisticsByTown=Τα μέλη στατιστικών στοιχείων από την πόλη @@ -170,9 +173,9 @@ MembersByStateDesc=Αυτή η οθόνη σας δείξει στατιστικ MembersByTownDesc=Αυτή η οθόνη σας δείξει στατιστικά στοιχεία σχετικά με τα μέλη από την πόλη. MembersStatisticsDesc=Επιλέξτε στατιστικά στοιχεία που θέλετε να διαβάσετε ... MenuMembersStats=Στατιστικά -LastMemberDate=Latest member date +LastMemberDate=Τελευταία ημερομηνία μέλους LatestSubscriptionDate=Latest subscription date -MemberNature=Nature of member +MemberNature=Φύση του μέλους Public=Δημόσιο NewMemberbyWeb=Νέο μέλος πρόσθεσε. Εν αναμονή έγκρισης NewMemberForm=Νέα μορφή μέλος @@ -183,19 +186,19 @@ TurnoverOrBudget=Κύκλος εργασιών (για μια επιχείρησ DefaultAmount=Προεπιλογή ποσό της συνδρομής CanEditAmount=Επισκέπτης μπορεί να επιλέξει / επεξεργαστείτε το ποσό της συνδρομής του MEMBER_NEWFORM_PAYONLINE=Μετάβαση στην ολοκληρωμένη ηλεκτρονική σελίδα πληρωμής -ByProperties=By nature -MembersStatisticsByProperties=Members statistics by nature +ByProperties=Εκ ΦΥΣΕΩΣ +MembersStatisticsByProperties=Στατιστικά στοιχεία μελών κατά φύση MembersByNature=Αυτή η οθόνη εμφανίζει στατιστικά για τα μέλη του από τη φύση τους. MembersByRegion=Αυτή η οθόνη εμφανίζει στατιστικά για τα μέλη κατά περιοχή. VATToUseForSubscriptions=Συντελεστή ΦΠΑ που θα χρησιμοποιηθεί για τις συνδρομές -NoVatOnSubscription=No VAT for subscriptions +NoVatOnSubscription=Δεν υπάρχει ΦΠΑ για συνδρομές ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Το προϊόν χρησιμοποιείται για τη γραμμή από συνδρομές στο τιμολόγιο: %s NameOrCompany=Όνομα ή Επωνυμία -SubscriptionRecorded=Subscription recorded -NoEmailSentToMember=No email sent to member -EmailSentToMember=Email sent to member at %s -SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription -SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5') -MembershipPaid=Membership paid for current period (until %s) -YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email -XMembersClosed=%s member(s) closed +SubscriptionRecorded=Εγγραφή εγγραφής +NoEmailSentToMember=Δεν αποστέλλεται μήνυμα ηλεκτρονικού ταχυδρομείου στο μέλος +EmailSentToMember=Το email αποστέλλεται στο μέλος στο %s +SendReminderForExpiredSubscriptionTitle=Στείλτε υπενθύμιση μέσω ηλεκτρονικού ταχυδρομείου για τη λήξη συνδρομής +SendReminderForExpiredSubscription=Αποστολή υπενθύμισης μέσω ηλεκτρονικού ταχυδρομείου στα μέλη όταν η συνδρομή λήγει (η παράμετρος είναι ο αριθμός ημερών πριν από το τέλος της συνδρομής για να στείλετε την υπενθύμιση.) Μπορεί να είναι μια λίστα ημερών που χωρίζονται με ένα ερωτηματικό, για παράδειγμα '10, 5, 0; ') +MembershipPaid=Καταβολή συνδρομής για την τρέχουσα περίοδο (μέχρι %s) +YouMayFindYourInvoiceInThisEmail=Μπορείτε να βρείτε το τιμολόγιο που επισυνάπτεται σε αυτό το μήνυμα ηλεκτρονικού ταχυδρομείου +XMembersClosed=%s μέλος (τα) έκλεισε diff --git a/htdocs/langs/el_GR/mrp.lang b/htdocs/langs/el_GR/mrp.lang index 71ba5135b5c..b3936567cdd 100644 --- a/htdocs/langs/el_GR/mrp.lang +++ b/htdocs/langs/el_GR/mrp.lang @@ -1,5 +1,6 @@ Mrp=Παραγγελίες Παραγωγής MO=Παραγγελία Παραγωγής +MOs=Manufacturing orders MRPDescription=Ενότητα για τη διαχείριση της παραγωγής και των Παραγγελιών Παραγωγής (MO). MRPArea=Περιοχή MRP MrpSetupPage=Ρύθμιση της μονάδας MRP diff --git a/htdocs/langs/el_GR/other.lang b/htdocs/langs/el_GR/other.lang index f5e3ecc7213..28a0f808756 100644 --- a/htdocs/langs/el_GR/other.lang +++ b/htdocs/langs/el_GR/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__ (Γεια σας) __ Βρείτε τη PredefinedMailContentSendSupplierInvoice=__ (Γεια σας) __ Βρείτε το τιμολόγιο __REF__ επισυνάπτεται __ (ειλικρινά) __ __USER_SIGNATURE__ PredefinedMailContentSendShipping=__ (Γεια σας) __ Παρακαλούμε βρείτε την αποστολή __REF__ συνημμένο __ (ειλικρινά) __ __USER_SIGNATURE__ PredefinedMailContentSendFichInter=__ (Γεια σας) __ Βρείτε την παρέμβαση __REF__ επισυνάπτεται __ (ειλικρινά) __ __USER_SIGNATURE__ -PredefinedMailContentThirdparty=__ (Γεια σας) __ __ (ειλικρινά) __ __USER_SIGNATURE__ -PredefinedMailContentContact=__ (Γεια σας) __ __ (ειλικρινά) __ __USER_SIGNATURE__ -PredefinedMailContentUser=__ (Γεια σας) __ __ (ειλικρινά) __ __USER_SIGNATURE__ PredefinedMailContentLink=Μπορείτε να κάνετε κλικ στον παρακάτω σύνδεσμο για να πραγματοποιήσετε την πληρωμή σας, αν δεν έχει γίνει ήδη. %s +PredefinedMailContentGeneric=__ (Γεια σας) __ __ (ειλικρινά) __ __USER_SIGNATURE__ DemoDesc=Το Dolibarr είναι ένα συμπαγές ERP / CRM που υποστηρίζει διάφορες λειτουργικές μονάδες. Ένα demo που παρουσιάζει όλες τις μονάδες δεν έχει νόημα καθώς το σενάριο αυτό δεν εμφανίζεται ποτέ (αρκετές εκατοντάδες διαθέσιμες). Έτσι, πολλά προφίλ επίδειξης είναι διαθέσιμα. ChooseYourDemoProfil=Επιλέξτε το προφίλ επίδειξης που ταιριάζει καλύτερα στις ανάγκες σας ... ChooseYourDemoProfilMore=... ή να δημιουργήσετε το δικό σας προφίλ
    (επιλογή χειροκίνητης μονάδας) @@ -280,7 +278,9 @@ LinesToImport=Γραμμές για εισαγωγή MemoryUsage=Χρήση μνήμης RequestDuration=Διάρκεια αίτησης +ProductsPerPopularity=Products/Services by popularity PopuProp=Προϊόντα / Υπηρεσίες κατά δημοτικότητα στις Προτάσεις PopuCom=Προϊόντα / Υπηρεσίες κατά δημοτικότητα στις παραγγελίες ProductStatistics=Στατιστικά Προϊόντων / Υπηρεσιών NbOfQtyInOrders=Ποσότητα σε παραγγελίες +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/el_GR/products.lang b/htdocs/langs/el_GR/products.lang index dfe17650e02..4ecc503cf8d 100644 --- a/htdocs/langs/el_GR/products.lang +++ b/htdocs/langs/el_GR/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Ορισμός τύπου barcode BarcodeValue=Τιμή Barcode NoteNotVisibleOnBill=Σημείωση (μη ορατή σε τιμολόγια, προτάσεις...) ServiceLimitedDuration=Εάν το προϊόν είναι μια υπηρεσία με περιορισμένη διάρκεια: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Πολλαπλά τμήματα τιμών ανά προϊόν / υπηρεσία (κάθε πελάτης βρίσκεται σε ένα τμήμα τιμών) MultiPricesNumPrices=Αριθμός τιμής DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Τιμές πωλητών (προϊόντω CustomCode=Τελωνείο / εμπορεύματα / κωδικός ΕΣ CountryOrigin=Χώρα προέλευσης Nature=Φύση προϊόντος (υλικό / τελικό) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Σύντομη ετικέτα Unit=Μονάδα p=Μονάδα @@ -359,6 +362,9 @@ SelectCombination=Επιλέξτε συνδυασμό ProductCombinationGenerator=Γεννήτρια παραλλαγών Features=Χαρακτηριστικά PriceImpact=Επιπτώσεις στις τιμές +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Επιπτώσεις στο βάρος NewProductAttribute=Νέο χαρακτηριστικό NewProductAttributeValue=Νέα τιμή χαρακτηριστικού diff --git a/htdocs/langs/el_GR/projects.lang b/htdocs/langs/el_GR/projects.lang index bca4c6264b1..de4fe4901f7 100644 --- a/htdocs/langs/el_GR/projects.lang +++ b/htdocs/langs/el_GR/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Συνεισφέρων TypeContact_project_task_external_TASKCONTRIBUTOR=Συνεισφέρων SelectElement=Επιλέξτε το στοιχείο AddElement=Σύνδεση με το στοιχείο +LinkToElementShort=Σύνδεση σε # Documents models DocumentModelBeluga=Πρότυπο εγγράφου έργου για επισκόπηση συνδεδεμένων αντικειμένων DocumentModelBaleine=Πρότυπο εγγράφου έργου για εργασίες @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Αριθμός δημιουργηθέντων έργων ProjectNbTaskByMonth=Αριθμός δημιουργημένων εργασιών ανά μήνα ProjectOppAmountOfProjectsByMonth=Ποσό οδηγιών ανά μήνα ProjectWeightedOppAmountOfProjectsByMonth=Σταθμισμένο ποσό οδηγεί κατά μήνα -ProjectOpenedProjectByOppStatus=Ανοίξτε το έργο / οδηγήστε από την κατάσταση του οδηγού -ProjectsStatistics=Στατιστικά στοιχεία σχετικά με τα σχέδια / οδηγούς -TasksStatistics=Στατιστικά στοιχεία σχετικά με τα έργα / εργασίες +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Η εργασία έχει εκχωρηθεί. Πρέπει να είναι δυνατή η εισαγωγή του χρόνου αυτού του έργου. IdTaskTime=Χρόνος εργασίας Id YouCanCompleteRef=Εάν θέλετε να συμπληρώσετε το ref με κάποιο επίθημα, συνιστάται να προσθέσετε ένα χαρακτήρα για να το διαχωρίσετε, οπότε η αυτόματη αρίθμηση θα εξακολουθήσει να λειτουργεί σωστά για τα επόμενα έργα. Για παράδειγμα %s-MYSUFFIX diff --git a/htdocs/langs/el_GR/recruitment.lang b/htdocs/langs/el_GR/recruitment.lang new file mode 100644 index 00000000000..56b5b4347f5 --- /dev/null +++ b/htdocs/langs/el_GR/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Ρυθμίσεις +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Πληροφορίες +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/el_GR/stocks.lang b/htdocs/langs/el_GR/stocks.lang index 76464e42488..d812268d788 100644 --- a/htdocs/langs/el_GR/stocks.lang +++ b/htdocs/langs/el_GR/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Διαγραφή αποστολής Stock=Στοκ Stocks=Αποθέματα MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Αποθέματα ανά παρτίδα / σειρά @@ -95,14 +95,16 @@ RealStock=Real Χρηματιστήριο RealStockDesc=Το φυσικό / πραγματικό απόθεμα είναι το απόθεμα που βρίσκεται σήμερα στις αποθήκες. RealStockWillAutomaticallyWhen=Το πραγματικό απόθεμα θα τροποποιηθεί σύμφωνα με αυτόν τον κανόνα (όπως ορίζεται στην ενότητα του αποθέματος): VirtualStock=Εικονική απόθεμα -VirtualStockDesc=Το εικονικό απόθεμα είναι το διαθέσιμο διαθέσιμο απόθεμα αφού κλείσει όλες οι ανοιχτές / εκκρεμείς ενέργειες (που επηρεάζουν τα αποθέματα) (παραγγελίες αγοράς, παραγγελίες πώλησης κ.λπ.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id αποθήκη DescWareHouse=Αποθήκη Περιγραφή LieuWareHouse=Αποθήκη Localisation WarehousesAndProducts=Αποθήκες και τα προϊόντα WarehousesAndProductsBatchDetail=Αποθήκες και προϊόντα (με λεπτομέρεια ανά παρτίδα / σειρά) -AverageUnitPricePMPShort=Μέση σταθμική τιμή εισόδου -AverageUnitPricePMP=Μέση σταθμική τιμή εισόδου +AverageUnitPricePMPShort=Μέση σταθμική τιμή +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Πώληση Τιμή μονάδας EstimatedStockValueSellShort=Τιμή για πώληση EstimatedStockValueSell=Τιμή για πώληση @@ -141,7 +143,7 @@ Replenishments=Αναπληρώσεις NbOfProductBeforePeriod=Ποσότητα του προϊόντος %s σε απόθεμα πριν από την επιλεγμένη περίοδο (< %s) NbOfProductAfterPeriod=Ποσότητα του προϊόντος %s σε απόθεμα πριν από την επιλεγμένη περίοδο (> %s) MassMovement=Μαζική μετακίνηση -SelectProductInAndOutWareHouse=Επιλέξτε ένα προϊόν, ποσότητα, μια αποθήκη πηγή και μια αποθήκη στόχο, στη συνέχεια, κάντε κλικ στο "%s". Μόλις γίνει αυτό για όλες τις απαιτούμενες κινήσεις, κάντε κλικ στο "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Μεταφορά εγγραφών ReceivingForSameOrder=Αποδείξεις για αυτή την παραγγελία StockMovementRecorded=Οι κινήσεις των αποθεμάτων καταγράφονται @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/el_GR/suppliers.lang b/htdocs/langs/el_GR/suppliers.lang index 99f2734abee..542e6305bd1 100644 --- a/htdocs/langs/el_GR/suppliers.lang +++ b/htdocs/langs/el_GR/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Χαμηλή ποιότητα ReputationForThisProduct=Φήμη BuyerName=Όνομα αγοραστή AllProductServicePrices=Όλες οι τιμές προϊόντων / υπηρεσιών -AllProductReferencesOfSupplier=Όλες οι αναφορές προϊόντων / υπηρεσιών του πωλητή +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Τιμές πωλητών diff --git a/htdocs/langs/el_GR/ticket.lang b/htdocs/langs/el_GR/ticket.lang index 7beaf684a88..67327d94483 100644 --- a/htdocs/langs/el_GR/ticket.lang +++ b/htdocs/langs/el_GR/ticket.lang @@ -72,7 +72,6 @@ Deleted=Διαγράφηκε # Dict Type=Τύπος -Category=Αναλυτικός κώδικας Severity=Δριμύτητα # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Ορίστε αυτόματα τον χρήστη που TicketsAutoAssignTicketHelp=Κατά τη δημιουργία ενός εισιτηρίου, ο χρήστης μπορεί να αντιστοιχιστεί αυτόματα στο εισιτήριο. TicketNumberingModules=Μονάδα αρίθμησης εισιτηρίων TicketNotifyTiersAtCreation=Ειδοποιήστε τρίτο μέρος στη δημιουργία -TicketGroup=Ομάδα TicketsDisableCustomerEmail=Πάντα να απενεργοποιείτε τα μηνύματα ηλεκτρονικού ταχυδρομείου όταν δημιουργείται ένα εισιτήριο από τη δημόσια διασύνδεση TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Δημιουργήθηκε από NewTicket=Νέο εισιτήριο SubjectAnswerToTicket=Απάντηση εισιτηρίου TicketTypeRequest=Τύπος αιτήματος -TicketCategory=Αναλυτικός κώδικας +TicketCategory=Ομάδα SeeTicket=Δείτε εισιτήριο TicketMarkedAsRead=Το εισιτήριο έχει επισημανθεί ως αναγνωσμένο TicketReadOn=Συνέχισε να διαβάζεις diff --git a/htdocs/langs/el_GR/users.lang b/htdocs/langs/el_GR/users.lang index bc56e33fb69..af7a6c554df 100644 --- a/htdocs/langs/el_GR/users.lang +++ b/htdocs/langs/el_GR/users.lang @@ -70,7 +70,7 @@ ExportDataset_user_1=Χρήστες και τις ιδιότητές τους DomainUser=Domain user %s Reactivate=Reactivate CreateInternalUserDesc=Αυτή η φόρμα σάς επιτρέπει να δημιουργήσετε έναν εσωτερικό χρήστη στην εταιρεία / οργανισμό σας. Για να δημιουργήσετε έναν εξωτερικό χρήστη (πελάτη, προμηθευτή κ.λπ.), χρησιμοποιήστε το κουμπί "Δημιουργία χρήστη Dolibarr" από την κάρτα επαφών του τρίτου μέρους. -InternalExternalDesc=An internal user is a user that is part of your company/organization.
    An external user is a customer, vendor or other (Creating an external user for a third-party can be done from the contact record of the third-party).

    In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display) +InternalExternalDesc=Ένας εσωτερικός χρήστης είναι ένας χρήστης που ανήκει στην εταιρεία / τον οργανισμό σας.
    Ένας εξωτερικός χρήστης είναι πελάτης, προμηθευτής ή άλλος (Η δημιουργία εξωτερικού χρήστη για τρίτο μέρος μπορεί να γίνει από την εγγραφή επαφής του τρίτου μέρους).

    Και στις δύο περιπτώσεις, τα δικαιώματα ορίζουν δικαιώματα στο Dolibarr, επίσης ο εξωτερικός χρήστης μπορεί να έχει διαφορετικό διαχειριστή μενού από τον εσωτερικό χρήστη (Βλέπε Αρχική σελίδα - Ρύθμιση - Οθόνη) PermissionInheritedFromAGroup=Permission granted because inherited from one of a user's group. Inherited=Inherited UserWillBeInternalUser=Δημιουργήθηκε χρήστη θα είναι ένας εσωτερικός χρήστης (επειδή δεν συνδέεται με ένα συγκεκριμένο τρίτο μέρος) @@ -78,6 +78,7 @@ UserWillBeExternalUser=Δημιουργήθηκε χρήστης θα είναι IdPhoneCaller=Id phone caller NewUserCreated=User %s created NewUserPassword=Password change for %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=User %s modified UserDisabled=User %s disabled UserEnabled=User %s activated @@ -107,11 +108,13 @@ DisabledInMonoUserMode=Απενεργοποιημένο σε κατάσταση UserAccountancyCode=Κωδικός λογαριασμού χρήστη UserLogoff=Αποσύνδεση χρήστη UserLogged=Ο χρήστης καταγράφηκε +DateOfEmployment=Employment date DateEmployment=Ημερομηνία έναρξης απασχόλησης DateEmploymentEnd=Ημερομηνία λήξης απασχόλησης CantDisableYourself=Δεν μπορείτε να απενεργοποιήσετε το δικό σας αρχείο χρήστη ForceUserExpenseValidator=Έγκριση έκθεσης εξόδου ισχύος ForceUserHolidayValidator=Έγκριση αίτησης για άδεια εξόδου ValidatorIsSupervisorByDefault=Από προεπιλογή, ο επικυρωτής είναι ο επόπτης του χρήστη. Κρατήστε κενό για να διατηρήσετε αυτή τη συμπεριφορά. -UserPersonalEmail=Personal email -UserPersonalMobile=Personal mobile phone +UserPersonalEmail=Προσωπικό email +UserPersonalMobile=Προσωπικό κινητό τηλέφωνο +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/el_GR/withdrawals.lang b/htdocs/langs/el_GR/withdrawals.lang index b352801103d..b4cebd19f0c 100644 --- a/htdocs/langs/el_GR/withdrawals.lang +++ b/htdocs/langs/el_GR/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Τελευταία αρχεία άμεσης χρέωσης %s @@ -63,7 +63,9 @@ InvoiceRefused=Τιμολόγιο απορρίφθηκε (Φορτίστε τη StatusDebitCredit=Κατάσταση χρέωσης / πίστωσης StatusWaiting=Αναμονή StatusTrans=Απεσταλμένο +StatusDebited=Debited StatusCredited=Πιστωθεί +StatusPaid=Επεξεργάστηκε StatusRefused=Αρνήθηκε StatusMotif0=Απροσδιόριστο StatusMotif1=Ανεπαρκή κεφάλαια @@ -77,13 +79,13 @@ StatusMotif8=Άλλος λόγος CreateForSepaFRST=Δημιουργία αρχείου άμεσης χρέωσης (SEPA FRST) CreateForSepaRCUR=Δημιουργία αρχείου άμεσης χρέωσης (SEPA RCUR) CreateAll=Δημιουργία αρχείου άμεσης χρέωσης (όλα) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Μόνο το γραφείο CreateBanque=Μόνο τράπεζα OrderWaiting=Αναμονή για θεραπεία -NotifyTransmision=Η μετάδοση Απόσυρση -NotifyCredit=Πιστωτικές Απόσυρση +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Εθνικό Αριθμός Transmitter WithBankUsingRIB=Για τους τραπεζικούς λογαριασμούς που χρησιμοποιούν RIB WithBankUsingBANBIC=Για τους τραπεζικούς λογαριασμούς που χρησιμοποιούν IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Πιστωτικές με WithdrawalFileNotCapable=Αδύνατο να δημιουργηθεί το αρχείο παραλαβή απόσυρση για τη χώρα σας %s (η χώρα σας δεν υποστηρίζεται) ShowWithdraw=Εμφάνιση εντολής άμεσης χρέωσης IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Ωστόσο, εάν το τιμολόγιο έχει τουλάχιστον μία εντολή πληρωμής άμεσης χρέωσης που δεν έχει ακόμη υποβληθεί σε επεξεργασία, δεν θα οριστεί ως πληρωμή για να επιτραπεί η προηγούμενη διαχείριση ανάληψης. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Απόσυρση αρχείο +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Ρυθμίστε την κατάσταση "αποστολή αρχείου" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Στατιστικά στοιχεία από την κατάσταση των γραμμών @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Είδος πληρωμής ModeRECUR=Επαναλαμβανόμενη πληρωμή ModeFRST=Εφάπαξ πληρωμή PleaseCheckOne=Παρακαλώ επιλέξτε ένα μόνο +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Η εντολή άμεσης χρέωσης %s δημιουργήθηκε AmountRequested=Ποσό που ζητήθηκε SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Ποσό: %s
    Μέθοδος: %s
    Ημερομηνία: %s InfoRejectSubject=Η εντολή πληρωμής άμεσης χρέωσης απορρίφθηκε InfoRejectMessage=Γεια σας,

    η εντολή πληρωμής άμεσης χρέωσης του τιμολογίου %s σχετικά με την εταιρεία %s, με το ποσό %s απορρίφθηκε από την τράπεζα.

    -
    %s ModeWarning=Επιλογή για την πραγματική κατάσταση, δεν είχε καθοριστεί, σταματάμε μετά από αυτή την προσομοίωση +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/el_GR/workflow.lang b/htdocs/langs/el_GR/workflow.lang index 2b8baea5955..0c31b6ae167 100644 --- a/htdocs/langs/el_GR/workflow.lang +++ b/htdocs/langs/el_GR/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Ροής εργασίας ρύθμιση μονάδας -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. -ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. +WorkflowDesc=Αυτή η ενότητα παρέχει ορισμένες αυτόματες ενέργειες. Από προεπιλογή, η ροή εργασιών είναι ανοιχτή (μπορείτε να κάνετε πράγματα με τη σειρά που θέλετε), αλλά εδώ μπορείτε να ενεργοποιήσετε ορισμένες αυτόματες ενέργειες. +ThereIsNoWorkflowToModify=Δεν υπάρχουν τροποποιήσεις ροής εργασίας με τις ενεργοποιημένες μονάδες. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) -descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Δημιουργήστε αυτόματα μια εντολή πώλησης μετά την υπογραφή μιας εμπορικής πρότασης (η νέα παραγγελία θα έχει το ίδιο ποσό με την πρόταση) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Αυτόματη δημιουργία τιμολογίου πελάτη μετά την υπογραφή εμπορικής πρότασης (το νέο τιμολόγιο θα έχει το ίδιο ποσό με την πρόταση) +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Αυτόματη δημιουργία τιμολογίου πελάτη μετά την επικύρωση μιας σύμβασης +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Αυτόματη δημιουργία τιμολογίου πελάτη μετά την ολοκλήρωση της παραγγελίας πώλησης (το νέο τιμολόγιο θα έχει το ίδιο ποσό με την παραγγελία) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) -AutomaticCreation=Automatic creation -AutomaticClassification=Automatic classification +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Ταξινόμηση της πρότασης συνδεδεμένης πηγής ως χρεώνεται όταν η εντολή πώλησης έχει οριστεί σε τιμολόγια (και αν το ποσό της παραγγελίας είναι το ίδιο με το συνολικό ποσό της υπογεγραμμένης συνδεδεμένης πρότασης) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Ταξινόμηση της προτεινόμενης πρότασης πηγής ως χρεώνεται όταν επικυρώνεται το τιμολόγιο πελάτη (και αν το ποσό του τιμολογίου είναι το ίδιο με το συνολικό ποσό της υπογεγραμμένης συνδεδεμένης πρότασης) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Ταξινόμηση της εντολής πωλήσεων συνδεδεμένης πηγής ως χρεώνεται όταν έχει επικυρωθεί το τιμολόγιο πελάτη (και εάν το ποσό του τιμολογίου είναι το ίδιο με το συνολικό ποσό της συνδεδεμένης παραγγελίας) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Ταξινόμηση της εντολής πωλήσεων συνδεδεμένης πηγής ως χρεώνεται όταν το τιμολόγιο πελάτη έχει οριστεί για πληρωμή (και αν το ποσό του τιμολογίου είναι το ίδιο με το συνολικό ποσό της συνδεδεμένης παραγγελίας) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Ταξινόμηση της εντολής πωλήσεων συνδεδεμένης πηγής ως αποστολής κατά την επικύρωση μιας αποστολής (και εάν η ποσότητα που αποστέλλεται από όλες τις αποστολές είναι η ίδια με τη σειρά για την ενημέρωση) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Ταξινόμηση της πρότασης προμηθευτή συνδεδεμένης πηγής ως τιμολογίου όταν επικυρωθεί το τιμολόγιο πωλητή (και εάν το ποσό του τιμολογίου είναι το ίδιο με το συνολικό ποσό της συνδεδεμένης πρότασης) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Ταξινόμηση της εντολής αγοράς συνδεδεμένης πηγής ως χρεώνεται όταν επικυρώνεται το τιμολόγιο πωλητή (και αν το ποσό του τιμολογίου είναι το ίδιο με το συνολικό ποσό της συνδεδεμένης παραγγελίας) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +AutomaticCreation=Αυτόματη δημιουργία +AutomaticClassification=Αυτόματη ταξινόμηση diff --git a/htdocs/langs/el_GR/zapier.lang b/htdocs/langs/el_GR/zapier.lang index b8f19d33469..84986a17471 100644 --- a/htdocs/langs/el_GR/zapier.lang +++ b/htdocs/langs/el_GR/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Μονάδα Zapier για Dolibarr # Admin page # ZapierForDolibarrSetup = Εγκατάσταση του Zapier για Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/en_AU/admin.lang b/htdocs/langs/en_AU/admin.lang index 50add47a7d4..0980facb414 100644 --- a/htdocs/langs/en_AU/admin.lang +++ b/htdocs/langs/en_AU/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. OldVATRates=Old GST rate NewVATRates=New GST rate DictionaryVAT=GST Rates or Sales Tax Rates diff --git a/htdocs/langs/en_AU/cashdesk.lang b/htdocs/langs/en_AU/cashdesk.lang index 463a094b82f..adbd9cf9e57 100644 --- a/htdocs/langs/en_AU/cashdesk.lang +++ b/htdocs/langs/en_AU/cashdesk.lang @@ -1,4 +1,2 @@ # Dolibarr language file - Source file is en_US - cashdesk NoVAT=No GST for this sale -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/en_AU/main.lang b/htdocs/langs/en_AU/main.lang index f51ad592766..102482cbd63 100644 --- a/htdocs/langs/en_AU/main.lang +++ b/htdocs/langs/en_AU/main.lang @@ -19,7 +19,6 @@ FormatDateHourShort=%d/%m/%Y %I:%M %p FormatDateHourSecShort=%d/%m/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias ErrorNoVATRateDefinedForSellerCountry=Error, no GST rates defined for country '%s'. Quadri=Quarter PriceUTTC=U.P. (incl GST) @@ -36,3 +35,4 @@ TTC=Incl GST VAT=GST VATRate=GST Rate Check=Cheque +CREATEInDolibarr=Record %s create diff --git a/htdocs/langs/en_AU/stocks.lang b/htdocs/langs/en_AU/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/en_AU/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/en_AU/website.lang b/htdocs/langs/en_AU/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/en_AU/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/en_AU/withdrawals.lang b/htdocs/langs/en_AU/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/en_AU/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/en_CA/admin.lang b/htdocs/langs/en_CA/admin.lang index a7c6cc9d271..62dd510c5e0 100644 --- a/htdocs/langs/en_CA/admin.lang +++ b/htdocs/langs/en_CA/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. LocalTax1Management=PST Management CompanyZip=Postal code LDAPFieldZip=Postal code diff --git a/htdocs/langs/en_CA/cashdesk.lang b/htdocs/langs/en_CA/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/en_CA/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/en_CA/main.lang b/htdocs/langs/en_CA/main.lang index 7ce3e998978..2fcf148aea0 100644 --- a/htdocs/langs/en_CA/main.lang +++ b/htdocs/langs/en_CA/main.lang @@ -19,7 +19,6 @@ FormatDateHourShort=%d.%m.%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias ErrorNoVATRateDefinedForSellerCountry=Error, no vat rate defined for country '%s'. AmountVAT=Amount GST AmountLT1=Amount PST @@ -27,3 +26,4 @@ TotalVAT=Total GST TotalLT1=Total PST VAT=GST VATRate=GST rate +CREATEInDolibarr=Record %s create diff --git a/htdocs/langs/en_CA/stocks.lang b/htdocs/langs/en_CA/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/en_CA/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/en_CA/website.lang b/htdocs/langs/en_CA/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/en_CA/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/en_CA/withdrawals.lang b/htdocs/langs/en_CA/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/en_CA/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/en_GB/admin.lang b/htdocs/langs/en_GB/admin.lang index 1d26334c78d..11a52c3a368 100644 --- a/htdocs/langs/en_GB/admin.lang +++ b/htdocs/langs/en_GB/admin.lang @@ -20,7 +20,6 @@ ImportPostgreSqlDesc=To import a backup file, you must use the pg_restore comman CommandsToDisableForeignKeysForImportWarning=This is mandatory if you want to restore your sql dumps later ModulesMarketPlaceDesc=You can find more modules to download from external websites on the Internet... ModulesMarketPlaces=Find external applications and modules -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is enabled InstrucToEncodePass=To have password encoded into the conf.php file, replace the line
    $dolibarr_main_db_pass="...";
    with
    $dolibarr_main_db_pass="crypted:%s"; InstrucToClearPass=To have password decoded (clear) into the conf.php file, replace the line
    $dolibarr_main_db_pass="crypted:...";
    with
    $dolibarr_main_db_pass="%s"; diff --git a/htdocs/langs/en_GB/banks.lang b/htdocs/langs/en_GB/banks.lang index f50d62701a3..a71bc9ac60c 100644 --- a/htdocs/langs/en_GB/banks.lang +++ b/htdocs/langs/en_GB/banks.lang @@ -1,7 +1,15 @@ # Dolibarr language file - Source file is en_US - banks CheckTransmitter=Drawer +ValidateCheckReceipt=Validate this cheque receipt? +ConfirmValidateCheckReceipt=Are you sure you want to validate this cheque receipt? No change will be possible once this is done. +DeleteCheckReceipt=Delete this cheque receipt? +ConfirmDeleteCheckReceipt=Are you sure you want to delete this cheque receipt? BankChecks=Bank cheques +BankChecksToReceipt=Cheques awaiting deposit +BankChecksToReceiptShort=Cheques awaiting deposit ShowCheckReceipt=Show cheque deposit receipt +NumberOfCheques=No. of cheques +SelectChequeTransactionAndGenerate=Select/filter cheques to include in the cheque deposit receipt, then click "Create". InputReceiptNumber=Identify the bank statement to reconcile. Use a sortable numeric value: YYYYMM or YYYYMMDD EventualyAddCategory=Specify a category in which to classify the records, if required ThenCheckLinesAndConciliate=Select the lines shown on the bank statement and click @@ -11,5 +19,7 @@ LabelRIB=Bank account Label NoBANRecord=No bank account record DeleteARib=Delete bank account record RejectCheck=Cheque returned +ConfirmRejectCheck=Are you sure you want to mark this cheque as rejected? RejectCheckDate=Date the cheque was returned CheckRejected=Cheque returned +CheckRejectedAndInvoicesReopened=Cheque returned and invoices reopened diff --git a/htdocs/langs/en_GB/bills.lang b/htdocs/langs/en_GB/bills.lang index 6017c065657..edab2e8bb42 100644 --- a/htdocs/langs/en_GB/bills.lang +++ b/htdocs/langs/en_GB/bills.lang @@ -17,7 +17,14 @@ ChequeMaker=Cheque/Transfer drawer ChequeBank=Bank of Cheque CheckBank=Cheque PrettyLittleSentence=Accept the amount of payments due by cheques issued in my name as a Member of an accounting association approved by the Fiscal Administration. +PaymentByChequeOrderedTo=Cheque payments (including tax) are payable to %s, send to +PaymentByChequeOrderedToShort=Cheque payments (incl. tax) are payable to +MenuChequeDeposits=Cheque Deposits MenuCheques=Cheques +MenuChequesReceipts=Cheque receipts +ChequesReceipts=Cheque receipts +ChequesArea=Cheque deposits area +ChequeDeposits=Cheque deposits Cheques=Cheques NbCheque=Number of cheques MarsNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoices, %syymm-nnnn for replacement invoices, %syymm-nnnn for deposit invoices and %syymm-nnnn for credit notes where yy is year, mm is month and nnnn is a sequence with no break and no return to 0 diff --git a/htdocs/langs/en_GB/cashdesk.lang b/htdocs/langs/en_GB/cashdesk.lang index 5528ba978e2..0188074370e 100644 --- a/htdocs/langs/en_GB/cashdesk.lang +++ b/htdocs/langs/en_GB/cashdesk.lang @@ -6,5 +6,3 @@ NewSell=New sale RestartSelling=Go back to sales NoProductFound=No product found NoArticle=No product -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/en_GB/compta.lang b/htdocs/langs/en_GB/compta.lang index 5811bc86b24..e6fe573fe69 100644 --- a/htdocs/langs/en_GB/compta.lang +++ b/htdocs/langs/en_GB/compta.lang @@ -1,7 +1,9 @@ # Dolibarr language file - Source file is en_US - compta CheckReceipt=Cheque deposit CheckReceiptShort=Cheque deposit +LastCheckReceiptShort=Last %s cheque receipts NewCheckDeposit=New cheque deposit NewCheckDepositOn=Create receipt for deposit to account: %s NoWaitingChecks=No cheques awaiting deposit. DateChequeReceived=Cheque reception date +NbOfCheques=No. of cheques diff --git a/htdocs/langs/en_GB/main.lang b/htdocs/langs/en_GB/main.lang index b712cacaa69..9fb796ec07a 100644 --- a/htdocs/langs/en_GB/main.lang +++ b/htdocs/langs/en_GB/main.lang @@ -19,7 +19,6 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias ErrorNoVATRateDefinedForSellerCountry=Error, no VAT rates defined for country '%s'. NotAuthorized=You are not authorised to do that. BackgroundColorByDefault=Default background colour @@ -41,3 +40,4 @@ Canceled=Cancelled Color=Colour NoPhotoYet=No picture available yet SearchIntoSupplierProposals=Vendor quotes +CREATEInDolibarr=Record %s create diff --git a/htdocs/langs/en_GB/stocks.lang b/htdocs/langs/en_GB/stocks.lang index f7af001b916..d1dcfa24f6f 100644 --- a/htdocs/langs/en_GB/stocks.lang +++ b/htdocs/langs/en_GB/stocks.lang @@ -14,3 +14,4 @@ IsInPackage=Packaged ThisSerialAlreadyExistWithDifferentDate=This lot/serial number (%s) already exists but with different useby or sellby dates (found %s but you entered %s). OptionMULTIPRICESIsOn=Option "several prices per segment" is on. It means a product has several selling price so total of stock by sales value can't be calculated AddNewProductStockWarehouse=Set new limit for alert and desired optimal stock level +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/en_GB/website.lang b/htdocs/langs/en_GB/website.lang index f2cfbf3456c..ef8e16da6ad 100644 --- a/htdocs/langs/en_GB/website.lang +++ b/htdocs/langs/en_GB/website.lang @@ -1,3 +1,2 @@ # Dolibarr language file - Source file is en_US - website PageNameAliasHelp=Name or alias of the page.
    This alias is also used to forge an SEO URL when the website is run from a Virtual host of a Web server (like Apache, Nginx, ...). Use the button "%s" to edit this alias. -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/en_GB/withdrawals.lang b/htdocs/langs/en_GB/withdrawals.lang index 5ff06df1221..b1d58194878 100644 --- a/htdocs/langs/en_GB/withdrawals.lang +++ b/htdocs/langs/en_GB/withdrawals.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order NotPossibleForThisStatusOfWithdrawReceiptORLine=Not yet possible. Payment status must be set to 'credited' before declaring reject on specific lines. AmountToWithdraw=Amount to pay MakeWithdrawRequest=Make a Direct Debit payment request @@ -10,12 +9,7 @@ RefusedInvoicing=Invoicing the rejection NoInvoiceRefused=Do not charge for the rejection StatusMotif6=Account without a balance OrderWaiting=Waiting for action -NotifyTransmision=Payment Transmission -NotifyCredit=Payment Credit WithdrawalFileNotCapable=Unable to generate Payment receipt file for your country %s (Your country is not supported) -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Payment file WithdrawRequestAmount=The amount of Direct Debit request: WithdrawRequestErrorNilAmount=Unable to create a Direct Debit request for an empty amount. SEPALegalText=By signing this mandate form, you authorise (A) %s to send instructions to your bank to debit your account and (B) your bank to debit your account in accordance with the instructions from %s. As part of your rights, you are entitled to a refund from your bank under the terms and conditions of your agreement with your bank. A refund must be claimed within 8 weeks starting from the date on which your account was debited. Your rights regarding the above mandate are explained in a statement that you can obtain from your bank. diff --git a/htdocs/langs/en_GB/workflow.lang b/htdocs/langs/en_GB/workflow.lang index 76a0eacdf1f..57fc547e54d 100644 --- a/htdocs/langs/en_GB/workflow.lang +++ b/htdocs/langs/en_GB/workflow.lang @@ -1,4 +1,2 @@ # Dolibarr language file - Source file is en_US - workflow -WorkflowDesc=This module is designed to modify the behaviour of automatic actions within the application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. ThereIsNoWorkflowToModify=There is no workflow modifications available within the activated modules. -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have the same amount than proposal) diff --git a/htdocs/langs/en_IN/admin.lang b/htdocs/langs/en_IN/admin.lang index ebfc7deb6d3..4b3c42b80b1 100644 --- a/htdocs/langs/en_IN/admin.lang +++ b/htdocs/langs/en_IN/admin.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. Module20Name=Quotations Module20Desc=Management of quotations Permission21=Read quotations diff --git a/htdocs/langs/en_IN/cashdesk.lang b/htdocs/langs/en_IN/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/en_IN/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/en_IN/main.lang b/htdocs/langs/en_IN/main.lang index 15902ff1c4d..2012bdeac9d 100644 --- a/htdocs/langs/en_IN/main.lang +++ b/htdocs/langs/en_IN/main.lang @@ -19,8 +19,8 @@ FormatDateHourShort=%d/%m/%Y %I:%M %p FormatDateHourSecShort=%d/%m/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias CommercialProposalsShort=Quotations LinkToProposal=Link to quotation SearchIntoCustomerProposals=Quotations ContactDefault_propal=Quotation +CREATEInDolibarr=Record %s create diff --git a/htdocs/langs/en_IN/stocks.lang b/htdocs/langs/en_IN/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/en_IN/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/en_IN/website.lang b/htdocs/langs/en_IN/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/en_IN/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/en_IN/withdrawals.lang b/htdocs/langs/en_IN/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/en_IN/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/en_SG/admin.lang b/htdocs/langs/en_SG/admin.lang index bdc794e1b31..c1d306ec390 100644 --- a/htdocs/langs/en_SG/admin.lang +++ b/htdocs/langs/en_SG/admin.lang @@ -1,4 +1,3 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. diff --git a/htdocs/langs/en_SG/cashdesk.lang b/htdocs/langs/en_SG/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/en_SG/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/en_SG/main.lang b/htdocs/langs/en_SG/main.lang index 0f9be27b22f..d7e1fe7e8a5 100644 --- a/htdocs/langs/en_SG/main.lang +++ b/htdocs/langs/en_SG/main.lang @@ -19,4 +19,4 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias +CREATEInDolibarr=Record %s create diff --git a/htdocs/langs/en_SG/stocks.lang b/htdocs/langs/en_SG/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/en_SG/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/en_SG/website.lang b/htdocs/langs/en_SG/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/en_SG/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/en_SG/withdrawals.lang b/htdocs/langs/en_SG/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/en_SG/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index fea7bf9d0ef..24255577b11 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -18,12 +18,14 @@ DefaultForService=Default for service DefaultForProduct=Default for product CantSuggest=Can't suggest AccountancySetupDoneFromAccountancyMenu=Most setup of the accountancy is done from the menu %s -ConfigAccountingExpert=Configuration of the module accounting expert +ConfigAccountingExpert=Configuration of the module accounting (double entry) Journalization=Journalization -Journaux=Journals +Journals=Journals JournalFinancial=Financial journals BackToChartofaccounts=Return chart of accounts Chartofaccounts=Chart of accounts +ChartOfSubaccounts=Chart of individual accounts +ChartOfIndividualAccountsOfSubsidiaryLedger=Chart of individual accounts of the subsidiary ledger CurrentDedicatedAccountingAccount=Current dedicated account AssignDedicatedAccountingAccount=New account to assign InvoiceLabel=Invoice label @@ -33,8 +35,8 @@ OtherInfo=Other information DeleteCptCategory=Remove accounting account from group ConfirmDeleteCptCategory=Are you sure you want to remove this accounting account from the accounting account group? JournalizationInLedgerStatus=Status of journalization -AlreadyInGeneralLedger=Already journalized in ledgers -NotYetInGeneralLedger=Not yet journalized in ledgers +AlreadyInGeneralLedger=Already transferred in accounting journals and ledger +NotYetInGeneralLedger=Not yet transferred in accouting journals and ledger GroupIsEmptyCheckSetup=Group is empty, check setup of the personalized accounting group DetailByAccount=Show detail by account AccountWithNonZeroValues=Accounts with non-zero values @@ -43,7 +45,9 @@ CountriesInEEC=Countries in EEC CountriesNotInEEC=Countries not in EEC CountriesInEECExceptMe=Countries in EEC except %s CountriesExceptMe=All countries except %s -AccountantFiles=Export accounting documents +AccountantFiles=Export source documents +ExportAccountingSourceDocHelp=With this tool, you can export the source events (list and PDFs) that were used to generate your accountancy. To export your journals, use the menu entry %s - %s. +VueByAccountAccounting=View by accounting account MainAccountForCustomersNotDefined=Main accounting account for customers not defined in setup MainAccountForSuppliersNotDefined=Main accounting account for vendors not defined in setup @@ -79,7 +83,7 @@ AccountancyAreaDescAnalyze=STEP %s: Add or edit existing transactions and genera AccountancyAreaDescClosePeriod=STEP %s: Close period so we can't make modification in a future. -TheJournalCodeIsNotDefinedOnSomeBankAccount=A mandatory step in setup was not complete (accounting code journal not defined for all bank accounts) +TheJournalCodeIsNotDefinedOnSomeBankAccount=A mandatory step in setup has not been completed (accounting code journal not defined for all bank accounts) Selectchartofaccounts=Select active chart of accounts ChangeAndLoad=Change and load Addanaccount=Add an accounting account @@ -89,6 +93,8 @@ SubledgerAccount=Subledger account SubledgerAccountLabel=Subledger account label ShowAccountingAccount=Show accounting account ShowAccountingJournal=Show accounting journal +ShowAccountingAccountInLedger=Show accounting account in ledger +ShowAccountingAccountInJournals=Show accounting account in journals AccountAccountingSuggest=Accounting account suggested MenuDefaultAccounts=Default accounts MenuBankAccounts=Bank accounts @@ -110,7 +116,7 @@ ExpenseReportsVentilation=Expense report binding CreateMvts=Create new transaction UpdateMvts=Modification of a transaction ValidTransaction=Validate transaction -WriteBookKeeping=Register transactions in Ledger +WriteBookKeeping=Register transactions in accounting Bookkeeping=Ledger AccountBalance=Account balance ObjectsRef=Source object ref @@ -149,6 +155,8 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. +ACCOUNTING_DEFAULT_PERIOD_ON_TRANSFER=On accountancy transfer, select period show by default ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -168,6 +176,8 @@ ACCOUNTING_ACCOUNT_SUSPENSE=Accounting account of wait DONATION_ACCOUNTINGACCOUNT=Accounting account to register donations ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Accounting account to register subscriptions +ACCOUNTING_ACCOUNT_CUSTOMER_DEPOSIT=Accounting account by default to register customer deposit + ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for the bought products (used if not defined in the product sheet) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Accounting account by default for the bought products in EEC (used if not defined in the product sheet) ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought products and imported out of EEC (used if not defined in the product sheet) @@ -202,16 +212,16 @@ ByPredefinedAccountGroups=By predefined groups ByPersonalizedAccountGroups=By personalized groups ByYear=By year NotMatch=Not Set -DeleteMvt=Delete Ledger lines +DeleteMvt=Delete some operation lines from accounting DelMonth=Month to delete DelYear=Year to delete DelJournal=Journal to delete -ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger. -ConfirmDeleteMvtPartial=This will delete the transaction from the Ledger (all lines related to same transaction will be deleted) +ConfirmDeleteMvt=This will delete all operation lines of the accounting for the year/month and/or for a specific journal (At least one criterion is required). You will have to reuse the feature '%s' to have the deleted record back in the ledger. +ConfirmDeleteMvtPartial=This will delete the transaction from the accounting (all operation lines related to the same transaction will be deleted) FinanceJournal=Finance journal ExpenseReportsJournal=Expense reports journal DescFinanceJournal=Finance journal including all the types of payments by bank account -DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Ledger. +DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Journals and Ledger. VATAccountNotDefined=Account for VAT not defined ThirdpartyAccountNotDefined=Account for third party not defined ProductAccountNotDefined=Account for product not defined @@ -237,6 +247,7 @@ PaymentsNotLinkedToProduct=Payment not linked to any product / service OpeningBalance=Opening balance ShowOpeningBalance=Show opening balance HideOpeningBalance=Hide opening balance +ShowSubtotalByGroup=Show subtotal by group Pcgtype=Group of account PcgtypeDesc=Group of account are used as predefined 'filter' and 'grouping' criteria for some accounting reports. For example, 'INCOME' or 'EXPENSE' are used as groups for accounting accounts of products to build the expense/income report. @@ -283,6 +294,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed @@ -302,6 +314,9 @@ ErrorAccountingJournalIsAlreadyUse=This journal is already use AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu %s - %s NumberOfAccountancyEntries=Number of entries NumberOfAccountancyMovements=Number of movements +ACCOUNTING_DISABLE_BINDING_ON_SALES=Disable binding & transfer in accountancy on sales (customer invoices will not be taken into account in accounting) +ACCOUNTING_DISABLE_BINDING_ON_PURCHASES=Disable binding & transfer in accountancy on purchases (vendor invoices will not be taken into account in accounting) +ACCOUNTING_DISABLE_BINDING_ON_EXPENSEREPORTS=Disable binding & transfer in accountancy on expense reports (expense reports will not be taken into account in accounting) ## Export ExportDraftJournal=Export draft journal diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 431ef75ac63..f8912b87eeb 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -71,7 +71,7 @@ DisableJavascriptNote=Note: For test or debug purpose. For optimization for blin UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. DelaiedFullListToSelectCompany=Wait until a key is pressed before loading content of Third Parties combo list.
    This may increase performance if you have a large number of third parties, but it is less convenient. -DelaiedFullListToSelectContact=Wait until a key is pressed before loading content of Contact combo list.
    This may increase performance if you have a large number of contacts, but it is less convenient) +DelaiedFullListToSelectContact=Wait until a key is pressed before loading content of Contact combo list.
    This may increase performance if you have a large number of contacts, but it is less convenient. NumberOfKeyToSearch=Number of characters to trigger search: %s NumberOfBytes=Number of Bytes SearchString=Search string @@ -219,7 +219,7 @@ Nouveauté=Novelty AchatTelechargement=Buy / Download GoModuleSetupArea=To deploy/install a new module, go to the Module setup area: %s. DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external modules -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming may develop a module. +DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. WebSiteDesc=External websites for more add-on (non-core) modules... DevelopYourModuleDesc=Some solutions to develop your own module... URL=URL @@ -289,6 +289,7 @@ MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication) MAIN_MAIL_SMTPS_PW=SMTP Password (if sending server requires authentication) MAIN_MAIL_EMAIL_TLS=Use TLS (SSL) encryption MAIN_MAIL_EMAIL_STARTTLS=Use TLS (STARTTLS) encryption +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés MAIN_MAIL_EMAIL_DKIM_ENABLED=Use DKIM to generate email signature MAIN_MAIL_EMAIL_DKIM_DOMAIN=Email Domain for use with dkim MAIN_MAIL_EMAIL_DKIM_SELECTOR=Name of dkim selector @@ -387,12 +388,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -438,9 +439,9 @@ ExtrafieldParamHelpPassword=Leaving this field blank means this value will be st ExtrafieldParamHelpselect=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    code3,value3
    ...

    In order to have the list depending on another complementary attribute list:
    1,value1|options_parent_list_code:parent_key
    2,value2|options_parent_list_code:parent_key

    In order to have the list depending on another list:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filter
    Example: c_typent:libelle:id::filter

    - idfilter is necessarly a primary int key
    - filter can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter +ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filter
    Example: c_typent:libelle:id::filter

    - id_field is necessarly a primary int key
    - filter can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter which is the current id of current object
    To use a SELECT into the filter use the keyword $SEL$ to bypass anti-injection protection.
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filter
    Example: c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter -ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath
    Syntax: ObjectName:Classpath
    Examples:
    Societe:societe/class/societe.class.php
    Contact:contact/class/contact.class.php +ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath
    Syntax: ObjectName:Classpath ExtrafieldParamHelpSeparator=Keep empty for a simple separator
    Set this to 1 for a collapsing separator (open by default for new session, then status is kept for each user session)
    Set this to 2 for a collapsing separator (collapsed by default for new session, then status is kept fore each user session) LibraryToBuildPDF=Library used for PDF generation LocalTaxDesc=Some countries may apply two or three taxes on each invoice line. If this is the case, choose the type for the second and third tax and its rate. Possible type are:
    1: local tax apply on products and services without vat (localtax is calculated on amount without tax)
    2: local tax apply on products and services including vat (localtax is calculated on amount + main tax)
    3: local tax apply on products without vat (localtax is calculated on amount without tax)
    4: local tax apply on products including vat (localtax is calculated on amount + main vat)
    5: local tax apply on services without vat (localtax is calculated on amount without tax)
    6: local tax apply on services including vat (localtax is calculated on amount + tax) @@ -478,8 +479,11 @@ ModuleCompanyCodeCustomerDigitaria=%s followed by the truncated customer name by ModuleCompanyCodeSupplierDigitaria=%s followed by the truncated supplier name by the number of characters: %s for the supplier accounting code. Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).
    Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required. UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than... -WarningPHPMail=WARNING: It is often better to setup outgoing emails to use the email server of your provider instead of the default setup. Some email providers (like Yahoo) do not allow you to send an email from another server than their own server. Your current setup uses the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not theirs, so few of your sent Emails may not be accepted (be careful also of your email provider's sending quota).
    If your Email provider (like Yahoo) has this restriction, you must change Email setup to choose the other method "SMTP server" and enter the SMTP server and credentials provided by your Email provider. -WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (for example with some SMTP relay like smtp-relay.google.com), this is the IP address of the mail user agent (MUA) for your ERP CRM application: %s. +WarningPHPMail=WARNING: The setup to send emails from the application is using the default generic setup. It is often better to setup outgoing emails to use the email server of your Email Service Provider instead of the default setup for several reasons: +WarningPHPMailA=- Using the server of the Email Service Provider increase the trustability of your email, so it increase the deliverablity without being flagging as SPAM +WarningPHPMailB=- Some Email Service Providers (like Yahoo) do not allow you to send an email from another server than their own server. Your current setup uses the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not theirs, so few of your sent Emails may not be accepted for delivery (be careful also of your email provider's sending quota). +WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to send emails is also interesting so all emails sent from application will also be saved into your "Sent" directory of your mailbox. +WarningPHPMail2=If your email SMTP provider need to restrict email client to some IP addresses (very rare), this is the IP address of the mail user agent (MUA) for your ERP CRM application: %s. WarningPHPMailSPF=If the domain name in your sender email address is protected by a SPF record (ask you domain name registar), you must add the following IPs in the SPF record of the DNS of your domain: %s. ClickToShowDescription=Click to show description DependsOn=This module needs the module(s) @@ -551,8 +555,6 @@ Module57Name=Payments by Direct Debit Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) -Module59Name=Bookmark4u -Module59Desc=Add function to generate Bookmark4u account from a Dolibarr account Module60Name=Stickers Module60Desc=Management of stickers Module70Name=Interventions @@ -656,7 +658,7 @@ Module50200Desc=Offer customers a PayPal online payment page (PayPal account or Module50300Name=Stripe Module50300Desc=Offer customers a Stripe online payment page (credit/debit cards). This can be used to allow your customers to make ad-hoc payments or payments related to a specific Dolibarr object (invoice, order etc...) Module50400Name=Accounting (double entry) -Module50400Desc=Accounting management (double entries, support general and auxiliary ledgers). Export the ledger in several other accounting software formats. +Module50400Desc=Accounting management (double entries, support General and Subsidiary Ledgers). Export the ledger in several other accounting software formats. Module54000Name=PrintIPP Module54000Desc=Direct print (without opening the documents) using Cups IPP interface (Printer must be visible from server, and CUPS must be installed on server). Module55000Name=Poll, Survey or Vote @@ -671,7 +673,7 @@ Module63000Name=Resources Module63000Desc=Manage resources (printers, cars, rooms, ...) for allocating to events Permission11=Read customer invoices Permission12=Create/modify customer invoices -Permission13=Unvalidate customer invoices +Permission13=Invalidate customer invoices Permission14=Validate customer invoices Permission15=Send customer invoices by email Permission16=Create payments for customer invoices @@ -688,6 +690,7 @@ Permission32=Create/modify products Permission34=Delete products Permission36=See/manage hidden products Permission38=Export products +Permission39=Ignore minimum price Permission41=Read projects and tasks (shared project and projects I'm contact for). Can also enter time consumed, for me or my hierarchy, on assigned tasks (Timesheet) Permission42=Create/modify projects (shared project and projects I'm contact for). Can also create tasks and assign users to project and tasks Permission44=Delete projects (shared project and projects I'm contact for) @@ -696,6 +699,9 @@ Permission61=Read interventions Permission62=Create/modify interventions Permission64=Delete interventions Permission67=Export interventions +Permission68=Send interventions by email +Permission69=Validate interventions +Permission70=Invalidate interventions Permission71=Read members Permission72=Create/modify members Permission74=Delete members @@ -718,6 +724,7 @@ Permission95=Read reports Permission101=Read sendings Permission102=Create/modify sendings Permission104=Validate sendings +Permission105=Send sendings by email Permission106=Export sendings Permission109=Delete sendings Permission111=Read financial accounts @@ -843,6 +850,9 @@ Permission561=Read payment orders by credit transfer Permission562=Create/modify payment order by credit transfer Permission563=Send/Transmit payment order by credit transfer Permission564=Record Debits/Rejections of credit transfer +Permission601=Read stickers +Permission602=Create/modify stickers +Permission609=Delete stickers Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials @@ -884,7 +894,9 @@ Permission1185=Approve purchase orders Permission1186=Order purchase orders Permission1187=Acknowledge receipt of purchase orders Permission1188=Delete purchase orders +Permission1189=Check/Uncheck a purchase order reception Permission1190=Approve (second approval) purchase orders +Permission1191=Export supplier orders and their attributes Permission1201=Get result of an export Permission1202=Create/Modify an export Permission1231=Read vendor invoices @@ -898,6 +910,8 @@ Permission1251=Run mass imports of external data into database (data load) Permission1321=Export customer invoices, attributes and payments Permission1322=Reopen a paid bill Permission1421=Export sales orders and attributes +Permission1521=Read documents +Permission1522=Delete documents Permission2401=Read actions (events or tasks) linked to his user account (if owner of event or just assigned to) Permission2402=Create/modify actions (events or tasks) linked to his user account (if owner of event) Permission2403=Delete actions (events or tasks) linked to his user account (if owner of event) @@ -932,9 +946,13 @@ Permission23001=Read Scheduled job Permission23002=Create/update Scheduled job Permission23003=Delete Scheduled job Permission23004=Execute Scheduled job -Permission50101=Use Point of Sale +Permission50101=Use Point of Sale (SimplePOS) +Permission50151=Use Point of Sale (TakePOS) Permission50201=Read transactions Permission50202=Import transactions +Permission50330=Read objects of Zapier +Permission50331=Create/Update objects of Zapier +Permission50332=Delete objects of Zapier Permission50401=Bind products and invoices with accounting accounts Permission50411=Read operations in ledger Permission50412=Write/Edit operations in ledger @@ -958,9 +976,18 @@ Permission63001=Read resources Permission63002=Create/modify resources Permission63003=Delete resources Permission63004=Link resources to agenda events +Permission64001=Allow direct printing +Permission67000=Allow printing of receipts +Permission941601=Read receipts +Permission941602=Create and modify receipts +Permission941603=Validate receipts +Permission941604=Send receipts by email +Permission941605=Export receipts +Permission941606=Delete receipts DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -990,7 +1017,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1045,6 +1073,7 @@ LabelUsedByDefault=Label used by default if no translation can be found for code LabelOnDocuments=Label on documents LabelOrTranslationKey=Label or translation key ValueOfConstantKey=Value of a configuration constant +ConstantIsOn=Option %s is on NbOfDays=No. of days AtEndOfMonth=At end of month CurrentNext=Current/Next @@ -1089,7 +1118,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1192,7 +1221,8 @@ RestoreDesc=To restore a Dolibarr backup, two steps are required. RestoreDesc2=Restore the backup file (zip file for example) of the "documents" directory to a new Dolibarr installation or into this current documents directory (%s). RestoreDesc3=Restore the database structure and data from a backup dump file into the database of the new Dolibarr installation or into the database of this current installation (%s). Warning, once the restore is complete, you must use a login/password, that existed from the backup time/installation to connect again.
    To restore a backup database into this current installation, you can follow this assistant. RestoreMySQL=MySQL import -ForcedToByAModule= This rule is forced to %s by an activated module +ForcedToByAModule=This rule is forced to %s by an activated module +ValueIsForcedBySystem=This value is forced by the system. You can't change it. PreviousDumpFiles=Existing backup files PreviousArchiveFiles=Existing archive files WeekStartOnDay=First day of the week @@ -1253,7 +1283,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1279,7 +1310,7 @@ GetBarCode=Get barcode NumberingModules=Numbering models DocumentModules=Document models ##### Module password generation -PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: 8 characters containing shared numbers and characters in lowercase. +PasswordGenerationStandard=Return a password generated according to internal Dolibarr algorithm: %s characters containing shared numbers and characters in lowercase. PasswordGenerationNone=Do not suggest a generated password. Password must be typed in manually. PasswordGenerationPerso=Return a password according to your personally defined configuration. SetupPerso=According to your configuration @@ -1568,9 +1599,9 @@ SyslogLevel=Level SyslogFilename=File name and path YouCanUseDOL_DATA_ROOT=You can use DOL_DATA_ROOT/dolibarr.log for a log file in Dolibarr "documents" directory. You can set a different path to store this file. ErrorUnknownSyslogConstant=Constant %s is not a known Syslog constant -OnlyWindowsLOG_USER=Windows only supports LOG_USER +OnlyWindowsLOG_USER=On Windows, only the LOG_USER facility will be supported CompressSyslogs=Compression and backup of debug log files (generated by module Log for debug) -SyslogFileNumberOfSaves=Log backups +SyslogFileNumberOfSaves=Number of backup logs to keep ConfigureCleaningCronjobToSetFrequencyOfSaves=Configure cleaning scheduled job to set log backup frequency ##### Donations ##### DonationsSetup=Donation module setup @@ -1691,7 +1722,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1791,7 +1822,6 @@ TypePaymentDesc=0:Customer payment type, 1:Vendor payment type, 2:Both customers IncludePath=Include path (defined into variable %s) ExpenseReportsSetup=Setup of module Expense Reports TemplatePDFExpenseReports=Document templates to generate expense report document -ExpenseReportsIkSetup=Setup of module Expense Reports - Milles index ExpenseReportsRulesSetup=Setup of module Expense Reports - Rules ExpenseReportNumberingModules=Expense reports numbering module NoModueToManageStockIncrease=No module able to manage automatic stock increase has been activated. Stock increase will be done on manual input only. @@ -1830,6 +1860,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1870,6 +1901,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1908,6 +1940,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1947,13 +1980,16 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +WithDolTrackingIDInMsgId=Message sent from Dolibarr +WithoutDolTrackingIDInMsgId=Message NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1995,7 +2031,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into email, or if the email is an answer of an email aready collected and linked to an object, the created event will be automatically linked to the known related object. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\s([^\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2022,4 +2058,5 @@ MeasuringScaleDesc=The scale is the number of places you have to move the decima TemplateAdded=Template added TemplateUpdated=Template updated TemplateDeleted=Template deleted -SwitchThisForABetterSecurity=Switching this value to 1 is recommended for more security +MailToSendEventPush=Template for event reminder emails +SwitchThisForABetterSecurity=Switching this value to %s is recommended for more security diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 4e51762d759..4ab87aa8420 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in the group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -150,8 +152,19 @@ ActionType=Event type DateActionBegin=Start event date ConfirmCloneEvent=Are you sure you want to clone the event %s? RepeatEvent=Repeat event +OnceOnly=Once only EveryWeek=Every week EveryMonth=Every month DayOfMonth=Day of month DayOfWeek=Day of week DateStartPlusOne=Date start + 1 hour +SetAllEventsToTodo=Set all events to todo +SetAllEventsToInProgress=Set all events to in progress +SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification +EventReminder=Event Reminder \ No newline at end of file diff --git a/htdocs/langs/en_US/banks.lang b/htdocs/langs/en_US/banks.lang index 75f9549dca5..ffe5ee9ca1c 100644 --- a/htdocs/langs/en_US/banks.lang +++ b/htdocs/langs/en_US/banks.lang @@ -166,6 +166,9 @@ VariousPayment=Miscellaneous payment VariousPayments=Miscellaneous payments ShowVariousPayment=Show miscellaneous payment AddVariousPayment=Add miscellaneous payment +VariousPaymentId=Miscellaneous payment ID +VariousPaymentLabel=Miscellaneous payment label +ConfirmCloneVariousPayment=Confirm the clone of a miscellaneous payment SEPAMandate=SEPA mandate YourSEPAMandate=Your SEPA mandate FindYourSEPAMandate=This is your SEPA mandate to authorize our company to make direct debit order to your bank. Return it signed (scan of the signed document) or send it by mail to diff --git a/htdocs/langs/en_US/bills.lang b/htdocs/langs/en_US/bills.lang index dccc80b1918..9c918bd0a15 100644 --- a/htdocs/langs/en_US/bills.lang +++ b/htdocs/langs/en_US/bills.lang @@ -383,6 +383,7 @@ GeneratedFromTemplate=Generated from template invoice %s WarningInvoiceDateInFuture=Warning, the invoice date is higher than current date WarningInvoiceDateTooFarInFuture=Warning, the invoice date is too far from current date ViewAvailableGlobalDiscounts=View available discounts +GroupPaymentsByModOnReports=Group payments by mode on reports # PaymentConditions Statut=Status PaymentConditionShortRECEP=Due Upon Receipt @@ -572,3 +573,6 @@ MaxNumberOfGenerationReached=Max number of gen. reached BILL_DELETEInDolibarr=Invoice deleted BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted UnitPriceXQtyLessDiscount=Unit price x Qty - Discount +CustomersInvoicesArea=Customer billing area +SupplierInvoicesArea=Supplier billing area +FacParentLine=Invoice Line Parent diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 2405bfd5e64..14db79809bc 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -102,3 +104,4 @@ BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment # Pages AccountancyHome=Accountancy +ValidatedProjects=Validated projects diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index ce5cdaf4ba6..549646ab110 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -117,4 +117,9 @@ HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images NumberOfLinesToShow=Number of lines of images to show DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts +WeighingScale=Weighing scale \ No newline at end of file diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 9bb71984ecf..c813f6d694f 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -84,7 +84,7 @@ AddProductServiceIntoCategory=Add the following product/service ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category -StocksCategoriesArea=Warehouses Categories Area -ActionCommCategoriesArea=Events Categories Area -WebsitePagesCategoriesArea=Page-Container Categories Area +StocksCategoriesArea=Warehouses Categories +ActionCommCategoriesArea=Events Categories +WebsitePagesCategoriesArea=Page-Container Categories UseOrOperatorForCategories=Use or operator for categories diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 92674363ced..4145d7184c5 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -354,6 +354,7 @@ VATIntraManualCheck=You can also check manually on the European Commission websi ErrorVATCheckMS_UNAVAILABLE=Check not possible. Check service is not provided by the member state (%s). NorProspectNorCustomer=Not prospect, nor customer JuridicalStatus=Legal Entity Type +Workforce=Workforce Staff=Employees ProspectLevelShort=Potential ProspectLevel=Prospect potential @@ -456,3 +457,6 @@ PaymentTermsSupplier=Payment Term - Vendor PaymentTypeBoth=Payment Type - Customer and Vendor MulticurrencyUsed=Use Multicurrency MulticurrencyCurrency=Currency +InEEC=Europe (EEC) +RestOfEurope=Rest of Europe (EEC) +OutOfEurope=Out of Europe (EEC) \ No newline at end of file diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang index 8a8c837ac87..715c3dfb8f5 100644 --- a/htdocs/langs/en_US/compta.lang +++ b/htdocs/langs/en_US/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -168,12 +169,15 @@ RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting SeePageForSetup=See menu %s for setup DepositsAreNotIncluded=- Down payment invoices are not included DepositsAreIncluded=- Down payment invoices are included +LT1ReportByMonth=Tax 2 report by month +LT2ReportByMonth=Tax 3 report by month LT1ReportByCustomers=Report tax 2 by third party LT2ReportByCustomers=Report tax 3 by third party LT1ReportByCustomersES=Report by third party RE LT2ReportByCustomersES=Report by third party IRPF VATReport=Sale tax report VATReportByPeriods=Sale tax report by period +VATReportByMonth=Sale tax report by month VATReportByRates=Sale tax report by rates VATReportByThirdParties=Sale tax report by third parties VATReportByCustomers=Sale tax report by customer diff --git a/htdocs/langs/en_US/contracts.lang b/htdocs/langs/en_US/contracts.lang index de7145b4548..49a65fdb39d 100644 --- a/htdocs/langs/en_US/contracts.lang +++ b/htdocs/langs/en_US/contracts.lang @@ -99,3 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Sales representative following-up cont TypeContact_contrat_external_BILLING=Billing customer contact TypeContact_contrat_external_CUSTOMER=Follow-up customer contact TypeContact_contrat_external_SALESREPSIGN=Signing contract customer contact +HideClosedServiceByDefault=Hide closed services by default +ShowClosedServices=Show Closed Services +HideClosedServices=Hide Closed Services \ No newline at end of file diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 1de1251831a..bb61ed13bbe 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -14,6 +14,7 @@ FileToLaunchCronJobs=Command line to check and launch qualified cron jobs CronExplainHowToRunUnix=On Unix environment you should use the following crontab entry to run the command line each 5 minutes CronExplainHowToRunWin=On Microsoft(tm) Windows environment you can use Scheduled Task tools to run the command line each 5 minutes CronMethodDoesNotExists=Class %s does not contains any method %s +CronMethodNotAllowed=Method %s of class %s is in blacklist of forbidden methods CronJobDefDesc=Cron job profiles are defined into the module descriptor file. When module is activated, they are loaded and available so you can administer the jobs from the admin tools menu %s. CronJobProfiles=List of predefined cron job profiles # Menu diff --git a/htdocs/langs/en_US/ecm.lang b/htdocs/langs/en_US/ecm.lang index 369ac6dfdfa..aaf81b0f346 100644 --- a/htdocs/langs/en_US/ecm.lang +++ b/htdocs/langs/en_US/ecm.lang @@ -50,3 +50,6 @@ ReSyncListOfDir=Resync list of directories HashOfFileContent=Hash of file content NoDirectoriesFound=No directories found FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload it) +ExtraFieldsEcmFiles=Extrafields Ecm Files +ExtraFieldsEcmDirectories=Extrafields Ecm Directories +ECMSetup=ECM Setup diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 75a12d517d0..e388c505663 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -215,7 +216,7 @@ ErrorChooseBetweenFreeEntryOrPredefinedProduct=You must choose if article is a p ErrorDiscountLargerThanRemainToPaySplitItBefore=The discount you try to apply is larger than remain to pay. Split the discount in 2 smaller discounts before. ErrorFileNotFoundWithSharedLink=File was not found. May be the share key was modified or file was removed recently. ErrorProductBarCodeAlreadyExists=The product barcode %s already exists on another product reference. -ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using virtual product to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. +ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Note also that using kits to have auto increase/decrease of subproducts is not possible when at least one subproduct (or subproduct of subproducts) needs a serial/lot number. ErrorDescRequiredForFreeProductLines=Description is mandatory for lines with free product ErrorAPageWithThisNameOrAliasAlreadyExists=The page/container %s has the same name or alternative alias that the one your try to use ErrorDuringChartLoad=Error when loading chart of accounts. If few accounts were not loaded, you can still enter them manually. @@ -239,6 +240,11 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s +ErrorParameterMustBeEnabledToAllwoThisFeature=Error, parameter %s must be enabled into conf/conf.php to allow use of Command Line Interface by the internal job scheduler +ErrorLoginDateValidity=Error, this login is outside the validity date range # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. @@ -265,4 +271,6 @@ WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different re WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report WarningProjectClosed=Project is closed. You must re-open it first. WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table \ No newline at end of file +WarningFailedToAddFileIntoDatabaseIndex=Warning, failed to add file entry into ECM database index table +WarningTheHiddenOptionIsOn=Warning, the hidden option %s is on. +WarningCreateSubAccounts=Warning, you can't create directly a sub account, you must create a third party or an user and assign them an accounting code to find them in this list diff --git a/htdocs/langs/en_US/ftp.lang b/htdocs/langs/en_US/ftp.lang index d80b87c2715..254a2a698ce 100644 --- a/htdocs/langs/en_US/ftp.lang +++ b/htdocs/langs/en_US/ftp.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password +FTPClientSetup=FTP or SFTP Client module setup +NewFTPClient=New FTP/FTPS connection setup +FTPArea=FTP/FTPS Area +FTPAreaDesc=This screen shows a view of an FTP et SFTP server. +SetupOfFTPClientModuleNotComplete=The setup of the FTP or SFTP client module seems to be incomplete +FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP or SFTP functions +FailedToConnectToFTPServer=Failed to connect to server (server %s, port %s) +FailedToConnectToFTPServerWithCredentials=Failed to login to server with defined login/password FTPFailedToRemoveFile=Failed to remove file %s. FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... +ChooseAFTPEntryIntoMenu=Choose a FTP/SFTP site from the menu... FailedToGetFile=Failed to get files %s diff --git a/htdocs/langs/en_US/interventions.lang b/htdocs/langs/en_US/interventions.lang index e5936f8246e..51079fca278 100644 --- a/htdocs/langs/en_US/interventions.lang +++ b/htdocs/langs/en_US/interventions.lang @@ -64,3 +64,5 @@ InterLineDuration=Line duration intervention InterLineDesc=Line description intervention RepeatableIntervention=Template of intervention ToCreateAPredefinedIntervention=To create a predefined or recurring intervention, create a common intervention and convert it into intervention template +Reopen=Reopen +ConfirmReopenIntervention=Are you sure you want to open back the intervention %s? diff --git a/htdocs/langs/en_US/loan.lang b/htdocs/langs/en_US/loan.lang index 534dee08867..d271ed0c140 100644 --- a/htdocs/langs/en_US/loan.lang +++ b/htdocs/langs/en_US/loan.lang @@ -23,6 +23,9 @@ AddLoan=Create loan FinancialCommitment=Financial commitment InterestAmount=Interest CapitalRemain=Capital remain +TermPaidAllreadyPaid = This term is allready paid +CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started +CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule # Admin ConfigLoan=Configuration of the module loan LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 7b3bfd3852a..7e34db3d8b8 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -125,12 +125,13 @@ TagMailtoEmail=Recipient Email (including html "mailto:" link) NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. # Module Notifications Notifications=Notifications -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent +NotificationsAuto=Notifications Auto. +NoNotificationsWillBeSent=No automatic email notifications are planned for this event type and company +ANotificationsWillBeSent=1 automatic notification will be sent by email +SomeNotificationsWillBeSent=%s automatic notifications will be sent by email +AddNewNotification=Activate a new automatic email notification target/event +ListOfActiveNotifications=List all active targets/events for automatic email notification +ListOfNotificationsDone=List all automatic email notifications sent MailSendSetupIs=Configuration of email sending has been setup to '%s'. This mode can't be used to send mass emailing. MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Setup - EMails%s to change parameter '%s' to use mode '%s'. With this mode, you can enter setup of the SMTP server provided by your Internet Service Provider and use Mass emailing feature. MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s. @@ -165,6 +166,11 @@ NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category OutGoingEmailSetup=Outgoing email setup InGoingEmailSetup=Incoming email setup OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +DefaultOutgoingEmailSetup=Same configuration than the global Outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email +RecordCreatedByEmailCollector=Record created by the Email Collector %s from email %s \ No newline at end of file diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 6d2892cddad..789d3836e37 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -28,7 +28,7 @@ NoTemplateDefined=No template available for this email type AvailableVariables=Available substitution variables NoTranslation=No translation Translation=Translation -EmptySearchString=Enter a non empty search string +EmptySearchString=Enter non empty search criterias NoRecordFound=No record found NoRecordDeleted=No record deleted NotEnoughDataYet=Not enough data @@ -155,6 +155,7 @@ RemoveLink=Remove link AddToDraft=Add to draft Update=Update Close=Close +CloseAs=Set status to CloseBox=Remove widget from your dashboard Confirm=Confirm ConfirmSendCardByMail=Do you really want to send the content of this card by mail to %s? @@ -187,6 +188,8 @@ ShowCardHere=Show card Search=Search SearchOf=Search SearchMenuShortCut=Ctrl + shift + f +QuickAdd=Quick add +QuickAddMenuShortCut=Ctrl + shift + l Valid=Valid Approve=Approve Disapprove=Disapprove @@ -317,6 +320,7 @@ Morning=Morning Afternoon=Afternoon Quadri=Quadri MonthOfDay=Month of the day +DaysOfWeek=Days of week HourShort=H MinuteShort=mn Rate=Rate @@ -367,6 +371,7 @@ MulticurrencyPaymentAmount=Payment amount, original currency MulticurrencyAmountHT=Amount (excl. tax), original currency MulticurrencyAmountTTC=Amount (inc. of tax), original currency MulticurrencyAmountVAT=Amount tax, original currency +MulticurrencySubPrice=Amount sub price multi currency AmountLT1=Amount tax 2 AmountLT2=Amount tax 3 AmountLT1ES=Amount RE @@ -483,6 +488,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -506,6 +512,7 @@ Draft=Draft Drafts=Drafts StatusInterInvoiced=Invoiced Validated=Validated +ValidatedToProduce=Validated (To produce) Opened=Open OpenAll=Open (All) ClosedAll=Closed (All) @@ -652,6 +659,7 @@ Response=Response Priority=Priority SendByMail=Send by email MailSentBy=Email sent by +NotSent=Not sent TextUsedInTheMessageBody=Email body SendAcknowledgementByMail=Send confirmation email SendMail=Send email @@ -685,6 +693,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -724,7 +733,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -832,6 +841,7 @@ ListOfTemplates=List of templates Gender=Gender Genderman=Man Genderwoman=Woman +Genderother=Other ViewList=List view ViewGantt=Gantt view ViewKanban=Kanban view @@ -1004,6 +1014,9 @@ SearchIntoCustomerShipments=Customer shipments SearchIntoExpenseReports=Expense reports SearchIntoLeaves=Leave SearchIntoTickets=Tickets +SearchIntoCustomerPayments=Customer payments +SearchIntoVendorPayments=Vendor payments +SearchIntoMiscPayments=Miscellaneous payments CommentLink=Comments NbComments=Number of comments CommentPage=Comments space @@ -1073,3 +1086,15 @@ AmountMustBePositive=Amount must be positive ByStatus=By status InformationMessage=Information Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s created +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved +DefaultMailModel=Default Mail Model +PublicVendorName=Public name of vendor +DateOfBirth=Date of birth +SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has expired, so action has been canceled. Please try again. +UpToDate=Up-to-date +OutOfDate=Out-of-date diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index dd0a5bf49e2..1a1419aa6da 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -19,14 +19,12 @@ MembersCards=Members business cards MembersList=List of members MembersListToValid=List of draft members (to be validated) MembersListValid=List of valid members -MembersListUpToDate=List of valid members with up to date subscription -MembersListNotUpToDate=List of valid members with subscription out of date +MembersListUpToDate=List of valid members with up-to-date subscription +MembersListNotUpToDate=List of valid members with out-of-date subscription MembersListResiliated=List of terminated members MembersListQualified=List of qualified members MenuMembersToValidate=Draft members MenuMembersValidated=Validated members -MenuMembersUpToDate=Up to date members -MenuMembersNotUpToDate=Out of date members MenuMembersResiliated=Terminated members MembersWithSubscriptionToReceive=Members with subscription to receive MembersWithSubscriptionToReceiveShort=Subscription to receive @@ -34,6 +32,7 @@ DateSubscription=Subscription date DateEndSubscription=Subscription end date EndSubscription=End subscription SubscriptionId=Subscription id +WithoutSubscription=Without subscription MemberId=Member id NewMember=New member MemberType=Member type @@ -81,7 +80,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? @@ -117,6 +116,7 @@ SendingEmailOnMemberValidation=Sending email on new member validation SendingEmailOnNewSubscription=Sending email on new subscription SendingReminderForExpiredSubscription=Sending reminder for expired subscriptions SendingEmailOnCancelation=Sending email on cancelation +SendingReminderActionComm=Sending reminder for agenda event # Topic of email templates YourMembershipRequestWasReceived=Your membership was received. YourMembershipWasValidated=Your membership was validated @@ -167,6 +167,7 @@ MembersStatisticsByState=Members statistics by state/province MembersStatisticsByTown=Members statistics by town MembersStatisticsByRegion=Members statistics by region NbOfMembers=Number of members +NbOfActiveMembers=Number of current active members NoValidatedMemberYet=No validated members found MembersByCountryDesc=This screen show you statistics on members by countries. Graphic depends however on Google online graph service and is available only if an internet connection is is working. MembersByStateDesc=This screen show you statistics on members by state/provinces/canton. diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index b1f8fbf6384..6b61f8c06c1 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -77,7 +77,7 @@ IsAMeasure=Is a measure DirScanned=Directory scanned NoTrigger=No trigger NoWidget=No widget -GoToApiExplorer=Go to API explorer +GoToApiExplorer=API explorer ListOfMenusEntries=List of menu entries ListOfDictionariesEntries=List of dictionaries entries ListOfPermissionsDefined=List of defined permissions diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index faa8eb60cf4..f4c6eb9246a 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP @@ -74,4 +75,6 @@ ProductsToConsume=Products to consume ProductsToProduce=Products to produce UnitCost=Unit cost TotalCost=Total cost -BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) \ No newline at end of file +BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) +GoOnTabProductionToProduceFirst=You must first have started the production to close a Manufacturing Order (See tab '%s'). But you can Cancel it. + \ No newline at end of file diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 65f002cf52c..7495291cf3f 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -5,8 +5,6 @@ Tools=Tools TMenuTools=Tools ToolsDesc=All tools not included in other menu entries are grouped here.
    All the tools can be accessed via the left menu. Birthday=Birthday -BirthdayDate=Birthday date -DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey @@ -16,6 +14,8 @@ PreviousMonthOfInvoice=Previous month (number 1-12) of invoice date TextPreviousMonthOfInvoice=Previous month (text) of invoice date NextMonthOfInvoice=Following month (number 1-12) of invoice date TextNextMonthOfInvoice=Following month (text) of invoice date +PreviousMonth=Previous month +CurrentMonth=Current month ZipFileGeneratedInto=Zip file generated into %s. DocFileGeneratedInto=Doc file generated into %s. JumpToLogin=Disconnected. Go to login page... @@ -97,11 +97,9 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Event reminder "__EVENT_LABEL__" on __EVENT_DATE__ at __EVENT_TIME__

    This is an automatic message, please do not reply. DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -261,7 +259,7 @@ ContactCreatedByEmailCollector=Contact/address created by email collector from e ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s OpeningHoursFormatDesc=Use a - to separate opening and closing hours.
    Use a space to enter different ranges.
    Example: 8-12 14-18 - + ##### Export ##### ExportsArea=Exports area AvailableFormats=Available formats @@ -281,7 +279,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/en_US/paybox.lang b/htdocs/langs/en_US/paybox.lang index 1bbbef4017b..6f320c03181 100644 --- a/htdocs/langs/en_US/paybox.lang +++ b/htdocs/langs/en_US/paybox.lang @@ -20,7 +20,6 @@ AccountParameter=Account parameters UsageParameter=Usage parameters InformationToFindParameters=Help to find your %s account information PAYBOX_CGI_URL_V2=Url of Paybox CGI module for payment -VendorName=Name of vendor CSSUrlForPaymentForm=CSS style sheet url for payment form NewPayboxPaymentReceived=New Paybox payment received NewPayboxPaymentFailed=New Paybox payment tried but failed diff --git a/htdocs/langs/en_US/products.lang b/htdocs/langs/en_US/products.lang index fb4379f5e1a..51f547dbdce 100644 --- a/htdocs/langs/en_US/products.lang +++ b/htdocs/langs/en_US/products.lang @@ -104,22 +104,24 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices -AssociatedProductsAbility=Activate virtual products (kits) -AssociatedProducts=Virtual products -AssociatedProductsNumber=Number of products composing this virtual product +DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices +AssociatedProductsAbility=Activate kits (virtual products) +AssociatedProducts=Kits +AssociatedProductsNumber=Number of products composing this kit ParentProductsNumber=Number of parent packaging product ParentProducts=Parent products -IfZeroItIsNotAVirtualProduct=If 0, this product is not a virtual product -IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any virtual product +IfZeroItIsNotAVirtualProduct=If 0, this product is not a kit +IfZeroItIsNotUsedByVirtualProduct=If 0, this product is not used by any kit KeywordFilter=Keyword filter CategoryFilter=Category filter ProductToAddSearch=Search product to add NoMatchFound=No match found ListOfProductsServices=List of products/services -ProductAssociationList=List of products/services that are component(s) of this virtual product/kit -ProductParentList=List of virtual products/services with this product as a component +ProductAssociationList=List of products/services that are component(s) of this kit +ProductParentList=List of kits with this product as a component ErrorAssociationIsFatherOfThis=One of selected product is parent with current product DeleteProduct=Delete a product/service ConfirmDeleteProduct=Are you sure you want to delete this product/service? @@ -168,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -358,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index a068fe247fe..f5f6bf3dd9d 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -76,12 +76,12 @@ MyActivities=My tasks/activities MyProjects=My projects MyProjectsArea=My projects Area DurationEffective=Effective duration -ProgressDeclared=Declared progress +ProgressDeclared=Declared real progress TaskProgressSummary=Task progress CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression -ProgressCalculated=Calculated progress +TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared real progress is less %s than the progress on consumption +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared real progress is more %s than the progress on consumption +ProgressCalculated=Progress on consumption WhichIamLinkedTo=which I'm linked to WhichIamLinkedToProject=which I'm linked to project Time=Time @@ -211,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/en_US/propal.lang b/htdocs/langs/en_US/propal.lang index 273996ab1b1..557df2f840f 100644 --- a/htdocs/langs/en_US/propal.lang +++ b/htdocs/langs/en_US/propal.lang @@ -47,7 +47,6 @@ SendPropalByMail=Send commercial proposal by mail DatePropal=Date of proposal DateEndPropal=Validity ending date ValidityDuration=Validity duration -CloseAs=Set status to SetAcceptedRefused=Set accepted/refused ErrorPropalNotFound=Propal %s not found AddToDraftProposals=Add to draft proposal @@ -85,3 +84,8 @@ ProposalCustomerSignature=Written acceptance, company stamp, date and signature ProposalsStatisticsSuppliers=Vendor proposals statistics CaseFollowedBy=Case followed by SignedOnly=Signed only +IdProposal=Proposal ID +IdProduct=Product ID +PrParentLine=Proposal Parent Line +LineBuyPriceHT=Buy Price Amount net of tax for line + diff --git a/htdocs/langs/en_US/receiptprinter.lang b/htdocs/langs/en_US/receiptprinter.lang index 83a003f388d..284c4fa61fa 100644 --- a/htdocs/langs/en_US/receiptprinter.lang +++ b/htdocs/langs/en_US/receiptprinter.lang @@ -54,7 +54,7 @@ DOL_DOUBLE_WIDTH=Double width size DOL_DEFAULT_HEIGHT_WIDTH=Default height and width size DOL_UNDERLINE=Enable underline DOL_UNDERLINE_DISABLED=Disable underline -DOL_BEEP=Beed sound +DOL_BEEP=Beep sound DOL_PRINT_TEXT=Print text DateInvoiceWithTime=Invoice date and time YearInvoice=Invoice year diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang new file mode 100644 index 00000000000..52290baf926 --- /dev/null +++ b/htdocs/langs/en_US/recruitment.lang @@ -0,0 +1,72 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... +JobClosedTextCandidateFound=The job offer is closed. The position has been filled. +JobClosedTextCanceled=The job offer is closed. diff --git a/htdocs/langs/en_US/sendings.lang b/htdocs/langs/en_US/sendings.lang index 5ce3b7f67e9..e1cb168500a 100644 --- a/htdocs/langs/en_US/sendings.lang +++ b/htdocs/langs/en_US/sendings.lang @@ -65,6 +65,7 @@ ValidateOrderFirstBeforeShipment=You must first validate the order before being # Sending methods # ModelDocument DocumentModelTyphon=More complete document model for delivery receipts (logo...) +DocumentModelStorm=More complete document model for delivery receipts and extrafields compatibility (logo...) Error_EXPEDITION_ADDON_NUMBER_NotDefined=Constant EXPEDITION_ADDON_NUMBER not defined SumOfProductVolumes=Sum of product volumes SumOfProductWeights=Sum of product weights diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index cd11bdb9803..ac97c24085c 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -17,6 +17,10 @@ CancelSending=Cancel sending DeleteSending=Delete sending Stock=Stock Stocks=Stocks +MissingStocks=Missing stocks +StockAtDate=Stocks at date +StockAtDateInPast=Date in past +StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial LotSerial=Lots/Serials LotSerialList=List of lot/serials @@ -30,6 +34,7 @@ StockMovementForId=Movement ID %d ListMouvementStockProject=List of stock movements associated to project StocksArea=Warehouses area AllWarehouses=All warehouses +IncludeEmptyDesiredStock=Include also undefined desired stock IncludeAlsoDraftOrders=Include also draft orders Location=Location LocationSummary=Short name location @@ -56,6 +61,12 @@ PMPValueShort=WAP EnhancedValueOfWarehouses=Warehouses value UserWarehouseAutoCreate=Create a user warehouse automatically when creating a user AllowAddLimitStockByWarehouse=Manage also value for minimum and desired stock per pairing (product-warehouse) in addition to the value for minimum and desired stock per product +RuleForWarehouse=Rule for warehouses +WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders +UserDefaultWarehouse=Set a warehouse on Users +MainDefaultWarehouse=Default warehouse +MainDefaultWarehouseUser=Use a default warehouse for each user +MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. IndependantSubProductStock=Product stock and subproduct stock are independent QtyDispatched=Quantity dispatched QtyDispatchedShort=Qty dispatched @@ -84,7 +95,9 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse @@ -119,6 +132,7 @@ CurentlyUsingPhysicalStock=Physical stock RuleForStockReplenishment=Rule for stocks replenishment SelectProductWithNotNullQty=Select at least one product with a qty not null and a vendor AlertOnly= Alerts only +IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 WarehouseForStockDecrease=The warehouse %s will be used for stock decrease WarehouseForStockIncrease=The warehouse %s will be used for stock increase ForThisWarehouse=For this warehouse @@ -129,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -184,8 +198,6 @@ inventoryWarningProductAlreadyExists=This product is already into list SelectCategory=Category filter SelectFournisseur=Vendor filter inventoryOnDate=Inventory -INVENTORY_DISABLE_VIRTUAL=Virtual product (kit): do not decrement stock of a child product -INVENTORY_USE_MIN_PA_IF_NO_LAST_PA=Use the buy price if no last buy price can be found INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=Stock movements will have the date of inventory (instead of the date of inventory validation) inventoryChangePMPPermission=Allow to change PMP value for a product ColumnNewPMP=New unit PMP @@ -219,3 +231,11 @@ InventoryForASpecificWarehouse=Inventory for a specific warehouse InventoryForASpecificProduct=Inventory for a specific product StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use ForceTo=Force to +AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (Warning: This may decrease dramatically performances) +StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past +StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future +CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaning=Update by scaning +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|serial barcode) diff --git a/htdocs/langs/en_US/stripe.lang b/htdocs/langs/en_US/stripe.lang index 0eac6842199..0eba2f5c286 100644 --- a/htdocs/langs/en_US/stripe.lang +++ b/htdocs/langs/en_US/stripe.lang @@ -28,7 +28,6 @@ AccountParameter=Account parameters UsageParameter=Usage parameters InformationToFindParameters=Help to find your %s account information STRIPE_CGI_URL_V2=Url of Stripe CGI module for payment -VendorName=Name of vendor CSSUrlForPaymentForm=CSS style sheet url for payment form NewStripePaymentReceived=New Stripe payment received NewStripePaymentFailed=New Stripe payment tried but failed diff --git a/htdocs/langs/en_US/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang index ce5bdf0425a..ca75eddb7df 100644 --- a/htdocs/langs/en_US/supplier_proposal.lang +++ b/htdocs/langs/en_US/supplier_proposal.lang @@ -13,6 +13,7 @@ SupplierProposalArea=Vendor proposals area SupplierProposalShort=Vendor proposal SupplierProposals=Vendor proposals SupplierProposalsShort=Vendor proposals +AskPrice=Price request NewAskPrice=New price request ShowSupplierProposal=Show price request AddSupplierProposal=Create a price request diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 80518c3401a..cf370fbdca0 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -31,10 +31,8 @@ TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities TicketDictResolution=Ticket - Resolution -TicketTypeShortBUGSOFT=Dysfonctionnement logiciel -TicketTypeShortBUGHARD=Dysfonctionnement matériel -TicketTypeShortCOM=Commercial question +TicketTypeShortCOM=Commercial question TicketTypeShortHELP=Request for functionnal help TicketTypeShortISSUE=Issue, bug or problem TicketTypeShortREQUEST=Change or enhancement request @@ -44,7 +42,7 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal TicketSeverityShortHIGH=High -TicketSeverityShortBLOCKING=Critical/Blocking +TicketSeverityShortBLOCKING=Critical, Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketMyAssign=My tickets @@ -72,7 +70,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,8 +125,11 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface +TicketsPublicNotificationNewMessage=Send email(s) when a new message is added +TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) +TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update) +TicketPublicNotificationNewMessageDefaultEmailHelp=Send email new message notifications to this address if the ticket don't have a user assigned or the user don't have a email. # # Index & list page # @@ -158,7 +158,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/en_US/trips.lang b/htdocs/langs/en_US/trips.lang index 654f14d6bf7..de31172e9d7 100644 --- a/htdocs/langs/en_US/trips.lang +++ b/htdocs/langs/en_US/trips.lang @@ -110,7 +110,7 @@ ExpenseReportPayment=Expense report payment ExpenseReportsToApprove=Expense reports to approve ExpenseReportsToPay=Expense reports to pay ConfirmCloneExpenseReport=Are you sure you want to clone this expense report ? -ExpenseReportsIk=Expense report milles index +ExpenseReportsIk=Configuration of mileage charges ExpenseReportsRules=Expense report rules ExpenseReportIkDesc=You can modify the calculation of kilometers expense by category and range who they are previously defined. d is the distance in kilometers ExpenseReportRulesDesc=You can create or update any rules of calculation. This part will be used when user will create a new expense report @@ -145,7 +145,7 @@ nolimitbyEX_DAY=by day (no limitation) nolimitbyEX_MON=by month (no limitation) nolimitbyEX_YEA=by year (no limitation) nolimitbyEX_EXP=by line (no limitation) -CarCategory=Category of car +CarCategory=Vehicle category ExpenseRangeOffset=Offset amount: %s RangeIk=Mileage range AttachTheNewLineToTheDocument=Attach the line to an uploaded document diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index 9b75a2ff37e..d6ffb849aa8 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -46,6 +46,8 @@ RemoveFromGroup=Remove from group PasswordChangedAndSentTo=Password changed and sent to %s. PasswordChangeRequest=Request to change password for %s PasswordChangeRequestSent=Request to change password for %s sent to %s. +IfLoginExistPasswordRequestSent=If this login is a valid account, an email to reset password has been sent. +IfEmailExistPasswordRequestSent=If this email is a valid account, an email to reset password has been sent. ConfirmPasswordReset=Confirm password reset MenuUsersAndGroups=Users & Groups LastGroupsCreated=Latest %s groups created @@ -108,11 +110,15 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged -DateEmployment=Employment Start Date +DateOfEmployment=Employment date +DateEmployment=Employment +DateEmploymentstart=Employment Start Date DateEmploymentEnd=Employment End Date +RangeOfLoginValidity=Date range of login validity CantDisableYourself=You can't disable your own user record ForceUserExpenseValidator=Force expense report validator ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s \ No newline at end of file diff --git a/htdocs/langs/en_US/website.lang b/htdocs/langs/en_US/website.lang index deb5f8dee38..c32fcd06f09 100644 --- a/htdocs/langs/en_US/website.lang +++ b/htdocs/langs/en_US/website.lang @@ -31,7 +31,7 @@ AddWebsite=Add website Webpage=Web page/container AddPage=Add page/container HomePage=Home Page -PageContainer=Page/container +PageContainer=Page PreviewOfSiteNotYetAvailable=Preview of your website %s not yet available. You must first 'Import a full website template' or just 'Add a page/container'. RequestedPageHasNoContentYet=Requested page with id %s has no content yet, or cache file .tpl.php was removed. Edit content of the page to solve this. SiteDeleted=Web site '%s' deleted @@ -124,7 +124,7 @@ ShowSubContainersOnOff=Mode to execute 'dynamic content' is %s GlobalCSSorJS=Global CSS/JS/Header file of web site BackToHomePage=Back to home page... TranslationLinks=Translation links -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not a website page +YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) UseTextBetween5And70Chars=For good SEO practices, use a text between 5 and 70 characters MainLanguage=Main language OtherLanguages=Other languages @@ -134,4 +134,5 @@ AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are define ReplacementDoneInXPages=Replacement done in %s pages or containers RSSFeed=RSS Feed RSSFeedDesc=You can get a RSS feed of latest articles with type 'blogpost' using this URL -PagesRegenerated=%s page(s)/container(s) regenerated \ No newline at end of file +PagesRegenerated=%s page(s)/container(s) regenerated +RegenerateWebsiteContent=Regenerate web site cache files \ No newline at end of file diff --git a/htdocs/langs/en_US/withdrawals.lang b/htdocs/langs/en_US/withdrawals.lang index a18ff7a8d31..553e3ac0eaa 100644 --- a/htdocs/langs/en_US/withdrawals.lang +++ b/htdocs/langs/en_US/withdrawals.lang @@ -79,7 +79,7 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create file for credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank diff --git a/htdocs/langs/en_US/workflow.lang b/htdocs/langs/en_US/workflow.lang index be126eef0f4..646b97ec31d 100644 --- a/htdocs/langs/en_US/workflow.lang +++ b/htdocs/langs/en_US/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/en_US/zapier.lang b/htdocs/langs/en_US/zapier.lang index 6d6eda71313..c688a0c307f 100644 --- a/htdocs/langs/en_US/zapier.lang +++ b/htdocs/langs/en_US/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier \ No newline at end of file diff --git a/htdocs/langs/es_AR/admin.lang b/htdocs/langs/es_AR/admin.lang index 6d84a8e991f..716fc69f6c6 100644 --- a/htdocs/langs/es_AR/admin.lang +++ b/htdocs/langs/es_AR/admin.lang @@ -35,7 +35,6 @@ WarningModuleNotActive=El módulo %s debe estar habilitado WarningOnlyPermissionOfActivatedModules=Aquí solo se muestran los permisos relacionados con los módulos activados. Puede activar otros módulos en la página Inicio-> Configuración-> Módulos. DolibarrSetup=Dolibarr instala o actualiza GUISetup=Interfaz Gráfica -SetupArea=Preparar UploadNewTemplate=Subir nueva (s) plantilla (s) FormToTestFileUploadForm=Formulario para probar la carga de archivos (según la configuración) IfModuleEnabled=Nota: solo es efectivo si el módulo %s está habilitado @@ -161,6 +160,7 @@ ModulesDevelopYourModule=Desarrolle su propia aplicación / módulos ModulesDevelopDesc=También puede desarrollar su propio módulo o encontrar un socio para desarrollar uno para usted. DOLISTOREdescriptionLong=En lugar de activar el sitio web www.dolistore.com para encontrar un módulo externo, puede utilizar esta herramienta integrada que realizará la búsqueda en el Mercado externo para usted (puede ser lento, necesita un acceso a Internet) ... NotCompatible=Este modulo no parece ser compatible con su Dolibarr %s (Min %s - Max %s). +SeeSetupOfModule=Ver la configuración del módulo %s AchatTelechargement=Comprar / Descargar GoModuleSetupArea=Para implementar/instalar un nuevo módulo, vaya al área de configuración del Módulo: %s. DoliStoreDesc=DoliStore, la tienda oficial para adquirir módulos externos de Dolibarr ERP/CRM @@ -224,7 +224,6 @@ UserEmail=Email del usuario CompanyEmail=Email de la empresa FeatureNotAvailableOnLinux=Característica no disponible en Unix como sistemas. Prueba tu programa de sendmail localmente. SubmitTranslation=Si la traducción de este idioma no está completa o si encuentra errores, puede corregirlos editando los archivos en el directorio langs / %s y enviar su cambio a www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Si la traducción de este idioma no está completa o si encuentra errores, puede corregirlo editando los archivos en el directorio langs / %s y presentando los archivos modificados en dolibarr.org/forum o para los desarrolladores en github.com/ Dolibarr / dolibarr. ModulesSetup=Configuración de módulos / aplicaciones ModuleFamilyCrm=Gestión de la relación con el cliente (CRM) ModuleFamilySrm=Gestión de relaciones con proveedores (VRM) @@ -260,6 +259,8 @@ AddCRIfTooLong=No hay ajuste de texto automático. El texto que es demasiado lar ExampleOfDirectoriesForModelGen=Ejemplo de sintaxis:
    c:\\mydir
    /home/mydir
    DOL_DATA_ROOT/ecm/ecmdir String=Cuerda Module30Name=Facturas +Module40Desc=Gestión de proveedores y compras (órdenes de compra y facturas de proveedores) +Module52Name=Inventarios(Stocks) Module54Name=Contratos/suscripciones Module80Name=Envíos Module80Desc=Gestión de envíos y remitos @@ -270,8 +271,6 @@ Permission23001=Leer tarea programada Permission23002=Crear/actualizar tarea programada Permission23003=Eliminar tarea programada Permission23004=Ejecutar tarea programada -DictionaryProspectLevel=Cliente potencia -DictionaryProspectStatus=Estado del cliente potencial DictionaryExpenseTaxRange=Informe de gastos - Rango categoría de transporte BackToModuleList=Volver a la lista de módulos BackToDictionaryList=Volver a la lista de diccionarios @@ -401,7 +400,6 @@ WarningAtLeastKeyOrTranslationRequired=Se requiere un criterio de búsqueda al m NewTranslationStringToShow=Nueva cadena de traducción para mostrar OriginalValueWas=La traducción original se sobrescribe. El valor original era:

    %s TransKeyWithoutOriginalValue=Has forzado una nueva traducción para la clave de traducción ' %s ' que no existe en ningún archivo de idioma -TotalNumberOfActivatedModules=Aplicación / módulos activados: %s / %s YouMustEnableOneModule=Debes habilitar al menos 1 módulo ClassNotFoundIntoPathWarning=La clase %s no se encuentra en la ruta de PHP YesInSummer=Si en verano @@ -534,6 +532,7 @@ LDAPFieldCompany=Compañía ViewProductDescInFormAbility=Mostrar descripción de productos en formularios (de otro forma es mostrado en una venta emergente tooltip popup) ViewProductDescInThirdpartyLanguageAbility=Mostrar descripciones de productos en el lenguaje del tercero Target=Destino +Sell=Vender PositionIntoComboList=Posición de la línea en las listas de combo SellTaxRate=Tasa de impuesto de venta RecuperableOnly=Sí, para el IVA "No percibido pero recuperable" dedicado a algún estado de Francia. Mantenga el valor en "No" en todos los demás casos. diff --git a/htdocs/langs/es_AR/main.lang b/htdocs/langs/es_AR/main.lang index 7f068578411..06f7b03da61 100644 --- a/htdocs/langs/es_AR/main.lang +++ b/htdocs/langs/es_AR/main.lang @@ -22,7 +22,6 @@ FormatDateHourText=%B %d, %Y, %I:%M %p DatabaseConnection=Conexión de base de datos NoTemplateDefined=No hay plantilla para este tipo de email AvailableVariables=Variables disponibles de substitución -EmptySearchString=Enter non empty search criterias NoRecordFound=Sin registros NoRecordDeleted=Sin registros eliminados NotEnoughDataYet=Sin datos suficientes @@ -202,8 +201,7 @@ PriceUTTC=P.U. (con imp.) Amount=Monto AmountInvoice=Monto de factura AmountInvoiced=Monto facturado -AmountInvoicedHT=Monto facturado (con imp.) -AmountInvoicedTTC=Monto facturado (neto) +AmountInvoicedHT=Monto facturado (neto) AmountPayment=Monto pagado AmountHTShort=Monto (neto) AmountTTCShort=Monto (con imp.) @@ -291,6 +289,7 @@ DolibarrWorkBoard=Items Abiertos NoOpenedElementToProcess=No hay elementos abiertos para procesar NotYetAvailable=Todavía no disponible Categories=Etiquetas/categorías +Category=Etiqueta/categoría to=para To=para Qty=Ctd @@ -421,7 +420,6 @@ UnHidePassword=Mostrar comando real con contraseña visible RootOfMedias=Carpeta raíz de medios públicos (/medios) AddNewLine=Agregar nueva línea AddFile=Agregar archivo -FreeZone=No hay producto/servicio predefinido FreeLineOfType=Item libre del tipo: CloneMainAttributes=Clonar objeto con principales atributos PDFMerge=Unir PDF @@ -466,8 +464,7 @@ AdminTools=Herramientas de Admin SystemTools=Herramientas de sistema ModulesSystemTools=Herramientas de módulos NoPhotoYet=No hay fotos disponibles todavía -Dashboard=Escritorio -MyDashboard=Mi Escritorio +MyDashboard=Mi Tablero from=desde toward=en dirección a SelectTargetUser=Seleccione usuario/empleado al que apuntar diff --git a/htdocs/langs/es_AR/members.lang b/htdocs/langs/es_AR/members.lang index 8b4b025101f..89e31bb3375 100644 --- a/htdocs/langs/es_AR/members.lang +++ b/htdocs/langs/es_AR/members.lang @@ -59,7 +59,6 @@ NoTypeDefinedGoToSetup=No hay tipos de miembros definidos. Vé al menú "Tipos d WelcomeEMail=Correo de bienvenida SubscriptionRequired=Se requiere suscripción VoteAllowed=Voto permitido -MorPhy=Moral/Físico ResiliateMember=Terminar a un miembro ConfirmResiliateMember=¿Estás seguro de que quieres terminar con este miembro? DeleteMember=Eliminar a un miembro diff --git a/htdocs/langs/es_AR/other.lang b/htdocs/langs/es_AR/other.lang index 47aa202007c..a221f16e4b7 100644 --- a/htdocs/langs/es_AR/other.lang +++ b/htdocs/langs/es_AR/other.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - other Notify_BILL_VALIDATE=Factura de cliente validada Notify_BILL_PAYED=Factura de cliente pagada +SeeModuleSetup=Ver la configuración del módulo %s diff --git a/htdocs/langs/es_AR/products.lang b/htdocs/langs/es_AR/products.lang index c42f5e892b4..10ea57249c6 100644 --- a/htdocs/langs/es_AR/products.lang +++ b/htdocs/langs/es_AR/products.lang @@ -3,5 +3,74 @@ ProductRef=Ref. Producto ProductLabel=Etiqueta del producto ProductLabelTranslated=Etiqueta traducida del producto ProductDescriptionTranslated=Descripción traducida del producto +ProductNoteTranslated=Nota de producto traducida +ProductServiceCard=Ficha de Productos/Servicios +ProductId=Id de Producto/Servicio +NewProduct=Nuevo Producto +NewService=Nuevo Servicio +ProductVatMassChange=Actualización global de IVA +ProductVatMassChangeDesc=¡Esta herramienta actualiza el IVA definido en TODOS los productos y servicios! +ProductsAndServices=Productos y Servicios +ProductsOrServices=Productos o Servicios +ProductsOnSale=Productos para vender +ProductsOnPurchase=Productos a comprar +ProductsOnSaleOnly=Productos para vender únicamente +ProductsOnPurchaseOnly=Productos para comprar únicamente +ProductsNotOnSell=Productos que no se venden ni se compran +ProductsOnSellAndOnBuy=Productos para vender y para comprar +ServicesOnSale=Servicios a la venta +ServicesOnPurchase=Servicios que se adquieren +ServicesOnSaleOnly=Servicios que se venden únicamente +ServicesOnPurchaseOnly=Servicios que se adquieren únicamente +ServicesNotOnSell=Servicios que no se venden ni se adquieren +ServicesOnSellAndOnBuy=Servicios que se vender y se adquieren +LastModifiedProductsAndServices=Últimos %s productos/servicios modificados +MenuStocks=Inventarios(Stocks) +Stocks=Inventarios y ubicaciones (almacenes) de productos +OnSell=Para vender +OnBuy=Para comprar +NotOnSell=No se vende +ProductStatusOnSell=Para vender +ProductStatusNotOnSell=No se vende +ProductStatusOnSellShort=Para vender +ProductStatusNotOnSellShort=No se vende +ProductStatusOnBuy=Para comprar +ProductStatusNotOnBuy=No se compra +ProductStatusOnBuyShort=Para comprar +ProductStatusNotOnBuyShort=No se compra +UpdateVAT=Actualizar IVA +UpdateDefaultPrice=Actualizar precio por defecto +UpdateLevelPrices=Actualizar precio para cada nivel +SellingPriceHT=Precio de venta (excluyente impuestos) +SellingPriceTTC=Precio de venta (incluyendo impuestos) +SellingMinPriceTTC=Precio de Venta Mínimo (incluyendo impuestos) +SoldAmount=Cantidad vendida +PurchasedAmount=Cantidad comprada +EditSellingPriceLabel=Editar etiqueta de precio +CantBeLessThanMinPrice=El precio de venta no puede ser menor al mínimo permitido por el producto (%s sin impuestos). Esta mensaje también parece si el descuento es demasiado importante. +ErrorProductAlreadyExists=Y existe un producto con la referencia %s. +ErrorProductBadRefOrLabel=Valor incorrecto de referencia o etiqueta. +ErrorProductClone=Hubo un problema al tratar de clonar el productos o servicio. +ErrorPriceCantBeLowerThanMinPrice=¡Error! El precio no puede ser menor a precio mínimo. +SupplierRef=Referencia interna del proveedor (SKU) +ProductsAndServicesArea=Área de Productos y Servicios +ProductsArea=Área de Productos +ServicesArea=Área de Servicios +ListOfStockMovements=Lista de movimientos de inventario +PriceForEachProduct=Productos con precios particulares +SupplierCard=Ficha de proveedor +PriceRemoved=Precio removido +SetDefaultBarcodeType=Definir tipo de código de barras +NoteNotVisibleOnBill=Nota (No visible en facturas, presupuestos...) +ServiceLimitedDuration=Si un producto es un servicio con duración limitada: +AssociatedProducts=Productos virtuales +KeywordFilter=Filtro por Palabra Clave +CategoryFilter=Filtro por Categoría ExportDataset_produit_1=Productos +DeleteProductLine=Borrar línea de producto +ConfirmDeleteProductLine=¿Está seguro que quiere borrar esta línea de producto? +QtyMin=Mín. cantidad a comprar +PriceQtyMin=Precio para cantidad mín. +PriceQtyMinCurrency=Precio (moneda) para esta cant. (sin descuento) +PredefinedProductsToSell=Producto Predefinido SuppliersPrices=Precio de Proveedor diff --git a/htdocs/langs/es_AR/recruitment.lang b/htdocs/langs/es_AR/recruitment.lang new file mode 100644 index 00000000000..63df7968f48 --- /dev/null +++ b/htdocs/langs/es_AR/recruitment.lang @@ -0,0 +1,14 @@ +# Dolibarr language file - Source file is en_US - recruitment +ModuleRecruitmentName =Contrataciones +ModuleRecruitmentDesc =Administrar y seguir campañas de contrataciones para nuevos puestos de trabajo +RecruitmentSetup =Ajustes de Contrataciones +RecruitmentArea=Area de contrataciones +RecruitmentAbout =Acerca de contrataciones +RecruitmentAboutPage =Sitio de Acerca de contrataciones +NbOfEmployeesExpected=Cantidad esperada de trabajadores +JobLabel=Etiqueta de puesto de trabajo +WorkPlace=Lugar de trabajo +DateExpected=Fecha esperada +FutureManager=Futuro gerente +ResponsibleOfRecruitement=Responsable de contrataciones +IfJobIsLocatedAtAPartner=Si el trabajo se encuentra en un lugar asociado diff --git a/htdocs/langs/es_AR/stocks.lang b/htdocs/langs/es_AR/stocks.lang index ecd269206da..c291bc59434 100644 --- a/htdocs/langs/es_AR/stocks.lang +++ b/htdocs/langs/es_AR/stocks.lang @@ -1,6 +1,7 @@ # Dolibarr language file - Source file is en_US - stocks inventoryEdit=Editar inventoryDraft=Activos +SelectCategory=Filtro por Categoría AddProduct=Agregar inventoryDeleteLine=Eliminar línea ListInventory=Lista diff --git a/htdocs/langs/es_AR/withdrawals.lang b/htdocs/langs/es_AR/withdrawals.lang index 891247f8c41..7c806c8b5f3 100644 --- a/htdocs/langs/es_AR/withdrawals.lang +++ b/htdocs/langs/es_AR/withdrawals.lang @@ -35,6 +35,7 @@ NoInvoiceRefused=No cargar el rechazo InvoiceRefused=Factura rechazada (cargar el rechazo al cliente) StatusTrans=Enviar StatusCredited=Acreditado +StatusPaid=Pagado StatusRefused=Rechazado StatusMotif0=Sin especificar StatusMotif1=Fondos insuficientes @@ -47,8 +48,6 @@ CreateForSepaFRST=Crear archivo de débito automático (SEPA FRST) CreateForSepaRCUR=Crear archivo de débito automático (SEPA RCUR) CreateAll=Crear archivo de débito automático (todos) OrderWaiting=A la espera de procesamiento -NotifyTransmision=Transmisión de extracción -NotifyCredit=Crédito de Extracción NumeroNationalEmetter=Número de transmisor nacional WithBankUsingRIB=Para cuentas bancarias que utilizan RIB WithBankUsingBANBIC=Para cuentas bancarias que utilizan IBAN/BIC/SWIFT @@ -57,7 +56,6 @@ CreditDate=Acreditar en WithdrawalFileNotCapable=No se puede generar el archivo de comprobante de extracción para su país %s (su país no es compatible) ShowWithdraw=Mostrar orden de débito automático IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene al menos una orden de pago por débito automático aún no procesada, no se establecerá como pagada para permitir la administración previa de extracciones. -WithdrawalFile=Archivo de extracción SetToStatusSent=Colocar estado como "Archivo enviado" StatisticsByLineStatus=Estadísticas por estado de líneas RUMLong=Referencia única de mandato diff --git a/htdocs/langs/es_AR/workflow.lang b/htdocs/langs/es_AR/workflow.lang index c5bed780ec6..92a2b43b960 100644 --- a/htdocs/langs/es_AR/workflow.lang +++ b/htdocs/langs/es_AR/workflow.lang @@ -10,6 +10,6 @@ descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Clasificar su propuesta de origen como descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Clasificar su propuesta de origen como facturada cuando la factura de cliente esté validada (y el monto de la factura sea el mismo que el total de su propuesta firmada) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Clasificar su orden de venta como facturada cuando la factura de cliente esté validada (y el monto de la factura sea el mismo que el total de su orden) descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificar su orden de venta como facturada cuando la factura del cliente esté marcada como "Pagada" (y el monto de la factura sea el mismo que el total de su orden) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificar su orden de venta como enviada cuando el viaje esté validado (y la cantidad enviada en todos sus viajes sea la misma que en el pedido para actualizar) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificar su pedido vinculado como enviado cuando el envío esté validado (y la cantidad enviada en todos los envíos sea la misma que en el pedido a actualizar) descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificar su propuesta de origen de proveedor como facturada cuando la factura del proveedor esté validada (y que el monto de la factura sea el mismo que el total de su propuesta) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificar su orden de compra como facturada cuando la factura de proveedor esté validada (y el monto de la factura sea el mismo que el total de su orden) diff --git a/htdocs/langs/es_BO/main.lang b/htdocs/langs/es_BO/main.lang index 0f9be27b22f..2e691473326 100644 --- a/htdocs/langs/es_BO/main.lang +++ b/htdocs/langs/es_BO/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_CL/admin.lang b/htdocs/langs/es_CL/admin.lang index 2c5b0fedb7c..c4fae1266ad 100644 --- a/htdocs/langs/es_CL/admin.lang +++ b/htdocs/langs/es_CL/admin.lang @@ -214,7 +214,6 @@ UserEmail=Correo electrónico del usuario CompanyEmail=Email de la empresa FeatureNotAvailableOnLinux=Característica no disponible en sistemas como Unix. Pruebe su programa sendmail localmente. SubmitTranslation=Si la traducción de este idioma no está completa o si encuentra errores, puede corregirlos editando los archivos en el directorio langs / %s y envíe su cambio a www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Si la traducción de este idioma no está completa o si encuentra errores, puede corregir esto editando archivos en el directorio langs /%s y enviando archivos modificados en dolibarr.org/forum o para desarrolladores en github.com/Dolibarr/dolibarr. ModulesSetup=Módulos / configuración de la aplicación ModuleFamilyCrm=Gestión de la relación con el cliente (CRM) ModuleFamilySrm=Gestión de relaciones con proveedores (VRM) @@ -282,10 +281,8 @@ SmsTestMessage=Mensaje de prueba de __PHONEFROM__ a __PHONETO__ ModuleMustBeEnabledFirst=El módulo %s debe estar habilitado primero si necesitas esta característica. SecurityToken=Clave para asegurar URLs NoSmsEngine=No hay administrador de remitente de SMS disponible. Un administrador de remitentes de SMS no se instala con la distribución predeterminada porque dependen de un proveedor externo, pero puede encontrar algunos en %s -PDFAddressForging=Reglas para cajas de direcciones HideAnyVATInformationOnPDF=Ocultar toda la información relacionada con el Impuesto de Ventas / IVA PDFRulesForSalesTax=Reglas para el impuesto a las ventas / IVA -HideLocalTaxOnPDF=Ocultar la tasa %s en la columna Venta de impuestos HideDescOnPDF=Ocultar descripción de productos HideRefOnPDF=Ocultar productos ref. HideDetailsOnPDF=Ocultar detalles de líneas de productos @@ -393,8 +390,6 @@ Module51Desc=Gerencia de correo de papel en masa Module52Desc=Gestion de Stocks Module54Desc=Gestión de contratos (servicios o suscripciones recurrentes). Module55Desc=Gestión del código de barras -Module57Name=Pagos de débito directo bancario -Module57Desc=Gestión de órdenes de pago de débito directo. Incluye generación de archivo SEPA para países europeos. Module58Desc=Integración de un sistema ClickToDial (Asterisk, ...) Module59Desc=Agregar función para generar una cuenta de Bookmark4u desde una cuenta de Dolibarr Module70Desc=Gestión de intervención @@ -692,7 +687,6 @@ Permission59003=Lea cada margen de usuario Permission63004=Enlace de recursos a eventos de la agenda DictionaryCompanyType=Tipos de terceros DictionaryCompanyJuridicalType=Entidades legales de terceros -DictionaryProspectLevel=Potencial de prospecto DictionaryCanton=Estados / Provincias DictionarySocialContributions=Tipos de impuestos sociales o fiscales. DictionaryVAT=Tipos de IVA o tasas de impuestos a las ventas @@ -713,7 +707,6 @@ DictionaryAccountancyJournal=Libros contables DictionaryEMailTemplates=Plantillas de correo electrónico DictionaryMeasuringUnits=Unidades de medida DictionarySocialNetworks=Redes Sociales -DictionaryProspectStatus=Estado de la perspectiva DictionaryHolidayTypes=Tipos de licencia DictionaryOpportunityStatus=Estado de plomo para proyecto / lider BackToModuleList=Volver a la lista de módulos @@ -777,7 +770,6 @@ DefaultMaxSizeShortList=Longitud máxima predeterminada para listas cortas (es d MessageLogin=Mensaje de la página de inicio LoginPage=Página de inicio de sesión PermanentLeftSearchForm=Formulario de búsqueda permanente en el menú de la izquierda -EnableMultilangInterface=Habilitar soporte multilenguaje CompanyInfo=Empresa / Organización CompanyIds=Identidades de la empresa / organización CompanyCurrency=Moneda principal @@ -896,7 +888,6 @@ WarningAtLeastKeyOrTranslationRequired=Se requiere un criterio de búsqueda al m NewTranslationStringToShow=Nueva cadena de traducción para mostrar OriginalValueWas=La traducción original se sobrescribe. El valor original fue:

    %s TransKeyWithoutOriginalValue=Obligó una nueva traducción para la clave de traducción ' %s ' que no existe en ningún archivo de idioma -TotalNumberOfActivatedModules=Aplicaciones/módulos activos: %s/%s YouMustEnableOneModule=Debe al menos habilitar 1 módulo ClassNotFoundIntoPathWarning=La clase %s no se encuentra en la ruta de PHP OnlyFollowingModulesAreOpenedToExternalUsers=Tenga en cuenta que solo los siguientes módulos están disponibles para usuarios externos (independientemente de los permisos de dichos usuarios) y solo si se otorgan permisos:
    @@ -1219,13 +1210,11 @@ AGENDA_USE_EVENT_TYPE=Usar tipos de eventos (administrados en el menú Configura AGENDA_USE_EVENT_TYPE_DEFAULT=Establecer automáticamente este valor predeterminado para el tipo de evento en el formulario de creación de evento AGENDA_DEFAULT_FILTER_TYPE=Configure automáticamente este tipo de evento en el filtro de búsqueda de la vista de agenda AGENDA_DEFAULT_FILTER_STATUS=Establecer automáticamente este estado para eventos en el filtro de búsqueda de la vista de agenda -AGENDA_DEFAULT_VIEW=¿Qué pestaña desea abrir de forma predeterminada al seleccionar el menú Agenda? AGENDA_REMINDER_EMAIL=Habilite el recordatorio de eventos por correo electrónico (la opción recordar/demorar se puede definir en cada evento). Nota: El módulo %s debe estar habilitado y configurado correctamente para que el recordatorio se envíe con la frecuencia correcta. AGENDA_REMINDER_BROWSER=Active el recordatorio de eventos en el navegador del usuario (cuando se alcanza la fecha del evento, cada usuario puede rechazar esto de la pregunta de confirmación del navegador) AGENDA_REMINDER_BROWSER_SOUND=Habilitar notificación de sonido AGENDA_SHOW_LINKED_OBJECT=Mostrar objeto vinculado en la vista de agenda ClickToDialUrlDesc=Se llama a Url cuando se hace clic en el picto de un teléfono. En la URL, puede usar etiquetas
    __ PHONETO __ que se reemplazarán por el número de teléfono de la persona a quien llamar
    __ PHONEFROM __ que se reemplazará por el número de teléfono de la llamada persona (suya)
    __ LOGIN __ que se reemplazará con clicktodial de inicio de sesión (definido en la tarjeta de usuario)
    __ PASS __ que se reemplazará con clicktodial contraseña (definida en usuario tarjeta). -ClickToDialDesc=Este módulo hace que los números de teléfono hagan clic enlaces Un clic en el icono hará que su teléfono llame al número. Esto se puede usar para llamar a un sistema de centro de llamadas de Dolibarr que puede llamar al número de teléfono en un sistema SIP, por ejemplo. ClickToDialUseTelLink=Use solo un enlace "tel:" en los números de teléfono ClickToDialUseTelLinkDesc=Use este método si sus usuarios tienen un softphone o una interfaz de software instalada en la misma computadora que el navegador y se le llama cuando hace clic en un enlace de su navegador que comienza con "tel:". Si necesita una solución de servidor completa (sin necesidad de instalación de software local), debe configurar esto en "No" y completar el siguiente campo. CashDeskSetup=Configuración del módulo de punto de venta @@ -1409,8 +1398,6 @@ CodeLastResult=Código de resultado más reciente NbOfEmailsInInbox=Número de correos electrónicos en el directorio de origen LoadThirdPartyFromName=Cargar búsqueda de terceros en %s (solo carga) LoadThirdPartyFromNameOrCreate=Cargar búsqueda de terceros en %s (crear si no se encuentra) -WithDolTrackingID=Dolibarr Referencia encontrada en el ID de Mensaje -WithoutDolTrackingID=Dolibarr Referencia no encontrada ID de mensaje ECMAutoTree=Mostrar arbol ECM automatico OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. OpeningHoursDesc=Introduzca aquí el horario habitual de apertura de su empresa. @@ -1432,7 +1419,6 @@ DebugBar=Barra de debug WarningValueHigherSlowsDramaticalyOutput=Advertencia, los valores más altos ralentizan dramáticamente la salida. ModuleActivated=El módulo %s está activado y ralentiza la interfaz EXPORTS_SHARE_MODELS=Los modelos de exportación se comparten con todos. -IfTrackingIDFoundEventWillBeLinked=Tenga en cuenta que si se encuentra un ID de seguimiento en el correo electrónico entrante, el evento se vinculará automáticamente a los objetos relacionados. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. EndPointFor=Punto final para %s: %s DeleteEmailCollector=Eliminar el colector de correo electrónico diff --git a/htdocs/langs/es_CL/agenda.lang b/htdocs/langs/es_CL/agenda.lang index 45d8af34b9d..07801879db5 100644 --- a/htdocs/langs/es_CL/agenda.lang +++ b/htdocs/langs/es_CL/agenda.lang @@ -4,7 +4,6 @@ ActionsOwnedBy=Evento propiedad de Event=Evento EventsNb=Cantidad de eventos ListOfActions=Lista de eventos -ToUserOfGroup=Para cualquier usuario en grupo EventOnFullDay=Evento todo el día (s) MenuToDoActions=Todos los eventos incompletos MenuDoneActions=Todos los eventos terminados diff --git a/htdocs/langs/es_CL/boxes.lang b/htdocs/langs/es_CL/boxes.lang index 8d7d7389ea4..e8b72e33d75 100644 --- a/htdocs/langs/es_CL/boxes.lang +++ b/htdocs/langs/es_CL/boxes.lang @@ -14,8 +14,6 @@ BoxTitleLastProducts=Productos / Servicios: Última modificación %s. BoxTitleLastModifiedSuppliers=Proveedores: última modificación de %s BoxTitleLastModifiedCustomers=Clientes: última %s modificada BoxTitleLastCustomersOrProspects=Últimos %s clientes o prospectos -BoxTitleLastCustomerBills=Las últimas facturas de los clientes %s -BoxTitleLastSupplierBills=Las últimas facturas de proveedores %s BoxTitleLastModifiedProspects=Perspectivas: última modificación de %s BoxTitleLastModifiedMembers=Últimos miembros de %s BoxTitleLastFicheInter=Últimas intervenciones modificadas con %s diff --git a/htdocs/langs/es_CL/cashdesk.lang b/htdocs/langs/es_CL/cashdesk.lang index a7597878ea3..2d9ac0386f3 100644 --- a/htdocs/langs/es_CL/cashdesk.lang +++ b/htdocs/langs/es_CL/cashdesk.lang @@ -40,4 +40,3 @@ ConfirmDiscardOfThisPOSSale=¿Quieres descartar esta venta actual? History=Historia TerminalSelect=Seleccione el terminal que desea utilizar: BasicPhoneLayout=Usar diseño básico para teléfonos. -DirectPaymentButton=Botón de pago directo en efectivo diff --git a/htdocs/langs/es_CL/errors.lang b/htdocs/langs/es_CL/errors.lang index 58aca3bb9e9..f5567607900 100644 --- a/htdocs/langs/es_CL/errors.lang +++ b/htdocs/langs/es_CL/errors.lang @@ -115,7 +115,6 @@ ErrorNewValueCantMatchOldValue=El nuevo valor no puede ser igual al anterior ErrorFailedToValidatePasswordReset=Error al reiniciar la contraseña Puede ser que el reinicio ya haya sido hecho (este enlace puede usarse solo una vez). Si no, intente reiniciar el proceso de reinicio. ErrorToConnectToMysqlCheckInstance=La conexión a la base de datos falla. Comprobar el servidor de la base de datos se está ejecutando (por ejemplo, con mysql / mariadb, puede ejecutarlo desde la línea de comandos con 'sudo service mysql start'). ErrorFailedToAddContact=Error al agregar contacto -ErrorDateMustBeBeforeToday=La fecha no puede ser mayor que hoy ErrorPaymentModeDefinedToWithoutSetup=Se configuró un modo de pago para que escriba %s pero la configuración de la Factura del módulo no se completó para definir la información que se mostrará para este modo de pago. ErrorPHPNeedModule=Error, su PHP debe tener el módulo %s instalado para usar esta característica. ErrorOpenIDSetupNotComplete=Configura el archivo de configuración de Dolibarr para permitir la autenticación de OpenID, pero la URL del servicio OpenID no está definida en la constante %s diff --git a/htdocs/langs/es_CL/main.lang b/htdocs/langs/es_CL/main.lang index 0c12ed62b34..6895438fd44 100644 --- a/htdocs/langs/es_CL/main.lang +++ b/htdocs/langs/es_CL/main.lang @@ -22,7 +22,6 @@ FormatDateHourText=%d %B %Y %H:%M DatabaseConnection=Conexión a la base NoTemplateDefined=No hay plantilla disponible para este tipo de correo electrónico AvailableVariables=Variables de sustitución disponibles -EmptySearchString=Enter non empty search criterias NoRecordFound=Ningún record fue encontrado NoRecordDeleted=No se eliminó ningún registro NoError=No hay error @@ -264,6 +263,7 @@ GeneratedOn=Construir en %s DolibarrWorkBoard=Artículos abiertos NotYetAvailable=No disponible aún Categories=Etiquetas / categorías +Category=Etiqueta / categoría To=para Qty=Cantidad ChangedBy=Cambiado por @@ -371,7 +371,6 @@ UnHidePassword=Mostrar comando real con contraseña clara RootOfMedias=Raíz de los medios públicos (/ medios) AddNewLine=Agregar nueva línea AddFile=Agregar archivo -FreeZone=No es un producto / servicio predefinido FreeLineOfType=Artículo de texto libre, escriba: CloneMainAttributes=Clonar objeto con sus atributos principales ReGeneratePDF=Volver a generar PDF diff --git a/htdocs/langs/es_CL/members.lang b/htdocs/langs/es_CL/members.lang index c360e73cbaf..e77bd64bf9b 100644 --- a/htdocs/langs/es_CL/members.lang +++ b/htdocs/langs/es_CL/members.lang @@ -22,6 +22,7 @@ MenuMembersUpToDate=Miembros actualizados MenuMembersNotUpToDate=Miembros desactualizados MenuMembersResiliated=Miembros finalizados MembersWithSubscriptionToReceive=Miembros con suscripción para recibir +MembersWithSubscriptionToReceiveShort=Suscripción para recibir DateSubscription=Fecha de suscripción DateEndSubscription=Fecha de finalización de la suscripción EndSubscription=Terminar suscripción @@ -55,7 +56,6 @@ NoTypeDefinedGoToSetup=Ningún tipo de miembro definido. Ir al menú "Tipos de m WelcomeEMail=Correo de bienvenida SubscriptionRequired=Suscripción requerida VoteAllowed=Voto permitido -MorPhy=Moral / Físico Reenable=Rehabilitar ResiliateMember=Terminar un miembro ConfirmResiliateMember=¿Estás seguro de que quieres cancelar este miembro? diff --git a/htdocs/langs/es_CL/projects.lang b/htdocs/langs/es_CL/projects.lang index 5deec3f8fc2..fd50392c8ea 100644 --- a/htdocs/langs/es_CL/projects.lang +++ b/htdocs/langs/es_CL/projects.lang @@ -141,9 +141,6 @@ ProjectNbProjectByMonth=Nº de proyectos creados por mes. ProjectNbTaskByMonth=Nº de tareas creadas por mes. ProjectOppAmountOfProjectsByMonth=Cantidad de clientes potenciales por mes ProjectWeightedOppAmountOfProjectsByMonth=Cantidad ponderada de clientes potenciales por mes -ProjectOpenedProjectByOppStatus=Abrir proyecto / liderar por estado de plomo -ProjectsStatistics=Estadísticas de proyectos / leads -TasksStatistics=Estadísticas sobre proyectos/tareas principales TaskAssignedToEnterTime=Tarea asignada Ingresar el tiempo en esta tarea debería ser posible. IdTaskTime=Tiempo de la tarea de identificación YouCanCompleteRef=Si desea completar la referencia con algún sufijo, se recomienda agregar un carácter para separarlo, por lo que la numeración automática seguirá funcionando correctamente para los próximos proyectos. Por ejemplo %s-MYSUFFIX diff --git a/htdocs/langs/es_CL/stocks.lang b/htdocs/langs/es_CL/stocks.lang index ffd436fb51a..57c3d5885ac 100644 --- a/htdocs/langs/es_CL/stocks.lang +++ b/htdocs/langs/es_CL/stocks.lang @@ -61,12 +61,9 @@ StockLimitDesc=(vacío) significa que no hay advertencia.
    0 se puede utiliz PhysicalStock=Inventario FISICO RealStockDesc=El stock físico / real es el stock actualmente en los almacenes. RealStockWillAutomaticallyWhen=El stock real se modificará de acuerdo con esta regla (como se define en el módulo de Stock): -VirtualStockDesc=El stock virtual es el stock calculado disponible una vez que se cierran todas las acciones abiertas / pendientes (que afectan a las acciones) (pedidos recibidos, pedidos de ventas enviados, etc.) IdWarehouse=Id almacén LieuWareHouse=Almacén de localización WarehousesAndProductsBatchDetail=Almacenes y productos (con detalle por lote / serie) -AverageUnitPricePMPShort=Precio de entrada promedio ponderado -AverageUnitPricePMP=Precio de entrada promedio ponderado SellPriceMin=Precio unitario de venta EstimatedStockValueSellShort=Valor para la venta EstimatedStockValueSell=Valor para la venta @@ -97,7 +94,6 @@ Replenishments=Reposición NbOfProductBeforePeriod=Cantidad de producto %s en stock antes del período seleccionado (<%s) NbOfProductAfterPeriod=Cantidad de producto %s en stock después del período seleccionado (> %s) MassMovement=Movimiento masivo -SelectProductInAndOutWareHouse=Seleccione un producto, una cantidad, un almacén de origen y un almacén de destino, luego haga clic en "%s". Una vez hecho esto para todos los movimientos requeridos, haga clic en "%s". RecordMovement=Transferencia de registros ReceivingForSameOrder=Recibos por esta orden StockMovementRecorded=Movimientos de stock grabados diff --git a/htdocs/langs/es_CL/ticket.lang b/htdocs/langs/es_CL/ticket.lang index ee8c228d5fb..7e8bb612452 100644 --- a/htdocs/langs/es_CL/ticket.lang +++ b/htdocs/langs/es_CL/ticket.lang @@ -17,7 +17,6 @@ Notify_TICKET_SENTBYMAIL=Enviar mensaje de Ticket por correo electrónico NotRead=No leer Read=Leer NeedMoreInformation=Esperando informacion -Answered=Contestada Waiting=Esperando Type=Tipo MailToSendTicketMessage=Para enviar un correo electrónico desde un mensaje de ticket diff --git a/htdocs/langs/es_CL/withdrawals.lang b/htdocs/langs/es_CL/withdrawals.lang index 302939afe1d..ae95201deba 100644 --- a/htdocs/langs/es_CL/withdrawals.lang +++ b/htdocs/langs/es_CL/withdrawals.lang @@ -36,6 +36,7 @@ StatusDebitCredit=Estado de débito / crédito StatusWaiting=Esperando StatusTrans=Expedido StatusCredited=Acreditado +StatusPaid=Pagado StatusRefused=Rechazado StatusMotif0=Sin especificar StatusMotif1=Fondos insuficientes @@ -50,8 +51,6 @@ CreateAll=Crear un archivo de domiciliación bancaria (todos) CreateGuichet=Solo oficina CreateBanque=Solo banco OrderWaiting=Esperando tratamiento -NotifyTransmision=Transmisión de extracción -NotifyCredit=Crédito de Retiro NumeroNationalEmetter=Número de transmisor nacional WithBankUsingRIB=Para cuentas bancarias que usan RIB WithBankUsingBANBIC=Para cuentas bancarias que usan IBAN / BIC / SWIFT @@ -60,7 +59,6 @@ CreditDate=Crédito en WithdrawalFileNotCapable=No se puede generar un archivo de recibo de retiro para su país %s (Su país no es compatible) ShowWithdraw=Mostrar orden de débito directo IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene al menos una orden de pago por débito directo aún no procesada, no se establecerá como pagada para permitir la gestión previa de retiros. -WithdrawalFile=Archivo de retiro SetToStatusSent=Establecer el estado "Archivo enviado" StatisticsByLineStatus=Estadísticas por estado de líneas RUMLong=Referencia única de mandatos diff --git a/htdocs/langs/es_CO/admin.lang b/htdocs/langs/es_CO/admin.lang index 24271750d60..0fbbffc35f6 100644 --- a/htdocs/langs/es_CO/admin.lang +++ b/htdocs/langs/es_CO/admin.lang @@ -196,7 +196,6 @@ MAIN_MAIL_SMS_FROM=Número de teléfono del remitente predeterminado para el env MAIN_MAIL_DEFAULT_FROMTYPE=Correo electrónico predeterminado del remitente para envío manual (correo electrónico del usuario o correo electrónico de la empresa) UserEmail=Email del usuario FeatureNotAvailableOnLinux=Característica no disponible en Unix como sistemas. Prueba tu programa de sendmail localmente. -SubmitTranslationENUS=Si la traducción de este idioma no está completa o si encuentra errores, puede corregirlos editando los archivos en el directorio langs / %s y enviar los archivos modificados en dolibarr.org/forum o para los desarrolladores en github.com/ Dolibarr / dolibarr. ModulesSetup=Configuración de módulos / aplicaciones ModuleFamilyHr=Gestión de Recursos Humanos (HR) ModuleFamilyProjects=Proyectos / Trabajo colaborativo. @@ -330,7 +329,6 @@ Module52Name=Cepo Module54Name=Contratos / Suscripciones Module54Desc=Gestión de contratos (servicios o suscripciones recurrentes). Module55Desc=Gestión de códigos de barras -Module57Desc=Gestión de órdenes de pago de débito directo. Incluye la generación de archivo SEPA para países europeos. Module58Desc=Integración de un sistema ClickToDial (Asterisco, ...) Module59Desc=Agregar función para generar una cuenta Bookmark4u desde una cuenta Dolibarr Module70Desc=Gestión de la intervención @@ -572,7 +570,7 @@ DictionaryAccountancysystem=Modelos para el plan de cuentas. DictionaryAccountancyJournal=Revistas contables DictionaryEMailTemplates=Plantillas de correo electrónico DictionaryHolidayTypes=Tipos de licencia -DictionaryOpportunityStatus=Estado de plomo para proyecto / plomo +DictionaryOpportunityStatus=Principal estado para proyecto / Iniciativa DictionaryExpenseTaxRange=Informe de gastos - Gama por categoría de transporte TypeOfRevenueStamp=Tipo de timbre fiscal LTRate=Tipo @@ -706,7 +704,6 @@ WarningAtLeastKeyOrTranslationRequired=Se requiere un criterio de búsqueda al m NewTranslationStringToShow=Nueva cadena de traducción para mostrar OriginalValueWas=La traducción original se sobrescribe. El valor original era:

    %s TransKeyWithoutOriginalValue=Has forzado una nueva traducción para la clave de traducción ' %s ' que no existe en ningún archivo de idioma -TotalNumberOfActivatedModules=Aplicación / módulos activados: %s / %s YouMustEnableOneModule=Debes habilitar al menos 1 módulo ClassNotFoundIntoPathWarning=La clase %s no se encuentra en la ruta de PHP YesInSummer=Si en verano @@ -981,7 +978,6 @@ AGENDA_USE_EVENT_TYPE=Usar tipos de eventos (administrados en el menú Configura AGENDA_USE_EVENT_TYPE_DEFAULT=Establecer automáticamente este valor predeterminado para el tipo de evento en el formulario de creación de evento AGENDA_DEFAULT_FILTER_TYPE=Configure automáticamente este tipo de evento en el filtro de búsqueda de la vista de agenda AGENDA_DEFAULT_FILTER_STATUS=Establecer automáticamente este estado para eventos en el filtro de búsqueda de la vista de agenda -AGENDA_DEFAULT_VIEW=¿Qué pestaña desea abrir de forma predeterminada al seleccionar el menú Agenda? AGENDA_REMINDER_EMAIL=Habilite el recordatorio del evento por correos electrónicos (la opción de recordatorio / retraso se puede definir en cada evento). Nota: el módulo %s debe estar habilitado y configurado correctamente para que se envíe un recordatorio con la frecuencia correcta. AGENDA_REMINDER_BROWSER=Habilite el recordatorio de evento en el navegador del usuario (cuando se alcanza la fecha del evento, cada usuario puede rechazar esto de la pregunta de confirmación del navegador) AGENDA_REMINDER_BROWSER_SOUND=Habilitar notificación de sonido @@ -1132,6 +1128,7 @@ EmailcollectorOperations=Operaciones a realizar por coleccionista. EmailCollectorConfirmCollectTitle=Correo electrónico recoger confirmación NoNewEmailToProcess=No hay correo electrónico nuevo (filtros coincidentes) para procesar RecordEvent=Grabar evento de correo electrónico +CreateLeadAndThirdParty=Crea principal (y tercero de ser necesario) FormatZip=Cremallera OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. DisabledResourceLinkUser=Deshabilitar la función para vincular un recurso a los usuarios diff --git a/htdocs/langs/es_CO/main.lang b/htdocs/langs/es_CO/main.lang index 038f333d9ea..f4a6163ecd8 100644 --- a/htdocs/langs/es_CO/main.lang +++ b/htdocs/langs/es_CO/main.lang @@ -21,7 +21,6 @@ FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M NoTemplateDefined=No hay plantilla disponible para este tipo de correo electrónico. AvailableVariables=Variables de sustitución disponibles -EmptySearchString=Enter non empty search criterias NoRecordFound=No se encontraron registros NoRecordDeleted=Ningún registro eliminado Errors=Los errores @@ -117,6 +116,7 @@ Completed=Terminado RequestAlreadyDone=La solicitud ya ha sido procesada FilterOnInto=Los criterios de búsqueda ' %s ' en los campos %s Categories=Etiquetas / categorías +Category=Etiqueta / categoría Topic=Tema NoItemLate=Sin artículo atrasado DeletePicture=Borrar imagen @@ -125,14 +125,6 @@ LoginEmail=Ingreso (correo) LoginOrEmail=Login o correo electrónico EnterLoginDetail=Ingrese los detalles de inicio de sesión December=diciembre -MonthVeryShort02=V -MonthVeryShort03=L -MonthVeryShort04=UNA -MonthVeryShort05=L -MonthVeryShort08=UNA -MonthVeryShort09=D -MonthVeryShort11=norte -MonthVeryShort12=re JoinMainDoc=Únete al documento principal Keyword=Palabra clave FindBug=Señalar un bug @@ -152,7 +144,6 @@ YouCanChangeValuesForThisListFromDictionarySetup=Puede cambiar los valores para YouCanChangeValuesForThisListFrom=Puede cambiar los valores para esta lista desde el menú %s YouCanSetDefaultValueInModuleSetup=Puede configurar el valor predeterminado utilizado al crear un nuevo registro en la configuración del módulo Layout=Diseño -FreeZone=No es un producto / servicio predefinido DocumentModelStandardPDF=Plantilla PDF estándar CoreErrorMessage=Disculpe, ocurrió un error. Póngase en contacto con el administrador del sistema para consultar los registros o deshabilite $ dolibarr_main_prod = 1 para obtener más información. FieldsWithIsForPublic=Los campos con %s se muestran en la lista pública de miembros. Si no quieres esto, desmarca la casilla "público". @@ -214,13 +205,13 @@ AutomaticallyCalculated=Calculado automaticamente TitleSetToDraft=Volver al borrador ConfirmSetToDraft=¿Está seguro de que desea volver al estado de borrador? EMailTemplates=Plantillas de correo electrónico -LeadOrProject=Plomo Proyecto -LeadsOrProjects=Lleva | Proyectos -Lead=Dirigir -Leads=Lleva +LeadOrProject=Iniciativa | Proyecto +LeadsOrProjects=Iniciativas | Proyectos +Lead=Principal +Leads=Principales ListOpenLeads=Lista de clientes potenciales abiertos ListOpenProjects=Listar proyectos abiertos -NewLeadOrProject=Nuevo plomo o proyecto +NewLeadOrProject=Nueva Iniciativa o proyecto LineNb=Línea no. SelectMailModel=Seleccione una plantilla de correo electrónico Select2ResultFoundUseArrows=Algunos resultados encontrados. Usa las flechas para seleccionar. diff --git a/htdocs/langs/es_CO/products.lang b/htdocs/langs/es_CO/products.lang index 1f376268421..897242503e0 100644 --- a/htdocs/langs/es_CO/products.lang +++ b/htdocs/langs/es_CO/products.lang @@ -96,7 +96,7 @@ p=u d=re g=sol m=metro -unitP=Trozo +unitP=Unidad ProductCodeModel=Plantilla de referencia del producto ServiceCodeModel=Plantilla de servicio de ref AlwaysUseNewPrice=Utilizar siempre el precio actual del producto / servicio. diff --git a/htdocs/langs/es_CO/projects.lang b/htdocs/langs/es_CO/projects.lang index 0d25bd82f87..5bb088ffa15 100644 --- a/htdocs/langs/es_CO/projects.lang +++ b/htdocs/langs/es_CO/projects.lang @@ -102,9 +102,14 @@ ErrorShiftTaskDate=Imposible cambiar la fecha de la tarea de acuerdo con la nuev TaskCreatedInDolibarr=Tarea %s creada TaskModifiedInDolibarr=Tarea %s modificada TaskDeletedInDolibarr=Tarea %s eliminada -OpportunityStatus=Estado de plomo -OpportunityProbability=Probabilidad de plomo -OpportunityAmount=Cantidad de plomo +OpportunityStatus=Estado de iniciativa +OpportunityStatusShort=Estado de iniciativa +OpportunityProbability=Probabilidad de la Iniciativa +OpportunityProbabilityShort=Prob. de Iniciativa +OpportunityAmount=Monto de iniciativa +OpportunityAmountShort=Monto de iniciativa +OpportunityAmountAverageShort=Monto promedio +OpportunityAmountWeigthedShort=Monto ponderado WonLostExcluded=Ganados / Perdidos excluidos TypeContact_project_internal_PROJECTLEADER=Líder del proyecto TypeContact_project_external_PROJECTLEADER=Líder del proyecto @@ -138,9 +143,6 @@ ProjectNbProjectByMonth=Nº de proyectos creados por mes. ProjectNbTaskByMonth=Nº de tareas creadas por mes. ProjectOppAmountOfProjectsByMonth=Cantidad de leads por mes ProjectWeightedOppAmountOfProjectsByMonth=Cantidad ponderada de clientes potenciales por mes -ProjectOpenedProjectByOppStatus=Abrir proyecto / liderar por estado de plomo -ProjectsStatistics=Estadísticas sobre proyectos / leads -TasksStatistics=Estadísticas de proyecto / tareas de plomo TaskAssignedToEnterTime=Tarea asignada. Debe ser posible introducir el tiempo en esta tarea. IdTaskTime=Tiempo de tarea de identificación OpenedProjectsByThirdparties=Proyectos abiertos por terceros. diff --git a/htdocs/langs/es_CO/stocks.lang b/htdocs/langs/es_CO/stocks.lang index 7ea4665b427..28b80e7fa90 100644 --- a/htdocs/langs/es_CO/stocks.lang +++ b/htdocs/langs/es_CO/stocks.lang @@ -1,4 +1,7 @@ # Dolibarr language file - Source file is en_US - stocks +UnitPurchaseValue=Precio unitario de compra +PMPValue=Precio promedio ponderado +AverageUnitPricePMPShort=Precio promedio ponderado inventoryEdit=Editar SelectCategory=Filtro de categoria inventoryDeleteLine=Eliminar linea diff --git a/htdocs/langs/es_CO/withdrawals.lang b/htdocs/langs/es_CO/withdrawals.lang index 2320346b97c..33ea339dcd8 100644 --- a/htdocs/langs/es_CO/withdrawals.lang +++ b/htdocs/langs/es_CO/withdrawals.lang @@ -2,4 +2,5 @@ StandingOrderPayment=Orden de pago de domiciliación bancaria WithdrawalsReceipts=Órdenes de débito directo WithdrawalReceipt=Orden de domiciliación bancaria +StatusPaid=Pagado StatusRefused=Rechazado diff --git a/htdocs/langs/es_DO/main.lang b/htdocs/langs/es_DO/main.lang index 0f9be27b22f..2e691473326 100644 --- a/htdocs/langs/es_DO/main.lang +++ b/htdocs/langs/es_DO/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_EC/admin.lang b/htdocs/langs/es_EC/admin.lang index c7cde3f1591..130c6ec61a6 100644 --- a/htdocs/langs/es_EC/admin.lang +++ b/htdocs/langs/es_EC/admin.lang @@ -228,7 +228,6 @@ UserEmail=Correo electrónico del usuario CompanyEmail=Email de la empresa FeatureNotAvailableOnLinux=Característica no disponible en sistemas Unix. Comprobar el programa de Sendmail localmente. SubmitTranslation=Si la traducción de este idioma no está completa o si encuentra errores, puede corregirlos editando los archivos en el directorio langs / %s y enviar su cambio a www.transifex.com/dolibarr-association/dolibarr / -SubmitTranslationENUS=Los archivos en el directorio langs / %s y se enviarán los archivos modificados a dolibarr.org/forum o para los expertos en github. com / Dolibarr / Dolibarr. ModuleSetup=Módulo de configuración ModulesSetup=Módulos de configuración / Aplicación ModuleFamilyCrm=Gestión de la relación con el cliente (CRM) @@ -302,10 +301,8 @@ SmsTestMessage=Mensaje de prueba desde __PHONEFROM__ a __PHONETO__ ModuleMustBeEnabledFirst=Módulo %s debe estar habilitado primero si necesita esta función. SecurityToken=Clave para proteger las URL NoSmsEngine=No hay administrador de remitente de SMS disponible. Un administrador de remitentes de SMS no se instala con la distribución predeterminada porque dependen de un proveedor externo, pero puede encontrar algunos en %s -PDFAddressForging=Reglas para cajas de direcciones HideAnyVATInformationOnPDF=Ocultar toda la información relacionada con el impuesto a las ventas / IVA PDFRulesForSalesTax=Reglas para el impuesto a las ventas / IVA -HideLocalTaxOnPDF=Ocultar %s tasa en columna Impuestos Venta HideDescOnPDF=Ocultar descripción de productos HideRefOnPDF=Ocultar productos ref. HideDetailsOnPDF=Ocultar detalles de líneas de productos @@ -424,8 +421,6 @@ Module52Desc=Gestion de Stocks Module54Name=Contratos / Suscripciones Module54Desc=Gestión de contratos (servicios o suscripciones recurrentes). Module55Desc=Administración de código de barras -Module57Name=Pagos de débito directo bancario -Module57Desc=Gestión de órdenes de pago de débito directo. Incluye la generación de archivo SEPA para países europeos. Module58Desc=Integración de un sistema ClickToDial (Asterisco, ...) Module59Desc=Añadir función para generar una cuenta Bookmark4u desde una cuenta de Dolibarr Module60Name=Adhesivos @@ -740,7 +735,6 @@ Permission63002=Crear / modificar recursos Permission63004=Enlazar los recursos con los eventos de la agenda. DictionaryCompanyType=Tipos de cliente/proveedor DictionaryCompanyJuridicalType=Entidades legales de cliente/proveedor -DictionaryProspectLevel=Potencial de prospecto DictionaryCanton=Estados / Provincias DictionaryCivility=Títulos honoríficos DictionaryActions=Tipos de eventos de agenda @@ -761,7 +755,6 @@ DictionaryAccountancysystem=Modelos para el plan de cuentas DictionaryAccountancyJournal=Diarios / libros de contabilidad DictionaryEMailTemplates=Plantillas de correo electrónico DictionaryMeasuringUnits=Unidades de medida -DictionaryProspectStatus=Estado del prospecto DictionaryHolidayTypes=Tipos de licencia DictionaryOpportunityStatus=Estado de plomo para proyecto / lider SetupSaved=Configuración Guardada @@ -831,7 +824,6 @@ DefaultMaxSizeShortList=Longitud máxima predeterminada para listas cortas (es d MessageLogin=Mensaje de la página de inicio de sesión LoginPage=Página de inicio de sesión PermanentLeftSearchForm=Formulario de búsqueda permanente en el menú de la izquierda -EnableMultilangInterface=Habilitar soporte multilenguaje CompanyInfo=Empresa / Organización CompanyIds=Identidades de la empresa / organización CompanyZip=Código Postal @@ -954,7 +946,6 @@ WarningAtLeastKeyOrTranslationRequired=Se requiere un criterio de búsqueda al m NewTranslationStringToShow=Nueva cadena de traducción para mostrar OriginalValueWas=La traducción original se inscribe. El valor original fue:

    %s TransKeyWithoutOriginalValue=Has forzado una nueva traducción para la clave de traducción ' %s ' que no existe en ningún archivo de idioma -TotalNumberOfActivatedModules=Aplicación activada / módulos: %s / %s YouMustEnableOneModule=Debe activar al menos 1 módulo ClassNotFoundIntoPathWarning=La clase %s no se encuentra en la ruta de PHP YesInSummer=Si en verano @@ -1293,14 +1284,12 @@ AGENDA_USE_EVENT_TYPE=Usar tipos de eventos (administrados en el menú Configura AGENDA_USE_EVENT_TYPE_DEFAULT=Establecer automáticamente este valor predeterminado para el tipo de evento en el formulario de creación de evento AGENDA_DEFAULT_FILTER_TYPE=Configure automáticamente este tipo de evento en el filtro de búsqueda de la vista de agenda AGENDA_DEFAULT_FILTER_STATUS=Establecer automáticamente este estado para eventos en el filtro de búsqueda de la vista de agenda -AGENDA_DEFAULT_VIEW=Qué pestaña desea abrir de forma predeterminada al seleccionar el menú Agenda AGENDA_REMINDER_EMAIL=Habilite el recordatorio de eventos por correo electrónico (la opción recordar / demora se puede definir en cada evento). Nota: El módulo %s debe estar habilitado y configurado correctamente para enviar un recordatorio a la frecuencia correcta. AGENDA_REMINDER_BROWSER=Habilite el recordatorio de evento en el navegador del usuario (cuando se alcanza la fecha del evento, cada usuario puede rechazar esto de la pregunta de confirmación del navegador) AGENDA_REMINDER_BROWSER_SOUND=Habilitar la notificación de sonido AGENDA_SHOW_LINKED_OBJECT=Mostrar objeto relacionado en la vista de la agenda ClickToDialSetup=Configuración del módulo - Haga clic para marcar ClickToDialUrlDesc=URL llamada cuando se hace clic en el icono de teléfono. En URL, puede usar las etiquetas
    __PHONETO__ que se reemplazarán con el número de teléfono de la persona a quien llamar
    __PHONEFROM__ que será reemplazado por el número de teléfono de la persona que llama (suyo)
    __LOGIN__ que se reemplazará con el inicio de sesión de "hacer clic para marcar" (definido en la tarjeta de usuario)
    __PASS __ < / b> que se reemplazará con la contraseña de "haga clic para marcar" (definida en el usuario tarjeta). -ClickToDialDesc=Este módulo hace que los números de teléfono hagan clic en los enlaces. Un clic en el icono hará que su teléfono llame al número. Esto se puede usar para llamar a un sistema de centro de llamadas de Dolibarr que puede llamar al número de teléfono en un sistema SIP, por ejemplo. ClickToDialUseTelLink=Utilizar sólo un enlace "tel:" en los números de teléfono ClickToDialUseTelLinkDesc=Use este método si sus usuarios tienen un softphone o una interfaz de software instalada en la misma computadora que el navegador y se le llama cuando hace clic en un enlace de su navegador que comienza con "tel:". Si necesita una solución de servidor completa (sin necesidad de instalación de software local), debe configurar esto en "No" y completar el siguiente campo. CashDeskSetup=Configuración del módulo de punto de venta @@ -1490,7 +1479,6 @@ NoNewEmailToProcess=No hay correo electrónico nuevo (filtros coincidentes) para XEmailsDoneYActionsDone=%s correos electrónicos calificados, %s correos electrónicos procesados con éxito (para %s registro/acciones realizadas) RecordEvent=Grabar evento de correo electrónico CreateLeadAndThirdParty=Crear plomo (y tercero si es necesario) -CreateTicketAndThirdParty=Crear ticket (y un tercero si es necesario) CodeLastResult=Último código de resultado NbOfEmailsInInbox=Número de correos electrónicos en el directorio de origen LoadThirdPartyFromName=Cargue la búsqueda de terceros en %s (solo carga) @@ -1522,7 +1510,6 @@ ModuleActivated=El módulo %s está activado y ralentiza la interfaz EXPORTS_SHARE_MODELS=Los modelos de exportación se comparten con todos ExportSetup=Configuración del módulo Exportar InstanceUniqueID=ID único de la instancia -IfTrackingIDFoundEventWillBeLinked=Tenga en cuenta que si se encuentra una identificación de seguimiento en el correo electrónico entrante, el evento se vinculará automáticamente a los objetos relacionados. WithGMailYouCanCreateADedicatedPassword=Con una cuenta de GMail, si habilitó la validación de 2 pasos, se recomienda crear una segunda contraseña dedicada para la aplicación en lugar de usar la contraseña de su propia cuenta de https://myaccount.google.com/. EmailCollectorLoadThirdPartyHelp=Puede usar esta acción para usar el contenido del correo electrónico para buscar y cargar un tercero existente en su base de datos. El tercero encontrado (o creado) se utilizará para las siguientes acciones que lo necesiten. En el campo de parámetros puede usar, por ejemplo, 'EXTRACT:BODY:Name:\\s([^\\s]*)' si desea extraer el nombre del cliente/proveedor de una cadena 'Nombre: nombre para encontrar' que se encuentra en el cuerpo. EndPointFor=Punto final para %s: %s diff --git a/htdocs/langs/es_EC/agenda.lang b/htdocs/langs/es_EC/agenda.lang index 0d763814ff8..c7beb16acb1 100644 --- a/htdocs/langs/es_EC/agenda.lang +++ b/htdocs/langs/es_EC/agenda.lang @@ -2,7 +2,6 @@ ActionsOwnedBy=Evento propiedad de Event=Evento ListOfActions=Lista de eventos -ToUserOfGroup=A cualquier usuario en grupo EventOnFullDay=Evento todo el día(s) MenuToDoActions=Todos los eventos incompletos MenuDoneActions=Todos los eventos terminados diff --git a/htdocs/langs/es_EC/cashdesk.lang b/htdocs/langs/es_EC/cashdesk.lang index 5ec640fca13..3361d257dc5 100644 --- a/htdocs/langs/es_EC/cashdesk.lang +++ b/htdocs/langs/es_EC/cashdesk.lang @@ -48,7 +48,6 @@ ConfirmDeletionOfThisPOSSale=¿Confirma la eliminación de esta venta actual? ConfirmDiscardOfThisPOSSale=¿Quieres descartar esta venta actual? History=Historia BasicPhoneLayout=Usar diseño básico para teléfonos -DirectPaymentButton=Botón de pago directo en efectivo Colorful=Vistoso SortProductField=Campo para clasificar productos BrowserMethodDescription=Impresión de recibos simple y fácil. Solo unos pocos parámetros para configurar el recibo. Imprimir a través del navegador. @@ -57,7 +56,6 @@ CashDeskRefNumberingModules=Módulo de numeración para ventas POS CashDeskGenericMaskCodes6 =
    {TN} la etiqueta se usa para agregar el número de terminal TakeposGroupSameProduct=Agrupar las mismas líneas de productos StartAParallelSale=Comience una nueva venta paralela -ControlCashOpening=Control de caja en la posición de apertura CloseCashFence=Cerca de efectivo CashReport=Informe de caja MainPrinterToUse=Impresora principal para usar diff --git a/htdocs/langs/es_EC/errors.lang b/htdocs/langs/es_EC/errors.lang index 4176946c8f0..d857d9acdeb 100644 --- a/htdocs/langs/es_EC/errors.lang +++ b/htdocs/langs/es_EC/errors.lang @@ -114,7 +114,6 @@ ErrorNewValueCantMatchOldValue=El nuevo valor no puede ser igual al anterior ErrorFailedToValidatePasswordReset=Error al reiniciar la contraseña. Puede ser el reinit ya estaba hecho (este enlace puede ser utilizado sólo una vez). Si no es así, intente reiniciar el proceso reinit. ErrorToConnectToMysqlCheckInstance=La conexión a la base de datos fallo. Compruebe el servidor de base de datos si está en ejecución (por ejemplo, con MySQL/MariaDB, se puede iniciar desde la línea de comandos con 'sudo service mysql start'). ErrorFailedToAddContact=No se pudo agregar el contacto -ErrorDateMustBeBeforeToday=La fecha no puede ser mayor que hoy ErrorPaymentModeDefinedToWithoutSetup=Se estableció un modo de pago para escribir%s, pero la configuración del módulo Factura no se completó para definir la información que se mostrará para este modo de pago. ErrorPHPNeedModule=Error, tu PHP debe tener el módulo %s instalado para usar esta función. ErrorOpenIDSetupNotComplete=Configure el archivo de configuración Dolibarr para permitir la autenticación OpenID, pero la URL del servicio OpenID no está definida en%s constante diff --git a/htdocs/langs/es_EC/mails.lang b/htdocs/langs/es_EC/mails.lang index 8f5a90b7d7b..b24a2b0d5f6 100644 --- a/htdocs/langs/es_EC/mails.lang +++ b/htdocs/langs/es_EC/mails.lang @@ -126,3 +126,4 @@ NoContactLinkedToThirdpartieWithCategoryFound=No hay contacto/dirección con una OutGoingEmailSetup=Configuración de correo saliente InGoingEmailSetup=Configuración de correo entrante ContactsWithThirdpartyFilter=Contactos con filtro de terceros +Answered=Contestada diff --git a/htdocs/langs/es_EC/main.lang b/htdocs/langs/es_EC/main.lang index 2dd7a66de05..a8b753d0290 100644 --- a/htdocs/langs/es_EC/main.lang +++ b/htdocs/langs/es_EC/main.lang @@ -22,7 +22,6 @@ FormatDateHourText=%d %B %Y %H:%M DatabaseConnection=Conexión con la base de datos NoTemplateDefined=No hay plantilla disponible para este tipo de correo electrónico AvailableVariables=Variables de sustitución disponibles -EmptySearchString=Enter non empty search criterias NoRecordFound=Ningún registro encontrado NoRecordDeleted=Ningún registro eliminado NoError=No hay error @@ -187,8 +186,7 @@ PriceUTTC=Precio (inc. IVA) Amount=Cantidad AmountInvoice=Valor de la factura AmountInvoiced=Monto facturado -AmountInvoicedHT=Valor facturada (con impuestos) -AmountInvoicedTTC=Valor facturado (sin impuestos) +AmountInvoicedHT=Valor facturado (sin impuestos) AmountPayment=Monto del pago AmountHTShort=Valor (excl.) AmountTTCShort=Valor (inc. IVA) @@ -272,6 +270,7 @@ DolibarrWorkBoard=Artículos abiertos NoOpenedElementToProcess=No hay elementos abiertos para procesar NotYetAvailable=No disponible aún Categories=Etiquetas/categorías +Category=Etiquetas/categoría ChangedBy=Cambiado por ResultKo=Fallo Reporting=Informes @@ -403,7 +402,6 @@ HidePassword=Mostrar comando con la contraseña oculta UnHidePassword=Mostrar comando real con contraseña clara RootOfMedias=Raíz de los medios públicos (/medios) AddFile=Agregar archivo -FreeZone=No es un producto/servicio predefinido FreeLineOfType=Elemento de texto libre, escriba: CloneMainAttributes=Clonar objeto con sus atributos principales PDFMerge=Combinar PDF diff --git a/htdocs/langs/es_EC/members.lang b/htdocs/langs/es_EC/members.lang index 36bd3d0b1d2..97fc61a0f8d 100644 --- a/htdocs/langs/es_EC/members.lang +++ b/htdocs/langs/es_EC/members.lang @@ -62,7 +62,6 @@ SubscriptionRequired=Se requiere suscripción VoteAllowed=Voto permitido Physical=Natural Moral=Juridica -MorPhy=Juridica/Natural ResiliateMember=Terminar un miembro ConfirmResiliateMember=¿Estás seguro de que quieres terminar este miembro? ConfirmDeleteMember=¿Está seguro de que desea eliminar este miembro (la eliminación de un miembro eliminará todas sus suscripciones)? diff --git a/htdocs/langs/es_EC/other.lang b/htdocs/langs/es_EC/other.lang index 9d8d38b3e92..48461bc5410 100644 --- a/htdocs/langs/es_EC/other.lang +++ b/htdocs/langs/es_EC/other.lang @@ -71,9 +71,7 @@ PredefinedMailContentSendSupplierOrder=__(Hola)__\n\nPor favor encuentre nuestro PredefinedMailContentSendSupplierInvoice=__(Hola)__\n\nEncuentre la factura __REF__ adjunta\n\n\n__(Sinceramente)__\n\n__ FIRMA DEL USUARIO__ PredefinedMailContentSendShipping=__(Hola)__\n\nPor favor encuentre el envío __REF__ adjunto\n\n\n__(Sinceramente)__\n\n__ FIRMA DEL USUARIO__ PredefinedMailContentSendFichInter=__(Hola)__\n\nPor favor encuentre la intervención __REF__ adjunta\n\n\n__(Sinceramente)__\n\n__ FIRMA DEL USUARIO__ -PredefinedMailContentThirdparty=__CONTACTCIVNAME __\n\n__PERSONALIZED __\n\n__SIGNATURE__ -PredefinedMailContentContact=aa__PERSONALIZED __\n\n__SIGNATURE__ -PredefinedMailContentUser=aa__PERSONALIZED __\n\n__SIGNATURE__ +PredefinedMailContentGeneric=aa__PERSONALIZED __\n\n__SIGNATURE__ DemoDesc=Dolibarr es un ERP/CRM compacto que soporta varios módulos de negocio. Una demostración que muestra todos los módulos no tiene sentido ya que este escenario nunca ocurre (varios cientos disponibles). Por lo tanto, varios perfiles de demostración están disponibles. ChooseYourDemoProfil=Elige el perfil de demostración que mejor se adapte a tus necesidades ... ChooseYourDemoProfilMore=...o crear su propio perfil
    (selección manual de módulos) diff --git a/htdocs/langs/es_EC/projects.lang b/htdocs/langs/es_EC/projects.lang index d86e42e1eda..ec9d4afe521 100644 --- a/htdocs/langs/es_EC/projects.lang +++ b/htdocs/langs/es_EC/projects.lang @@ -129,6 +129,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contribuyente TypeContact_project_task_external_TASKCONTRIBUTOR=Contribuyente SelectElement=Seleccionar elemento AddElement=Enlace al elemento +LinkToElementShort=Enlace a DocumentModelBeluga=Plantilla de documento de proyecto para la descripción de objetos vinculados DocumentModelBaleine=Plantilla de documento de proyecto para tareas DocumentModelTimeSpent=Plantilla de informe de proyecto por tiempo dedicado @@ -148,8 +149,6 @@ ProjectNbProjectByMonth=Nº de proyectos creados por mes. ProjectNbTaskByMonth=Nº de tareas creadas por mes. ProjectOppAmountOfProjectsByMonth=Cantidad de clientes potenciales por mes ProjectWeightedOppAmountOfProjectsByMonth=Cantidad ponderada de clientes potenciales por mes -ProjectOpenedProjectByOppStatus=Abrir proyecto / liderar por estado de clientes potenciales -TasksStatistics=Estadísticas sobre tareas de proyecto/lead TaskAssignedToEnterTime=Tarea asignada. Es posible introducir tiempo en esta tarea. IdTaskTime=Tiempo de la tarea de identificación YouCanCompleteRef=Si desea completar la referencia con algún sufijo, se recomienda agregar un carácter - para separarlo, por lo que la numeración automática seguirá funcionando correctamente para los próximos proyectos. Por ejemplo %s-MYSUFFIX diff --git a/htdocs/langs/es_EC/recruitment.lang b/htdocs/langs/es_EC/recruitment.lang new file mode 100644 index 00000000000..f7b234800a0 --- /dev/null +++ b/htdocs/langs/es_EC/recruitment.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - recruitment +About =page diff --git a/htdocs/langs/es_EC/stocks.lang b/htdocs/langs/es_EC/stocks.lang index 88ed5a7e742..00cba31ae26 100644 --- a/htdocs/langs/es_EC/stocks.lang +++ b/htdocs/langs/es_EC/stocks.lang @@ -38,6 +38,7 @@ PMPValue=Precio medio ponderado EnhancedValueOfWarehouses=Valor de almacenes UserWarehouseAutoCreate=Crear un almacén de usuario automáticamente al crear un usuario AllowAddLimitStockByWarehouse=Administre también el valor del stock mínimo y deseado por emparejamiento (almacén de productos) además del valor del stock mínimo y deseado por producto +MainDefaultWarehouse=Almacén predeterminado IndependantSubProductStock=El stock de producto y el stock de subproducto son independientes. QtyDispatched=Cantidad despachada QtyDispatchedShort=Cantidad enviada @@ -66,13 +67,11 @@ RealStock=Inventario Real RealStockDesc=El stock físico / real es el stock actualmente en los almacenes. RealStockWillAutomaticallyWhen=El stock real se modificará de acuerdo con esta regla (como se define en el módulo Stock): VirtualStock=Inventario Virtual -VirtualStockDesc=El stock virtual es el stock calculado disponible una vez que se cierran todas las acciones abiertas / pendientes (que afectan a los stocks) (órdenes de compra recibidas, órdenes de venta enviadas, etc.) IdWarehouse=Id del Almacén DescWareHouse=Descripción de almacén LieuWareHouse=Almacén de localización WarehousesAndProductsBatchDetail=Almacenes y productos (con detalle por lote / serie) -AverageUnitPricePMPShort=Precio medio ponderado de los insumos -AverageUnitPricePMP=Precio medio ponderado de los insumos +AverageUnitPricePMPShort=Precio medio ponderado SellPriceMin=Precio unitario de venta EstimatedStockValueSellShort=Valor para la venta EstimatedStockValueSell=Valor para la venta @@ -105,7 +104,6 @@ Replenishments=Reabastecimientos NbOfProductBeforePeriod=Cantidad del producto%s en Inventario antes del período seleccionado (<%s) NbOfProductAfterPeriod=Cantidad del producto%s en Inventario después del período seleccionado (>%s) MassMovement=Movimiento masivo -SelectProductInAndOutWareHouse=Seleccione un producto, una cantidad, un almacén de origen y un almacén de destino, luego haga clic en "%s". Una vez hecho esto para todos los movimientos requeridos, haga clic en "%s". RecordMovement=Transferencia de registros ReceivingForSameOrder=Recibos para este pedido StockMovementRecorded=Movimientos de inventario registrados diff --git a/htdocs/langs/es_EC/ticket.lang b/htdocs/langs/es_EC/ticket.lang index 86683e42093..1b7ecded84a 100644 --- a/htdocs/langs/es_EC/ticket.lang +++ b/htdocs/langs/es_EC/ticket.lang @@ -15,7 +15,6 @@ Notify_TICKET_SENTBYMAIL=Enviar mensaje del ticket por correo electrónico NotRead=No leer Read=Leer NeedMoreInformation=Esperando información -Answered=Contestada Waiting=Esperando Type=Tipo MailToSendTicketMessage=Para enviar un correo electrónico desde un ticket diff --git a/htdocs/langs/es_EC/withdrawals.lang b/htdocs/langs/es_EC/withdrawals.lang index 35fb87b8fe6..ba83f5af30c 100644 --- a/htdocs/langs/es_EC/withdrawals.lang +++ b/htdocs/langs/es_EC/withdrawals.lang @@ -36,6 +36,7 @@ InvoiceRefused=Factura rechazada (Cargar el rechazo al cliente) StatusWaiting=Esperando StatusTrans=Enviado StatusCredited=Acreditado +StatusPaid=Pagado StatusRefused=Rechazado StatusMotif1=Fondos insuficientes StatusMotif2=Solicitud impugnada @@ -48,8 +49,6 @@ CreateForSepaRCUR=Crear archivo de débito directo (SEPA RCUR) CreateAll=Crear archivo de débito directo (todos) CreateBanque=Solo banco OrderWaiting=Esperando tratamiento -NotifyTransmision=Transmisión de retirada -NotifyCredit=Crédito por Retiro NumeroNationalEmetter=Número del Transmisor Nacional WithBankUsingRIB=Para cuentas bancarias utilizando RIB WithBankUsingBANBIC=Para cuentas bancarias utilizando IBAN/BIC/SWIFT @@ -58,7 +57,6 @@ CreditDate=Crédito en WithdrawalFileNotCapable=No se puede generar el archivo de recibo de retiro para su país %s (su país no es compatible) ShowWithdraw=Mostrar orden de débito directo IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene al menos una orden de pago de débito directo aún no procesada, no se establecerá como pagada para permitir la gestión previa de retiros. -WithdrawalFile=Archivo de retiro SetToStatusSent=Establecer en estado "Archivo enviado" StatisticsByLineStatus=Estadísticas por estado de las líneas RUMLong=Referencia única de mandato diff --git a/htdocs/langs/es_ES/accountancy.lang b/htdocs/langs/es_ES/accountancy.lang index e7240dd7f6d..59f43c94cc7 100644 --- a/htdocs/langs/es_ES/accountancy.lang +++ b/htdocs/langs/es_ES/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Gestiona el cero al final de una cuenta contable. Necesar BANK_DISABLE_DIRECT_INPUT=Desactivar transacciones directas en cuenta bancaria ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Habilitar exportación de borradores al diario ACCOUNTANCY_COMBO_FOR_AUX=Habilitar la lista combinada para la cuenta subsidiaria (puede ser lento si tiene muchos terceros) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Diario de ventas ACCOUNTING_PURCHASE_JOURNAL=Diario de compras @@ -284,6 +285,7 @@ ShowTutorial=Ver Tutorial NotReconciled=No reconciliado ## Admin +BindingOptions=Binding options ApplyMassCategories=Aplicar categorías en masa AddAccountFromBookKeepingWithNoCategories=Cuenta disponible sin grupo personalizado CategoryDeleted=La categoría para la cuenta contable ha sido eliminada diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang index a88a57efcf5..31204078eb6 100644 --- a/htdocs/langs/es_ES/admin.lang +++ b/htdocs/langs/es_ES/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Remitente de e-mails para envíos manuales (e-mail de UserEmail=e-mail de usuario CompanyEmail=E-mail de empresa FeatureNotAvailableOnLinux=Funcionalidad no disponible en sistemas Unix. Pruebe su sendmail localmente. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Si la traducción de este idioma no está completa o si encuentra errores, puede corregir esto editando los archivos en el directorio langs/%s y enviar su cambio a www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Si la traducción de este idioma es incompleta o si encuentra errores, puede corregirlos mediante la edición de los archivos en el directorio langs/%s y el envío los cambios al foro www.dolibarr.es o a los desarrolladores en github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Configuración del módulo ModulesSetup=Configuración de los módulos ModuleFamilyBase=Sistema @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=El módulo %s debe ser activado antes si necesit SecurityToken=Clave para encriptar urls NoSmsEngine=No hay disponible ningún gestor de envío de SMS. Los gestores de envío de SMS no se instalan por defecto ya que dependen de cada proveedor, sin embargo puede encontrarlos en la plataforma %s PDF=PDF -PDFDesc=Opciones globales para la generación de PDF. -PDFAddressForging=Reglas para las direcciones +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Ocultar toda la información relacionada con el Impuesto/IVA PDFRulesForSalesTax=Reglas de IVA PDFLocaltax=Reglas para %s -HideLocalTaxOnPDF=Ocultar la tasa %s en la columna de impuesto +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Ocultar descripción de los productos HideRefOnPDF=Ocultar referencia de los productos HideDetailsOnPDF=Ocultar detalles de las líneas de productos @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Cambiar el precio cuya referencia de base es MassConvert=Lanzar la conversión en masa PriceFormatInCurrentLanguage=Formato de precio en el idioma actual String=Cadena de texto +String1Line=String (1 line) TextLong=Texto largo +TextLongNLines=Long text (n lines) HtmlText=Texto html Int=Numérico entero Float=Decimal @@ -543,9 +546,9 @@ Module54Desc=Gestión de contratos (servicios o suscripciones recurrentes) Module55Name=Códigos de barras Module55Desc=Gestión de los códigos de barras Module56Name=Pago por transferencia bancaria -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Pagos por domiciliaciones -Module57Desc=Gestión de domiciliaciones. También incluye generación de archivo SEPA para los países europeos. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integración con ClickToDial Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Crear/modificar servicios Permission534=Eliminar servicios Permission536=Ver/gestionar los servicios ocultos Permission538=Exportar servicios +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Leer lista de materiales Permission651=Crear/Actualizar lista de material Permission652=Eliminar lista de material +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Consultar donaciones Permission702=Crear/modificar donaciones Permission703=Eliminar donaciones @@ -848,6 +858,8 @@ Permission773=Eliminar informe de gastos Permission774=Leer todos los informes de gastos (incluidos los no subordinados) Permission775=Aprobar informe de gastos Permission776=Pagar informe de gastos +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Exportar informe de gastos Permission1001=Consultar stocks Permission1002=Crear/modificar almacenes @@ -900,6 +912,7 @@ Permission2515=Configuración directorios de documentos Permission2801=Utilizar el cliente FTP en modo lectura (sólo explorar y descargar) Permission2802=Utilizar el cliente FTP en modo escritura (borrar o subir archivos) Permission3200=Leer eventos archivados y huellas digitales +Permission3301=Generate new modules Permission4001=Ver empleados Permission4002=Crear empleados Permission4003=Eliminar empleados @@ -947,7 +960,8 @@ Permission63003=Eliminar recursos Permission63004=Enlazar recursos a eventos de la agenda DictionaryCompanyType=Tipos de Terceros DictionaryCompanyJuridicalType=Tipo de entidad legar para Terceros -DictionaryProspectLevel=Cliente potencial +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Provincias DictionaryRegion=Regiones DictionaryCountry=Países @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Plantillas E-Mails DictionaryUnits=Unidades DictionaryMeasuringUnits=Unidades de Medida DictionarySocialNetworks=Redes sociales -DictionaryProspectStatus=Estado cliente potencial +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Tipos de vacaciones DictionaryOpportunityStatus=Estado de oportunidad para el proyecto/oportunidad DictionaryExpenseTaxCat=Informe de gastos - Categorías de transporte @@ -1076,7 +1091,7 @@ LoginPage=Página de login BackgroundImageLogin=Imagen de fondo PermanentLeftSearchForm=Zona de búsqueda permanente del menú izquierdo DefaultLanguage=Idioma predeterminado -EnableMultilangInterface=Activar soporte multi-idioma +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Mostrar el logo de la empresa en el menú CompanyInfo=Empresa/Organización CompanyIds=Identificación de la empresa/organización @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Se necesita un criterio de búsqueda al m NewTranslationStringToShow=Nueva cadena traducida a mostrar OriginalValueWas=La traducción original se ha sobreescrito. El valor original era:

    %s TransKeyWithoutOriginalValue=Forzó una nueva traducción para la clave de traducción '%s' que no existe en ningún archivo de idioma -TotalNumberOfActivatedModules=Número total de módulos activados: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Debe activar al menos un módulo. ClassNotFoundIntoPathWarning=No se ha encontrado la clase %s en su path PHP YesInSummer=Sí en verano @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Usar tipos de evento (gestionados en el menú Configuraci AGENDA_USE_EVENT_TYPE_DEFAULT=Establecer automáticamente este valor por defecto para el tipo de evento en la creación de un evento AGENDA_DEFAULT_FILTER_TYPE=Establecer por defecto este tipo de evento en el filtro de búsqueda en la vista de la agenda AGENDA_DEFAULT_FILTER_STATUS=Establecer por defecto este estado de eventos en el filtro de búsqueda en la vista de la agenda -AGENDA_DEFAULT_VIEW=Establecer la pestaña por defecto al seleccionar el menú Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Habilitar recordatorio de eventos por e-mail (definido en cada evento). Nota: El módulo %s debe estar habilitado y configurado correctamente para que el recordatorio se envíe a la frecuencia correcta. AGENDA_REMINDER_BROWSER=Habilitar recordatorio de eventos en el navegador de los usuarios (cuando llega la fecha del evento, cada usuario puede rechazar esto desde la pregunta de confirmación del navegador) AGENDA_REMINDER_BROWSER_SOUND=Activar sonido de notificación @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Mostrar el link en la agenda ##### Clicktodial ##### ClickToDialSetup=Configuración del módulo Click To Dial ClickToDialUrlDesc=Url llamada cuando se hace clic en el icono de teléfono. En la URL, puede usar los tags
    __PHONETO__ que se reemplazará con el número de teléfono de la persona a llamar
    __PHONEFROM__ que será reemplazado por el número de teléfono de la persona que llama (suyo)
    __LOGIN__ que se reemplazará con el login clicktodial (definido en la tarjeta de usuario)
    __PASS__ que será Sustituido por la contraseña clicktodial (definida en la ficha de usuario). -ClickToDialDesc=Este módulo permite hacer clicables los números de teléfono. Un clic en este icono hará que su teléfono llame al número de teléfono. Esto puede ser usado para llamar a un sistema de centralitas desde Dolibarr que puede llamar al número de teléfono en un sistema SIP, por ejemplo. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Utilice el enlace "tel:" que aparece en los números de teléfono ClickToDialUseTelLinkDesc=Utilice este método si los usuarios tienen un softphone o una interfaz de software instalado en mismo equipo que el navegador, y se llama al hacer clic en un enlace en el navegador que comienza con "tel:". Si necesita una solución de servidor completa (sin necesidad de instalación de software local), debe establecer este en "No" y rellenar siguiente campo. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Este campo contiene una referencia para identificar la línea. Intr Enter0or1=Introduzca 0 o 1 UnicodeCurrency=Ingrese aquí entre llaves, lista con número de byte que representa el símbolo de moneda. Por ejemplo: para $, introduzca [36] - para Brasil Real R$ [82,36] - para €, introduzca [8364] ColorFormat=El color RGB es en formato HEX, ej: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Posición de la línea en listas de combo SellTaxRate=Tasa de IVA RecuperableOnly=Sí para el IVA "Non Perçue Récupérable" usados en algunas provincias en Francia. Mantenga el valor a "No" en los demás casos. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Para enviar solicitud de presupuesto de pr MailToSendSupplierOrder=Pedidos a proveedor MailToSendSupplierInvoice=Facturas proveedor MailToSendContract=Contratos +MailToSendReception=Recepciones MailToThirdparty=Terceros MailToMember=Miembros MailToUser=Usuarios @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Disponible ERP/CRM Dolibarr %s. La versión ExampleOfNewsMessageForMaintenanceRelease=Disponible ERP/CRM Dolibarr %s. La versión %s es una versión de mantenimiento, por lo que sólo contiene correcciones de errores. Recomendamos a todo el mundo que use una versión anterior que actualice a esta. Como cualquier versión de mantenimiento, no hay novedades. Se puede descargar desde la sección de descargas del portal https://www.dolibarr.org (subdirectorio versiones estables subdirectorio). Puede leer ChangeLog para ver la lista completa de los cambios. MultiPriceRuleDesc=Cuando la opción "Diferentes niveles de precios por productos/servicios" esta activada, puede definir diferentes precios (uno por nivel de precios) para cada producto. Para ahorrarle tiempo, puede escribir una regla para auto calcular un precio basado en el precio del primer nivel para cada producto, así solo tendrá que poner un solo precio para el primer nivel de cada producto. Esta página esta diseñada para ahorrarle tiempo, pero solamente será útil si los precios para cada nivel son relativos al primero. Puede ignorar esta página en la mayoría de los casos. ModelModulesProduct=Plantillas de documentos de productos +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Para poder generar códigos automáticamente, primero debe indicar un gestor para autogenerar códigos de barras SeeSubstitutionVars=Vea * nota para un listado de posibles variables de sustitución SeeChangeLog=Ver archivo ChangeLog (solo inglés) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Margen izquierdo en PDF MAIN_PDF_MARGIN_RIGHT=Margen derecho en PDF MAIN_PDF_MARGIN_TOP=Margen superior en PDF MAIN_PDF_MARGIN_BOTTOM=Margen inferior en PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=No hay ninguna configuración a realizar en este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Establezca esto a sí si este grupo es un cálculo de otros grupos EnterCalculationRuleIfPreviousFieldIsYes=Ingrese regla de cálculo si el campo anterior se estableció en Sí (por ejemplo, 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nada hecho XEmailsDoneYActionsDone=%s e-mails analizados, %s e-mails procesados ​​con éxito (para %s registro/acciones realizadas) RecordEvent=Registro de evento de email CreateLeadAndThirdParty=Crear lead (y tercero si es necesario) -CreateTicketAndThirdParty=Crear ticket (y tercero si es necesario) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Resultado último código NbOfEmailsInInbox=Número de emails en el directorio fuente LoadThirdPartyFromName=Cargar terceros buscando en %s (solo carga) LoadThirdPartyFromNameOrCreate=Cargar terceros terceros buscando en %s (crear si no se encuentra) -WithDolTrackingID=Referencia Dolibarr encontrada en ID de mensaje -WithoutDolTrackingID=Referencia Dolibarr no encontrada en ID de mensaje +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Código postal MainMenuCode=Código de entrada del menú (menú principal) ECMAutoTree=Mostrar arbol automático GED @@ -1981,7 +2002,7 @@ ImportSetup=Configuración del módulo Importar InstanceUniqueID=ID única de la instancia SmallerThan=Menor que LargerThan=Mayor que -IfTrackingIDFoundEventWillBeLinked=Tenga en cuenta que si se encuentra un ID de seguimiento en el e-mail entrante, el evento se vinculará automáticamente a los objetos relacionados. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Con una cuenta de GMail, si habilitó la validación de 2 pasos, se recomienda crear una segunda contraseña dedicada para la aplicación en lugar de usar su propia contraseña de https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=Puede usar esta acción para usar el contenido del email para encontrar y cargar un tercero existente en su base de datos. El tercero encontrado (o creado) se utilizará para las siguientes acciones que lo necesiten. En el campo de parámetros puede usar, por ejemplo, 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' si desea extraer el nombre del tercero de una cadena 'Name: nombre a encontrar' encontrado en el body. @@ -2005,3 +2026,7 @@ RssNote=Nota: Cada definición de fuente RSS proporciona un widget que debe habi JumpToBoxes=Vaya a Configuración -> Módulos MeasuringUnitTypeDesc=Utilice aquí un valor como "tamaño", "superficie", "volumen", "peso", "tiempo" MeasuringScaleDesc=La escala es el número de lugares que tiene que mover la parte decimal para que coincida con la unidad de referencia predeterminada. Para el tipo de unidad de "tiempo", es el número de segundos. Los valores entre 80 y 99 son valores reservados. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/es_ES/agenda.lang b/htdocs/langs/es_ES/agenda.lang index 3a4cb8986a5..ecf2af5c4f4 100644 --- a/htdocs/langs/es_ES/agenda.lang +++ b/htdocs/langs/es_ES/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Número de eventos ListOfActions=Listado de eventos EventReports=Informes de eventos Location=Localización -ToUserOfGroup=A todos los usuarios del grupo +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Evento para todo el día MenuToDoActions=Eventos incompletos MenuDoneActions=Eventos terminados @@ -86,6 +86,8 @@ ProposalDeleted=Presupuesto eliminado OrderDeleted=Pedido eliminado InvoiceDeleted=Factura eliminada DraftInvoiceDeleted=Borrador de factura eliminado +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Producto %s creado PRODUCT_MODIFYInDolibarr=Producto %s modificado PRODUCT_DELETEInDolibarr=Producto %s eliminado @@ -158,3 +160,9 @@ DateStartPlusOne=Fecha inicio +1 hora SetAllEventsToTodo=Establecer todos los eventos para hacer SetAllEventsToInProgress=Establecer todos los eventos en progreso SetAllEventsToFinished=Establecer todos los eventos para finalizar +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/es_ES/boxes.lang b/htdocs/langs/es_ES/boxes.lang index f25225d400b..c5871f7db00 100644 --- a/htdocs/langs/es_ES/boxes.lang +++ b/htdocs/langs/es_ES/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Últimos %s pedidos de clientes modificados BoxTitleLastModifiedCustomerBills=Últimas %s facturas a clientes modificadas BoxTitleLastModifiedCustomerOrders=Últimos %s pedidos de clientes modificados BoxTitleLastModifiedPropals=Últimos %s presupuestos modificados +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Facturas a clientes ForCustomersOrders=Pedidos de clientes ForProposals=Presupuestos @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=La cuenta de suspenso no está definida BoxLastCustomerShipments=Últimos envíos a clientes BoxTitleLastCustomerShipments=Últimos %s envíos a clientes NoRecordedShipments=Ningún envío a clientes registrado +# Pages +AccountancyHome=Contabilidad diff --git a/htdocs/langs/es_ES/cashdesk.lang b/htdocs/langs/es_ES/cashdesk.lang index 2029e24b02c..bf0b61bff10 100644 --- a/htdocs/langs/es_ES/cashdesk.lang +++ b/htdocs/langs/es_ES/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=Módulo POS BasicPhoneLayout=Utilizar diseño básico para teléfonos. SetupOfTerminalNotComplete=La configuración del terminal %s no está completa DirectPayment=Pago directo -DirectPaymentButton=Botón de pago en efectivo +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=La factura ya está validada NoLinesToBill=No hay líneas para facturar CustomReceipt=Recibo personalizado @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Módulo externo para impresión directa. PrintMethod=Método de impresión ReceiptPrinterMethodDescription=Método potente con muchos parámetros. Completamente personalizable con plantillas. No se puede imprimir desde la nube. ByTerminal=Por terminal -TakeposNumpadUsePaymentIcon=Usar icono de pago en el teclado numérico +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Módulo de numeración para el TPV CashDeskGenericMaskCodes6 =
    {TN} tag es usado para añadir el número de terminal TakeposGroupSameProduct=Agrupar mismas líneas de producto StartAParallelSale=Nueva venta simultánea  -ControlCashOpening=Control de caja al abrir el TPV +ControlCashOpening=Control cash box at opening POS CloseCashFence=Cierre de caja CashReport=Arqueo MainPrinterToUse=Impresora principal @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/es_ES/compta.lang b/htdocs/langs/es_ES/compta.lang index f6d1c29c1f7..b0b4b087cb1 100644 --- a/htdocs/langs/es_ES/compta.lang +++ b/htdocs/langs/es_ES/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Impuestos sociales o fiscales SocialContributions=Impuestos sociales o fiscales SocialContributionsDeductibles=Impuestos sociales o fiscales deducibles SocialContributionsNondeductibles=Impuestos sociales o fiscales no deducibles +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Etiqueta TypeContrib=Tipo MenuSpecialExpenses=Pagos especiales diff --git a/htdocs/langs/es_ES/contracts.lang b/htdocs/langs/es_ES/contracts.lang index 954d751ea81..caf7a7d363b 100644 --- a/htdocs/langs/es_ES/contracts.lang +++ b/htdocs/langs/es_ES/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Servicios activos MenuExpiredServices=Servicios expirados MenuClosedServices=Servicios cerrados NewContract=Nuevo contrato -NewContractSubscription=Nuevo contrato/suscripción +NewContractSubscription=New contract or subscription AddContract=Crear contrato DeleteAContract=Eliminar un contrato ActivateAllOnContract=Activar todos los servicios diff --git a/htdocs/langs/es_ES/errors.lang b/htdocs/langs/es_ES/errors.lang index 8318013c60e..2bc9c1698ef 100644 --- a/htdocs/langs/es_ES/errors.lang +++ b/htdocs/langs/es_ES/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=El nuevo valor no puede ser igual al antiguo ErrorFailedToValidatePasswordReset=No se ha podido restablecer la contraseña. Es posible que este enlace ya se haya utilizado (este enlace sólo puede usarse una vez). Si no es el caso, trate de reiniciar el proceso de restablecimiento de contraseña desde el principio. ErrorToConnectToMysqlCheckInstance=Error de conexión con la base de datos. Compruebe que el servidor de base de datos está en marcha (por ejemplo, con mysql/maríadb, pudes lanzarlo con la línea de comando 'sudo service mysql start'). ErrorFailedToAddContact=Error en la adición del contacto -ErrorDateMustBeBeforeToday=La fecha no puede ser posterior a hoy +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Se ha establecido el modo de pago al tipo %s pero en la configuración del módulo de facturas no se ha indicado la información para mostrar de este modo de pago. ErrorPHPNeedModule=Error, su PHP debe tener instalado el módulo %s para usar esta funcionalidad. ErrorOpenIDSetupNotComplete=Ha configurado Dolibarr para aceptar la autentificación OpenID, pero la URL del servicio OpenID no se encuentra definida en la constante %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No hay suficiente cantidad ErrorOnlyOneFieldForGroupByIsPossible=Solo es posible un campo para 'Agrupar por' (otros se descartan) ErrorTooManyDifferentValueForSelectedGroupBy=Se encontraron demasiados valores diferentes (más de %s) para el campo '%s', así que no podemos usarlo como 'Agrupar por' para gráficos. El campo 'Agrupar por' ha sido eliminado. ¿Puede ser que quieras usarlo como un eje X? ErrorReplaceStringEmpty=Error, la cadena para reemplazar está vacía +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=El parámetro PHP upload_max_filesize (%s) es más alto que el parámetro PHP post_max_size (%s). Esta no es una configuración consistente. WarningPasswordSetWithNoAccount=Se fijó una contraseña para este miembro. Sin embargo, no se ha creado ninguna cuenta de usuario. Así que esta contraseña no se puede utilizar para acceder a Dolibarr. Puede ser utilizada por un módulo/interfaz externo, pero si no necesitar definir accesos de un miembro, puede desactivar la opción "Administrar un inicio de sesión para cada miembro" en la configuración del módulo miembros. Si necesita administrar un inicio de sesión, pero no necesita ninguna contraseña, puede dejar este campo vacío para evitar esta advertencia. Nota: También puede usarse el correo electrónico como inicio de sesión si el miembro está vinculada a un usuario. diff --git a/htdocs/langs/es_ES/languages.lang b/htdocs/langs/es_ES/languages.lang index 2277b2ac10a..ad58634371b 100644 --- a/htdocs/langs/es_ES/languages.lang +++ b/htdocs/langs/es_ES/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Árabe Language_ar_EG=Árabe (Egipto) Language_ar_SA=Árabe +Language_az_AZ=Azerbaijani Language_bn_BD=Bengalí +Language_bn_IN=Bengali (India) Language_bg_BG=Búlgaro Language_bs_BA=Bosnio Language_ca_ES=Catalán @@ -20,6 +23,7 @@ Language_en_GB=Inglés (Reino Unido) Language_en_IN=Inglés (India) Language_en_NZ=Inglés (Nueva Zelanda) Language_en_SA=Inglés (Arabia Saudita) +Language_en_SG=English (Singapore) Language_en_US=Inglés (Estados Unidos) Language_en_ZA=Inglés (Sudáfrica) Language_es_ES=Español @@ -29,6 +33,7 @@ Language_es_CL=Español (Chile) Language_es_CO=Español (Colombia) Language_es_DO=Español (República Dominicana) Language_es_EC=Español (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Español (Honduras) Language_es_MX=Español (México) Language_es_PA=Español (Panamá) @@ -36,6 +41,7 @@ Language_es_PY=Español (Paraguay) Language_es_PE=Español (Perú) Language_es_PR=Español (Puerto Rico) Language_es_UY=Español (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Español (Venezuela) Language_et_EE=Estonio Language_eu_ES=Vasco @@ -44,15 +50,22 @@ Language_fi_FI=Finés Language_fr_BE=Francés (Bélgica) Language_fr_CA=Francés (Canadá) Language_fr_CH=Francés (Suiza) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francés +Language_fr_GA=French (Gabon) Language_fr_NC=Francés (Nueva Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisio +Language_gl_ES=Galician Language_he_IL=Hebreo +Language_hi_IN=Hindi (India) Language_hr_HR=Croata Language_hu_HU=Húngaro Language_id_ID=Indonesio Language_is_IS=Islandés Language_it_IT=Italiano +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japonés Language_ka_GE=Georgiano Language_km_KH=Jemer @@ -64,6 +77,7 @@ Language_lv_LV=Latvio Language_mk_MK=Macedonio Language_mn_MN=Mongol Language_nb_NO=Noruego (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Neerlandés (Bélgica) Language_nl_NL=Holandés Language_pl_PL=Polaco @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbeco Language_vi_VN=Vietnamita Language_zh_CN=Chino Language_zh_TW=Chino (Tradicional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malayo diff --git a/htdocs/langs/es_ES/mails.lang b/htdocs/langs/es_ES/mails.lang index 247879c790f..947cb08fdef 100644 --- a/htdocs/langs/es_ES/mails.lang +++ b/htdocs/langs/es_ES/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Configuración del correo electrónico saliente (p DefaultOutgoingEmailSetup=Configuración de correo saliente predeterminada Information=Información ContactsWithThirdpartyFilter=Contactos con filtro de terceros. +Unanswered=Unanswered +Answered=Contestado +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/es_ES/main.lang b/htdocs/langs/es_ES/main.lang index 976a88feedc..20639672a7d 100644 --- a/htdocs/langs/es_ES/main.lang +++ b/htdocs/langs/es_ES/main.lang @@ -355,8 +355,8 @@ PriceUTTC=P.U. (i.i.) Amount=Importe AmountInvoice=Importe factura AmountInvoiced=Importe facturado -AmountInvoicedHT=Cantidad facturada (impuestos incluidos) -AmountInvoicedTTC=Importe facturado (sin impuestos) +AmountInvoicedHT=Importe facturado (sin impuestos) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Importe pago AmountHTShort=Base imp. AmountTTCShort=Importe @@ -485,6 +485,7 @@ Categories=Etiquetas/Categorías Category=Etiqueta/Categoría By=Por From=De +FromDate=De FromLocation=De to=a To=a @@ -687,6 +688,7 @@ Method=Método Receive=Recepción CompleteOrNoMoreReceptionExpected=Completado o no se espera más ExpectedValue=Valor esperado +ExpectedQty=Expected Qty PartialWoman=Parcial TotalWoman=Total NeverReceived=Nunca recibido @@ -703,6 +705,7 @@ MenuECM=Documentos MenuAWStats=AWStats MenuMembers=Miembros MenuAgendaGoogle=Agenda Google +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Límite Dolibarr (Menú inicio-configuración-seguridad): %s Kb, PHP limit: %s Kb NoFileFound=No hay documentos guardados en este directorio CurrentUserLanguage=Idioma actual @@ -725,7 +728,7 @@ Page=Página Notes=Notas AddNewLine=Añadir nueva línea AddFile=Añadir archivo -FreeZone=Entrada libre +FreeZone=Free-text product FreeLineOfType=Entrada libre del tipo CloneMainAttributes=Clonar el objeto con estos atributos principales ReGeneratePDF=Regenerar PDF @@ -942,6 +945,39 @@ ShortThursday=J ShortFriday=V ShortSaturday=S ShortSunday=D +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Seleccione una plantilla de e-mail SetRef=Establecer ref Select2ResultFoundUseArrows=Varios resultados encontrados. Use las flechas para seleccionar. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Cambie al modo de edición para agregar traducc NotUsedForThisCustomer=No se utiliza para este cliente. AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Información +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/es_ES/members.lang b/htdocs/langs/es_ES/members.lang index f36303eca3e..21c55f7972a 100644 --- a/htdocs/langs/es_ES/members.lang +++ b/htdocs/langs/es_ES/members.lang @@ -81,7 +81,7 @@ DeleteType=Eliminar VoteAllowed=Voto autorizado Physical=Físico Moral=Jurídico -MorPhy=Jurídico/Físico +MorPhy=Naturaleza Reenable=Reactivar ResiliateMember=Dar de baja un miembro ConfirmResiliateMember=¿Está seguro de querer dar de baja a este miembro? diff --git a/htdocs/langs/es_ES/mrp.lang b/htdocs/langs/es_ES/mrp.lang index 8a35d78dd40..47ae2fc9595 100644 --- a/htdocs/langs/es_ES/mrp.lang +++ b/htdocs/langs/es_ES/mrp.lang @@ -1,5 +1,6 @@ Mrp=Órdenes de fabricación MO=Orden de fabricación +MOs=Manufacturing orders MRPDescription=Módulo para gestionar producción y Órdenes de Fabricación (OF). MRPArea=Área MRP MrpSetupPage=Configuración del módulo MRP diff --git a/htdocs/langs/es_ES/other.lang b/htdocs/langs/es_ES/other.lang index 748f05813d5..dcaaa909282 100644 --- a/htdocs/langs/es_ES/other.lang +++ b/htdocs/langs/es_ES/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nNos ponemos en contacto co PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nNos ponemos en contacto con usted para facilitarle la factura __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nNos ponemos en contacto con usted para facilitarle el envío __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nNos ponemos en contacto con usted para facilitarle la intervención __REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hola)__\n\n\n__(Sinceramente)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hola)__\n\n\n__(Sinceramente)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hola)__\n\n\n__(Sinceramente)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Puede hacer clic en el siguiente enlace para realizar su pago, si aún no lo ha hecho.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hola)__\n\n\n__(Sinceramente)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr es un ERP/CRM para la gestión de negocios (profesionales o asociaciones), compuesto de módulos funcionales independientes y opcionales. Una demostración que incluya todos estos módulos no tiene sentido porque no utilizará todos los módulos. Además, tiene disponibles varios tipos de perfiles de demostración. ChooseYourDemoProfil=Elija el perfil de demostración que mejor se adapte a sus necesidades ... ChooseYourDemoProfilMore=... o construya su perfil
    (modo de selección manual) @@ -280,7 +278,9 @@ LinesToImport=Líneas a importar MemoryUsage=Uso de memoria RequestDuration=Duración de la solicitud +ProductsPerPopularity=Products/Services by popularity PopuProp=Productos/Servicios por popularidad en Presupuestos PopuCom=Productos/Servicios por popularidad en Pedidos ProductStatistics=Estadísticas de productos/servicios NbOfQtyInOrders=Cantidad en pedidos +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/es_ES/products.lang b/htdocs/langs/es_ES/products.lang index 40468c14c77..a4b527c3730 100644 --- a/htdocs/langs/es_ES/products.lang +++ b/htdocs/langs/es_ES/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Defina el tipo de código de barras BarcodeValue=Valor del código de barras NoteNotVisibleOnBill=Nota (no visible en las facturas, presupuestos, etc.) ServiceLimitedDuration=Si el servicio es de duración limitada : +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Varios segmentos de precios por producto/servicio (cada cliente está en un segmento) MultiPricesNumPrices=Nº de precios DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Precios de proveedores (productos o servicio CustomCode=Código aduanero CountryOrigin=País de origen Nature=Naturaleza del producto (materia prima/producto acabado) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Etiqueta corta Unit=Unidad p=u. @@ -359,6 +362,9 @@ SelectCombination=Seleccione combinación ProductCombinationGenerator=Generador de variantes Features=Funciones PriceImpact=Impacto en el precio +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Impacto en el peso NewProductAttribute=Nuevo atributo NewProductAttributeValue=Nuevo valor de atributo diff --git a/htdocs/langs/es_ES/projects.lang b/htdocs/langs/es_ES/projects.lang index 7af2c7b1996..2adccf038e2 100644 --- a/htdocs/langs/es_ES/projects.lang +++ b/htdocs/langs/es_ES/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Participante TypeContact_project_task_external_TASKCONTRIBUTOR=Participante SelectElement=Seleccione elemento AddElement=Vincular a elmento +LinkToElementShort=Enlazar a # Documents models DocumentModelBeluga=Plantilla de proyecto de resumen objetos vinculados DocumentModelBaleine=Plantilla de informe del proyecto para tareas @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Nº de proyectos creados por mes ProjectNbTaskByMonth=Nº de tareas creadas por mes ProjectOppAmountOfProjectsByMonth=Importe de oportunidades por mes ProjectWeightedOppAmountOfProjectsByMonth=Importe medio oportinidades por mes -ProjectOpenedProjectByOppStatus=Proyectos/oportunidades abiertos por estado oportunidad -ProjectsStatistics=Estadísticas de proyectos/leads -TasksStatistics=Estadísticas sobre tareas de proyecto/oportunidad +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Tarea asignada. Debería poder introducir tiempos en esta tarea. IdTaskTime=Id YouCanCompleteRef=Si desea completar la referencia con alguna información (para usarlo como filtros de búsqueda), se recomienda añadir un carácter - para separarlo, la numeración automática seguirá funcionando correctamente para los próximos proyectos. Por ejemplo %s-ABC. diff --git a/htdocs/langs/es_ES/recruitment.lang b/htdocs/langs/es_ES/recruitment.lang new file mode 100644 index 00000000000..30961723abb --- /dev/null +++ b/htdocs/langs/es_ES/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Configuraciones +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Acerca de +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/es_ES/stocks.lang b/htdocs/langs/es_ES/stocks.lang index 5e6c825c1ac..d496387ada5 100644 --- a/htdocs/langs/es_ES/stocks.lang +++ b/htdocs/langs/es_ES/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Eliminar envío Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks por lotes/serie @@ -95,14 +95,16 @@ RealStock=Stock real RealStockDesc=El stock físico o real es la stock que tiene actualmente en sus almacenes. RealStockWillAutomaticallyWhen=El stock real cambiará automáticamente de acuerdo con esta regla (según configuración del módulo de stock): VirtualStock=Stock virtual -VirtualStockDesc=El stock virtual es el stock que obtendrá una vez que todas las acciones pendientes que afecten a las existencias serán cerradas (pedidos a proveedor del proveedor recibidos, pedidos de clientes enviados, ...) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id. almacén DescWareHouse=Descripción almacén LieuWareHouse=Localización almacén WarehousesAndProducts=Almacenes y productos WarehousesAndProductsBatchDetail=Almacenes y productos (con detalle por lote/serie) -AverageUnitPricePMPShort=Precio medio ponderado (PMP) -AverageUnitPricePMP=Precio Medio Ponderado (PMP) de adquisición +AverageUnitPricePMPShort=Valor (PMP) +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Precio de venta unitario EstimatedStockValueSellShort=Valor de venta EstimatedStockValueSell=Valor de venta @@ -141,7 +143,7 @@ Replenishments=Reaprovisionamiento NbOfProductBeforePeriod=Cantidad del producto %s en stock antes del periodo seleccionado (< %s) NbOfProductAfterPeriod=Cantidad del producto %s en stock después del periodo seleccionado (> %s) MassMovement=Movimientos en masa -SelectProductInAndOutWareHouse=Selecccione un producto, una cantidad, un almacén origen y un almacén destino, seguidamente haga clic "%s". Una vez seleccionados todos los movimientos, haga clic en "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Registrar transferencia ReceivingForSameOrder=Recepciones de este pedido StockMovementRecorded=Movimiento de stock registrado @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Mostrar el árbol completo del almacén en la ventana emergen StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/es_ES/suppliers.lang b/htdocs/langs/es_ES/suppliers.lang index 1b70614dd94..f0577abc0f4 100644 --- a/htdocs/langs/es_ES/suppliers.lang +++ b/htdocs/langs/es_ES/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Mala calidad ReputationForThisProduct=Reputación BuyerName=Nombre del comprador AllProductServicePrices=Todos los precios de producto / servicio -AllProductReferencesOfSupplier=Todos los precios de producto / servicio del proveedor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Precios de proveedores diff --git a/htdocs/langs/es_ES/ticket.lang b/htdocs/langs/es_ES/ticket.lang index 6b941a656be..ccc27036015 100644 --- a/htdocs/langs/es_ES/ticket.lang +++ b/htdocs/langs/es_ES/ticket.lang @@ -72,7 +72,6 @@ Deleted=Eliminado # Dict Type=Tasa -Category=Código analítico Severity=Gravedad # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Asignar automáticamente al usuario que creó el ticket TicketsAutoAssignTicketHelp=Al crear un ticket, el usuario puede asignarse automáticamente al ticket. TicketNumberingModules=Módulo de numeración de tickets TicketNotifyTiersAtCreation=Notificar a los terceros en la creación -TicketGroup=Grupo TicketsDisableCustomerEmail=Desactivar siempre los e-mails al crear tickets desde la interfaz pública TicketsPublicNotificationNewMessage=Enviar e-mail(s) cuando se añade un nuevo mensaje TicketsPublicNotificationNewMessageHelp=Enviar e-mail(s) cuando se añade un nuevo mensaje desde la interfaz pública (al usuario asignado o al e-mail de notificaciones (actualización) y o el e-mail de notificaciones a) @@ -162,7 +160,7 @@ CreatedBy=Creado por NewTicket=Nuevo ticket SubjectAnswerToTicket=Respuesta TicketTypeRequest=Tipo de solicitud -TicketCategory=Código analítico +TicketCategory=Grupo SeeTicket=Ver ticket TicketMarkedAsRead=El ticket ha sido marcado como leído TicketReadOn=Leído el diff --git a/htdocs/langs/es_ES/users.lang b/htdocs/langs/es_ES/users.lang index fa387b382d7..900c65e6201 100644 --- a/htdocs/langs/es_ES/users.lang +++ b/htdocs/langs/es_ES/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Desactivado en modo mantenimiento UserAccountancyCode=Código contable usuario UserLogoff=Usuario desconectado UserLogged=Usuario conectado +DateOfEmployment=Employment date DateEmployment=Fecha de inicio de empleo DateEmploymentEnd=Fecha de finalización de empleo CantDisableYourself=No puede deshabilitar su propio registro de usuario @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Forzar validador de solicitud de días libres ValidatorIsSupervisorByDefault=Por defecto, el validador es el supervisor del usuario. Mantener vacío para mantener este comportamiento. UserPersonalEmail=Email personal UserPersonalMobile=Teléfono móvil personal +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/es_ES/withdrawals.lang b/htdocs/langs/es_ES/withdrawals.lang index 8ae4288b200..b2e4eeb7439 100644 --- a/htdocs/langs/es_ES/withdrawals.lang +++ b/htdocs/langs/es_ES/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Órdenes de transferencia bancaria PaymentByBankTransferLines=Líneas de orden de transferencia bancaria WithdrawalsReceipts=Domiciliaciones WithdrawalReceipt=Domiciliación -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Órdenes de transferencia bancaria BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Últimas %s órdenes de transferencia bancaria LastWithdrawalReceipts=Últimas %s domiciliaciones @@ -63,7 +63,9 @@ InvoiceRefused=Factura rechazada (Cargar los gastos al cliente) StatusDebitCredit=Estado de débito/crédito StatusWaiting=En espera StatusTrans=Enviada +StatusDebited=Debited StatusCredited=Abonada +StatusPaid=Tratada StatusRefused=Devuelta StatusMotif0=No especificado StatusMotif1=Provisión insuficiente @@ -77,13 +79,13 @@ StatusMotif8=Otro motivo CreateForSepaFRST=Domiciliar (SEPA FRST) CreateForSepaRCUR=Domiciliar (SEPA RCUR) CreateAll=Domiciliar todas -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Sólo oficina CreateBanque=Sólo banco OrderWaiting=En espera de proceso -NotifyTransmision=Envío de domiciliación -NotifyCredit=Abono de domiciliación +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Número Nacional del Emisor WithBankUsingRIB=Para las cuentas bancarias que utilizan CCC WithBankUsingBANBIC=Para las cuentas bancarias que utilizan el código BAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Abonada el WithdrawalFileNotCapable=No es posible generar el fichero bancario de domiciliación para el país %s (El país no está soportado) ShowWithdraw=Mostrar domiciliación IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Sin embargo, si la factura tiene pendiente algún pago por domiciliación no procesado, no será marcada como pagada para permitir la gestión de la domiciliación. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Archivo de la domiciliación +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Clasificar como "Archivo enviado" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Estadísticas por estados de líneas @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Tipo de pago ModeRECUR=Pago recurrente ModeFRST=Pago único PleaseCheckOne=Escoja solamente uno +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Domiciliación %s creada AmountRequested=Importe solicitado SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Importe: %s
    Método: %s
    Fecha: %s InfoRejectSubject=Domiciliación devuelta InfoRejectMessage=Buenos días:

    la domiciliación de la factura %s por cuenta de la empresa %s, con un importe de %s ha sido devuelta por el banco.

    --
    %s ModeWarning=No se ha establecido la opción de modo real, nos detendremos después de esta simulación +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/es_ES/workflow.lang b/htdocs/langs/es_ES/workflow.lang index 3eded0b5314..b5f9ba0ffd8 100644 --- a/htdocs/langs/es_ES/workflow.lang +++ b/htdocs/langs/es_ES/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificar automáticamente el pedi # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificar automáticamente el presupuestos de proveedor como facturado cuando la factura se valide (y si el importe de la factura sea la misma que el total del presupuesto) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificar automáticamente el pedido a proveedor como facturado cuando la factura se valide (y si el importe de la factura sea la misma que el total del pedido enlazado) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Creación automática AutomaticClassification=Clasificación automática diff --git a/htdocs/langs/es_ES/zapier.lang b/htdocs/langs/es_ES/zapier.lang index 6b28c81832e..0a2286c8401 100644 --- a/htdocs/langs/es_ES/zapier.lang +++ b/htdocs/langs/es_ES/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier para el módulo Dolibarr # Admin page # ZapierForDolibarrSetup = Configuración de Zapier para Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/es_GT/main.lang b/htdocs/langs/es_GT/main.lang index 0f9be27b22f..2e691473326 100644 --- a/htdocs/langs/es_GT/main.lang +++ b/htdocs/langs/es_GT/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_HN/main.lang b/htdocs/langs/es_HN/main.lang index 7579f1f4693..0d6b013ca18 100644 --- a/htdocs/langs/es_HN/main.lang +++ b/htdocs/langs/es_HN/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_MX/admin.lang b/htdocs/langs/es_MX/admin.lang index 532e8a55edc..574d1db4a09 100644 --- a/htdocs/langs/es_MX/admin.lang +++ b/htdocs/langs/es_MX/admin.lang @@ -159,6 +159,7 @@ DOLISTOREdescriptionLong=En vez de cambiar al sitio %s . DoliStoreDesc=DoliStore, el lugar oficial para módulos externos Dolibarr ERP / CRM @@ -228,12 +229,12 @@ Module30Name=Facturas Module40Name=Vendedores DictionaryAccountancyJournal=Diarios de contabilidad DictionarySocialNetworks=Redes Sociales -DictionaryProspectStatus=Estatus del cliente potencial Upgrade=Actualizar LDAPFieldFirstName=Nombre(s) AGENDA_SHOW_LINKED_OBJECT=Mostrar objeto vinculado en la vista de agenda ConfFileMustContainCustom=Instalar o construir un módulo externo desde la aplicación necesita guardar los archivos del módulo en el directorio %s . Para que este directorio sea procesado por Dolibarr, debe configurar su conf/conf.php para agregar las 2 líneas de directiva: $dolibarr_main_url_root_alt='/custom';
    $dolibarr_main_document_root_alt='%s/custom'; MailToSendProposal=Propuestas de clientes MailToSendInvoice=Facturas de clientes +MailToSendSupplierOrder=Ordenes de compra OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. diff --git a/htdocs/langs/es_MX/agenda.lang b/htdocs/langs/es_MX/agenda.lang index aa8f360dcfd..285a00342d7 100644 --- a/htdocs/langs/es_MX/agenda.lang +++ b/htdocs/langs/es_MX/agenda.lang @@ -2,7 +2,6 @@ ActionsOwnedBy=Evento propiedad de Event=Evento ListOfActions=Lista de eventos -ToUserOfGroup=A cualquier usuario del grupo EventOnFullDay=Evento de todo el día(s) MenuToDoActions=Todos los eventos incompletos MenuDoneActions=Todos los eventos finalizados diff --git a/htdocs/langs/es_MX/boxes.lang b/htdocs/langs/es_MX/boxes.lang index 4ca95308953..681fe36e07c 100644 --- a/htdocs/langs/es_MX/boxes.lang +++ b/htdocs/langs/es_MX/boxes.lang @@ -9,5 +9,6 @@ BoxOldestUnpaidSupplierBills=Facturas de proveedores sin pagar más antiguas BoxLastProposals=Últimas propuestas comerciales BoxLastCustomerOrders=Últimos pedidos de venta BoxCurrentAccounts=Saldo de cuentas abiertas +BoxSuppliersOrdersPerMonth=Órdenes a proveedor por mes BoxTitleLastModifiedPropals=Últimas %s cotizaciones modificadas ForProposals=Propuestas diff --git a/htdocs/langs/es_MX/main.lang b/htdocs/langs/es_MX/main.lang index 7405807c6c8..4d0eb80f605 100644 --- a/htdocs/langs/es_MX/main.lang +++ b/htdocs/langs/es_MX/main.lang @@ -20,7 +20,6 @@ FormatDateHourSecShort=%I:%M:%S %p %d/%m/%Y FormatDateHourTextShort=%I:%M %p, %d %b %Y FormatDateHourText=%I:%M %p, %d %B %Y AvailableVariables=Variables de sustitución disponibles -EmptySearchString=Enter non empty search criterias NoRecordFound=Ningún registro fue encontrado NoError=No hay error ErrorFieldFormat=El campo '%s' contiene un valor incorrecto @@ -119,6 +118,7 @@ RemoveFilter=Remover filtro ChartGenerated=Gráfico generado GeneratedOn=Generado en %s NotYetAvailable=No disponible aún +Category=Tag/Categoría ChangedBy=Cambiado por ResultKo=Fallo Reporting=Informes @@ -267,6 +267,7 @@ ShortThursday=MJ Select2NotFound=No se encontró ningún resultado Select2Enter=Entrar SearchIntoCustomerInvoices=Facturas de clientes +SearchIntoSupplierOrders=Ordenes de compra SearchIntoCustomerProposals=Propuestas comerciales SearchIntoExpenseReports=Reporte de gastos AssignedTo=Asignado a diff --git a/htdocs/langs/es_MX/members.lang b/htdocs/langs/es_MX/members.lang index 585f0369074..92dcc885dd1 100644 --- a/htdocs/langs/es_MX/members.lang +++ b/htdocs/langs/es_MX/members.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - members +MemberStatusDraft=Borrador (necesita ser validado) SubscriptionLate=Tarde SubscriptionPayment=Pago de suscripción diff --git a/htdocs/langs/es_MX/other.lang b/htdocs/langs/es_MX/other.lang index ac900b15595..6de5307f29a 100644 --- a/htdocs/langs/es_MX/other.lang +++ b/htdocs/langs/es_MX/other.lang @@ -2,3 +2,4 @@ Tools=Herramientas TMenuTools=Herramientas Notify_COMPANY_CREATE=Tercero creado +SeeModuleSetup=Ver configuración del módulo %s diff --git a/htdocs/langs/es_MX/recruitment.lang b/htdocs/langs/es_MX/recruitment.lang new file mode 100644 index 00000000000..e6b91c78167 --- /dev/null +++ b/htdocs/langs/es_MX/recruitment.lang @@ -0,0 +1,14 @@ +# Dolibarr language file - Source file is en_US - recruitment +ModuleRecruitmentName =Reclutamiento +ModuleRecruitmentDesc =Gestione y de seguimiento a campañas de reclutamiento para nuevos puestos de trabajo. +RecruitmentSetup =Configuración de reclutamiento +RecruitmentArea=Área de reclutamiento +RecruitmentAbout =Sobre el reclutamiento +RecruitmentAboutPage =Página acerca de reclutamiento +NbOfEmployeesExpected=Número esperado de empleados +JobLabel=Etiqueta del puesto de trabajo +WorkPlace=Lugar de trabajo +DateExpected=Fecha esperada +FutureManager=Futuro gerente +ResponsibleOfRecruitement=Responsable de reclutamiento +IfJobIsLocatedAtAPartner=Si el trabajo se encuentra en un el lugar de un asociado diff --git a/htdocs/langs/es_MX/withdrawals.lang b/htdocs/langs/es_MX/withdrawals.lang index bfed27b108a..52a15f0786e 100644 --- a/htdocs/langs/es_MX/withdrawals.lang +++ b/htdocs/langs/es_MX/withdrawals.lang @@ -1,4 +1,5 @@ # Dolibarr language file - Source file is en_US - withdrawals WithdrawalReceipt=Orden de domiciliación bancaria Rejects=Rechazos +StatusPaid=Pagado StatusRefused=Rechazado diff --git a/htdocs/langs/es_PA/main.lang b/htdocs/langs/es_PA/main.lang index bcdd3f914eb..1602d6a7ffa 100644 --- a/htdocs/langs/es_PA/main.lang +++ b/htdocs/langs/es_PA/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_PE/main.lang b/htdocs/langs/es_PE/main.lang index 7140f0a388b..541a023bb7c 100644 --- a/htdocs/langs/es_PE/main.lang +++ b/htdocs/langs/es_PE/main.lang @@ -19,9 +19,14 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias +DatabaseConnection=Conexión a Base de Datos +NoTemplateDefined=No hay plantilla disponible para este tipo de email +AvailableVariables=Variables de sustitución disponible +EmptySearchString=No ingrese criterios de búsqueda vacíos +NoRecordFound=No se encontró registro +NoRecordDeleted=No se borró el registro NoError=Sin error -ErrorNoVATRateDefinedForSellerCountry=Error, no hay tipos de IGV definidos para el país '%s'. +ErrorNoVATRateDefinedForSellerCountry=Error, no hay tasas de IGV definidas para el país '%s'. NotClosed=No se ha cerrado AddLink=Añadir enlace RemoveLink=Remover enlace @@ -31,12 +36,12 @@ Delete=Borrar Remove=Remover Resiliate=Terminar Cancel=Cancelar -SaveAndStay=Grabar y permanecer -SaveAndNew=Grabar y nuevo +Save=Guardar +SaveAs=Guardar Como TestConnection=Prueba de conexión ToClone=Duplicar -ConfirmClone=Seleccione los datos que desea clonar: -NoCloneOptionsSpecified=No ha definido los datos a clonar. +ConfirmClone=Seleccione los datos que desea duplicar: +NoCloneOptionsSpecified=No ha definido los datos a duplicar. Run=Ejecutar Show=Mostrar Hide=Ocultar @@ -46,7 +51,7 @@ Upload=Subir AmountVAT=Importe impuesto MulticurrencyAmountVAT=Importe impuesto, moneda original TotalVAT=Total impuesto -TTC=IGV incluido +TTC=Inc. impuesto INCVATONLY=Inc. IGV VAT=IGV VATs=Impuesto a las ventas @@ -56,10 +61,10 @@ LT2=Impuesto 3 LT2Type=Tipo de impuesto 3 VATRate=Tasa Impuesto VATCode=Código de la Tasa del Impuesto -Drafts=Borrador Opened=Abrir SearchIntoMO=Órdenes de Fabricación SearchIntoCustomerInvoices=Facturas de Clientes ContactDefault_invoice_supplier=Factura de Proveedor +ContactDefault_order_supplier=Orden de Compra ContactDefault_propal=Cotización ContactDefault_supplier_proposal=Cotización de Proveedor diff --git a/htdocs/langs/es_PY/main.lang b/htdocs/langs/es_PY/main.lang index bcdd3f914eb..1602d6a7ffa 100644 --- a/htdocs/langs/es_PY/main.lang +++ b/htdocs/langs/es_PY/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_US/main.lang b/htdocs/langs/es_US/main.lang index 0f9be27b22f..2e691473326 100644 --- a/htdocs/langs/es_US/main.lang +++ b/htdocs/langs/es_US/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_UY/main.lang b/htdocs/langs/es_UY/main.lang index bcdd3f914eb..1602d6a7ffa 100644 --- a/htdocs/langs/es_UY/main.lang +++ b/htdocs/langs/es_UY/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/es_VE/admin.lang b/htdocs/langs/es_VE/admin.lang index b3e98598310..74b465f966a 100644 --- a/htdocs/langs/es_VE/admin.lang +++ b/htdocs/langs/es_VE/admin.lang @@ -9,7 +9,6 @@ Permission255=Eliminar o desactivar otros usuarios Permission256=Consultar sus permisos Permission1321=Exportar facturas a clientes, atributos y cobros Permission20003=Eliminar peticiones de días libres retribuidos -DictionaryProspectStatus=Estado prospección ExtraFields=Atributos adicionales ExtraFieldsLines=Atributos adicionales (líneas) ExtraFieldsSupplierOrdersLines=Atributos complementarios (líneas de pedido) diff --git a/htdocs/langs/es_VE/main.lang b/htdocs/langs/es_VE/main.lang index 1785d537814..6db9ce60111 100644 --- a/htdocs/langs/es_VE/main.lang +++ b/htdocs/langs/es_VE/main.lang @@ -19,7 +19,6 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias DateEnd=Fecha finalización AmountLT1ES=Importe de retención AmountLT2ES=Importe ISLR @@ -27,6 +26,7 @@ TotalLT1ES=Total retenido TotalLT2ES=Total ISLR LT1ES=Retención LT2ES=ISLR +FromDate=Emisor FromLocation=Emisor Opened=Abierta MonthVeryShort02=V diff --git a/htdocs/langs/es_VE/members.lang b/htdocs/langs/es_VE/members.lang index 2140c44adb9..9509a94e6af 100644 --- a/htdocs/langs/es_VE/members.lang +++ b/htdocs/langs/es_VE/members.lang @@ -1,3 +1,4 @@ # Dolibarr language file - Source file is en_US - members MemberStatusDraftShort=A validar MemberStatusActiveShort=Validada +MemberStatusNoSubscriptionShort=Validada diff --git a/htdocs/langs/es_VE/withdrawals.lang b/htdocs/langs/es_VE/withdrawals.lang new file mode 100644 index 00000000000..fb9616a1788 --- /dev/null +++ b/htdocs/langs/es_VE/withdrawals.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - withdrawals +StatusPaid=Pagada diff --git a/htdocs/langs/et_EE/accountancy.lang b/htdocs/langs/et_EE/accountancy.lang index f06ea3b1334..e6ecde693aa 100644 --- a/htdocs/langs/et_EE/accountancy.lang +++ b/htdocs/langs/et_EE/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/et_EE/admin.lang b/htdocs/langs/et_EE/admin.lang index 90178743010..9a9f6dc2925 100644 --- a/htdocs/langs/et_EE/admin.lang +++ b/htdocs/langs/et_EE/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=Kasutaja e-post CompanyEmail=Ettevõtte e-post FeatureNotAvailableOnLinux=Funktsionaalsus pole kasutatav Unixi laadsel süsteemil. Kontrolli oma sendmail programmi seadistust. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Moodulite seadistamine ModulesSetup=Moodulid / rakenduse seadistamine ModuleFamilyBase=Süsteem @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Selle funktsiooni kasutamiseks tuleb kõigepealt aktive SecurityToken=URLide kaitsmiseks kasutatav võti NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=PDFi globaalsed seaded. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Peida kõik müügimaksu / käibemaksuga seotud andmed PDFRulesForSalesTax=Müügimaksu / käibemaksu reeglid PDFLocaltax=%s reeglid -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Muuda hindadel, mille baasväärtus on defineeritud kui MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Sõna +String1Line=String (1 line) TextLong=Pikk tekst +TextLongNLines=Long text (n lines) HtmlText=HTML-tekst Int=Täisarv Float=Ujukomaarv @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Vöötkoodid Module55Desc=Vöötkoodide haldamine Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDial süsteemiga (Asterisk jne) integreerimine Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Teenuste loomine/muutmine Permission534=Teenuste kustutamine Permission536=Peidetud teenuste vaatamine/haldamine Permission538=Teenuste eksport +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Annetuste vaatamine Permission702=Annetuste loomine/muutmine Permission703=Annetuste kustutamine @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Laojääkide vaatamine Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Dokumendikaustade seadistamine Permission2801=FTP kliendi kasutamine lugemisrežiimis (ainult sirvimine ja alla laadimine) Permission2802=FTP kliendi kasutamine kirjutusrežiimis (failide kustutamine või üles laadimine) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Huvilise potentsiaal +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Piirkonnad DictionaryCountry=Riigid @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Ühikud DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Sotsiaalvõrgud -DictionaryProspectStatus=Huvilise staatus +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Vasakus menüüs on alati otsingu vorm DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Pead vähemalt 1 mooduli sisse lülitama ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Suviti 'jah' @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Vaikimisi avatav sakk päevakava avamisel +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial mooduli seadistamine ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Tarnija arved MailToSendContract=Lepingud +MailToSendReception=Receptions MailToThirdparty=Kolmandad isikud MailToMember=Liikmed MailToUser=Kasutajad @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Postiindeks MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/et_EE/agenda.lang b/htdocs/langs/et_EE/agenda.lang index 28eae07f9f7..98053cf19ef 100644 --- a/htdocs/langs/et_EE/agenda.lang +++ b/htdocs/langs/et_EE/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Tegevuste arv ListOfActions=Tegevuste nimekiri EventReports=Tegevuste aruanded Location=Asukoht -ToUserOfGroup=Iga grupi kasutajale +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Tegevus kestab kogu/kõik päeva(d) MenuToDoActions=Kõik lõpetamata tegevused MenuDoneActions=Kõik lõpetatud tegevused @@ -86,6 +86,8 @@ ProposalDeleted=Pakkumine kustutatud OrderDeleted=Tellimus kustutatud InvoiceDeleted=Arve kustutatud DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Toode %s loodud PRODUCT_MODIFYInDolibarr=Toote %s muudetud PRODUCT_DELETEInDolibarr=Toode %s kustutatud @@ -158,3 +160,9 @@ DateStartPlusOne=Kuupäeva algus + 1 tund SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/et_EE/boxes.lang b/htdocs/langs/et_EE/boxes.lang index cdf3353df47..7c9fca21f40 100644 --- a/htdocs/langs/et_EE/boxes.lang +++ b/htdocs/langs/et_EE/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Müügiarved ForCustomersOrders=Müügiarved ForProposals=Pakkumised @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Raamatupidamine diff --git a/htdocs/langs/et_EE/cashdesk.lang b/htdocs/langs/et_EE/cashdesk.lang index bfa14297ae6..ce7e0354ab2 100644 --- a/htdocs/langs/et_EE/cashdesk.lang +++ b/htdocs/langs/et_EE/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/et_EE/compta.lang b/htdocs/langs/et_EE/compta.lang index 51037afab90..5be099381a7 100644 --- a/htdocs/langs/et_EE/compta.lang +++ b/htdocs/langs/et_EE/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Erikulud @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/et_EE/contracts.lang b/htdocs/langs/et_EE/contracts.lang index 11e7c2a2c50..ff7bc521727 100644 --- a/htdocs/langs/et_EE/contracts.lang +++ b/htdocs/langs/et_EE/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Aktiivsed teenused MenuExpiredServices=Aegunud teenused MenuClosedServices=Suletud teenused NewContract=Uus leping -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Loo leping DeleteAContract=Kustuta leping ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/et_EE/errors.lang b/htdocs/langs/et_EE/errors.lang index cea8deb3421..11b82753a43 100644 --- a/htdocs/langs/et_EE/errors.lang +++ b/htdocs/langs/et_EE/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Uus väärtus ei saa olla vanaga võrdne ErrorFailedToValidatePasswordReset=Parooli uuesti initsialiseerimine ebaõnnestus. Võib-olla on uuesti initsialiseerimine juba tehtud (antud linki saab kasutada vaid ühe korra). Kui ei, siis proovi uuesti initsialiseerida. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Kontakti lisamine ebaõnnestus -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Makseviis on seatud tüübile %s, kuid Arved mooduli seadistamine ei ole täielik ning selle makseviisi jaoks näidatav info on määratlemata. ErrorPHPNeedModule=Viga: selle võimaluse kasutamiseks peab PHPs olema võimaldatud moodul %s. ErrorOpenIDSetupNotComplete=Dolibarri seadistusfail lubab OpenIDga autentimist, ent konstandis %s ei ole OpenID teenuse URL määratletud @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/et_EE/languages.lang b/htdocs/langs/et_EE/languages.lang index 309fb61d5e0..b352df45118 100644 --- a/htdocs/langs/et_EE/languages.lang +++ b/htdocs/langs/et_EE/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Araabia Language_ar_EG=Arabic (Egypt) Language_ar_SA=Araabia +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgaaria Language_bs_BA=Bosnia Language_ca_ES=Katalaani @@ -20,6 +23,7 @@ Language_en_GB=Inglise (Ühendkuningriigid) Language_en_IN=Inglise (India) Language_en_NZ=Inglise (Uus-Meremaa) Language_en_SA=Inglise (Saudi Araabia) +Language_en_SG=English (Singapore) Language_en_US=Inglise (Ameerika Ühendriigid) Language_en_ZA=Inglise (Lõuna-Aafrika) Language_es_ES=Hispaania @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Hispaania (Honduras) Language_es_MX=Hispaania (Mehhiko) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Hispaania (Paraguay) Language_es_PE=Hispaania (Peruu) Language_es_PR=Hispaania (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Eesti Language_eu_ES=Baski @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Prantsuse (Belgia) Language_fr_CA=Prantsuse (Kanada) Language_fr_CH=Prantsuse (Šveits) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Prantsuse +Language_fr_GA=French (Gabon) Language_fr_NC=Prantsuse (Uus-Kaledoonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Heebrea +Language_hi_IN=Hindi (India) Language_hr_HR=Horvaadi Language_hu_HU=Ungari Language_id_ID=Indonesian Language_is_IS=Islandi Language_it_IT=Itaalia +Language_it_CH=Italian (Switzerland) Language_ja_JP=Jaapani Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Läti Language_mk_MK=Makedoonia Language_mn_MN=Mongolian Language_nb_NO=Norra (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Hollandi (Belgia) Language_nl_NL=Dutch Language_pl_PL=Poola @@ -86,4 +100,5 @@ Language_uz_UZ=Usbeki Language_vi_VN=Vietnami Language_zh_CN=Hiina Language_zh_TW=Hiina (traditsiooniline) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/et_EE/mails.lang b/htdocs/langs/et_EE/mails.lang index 3df50cb7057..bd62e283b06 100644 --- a/htdocs/langs/et_EE/mails.lang +++ b/htdocs/langs/et_EE/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Informatsioon ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/et_EE/main.lang b/htdocs/langs/et_EE/main.lang index c1e0181e3f5..c4b68666af8 100644 --- a/htdocs/langs/et_EE/main.lang +++ b/htdocs/langs/et_EE/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Summa AmountInvoice=Arve summa AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Makse summa AmountHTShort=Amount (excl.) AmountTTCShort=Summa (koos km-ga) @@ -485,6 +485,7 @@ Categories=Sildid/kategooriad Category=Silt/kategooria By=Isik From=Kellelt +FromDate=Kellelt FromLocation=Kellelt to=kellele To=kellele @@ -687,6 +688,7 @@ Method=Meetod Receive=Võta vastu CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Osaline TotalWoman=Täielik NeverReceived=Pole vastu võetud @@ -703,6 +705,7 @@ MenuECM=Dokumendid MenuAWStats=AWStats MenuMembers=Liikmed MenuAgendaGoogle=Google päevakava +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr piir (menüü Kodu->Seaded->Turvalisus): %s Kb, PHP piir: %s Kb NoFileFound=Antud kausta pole dokumente salvestatud CurrentUserLanguage=Aktiivne keel @@ -725,7 +728,7 @@ Page=Lehekülg Notes=Märkused AddNewLine=Lisa uus rida AddFile=Lisa fail -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Klooni objekt selle põhiliste omadustega ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=N ShortFriday=R ShortSaturday=L ShortSunday=P +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informatsioon +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/et_EE/members.lang b/htdocs/langs/et_EE/members.lang index 7734fa695b5..3df1d30b7d9 100644 --- a/htdocs/langs/et_EE/members.lang +++ b/htdocs/langs/et_EE/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Liikmete mustand MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Kinnitatud +SubscriptionNotNeeded=No subscription needed NewCotisation=Uus annetus PaymentSubscription=Uus annetuse makse SubscriptionEndDate=Liikmemaksu lõppkuupäev @@ -78,7 +81,7 @@ DeleteType=Kustuta VoteAllowed=Hääletamine lubatud Physical=Füüsiline Moral=Moraalne -MorPhy=Moraalne/füüsiline +MorPhy=Loomus Reenable=Luba uuesti ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/et_EE/mrp.lang b/htdocs/langs/et_EE/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/et_EE/mrp.lang +++ b/htdocs/langs/et_EE/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/et_EE/other.lang b/htdocs/langs/et_EE/other.lang index 782d3bd2cf3..a1aa2f9a67b 100644 --- a/htdocs/langs/et_EE/other.lang +++ b/htdocs/langs/et_EE/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/et_EE/products.lang b/htdocs/langs/et_EE/products.lang index 28705cf475e..74cf8f08516 100644 --- a/htdocs/langs/et_EE/products.lang +++ b/htdocs/langs/et_EE/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Määra vöötkoodi tüüp BarcodeValue=Vöötkoodi väärtus NoteNotVisibleOnBill=Märkus (ei ole nähtav arvetel, pakkumistel jne) ServiceLimitedDuration=Kui toode on piiratud kestusega teenus: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Hindasid DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Päritolumaa Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Ühik p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Uus atribuut NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/et_EE/projects.lang b/htdocs/langs/et_EE/projects.lang index 4b9d9c562c8..d9f635dd8a5 100644 --- a/htdocs/langs/et_EE/projects.lang +++ b/htdocs/langs/et_EE/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Toetaja TypeContact_project_task_external_TASKCONTRIBUTOR=Toetaja SelectElement=Vali element AddElement=Seosta elemendiga +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/et_EE/recruitment.lang b/htdocs/langs/et_EE/recruitment.lang new file mode 100644 index 00000000000..02a90af05dc --- /dev/null +++ b/htdocs/langs/et_EE/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Seaded +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Dolibarri kohta +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/et_EE/stocks.lang b/htdocs/langs/et_EE/stocks.lang index 58b8cd18969..20dd3c22617 100644 --- a/htdocs/langs/et_EE/stocks.lang +++ b/htdocs/langs/et_EE/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Kustuta saatmine Stock=Laojääk Stocks=Laojäägid MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Reaalne laojääk RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtuaalne laojääk -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Lao ID DescWareHouse=Lao kirjeldus LieuWareHouse=Lao lokaliseerimine WarehousesAndProducts=Laod ja tooted WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Kaalutud keskmine sisendhind -AverageUnitPricePMP=Kaalutud keskmine sisendhind +AverageUnitPricePMPShort=Kaalutud keskmine hind +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Ühiku müügihind EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Värskendamised NbOfProductBeforePeriod=Toote %s laojääk enne valitud perioodi (< %s) NbOfProductAfterPeriod=Toote %s laojääk pärast valitud perioodi (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Vali toode, kogus, lähteladu ja sihtladu, siis klõpsa "%s". Kui see on kõigi soovitud liikumiste jaoks tehtud, klõpsa "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/et_EE/suppliers.lang b/htdocs/langs/et_EE/suppliers.lang index 715be4d8897..86a9e774975 100644 --- a/htdocs/langs/et_EE/suppliers.lang +++ b/htdocs/langs/et_EE/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/et_EE/ticket.lang b/htdocs/langs/et_EE/ticket.lang index 77b37fec903..6ebd80a96c2 100644 --- a/htdocs/langs/et_EE/ticket.lang +++ b/htdocs/langs/et_EE/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Liik -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Rühm TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Rühm SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/et_EE/users.lang b/htdocs/langs/et_EE/users.lang index df908040ddf..8966333a09b 100644 --- a/htdocs/langs/et_EE/users.lang +++ b/htdocs/langs/et_EE/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Loodav kasutaja on väline kasutaja (kuna on seotud mõne IdPhoneCaller=Helistaja ID NewUserCreated=Loodi kasutaja %s NewUserPassword=Muudeti kasutaja %s parool +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Muudeti kasutajat %s UserDisabled=Keelati kasutaja %s UserEnabled=Aktiveeriti kasutaja %s @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/et_EE/withdrawals.lang b/htdocs/langs/et_EE/withdrawals.lang index 7a3e9aecfbf..f1edf12b9b0 100644 --- a/htdocs/langs/et_EE/withdrawals.lang +++ b/htdocs/langs/et_EE/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Ootel StatusTrans=Saadetud +StatusDebited=Debited StatusCredited=Krediteeritud +StatusPaid=Makstud StatusRefused=Keeldutud StatusMotif0=Määramata StatusMotif1=Pole piisavalt raha @@ -77,13 +79,13 @@ StatusMotif8=Muu põhjus CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Ainult kontor CreateBanque=Ainult pank OrderWaiting=Ootab töötlemist -NotifyTransmision=Väljamakse ülekandmine -NotifyCredit=Väljamakse kreedit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=Pankadele, mis kasutavad RIB WithBankUsingBANBIC=Pankadele, mis kasutavad IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Krediteeri WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Väljamaksete fail +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Märgi staatuseks 'Fail saadetud' ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Summa: %s
    Meetod: %s
    Kuupäev: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Tootmisrežiim ei olnud seadistatud, pärast seda peatatakse simulatsioon +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/et_EE/workflow.lang b/htdocs/langs/et_EE/workflow.lang index 92e41fafbbd..03c55985b03 100644 --- a/htdocs/langs/et_EE/workflow.lang +++ b/htdocs/langs/et_EE/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Töövoo mooduli seaded -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/et_EE/zapier.lang b/htdocs/langs/et_EE/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/et_EE/zapier.lang +++ b/htdocs/langs/et_EE/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/eu_ES/accountancy.lang b/htdocs/langs/eu_ES/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/eu_ES/accountancy.lang +++ b/htdocs/langs/eu_ES/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/eu_ES/admin.lang b/htdocs/langs/eu_ES/admin.lang index 016c1d3c39d..d667dfe0be5 100644 --- a/htdocs/langs/eu_ES/admin.lang +++ b/htdocs/langs/eu_ES/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Moduluaren konfigurazioa ModulesSetup=Modules/Application setup ModuleFamilyBase=Sistema @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Katea +String1Line=String (1 line) TextLong=Testu luzea +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Zenbaki osoa Float=Zenbaki hamartarra @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barra-kodeak Module55Desc=Barra-kodeak kudeatzea Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Dokumentuen karpetak konfiguratzea Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Proiektuaren egoera +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Kontratuak +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Kideak MailToUser=Erabiltzaileak @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/eu_ES/agenda.lang b/htdocs/langs/eu_ES/agenda.lang index c62f7b94ae5..74d5dec55a8 100644 --- a/htdocs/langs/eu_ES/agenda.lang +++ b/htdocs/langs/eu_ES/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Gertaera kopurua ListOfActions=Gertaeren zerrenda EventReports=Event reports Location=Kokapena -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/eu_ES/boxes.lang b/htdocs/langs/eu_ES/boxes.lang index 76c9a54a5b4..ebe7ba3d683 100644 --- a/htdocs/langs/eu_ES/boxes.lang +++ b/htdocs/langs/eu_ES/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposamenak @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/eu_ES/cashdesk.lang b/htdocs/langs/eu_ES/cashdesk.lang index 1737f3e2dc4..c671c19b97e 100644 --- a/htdocs/langs/eu_ES/cashdesk.lang +++ b/htdocs/langs/eu_ES/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/eu_ES/compta.lang b/htdocs/langs/eu_ES/compta.lang index 2d8e20c7ec2..9aca33839a6 100644 --- a/htdocs/langs/eu_ES/compta.lang +++ b/htdocs/langs/eu_ES/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/eu_ES/contracts.lang b/htdocs/langs/eu_ES/contracts.lang index a8ae643b3b4..b3d10b340ed 100644 --- a/htdocs/langs/eu_ES/contracts.lang +++ b/htdocs/langs/eu_ES/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/eu_ES/errors.lang b/htdocs/langs/eu_ES/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/eu_ES/errors.lang +++ b/htdocs/langs/eu_ES/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/eu_ES/languages.lang b/htdocs/langs/eu_ES/languages.lang index 85505defff4..aac76345a55 100644 --- a/htdocs/langs/eu_ES/languages.lang +++ b/htdocs/langs/eu_ES/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Katalana @@ -20,6 +23,7 @@ Language_en_GB=Ingelesa (Erresuma Batua) Language_en_IN=Ingelesa (India) Language_en_NZ=Ingelesa (Zelanda Berria) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=Ingelesa (Estatu Batuak) Language_en_ZA=English (South Africa) Language_es_ES=Gaztelania @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Gaztelania (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Euskera @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Frantsesa (Belgika) Language_fr_CA=Frantsesa (Kanada) Language_fr_CH=Frantsea (Suitza) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Frantsesa +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italiera +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/eu_ES/mails.lang b/htdocs/langs/eu_ES/mails.lang index 3c35c12be7a..1f26534ddc7 100644 --- a/htdocs/langs/eu_ES/mails.lang +++ b/htdocs/langs/eu_ES/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Informazioa ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/eu_ES/main.lang b/htdocs/langs/eu_ES/main.lang index b580de42e52..6a5f8a75250 100644 --- a/htdocs/langs/eu_ES/main.lang +++ b/htdocs/langs/eu_ES/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Ordainketaren zenbatekoa AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Kideak MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informazioa +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/eu_ES/members.lang b/htdocs/langs/eu_ES/members.lang index ba7f85e4917..e133e2ae77f 100644 --- a/htdocs/langs/eu_ES/members.lang +++ b/htdocs/langs/eu_ES/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Ezabatu VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/eu_ES/mrp.lang b/htdocs/langs/eu_ES/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/eu_ES/mrp.lang +++ b/htdocs/langs/eu_ES/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/eu_ES/other.lang b/htdocs/langs/eu_ES/other.lang index 305a5b045db..f855300b038 100644 --- a/htdocs/langs/eu_ES/other.lang +++ b/htdocs/langs/eu_ES/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/eu_ES/products.lang b/htdocs/langs/eu_ES/products.lang index d5db31c6366..84be483e557 100644 --- a/htdocs/langs/eu_ES/products.lang +++ b/htdocs/langs/eu_ES/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/eu_ES/projects.lang b/htdocs/langs/eu_ES/projects.lang index 9bcf3461e80..4ec830cce10 100644 --- a/htdocs/langs/eu_ES/projects.lang +++ b/htdocs/langs/eu_ES/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/eu_ES/recruitment.lang b/htdocs/langs/eu_ES/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/eu_ES/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/eu_ES/stocks.lang b/htdocs/langs/eu_ES/stocks.lang index 8b127a429f7..c53f1607dd0 100644 --- a/htdocs/langs/eu_ES/stocks.lang +++ b/htdocs/langs/eu_ES/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stock-ak MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/eu_ES/suppliers.lang b/htdocs/langs/eu_ES/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/eu_ES/suppliers.lang +++ b/htdocs/langs/eu_ES/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/eu_ES/workflow.lang b/htdocs/langs/eu_ES/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/eu_ES/workflow.lang +++ b/htdocs/langs/eu_ES/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/eu_ES/zapier.lang b/htdocs/langs/eu_ES/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/eu_ES/zapier.lang +++ b/htdocs/langs/eu_ES/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/fa_IR/accountancy.lang b/htdocs/langs/fa_IR/accountancy.lang index a156ebf15c9..00e11436d1a 100644 --- a/htdocs/langs/fa_IR/accountancy.lang +++ b/htdocs/langs/fa_IR/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=امکان تغییر تعداد دیگری از صفر BANK_DISABLE_DIRECT_INPUT=غیرفعال کردن ثبت مستقیم تراکنش در حساب بانکی ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=فعال کردن خروجی پیش‌نویس از دفتر ACCOUNTANCY_COMBO_FOR_AUX=فعال کردن فهرست ترکیبی برای حساب وابسته(ممکن است در صورتی که شخص‌سوم‌های زیادی داشته باشید، کند باشد) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=دفتر فروش ACCOUNTING_PURCHASE_JOURNAL=دفتر خرید @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=وفق داده نشده ## Admin +BindingOptions=Binding options ApplyMassCategories=انتساب دست‌جمعی دسته‌بندی AddAccountFromBookKeepingWithNoCategories=حساب فعال هنوز در یک گروه‌ شخصی‌سازی‌شده نیست CategoryDeleted=دسته‌بندی حساب حساب‌داری حذف شد diff --git a/htdocs/langs/fa_IR/admin.lang b/htdocs/langs/fa_IR/admin.lang index e73b0db2aab..71e01680216 100644 --- a/htdocs/langs/fa_IR/admin.lang +++ b/htdocs/langs/fa_IR/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=نشانی پیش‌فرض برای فرستندۀ ر UserEmail=رایانامۀ کاربر CompanyEmail=رایانامۀ شرکت FeatureNotAvailableOnLinux=این قابلیت در سامانه‌های ردۀ یونیکس وجود ندارد. برنامۀ ارسال رایانامۀ محلی خود را آزمایش کنید. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=در صورتی که ترجمۀ این زبان کامل نیست یا شما خطائی سراغ دارید، شما می‌توانید فایل‌های موجود در پوشۀ langs/%s را ویرایش کرده و تغییرات مورد نظر خود را به www.transifex.com/dolibarr-association/dolibarr/ بفرستید. -SubmitTranslationENUS=در صورتی که ترجمۀ این زبان کامل نیست یا شما خطائی سراغ دارید، شما می‌توانید فایل‌های موجود در پوشۀ langs/%s را ویرایش کرده و فایل‌های تغییر کرده را به dolibarr.org/forum یا توسعه دهندگان در github.com/Dolibarr/dolibarr ارسال فرمائید. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=برپاسازی واحد‌ها ModulesSetup=برپاسازی واحد‌ها و برنامه‌ها ModuleFamilyBase=سامانه @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=برای استفاده از این امکان، واح SecurityToken=کلیدواژۀ ایمن‌سازی نشانی‌ها NoSmsEngine=هیچ مدیر ارسال پیامکی وجود ندارد. مدیر ارسال پیامک به همراه توزیع پیش‌فرض نصب نشده است چون به تامین کنندۀ بیرونی وابسته است، اما شما می‌توانید در %s این نیاز را تامین کنید. PDF=PDF -PDFDesc=گزینه‌های عمومی برای تولید PDF -PDFAddressForging=قوانین کادرهای نشانی +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=پنهان کردن همۀ اطلاعات مربوط به مالیات بر فروش و مالیات بر ارزش افزوده PDFRulesForSalesTax=قواعد مالیات‌برارزش‌افزوده و مالیات‌برفروش PDFLocaltax=قواعد %s -HideLocalTaxOnPDF=پنهان کردن نرخ %s در ستون مالیات بر فروش +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=پنهان کردن توضیح محصولات HideRefOnPDF=پنهان کردن شمارۀ مرجع HideDetailsOnPDF=پنهان کردن جزئیات سطور محصولات @@ -408,7 +409,9 @@ PriceBaseTypeToChange=تغییر قیمت‌ها بر پایۀ مقدار مرج MassConvert=اجرای تبدیل دسته‌ای PriceFormatInCurrentLanguage=Price Format In Current Language String=رشته +String1Line=String (1 line) TextLong=متن طولانی +TextLongNLines=Long text (n lines) HtmlText=نوشتۀ HTML Int=عدد صحیح Float=شناور @@ -543,9 +546,9 @@ Module54Desc=مدیریت قراردادها (خدمات یا اشتراک‌ه Module55Name=بارکدها Module55Desc=مدیریت بارکد Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=برداشت‌های مستقیم بانکی -Module57Desc=مدیریت سفارش برداشت‌های مستقیم بانکی. این شامل تولید فایل SEPA برای کشورهای اروپائی است. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=کلیک برای تماس Module58Desc=یکپارچه سازی سیستم ClickToDial (استریسک، ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=ایجاد/ویرایش خدمات Permission534=حذف خدمات Permission536=مشاهده/مدیریت خدمات پنهان Permission538=صادرکردن خدمات +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=خواندن صورت‌حساب‌های مواد Permission651=ایجاد/به‌هنگام سازی صورت‌حساب‌های موا Permission652=حذف صورت‌حساب‌های مواد +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=ملاحظۀ کمک‌های‌مالی Permission702=ایجاد/ویرایش کمک‌های‌مالی Permission703=حذف کمک‌های‌مالی @@ -848,6 +858,8 @@ Permission773=حذف گزارش‌های هزینه Permission774=ملاحظۀ همۀ گزارش‌های هزینه (حتی مربوط به کاربرانی که زیرنظر شما نیستند) Permission775=تائید گزارش‌های هزینه Permission776=پرداخت گزارش‌های هزینه +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=صادرکردن گزارش‌های هزینه Permission1001=ملاحظۀ موجودی Permission1002=ساخت/ویرایش انبار @@ -900,6 +912,7 @@ Permission2515=تنظیم پوشه‌های مستندات Permission2801=استفاده از متقاضی FTP در حالت خواندنی (منحصر به مرور و دریافت) Permission2802=استفاده از متقاضی FTP در حالت نوشتنی (حذف یا ارسال فایل) Permission3200=خواندن روی‌دادهای بایگانی شده و اثرانگشت‌ها +Permission3301=Generate new modules Permission4001=نمایش کارمندان Permission4002=ساخت کارمند Permission4003=حذف کارمند @@ -947,7 +960,8 @@ Permission63003=حذف منابع Permission63004=پیونددادن منابع به روی‌داد جلسه DictionaryCompanyType=انواع شخص‌سوم DictionaryCompanyJuridicalType=موجودیت حقوقی شخص‌سوم -DictionaryProspectLevel=قابلیت‌بالقوۀ مشتری‌احتمالی +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=ایالت‌ها/استان‌ها DictionaryRegion=مناطق DictionaryCountry=کشورها @@ -977,7 +991,8 @@ DictionaryEMailTemplates=قالب‌های رایانامه DictionaryUnits=واحدها DictionaryMeasuringUnits=واحدهای محاسبه DictionarySocialNetworks=شبکه‌های اجتماعی -DictionaryProspectStatus=وضعیت مشتری‌احتمالی +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=انواع مرخصی DictionaryOpportunityStatus=وضعیت سرنخ برای طرح/سرنخ DictionaryExpenseTaxCat=گزارش هزینه - دسته‌بندی‌های حمل‌ونقل @@ -1076,7 +1091,7 @@ LoginPage=صفحۀ ورود BackgroundImageLogin=تصویر پس‌زمینه PermanentLeftSearchForm=واحد دائمی جستجو در فهرست سمت چپ DefaultLanguage=زبان پیش‌فرض -EnableMultilangInterface=پشتیبانی از چندزبانگی +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=شرکت/سازمان CompanyIds=هویت‌های شرکت/سازمان @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=حداقل یک شرایط جستجو ب NewTranslationStringToShow=عبارت جدید ترجمه برای نمایش OriginalValueWas=ترجمۀ اصلی بازنویسی شد. مقدار اصلی

    %s بود TransKeyWithoutOriginalValue=شما یک ترجمۀ جدید برای کلیدترجمۀ "%s" الزام کردید که در هیچ‌یک از فایل‌های ترجمه وجود ندارد -TotalNumberOfActivatedModules=واحد‌ها/برنامه‌های فعال‌شده: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=شما حداقل باید 1 واحد را فعال نمائید ClassNotFoundIntoPathWarning=کلاس %s در مسیر PHP پیدا نشد YesInSummer=بله در فصل تابستان @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=استفاده از انواع رخداد (قابل‌مد AGENDA_USE_EVENT_TYPE_DEFAULT=ثبت خودکار این مقدار پیش‌فرض برای نوع رخداد در برگۀ ساخت رخداد AGENDA_DEFAULT_FILTER_TYPE=ثبت خودکار این نوع از رخداد در صافی جستجوی نمای جلسات AGENDA_DEFAULT_FILTER_STATUS=ثبت خودکار این وضعیت جلسه در صافی جستجوی نمای جلسات -AGENDA_DEFAULT_VIEW=زبانه‌ای که به طور پیش‌فرض در هنگام باز کردن فهرست جلسات باید باز باشد +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=فعال‌کردن یادآوری رخدادها توسط رایانامه (توجه داشته بشید در خصوص هر رخداد گزینه‌ها/تاخیر قابل تعریف هستند). نکته: برای ارسال با بسامد صحیح رایانامه‌های یادآوری واحد %s باید فعال بوده و به‌‌درستی پیکربندی شده باشد. AGENDA_REMINDER_BROWSER=فعال‌کردن یادآوری رخداد روی مرورگر کاربر (در هنگامی که رخداد سررسید، هر کاربر می‌تواند این کار را از طریق سوال تائید مرورگر نفی کند) AGENDA_REMINDER_BROWSER_SOUND=فعال‌کردن آگاهی‌رسانی صوتی @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=نمایش شیء پیوند شده به نمای جل ##### Clicktodial ##### ClickToDialSetup=برپاسازی واحد کلیک برای شماره‌گیری ClickToDialUrlDesc=یک نشانی‌اینترنتی در هنگام کلیک بر روی نماد تلفن فراخوان می‌شود. در نشانی‌اینترنتی شما می‌توانید از برچسب‌های
    __PHONETO__ که با شمارۀ یک شخص برای تماس است تعویض خواهد شد،
    __PHONEFROM__ که با شمارۀ شخص تماس گیرنده (شما) تعویض خواهد شد
    __LOGIN__ که با شناسۀ ورود clicktodial (تعریف شده در کارت کاربر) تعویض خواهد شد،
    __PASS__ که با گذرواژۀ clicktodial (تعریف شده در کارت کاربر) تعویض خواهد شد. -ClickToDialDesc=این واحد شماره‌تلفن‌ها را تبدیل به پیوندهای قابل کلیک می‌کند. یک کلیک روی نمادک باعث می‌شود تلفن شما شماره‌گیری کند. این قابل استفاده برای تماس با یک سامانۀ مرکزتماس از طریق Dolibarr است که می‌تواند به‌عنوان مثال از یک سامانۀ SIP تماس حاصل نماید. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=فقط یک عبارت "tel:" به پیوند شماره‌تلفن‌ها اضافه شود ClickToDialUseTelLinkDesc=این گزینه را برای حالتی اضافه کنید که کاربران شما یک تلفن‌مجازی یا یک رابط نرم‌افزاری روی رایانۀ خود و یا مرورگر خود نصب دارند، این نرم‌افزارها در هنگامی فراخوان خواهند شد که پیوندی با پیشوند "tel:" کلیک شود. در صورتی که شما به یک سرور تمام عیار احتیاج دارید (که نیازی به نصب نرم افزار محلی ندارد)، شما باید گزینۀ "خیر" را انتخاب کرده و بخش بعدی را پر کنید. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=این بخش حاوی ارجاعی به یک سطر شناسه ا Enter0or1=Enter 0 or 1 UnicodeCurrency=در اینجا بین دو براکت فهرست اعداد بایت‌هائی را که نمایاندۀ نماد واحدپولی است وارد نمائید. برای مثال، برای $ مقدار [36] را وارد نمائید، برای ریال برزیل R$ مقدار [82,36] و برای €، مقدار [8364] ColorFormat=رنگ RGB در مبنای HEX، مثال: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=مکان سطر در فهرست‌های ترکیبی SellTaxRate=نرخ مالیات‌برفروش RecuperableOnly=بله برای م‌ب‌اا "در نظر گرفته نمی‌شود اما قابل بازیابی است" که مربوط به برخی استان‌های فرانسه است. مقدار "خیر" را برای همۀ سایر شرایط حفظ کنید. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=درخواست مظنه MailToSendSupplierOrder=سفارشات خرید MailToSendSupplierInvoice=صورت‌حساب‌های فروشندگان MailToSendContract=قراردادها +MailToSendReception=دریافت‌های کالا MailToThirdparty=طرف‌های سوم MailToMember=اعضا MailToUser=کاربران @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=سامانۀ Dolibarr مدیریت ارتب ExampleOfNewsMessageForMaintenanceRelease=سامانۀ Dolibarr مدیریت ارتباط با مشتری و مدیریت منابع سازمانی نسخۀ %s در دسترس است. نسخۀ %s یک نسخۀ بهبود دهنده است که این تنها به معنای رفع اشکالات است ما به همۀ کاربران توصیه می‌کنیم به این نسخه ارتقا دهند. یک نسخۀ بهبود دربردارندۀ قابلیت‌های جدید یا تغییرات در پایگاه داده نیست. شما می‌توانید از بخش download وبگاه https://www.dolibarr.org (زیرپوشۀ نسخه‌های پایدار) آن را دریافت نمائید. شما می‌توانید برای ملاحظۀ فهرست کامل تغییرات گزارش کار تغییرات را ببینید. MultiPriceRuleDesc=هنگامی که گزینۀ "چند سطح قیمت برای هر محصول/خدمات" فعال باشد شما می‌توانید برای هر محصول، چند قیمت (یکی برای هر سطح) تعریف نمائید. برای صرفه‌جوئی در زمان، شما می‌توانید قاعده‌ای برای محاسبۀ خودکار یک هر یک از این سطوح قیمتی مبنی بر قیمت سطح اول تعریف کنید و بدین‌ترتیب شما تنها قیمت سطح اول را برای هر محصول وارد خواهید نمود. این صفحه برای صرفه‌جوئی در زمان ایجاد شده است اما تنها هنگامی مؤثر است که سایر قیمت‌ها در سطوح دیگر، با سطح اولیۀ قیمت یک رابطه داشته باشند. در اکثر موارد شما می‌توانید این صفحه را نادیده بگیرید. ModelModulesProduct=قالب‌های مربوط به مستندات محصول +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=برای امکان تولید خودکار کدها، شما می‌توانید ابتدا یک "مدیر" مخصوص برای تعریف خودکار شمارۀ بارکد تعریف کنید. SeeSubstitutionVars=یادداشت * را برای فهرست متغیرهای قابل استفادۀ جایگزین نگاه کنید SeeChangeLog=فایل گزارش‌کار تغییرات را نگاه کنید (فقط انگلیسی است) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=فاصلۀحاشیۀ چپ PDF MAIN_PDF_MARGIN_RIGHT=فاصلۀحاشیۀ راست PDF MAIN_PDF_MARGIN_TOP=فاصلۀحاشیۀ بالای PDF MAIN_PDF_MARGIN_BOTTOM=فاصلۀحاشیۀ پائین PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=تنظیمات خاصی برای این واحدموردنیاز نیست SetToYesIfGroupIsComputationOfOtherGroups=در صورتی که این گروه جهت محاسبۀ سایر گروه‌هاست این گزینه را انتخاب کنید EnterCalculationRuleIfPreviousFieldIsYes=در صورتی که بخش قبلی به "بله" تنظیم شده باشد، قاعدۀ محاسبه را وارد نمائید (برای مثال 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=کاری انجام نشد XEmailsDoneYActionsDone=%s رایانامه دارای شرایط لازم بود، %s رایانامه با موفقیت پردازش شد ( برای %s مورد ثبت/کنش انجام شد) RecordEvent=ثبت رخداد رایانامه CreateLeadAndThirdParty=افزودن سرنخ (و شخص سوم در صورت ضرورت) -CreateTicketAndThirdParty=ساخت برگۀ‌پشتیبانی (و شخص‌سوم در صورت ضرورت) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=آخرین کد نتیجه NbOfEmailsInInbox=تعداد رایانامه‌های موجود در پوشۀ منبع LoadThirdPartyFromName=بارگذاری جستجوی شخص‌سوم روی %s (فقط بارگذاری) LoadThirdPartyFromNameOrCreate=بارگذاری جستجوی شخص سوم روی %s (ساختن در صورت عدم یافتن) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=کدپستی MainMenuCode=کد ورودی فهرست (فهرست اصلی) ECMAutoTree=نمایش ساختاردرختی خودکار ECM @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=شناسۀ منحصر به‌فرد نمونه SmallerThan=کوچک‌تر از LargerThan=بزرگتر از -IfTrackingIDFoundEventWillBeLinked=توجه کنید در صورتی که یک شناسۀ ره‌گیری در یک رایانامۀ دریافتی یافت شود، روی‌داد به طور خودکار به اشیاء مربوطه متصل خواهد شد +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=با یک حساب GMail در صورتی که تائید 2 گامی را انتخاب کرده باشید، پیشنهاد می‌شود یک گذرواژۀ دوم برای استفادۀ برنامه به‌جای گذرواژۀ خودتان برای حساب بسازید. این کار از https://myaccount.google.com/ قابل انجام است. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/fa_IR/agenda.lang b/htdocs/langs/fa_IR/agenda.lang index b642b0f3248..9eaf43ec4df 100644 --- a/htdocs/langs/fa_IR/agenda.lang +++ b/htdocs/langs/fa_IR/agenda.lang @@ -14,7 +14,7 @@ EventsNb=تعداد روی‌دادها ListOfActions=فهرست‌روی‌دادها EventReports=گزارش روی‌دادها Location=محل -ToUserOfGroup=به همۀ کاربران این گروه +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=روی‌داد در تمام روز (ها) MenuToDoActions=همه روی‌دادهای ناقص MenuDoneActions=همۀ روی‌دادهای لغو شده @@ -86,6 +86,8 @@ ProposalDeleted=پیشنهاد حذف شد OrderDeleted=سفارش حذف شد InvoiceDeleted=صورت‌حساب حذف شد DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=محصول %s ساخته شد PRODUCT_MODIFYInDolibarr=محصول %s ویرایش شد PRODUCT_DELETEInDolibarr=محصول %s حذف شد @@ -158,3 +160,9 @@ DateStartPlusOne=تاریخ شروع + 1 ساعت SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/fa_IR/boxes.lang b/htdocs/langs/fa_IR/boxes.lang index 749d350f2e9..3ee603aee83 100644 --- a/htdocs/langs/fa_IR/boxes.lang +++ b/htdocs/langs/fa_IR/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=آخرین %s تامین کنندۀ ثبت شده BoxTitleLastModifiedSuppliers=فروشندگان: آخرین %s تغییریافته BoxTitleLastModifiedCustomers=مشتریان: آخرین %s تغییریافته BoxTitleLastCustomersOrProspects=آخرین %sمشتری یا مشتری‌احتمالی -BoxTitleLastCustomerBills=آخرین %sصورت‌حساب مشتری -BoxTitleLastSupplierBills=آخرین %s صورت‌حساب فروشنده +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=مشتریان احتمالی: آخرین %s تغییریافته BoxTitleLastModifiedMembers=آخرین %s عضو BoxTitleLastFicheInter=آخرین %s واسطه‌گری تغییریافته @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=سفارشات به فروشنده: آخر BoxTitleLastModifiedCustomerBills=صورت‌حساب‌های مشتری: آخرین %s تغییریافته BoxTitleLastModifiedCustomerOrders=سفارشات فروش: آخرین %s تغییریافته BoxTitleLastModifiedPropals=آخرین %s پیشنهاد تغییریافته +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=صورت‌حساب‌های مشتریان ForCustomersOrders=سفارشات مشتریان ForProposals=پیشنهادات @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=حسابداری diff --git a/htdocs/langs/fa_IR/cashdesk.lang b/htdocs/langs/fa_IR/cashdesk.lang index ad309da3a2b..40313762c8d 100644 --- a/htdocs/langs/fa_IR/cashdesk.lang +++ b/htdocs/langs/fa_IR/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/fa_IR/compta.lang b/htdocs/langs/fa_IR/compta.lang index 530a5514a9f..cdf21783347 100644 --- a/htdocs/langs/fa_IR/compta.lang +++ b/htdocs/langs/fa_IR/compta.lang @@ -69,6 +69,7 @@ SocialContribution=مالیات اجتماعی و ساختاری SocialContributions=مالیات‌های اجتماعی و ساختاری SocialContributionsDeductibles=مالیات‌های اجتماعی و ساختاری کسرپذیر SocialContributionsNondeductibles=مالیات‌های اجتماعی و ساختاری کسرناپذیر +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=تسهیم برچسب TypeContrib=تسهیم نوع MenuSpecialExpenses=هزینه‌های ویژه @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/fa_IR/contracts.lang b/htdocs/langs/fa_IR/contracts.lang index 73e45a0e539..d6f0ab88379 100644 --- a/htdocs/langs/fa_IR/contracts.lang +++ b/htdocs/langs/fa_IR/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=خدمات در حال اجرا MenuExpiredServices=خدمات منقضی شده MenuClosedServices=خدمات متوقف شده NewContract=قرارداد جدید -NewContractSubscription=قرارداد جدید/اشتراک جدید +NewContractSubscription=New contract or subscription AddContract=ساخت قرارداد DeleteAContract=حذف یک قرارداد ActivateAllOnContract=فعال کردن همۀ خدما diff --git a/htdocs/langs/fa_IR/errors.lang b/htdocs/langs/fa_IR/errors.lang index 3f5eef40181..3547d8ea6cb 100644 --- a/htdocs/langs/fa_IR/errors.lang +++ b/htdocs/langs/fa_IR/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=مقدار جدید نمی‌تواند براب ErrorFailedToValidatePasswordReset=بازسازی گذرواژه مقدور نبود. ممکن است این بازسازی قبلا انجام شده باشد (این پیوند فقط یک بار قابل استفاده است). در صورتی که چنین نیست، روند بازسازی را از سر بگیرید. ErrorToConnectToMysqlCheckInstance=اتصال به پایگاه‌داده مقدور نیست. مطمئن شوید سرور پایگاه داده فعال است. (برای مثال، Mysql/Mariadb شما می‌توانید از خط فرمان لینوکس دستور 'sudo service mysql start' را اجرا کنید). ErrorFailedToAddContact=اضافه کردن طرف‌تماس مقدور نبود -ErrorDateMustBeBeforeToday=تاریخ نمی‌تواند بیشتر از امروز باشد +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=حالت پرداخت به %s تنظیم شده اما برپاسازی واحد صورت‌حساب کامل نیست تا اطلاعات مربوط به این حالت پرداخت را تعریف کرده و نمایش دهد. ErrorPHPNeedModule=خطا، برای استفاده از این قابلیت روی PHP شما باید واحد %s نصب شده باشد. ErrorOpenIDSetupNotComplete=شما تنظیمات Dolibarr را پیکربندی کرده‌اید تا تصدیق ورود OpenID را مجاز کنید، اما نشانی خدمات openID در مقدارثابت %s تعریف نشده است @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=یک گذرواژه برای این عضو تنظیم شده است. با این‌حال هیچ حساب کاربری‌ای ساخته نشده است. بنابراین این گذرواژه برای ورود به Dolibarr قابل استفاده نیست. ممکن است برای یک رابط/واحد بیرونی قابل استفاده باشد، اما اگر شما نخواهید هیچ نام کاربری ورود و گذرواژه‌ای برای یک عضو استفاده کنید، شما می‌توانید گزینۀ "ایجاد یک نام‌ورد برای هر عضو" را از برپاسازی واحد اعضاء غیرفعال کنید. در صورتی که نیاز دارید که نام‌ورود داشته باشید اما گذرواژه نداشته باشید، می‌توانید این بخش را خالی گذاشته تا از این هشدار بر حذر باشید. نکته: همچنین نشانی رایانامه می‌تواند در صورتی که عضو به یک‌کاربر متصل باشد، می‌‌تواند مورد استفاده قرار گیرد diff --git a/htdocs/langs/fa_IR/languages.lang b/htdocs/langs/fa_IR/languages.lang index 5f87c5a9e14..e3a6fbcac16 100644 --- a/htdocs/langs/fa_IR/languages.lang +++ b/htdocs/langs/fa_IR/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=عربی Language_ar_EG=عربی (مصر) Language_ar_SA=عربی +Language_az_AZ=Azerbaijani Language_bn_BD=بنگالی +Language_bn_IN=Bengali (India) Language_bg_BG=بلغاری Language_bs_BA=بوسنی Language_ca_ES=کاتالانی @@ -20,6 +23,7 @@ Language_en_GB=انگلیسی بریتانیا Language_en_IN=انگلیسی هند Language_en_NZ=انگلیسی نیوزلند Language_en_SA=انگلیسی عربستان سعودی +Language_en_SG=English (Singapore) Language_en_US=انگلیسی آمریکا Language_en_ZA=انگلیسی آفریقای جنوبی Language_es_ES=اسپانیایی @@ -29,6 +33,7 @@ Language_es_CL=اسپانیایی (شیلی) Language_es_CO=اسپانیائی (کلمبیا) Language_es_DO=اسپانیایی (جمهوری دومینیکن) Language_es_EC=اسپانیائی (اکوادور) +Language_es_GT=Spanish (Guatemala) Language_es_HN=اسپانیایی (هندوراس) Language_es_MX=اسپانیایی (مکزیک) Language_es_PA=اسپانیائی (پاناما) @@ -36,6 +41,7 @@ Language_es_PY=اسپانیایی پروگوئه Language_es_PE=اسپانیایی پرو Language_es_PR=اسپانیایی (پورتوریکو) Language_es_UY=اسپانیائی (اروگوئه) +Language_es_GT=Spanish (Guatemala) Language_es_VE=اسپانیائی (ونزوئلا) Language_et_EE=زبان استونی Language_eu_ES=باسک @@ -44,15 +50,22 @@ Language_fi_FI=فنلاندی Language_fr_BE=فرانسوی بلژیکی Language_fr_CA=فرانسوی کانادا Language_fr_CH=فرانسوی سوییس +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=فرانسوی +Language_fr_GA=French (Gabon) Language_fr_NC=فرانسه (کالدونیای جدید) +Language_fr_SN=French (Senegal) Language_fy_NL=فریسی +Language_gl_ES=Galician Language_he_IL=عبری +Language_hi_IN=Hindi (India) Language_hr_HR=کرواتی Language_hu_HU=مجارستانی Language_id_ID=اندونزی Language_is_IS=ایسلندی Language_it_IT=ایتالیایی +Language_it_CH=Italian (Switzerland) Language_ja_JP=ژاپنی Language_ka_GE=گرجی Language_km_KH=خمر @@ -64,6 +77,7 @@ Language_lv_LV=لتونی Language_mk_MK=مقدونی Language_mn_MN=مغولی Language_nb_NO=نروژی +Language_ne_NP=Nepali Language_nl_BE=آلمانی نروژی Language_nl_NL=Dutch Language_pl_PL=پلندی @@ -86,4 +100,5 @@ Language_uz_UZ=ازبک Language_vi_VN=ویتنامی Language_zh_CN=چینی Language_zh_TW=چینی (سنتی) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=مالائی diff --git a/htdocs/langs/fa_IR/mails.lang b/htdocs/langs/fa_IR/mails.lang index b25c03b7177..75df4395c03 100644 --- a/htdocs/langs/fa_IR/mails.lang +++ b/htdocs/langs/fa_IR/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=اطلاعات ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=پاسخ داده شده +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/fa_IR/main.lang b/htdocs/langs/fa_IR/main.lang index 672210b1c09..7392e0e2498 100644 --- a/htdocs/langs/fa_IR/main.lang +++ b/htdocs/langs/fa_IR/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (با مالیات) Amount=مبلغ AmountInvoice=مبلغ صورت‌حساب AmountInvoiced=مبلغ صورت‌حساب شده -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=مبلغ پرداخت AmountHTShort=مبلغ (بدون م.) AmountTTCShort=مبلغ (با مالیات) @@ -485,6 +485,7 @@ Categories=کلیدواژه‌ها/دسته‌بندی‌ها Category=کلیدواژه/دسته‌بندی By=توسط From=از +FromDate=از FromLocation=از to=به To=به @@ -687,6 +688,7 @@ Method=روش Receive=دریافت CompleteOrNoMoreReceptionExpected=کامل‌شده یا در انتظار چیز دیگری نیست ExpectedValue=مقدار مورد انتظار +ExpectedQty=Expected Qty PartialWoman=جزئی TotalWoman=کل NeverReceived=هرگز دریافت نشده @@ -703,6 +705,7 @@ MenuECM=اسناد MenuAWStats=AWStats MenuMembers=اعضاء MenuAgendaGoogle=دستورکار گوگل +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=محدودیت Dolibarr (فهرست خانه-برپاسازی-امنیت): %s کیلوبایت، محدودیت PHP برابر با: %s کیلوبایت NoFileFound=هیچ سندی در این پوشه ذخیره نشده است CurrentUserLanguage=زبان کنونی @@ -725,7 +728,7 @@ Page=صفحه Notes=یادداشت‌ها AddNewLine=افزودن سطرجدید AddFile=افزودن فایل -FreeZone=یک محصول/خدمات ازپیش‌تعریف شده نیست +FreeZone=Free-text product FreeLineOfType=عنوان با متن دلخواه - نوع : CloneMainAttributes=نسخه‌برداری از شیء با ویژگی‌های اصلی آن ReGeneratePDF=بازتولید PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=یک قالب رایانامه انتخاب کنید SetRef=تنظیم ارجا Select2ResultFoundUseArrows=نتیجه‌هائی پیدا شد. از کلیدهای جهت برای انتخاب استفاده کنید. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=اطلاعات +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/fa_IR/members.lang b/htdocs/langs/fa_IR/members.lang index 6ad9abfb8a2..b729941a1c7 100644 --- a/htdocs/langs/fa_IR/members.lang +++ b/htdocs/langs/fa_IR/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=عضو پیش نویس MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=معتبر شد +SubscriptionNotNeeded=No subscription needed NewCotisation=سهم های جدید PaymentSubscription=پرداخت سهم جدید SubscriptionEndDate=تاریخ پایان اشتراک در @@ -78,7 +81,7 @@ DeleteType=حذف کردن VoteAllowed=رای اجازه Physical=فیزیکی Moral=اخلاقی -MorPhy=با اخلاق / فیزیکی +MorPhy=طبیعت Reenable=را دوباره فعال کنید ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/fa_IR/mrp.lang b/htdocs/langs/fa_IR/mrp.lang index b7189492a94..74aa70bfac9 100644 --- a/htdocs/langs/fa_IR/mrp.lang +++ b/htdocs/langs/fa_IR/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=بخش برنامه‌ریزی مواد اولیه MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/fa_IR/other.lang b/htdocs/langs/fa_IR/other.lang index bb6ea1ec8a9..8bd88a5db5d 100644 --- a/htdocs/langs/fa_IR/other.lang +++ b/htdocs/langs/fa_IR/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/fa_IR/products.lang b/htdocs/langs/fa_IR/products.lang index d0044c00125..64c5b787fb4 100644 --- a/htdocs/langs/fa_IR/products.lang +++ b/htdocs/langs/fa_IR/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=تنظیم نوع بارکد BarcodeValue=مقدار بارکد NoteNotVisibleOnBill=یادداشت (در صورت‌حساب‌ها، پیشنهادها و غیره نمایش داده نمی‌شود) ServiceLimitedDuration=در صورتی که محصول، خدماتی با مدت‌زمان محدود است: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=چند قسمت قیمتی در هر محصول/خدمات (هر مشتری در یک قسمت قیمتی است) MultiPricesNumPrices=تعداد قیمت‌ها DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=قیمت‌های فروشنده (مربوط CustomCode=گمرک / کالا / کدبندی هماهنگ کالا CountryOrigin=کشور مبدا Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=برچسب کوتاه Unit=واحد p=واحد @@ -359,6 +362,9 @@ SelectCombination=انتخاب یک ترکیب ProductCombinationGenerator=تولیدکننده انواع Features=قابلیت‌ها PriceImpact=تاثیر قیم +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=تاثیر وزن NewProductAttribute=ویژگی های جدید NewProductAttributeValue=نوع جدید ویژگی diff --git a/htdocs/langs/fa_IR/projects.lang b/htdocs/langs/fa_IR/projects.lang index 174acca3b5f..4f56d44dcf4 100644 --- a/htdocs/langs/fa_IR/projects.lang +++ b/htdocs/langs/fa_IR/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=مشارکت کننده TypeContact_project_task_external_TASKCONTRIBUTOR=مشارکت کننده SelectElement=انتخاب عنصر AddElement=پیوند به عنصر +LinkToElementShort=پیوند به # Documents models DocumentModelBeluga=مستند قالبی طرح برای پیش‌نمایش اشیاء پیوند شده DocumentModelBaleine=مستند قالبی طرح برای وظایف @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=تعداد طرح‌های ساخته شده در ماه ProjectNbTaskByMonth=تعداد وظایف ساخته شده در ماه ProjectOppAmountOfProjectsByMonth=مبلغ سرنخ‌ها در ماه ProjectWeightedOppAmountOfProjectsByMonth=مبلغ متوازن سرنخ‌ها در ماه -ProjectOpenedProjectByOppStatus=بازکردن طرح/سرنخ برحسب وضعیت سرنخ -ProjectsStatistics=آمار برای طرح‌ها/سرنخ‌ها -TasksStatistics=آمار برای وظایف طرح‌ها/سرنخ‌ها +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=وظیفه محول شد. وارد کردن زمان به این وظیفه باید ممکن باشد. IdTaskTime=شناسۀ زمان وظیفه YouCanCompleteRef=اگر بخواهید عبارت ارجاع را با پس‌وند تکمیل کنید، پیشنهاد می‌شود یک نویسۀ خط‌فاصله - برای جدا کردن آن استفاده کنی، که شماره‌گذاری خودکار برای طرح‌های بعدی نیز به درستی کار کند. برای مثال %s-پس‌وند من diff --git a/htdocs/langs/fa_IR/recruitment.lang b/htdocs/langs/fa_IR/recruitment.lang new file mode 100644 index 00000000000..f8aab043f93 --- /dev/null +++ b/htdocs/langs/fa_IR/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = تنظیمات +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = درباره +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/fa_IR/stocks.lang b/htdocs/langs/fa_IR/stocks.lang index 2740c8d9190..9542e4071fb 100644 --- a/htdocs/langs/fa_IR/stocks.lang +++ b/htdocs/langs/fa_IR/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=حذف جابجائی Stock=موجودی Stocks=موجودی MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=موجودی به‌واسطۀ سری‌ساخت/شماره‌سری @@ -95,14 +95,16 @@ RealStock=موجودی واقعی RealStockDesc=موجودی فیزیکی/واقعی موجودی‌هائی هستند که اکنون در انبارها وجود دارند. RealStockWillAutomaticallyWhen=موجودی واقعی با توجه به این قاعده ویرایش خواهد شد (طوری که در واحد موجودی تعریف شده است): VirtualStock=موجودی مجازی -VirtualStockDesc=موجودی مجازی، موجودی محاسبه شده‌ای است که در هنگام بسته شدن همۀ کنش‌های باز/درحال‌انجام (که روی موجودی اثر دارند) در دسترس خواهد بود. (یعنی پس از دریافت سفارش‌های خرید، پس از حمل سفارشات فروش و غیره). +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=شناسۀ انبار DescWareHouse=توضیحات مربوط به انبار LieuWareHouse=محل انبار WarehousesAndProducts=انبارها و محصولا WarehousesAndProductsBatchDetail=انبارها و محصولات (با جزئیات مربوط به سری‌ساخت/سریال) -AverageUnitPricePMPShort=قیمت ورودی متوازن میانگین -AverageUnitPricePMP=قیمت ورودی متوازن میانگین +AverageUnitPricePMPShort=قیمت میانگین متوازن +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=قیمت فروش واحد EstimatedStockValueSellShort=مقدار برای فروش EstimatedStockValueSell=مقدار برای فروش @@ -141,7 +143,7 @@ Replenishments=دوباره‌پر‌کردن NbOfProductBeforePeriod=تعداد موجودی %s پیش از بازۀ انتخابی (< %s) NbOfProductAfterPeriod=تعداد موجودی %s پس از بازۀ انتخابی (> %s) MassMovement=جابجائی انبوه -SelectProductInAndOutWareHouse=یک محصول، مقدار و یک انبار مبدأ و یک انبار مقصد انتخاب کنید، سپس بر روی "%s" کلیک نمائید. پس از انجام این‌کار برای همۀ جابجائی‌هائی مورد نیاز، بر روی "%s" کلیک نمائید. +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=ثبت جابجائی ReceivingForSameOrder=رسیدهای این سفارش StockMovementRecorded=جابجائی موجودی‌ها ثبت شد @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fa_IR/suppliers.lang b/htdocs/langs/fa_IR/suppliers.lang index d7e7773f461..56671fe59be 100644 --- a/htdocs/langs/fa_IR/suppliers.lang +++ b/htdocs/langs/fa_IR/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=کم کیفیت ReputationForThisProduct=اعتبار BuyerName=نام خریدار AllProductServicePrices=همۀ قیمت‌های محصولات/خدمات -AllProductReferencesOfSupplier=ارجاع همۀ محصولات / خدمات فرونشده +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=قیمت‌های فروشنده diff --git a/htdocs/langs/fa_IR/ticket.lang b/htdocs/langs/fa_IR/ticket.lang index 32be25bf695..a1ad4eacc4e 100644 --- a/htdocs/langs/fa_IR/ticket.lang +++ b/htdocs/langs/fa_IR/ticket.lang @@ -72,7 +72,6 @@ Deleted=حذف شده # Dict Type=نوع -Category=کد Analytic Severity=حساسیت # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=نسبت دادن خودکار کاربری که برگ TicketsAutoAssignTicketHelp=در هنگام ساخت برگۀ‌پشتیبانی، کاربر می‌تواند به شکل خودکار به برگه نسبت داده شود TicketNumberingModules=واحد شماره‌دهی برگه‌های پشتیبانی TicketNotifyTiersAtCreation=اطلاع‌رسانی به شخص‌سوم در هنگام ساخت -TicketGroup=گروه TicketsDisableCustomerEmail=همواره در هنگامی که یک برگۀ‌پشتیبانی از طریق رابط عمومی ساخته می‌شود، قابلیت رایانامه غیرفعال شود TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=ساخته‌شده توسط NewTicket=برگۀ جدید SubjectAnswerToTicket=پاسخ برگه TicketTypeRequest=نوع درخواست -TicketCategory=کد Analytic +TicketCategory=گروه SeeTicket=نمایش برگه TicketMarkedAsRead=برگه به صورت خوانده شده علامت‌گذاری شد TicketReadOn=خواندن diff --git a/htdocs/langs/fa_IR/users.lang b/htdocs/langs/fa_IR/users.lang index 012f6b0d90a..72e544afadd 100644 --- a/htdocs/langs/fa_IR/users.lang +++ b/htdocs/langs/fa_IR/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=کاربری که ایجاد می‌شود یک کارب IdPhoneCaller=شناسۀ تماس‌گیرنده تلفن NewUserCreated=کاربر %s ساخته شد NewUserPassword=گذرواژه برای %s تغییر یافت +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=کاربر %s تغییر یافت UserDisabled=کاربر %s ناپویا شد UserEnabled=کاربر %s پویا شد. @@ -107,6 +108,7 @@ DisabledInMonoUserMode=غیرفعال در حالت نگهداری‌و‌تعم UserAccountancyCode=کد حساب‌داری کاربر UserLogoff=خروج کاربر UserLogged=کاربر وارد شده +DateOfEmployment=Employment date DateEmployment=تاریخ شروع استخدام DateEmploymentEnd=تاریخ پایان استخدام CantDisableYourself=شما نمی‌توانید ردیف کاربری خود را غیرفعال کنید @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/fa_IR/withdrawals.lang b/htdocs/langs/fa_IR/withdrawals.lang index 9a1b0130009..5c0b517c19a 100644 --- a/htdocs/langs/fa_IR/withdrawals.lang +++ b/htdocs/langs/fa_IR/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=سفارش‌های برداشت مستقیم WithdrawalReceipt=سفارش برداشت مستقیم -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=آخرین %s مستند دریافت مستقیم @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=انتظار StatusTrans=فرستاده +StatusDebited=Debited StatusCredited=اعتبار +StatusPaid=پرداخت‌شده StatusRefused=رد StatusMotif0=نامشخص StatusMotif1=منابع مالی ناکافی @@ -77,13 +79,13 @@ StatusMotif8=دلیل دیگر CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=تنها دفتر CreateBanque=تنها بانک OrderWaiting=در انتظار درمان -NotifyTransmision=برداشت انتقال -NotifyCredit=برداشت اعتباری +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=شماره ملی فرستنده WithBankUsingRIB=برای حساب های بانکی با استفاده از RIB WithBankUsingBANBIC=برای حساب های بانکی با استفاده از IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=در اعتباری WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=فایل برداشت +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=تنظیم به وضعیت "فایل ارسال شد" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=مقدار:٪ s را
    روش: از٪ s
    تاریخ:٪ s ر InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=انتخاب برای حالت واقعی تنظیم نشده بود، ما بعد از این شبیه سازی را متوقف کند +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/fa_IR/workflow.lang b/htdocs/langs/fa_IR/workflow.lang index 527acaf70d2..d3fc0934cf1 100644 --- a/htdocs/langs/fa_IR/workflow.lang +++ b/htdocs/langs/fa_IR/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=راه اندازی ماژول گردش کار -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/fa_IR/zapier.lang b/htdocs/langs/fa_IR/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/fa_IR/zapier.lang +++ b/htdocs/langs/fa_IR/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/fi_FI/accountancy.lang b/htdocs/langs/fi_FI/accountancy.lang index 5533700c09f..a702faa322c 100644 --- a/htdocs/langs/fi_FI/accountancy.lang +++ b/htdocs/langs/fi_FI/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Myyntipäiväkirja ACCOUNTING_PURCHASE_JOURNAL=Ostopäiväkirja @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Täsmäyttämätön ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/fi_FI/admin.lang b/htdocs/langs/fi_FI/admin.lang index 0d0986dcaea..221c3dd5919 100644 --- a/htdocs/langs/fi_FI/admin.lang +++ b/htdocs/langs/fi_FI/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Oletussähköpostiosoite käsin lähetettäessä (Kä UserEmail=Käyttäjän sähköposti CompanyEmail=Yrityksen sähköposti FeatureNotAvailableOnLinux=Ominaisuus ei ole Unix-koneissa. Testaa sendmail ohjelmaa paikallisesti. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Moduuli asetukset ModulesSetup=Moduulit/Applikaatio asetukset ModuleFamilyBase=Järjestelmä @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Avain turvallinen URL NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Yleiset asetukset PDF: n luontiin -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Piilota kaikki myyntiveroihin/ALViin liittyvä tieto PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Käynnistä massamuutos PriceFormatInCurrentLanguage=Price Format In Current Language String=Merkkijono +String1Line=String (1 line) TextLong=Pitkä teksti +TextLongNLines=Long text (n lines) HtmlText=Html teksti Int=Kokonaisluku Float=Liukuluku @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Viivakoodit Module55Desc=Viivakoodien hallinta Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDial yhdentyminen Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Luo/Muokkaa palveluita Permission534=Poista palvelut Permission536=Katso / hoitaa piilotettu palvelut Permission538=Vienti palvelut +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Lue materiaaliluettelo Permission651=Luo/päivitä materiaaliluettelo Permission652=Poista materiaaliluettelo +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Lue lahjoitukset Permission702=Luoda / muuttaa lahjoitusten Permission703=Poista lahjoitukset @@ -848,6 +858,8 @@ Permission773=Poista kuluraportit Permission774=Read all expense reports (even for user not subordinates) Permission775=Hyväksy kuluraportit Permission776=Maksa kuluraportit +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Kuluraporttien vienti Permission1001=Lue varastot Permission1002=Luo/muuta varastoja @@ -900,6 +912,7 @@ Permission2515=Asiakirjojen hakemistoasetukset Permission2801=Käytä FTP ohjelmaa lukutilassa (vain selain ja lataukset) Permission2802=Käytä FTP ohjelmaa kirjoitustilassa (poista tai päivitä tiedostot) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=Selaa työntekijöitä Permission4002=Luo työntekijä Permission4003=Poista työntekijöitä @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospekti potentiaali +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Alueiden DictionaryCountry=Maat @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Mallisähköpostit DictionaryUnits=Yksiköt DictionaryMeasuringUnits=Mittayksiköt DictionarySocialNetworks=Sosiaaliset verkostot -DictionaryProspectStatus=Prospektin tila +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Vapaan tyyppi DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Kirjautumissivu BackgroundImageLogin=Taustakuva PermanentLeftSearchForm=Pysyvä hakulomake vasemmassa valikossa DefaultLanguage=Oletuskieli -EnableMultilangInterface=Usean kielen tuki +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Näytä yrityksen logo valikossa CompanyInfo=Yritys/Organisaatio CompanyIds=Yrityksen/Organisaation tiedot @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Sinulla pitää olla ainakin 1 moduuli käytössä ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Ota käyttöön ilmoitusäänet @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup='Click To Dial'-moduulin asetukset ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Myynnin veroprosentti RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Tarjouspyyntö MailToSendSupplierOrder=Ostotilaukset MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Sopimukset +MailToSendReception=Receptions MailToThirdparty=Sidosryhmät MailToMember=Jäsenet MailToUser=Käyttäjät @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Mallipohjat tuotedokumentaatiolle +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=PDF:n vasen marginaali MAIN_PDF_MARGIN_RIGHT=PDF:n oikea marginaali MAIN_PDF_MARGIN_TOP=PDF:n ylämarginaali MAIN_PDF_MARGIN_BOTTOM=PDF:n alamarginaali +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Postinumero MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Instanssin ID SmallerThan=Pienempi kuin LargerThan=Suurempi kuin -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/fi_FI/agenda.lang b/htdocs/langs/fi_FI/agenda.lang index d9757084740..979cc048c3c 100644 --- a/htdocs/langs/fi_FI/agenda.lang +++ b/htdocs/langs/fi_FI/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=Luettelo tapahtumista EventReports=Event reports Location=Sijainti -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Tapahtuma on koko päivä MenuToDoActions=Kaikki puutteelliset toimet MenuDoneActions=Kaikki irti toimia @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Lasku poistettu DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/fi_FI/boxes.lang b/htdocs/langs/fi_FI/boxes.lang index 0f33f5000ad..a63ed303fb5 100644 --- a/htdocs/langs/fi_FI/boxes.lang +++ b/htdocs/langs/fi_FI/boxes.lang @@ -1,54 +1,54 @@ # Dolibarr language file - Source file is en_US - boxes BoxLoginInformation=Login Information -BoxLastRssInfos=RSS Information -BoxLastProducts=Latest %s Products/Services -BoxProductsAlertStock=Stock alerts for products -BoxLastProductsInContract=Latest %s contracted products/services -BoxLastSupplierBills=Latest Vendor invoices -BoxLastCustomerBills=Latest Customer invoices -BoxOldestUnpaidCustomerBills=Oldest unpaid customer invoices -BoxOldestUnpaidSupplierBills=Oldest unpaid vendor invoices -BoxLastProposals=Latest commercial proposals -BoxLastProspects=Latest modified prospects -BoxLastCustomers=Latest modified customers -BoxLastSuppliers=Latest modified suppliers +BoxLastRssInfos=RSS tiedot +BoxLastProducts=Viimeisimmät %sTuotteet/Palvelut +BoxProductsAlertStock=Tuotteiden saldohälytykset +BoxLastProductsInContract=Viimeisimmät %ssopimukset tuotteista/palveluista +BoxLastSupplierBills=Viimeisimmät ostolaskut +BoxLastCustomerBills=Viimeisimmät laskut +BoxOldestUnpaidCustomerBills=Vanhimmat avoimet laskut +BoxOldestUnpaidSupplierBills=Vanhimmat avoimet ostolaskut +BoxLastProposals=Viimeisimmät tarjoukset +BoxLastProspects=Viimeisimmät käsitellyt prospektit +BoxLastCustomers=Viimeisimmät käsitellyt asiakkaat +BoxLastSuppliers=Viimeisimmät käsitellyt toimittajat BoxLastCustomerOrders=Viimeisimmät myyntitilaukset -BoxLastActions=Latest actions -BoxLastContracts=Latest contracts -BoxLastContacts=Latest contacts/addresses -BoxLastMembers=Latest members -BoxFicheInter=Latest interventions -BoxCurrentAccounts=Open accounts balance -BoxTitleMemberNextBirthdays=Birthdays of this month (members) -BoxTitleLastRssInfos=Latest %s news from %s -BoxTitleLastProducts=Products/Services: last %s modified -BoxTitleProductsAlertStock=Products: stock alert -BoxTitleLastSuppliers=Latest %s recorded suppliers -BoxTitleLastModifiedSuppliers=Vendors: last %s modified -BoxTitleLastModifiedCustomers=Customers: last %s modified -BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices -BoxTitleLastModifiedProspects=Prospects: last %s modified +BoxLastActions=Viimeisimmät käsittelyt +BoxLastContracts=Viimeisimmät sopimukset +BoxLastContacts=Viimeisimmät käsitellyt yhteystiedot +BoxLastMembers=Viimeisimmät käyttäjät +BoxFicheInter=Viimeisimmät välitykset +BoxCurrentAccounts=Avoimet saatavat yhteensä +BoxTitleMemberNextBirthdays=Käyttäjien syntymäpäivät tässä kuussa +BoxTitleLastRssInfos=Viimeisimmät %s uutiset %s +BoxTitleLastProducts=Tuotteet/Palvelut: viimeisimmät %s muokatut +BoxTitleProductsAlertStock=Tuotteet: saldohälytys +BoxTitleLastSuppliers=Toimittajat: viimeisimmät %stallennetut +BoxTitleLastModifiedSuppliers=Toimittajat: viimeisimmät %s muokatut  +BoxTitleLastModifiedCustomers=Asiakkaat: viimeisimmät %smuokatut +BoxTitleLastCustomersOrProspects=Viimeisimmät %s asiakkaat tai prospektit +BoxTitleLastCustomerBills=Viimeisimmät %s muokatut myyntilaskut +BoxTitleLastSupplierBills=Viimeisimmät %s muokatut ostolaskut +BoxTitleLastModifiedProspects=Prospektit: viimeisimmät %s muokatut BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions -BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid +BoxTitleOldestUnpaidCustomerBills=Asiakaslaskut: vanhimmat %s maksamattomat BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid -BoxTitleCurrentAccounts=Open Accounts: balances -BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception -BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified +BoxTitleCurrentAccounts=Avoimet asiakkaittain +BoxTitleSupplierOrdersAwaitingReception=Saavutusta odottavat tilaukset +BoxTitleLastModifiedContacts=Kontaktit/Osoitteet: viimeisimmät %s muokatut BoxMyLastBookmarks=Bookmarks: latest %s BoxOldestExpiredServices=Vanhimat aktiiviset päättyneet palvelut BoxLastExpiredServices=Latest %s oldest contacts with active expired services BoxTitleLastActionsToDo=Latest %s actions to do BoxTitleLastContracts=Latest %s modified contracts BoxTitleLastModifiedDonations=Latest %s modified donations -BoxTitleLastModifiedExpenses=Latest %s modified expense reports +BoxTitleLastModifiedExpenses=Viimeisimmät %s muokatut matka- ja kuluraportit BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders BoxGlobalActivity=Yleisaktiviteetit (laskut, ehdotukset, tilaukset) -BoxGoodCustomers=Good customers -BoxTitleGoodCustomers=%s Good customers +BoxGoodCustomers=Hyvät asiakkaat +BoxTitleGoodCustomers=%s Hyvät asiakkaat FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=Kirjanmerkkejä ei ole määritelty. @@ -70,9 +70,9 @@ NoRecordedInterventions=Ei tallennettuja väliintuloja BoxLatestSupplierOrders=Latest purchase orders BoxLatestSupplierOrdersAwaitingReception=Latest Purchase Orders (with a pending reception) NoSupplierOrder=No recorded purchase order -BoxCustomersInvoicesPerMonth=Customer Invoices per month -BoxSuppliersInvoicesPerMonth=Vendor Invoices per month -BoxCustomersOrdersPerMonth=Sales Orders per month +BoxCustomersInvoicesPerMonth=Myyntilaskut per kk +BoxSuppliersInvoicesPerMonth=Ostolaskut per kk +BoxCustomersOrdersPerMonth=Myyntitilaukset per kk BoxSuppliersOrdersPerMonth=Vendor Orders per month BoxProposalsPerMonth=Mahdollisuutta kuukausittain NoTooLowStockProducts=No products are under the low stock limit @@ -83,12 +83,14 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Viimeisimmät %s muokatut tarjoukset +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Asiakkaiden laskut ForCustomersOrders=Asiakkaiden tilaukset ForProposals=Ehdotukset LastXMonthRolling=The latest %s month rolling -ChooseBoxToAdd=Add widget to your dashboard -BoxAdded=Widget was added in your dashboard +ChooseBoxToAdd=Lisää dashboardiin +BoxAdded=Lisätty dashboardiin BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) BoxLastManualEntries=Last manual entries in accountancy BoxTitleLastManualEntries=%s latest manual entries @@ -97,6 +99,8 @@ BoxSuspenseAccount=Count accountancy operation with suspense account BoxTitleSuspenseAccount=Number of unallocated lines NumberOfLinesInSuspenseAccount=Number of line in suspense account SuspenseAccountNotDefined=Suspense account isn't defined -BoxLastCustomerShipments=Last customer shipments +BoxLastCustomerShipments=Viimeisimmät asiakastoimitukset BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Kirjanpito diff --git a/htdocs/langs/fi_FI/cashdesk.lang b/htdocs/langs/fi_FI/cashdesk.lang index 3297976168b..3cb4a43d36f 100644 --- a/htdocs/langs/fi_FI/cashdesk.lang +++ b/htdocs/langs/fi_FI/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/fi_FI/compta.lang b/htdocs/langs/fi_FI/compta.lang index 88b914cd030..a4dbebfc263 100644 --- a/htdocs/langs/fi_FI/compta.lang +++ b/htdocs/langs/fi_FI/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Erityismenot (Verot, sosiaaliturvamaksut ja osingot) @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/fi_FI/contracts.lang b/htdocs/langs/fi_FI/contracts.lang index 99929266f57..2b1ebbc8517 100644 --- a/htdocs/langs/fi_FI/contracts.lang +++ b/htdocs/langs/fi_FI/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Käynnissä olevat palvelut MenuExpiredServices=Lakkaa palvelut MenuClosedServices=Suljetut palvelut NewContract=Uusi sopimus -NewContractSubscription=Uusi sopimus/ jatkuva tilaus +NewContractSubscription=New contract or subscription AddContract=Luo sopimus DeleteAContract=Poista sopimuksen ActivateAllOnContract=Aktivoi kaikki palvelut diff --git a/htdocs/langs/fi_FI/errors.lang b/htdocs/langs/fi_FI/errors.lang index c9c67dc59b5..90dc974eeeb 100644 --- a/htdocs/langs/fi_FI/errors.lang +++ b/htdocs/langs/fi_FI/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Yhteystiedon lisääminen epäonnistui -ErrorDateMustBeBeforeToday=Päivämäärä ei voi olla isompi kuin tämä päivämäärä +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/fi_FI/languages.lang b/htdocs/langs/fi_FI/languages.lang index 9ad78570230..51d52f45896 100644 --- a/htdocs/langs/fi_FI/languages.lang +++ b/htdocs/langs/fi_FI/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabia Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarialainen Language_bs_BA=Bosnian Language_ca_ES=Katalaani @@ -20,6 +23,7 @@ Language_en_GB=Englanti (Yhdistynyt kuningaskunta) Language_en_IN=Englanti (Intia) Language_en_NZ=Englanti (Uusi-Seelanti) Language_en_SA=Englanti (Saudi-Arabia) +Language_en_SG=English (Singapore) Language_en_US=Englanti (Yhdysvallat) Language_en_ZA=Englanti (Etelä-Afrikka) Language_es_ES=Espanjalainen @@ -29,6 +33,7 @@ Language_es_CL=Espanja (Chile) Language_es_CO=Espanja (Kolumbia) Language_es_DO=Espanja (Dominikaaninen tasavalta) Language_es_EC=Espanja (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Espanja (Honduras) Language_es_MX=Espanja (Meksiko) Language_es_PA=Espanja (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Espanja (Paraguay) Language_es_PE=Espanja (Peru) Language_es_PR=Espanja (Puerto Rico) Language_es_UY=Espanja (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Espanja (Venezuela) Language_et_EE=Virolainen Language_eu_ES=Baski @@ -44,15 +50,22 @@ Language_fi_FI=Suomi Language_fr_BE=Ranska (Belgia) Language_fr_CA=Ranska (Kanada) Language_fr_CH=Ranska (Sveitsi) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Ranskalainen +Language_fr_GA=French (Gabon) Language_fr_NC=Ranskan (Uusi-Kaledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Heprea +Language_hi_IN=Hindi (India) Language_hr_HR=Kroaatti Language_hu_HU=Unkari Language_id_ID=Indonesian Language_is_IS=Islannin Language_it_IT=Italialainen +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanin kieli Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvia Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norja (bokmål) +Language_ne_NP=Nepali Language_nl_BE=Hollanti (Belgia) Language_nl_NL=Dutch Language_pl_PL=Puola @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbekki Language_vi_VN=Vietnam Language_zh_CN=Kiinalainen Language_zh_TW=Kiina (perinteinen) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/fi_FI/mails.lang b/htdocs/langs/fi_FI/mails.lang index 005cf01f18a..c327a9bc3c9 100644 --- a/htdocs/langs/fi_FI/mails.lang +++ b/htdocs/langs/fi_FI/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/fi_FI/main.lang b/htdocs/langs/fi_FI/main.lang index 509b865b458..9000c0a2800 100644 --- a/htdocs/langs/fi_FI/main.lang +++ b/htdocs/langs/fi_FI/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Verollinen hinta Amount=Määrä AmountInvoice=Laskun summa AmountInvoiced=Laskutettu summa -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Maksun summa AmountHTShort=Amount (excl.) AmountTTCShort=Määrä (sis. alv) @@ -485,6 +485,7 @@ Categories=Tagit/luokat Category=Tagi/luokka By=Mennessä From=Mistä +FromDate=Laskuttaja FromLocation=Laskuttaja to=on To=on @@ -687,6 +688,7 @@ Method=Menetelmä Receive=Vastaanota CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Odotettu Arvo +ExpectedQty=Expected Qty PartialWoman=Osittainen TotalWoman=Yhteensä NeverReceived=Ei ole saapunut @@ -703,6 +705,7 @@ MenuECM=Asiakirjat MenuAWStats=AWStats MenuMembers=Jäsenet MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr raja (Valikko koti-setup-turvallisuus): %s Kb, PHP raja: %s Kb NoFileFound=Ei asiakirjoja tallennettuna tähän hakemistoon CurrentUserLanguage=Nykyinen kieli @@ -725,7 +728,7 @@ Page=Sivu Notes=Huomiot AddNewLine=Lisää uusi rivi AddFile=Lisää tiedosto -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Klooni objekti sen tärkeimmät attribuutit ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=TO ShortFriday=PE ShortSaturday=LA ShortSunday=SU +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Valitse sähköpostipohja SetRef=Aseta viite Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/fi_FI/members.lang b/htdocs/langs/fi_FI/members.lang index aee1b053fec..06fa737473e 100644 --- a/htdocs/langs/fi_FI/members.lang +++ b/htdocs/langs/fi_FI/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Luonnos jäseniä MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Hyväksytty +SubscriptionNotNeeded=No subscription needed NewCotisation=Uusi rahoitusosuus PaymentSubscription=Uusi osuus maksu SubscriptionEndDate=Tilaus päättymispäivämäärän @@ -78,7 +81,7 @@ DeleteType=Poistaa VoteAllowed=Äänestys sallittua Physical=Fyysinen Moral=Moraalinen -MorPhy=Moraalinen / Fysikaaliset +MorPhy=Luonto Reenable=Ottaa ne uudelleen ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/fi_FI/mrp.lang b/htdocs/langs/fi_FI/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/fi_FI/mrp.lang +++ b/htdocs/langs/fi_FI/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/fi_FI/other.lang b/htdocs/langs/fi_FI/other.lang index f60df123de9..4a6a9b8c6c6 100644 --- a/htdocs/langs/fi_FI/other.lang +++ b/htdocs/langs/fi_FI/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/fi_FI/products.lang b/htdocs/langs/fi_FI/products.lang index 314f6263b73..bf71d42d33f 100644 --- a/htdocs/langs/fi_FI/products.lang +++ b/htdocs/langs/fi_FI/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Aseta viivakoodin tyyppi BarcodeValue=Viivakoodin arvo NoteNotVisibleOnBill=Huomautus (ei näy laskuissa ehdotuksia ...) ServiceLimitedDuration=Jos tuote on palvelu, rajoitettu kesto: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Hintojen lukumäärä DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Alkuperämaa Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Yksikkö p=u. @@ -359,6 +362,9 @@ SelectCombination=Valitse yhdistelmä ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Uusi ominaisuus NewProductAttributeValue=Uuden ominaisuuden arvo diff --git a/htdocs/langs/fi_FI/projects.lang b/htdocs/langs/fi_FI/projects.lang index 352da42faad..36d5e4a6d8b 100644 --- a/htdocs/langs/fi_FI/projects.lang +++ b/htdocs/langs/fi_FI/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Avustaja TypeContact_project_task_external_TASKCONTRIBUTOR=Avustaja SelectElement=Select element AddElement=Link to element +LinkToElementShort=Linkki # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/fi_FI/recruitment.lang b/htdocs/langs/fi_FI/recruitment.lang new file mode 100644 index 00000000000..7451732ec87 --- /dev/null +++ b/htdocs/langs/fi_FI/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Asetukset +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Yleisesti +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/fi_FI/stocks.lang b/htdocs/langs/fi_FI/stocks.lang index 48e248486ca..217e28589fb 100644 --- a/htdocs/langs/fi_FI/stocks.lang +++ b/htdocs/langs/fi_FI/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Poista lähettäminen Stock=Kanta Stocks=Varastot MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Varastossa RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual varastossa -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id-varasto DescWareHouse=Kuvaus varasto LieuWareHouse=Lokalisointi varasto WarehousesAndProducts=Varastot ja tuotteet WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Keskimääräiset tulohintajärjestelmää -AverageUnitPricePMP=Keskimääräiset tulohintajärjestelmää +AverageUnitPricePMPShort=Value +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Myynnin Yksikköhinta EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fi_FI/suppliers.lang b/htdocs/langs/fi_FI/suppliers.lang index 00666f6625a..e928b322281 100644 --- a/htdocs/langs/fi_FI/suppliers.lang +++ b/htdocs/langs/fi_FI/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Maine BuyerName=Ostajan nimi AllProductServicePrices=Kaikkien tuotteiden / palveluiden hinnat -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/fi_FI/ticket.lang b/htdocs/langs/fi_FI/ticket.lang index 631ebfa2572..d25c38981fc 100644 --- a/htdocs/langs/fi_FI/ticket.lang +++ b/htdocs/langs/fi_FI/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Tyyppi -Category=Analytic code Severity=Vakavuus # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Ryhmä TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Luonut NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Ryhmä SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Jatka lukemista diff --git a/htdocs/langs/fi_FI/users.lang b/htdocs/langs/fi_FI/users.lang index 780bb758259..bc2fe0013df 100644 --- a/htdocs/langs/fi_FI/users.lang +++ b/htdocs/langs/fi_FI/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Luotu käyttäjä tulee ulkopuolinen käyttäjä (koska l IdPhoneCaller=Id puhelimeen soittajan NewUserCreated=Käyttäjä %s on luotu NewUserPassword=Salasana muutos %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Käyttäjän %s muuntamattomat UserDisabled=Käyttäjän %s pois päältä UserEnabled=Käyttäjän %s aktivoitu @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/fi_FI/withdrawals.lang b/htdocs/langs/fi_FI/withdrawals.lang index 62a312ab2eb..aba0cc2a0cc 100644 --- a/htdocs/langs/fi_FI/withdrawals.lang +++ b/htdocs/langs/fi_FI/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Suoraveloitus tilaus -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Odottaa StatusTrans=Lähetetty +StatusDebited=Debited StatusCredited=Hyvitetty +StatusPaid=Maksettu StatusRefused=Hylätty StatusMotif0=Määrittelemätön StatusMotif1=Säännös insuffisante @@ -77,13 +79,13 @@ StatusMotif8=Muu syy CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Vain toimisto CreateBanque=Vain pankki OrderWaiting=Odottelen hoito -NotifyTransmision=Irtisanominen Lähetetty -NotifyCredit=Irtisanominen Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Kansallinen lähetin määrä WithBankUsingRIB=Jos pankkitilit käyttäen RIB WithBankUsingBANBIC=Jos pankkitilit käyttäen IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Luottoa WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Määrä: %s
    Metode: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Vaihtoehto todellista tilaa ei ole asetettu, pysähdymme jälkeen simulointi +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/fi_FI/workflow.lang b/htdocs/langs/fi_FI/workflow.lang index 5a947b361bb..6fe6bba4b8b 100644 --- a/htdocs/langs/fi_FI/workflow.lang +++ b/htdocs/langs/fi_FI/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automaattinen luonti AutomaticClassification=Automaattinen luokitus diff --git a/htdocs/langs/fi_FI/zapier.lang b/htdocs/langs/fi_FI/zapier.lang index 2a84e392559..4465a404aee 100644 --- a/htdocs/langs/fi_FI/zapier.lang +++ b/htdocs/langs/fi_FI/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier Dolibarr-moduulille # Admin page # ZapierForDolibarrSetup = Zapier Dolibarr:lle asetukset +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/fr_BE/admin.lang b/htdocs/langs/fr_BE/admin.lang index 3d058e6b61d..5d24a311ccd 100644 --- a/htdocs/langs/fr_BE/admin.lang +++ b/htdocs/langs/fr_BE/admin.lang @@ -14,7 +14,6 @@ WarningModuleNotActive=Le module %s doit être activé WarningOnlyPermissionOfActivatedModules=Seules les permissions liées à des modules activés sont montrées ici. Vous pouvez activer d'autres modules sur la page Accueil->Configuration->Modules. FormToTestFileUploadForm=Formulaire pour tester l'upload de fichiers (selon la configuration) IfModuleEnabled=Note: oui ne fonctionne que si le module %s est activé -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. Module20Name=Propales Module30Name=Factures Target=Objectif diff --git a/htdocs/langs/fr_BE/cashdesk.lang b/htdocs/langs/fr_BE/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/fr_BE/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/fr_BE/main.lang b/htdocs/langs/fr_BE/main.lang index e425c275844..3042af1642f 100644 --- a/htdocs/langs/fr_BE/main.lang +++ b/htdocs/langs/fr_BE/main.lang @@ -19,7 +19,6 @@ FormatDateHourShort=%d/%m/%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias Update=Mise à jour DateStart=Date de début DateEnd=Date de fin diff --git a/htdocs/langs/fr_BE/stocks.lang b/htdocs/langs/fr_BE/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/fr_BE/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fr_BE/website.lang b/htdocs/langs/fr_BE/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/fr_BE/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/fr_BE/withdrawals.lang b/htdocs/langs/fr_BE/withdrawals.lang index c6b0130cce6..eb336cadcc0 100644 --- a/htdocs/langs/fr_BE/withdrawals.lang +++ b/htdocs/langs/fr_BE/withdrawals.lang @@ -1,5 +1,2 @@ # Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order StatusTrans=Envoyé -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/fr_CA/admin.lang b/htdocs/langs/fr_CA/admin.lang index 09df3da74ad..a0f940824b8 100644 --- a/htdocs/langs/fr_CA/admin.lang +++ b/htdocs/langs/fr_CA/admin.lang @@ -39,7 +39,6 @@ CompatibleAfterUpdate=Ce module nécessite une mise à jour de votre Dolibarr %s SeeInMarkerPlace=Voir dans Market place Updated=Mis à jour AchatTelechargement=Acheter / Télécharger -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. DevelopYourModuleDesc=Quelques solutions pour développer votre propre module ... InstrucToEncodePass=Pour chiffrer le mot de passe de la base dans le fichier de configuration conf.php, remplacer la ligne
    $dolibarr_main_db_pass="...";
    par
    $dolibarr_main_db_pass="crypted:%s"; InstrucToClearPass=Pour avoir le mot de passe de la base décodé (en clair) dans le fichier de configuration conf.php, remplacer dans ce fichier la ligne
    $dolibarr_main_db_pass="crypted:..."
    par
    $dolibarr_main_db_pass="%s" @@ -51,7 +50,6 @@ EMailsSetup=Configuration des courriels EmailSenderProfiles=Profils d'expéditeurs d'e-mails MAIN_MAIL_FORCE_SENDTO=Envoyer tous les emails à (au lieu des destinataires réels, à des fins de test) UserEmail=Courrier électronique de l'utilisateur -SubmitTranslationENUS=Si la traduction de cette langue est incomplète ou vous trouvez des erreurs , vous pouvez corriger cela en modifiant les fichiers dans le répertoire langs/%s et soumettre les fichiers modifiés sur dolibarr.org/forum ou pour les développeurs sur github.com/Dolibarr/dolibarr. ModulesSetup=Modules / Configuration de l'application ModuleFamilyHr=Gestion des ressources humaines (GRH) ModuleFamilyInterface=Interfaces avec les systèmes externes @@ -120,11 +118,9 @@ Permission23004=Exécuté Travail planifié Permission59001=Consulter les propositions commerciales Permission63002=Créer / modifier des ressources Permission63004=Relier les ressources aux événements de l'agenda -DictionaryProspectLevel=Potentiel du prospect DictionaryActions=Types d'événements de l'agenda DictionaryVAT=Taux de TPS/TVH ou de Taxes de Ventes DictionaryAccountancyJournal=Revues comptables -DictionaryProspectStatus=Status prospection SetupNotSaved=Le programme d'installation n'a pas été enregistré CurrentNext=Actuel / Suivant DefaultMaxSizeList=Longueur maximale des listes @@ -146,7 +142,6 @@ TranslationString=Chaîne de traduction WarningAtLeastKeyOrTranslationRequired=Un critère de recherche est requis au moins pour une clé ou une chaîne de traduction NewTranslationStringToShow=Nouvelle chaîne de traduction à afficher OriginalValueWas=La traduction originale est écrasée. La valeur d'origine était:

    %s -TotalNumberOfActivatedModules=Application / modules activés: %s / %s SearchOptim=Optimization des recherches PasswordGenerationPerso=Retour un mot de passe en fonction de votre configuration personnellement défini. PasswordPatternDesc=Description du modèle de mot de passe diff --git a/htdocs/langs/fr_CA/agenda.lang b/htdocs/langs/fr_CA/agenda.lang index 152de6fe0e9..94cf4102fab 100644 --- a/htdocs/langs/fr_CA/agenda.lang +++ b/htdocs/langs/fr_CA/agenda.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - agenda -ToUserOfGroup=À n'importe quel utilisateur du groupe NewCompanyToDolibarr=Le tiers %s a été créé PropalClassifiedBilledInDolibarr=Proposition %s classée facturée InvoicePaidInDolibarr=La facture %s a changé en payé @@ -13,6 +12,7 @@ OrderCreatedInDolibarr=L'ordre %s a été créé OrderDeliveredInDolibarr=Commande %s classée Délivrée ProposalDeleted=Proposition supprimée AgendaModelModule=Modèles de document pour l'événement +AgendaUrlOptions1=Vous pouvez aussi ajouter les paramètres suivants pour filtrer les réponses : AgendaShowBirthdayEvents=Afficher les dates d'anniversaire des contacts AgendaHideBirthdayEvents=Cacher les dates d'anniversaire des contacts ExportDataset_event1=Liste évênements de l'agenda diff --git a/htdocs/langs/fr_CA/cashdesk.lang b/htdocs/langs/fr_CA/cashdesk.lang index ac9a96f7d95..2f3da52b1f5 100644 --- a/htdocs/langs/fr_CA/cashdesk.lang +++ b/htdocs/langs/fr_CA/cashdesk.lang @@ -2,5 +2,3 @@ NoVAT=Pas de TVA (TAXE) pour cette vente BankToPay=Compte pour le paiement DolibarrReceiptPrinter=Imprimante de reçu Dolibarr -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/fr_CA/main.lang b/htdocs/langs/fr_CA/main.lang index 0da76b0aab2..75d2c1a9515 100644 --- a/htdocs/langs/fr_CA/main.lang +++ b/htdocs/langs/fr_CA/main.lang @@ -20,7 +20,6 @@ FormatDateHourSecShort=%d/%m/%Y %H:%M:%S FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M DatabaseConnection=Connexion à la base de donnée -EmptySearchString=Enter non empty search criterias ErrorCanNotCreateDir=Impossible de créer le dir %s ErrorCanNotReadDir=Impossible de lire le dir %s ErrorNoSocialContributionForSellerCountry=Erreur, aucun type de charges défini pour le pays '%s'. @@ -78,6 +77,7 @@ VATRate=Taux TPS/TVH Module=Module / Application Modules=Modules / Applications FilterOnInto=Critères de recherche '%s' dans les champs %s +FromDate=De FromLocation=De Approved=Approuver Opened=Ouverte diff --git a/htdocs/langs/fr_CA/members.lang b/htdocs/langs/fr_CA/members.lang index fc77987a5a6..94325f44baa 100644 --- a/htdocs/langs/fr_CA/members.lang +++ b/htdocs/langs/fr_CA/members.lang @@ -48,6 +48,7 @@ MemberStatusResiliated=Membre résilié MemberStatusResiliatedShort=Terminé MembersStatusToValid=Ébauche de membres MembersStatusResiliated=Membres résiliés +MemberStatusNoSubscriptionShort=Validée NewCotisation=Nouvelle contribution PaymentSubscription=Nouveau paiement de contribution SubscriptionEndDate=Date de fin de l'abonnement @@ -62,7 +63,7 @@ ListOfSubscriptions=Liste des abonnements AddMember=Créer un membre NoTypeDefinedGoToSetup=Aucun type de membre n'est défini. Aller au menu "Types de membres" SubscriptionRequired=Abonnement requis -MorPhy=Moral / Physique +MorPhy=La nature Reenable=Reignable ResiliateMember=Terminer un membre ConfirmResiliateMember=Êtes-vous sûr de vouloir mettre fin à ce membre? diff --git a/htdocs/langs/fr_CA/projects.lang b/htdocs/langs/fr_CA/projects.lang index 3f030415866..d1497e026ec 100644 --- a/htdocs/langs/fr_CA/projects.lang +++ b/htdocs/langs/fr_CA/projects.lang @@ -99,8 +99,6 @@ SelectTaskToAssign=Sélectionnez la tâche à affecter ... AssignTask=Attribuer ProjectOverview=Aperçu ManageOpportunitiesStatus=Utiliser des projets pour suivre les pistes / opportunités -ProjectsStatistics=Statistiques sur les projets / prospects -TasksStatistics=Statistiques sur les tâches de projet / chef de file TaskAssignedToEnterTime=Tâche attribuée. La saisie de cette tâche devrait être possible. IdTaskTime=Id temps de tâche OpenedProjectsByThirdparties=Projets ouverts par des tiers diff --git a/htdocs/langs/fr_CA/stocks.lang b/htdocs/langs/fr_CA/stocks.lang index 8c85ddc91fd..387c0a20f85 100644 --- a/htdocs/langs/fr_CA/stocks.lang +++ b/htdocs/langs/fr_CA/stocks.lang @@ -35,8 +35,6 @@ StockLimit=Limite de stock pour l'alerte IdWarehouse=Id entrepôt LieuWareHouse=Entrepôt de localisation WarehousesAndProductsBatchDetail=Entrepôts et produits (avec détail par lot / série) -AverageUnitPricePMPShort=Prix ​​moyen pondéré des intrants -AverageUnitPricePMP=Prix ​​moyen pondéré des intrants SellPriceMin=Prix ​​unitaire de vente EstimatedStockValueSellShort=Valeur à vendre EstimatedStockValueSell=Valeur à vendre @@ -63,7 +61,6 @@ WarehouseForStockIncrease=L'entrepôt %s sera utilisé pour augmenter les NbOfProductBeforePeriod=Quantité de produit %s en stock avant la période sélectionnée (<%s) NbOfProductAfterPeriod=Quantité de produit %s en stock après la période sélectionnée (> %s) MassMovement=Mouvement de masse -SelectProductInAndOutWareHouse=Sélectionnez un produit, une quantité, un entrepôt source et un entrepôt cible, puis cliquez sur "%s". Une fois que cela est fait pour tous les mouvements requis, cliquez sur "%s". RecordMovement=Transfert d'enregistrement ReceivingForSameOrder=Reçus pour cette commande StockMovementRecorded=Mouvements de stock enregistrés @@ -105,3 +102,4 @@ InventoryFlushed=Inventaire rincé ExitEditMode=Édition de sortie inventoryDeleteLine=Suppression de ligne RegulateStock=Réglez Stock +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fr_CA/website.lang b/htdocs/langs/fr_CA/website.lang index f6c1b71c174..5255b2f9da5 100644 --- a/htdocs/langs/fr_CA/website.lang +++ b/htdocs/langs/fr_CA/website.lang @@ -7,4 +7,3 @@ EditMenu=Menu Edition ViewSiteInNewTab=Afficher le site dans un nouvel onglet ViewPageInNewTab=Afficher la page dans un nouvel onglet ViewWebsiteInProduction=Afficher le site Web à l'aide d'URL d'accueil -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/fr_CA/withdrawals.lang b/htdocs/langs/fr_CA/withdrawals.lang index 14fe1d7b39d..d1c2577c8d4 100644 --- a/htdocs/langs/fr_CA/withdrawals.lang +++ b/htdocs/langs/fr_CA/withdrawals.lang @@ -4,7 +4,6 @@ NewStandingOrder=Nouveau décret direct StandingOrderToProcess=Procéder WithdrawalsReceipts=Ordres de débit direct WithdrawalReceipt=Ordre de débit direct -BankTransferReceipts=Credit transfer order LastWithdrawalReceipts=Derniers fichiers de débit direct %s WithdrawalsLines=Lignes de commande de débit direct NotPossibleForThisStatusOfWithdrawReceiptORLine=Pas encore possible. L'état de retrait doit être défini sur 'crédité' avant de déclarer le rejet sur des lignes spécifiques. @@ -37,16 +36,11 @@ StatusMotif6=Compte sans solde StatusMotif8=Autre raison CreateGuichet=Seul bureau CreateBanque=Seulement la banque -NotifyTransmision=Transmission de retrait -NotifyCredit=Crédit de retrait NumeroNationalEmetter=Numéro national de l'émetteur WithBankUsingRIB=Pour les comptes bancaires utilisant RIB WithBankUsingBANBIC=Pour les comptes bancaires utilisant IBAN / BIC / SWIFT CreditDate=Crédit sur WithdrawalFileNotCapable=Impossible de générer un fichier de retrait de retrait pour votre pays %s (Votre pays n'est pas pris en charge) -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Fichier de retrait SetToStatusSent=Définir le statut "Fichier envoyé" StatisticsByLineStatus=Statistiques par état des lignes RUMLong=Référence de mandat unique diff --git a/htdocs/langs/fr_CA/workflow.lang b/htdocs/langs/fr_CA/workflow.lang index 18356f83120..82d77d58424 100644 --- a/htdocs/langs/fr_CA/workflow.lang +++ b/htdocs/langs/fr_CA/workflow.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Configuration du module de workflow -WorkflowDesc=Ce module est conçu pour modifier le comportement des actions automatiques en application. Par défaut, le workflow est ouvert (vous pouvez faire les choses dans l'ordre que vous voulez) . Vous pouvez activer les actions automatiques qui vous intéressent . ThereIsNoWorkflowToModify=Il n'y a pas de modification de flux de travail disponibles avec les modules activés . descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Créer automatiquement une facture client après un contrat est validé diff --git a/htdocs/langs/fr_CH/admin.lang b/htdocs/langs/fr_CH/admin.lang index bdc794e1b31..c1d306ec390 100644 --- a/htdocs/langs/fr_CH/admin.lang +++ b/htdocs/langs/fr_CH/admin.lang @@ -1,4 +1,3 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. diff --git a/htdocs/langs/fr_CH/cashdesk.lang b/htdocs/langs/fr_CH/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/fr_CH/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/fr_CH/main.lang b/htdocs/langs/fr_CH/main.lang index 75d787bb95c..65f49b2ef5e 100644 --- a/htdocs/langs/fr_CH/main.lang +++ b/htdocs/langs/fr_CH/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%d/%m/%Y %I:%M %p FormatDateHourSecShort=%d/%m/%Y %I:%M:%S %p FormatDateHourTextShort=%d %b %Y, %I:%M %p FormatDateHourText=%d %B %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/fr_CH/stocks.lang b/htdocs/langs/fr_CH/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/fr_CH/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fr_CH/website.lang b/htdocs/langs/fr_CH/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/fr_CH/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/fr_CH/withdrawals.lang b/htdocs/langs/fr_CH/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/fr_CH/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/fr_CI/admin.lang b/htdocs/langs/fr_CI/admin.lang index bdc794e1b31..c1d306ec390 100644 --- a/htdocs/langs/fr_CI/admin.lang +++ b/htdocs/langs/fr_CI/admin.lang @@ -1,4 +1,3 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. diff --git a/htdocs/langs/fr_CI/cashdesk.lang b/htdocs/langs/fr_CI/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/fr_CI/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/fr_CI/main.lang b/htdocs/langs/fr_CI/main.lang index 0f9be27b22f..2e691473326 100644 --- a/htdocs/langs/fr_CI/main.lang +++ b/htdocs/langs/fr_CI/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/fr_CI/stocks.lang b/htdocs/langs/fr_CI/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/fr_CI/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fr_CI/website.lang b/htdocs/langs/fr_CI/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/fr_CI/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/fr_CI/withdrawals.lang b/htdocs/langs/fr_CI/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/fr_CI/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/fr_CM/admin.lang b/htdocs/langs/fr_CM/admin.lang index bdc794e1b31..c1d306ec390 100644 --- a/htdocs/langs/fr_CM/admin.lang +++ b/htdocs/langs/fr_CM/admin.lang @@ -1,4 +1,3 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. diff --git a/htdocs/langs/fr_CM/cashdesk.lang b/htdocs/langs/fr_CM/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/fr_CM/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/fr_CM/main.lang b/htdocs/langs/fr_CM/main.lang index 0f9be27b22f..2e691473326 100644 --- a/htdocs/langs/fr_CM/main.lang +++ b/htdocs/langs/fr_CM/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/fr_CM/stocks.lang b/htdocs/langs/fr_CM/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/fr_CM/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fr_CM/website.lang b/htdocs/langs/fr_CM/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/fr_CM/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/fr_CM/withdrawals.lang b/htdocs/langs/fr_CM/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/fr_CM/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/fr_FR/accountancy.lang b/htdocs/langs/fr_FR/accountancy.lang index 65a017711e0..6381caebbec 100644 --- a/htdocs/langs/fr_FR/accountancy.lang +++ b/htdocs/langs/fr_FR/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Permettre de gérer un nombre différent de zéro à la f BANK_DISABLE_DIRECT_INPUT=Désactiver la saisie directe de transactions en banque ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Activer l'export brouillon sur les journaux comptables ACCOUNTANCY_COMBO_FOR_AUX=Activer la liste déroulante pour le compte auxiliaire (peut être lent si vous avez beaucoup de tiers) +ACCOUNTING_DATE_START_BINDING=Définissez une date pour commencer la liaison et le transfert en comptabilité. En dessous de cette date, les transactions ne seront jamais transférées à la comptabilité. ACCOUNTING_SELL_JOURNAL=Journal des ventes ACCOUNTING_PURCHASE_JOURNAL=Journal des achats @@ -278,12 +279,13 @@ GeneralLedgerSomeRecordWasNotRecorded=Certaines des opérations n'ont pu être j NoNewRecordSaved=Plus d'enregistrements à journaliser ListOfProductsWithoutAccountingAccount=Liste des produits non liés à un compte comptable ChangeBinding=Changer les liens -Accounted=Comptabilisé -NotYetAccounted=Pas encore comptabilisé +Accounted=En comptabilité +NotYetAccounted=Pas encore en comptabilité ShowTutorial=Afficher le tutoriel NotReconciled=Non rapproché ## Admin +BindingOptions=Options de liaisons avec les codes comptables ApplyMassCategories=Application en masse des catégories AddAccountFromBookKeepingWithNoCategories=Comptes disponibles pas encore dans le groupe personnalisé CategoryDeleted=Le groupe de comptes comptables a été supprimé diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index c4025fb1577..d7842084c17 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -289,6 +289,7 @@ MAIN_MAIL_SMTPS_ID=ID SMTP (si le serveur d'envoi nécessite une authentificatio MAIN_MAIL_SMTPS_PW=Mot de passe SMTP (si le serveur d'envoi nécessite une authentification) MAIN_MAIL_EMAIL_TLS=Utilisation du chiffrement TLS (SSL) MAIN_MAIL_EMAIL_STARTTLS=Utiliser le cryptage TTS (STARTTLS) +MAIN_MAIL_EMAIL_SMTP_ALLOW_SELF_SIGNED=Authorise les certificats auto-signés MAIN_MAIL_EMAIL_DKIM_ENABLED=Utiliser DKIM pour signer les emails MAIN_MAIL_EMAIL_DKIM_DOMAIN=Nom de domaine pour la signature DKIM MAIN_MAIL_EMAIL_DKIM_SELECTOR=Nom du sélecteur DKIM @@ -300,8 +301,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Expéditeur par défaut des e-mails pour les envois m UserEmail=Email utilisateur CompanyEmail=Email organization FeatureNotAvailableOnLinux=Fonctionnalité non disponible sous systèmes Unix. Tester votre sendmail localement. +FixOnTransifex=Corriger la traduction sur la plate-forme en ligne de traduction du projet SubmitTranslation=Si la traduction de cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez corriger cela en éditant les fichiers dans le répertoire langs/%s et soumettre vos changements sur www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Si la traduction pour cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez les corriger en éditant les fichiers dans le répertoire langs/%s et soumettre les modifications sur le forum dolibarr.org/forum ou pour les développeurs sur github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=Si la traduction pour cette langue est incomplète ou si vous trouvez des erreurs, vous pouvez les corriger en éditant les fichiers dans le dossier langs/%s et soumettre les fichiers modifiés sur le forum dolibarr.org/forum ou, pour les développeurs, via une PR sur github.com/Dolibarr/dolibarr ModuleSetup=Configuration du module ModulesSetup=Configuration Modules/Application ModuleFamilyBase=Système @@ -387,7 +389,7 @@ SecurityToken=Clé de sécurisation des URLs NoSmsEngine=Aucun gestionnaire d'envoi de SMS n'est disponible. Les gestionnaires d'envois SMS ne sont pas installés en standard, car dépendent d'un fournisseur externe, mais vous pourrez en trouver depuis la plateforme %s PDF=PDF PDFDesc=Options globales sur la génération des PDF -PDFAddressForging=Règles de fabrication des zones adresses +PDFAddressForging=Règles pour le contenu des sections Adresse HideAnyVATInformationOnPDF=Masquer toutes les informations relatives à la Taxe de vente / TVA sur les PDF générés PDFRulesForSalesTax=Règles pour la taxe de vente / TVA PDFLocaltax=Règles pour %s @@ -408,7 +410,9 @@ PriceBaseTypeToChange=Modifier sur les prix dont la référence de base est le MassConvert=Convertir en masse PriceFormatInCurrentLanguage=Format de prix dans la langue actuelle String=Chaîne +String1Line=Chaîne de caractères (1 ligne) TextLong=Texte long +TextLongNLines=Texte long (n lignes) HtmlText=Texte HTML Int=Numérique entier Float=Décimal @@ -475,7 +479,7 @@ ModuleCompanyCodeCustomerDigitaria=%s suivi du nom de client tronqué du nombre ModuleCompanyCodeSupplierDigitaria=%s suivi du nom du fournisseur tronqué du nombre de caractères: %s pour le code comptable fournisseur. Use3StepsApproval=Par défaut, les commandes fournisseurs nécessitent d'être créées et approuvées par 2 utilisateurs différents (une étape/utilisateur pour créer et une étape/utilisateur pour approuver. Notez que si un utilisateur à les deux permissions, ces deux actions sont effectuées en une seule fois). Cette option ajoute la nécessité d'une approbation par une troisième étape/utilisateur, si le montant de la commande est supérieur au montant d'une valeur définie (soit 3 étapes nécessaire: 1 =Validation, 2=Première approbation et 3=seconde approbation si le montant l'exige).
    Laissez le champ vide si une seule approbation (2 étapes) est suffisante, placez une valeur très faible (0.1) si une deuxième approbation (3 étapes) est toujours exigée. UseDoubleApproval=Activer l'approbation en trois étapes si le montant HT est supérieur à... -WarningPHPMail=Attention : Il est préférable de configurer les emails sortant pour utiliser le serveur email de votre fournisseur plutôt que la configuration par défaut. Certains fournisseurs email (comme Yahoo) ne permettent pas l'envoi d'e-mails depuis un autre serveur que le leur si l'adresse d'envoi utilisée est une adresse autre que la leur. Votre configuration actuelle utilise le serveur de l'application pour l'envoi d'e-mails et non le serveur de votre fournisseur de messagerie, aussi certains destinataires (ceux compatibles avec le protocole restrictif DMARC) demanderont au fournisseur d'email si ils peuvent accepter l'email et certains fournisseurs (comme Yahoo) peuvent répondre "non" car le serveur utilisé pour l'envoi n'est pas un serveur appartenant au fournisseur, aussi certains de vos emails envoyés peuvent ne pas etre accepté (faites attention aussi aux quotas de votre fournisseur d'email).
    SI votre fournisseur d'email (comme Yahoo) impose cette restriction, vous devrez modifier votre configuration et opter pour l'autre méthode d'envoi "SMTP server" et saisir les identifiants SMTP de votre compte fournis par votre fournisseur d'e-mail (à demander à votre fournisseur d'e-mail) +WarningPHPMail=Attention : La configuration d'envoi d'email utilise une configuration par défaut. Il est préférable de configurer les emails sortant pour utiliser le serveur email de votre fournisseur plutôt que la configuration par défaut pour plusieurs raisons: WarningPHPMail2=Si votre fournisseur de messagerie SMTP a besoin de restreindre le client de messagerie à certaines adresses IP (très rare), voici l'adresse IP du mail user agent (MUA) de votre application CRM ERP : %s . WarningPHPMailSPF=Si le nom de domaine de votre adresse e-mail d'expéditeur est protégé par SPF (demandez à votre fournisseur d'e-mail), vous devez inclure les adresses IP suivantes dans l'enregistrement SPF du DNS de votre domaine: %s . ClickToShowDescription=Cliquer pour afficher la description @@ -543,9 +547,9 @@ Module54Desc=Gestion des contrats (services ou abonnements récurrents) Module55Name=Codes-barres Module55Desc=Gestion des codes-barres Module56Name=Paiement par virement bancaire -Module56Desc=Gestion des paiements par virement bancaire. Cela inclut la génération de fichiers SEPA pour les pays européens. -Module57Name=Prélèvements -Module57Desc=Gestion des paiements par prélèvements. Inclut également la génération du fichier de virement des paiements SEPA pour les pays européens. +Module56Desc=Gestion des paiements de fournisseurs par virement bancaire. Est incluse la génération des fichiers SEPA pour les pays européens. +Module57Name=Règlement par Prélèvement +Module57Desc=Gestion des règlements clients par prélèvements. Est incluse la génération des fichiers SEPA pour les pays européens. Module58Name=ClickToDial Module58Desc=Intégration d'un système de « ClickToDial » (Asterisk, …) Module59Name=Bookmark4u @@ -836,9 +840,16 @@ Permission532=Créer/modifier les services Permission534=Supprimer les services Permission536=Voir/gérer les services cachés Permission538=Exporter les services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Lire les Nomenclatures (BOM) Permission651=Créer/modifier les Nomenclatures (BOM) Permission652=Supprimer les Nomenclatures (BOM) +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Consulter les dons Permission702=Créer/modifier les dons Permission703=Supprimer les dons @@ -848,6 +859,8 @@ Permission773=Supprimer les notes de frais Permission774=Lire toutes les notes de frais (même pour les utilisateurs en dehors de ma hierarchie) Permission775=Approuver les notes de frais Permission776=Payer les notes de frais +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Exporter les notes de frais Permission1001=Consulter les stocks Permission1002=Créer/modifier entrepôts @@ -900,6 +913,7 @@ Permission2515=Administrer les rubriques de documents Permission2801=Utiliser un client FTP en mode lecture (parcours et téléchargement de fichiers) Permission2802=Utiliser un client FTP en mode écriture (suppression et envoi de fichiers) Permission3200=Lire les événements archivés et leurs empreintes +Permission3301=Generate new modules Permission4001=Voir les employés Permission4002=Créer/modifier les employés Permission4003=Supprimer les employés @@ -947,7 +961,8 @@ Permission63003=Supprimer les ressources Permission63004=Lier les ressources aux événements de l'agenda DictionaryCompanyType=Type de Tiers DictionaryCompanyJuridicalType=Formes juridiques des Tiers -DictionaryProspectLevel=Niveau de potentiel des prospects +DictionaryProspectLevel=Niveau de prospection des sociétés +DictionaryProspectContactLevel=Potentiel de prospection des contacts DictionaryCanton=Etats/Province DictionaryRegion=Régions DictionaryCountry=Pays @@ -977,7 +992,8 @@ DictionaryEMailTemplates=Modèles des courriels DictionaryUnits=Unités DictionaryMeasuringUnits=Unités de mesure DictionarySocialNetworks=Réseaux sociaux -DictionaryProspectStatus=Statut prospect +DictionaryProspectStatus=Statut de prospection des sociétés +DictionaryProspectContactStatus=Statut de prospection des contacts DictionaryHolidayTypes=Type de congés DictionaryOpportunityStatus=Statut d'opportunités pour les affaires/projets DictionaryExpenseTaxCat=Note de frais - catégories de déplacement @@ -1076,7 +1092,7 @@ LoginPage=Page de connexion BackgroundImageLogin=Image de fond PermanentLeftSearchForm=Zone de recherche permanente du menu de gauche DefaultLanguage=Langue par défaut -EnableMultilangInterface=Activer l'interface multi-langue +EnableMultilangInterface=Activer la prise en charge multilingue pour la relation client ou fournisseur EnableShowLogo=Afficher le logo de la société dans le menu CompanyInfo=Société/Organisation CompanyIds=Identifiants société/organisation @@ -1240,6 +1256,7 @@ WarningAtLeastKeyOrTranslationRequired=Un critère de recherche est nécessaire NewTranslationStringToShow=Nouvelle traduction à afficher OriginalValueWas=La traduction d'origine est écrasée. La valeur initiale était:

    %s TransKeyWithoutOriginalValue=Vous avez forcé une nouvelle traduction pour la clé de traduction '%s' qui n'existe dans aucun fichier de langue +TitleNumberOfActivatedModules=Modules activés TotalNumberOfActivatedModules=Modules activés : %s / %s YouMustEnableOneModule=Vous devez activer au moins une fonctionnalité ClassNotFoundIntoPathWarning=La classe %s n'a pas été trouvée dans le chemin PHP @@ -1686,8 +1703,8 @@ AGENDA_SHOW_LINKED_OBJECT=Afficher l'objet lié dans la vue agenda ##### Clicktodial ##### ClickToDialSetup=Configuration du module Click To Dial ClickToDialUrlDesc=URL appelée quand un clic sur l'icône téléphone est fait. Dans l'URL, vous pouvez utiliser les tags
    __PHONETO__ qui sera remplacée par le numéro de téléphone de la personne à appeler
    __PHONEFROM__ qui sera remplacée par le numéro de l'appelant (vous)
    __LOGIN__ qui sera remplacée par l'identifiant d'accès de l'utilisateur à l'application d'appel (à définir sur la fiche utilisateur) et
    __PASS__ qui sera remplacée par le mot de passe d'accès de l'utilisateur à l'application d'appel (également à définir sur la fiche utilisateur). -ClickToDialDesc=Ce module permet de rendre les numéros de téléphone cliquables. Un clic sur cette icône appellera votre téléphone à composer le numéro de téléphone. Cela peut être utilisé pour appeler un système de centre d'appels de Dolibarr qui peut appeler le numéro de téléphone d'un système SIP, par exemple. -ClickToDialUseTelLink=Utiliser un lien «Tel.» sur les numéros de téléphone +ClickToDialDesc=Ce module permet de rendre les numéros de téléphone cliquables lorsque vous utilisez l'application sur un ordinateur de bureau. Un clic sur cette icône composera le numéro de téléphone. Cela peut être utilisé pour commencer une conversation avec un soft phone sur votre bureau ou lorsque vous utilisez un système basé sur le protocole SIP par exemple. Note: Sur un smartphone, les numéros de téléphones sont toujours clicables. +ClickToDialUseTelLink=Utiliser un lien "tel:" sur les numéros de téléphone ClickToDialUseTelLinkDesc=Utilisez cette méthode si vos utilisateurs ont un softphone ou une interface de logiciel installé sur un même ordinateur que le navigateur, et a appelé lorsque vous cliquez sur un lien dans votre navigateur qui commencent par "tel:". Si vous avez besoin d'une solution de serveur complet (pas besoin d'installation locale du logiciel), vous devez définir ceci à "Non" et remplir le champ suivant. ##### Point Of Sale (CashDesk) ##### CashDesk=Point de Vente @@ -1817,6 +1834,7 @@ EnterAnyCode=Ce champ contient une référence pour identifier le champ. Entrez Enter0or1=Saisir 0 ou 1  UnicodeCurrency=Saisissez ici entre accolades, la liste du numéro des octets qui représentent le symbole de la monnaie. Pour exemple: pour $, entrez [36] - pour le Real Brésilien R$ [82,36] - pour l'euro €, entrez [8364] ColorFormat=La couleur RVB au format HEX est, par exemple: FF0000 +PictoHelp=Nom de l'icône au format Dolibarr ("image.png" si elle se trouve dans le dossier du thème activé, "image.png@nom_du_module" si elle se trouve dans les dossiers du module) PositionIntoComboList=Position de la ligne dans des listes déroulantes SellTaxRate=Taux de TVA RecuperableOnly=Oui pour une TVA "Non Perçue mais Récupérable" dédiée à certains pays comme la France. Gardez la valeur à "Non" dans tous les autres cas. @@ -1843,10 +1861,11 @@ MailToSendSupplierRequestForQuotation=Demande de devis MailToSendSupplierOrder=Commandes fournisseurs MailToSendSupplierInvoice=Factures fournisseur MailToSendContract=Contrats +MailToSendReception=Réceptions MailToThirdparty=Tiers MailToMember=Adhérents MailToUser=Utilisateurs -MailToProject=Fiche projets +MailToProject=Projets MailToTicket=Tickets ByDefaultInList=Afficher par défaut sur les vues listes YouUseLastStableVersion=Vous utilisez la dernière version stable @@ -1856,6 +1875,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s est disponible. La ver ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s est disponible. La version %s est une version de maintenance, aussi elle ne contient que des correctifs de bugs. Nous recommandons à toute personne utilisant une version plus ancienne de migrer vers celle-ci. En tant que version de maintenance, aucune nouvelle fonctionnalité n'est ajoutée, ni modification de format de données. Vous pouvez télécharger cette version à partir de la zone de téléchargement du portail https://www.dolibarr.org (sous-répertoire "Versions stables"). Vous pouvez lire le ChangeLog pour la liste complète des changements. MultiPriceRuleDesc=Quand l'option "Plusieurs niveaux de prix par produit/service" est activée, vous pouvez définir différents prix (un par niveau de prix) pour chaque produits. Pour gagner du temps, vous pouvez entrer ici une règle pour avoir un prix pour chaque niveau calculé automatiquement. Cette page est destiné à vous faire gagner du temps mais n'est utile que si vos prix pour chaque niveaux sont relatif au premier niveau. Vous pouvez ignorer cette page dans la plupart des cas. ModelModulesProduct=Modèles des documents de produits +WarehouseModelModules=Modèles pour les documents des entrepôts ToGenerateCodeDefineAutomaticRuleFirst=Pour pouvoir générer automatiquement des codes, vous devez d'abord définir un gestionnaire de numérotation pour définir automatiquement les numéros du code-barre. SeeSubstitutionVars=Voir * note pour la liste des variables de substitutions possibles SeeChangeLog=Voir le fichier ChangeLog (anglais) @@ -1881,7 +1901,7 @@ UrlToGetKeyToUseAPIs=Url pour obtenir le jeton pour utiliser l'API (une fois le ListOfAvailableAPIs=Liste des APIs disponibles activateModuleDependNotSatisfied=Le module "%s" dépend du module "%s" qui est manquant, aussi le module "%1$s" peut ne pas fonctionner correctement. Merci d'installer le module "%2$s" ou désactiver le module "%1$s" si vous ne souhaitez pas avoir de mauvaise surprise CommandIsNotInsideAllowedCommands=La commande que vous essayez d'exécuter ne figure pas dans la liste des commandes autorisées définies dans le paramètre $dolibarr_main_restrict_os_commands du fichier conf.php . -LandingPage=Page cible +LandingPage=Page d'accueil SamePriceAlsoForSharedCompanies=Si vous utilisez un module multi-société, avec le choix «prix unique», le prix sera aussi le même pour toutes les sociétés si les produits sont partagés entre les environnements ModuleEnabledAdminMustCheckRights=Le module a été activé. Les permissions pour le(s) module(s) activé(s) ont été donnés aux utilisateurs admin uniquement. Vous devrez peut-être accorder des autorisations aux autres utilisateurs ou groupes manuellement si nécessaire. UserHasNoPermissions=Cet utilisateur n'a pas de permission définie @@ -1894,6 +1914,7 @@ MAIN_PDF_MARGIN_LEFT=Marge gauche sur les PDF MAIN_PDF_MARGIN_RIGHT=Marge droite sur les PDF MAIN_PDF_MARGIN_TOP=Marge haute sur les PDF MAIN_PDF_MARGIN_BOTTOM=Marge bas sur les PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Hauteur du logo sur les PDFs NothingToSetup=Aucune configuration particulière n'est requise pour ce module. SetToYesIfGroupIsComputationOfOtherGroups=Réglez ceci sur Oui si ce groupe est un calcul d'autres groupes EnterCalculationRuleIfPreviousFieldIsYes=Entrez la règle de calcul si le champ précédent a été défini sur Oui (par exemple, 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1954,14 @@ NothingProcessed=Aucune action faite XEmailsDoneYActionsDone=%s e-mails qualifiés, %s e-mails traités avec succès (pour %s enregistrements/actions réalisés) RecordEvent=Enregistrer événement email entrant CreateLeadAndThirdParty=Créer opportunité (et tiers si nécessaire) -CreateTicketAndThirdParty=Créer un ticket (et un Tiers si nécessaire) +CreateTicketAndThirdParty=Créer un ticket (avec un lien vers un tiers s'il a été chargé par une opération précédente) CodeLastResult=Dernier code de retour NbOfEmailsInInbox=Nombre de courriels dans le répertoire source LoadThirdPartyFromName=Charger le Tiers en cherchant sur %s (chargement uniquement) LoadThirdPartyFromNameOrCreate=Charger le Tiers en cherchant sur %s (créer si non trouvé) -WithDolTrackingID=Référence Dolibarr trouvée dans l'ID du message -WithoutDolTrackingID=Référence Dolibarr non trouvée dans l'ID du message +WithDolTrackingID=Message d'une conversation initiée par un premier mail envoyé depuis Dolibarr +WithoutDolTrackingID=Message d'une conversation initiée par un premier e-mail NON envoyé depuis Dolibarr +CreateCandidature=Créer une candidature FormatZip=Zip MainMenuCode=Code d'entrée du menu (mainmenu) ECMAutoTree=Afficher l'arborescence GED automatique @@ -1955,7 +1977,7 @@ ConfirmUnactivation=Confirmer réinitialisation du module OnMobileOnly=Sur petit écran (smartphone) uniquement DisableProspectCustomerType=Désactiver le type de tiers "Prospect + Client" (le tiers doit donc être un client potentiel ou un client, mais ne peut pas être les deux) MAIN_OPTIMIZEFORTEXTBROWSER=Simplifier l'interface pour les malvoyants -MAIN_OPTIMIZEFORTEXTBROWSERDesc=Activez cette option si vous êtes une personne malvoyante ou utilisez l'application à partir d'un navigateur de texte tel que Lynx ou Links. +MAIN_OPTIMIZEFORTEXTBROWSERDesc=Activez cette option si vous êtes une personne malvoyante ou si vous utilisez l'application à partir d'un navigateur de texte tel que Lynx ou Links. MAIN_OPTIMIZEFORCOLORBLIND=Changer la couleur de l'interface pour daltoniens MAIN_OPTIMIZEFORCOLORBLINDDesc=Activez cette option si vous êtes daltonien. Dans certains cas, l'interface changera la configuration des couleurs pour augmenter le contraste. Protanopia=Protanopia @@ -1981,7 +2003,7 @@ ImportSetup=Configuration du module Import InstanceUniqueID=ID unique de l'instance SmallerThan=Plus petit que LargerThan=Plus grand que -IfTrackingIDFoundEventWillBeLinked=Notez que si un ID de suivi est trouvé dans le courrier électronique entrant, l'événement sera automatiquement lié aux bons objets. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Avec un compte GMail, si vous avez activé la validation en 2 étapes, il est recommandé de créer un deuxième mot de passe dédié à l'application, au lieu d'utiliser votre propre mot de passe de compte, à partir de https://myaccount.google.com/. EmailCollectorTargetDir=Il peut être souhaitable de déplacer l'e-mail dans un autre tag/répertoire lorsqu'il a été traité avec succès. Définissez simplement une valeur ici pour utiliser cette fonction (N'utilisez PAS de caractères spéciaux dans le nom). Notez que vous devez également utiliser un compte de connexion en lecture/écriture. EmailCollectorLoadThirdPartyHelp=Vous pouvez utiliser cette action pour utiliser le contenu de l'e-mail pour rechercher et charger un tiers existant dans votre base de données. Le tiers trouvé (ou créé) sera utilisée pour les actions suivantes qui en ont besoin. Dans le champ 'Paramètre', vous pouvez utiliser par exemple 'EXTRACT: BODY:Name:\\s([^\\s]*)' si vous souhaitez extraire le nom du tiers d'une chaîne 'Name: nom du tiers' trouvé dans le corps du message. @@ -2005,3 +2027,7 @@ RssNote=Remarque: Chaque définition de flux RSS fournit un widget que vous deve JumpToBoxes=Aller à la Configuration -> Widgets MeasuringUnitTypeDesc=Utilisez ici une valeur comme "taille", "surface", "volume", "poids", "temps" MeasuringScaleDesc=L'échelle est le nombre de positions où vous devez déplacer la partie décimale pour qu'elle corresponde à l'unité de référence par défaut. Pour le type d'unité "temps", c'est le nombre de secondes. Les valeurs comprises entre 80 et 99 sont des valeurs réservées. +TemplateAdded=Modèle ajouté +TemplateUpdated=Modèle mis à jour +TemplateDeleted=Modèle supprimé +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/fr_FR/agenda.lang b/htdocs/langs/fr_FR/agenda.lang index 2e0ac6e5ed1..3b7a9f0e8c0 100644 --- a/htdocs/langs/fr_FR/agenda.lang +++ b/htdocs/langs/fr_FR/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Nombre d'événements ListOfActions=Liste des événements EventReports=Rapport des évènements Location=Lieu -ToUserOfGroup=à tout utilisateur du groupe +ToUserOfGroup=Assigné à tout utilisateur du groupe EventOnFullDay=Événement sur la(les) journée(s) MenuToDoActions=Événements incomplets MenuDoneActions=Événements terminés @@ -86,6 +86,8 @@ ProposalDeleted=Proposition commerciale supprimée OrderDeleted=Commande supprimée InvoiceDeleted=Facture supprimée DraftInvoiceDeleted=Facture brouillon supprimée +CONTACT_CREATEInDolibarr=Contact/Adresse %s créé +CONTACT_DELETEInDolibarr=Contact/Adresse %s supprimé PRODUCT_CREATEInDolibarr=Produit %s créé PRODUCT_MODIFYInDolibarr=Produit %s modifié PRODUCT_DELETEInDolibarr=Produit%ssupprimé @@ -121,10 +123,10 @@ MRP_MO_CANCELInDolibarr=OF annulé AgendaModelModule=Modèle de document pour les événements DateActionStart=Date de début DateActionEnd=Date de fin -AgendaUrlOptions1=Vous pouvez aussi ajouter les paramètres suivants pour filtrer les réponses : +AgendaUrlOptions1=Vous pouvez aussi ajouter les paramètres suivants pour filtrer les réponses : AgendaUrlOptions3=logina=%s pour limiter l'export aux actions dont l'utilisateur %s est propriétaire. -AgendaUrlOptionsNotAdmin=logina=!%s pour limiter l'export aux actions non assignées à l'utilisateur %s. -AgendaUrlOptions4=logint=%s pour limiter l'export aux actions assignées à l'utilisateur %s (propriétaire et autres). +AgendaUrlOptionsNotAdmin=logina=!%s pour limiter l'export aux actions n'appartenant pas à l'utilisateur %s. +AgendaUrlOptions4=logint=%spour limiter l'export aux actions assignées à l'utilisateur %s (propriétaire et autres). AgendaUrlOptionsProject=project=__PROJECT_ID__ pour restreindre aux événements associés au projet __PROJECT_ID__. AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto pour exclure les événements automatiques. AgendaUrlOptionsIncludeHolidays=includeholidays=1 pour inclure les événements de type congé. @@ -158,3 +160,10 @@ DateStartPlusOne=Date de début + 1 heure SetAllEventsToTodo=Réglez tous les événements à "A faire" SetAllEventsToInProgress=Définir tous les événements à "En cours" SetAllEventsToFinished=Définir tous les événements sur "Terminés" +ReminderTime=Délai de rappel avant l'événement +TimeType=Type de durée +ReminderType=Type de rappel +AddReminder=Créer une notification de rappel automatique pour cet évènement +ErrorReminderActionCommCreation=Erreur lors de la création de la notification de rappel de cet événement +BrowserPush=Notification navigateur +EventReminder=Rappel événement diff --git a/htdocs/langs/fr_FR/bills.lang b/htdocs/langs/fr_FR/bills.lang index 5da6bda8133..37745a85490 100644 --- a/htdocs/langs/fr_FR/bills.lang +++ b/htdocs/langs/fr_FR/bills.lang @@ -58,7 +58,7 @@ SuppliersInvoices=Factures fournisseurs SupplierBill=Facture fournisseur SupplierBills=Factures fournisseurs Payment=Règlement -PaymentBack=Rembourser +PaymentBack=Remboursement CustomerInvoicePaymentBack=Rembourser Payments=Règlements PaymentsBack=Remboursements diff --git a/htdocs/langs/fr_FR/boxes.lang b/htdocs/langs/fr_FR/boxes.lang index b1c47ec14d1..e2964afd6a3 100644 --- a/htdocs/langs/fr_FR/boxes.lang +++ b/htdocs/langs/fr_FR/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=les %s derniers fournisseurs enregistrés BoxTitleLastModifiedSuppliers=Les %s derniers fournisseurs modifiés BoxTitleLastModifiedCustomers=Les %s derniers clients modifiés BoxTitleLastCustomersOrProspects=Les %s derniers clients ou prospects -BoxTitleLastCustomerBills=Les %s dernières factures client -BoxTitleLastSupplierBills=Les %s dernières factures fournisseurs +BoxTitleLastCustomerBills=Les %s dernières factures clients modifiées +BoxTitleLastSupplierBills=Les %s dernières factures fournisseurs modifiées BoxTitleLastModifiedProspects=Les %s derniers prospects modifiés BoxTitleLastModifiedMembers=Les %s derniers adhérents BoxTitleLastFicheInter=Les %s dernières interventions modifiées @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Les %s dernières commandes fournisseurs mo BoxTitleLastModifiedCustomerBills=Les %s dernières factures clients modifiées BoxTitleLastModifiedCustomerOrders=Les %s dernières commandes clients modifiées BoxTitleLastModifiedPropals=Les %s dernières propositions commerciales modifiées +BoxTitleLatestModifiedJobPositions=Les %s dernières offres d'emploi modifiées +BoxTitleLatestModifiedCandidatures=Les %s dernières candidatures modifiées ForCustomersInvoices=Factures clients ForCustomersOrders=Commandes clients ForProposals=Propositions commerciales @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Le compte d'attente n'est pas défini BoxLastCustomerShipments=Dernières expéditions clients BoxTitleLastCustomerShipments=Les %s dernières expéditions clients NoRecordedShipments=Aucune expédition client +# Pages +AccountancyHome=Comptabilité diff --git a/htdocs/langs/fr_FR/cashdesk.lang b/htdocs/langs/fr_FR/cashdesk.lang index 8ed5994e3f3..525062f1f32 100644 --- a/htdocs/langs/fr_FR/cashdesk.lang +++ b/htdocs/langs/fr_FR/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=Module POS (PDV) BasicPhoneLayout=Utiliser une interface basique pour les smartphones SetupOfTerminalNotComplete=La configuration du terminal %s n'est pas terminée DirectPayment=Paiement direct -DirectPaymentButton=Bouton de paiement direct en espèces +DirectPaymentButton=Ajouter un bouton "Paiement direct en espèces" InvoiceIsAlreadyValidated=La facture est déjà validée NoLinesToBill=Aucune ligne à facturer CustomReceipt=Reçu personnalisé @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Module externe avec fonctionnalités suppléme PrintMethod=Méthode d'impression ReceiptPrinterMethodDescription=Méthode puissante avec beaucoup de paramètres. Entièrement personnalisable avec des modèles. Impossible d'imprimer à partir du cloud. ByTerminal=Par terminal -TakeposNumpadUsePaymentIcon=Utiliser l'icône de paiement sur le pavé numérique +TakeposNumpadUsePaymentIcon=Utilisez un icône au lieu du texte sur les boutons de paiement du pavé numérique CashDeskRefNumberingModules=Module de numérotation pour le POS CashDeskGenericMaskCodes6 =
    La balise {TN} est utilisée pour ajouter le numéro de terminal TakeposGroupSameProduct=Regrouper les mêmes lignes de produits StartAParallelSale=Lancer une nouvelle vente en parallèle -ControlCashOpening=Popup d'ouverture de caisse à l'ouverture +ControlCashOpening=Fenêtre de contrôle de caisse à l'ouverture du PDV CloseCashFence=Clôturer la caisse CashReport=Rapport de caisse MainPrinterToUse=Imprimante principale à utiliser @@ -115,5 +115,10 @@ ScanToOrder=Scannez le code QR pour commander Appearance=Apparence HideCategoryImages=Masquer les images de catégorie HideProductImages=Masquer les images de produits -NumberOfLinesToShow=Nombre de lignes d'image à afficher +NumberOfLinesToShow=Nombre de lignes d'images à afficher DefineTablePlan=Définir le plan des tables +GiftReceiptButton=Ajouter un bouton "Reçu cadeau" +GiftReceipt=Reçu cadeau +ModuleReceiptPrinterMustBeEnabled=Le module Imprimante de reçus doit d'abord avoir été activée +AllowDelayedPayment=Autoriser le paiement différé +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang index 6245901d321..bc79d32d709 100644 --- a/htdocs/langs/fr_FR/compta.lang +++ b/htdocs/langs/fr_FR/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Charge sociale ou fiscale SocialContributions=Charges fiscales ou sociales SocialContributionsDeductibles=Charge ou taxe déductible SocialContributionsNondeductibles=Charge ou taxe non déductible +DateOfSocialContribution=Date de la charge fiscale ou sociale LabelContrib=Libellé de la dépense TypeContrib=Type de la charge MenuSpecialExpenses=Dépenses spéciales diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang index 5bfcd36ce0b..97d3e48f512 100644 --- a/htdocs/langs/fr_FR/errors.lang +++ b/htdocs/langs/fr_FR/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=La nouvelle valeur ne peut être égale à l'anci ErrorFailedToValidatePasswordReset=Echec de la réinitialisation du mot de passe. Il est possible que ce lien ait déjà été utilisé (l'utilisation de ce lien ne fonctionne qu'une fois). Si ce n'est pas le cas, essayez de recommencer le processus de réinitialisation de mot de passe depuis le début. ErrorToConnectToMysqlCheckInstance=Echec de la connection au serveur de base de données. Vérifier que votre serveur est bien lancé (par exemple, avec MySQL/MariaDB, vous pouvez le lancer depuis la ligne de commande avec 'sudo service mysql start'). ErrorFailedToAddContact=Echec à l'ajout du contact -ErrorDateMustBeBeforeToday=La date ne peut pas être supérieure à aujourd'hui +ErrorDateMustBeBeforeToday=La date doit être inférieure à la date courante +ErrorDateMustBeInFuture=La date doit être postérieure à la date courante ErrorPaymentModeDefinedToWithoutSetup=Un mode de paiement a été défini de type %s mais la configuration du module Facture n'a pas été complétée pour définir les informations affichées pour ce mode de paiement. ErrorPHPNeedModule=Erreur, votre PHP doit avoir le module %s installé pour utiliser cette fonctionnalité. ErrorOpenIDSetupNotComplete=Vous avez configuré Dolibarr pour accepter l'authentication OpenID, mais l'URL du service OpenID n'est pas défini dans la constante %s @@ -213,7 +214,7 @@ ErrorObjectMustHaveLinesToBeValidated=L'objet %s doit contenir des lignes ErrorOnlyInvoiceValidatedCanBeSentInMassAction=Seules les factures validées peuvent être envoyées à l'aide de l'action de masse "Envoyer par courrier électronique". ErrorChooseBetweenFreeEntryOrPredefinedProduct=Vous devez choisir si l'article est un produit prédéfini ou non ErrorDiscountLargerThanRemainToPaySplitItBefore=La réduction que vous essayez d'appliquer est supérieure au montant du paiement. Auparavant, divisez le rabais en 2 rabais plus petits. -ErrorFileNotFoundWithSharedLink=Fichier non trouvé. Peut que la clé de partage a été modifié ou le fichier a été récemment supprimé. +ErrorFileNotFoundWithSharedLink=Fichier non trouvé. Peut être que la clé de partage a été modifiée ou le fichier a été récemment supprimé. ErrorProductBarCodeAlreadyExists=Le code-barre du produit %s existe déjà sur une autre référence de produit ErrorNoteAlsoThatSubProductCantBeFollowedByLot=Notez également que l'utilisation d'un produit virtuel pour augmenter ou réduire automatiquement les sous-produits n'est pas possible lorsqu'au moins un sous-produit (ou sous-produit de sous-produits) a besoin d'un numéro de série/lot. ErrorDescRequiredForFreeProductLines=La description est obligatoire pour les lignes avec un produit non prédéfini @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Pas assez de quantité pour ErrorOnlyOneFieldForGroupByIsPossible=1 seul champ pour le 'Grouper par' est possible (les autres sont supprimés) ErrorTooManyDifferentValueForSelectedGroupBy=Trop de valeurs différentes trouvées (plus de %s ) pour le champ '%s', nous ne pouvons donc pas l'utiliser pour 'Grouper par' dans les graphiques. Le champ 'Grouper Par' a été supprimé. Peut-être vouliez-vous l'utiliser comme un simple axe X ? ErrorReplaceStringEmpty=Erreur, la chaîne à remplacer est vide +ErrorProductNeedBatchNumber=Erreur, le produit ' %s ' a besoin d'un numéro de lot/série +ErrorProductDoesNotNeedBatchNumber=Erreur, le produit ' %s ' n'accepte pas un numéro de lot/série +ErrorFailedToReadObject=Erreur, échec de la lecture de l'objet de type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Votre paramètre PHP upload_max_filesize (%s) est supérieur au paramètre PHP post_max_size (%s). Ceci n'est pas une configuration cohérente. WarningPasswordSetWithNoAccount=Un mot de passe a été fixé pour cet adhérent. Cependant, aucun compte d'utilisateur n'a été créé. Donc, ce mot de passe est stocké, mais ne peut être utilisé pour accéder à Dolibarr. Il peut être utilisé par un module/interface externe, mais si vous n'avez pas besoin de définir ni login ni mot de passe pour un adhérent, vous pouvez désactiver l'option «Gérer un login pour chaque adhérent" depuis la configuration du module Adhérents. Si vous avez besoin de gérer un login, mais pas de mot de passe, vous pouvez laisser ce champ vide pour éviter cet avertissement. Remarque: L'email peut également être utilisé comme login si l'adhérent est lié à un utilisateur. diff --git a/htdocs/langs/fr_FR/languages.lang b/htdocs/langs/fr_FR/languages.lang index 9da1ef41151..6cde9682397 100644 --- a/htdocs/langs/fr_FR/languages.lang +++ b/htdocs/langs/fr_FR/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopien Language_ar_AR=Arabe Language_ar_EG=Arabe (Egypte) Language_ar_SA=Arabe +Language_az_AZ=Azerbaïdjanais Language_bn_BD=Bengalais +Language_bn_IN=Bengali (Inde) Language_bg_BG=Bulgare Language_bs_BA=Bosniaque Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=Anglais (Royaume-Uni) Language_en_IN=Anglais (Inde) Language_en_NZ=Anglais (Nouvelle Zeland) Language_en_SA=Anglais (Arabie Saoudite) +Language_en_SG=Anglais (Singapour) Language_en_US=Anglais (Etats-Unis) Language_en_ZA=Anglais (Afrique du Sud) Language_es_ES=Espagnol @@ -29,6 +33,7 @@ Language_es_CL=Espagnol (Chili) Language_es_CO=Espagnol (Colombie) Language_es_DO=Espagnol (République dominicaine) Language_es_EC=Espagnol (Équateur) +Language_es_GT=Espagnol (Guatemala) Language_es_HN=Espagnol (Honduras) Language_es_MX=Espagnol (Mexique) Language_es_PA=Espagnol (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Espagnol (Paraguay) Language_es_PE=Espagnol (Peru) Language_es_PR=Espagnol (Puerto Rico) Language_es_UY=Espagnol (Uruguay) +Language_es_GT=Espagnol (Guatemala) Language_es_VE=Espagnol (Venezuela) Language_et_EE=Estonien Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finlandais Language_fr_BE=Français (Belgique) Language_fr_CA=Français (Canada) Language_fr_CH=Français (Suisse) +Language_fr_CI=Français (Cote d'Ivoire) +Language_fr_CM=Français (Cameroun) Language_fr_FR=Français +Language_fr_GA=Français (Gabon) Language_fr_NC=Français (Nouvelle Calédonie) +Language_fr_SN=Français (Sénégal) Language_fy_NL=Frisian +Language_gl_ES=Galicien Language_he_IL=Hébreux +Language_hi_IN=Hindi (Inde) Language_hr_HR=Croate Language_hu_HU=Hongrois Language_id_ID=Indonésien Language_is_IS=Islandais Language_it_IT=Italien +Language_it_CH=Italien (Suisse) Language_ja_JP=Japonais Language_ka_GE=Géorgien Language_km_KH=Khmer @@ -64,8 +77,9 @@ Language_lv_LV=Léton Language_mk_MK=Macédonien Language_mn_MN=Mongol Language_nb_NO=Norvégien (Bokmal) +Language_ne_NP=Népalais Language_nl_BE=Néerlandais (Belgique) -Language_nl_NL=Dutch +Language_nl_NL=Néerlandais Language_pl_PL=Polonais Language_pt_BR=Portugais (Brésil) Language_pt_PT=Portugais @@ -86,4 +100,5 @@ Language_uz_UZ=Ouzbek Language_vi_VN=Vietnamien Language_zh_CN=Chinois Language_zh_TW=Chinois (Traditionel) +Language_zh_HK=Chinois (Hong-Kong) Language_bh_MY=Malais diff --git a/htdocs/langs/fr_FR/mails.lang b/htdocs/langs/fr_FR/mails.lang index 59999521019..66bc8728cd4 100644 --- a/htdocs/langs/fr_FR/mails.lang +++ b/htdocs/langs/fr_FR/mails.lang @@ -164,7 +164,11 @@ NoContactWithCategoryFound=Pas de contact/adresses avec cette catégorie NoContactLinkedToThirdpartieWithCategoryFound=Pas de contact/adresses associés à un ters avec cette catégorie OutGoingEmailSetup=Configuration email sortant InGoingEmailSetup=Configuration email entrant -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=Configuration des e-mails sortants (pour le module %s) DefaultOutgoingEmailSetup=Configuration des emails sortant Information=Information ContactsWithThirdpartyFilter=Contacts ayant pour tiers +Unanswered=Sans réponse +Answered=Répondu +IsNotAnAnswer=N'est pas une réponse (e-mail initial) +IsAnAnswer=Est une réponse à un e-mail initial diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 6fb3b71414a..e0df096ca2b 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -485,6 +485,7 @@ Categories=Tags/catégories Category=Tag/catégorie By=Par From=Du +FromDate=A partir du FromLocation=A partir du to=au To=au @@ -687,6 +688,7 @@ Method=Méthode Receive=Réceptionner CompleteOrNoMoreReceptionExpected=Complète ou plus de réception attendue ExpectedValue=Valeur attendue +ExpectedQty=Qté attendue PartialWoman=Partielle TotalWoman=Totale NeverReceived=Jamais reçu @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Adhérents MenuAgendaGoogle=Agenda Google +MenuTaxesAndSpecialExpenses=Charges | Dépenses spéciales ThisLimitIsDefinedInSetup=Limite Dolibarr (Menu accueil-configuration-sécurité): %s Ko, Limite PHP: %s Ko NoFileFound=Pas de documents stockés dans cette rubrique CurrentUserLanguage=Langue utilisateur actuelle @@ -942,6 +945,39 @@ ShortThursday=J ShortFriday=V ShortSaturday=S ShortSunday=D +one=un +two=deux +three=trois +four=quatre +five=cinq +six=six +seven=sept +eight=huit +nine=neuf +ten=dix +eleven=onze +twelve=douze +thirteen=treize +fourteen=quatorze +fifteen=quinze +sixteen=soixante +seventeen=dix-sept +eighteen=dix-huit +nineteen=dix-neuf +twenty=vingt +thirty=trente +forty=quarante +fifty=cinquante +sixty=soixante +seventy=soixante-dix +eighty=quatre-vingts +ninety=quatre vingt dix +hundred=cent +thousand=mille +million=million +billion=milliard +trillion=mille milliards +quadrillion=million de milliards SelectMailModel=Sélectionner un modèle d'e-mail SetRef=Définir réf. Select2ResultFoundUseArrows=Résultats trouvés. Utilisez les flèches pour sélectionner. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Passer en mode édition pour ajouter des traduc NotUsedForThisCustomer=Non utilisé pour ce client AmountMustBePositive=Le montant doit être positif. ByStatus=Par statut +InformationMessage=Information +Used=Used +ASAP=Dès que possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index 5d709ff8bdc..c7b3fedbdc4 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -81,7 +81,7 @@ DeleteType=Supprimer VoteAllowed=Vote autorisé Physical=Physique Moral=Morale -MorPhy=Moral/Physique +MorPhy=Nature Reenable=Réactiver ResiliateMember=Résilier un adhérent ConfirmResiliateMember=Êtes-vous sûr de vouloir résilier cet adhérent ? diff --git a/htdocs/langs/fr_FR/mrp.lang b/htdocs/langs/fr_FR/mrp.lang index 5a6d8b77e54..32d53d270cd 100644 --- a/htdocs/langs/fr_FR/mrp.lang +++ b/htdocs/langs/fr_FR/mrp.lang @@ -1,5 +1,6 @@ Mrp=Ordres de fabrication MO=Ordre de fabrication +MOs=Manufacturing orders MRPDescription=Module de gestion de production et Ordres de Fabrication (OF). MRPArea=Espace MRP MrpSetupPage=Configuration du module MRP diff --git a/htdocs/langs/fr_FR/other.lang b/htdocs/langs/fr_FR/other.lang index 09c378008f3..0a5abbfbf3a 100644 --- a/htdocs/langs/fr_FR/other.lang +++ b/htdocs/langs/fr_FR/other.lang @@ -101,6 +101,8 @@ PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNA PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Vous pouvez cliquer sur le lien ci-dessous pour effectuer votre paiement si ce n'est déjà fait.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ +PredefinedMailContentSendActionComm=Rappel événement "__EVENT_LABEL__" le __EVENT_DATE__ à __EVENT_TIME__

    Ceci est un message automatique, merci de ne pas répondre. DemoDesc=Dolibarr est un logiciel de gestion proposant plusieurs modules métiers. Une démonstration qui inclut tous ces modules n'a pas de sens car ce cas n'existe jamais (plusieurs centaines de modules disponibles). Aussi, quelques profils type de démo sont disponibles. ChooseYourDemoProfil=Veuillez choisir le profil de démonstration qui correspond le mieux à votre activité… ChooseYourDemoProfilMore=...ou construisez votre propre profil
    (sélection manuelle des modules) @@ -280,7 +282,9 @@ LinesToImport=Lignes à importer MemoryUsage=Utilisation de la mémoire RequestDuration=Durée de la demande +ProductsPerPopularity=Produits / services par popularité PopuProp=Produits / services par popularité dans les propositions PopuCom=Produits/services par popularité dans les commandes ProductStatistics=Statistiques sur les produits / services NbOfQtyInOrders=Qté en commandes +SelectTheTypeOfObjectToAnalyze=Sélectionnez le type d'objet à analyser ... diff --git a/htdocs/langs/fr_FR/products.lang b/htdocs/langs/fr_FR/products.lang index 8366e029c2f..f32a30d9a81 100644 --- a/htdocs/langs/fr_FR/products.lang +++ b/htdocs/langs/fr_FR/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Définissez le type de code-barres BarcodeValue=Valeur du code-barres NoteNotVisibleOnBill=Note (non visible sur les factures, propals...) ServiceLimitedDuration=Si produit de type service à durée limitée : +FillWithLastServiceDates=Remplissez avec la date de la dernière ligne de service MultiPricesAbility=Plusieurs niveaux de prix par produit/service (chaque client est dans un et un seul niveau) MultiPricesNumPrices=Nombre de prix DefaultPriceType=Base des prix par défaut (avec ou hors taxes) lors de l’ajout de nouveaux prix de vente @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Prix fournisseurs (des produits ou services) CustomCode=Nomenclature douanière / Code SH CountryOrigin=Pays d'origine Nature=Nature du produit (matière première / produit fini) +NatureOfProductShort=Nature de produit +NatureOfProductDesc=Matière première ou produit fini ShortLabel=Libellé court Unit=Unité p=u. @@ -359,6 +362,9 @@ SelectCombination=Sélectionner la combinaison ProductCombinationGenerator=Générateur de variantes Features=Fonctionnalités PriceImpact=Impact sur le prix +ImpactOnPriceLevel=Impact sur le niveau de prix %s +ApplyToAllPriceImpactLevel= Appliquer à tous les niveaux +ApplyToAllPriceImpactLevelHelp=En cliquant ici, vous définissez le même impact prix à tous les niveaux WeightImpact=Impact sur le poids NewProductAttribute=Nouvel attribut NewProductAttributeValue=Nouvelle valeur de l'attribut diff --git a/htdocs/langs/fr_FR/projects.lang b/htdocs/langs/fr_FR/projects.lang index c521a0a965a..3ffd43a0fbe 100644 --- a/htdocs/langs/fr_FR/projects.lang +++ b/htdocs/langs/fr_FR/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributeur TypeContact_project_task_external_TASKCONTRIBUTOR=Contributeur SelectElement=Séléctionnez l'élément AddElement=Associer l'élément +LinkToElementShort=Lier à # Documents models DocumentModelBeluga=Modèle de document project pour l'aperçu des objets liées DocumentModelBaleine=Modèles de document de rapport de tâches de projets @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Nb de projets créés par mois ProjectNbTaskByMonth=Nb de tâches créées par mois ProjectOppAmountOfProjectsByMonth=Montant des opportunités par mois ProjectWeightedOppAmountOfProjectsByMonth=Montant pondéré des opportunités par mois -ProjectOpenedProjectByOppStatus=Opportunités ouvertes par statut d'opportunité -ProjectsStatistics=Statistics sur les projets -TasksStatistics=Statistiques sur le projet/tâche principale +ProjectOpenedProjectByOppStatus=Projets ouverts par statut de prospection +ProjectsStatistics=Statistiques sur les projets ou opportunités +TasksStatistics=Statistiques sur les tâches des projets ou opportunités TaskAssignedToEnterTime=Tâche assignée. La saisie de temps sur cette tâche devrait être possible. IdTaskTime=Id ligne de temps YouCanCompleteRef=Si vous souhaitez compléter la référence avec un suffixe, il est recommandé d'ajouter un caractère - pour le séparer, de sorte que la numérotation automatique fonctionne toujours correctement pour les projets à venir. Par exemple %s-MONSUFFIX diff --git a/htdocs/langs/fr_FR/propal.lang b/htdocs/langs/fr_FR/propal.lang index fea0bcd75f0..64199c5248d 100644 --- a/htdocs/langs/fr_FR/propal.lang +++ b/htdocs/langs/fr_FR/propal.lang @@ -85,3 +85,20 @@ ProposalCustomerSignature=Cachet, Date, Signature et mention "Bon pour Accord" ProposalsStatisticsSuppliers=Statistiques de propositions commerciales CaseFollowedBy=Affaire suivie par SignedOnly=Signé seulement +IsNotADraft = n'est pas un brouillon +PassedInOpenStatus = passé au statut "ouvert" +CantBeSign = ne peut pas être signée +Sign = Signer +Signed = signé +CantBeSign = ne peut pas être signé +CantBeValidated = Ne peut pas être validé +ConfirmMassValidation = Confirmer la validation ? +ConfirmMassSignature = Confirmer la signature ? +ConfirmMassValidationQuestion = Voulez-vous confirmer la validation des devis brouillons selectionnés ? +ConfirmMassSignatureQuestion = Voulez-vous confirmer la signature des devis ouvert selectionnés ? +PropNoProductOrService = devis ne contient pas de produits ni de services +PropsNoProductOrService = devis ne contiennent pas de produits ni de services +IdProposal=ID de proposition +IdProduct=ID produit +PrParentLine=Ligne parent de proposition +LineBuyPriceHT=Prix ​​d'achat Montant net de taxe pour la ligne diff --git a/htdocs/langs/fr_FR/recruitment.lang b/htdocs/langs/fr_FR/recruitment.lang new file mode 100644 index 00000000000..2ceb91db78e --- /dev/null +++ b/htdocs/langs/fr_FR/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recrutement +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Gestion et suivi des campagnes de recrutement + +# +# Admin page +# +RecruitmentSetup = Paramétrages du recrutement +Settings = Paramétrages +RecruitmentSetupPage = Entrez ici la configuration des principales options du module de recrutement +RecruitmentArea=Espace recrutement +PublicInterfaceRecruitmentDesc=Les pages publiques des postes ouverts sont des URL publiques pour afficher et répondre aux postes ouverts. Il existe un lien différent pour chaque offre d'emploi, visible sur chaque fiche de poste. +EnablePublicRecruitmentPages=Activer les pages publiques des postes ouverts + +# +# About page +# +About = À propos +RecruitmentAbout = À propos du module Recrutement +RecruitmentAboutPage = À propos du module Recrutement +NbOfEmployeesExpected=Nombre de postes disponibles +JobLabel=Intitulé du poste +WorkPlace=Lieu de travail +DateExpected=Date souhaitée +FutureManager=Responsable futur +ResponsibleOfRecruitement=Responsable du recrutement +IfJobIsLocatedAtAPartner=Si le poste est localisé chez un partenaire +PositionToBeFilled=Poste à pourvoir +PositionsToBeFilled=Postes à pourvoir +ListOfPositionsToBeFilled=Liste des postes à pourvoir +NewPositionToBeFilled=Nouveau poste à pourvoir + +JobOfferToBeFilled=Poste à pourvoir +ThisIsInformationOnJobPosition=Informations sur le poste à pourvoir +ContactForRecruitment=Contact pour le recrutement +EmailRecruiter=Email recruteur +ToUseAGenericEmail=Pour utiliser un e-mail générique. S'il n'est pas défini, l'email du responsable du recrutement sera utilisé +NewCandidature=Nouvelle candidature +ListOfCandidatures=Liste des candidatures +RequestedRemuneration=Rémunération demandée +ProposedRemuneration=Rémunération proposée +ContractProposed=Contrat proposé +ContractSigned=Contrat signé +RecruitmentCandidature=Candidature +JobPositions=Offres d'emploi +RecruitmentCandidatures=Candidatures +InterviewToDo=Entretien à faire +AnswerCandidature=Réponse de candidature +YourCandidature=Votre candidature +YourCandidatureAnswerMessage=Merci pour votre candidature.
    ... diff --git a/htdocs/langs/fr_FR/stocks.lang b/htdocs/langs/fr_FR/stocks.lang index fa44e8e1172..8cc6c9d0abd 100644 --- a/htdocs/langs/fr_FR/stocks.lang +++ b/htdocs/langs/fr_FR/stocks.lang @@ -95,14 +95,16 @@ RealStock=Stock réel RealStockDesc=Le stock physique ou réel est le stock présent dans les entrepôts. RealStockWillAutomaticallyWhen=Le stock réel sera modifié selon ces règles (voir la configuration du module Stock) : VirtualStock=Stock virtuel -VirtualStockDesc=Le stock virtuel est la quantité de produit en stock après que les opération affectant les stock sont terminées (réceptions de commandes fournisseurs, expéditions de commandes clients,...) +VirtualStockAtDate=Stock virtuel à date +VirtualStockAtDateDesc=Stock virtuel une fois que toutes les commandes en attente qui doivent être effectuées avant la date seront terminées +VirtualStockDesc=Le stock virtuel est la quantité de produit en stock après que les opérations en cours (et qui affectent les stocks) soient terminées (réceptions de commandes fournisseurs, expéditions de commandes clients, production des ordres de fabrications, etc) IdWarehouse=Identifiant entrepôt DescWareHouse=Description entrepôt LieuWareHouse=Lieu entrepôt WarehousesAndProducts=Entrepôts et produits WarehousesAndProductsBatchDetail=Entrepôts et produits (avec détail par lot/série) AverageUnitPricePMPShort=Prix moyen pondéré (PMP) -AverageUnitPricePMP=Prix moyen pondéré (PMP) d'acquisition +AverageUnitPricePMPDesc=Le prix unitaire moyen d'entrée que nous avons dû payer aux fournisseurs pour intégrer le produit dans notre stock. SellPriceMin=Prix de vente unitaire EstimatedStockValueSellShort=Valeur à la vente EstimatedStockValueSell=Valeur vente @@ -141,7 +143,7 @@ Replenishments=Réapprovisionnement NbOfProductBeforePeriod=Quantité du produit %s en stock avant la période sélectionnée (< %s) NbOfProductAfterPeriod=Quantité du produit %s en stock après la période sélectionnée (> %s) MassMovement=Mouvement en masse -SelectProductInAndOutWareHouse=Sélectionner un produit, une quantité à transférer, un entrepôt source et destination et cliquer sur "%s". Une fois tous les mouvements choisis, cliquer sur "%s". +SelectProductInAndOutWareHouse=Sélectionner un entrepôt source et destination, un produit et une quantité à transférer, puis cliquer sur "%s". Une fois tous les mouvements choisis, cliquer sur "%s". RecordMovement=Enregistrer transfert ReceivingForSameOrder=Réceptions pour cette commande StockMovementRecorded=Mouvement de stocks enregistré @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Afficher l'arborescence complète de l'entrepôt sur la popup StockAtDatePastDesc=Vous pouvez voir ici le stock (stock réel) à une date donnée dans le passé StockAtDateFutureDesc=Vous pouvez voir ici le stock (stock virtuel) à une date donnée dans le futur CurrentStock=Stock actuel +InventoryRealQtyHelp=Définissez la valeur sur 0 pour réinitialiser la quantité
    Gardez le champ vide ou supprimez la ligne pour qu'il reste inchangé +UpdateByScaningProductBarcode=Mettre à jour par scan (code-barres produit) +UpdateByScaningLot=Mettre à jour par scan (code-barres lot/série) diff --git a/htdocs/langs/fr_FR/suppliers.lang b/htdocs/langs/fr_FR/suppliers.lang index 81860c25a45..2b4ab9dcf70 100644 --- a/htdocs/langs/fr_FR/suppliers.lang +++ b/htdocs/langs/fr_FR/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Fournisseurs SuppliersInvoice=Facture fournisseur ShowSupplierInvoice=Montrer la facture fournisseur @@ -15,7 +15,7 @@ SomeSubProductHaveNoPrices=Certains sous-produits n'ont pas de prix définis AddSupplierPrice=Ajouter un prix d'achat ChangeSupplierPrice=Modifier un prix d'achat SupplierPrices=Prix fournisseurs -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Cette référence fournisseur est déjà associée à la référence : %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=Cette référence fournisseur est déjà associée à un produit : %s NoRecordedSuppliers=Pas de fournisseur enregistré SupplierPayment=Paiement fournisseur SuppliersArea=Espace fournisseurs diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index 73a7fd2a971..54e7ec0be33 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -72,7 +72,6 @@ Deleted=Supprimé # Dict Type=Type -Category=Code analytique Severity=Sévérité # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Affecter automatiquement l'utilisateur qui a créé le t TicketsAutoAssignTicketHelp=Lors de la création d'un ticket, l'utilisateur peut être automatiquement affecté au ticket. TicketNumberingModules=Module de numérotation des tickets TicketNotifyTiersAtCreation=Notifier le tiers à la création -TicketGroup=Groupe TicketsDisableCustomerEmail=Toujours désactiver les courriels lorsqu'un ticket est créé depuis l'interface publique TicketsPublicNotificationNewMessage=Envoyer un (des) courriel (s) lorsqu’un nouveau message est ajouté TicketsPublicNotificationNewMessageHelp=Envoyer un (des) courriel(s) lorsqu’un nouveau message est ajouté à partir de l’interface publique (à l’utilisateur désigné ou au courriel de notification (mise à jour) et/ou au courriel de notification) @@ -162,7 +160,7 @@ CreatedBy=Créé par NewTicket=Nouveau ticket SubjectAnswerToTicket=Réponse ticket TicketTypeRequest=Type de demande -TicketCategory=Code analytique +TicketCategory=Groupe SeeTicket=Voir le ticket TicketMarkedAsRead=Le ticket a été marqué comme lu TicketReadOn=Lu diff --git a/htdocs/langs/fr_FR/users.lang b/htdocs/langs/fr_FR/users.lang index 1ed6c956e66..73b9e504f74 100644 --- a/htdocs/langs/fr_FR/users.lang +++ b/htdocs/langs/fr_FR/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Désactivé en mode maintenance UserAccountancyCode=Code comptable de l'utilisateur UserLogoff=Déconnexion de l'utilisateur UserLogged=Utilisateur connecté +DateOfEmployment=Date d'embauche DateEmployment=Date d'embauche DateEmploymentEnd=Date de fin d'emploi CantDisableYourself=Vous ne pouvez pas désactiver votre propre compte utilisateur @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Forcer le valideur des congés ValidatorIsSupervisorByDefault=Par défaut, le valideur est le responsable hiérarchique de l'utilisateur. Gardez vide pour conserver ce comportement. UserPersonalEmail=Email personnel UserPersonalMobile=Téléphone portable personnel +WarningNotLangOfInterface=Attention, c'est la langue principale parlée par l'utilisateur, pas la langue de l'interface qu'il a choisi de voir. Pour changer la langue de l'interface visible par cet utilisateur, allez sur l'onglet %s diff --git a/htdocs/langs/fr_FR/withdrawals.lang b/htdocs/langs/fr_FR/withdrawals.lang index d05f2663cfc..1649b7271de 100644 --- a/htdocs/langs/fr_FR/withdrawals.lang +++ b/htdocs/langs/fr_FR/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Ordres de virement bancaire PaymentByBankTransferLines=Lignes d'ordre de virement bancaire WithdrawalsReceipts=Bons de prélèvements WithdrawalReceipt=Bon de prélèvement -BankTransferReceipts=Ordres de virement +BankTransferReceipts=Ordres de virement bancaire BankTransferReceipt=Ordre de virement LatestBankTransferReceipts=Les %s derniers ordres de virement bancaire LastWithdrawalReceipts=Les %s derniers bons de prélèvements @@ -63,7 +63,9 @@ InvoiceRefused=Facture refusée (Charges de rejet imputable au client) StatusDebitCredit=Statut Débit/Crédit StatusWaiting=En attente StatusTrans=Transmise +StatusDebited=Débité StatusCredited=Crédité +StatusPaid=Payé StatusRefused=Rejeté StatusMotif0=Non renseigné StatusMotif1=Provision insuffisante @@ -77,13 +79,13 @@ StatusMotif8=Autre motif CreateForSepaFRST=Créer fichier de prélèvement (SEPA FRST) CreateForSepaRCUR=Créer fichier de prélèvement (SEPA RCUR) CreateAll=Créer le fichier de prélèvement (tout) -CreateFileForPaymentByBankTransfer=Créer un fichier de virement +CreateFileForPaymentByBankTransfer=Créer fichier pour les virements CreateSepaFileForPaymentByBankTransfer=Créer un fichier de virement (SEPA) CreateGuichet=Seulement guichet CreateBanque=Seulement banque OrderWaiting=En attente de traitement -NotifyTransmision=Transmission du bon -NotifyCredit=Crédit du bon +NotifyTransmision=Enregistrer l'envoi du fichier d'ordres +NotifyCredit=Enregistrer le crédit de l'ordre NumeroNationalEmetter=Numéro National Émetteur WithBankUsingRIB=Pour les comptes bancaires utilisant le RIB WithBankUsingBANBIC=Pour les comptes bancaires utilisant le code BAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Crédité le WithdrawalFileNotCapable=Impossible de générer le fichier de reçu des prélèvement pour votre pays %s (Votre pays n'est pas supporté) ShowWithdraw=Afficher ordre de prélèvement IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Toutefois, si la facture a au moins une demande de prélèvement non traité, elle ne sera pas classée payée afin de permettre le prélèvement d'abord. -DoStandingOrdersBeforePayments=Cet onglet vous permet de demander un prélèvement. Une fois la demande faite, allez dans le menu Banque->Paiement par prélèvement pour gérer l'ordre de prélèvement. Lorsque l'ordre de paiement est clos, le paiement sur la facture sera automatiquement enregistrée, et la facture fermée si le reste à payer est nul. -DoCreditTransferBeforePayments=Cet onglet vous permet de demander un ordre de virement. Une fois fait, allez dans le menu Banque -> Paiements par virement pour gérer l'ordre de virement. Lorsque le virement est clôturé, le paiement des factures sera automatiquement enregistré et les factures clôturées si le solde à payer est nul. +DoStandingOrdersBeforePayments=Cet onglet vous permet de demander un prélèvement. Une fois la demande faite, allez dans le menu Banque->Paiement par prélèvement pour générer l'ordre de prélèvement. Lorsque l'ordre de paiement est clos, le paiement sur les factures seront automatiquement enregistrés, et les factures fermées si le reste à payer est nul. +DoCreditTransferBeforePayments=Cet onglet vous permet de demander un ordre de virement. Une fois fait, allez dans le menu Banque ->Paiements par virement pour gérer l'ordre de virement. Lorsque le virement est clôturé, le paiement des factures fournisseurs sera automatiquement enregistré et les factures clôturées si le solde à payer est nul. WithdrawalFile=Fichier de prélèvement +CreditTransferFile=Fichier de virement SetToStatusSent=Mettre au statut "Fichier envoyé" ThisWillAlsoAddPaymentOnInvoice=Cette action enregistrera aussi les règlements des factures et les classera au statut "Payé" si le solde est nul StatisticsByLineStatus=Statistiques par statut des lignes @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type de paiement ModeRECUR=Payment récurrent ModeFRST=Paiement unitaire PleaseCheckOne=Cocher un choix uniquement +CreditTransferOrderCreated=Ordre de virement %s créé DirectDebitOrderCreated=Ordre de prélèvement %s créé AmountRequested=Montant réclamé SEPARCUR=SEPA RCUR @@ -141,3 +145,4 @@ InfoTransData=Montant : %s
    Méthode : %s
    Date : %s InfoRejectSubject=Ordre de prélèvement rejeté InfoRejectMessage=Bonjour,

    l'ordre de prélèvement de la facture %s liée à la société %s, avec un montant de %s a été refusé par la banque.

    --
    %s ModeWarning=Option mode réel non établi, nous allons arrêter après cette simulation +ErrorCompanyHasDuplicateDefaultBAN=La société avec l'identifiant %s a plus d'un compte bancaire par défaut. Aucun moyen de savoir lequel utiliser. diff --git a/htdocs/langs/fr_FR/workflow.lang b/htdocs/langs/fr_FR/workflow.lang index a3dbe4cb07e..0c753a2529e 100644 --- a/htdocs/langs/fr_FR/workflow.lang +++ b/htdocs/langs/fr_FR/workflow.lang @@ -13,9 +13,11 @@ descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classer la/les proposition(s) commer descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classer la/les commande(s) client(s) source(s) facturée(s) à la validation de la facture client (et si le montant de la facture est le même que le montant total des commandes liées) descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classer la/les commande(s) client(s) source(s) à Facturée quand une facture client est passée à Payé (et si le montant de la facture est identique à la somme des commandes sources) descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classer la commande source à expédiée à la validation d'une expédition (et si les quantités expédiées dans le bon d'expédition sont les même que dans la commande mise à jour) -# Autoclassify supplier order +# Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classer la ou les proposition(s) commerciale(s) fournisseur sources facturées quand une facture fournisseur est validée (et si le montant de la facture est le même que le total des propositions sources liées) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classer la ou les commande(s) fournisseur(s) de source(s) à facturée(s) lorsque la facture fournisseur est validée (et si le montant de la facture est le même que le montant total des commandes liées) -descWORKFLOW_BILL_ON_RECEPTION=Classer la/les réception(s) facturée(s) à la validation d'une facture fournisseur +descWORKFLOW_BILL_ON_RECEPTION=Classer les réceptions en "facturées" lorsqu'une commande fournisseur liée est validée +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Fermer toutes les interventions liées au ticket lorsqu'un ticket est fermé AutomaticCreation=Création automatique AutomaticClassification=Classification automatique diff --git a/htdocs/langs/fr_FR/zapier.lang b/htdocs/langs/fr_FR/zapier.lang index 78103a55bae..cdd9e953847 100644 --- a/htdocs/langs/fr_FR/zapier.lang +++ b/htdocs/langs/fr_FR/zapier.lang @@ -14,35 +14,16 @@ # along with this program. If not, see . # -# Générique +# Generic # # Module label 'ModuleZapierForDolibarrName' -ModuleZapierForDolibarrName = ZapierForDolibarr +ModuleZapierForDolibarrName = Zapier pour Dolibarr # Module description 'ModuleZapierForDolibarrDesc' -ModuleZapierForDolibarrDesc = Description de ZapierForDolibarr +ModuleZapierForDolibarrDesc = Module Zapier pour Dolibarr # -# Page d'administration +# Admin page # -ZapierForDolibarrSetup = Configuration du module ZapierForDolibarr -Settings = Réglages -ZapierForDolibarrSetupPage = Page de configuration du module ZapierForDolibarr - -# -# Page À propos -# -About = À propos -ZapierForDolibarrAbout = À propos de ZapierForDolibarr -ZapierForDolibarrAboutPage = Page à propos de ZapierForDolibarr - -# -# Page d'exemple -# -MyPageName = Nom de ma page - -# -# Box d'exemple -# -MyWidget = Mon widget -MyWidgetDescription = Description de mon widget +ZapierForDolibarrSetup = Configuration de Zapier pour Dolibarr +ZapierDescription=Interface avec Zapier diff --git a/htdocs/langs/fr_GA/admin.lang b/htdocs/langs/fr_GA/admin.lang index bdc794e1b31..c1d306ec390 100644 --- a/htdocs/langs/fr_GA/admin.lang +++ b/htdocs/langs/fr_GA/admin.lang @@ -1,4 +1,3 @@ # Dolibarr language file - Source file is en_US - admin -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. diff --git a/htdocs/langs/fr_GA/cashdesk.lang b/htdocs/langs/fr_GA/cashdesk.lang deleted file mode 100644 index 8990ec63d62..00000000000 --- a/htdocs/langs/fr_GA/cashdesk.lang +++ /dev/null @@ -1,3 +0,0 @@ -# Dolibarr language file - Source file is en_US - cashdesk -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan diff --git a/htdocs/langs/fr_GA/main.lang b/htdocs/langs/fr_GA/main.lang index 0f9be27b22f..2e691473326 100644 --- a/htdocs/langs/fr_GA/main.lang +++ b/htdocs/langs/fr_GA/main.lang @@ -19,4 +19,3 @@ FormatDateHourShort=%m/%d/%Y %I:%M %p FormatDateHourSecShort=%m/%d/%Y %I:%M:%S %p FormatDateHourTextShort=%b %d, %Y, %I:%M %p FormatDateHourText=%B %d, %Y, %I:%M %p -EmptySearchString=Enter non empty search criterias diff --git a/htdocs/langs/fr_GA/stocks.lang b/htdocs/langs/fr_GA/stocks.lang new file mode 100644 index 00000000000..0cf57e3a1c3 --- /dev/null +++ b/htdocs/langs/fr_GA/stocks.lang @@ -0,0 +1,2 @@ +# Dolibarr language file - Source file is en_US - stocks +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/fr_GA/website.lang b/htdocs/langs/fr_GA/website.lang deleted file mode 100644 index ff992a2be9e..00000000000 --- a/htdocs/langs/fr_GA/website.lang +++ /dev/null @@ -1,2 +0,0 @@ -# Dolibarr language file - Source file is en_US - website -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/fr_GA/withdrawals.lang b/htdocs/langs/fr_GA/withdrawals.lang deleted file mode 100644 index efea7bd6270..00000000000 --- a/htdocs/langs/fr_GA/withdrawals.lang +++ /dev/null @@ -1,4 +0,0 @@ -# Dolibarr language file - Source file is en_US - withdrawals -BankTransferReceipts=Credit transfer order -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. diff --git a/htdocs/langs/gl_ES/accountancy.lang b/htdocs/langs/gl_ES/accountancy.lang index fd3875d601c..2c6f92c301b 100644 --- a/htdocs/langs/gl_ES/accountancy.lang +++ b/htdocs/langs/gl_ES/accountancy.lang @@ -1,5 +1,5 @@ # Dolibarr language file - en_US - Accountancy (Double entries) -Accountancy=Accountancy +Accountancy=Contabilidade Accounting=Contabilidade ACCOUNTING_EXPORT_SEPARATORCSV=Separador de columnas no ficheiro de exportación ACCOUNTING_EXPORT_DATE=Formato de data no ficheiro de exportación @@ -17,7 +17,7 @@ ThisProduct=Este produto DefaultForService=Predeterminado para o servizo DefaultForProduct=Predeterminado para o produto CantSuggest=Non pode suxerirse -AccountancySetupDoneFromAccountancyMenu=A maior parte da configuración da contabilidad realizase dende o menú %s +AccountancySetupDoneFromAccountancyMenu=A maior parte da configuración da contabilidade realizase dende o menú %s ConfigAccountingExpert=Configuración do módulo contabilidade avanzada Journalization=Procesar diarios Journaux=Diarios @@ -27,15 +27,15 @@ Chartofaccounts=Plan contable CurrentDedicatedAccountingAccount=Conta contable adicada AssignDedicatedAccountingAccount=Nova conta a asignar InvoiceLabel=Etiqueta factura -OverviewOfAmountOfLinesNotBound=Resumo da cantidade de liñas non vinculadas a unha conta contable -OverviewOfAmountOfLinesBound=Resumo da cantidade de liñas xa vinculadas a unha conta contable +OverviewOfAmountOfLinesNotBound=Resumo da cantidade de liñas non ligadas a unha conta contable +OverviewOfAmountOfLinesBound=Resumo da cantidade de liñas xa ligadas a unha conta contable OtherInfo=Outra información DeleteCptCategory=Eliminar a conta contable do grupo ConfirmDeleteCptCategory=¿Está certo de querer eliminar esta conta contable do grupo de contas contables? JournalizationInLedgerStatus=Estado de diario AlreadyInGeneralLedger=Xa rexistrado no Libro Maior NotYetInGeneralLedger=Non foi rexistrado aínda no Libro Maior -GroupIsEmptyCheckSetup=O grupo está baleiro, comprobe a configuración d a personalización de grupos contables +GroupIsEmptyCheckSetup=O grupo está baleiro, comprobe a configuración da personalización de grupos contables DetailByAccount=Amosar detalles por conta AccountWithNonZeroValues=Contas con valores non cero ListOfAccounts=Listaxe de contas @@ -49,7 +49,7 @@ MainAccountForCustomersNotDefined=Conta contable principal para clientes non def MainAccountForSuppliersNotDefined=Conta contable principal para provedores non definida na configuración MainAccountForUsersNotDefined=Conta contable principal para usuarios non definida na configuración MainAccountForVatPaymentNotDefined=Conta contable principal para pagos de IVE non definida na configuración -MainAccountForSubscriptionPaymentNotDefined=Conta contable principal para o pago de subscricións non definida na configuración +MainAccountForSubscriptionPaymentNotDefined=Conta contable principal para o pago de afiliacións non definida na configuración AccountancyArea=Área contabilidade AccountancyAreaDescIntro=O uso do módulo de contabilidade realízase en varios pasos: @@ -58,22 +58,22 @@ AccountancyAreaDescActionOnceBis=Os seguintes pasos deben facerse para aforrar t AccountancyAreaDescActionFreq=As seguintes accións execútanse normalmente cada mes, semana ou día en empresas moi grandes... AccountancyAreaDescJournalSetup=PASO %s: Cree ou mire o contido da sua listaxe de diarios dende o menú %s -AccountancyAreaDescChartModel=STEP %s: Check that a model of chart of account exists or create one from menu %s -AccountancyAreaDescChart=STEP %s: Select and|or complete your chart of account from menu %s +AccountancyAreaDescChartModel=PASO %s: Crea un modelo do plan xeral contable dende o menú %s +AccountancyAreaDescChart=PASO %s: Crear ou completar o contido do seu plan xeral contable dende o menú %s AccountancyAreaDescVat=PASO %s: Defina as contas contables para cada tasa de IVE. Para iso, use a entrada do menú %s. AccountancyAreaDescDefault=PASO %s: Defina as contas contables por defecto. Para iso, use a entrada do menú %s. AccountancyAreaDescExpenseReport=PASO %s: Defina as contas contables por defecto para cada tipo de informe de gastos. Para iso, use a entrada do menú %s. AccountancyAreaDescSal=PASO %s: Defina as contas contables para os pagos de salarios. Para iso, use a entrada do menú %s. AccountancyAreaDescContrib=PASO %s: Defina as contas contables dos gastos especiais (impostos varios). Para iso, use a entrada do menú %s. -AccountancyAreaDescDonation=PASO %s: Defina as contas contables para as donacións. Para iso, use a entrada do menú %s. +AccountancyAreaDescDonation=PASO %s: Defina as contas contables para as doacións/subvencións. Para iso, use a entrada do menú %s. AccountancyAreaDescSubscription=STEP %s: Defina as contas contables por defecto para a subscrición de membros. Para iso, use a entrada do menú %s. AccountancyAreaDescMisc=PASO %s: Defina a conta por defecto obrigada e as contas contables por defecto para transaccións varias. Para iso, use a entrada do menú %s. AccountancyAreaDescLoan=PASO %s: Defina as contas contables por defecto para préstamos. Para iso, use a entrada do menú %s.\n AccountancyAreaDescBank=PASO %s: Defina as contas contables e o código para cada conta bancaria e financiera. Pode empezar dende a páxina %s. AccountancyAreaDescProd=PASO %s: Defina as contas contables nos seus produtos/servizos. Para elo pode utilizar o menú %s. -AccountancyAreaDescBind=PASO %s: Mire que os enlaces entre as liñas %s existentes e as contas contables son correctos, para que a aplicación poda rexistrar as transaccións no Libro Maior nun só clic. Complete os enlaces que falten. Para iso, utilice a entrada de menú %s. +AccountancyAreaDescBind=PASO %s: Mire que as ligazóns entre as liñas %s existentes e as contas contables son correctos, para que a aplicación poda rexistrar as transaccións no Libro Maior nun só clic. Complete as ligazóns que falten. Para iso, utilice a entrada de menú %s. AccountancyAreaDescWriteRecords=PASO %s: Escribir as transaccións no Libro Maior. Para iso, entre no menú %s, e faga clic no botón %s. AccountancyAreaDescAnalyze=PASO %s: Engadir ou editar transaccións existentes, xerar informes e exportacións. @@ -98,11 +98,11 @@ MenuExpenseReportAccounts=Contas de informes de gastos MenuLoanAccounts=Contas de préstamos MenuProductsAccounts=Contas de produtos MenuClosureAccounts=Contas de peche -MenuAccountancyClosure=Closure -MenuAccountancyValidationMovements=Validate movements +MenuAccountancyClosure=Peche +MenuAccountancyValidationMovements=Validar movementos ProductsBinding=Contas de produtos -TransferInAccounting=Transfer in accounting -RegistrationInAccounting=Registration in accounting +TransferInAccounting=Transferencia en contabilidade +RegistrationInAccounting=Rexistro en contabilidade Binding=Contabilizar CustomersVentilation=Contabilizar facturas a clientes SuppliersVentilation=Contabilizar facturas de provedores @@ -110,7 +110,7 @@ ExpenseReportsVentilation=Contabilizar informes de gastos CreateMvts=Crear nova transacción UpdateMvts=Modificación dunha transacción ValidTransaction=Transacción validada -WriteBookKeeping=Register transactions in Ledger +WriteBookKeeping=Rexistrar movimentos no Libro Maior Bookkeeping=Libro Maior AccountBalance=Saldo da conta ObjectsRef=Referencia de obxecto orixe @@ -121,7 +121,7 @@ InvoiceLinesDone=Liñas de facturas contabilizadas ExpenseReportLines=Liñas de informes de gastos a contabilizar ExpenseReportLinesDone=Liñas de informes de gastos contabilizadas IntoAccount=Contabilizar liña coa conta contable -TotalForAccount=Total for accounting account +TotalForAccount=Total para a conta contable Ventilate=Contabilizar @@ -146,9 +146,10 @@ ACCOUNTING_LENGTH_DESCRIPTION_ACCOUNT=Truncate product & services account descri ACCOUNTING_LENGTH_GACCOUNT=Length of the general accounting accounts (If you set value to 6 here, the account '706' will appear like '706000' on screen) ACCOUNTING_LENGTH_AACCOUNT=Length of the third-party accounting accounts (If you set value to 6 here, the account '401' will appear like '401000' on screen) ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of an accounting account. Needed by some countries (like Switzerland). If set to off (default), you can set the following two parameters to ask the application to add virtual zeros. -BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account -ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal -ACCOUNTANCY_COMBO_FOR_AUX=Habilita a lista combinada para a conta subsidiaria (pode ser lento se tes moitos terceiros) +BANK_DISABLE_DIRECT_INPUT=Desactivar transaccións directas en conta bancaria +ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Habilitar exportación de borradores al diario +ACCOUNTANCY_COMBO_FOR_AUX=Habilita a listaxe combinada para a conta subsidiaria (pode ser lento se ten moitos terceiros) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Diario de vendas ACCOUNTING_PURCHASE_JOURNAL=Diario de compras @@ -158,17 +159,17 @@ ACCOUNTING_SOCIAL_JOURNAL=Diario social ACCOUNTING_HAS_NEW_JOURNAL=Ten un novo diario ACCOUNTING_RESULT_PROFIT=Conta de resultado contable (Beneficio) -ACCOUNTING_RESULT_LOSS=Conta de resultado contable (Perda) +ACCOUNTING_RESULT_LOSS=Conta de resultado contable (Perdas) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Diario de peche ACCOUNTING_ACCOUNT_TRANSFER_CASH=Conta contable de transferencia bancaria -TransitionalAccount=Transitional bank transfer account +TransitionalAccount=Conta de transferencia bancaria de transición ACCOUNTING_ACCOUNT_SUSPENSE=Conta contable de operacións pendentes de asignar -DONATION_ACCOUNTINGACCOUNT=Conta contable de rexistro de donacións +DONATION_ACCOUNTINGACCOUNT=Conta contable de rexistro de doacións/subvencións ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Conta contable de rexistro subscricións -ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for the bought products (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Conta contable predeterminada para produtos comprados (usada se non están definidos na folla de produtos) ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Accounting account by default for the bought products in EEC (used if not defined in the product sheet) ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought products and imported out of EEC (used if not defined in the product sheet) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Conta contable predeterminada para os produtos vendidos (usada se non están definidos na folla de produtos) @@ -179,8 +180,8 @@ ACCOUNTING_SERVICE_BUY_ACCOUNT=Conta contable predeterminada para os servizos co ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Accounting account by default for the bought services in EEC (used if not defined in the service sheet) ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought services and imported out of EEC (used if not defined in the service sheet) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Conta contable predeterminada para os servizos vendidos (usada se non están definidos na folla de servizos) -ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Accounting account by default for the services sold in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Accounting account by default for the services sold and exported out of EEC (used if not defined in the service sheet) +ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Conta contable predeterminada para os servizos vendidos en EU (usada se non están definidos na folla de servizos) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=AConta contable predeterminada para os servizos vendidos e exportados fora da EU (usada se non están definidos na folla de servizos) Doctype=Tipo de documento Docdate=Data @@ -189,29 +190,29 @@ LabelAccount=Etiqueta conta LabelOperation=Etiqueta operación Sens=Sentido LetteringCode=Codigo de letras -Lettering=Lettering +Lettering=Letras Codejournal=Diario JournalLabel=Etiqueta diario NumPiece=Apunte TransactionNumShort=Núm. transacción -AccountingCategory=Grupos personalizados +AccountingCategory=Grupos persoalizados GroupByAccountAccounting=Agrupar por conta contable AccountingAccountGroupsDesc=Pode definir aquí algúns grupos de contas contables. Serán usadas para informes de contabilidade personalizados. ByAccounts=Por contas ByPredefinedAccountGroups=Por grupos predefinidos -ByPersonalizedAccountGroups=Por grupos personalizados +ByPersonalizedAccountGroups=Por grupos persoalizados ByYear=Por ano NotMatch=Non establecido DeleteMvt=Eliminar liñas do Libro Maior -DelMonth=Month to delete +DelMonth=Mes a eliminar DelYear=Ano a eliminar DelJournal=Diario a eliminar -ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger. -ConfirmDeleteMvtPartial=This will delete the transaction from the Ledger (all lines related to same transaction will be deleted) +ConfirmDeleteMvt=Isto eliminará todas as liñas do Libro Maior do ano e/ou dun diario específico. Precísase alo menos un criterio. +ConfirmDeleteMvtPartial=Isto eliminará a transacción do libro maior (serán eliminadas todas as liñas relacionadas coa mesma transacción) FinanceJournal=Diario financiero ExpenseReportsJournal=Diario informe de gastos -DescFinanceJournal=Finance journal including all the types of payments by bank account -DescJournalOnlyBindedVisible=This is a view of record that are bound to an accounting account and can be recorded into the Ledger. +DescFinanceJournal=O diario financiero inclúe todos os tipos de pagos por conta bancaria +DescJournalOnlyBindedVisible=Ista é una vista do rexistro ligada a unha conta contable e que pode ser rexistrada no Libro Maior. VATAccountNotDefined=Conta contable para IVE non definida ThirdpartyAccountNotDefined=Conta contable para terceiro non definida ProductAccountNotDefined=Conta contable para produto non definida @@ -229,154 +230,155 @@ DescThirdPartyReport=Consulte aquí o listaxe de clientes e provedores e os seus ListAccounts=Listaxe de contas contables UnknownAccountForThirdparty=Conta contable de terceiro descoñecida, usaremos %s UnknownAccountForThirdpartyBlocking=Conta contable de terceiro descoñecida. Erro de bloqueo. -ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Third-party account not defined or third party unknown. We will use %s +ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Conta contable de terceiro non definida ou terceiro descoñecido. Usaremos a %s ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. -ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Conta contable de terceiro non definida ou terceiro descoñecido. Erro de bloqueo. -UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error -PaymentsNotLinkedToProduct=Payment not linked to any product / service -OpeningBalance=Opening balance -ShowOpeningBalance=Show opening balance -HideOpeningBalance=Hide opening balance -ShowSubtotalByGroup=Show subtotal by group +ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Conta do terceiro descoñecida ou terceiro descoñecido. Erro de bloqueo +UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Conta do terceiros descoñecida e conta de espera non definida. Erro de bloqueo +PaymentsNotLinkedToProduct=Pagos non ligados a un produto/servizo +OpeningBalance=Saldo de apertura +ShowOpeningBalance=Amosar saldo de apertura +HideOpeningBalance=Ocultar saldo de apertura +ShowSubtotalByGroup=Amosar subtotal por grupo Pcgtype=Grupo de conta -PcgtypeDesc=Group of account are used as predefined 'filter' and 'grouping' criteria for some accounting reports. For example, 'INCOME' or 'EXPENSE' are used as groups for accounting accounts of products to build the expense/income report. +PcgtypeDesc=Grupo e subgrupo de conta utilízanse como criterios predefinidos de "filtro" e "agrupación" para algúns informes de contabilidade. Por exemplo, "INGRESOS" ou "GASTOS" usanse como grupos para contas contables de produtos para construir o informe de gastos/ingresos. Reconcilable=Reconcilable TotalVente=Total facturación antes de impostos TotalMarge=Total marxe vendas -DescVentilCustomer=Consult here the list of customer invoice lines bound (or not) to a product accounting account -DescVentilMore=In most cases, if you use predefined products or services and you set the account number on the product/service card, the application will be able to make all the binding between your invoice lines and the accounting account of your chart of accounts, just in one click with the button "%s". If account was not set on product/service cards or if you still have some lines not bound to an account, you will have to make a manual binding from the menu "%s". -DescVentilDoneCustomer=Consult here the list of the lines of invoices customers and their product accounting account -DescVentilTodoCustomer=Bind invoice lines not already bound with a product accounting account -ChangeAccount=Change the product/service accounting account for selected lines with the following accounting account: +DescVentilCustomer=Consulte aquí a lista de liñas de facturas a clientes ligadas (ou non) a unha conta contable de produto +DescVentilMore=Na maioría dos casos, se utiliza produtos ou servizos predefinidos e establece a conta contable na ficha do produto/servizo, a aplicación será capaz de facer toda a contabilización entre as liñas da factura e a conta contable do seu plan xeral contable, cun clic no botón "%s", Se non estableceu a conta contable na ficha do produto/servizo ou se aínda ten algunhas liñas non contabilizadas a alguna conta, terá que facer unha contabilización manual dende o menú "%s". +DescVentilDoneCustomer=Consulte aquí as liñas de facturas a clientes e as contas contables dos seus produtos +DescVentilTodoCustomer=Contabilizar liñas de factura aínda non contabilizadas cunha conta contable de produto +ChangeAccount=Cambie a conta do produto/servizo para as liñas seleccionadas á conta: Vide=- -DescVentilSupplier=Consult here the list of vendor invoice lines bound or not yet bound to a product accounting account (only record not already transfered in accountancy are visible) -DescVentilDoneSupplier=Consult here the list of the lines of vendor invoices and their accounting account -DescVentilTodoExpenseReport=Bind expense report lines not already bound with a fee accounting account -DescVentilExpenseReport=Consult here the list of expense report lines bound (or not) to a fee accounting account -DescVentilExpenseReportMore=If you setup accounting account on type of expense report lines, the application will be able to make all the binding between your expense report lines and the accounting account of your chart of accounts, just in one click with the button "%s". If account was not set on fees dictionary or if you still have some lines not bound to any account, you will have to make a manual binding from the menu "%s". -DescVentilDoneExpenseReport=Consult here the list of the lines of expenses reports and their fees accounting account +DescVentilSupplier=Consulte aquí a listaxe de liñas de facturas de provedores ligadas (ou non) a unha conta contable de produto +DescVentilDoneSupplier=Consulte aquí a listaxe de facturas de provedores e as súas contas contables +DescVentilTodoExpenseReport=Contabilizar liñas de informes de gastos aínda non contabilizadas cunha conta contable de gastos +DescVentilExpenseReport=Consulte aquí a listaxe de liñas de informes de gastos (ou non) a unha conta contable de gastos +DescVentilExpenseReportMore=Se configura as contas contables dos tipos de informes de gastos, a aplicación será capaz de facer a ligazón entre as súas liñas de informes de gastos e as contas contables, simplemente cun clic no botón "%s" , Se non estableceu a conta contable no diccionario ou se aínda ten algunhas liñas non contabilizadas a alguna conta, terá que facer unha contabilización manual dende o menú "%s". +DescVentilDoneExpenseReport=Consulte aquí as liñas de informes de gastos e as súas contas contables DescClosure=Consult here the number of movements by month who are not validated & fiscal years already open OverviewOfMovementsNotValidated=Step 1/ Overview of movements not validated. (Necessary to close a fiscal year) -ValidateMovements=Validate movements +ValidateMovements=Validar os movementos DescValidateMovements=Any modification or deletion of writing, lettering and deletes will be prohibited. All entries for an exercise must be validated otherwise closing will not be possible -SelectMonthAndValidate=Select month and validate movements +SelectMonthAndValidate=Selecciona mes e valida movementos -ValidateHistory=Bind Automatically -AutomaticBindingDone=Automatic binding done +ValidateHistory=Contabilizar automáticamente +AutomaticBindingDone=Ligazón automática finalizada -ErrorAccountancyCodeIsAlreadyUse=Error, you cannot delete this accounting account because it is used -MvtNotCorrectlyBalanced=Movement not correctly balanced. Debit = %s | Credit = %s -Balancing=Balancing -FicheVentilation=Binding card -GeneralLedgerIsWritten=Transactions are written in the Ledger -GeneralLedgerSomeRecordWasNotRecorded=Some of the transactions could not be journalized. If there is no other error message, this is probably because they were already journalized. -NoNewRecordSaved=No more record to journalize -ListOfProductsWithoutAccountingAccount=List of products not bound to any accounting account -ChangeBinding=Change the binding -Accounted=Accounted in ledger -NotYetAccounted=Not yet accounted in ledger -ShowTutorial=Show Tutorial +ErrorAccountancyCodeIsAlreadyUse=Erro, non pode eliminar esta conta xa que está a ser utilizada +MvtNotCorrectlyBalanced=Asento contabilizado incorrectamente. Debe=%s. Haber=%s +Balancing=Saldo +FicheVentilation=Ficha contable +GeneralLedgerIsWritten=Transaccións escritas no Libro Maior +GeneralLedgerSomeRecordWasNotRecorded=Algunhas das operaciones non poden contabilizarse. Se non hai outra mensaxe de erro, é probable que xa estén contabilizadas. +NoNewRecordSaved=Non hai mais rexistros para o diario +ListOfProductsWithoutAccountingAccount=Listaxe de produtos sen contas contables +ChangeBinding=Cambiar a unión +Accounted=Contabilizada no Libro Maior +NotYetAccounted=Aínda non contabilizada no Libro Maior +ShowTutorial=Amosar Tutorial NotReconciled=Non reconciliado ## Admin -ApplyMassCategories=Apply mass categories -AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group -CategoryDeleted=Category for the accounting account has been removed +BindingOptions=Binding options +ApplyMassCategories=Aplicar categorías en masa +AddAccountFromBookKeepingWithNoCategories=Conta dispoñible sen grupo persoalizado +CategoryDeleted=A categoría para a conta contable foi eliminada AccountingJournals=Diarios contables -AccountingJournal=Accounting journal -NewAccountingJournal=New accounting journal +AccountingJournal=Diario contable +NewAccountingJournal=Novo diario contable ShowAccountingJournal=Amosar diario contable -NatureOfJournal=Nature of Journal -AccountingJournalType1=Miscellaneous operations +NatureOfJournal=Natureza do diario +AccountingJournalType1=Operacións varias AccountingJournalType2=Vendas AccountingJournalType3=Compras AccountingJournalType4=Banco -AccountingJournalType5=Expenses report +AccountingJournalType5=Informes de gastos AccountingJournalType8=Inventario -AccountingJournalType9=Has-new -ErrorAccountingJournalIsAlreadyUse=This journal is already use -AccountingAccountForSalesTaxAreDefinedInto=Note: Accounting account for Sales tax are defined into menu %s - %s -NumberOfAccountancyEntries=Number of entries -NumberOfAccountancyMovements=Number of movements +AccountingJournalType9=Haber +ErrorAccountingJournalIsAlreadyUse=Este diario xa está a ser utilizado +AccountingAccountForSalesTaxAreDefinedInto=Nota: A conta contable do IVE nas vendas defínese no menú %s - %s +NumberOfAccountancyEntries=Número de entradas +NumberOfAccountancyMovements=Número de movementos ## Export -ExportDraftJournal=Export draft journal -Modelcsv=Model of export -Selectmodelcsv=Select a model of export -Modelcsv_normal=Classic export -Modelcsv_CEGID=Export for CEGID Expert Comptabilité -Modelcsv_COALA=Export for Sage Coala -Modelcsv_bob50=Export for Sage BOB 50 -Modelcsv_ciel=Export for Sage Ciel Compta or Compta Evolution -Modelcsv_quadratus=Export for Quadratus QuadraCompta -Modelcsv_ebp=Export for EBP -Modelcsv_cogilog=Export for Cogilog -Modelcsv_agiris=Export for Agiris -Modelcsv_LDCompta=Export for LD Compta (v9) (Test) -Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) -Modelcsv_openconcerto=Export for OpenConcerto (Test) -Modelcsv_configurable=Export CSV Configurable -Modelcsv_FEC=Export FEC -Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland -Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta -ChartofaccountsId=Chart of accounts Id +ExportDraftJournal=Exportar libro borrador +Modelcsv=Modelo de exportación +Selectmodelcsv=Seleccione un modelo de exportación +Modelcsv_normal=Exportación clásica +Modelcsv_CEGID=Exportar cara a CEGID Expert Comptabilité +Modelcsv_COALA=Exportar cara a Sage Celoala +Modelcsv_bob50=Exportar cara a Sage BOB 50 +Modelcsv_ciel=Exportar cara a Sage Ciel Compta o Compta Evolution +Modelcsv_quadratus=Exportar cara a Quadratus QuadraCompta +Modelcsv_ebp=Exportar a EBP +Modelcsv_cogilog=Exportar a Cogilog +Modelcsv_agiris=Exportar a Agiris +Modelcsv_LDCompta=Exportar a LD Compta (v9 & maior) (En Probas) +Modelcsv_LDCompta10=Exportar a LD Compta (v10 & maior) +Modelcsv_openconcerto=Exportar a OpenConcerto (En probas) +Modelcsv_configurable=Exportar a CSV Configurable +Modelcsv_FEC=Exportar FEC (Art. L47 A) +Modelcsv_Sage50_Swiss=Exportar a Sage 50 Suiza +Modelcsv_winfic=Exportar a Winfic - eWinfic - WinSis Conta +ChartofaccountsId=Id do plan contable ## Tools - Init accounting account on product / service -InitAccountancy=Init accountancy -InitAccountancyDesc=This page can be used to initialize an accounting account on products and services that does not have accounting account defined for sales and purchases. -DefaultBindingDesc=This page can be used to set a default account to use to link transactions record about payment salaries, donation, taxes and vat when no specific accounting account were already set. -DefaultClosureDesc=This page can be used to set parameters used for accounting closures. -Options=Options -OptionModeProductSell=Mode sales -OptionModeProductSellIntra=Mode sales exported in EEC -OptionModeProductSellExport=Mode sales exported in other countries -OptionModeProductBuy=Mode purchases +InitAccountancy=Iniciar contabilidade +InitAccountancyDesc=Pode usar esta páxina para inicializar o código contable en produtos e servizos que non teñen código contable definido para vendas e compras +DefaultBindingDesc=Esta páxina pode usarse para establecer unha conta predeterminada que se utilizará para ligar rexistros de salarios, doncións, impostos e IVE cando non estexa establecida unha conta contable. +DefaultClosureDesc=Esta páxina pode usarse para configurar os parámetros que se usarán para incluir un balance xeral. +Options=Opcións +OptionModeProductSell=Modo vendas +OptionModeProductSellIntra=Modo Vendas exportación CEE +OptionModeProductSellExport=Modo vendas exportación outros paises +OptionModeProductBuy=Modo compras OptionModeProductBuyIntra=Mode purchases imported in EEC OptionModeProductBuyExport=Mode purchased imported from other countries -OptionModeProductSellDesc=Show all products with accounting account for sales. -OptionModeProductSellIntraDesc=Show all products with accounting account for sales in EEC. -OptionModeProductSellExportDesc=Show all products with accounting account for other foreign sales. -OptionModeProductBuyDesc=Show all products with accounting account for purchases. +OptionModeProductSellDesc=Amosar todos os produtos con conta contable de vendas +OptionModeProductSellIntraDesc=Amosar todos os produtos con conta contable para vendas na CEE. +OptionModeProductSellExportDesc=Amosar todos os produtos con conta contable para outras vendas ao exterior. +OptionModeProductBuyDesc=Amosar todos os produtos con conta contable de compras OptionModeProductBuyIntraDesc=Show all products with accounting account for purchases in EEC. OptionModeProductBuyExportDesc=Show all products with accounting account for other foreign purchases. -CleanFixHistory=Remove accounting code from lines that not exists into charts of account -CleanHistory=Reset all bindings for selected year -PredefinedGroups=Predefined groups -WithoutValidAccount=Without valid dedicated account -WithValidAccount=With valid dedicated account -ValueNotIntoChartOfAccount=This value of accounting account does not exist into chart of account -AccountRemovedFromGroup=Account removed from group -SaleLocal=Local sale -SaleExport=Export sale -SaleEEC=Sale in EEC +CleanFixHistory=Eliminar código contable das liñas que no existen no plan contable +CleanHistory=Resetear todos os vínculos do ano seleccionado +PredefinedGroups=Grupos persoalizados +WithoutValidAccount=Sen conta adicada válida +WithValidAccount=Con conta adicada válida +ValueNotIntoChartOfAccount=Este valor de conta contable non existe no plan xeral contable +AccountRemovedFromGroup=Conta eliminada do grupo +SaleLocal=Venda local +SaleExport=Venda de exportación +SaleEEC=Venda na CEE SaleEECWithVAT=Sale in EEC with a VAT not null, so we suppose this is NOT an intracommunautary sale and the suggested account is the standard product account. SaleEECWithoutVATNumber=Sale in EEC with no VAT but the VAT ID of thirdparty is not defined. We fallback on the product account for standard sales. You can fix the VAT ID of thirdparty or the product account if needed. ## Dictionary -Range=Range of accounting account +Range=Rango de conta contable Calculated=Calculado Formula=Fórmula ## Error -SomeMandatoryStepsOfSetupWereNotDone=Some mandatory steps of setup was not done, please complete them -ErrorNoAccountingCategoryForThisCountry=No accounting account group available for country %s (See Home - Setup - Dictionaries) -ErrorInvoiceContainsLinesNotYetBounded=You try to journalize some lines of the invoice %s, but some other lines are not yet bounded to accounting account. Journalization of all invoice lines for this invoice are refused. -ErrorInvoiceContainsLinesNotYetBoundedShort=Some lines on invoice are not bound to accounting account. -ExportNotSupported=The export format setuped is not supported into this page -BookeppingLineAlreayExists=Lines already existing into bookkeeping -NoJournalDefined=No journal defined -Binded=Lines bound -ToBind=Lines to bind -UseMenuToSetBindindManualy=Lines not yet bound, use menu %s to make the binding manually +SomeMandatoryStepsOfSetupWereNotDone=Algúns pasos precisoss da configuración non foron realizados, prégase completalos. +ErrorNoAccountingCategoryForThisCountry=Non hai grupos contables dispoñibles para %s (Vexa Inicio - Configuración - Diccionarios) +ErrorInvoiceContainsLinesNotYetBounded=Tenta facer un diario de algunhas liñas da factura %s, pero algunhas outras liñas aínda non están ligadas a contas contables. Rexeitase a contabilización de todas as liñas de factura desta factura. +ErrorInvoiceContainsLinesNotYetBoundedShort=Algunhas liñas da factura non están ligadas a contas contables. +ExportNotSupported=O formato de exportación configurado non é soportado nesta páxina +BookeppingLineAlreayExists=Liñas xa existentes na contabilidade +NoJournalDefined=Sen diario definido +Binded=Liñas contabilizadas +ToBind=Liñas a contabilizar +UseMenuToSetBindindManualy=Non é posible autodetectar, utilice o menú %s para realizar o apunte manualmente ## Import -ImportAccountingEntries=Accounting entries -DateExport=Date export -WarningReportNotReliable=Warning, this report is not based on the Ledger, so does not contains transaction modified manually in the Ledger. If your journalization is up to date, the bookkeeping view is more accurate. -ExpenseReportJournal=Expense Report Journal -InventoryJournal=Inventory Journal +ImportAccountingEntries=Entradas contables +DateExport=Data de exportación +WarningReportNotReliable=Advertencia, este informe non está baseado no Libro Maior, polo que non contén modificacións manualmente realizadas no Libro Maior. Se o seu diario está actualizado, a vista contable é mais precisa. +ExpenseReportJournal=Informe de gastos diario +InventoryJournal=Inventario diff --git a/htdocs/langs/gl_ES/admin.lang b/htdocs/langs/gl_ES/admin.lang index b4e5f205f5d..8b46f093b21 100644 --- a/htdocs/langs/gl_ES/admin.lang +++ b/htdocs/langs/gl_ES/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Configuración do Módulo ModulesSetup=Configuración dos Módulos/Aplicacións ModuleFamilyBase=Sistema @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=O módulo %s debe ser activado antes se precisa SecurityToken=Chave para cifrar urls NoSmsEngine=Non hai dispoñible ningún xestor de envío de SMS. Os xestores de envío de SMS no son instalados por defecto xa que dependen de cada provedor, porén pode atopalos na plataforma %s PDF=PDF -PDFDesc=Pode definir aquí as opcións globais para xerar os PDF -PDFAddressForging=Regras de visualización de enderezos +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Ocultar toda a información relacionada co IVE ao xerar os PDF PDFRulesForSalesTax=Regras de IVE PDFLocaltax=Regras para %s -HideLocalTaxOnPDF=Ocultar a taxa %s na columna de impostos do pdf +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Ocultar descrición dos produtos ao xerar os PDF HideRefOnPDF=Ocultar referencia dos produtos ao xerar os PDF HideDetailsOnPDF=Ocultar detalles das liñas ao xerar os PDF @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Cambiar o prezo cuxa referencia de base é MassConvert=Convertir masivamente PriceFormatInCurrentLanguage=Formato de prezo na lingua utilizada String=Cadea de texto +String1Line=String (1 line) TextLong=Texto longo +TextLongNLines=Long text (n lines) HtmlText=Texto html Int=Numérico enteiro Float=Decimal @@ -427,7 +430,7 @@ ExtrafieldRadio=Botón tipo radio (só un seleccionado) ExtrafieldCheckBox=Caixa de verificación ExtrafieldCheckBoxFromList=Caixa de verificación da táboa ExtrafieldLink=Vínculo a un obxecto -ComputedFormula=Computed field +ComputedFormula=Campo combinado ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' Computedpersistent=Store computed field ComputedpersistentDesc=Computed extra fields will be stored in the database, however, the value will only be recalculated when the object of this field is changed. If the computed field depends on other objects or global data this value might be wrong!! @@ -543,9 +546,9 @@ Module54Desc=Xestión de contratos (servizos ou suscripcións recurrentes) Module55Name=Códigos de barras Module55Desc=Xestión dos códigos de barras Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Domiciliacións bancarias -Module57Desc=Xestión de domiciliacións. Tamén inclue xeración de ficheiro SEPA para países Europeos. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integración con sistema ClickToDial (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Crear/modificar servizos Permission534=Eliminar servizos Permission536=Ver/xestionar os servizos ocultos Permission538=Exportar servizos +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Consultar lista de materiais Permission651=Crear/Actualizar lista de material Permission652=Eliminar lista de material +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Consultar doacións/subvencións Permission702=Crear/modificar doacións/subvencións Permission703=Eliminar doacións/subvencións @@ -848,6 +858,8 @@ Permission773=Eliminar informe de gastos Permission774=Consultar todos os informes de gastos (incluidos os non subordinados) Permission775=Aprobar informe de gastos Permission776=Pagar informe de gastos +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Exportar informe de gastos Permission1001=Consultar stocks Permission1002=Crear/modificar almacéns @@ -900,6 +912,7 @@ Permission2515=Configuración directorios de documentos Permission2801=Utilizar o cliente FTP en modo leitura (só explorar e descargar) Permission2802=Utilizar o cliente FTP en modo escritura (borrar ou subir ficheiros) Permission3200=Consultar eventos arquivados e huellas dixitais +Permission3301=Generate new modules Permission4001=Ver empregados Permission4002=Crear empregados Permission4003=Eliminar empregados @@ -947,7 +960,8 @@ Permission63003=Eliminar recursos Permission63004=Ligar recursos a eventos da axenda DictionaryCompanyType=Tipos de terceiros DictionaryCompanyJuridicalType=Formas xurídicas de terceiros -DictionaryProspectLevel=Cliente potencial +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Provincias DictionaryRegion=Rexións DictionaryCountry=Países @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Prantillas E-Mails DictionaryUnits=Unidades DictionaryMeasuringUnits=Unidades de Medida DictionarySocialNetworks=Redes sociais -DictionaryProspectStatus=Estado cliente potencial +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Tipos de vacacións DictionaryOpportunityStatus=Estado de oportunidade para o proxecto/oportunidade DictionaryExpenseTaxCat=Informe de gastos - Categorías de transporte @@ -1076,7 +1091,7 @@ LoginPage=Páxina de login BackgroundImageLogin=Imaxe de fondo PermanentLeftSearchForm=Zona de procura permanente do menú esquerdo DefaultLanguage=Idioma por defecto -EnableMultilangInterface=Activar interfaz multi-idioma +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Amosar o logotipo no menú da esquerda CompanyInfo=Empresa/Organización CompanyIds=Identificación da empresa/organización @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Sí en verano @@ -1595,7 +1611,7 @@ MailingDelay=Seconds to wait after sending next message ##### Notification ##### NotificationSetup=Email Notification module setup NotificationEMailFrom=Sender email (From) for emails sent by the Notifications module -FixedEmailTarget=Recipient +FixedEmailTarget=Destinatario ##### Sendings ##### SendingsSetup=Shipping module setup SendingsReceiptModel=Sending receipt model @@ -1658,7 +1674,7 @@ OptionVatDebitOptionDesc=VAT is due:
    - on delivery of goods (based on invoice OptionPaymentForProductAndServices=Cash basis for products and services OptionPaymentForProductAndServicesDesc=VAT is due:
    - on payment for goods
    - on payments for services SummaryOfVatExigibilityUsedByDefault=Time of VAT eligibility by default according to chosen option: -OnDelivery=On delivery +OnDelivery=Pagamento á entrega OnPayment=On payment OnInvoice=On invoice SupposedToBePaymentDate=Payment date used @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,11 +1702,11 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### -CashDesk=Point of Sale +CashDesk=Terminales Punto de Venda CashDeskSetup=Point of Sales module setup CashDeskThirdPartyForSell=Default generic third party to use for sales CashDeskBankAccountForSell=Default account to use to receive cash payments @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Para enviar solicitude de orzamento a prov MailToSendSupplierOrder=Pedimentos a provedor MailToSendSupplierInvoice=Facturas provedor MailToSendContract=Contratos +MailToSendReception=Receptions MailToThirdparty=Terceiros MailToMember=Membros MailToUser=Usuarios @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Marxe esquerdo en PDF MAIN_PDF_MARGIN_RIGHT=Marxe dereito en PDF MAIN_PDF_MARGIN_TOP=Marxe superior en PDF MAIN_PDF_MARGIN_BOTTOM=Marxe inferior en PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Código postal MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=ID única da instancia SmallerThan=Menor que LargerThan=Maior que -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/gl_ES/agenda.lang b/htdocs/langs/gl_ES/agenda.lang index 20eb9aefaf6..b76942ad53e 100644 --- a/htdocs/langs/gl_ES/agenda.lang +++ b/htdocs/langs/gl_ES/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Número de eventos ListOfActions=Listaxe de eventos EventReports=Informes de evento Location=Localización -ToUserOfGroup=A calquera usuario do grupo +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Evento para todo o(s) día(s) MenuToDoActions=Todos os eventos incompletos MenuDoneActions=Todos os eventos rematados @@ -86,6 +86,8 @@ ProposalDeleted=Orzamento eliminado OrderDeleted=Pedido eliminado InvoiceDeleted=Factura eliminada DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Produto %s creado PRODUCT_MODIFYInDolibarr=Produto %s modificado PRODUCT_DELETEInDolibarr=Produto %s eliminado @@ -158,3 +160,9 @@ DateStartPlusOne=Data inicio +1 hora SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/gl_ES/assets.lang b/htdocs/langs/gl_ES/assets.lang index 7bc7e8d73a1..a8ede67427d 100644 --- a/htdocs/langs/gl_ES/assets.lang +++ b/htdocs/langs/gl_ES/assets.lang @@ -16,44 +16,44 @@ # # Generic # -Assets = Assets -NewAsset = New asset -AccountancyCodeAsset = Accounting code (asset) -AccountancyCodeDepreciationAsset = Accounting code (depreciation asset account) -AccountancyCodeDepreciationExpense = Accounting code (depreciation expense account) -NewAssetType=New asset type -AssetsTypeSetup=Asset type setup -AssetTypeModified=Asset type modified -AssetType=Asset type -AssetsLines=Assets +Assets = Activos +NewAsset = Novo activo +AccountancyCodeAsset = Código contable (activo) +AccountancyCodeDepreciationAsset = Código contable (conta depreciación activo) +AccountancyCodeDepreciationExpense = Código contable (conta depreciación gastos) +NewAssetType=Nuevo tipo de activo +AssetsTypeSetup=Configuración tipos de activos +AssetTypeModified=Tipo de activo modificado +AssetType=Tipo de activo +AssetsLines=Activos DeleteType=Eliminar -DeleteAnAssetType=Delete an asset type -ConfirmDeleteAssetType=Are you sure you want to delete this asset type? -ShowTypeCard=Show type '%s' +DeleteAnAssetType=Eliminar un tipo de activo +ConfirmDeleteAssetType=¿Está certo de querer eliminar este tipo de activo? +ShowTypeCard=Ver tipo '%s' # Module label 'ModuleAssetsName' -ModuleAssetsName = Assets +ModuleAssetsName = Activos # Module description 'ModuleAssetsDesc' -ModuleAssetsDesc = Assets description +ModuleAssetsDesc = Descrición ben # # Admin page # -AssetsSetup = Assets setup -Settings = Settings -AssetsSetupPage = Assets setup page -ExtraFieldsAssetsType = Complementary attributes (Asset type) -AssetsType=Asset type -AssetsTypeId=Asset type id -AssetsTypeLabel=Asset type label -AssetsTypes=Assets types +AssetsSetup = Configuración activos +Settings = Configuracións +AssetsSetupPage = Configuración activos +ExtraFieldsAssetsType = Campos adicionais (tipos de activos) +AssetsType=Tipo de activo +AssetsTypeId=Id tipo de activo +AssetsTypeLabel=Etiqueta tipo de activo +AssetsTypes=Tipos de activos # # Menu # -MenuAssets = Assets -MenuNewAsset = New asset -MenuTypeAssets = Type assets +MenuAssets = Activos +MenuNewAsset = Novo ben +MenuTypeAssets = Tipo de activos MenuListAssets = Listaxe MenuNewTypeAssets = Novo MenuListTypeAssets = Listaxe @@ -61,5 +61,5 @@ MenuListTypeAssets = Listaxe # # Module # -NewAssetType=New asset type -NewAsset=New asset +NewAssetType=Nuevo tipo de activo +NewAsset=Novo activo diff --git a/htdocs/langs/gl_ES/banks.lang b/htdocs/langs/gl_ES/banks.lang index 029c6deba8e..93160d3254e 100644 --- a/htdocs/langs/gl_ES/banks.lang +++ b/htdocs/langs/gl_ES/banks.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - banks Bank=Banco MenuBankCash=Bancos | Caixa -MenuVariousPayment=Pagos varios -MenuNewVariousPayment=Novos pagos varios +MenuVariousPayment=Pagamentos varios +MenuNewVariousPayment=Novos pagamentos varios BankName=Nome do banco FinancialAccount=Conta BankAccount=Conta bancaria @@ -35,7 +35,7 @@ SwiftValid=BIC/SWIFT válido SwiftVNotalid=BIC/SWIFT non válido IbanValid=IBAN válido IbanNotValid=IBAN non válido -StandingOrders=Direct debit orders +StandingOrders=Domiciliacións StandingOrder=Domiciliación PaymentByDirectDebit=Payment by direct debit PaymentByBankTransfers=Payments by credit transfer @@ -76,7 +76,7 @@ BankTransaction=Rexistro bancario ListTransactions=Listaxe rexistros ListTransactionsByCategory=Listaxe rexistros/categoría TransactionsToConciliate=Rexistros a conciliar -TransactionsToConciliateShort=To reconcile +TransactionsToConciliateShort=A conciliar Conciliable=Pode ser conciliado Conciliate=Conciliar Conciliation=Conciliación @@ -88,7 +88,7 @@ AccountToCredit=Conta de crédito AccountToDebit=Conta de débito DisableConciliation=Desactivar a función de conciliación para esta conta ConciliationDisabled=Función de conciliación desactivada -LinkedToAConciliatedTransaction=Vinculada a un rexistro conciliado +LinkedToAConciliatedTransaction=Ligada a un rexistro conciliado StatusAccountOpened=Aberta StatusAccountClosed=Pechada AccountIdShort=Número @@ -98,31 +98,31 @@ AddBankRecordLong=Engadir rexistro manual Conciliated=Reconciliado ConciliatedBy=Reconciliado por DateConciliating=Data de reconciliación -BankLineConciliated=Entry reconciled with bank receipt +BankLineConciliated=Rexistro reconciliado Reconciled=Reconciliado NotReconciled=Non reconciliado CustomerInvoicePayment=Cobro a cliente -SupplierInvoicePayment=Pago a provedor -SubscriptionPayment=Pago cota -WithdrawalPayment=Debit payment order -SocialContributionPayment=Pago de imposto social/fiscal -BankTransfer=Credit transfer -BankTransfers=Credit transfers +SupplierInvoicePayment=Pagamento a provedor +SubscriptionPayment=Pagamento cota +WithdrawalPayment=Cobro de domiciliación +SocialContributionPayment=Pagamento de imposto social/fiscal +BankTransfer=Transferencia bancaria +BankTransfers=Transferencias bancarias MenuBankInternalTransfer=Transferencia interna TransferDesc=Ao transferir dunha conta a outra, Dolibarr crea dous rexistros contables (un de débito na conta orixe e un de crédito na conta destino). Do mesmo importe (salvo o signo), a etiqueta e a data serán usadas para esta transacción. TransferFrom=De TransferTo=A TransferFromToDone=A transferencia de %s hacia %s de %s %s foi rexistrada. CheckTransmitter=Emisor -ValidateCheckReceipt=¿Validar este cheque recibido? +ValidateCheckReceipt=¿Validar este talón recibido? ConfirmValidateCheckReceipt=¿Está certo de querer validar esta remesa? (ningunha modificación será posible unha vez sexa aprobada) DeleteCheckReceipt=¿Eliminar esta remesa? ConfirmDeleteCheckReceipt=¿Está certo de querer eliminar esta remesa? -BankChecks=Cheques bancarios -BankChecksToReceipt=Cheques agardando o deposito -BankChecksToReceiptShort=Cheques agardando o deposito +BankChecks=Talóns bancarios +BankChecksToReceipt=Talóns agardando o deposito +BankChecksToReceiptShort=Talóns agardando deposito ShowCheckReceipt=Amosar remesa recibida -NumberOfCheques=Nº de cheque +NumberOfCheques=Nº de talón DeleteTransaction=Eliminar rexistro ConfirmDeleteTransaction=¿Está certo de querer eliminar este rexistro? ThisWillAlsoDeleteBankRecord=Isto tamén eliminará o rexistro bancario @@ -132,21 +132,21 @@ Graph=Gráficos ExportDataset_banque_1=Rexistros bancarios e extractos de conta ExportDataset_banque_2=Xustificante bancario TransactionOnTheOtherAccount=Transacción sobre a outra conta -PaymentNumberUpdateSucceeded=Número de pago actualizado correctamente -PaymentNumberUpdateFailed=Numero de pago non puido ser actualizado -PaymentDateUpdateSucceeded=Data de pago actualizada correctamente -PaymentDateUpdateFailed=Data de pago non puido ser actualizada +PaymentNumberUpdateSucceeded=Número de pagamento actualizado correctamente +PaymentNumberUpdateFailed=Numero de pagamento non puido ser actualizado +PaymentDateUpdateSucceeded=Data de pagamento actualizada correctamente +PaymentDateUpdateFailed=Data de pagamento non puido ser actualizada Transactions=Transaccións BankTransactionLine=Rexistro bancario AllAccounts=Todas as contas bancarias e de caixa BackToAccount=Voltar á conta ShowAllAccounts=Amosar para todas as contas FutureTransaction=Transacción futura. Non é posible a reconciliación. -SelectChequeTransactionAndGenerate=Seleccione/filtre cheques a engadir na remesa de cheches e facga click en "Crear". +SelectChequeTransactionAndGenerate=Seleccione/filtre talóns a engadir na remesa de cheches e facga click en "Crear". InputReceiptNumber=Escolla o extracto relacionado coa conciliación. Use o valor númerico ordenable: YYMM or YYYYMMDD EventualyAddCategory=Eventualmente, especifique a categoría na que quere clasificar os rexistros ToConciliate=A reconciliar? -ThenCheckLinesAndConciliate=Entón, chequea as liñas presentes no extracto bancario e faga click +ThenCheckLinesAndConciliate=Entón, comprobe as liñas presentes no extracto bancario e faga click DefaultRIB=Conta bancaria por defecto AllRIB=Todas as contas bancarias LabelRIB=Nome da conta bancaria @@ -154,18 +154,18 @@ NoBANRecord=Ningunha conta bancaria DeleteARib=Borrar rexistro bancario ConfirmDeleteRib=¿Está certo de querer eliminar esta conta bancaria? RejectCheck=Cheque rexeitado -ConfirmRejectCheck=¿Está certo de querer marcar este cheque como rexeitado? -RejectCheckDate=Data de rexeitamento do cheque +ConfirmRejectCheck=¿Está certo de querer marcar este talón como rexeitado? +RejectCheckDate=Data de rexeitamento do talón CheckRejected=Cheque rexeitado -CheckRejectedAndInvoicesReopened=Check returned and invoices re-open +CheckRejectedAndInvoicesReopened=Cheque de volta e facturas abertas de novo BankAccountModelModule=Modelos de documentos para contas bancarias DocumentModelSepaMandate=Prantilla de orde SEPA. Útil só para países membros da UE. DocumentModelBan=Prantilla para imprimir unha páxina coa información IBAN. -NewVariousPayment=New miscellaneous payment -VariousPayment=Miscellaneous payment -VariousPayments=Pagos varios -ShowVariousPayment=Show miscellaneous payment -AddVariousPayment=Add miscellaneous payment +NewVariousPayment=Novo pagamento varios +VariousPayment=Pagamento varios +VariousPayments=Pagamentos varios +ShowVariousPayment=Amosar pagamentos varios +AddVariousPayment=Engadir pagamentos varios SEPAMandate=Orde SEPA YourSEPAMandate=A súa orde SEPA FindYourSEPAMandate=Esta é a súa orde SEPA para autorizar a nosa empresa a realizar un petición de débito ao seu banco. Envíea de volta asinada (dixitalice o documento asinado) ou envíe por correo a diff --git a/htdocs/langs/gl_ES/bills.lang b/htdocs/langs/gl_ES/bills.lang index 477aecd928f..a11d0d3fecd 100644 --- a/htdocs/langs/gl_ES/bills.lang +++ b/htdocs/langs/gl_ES/bills.lang @@ -1,150 +1,150 @@ # Dolibarr language file - Source file is en_US - bills Bill=Factura -Bills=Facturas e abonos +Bills=Facturas BillsCustomers=Facturas a clientes -BillsCustomer=Customer invoice -BillsSuppliers=Facturas provedor -BillsCustomersUnpaid=Unpaid customer invoices -BillsCustomersUnpaidForCompany=Unpaid customer invoices for %s -BillsSuppliersUnpaid=Unpaid vendor invoices -BillsSuppliersUnpaidForCompany=Unpaid vendors invoices for %s -BillsLate=Late payments -BillsStatistics=Customers invoices statistics -BillsStatisticsSuppliers=Vendors invoices statistics -DisabledBecauseDispatchedInBookkeeping=Disabled because invoice was dispatched into bookkeeping -DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter. -DisabledBecauseNotErasable=Disabled because cannot be erased -InvoiceStandard=Standard invoice -InvoiceStandardAsk=Standard invoice -InvoiceStandardDesc=This kind of invoice is the common invoice. -InvoiceDeposit=Down payment invoice -InvoiceDepositAsk=Down payment invoice +BillsCustomer=Factura a cliente +BillsSuppliers=Facturas de provedores +BillsCustomersUnpaid=Facturas a clientes pendentes de cobro +BillsCustomersUnpaidForCompany=Facturas pendentes de cobro de %s +BillsSuppliersUnpaid=Facturas de provedores pendentes de pagamento +BillsSuppliersUnpaidForCompany=Facturas pendentes de pagamento a %s +BillsLate=Atraso no pagamento +BillsStatistics=Estatísticas de facturas a clientes +BillsStatisticsSuppliers=Estatísticas de facturas de provedores +DisabledBecauseDispatchedInBookkeeping=Desactivado porque a factura contabilizouse +DisabledBecauseNotLastInvoice=Desactivado porque a factura non pódese borrar. Foron creadas facturas despois desta e crearían ocos no contador. +DisabledBecauseNotErasable=Desactivado xa que non pode eliminarse +InvoiceStandard=Factura estándar +InvoiceStandardAsk=Factura estándar +InvoiceStandardDesc=Este tipo de factura é a factura tradicional. +InvoiceDeposit=Factura de anticipo +InvoiceDepositAsk=Factura de anticipo InvoiceDepositDesc=This kind of invoice is done when a down payment has been received. -InvoiceProForma=Proforma invoice -InvoiceProFormaAsk=Proforma invoice -InvoiceProFormaDesc=Proforma invoice is an image of a true invoice but has no accountancy value. -InvoiceReplacement=Replacement invoice -InvoiceReplacementAsk=Replacement invoice for invoice -InvoiceReplacementDesc=Replacement invoice is used to completely replace an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. -InvoiceAvoir=Credit note -InvoiceAvoirAsk=Credit note to correct invoice -InvoiceAvoirDesc=The credit note is a negative invoice used to correct the fact that an invoice shows an amount that differs from the amount actually paid (eg the customer paid too much by mistake, or will not pay the complete amount since some products were returned). -invoiceAvoirWithLines=Create Credit Note with lines from the origin invoice -invoiceAvoirWithPaymentRestAmount=Create Credit Note with remaining unpaid of origin invoice -invoiceAvoirLineWithPaymentRestAmount=Credit Note for remaining unpaid amount -ReplaceInvoice=Replace invoice %s -ReplacementInvoice=Replacement invoice -ReplacedByInvoice=Replaced by invoice %s -ReplacementByInvoice=Replaced by invoice -CorrectInvoice=Correct invoice %s -CorrectionInvoice=Correction invoice -UsedByInvoice=Used to pay invoice %s -ConsumedBy=Consumed by -NotConsumed=Not consumed -NoReplacableInvoice=No replaceable invoices -NoInvoiceToCorrect=No invoice to correct -InvoiceHasAvoir=Was source of one or several credit notes -CardBill=Invoice card -PredefinedInvoices=Predefined Invoices +InvoiceProForma=Factura proforma +InvoiceProFormaAsk=Factura proforma +InvoiceProFormaDesc=A factura proforma é a imaxe dunha factura definitiva, pero que non ten ningún valor contable. +InvoiceReplacement=Factura rectificativa +InvoiceReplacementAsk=Factura rectificativa da factura +InvoiceReplacementDesc=A factura rectificativa serve para cancelar e sustituir unha factura existente sobre a que ainda non hai pagamentos recibidos.

    Nota: Só poden rectificarse as facturas sen pagamentos rexistrados. Se esta última non está pechada, pasará automáticamente ao estado 'abandonada'. +InvoiceAvoir=Factura con rectificación parcial +InvoiceAvoirAsk=Abono para corrixir a factura +InvoiceAvoirDesc=O abono é unha factura negativa destinada a compensar un importe de factura que difire do importe realmente pagado (por ter pagado de mais ou por devolución de produtos, por exemplo). +invoiceAvoirWithLines=Crear abono coas liñas da factura orixinal +invoiceAvoirWithPaymentRestAmount=Crear abono co resto a cobrar da factura orixe +invoiceAvoirLineWithPaymentRestAmount=Abono do resto por cobrar +ReplaceInvoice=Rectificar a factura %s +ReplacementInvoice=Rectificación factura +ReplacedByInvoice=Rectificada pola factura %s +ReplacementByInvoice=Rectificada por factura +CorrectInvoice=Correción factura %s +CorrectionInvoice=Correción +UsedByInvoice=Aplicado á factura %s +ConsumedBy=Consumido por +NotConsumed=Non consumido +NoReplacableInvoice=Sen facturas rectificables +NoInvoiceToCorrect=Sen facturas a corrixir +InvoiceHasAvoir=Corrixida por un ou mais abonos +CardBill=Ficha factura +PredefinedInvoices=Factura predefinida Invoice=Factura PdfInvoiceTitle=Factura -Invoices=Facturas e abonos -InvoiceLine=Invoice line -InvoiceCustomer=Customer invoice -CustomerInvoice=Customer invoice +Invoices=Facturas +InvoiceLine=Liña de factura +InvoiceCustomer=Factura a cliente +CustomerInvoice=Factura a cliente CustomersInvoices=Facturas a clientes SupplierInvoice=Factura de provedor -SuppliersInvoices=Vendors invoices +SuppliersInvoices=Facturas provedores SupplierBill=Factura de provedor -SupplierBills=suppliers invoices -Payment=Payment -PaymentBack=Refund -CustomerInvoicePaymentBack=Refund -Payments=Payments -PaymentsBack=Refunds -paymentInInvoiceCurrency=in invoices currency -PaidBack=Paid back -DeletePayment=Delete payment -ConfirmDeletePayment=Are you sure you want to delete this payment? +SupplierBills=Facturas de provedores +Payment=Pagamento +PaymentBack=Reembolso +CustomerInvoicePaymentBack=Reembolso +Payments=Pagamentos +PaymentsBack=Reembolsos +paymentInInvoiceCurrency=na moeda das facturas +PaidBack=Reembolsado +DeletePayment=Eliminar o pagamento +ConfirmDeletePayment=¿Está certo de querer eliminar este pagamento? ConfirmConvertToReduc=Do you want to convert this %s into an available credit? ConfirmConvertToReduc2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this customer. ConfirmConvertToReducSupplier=Do you want to convert this %s into an available credit? ConfirmConvertToReducSupplier2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this vendor. SupplierPayments=Pagamentos a provedores -ReceivedPayments=Received payments -ReceivedCustomersPayments=Payments received from customers -PayedSuppliersPayments=Payments paid to vendors -ReceivedCustomersPaymentsToValid=Received customers payments to validate -PaymentsReportsForYear=Payments reports for %s -PaymentsReports=Payments reports -PaymentsAlreadyDone=Payments already done -PaymentsBackAlreadyDone=Refunds already done -PaymentRule=Payment rule -PaymentMode=Payment Type -PaymentTypeDC=Debit/Credit Card +ReceivedPayments=Pagamentos recibidos +ReceivedCustomersPayments=Pagamentos recibidos de cliente +PayedSuppliersPayments=Pagamentos realizados a provedores +ReceivedCustomersPaymentsToValid=Pagamentos recibidos de cliente a validar +PaymentsReportsForYear=Informes de pagamentos de %s +PaymentsReports=Informes de pagamentos +PaymentsAlreadyDone=Pagamentos efectuados +PaymentsBackAlreadyDone=Reembolsos xa efectuados +PaymentRule=Forma de pagamento +PaymentMode=Forma de pagamento +PaymentTypeDC=Tarxeta de Débito/Crédito PaymentTypePP=PayPal -IdPaymentMode=Payment Type (id) -CodePaymentMode=Payment Type (code) -LabelPaymentMode=Payment Type (label) -PaymentModeShort=Payment Type -PaymentTerm=Payment Term +IdPaymentMode=Tipo de pagamento (id) +CodePaymentMode=Tipo de pagamento (código) +LabelPaymentMode=Tipo de pagamento (etiqueta) +PaymentModeShort=Forma de pagamento +PaymentTerm=Condición de pagamento PaymentConditions=Condicións de pagamento PaymentConditionsShort=Condicións de pagamento -PaymentAmount=Importe pago -PaymentHigherThanReminderToPay=Payment higher than reminder to pay +PaymentAmount=Importe pagamento +PaymentHigherThanReminderToPay=Pagamento superior ao resto a pagar HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
    Edit your entry, otherwise confirm and consider creating a credit note for the excess received for each overpaid invoice. HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
    Edit your entry, otherwise confirm and consider creating a credit note for the excess paid for each overpaid invoice. -ClassifyPaid=Classify 'Paid' -ClassifyUnPaid=Classify 'Unpaid' -ClassifyPaidPartially=Classify 'Paid partially' -ClassifyCanceled=Classify 'Abandoned' -ClassifyClosed=Classify 'Closed' -ClassifyUnBilled=Classify 'Unbilled' -CreateBill=Create Invoice -CreateCreditNote=Create credit note -AddBill=Create invoice or credit note -AddToDraftInvoices=Add to draft invoice -DeleteBill=Delete invoice -SearchACustomerInvoice=Search for a customer invoice -SearchASupplierInvoice=Search for a vendor invoice -CancelBill=Cancel an invoice -SendRemindByMail=Send reminder by email -DoPayment=Enter payment -DoPaymentBack=Enter refund -ConvertToReduc=Mark as credit available -ConvertExcessReceivedToReduc=Convert excess received into available credit -ConvertExcessPaidToReduc=Convert excess paid into available discount -EnterPaymentReceivedFromCustomer=Enter payment received from customer -EnterPaymentDueToCustomer=Make payment due to customer -DisabledBecauseRemainderToPayIsZero=Disabled because remaining unpaid is zero -PriceBase=Price base -BillStatus=Invoice status -StatusOfGeneratedInvoices=Status of generated invoices -BillStatusDraft=Borrador (é preciso validar) -BillStatusPaid=Pago -BillStatusPaidBackOrConverted=Credit note refund or marked as credit available -BillStatusConverted=Paid (ready for consumption in final invoice) -BillStatusCanceled=Abandoned -BillStatusValidated=Validated (needs to be paid) -BillStatusStarted=Started -BillStatusNotPaid=Not paid -BillStatusNotRefunded=Not refunded -BillStatusClosedUnpaid=Closed (unpaid) -BillStatusClosedPaidPartially=Paid (partially) +ClassifyPaid=Clasificar 'Pagado' +ClassifyUnPaid=Clasificar 'Non pagado' +ClassifyPaidPartially=Clasificar 'Pagado parcialmente' +ClassifyCanceled=Clasificar 'Abandonado' +ClassifyClosed=Clasificar 'Pechado' +ClassifyUnBilled=Clasificar 'Non facturado' +CreateBill=Crear factura +CreateCreditNote=Crear abono +AddBill=Crear factura ou abono +AddToDraftInvoices=Engadir a factura borrador +DeleteBill=Eliminar factura +SearchACustomerInvoice=Atopar unha factura a cliente +SearchASupplierInvoice=Atopar unha factura de provedores +CancelBill=Anular unha factura +SendRemindByMail=Enviar recordatorio +DoPayment=Engadir pagamento +DoPaymentBack=Engadir reembolso +ConvertToReduc=Convertir en crédito dispoñible +ConvertExcessReceivedToReduc=Convertir o recibido en exceso en crédito dispoñible +ConvertExcessPaidToReduc=Convertir o recibido en exceso en desconto disponible +EnterPaymentReceivedFromCustomer=Engadir pagamento recibido de cliente +EnterPaymentDueToCustomer=Realizar pagamento de abonos ao cliente +DisabledBecauseRemainderToPayIsZero=Desactivado xa que o resto a pagar é 0 +PriceBase=Prezo base +BillStatus=Estado da factura +StatusOfGeneratedInvoices=Estado das facturas xeradas +BillStatusDraft=Borrador (a validar) +BillStatusPaid=Pagada +BillStatusPaidBackOrConverted=Reembolsada ou convertida en desconto +BillStatusConverted=Pagada (lista para usarse en factura final) +BillStatusCanceled=Abandonada +BillStatusValidated=Validada (a pagar) +BillStatusStarted=Pagada parcialmente +BillStatusNotPaid=Pendente de pagamento +BillStatusNotRefunded=Non reembolsada +BillStatusClosedUnpaid=Pechada (pendente de pagamento) +BillStatusClosedPaidPartially=Pechada (pagada parcialmente) BillShortStatusDraft=Borrador -BillShortStatusPaid=Pago -BillShortStatusPaidBackOrConverted=Refunded or converted -Refunded=Refunded +BillShortStatusPaid=Pagada +BillShortStatusPaidBackOrConverted=Reembolsada ou convertida +Refunded=Reembolsada BillShortStatusConverted=Pago -BillShortStatusCanceled=Abandoned -BillShortStatusValidated=Validado -BillShortStatusStarted=Started -BillShortStatusNotPaid=Not paid -BillShortStatusNotRefunded=Not refunded -BillShortStatusClosedUnpaid=Pechada -BillShortStatusClosedPaidPartially=Paid (partially) +BillShortStatusCanceled=Abandonada +BillShortStatusValidated=Validada +BillShortStatusStarted=Pagamento parcial +BillShortStatusNotPaid=Pte. pagamento +BillShortStatusNotRefunded=Non reembolsada +BillShortStatusClosedUnpaid=Pechada (pte. pagamento) +BillShortStatusClosedPaidPartially=Pechada (pagamento parcial) PaymentStatusToValidShort=A validar -ErrorVATIntraNotConfigured=Intra-Community VAT number not yet defined +ErrorVATIntraNotConfigured=Número de CIF intracomunitario aínda non configurado ErrorNoPaiementModeConfigured=No default payment type defined. Go to Invoice module setup to fix this. ErrorCreateBankAccount=Create a bank account, then go to Setup panel of Invoice module to define payment types ErrorBillNotFound=Invoice %s does not exist @@ -166,25 +166,25 @@ LastBills=Latest %s invoices LatestTemplateInvoices=Latest %s template invoices LatestCustomerTemplateInvoices=Latest %s customer template invoices LatestSupplierTemplateInvoices=Latest %s vendor template invoices -LastCustomersBills=Latest %s customer invoices -LastSuppliersBills=Latest %s vendor invoices -AllBills=All invoices -AllCustomerTemplateInvoices=All template invoices -OtherBills=Other invoices -DraftBills=Draft invoices -CustomersDraftInvoices=Customer draft invoices -SuppliersDraftInvoices=Vendor draft invoices -Unpaid=Unpaid -ErrorNoPaymentDefined=Error No payment defined -ConfirmDeleteBill=Are you sure you want to delete this invoice? -ConfirmValidateBill=Are you sure you want to validate this invoice with reference %s? -ConfirmUnvalidateBill=Are you sure you want to change invoice %s to draft status? -ConfirmClassifyPaidBill=Are you sure you want to change invoice %s to status paid? -ConfirmCancelBill=Are you sure you want to cancel invoice %s? -ConfirmCancelBillQuestion=Why do you want to classify this invoice 'abandoned'? -ConfirmClassifyPaidPartially=Are you sure you want to change invoice %s to status paid? -ConfirmClassifyPaidPartiallyQuestion=This invoice has not been paid completely. What is the reason for closing this invoice? -ConfirmClassifyPaidPartiallyReasonAvoir=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I regularize the VAT with a credit note. +LastCustomersBills=Últimas %s facturas a clientes +LastSuppliersBills=Últimas %s facturas de provedores +AllBills=Todas as facturas +AllCustomerTemplateInvoices=Todas as prantillas de facturas +OtherBills=Outras facturas +DraftBills=Facturas borrador +CustomersDraftInvoices=Facturas a cliente borrador +SuppliersDraftInvoices=Facturas de provedores borrador +Unpaid=Pendentes +ErrorNoPaymentDefined=Erro no pagamento definido +ConfirmDeleteBill=¿Está certo de querer eliminar esta factura? +ConfirmValidateBill=¿Está certo de querer validar esta factura coa referencia %s? +ConfirmUnvalidateBill=¿Está certo de querer cambiar o estado da factura %s a borrador? +ConfirmClassifyPaidBill=¿Está certo de querer cambiar o estado da factura %s a pagado? +ConfirmCancelBill=¿Está certo de querer anular a factura %s? +ConfirmCancelBillQuestion=¿Por qué quere clasificar esta factura como 'abandoada'? +ConfirmClassifyPaidPartially=¿Está certo de querer cambiar o estado da factura %s a pagado? +ConfirmClassifyPaidPartiallyQuestion=Esta factura non foi pagada completamente. ¿Cal é a razón para pechar esta factura? +ConfirmClassifyPaidPartiallyReasonAvoir=O resto a pagar (%s %s) é un desconto outorgado por pronto pagamento. Regularizaré o IVE cun abono. ConfirmClassifyPaidPartiallyReasonDiscount=Remaining unpaid (%s %s) is a discount granted because payment was made before term. ConfirmClassifyPaidPartiallyReasonDiscountNoVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I accept to lose the VAT on this discount. ConfirmClassifyPaidPartiallyReasonDiscountVat=Remaining unpaid (%s %s) is a discount granted because payment was made before term. I recover the VAT on this discount without a credit note. @@ -199,16 +199,16 @@ ConfirmClassifyPaidPartiallyReasonProductReturnedDesc=This choice is used when p ConfirmClassifyPaidPartiallyReasonOtherDesc=Use this choice if all others are not suitable, for example in following situation:
    - payment not complete because some products were shipped back
    - amount claimed too important because a discount was forgotten
    In all cases, amount over-claimed must be corrected in accountancy system by creating a credit note. ConfirmClassifyAbandonReasonOther=Outro ConfirmClassifyAbandonReasonOtherDesc=This choice will be used in all other cases. For example because you plan to create a replacing invoice. -ConfirmCustomerPayment=Do you confirm this payment input for %s %s? -ConfirmSupplierPayment=Do you confirm this payment input for %s %s? -ConfirmValidatePayment=Are you sure you want to validate this payment? No change can be made once payment is validated. -ValidateBill=Validate invoice -UnvalidateBill=Unvalidate invoice -NumberOfBills=No. of invoices -NumberOfBillsByMonth=No. of invoices per month -AmountOfBills=Amount of invoices -AmountOfBillsHT=Amount of invoices (net of tax) -AmountOfBillsByMonthHT=Amount of invoices by month (net of tax) +ConfirmCustomerPayment=¿Confirma o proceso deste pagamento de %s %s? +ConfirmSupplierPayment=¿Confirma o proceso deste pagamento de %s %s? +ConfirmValidatePayment=¿Está certo de querer validar este pagamento? Non permitense cambios despois de validar o pagamento. +ValidateBill=Validar factura +UnvalidateBill=Voltar factura a borrador +NumberOfBills=Nº de facturas +NumberOfBillsByMonth=Nº de facturas por mes +AmountOfBills=Importe das facturas +AmountOfBillsHT=Importe das facturas (Sen IVE) +AmountOfBillsByMonthHT=Importe das facturas por mes (Sen IVE) UseSituationInvoices=Allow situation invoice UseSituationInvoicesCreditNote=Allow situation invoice credit note Retainedwarranty=Retained warranty @@ -226,146 +226,146 @@ setretainedwarranty=Set retained warranty setretainedwarrantyDateLimit=Set retained warranty date limit RetainedWarrantyDateLimit=Retained warranty date limit RetainedWarrantyNeed100Percent=The situation invoice need to be at 100%% progress to be displayed on PDF -AlreadyPaid=Already paid -AlreadyPaidBack=Already paid back -AlreadyPaidNoCreditNotesNoDeposits=Already paid (without credit notes and down payments) -Abandoned=Abandoned -RemainderToPay=Remaining unpaid -RemainderToTake=Remaining amount to take -RemainderToPayBack=Remaining amount to refund +AlreadyPaid=Xa pago +AlreadyPaidBack=Xa reembolsado +AlreadyPaidNoCreditNotesNoDeposits=Xa pago (excluidos os abonos e anticipos) +Abandoned=Abandoada +RemainderToPay=Resta por pagar +RemainderToTake=Resta por cobrar +RemainderToPayBack=Resta por reembolsar Rest=Pendente -AmountExpected=Amount claimed -ExcessReceived=Excess received -ExcessPaid=Excess paid -EscompteOffered=Discount offered (payment before term) +AmountExpected=Importe reclamado +ExcessReceived=Recibido en exceso +ExcessPaid=Pagado en exceso +EscompteOffered=Desconto (Pronto pagamento) EscompteOfferedShort=Desconto -SendBillRef=Submission of invoice %s -SendReminderBillRef=Submission of invoice %s (reminder) -NoDraftBills=No draft invoices -NoOtherDraftBills=No other draft invoices -NoDraftInvoices=No draft invoices -RefBill=Invoice ref -ToBill=To bill -RemainderToBill=Remainder to bill -SendBillByMail=Send invoice by email -SendReminderBillByMail=Send reminder by email -RelatedCommercialProposals=Related commercial proposals -RelatedRecurringCustomerInvoices=Related recurring customer invoices -MenuToValid=To valid -DateMaxPayment=Payment due on -DateInvoice=Invoice date -DatePointOfTax=Point of tax -NoInvoice=No invoice -ClassifyBill=Classify invoice -SupplierBillsToPay=Unpaid vendor invoices -CustomerBillsUnpaid=Unpaid customer invoices -NonPercuRecuperable=Non-recoverable -SetConditions=Set Payment Terms -SetMode=Set Payment Type -SetRevenuStamp=Set revenue stamp +SendBillRef=Envío da factura %s +SendReminderBillRef=Envío da factura %s (recordatorio) +NoDraftBills=Ningunha factura borrador +NoOtherDraftBills=Ningunha outra factura borrador +NoDraftInvoices=Sen facturas borrador +RefBill=Ref. factura +ToBill=A facturar +RemainderToBill=Queda por facturar +SendBillByMail=Enviar a factura por E-Mail +SendReminderBillByMail=Enviar un recordatorio por E-Mail +RelatedCommercialProposals=Presupuestos asociados +RelatedRecurringCustomerInvoices=Facturas recorrentes asociadas +MenuToValid=A validar +DateMaxPayment=Data límite de pagamento +DateInvoice=Data facturación +DatePointOfTax=Impostos +NoInvoice=Ninguna factura +ClassifyBill=Clasificar a factura +SupplierBillsToPay=Facturas de provedor pendentes de pagamento +CustomerBillsUnpaid=Facturas a cliente pendentes de cobro +NonPercuRecuperable=Non percibido recuperable +SetConditions=Definir condicións de pagamento +SetMode=Definir modo de pagamento +SetRevenuStamp=Establecer selo fiscal Billed=Facturado -RecurringInvoices=Recurring invoices -RepeatableInvoice=Template invoice -RepeatableInvoices=Template invoices -Repeatable=Template -Repeatables=Templates -ChangeIntoRepeatableInvoice=Convert into template invoice -CreateRepeatableInvoice=Create template invoice -CreateFromRepeatableInvoice=Create from template invoice -CustomersInvoicesAndInvoiceLines=Customer invoices and invoice details -CustomersInvoicesAndPayments=Customer invoices and payments -ExportDataset_invoice_1=Customer invoices and invoice details -ExportDataset_invoice_2=Customer invoices and payments -ProformaBill=Proforma Bill: -Reduction=Reduction -ReductionShort=Disc. -Reductions=Reductions -ReductionsShort=Disc. -Discounts=Discounts -AddDiscount=Create discount -AddRelativeDiscount=Create relative discount -EditRelativeDiscount=Edit relative discount -AddGlobalDiscount=Create absolute discount -EditGlobalDiscounts=Edit absolute discounts -AddCreditNote=Create credit note -ShowDiscount=Show discount -ShowReduc=Show the discount -ShowSourceInvoice=Show the source invoice +RecurringInvoices=Facturas recurrentes +RepeatableInvoice=Prantilla de factura +RepeatableInvoices=Prantilla de facturas +Repeatable=Prantilla +Repeatables=Prantillas +ChangeIntoRepeatableInvoice=Convertir en prantilla +CreateRepeatableInvoice=Crear prantilla de factura +CreateFromRepeatableInvoice=Crear desde prantilla de factura +CustomersInvoicesAndInvoiceLines=Facturas a clientes e líñas de facturas +CustomersInvoicesAndPayments=Facturas a clientes e pagamentos +ExportDataset_invoice_1=Facturas a clientes e liñas de facturas +ExportDataset_invoice_2=Facturas a clientes e pagamentos +ProformaBill=Factura proforma: +Reduction=Redución +ReductionShort=Dto. +Reductions=Descontos +ReductionsShort=Dto. +Discounts=Descontos +AddDiscount=Crear desconto fixo +AddRelativeDiscount=Crear desconto relativo +EditRelativeDiscount=Editar desconto relativo +AddGlobalDiscount=Crear desconto fixo +EditGlobalDiscounts=Editar desconto fixo +AddCreditNote=Crear factura de abono +ShowDiscount=Amosar o desconto +ShowReduc=Amosar a dedución +ShowSourceInvoice=Amosar a factura fonte RelativeDiscount=Desconto relativo -GlobalDiscount=Global discount -CreditNote=Credit note -CreditNotes=Credit notes -CreditNotesOrExcessReceived=Credit notes or excess received -Deposit=Down payment -Deposits=Down payments -DiscountFromCreditNote=Discount from credit note %s -DiscountFromDeposit=Down payments from invoice %s -DiscountFromExcessReceived=Payments in excess of invoice %s -DiscountFromExcessPaid=Payments in excess of invoice %s -AbsoluteDiscountUse=This kind of credit can be used on invoice before its validation -CreditNoteDepositUse=Invoice must be validated to use this kind of credits -NewGlobalDiscount=New absolute discount -NewRelativeDiscount=New relative discount -DiscountType=Discount type -NoteReason=Note/Reason -ReasonDiscount=Razón -DiscountOfferedBy=Granted by -DiscountStillRemaining=Discounts or credits available -DiscountAlreadyCounted=Discounts or credits already consumed -CustomerDiscounts=Customer discounts -SupplierDiscounts=Vendors discounts -BillAddress=Bill address +GlobalDiscount=Desconto fixo +CreditNote=Abono +CreditNotes=Abonos +CreditNotesOrExcessReceived=Abonos ou exceso recibido +Deposit=Anticipo +Deposits=Anticipos +DiscountFromCreditNote=Desconto resultante do abono %s +DiscountFromDeposit=Pagamentos da factura de anticipo %s +DiscountFromExcessReceived=Pagamentos recibidos en exceso da factura %s +DiscountFromExcessPaid=Pagamentos recibidos en exceso da factura %s +AbsoluteDiscountUse=Este tipo de desconto non pode utilizarse nunha factura antes da súa validación +CreditNoteDepositUse=A factura debe ser validada para usar este tipo de crédito. +NewGlobalDiscount=Novo desconto fixo +NewRelativeDiscount=Novo desconto +DiscountType=Tipo de desconto +NoteReason=Nota/Motivo +ReasonDiscount=Motivo +DiscountOfferedBy=Acordado por +DiscountStillRemaining=Descontos dispoñibles +DiscountAlreadyCounted=Descontos xa consumidos +CustomerDiscounts=Descontos a clientes +SupplierDiscounts=Descontos de provedores +BillAddress=Enderezo de facturación HelpEscompte=This discount is a discount granted to customer because payment was made before term. HelpAbandonBadCustomer=This amount has been abandoned (customer said to be a bad customer) and is considered as an exceptional loss. HelpAbandonOther=This amount has been abandoned since it was an error (wrong customer or invoice replaced by another for example) -IdSocialContribution=Social/fiscal tax payment id -PaymentId=Payment id -PaymentRef=Payment ref. -InvoiceId=Invoice id -InvoiceRef=Invoice ref. -InvoiceDateCreation=Invoice creation date -InvoiceStatus=Invoice status -InvoiceNote=Invoice note -InvoicePaid=Invoice paid -InvoicePaidCompletely=Paid completely -InvoicePaidCompletelyHelp=Invoice that are paid completely. This excludes invoices that are paid partially. To get list of all 'Closed' or non 'Closed' invoices, prefer to use a filter on the invoice status. -OrderBilled=Order billed -DonationPaid=Donation paid -PaymentNumber=Payment number -RemoveDiscount=Remove discount -WatermarkOnDraftBill=Watermark on draft invoices (nothing if empty) -InvoiceNotChecked=No invoice selected -ConfirmCloneInvoice=Are you sure you want to clone this invoice %s? -DisabledBecauseReplacedInvoice=Action disabled because invoice has been replaced -DescTaxAndDividendsArea=This area presents a summary of all payments made for special expenses. Only records with payments during the fixed year are included here. -NbOfPayments=No. of payments -SplitDiscount=Split discount in two -ConfirmSplitDiscount=Are you sure you want to split this discount of %s %s into two smaller discounts? -TypeAmountOfEachNewDiscount=Input amount for each of two parts: -TotalOfTwoDiscountMustEqualsOriginal=The total of the two new discounts must be equal to the original discount amount. -ConfirmRemoveDiscount=Are you sure you want to remove this discount? -RelatedBill=Related invoice -RelatedBills=Related invoices -RelatedCustomerInvoices=Related customer invoices -RelatedSupplierInvoices=Related vendor invoices -LatestRelatedBill=Latest related invoice -WarningBillExist=Warning, one or more invoices already exist -MergingPDFTool=Merging PDF tool -AmountPaymentDistributedOnInvoice=Payment amount distributed on invoice -PaymentOnDifferentThirdBills=Allow payments on different third parties bills but same parent company -PaymentNote=Payment note -ListOfPreviousSituationInvoices=List of previous situation invoices -ListOfNextSituationInvoices=List of next situation invoices -ListOfSituationInvoices=List of situation invoices -CurrentSituationTotal=Total current situation +IdSocialContribution=Id pagamento tasa social/fiscal +PaymentId=ID pagamento +PaymentRef=Ref. pagamento +InvoiceId=Id factura +InvoiceRef=Ref. factura +InvoiceDateCreation=Data creación factura +InvoiceStatus=Estado factura +InvoiceNote=Nota factura +InvoicePaid=Factura pagada +InvoicePaidCompletely=Factura pagada completamente +InvoicePaidCompletelyHelp=Factura pagada completamente. Isto exclúe facturas que foron pagadas parcialmente. Colle listaxe de todas as facturas "Pechadas" ou non "Pechadas", preferible ao uso do filtro no estado da factura. +OrderBilled=Pedido facturado +DonationPaid=Doación paga +PaymentNumber=Número de pagamento +RemoveDiscount=Eliminar desconto +WatermarkOnDraftBill=Marca de auga en facturas borrador (nada se está baleira) +InvoiceNotChecked=Ningunha factura está seleccionada +ConfirmCloneInvoice=¿Está certo de querer clonar esta factura %s? +DisabledBecauseReplacedInvoice=Acción desactivada porque é unha factura reemplazada +DescTaxAndDividendsArea=Este área amosa un resumo de todos os pagamentos realizados en gastos especiais. So incluense os rexistros do ano seleccionado. +NbOfPayments=Nº de pagamentos +SplitDiscount=Dividir o dto. en dous +ConfirmSplitDiscount=¿Está certo de querer dividir este desconto de %s %s en dous descontos menores? +TypeAmountOfEachNewDiscount=Indique o importe para cada parte: +TotalOfTwoDiscountMustEqualsOriginal=A suma do importe dos dous novos descontos debe ser a mesma que o importe do desconto a dividir. +ConfirmRemoveDiscount=¿Está certo de querer borrar este desconto? +RelatedBill=Factura asociada +RelatedBills=Facturas asociadas +RelatedCustomerInvoices=Facturas a clientes asociadas +RelatedSupplierInvoices=Facturas de provedores asociadas +LatestRelatedBill=Última factura relacionada +WarningBillExist=Atención, xa existe alo menos unha factura +MergingPDFTool=Herramienta de fusión PDF +AmountPaymentDistributedOnInvoice=Importe do pagamento distribuido na factura +PaymentOnDifferentThirdBills=Permitir pagamentos de diferentes terceiros da empresa nai +PaymentNote=Nota do pagamento +ListOfPreviousSituationInvoices=Listaxe de facturas de situación previas +ListOfNextSituationInvoices=Listaxe das próximas facturas de situación +ListOfSituationInvoices=Listaxe de facturas de situación +CurrentSituationTotal=Total situación actual DisabledBecauseNotEnouthCreditNote=To remove a situation invoice from cycle, this invoice's credit note total must cover this invoice total RemoveSituationFromCycle=Remove this invoice from cycle ConfirmRemoveSituationFromCycle=Remove this invoice %s from cycle ? ConfirmOuting=Confirm outing -FrequencyPer_d=Every %s days -FrequencyPer_m=Every %s months -FrequencyPer_y=Every %s years -FrequencyUnit=Frequency unit +FrequencyPer_d=Cada %s días +FrequencyPer_m=Cada %s meses +FrequencyPer_y=Cada %s anos +FrequencyUnit=Frecuencia toolTipFrequency=Examples:
    Set 7, Day: give a new invoice every 7 days
    Set 3, Month: give a new invoice every 3 month NextDateToExecution=Date for next invoice generation NextDateToExecutionShort=Date next gen. @@ -386,127 +386,127 @@ ViewAvailableGlobalDiscounts=View available discounts GroupPaymentsByModOnReports=Group payments by mode on reports # PaymentConditions Statut=Estado -PaymentConditionShortRECEP=Due Upon Receipt -PaymentConditionRECEP=Due Upon Receipt -PaymentConditionShort30D=30 days -PaymentCondition30D=30 days -PaymentConditionShort30DENDMONTH=30 days of month-end -PaymentCondition30DENDMONTH=Within 30 days following the end of the month -PaymentConditionShort60D=60 days -PaymentCondition60D=60 days -PaymentConditionShort60DENDMONTH=60 days of month-end -PaymentCondition60DENDMONTH=Within 60 days following the end of the month -PaymentConditionShortPT_DELIVERY=Delivery -PaymentConditionPT_DELIVERY=On delivery -PaymentConditionShortPT_ORDER=Pedido -PaymentConditionPT_ORDER=On order -PaymentConditionShortPT_5050=50-50 -PaymentConditionPT_5050=50%% in advance, 50%% on delivery -PaymentConditionShort10D=10 days -PaymentCondition10D=10 days -PaymentConditionShort10DENDMONTH=10 days of month-end -PaymentCondition10DENDMONTH=Within 10 days following the end of the month -PaymentConditionShort14D=14 days -PaymentCondition14D=14 days -PaymentConditionShort14DENDMONTH=14 days of month-end -PaymentCondition14DENDMONTH=Within 14 days following the end of the month -FixAmount=Fixed amount - 1 line with label '%s' -VarAmount=Variable amount (%% tot.) -VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' +PaymentConditionShortRECEP=Acuse de recibo +PaymentConditionRECEP=Acuse de recibo +PaymentConditionShort30D=30 días +PaymentCondition30D=Pagamento a 30 días +PaymentConditionShort30DENDMONTH=30 días a fin de mes +PaymentCondition30DENDMONTH=30 días a fin de mes +PaymentConditionShort60D=60 días +PaymentCondition60D=Pagamento aos 60 días +PaymentConditionShort60DENDMONTH=60 días fin de mes +PaymentCondition60DENDMONTH=60 días a fin de mes +PaymentConditionShortPT_DELIVERY=Á entrega +PaymentConditionPT_DELIVERY=Pagamento á entrega +PaymentConditionShortPT_ORDER=Orde +PaymentConditionPT_ORDER=Á recepción do pedimento +PaymentConditionShortPT_5050=50/50 +PaymentConditionPT_5050=Pagamento 50%% por adiantado, 50%% á entrega +PaymentConditionShort10D=10 días +PaymentCondition10D=Pagamento aos 10 días +PaymentConditionShort10DENDMONTH=10 días fin de mes +PaymentCondition10DENDMONTH=10 días a fin de mes +PaymentConditionShort14D=14 días +PaymentCondition14D=Pagamento aos 14 días +PaymentConditionShort14DENDMONTH=14 días fin de mes +PaymentCondition14DENDMONTH=14 días a fin de més +FixAmount=Importe fixo +VarAmount=Importe variable (%% total) +VarAmountOneLine=Cantidade variable (%% tot.) - 1 liña coa etiqueta '%s' VarAmountAllLines=Variable amount (%% tot.) - all same lines # PaymentType PaymentTypeVIR=Transferencia bancaria PaymentTypeShortVIR=Transferencia bancaria -PaymentTypePRE=Direct debit payment order -PaymentTypeShortPRE=Debit payment order -PaymentTypeLIQ=Cash -PaymentTypeShortLIQ=Cash +PaymentTypePRE=Domiciliación +PaymentTypeShortPRE=Domiciliación +PaymentTypeLIQ=Efectivo +PaymentTypeShortLIQ=Efectivo PaymentTypeCB=Tarxeta de crédito PaymentTypeShortCB=Tarxeta de crédito PaymentTypeCHQ=Verificar PaymentTypeShortCHQ=Verificar -PaymentTypeTIP=TIP (Documents against Payment) -PaymentTypeShortTIP=TIP Payment -PaymentTypeVAD=Online payment -PaymentTypeShortVAD=Online payment -PaymentTypeTRA=Bank draft +PaymentTypeTIP=TIP (Titulo interbancario de pagamento) +PaymentTypeShortTIP=Pagamento TIP +PaymentTypeVAD=Pagamento en liña +PaymentTypeShortVAD=Pagamento en liña +PaymentTypeTRA=Banco borrador PaymentTypeShortTRA=Borrador PaymentTypeFAC=Factor PaymentTypeShortFAC=Factor -BankDetails=Bank details -BankCode=Bank code -DeskCode=Branch code -BankAccountNumber=Account number -BankAccountNumberKey=Checksum +BankDetails=Datos bancarios +BankCode=Código banco +DeskCode=Código oficina +BankAccountNumber=Número conta +BankAccountNumberKey=DC Residence=Enderezo -IBANNumber=IBAN account number +IBANNumber=Número de conta IBAN completo IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=IBAN do cliente +SupplierIBAN=IBAN do provedor BIC=BIC/SWIFT BICNumber=Código BIC/SWIFT -ExtraInfos=Extra infos -RegulatedOn=Regulated on -ChequeNumber=Check N° -ChequeOrTransferNumber=Check/Transfer N° -ChequeBordereau=Check schedule -ChequeMaker=Check/Transfer transmitter -ChequeBank=Bank of Check +ExtraInfos=Información complementaria +RegulatedOn=Pagar o +ChequeNumber=Talón nº +ChequeOrTransferNumber=Talón/Transferencia nº +ChequeBordereau=Comprobar axenda +ChequeMaker=Transmisor Talón/Transferencia +ChequeBank=Banco do talón CheckBank=Verificar -NetToBePaid=Net to be paid -PhoneNumber=Tel -FullPhoneNumber=Telephone +NetToBePaid=Neto a pagar +PhoneNumber=Tel. +FullPhoneNumber=Teléfono TeleFax=Fax -PrettyLittleSentence=Accept the amount of payments due by checks issued in my name as a Member of an accounting association approved by the Fiscal Administration. -IntracommunityVATNumber=Intra-Community VAT ID -PaymentByChequeOrderedTo=Check payments (including tax) are payable to %s, send to -PaymentByChequeOrderedToShort=Check payments (incl. tax) are payable to -SendTo=sent to -PaymentByTransferOnThisBankAccount=Payment by transfer to the following bank account -VATIsNotUsedForInvoice=* Non applicable VAT art-293B of CGI -LawApplicationPart1=By application of the law 80.335 of 12/05/80 -LawApplicationPart2=the goods remain the property of -LawApplicationPart3=the seller until full payment of -LawApplicationPart4=their price. -LimitedLiabilityCompanyCapital=SARL with Capital of +PrettyLittleSentence=Acepto o pagamento mediante talóns ao meu nome das sumas debidas, na miña calidade de membro dunha empresa autorizada pola Administración Fiscal. +IntracommunityVATNumber=Número de IVE intracomunitario +PaymentByChequeOrderedTo=Pagamento mediante talón nominativo a %s enviado a +PaymentByChequeOrderedToShort=Pagamento mediante talón nominativo a +SendTo=enviado a +PaymentByTransferOnThisBankAccount=Pagamento mediante transferencia á conta bancaria seguinte +VATIsNotUsedForInvoice=* IVE non aplicable art-293B del CGI +LawApplicationPart1=Pola aplicación da lei 80.335 de 12/05/80 +LawApplicationPart2=as mercancías permanecen en propiedade de +LawApplicationPart3=vendedor ata o completo cobro de +LawApplicationPart4=seus prezos +LimitedLiabilityCompanyCapital=SRL con capital de UseLine=Aplicar -UseDiscount=Use discount -UseCredit=Use credit -UseCreditNoteInInvoicePayment=Reduce amount to pay with this credit -MenuChequeDeposits=Check Deposits -MenuCheques=Checks -MenuChequesReceipts=Check receipts -NewChequeDeposit=New deposit -ChequesReceipts=Check receipts -ChequesArea=Check deposits area -ChequeDeposits=Check deposits -Cheques=Checks -DepositId=Id deposit -NbCheque=Number of checks -CreditNoteConvertedIntoDiscount=This %s has been converted into %s -UsBillingContactAsIncoiveRecipientIfExist=Use contact/address with type 'billing contact' instead of third-party address as recipient for invoices -ShowUnpaidAll=Show all unpaid invoices -ShowUnpaidLateOnly=Show late unpaid invoices only -PaymentInvoiceRef=Payment invoice %s -ValidateInvoice=Validate invoice -ValidateInvoices=Validate invoices -Cash=Cash -Reported=Delayed -DisabledBecausePayments=Not possible since there are some payments -CantRemovePaymentWithOneInvoicePaid=Can't remove payment since there is at least one invoice classified paid -ExpectedToPay=Expected payment -CantRemoveConciliatedPayment=Can't remove reconciled payment -PayedByThisPayment=Paid by this payment -ClosePaidInvoicesAutomatically=Classify automatically all standard, down payment or replacement invoices as "Paid" when payment is done entirely. -ClosePaidCreditNotesAutomatically=Classify automatically all credit notes as "Paid" when refund is done entirely. -ClosePaidContributionsAutomatically=Classify automatically all social or fiscal contributions as "Paid" when payment is done entirely. -AllCompletelyPayedInvoiceWillBeClosed=All invoices with no remainder to pay will be automatically closed with status "Paid". -ToMakePayment=Pay -ToMakePaymentBack=Pay back -ListOfYourUnpaidInvoices=List of unpaid invoices -NoteListOfYourUnpaidInvoices=Note: This list contains only invoices for third parties you are linked to as a sale representative. -RevenueStamp=Tax stamp -YouMustCreateInvoiceFromThird=This option is only available when creating an invoice from tab "Customer" of third party +UseDiscount=Aplicar desconto +UseCredit=Usar crédito +UseCreditNoteInInvoicePayment=Reducir o pagamento con este crédito +MenuChequeDeposits=Remesas +MenuCheques=Xestión talóns +MenuChequesReceipts=Listaxe +NewChequeDeposit=Novo depósito +ChequesReceipts=Listaxe remesas +ChequesArea=Área remesas +ChequeDeposits=Depósito de talóns +Cheques=Talóns +DepositId=Id. depósito +NbCheque=Número de talóns +CreditNoteConvertedIntoDiscount=Este %s foi convertido en %s +UsBillingContactAsIncoiveRecipientIfExist=Usar contacto/enderezo de tipo 'contacto facturación' no lugar do enderezo do terceiro como destinatario das facturas +ShowUnpaidAll=Amosar todos os pendentes +ShowUnpaidLateOnly=Amosar so os pendentes en retraso +PaymentInvoiceRef=Pagamento factura %s +ValidateInvoice=Validar factura +ValidateInvoices=Facturas validadas +Cash=Efectivo +Reported=Aprazado +DisabledBecausePayments=Non dispoñible xa que existen pagamentos +CantRemovePaymentWithOneInvoicePaid=Eliminación imposible cando existe alo menos unha factura clasificada como pagada. +ExpectedToPay=Agardando o pagamento +CantRemoveConciliatedPayment=Non pódese eliminar un pagamento conciliado +PayedByThisPayment=Pagada por este pagamento +ClosePaidInvoicesAutomatically=Clasificar como "Pagadas" as facturas, anticipos e facturas rectificativas completamente pagadas. +ClosePaidCreditNotesAutomatically=Clasificar automáticamente como "Pagados" os abonos completamente reembolsados +ClosePaidContributionsAutomatically=Clasificar como "Pagadas" todas as taxas fiscais ou sociais completamente pagadas +AllCompletelyPayedInvoiceWillBeClosed=Todas as facturas cun resto a pagar 0 serán automáticamente pechadas ao estado "Pagada". +ToMakePayment=Pagar +ToMakePaymentBack=Reembolsar +ListOfYourUnpaidInvoices=Listaxe de facturas impagadas +NoteListOfYourUnpaidInvoices=Nota: Este listaxe só inclue os terceiros ds que vostede é comercial. +RevenueStamp=Timbre fiscal +YouMustCreateInvoiceFromThird=Esta opción só está dispoñible ao crear unha factura dende a lapela 'cliente' en terceiros YouMustCreateInvoiceFromSupplierThird=This option is only available when creating an invoice from tab "Vendor" of third party YouMustCreateStandardInvoiceFirstDesc=You have to create a standard invoice first and convert it to "template" to create a new template invoice PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) @@ -519,14 +519,14 @@ CactusNumRefModelDesc1=Return number with format %syymm-nnnn for standard invoic EarlyClosingReason=Early closing reason EarlyClosingComment=Early closing note ##### Types de contacts ##### -TypeContact_facture_internal_SALESREPFOLL=Representative following-up customer invoice -TypeContact_facture_external_BILLING=Contacto cliente facturación pedido -TypeContact_facture_external_SHIPPING=Contacto cliente entrega pedido -TypeContact_facture_external_SERVICE=Customer service contact -TypeContact_invoice_supplier_internal_SALESREPFOLL=Representative following-up vendor invoice -TypeContact_invoice_supplier_external_BILLING=Contacto provedor factura -TypeContact_invoice_supplier_external_SHIPPING=Contacto seguemento envío a provedor -TypeContact_invoice_supplier_external_SERVICE=Vendor service contact +TypeContact_facture_internal_SALESREPFOLL=Responsable seguimiento factura a cliente +TypeContact_facture_external_BILLING=Contacto cliente facturación +TypeContact_facture_external_SHIPPING=Contacto cliente entregas +TypeContact_facture_external_SERVICE=Contacto cliente servizos +TypeContact_invoice_supplier_internal_SALESREPFOLL=Responsable seguemento facturas de provedor +TypeContact_invoice_supplier_external_BILLING=Contacto provedor facturación +TypeContact_invoice_supplier_external_SHIPPING=Contacto provedor entregas +TypeContact_invoice_supplier_external_SERVICE=Contacto provedor servizos # Situation invoices InvoiceFirstSituationAsk=First situation invoice InvoiceFirstSituationDesc=The situation invoices are tied to situations related to a progression, for example the progression of a construction. Each situation is tied to an invoice. diff --git a/htdocs/langs/gl_ES/boxes.lang b/htdocs/langs/gl_ES/boxes.lang index b2acfbb98a0..1ae5652b2a9 100644 --- a/htdocs/langs/gl_ES/boxes.lang +++ b/htdocs/langs/gl_ES/boxes.lang @@ -19,7 +19,7 @@ BoxLastContacts=Últimos contactos/enderezos BoxLastMembers=Últimos membros BoxFicheInter=Últimas intervencións BoxCurrentAccounts=Balance de contas abertas -BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMemberNextBirthdays=Cumpreanos neste mes (Membros) BoxTitleLastRssInfos=Últimas %s novas de %s BoxTitleLastProducts=Produtos/Servizos: Últimos %s modificados BoxTitleProductsAlertStock=Produtos: alerta de stock @@ -27,22 +27,22 @@ BoxTitleLastSuppliers=Últimos %s provedores rexistrados BoxTitleLastModifiedSuppliers=Provedores: últimos %s modificados BoxTitleLastModifiedCustomers=Clientes: últimos %s modificados BoxTitleLastCustomersOrProspects=Últimos %s clientes ou clientes potenciais -BoxTitleLastCustomerBills=Latest %s modified Customer invoices -BoxTitleLastSupplierBills=Latest %s modified Vendor invoices +BoxTitleLastCustomerBills=Últimas %s facturas a clientes +BoxTitleLastSupplierBills=Últimas %s facturas de provedores BoxTitleLastModifiedProspects=Orzamentos: Últimos %s modificados BoxTitleLastModifiedMembers=Últimos %s membros BoxTitleLastFicheInter=Últimas %s intervencións modificadas -BoxTitleOldestUnpaidCustomerBills=Facturas Clientes: mais antigas %s pendentes de cobro -BoxTitleOldestUnpaidSupplierBills=Facturas Provedores: mais antigas %s pendentes de pago +BoxTitleOldestUnpaidCustomerBills=Facturas Clientes: últimas %s pendentes de cobro +BoxTitleOldestUnpaidSupplierBills=Facturas Provedores: últimas %s pendentes de pago BoxTitleCurrentAccounts=Contas abertas: balance -BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception +BoxTitleSupplierOrdersAwaitingReception=Pedimentos de provedores agardando recepción BoxTitleLastModifiedContacts=Contactos/Enderezos: Últimos %s modificados BoxMyLastBookmarks=Bookmarks: latest %s BoxOldestExpiredServices=Servizos antigos expirados BoxLastExpiredServices=Últimos %s contratos mais antigos con servizos expirados BoxTitleLastActionsToDo=Últimas %s accións a realizar BoxTitleLastContracts=Últimos %s contratos modificados -BoxTitleLastModifiedDonations=Últimas %s donacións modificadas +BoxTitleLastModifiedDonations=Últimas %s doacións/subvencións modificadas BoxTitleLastModifiedExpenses=Últimos %s informes de gastos modificados BoxTitleLatestModifiedBoms=Latest %s modified BOMs BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders @@ -56,7 +56,7 @@ ClickToAdd=Faga clic aquí para engadir. NoRecordedCustomers=Ningún cliente rexistrado NoRecordedContacts=Ningún contacto regxistrado NoActionsToDo=Sen eventos a realizar -NoRecordedOrders=Sen pedidos de clientes rexistrados +NoRecordedOrders=Sen pedimentos de clientes rexistrados NoRecordedProposals=Sen orzamentos rexistrados NoRecordedInvoices=Sen facturas a clientes rexistradas NoUnpaidCustomerBills=Non hai facturas a clientes pendentes de cobro @@ -67,36 +67,40 @@ NoRecordedProspects=Sen clientes potenciais rexistrados NoContractedProducts=Sen produtos/servizos contratados NoRecordedContracts=Sen contratos rexistrados NoRecordedInterventions=Sen intervencións gardadas -BoxLatestSupplierOrders=Últimos pedidos a provedores -BoxLatestSupplierOrdersAwaitingReception=Latest Purchase Orders (with a pending reception) -NoSupplierOrder=Sen pedidos a provedores +BoxLatestSupplierOrders=Últimos pedimentos a provedores +BoxLatestSupplierOrdersAwaitingReception=Últimos pedimentos a provedores (agardando recepción) +NoSupplierOrder=Sen pedimentos a provedores BoxCustomersInvoicesPerMonth=Facturas a clientes por mes BoxSuppliersInvoicesPerMonth=Facturas de provedores por mes -BoxCustomersOrdersPerMonth=Pedidos de clientes por mes -BoxSuppliersOrdersPerMonth=Pedidos a provedores por mes +BoxCustomersOrdersPerMonth=Pedimentos de clientes por mes +BoxSuppliersOrdersPerMonth=Pedimentos a provedores por mes BoxProposalsPerMonth=Orzamentos por mes NoTooLowStockProducts=Sen produtos por debaixo do stock mínimo BoxProductDistribution=Distribución de produtos/servizos -ForObject=On %s +ForObject=En %s BoxTitleLastModifiedSupplierBills=Facturas Provedor: útimas %s modificadas -BoxTitleLatestModifiedSupplierOrders=Pedidos Provedor: últimos %s modificados +BoxTitleLatestModifiedSupplierOrders=Pedimentos Provedor: últimos %s modificados BoxTitleLastModifiedCustomerBills=Facturas Clientes: últimas %s modificadas -BoxTitleLastModifiedCustomerOrders=Pedidos Clientes: últimos %s pedidos modificados +BoxTitleLastModifiedCustomerOrders=Pedimentos Clientes: últimos %s pedimentos modificados BoxTitleLastModifiedPropals=Últimos %s orzamentos modificados +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Facturas a clientes -ForCustomersOrders=Pedidos de clientes +ForCustomersOrders=Pedimentos de clientes ForProposals=Orzamentos LastXMonthRolling=Os últimos %s meses consecutivos ChooseBoxToAdd=Engadir panel ao seu taboleiro BoxAdded=O panel foi agregado ao seu taboleiro -BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries -NoRecordedManualEntries=No manual entries record in accountancy -BoxSuspenseAccount=Count accountancy operation with suspense account -BoxTitleSuspenseAccount=Number of unallocated lines -NumberOfLinesInSuspenseAccount=Number of line in suspense account -SuspenseAccountNotDefined=Suspense account isn't defined -BoxLastCustomerShipments=Last customer shipments -BoxTitleLastCustomerShipments=Latest %s customer shipments -NoRecordedShipments=No recorded customer shipment +BoxTitleUserBirthdaysOfMonth=Cumpreanos deste mes (Usuarios) +BoxLastManualEntries=Últimas entradas manuais en contabilidade +BoxTitleLastManualEntries=%s últimas entradas manuais +NoRecordedManualEntries=Sen entradas manuais gravadas en contabilidade +BoxSuspenseAccount=Operaciónen conta contable con conta en suspenso +BoxTitleSuspenseAccount=Número de liñas non asignadas +NumberOfLinesInSuspenseAccount=Número de liña en conta en suspenso +SuspenseAccountNotDefined=Conta en suspenso non está definida +BoxLastCustomerShipments=Últimos envios a clientes +BoxTitleLastCustomerShipments=Últimos %s envíos a clientes +NoRecordedShipments=Ningún envío a cliente rexistrado +# Pages +AccountancyHome=Contabilidade diff --git a/htdocs/langs/gl_ES/cashdesk.lang b/htdocs/langs/gl_ES/cashdesk.lang index 598db17a32f..0926360b26f 100644 --- a/htdocs/langs/gl_ES/cashdesk.lang +++ b/htdocs/langs/gl_ES/cashdesk.lang @@ -1,85 +1,85 @@ # Language file - Source file is en_US - cashdesk -CashDeskMenu=Point of sale -CashDesk=Point of sale -CashDeskBankCash=Bank account (cash) -CashDeskBankCB=Bank account (card) -CashDeskBankCheque=Bank account (cheque) -CashDeskWarehouse=Warehouse -CashdeskShowServices=Selling services +CashDeskMenu=TPV +CashDesk=Terminal Punto de Venda +CashDeskBankCash=Conta bancaria (efectivo) +CashDeskBankCB=Conta bancaria (tarxetas) +CashDeskBankCheque=Conta bancaria (talóns) +CashDeskWarehouse=Almacén +CashdeskShowServices=Vender servizos CashDeskProducts=Produtos CashDeskStock=Stock -CashDeskOn=on -CashDeskThirdParty=Third party -ShoppingCart=Shopping cart -NewSell=New sell -AddThisArticle=Add this article -RestartSelling=Go back on sell -SellFinished=Sale complete -PrintTicket=Print ticket -SendTicket=Send ticket -NoProductFound=No article found -ProductFound=product found -NoArticle=No article -Identification=Identification -Article=Article -Difference=Difference -TotalTicket=Total ticket -NoVAT=No VAT for this sale -Change=Excess received -BankToPay=Account for payment -ShowCompany=Show company -ShowStock=Show warehouse -DeleteArticle=Click to remove this article -FilterRefOrLabelOrBC=Search (Ref/Label) -UserNeedPermissionToEditStockToUsePos=You ask to decrease stock on invoice creation, so user that uses POS needs to have permission to edit stock. -DolibarrReceiptPrinter=Dolibarr Receipt Printer -PointOfSale=Point of Sale -PointOfSaleShort=POS -CloseBill=Close Bill -Floors=Floors -Floor=Floor -AddTable=Add table -Place=Place -TakeposConnectorNecesary='TakePOS Connector' required -OrderPrinters=Order printers -SearchProduct=Search product -Receipt=Receipt -Header=Header -Footer=Footer -AmountAtEndOfPeriod=Amount at end of period (day, month or year) -TheoricalAmount=Theorical amount -RealAmount=Real amount -CashFence=Cash fence -CashFenceDone=Cash fence done for the period -NbOfInvoices=Nb of invoices -Paymentnumpad=Type of Pad to enter payment -Numberspad=Numbers Pad -BillsCoinsPad=Coins and banknotes Pad -DolistorePosCategory=TakePOS modules and other POS solutions for Dolibarr -TakeposNeedsCategories=TakePOS needs product categories to work -OrderNotes=Order Notes -CashDeskBankAccountFor=Default account to use for payments in -NoPaimementModesDefined=No paiment mode defined in TakePOS configuration -TicketVatGrouped=Group VAT by rate in tickets|receipts -AutoPrintTickets=Automatically print tickets|receipts +CashDeskOn=de +CashDeskThirdParty=Terceiro +ShoppingCart=Cesta +NewSell=Nova venda +AddThisArticle=Engadir este artigo +RestartSelling=Retomar a venda +SellFinished=Venda completada +PrintTicket=Imprimir +SendTicket=Enviar ticket +NoProductFound=Ningún artigo atopado +ProductFound=Produto atopado +NoArticle=Ningún artigo +Identification=Identificación +Article=Artigo +Difference=Diferencia +TotalTicket=Total +NoVAT=Sen IVE nesta venda +Change=Cambio +BankToPay=Conta de pago +ShowCompany=Ver empresa +ShowStock=Ver almacén +DeleteArticle=Faga clic para borrar este artigo +FilterRefOrLabelOrBC=Búsqueda (Ref/Etiq.) +UserNeedPermissionToEditStockToUsePos=Configurada a disminución de stock na creación de facturas, polo que o usuario que utilice a TPV deberá ter permiso para editar stock. +DolibarrReceiptPrinter=Impresora de tickets Dolibarr +PointOfSale=Terminales Punto de Venda +PointOfSaleShort=TPV +CloseBill=Pechar factura +Floors=Pisos +Floor=Piso +AddTable=Agregar tabla +Place=Lugar +TakeposConnectorNecesary='Conector TakePOS' requerido +OrderPrinters=Impresoras de pedimentos +SearchProduct=Procurar producto +Receipt=Orde +Header=Cabeceira +Footer=Pé de páxina +AmountAtEndOfPeriod=Importe ao final do período (día, mes ou ano) +TheoricalAmount=Importe teórico +RealAmount=Importe real +CashFence=Peche de caixa +CashFenceDone=Peche de caixa realizado para o período. +NbOfInvoices=Nº de facturas +Paymentnumpad=Tipo de Pad para introducir o pago. +Numberspad=Teclado numérico +BillsCoinsPad=Moedas e billetes de banco +DolistorePosCategory=Módulos TakePOS e outras solucións POS para Dolibarr +TakeposNeedsCategories=TakePOS precisa categorías de produtos para traballar +OrderNotes=Pedimentos +CashDeskBankAccountFor=Conta por defecto a usar para cobros en +NoPaimementModesDefined=Non existe modo de pago definido na configuración de TakePOS +TicketVatGrouped=Agrupar por tipo de IVE nos tickets +AutoPrintTickets=Imprimir tickets automáticamente PrintCustomerOnReceipts=Print customer on tickets|receipts -EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant -ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ? -ConfirmDiscardOfThisPOSSale=Do you want to discard this current sale ? +EnableBarOrRestaurantFeatures=Habilitar características para Bar ou Restaurante +ConfirmDeletionOfThisPOSSale=¿Está certo de querer eliminar a venda actual? +ConfirmDiscardOfThisPOSSale=¿Queres descartar a venda actual?? History=Histórico -ValidateAndClose=Validate and close +ValidateAndClose=Validar e pechar Terminal=Terminal -NumberOfTerminals=Number of Terminals -TerminalSelect=Select terminal you want to use: -POSTicket=POS Ticket +NumberOfTerminals=Número de terminais +TerminalSelect=Seleccione o terminal que desexa usar: +POSTicket=Ticket POS POSTerminal=POS Terminal -POSModule=POS Module -BasicPhoneLayout=Use basic layout for phones -SetupOfTerminalNotComplete=Setup of terminal %s is not complete -DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button -InvoiceIsAlreadyValidated=Invoice is already validated -NoLinesToBill=No lines to bill +POSModule=POS Modulo +BasicPhoneLayout=Utilizar deseño básico para teléfonos. +SetupOfTerminalNotComplete=Configuración da terminal %s non está finalizada +DirectPayment=Pago directo +DirectPaymentButton=Add a "Direct cash payment" button +InvoiceIsAlreadyValidated=A factura xa foi validada +NoLinesToBill=Sen liñas a facturar CustomReceipt=Custom Receipt ReceiptName=Receipt Name ProductSupplements=Product Supplements @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/gl_ES/commercial.lang b/htdocs/langs/gl_ES/commercial.lang index 8595a1b48fc..d3d132e83b5 100644 --- a/htdocs/langs/gl_ES/commercial.lang +++ b/htdocs/langs/gl_ES/commercial.lang @@ -19,7 +19,7 @@ ShowTask=Ver tarefa ShowAction=Ver evento ActionsReport=Informe de eventos ThirdPartiesOfSaleRepresentative=Terceiros cuxo representante de vendas é -SaleRepresentativesOfThirdParty=Comerciais do terceiro +SaleRepresentativesOfThirdParty=comerciais do terceiro SalesRepresentative=Comercial SalesRepresentatives=Comerciais SalesRepresentativeFollowUp=Comercial (seguemento) @@ -73,8 +73,8 @@ StatusProsp=Estado prospección DraftPropals=Orzamentos borrador NoLimit=Sen límite ToOfferALinkForOnlineSignature=Enlace para a sinatura en liña -WelcomeOnOnlineSignaturePage=Welcome to the page to accept commercial proposals from %s -ThisScreenAllowsYouToSignDocFrom=This screen allow you to accept and sign, or refuse, a quote/commercial proposal -ThisIsInformationOnDocumentToSign=This is information on document to accept or refuse -SignatureProposalRef=Signature of quote/commercial proposal %s -FeatureOnlineSignDisabled=Feature for online signing disabled or document generated before the feature was enabled +WelcomeOnOnlineSignaturePage=Benvenido á paxina para aceptar orzamentos de %s +ThisScreenAllowsYouToSignDocFrom=Esta pantalla permítelle aceptar e asinar, ou rexeitar, un orzamentos/proposta comercial +ThisIsInformationOnDocumentToSign=Esta é a información do documento para aceptar ou rexeitar +SignatureProposalRef=Sinatura do orzamento/proposta comercial %s +FeatureOnlineSignDisabled=Característica para a sinatura en liña inhabilitada ou documento xerado antes de que fora habilitada a característica diff --git a/htdocs/langs/gl_ES/compta.lang b/htdocs/langs/gl_ES/compta.lang index 6a038562da7..872ffd25c6e 100644 --- a/htdocs/langs/gl_ES/compta.lang +++ b/htdocs/langs/gl_ES/compta.lang @@ -13,206 +13,207 @@ LTReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using r Param=Config. RemainingAmountPayment=Amount payment remaining: Account=Conta -Accountparent=Parent account -Accountsparent=Parent accounts -Income=Income -Outcome=Expense -MenuReportInOut=Income / Expense -ReportInOut=Balance of income and expenses -ReportTurnover=Turnover invoiced -ReportTurnoverCollected=Turnover collected -PaymentsNotLinkedToInvoice=Payments not linked to any invoice, so not linked to any third party -PaymentsNotLinkedToUser=Payments not linked to any user -Profit=Profit -AccountingResult=Accounting result -BalanceBefore=Balance (before) +Accountparent=Conta pai +Accountsparent=Contas pai +Income=Ingresos +Outcome=Gastos +MenuReportInOut=Ingresos / Gastos +ReportInOut=Balance de ingresos e gastos. Resultado +ReportTurnover=Volume de vendas emitidas +ReportTurnoverCollected=Volume de vendas cobradas +PaymentsNotLinkedToInvoice=Pagamentos non ligados a algunha factura, polo que non están ligados a un terceiro +PaymentsNotLinkedToUser=Pagamentos non ligados a un usuario +Profit=Beneficio +AccountingResult=Resultado contable +BalanceBefore=Balance (antes) Balance=Saldo -Debit=Debit -Credit=Credit -Piece=Accounting Doc. -AmountHTVATRealReceived=Net collected -AmountHTVATRealPaid=Net paid -VATToPay=Tax sales -VATReceived=Tax received -VATToCollect=Tax purchases -VATSummary=Tax monthly -VATBalance=Tax Balance -VATPaid=Tax paid -LT1Summary=Tax 2 summary -LT2Summary=Tax 3 summary -LT1SummaryES=RE Balance -LT2SummaryES=IRPF Balance -LT1SummaryIN=CGST Balance -LT2SummaryIN=SGST Balance -LT1Paid=Tax 2 paid -LT2Paid=Tax 3 paid -LT1PaidES=RE Paid -LT2PaidES=IRPF Paid -LT1PaidIN=CGST Paid -LT2PaidIN=SGST Paid -LT1Customer=Tax 2 sales -LT1Supplier=Tax 2 purchases -LT1CustomerES=RE sales -LT1SupplierES=RE purchases -LT1CustomerIN=CGST sales -LT1SupplierIN=CGST purchases -LT2Customer=Tax 3 sales -LT2Supplier=Tax 3 purchases -LT2CustomerES=IRPF sales -LT2SupplierES=IRPF purchases -LT2CustomerIN=SGST sales -LT2SupplierIN=SGST purchases -VATCollected=VAT collected +Debit=Debe +Credit=Haber +Piece=Doc. contabilidade +AmountHTVATRealReceived=Total repercutido +AmountHTVATRealPaid=Total xa pago +VATToPay=Vendas IVE +VATReceived=IVE repercutido +VATToCollect=IVE compras +VATSummary=Balance de IVE mensual +VATBalance=Balance de IVE +VATPaid=Pagamento de IVE +LT1Summary=Resumo RE +LT2Summary=Resumo de IRPF +LT1SummaryES=Balance de RE +LT2SummaryES=Balance de IRPF +LT1SummaryIN=Balance CGST +LT2SummaryIN=Balance SGST +LT1Paid=Pagamentos de IRPF +LT2Paid=Pagamentos de IRPF +LT1PaidES=RE xa pago +LT2PaidES=IRPF xa pago +LT1PaidIN=xa pago CGST +LT2PaidIN=xa pago SGST +LT1Customer=Vendas RE +LT1Supplier=Compras RE +LT1CustomerES=Vendas RE +LT1SupplierES=Compras RE +LT1CustomerIN=Vendas CGST +LT1SupplierIN=Compras CGST +LT2Customer=Vendas IRPF +LT2Supplier=Compras IRPF +LT2CustomerES=IRPF vendas +LT2SupplierES=IRPF compras +LT2CustomerIN=Vendas SGST +LT2SupplierIN=Compras SGST +VATCollected=IVE recuperado StatusToPay=A pagar -SpecialExpensesArea=Area for all special payments -SocialContribution=Social or fiscal tax -SocialContributions=Social or fiscal taxes -SocialContributionsDeductibles=Deductible social or fiscal taxes -SocialContributionsNondeductibles=Nondeductible social or fiscal taxes -LabelContrib=Label contribution -TypeContrib=Type contribution -MenuSpecialExpenses=Special expenses -MenuTaxAndDividends=Taxes and dividends -MenuSocialContributions=Social/fiscal taxes -MenuNewSocialContribution=New social/fiscal tax -NewSocialContribution=New social/fiscal tax -AddSocialContribution=Add social/fiscal tax -ContributionsToPay=Social/fiscal taxes to pay -AccountancyTreasuryArea=Billing and payment area -NewPayment=New payment -PaymentCustomerInvoice=Customer invoice payment -PaymentSupplierInvoice=vendor invoice payment -PaymentSocialContribution=Pago de imposto social/fiscal -PaymentVat=VAT payment -ListPayment=List of payments -ListOfCustomerPayments=List of customer payments -ListOfSupplierPayments=List of vendor payments -DateStartPeriod=Date start period -DateEndPeriod=Date end period -newLT1Payment=New tax 2 payment -newLT2Payment=New tax 3 payment -LT1Payment=Tax 2 payment -LT1Payments=Tax 2 payments -LT2Payment=Tax 3 payment -LT2Payments=Tax 3 payments -newLT1PaymentES=New RE payment -newLT2PaymentES=New IRPF payment -LT1PaymentES=RE Payment -LT1PaymentsES=RE Payments -LT2PaymentES=IRPF Payment -LT2PaymentsES=IRPF Payments -VATPayment=Sales tax payment -VATPayments=Sales tax payments -VATRefund=Sales tax refund -NewVATPayment=New sales tax payment -NewLocalTaxPayment=New tax %s payment -Refund=Refund -SocialContributionsPayments=Social/fiscal taxes payments -ShowVatPayment=Show VAT payment -TotalToPay=Total to pay +SpecialExpensesArea=Área de pagamentos especiais +SocialContribution=Impostos sociais ou fiscais +SocialContributions=Impostos sociais ou fiscais +SocialContributionsDeductibles=Impostos sociais ou fiscais deducibles +SocialContributionsNondeductibles=Impostos sociais ou fiscais non deducibles +DateOfSocialContribution=Date of social or fiscal tax +LabelContrib=Etiqueta de contribución +TypeContrib=Tipo de contribución +MenuSpecialExpenses=Pagamentos especiais +MenuTaxAndDividends=Impostos e dividendos +MenuSocialContributions=Impostos sociais/fiscais +MenuNewSocialContribution=Nova taxa social/fiscal +NewSocialContribution=Nova taxa social/fiscal +AddSocialContribution=Engadir taxa social/fiscal +ContributionsToPay=Taxas sociais/fiscais a pagar +AccountancyTreasuryArea=Área de facturación e pagamentos +NewPayment=Novo pagamento +PaymentCustomerInvoice=Cobro factura ao cliente +PaymentSupplierInvoice=Pagamento factura de provedor +PaymentSocialContribution=Pagamentos taxas sociais/fiscais +PaymentVat=Pagamento IVE +ListPayment=Listaxe de pagamentos +ListOfCustomerPayments=Listaxe de pagamentos de clientes +ListOfSupplierPayments=Listaxe de pagamentos a provedores +DateStartPeriod=Data inicio período +DateEndPeriod=Data final período +newLT1Payment=Novo pagamento de RE +newLT2Payment=Novo pagamento de IRPF +LT1Payment=Pagamento de RE +LT1Payments=Pagamentos RE +LT2Payment=Pagamento de IRPF +LT2Payments=Pagamentos IRPF +newLT1PaymentES=Novo pagamento de RE +newLT2PaymentES=Novo pagamento de IRPF +LT1PaymentES=Pagamento de RE +LT1PaymentsES=Pagamentos de RE +LT2PaymentES=Pagamento de IRPF +LT2PaymentsES=Pagamentos de IRPF +VATPayment=Pagamento de IVE +VATPayments=Pagamentos de IVE +VATRefund=Devolución IVE +NewVATPayment=Novo pagamento IVE +NewLocalTaxPayment=Novo pagamento de %s +Refund=Reembolso +SocialContributionsPayments=Pagamentos de taxas sociais/fiscais +ShowVatPayment=Consultar pagamentos de IVE +TotalToPay=Total a pagar BalanceVisibilityDependsOnSortAndFilters=Balance is visible in this list only if table is sorted ascending on %s and filtered for 1 bank account -CustomerAccountancyCode=Customer accounting code -SupplierAccountancyCode=Vendor accounting code -CustomerAccountancyCodeShort=Cust. account. code -SupplierAccountancyCodeShort=Sup. account. code -AccountNumber=Account number +CustomerAccountancyCode=Código contable cliente +SupplierAccountancyCode=Código contable provedor +CustomerAccountancyCodeShort=Cód. conta cliente +SupplierAccountancyCodeShort=Cód. conta provedor +AccountNumber=Número de conta NewAccountingAccount=Nova conta -Turnover=Turnover invoiced -TurnoverCollected=Turnover collected -SalesTurnoverMinimum=Minimum turnover -ByExpenseIncome=By expenses & incomes +Turnover=Volume de vendas emitidas +TurnoverCollected=Volume de vendas cobradas +SalesTurnoverMinimum=Volume de vendas mínimo +ByExpenseIncome=Por gastos e ingresos ByThirdParties=Por terceiros -ByUserAuthorOfInvoice=By invoice author -CheckReceipt=Check deposit -CheckReceiptShort=Check deposit -LastCheckReceiptShort=Latest %s check receipts -NewCheckReceipt=New discount -NewCheckDeposit=New check deposit -NewCheckDepositOn=Create receipt for deposit on account: %s -NoWaitingChecks=No checks awaiting deposit. -DateChequeReceived=Check reception date -NbOfCheques=No. of checks -PaySocialContribution=Pay a social/fiscal tax -ConfirmPaySocialContribution=Are you sure you want to classify this social or fiscal tax as paid? -DeleteSocialContribution=Delete a social or fiscal tax payment -ConfirmDeleteSocialContribution=Are you sure you want to delete this social/fiscal tax payment? -ExportDataset_tax_1=Social and fiscal taxes and payments -CalcModeVATDebt=Mode %sVAT on commitment accounting%s. -CalcModeVATEngagement=Mode %sVAT on incomes-expenses%s. -CalcModeDebt=Analysis of known recorded invoices even if they are not yet accounted in ledger. -CalcModeEngagement=Analysis of known recorded payments, even if they are not yet accounted in Ledger. -CalcModeBookkeeping=Analysis of data journalized in Bookkeeping Ledger table. -CalcModeLT1= Mode %sRE on customer invoices - suppliers invoices%s -CalcModeLT1Debt=Mode %sRE on customer invoices%s -CalcModeLT1Rec= Mode %sRE on suppliers invoices%s -CalcModeLT2= Mode %sIRPF on customer invoices - suppliers invoices%s -CalcModeLT2Debt=Mode %sIRPF on customer invoices%s -CalcModeLT2Rec= Mode %sIRPF on suppliers invoices%s -AnnualSummaryDueDebtMode=Balance of income and expenses, annual summary -AnnualSummaryInputOutputMode=Balance of income and expenses, annual summary -AnnualByCompanies=Balance of income and expenses, by predefined groups of account -AnnualByCompaniesDueDebtMode=Balance of income and expenses, detail by predefined groups, mode %sClaims-Debts%s said Commitment accounting. -AnnualByCompaniesInputOutputMode=Balance of income and expenses, detail by predefined groups, mode %sIncomes-Expenses%s said cash accounting. -SeeReportInInputOutputMode=See %sanalysis of payments%s for a calculation on actual payments made even if they are not yet accounted in Ledger. -SeeReportInDueDebtMode=See %sanalysis of invoices%s for a calculation based on known recorded invoices even if they are not yet accounted in Ledger. -SeeReportInBookkeepingMode=See %sBookeeping report%s for a calculation on Bookkeeping Ledger table -RulesAmountWithTaxIncluded=- Amounts shown are with all taxes included -RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.
    - It is based on the billing date of invoices and on the due date for expenses or tax payments. For salaries defined with Salary module, the value date of payment is used. -RulesResultInOut=- It includes the real payments made on invoices, expenses, VAT and salaries.
    - It is based on the payment dates of the invoices, expenses, VAT and salaries. The donation date for donation. -RulesCADue=- It includes the customer's due invoices whether they are paid or not.
    - It is based on the billing date of these invoices.
    -RulesCAIn=- It includes all the effective payments of invoices received from customers.
    - It is based on the payment date of these invoices
    -RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. -RulesAmountOnInOutBookkeepingRecord=It includes record in your Ledger with accounting accounts that has the group "EXPENSE" or "INCOME" -RulesResultBookkeepingPredefined=It includes record in your Ledger with accounting accounts that has the group "EXPENSE" or "INCOME" -RulesResultBookkeepingPersonalized=It show record in your Ledger with accounting accounts grouped by personalized groups -SeePageForSetup=See menu %s for setup -DepositsAreNotIncluded=- Down payment invoices are not included -DepositsAreIncluded=- Down payment invoices are included -LT1ReportByCustomers=Report tax 2 by third party -LT2ReportByCustomers=Report tax 3 by third party -LT1ReportByCustomersES=Report by third party RE -LT2ReportByCustomersES=Report by third party IRPF -VATReport=Sale tax report -VATReportByPeriods=Sale tax report by period -VATReportByRates=Sale tax report by rates -VATReportByThirdParties=Sale tax report by third parties -VATReportByCustomers=Sale tax report by customer -VATReportByCustomersInInputOutputMode=Report by the customer VAT collected and paid -VATReportByQuartersInInputOutputMode=Report by Sale tax rate of the tax collected and paid -LT1ReportByQuarters=Report tax 2 by rate -LT2ReportByQuarters=Report tax 3 by rate -LT1ReportByQuartersES=Report by RE rate -LT2ReportByQuartersES=Report by IRPF rate -SeeVATReportInInputOutputMode=See report %sVAT encasement%s for a standard calculation -SeeVATReportInDueDebtMode=See report %sVAT on flow%s for a calculation with an option on the flow +ByUserAuthorOfInvoice=Por autor da factura +CheckReceipt=Listaxe de remesas +CheckReceiptShort=Remesas +LastCheckReceiptShort=Últimas %s remesas de talóns +NewCheckReceipt=Nova remesa +NewCheckDeposit=Novo ingreso +NewCheckDepositOn=Crear nova remesa na conta: %s +NoWaitingChecks=Sen talóns agardando depósito +DateChequeReceived=Data recepción do talón +NbOfCheques=Nº de talóns +PaySocialContribution=Pagar unha taxa social/fiscal +ConfirmPaySocialContribution=¿Está certo de querer clasificar esta taxa social ou fiscal como pagada? +DeleteSocialContribution=Eliminar un pagamento de taxa social ou fiscal +ConfirmDeleteSocialContribution=¿Está certo de querer eliminar este pagamento de taxa social/fiscal? +ExportDataset_tax_1=taxas sociais e fiscais e pagamentos +CalcModeVATDebt=Modo %sIVE sobre facturas emitidas%s. +CalcModeVATEngagement=Modo %sIVE sobre facturas cobradas%s. +CalcModeDebt=Análise de facturas rexistradas incluidas as aínda non contabilizadas no Libro Maior. +CalcModeEngagement=Análise dos pagamentos rexistrados, incluidos os aínda non contabilizados no Libro Maior. +CalcModeBookkeeping=Análise dos datos rexistrados no Libro Maior +CalcModeLT1= Modo %sRE facturas a clientes - facturas de provedores%s +CalcModeLT1Debt=Modo %sRE en facturas a clientes%s +CalcModeLT1Rec= Modo %sRE en facturas de provedores%s +CalcModeLT2= Modo %sIRPF en facturas a clientes - facturas de provedores%s +CalcModeLT2Debt=Modo %sIRPF en facturas a clientes%s +CalcModeLT2Rec= Modo %sIRPF en facturas de provedores%s +AnnualSummaryDueDebtMode=Resumo anual do balance de ingresos e gastos +AnnualSummaryInputOutputMode=Resumo anual do balance de ingresos e gastos +AnnualByCompanies=Balance de ingresos e gastos, por grupos de conta predefinidos +AnnualByCompaniesDueDebtMode=Balance de ingresos e gastos, desglosado por terceiros, en modo%sCréditos-Débedas%s coñecida como contabilidade de compromiso. +AnnualByCompaniesInputOutputMode=Balance de ingresos e gastos, desglosado por terceiros, en modo %sIngresos-Gastos%s coñecido como contabilidad de caixa. +SeeReportInInputOutputMode=Consulte %sanálise de pagamentos%s para obter un cálculo dos pagamentos efectuados, incluso se non foron contabilizados no Libro Maior. +SeeReportInDueDebtMode=Consulte %sanálise de facturas %s para un cálculo baseado en facturas rexistradas coñecidas, incluso se aínda non foron contabilizadas no Libro Maior. +SeeReportInBookkeepingMode=Consulte el %sInforme de facturación%s para realizar un cálculo na Taboa Libro maior +RulesAmountWithTaxIncluded=- Os importes amosados son con todos os impostos incluidos. +RulesResultDue=- Incluidas as facturas pendentes, os gastos, o IVE, as doacións pagadas ou non. También inclúe os salarios xa pagos.
    - Baseado na data da validación das facturas e IVE e na data de vencemento ds gastos. Para os salarios definidos co módulo de Salarios, é usada a data de valor do pagamento. +RulesResultInOut=- Inclúe os pagamentos realizados sobre as facturas, os gastos e o IVE.
    - Basado nas datas de pagamento das facturas, gastos e IVE. A data de doación para as doacións +RulesCADue=- Inclúe as facturas a clientes, estexan xa pagas ou non.
    - Baseado na data de validación das mesmas.
    +RulesCAIn=- Inclúe os pagamentos efectuados das facturas a clientes.
    - Baseado na data de pagamento das mesmas
    +RulesCATotalSaleJournal=Inclúe todas as líñas de crédito do diario de vendas. +RulesAmountOnInOutBookkeepingRecord=Inclúe rexistro no Libro Maior con contas contables que teñen o grupo "GASTOS" ou "INGRESOS" +RulesResultBookkeepingPredefined=Inclúe rexistro no Libro Maior con contas contables que teñen o grupo "GASTOS" ou "INGRESOS" +RulesResultBookkeepingPersonalized=Amosa un rexistro no Libro Maior con contas contables agrupadas por grupos persoalizados +SeePageForSetup=Vexa o menú %s para configuralo +DepositsAreNotIncluded=- As facturas de anticipo non están incluidas +DepositsAreIncluded=- As facturas de anticipo están incluidas +LT1ReportByCustomers=Informe por terceiro do RE +LT2ReportByCustomers=Informe por terceiro do IRPF +LT1ReportByCustomersES=Informe de RE por terceiro +LT2ReportByCustomersES=Informe de IRPF por terceiro +VATReport=Informe IVE +VATReportByPeriods=Informe de IVE por período +VATReportByRates=Informe de impostos por taxa +VATReportByThirdParties=Informe de impostos por terceiros +VATReportByCustomers=Informe IVE por cliente +VATReportByCustomersInInputOutputMode=Informe por cliente do IVE repercutido e soportado +VATReportByQuartersInInputOutputMode=Informe por taxa do IVE repercutido e soportado +LT1ReportByQuarters=Informe de IRPF por taxa +LT2ReportByQuarters=Informe de IRPF por taxa +LT1ReportByQuartersES=Informe de RE por taxa +LT2ReportByQuartersES=Informe de IRPF por taxa +SeeVATReportInInputOutputMode=Ver o informe %sIVA pagado%s para un modo de cálculo estandard +SeeVATReportInDueDebtMode=Ver o informe %sIVA debido%s para un modo de cálculo coa opción sobre o debido RulesVATInServices=- For services, the report includes the VAT regulations actually received or issued on the basis of the date of payment. RulesVATInProducts=- For material assets, the report includes the VAT received or issued on the basis of the date of payment. RulesVATDueServices=- For services, the report includes VAT invoices due, paid or not, based on the invoice date. RulesVATDueProducts=- For material assets, the report includes the VAT invoices, based on the invoice date. OptionVatInfoModuleComptabilite=Note: For material assets, it should use the date of delivery to be more fair. -ThisIsAnEstimatedValue=This is a preview, based on business events and not from the final ledger table, so final results may differ from this preview values -PercentOfInvoice=%%/invoice -NotUsedForGoods=Not used on goods -ProposalStats=Statistics on proposals -OrderStats=Statistics on orders -InvoiceStats=Statistics on bills -Dispatch=Dispatching -Dispatched=Dispatched -ToDispatch=To dispatch -ThirdPartyMustBeEditAsCustomer=Third party must be defined as a customer -SellsJournal=Sales Journal -PurchasesJournal=Purchases Journal -DescSellsJournal=Sales Journal -DescPurchasesJournal=Purchases Journal +ThisIsAnEstimatedValue=Esta é unha vista previa, basaeda en eventos de negocios e non na taboa de contabilidade final, polo que os resultados finais poden diferir destos valores de vista previa +PercentOfInvoice=%%/factura +NotUsedForGoods=Non utilizado para os bens +ProposalStats=Estatísticas de orzamentos +OrderStats=Estatísticas de pedidos +InvoiceStats=Estatísticas de facturas +Dispatch=Desglose +Dispatched=Contabilizadas +ToDispatch=A contabilizar +ThirdPartyMustBeEditAsCustomer=O terceiro debe estar definido como cliente +SellsJournal=Diario de vendas +PurchasesJournal=Diario de compras +DescSellsJournal=Diario de vendas +DescPurchasesJournal=Diario de compras CodeNotDef=Non definido -WarningDepositsNotIncluded=Down payment invoices are not included in this version with this accountancy module. -DatePaymentTermCantBeLowerThanObjectDate=Payment term date can't be lower than object date. -Pcg_version=Chart of accounts models -Pcg_type=Pcg type -Pcg_subtype=Pcg subtype -InvoiceLinesToDispatch=Invoice lines to dispatch -ByProductsAndServices=By product and service -RefExt=External ref +WarningDepositsNotIncluded=As facturas de anticipo non están incluidas nesta versión con este módulo de contabilidade +DatePaymentTermCantBeLowerThanObjectDate=A data límite de pagamento non pode ser inferior á data do obxecto +Pcg_version=Modelos de pláns contables +Pcg_type=Tipo de conta +Pcg_subtype=Subtipo de conta +InvoiceLinesToDispatch=Líñas de facturas a contabilizar +ByProductsAndServices=Por produtos e servizos +RefExt=Ref. externa ToCreateAPredefinedInvoice=To create a template invoice, create a standard invoice, then, without validating it, click onto button "%s". LinkedOrder=Vincular a pedido Mode1=Method 1 @@ -221,39 +222,39 @@ CalculationRuleDesc=To calculate total VAT, there is two methods:
    Method 1 is CalculationRuleDescSupplier=According to vendor, choose appropriate method to apply same calculation rule and get same result expected by your vendor. TurnoverPerProductInCommitmentAccountingNotRelevant=The report of Turnover collected per product is not available. This report is only available for turnover invoiced. TurnoverPerSaleTaxRateInCommitmentAccountingNotRelevant=The report of Turnover collected per sale tax rate is not available. This report is only available for turnover invoiced. -CalculationMode=Calculation mode -AccountancyJournal=Accounting code journal -ACCOUNTING_VAT_SOLD_ACCOUNT=Accounting account by default for VAT on sales (used if not defined on VAT dictionary setup) -ACCOUNTING_VAT_BUY_ACCOUNT=Accounting account by default for VAT on purchases (used if not defined on VAT dictionary setup) -ACCOUNTING_VAT_PAY_ACCOUNT=Accounting account by default for paying VAT +CalculationMode=Modo de cálculo +AccountancyJournal=Código contable diario +ACCOUNTING_VAT_SOLD_ACCOUNT=Conta contable por defecto para o IVE de vendas (usado se non é definido no diccionario de IVE) +ACCOUNTING_VAT_BUY_ACCOUNT=Cuenta contable por defecto para o IVE de compras (usado se non é definido no diccionario de IVE) +ACCOUNTING_VAT_PAY_ACCOUNT=Código contable por defecto para o pagamento de IVE ACCOUNTING_ACCOUNT_CUSTOMER=Accounting account used for customer third parties ACCOUNTING_ACCOUNT_CUSTOMER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated customer accounting account on third party is not defined. ACCOUNTING_ACCOUNT_SUPPLIER=Accounting account used for vendor third parties ACCOUNTING_ACCOUNT_SUPPLIER_Desc=The dedicated accounting account defined on third party card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated vendor accounting account on third party is not defined. -ConfirmCloneTax=Confirm the clone of a social/fiscal tax -CloneTaxForNextMonth=Clone it for next month -SimpleReport=Simple report -AddExtraReport=Extra reports (add foreign and national customer report) -OtherCountriesCustomersReport=Foreign customers report +ConfirmCloneTax=Confirmar a clonación dunha taxa social/fiscal +CloneTaxForNextMonth=Clonarla para o próximo mes +SimpleReport=informe simple +AddExtraReport=Informes adicionais (engade informe de clientes extranxeiros e locais) +OtherCountriesCustomersReport=Informe de clientes extranxeiros BasedOnTwoFirstLettersOfVATNumberBeingDifferentFromYourCompanyCountry=Based on the two first letters of the VAT number being different from your own company's country code SameCountryCustomersWithVAT=National customers report BasedOnTwoFirstLettersOfVATNumberBeingTheSameAsYourCompanyCountry=Based on the two first letters of the VAT number being the same as your own company's country code -LinkedFichinter=Link to an intervention -ImportDataset_tax_contrib=Social/fiscal taxes -ImportDataset_tax_vat=Vat payments -ErrorBankAccountNotFound=Error: Bank account not found +LinkedFichinter=Ligar a unha intervención +ImportDataset_tax_contrib=Impostos sociais/fiscais +ImportDataset_tax_vat=Pagamentos IVE +ErrorBankAccountNotFound=Error: Conta bancaria non atopada FiscalPeriod=Período contable -ListSocialContributionAssociatedProject=List of social contributions associated with the project -DeleteFromCat=Remove from accounting group -AccountingAffectation=Accounting assignment -LastDayTaxIsRelatedTo=Last day of period the tax is related to -VATDue=Sale tax claimed -ClaimedForThisPeriod=Claimed for the period -PaidDuringThisPeriod=Paid during this period -ByVatRate=By sale tax rate -TurnoverbyVatrate=Turnover invoiced by sale tax rate -TurnoverCollectedbyVatrate=Turnover collected by sale tax rate -PurchasebyVatrate=Purchase by sale tax rate +ListSocialContributionAssociatedProject=Listaxe de contribucións sociais asociadas ao proxecto +DeleteFromCat=Eliminar do grupo de contabilidade +AccountingAffectation=Asignación de conta contable +LastDayTaxIsRelatedTo=Último día do período do imposto +VATDue=Imposto reclamado +ClaimedForThisPeriod=Reclamado para o período +PaidDuringThisPeriod=Pagado durante este período +ByVatRate=Por taxa de imposto +TurnoverbyVatrate=Volume de vendas emitidas por tipo de imposto +TurnoverCollectedbyVatrate=Volume de vendas cobradas por tipo de imposto +PurchasebyVatrate=Compra por taxa de impostos LabelToShow=Etiqueta curta PurchaseTurnover=Purchase turnover PurchaseTurnoverCollected=Purchase turnover collected diff --git a/htdocs/langs/gl_ES/contracts.lang b/htdocs/langs/gl_ES/contracts.lang index 859cb0739fb..698aa2ad63f 100644 --- a/htdocs/langs/gl_ES/contracts.lang +++ b/htdocs/langs/gl_ES/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Servizos activos MenuExpiredServices=Servizos expirados MenuClosedServices=Servizos pechados NewContract=Novo contrato -NewContractSubscription=Novo contrato/suscrición +NewContractSubscription=New contract or subscription AddContract=Crear contrato DeleteAContract=Eliminar un contrato ActivateAllOnContract=Activar todos os servizos diff --git a/htdocs/langs/gl_ES/deliveries.lang b/htdocs/langs/gl_ES/deliveries.lang index f97f863389b..b7e846dd4c6 100644 --- a/htdocs/langs/gl_ES/deliveries.lang +++ b/htdocs/langs/gl_ES/deliveries.lang @@ -1,31 +1,31 @@ # Dolibarr language file - Source file is en_US - deliveries -Delivery=Delivery -DeliveryRef=Ref Delivery -DeliveryCard=Receipt card -DeliveryOrder=Delivery receipt -DeliveryDate=Delivery date -CreateDeliveryOrder=Generate delivery receipt -DeliveryStateSaved=Delivery state saved -SetDeliveryDate=Set shipping date -ValidateDeliveryReceipt=Validate delivery receipt -ValidateDeliveryReceiptConfirm=Are you sure you want to validate this delivery receipt? -DeleteDeliveryReceipt=Delete delivery receipt -DeleteDeliveryReceiptConfirm=Are you sure you want to delete delivery receipt %s? -DeliveryMethod=Delivery method -TrackingNumber=Tracking number -DeliveryNotValidated=Delivery not validated +Delivery=Envío +DeliveryRef=Ref. envío +DeliveryCard=Ficha nota de recepción +DeliveryOrder=Nota de recepción +DeliveryDate=Data de entrega +CreateDeliveryOrder=Xerar nota de entrega +DeliveryStateSaved=Estado de entrega gardado +SetDeliveryDate=Indicar a data de entrega +ValidateDeliveryReceipt=Validar a nota de entrega +ValidateDeliveryReceiptConfirm=¿Está certo de querer validar esta entrega? +DeleteDeliveryReceipt=Eliminar a nota de entrega +DeleteDeliveryReceiptConfirm=¿Está certo de querer eliminar a nota de entrega %s? +DeliveryMethod=Método de envío +TrackingNumber=Nº de seguemento +DeliveryNotValidated=Nota de recepción non validada StatusDeliveryCanceled=Anulado StatusDeliveryDraft=Borrador StatusDeliveryValidated=Recibido # merou PDF model -NameAndSignature=Name and Signature: -ToAndDate=To___________________________________ on ____/_____/__________ -GoodStatusDeclaration=Have received the goods above in good condition, -Deliverer=Deliverer: -Sender=Remitente -Recipient=Recipient -ErrorStockIsNotEnough=There's not enough stock -Shippable=Shippable -NonShippable=Not Shippable -ShowReceiving=Show delivery receipt -NonExistentOrder=Nonexistent order +NameAndSignature=Nome e sinatura : +ToAndDate=En___________________________________ a ____/_____/__________ +GoodStatusDeclaration=Teño recibido a mercancía en bo estado, +Deliverer=Destinatario : +Sender=Orixe +Recipient=Destinatario +ErrorStockIsNotEnough=Non hai suficiente stock +Shippable=Enviable +NonShippable=Non enviable +ShowReceiving=Mostrar nota de recepción +NonExistentOrder=Pedido inexistente diff --git a/htdocs/langs/gl_ES/dict.lang b/htdocs/langs/gl_ES/dict.lang index ec315d97142..394dc02d94d 100644 --- a/htdocs/langs/gl_ES/dict.lang +++ b/htdocs/langs/gl_ES/dict.lang @@ -1,337 +1,337 @@ # Dolibarr language file - Source file is en_US - dict -CountryFR=France -CountryBE=Belgium -CountryIT=Italy -CountryES=Spain -CountryDE=Germany -CountryCH=Switzerland +CountryFR=Franza +CountryBE=Bélxica +CountryIT=Italia +CountryES=España +CountryDE=Alemaña +CountryCH=Suiza # Warning, country code GB is for United Kingdom. UK Does not exists as country code in ISO standard. -CountryGB=United Kingdom -CountryUK=United Kingdom -CountryIE=Ireland +CountryGB=Reino Unido +CountryUK=Reino Unido +CountryIE=Irlanda CountryCN=China -CountryTN=Tunisia -CountryUS=United States -CountryMA=Morocco -CountryDZ=Algeria -CountryCA=Canada +CountryTN=Túnez +CountryUS=Estados Unidos +CountryMA=Marrocos +CountryDZ=Arxelia +CountryCA=Canadá CountryTG=Togo -CountryGA=Gabon -CountryNL=Netherlands -CountryHU=Hungary -CountryRU=Russia -CountrySE=Sweden -CountryCI=Ivoiry Coast +CountryGA=Gabón +CountryNL=Países Baixos +CountryHU=Hungría +CountryRU=Rusia +CountrySE=Suecia +CountryCI=Costa de Marfil CountrySN=Senegal -CountryAR=Argentina -CountryCM=Cameroon +CountryAR=Arxentina +CountryCM=Camerún CountryPT=Portugal -CountrySA=Saudi Arabia -CountryMC=Monaco +CountrySA=Arabia Saudita +CountryMC=Mónaco CountryAU=Australia -CountrySG=Singapore -CountryAF=Afghanistan -CountryAX=Åland Islands +CountrySG=Singapur +CountryAF=Afganistán +CountryAX=Illas Aland CountryAL=Albania -CountryAS=American Samoa +CountryAS=Samoa Americana CountryAD=Andorra CountryAO=Angola -CountryAI=Anguilla -CountryAQ=Antarctica -CountryAG=Antigua and Barbuda +CountryAI=Anguila +CountryAQ=Antártida +CountryAG=Antigua e Barbuda CountryAM=Armenia CountryAW=Aruba CountryAT=Austria -CountryAZ=Azerbaijan +CountryAZ=Azerbaián CountryBS=Bahamas -CountryBH=Bahrain -CountryBD=Bangladesh +CountryBH=Bahréin +CountryBD=Bangladés CountryBB=Barbados -CountryBY=Belarus -CountryBZ=Belize -CountryBJ=Benin -CountryBM=Bermuda -CountryBT=Bhutan +CountryBY=Bielorrusia +CountryBZ=Belice +CountryBJ=Benín +CountryBM=Bermudas +CountryBT=Bután CountryBO=Bolivia -CountryBA=Bosnia and Herzegovina -CountryBW=Botswana -CountryBV=Bouvet Island -CountryBR=Brazil -CountryIO=British Indian Ocean Territory -CountryBN=Brunei Darussalam +CountryBA=Bosnia Herzegovina +CountryBW=Botsuana +CountryBV=Illa Bouvet +CountryBR=Brasil +CountryIO=Territorio Británico do Océano Índico +CountryBN=Brunéi CountryBG=Bulgaria CountryBF=Burkina Faso CountryBI=Burundi -CountryKH=Cambodia -CountryCV=Cape Verde -CountryKY=Cayman Islands -CountryCF=Central African Republic +CountryKH=Camboia +CountryCV=Cabo Verde +CountryKY=Illas Caimán +CountryCF=República Centroafricana CountryTD=Chad CountryCL=Chile -CountryCX=Christmas Island -CountryCC=Cocos (Keeling) Islands +CountryCX=Illa Christmas +CountryCC=Illas Cocos (Keeling) CountryCO=Colombia -CountryKM=Comoros +CountryKM=Comoras CountryCG=Congo -CountryCD=Congo, The Democratic Republic of the -CountryCK=Cook Islands +CountryCD=República Democrática do Congo +CountryCK=Illas Cook CountryCR=Costa Rica -CountryHR=Croatia +CountryHR=Croacia CountryCU=Cuba -CountryCY=Cyprus -CountryCZ=Czech Republic -CountryDK=Denmark -CountryDJ=Djibouti +CountryCY=Chipre +CountryCZ=República Checa +CountryDK=Dinamarca +CountryDJ=Djibuti CountryDM=Dominica -CountryDO=Dominican Republic +CountryDO=República Dominicana CountryEC=Ecuador -CountryEG=Egypt -CountrySV=El Salvador -CountryGQ=Equatorial Guinea +CountryEG=Exipto +CountrySV=O Salvador +CountryGQ=Guinea Ecuatorial CountryER=Eritrea CountryEE=Estonia -CountryET=Ethiopia -CountryFK=Falkland Islands -CountryFO=Faroe Islands -CountryFJ=Fiji Islands -CountryFI=Finland -CountryGF=French Guiana -CountryPF=French Polynesia -CountryTF=French Southern Territories +CountryET=Etiopía +CountryFK=Illas Malvinas +CountryFO=Illas Feroe +CountryFJ=Illas Fiji +CountryFI=Finlandia +CountryGF=Guaiana francesa +CountryPF=Polinesia francesa +CountryTF=Territorios australes franceses CountryGM=Gambia -CountryGE=Georgia +CountryGE=Xeorxia CountryGH=Ghana -CountryGI=Gibraltar -CountryGR=Greece -CountryGL=Greenland -CountryGD=Grenada -CountryGP=Guadeloupe +CountryGI=Xibraltar +CountryGR=Grecia +CountryGL=Groenlandia +CountryGD=Granada +CountryGP=Guadalupe CountryGU=Guam CountryGT=Guatemala CountryGN=Guinea CountryGW=Guinea-Bissau -CountryGY=Guyana -CountryHT=Haïti -CountryHM=Heard Island and McDonald -CountryVA=Holy See (Vatican City State) +CountryGY=Güiana +CountryHT=Haití +CountryHM=Illas Heard e McDonald +CountryVA=Santa Sede (Vaticano) CountryHN=Honduras CountryHK=Hong Kong -CountryIS=Iceland +CountryIS=Islandia CountryIN=India CountryID=Indonesia -CountryIR=Iran +CountryIR=Irán CountryIQ=Iraq CountryIL=Israel -CountryJM=Jamaica -CountryJP=Japan -CountryJO=Jordan -CountryKZ=Kazakhstan -CountryKE=Kenya +CountryJM=Xamaica +CountryJP=Xapón +CountryJO=Xordania +CountryKZ=Kazajstán +CountryKE=Kenia CountryKI=Kiribati -CountryKP=North Korea -CountryKR=South Korea +CountryKP=Corea do Norte +CountryKR=Corea do Sur CountryKW=Kuwait -CountryKG=Kyrgyzstan -CountryLA=Lao -CountryLV=Latvia -CountryLB=Lebanon -CountryLS=Lesotho +CountryKG=Kirguizstán +CountryLA=Laos +CountryLV=Letonia +CountryLB=Líbano +CountryLS=Lesoto CountryLR=Liberia -CountryLY=Libyan +CountryLY=Libia CountryLI=Liechtenstein -CountryLT=Lithuania -CountryLU=Luxembourg -CountryMO=Macao -CountryMK=Macedonia, the former Yugoslav of +CountryLT=Lituania +CountryLU=Luxemburgo +CountryMO=Macau +CountryMK=Antiga República Iugoslava de Macedonia CountryMG=Madagascar -CountryMW=Malawi -CountryMY=Malaysia -CountryMV=Maldives -CountryML=Mali +CountryMW=Malaui +CountryMY=Malaisia +CountryMV=Maldivas +CountryML=Malí CountryMT=Malta -CountryMH=Marshall Islands -CountryMQ=Martinique +CountryMH=Illas Marshall +CountryMQ=Martinica CountryMR=Mauritania -CountryMU=Mauritius -CountryYT=Mayotte +CountryMU=Mauricio +CountryYT=Maiotte CountryMX=Mexico CountryFM=Micronesia -CountryMD=Moldova +CountryMD=Moldavia CountryMN=Mongolia CountryMS=Monserrat CountryMZ=Mozambique -CountryMM=Myanmar (Burma) +CountryMM=Myanmar (Birmania) CountryNA=Namibia CountryNR=Nauru CountryNP=Nepal -CountryAN=Netherlands Antilles -CountryNC=New Caledonia -CountryNZ=New Zealand +CountryAN=Antillas Holandesas +CountryNC=Nova Caledonia +CountryNZ=Nova Zelanda CountryNI=Nicaragua -CountryNE=Niger -CountryNG=Nigeria +CountryNE=Níxer +CountryNG=Nixeria CountryNU=Niue -CountryNF=Norfolk Island -CountryMP=Northern Mariana Islands -CountryNO=Norway -CountryOM=Oman -CountryPK=Pakistan +CountryNF=Illa Norfolk +CountryMP=Illas Marianas do Norte +CountryNO=Noruega +CountryOM=Omán +CountryPK=Pakistán CountryPW=Palau -CountryPS=Palestinian Territory, Occupied -CountryPA=Panama -CountryPG=Papua New Guinea -CountryPY=Paraguay -CountryPE=Peru -CountryPH=Philippines -CountryPN=Pitcairn Islands -CountryPL=Poland +CountryPS=Territorio Ocupado Palestino +CountryPA=Panamá +CountryPG=Papua Nueva Guinea +CountryPY=Paraguai +CountryPE=Perú +CountryPH=Filipinas +CountryPN=Illas Pitcairn +CountryPL=Polonia CountryPR=Puerto Rico CountryQA=Qatar -CountryRE=Reunion -CountryRO=Romania -CountryRW=Rwanda -CountrySH=Saint Helena -CountryKN=Saint Kitts and Nevis -CountryLC=Saint Lucia -CountryPM=Saint Pierre and Miquelon -CountryVC=Saint Vincent and Grenadines +CountryRE=Reunión +CountryRO=Rumania +CountryRW=Ruanda +CountrySH=Santa Elena +CountryKN=San Cristóbal e Nieves +CountryLC=Santa Lucía +CountryPM=San Pedro e Miquelón +CountryVC=San Vicente e as Granadinas CountryWS=Samoa CountrySM=San Marino -CountryST=Sao Tome and Principe +CountryST=Santo Tomé e Príncipe CountryRS=Serbia CountrySC=Seychelles -CountrySL=Sierra Leone -CountrySK=Slovakia -CountrySI=Slovenia -CountrySB=Solomon Islands +CountrySL=Serra Leona +CountrySK=Eslovaquia +CountrySI=Eslovenia +CountrySB=Illas Salomón CountrySO=Somalia -CountryZA=South Africa -CountryGS=South Georgia and the South Sandwich Islands +CountryZA=Sur África +CountryGS=Illas Georgia do Sur e Sandwich do Sur CountryLK=Sri Lanka -CountrySD=Sudan -CountrySR=Suriname -CountrySJ=Svalbard and Jan Mayen -CountrySZ=Swaziland -CountrySY=Syrian -CountryTW=Taiwan -CountryTJ=Tajikistan +CountrySD=Sudán +CountrySR=Surinam +CountrySJ=Illas Svalbard e Jan Mayen +CountrySZ=Suazilandia +CountrySY=Siria +CountryTW=Taiwán +CountryTJ=Taxiquistán CountryTZ=Tanzania -CountryTH=Thailand -CountryTL=Timor-Leste +CountryTH=Tailandia +CountryTL=Timor Oriental CountryTK=Tokelau CountryTO=Tonga -CountryTT=Trinidad and Tobago -CountryTR=Turkey -CountryTM=Turkmenistan -CountryTC=Turks and Caicos Islands +CountryTT=Trinidad e Tobago +CountryTR=Turquía +CountryTM=Turkmenistán +CountryTC=Illas Turcas e Caicos CountryTV=Tuvalu CountryUG=Uganda -CountryUA=Ukraine -CountryAE=United Arab Emirates -CountryUM=United States Minor Outlying Islands -CountryUY=Uruguay -CountryUZ=Uzbekistan +CountryUA=Ucrania +CountryAE=Emiratos Árabes Unidos +CountryUM=Illas menores alonxadas de Estados Unidos +CountryUY=Uruguai +CountryUZ=Uzbekistán CountryVU=Vanuatu CountryVE=Venezuela -CountryVN=Viet Nam -CountryVG=Virgin Islands, British -CountryVI=Virgin Islands, U.S. -CountryWF=Wallis and Futuna -CountryEH=Western Sahara -CountryYE=Yemen +CountryVN=Vietnam +CountryVG=Illas Vírxenes Británicas +CountryVI=Illas Vírxenes +CountryWF=Wallis e Futuna +CountryEH=Sáhara Occidental +CountryYE=Iemen CountryZM=Zambia -CountryZW=Zimbabwe +CountryZW=Zimbabue CountryGG=Guernsey -CountryIM=Isle of Man +CountryIM=Illa de Man CountryJE=Jersey CountryME=Montenegro -CountryBL=Saint Barthelemy -CountryMF=Saint Martin +CountryBL=Saint-Barthélemy +CountryMF=Saint-Martin ##### Civilities ##### -CivilityMME=Mrs. -CivilityMR=Mr. -CivilityMLE=Ms. -CivilityMTRE=Master -CivilityDR=Doctor +CivilityMME=Señora +CivilityMR=Señor +CivilityMLE=Señorita +CivilityMTRE=Don +CivilityDR=Doutor ##### Currencies ##### Currencyeuros=Euros -CurrencyAUD=AU Dollars -CurrencySingAUD=AU Dollar -CurrencyCAD=CAN Dollars -CurrencySingCAD=CAN Dollar -CurrencyCHF=Swiss Francs -CurrencySingCHF=Swiss Franc +CurrencyAUD=Dólares Aus. +CurrencySingAUD=Dólar Aus. +CurrencyCAD=Dólares Can. +CurrencySingCAD=Dólar Can. +CurrencyCHF=Francos suizos +CurrencySingCHF=Franco suizo CurrencyEUR=Euros CurrencySingEUR=Euro -CurrencyFRF=French Francs -CurrencySingFRF=French Franc -CurrencyGBP=GB Pounds -CurrencySingGBP=GB Pound -CurrencyINR=Indian rupees -CurrencySingINR=Indian rupee +CurrencyFRF=Francos franceses +CurrencySingFRF=Franco francés +CurrencyGBP=Libras esterlinas +CurrencySingGBP=Libra esterlina +CurrencyINR=Rupias indias +CurrencySingINR=Rupia india CurrencyMAD=Dirham CurrencySingMAD=Dirham CurrencyMGA=Ariary CurrencySingMGA=Ariary -CurrencyMUR=Mauritius rupees -CurrencySingMUR=Mauritius rupee -CurrencyNOK=Norwegian krones -CurrencySingNOK=Norwegian kronas -CurrencyTND=Tunisian dinars -CurrencySingTND=Tunisian dinar -CurrencyUSD=US Dollars -CurrencySingUSD=US Dollar +CurrencyMUR=Rupias mauritanas +CurrencySingMUR=Rupia mauritana +CurrencyNOK=Coroas noruegas +CurrencySingNOK=Coroas noruegas +CurrencyTND=Dinares tunecinos +CurrencySingTND=Dinar tunecino +CurrencyUSD=Dólares USA +CurrencySingUSD=Dólar USA CurrencyUAH=Hryvnia CurrencySingUAH=Hryvnia -CurrencyXAF=CFA Francs BEAC -CurrencySingXAF=CFA Franc BEAC -CurrencyXOF=CFA Francs BCEAO -CurrencySingXOF=CFA Franc BCEAO -CurrencyXPF=CFP Francs -CurrencySingXPF=CFP Franc -CurrencyCentEUR=cents -CurrencyCentSingEUR=cent +CurrencyXAF=Francos CFA BEAC +CurrencySingXAF=Franco CFA BEAC +CurrencyXOF=Francos CFA BCEAO +CurrencySingXOF=Franco CFA BCEAO +CurrencyXPF=Francos CFP +CurrencySingXPF=Franco CFP +CurrencyCentEUR=céntimos +CurrencyCentSingEUR=céntimo CurrencyCentINR=paisa CurrencyCentSingINR=paise -CurrencyThousandthSingTND=thousandth +CurrencyThousandthSingTND=milésimo #### Input reasons ##### DemandReasonTypeSRC_INTE=Internet -DemandReasonTypeSRC_CAMP_MAIL=Mailing campaign -DemandReasonTypeSRC_CAMP_EMAIL=EMailing campaign -DemandReasonTypeSRC_CAMP_PHO=Phone campaign -DemandReasonTypeSRC_CAMP_FAX=Fax campaign -DemandReasonTypeSRC_COMM=Commercial contact -DemandReasonTypeSRC_SHOP=Shop contact -DemandReasonTypeSRC_WOM=Word of mouth -DemandReasonTypeSRC_PARTNER=Partner -DemandReasonTypeSRC_EMPLOYEE=Employee -DemandReasonTypeSRC_SPONSORING=Sponsorship -DemandReasonTypeSRC_SRC_CUSTOMER=Incoming contact of a customer +DemandReasonTypeSRC_CAMP_MAIL=Campaña correo +DemandReasonTypeSRC_CAMP_EMAIL=Campaña E-Mailing +DemandReasonTypeSRC_CAMP_PHO=Campaña telefónica +DemandReasonTypeSRC_CAMP_FAX=Campaña fax +DemandReasonTypeSRC_COMM=Contacto comercial +DemandReasonTypeSRC_SHOP=Contacto tenda +DemandReasonTypeSRC_WOM=Boca a boca +DemandReasonTypeSRC_PARTNER=Socio +DemandReasonTypeSRC_EMPLOYEE=Empregado +DemandReasonTypeSRC_SPONSORING=Patrocinador +DemandReasonTypeSRC_SRC_CUSTOMER=Contacto entrante dun cliente #### Paper formats #### -PaperFormatEU4A0=Format 4A0 -PaperFormatEU2A0=Format 2A0 -PaperFormatEUA0=Format A0 -PaperFormatEUA1=Format A1 -PaperFormatEUA2=Format A2 -PaperFormatEUA3=Format A3 -PaperFormatEUA4=Format A4 -PaperFormatEUA5=Format A5 -PaperFormatEUA6=Format A6 -PaperFormatUSLETTER=Format Letter US -PaperFormatUSLEGAL=Format Legal US -PaperFormatUSEXECUTIVE=Format Executive US -PaperFormatUSLEDGER=Format Ledger/Tabloid -PaperFormatCAP1=Format P1 Canada -PaperFormatCAP2=Format P2 Canada -PaperFormatCAP3=Format P3 Canada -PaperFormatCAP4=Format P4 Canada -PaperFormatCAP5=Format P5 Canada -PaperFormatCAP6=Format P6 Canada +PaperFormatEU4A0=Formato 4A0 +PaperFormatEU2A0=Formato 2A0 +PaperFormatEUA0=Formato A0 +PaperFormatEUA1=Formato A1 +PaperFormatEUA2=Formato A2 +PaperFormatEUA3=Formato A3 +PaperFormatEUA4=Formato A4 +PaperFormatEUA5=Formato A5 +PaperFormatEUA6=Formato A6 +PaperFormatUSLETTER=Formato carta EE. UU. +PaperFormatUSLEGAL=Formato legal EE. UU. +PaperFormatUSEXECUTIVE=Formato executivo EE. UU. +PaperFormatUSLEDGER=Formato tabloide +PaperFormatCAP1=Formato canadiense P1 +PaperFormatCAP2=Formato canadiense P2 +PaperFormatCAP3=Formato canadiense P3 +PaperFormatCAP4=Formato canadiense P4 +PaperFormatCAP5=Formato canadiense P5 +PaperFormatCAP6=Formato canadiense P6 #### Expense report categories #### -ExpAutoCat=Car -ExpCycloCat=Moped -ExpMotoCat=Motorbike +ExpAutoCat=Coche +ExpCycloCat=Ciclomotor +ExpMotoCat=Moto ExpAuto3CV=3 CV ExpAuto4CV=4 CV ExpAuto5CV=5 CV @@ -342,18 +342,18 @@ ExpAuto9CV=9 CV ExpAuto10CV=10 CV ExpAuto11CV=11 CV ExpAuto12CV=12 CV -ExpAuto3PCV=3 CV and more -ExpAuto4PCV=4 CV and more -ExpAuto5PCV=5 CV and more -ExpAuto6PCV=6 CV and more -ExpAuto7PCV=7 CV and more -ExpAuto8PCV=8 CV and more -ExpAuto9PCV=9 CV and more -ExpAuto10PCV=10 CV and more -ExpAuto11PCV=11 CV and more -ExpAuto12PCV=12 CV and more -ExpAuto13PCV=13 CV and more -ExpCyclo=Capacity lower to 50cm3 -ExpMoto12CV=Motorbike 1 or 2 CV -ExpMoto345CV=Motorbike 3, 4 or 5 CV -ExpMoto5PCV=Motorbike 5 CV and more +ExpAuto3PCV=3 CV e ​​mais +ExpAuto4PCV=4 CV e mais +ExpAuto5PCV=5 CV e mais +ExpAuto6PCV=6 CV e mais +ExpAuto7PCV=7 CV e mais +ExpAuto8PCV=8 CV e mais +ExpAuto9PCV=9 CV e mais +ExpAuto10PCV=10 CV e mais +ExpAuto11PCV=11 CV e mais +ExpAuto12PCV=12 CV e mais +ExpAuto13PCV=13 CV e mais +ExpCyclo=Capacidade inferior a 50cm3 +ExpMoto12CV=Motocicleta 1 ou 2 CV +ExpMoto345CV=Motos 3, 4 ou 5 CV +ExpMoto5PCV=Motos 5 CV e mais diff --git a/htdocs/langs/gl_ES/donations.lang b/htdocs/langs/gl_ES/donations.lang index bbd6c5304e4..c6aedceba3e 100644 --- a/htdocs/langs/gl_ES/donations.lang +++ b/htdocs/langs/gl_ES/donations.lang @@ -28,7 +28,7 @@ MinimumAmount=O importe mínimo é %s FreeTextOnDonations=Texto libre a amosar ao pé de páxina FrenchOptions=Opcións para Franza DONATION_ART200=Amosar artigo 200 do CGI se está interesado -DONATION_ART238=Amosar artigo 238 do CGI sse está interesado +DONATION_ART238=Amosar artigo 238 do CGI se está interesado DONATION_ART885=Amosar artigo 885 do CGI se está interesado DonationPayment=Pago de doación/subvención DonationValidated=Doación/Subvención %s validada diff --git a/htdocs/langs/gl_ES/ecm.lang b/htdocs/langs/gl_ES/ecm.lang index 2e15d51902e..348394f591b 100644 --- a/htdocs/langs/gl_ES/ecm.lang +++ b/htdocs/langs/gl_ES/ecm.lang @@ -1,52 +1,52 @@ # Dolibarr language file - Source file is en_US - ecm -ECMNbOfDocs=No. of documents in directory +ECMNbOfDocs=Nº de documentos no directorio ECMSection=Directorio -ECMSectionManual=Manual directory -ECMSectionAuto=Automatic directory -ECMSectionsManual=Manual tree -ECMSectionsAuto=Automatic tree -ECMSections=Directories -ECMRoot=ECM Root -ECMNewSection=New directory -ECMAddSection=Add directory +ECMSectionManual=Directorio manual +ECMSectionAuto=Directorio automático +ECMSectionsManual=Árbore manual +ECMSectionsAuto=Árbore automática +ECMSections=Directorios +ECMRoot=ECM Raiz +ECMNewSection=Novo directorio +ECMAddSection=Engadir directorio ECMCreationDate=Data de creación -ECMNbOfFilesInDir=Number of files in directory -ECMNbOfSubDir=Number of sub-directories -ECMNbOfFilesInSubDir=Number of files in sub-directories -ECMCreationUser=Creator -ECMArea=DMS/ECM area +ECMNbOfFilesInDir=Número de ficheiros no directorio +ECMNbOfSubDir=Número de sub-directories +ECMNbOfFilesInSubDir=Número de ficheiros en sub-directories +ECMCreationUser=Creador +ECMArea=Área MS/ECM ECMAreaDesc=The DMS/ECM (Document Management System / Electronic Content Management) area allows you to save, share and search quickly all kind of documents in Dolibarr. -ECMAreaDesc2=* Automatic directories are filled automatically when adding documents from card of an element.
    * Manual directories can be used to save documents not linked to a particular element. -ECMSectionWasRemoved=Directory %s has been deleted. -ECMSectionWasCreated=Directory %s has been created. -ECMSearchByKeywords=Search by keywords -ECMSearchByEntity=Search by object -ECMSectionOfDocuments=Directories of documents -ECMTypeAuto=Automatic -ECMDocsBySocialContributions=Documents linked to social or fiscal taxes -ECMDocsByThirdParties=Documents linked to third parties -ECMDocsByProposals=Documents linked to proposals -ECMDocsByOrders=Documents linked to customers orders -ECMDocsByContracts=Documents linked to contracts -ECMDocsByInvoices=Documents linked to customers invoices -ECMDocsByProducts=Documents linked to products -ECMDocsByProjects=Documents linked to projects -ECMDocsByUsers=Documents linked to users -ECMDocsByInterventions=Documents linked to interventions -ECMDocsByExpenseReports=Documents linked to expense reports -ECMDocsByHolidays=Documents linked to holidays -ECMDocsBySupplierProposals=Documents linked to vendor proposals -ECMNoDirectoryYet=No directory created -ShowECMSection=Show directory -DeleteSection=Remove directory -ConfirmDeleteSection=Can you confirm you want to delete the directory %s? -ECMDirectoryForFiles=Relative directory for files -CannotRemoveDirectoryContainsFilesOrDirs=Removal not possible because it contains some files or sub-directories -CannotRemoveDirectoryContainsFiles=Removal not possible because it contains some files -ECMFileManager=File manager -ECMSelectASection=Select a directory in the tree... -DirNotSynchronizedSyncFirst=This directory seems to be created or modified outside ECM module. You must click on "Resync" button first to synchronize disk and database to get content of this directory. -ReSyncListOfDir=Resync list of directories -HashOfFileContent=Hash of file content -NoDirectoriesFound=No directories found -FileNotYetIndexedInDatabase=File not yet indexed into database (try to re-upload it) +ECMAreaDesc2=Pode crear directorios manuais e axuntar os documentos
    Os directorios automáticos son cobertos automáticamente ao engadir un documento nunha ficha. +ECMSectionWasRemoved=O directorio %s foi eliminado +ECMSectionWasCreated=O directorio %s foi creado. +ECMSearchByKeywords=Buscar por palabras clave +ECMSearchByEntity=Buscar por obxecto +ECMSectionOfDocuments=Directorios de documentos +ECMTypeAuto=Automático +ECMDocsBySocialContributions=Documentos ligados a taxas sociais ou fiscais +ECMDocsByThirdParties=Documentos ligados a terceiros +ECMDocsByProposals=Documentos ligados a orzamentos +ECMDocsByOrders=Documentos ligados a pedimentos +ECMDocsByContracts=Documentos ligados a contratos +ECMDocsByInvoices=Documentos ligados a facturas +ECMDocsByProducts=Documentos ligados a produtos +ECMDocsByProjects=Documentos ligados a proxectos +ECMDocsByUsers=Documentos ligados a usuarios +ECMDocsByInterventions=Documentos ligados a intervencións +ECMDocsByExpenseReports=Documentos ligados a informes de gastos +ECMDocsByHolidays=Documentos ligados a días libres +ECMDocsBySupplierProposals=Documentos ligados a orzamentos de provedores. +ECMNoDirectoryYet=Non foi creado o directorio +ShowECMSection=Amosar directorio +DeleteSection=Eliminación directorio +ConfirmDeleteSection=¿Está certo de querer eliminar o directorio %s? +ECMDirectoryForFiles=Directorio relativo para ficheiros +CannotRemoveDirectoryContainsFilesOrDirs=Non pode ser eliminado porque contén ficheiros o subdirectorios +CannotRemoveDirectoryContainsFiles=Non pode ser eliminado porque contén ficheiros +ECMFileManager=Explorador de ficheiros +ECMSelectASection=Seleccione un directorio na árbore da esquerda +DirNotSynchronizedSyncFirst=Este directorio foi creado ou modificado fora do módulo GED. Faga clic no botón "Actualizar" para resincronizar a información do disco e a base de datos para ver o contido dese directorio. +ReSyncListOfDir=Resincronizar a listaxe de directorios +HashOfFileContent=Hash do contido do ficheiro +NoDirectoriesFound=Non foron atopados directorios +FileNotYetIndexedInDatabase=Ficheiro aínda non indexado na base de datos (tente voltar cargalo) diff --git a/htdocs/langs/gl_ES/errors.lang b/htdocs/langs/gl_ES/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/gl_ES/errors.lang +++ b/htdocs/langs/gl_ES/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/gl_ES/exports.lang b/htdocs/langs/gl_ES/exports.lang index daade90a704..52343e63453 100644 --- a/htdocs/langs/gl_ES/exports.lang +++ b/htdocs/langs/gl_ES/exports.lang @@ -1,135 +1,135 @@ # Dolibarr language file - Source file is en_US - exports -ExportsArea=Exportacións -ImportArea=Import -NewExport=New Export -NewImport=New Import -ExportableDatas=Exportable dataset -ImportableDatas=Importable dataset -SelectExportDataSet=Choose dataset you want to export... -SelectImportDataSet=Choose dataset you want to import... -SelectExportFields=Choose the fields you want to export, or select a predefined export profile -SelectImportFields=Choose the source file fields you want to import and their target field in database by moving them up and down with anchor %s, or select a predefined import profile: -NotImportedFields=Fields of source file not imported -SaveExportModel=Save your selections as an export profile/template (for reuse). -SaveImportModel=Save this import profile (for reuse) ... -ExportModelName=Export profile name -ExportModelSaved=Export profile saved as %s. -ExportableFields=Exportable fields -ExportedFields=Exported fields -ImportModelName=Import profile name -ImportModelSaved=Import profile saved as %s. -DatasetToExport=Dataset to export -DatasetToImport=Import file into dataset -ChooseFieldsOrdersAndTitle=Choose fields order... -FieldsTitle=Fields title -FieldTitle=Field title -NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... -AvailableFormats=Available Formats +ExportsArea=Área exportación +ImportArea=Área importación +NewExport=Nova exportación +NewImport=Nova importación +ExportableDatas=Conxunto de datos exportables +ImportableDatas=Conxunto de datos importables +SelectExportDataSet=Escolla un conxunto predefinido de datos que desexe exportar... +SelectImportDataSet=Escolla un lote de datos predefinidos que desexe importar... +SelectExportFields=Escolla os campos que deben exportarse, ou escolla un perfil de exportación predefinido +SelectImportFields=Escolla os campos do ficheiro que desexa importar e os seus campos de destino na base de datos movendoos enriba e abaixo co ancla %s, ou seleccione un perfil de importación predefinido. +NotImportedFields=Campos do ficheiro orixe non importados +SaveExportModel=Gardar este perfil de exportación se desexa reutilizalo posteriormente... +SaveImportModel=Garde este perfil de importación se desexa reutilizalo de novo posteriormente... +ExportModelName=Nome do perfil de exportación +ExportModelSaved=Perfil de exportación gardado co nome de %s. +ExportableFields=Campos exportables +ExportedFields=Campos a exportar +ImportModelName=Nome do perfil de importación +ImportModelSaved=Perfil de importación gardado baixo o nome %s. +DatasetToExport=Conxunto de datos a exportar +DatasetToImport=Lote de datos a importar +ChooseFieldsOrdersAndTitle=Escolla a orde dos campos... +FieldsTitle=Título campos +FieldTitle=Título campo +NowClickToGenerateToBuildExportFile=Agora, seleccione o formato de exportación da lista despregable e faga clic en "Xerar" para xerar o ficheiro de exportación... +AvailableFormats=Formatos dispoñibles LibraryShort=Librería ExportCsvSeparator=Csv caracter separator ImportCsvSeparator=Csv caracter separator -Step=Step -FormatedImport=Import Assistant -FormatedImportDesc1=This module allows you to update existing data or add new objects into the database from a file without technical knowledge, using an assistant. -FormatedImportDesc2=First step is to choose the kind of data you want to import, then the format of the source file, then the fields you want to import. -FormatedExport=Export Assistant -FormatedExportDesc1=These tools allow the export of personalized data using an assistant, to help you in the process without requiring technical knowledge. -FormatedExportDesc2=First step is to choose a predefined dataset, then which fields you want to export, and in which order. -FormatedExportDesc3=When data to export are selected, you can choose the format of the output file. -Sheet=Sheet -NoImportableData=No importable data (no module with definitions to allow data imports) -FileSuccessfullyBuilt=File generated -SQLUsedForExport=SQL Request used to extract data -LineId=Id of line -LineLabel=Label of line +Step=Paso +FormatedImport=Asistente de importación +FormatedImportDesc1=Esta área permitelle realizar importacións persoalizadas de datos mediante un axudante que evita ter coñecementos técnicos de Dolibarr. +FormatedImportDesc2=O primeiro paso consiste na escolla do tipo de dato que debe importarse, despois o ficheiro e a continuación escoller os campos que desexa importar. +FormatedExport=Asistente de exportación +FormatedExportDesc1=Esta área permitell realizar exportacións persoalizadas dos datos mediante un axudante que evita ter coñecementos técnicos de Dolibarr. +FormatedExportDesc2=O primeiro paso consiste na escolla dun dos conxuntos de datos predefinidos, despois escoller os campos que quere exportar ao ficheiro e en que orde. +FormatedExportDesc3=Unha vez seleccionados os datos, é posible escoller o formato do ficheiro de exportación xerado. +Sheet=Folla +NoImportableData=Sen taboas de datos importables (ningún módulo coas definicións dos perfiles de importación está activo) +FileSuccessfullyBuilt=Ficheiro xerado +SQLUsedForExport=Consulta SQL utilizada para construir o ficheiro de exportación +LineId=ID de liña +LineLabel=Etiqueta de liña LineDescription=Descrición de liña -LineUnitPrice=Unit price of line -LineVATRate=VAT Rate of line -LineQty=Quantity for line -LineTotalHT=Amount excl. tax for line -LineTotalTTC=Amount with tax for line -LineTotalVAT=Amount of VAT for line -TypeOfLineServiceOrProduct=Type of line (0=product, 1=service) -FileWithDataToImport=File with data to import -FileToImport=Source file to import -FileMustHaveOneOfFollowingFormat=File to import must have one of following formats -DownloadEmptyExample=Download template file with field content information (* are mandatory fields) -ChooseFormatOfFileToImport=Choose the file format to use as import file format by clicking on the %s icon to select it... -ChooseFileToImport=Upload file then click on the %s icon to select file as source import file... -SourceFileFormat=Source file format -FieldsInSourceFile=Fields in source file -FieldsInTargetDatabase=Target fields in Dolibarr database (bold=mandatory) +LineUnitPrice=Prezo unitario da liña +LineVATRate=Tipo de IVE da liña +LineQty=Cantidade da liña +LineTotalHT=Importe sen IVE da liña +LineTotalTTC=Importe total da liña +LineTotalVAT=Importe IVE da liña +TypeOfLineServiceOrProduct=Tipo de liña (0=producto, 1=servizo) +FileWithDataToImport=Ficheiro cos datos a importar +FileToImport=Ficheiro orixe a importar +FileMustHaveOneOfFollowingFormat=O ficheiro de importación debe conter un dos seguintes formatos +DownloadEmptyExample=Descargar ficheiro de exemplo baleiro +ChooseFormatOfFileToImport=Escolla o formato de ficheiro que desexa importar facendo click na imaxe %s para seleccionalo... +ChooseFileToImport=Escolla o ficheiro de importación e faga clic na imaxe %s para seleccionalo como ficheiro orixe de importación... +SourceFileFormat=Formato do ficheiro orixe +FieldsInSourceFile=Campos no ficheiro orixe +FieldsInTargetDatabase=Campos destino na base de datos Dolibarr (*=obrigatorio) Field=Campo -NoFields=No fields -MoveField=Move field column number %s -ExampleOfImportFile=Example_of_import_file -SaveImportProfile=Save this import profile -ErrorImportDuplicateProfil=Failed to save this import profile with this name. An existing profile already exists with this name. -TablesTarget=Targeted tables -FieldsTarget=Targeted fields -FieldTarget=Targeted field -FieldSource=Source field -NbOfSourceLines=Number of lines in source file -NowClickToTestTheImport=Check that the file format (field and string delimiters) of your file matches the options shown and that you have omitted the header line, or these will be flagged as errors in the following simulation.
    Click on the "%s" button to run a check of the file structure/contents and simulate the import process.
    No data will be changed in your database. -RunSimulateImportFile=Run Import Simulation -FieldNeedSource=This field requires data from the source file -SomeMandatoryFieldHaveNoSource=Some mandatory fields have no source from data file -InformationOnSourceFile=Information on source file -InformationOnTargetTables=Information on target fields -SelectAtLeastOneField=Switch at least one source field in the column of fields to export -SelectFormat=Choose this import file format -RunImportFile=Import Data -NowClickToRunTheImport=Check the results of the import simulation. Correct any errors and re-test.
    When the simulation reports no errors you may proceed to import the data into the database. -DataLoadedWithId=The imported data will have an additional field in each database table with this import id: %s, to allow it to be searchable in the case of investigating a problem related to this import. -ErrorMissingMandatoryValue=Mandatory data is empty in the source file for field %s. -TooMuchErrors=There are still %s other source lines with errors but output has been limited. -TooMuchWarnings=There are still %s other source lines with warnings but output has been limited. -EmptyLine=Empty line (will be discarded) -CorrectErrorBeforeRunningImport=You must correct all errors before running the definitive import. -FileWasImported=File was imported with number %s. -YouCanUseImportIdToFindRecord=You can find all the imported records in your database by filtering on field import_key='%s'. -NbOfLinesOK=Number of lines with no errors and no warnings: %s. -NbOfLinesImported=Number of lines successfully imported: %s. -DataComeFromNoWhere=Value to insert comes from nowhere in source file. -DataComeFromFileFieldNb=Value to insert comes from field number %s in source file. +NoFields=Ningún campo +MoveField=Mover campo columna número %s +ExampleOfImportFile=Exemplo_de_ficheiro_importación +SaveImportProfile=Gardar este perfil de importación +ErrorImportDuplicateProfil=Non pódese gardar o perfil de importación baixo este nome. Xa existe un perfil con ese nome. +TablesTarget=Táboas de destino +FieldsTarget=Campos de destino +FieldTarget=Campo destino +FieldSource=Campo orixe +NbOfSourceLines=Número de liñas do ficheiro fonte +NowClickToTestTheImport=Compruebe los parámetros de importación establecidos. Si está de acuerdo, haga clic en el botón "%s" para ejecutar una simulación de importación (ningún dato será modificado, inicialmente sólo será una simulación)... +RunSimulateImportFile=Executar a simulación de importación +FieldNeedSource=Este campo require datos dende o ficheiro orixe +SomeMandatoryFieldHaveNoSource=Algúns campos obrigatorios non teñen campo fonte no ficheiro de orixe +InformationOnSourceFile=Información do ficheiro orixe +InformationOnTargetTables=Información sobre os campos de destino +SelectAtLeastOneField=Bascular alo menos un campo orixe na columna de campos a exportar +SelectFormat=Seleccione este formato de ficheiro de importación +RunImportFile=Lanzar a importación +NowClickToRunTheImport=Comprobe os resultados da simulación. Se todo foi bien, inicie a importación definitiva. +DataLoadedWithId=Todos os datos foron cargados co seguinte id de importación: %s +ErrorMissingMandatoryValue=Dato obrigatorio no indicado no ficheiro fonte, campo número %s. +TooMuchErrors=Ainda existen %s liñas con erro, pero sa súa visualización foi limitada. +TooMuchWarnings=Aínda existen %s liñas con warnings, pero a súa visualización foi limitada. +EmptyLine=Liña en branco +CorrectErrorBeforeRunningImport=Debe corrixir todos os erros antes de iniciar a importación definitiva. +FileWasImported=O ficheiro foi importado co número de importación %s. +YouCanUseImportIdToFindRecord=Pode atopar os rexistros desta importación na súa base de datos filtrando o campo import_key='%s'. +NbOfLinesOK=Número de liñas sen erros nin warnings: %s. +NbOfLinesImported=Número de liñas correctamente importadas: %s. +DataComeFromNoWhere=O valor a insertar non corresponde a ningún campo do ficheiro orixe. +DataComeFromFileFieldNb=O valor a insertar correspondese ao campo número %s do ficheiro orixe. DataComeFromIdFoundFromRef=Value that comes from field number %s of source file will be used to find the id of the parent object to use (so the object %s that has the ref. from source file must exist in the database). DataComeFromIdFoundFromCodeId=Code that comes from field number %s of source file will be used to find the id of the parent object to use (so the code from source file must exist in the dictionary %s). Note that if you know the id, you can also use it in the source file instead of the code. Import should work in both cases. DataIsInsertedInto=Data coming from source file will be inserted into the following field: DataIDSourceIsInsertedInto=The id of parent object was found using the data in the source file, will be inserted into the following field: DataCodeIDSourceIsInsertedInto=The id of parent line found from code, will be inserted into following field: -SourceRequired=Data value is mandatory -SourceExample=Example of possible data value -ExampleAnyRefFoundIntoElement=Any ref found for element %s -ExampleAnyCodeOrIdFoundIntoDictionary=Any code (or id) found into dictionary %s -CSVFormatDesc=Comma Separated Value file format (.csv).
    This is a text file format where fields are separated by a separator [ %s ]. If separator is found inside a field content, field is rounded by round character [ %s ]. Escape character to escape round character is [ %s ]. -Excel95FormatDesc=Excel file format (.xls)
    This is the native Excel 95 format (BIFF5). -Excel2007FormatDesc=Excel file format (.xlsx)
    This is the native Excel 2007 format (SpreadsheetML). -TsvFormatDesc=Tab Separated Value file format (.tsv)
    This is a text file format where fields are separated by a tabulator [tab]. -ExportFieldAutomaticallyAdded=Field %s was automatically added. It will avoid you to have similar lines to be treated as duplicate record (with this field added, all lines will own their own id and will differ). -CsvOptions=CSV format options -Separator=Field Separator -Enclosure=String Delimiter -SpecialCode=Special code -ExportStringFilter=%% allows replacing one or more characters in the text -ExportDateFilter=YYYY, YYYYMM, YYYYMMDD: filters by one year/month/day
    YYYY+YYYY, YYYYMM+YYYYMM, YYYYMMDD+YYYYMMDD: filters over a range of years/months/days
    > YYYY, > YYYYMM, > YYYYMMDD: filters on all following years/months/days
    < YYYY, < YYYYMM, < YYYYMMDD: filters on all previous years/months/days -ExportNumericFilter=NNNNN filters by one value
    NNNNN+NNNNN filters over a range of values
    < NNNNN filters by lower values
    > NNNNN filters by higher values -ImportFromLine=Import starting from line number -EndAtLineNb=End at line number -ImportFromToLine=Limit range (From - To). Eg. to omit header line(s). -SetThisValueTo2ToExcludeFirstLine=For example, set this value to 3 to exclude the 2 first lines.
    If the header lines are NOT omitted, this will result in multiple errors in the Import Simulation. -KeepEmptyToGoToEndOfFile=Keep this field empty to process all lines to the end of the file. -SelectPrimaryColumnsForUpdateAttempt=Select column(s) to use as primary key for an UPDATE import -UpdateNotYetSupportedForThisImport=Update is not supported for this type of import (only insert) -NoUpdateAttempt=No update attempt was performed, only insert -ImportDataset_user_1=Users (employees or not) and properties -ComputedField=Computed field +SourceRequired=Datos de orixe obligatorios +SourceExample=Ejemplo de datos de orixe posibles +ExampleAnyRefFoundIntoElement=Todas as referencias atopadas para os elementos %s +ExampleAnyCodeOrIdFoundIntoDictionary=Calquera código (ou identificador) atopado no diccionario %s +CSVFormatDesc=Ficheiro con formato Valores separados por coma (.csv).
    Es un fichero con formato de texto en el que los campos son separados por el carácter [ %s ]. Si el separador se encuentra en el contenido de un campo, El campo debe de estar acotado por el carácter [ %s ]. El carácter de escape para incluir un carácter de entorno en un dato es [ %s ]. +Excel95FormatDesc=Ficheiro con formato Excel (.xls)
    Este é o formato nativo de Excel 95 (BIFF5). +Excel2007FormatDesc=Ficheiro con formato Excel (.xlsx)
    Este é o formato nativo de Excel 2007 (SpreadsheetML). +TsvFormatDesc=Ficheiro con formato Valores separados por tabulador (.tsv)
    Este é un formato de ficheiro de texto no que os campos son separados por un tabulador [tab]. +ExportFieldAutomaticallyAdded=Engadido automáticamente o campo %s, xa que evitará que liñas idénticas sexan consideradas como duplicadas (con este campo, cada liña terá un id propio). +CsvOptions=Opcións do ficheiro CSV +Separator=Separador +Enclosure=Delimitador de campos +SpecialCode=Código especial +ExportStringFilter=%% permite reemplazar un ou mais carácteres no texto +ExportDateFilter=YYYY, YYYYMM, YYYYMMDD : filtros por un ano/mes/día
    YYYY+YYYY, YYYYMM+YYYYMM, YYYYMMDD+YYYYMMDD : filtros entre un rango de anos/meses/días
    > YYYY, > YYYYMM, > YYYYMMDD : filtros en todos os anos/meses/días seguintes
    < YYYY, < YYYYMM, < YYYYMMDD : filtros en todos os anos/meses/días previos +ExportNumericFilter=NNNNN filtros por un valor
    NNNNN+NNNNN filtros por un rango de valores
    < NNNNN filtros por valores baixos
    > NNNNN filtros por valores altos +ImportFromLine=Comezar a importación dende a liña nº +EndAtLineNb=Terminar na liña nº +ImportFromToLine=Importar números de liña (de - a) +SetThisValueTo2ToExcludeFirstLine=Por exemplo, indicar 3 para excluir as dúas primeras liñas +KeepEmptyToGoToEndOfFile=Deixar este campo baleiro para chegar ao final do ficheiro +SelectPrimaryColumnsForUpdateAttempt=Seleccionar columna(s) para usar como clave principal no intento de actualización +UpdateNotYetSupportedForThisImport=A actualización non é compatible con este tipo de importación (só inserciones) +NoUpdateAttempt=Non foi realizado ningún intento de actualización, só insercións +ImportDataset_user_1=Usuarios (empregados ou non) e as súas propiedades +ComputedField=Campo combinado ## filters -SelectFilterFields=If you want to filter on some values, just input values here. -FilteredFields=Filtered fields -FilteredFieldsValues=Value for filter -FormatControlRule=Format control rule +SelectFilterFields=Se quere aplicar un filtro sobre algúns valores, introdúzaos aquí. +FilteredFields=Campos filtrados +FilteredFieldsValues=Valores de filtros +FormatControlRule=Regra formato de control ## imports updates -KeysToUseForUpdates=Key (column) to use for updating existing data -NbInsert=Number of inserted lines: %s -NbUpdate=Number of updated lines: %s -MultipleRecordFoundWithTheseFilters=Multiple records have been found with these filters: %s +KeysToUseForUpdates=Clave a usar para actualizar datos +NbInsert=Número de liñas engadidas: %s +NbUpdate=Número de liñas actualizadas: %s +MultipleRecordFoundWithTheseFilters=Atopáronse varios rexistros con estes filtros: %s diff --git a/htdocs/langs/gl_ES/externalsite.lang b/htdocs/langs/gl_ES/externalsite.lang index 38e8a11823b..2f4b06c67ed 100644 --- a/htdocs/langs/gl_ES/externalsite.lang +++ b/htdocs/langs/gl_ES/externalsite.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - externalsite -ExternalSiteSetup=Configuración do enlace ao sitio web externo +ExternalSiteSetup=Configuración da ligazón ao sitio web externo ExternalSiteURL=URL do sitio web externo ExternalSiteModuleNotComplete=O módulo do sitio externo non foi configurado correctamente. ExampleMyMenuEntry=O meu menú de entrada diff --git a/htdocs/langs/gl_ES/ftp.lang b/htdocs/langs/gl_ES/ftp.lang index d80b87c2715..a31e113a6bb 100644 --- a/htdocs/langs/gl_ES/ftp.lang +++ b/htdocs/langs/gl_ES/ftp.lang @@ -1,14 +1,14 @@ # Dolibarr language file - Source file is en_US - ftp -FTPClientSetup=FTP Client module setup -NewFTPClient=New FTP connection setup -FTPArea=FTP Area -FTPAreaDesc=This screen shows a view of an FTP server. -SetupOfFTPClientModuleNotComplete=The setup of the FTP client module seems to be incomplete -FTPFeatureNotSupportedByYourPHP=Your PHP does not support FTP functions -FailedToConnectToFTPServer=Failed to connect to FTP server (server %s, port %s) -FailedToConnectToFTPServerWithCredentials=Failed to login to FTP server with defined login/password -FTPFailedToRemoveFile=Failed to remove file %s. -FTPFailedToRemoveDir=Failed to remove directory %s: check permissions and that the directory is empty. -FTPPassiveMode=Passive mode -ChooseAFTPEntryIntoMenu=Choose a FTP site from the menu... -FailedToGetFile=Failed to get files %s +FTPClientSetup=Configuración do módulo cliente FTP +NewFTPClient=Nova configuracións cliente FTP +FTPArea=Área FTP +FTPAreaDesc=Esta pantalla amosa unha vista de servidor FTP +SetupOfFTPClientModuleNotComplete=A configuración do módulo de cliente FTP parece incompleta +FTPFeatureNotSupportedByYourPHP=O seu PHP no soporta as funcións FTP +FailedToConnectToFTPServer=Non foi posible conectar co servidor FTP (servidor: %s, porto %s) +FailedToConnectToFTPServerWithCredentials=Non foi posible entrar co usuario/contrasinal FTP configurados +FTPFailedToRemoveFile=Non foi posible eliminar o ficheiro %s. +FTPFailedToRemoveDir=Non foi posible eliminar o directorio %s (Comprobe os permisos e que o directorio está baleiro). +FTPPassiveMode=Modo pasivo +ChooseAFTPEntryIntoMenu=Escolla un sitio FTP no menú ... +FailedToGetFile=Non foi posible acadar os ficheiros %s diff --git a/htdocs/langs/gl_ES/help.lang b/htdocs/langs/gl_ES/help.lang index 7b6c242b896..cc0ba0fd7df 100644 --- a/htdocs/langs/gl_ES/help.lang +++ b/htdocs/langs/gl_ES/help.lang @@ -1,23 +1,23 @@ # Dolibarr language file - Source file is en_US - help -CommunitySupport=Forum/Wiki support -EMailSupport=Emails support -RemoteControlSupport=Online real-time / remote support -OtherSupport=Other support -ToSeeListOfAvailableRessources=To contact/see available resources: -HelpCenter=Help Center -DolibarrHelpCenter=Dolibarr Help and Support Center -ToGoBackToDolibarr=Otherwise, click here to continue to use Dolibarr. -TypeOfSupport=Type of support -TypeSupportCommunauty=Community (free) +CommunitySupport=Asistencia Forums e Wiki +EMailSupport=Asistencia E-Mail +RemoteControlSupport=Asistencia por soporte externo +OtherSupport=Outros tipos de asistencia +ToSeeListOfAvailableRessources=Contactar/ver recursos dispoñibles: +HelpCenter=Centro de soporte +DolibarrHelpCenter=Centro de soporte e axuda Dolibarr +ToGoBackToDolibarr=Do contrario, faga clic aquí para continuar usando Dolibarr. +TypeOfSupport=Tipo de soporte +TypeSupportCommunauty=Comunitario (gratuito) TypeSupportCommercial=Comercial TypeOfHelp=Tipo -NeedHelpCenter=Need help or support? -Efficiency=Efficiency -TypeHelpOnly=Help only -TypeHelpDev=Help+Development -TypeHelpDevForm=Help+Development+Training -BackToHelpCenter=Otherwise, go back to Help center home page. -LinkToGoldMember=You can call one of the trainers preselected by Dolibarr for your language (%s) by clicking their Widget (status and maximum price are automatically updated): -PossibleLanguages=Supported languages -SubscribeToFoundation=Help the Dolibarr project, subscribe to the foundation -SeeOfficalSupport=For official Dolibarr support in your language:
    %s +NeedHelpCenter=¿Precisa axuda ou soporte? +Efficiency=Eficacia +TypeHelpOnly=Só axuda +TypeHelpDev=Axuda+Desenvolvemento +TypeHelpDevForm=Axuda+Desenvolvemento+Formación +BackToHelpCenter=Do contrario, volte á páxina de inicio do Centro de axuda. +LinkToGoldMember=Pode chamar a un dos formadores preseleccionados por Dolibarr para o seu idioma (%s) facendo clic no seu Widget (o estado e o prezo máximo actualízanse automáticamente): +PossibleLanguages=Idiomas dispoñibles +SubscribeToFoundation=Axude ao proxecto Dolibarr, subscríbase á asociación Dolibarr +SeeOfficalSupport=Para obter soporte oficial Dolibarr no seu idioma:
    %s diff --git a/htdocs/langs/gl_ES/hrm.lang b/htdocs/langs/gl_ES/hrm.lang index 2ea2d9367d8..cb095d64e0d 100644 --- a/htdocs/langs/gl_ES/hrm.lang +++ b/htdocs/langs/gl_ES/hrm.lang @@ -14,5 +14,5 @@ DictionaryDepartment=HRM - Department list DictionaryFunction=HRM - Job positions # Module Employees=Empregados -Employee=Employee +Employee=Empregado NewEmployee=New employee diff --git a/htdocs/langs/gl_ES/languages.lang b/htdocs/langs/gl_ES/languages.lang index 2bee3acad18..762cecb554f 100644 --- a/htdocs/langs/gl_ES/languages.lang +++ b/htdocs/langs/gl_ES/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Árabe Language_ar_EG=Arabic (Egypt) Language_ar_SA=Árabe +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Búlgaro Language_bs_BA=Bosnio Language_ca_ES=Catalán @@ -20,6 +23,7 @@ Language_en_GB=Inglés (Reino Unido) Language_en_IN=Inglés (India) Language_en_NZ=Inglés (Nova Celandia) Language_en_SA=Inglés (Arabia Saudita) +Language_en_SG=English (Singapore) Language_en_US=Inglés (Estados Unidos) Language_en_ZA=Inglés (Sudáfrica) Language_es_ES=Español @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Español (Honduras) Language_es_MX=Español (México) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Español (Paraguay) Language_es_PE=Español (Perú) Language_es_PR=Español (Porto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estoniano Language_eu_ES=Éuscaro @@ -44,26 +50,34 @@ Language_fi_FI=Finnish Language_fr_BE=Francés (Bélxica) Language_fr_CA=Francés (Canadá) Language_fr_CH=Francés (Suíza) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francés +Language_fr_GA=French (Gabon) Language_fr_NC=Francés (Nova Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebreo +Language_hi_IN=Hindi (India) Language_hr_HR=Croata Language_hu_HU=Húngaro Language_id_ID=Indonesian Language_is_IS=Islandés Language_it_IT=Italiano +Language_it_CH=Italian (Switzerland) Language_ja_JP=Xaponés Language_ka_GE=Georgian Language_km_KH=Khmer Language_kn_IN=Kannada Language_ko_KR=Coreano -Language_lo_LA=Lao +Language_lo_LA=Laos Language_lt_LT=Lituano Language_lv_LV=Letón Language_mk_MK=Macedonio Language_mn_MN=Mongolian Language_nb_NO=Noruegués (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Holandés (Bélxica) Language_nl_NL=Dutch Language_pl_PL=Polaco @@ -86,4 +100,5 @@ Language_uz_UZ=Usbeco Language_vi_VN=Vietnamita Language_zh_CN=Chinés Language_zh_TW=Chinés (tradicional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/gl_ES/ldap.lang b/htdocs/langs/gl_ES/ldap.lang index 2afb9618134..7957050d002 100644 --- a/htdocs/langs/gl_ES/ldap.lang +++ b/htdocs/langs/gl_ES/ldap.lang @@ -13,7 +13,7 @@ LDAPUsers=Users in LDAP database LDAPFieldStatus=Estado LDAPFieldFirstSubscriptionDate=First subscription date LDAPFieldFirstSubscriptionAmount=First subscription amount -LDAPFieldLastSubscriptionDate=Latest subscription date +LDAPFieldLastSubscriptionDate=Data da última cotización LDAPFieldLastSubscriptionAmount=Latest subscription amount LDAPFieldSkype=Skype id LDAPFieldSkypeExample=Example: skypeName diff --git a/htdocs/langs/gl_ES/loan.lang b/htdocs/langs/gl_ES/loan.lang index 36410b17bc2..5f3de7a9ab7 100644 --- a/htdocs/langs/gl_ES/loan.lang +++ b/htdocs/langs/gl_ES/loan.lang @@ -1,34 +1,34 @@ # Dolibarr language file - Source file is en_US - loan -Loan=Loan -Loans=Crédito -NewLoan=New Loan -ShowLoan=Show Loan -PaymentLoan=Loan payment -LoanPayment=Loan payment -ShowLoanPayment=Show Loan Payment +Loan=Empréstito +Loans=Empréstitos +NewLoan=Novo empréstito +ShowLoan=Ver empréstito +PaymentLoan=Pago de empréstito +LoanPayment=Pago do empréstito +ShowLoanPayment=Consultar pago de empréstito LoanCapital=Capital -Insurance=Insurance -Interest=Interest -Nbterms=Number of terms -Term=Term -LoanAccountancyCapitalCode=Accounting account capital -LoanAccountancyInsuranceCode=Accounting account insurance -LoanAccountancyInterestCode=Accounting account interest -ConfirmDeleteLoan=Confirm deleting this loan -LoanDeleted=Loan Deleted Successfully -ConfirmPayLoan=Confirm classify paid this loan -LoanPaid=Loan Paid -ListLoanAssociatedProject=List of loan associated with the project -AddLoan=Create loan -FinancialCommitment=Financial commitment -InterestAmount=Interest -CapitalRemain=Capital remain -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +Insurance=Seguro +Interest=Interese +Nbterms=Número de prazos +Term=Prazo +LoanAccountancyCapitalCode=Conta contable capital +LoanAccountancyInsuranceCode=Conta contable seguro +LoanAccountancyInterestCode=Conta contable interese +ConfirmDeleteLoan=¿Está certo de querer eliminar este empréstito? +LoanDeleted=Empréstito eliminado correctamente +ConfirmPayLoan=¿Esta certo de querer clasificar como pagado este empréstito? +LoanPaid=Empréstito pagado +ListLoanAssociatedProject=Listaxe de empréstitos asociados ao proxecto +AddLoan=Crear empréstito +FinancialCommitment=Compromiso financieiro +InterestAmount=Interese +CapitalRemain=Capital restante +TermPaidAllreadyPaid = Este prazo xa está pago +CantUseScheduleWithLoanStartedToPaid = Non pode usar o planificador para un emprétito con pago iniciado +CantModifyInterestIfScheduleIsUsed = Non pode modificar os intereses se xa está planificado # Admin -ConfigLoan=Configuration of the module loan -LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default -LOAN_ACCOUNTING_ACCOUNT_INTEREST=Accounting account interest by default -LOAN_ACCOUNTING_ACCOUNT_INSURANCE=Accounting account insurance by default -CreateCalcSchedule=Edit financial commitment +ConfigLoan=Configuración do módulo empréstitos +LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Conta contable por defecto para o capital +LOAN_ACCOUNTING_ACCOUNT_INTEREST=Conta contable por defecto para o interese +LOAN_ACCOUNTING_ACCOUNT_INSURANCE=Conta contable por defecto para o seguro +CreateCalcSchedule=Editar o compromiso financieiro diff --git a/htdocs/langs/gl_ES/mails.lang b/htdocs/langs/gl_ES/mails.lang index d05826326fc..f3c5ab840b9 100644 --- a/htdocs/langs/gl_ES/mails.lang +++ b/htdocs/langs/gl_ES/mails.lang @@ -1,37 +1,37 @@ # Dolibarr language file - Source file is en_US - mails -Mailing=EMailing -EMailing=EMailing -EMailings=EMailings -AllEMailings=All eMailings -MailCard=EMailing card -MailRecipients=Recipients -MailRecipient=Recipient +Mailing=Mailing +EMailing=Mailing +EMailings=Mailings +AllEMailings=Todos os Mailings +MailCard=Ficha Mailing +MailRecipients=Destinatarios +MailRecipient=Destinatario MailTitle=Descrición MailFrom=Remitente -MailErrorsTo=Errors to -MailReply=Reply to -MailTo=Receiver(s) -MailToUsers=To user(s) -MailCC=Copy to -MailToCCUsers=Copy to users(s) -MailCCC=Cached copy to -MailTopic=Email topic +MailErrorsTo=Erros a +MailReply=Respostar a +MailTo=Destinatario(s) +MailToUsers=A usuario(s) +MailCC=Copia a +MailToCCUsers=Copia a usuario(s) +MailCCC=Axuntar copia a +MailTopic=Asunto do correo MailText=Mensaxe -MailFile=Attached files -MailMessage=Texto no corpo da mensaxe -SubjectNotIn=Not in Subject -BodyNotIn=Not in Body -ShowEMailing=Show emailing -ListOfEMailings=List of emailings -NewMailing=New emailing -EditMailing=Edit emailing -ResetMailing=Resend emailing -DeleteMailing=Delete emailing -DeleteAMailing=Delete an emailing -PreviewMailing=Preview emailing -CreateMailing=Create emailing -TestMailing=Test email -ValidMailing=Valid emailing +MailFile=Ficheiro +MailMessage=Texto utilizado no corpo da mensaxe +SubjectNotIn=Non no asunto +BodyNotIn=Non no corpo +ShowEMailing=Amosar Mailing +ListOfEMailings=Listaxe de Mailings +NewMailing=Novo Mailing +EditMailing=Editar Mailing +ResetMailing=Novo envío +DeleteMailing=Eliminar Mailing +DeleteAMailing=Eliminar un Mailing +PreviewMailing=Previsualizar un Mailing +CreateMailing=Crear Mailing +TestMailing=Probar Mailing +ValidMailing=Validar Mailing MailingStatusDraft=Borrador MailingStatusValidated=Validado MailingStatusSent=Enviado @@ -39,100 +39,100 @@ MailingStatusSentPartialy=Enviado parcialmente MailingStatusSentCompletely=Envío completado MailingStatusError=Erro MailingStatusNotSent=Non enviado -MailSuccessfulySent=Email (from %s to %s) successfully accepted for delivery -MailingSuccessfullyValidated=EMailing successfully validated -MailUnsubcribe=Unsubscribe -MailingStatusNotContact=Don't contact anymore -MailingStatusReadAndUnsubscribe=Read and unsubscribe -ErrorMailRecipientIsEmpty=Email recipient is empty -WarningNoEMailsAdded=No new Email to add to recipient's list. -ConfirmValidMailing=Are you sure you want to validate this emailing? -ConfirmResetMailing=Warning, by re-initializing emailing %s, you will allow the re-sending this email in a bulk mailing. Are you sure you want to do this? -ConfirmDeleteMailing=Are you sure you want to delete this emailing? -NbOfUniqueEMails=No. of unique emails -NbOfEMails=No. of EMails -TotalNbOfDistinctRecipients=Number of distinct recipients -NoTargetYet=No recipients defined yet (Go on tab 'Recipients') -NoRecipientEmail=No recipient email for %s -RemoveRecipient=Remove recipient -YouCanAddYourOwnPredefindedListHere=To create your email selector module, see htdocs/core/modules/mailings/README. -EMailTestSubstitutionReplacedByGenericValues=When using test mode, substitutions variables are replaced by generic values -MailingAddFile=Attach this file -NoAttachedFiles=No attached files -BadEMail=Bad value for Email -ConfirmCloneEMailing=Are you sure you want to clone this emailing? -CloneContent=Clone message -CloneReceivers=Cloner recipients -DateLastSend=Date of latest sending -DateSending=Date sending -SentTo=Sent to %s -MailingStatusRead=Read -YourMailUnsubcribeOK=The email %s is correctly unsubscribe from mailing list -ActivateCheckReadKey=Key used to encrypt URL used for "Read Receipt" and "Unsubscribe" feature -EMailSentToNRecipients=Email sent to %s recipients. -EMailSentForNElements=Email sent for %s elements. -XTargetsAdded=%s recipients added into target list -OnlyPDFattachmentSupported=If the PDF documents were already generated for the objects to send, they will be attached to email. If not, no email will be sent (also, note that only pdf documents are supported as attachments in mass sending in this version). -AllRecipientSelected=The recipients of the %s record selected (if their email is known). -GroupEmails=Group emails -OneEmailPerRecipient=One email per recipient (by default, one email per record selected) -WarningIfYouCheckOneRecipientPerEmail=Warning, if you check this box, it means only one email will be sent for several different record selected, so, if your message contains substitution variables that refers to data of a record, it becomes not possible to replace them. -ResultOfMailSending=Result of mass Email sending -NbSelected=Number selected -NbIgnored=Number ignored -NbSent=Number sent -SentXXXmessages=%s message(s) sent. -ConfirmUnvalidateEmailing=Are you sure you want to change email %s to draft status? -MailingModuleDescContactsWithThirdpartyFilter=Contact with customer filters -MailingModuleDescContactsByCompanyCategory=Contacts by third-party category -MailingModuleDescContactsByCategory=Contacts by categories -MailingModuleDescContactsByFunction=Contacts by position -MailingModuleDescEmailsFromFile=Emails from file -MailingModuleDescEmailsFromUser=Emails input by user -MailingModuleDescDolibarrUsers=Users with Emails -MailingModuleDescThirdPartiesByCategories=Third parties (by categories) -SendingFromWebInterfaceIsNotAllowed=Sending from web interface is not allowed. +MailSuccessfulySent=E-Mail aceptado para a entrega (de %s a %s) +MailingSuccessfullyValidated=Mailing validado correctamente +MailUnsubcribe=Eliminar suscrición +MailingStatusNotContact=Non contactar +MailingStatusReadAndUnsubscribe=Lido e eliminada suscrición +ErrorMailRecipientIsEmpty=O enderezo do destinatario está baleiro +WarningNoEMailsAdded=Ningún novo Mailing a engadir á listaxe destinatarios. +ConfirmValidMailing=¿Confirma a validación do Mailing? +ConfirmResetMailing=Atención, no reinicio do Mailing %s, autoriza novamente a súa emisión en masa. ¿É isto o que quere facer? +ConfirmDeleteMailing=¿Confirma a eliminación do Mailing? +NbOfUniqueEMails=Nº de mails únicos +NbOfEMails=Nº de mails +TotalNbOfDistinctRecipients=Número de destinatarios únicos +NoTargetYet=Ningún destinatario definido +NoRecipientEmail=Sen mail para %s +RemoveRecipient=Eliminar destinatario +YouCanAddYourOwnPredefindedListHere=Para crear o seu módulo de selección de mails, vexa htdocs/core/modules/mailings/README. +EMailTestSubstitutionReplacedByGenericValues=En modo proba, as variables de sustitución son cambiadas por valores xenéricos +MailingAddFile=Axuntar este ficheiro +NoAttachedFiles=Sen ficheiros +BadEMail=Mail incorrecto +ConfirmCloneEMailing=¿Está certo de querer clonar este mailing? +CloneContent=Clonar mensaxe +CloneReceivers=Clonar destinatarios +DateLastSend=Data do último envío +DateSending=Data envío +SentTo=Enviado a %s +MailingStatusRead=Lido +YourMailUnsubcribeOK=O mail %s foi dado de baixa correctamente da listaxe de correo +ActivateCheckReadKey=Clave usada para cifrar a URL utilizada para a función "Darse de baixa" +EMailSentToNRecipients=Mail enviado a %s destinatarios. +EMailSentForNElements=Mail enviado a %s elementos. +XTargetsAdded=%s destinatarios agregados á listaxe +OnlyPDFattachmentSupported=Se o documento PDF foi xerado polo obxecto a enviar, será axuntado ao mail, na contra non será enviado o mail. (teña conta que nesta versión só admintense documentos PDF como ficheiros axuntos para mails en masa). +AllRecipientSelected=Os destinatarios do rexistro %s seleccionado (se coñece o seu mail). +GroupEmails=E-mail grupais +OneEmailPerRecipient=Un mail por destinatario (de forma predeterminada, un mail por rexistro seleccionado) +WarningIfYouCheckOneRecipientPerEmail=Atención: Se marca esta casilla, significa que só será enviado un mail para varios rexistros diferentes seleccionados, polo tanto, se a súa mensaxe contén variables de sustitución que fan referencia aos datos dun rexistro, non será posible reemplazalos. +ResultOfMailSending=Resultado do envío masivo de mails +NbSelected=Nº seleccionados +NbIgnored=Nº ignorados +NbSent=Nº enviados +SentXXXmessages=%s mensaxe(s) enviado(s) +ConfirmUnvalidateEmailing=¿Está certo de querer cambiar o estado do mailing %s a borrador? +MailingModuleDescContactsWithThirdpartyFilter=Filtro de contactos con terceiro +MailingModuleDescContactsByCompanyCategory=Contactos de terceiros por categoría +MailingModuleDescContactsByCategory=Contactos por categoría +MailingModuleDescContactsByFunction=Contactos por posición +MailingModuleDescEmailsFromFile=Mails de ficheiros +MailingModuleDescEmailsFromUser=Mails enviados por usuario +MailingModuleDescDolibarrUsers=Usuarios con mails +MailingModuleDescThirdPartiesByCategories=Terceiros (por categoría) +SendingFromWebInterfaceIsNotAllowed=O envío dende a interfaz web non está permitido. # Libelle des modules de liste de destinataires mailing -LineInFile=Line %s in file -RecipientSelectionModules=Defined requests for recipient's selection -MailSelectedRecipients=Selected recipients -MailingArea=EMailings area -LastMailings=Latest %s emailings -TargetsStatistics=Targets statistics -NbOfCompaniesContacts=Unique contacts/addresses -MailNoChangePossible=Recipients for validated emailing can't be changed -SearchAMailing=Search mailing -SendMailing=Send emailing -SentBy=Sent by -MailingNeedCommand=Sending an emailing can be performed from command line. Ask your server administrator to launch the following command to send the emailing to all recipients: +LineInFile=Liña %s en ficheiro +RecipientSelectionModules=Módulos de selección dos destinatarios +MailSelectedRecipients=Destinatarios seleccionados +MailingArea=Área Mailings +LastMailings=Últimos %s mailings +TargetsStatistics=Estatísticas destinatarios +NbOfCompaniesContacts=Contactos/enderezos únicos +MailNoChangePossible=Destinatarios dun mailing validado non modificables +SearchAMailing=Buscar un Mailing +SendMailing=Enviar Mailing +SentBy=Enviado por +MailingNeedCommand=O envío dun mailing pode realizarse dende a liña de comandos. Solicite ao administrador do servidor que execute o siguiente comando para enviar o mailling a todos os destinatarios: MailingNeedCommand2=You can however send them online by adding parameter MAILING_LIMIT_SENDBYWEB with value of max number of emails you want to send by session. For this, go on Home - Setup - Other. ConfirmSendingEmailing=If you want to send emailing directly from this screen, please confirm you are sure you want to send emailing now from your browser ? LimitSendingEmailing=Note: Sending of emailings from web interface is done in several times for security and timeout reasons, %s recipients at a time for each sending session. -TargetsReset=Clear list -ToClearAllRecipientsClickHere=Click here to clear the recipient list for this emailing -ToAddRecipientsChooseHere=Add recipients by choosing from the lists -NbOfEMailingsReceived=Mass emailings received -NbOfEMailingsSend=Mass emailings sent -IdRecord=ID record -DeliveryReceipt=Delivery Ack. -YouCanUseCommaSeparatorForSeveralRecipients=You can use the comma separator to specify several recipients. -TagCheckMail=Track mail opening -TagUnsubscribe=Unsubscribe link -TagSignature=Signature of sending user -EMailRecipient=Recipient Email -TagMailtoEmail=Recipient Email (including html "mailto:" link) -NoEmailSentBadSenderOrRecipientEmail=No email sent. Bad sender or recipient email. Verify user profile. +TargetsReset=Vaciar listaxe +ToClearAllRecipientsClickHere=Para vaciar a listaxe dos destinatarios deste mailing, faga click no botón +ToAddRecipientsChooseHere=Para engadir destinatarios, escolla os que figuran nas listaxes a continuación +NbOfEMailingsReceived=ailings en masa recibidos +NbOfEMailingsSend=Milings masivos enviados +IdRecord=ID rexistro +DeliveryReceipt=Acuse de recibo. +YouCanUseCommaSeparatorForSeveralRecipients=Pode usar o carácter de separación coma para especificar múltiples destinatarios. +TagCheckMail=Seguemento da apertura do email +TagUnsubscribe=Ligazón de baixa na suscrición +TagSignature=Sinatura do usuario que envía +EMailRecipient=Mail do destinatario +TagMailtoEmail=Mail do destinatario (incluindo a ligazón html "mailto:") +NoEmailSentBadSenderOrRecipientEmail=Non foi enviado o mail. O remitente ou destinatario é incorrecto. Comprobe os datos do usuario. # Module Notifications Notifications=Notificacións -NoNotificationsWillBeSent=No email notifications are planned for this event and company -ANotificationsWillBeSent=1 notification will be sent by email -SomeNotificationsWillBeSent=%s notifications will be sent by email -AddNewNotification=Activate a new email notification target/event -ListOfActiveNotifications=List all active targets/events for email notification -ListOfNotificationsDone=List all email notifications sent -MailSendSetupIs=Configuration of email sending has been setup to '%s'. This mode can't be used to send mass emailing. -MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Setup - EMails%s to change parameter '%s' to use mode '%s'. With this mode, you can enter setup of the SMTP server provided by your Internet Service Provider and use Mass emailing feature. +NoNotificationsWillBeSent=Ningunha notificación por mail está prevista para este evento e empresa +ANotificationsWillBeSent=Unha notificación vai ser enviada por mail +SomeNotificationsWillBeSent=%s notificaciones van ser enviadas por mail +AddNewNotification=Activar un novo destinatario de notificacións +ListOfActiveNotifications=Listaxe de destinatarios activos para notifiacións por mail +ListOfNotificationsDone=Listaxe de notificacións enviadas +MailSendSetupIs=A configuración de mailings está a '%s'. Este modo non pode ser usado para enviar mails masivos. +MailSendSetupIs2=Antes debe, cunha conta de administrador, no menú %sInicio - Configuración - E-Mails%s, cambiar o parámetro '%s' para usar o modo '%s'. Con este modo pode configurar un servidor SMTP do seu provedor de servizos de internet. MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s. YouCanAlsoUseSupervisorKeyword=You can also add the keyword __SUPERVISOREMAIL__ to have email being sent to the supervisor of user (works only if an email is defined for this supervisor) NbOfTargetedContacts=Current number of targeted contact emails @@ -141,30 +141,34 @@ UseFormatInputEmailToTarget=Enter a string with format email;name;firstn MailAdvTargetRecipients=Recipients (advanced selection) AdvTgtTitle=Fill input fields to preselect the third parties or contacts/addresses to target AdvTgtSearchTextHelp=Use %% as wildcards. For example to find all item like jean, joe, jim, you can input j%%, you can also use ; as separator for value, and use ! for except this value. For example jean;joe;jim%%;!jimo;!jima% will target all jean, joe, start with jim but not jimo and not everything that starts with jima -AdvTgtSearchIntHelp=Use interval to select int or float value -AdvTgtMinVal=Minimum value -AdvTgtMaxVal=Maximum value -AdvTgtSearchDtHelp=Use interval to select date value -AdvTgtStartDt=Start dt. -AdvTgtEndDt=End dt. -AdvTgtTypeOfIncudeHelp=Target Email of third party and email of contact of the third party, or just third-party email or just contact email -AdvTgtTypeOfIncude=Type of targeted email -AdvTgtContactHelp=Use only if you target contact into "Type of targeted email" -AddAll=Add all -RemoveAll=Remove all -ItemsCount=Item(s) -AdvTgtNameTemplate=Filter name -AdvTgtAddContact=Add emails according to criteria -AdvTgtLoadFilter=Load filter -AdvTgtDeleteFilter=Delete filter -AdvTgtSaveFilter=Save filter -AdvTgtCreateFilter=Create filter -AdvTgtOrCreateNewFilter=Name of new filter -NoContactWithCategoryFound=No contact/address with a category found -NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found -OutGoingEmailSetup=Outgoing email setup -InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) -DefaultOutgoingEmailSetup=Default outgoing email setup +AdvTgtSearchIntHelp=Use un intervaldo para seleccionar valor int o float +AdvTgtMinVal=Valor mínimo +AdvTgtMaxVal=Valor máximo +AdvTgtSearchDtHelp=Use un intervalo para seleccionar unha data +AdvTgtStartDt=Data inicio +AdvTgtEndDt=Data fin +AdvTgtTypeOfIncudeHelp=Destinatario ou mail do terceiro e o mail do contacto do terceiro, ou só o e-mail do terceiro ou o mail do contacto +AdvTgtTypeOfIncude=Tipo de mail destinatario +AdvTgtContactHelp=Usar se escolleu contacto en "Tipo de mail destinatario" +AddAll=Engadir todo +RemoveAll=Eliminar todo +ItemsCount=Ítem(s) +AdvTgtNameTemplate=Nome do filtro +AdvTgtAddContact=Engadir os e-mails acordes aos criterios +AdvTgtLoadFilter=Cargar filtro +AdvTgtDeleteFilter=Eliminar filtro +AdvTgtSaveFilter=Gardar filtro +AdvTgtCreateFilter=Crear filtro +AdvTgtOrCreateNewFilter=Nome do novo filtro +NoContactWithCategoryFound=Non atopáronse contactos/enderezos con algunha categoría +NoContactLinkedToThirdpartieWithCategoryFound=Non atopáronse contactos/enderezos con algunha categoría +OutGoingEmailSetup=Configuración do correo saínte +InGoingEmailSetup=Configuración do correo entrante +OutGoingEmailSetupForEmailing=Configuración do correo saínte (para correo masivo) +DefaultOutgoingEmailSetup=Configuración do correo saínte predeterminada Information=Información -ContactsWithThirdpartyFilter=Contacts with third-party filter +ContactsWithThirdpartyFilter=Contactos con filtro de terceiros. +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/gl_ES/main.lang b/htdocs/langs/gl_ES/main.lang index cfc86017137..a442449ba51 100644 --- a/htdocs/langs/gl_ES/main.lang +++ b/htdocs/langs/gl_ES/main.lang @@ -355,8 +355,8 @@ PriceUTTC=P.U.(+IVE) Amount=Importe AmountInvoice=Importe factura AmountInvoiced=Importe facturado -AmountInvoicedHT=Importe facturado (incl. tax) -AmountInvoicedTTC=Importe facturado (excl. tax) +AmountInvoicedHT=Importe facturado (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Importe pagamento AmountHTShort=Base imp. AmountTTCShort=Importe @@ -485,6 +485,7 @@ Categories=Etiquetas/categorías Category=Etiqueta/categoría By=Por From=De +FromDate=De FromLocation=De to=a To=a @@ -687,6 +688,7 @@ Method=Método Receive=Recepción CompleteOrNoMoreReceptionExpected=Completado ou no agárdase mais ExpectedValue=Valor agardado +ExpectedQty=Expected Qty PartialWoman=Parcial TotalWoman=Total NeverReceived=Nunca recibido @@ -703,6 +705,7 @@ MenuECM=Documentos MenuAWStats=AWStats MenuMembers=Membros MenuAgendaGoogle=Axenda Google +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Límite Dolibarr (Menú Inicio-configuración-seguridade): %s Kb, PHP limit: %s Kb NoFileFound=Non hai documentos gardados neste directorio CurrentUserLanguage=Idioma actual @@ -725,7 +728,7 @@ Page=Páxina Notes=Notas AddNewLine=Engadir nova liña AddFile=Engadir arquivo -FreeZone=Sen produtos/servizos predefinidos +FreeZone=Free-text product FreeLineOfType=Entrada libre, tipo: CloneMainAttributes=Clonar o obxecto con estes atributos principais ReGeneratePDF=Xerar de novo o PDF @@ -942,6 +945,39 @@ ShortThursday=X ShortFriday=V ShortSaturday=S ShortSunday=D +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Seleccione unha prantilla de correo SetRef=Establecer ref Select2ResultFoundUseArrows=Algúns resultados atopados. Use as frechas para seleccionar. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Cambiar a modo edición para axuntar tradución NotUsedForThisCustomer=Non usado para este cliente AmountMustBePositive=Importe ten que ser positivo ByStatus=By status +InformationMessage=Información +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/gl_ES/margins.lang b/htdocs/langs/gl_ES/margins.lang index c3d8952c836..0e2749a1157 100644 --- a/htdocs/langs/gl_ES/margins.lang +++ b/htdocs/langs/gl_ES/margins.lang @@ -1,45 +1,45 @@ # Dolibarr language file - Source file is en_US - marges -Margin=Margin +Margin=Marxe Margins=Marxes -TotalMargin=Total Margin -MarginOnProducts=Margin / Products -MarginOnServices=Margin / Services -MarginRate=Margin rate -MarkRate=Mark rate -DisplayMarginRates=Display margin rates -DisplayMarkRates=Display mark rates -InputPrice=Input price -margin=Profit margins management -margesSetup=Profit margins management setup -MarginDetails=Margin details -ProductMargins=Product margins -CustomerMargins=Customer margins -SalesRepresentativeMargins=Sales representative margins -ContactOfInvoice=Contact of invoice -UserMargins=User margins +TotalMargin=Marxe total +MarginOnProducts=Marxe / Produtos +MarginOnServices=Marxe / Servizos +MarginRate=Marxe sobre coste +MarkRate=Marxe sobre venda +DisplayMarginRates=Amosar a marxe sobre costes +DisplayMarkRates=Amosar a marxe sobre ventas +InputPrice=Introducir un prezo +margin=Xestión de marxes +margesSetup=Configuración da xestión de marxes +MarginDetails=Detalles de marxes realizados +ProductMargins=Marxes por produto +CustomerMargins=Marxes por cliente +SalesRepresentativeMargins=Marxes por comercial +ContactOfInvoice=Contacto da factura +UserMargins=Marxes do usuario ProductService=Produto ou servizo -AllProducts=All products and services -ChooseProduct/Service=Choose product or service -ForceBuyingPriceIfNull=Force buying/cost price to selling price if not defined -ForceBuyingPriceIfNullDetails=If buying/cost price not defined, and this option "ON", margin will be zero on line (buying/cost price = selling price), otherwise ("OFF"), marge will be equal to suggested default. -MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts -UseDiscountAsProduct=As a product -UseDiscountAsService=As a service -UseDiscountOnTotal=On subtotal -MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Defines if a global discount is treated as a product, a service, or only on subtotal for margin calculation. -MARGIN_TYPE=Buying/Cost price suggested by default for margin calculation -MargeType1=Margin on Best vendor price -MargeType2=Margin on Weighted Average Price (WAP) -MargeType3=Margin on Cost Price -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card
    * Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best vendor price if WAP not yet defined
    * Margin on Cost price = Selling price - Cost price defined on product card or WAP if cost price not defined, or best vendor price if WAP not yet defined -CostPrice=Cost price -UnitCharges=Unit charges -Charges=Charges -AgentContactType=Commercial agent contact type -AgentContactTypeDetails=Define what contact type (linked on invoices) will be used for margin report per contact/address. Note that reading statistics on a contact is not reliable since in most cases the contact may not be defined explicitely on the invoices. -rateMustBeNumeric=Rate must be a numeric value -markRateShouldBeLesserThan100=Mark rate should be lower than 100 -ShowMarginInfos=Show margin infos -CheckMargins=Margins detail -MarginPerSaleRepresentativeWarning=The report of margin per user use the link between third parties and sale representatives to calculate the margin of each sale representative. Because some thirdparties may not have any dedicated sale representative and some third parties may be linked to several, some amounts may not be included into this report (if there is no sale representative) and some may appear on different lines (for each sale representative). +AllProducts=Todos os produtos e servizos +ChooseProduct/Service=Eescolla o produto ou servizo +ForceBuyingPriceIfNull=Forzar prezo de compra/custo ao prezo de venda se non se define +ForceBuyingPriceIfNullDetails=Se o prezo de compra/custo non foi definido, e esta opción está activada, a marxe será cero na liña (prezo de compra/custo = prezo de venda), do contrario a marxe será igual ao suxerido por defecto. +MARGIN_METHODE_FOR_DISCOUNT=Método de xestión de descontos globais +UseDiscountAsProduct=Como un produto +UseDiscountAsService=Como un servizo +UseDiscountOnTotal=Sobre o total +MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Indica se un desconto global toma en conta como un produto, servizo ou so no total a hora de calcular os marxes. +MARGIN_TYPE=Prezo compra/custo suxerido por defecto polo cálculo de marxes +MargeType1=Marxe en Mellor Prezo Proveedor +MargeType2=Marxe en Prezo Medio Ponderado (PMP) +MargeType3=Marxe en Prezo de custo +MarginTypeDesc=* Marxe en mellor prezo de compra = Prezo de venda - Mellor prezo de provedor definido na ficha do produto
    * Marxe en Prezo promedio ponderado (PMP) = Prezo de venda - Prezo Medio Ponderado do produto (PMP), ou mellor prezo de provedor se PMP aínda non está definido
    * Marxe en prezo de custo = Prezo de venda - prezo de custo definido na ficha do produto ou PMP se o prezo de custo non está definido, ou mellor prezo de provedor se PMP aínda non está definido +CostPrice=Prezo de compra +UnitCharges=Carga unitaria +Charges=Cargas +AgentContactType=Tipo de contacto comisionado +AgentContactTypeDetails=Indique qué tipo de contacto (ligado ás facturas) será o utilizado para o informe de marxes de axentes comerciais +rateMustBeNumeric=O marxe debe ser un valor numérico +markRateShouldBeLesserThan100=O marxe ten que ser menor que 100 +ShowMarginInfos=Amosar info de marxes +CheckMargins=Detalles de marxes +MarginPerSaleRepresentativeWarning=O informe de marxe por usuario usa o ligazón entre terceiros e comerciais para calcular a marxe de cada usuario. Debido a que algúns terceiros poden non estar ligados a un comercial e algúns terceiros poden estar relacionados con varios usuarios, algunhas marxes poden noo aparecer neste informe ou poderá aparecer en varias liñas diferentes. diff --git a/htdocs/langs/gl_ES/members.lang b/htdocs/langs/gl_ES/members.lang index 1a7a10615e8..e1a665a28de 100644 --- a/htdocs/langs/gl_ES/members.lang +++ b/htdocs/langs/gl_ES/members.lang @@ -1,129 +1,129 @@ # Dolibarr language file - Source file is en_US - members -MembersArea=Members area -MemberCard=Member card -SubscriptionCard=Subscription card -Member=Member +MembersArea=Área membros +MemberCard=Ficha membro +SubscriptionCard=Ficha cotización +Member=Membro Members=Membros -ShowMember=Show member card -UserNotLinkedToMember=User not linked to a member -ThirdpartyNotLinkedToMember=Third party not linked to a member -MembersTickets=Members Tickets -FundationMembers=Foundation members -ListOfValidatedPublicMembers=List of validated public members -ErrorThisMemberIsNotPublic=This member is not public -ErrorMemberIsAlreadyLinkedToThisThirdParty=Another member (name: %s, login: %s) is already linked to a third party %s. Remove this link first because a third party can't be linked to only a member (and vice versa). -ErrorUserPermissionAllowsToLinksToItselfOnly=For security reasons, you must be granted permissions to edit all users to be able to link a member to a user that is not yours. -SetLinkToUser=Link to a Dolibarr user -SetLinkToThirdParty=Link to a Dolibarr third party -MembersCards=Members business cards -MembersList=List of members -MembersListToValid=List of draft members (to be validated) -MembersListValid=List of valid members -MembersListUpToDate=List of valid members with up to date subscription -MembersListNotUpToDate=List of valid members with subscription out of date -MembersListResiliated=List of terminated members -MembersListQualified=List of qualified members -MenuMembersToValidate=Draft members -MenuMembersValidated=Validated members -MenuMembersUpToDate=Up to date members -MenuMembersNotUpToDate=Out of date members -MenuMembersResiliated=Terminated members -MembersWithSubscriptionToReceive=Members with subscription to receive -MembersWithSubscriptionToReceiveShort=Subscription to receive -DateSubscription=Subscription date -DateEndSubscription=Subscription end date -EndSubscription=End subscription -SubscriptionId=Subscription id -MemberId=Member id -NewMember=New member -MemberType=Member type -MemberTypeId=Member type id -MemberTypeLabel=Member type label +ShowMember=Amosar ficha membro +UserNotLinkedToMember=Usuario non ligado a un membro +ThirdpartyNotLinkedToMember=Terceiro non ligado a ningún membro +MembersTickets=Etiquetas membros +FundationMembers=Membros da asociación +ListOfValidatedPublicMembers=Listaxe de membros públicos validados +ErrorThisMemberIsNotPublic=Este membro non é público +ErrorMemberIsAlreadyLinkedToThisThirdParty=Outro membro (nombre: %s, login: %s) está ligado ao terceiro %s. Elimine a ligazón existente xa que un terceiro só pode estar ligado a un só membro (e viceversa). +ErrorUserPermissionAllowsToLinksToItselfOnly=Por razóns de seguridade, debe posuir os dereitos de modificación de todos os usuarios para poder ligar un membro a un usuario que non sexa vostede mesmo mesmo. +SetLinkToUser=Ligar a un usuario Dolibarr +SetLinkToThirdParty=Ligar a un terceiro Dolibarr +MembersCards=Carnés de membros +MembersList=Listaxe de membros +MembersListToValid=Listaxe de membros borrador (a validar) +MembersListValid=Listaxe de membros validados +MembersListUpToDate=Listaxe dos membros válidos ao día de adhesión +MembersListNotUpToDate=Listaxe dos membros válidos non ao día de adhesión +MembersListResiliated=Listaxe dos membros dados de baixa +MembersListQualified=Listaxe dos membros cualificados +MenuMembersToValidate=Membros borrador +MenuMembersValidated=Membros validados +MenuMembersUpToDate=Membros ao día +MenuMembersNotUpToDate=Membros non ao día +MenuMembersResiliated=Membros de baixa +MembersWithSubscriptionToReceive=Membros agardando recibir afiliación +MembersWithSubscriptionToReceiveShort=Agardando afiliación +DateSubscription=Data afiliación +DateEndSubscription=Data fin afiliación +EndSubscription=Fin afiliación +SubscriptionId=ID afiliación +MemberId=ID membro +NewMember=Novo membro +MemberType=Tipo de membro +MemberTypeId=ID tipo de membro +MemberTypeLabel=Etiqueta tipo de membro MembersTypes=Tipos de membros -MemberStatusDraft=Borrador (é preciso validar) +MemberStatusDraft=Borrador (a validar) MemberStatusDraftShort=Borrador -MemberStatusActive=Validated (waiting subscription) +MemberStatusActive=Validado (agardando afiliación) MemberStatusActiveShort=Validado -MemberStatusActiveLate=Subscription expired +MemberStatusActiveLate=Afiliación expirada MemberStatusActiveLateShort=Expirado -MemberStatusPaid=Subscription up to date -MemberStatusPaidShort=Up to date -MemberStatusResiliated=Terminated member -MemberStatusResiliatedShort=Terminated -MembersStatusToValid=Draft members -MembersStatusResiliated=Terminated members -MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusPaid=Afiliacións ao día +MemberStatusPaidShort=Ao día +MemberStatusResiliated=Membro de baixa +MemberStatusResiliatedShort=De baixa +MembersStatusToValid=Membros en borrador +MembersStatusResiliated=Membros de baixa +MemberStatusNoSubscription=Validado (non precisa afiliación) MemberStatusNoSubscriptionShort=Validado -SubscriptionNotNeeded=No subscription needed -NewCotisation=New contribution -PaymentSubscription=New contribution payment -SubscriptionEndDate=Subscription's end date -MembersTypeSetup=Members type setup -MemberTypeModified=Member type modified -DeleteAMemberType=Delete a member type -ConfirmDeleteMemberType=Are you sure you want to delete this member type? -MemberTypeDeleted=Member type deleted -MemberTypeCanNotBeDeleted=Member type can not be deleted -NewSubscription=New subscription -NewSubscriptionDesc=This form allows you to record your subscription as a new member of the foundation. If you want to renew your subscription (if already a member), please contact foundation board instead by email %s. -Subscription=Subscription -Subscriptions=Subscriptions -SubscriptionLate=Atraso -SubscriptionNotReceived=Subscription never received -ListOfSubscriptions=List of subscriptions -SendCardByMail=Send card by email -AddMember=Create member -NoTypeDefinedGoToSetup=No member types defined. Go to menu "Members types" -NewMemberType=New member type -WelcomeEMail=Welcome email -SubscriptionRequired=Subscription required +SubscriptionNotNeeded=Non precisa afiliación +NewCotisation=Nova afiliación +PaymentSubscription=Pagamento de cotas +SubscriptionEndDate=Data fin afiliación +MembersTypeSetup=Configuración dos tipos de membros +MemberTypeModified=Tipo de membro modificado +DeleteAMemberType=Eliminar un tipo de membro +ConfirmDeleteMemberType=¿Está certo de querer eliminar este tipo de membro? +MemberTypeDeleted=Tipo de membro eliminado +MemberTypeCanNotBeDeleted=O tipo de membro non pode ser eliminado +NewSubscription=Nova afiliación +NewSubscriptionDesc=Utilice este formulario para rexistrarse como un novo membro daa asociación. Para unha renovación, se xa é membro, póñase en contacto coa asociación ao través do mail %s. +Subscription=Afiliación +Subscriptions=Afiliacións +SubscriptionLate=En atraso +SubscriptionNotReceived=Afiliación non recibida +ListOfSubscriptions=Listaxe de afiliacións +SendCardByMail=Enviar ficha por mail +AddMember=Crear membro +NoTypeDefinedGoToSetup=Ningún tipo de membro definido. Vaia a Configuración -> Tipos de membros +NewMemberType=Novo tipo de membro +WelcomeEMail=E-mail +SubscriptionRequired=Precisa afilición DeleteType=Eliminar -VoteAllowed=Vote allowed -Physical=Physical -Moral=Moral -MorPhy=Moral/Physical -Reenable=Reenable -ResiliateMember=Terminate a member -ConfirmResiliateMember=Are you sure you want to terminate this member? -DeleteMember=Delete a member -ConfirmDeleteMember=Are you sure you want to delete this member (Deleting a member will delete all his subscriptions)? -DeleteSubscription=Delete a subscription -ConfirmDeleteSubscription=Are you sure you want to delete this subscription? -Filehtpasswd=htpasswd file -ValidateMember=Validate a member -ConfirmValidateMember=Are you sure you want to validate this member? -FollowingLinksArePublic=The following links are open pages not protected by any Dolibarr permission. They are not formatted pages, provided as example to show how to list members database. -PublicMemberList=Public member list -BlankSubscriptionForm=Public self-subscription form -BlankSubscriptionFormDesc=Dolibarr can provide you a public URL/website to allow external visitors to ask to subscribe to the foundation. If an online payment module is enabled, a payment form may also be automatically provided. -EnablePublicSubscriptionForm=Enable the public website with self-subscription form -ForceMemberType=Force the member type -ExportDataset_member_1=Members and subscriptions +VoteAllowed=Voto autorizado +Physical=Físico +Moral=Xurídico +MorPhy=Nature +Reenable=Reactivar +ResiliateMember=Dar de baixa a un membro +ConfirmResiliateMember=¿Está certo de querer dar de baixa a este membro? +DeleteMember=Eliminar un membro +ConfirmDeleteMember=¿Está certo de querer eliminar este membro (Eliminar un membro elimina tamén todas as súas afiliacións)? +DeleteSubscription=Eliminar unha afiliación +ConfirmDeleteSubscription=¿Está certo de querer eliminar esta afiliación? +Filehtpasswd=Archivo htpasswd +ValidateMember=Validar un membro +ConfirmValidateMember=¿Está certo de querer validar a este membro? +FollowingLinksArePublic=As seguintes ligazóns son páxinas abertas que non están protexidas por ningún permiso de Dolibarr. Non son páxinas con formato, proporcionanse como exemplo para amosar cómo enumerar a base de datos de membros. +PublicMemberList=Listaxe público de membros +BlankSubscriptionForm=Formulario público de auto afiliación +BlankSubscriptionFormDesc=Dolibarr pode proporcionar unha páxina pública para que os visitantes externos podan solicitar afiliarse. Se atópase activo un módulo de pagamento en líña, proporá automáticamente un formulario de pagamento. +EnablePublicSubscriptionForm=Activar 0 formulario público de auto afiliación +ForceMemberType=Forzar o tipo de membro +ExportDataset_member_1=Membros e afiliacións ImportDataset_member_1=Membros -LastMembersModified=Latest %s modified members -LastSubscriptionsModified=Latest %s modified subscriptions +LastMembersModified=Últimos %s membros modificados +LastSubscriptionsModified=Últimas %s afiliacións modificadas String=Cadea de texto -Text=Text -Int=Int -DateAndTime=Date and time -PublicMemberCard=Member public card -SubscriptionNotRecorded=Subscription not recorded -AddSubscription=Create subscription -ShowSubscription=Show subscription +Text=Texto +Int=Numérico +DateAndTime=Data e hora +PublicMemberCard=Ficha pública do membro +SubscriptionNotRecorded=Afiliación non gardada +AddSubscription=Crear afiliación +ShowSubscription=Amosar afiliación # Label of email templates -SendingAnEMailToMember=Sending information email to member -SendingEmailOnAutoSubscription=Sending email on auto registration -SendingEmailOnMemberValidation=Sending email on new member validation -SendingEmailOnNewSubscription=Sending email on new subscription -SendingReminderForExpiredSubscription=Sending reminder for expired subscriptions -SendingEmailOnCancelation=Sending email on cancelation +SendingAnEMailToMember=Enviar mail de información ao membro +SendingEmailOnAutoSubscription=Enviar mail nunha auto afiliación +SendingEmailOnMemberValidation=Enviar mail na validación dun novo membro +SendingEmailOnNewSubscription=Enviar mail nunha nova afiliación +SendingReminderForExpiredSubscription=Enviar un recordatorio para afiliación caducada +SendingEmailOnCancelation=Enviar mail nunha cancelación # Topic of email templates -YourMembershipRequestWasReceived=Your membership was received. -YourMembershipWasValidated=Your membership was validated -YourSubscriptionWasRecorded=Your new subscription was recorded -SubscriptionReminderEmail=Subscription reminder -YourMembershipWasCanceled=Your membership was canceled -CardContent=Content of your member card +YourMembershipRequestWasReceived=A súa membresía foi recibida. +YourMembershipWasValidated=A súa membresía foi validada. +YourSubscriptionWasRecorded=A súa afiliación foi gardada +SubscriptionReminderEmail=Recordatorio de afiliación +YourMembershipWasCanceled=A súa membresía foi cancelada. +CardContent=Contido da súa ficha de membro # Text of email templates ThisIsContentOfYourMembershipRequestWasReceived=We want to let you know that your membership request was received.

    ThisIsContentOfYourMembershipWasValidated=We want to let you know that your membership was validated with the following information:

    @@ -145,60 +145,60 @@ DescADHERENT_CARD_HEADER_TEXT=Text printed on top of member cards DescADHERENT_CARD_TEXT=Text printed on member cards (align on left) DescADHERENT_CARD_TEXT_RIGHT=Text printed on member cards (align on right) DescADHERENT_CARD_FOOTER_TEXT=Text printed on bottom of member cards -ShowTypeCard=Show type '%s' -HTPasswordExport=htpassword file generation -NoThirdPartyAssociatedToMember=No third party associated to this member -MembersAndSubscriptions= Members and Subscriptions -MoreActions=Complementary action on recording -MoreActionsOnSubscription=Complementary action, suggested by default when recording a subscription -MoreActionBankDirect=Create a direct entry on bank account -MoreActionBankViaInvoice=Create an invoice, and a payment on bank account -MoreActionInvoiceOnly=Create an invoice with no payment -LinkToGeneratedPages=Generate visit cards -LinkToGeneratedPagesDesc=This screen allows you to generate PDF files with business cards for all your members or a particular member. -DocForAllMembersCards=Generate business cards for all members -DocForOneMemberCards=Generate business cards for a particular member -DocForLabels=Generate address sheets -SubscriptionPayment=Pago cota -LastSubscriptionDate=Date of latest subscription payment -LastSubscriptionAmount=Amount of latest subscription -MembersStatisticsByCountries=Members statistics by country -MembersStatisticsByState=Members statistics by state/province -MembersStatisticsByTown=Members statistics by town -MembersStatisticsByRegion=Members statistics by region -NbOfMembers=Number of members -NoValidatedMemberYet=No validated members found -MembersByCountryDesc=This screen show you statistics on members by countries. Graphic depends however on Google online graph service and is available only if an internet connection is is working. -MembersByStateDesc=This screen show you statistics on members by state/provinces/canton. -MembersByTownDesc=This screen show you statistics on members by town. -MembersStatisticsDesc=Choose statistics you want to read... +ShowTypeCard=Ver tipo '%s' +HTPasswordExport=Xeración archivo htpassword +NoThirdPartyAssociatedToMember=Ningún terceiro asociado a este membro +MembersAndSubscriptions= Membros e afiliacións +MoreActions=Acción complementaria ao rexistro +MoreActionsOnSubscription=Accións complementarias propostas por defecto na afiliación dun membro +MoreActionBankDirect=Crear un rexistro directo na conta bancaria +MoreActionBankViaInvoice=Crear unha factura e un pagamento na conta bancaria +MoreActionInvoiceOnly=Creación factura sen pagamento +LinkToGeneratedPages=Xeración de tarxetas de presentación +LinkToGeneratedPagesDesc=Esta pantalla permitelle crear prantillas de tarxetas de presentación para os membros o para cada membro en particular. +DocForAllMembersCards=Xeración de tarxetas para todos os membros +DocForOneMemberCards=Xeración de tarxetas para un membro en particular +DocForLabels=Xeración de etiquetas de enderezos +SubscriptionPayment=Pagamento cota +LastSubscriptionDate=Data da última cotización +LastSubscriptionAmount=Importe da última cotización +MembersStatisticsByCountries=Estatísticas de membros por país +MembersStatisticsByState=Estatísticas de membros por provincia/pais +MembersStatisticsByTown=Estatísticas de membros por poboación +MembersStatisticsByRegion=Estatísticas de membros por rexión +NbOfMembers=Número de membros +NoValidatedMemberYet=Ningún membro validado atopado +MembersByCountryDesc=Esta pantalla presenta unha estatística do número de membros por países. Porén, a gráfica utiliza o servizo en líña de gráficas de Google e só é operativo cando ten operativa unha conexión a Internet. +MembersByStateDesc=Esta pantalla presenta unha estatística do número de membros por paises/provincias/comunidades +MembersByTownDesc=Esta pantalla presenta unha estatística do número de membros por poboación. +MembersStatisticsDesc=Escolla as estatísticas que desexa consultar... MenuMembersStats=Estatísticas -LastMemberDate=Latest member date -LatestSubscriptionDate=Latest subscription date -MemberNature=Nature of member -Public=Information are public -NewMemberbyWeb=New member added. Awaiting approval -NewMemberForm=New member form -SubscriptionsStatistics=Statistics on subscriptions -NbOfSubscriptions=Number of subscriptions -AmountOfSubscriptions=Amount of subscriptions -TurnoverOrBudget=Turnover (for a company) or Budget (for a foundation) -DefaultAmount=Default amount of subscription -CanEditAmount=Visitor can choose/edit amount of its subscription -MEMBER_NEWFORM_PAYONLINE=Jump on integrated online payment page -ByProperties=By nature -MembersStatisticsByProperties=Members statistics by nature -MembersByNature=This screen show you statistics on members by nature. -MembersByRegion=This screen show you statistics on members by region. -VATToUseForSubscriptions=VAT rate to use for subscriptions -NoVatOnSubscription=No VAT for subscriptions -ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Product used for subscription line into invoice: %s -NameOrCompany=Name or company -SubscriptionRecorded=Subscription recorded -NoEmailSentToMember=No email sent to member -EmailSentToMember=Email sent to member at %s -SendReminderForExpiredSubscriptionTitle=Send reminder by email for expired subscription -SendReminderForExpiredSubscription=Send reminder by email to members when subscription is about to expire (parameter is number of days before end of subscription to send the remind. It can be a list of days separated by a semicolon, for example '10;5;0;-5') -MembershipPaid=Membership paid for current period (until %s) -YouMayFindYourInvoiceInThisEmail=You may find your invoice attached to this email -XMembersClosed=%s member(s) closed +LastMemberDate=Última data de membro +LatestSubscriptionDate=Data da última cotización +MemberNature=Natureza do membro +Public=Información pública +NewMemberbyWeb=Novo membro engadido. Agardando validación +NewMemberForm=Novo formulario de membro +SubscriptionsStatistics=Estatísticas de cotizacións +NbOfSubscriptions=Número de cotizacións +AmountOfSubscriptions=Importe de cotizacións +TurnoverOrBudget=Volumen de vendas (para empresa) ou Orzamento (para Fundación) +DefaultAmount=Importe por defecto da afiliación +CanEditAmount=O visitante pode escoller/modificar o importe da súa cotización +MEMBER_NEWFORM_PAYONLINE=Ir á páxina integrada de pagamento en liña +ByProperties=Por natureza +MembersStatisticsByProperties=Estatísticas dos membros por natureza +MembersByNature=Esta pantalla presenta unha estatística do número de membros por natureza. +MembersByRegion=Esta pantalla presenta unha estatística do número de membros por rexión +VATToUseForSubscriptions=Tasa de IVE para as afiliacións +NoVatOnSubscription=Sen IVE para nas afiliacións +ADHERENT_PRODUCT_ID_FOR_SUBSCRIPTIONS=Produto usado para as afiliacións en liña nas facturas: %s +NameOrCompany=Nome ou empresa +SubscriptionRecorded=Afiliación gardada +NoEmailSentToMember=Non enviado ningún mail ao membro +EmailSentToMember=Mail enviado ao membro a %s +SendReminderForExpiredSubscriptionTitle=Enviar unha lembranza por mail para a afiliación expirada +SendReminderForExpiredSubscription=Enviar lembranza por mail aos membros cando a afiliación esté a piques de caducar (o parámetro é o número de días antes do final da afiliación para enviar a lembranza. Pode ser unha listaxe de días separados por un punto e coma, por exemplo, '10; 5; 0; -5 ') +MembershipPaid=Membresía pagada polo período actual (ata %s) +YouMayFindYourInvoiceInThisEmail=Pode atopar a súa factura axuntada a este mail +XMembersClosed=%s membro(s) pechado(s) diff --git a/htdocs/langs/gl_ES/mrp.lang b/htdocs/langs/gl_ES/mrp.lang index b2f6f187500..14eee8d483e 100644 --- a/htdocs/langs/gl_ES/mrp.lang +++ b/htdocs/langs/gl_ES/mrp.lang @@ -1,5 +1,6 @@ Mrp=Ordes de fabricación MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/gl_ES/multicurrency.lang b/htdocs/langs/gl_ES/multicurrency.lang index 4e50a29d774..c9ec381e5b6 100644 --- a/htdocs/langs/gl_ES/multicurrency.lang +++ b/htdocs/langs/gl_ES/multicurrency.lang @@ -1,22 +1,22 @@ # Dolibarr language file - Source file is en_US - multicurrency -MultiCurrency=Multi currency -ErrorAddRateFail=Error in added rate -ErrorAddCurrencyFail=Error in added currency -ErrorDeleteCurrencyFail=Error delete fail -multicurrency_syncronize_error=Synchronization error: %s -MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Use the date of the document to find the currency rate, instead of using the latest known rate -multicurrency_useOriginTx=When an object is created from another, keep the original rate from the source object (otherwise use the latest known rate) -CurrencyLayerAccount=CurrencyLayer API -CurrencyLayerAccount_help_to_synchronize=You must create an account on website %s to use this functionality.
    Get your API key.
    If you use a free account, you can't change the source currency (USD by default).
    If your main currency is not USD, the application will automatically recalculate it.

    You are limited to 1000 synchronizations per month. -multicurrency_appId=API key -multicurrency_appCurrencySource=Source currency -multicurrency_alternateCurrencySource=Alternate source currency -CurrenciesUsed=Currencies used -CurrenciesUsed_help_to_add=Add the different currencies and rates you need to use on your proposals, orders etc. -rate=rate -MulticurrencyReceived=Received, original currency -MulticurrencyRemainderToTake=Remaining amount, original currency -MulticurrencyPaymentAmount=Importe total na divisa orixinal -AmountToOthercurrency=Amount To (in currency of receiving account) -CurrencyRateSyncSucceed=Currency rate synchronization done successfuly -MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Use the currency of the document for online payments +MultiCurrency=Multi moeda +ErrorAddRateFail=Erro ao engadir a taxa +ErrorAddCurrencyFail=Erro ao engadir a moeda +ErrorDeleteCurrencyFail=Error ao eliminar +multicurrency_syncronize_error=Erro de sincronización: %s +MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Usar data do documento para atopar a taxa da moeda, no lugar de usar a derradeira taxa coñecida +multicurrency_useOriginTx=Cando un obxecto é creado dende outro, manteña a conversión orixinal do obxecto de orixe (na contra, utilice a taxa de conversión mais reciente coñecida) +CurrencyLayerAccount=API Capa da moeda +CurrencyLayerAccount_help_to_synchronize=Debe crear unha cota no sitio web para usar esta funcionalidade
    Acade a súa chave API
    Se usa unha conta gratuita non pode cambiar a moeda orixe (por defecto USD)
    Pero se a súa moeda principal non é USD pode usar a moeda orixe alternativa para forzar a súa moeda principal

    Estará limitado a 1000 sincronizacións por mes +multicurrency_appId=Clave API +multicurrency_appCurrencySource=DMoeda orixe +multicurrency_alternateCurrencySource=Divisa orixe alternativa +CurrenciesUsed=Divisas usadas +CurrenciesUsed_help_to_add=Engada as diferentes moedas e as taxas que precise usar nos seus orzamentos, pedimentos, etc. +rate=taxa +MulticurrencyReceived=Recibido, na divisa orixe +MulticurrencyRemainderToTake=Cantidade restante, moeda orixe +MulticurrencyPaymentAmount=Importe total, moeda orixe +AmountToOthercurrency=Cantidade a (en moeda da conta receptora) +CurrencyRateSyncSucceed=Taxa da moeda sincronizada correctamente +MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Use a moeda do documento para pagos online diff --git a/htdocs/langs/gl_ES/other.lang b/htdocs/langs/gl_ES/other.lang index 78f64e9d891..c476990f905 100644 --- a/htdocs/langs/gl_ES/other.lang +++ b/htdocs/langs/gl_ES/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/gl_ES/productbatch.lang b/htdocs/langs/gl_ES/productbatch.lang index 1c19e4fb96f..a2cd4187edb 100644 --- a/htdocs/langs/gl_ES/productbatch.lang +++ b/htdocs/langs/gl_ES/productbatch.lang @@ -1,24 +1,24 @@ # ProductBATCH language file - en_US - ProductBATCH -ManageLotSerial=Use lot/serial number -ProductStatusOnBatch=Yes (lot/serial required) -ProductStatusNotOnBatch=No (lot/serial not used) +ManageLotSerial=Usar numeración por lote/serie +ProductStatusOnBatch=Se (é preciso lote/serie) +ProductStatusNotOnBatch=Non (non é preciso lote/serie) ProductStatusOnBatchShort=Sí ProductStatusNotOnBatchShort=Non -Batch=Lot/Serial -atleast1batchfield=Eat-by date or Sell-by date or Lot/Serial number -batch_number=Lot/Serial number -BatchNumberShort=Lot/Serial -EatByDate=Eat-by date -SellByDate=Sell-by date -DetailBatchNumber=Lot/Serial details -printBatch=Lot/Serial: %s -printEatby=Eat-by: %s -printSellby=Sell-by: %s -printQty=Qty: %d -AddDispatchBatchLine=Add a line for Shelf Life dispatching -WhenProductBatchModuleOnOptionAreForced=When module Lot/Serial is on, automatic stock decrease is forced to 'Decrease real stocks on shipping validation' and automatic increase mode is forced to 'Increase real stocks on manual dispatching into warehouses' and can't be edited. Other options can be defined as you want. -ProductDoesNotUseBatchSerial=This product does not use lot/serial number -ProductLotSetup=Setup of module lot/serial -ShowCurrentStockOfLot=Show current stock for couple product/lot -ShowLogOfMovementIfLot=Show log of movements for couple product/lot -StockDetailPerBatch=Stock detail per lot +Batch=Lote/Serie +atleast1batchfield=Data de caducidade ou data de venda ou número de Lote/Serie +batch_number=Número Lote/Serie +BatchNumberShort=Lote/Serie +EatByDate=Data de caducidade +SellByDate=Data de venda +DetailBatchNumber=Detalles do Lote/Serie +printBatch=Lote/Serie %s +printEatby=Caducidade: %s +printSellby=Vendido por: %s +printQty=Cant.: %d +AddDispatchBatchLine=Engada unha liña para despacho por caducidade +WhenProductBatchModuleOnOptionAreForced=Cando o módulo Lote/Serie está activado, a diminución automática de stoc está forzada a "Diminuír as existencias reais na validación do envío" e o modo de aumento automático é forzado a "Aumentar as existencias reais no envío manual nos almacéns" e non pode ser editado. Pode definir outras opcións como queira. +ProductDoesNotUseBatchSerial=Este produto non usa números de lote/serie +ProductLotSetup=Configuración do módulo lote/serie +ShowCurrentStockOfLot=Amosar o stock actual deste produto/lote +ShowLogOfMovementIfLot=Consultar os movemeentos de stock deste produto/lote +StockDetailPerBatch=Detalle de stock por lote diff --git a/htdocs/langs/gl_ES/products.lang b/htdocs/langs/gl_ES/products.lang index c8b10dcf490..fb884d5d1bc 100644 --- a/htdocs/langs/gl_ES/products.lang +++ b/htdocs/langs/gl_ES/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Defina o tipo de código de barras BarcodeValue=Valor do código de barras NoteNotVisibleOnBill=Nota (non visible nas facturas, orzamentos...) ServiceLimitedDuration=Se o produto é un servizo con duración limitada : +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Prezos de provedores (de produtos ou servizo CustomCode=Código aduaneiro / Mercancía / CountryOrigin=País de orixe Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Etiqueta curta Unit=Unidade p=u. @@ -359,6 +362,9 @@ SelectCombination=Seleccione combinación ProductCombinationGenerator=Xerador de variantes Features=Funcións PriceImpact=Impacto no prezo +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Impacto no peso NewProductAttribute=Novo atributo NewProductAttributeValue=Novo valor de atributo diff --git a/htdocs/langs/gl_ES/projects.lang b/htdocs/langs/gl_ES/projects.lang index ef83730122a..58766a79bc1 100644 --- a/htdocs/langs/gl_ES/projects.lang +++ b/htdocs/langs/gl_ES/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Participante TypeContact_project_task_external_TASKCONTRIBUTOR=Participante SelectElement=Escolla elemento AddElement=Ligar ao elemento +LinkToElementShort=Vincular a # Documents models DocumentModelBeluga=Prantilla de documento para a descrición dos obxectos ligados DocumentModelBaleine=Prantilla de documendo do proxecto para tarefas @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Nº de proxectos creados por mes ProjectNbTaskByMonth=Nº de tarefas creadas por mes ProjectOppAmountOfProjectsByMonth=Importe de oportunidades por mes ProjectWeightedOppAmountOfProjectsByMonth=Importe medio oportunidades por mes -ProjectOpenedProjectByOppStatus=Proxectos/oportunidades abertas por estado da oportunidade -ProjectsStatistics=Estatísticas sobre proxectos/oportunidades -TasksStatistics=Estatísticas sobre tarefas en proxectos/oportunidade +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Tarefa asignada. Debería poder introducir tempos nesta tarefa. IdTaskTime=Id tempo da tarefa YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/gl_ES/receiptprinter.lang b/htdocs/langs/gl_ES/receiptprinter.lang index b9144b9a861..e8a421ecd45 100644 --- a/htdocs/langs/gl_ES/receiptprinter.lang +++ b/htdocs/langs/gl_ES/receiptprinter.lang @@ -64,7 +64,7 @@ DOL_VALUE_DAY=Invoice day DOL_VALUE_DAY_LETTERS=Inovice day in letters DOL_LINE_FEED_REVERSE=Line feed reverse InvoiceID=Invoice ID -InvoiceRef=Invoice ref +InvoiceRef=Ref. factura DOL_PRINT_OBJECT_LINES=Invoice lines DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name DOL_VALUE_CUSTOMER_LASTNAME=Customer last name diff --git a/htdocs/langs/gl_ES/recruitment.lang b/htdocs/langs/gl_ES/recruitment.lang new file mode 100644 index 00000000000..4b42eda77ec --- /dev/null +++ b/htdocs/langs/gl_ES/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Configuracións +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Acerca de +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/gl_ES/salaries.lang b/htdocs/langs/gl_ES/salaries.lang index 3054758f469..53100c1c694 100644 --- a/htdocs/langs/gl_ES/salaries.lang +++ b/htdocs/langs/gl_ES/salaries.lang @@ -1,21 +1,21 @@ # Dolibarr language file - Source file is en_US - salaries -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Accounting account used for user third parties -SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=The dedicated accounting account defined on user card will be used for Subledger accounting only. This one will be used for General Ledger and as default value of Subledger accounting if dedicated user accounting account on user is not defined. -SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Accounting account by default for wage payments -Salary=Salary +SALARIES_ACCOUNTING_ACCOUNT_PAYMENT=Conta contable usada para os terceiros +SALARIES_ACCOUNTING_ACCOUNT_PAYMENT_Desc=Utilízase unha conta contable adicada definida na ficha de usuario para encher o Libro Maior, ou como valor predeterminado da contabilidade do Libro Maior se non é definida unha conta contable na ficha do usuario +SALARIES_ACCOUNTING_ACCOUNT_CHARGE=Conta contable por defecto para pagamentos de salarios +Salary=Salario Salaries=Salarios -NewSalaryPayment=New salary payment -AddSalaryPayment=Add salary payment -SalaryPayment=Salary payment -SalariesPayments=Salaries payments -ShowSalaryPayment=Show salary payment -THM=Average hourly rate -TJM=Average daily rate -CurrentSalary=Current salary -THMDescription=This value may be used to calculate the cost of time consumed on a project entered by users if module project is used -TJMDescription=This value is currently for information only and is not used for any calculation -LastSalaries=Latest %s salary payments -AllSalaries=All salary payments -SalariesStatistics=Salary statistics +NewSalaryPayment=Novo pagamento de salario +AddSalaryPayment=Engadir pagamento de salario +SalaryPayment=Pagamento de salario +SalariesPayments=Pagamentos de salarios +ShowSalaryPayment=Ver pagamento de salario +THM=Taxa media por hora +TJM=Taxa media por día +CurrentSalary=Salario actual +THMDescription=Este valor pode ser utilizado para calcular os custos de tempo consumido nun proxecto indicados polos usuarios se utiliza o módulo proxectos +TJMDescription=Este valor actualmente é informativo e non é utilizado para realizar calquera tipo de cálculo +LastSalaries=Últimos %s pagamentos salariais +AllSalaries=Todos os pagamentos salariais +SalariesStatistics=Estatísticas salariais # Export -SalariesAndPayments=Salaries and payments +SalariesAndPayments=Salarios e pagamentos diff --git a/htdocs/langs/gl_ES/stocks.lang b/htdocs/langs/gl_ES/stocks.lang index 64338d16913..7f43c3ed9de 100644 --- a/htdocs/langs/gl_ES/stocks.lang +++ b/htdocs/langs/gl_ES/stocks.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - stocks WarehouseCard=Warehouse card -Warehouse=Warehouse +Warehouse=Almacén Warehouses=Warehouses ParentWarehouse=Parent warehouse NewWarehouse=New warehouse / Stock Location @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -157,7 +159,7 @@ IsInPackage=Contained into package WarehouseAllowNegativeTransfer=Stock can be negative qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse and your setup does not allow negative stocks. qtyToTranferLotIsNotEnough=You don't have enough stock, for this lot number, from your source warehouse and your setup does not allow negative stocks (Qty for product '%s' with lot '%s' is %s in warehouse '%s'). -ShowWarehouse=Show warehouse +ShowWarehouse=Ver almacén MovementCorrectStock=Stock correction for product %s MovementTransferStock=Stock transfer of product %s into another warehouse InventoryCodeShort=Inv./Mov. code @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/gl_ES/supplier_proposal.lang b/htdocs/langs/gl_ES/supplier_proposal.lang index 41ee3f3fc21..1446d11794a 100644 --- a/htdocs/langs/gl_ES/supplier_proposal.lang +++ b/htdocs/langs/gl_ES/supplier_proposal.lang @@ -17,7 +17,7 @@ NewAskPrice=New price request ShowSupplierProposal=Show price request AddSupplierProposal=Create a price request SupplierProposalRefFourn=Vendor ref -SupplierProposalDate=Delivery date +SupplierProposalDate=Data de entrega SupplierProposalRefFournNotice=Before closing to "Accepted", think to grasp suppliers references. ConfirmValidateAsk=Are you sure you want to validate this price request under name %s? DeleteAsk=Delete request diff --git a/htdocs/langs/gl_ES/suppliers.lang b/htdocs/langs/gl_ES/suppliers.lang index 24eb367df3a..eec158d1ff6 100644 --- a/htdocs/langs/gl_ES/suppliers.lang +++ b/htdocs/langs/gl_ES/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Mala calidade ReputationForThisProduct=Reputación BuyerName=Nome do comprador AllProductServicePrices=Todos os prezos de produto / servizo -AllProductReferencesOfSupplier=Todas as referencias de provedores de produto / servizo +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Prezos provedor diff --git a/htdocs/langs/gl_ES/ticket.lang b/htdocs/langs/gl_ES/ticket.lang index 868e8de0b6d..e99c740d69d 100644 --- a/htdocs/langs/gl_ES/ticket.lang +++ b/htdocs/langs/gl_ES/ticket.lang @@ -61,7 +61,7 @@ Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status NotRead=Non lido -Read=Read +Read=Lido Assigned=Assigned InProgress=En progreso NeedMoreInformation=Waiting for information @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Tipo -Category=Código analítico Severity=Severity # Email templates @@ -82,7 +81,7 @@ MailToSendTicketMessage=To send email from ticket message # Admin page # TicketSetup=Ticket module setup -TicketSettings=Settings +TicketSettings=Configuracións TicketSetupPage= TicketPublicAccess=A public interface requiring no identification is available at the following url TicketSetupDictionaries=The type of ticket, severity and analytic codes are configurable from dictionaries @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Grupo TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Código analítico +TicketCategory=Grupo SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/gl_ES/trips.lang b/htdocs/langs/gl_ES/trips.lang index 46a37a208d0..639e621d831 100644 --- a/htdocs/langs/gl_ES/trips.lang +++ b/htdocs/langs/gl_ES/trips.lang @@ -44,7 +44,7 @@ TF_LUNCH=Lunch TF_METRO=Metro TF_TRAIN=Train TF_BUS=Bus -TF_CAR=Car +TF_CAR=Coche TF_PEAGE=Toll TF_ESSENCE=Fuel TF_HOTEL=Hotel diff --git a/htdocs/langs/gl_ES/users.lang b/htdocs/langs/gl_ES/users.lang index 0c1b2dda210..e6bcfc93d77 100644 --- a/htdocs/langs/gl_ES/users.lang +++ b/htdocs/langs/gl_ES/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Desactivado en modo mantemento UserAccountancyCode=Código contable usuario UserLogoff=Usuario desconectado UserLogged=Usuario conectado +DateOfEmployment=Employment date DateEmployment=Data de contratación do empregado DateEmploymentEnd=Data de baixa do empregado CantDisableYourself=Pode desactivar o seu propio rexistro de usuario @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Forzar validación do rexeitamento do gasto ValidatorIsSupervisorByDefault=Por defecto, o responsable da validación é o supervisor do usuario. Manter baleiro para manter este comportamento. UserPersonalEmail=Email persoal UserPersonalMobile=Teléfono móbil persoal +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/gl_ES/website.lang b/htdocs/langs/gl_ES/website.lang index 4ffd6319e6d..0e491ee17b6 100644 --- a/htdocs/langs/gl_ES/website.lang +++ b/htdocs/langs/gl_ES/website.lang @@ -48,7 +48,7 @@ ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setu YouCanAlsoTestWithPHPS=Use with PHP embedded server
    On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running
    php -S 0.0.0.0:8080 -t %s YouCanAlsoDeployToAnotherWHP=Run your web site with another Dolibarr Hosting provider
    If you don't have a web server like Apache or NGinx available on internet, you can export and import your web site onto another Dolibarr instance provided by another Dolibarr hosting provider that provide full integration with the Website module. You can find a list of some Dolibarr hosting providers on https://saas.dolibarr.org CheckVirtualHostPerms=Check also that virtual host has permission %s on files into
    %s -ReadPerm=Read +ReadPerm=Lido WritePerm=Write TestDeployOnWeb=Test/deploy on web PreviewSiteServedByWebServer=Preview %s in a new tab.

    The %s will be served by an external web server (like Apache, Nginx, IIS). You must install and setup this server before to point to directory:
    %s
    URL served by external server:
    %s diff --git a/htdocs/langs/gl_ES/withdrawals.lang b/htdocs/langs/gl_ES/withdrawals.lang index ee27089a61d..396c348cb5f 100644 --- a/htdocs/langs/gl_ES/withdrawals.lang +++ b/htdocs/langs/gl_ES/withdrawals.lang @@ -2,15 +2,15 @@ CustomersStandingOrdersArea=Payments by Direct debit orders SuppliersStandingOrdersArea=Payments by Credit transfer StandingOrdersPayment=Direct debit payment orders -StandingOrderPayment=Direct debit payment order +StandingOrderPayment=Domiciliación NewStandingOrder=New direct debit order NewPaymentByBankTransfer=New payment by credit transfer StandingOrderToProcess=A procesar PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines -WithdrawalsReceipts=Direct debit orders +WithdrawalsReceipts=Domiciliacións WithdrawalReceipt=Domiciliación -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Enviado +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Pagada StatusRefused=Rexeitado StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/gl_ES/workflow.lang b/htdocs/langs/gl_ES/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/gl_ES/workflow.lang +++ b/htdocs/langs/gl_ES/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/gl_ES/zapier.lang b/htdocs/langs/gl_ES/zapier.lang index fdaaf449595..a92ff38f3ce 100644 --- a/htdocs/langs/gl_ES/zapier.lang +++ b/htdocs/langs/gl_ES/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier para modulo de Dolibarr # Admin page # ZapierForDolibarrSetup = Configuración de Zapier para Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/he_IL/accountancy.lang b/htdocs/langs/he_IL/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/he_IL/accountancy.lang +++ b/htdocs/langs/he_IL/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/he_IL/admin.lang b/htdocs/langs/he_IL/admin.lang index 1d522af126f..c79cf4ab028 100644 --- a/htdocs/langs/he_IL/admin.lang +++ b/htdocs/langs/he_IL/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=תכונה לא זמינה כמו מערכות יוניקס. בדיקת תוכנית sendmail שלך באופן מקומי. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=מודול ההתקנה ModulesSetup=Modules/Application setup ModuleFamilyBase=מערכת @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=המפתח כתובות מאובטח NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=ברקודים Module55Desc=ברקוד של ההנהלה Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=שילוב של מערכת ClickToDial (כוכבית, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=יצירה / שינוי שירותים Permission534=מחק את השירותים Permission536=ראה / ניהול שירותים נסתרים Permission538=יצוא שירותים +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=לקרוא תרומות Permission702=צור / לשנות תרומות Permission703=מחק תרומות @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=לקרוא מניות Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=מסמכים הגדרת ספריות Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=אזורים DictionaryCountry=מדינות @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=חפש בצורה קבועה בתפריט השמאלי DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=לחץ כדי לחייג ההתקנה מודול ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=חוזים +MailToSendReception=Receptions MailToThirdparty=צדדים שלישיים MailToMember=משתמשים MailToUser=משתמשים @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=רוכסן MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/he_IL/agenda.lang b/htdocs/langs/he_IL/agenda.lang index 6375138cf97..6f55525881b 100644 --- a/htdocs/langs/he_IL/agenda.lang +++ b/htdocs/langs/he_IL/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/he_IL/boxes.lang b/htdocs/langs/he_IL/boxes.lang index 4e0ba839d59..5fe5dc964a7 100644 --- a/htdocs/langs/he_IL/boxes.lang +++ b/htdocs/langs/he_IL/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=הצעות @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/he_IL/cashdesk.lang b/htdocs/langs/he_IL/cashdesk.lang index 03a3031abe4..0e214defc7a 100644 --- a/htdocs/langs/he_IL/cashdesk.lang +++ b/htdocs/langs/he_IL/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/he_IL/compta.lang b/htdocs/langs/he_IL/compta.lang index bea3663aff1..3dd45972e01 100644 --- a/htdocs/langs/he_IL/compta.lang +++ b/htdocs/langs/he_IL/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/he_IL/contracts.lang b/htdocs/langs/he_IL/contracts.lang index 9d9466a0d55..616aaae97e6 100644 --- a/htdocs/langs/he_IL/contracts.lang +++ b/htdocs/langs/he_IL/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/he_IL/errors.lang b/htdocs/langs/he_IL/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/he_IL/errors.lang +++ b/htdocs/langs/he_IL/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/he_IL/languages.lang b/htdocs/langs/he_IL/languages.lang index 68a16123f4d..0289bdfbc68 100644 --- a/htdocs/langs/he_IL/languages.lang +++ b/htdocs/langs/he_IL/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=ערבית Language_ar_EG=Arabic (Egypt) Language_ar_SA=ערבית +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=בולגרי Language_bs_BA=בוסני Language_ca_ES=קטלוני @@ -20,6 +23,7 @@ Language_en_GB=אנגלית (בריטניה) Language_en_IN=אנגלית (הודו) Language_en_NZ=אנגלית (ניו זילנד) Language_en_SA=אנגלית (ערב הסעודית) +Language_en_SG=English (Singapore) Language_en_US=אנגלית (ארצות הברית) Language_en_ZA=אנגלית (דרום אפריקה) Language_es_ES=ספרדית @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=ספרדית (הונדורס) Language_es_MX=ספרדית (מקסיקו) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=ספרדית (פרגוואי) Language_es_PE=ספרדית (פרו) Language_es_PR=ספרדית (פורטו ריקו) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=אסטונית Language_eu_ES=הבסקים @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=צרפתית (בלגיה) Language_fr_CA=צרפתית (קנדה) Language_fr_CH=צרפתית (שוויץ) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=צרפתי +Language_fr_GA=French (Gabon) Language_fr_NC=צרפתית (קלדוניה החדשה) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=עברית +Language_hi_IN=Hindi (India) Language_hr_HR=קרואטי Language_hu_HU=הונגרי Language_id_ID=Indonesian Language_is_IS=איסלנדי Language_it_IT=איטלקי +Language_it_CH=Italian (Switzerland) Language_ja_JP=יפני Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=לטבי Language_mk_MK=מקדונית Language_mn_MN=Mongolian Language_nb_NO=נורבגי (ספרותית) +Language_ne_NP=Nepali Language_nl_BE=הולנדי (בלגיה) Language_nl_NL=Dutch Language_pl_PL=פולני @@ -86,4 +100,5 @@ Language_uz_UZ=אוזבקי Language_vi_VN=וייטנאמי Language_zh_CN=סיני Language_zh_TW=סיני (מסורתי) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/he_IL/mails.lang b/htdocs/langs/he_IL/mails.lang index 6da35178dd2..041207e7c48 100644 --- a/htdocs/langs/he_IL/mails.lang +++ b/htdocs/langs/he_IL/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/he_IL/main.lang b/htdocs/langs/he_IL/main.lang index 1f4a2f5ddfd..1b6a09d3b5c 100644 --- a/htdocs/langs/he_IL/main.lang +++ b/htdocs/langs/he_IL/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=משתמשים MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/he_IL/members.lang b/htdocs/langs/he_IL/members.lang index b1010fcd8ac..ca47f3c55c7 100644 --- a/htdocs/langs/he_IL/members.lang +++ b/htdocs/langs/he_IL/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/he_IL/mrp.lang b/htdocs/langs/he_IL/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/he_IL/mrp.lang +++ b/htdocs/langs/he_IL/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/he_IL/other.lang b/htdocs/langs/he_IL/other.lang index a0cd937e01d..374c864f7dc 100644 --- a/htdocs/langs/he_IL/other.lang +++ b/htdocs/langs/he_IL/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/he_IL/products.lang b/htdocs/langs/he_IL/products.lang index be647aaf507..b8d4bc7a2d5 100644 --- a/htdocs/langs/he_IL/products.lang +++ b/htdocs/langs/he_IL/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/he_IL/projects.lang b/htdocs/langs/he_IL/projects.lang index 0a7018ffaa4..c69aa3209c0 100644 --- a/htdocs/langs/he_IL/projects.lang +++ b/htdocs/langs/he_IL/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/he_IL/recruitment.lang b/htdocs/langs/he_IL/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/he_IL/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/he_IL/stocks.lang b/htdocs/langs/he_IL/stocks.lang index 58040228bf3..d91da3900ff 100644 --- a/htdocs/langs/he_IL/stocks.lang +++ b/htdocs/langs/he_IL/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=מניות MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/he_IL/suppliers.lang b/htdocs/langs/he_IL/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/he_IL/suppliers.lang +++ b/htdocs/langs/he_IL/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/he_IL/workflow.lang b/htdocs/langs/he_IL/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/he_IL/workflow.lang +++ b/htdocs/langs/he_IL/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/he_IL/zapier.lang b/htdocs/langs/he_IL/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/he_IL/zapier.lang +++ b/htdocs/langs/he_IL/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/hi_IN/accountancy.lang b/htdocs/langs/hi_IN/accountancy.lang index cc6321f405b..9d20e82a9a3 100644 --- a/htdocs/langs/hi_IN/accountancy.lang +++ b/htdocs/langs/hi_IN/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/hi_IN/admin.lang b/htdocs/langs/hi_IN/admin.lang index 1fe183dc578..24ca75589d3 100644 --- a/htdocs/langs/hi_IN/admin.lang +++ b/htdocs/langs/hi_IN/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/hi_IN/agenda.lang b/htdocs/langs/hi_IN/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/hi_IN/agenda.lang +++ b/htdocs/langs/hi_IN/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/hi_IN/boxes.lang b/htdocs/langs/hi_IN/boxes.lang index bd62684421a..d6fd298a3a7 100644 --- a/htdocs/langs/hi_IN/boxes.lang +++ b/htdocs/langs/hi_IN/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/hi_IN/cashdesk.lang b/htdocs/langs/hi_IN/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/hi_IN/cashdesk.lang +++ b/htdocs/langs/hi_IN/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/hi_IN/compta.lang b/htdocs/langs/hi_IN/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/hi_IN/compta.lang +++ b/htdocs/langs/hi_IN/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/hi_IN/contracts.lang b/htdocs/langs/hi_IN/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/hi_IN/contracts.lang +++ b/htdocs/langs/hi_IN/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/hi_IN/errors.lang b/htdocs/langs/hi_IN/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/hi_IN/errors.lang +++ b/htdocs/langs/hi_IN/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/hi_IN/languages.lang b/htdocs/langs/hi_IN/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/hi_IN/languages.lang +++ b/htdocs/langs/hi_IN/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/hi_IN/mails.lang b/htdocs/langs/hi_IN/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/hi_IN/mails.lang +++ b/htdocs/langs/hi_IN/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/hi_IN/main.lang b/htdocs/langs/hi_IN/main.lang index 8a816f7f671..429e07287e1 100644 --- a/htdocs/langs/hi_IN/main.lang +++ b/htdocs/langs/hi_IN/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/hi_IN/members.lang b/htdocs/langs/hi_IN/members.lang index dd0a5bf49e2..5ef946ddf67 100644 --- a/htdocs/langs/hi_IN/members.lang +++ b/htdocs/langs/hi_IN/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/hi_IN/mrp.lang b/htdocs/langs/hi_IN/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/hi_IN/mrp.lang +++ b/htdocs/langs/hi_IN/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/hi_IN/other.lang b/htdocs/langs/hi_IN/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/hi_IN/other.lang +++ b/htdocs/langs/hi_IN/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/hi_IN/products.lang b/htdocs/langs/hi_IN/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/hi_IN/products.lang +++ b/htdocs/langs/hi_IN/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/hi_IN/projects.lang b/htdocs/langs/hi_IN/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/hi_IN/projects.lang +++ b/htdocs/langs/hi_IN/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/hi_IN/recruitment.lang b/htdocs/langs/hi_IN/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/hi_IN/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/hi_IN/stocks.lang b/htdocs/langs/hi_IN/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/hi_IN/stocks.lang +++ b/htdocs/langs/hi_IN/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/hi_IN/suppliers.lang b/htdocs/langs/hi_IN/suppliers.lang index b69b11272b4..51562b8bb7a 100644 --- a/htdocs/langs/hi_IN/suppliers.lang +++ b/htdocs/langs/hi_IN/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/hi_IN/ticket.lang b/htdocs/langs/hi_IN/ticket.lang index a9cff9391d0..59519282c80 100644 --- a/htdocs/langs/hi_IN/ticket.lang +++ b/htdocs/langs/hi_IN/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/hi_IN/users.lang b/htdocs/langs/hi_IN/users.lang index 41a5ebd0981..25d9205457b 100644 --- a/htdocs/langs/hi_IN/users.lang +++ b/htdocs/langs/hi_IN/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/hi_IN/withdrawals.lang b/htdocs/langs/hi_IN/withdrawals.lang index cccd8196481..114a8d9dd6c 100644 --- a/htdocs/langs/hi_IN/withdrawals.lang +++ b/htdocs/langs/hi_IN/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Paid StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/hi_IN/workflow.lang b/htdocs/langs/hi_IN/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/hi_IN/workflow.lang +++ b/htdocs/langs/hi_IN/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/hi_IN/zapier.lang b/htdocs/langs/hi_IN/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/hi_IN/zapier.lang +++ b/htdocs/langs/hi_IN/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/hr_HR/accountancy.lang b/htdocs/langs/hr_HR/accountancy.lang index f0a83905f13..ef969d9eba3 100644 --- a/htdocs/langs/hr_HR/accountancy.lang +++ b/htdocs/langs/hr_HR/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Primjeni masovne kategorije AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/hr_HR/admin.lang b/htdocs/langs/hr_HR/admin.lang index f1a643e13e0..7fc2fc655ff 100644 --- a/htdocs/langs/hr_HR/admin.lang +++ b/htdocs/langs/hr_HR/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Mogućnost nije dostupna na UNIX-u. Testirajte sendmail program lokalno. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Podešavanje modula ModulesSetup=Podešavanje modula/aplikacija ModuleFamilyBase=Sistem @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul %s mora biti omogućen ako želite koristi SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Promjeni cijene sa baznom referentnom vrijednosti definira MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -522,7 +525,7 @@ Module23Name=Energija Module23Desc=Praćenje potrošnje energije Module25Name=Narudžbe kupaca Module25Desc=Sales order management -Module30Name=Računi +Module30Name=Izlazni računi Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers Module40Name=Dobavljači Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barkodovi Module55Desc=Upravljanje barkodovima Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integracija ClickToDial sistema (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Izradi/izmjeni usluge Permission534=Obriši usluge Permission536=Vidi/upravljaj skrivenim uslugama Permission538=Izvezi usluge +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Čitaj donacije Permission702=Izradi/izmjeni donacije Permission703=Obriši donacije @@ -848,6 +858,8 @@ Permission773=Obriši izvještaje troškova Permission774=Čitaj sve izvještaje troškova (čak i svoje i podređenih) Permission775=Odobri izvještaje trška Permission776=Isplati izvještaje troškova +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Izvezi izvještaje troškova Permission1001=Čitaj zalihe Permission1002=Izradi/izmjeni skladišta @@ -900,6 +912,7 @@ Permission2515=Postavi mape dokumenata Permission2801=Koristi FTP klijent u načinu čitanja (samo pregled i download) Permission2802=Koristi FTP klijent u načinu pisanja (brisanje ili upload) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Obriši sredstva Permission63004=Poveži sredstava sa događajima agende DictionaryCompanyType=Vrste trećih osoba DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Potencijalni kupac +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regije DictionaryCountry=Zemlje @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Jedinice DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Status potencijalnog kupca +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Stalni obrazac za pretraživanje na ljevom izborniku DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Tvrtka/Organizacija CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=Novi prevedeni tekst za prikaz OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Morate omogućiti barem 1 modul ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Da u ljeto @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Koji tab želite da se otvori kod odabira izbornika Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Podešavanje modula ClickToDial ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Koristi samo "tel:" kod telefona ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Stopa prodajnog poreza RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Narudžbe dobavljačima MailToSendSupplierInvoice=Ulazni računi MailToSendContract=Ugovori +MailToSendReception=Receptions MailToThirdparty=Treće osobe MailToMember=Članovi MailToUser=Korisnici @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Predlošci za dokumente proizvoda +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=Vidi * napomenu za popis mogućih zamjenskih varijabli SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=PBR MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/hr_HR/agenda.lang b/htdocs/langs/hr_HR/agenda.lang index f7eb9f66d1b..493975cae73 100644 --- a/htdocs/langs/hr_HR/agenda.lang +++ b/htdocs/langs/hr_HR/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Broj događaja ListOfActions=Lista događaja EventReports=Event reports Location=Lokacija -ToUserOfGroup=Bilo kojem korisniku u grupi +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Događaji za cijeli dan(e) MenuToDoActions=Svi nepotpuni događaji MenuDoneActions=Svi prekinuti događaji @@ -86,6 +86,8 @@ ProposalDeleted=Ponuda obrisana OrderDeleted=Narudžba obrisana InvoiceDeleted=Račun obrisan DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Datum početka + 1 sat SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/hr_HR/bills.lang b/htdocs/langs/hr_HR/bills.lang index e0e415e107d..7e46e523ab2 100644 --- a/htdocs/langs/hr_HR/bills.lang +++ b/htdocs/langs/hr_HR/bills.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - bills Bill=Račun -Bills=Računi +Bills=Izlazni računi BillsCustomers=Izlazni računi BillsCustomer=Račun kupca BillsSuppliers=Ulazni računi @@ -26,8 +26,8 @@ InvoiceProFormaDesc=Proforma invoice is an image of a true invoice but ha InvoiceReplacement=Zamjenski račun InvoiceReplacementAsk=Zamjenski račun za račun InvoiceReplacementDesc=Replacement invoice is used to completely replace an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. -InvoiceAvoir=Storno računa/knjižno odobrenje -InvoiceAvoirAsk=Storno računa/knjižno odobrenje za ispravak računa +InvoiceAvoir=Storno računa +InvoiceAvoirAsk=Storno računa za ispravak računa InvoiceAvoirDesc=The credit note is a negative invoice used to correct the fact that an invoice shows an amount that differs from the amount actually paid (eg the customer paid too much by mistake, or will not pay the complete amount since some products were returned). invoiceAvoirWithLines=Izradi storno računa sa stavkama iz izvornog računa invoiceAvoirWithPaymentRestAmount=Izradi knjižno odobrenje s preostalim neplaćenim iznosom iz izvornog računa @@ -101,8 +101,8 @@ ClassifyCanceled=Označi kao napušteno ClassifyClosed=Označi kao zatvoreno ClassifyUnBilled=Označi kao "nezaračunato" CreateBill=Izradi račun -CreateCreditNote=Izradi storno računa/knjižno odobrenje -AddBill=Izradi račun ili storno računa/knjižno odobrenje +CreateCreditNote=Izradi storno računa +AddBill=Izradi račun ili storno računa AddToDraftInvoices=Dodati u predložak računa DeleteBill=Izbriši račun SearchACustomerInvoice=Traži izlazni račun @@ -287,18 +287,18 @@ AddRelativeDiscount=Izradi relativan popust EditRelativeDiscount=Izmjeni relativan popust AddGlobalDiscount=Izradi apsolutni popust EditGlobalDiscounts=Izmjeni apsolutni popust -AddCreditNote=Izradi storno računa/knjižno odobrenje +AddCreditNote=Izradi storno računa ShowDiscount=Prikaži popust ShowReduc=Show the discount ShowSourceInvoice=Show the source invoice RelativeDiscount=Relativni popust GlobalDiscount=Opći popust -CreditNote=Storno računa/knjižno odobrenje -CreditNotes=Storno računa/knjižno odobrenje -CreditNotesOrExcessReceived=Storno računa/knjižno odobrenje +CreditNote=Storno računa +CreditNotes=Storno računa +CreditNotesOrExcessReceived=Storno računa Deposit=Predujam Deposits=Predujam -DiscountFromCreditNote=Popust od storno računa/knjižnog odobrenja %s +DiscountFromCreditNote=Popust od storno računa %s DiscountFromDeposit=Predujmovi iz računa %s DiscountFromExcessReceived=Payments in excess of invoice %s DiscountFromExcessPaid=Payments in excess of invoice %s diff --git a/htdocs/langs/hr_HR/boxes.lang b/htdocs/langs/hr_HR/boxes.lang index 5aa8b6b2253..91564430c76 100644 --- a/htdocs/langs/hr_HR/boxes.lang +++ b/htdocs/langs/hr_HR/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Zadnjih %s zabilježenih dobavljača BoxTitleLastModifiedSuppliers=Dobavljači: zadnjih %s izmjena BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Zadnja %s kupca ili potencijalna kupca -BoxTitleLastCustomerBills=Zadnja %s izlazna računa -BoxTitleLastSupplierBills=Zadnja %s ulazna računa +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Zadnja %s člana BoxTitleLastFicheInter=Zadnje %s izmijenjene intervencije @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Narudžbenice: zadnje %s izmjene BoxTitleLastModifiedPropals=Zadnje %s izmijenjene ponude +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Izlazni računi ForCustomersOrders=Narudžbe kupaca ForProposals=Prijedlozi @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Računovodstvo diff --git a/htdocs/langs/hr_HR/cashdesk.lang b/htdocs/langs/hr_HR/cashdesk.lang index d0ed3acb66e..f03eb1340b0 100644 --- a/htdocs/langs/hr_HR/cashdesk.lang +++ b/htdocs/langs/hr_HR/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/hr_HR/companies.lang b/htdocs/langs/hr_HR/companies.lang index 008591bfa3f..b376da108d4 100644 --- a/htdocs/langs/hr_HR/companies.lang +++ b/htdocs/langs/hr_HR/companies.lang @@ -86,7 +86,7 @@ ThirdpartyNotCustomerNotSupplierSoNoRef=Third party neither customer nor vendor, ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Third party neither customer nor vendor, discounts are not available PaymentBankAccount=Payment bank account OverAllProposals=Ponude kupcima -OverAllOrders=Narudžbe +OverAllOrders=Narudžbe kupaca OverAllInvoices=Računi OverAllSupplierProposals=Tražene cijene ##### Local Taxes ##### diff --git a/htdocs/langs/hr_HR/compta.lang b/htdocs/langs/hr_HR/compta.lang index ba2536a8dba..35de89eb445 100644 --- a/htdocs/langs/hr_HR/compta.lang +++ b/htdocs/langs/hr_HR/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Društveni ili fisklani porez SocialContributions=Društveni ili fiskanlni porezi SocialContributionsDeductibles=Odbitak društveni ili fiskalni porezi SocialContributionsNondeductibles=Neodbijajući društveni ili fiskalni porezi +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Oznaka doprinosa TypeContrib=Vrsta doprinosa MenuSpecialExpenses=Posebni troškovi @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/hr_HR/contracts.lang b/htdocs/langs/hr_HR/contracts.lang index 83110d2c034..3b5662d1928 100644 --- a/htdocs/langs/hr_HR/contracts.lang +++ b/htdocs/langs/hr_HR/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Pokrenute usluge MenuExpiredServices=Usluge koje su istekle MenuClosedServices=Završene usluge NewContract=Novi ugovor -NewContractSubscription=Novi ugovor/pretplata +NewContractSubscription=New contract or subscription AddContract=Izradi ugovor DeleteAContract=Izbriši ugovor ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/hr_HR/deliveries.lang b/htdocs/langs/hr_HR/deliveries.lang index 8b6f48dac9b..b74558fbdd7 100644 --- a/htdocs/langs/hr_HR/deliveries.lang +++ b/htdocs/langs/hr_HR/deliveries.lang @@ -2,7 +2,7 @@ Delivery=Dostava DeliveryRef=Ref. dostave DeliveryCard=Otpremnica -DeliveryOrder=Delivery receipt +DeliveryOrder=Otpremnica DeliveryDate=Datum dostave CreateDeliveryOrder=Izradi otpremnicu DeliveryStateSaved=Status dostave pohranjen diff --git a/htdocs/langs/hr_HR/errors.lang b/htdocs/langs/hr_HR/errors.lang index 76fbb20d1b3..8b017fff9cf 100644 --- a/htdocs/langs/hr_HR/errors.lang +++ b/htdocs/langs/hr_HR/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/hr_HR/languages.lang b/htdocs/langs/hr_HR/languages.lang index 87cfd9916a2..eb963a3ad39 100644 --- a/htdocs/langs/hr_HR/languages.lang +++ b/htdocs/langs/hr_HR/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arapski Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arapski +Language_az_AZ=Azerbaijani Language_bn_BD=Bengalski +Language_bn_IN=Bengali (India) Language_bg_BG=Bugarski Language_bs_BA=Bosanski Language_ca_ES=Katalonski @@ -20,6 +23,7 @@ Language_en_GB=Engleski (United Kingdom) Language_en_IN=Engleski (Indija) Language_en_NZ=Engleski (Novi Zeland) Language_en_SA=Engleski (Saudijska Arabija) +Language_en_SG=English (Singapore) Language_en_US=Engleski (United States) Language_en_ZA=Engleski (Južna Afrika) Language_es_ES=Španjolski @@ -29,6 +33,7 @@ Language_es_CL=Španjolski (Čile) Language_es_CO=Španjolski (Kolumbija) Language_es_DO=Španjolski (Dominikanska Republika) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Španjolski (Honduras) Language_es_MX=Španjolski (Meksiko) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Španjolski (Paragvaj) Language_es_PE=Španjolski (Peru) Language_es_PR=Španjolski (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Španjolski (Venezuela) Language_et_EE=Estonski Language_eu_ES=Baskijski @@ -44,15 +50,22 @@ Language_fi_FI=Finski Language_fr_BE=Francuski (Belgija) Language_fr_CA=Francuski (Kanada) Language_fr_CH=Francuski (Švicarska) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francuzi +Language_fr_GA=French (Gabon) Language_fr_NC=Francuski (Nova Kaledonija) +Language_fr_SN=French (Senegal) Language_fy_NL=Frizijski +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Hrvatski Language_hu_HU=Mađarski Language_id_ID=Indonezijski Language_is_IS=Islandski Language_it_IT=Talijanski +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanski Language_ka_GE=Gruzijski Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Letonski Language_mk_MK=Makedonski Language_mn_MN=Mongolian Language_nb_NO=Norveški (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Nizozemski (Belgija) Language_nl_NL=Dutch Language_pl_PL=Politura @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vijetnamski Language_zh_CN=Kineski Language_zh_TW=Kineski (tradicionalni) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/hr_HR/mails.lang b/htdocs/langs/hr_HR/mails.lang index 6595e1154c2..80155474705 100644 --- a/htdocs/langs/hr_HR/mails.lang +++ b/htdocs/langs/hr_HR/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Podatak ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/hr_HR/main.lang b/htdocs/langs/hr_HR/main.lang index c0a9220e952..f7d01d6567f 100644 --- a/htdocs/langs/hr_HR/main.lang +++ b/htdocs/langs/hr_HR/main.lang @@ -355,8 +355,8 @@ PriceUTTC=J.C. (s porezom) Amount=Iznos AmountInvoice=Iznos računa AmountInvoiced=Zaračunati iznos -AmountInvoicedHT=Zaračunati iznos (s porezom) -AmountInvoicedTTC=Zaračunati iznos (bez poreza) +AmountInvoicedHT=Zaračunati iznos (bez poreza) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Iznos plaćanja AmountHTShort=Iznos (bez PDV-a) AmountTTCShort=Iznos (s porezom) @@ -485,6 +485,7 @@ Categories=Oznake/skupine Category=Oznaka/skupina By=Od From=Od +FromDate=Od FromLocation=Od to=za To=za @@ -687,6 +688,7 @@ Method=Način Receive=Primi CompleteOrNoMoreReceptionExpected=Završeno ili bez drugih očekivanja ExpectedValue=Očekivana vrijednost +ExpectedQty=Expected Qty PartialWoman=Djelomično TotalWoman=Ukupno NeverReceived=Nikad primljeno @@ -703,6 +705,7 @@ MenuECM=Dokumenti MenuAWStats=AWStats MenuMembers=Članovi MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Granična vrijednost Dolibarra (Mapa početna->postavke->sigurnost): %s Kb, PHP granična vrijednost: %s Kb NoFileFound=U ovoj mapi nema spremljenih datoteka CurrentUserLanguage=Trenutni jezik @@ -725,7 +728,7 @@ Page=Strana Notes=Bilješke AddNewLine=Dodaj novu stavku AddFile=Dodaj datoteku -FreeZone=Ovaj proizvod/usluga nije predhodno upisan +FreeZone=Free-text product FreeLineOfType=Slobodan upis, vrsta: CloneMainAttributes=Kloniraj predmet sa svim glavnim svojstvima ReGeneratePDF=Ponovo izradi PDF @@ -942,6 +945,39 @@ ShortThursday=Č ShortFriday=P ShortSaturday=S ShortSunday=N +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Odaberi predložak elektroničke pošte SetRef=Odredi oznaku Select2ResultFoundUseArrows=Pronađeni neki rezultati. Koristi strelice za izbor. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Podatak +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/hr_HR/members.lang b/htdocs/langs/hr_HR/members.lang index eed105f7c1f..970c99a251f 100644 --- a/htdocs/langs/hr_HR/members.lang +++ b/htdocs/langs/hr_HR/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Skice članova MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Ovjereno +SubscriptionNotNeeded=No subscription needed NewCotisation=Novi doprinos PaymentSubscription=Novo plačanje doprinosa SubscriptionEndDate=Datum kraja pretplate @@ -78,7 +81,7 @@ DeleteType=Obriši VoteAllowed=Glasanje dozvoljeno Physical=Fizički Moral=Moralno -MorPhy=Moralno/Fizički +MorPhy=Vrsta Reenable=Ponovo omogući ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? @@ -97,8 +100,8 @@ EnablePublicSubscriptionForm=Enable the public website with self-subscription fo ForceMemberType=Force the member type ExportDataset_member_1=Članovi i pretplate ImportDataset_member_1=Članovi -LastMembersModified=Zadnjih %s izmenjenih članova -LastSubscriptionsModified=Zadnjih %s izmjenjenih pretplata +LastMembersModified=Zadnja %s izmijenjena člana +LastSubscriptionsModified=Zadnje %s izmijenjene pretplate String=String Text=Tekst Int=Int diff --git a/htdocs/langs/hr_HR/mrp.lang b/htdocs/langs/hr_HR/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/hr_HR/mrp.lang +++ b/htdocs/langs/hr_HR/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/hr_HR/orders.lang b/htdocs/langs/hr_HR/orders.lang index 3c704a81c68..aaf54f0eb6c 100644 --- a/htdocs/langs/hr_HR/orders.lang +++ b/htdocs/langs/hr_HR/orders.lang @@ -5,7 +5,7 @@ OrderCard=Narudžbenica OrderId=Broj narudžbe Order=Narudžbenica PdfOrderTitle=Narudžba kupca -Orders=Narudžbe +Orders=Narudžbe kupaca OrderLine=Stavka narudžbe OrderDate=Datum narudžbe OrderDateShort=Datum narudžbe @@ -141,11 +141,12 @@ OrderByEMail=E-pošta OrderByWWW=Online OrderByPhone=Telefon # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=Jednostavan model narudžbe PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Naplata narudžbi +CreateInvoiceForThisSupplier=Naplata narudžbi NoOrdersToInvoice=Nema narudžbi za naplatu CloseProcessedOrdersAutomatically=Odredi "Procesuirano" sve odabrane narudžbe. OrderCreation=Izrada narudžbe diff --git a/htdocs/langs/hr_HR/other.lang b/htdocs/langs/hr_HR/other.lang index 619abd2a8d4..f2b9c16f0f7 100644 --- a/htdocs/langs/hr_HR/other.lang +++ b/htdocs/langs/hr_HR/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=Poštovana/ni,\nposlali smo vam robu prema dostavnici __REF__ u privitku.\n\nUkoliko je dostupna, na dostavnicu upisana je poveznica na stranice prijevoznika i broj pošiljke. Upišite broj na odredišnoj stranici i pratite vašu pošiljku.\n\nSrdačan pozdrav!\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/hr_HR/products.lang b/htdocs/langs/hr_HR/products.lang index 09e94e85e8e..e9b0791dbee 100644 --- a/htdocs/langs/hr_HR/products.lang +++ b/htdocs/langs/hr_HR/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Odredi vrstu barkoda BarcodeValue=Vrijednost barkoda NoteNotVisibleOnBill=Bilješka (ne vidi se na računima, ponudama...) ServiceLimitedDuration=Ako je proizvod usluga ograničenog trajanja: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Broj cijena DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Zemlja porijekla Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Kratka oznaka Unit=Jedinica p=j. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Novi atribut NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/hr_HR/projects.lang b/htdocs/langs/hr_HR/projects.lang index 7a521fa10e1..0b381082a17 100644 --- a/htdocs/langs/hr_HR/projects.lang +++ b/htdocs/langs/hr_HR/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Suradnik TypeContact_project_task_external_TASKCONTRIBUTOR=Suradnik SelectElement=Odaberi element AddElement=Poveži s elementom +LinkToElementShort=Poveži s # Documents models DocumentModelBeluga=Predložak projektnog dokumenta za pregled povezanih objekata DocumentModelBaleine=Predložak projektnog dokumenta za zadatke @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Broj izrađenih projekata po mjesecima ProjectNbTaskByMonth=Broj izrađenih zadataka po mjesecima ProjectOppAmountOfProjectsByMonth=Iznos potencijalnih zahtjeva po mjesecima ProjectWeightedOppAmountOfProjectsByMonth=Ponderirani iznos potencijalnih zahtjeva po mjesecima -ProjectOpenedProjectByOppStatus=Otvoreni projekt / potencijalni projekt po statusu -ProjectsStatistics=Statistika po projektima/prednostima -TasksStatistics=Statistički podaci o projektnim / vodećim zadacima +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Zadatak dodjeljen. Unos vremena za zadatak je moguće. IdTaskTime=ID vre. zad. YouCanCompleteRef=Ako referencu želite dovršiti nekim sufiksom, preporučuje se dodavanje znaka "-" kako biste ga odvojili, tako će automatsko brojanje i dalje raditi ispravno za sljedeće projekte. Na primjer %s-MOJSUFIKS diff --git a/htdocs/langs/hr_HR/recruitment.lang b/htdocs/langs/hr_HR/recruitment.lang new file mode 100644 index 00000000000..974eaa66714 --- /dev/null +++ b/htdocs/langs/hr_HR/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Postavke +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = O programu +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/hr_HR/stocks.lang b/htdocs/langs/hr_HR/stocks.lang index 4a018dba294..ca6b7fe7231 100644 --- a/htdocs/langs/hr_HR/stocks.lang +++ b/htdocs/langs/hr_HR/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Brisanje isporuke Stock=Zaliha Stocks=Zalihe MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Zaliha po lot/serijskom @@ -95,14 +95,16 @@ RealStock=Stvarna zaliha RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Umjetna zaliha -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=ID skladišta DescWareHouse=Opis skladišta LieuWareHouse=Lokalizacija skladišta WarehousesAndProducts=Skladišta i proizvodi WarehousesAndProductsBatchDetail=Skladišta i proizvodi (s detaljima po lot/serijskom) -AverageUnitPricePMPShort=Procjenjena prosječna ulazna cijena -AverageUnitPricePMP=Procjenjena prosječna ulazna cijena +AverageUnitPricePMPShort=Procjenjena prosječna cijena +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Jed. prodajna cijena EstimatedStockValueSellShort=Vrijednost za prodaju EstimatedStockValueSell=Vrijednost za prodaju @@ -141,7 +143,7 @@ Replenishments=Popunjavanje NbOfProductBeforePeriod=Količina proizvoda %s na zalihi prije odabranog perioda (< %s) NbOfProductAfterPeriod=Količina proizvoda %s na zalihi nakon odabranog perioda (> %s) MassMovement=Masovno kretanje -SelectProductInAndOutWareHouse=Odaberite proizvod, količinu, izvorno skladište i odredišno skladište, onda kliknite "%s". Kada završite za sva potrebna kretanja, kliknite na "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Primke za narudžbu StockMovementRecorded=Kretanja zaliha zabilježeno @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/hr_HR/suppliers.lang b/htdocs/langs/hr_HR/suppliers.lang index 1d5e095592d..e122d0fcd3c 100644 --- a/htdocs/langs/hr_HR/suppliers.lang +++ b/htdocs/langs/hr_HR/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputacija BuyerName=Naziv kupca AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/hr_HR/ticket.lang b/htdocs/langs/hr_HR/ticket.lang index 8cb93be17d5..70e17eef676 100644 --- a/htdocs/langs/hr_HR/ticket.lang +++ b/htdocs/langs/hr_HR/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Vrsta -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Grupa TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Izradio NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Grupa SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/hr_HR/users.lang b/htdocs/langs/hr_HR/users.lang index cf47e5c7710..d1f3b04be64 100644 --- a/htdocs/langs/hr_HR/users.lang +++ b/htdocs/langs/hr_HR/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Kreirani korisnik će biti vanjski korisnik (jer je vezan IdPhoneCaller=Pozivatelj ID NewUserCreated=Korisnik %s kreiran NewUserPassword=Lozinka promjenjena za %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Korisnik %s promjenjen UserDisabled=Korisnik %s onemogućen UserEnabled=Korisnik %s aktiviran @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Onemogućeno u načinu održavanja UserAccountancyCode=User accounting code UserLogoff=Odjava korisnika UserLogged=Korisnik prijavljen +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/hr_HR/withdrawals.lang b/htdocs/langs/hr_HR/withdrawals.lang index d8e2de04eaa..9d80e1ba9bd 100644 --- a/htdocs/langs/hr_HR/withdrawals.lang +++ b/htdocs/langs/hr_HR/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Račun odbijen (Naplati odbijanje kupcu) StatusDebitCredit=Status debit/credit StatusWaiting=Čeka StatusTrans=Poslano +StatusDebited=Debited StatusCredited=Kreditirano +StatusPaid=Plaćeno StatusRefused=Odbijeno StatusMotif0=Nedefinirano StatusMotif1=Nedovoljno sredstva @@ -77,13 +79,13 @@ StatusMotif8=Ostali razlog CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Samo ured CreateBanque=Samo banka OrderWaiting=Čeka tretman -NotifyTransmision=Prijenos isplate -NotifyCredit=Kredit isplate +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Nacionalni broj pošiljatelja WithBankUsingRIB=Za bankovne račune koji koriste RIB WithBankUsingBANBIC=Za bankovne račune koji koriste IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Kreditiraj WithdrawalFileNotCapable=Nemoguće generirati isplatnu potvrdu za vašu zemlju %s ( Vaša zemlja nije podržana) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Isplatna datoteka +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Postavi status "Datoteka poslana" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistika statusa stavki @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Iznos: %s
    Način: %s
    Datum: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Opcija za stvarni način nije postavljena, zaustavljamo nakon ove simulacije +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/hr_HR/workflow.lang b/htdocs/langs/hr_HR/workflow.lang index 191dcc9867e..8fc3bf1c296 100644 --- a/htdocs/langs/hr_HR/workflow.lang +++ b/htdocs/langs/hr_HR/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/hr_HR/zapier.lang b/htdocs/langs/hr_HR/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/hr_HR/zapier.lang +++ b/htdocs/langs/hr_HR/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/hu_HU/accountancy.lang b/htdocs/langs/hu_HU/accountancy.lang index a1c3790e6a8..a30f5942c73 100644 --- a/htdocs/langs/hu_HU/accountancy.lang +++ b/htdocs/langs/hu_HU/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/hu_HU/admin.lang b/htdocs/langs/hu_HU/admin.lang index 0ce4f736d4d..6f0491d80dd 100644 --- a/htdocs/langs/hu_HU/admin.lang +++ b/htdocs/langs/hu_HU/admin.lang @@ -13,7 +13,7 @@ FileCheck=A fájlkészlet integritásának ellenőrzése FileCheckDesc=Ez az eszköz lehetővé teszi a fájlok integritásának és az alkalmazás beállításainak ellenőrzését, összehasonlítva az egyes fájlokat a hivatalos fájlokkal. Bizonyos beállítási állandók értékét szintén ellenőrizni lehet. Ezzel az eszközzel meghatározhatja, hogy valamelyik fájlt módosították-e (például egy hacker). FileIntegrityIsStrictlyConformedWithReference=A fájlok integritása szigorúan megfelel a referenciának. FileIntegrityIsOkButFilesWereAdded=A fájlok integritásának ellenőrzése sikeres volt, azonban néhány új fájl hozzá lett adva. -FileIntegritySomeFilesWereRemovedOrModified=A fájlok integritásának ellenőrzése nem járt sikerrel. Néhány fájl módosítva lett, el lett távolítva vagy hozzá lett adva. +FileIntegritySomeFilesWereRemovedOrModified=A fájlok integritásának ellenőrzése sikertelen. Néhány fájl módosítottak, eltávolítottak, vagy hozzáadtak. GlobalChecksum=Globális ellenőrző összeg MakeIntegrityAnalysisFrom=Alkalmazásfájlok integritásának elemzése LocalSignature=Beágyazott helyi aláírás (kevésbé megbízható) @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Alapértelmezett feladó e-mail cím manuális küld UserEmail=Felhasználó email címe CompanyEmail=Vállalati e-mail FeatureNotAvailableOnLinux=A szolgáltatás nem elérhető Unix szerű rendszereken. Teszteld a sendmail programot helyben. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Ha a nyelv fordítása nem teljes, vagy hibákat talál, akkor javítsa ki az langs / %s könyvtárban található fájlok szerkesztésével, és küldje be a változást a www.transifex.com/dolibarr-association/dolibarr/ webhelyre. -SubmitTranslationENUS=Ha a nyelvre történő fordítás nem teljes, vagy hibákat talál, akkor javíthatja a fájlokat az langs / %s könyvtárban történő szerkesztéssel, és módosított fájlokat küldhet el a dolibarr.org/forum weboldalon, vagy a fejlesztők számára a github.com/Dolibarr/d webhelyen. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Modul beállítása ModulesSetup=Modulok / Alkalmazás beállításai ModuleFamilyBase=Rendszer @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=A funkció használatához a(z) %s modul bekapcs SecurityToken=Kulcs a biztonságos URL-ek NoSmsEngine=Nincs elérhető SMS küldő kezelő. Az SMS-küldő kezelőt nem telepíti az alapértelmezett disztribúcióval, mivel azok külső gyártótól függenek, de néhányat találhat az %s-on PDF=PDF -PDFDesc=Globális beállítások a PDF generáláshoz. -PDFAddressForging=A címsorok szabályai +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=A forgalmi adóval / ÁFA-val kapcsolatos összes információ elrejtése PDFRulesForSalesTax=A forgalmi adó / ÁFA szabályai PDFLocaltax=A(z) %s szabályai -HideLocalTaxOnPDF=A(z) %s arány elrejtése az adó oszlopban +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=A termékleírás elrejtése HideRefOnPDF=Termékek hivatkozásainak elrejtése HideDetailsOnPDF=A termékcsalád részleteinek elrejtése @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Módosítsa az árakat a meghatározott alap referenciaér MassConvert=Tömeges konverzió indítása PriceFormatInCurrentLanguage=Árformátum az aktuális nyelven String=Szöveg +String1Line=String (1 line) TextLong=Hosszú szöveg +TextLongNLines=Long text (n lines) HtmlText=HTML szöveg Int=Egész Float=Lebegőpontos @@ -543,9 +546,9 @@ Module54Desc=Szerződések kezelése (szolgáltatások vagy ismétlődő előfiz Module55Name=Vonalkódok Module55Desc=Vonalkód kezelés Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Banki közvetlen terhelés -Module57Desc=Közvetlen terhelésű fizetési megbízások kezelése. Ez magában foglalja a SEPA fájl létrehozását az európai országok számára. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=Kattintson a híváshoz Module58Desc=Integrációja ClickToDial rendszer (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Létrehozza / módosítja szolgáltatások Permission534=Törlés szolgáltatások Permission536=Lásd még: / szolgáltatások kezelésére rejtett Permission538=Export szolgáltatások +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Darabjegyzékek megtekintése Permission651=Darabjegyzék létrehozása / frissítése Permission652=Darabjegyzék törlése +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Olvassa el adományokat Permission702=Létrehozza / módosítja adományok Permission703=Törlés adományok @@ -848,6 +858,8 @@ Permission773=Költségjelentések törlése Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Olvassa készletek Permission1002=Raktárak létrehozása / módosítása @@ -900,6 +912,7 @@ Permission2515=Beállítás dokumentumok könyvtárak Permission2801=FTP kliens olvasás módban való használata (csak böngészés és letöltés) Permission2802=FTP kliens írási módban való használata (fájlok törlése vagy feltöltése) Permission3200=Archivált események és ujjlenyomatok megtekintése +Permission3301=Generate new modules Permission4001=Alkalmazottak megtekintése Permission4002=Alkalmazottak létrehozása Permission4003=Alkalmazottak törlése @@ -947,7 +960,8 @@ Permission63003=Erőforrások törlése Permission63004=Erőforrások összekapcsolása a napirend eseményeivel DictionaryCompanyType=Partnerek típusai DictionaryCompanyJuridicalType=Partner jogi képviselői -DictionaryProspectLevel=Jelentkezői potenciál +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Államok / Tartományok DictionaryRegion=Régiók DictionaryCountry=Országok @@ -977,7 +991,8 @@ DictionaryEMailTemplates=E-mail sablonok DictionaryUnits=Egységek DictionaryMeasuringUnits=Mértékegységek DictionarySocialNetworks=Közösségi hálózatok -DictionaryProspectStatus=Jelentkező állapota +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Bejelentkezési oldal BackgroundImageLogin=Háttérkép PermanentLeftSearchForm=Állandó keresési űrlapot baloldali menüben DefaultLanguage=Alapértelmezett nyelv -EnableMultilangInterface=Többnyelvű támogatás engedélyezése +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Mutassa meg a vállalati logót a menüben CompanyInfo=Cég / Szervezet CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=Az eredeti fordítás felülírva. Az eredeti érték:

    %s TransKeyWithoutOriginalValue=Új fordítást adott meg a(z) '%s' fordítási kulcsra, amely egyetlen nyelvi fájlban sem létezik. -TotalNumberOfActivatedModules=Aktivált alkalmazás/modulok: %s/%s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Legalább egy modult engedélyezni kell ClassNotFoundIntoPathWarning=A(z) %s osztály nem található a PHP elérési útján YesInSummer=Nyáron @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Kattintson a Tárcsázás modul beállítása ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Megrendelések MailToSendSupplierInvoice=Szállítói számlák MailToSendContract=Szerződések +MailToSendReception=Receptions MailToThirdparty=Partner MailToMember=Tagok MailToUser=Felhasználók @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/hu_HU/agenda.lang b/htdocs/langs/hu_HU/agenda.lang index dc14200812b..09e7e836d73 100644 --- a/htdocs/langs/hu_HU/agenda.lang +++ b/htdocs/langs/hu_HU/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Események száma ListOfActions=Események listája EventReports=Event reports Location=Helyszín -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Egész napos esemény MenuToDoActions=Minden nem teljesített cselekvés MenuDoneActions=Minden megszüntetett cselekvés @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/hu_HU/boxes.lang b/htdocs/langs/hu_HU/boxes.lang index 6713063aa03..93ca573083a 100644 --- a/htdocs/langs/hu_HU/boxes.lang +++ b/htdocs/langs/hu_HU/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Ügyfél számlák ForCustomersOrders=Ügyfél megrendelések ForProposals=Javaslatok @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/hu_HU/cashdesk.lang b/htdocs/langs/hu_HU/cashdesk.lang index 7fefd536c7a..f562064c20c 100644 --- a/htdocs/langs/hu_HU/cashdesk.lang +++ b/htdocs/langs/hu_HU/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/hu_HU/companies.lang b/htdocs/langs/hu_HU/companies.lang index 13bede89067..3e3bc1f36a6 100644 --- a/htdocs/langs/hu_HU/companies.lang +++ b/htdocs/langs/hu_HU/companies.lang @@ -297,7 +297,7 @@ AddContact=Kapcsolat létrehozása AddContactAddress=Kapcsolat/cím létrehozása EditContact=Kapcsoalt szerkesztése EditContactAddress=Kapcsolat/cím szerkesztése -Contact=Contact/Address +Contact=Kapcsolat/Cím Contacts=Kapcsolatok/Elérhetőségek ContactId=Kapcsolat id azonosító ContactsAddresses=Kapcsolatok / címek @@ -325,8 +325,8 @@ CompanyDeleted="%s" cég törölve az adatbázisból. ListOfContacts=Névjegyek / címek ListOfContactsAddresses=Névjegyek / címek ListOfThirdParties=Partnerek listája -ShowCompany=Third Party -ShowContact=Contact-Address +ShowCompany=Harmadik fél +ShowContact=Kapcsolat-Cím ContactsAllShort=Minden (nincs szűrő) ContactType=Kapcsolat típusa ContactForOrders=Megrendelés kapcsolattartó @@ -425,7 +425,7 @@ ListSuppliersShort=Eladók listája ListProspectsShort=A lehetséges partnerek listája ListCustomersShort=Ügyfelek listája ThirdPartiesArea=Partnerek / kapcsolattartók -LastModifiedThirdParties=Latest %s modified Third Parties +LastModifiedThirdParties=Az utolojára módosított %s Harmadik Felek UniqueThirdParties=Partnerek összesen InActivity=Nyitott ActivityCeased=Lezárt @@ -447,7 +447,7 @@ SaleRepresentativeFirstname=Az értékesítési képviselő vezetékneve SaleRepresentativeLastname=Az értékesítési képviselő vezetékneve ErrorThirdpartiesMerge=Hiba történt a partner(ek) törlésekor. Kérjük, ellenőrizze a naplót. A változtatások visszavonva. NewCustomerSupplierCodeProposed=A vevő vagy az eladó kódja már használatban van, egy új kód javasolt -KeepEmptyIfGenericAddress=Keep this field empty if this address is a generic address +KeepEmptyIfGenericAddress=Hagyja üresen ezt a mezőt, ha a cím általános cím #Imports PaymentTypeCustomer=Fizetés típusa - Ügyfél PaymentTermsCustomer=Fizetési feltételek - Ügyfél diff --git a/htdocs/langs/hu_HU/compta.lang b/htdocs/langs/hu_HU/compta.lang index 1843b1372a1..e750d016947 100644 --- a/htdocs/langs/hu_HU/compta.lang +++ b/htdocs/langs/hu_HU/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Különleges költségek @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/hu_HU/contracts.lang b/htdocs/langs/hu_HU/contracts.lang index a71cfd1d107..5c05134c23f 100644 --- a/htdocs/langs/hu_HU/contracts.lang +++ b/htdocs/langs/hu_HU/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Futó szolgáltatások MenuExpiredServices=Lejárt szolgáltatások MenuClosedServices=Lezárt szolgáltatások NewContract=Új szerződés -NewContractSubscription=Új szerződés / előfizetés +NewContractSubscription=Új szerződés vagy előfizetés AddContract=Szerződés hozzáadása DeleteAContract=Szerződés törlése ActivateAllOnContract=Aktiválja az összes szolgáltatást @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Értékesítési képviselő a szerző TypeContact_contrat_external_BILLING=Számlázandó ügyfél TypeContact_contrat_external_CUSTOMER=Ügyfél kapcsolat tartó TypeContact_contrat_external_SALESREPSIGN=A szerződést aláíró személy -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Alapértelmezés szerint elrejti a zárt szolgáltatásokat +ShowClosedServices=Zárt szolgáltatások megjelenítése +HideClosedServices=Zárt szolgáltatások elrejtése diff --git a/htdocs/langs/hu_HU/dict.lang b/htdocs/langs/hu_HU/dict.lang index c62097d1884..9b900be987b 100644 --- a/htdocs/langs/hu_HU/dict.lang +++ b/htdocs/langs/hu_HU/dict.lang @@ -354,6 +354,6 @@ ExpAuto11PCV=11 vagy több önéletrajz ExpAuto12PCV=12 vagy több önéletrajz ExpAuto13PCV=13 vagy több önéletrajz ExpCyclo=Kapacitás 50cm3-ig -ExpMoto12CV=Motorbike 1 or 2 CV -ExpMoto345CV=Motorbike 3, 4 or 5 CV -ExpMoto5PCV=Motorbike 5 CV and more +ExpMoto12CV=1. vagy 2. motorkerékpár CV +ExpMoto345CV=Motorkerékpár 3, 4 vagy 5 CV +ExpMoto5PCV=Motorkerékpár 5 CV és így tovább diff --git a/htdocs/langs/hu_HU/errors.lang b/htdocs/langs/hu_HU/errors.lang index db31eb728a9..2fcfb92b003 100644 --- a/htdocs/langs/hu_HU/errors.lang +++ b/htdocs/langs/hu_HU/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/hu_HU/hrm.lang b/htdocs/langs/hu_HU/hrm.lang index 2bbe0c97663..c671aaf7500 100644 --- a/htdocs/langs/hu_HU/hrm.lang +++ b/htdocs/langs/hu_HU/hrm.lang @@ -11,7 +11,7 @@ CloseEtablishment=Létesítmény lezárása # Dictionary DictionaryPublicHolidays=HRM - ünnepnapok DictionaryDepartment=HRM - Osztálylista -DictionaryFunction=HRM - Job positions +DictionaryFunction=HRM - Munkahelyek # Module Employees=Alkalmazottak Employee=Foglalkoztató diff --git a/htdocs/langs/hu_HU/languages.lang b/htdocs/langs/hu_HU/languages.lang index 3b1841da71d..31fa1647481 100644 --- a/htdocs/langs/hu_HU/languages.lang +++ b/htdocs/langs/hu_HU/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arab Language_ar_EG=Arab (Egyiptom) Language_ar_SA=Arab +Language_az_AZ=Azerbaijani Language_bn_BD=Bengáli +Language_bn_IN=Bengali (India) Language_bg_BG=Bolgár Language_bs_BA=Bosnyák Language_ca_ES=Katalán @@ -20,6 +23,7 @@ Language_en_GB=Angol (Egyesült Királyság) Language_en_IN=Angol (India) Language_en_NZ=Angol (Új Zéland) Language_en_SA=English (Szaúd-Arábia) +Language_en_SG=English (Singapore) Language_en_US=Angol (Egyesült Államok) Language_en_ZA=English (Dél-Afrika) Language_es_ES=Spanyol @@ -29,6 +33,7 @@ Language_es_CL=Spanyol (Chile) Language_es_CO=Spanyol (Kolumbia) Language_es_DO=Spanyol (Dominikai Köztársaság) Language_es_EC=Spanyol (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanyol (Honduras) Language_es_MX=Spanyol (Mexikó) Language_es_PA=Spanyol (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanyol (Paraguay) Language_es_PE=Spanyol (Peru) Language_es_PR=Spanyol (Puerto Rico) Language_es_UY=Spanyol (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanyol (Venezuela) Language_et_EE=Észt Language_eu_ES=Baszk @@ -44,15 +50,22 @@ Language_fi_FI=Finn Language_fr_BE=Francia (Belgium) Language_fr_CA=Francia (Kanada) Language_fr_CH=Francia (Svájc) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francia +Language_fr_GA=French (Gabon) Language_fr_NC=Francia (Új-Kaledónia) +Language_fr_SN=French (Senegal) Language_fy_NL=Fríz +Language_gl_ES=Galician Language_he_IL=Héber +Language_hi_IN=Hindi (India) Language_hr_HR=Horvát Language_hu_HU=Magyar Language_id_ID=Indonéz Language_is_IS=Grönlandi Language_it_IT=Olasz +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japán Language_ka_GE=Grúz Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Lett Language_mk_MK=Macedóniai Language_mn_MN=Mongol Language_nb_NO=Norvég (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Holland (Belgium) Language_nl_NL=Holland Language_pl_PL=Lengyel @@ -86,4 +100,5 @@ Language_uz_UZ=Üzbég Language_vi_VN=Vietnami Language_zh_CN=Kínai Language_zh_TW=Kínai (hagyományos) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Maláj diff --git a/htdocs/langs/hu_HU/link.lang b/htdocs/langs/hu_HU/link.lang index 4a300402b46..05653373fbd 100644 --- a/htdocs/langs/hu_HU/link.lang +++ b/htdocs/langs/hu_HU/link.lang @@ -8,4 +8,4 @@ LinkRemoved=A %s hivatkozás törölve ErrorFailedToDeleteLink= A '%s' hivakozás törlése sikertelen ErrorFailedToUpdateLink= A '%s' hivakozás frissítése sikertelen URLToLink=A hivatkozás címe -OverwriteIfExists=Overwrite file if exists +OverwriteIfExists=Fájl felülírása, ha létezik diff --git a/htdocs/langs/hu_HU/mails.lang b/htdocs/langs/hu_HU/mails.lang index 748b00764b6..a00af6c7a1f 100644 --- a/htdocs/langs/hu_HU/mails.lang +++ b/htdocs/langs/hu_HU/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Információ ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/hu_HU/main.lang b/htdocs/langs/hu_HU/main.lang index 3a23eb6e7e7..ff000eb7c96 100644 --- a/htdocs/langs/hu_HU/main.lang +++ b/htdocs/langs/hu_HU/main.lang @@ -355,8 +355,8 @@ PriceUTTC=E.Á. (adóval) Amount=Mennyiség AmountInvoice=Számla mennyiség AmountInvoiced=Számlázott összeg -AmountInvoicedHT=Számlázott összeg (ÁFA-val) -AmountInvoicedTTC=Számlázott összeg (ÁFA nélkül) +AmountInvoicedHT=Számlázott összeg (ÁFA nélkül) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Fizetés mennyiség AmountHTShort=Összeg (ÁFA nélkül) AmountTTCShort=Mennyiség (bruttó) @@ -485,6 +485,7 @@ Categories=Címkék/kategóriák Category=Címke/kategória By=által From=Kitől? +FromDate=Feladó FromLocation=Feladó to=kinek To=kinek @@ -687,6 +688,7 @@ Method=Módszer Receive=Kap CompleteOrNoMoreReceptionExpected=Teljes, vagy semmi több várható ExpectedValue=Várt érték +ExpectedQty=Expected Qty PartialWoman=Részleges TotalWoman=Összes NeverReceived=Soha nem került átvételre @@ -703,6 +705,7 @@ MenuECM=Dokumentumok MenuAWStats=AWStats MenuMembers=Tagok MenuAgendaGoogle=Google naptár +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=Nincs mentett dokumentum ebben a könyvtárban CurrentUserLanguage=Jelenlegi nyelv @@ -725,7 +728,7 @@ Page=Oldal Notes=Megjegyzés AddNewLine=Új sor hozzáadása AddFile=Fájl hozzáadása -FreeZone=Nem előre definiált termék/szolgáltatás +FreeZone=Free-text product FreeLineOfType=Szabad szöveges leírás, válassz típust: CloneMainAttributes=Objektum klónozása a főbb jellemzőivel ReGeneratePDF=PDF újragenerálása @@ -942,6 +945,39 @@ ShortThursday=Cs ShortFriday=P ShortSaturday=Szo ShortSunday=V +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Válasszon egy e-mail sablont SetRef=Set ref Select2ResultFoundUseArrows=Találati lista. Használja a nyilakat a kiválasztáshoz. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Információ +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/hu_HU/members.lang b/htdocs/langs/hu_HU/members.lang index f8b8f5e69ed..a0dc2f9a2df 100644 --- a/htdocs/langs/hu_HU/members.lang +++ b/htdocs/langs/hu_HU/members.lang @@ -81,7 +81,7 @@ DeleteType=Törlés VoteAllowed=Szavazz megengedett Physical=Fizikai Moral=Erkölcsi -MorPhy=Erkölcsi / Fizikai +MorPhy=Természet Reenable=Újra bekapcsolja ResiliateMember=Tag kiléptetése ConfirmResiliateMember=Valóban ki szeretné léptetni az adott tagot? diff --git a/htdocs/langs/hu_HU/mrp.lang b/htdocs/langs/hu_HU/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/hu_HU/mrp.lang +++ b/htdocs/langs/hu_HU/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/hu_HU/multicurrency.lang b/htdocs/langs/hu_HU/multicurrency.lang index 0f31a6a59c5..5f6b698d72c 100644 --- a/htdocs/langs/hu_HU/multicurrency.lang +++ b/htdocs/langs/hu_HU/multicurrency.lang @@ -8,7 +8,7 @@ MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=A legfrissebb ismert árfolyam helyett h multicurrency_useOriginTx=Ha egy objektum egy másikból készül, tartsa meg az eredeti arányt a forrásobjektumból (egyébként használja a legfrissebb ismert arányt) CurrencyLayerAccount=CurrencyLayer API CurrencyLayerAccount_help_to_synchronize=Ennek a funkciónak a használatához létre kell hoznia egy fiókot a %s webhelyen.
    Szerezze be API kulcsát.
    Ha ingyenes fiókot használ, nem tudja megváltoztatni az forrás pénznemét (alapértelmezés: USD).
    Ha a fő pénznem nem USD, az alkalmazás automatikusan kiszámítja azt.

    Havonta 1000 szinkronizálást végezhet. -multicurrency_appId=API key +multicurrency_appId=API kulcs multicurrency_appCurrencySource=Forrás deviza multicurrency_alternateCurrencySource=Alternatív forrás deviza CurrenciesUsed=Használt pénznemek @@ -18,3 +18,5 @@ MulticurrencyReceived=Fogadott, eredeti pénznem MulticurrencyRemainderToTake=Fennmaradó összeg, eredeti pénznem MulticurrencyPaymentAmount=Fizetendő összeg, eredeti pénznem AmountToOthercurrency=Összeg: (a fogadó számla pénznemében) +CurrencyRateSyncSucceed=Az árfolyam-szinkronizálás sikeresen befejeződött +MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Használja a dokumentum pénznemét online fizetésekhez diff --git a/htdocs/langs/hu_HU/other.lang b/htdocs/langs/hu_HU/other.lang index 5a237102474..934ae54ceb1 100644 --- a/htdocs/langs/hu_HU/other.lang +++ b/htdocs/langs/hu_HU/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Helló)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=A kifizetéshez kattintson az alábbi linkre, ha még nem történt meg.\n\n%s\n\n +PredefinedMailContentGeneric=__(Helló)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=A Dolibarr egy kompakt ERP/CRM, amely számos üzleti modult támogat. Az összes modult bemutató demonstrációnak nincs értelme, mivel ez a forgatókönyv soha nem fordul elő (több száz elérhető). Azonban számos demo profil elérhető. ChooseYourDemoProfil=Válassza ki az igényeinek leginkább megfelelő bemutató profilt ... ChooseYourDemoProfilMore=... vagy készítsen saját profilt
    (manuális modulválasztás) @@ -280,7 +278,9 @@ LinesToImport=Importálandó sorok MemoryUsage=Memóriahasználat RequestDuration=A kérelem időtartama +ProductsPerPopularity=Products/Services by popularity PopuProp=Termékek/szolgáltatások népszerűsége a javaslatokban PopuCom=Termékek/szolgáltatások népszerűsége a megrendelésekben ProductStatistics=Termékek/szolgáltatások statisztikája NbOfQtyInOrders=Mennyiség a megrendelésekben +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/hu_HU/products.lang b/htdocs/langs/hu_HU/products.lang index 15f05e7d141..43667cffc4f 100644 --- a/htdocs/langs/hu_HU/products.lang +++ b/htdocs/langs/hu_HU/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Vonalkód típusának beállítása BarcodeValue=Vonalkód érték NoteNotVisibleOnBill=Megjegyzés (nem látszik a számlákon, ajánlatokon...) ServiceLimitedDuration=Ha a termék vagy szolgáltatás időkorlátos: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Több árszegmens termékenként / szolgáltatásonként (minden ügyfél egy árszegmensben van) MultiPricesNumPrices=Árak száma DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Eladási árak (termékek vagy szolgáltatá CustomCode=Vám / Áru / HS kód CountryOrigin=Származási ország Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Rövid címke Unit=Egység p=db. @@ -359,6 +362,9 @@ SelectCombination=Kombináció kiválasztása ProductCombinationGenerator=Változatgenerátor Features=Jellemzők PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Új attribútum NewProductAttributeValue=Új attribútumérték diff --git a/htdocs/langs/hu_HU/projects.lang b/htdocs/langs/hu_HU/projects.lang index 1725b88e56a..6dec0368501 100644 --- a/htdocs/langs/hu_HU/projects.lang +++ b/htdocs/langs/hu_HU/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Hozzájáruló TypeContact_project_task_external_TASKCONTRIBUTOR=Hozzájáruló SelectElement=Select element AddElement=Link to element +LinkToElementShort=Hivatkozás erre: # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/hu_HU/recruitment.lang b/htdocs/langs/hu_HU/recruitment.lang new file mode 100644 index 00000000000..d886dbe3d61 --- /dev/null +++ b/htdocs/langs/hu_HU/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Toborzás +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Az új állásokra vonatkozó toborzási kampányok kezelése és követése + +# +# Admin page +# +RecruitmentSetup = Toborzási beállítások +Settings = Beállítások +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Toborzási terület +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Névjegy +RecruitmentAbout = Toborzási névjegy +RecruitmentAboutPage = Toborzás névjegy oldala +NbOfEmployeesExpected=A munkavállalók várható száma +JobLabel=A munkakör megnevezése +WorkPlace=Munkavégzés helye +DateExpected=Várható dátum +FutureManager=Jövőbeli vezető +ResponsibleOfRecruitement=A toborzásért felelős +IfJobIsLocatedAtAPartner=Amennyiben a munkapozíció partnernél található +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/hu_HU/stocks.lang b/htdocs/langs/hu_HU/stocks.lang index ec351ff5e74..8281f86d75e 100644 --- a/htdocs/langs/hu_HU/stocks.lang +++ b/htdocs/langs/hu_HU/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Küldés törlése Stock=Készlet Stocks=Készletek MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Készletek tétel/cikkszám alapján @@ -95,14 +95,16 @@ RealStock=Igazi készlet RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtuális készlet -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Raktár azon. DescWareHouse=Raktár leírás LieuWareHouse=Raktár helye WarehousesAndProducts=Raktárak és termékek WarehousesAndProductsBatchDetail=Raktárak és termékek (tétel/cikkszám szerint részletezve) -AverageUnitPricePMPShort=Súlyozott átlag beviteli ár -AverageUnitPricePMP=Súlyozott átlag beviteli ár +AverageUnitPricePMPShort=Súlyozott átlagár +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Értékesítés Egységár EstimatedStockValueSellShort=Eladási érték EstimatedStockValueSell=Eladási érték @@ -141,7 +143,7 @@ Replenishments=Készletek pótlása NbOfProductBeforePeriod=A %s termékből rendelkezésre álló mennyiség a kiválasztott periódusban (%s előtt) NbOfProductAfterPeriod=A %s termékből rendelkezésre álló mennyiség a kiválasztott periódusban (%s után) MassMovement=Tömeges mozgatás -SelectProductInAndOutWareHouse=Válasszon egy terméket, a mennyiségét, egy származási raktárat valamint egy cél raktárat, majd kattintson az "%s"-ra. Amint minden szükséges mozgatással elkészült, kattintson a "%s"-ra. +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Mozgatás rögzítése ReceivingForSameOrder=Megrendelés nyugtái StockMovementRecorded=Rögzített készletmozgások @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/hu_HU/suppliers.lang b/htdocs/langs/hu_HU/suppliers.lang index 091cba05a30..9c42f779316 100644 --- a/htdocs/langs/hu_HU/suppliers.lang +++ b/htdocs/langs/hu_HU/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Eladási árak diff --git a/htdocs/langs/hu_HU/ticket.lang b/htdocs/langs/hu_HU/ticket.lang index 7ab0337b819..79cde86ee8b 100644 --- a/htdocs/langs/hu_HU/ticket.lang +++ b/htdocs/langs/hu_HU/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Típus -Category=Analitikai kód Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Csoport TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analitikai kód +TicketCategory=Csoport SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/hu_HU/users.lang b/htdocs/langs/hu_HU/users.lang index 084d20b5834..45af45e609f 100644 --- a/htdocs/langs/hu_HU/users.lang +++ b/htdocs/langs/hu_HU/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Létrehozott felhasználó lesz egy külső felhasználó IdPhoneCaller=Telfon hívó azonosító NewUserCreated=Felhasználó %s létrehozva NewUserPassword=Jelszó megváltoztatása %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Felhasználó %s módosítva UserDisabled=Felhasználó %s kikapcsolva UserEnabled=Felhasználó %s aktiválva @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Karbantartási módban kikapcsolt UserAccountancyCode=Felhasználói számviteli kód UserLogoff=Felhasználó kilépés UserLogged=Felhasználó naplózva +DateOfEmployment=Employment date DateEmployment=A foglalkoztatás kezdő dátuma DateEmploymentEnd=A foglalkoztatás befejezési dátuma CantDisableYourself=Saját felhasználói rekordját nem tilthatja le @@ -115,3 +117,4 @@ ForceUserHolidayValidator=A szabadságkérelem érvényesítése ValidatorIsSupervisorByDefault=Alapértelmezés szerint az érvényesítő a felhasználó vezetője. Hagyja üresen ha ez így van. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/hu_HU/withdrawals.lang b/htdocs/langs/hu_HU/withdrawals.lang index 740e3663f97..7522b6d2bd1 100644 --- a/htdocs/langs/hu_HU/withdrawals.lang +++ b/htdocs/langs/hu_HU/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Várakozás StatusTrans=Küldött +StatusDebited=Debited StatusCredited=Jóváírt +StatusPaid=Fizetett StatusRefused=Megtagadta StatusMotif0=Meghatározatlan StatusMotif1=Rendelkezni insuffisante @@ -77,13 +79,13 @@ StatusMotif8=Egyéb ok CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Csak az Office CreateBanque=Csak a bank OrderWaiting=Várakozás kezelés -NotifyTransmision=Felmondás Átviteli -NotifyCredit=Felmondás Hitel +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Nemzeti Adó száma WithBankUsingRIB=A bankszámlák segítségével RIB WithBankUsingBANBIC=A bankszámlák segítségével IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Hitelt WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Összeg: %s
    Metode: %s
    Dátum: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Opció a valós módban nem volt beállítva, akkor hagyja abba ezt követően szimuláció +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/hu_HU/workflow.lang b/htdocs/langs/hu_HU/workflow.lang index 4966b07753d..569e1e15dc3 100644 --- a/htdocs/langs/hu_HU/workflow.lang +++ b/htdocs/langs/hu_HU/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=A kapcsolt forrásból származó # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=A kapcsolt forrásból származó szállítói javaslatot számlázottként minősíti, ha a szállítói számla érvényesítve lesz (és ha a számla összege megegyezik a kapcsolódó ajánlat teljes összegével) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=A kapcsolt forrásból származó megrendelést számlázottra minősíti, ha a szállítói számla érvényesítve lesz (és ha a számla összege megegyezik a kapcsolódó rendelés teljes összegével) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatikus létrehozás AutomaticClassification=Automatikus minősítés diff --git a/htdocs/langs/hu_HU/zapier.lang b/htdocs/langs/hu_HU/zapier.lang index 3b4fd59132c..24de04023f3 100644 --- a/htdocs/langs/hu_HU/zapier.lang +++ b/htdocs/langs/hu_HU/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr modul # Admin page # ZapierForDolibarrSetup = Zapier for Dolibarr beállítása +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/id_ID/accountancy.lang b/htdocs/langs/id_ID/accountancy.lang index 39711e7ed81..ddaca2284f1 100644 --- a/htdocs/langs/id_ID/accountancy.lang +++ b/htdocs/langs/id_ID/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Izinkan untuk mengelola jumlah nol yang berbeda di akhir BANK_DISABLE_DIRECT_INPUT=Nonaktifkan pencatatan langsung transaksi di rekening bank ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Aktifkan konsep ekspor di jurnal ACCOUNTANCY_COMBO_FOR_AUX=Aktifkan daftar kombo untuk akun anak perusahaan (mungkin lambat jika Anda memiliki banyak pihak ketiga) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Jurnal Penjualan ACCOUNTING_PURCHASE_JOURNAL=Jurnal Pembelian @@ -284,6 +285,7 @@ ShowTutorial=Perlihatkan Tutorial NotReconciled=Tidak didamaikan ## Admin +BindingOptions=Binding options ApplyMassCategories=Terapkan kategori secara massal AddAccountFromBookKeepingWithNoCategories=Akun yang tersedia belum dalam grup yang dipersonalisasi CategoryDeleted=Kategori untuk akun akuntansi telah dihapus diff --git a/htdocs/langs/id_ID/admin.lang b/htdocs/langs/id_ID/admin.lang index 79028ae89ed..6878f83da5e 100644 --- a/htdocs/langs/id_ID/admin.lang +++ b/htdocs/langs/id_ID/admin.lang @@ -1,5 +1,5 @@ # Dolibarr language file - Source file is en_US - admin -Foundation=Landasan +Foundation=Yayasan Version=Versi Publisher=Penerbit VersionProgram=Versi Program @@ -87,7 +87,7 @@ MySQLTimeZone=TimeZone MySql (database) TZHasNoEffect=Tanggal disimpan dan dikembalikan oleh server database seolah-olah disimpan sebagai string yang dikirimkan. Zona waktu hanya berpengaruh bila menggunakan fungsi UNIX_TIMESTAMP (yang seharusnya tidak digunakan oleh Dolibarr, jadi basis data TZ seharusnya tidak berpengaruh, bahkan jika diubah setelah data dimasukkan). Space=Ruang Table=Tabel -Fields=Fields +Fields=Baris Index=Indeks Mask=Topeng NextValue=Nilai berikutnya @@ -279,7 +279,7 @@ MAIN_MAIL_SMTP_SERVER=Host SMTP / SMTPS (nilai default di php.ini:%s ) MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Port SMTP / SMTPS (Tidak didefinisikan ke dalam PHP pada sistem mirip Unix) MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP / SMTPS Host (Tidak didefinisikan ke dalam PHP pada sistem mirip Unix) MAIN_MAIL_EMAIL_FROM=Email pengirim untuk email otomatis (nilai default di php.ini:%s ) -MAIN_MAIL_ERRORS_TO=Email yang digunakan untuk email kesalahan mengembalikan (bidang 'Kesalahan-To' dalam email yang dikirim) +MAIN_MAIL_ERRORS_TO=Email yang digunakan untuk email pengembalian kesalahan (baris 'Kesalahan-Ke' dalam email terkirim) MAIN_MAIL_AUTOCOPY_TO= Salin (Bcc) semua email yang dikirim ke MAIN_DISABLE_ALL_MAILS=Nonaktifkan semua pengiriman email (untuk tujuan pengujian atau demo) MAIN_MAIL_FORCE_SENDTO=Kirim semua email ke (bukan penerima sebenarnya, untuk tujuan pengujian) @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Email pengirim default untuk pengiriman manual (Email UserEmail=Email pengguna CompanyEmail=Email Perusahaan FeatureNotAvailableOnLinux=Fitur tidak tersedia di sistem seperti Unix. Uji program sendmail Anda secara lokal. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Jika terjemahan untuk bahasa ini tidak lengkap atau Anda menemukan kesalahan, Anda dapat memperbaikinya dengan mengedit file dalam direktorilangs / %sdan kirimkan perubahan Anda ke www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Jika terjemahan untuk bahasa ini tidak lengkap atau Anda menemukan kesalahan, Anda dapat memperbaikinya dengan mengedit file ke direktorilangs / %sdan kirimkan file yang dimodifikasi pada dolibarr.org/forum atau untuk pengembang di github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Setup Modul ModulesSetup=Modul / Pengaturan aplikasi ModuleFamilyBase=Sistem @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul%sharus diaktifkan terlebih dahulu jika And SecurityToken=Kunci untuk mengamankan URL NoSmsEngine=Tidak ada manajer pengirim SMS yang tersedia. Manajer pengirim SMS tidak diinstal dengan distribusi default karena tergantung pada vendor eksternal, tetapi Anda dapat menemukannya di %s PDF=PDF -PDFDesc=Opsi global untuk pembuatan PDF. -PDFAddressForging=Aturan untuk kotak alamat +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Sembunyikan semua informasi yang terkait dengan Pajak Penjualan / PPN PDFRulesForSalesTax=Aturan untuk Pajak Penjualan / PPN PDFLocaltax=Aturan untuk %s -HideLocalTaxOnPDF=Sembunyikan tingkat %s dalam kolom Pajak Penjualan +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Sembunyikan deskripsi produk HideRefOnPDF=Sembunyikan produk ref. HideDetailsOnPDF=Sembunyikan detail lini produk @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Ubah harga dengan nilai referensi dasar ditentukan pada MassConvert=Luncurkan konversi massal PriceFormatInCurrentLanguage=Format Harga Dalam Bahasa Saat Ini String=Tali +String1Line=String (1 line) TextLong=Teks panjang +TextLongNLines=Long text (n lines) HtmlText=Teks html Int=Bilangan bulat Float=Mengapung @@ -421,22 +424,22 @@ ExtrafieldMail = Email ExtrafieldUrl = Url ExtrafieldSelect = Daftar Pilihan ExtrafieldSelectList = Pilih dari tabel -ExtrafieldSeparator=Pemisah (bukan bidang) +ExtrafieldSeparator=Pemisah (bukan baris) ExtrafieldPassword=Kata kunci ExtrafieldRadio=Tombol radio (hanya satu pilihan) ExtrafieldCheckBox=Kotak centang ExtrafieldCheckBoxFromList=Kotak centang dari tabel ExtrafieldLink=Tautan ke suatu objek -ComputedFormula=Bidang yang dihitung -ComputedFormulaDesc=Anda dapat memasukkan rumus di sini menggunakan properti objek lain atau kode PHP apa pun untuk mendapatkan nilai komputasi dinamis. Anda dapat menggunakan rumus PHP yang kompatibel termasuk "?" kondisi operator, dan objek global berikut:$ db, $ conf, $ langs, $ mysoc, $ user, $ object .
    PERINGATAN : Hanya beberapa properti $ objek yang mungkin tersedia. Jika Anda membutuhkan properti yang tidak dimuat, ambil sendiri objek ke rumus Anda seperti pada contoh kedua.
    Menggunakan bidang yang dihitung berarti Anda tidak dapat memasukkan nilai apa pun dari antarmuka. Juga, jika ada kesalahan sintaks, rumus mungkin tidak menghasilkan apa-apa.

    Contoh rumus:
    $ objek-> id < 10 ? round($object-> id / 2, 2): ($ object-> id + 2 * $ user-> id) * (int), substr ($, 2,> )

    Contoh untuk memuat ulang objek
    (($ reloadedobj = new Societe ($ db)) && ($ reloadedobj-> fetchNoCompute ($ obj-> id? $ object? $ obj? $ obj> $ obj> $ obj> $ object? > rowid: $ object-> id))> 0))? $ reloadedobj-> array_options ['options_extrafieldkey'] * $ reloadedobj-> capital / 5: '-1'

    Contoh rumus lain untuk memaksa memuat objek dan objek induknya: a0342fccfda19bb $ tugas ($ rel ulang ($ rel) )) && ($ reloadedobj-> fetchNoCompute ($ object-> id)> 0) && ($ secondloadedobj = Proyek baru ($ db)) && ($ secondloadedobj-> fetchNoCompute ($ reloadedobj-> fk_project)> 0))? $ secondloadedobj-> ref: 'Proyek induk tidak ditemukan' -Computedpersistent=Simpan bidang yang dihitung -ComputedpersistentDesc=Bidang ekstra yang dikomputasi akan disimpan dalam basis data, namun nilainya hanya akan dihitung ulang ketika objek bidang ini diubah. Jika bidang yang dihitung bergantung pada objek lain atau data global, nilai ini mungkin salah !! -ExtrafieldParamHelpPassword=Membiarkan bidang ini kosong berarti nilai ini akan disimpan tanpa enkripsi (bidang harus disembunyikan hanya dengan bintang di layar).
    Setel 'otomatis' untuk menggunakan aturan enkripsi default untuk menyimpan kata sandi ke dalam basis data (kemudian nilai baca akan menjadi hash saja, tidak ada cara untuk mengambil nilai asli) +ComputedFormula=Baris yang dihitung +ComputedFormulaDesc=Anda dapat memasukkan rumus di sini menggunakan properti objek lain atau kode PHP apa pun untuk mendapatkan nilai komputasi dinamis. Anda dapat menggunakan rumus PHP yang kompatibel termasuk "?" kondisi operator, dan objek global berikut:$ db, $ conf, $ langs, $ mysoc, $ user, $ object .
    PERINGATAN : Hanya beberapa properti $ objek yang mungkin tersedia. Jika Anda membutuhkan properti yang tidak dimuat, ambil sendiri objek ke rumus Anda seperti pada contoh kedua.
    Menggunakan baris yang dihitung berarti Anda tidak dapat memasukkan nilai apa pun dari antarmuka. Juga, jika ada kesalahan sintaks, rumus mungkin tidak menghasilkan apa-apa.

    Contoh rumus:
    $ objek-> id < 10 ? round($object-> id / 2, 2): ($ object-> id + 2 * $ user-> id) * (int), substr ($, 2,> )

    Contoh untuk memuat ulang objek
    (($ reloadedobj = new Societe ($ db)) && ($ reloadedobj-> fetchNoCompute ($ obj-> id? $ object? $ obj? $ obj> $ obj> $ obj> $ object? > rowid: $ object-> id))> 0))? $ reloadedobj-> array_options ['options_extrafieldkey'] * $ reloadedobj-> capital / 5: '-1'

    Contoh rumus lain untuk memaksa memuat objek dan objek induknya: a0342fccfda19bb $ tugas ($ rel ulang ($ rel) )) && ($ reloadedobj-> fetchNoCompute ($ object-> id)> 0) && ($ secondloadedobj = Proyek baru ($ db)) && ($ secondloadedobj-> fetchNoCompute ($ reloadedobj-> fk_project)> 0))? $ secondloadedobj-> ref: 'Proyek induk tidak ditemukan' +Computedpersistent=Simpan baris yang dihitung +ComputedpersistentDesc=Baris ekstra yang dikomputasi akan disimpan dalam basisdata, namun nilainya hanya akan dikalkulasi ulang ketika objek baris ini diubah. Jika baris yang dihitung bergantung pada objek lain atau data global, nilai ini mungkin salah!! +ExtrafieldParamHelpPassword=Membiarkan baris ini kosong berarti nilai ini akan disimpan tanpa enkripsi (baris harus disembunyikan hanya dengan bintang di layar).
    Atur 'otomatis' untuk menggunakan aturan enkripsi secara default untuk menyimpan kata sandi ke dalam basisdata (kemudian nilai baca akan menjadi hash saja, tidak ada cara untuk mengambil nilai asli) ExtrafieldParamHelpselect=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0')

    misalnya:
    1, nilai1
    2, nilai2 a0342fccfda0b3f0f0f0fb0f0f0fb03 daftar tergantung pada daftar atribut pelengkap lain:
    1, nilai1 | options_ parent_list_code : parent_key
    2, value2 | options_ parent_list_code : parent_key

    dalam rangka untuk memiliki daftar tergantung pada daftar lain:
    1, nilai1 | parent_list_code : parent_key
    2, value2 | parent_list_code : parent_key ExtrafieldParamHelpcheckbox=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0')

    misalnya:
    1, value1
    2, value2 a0342fccfda2b3f0f3f0f3f ExtrafieldParamHelpradio=Daftar nilai harus berupa garis dengan kunci format, nilai (di mana kunci tidak boleh '0')

    misalnya:
    1, value1
    2, value2 a0342fccfda2b3f0f3f0f3f -ExtrafieldParamHelpsellist=Daftar nilai berasal dari tabel
    Sintaks: table_name: label_field: id_field :: filter
    Contoh: c_typent: libelle: id :: filter

    a = 1) untuk hanya menampilkan nilai aktif
    Anda juga dapat menggunakan $ ID $ dalam penyihir filter adalah id saat ini dari objek saat ini
    Untuk melakukan SELECT dalam menggunakan filter $ SEL $
    jika Anda ingin memfilter pada extrafields gunakan sintaks ekstra.fieldcode. = ... (di mana kode bidang adalah kode extrafield)

    Untuk memiliki daftar tergantung pada daftar atribut pelengkap lain:
    c_typent: libelle: id: options_ a049271e8641c0b0e_03_03_03_03_03_03_03_03_03_03_03_03_03_03_03_03_0_03 daftar tergantung pada daftar lain:
    c_typent: libelle: id: parent_list_code a0ae64758bac3 3z0 | parent_column: filter -ExtrafieldParamHelpchkbxlst=Daftar nilai berasal dari tabel
    Sintaks: table_name: label_field: id_field :: filter
    Contoh: c_typent: libelle: id :: filter

    filter a hanya dapat ditampilkan sebagai contoh a juga dapat menggunakan $ ID $ dalam penyihir filter adalah id saat ini dari objek saat ini
    Untuk melakukan SELECT dalam menggunakan $ SEL $
    jika Anda ingin memfilter pada extrafields gunakan sintaks extra.fieldcode = ... (di mana kode bidang adalah kode extrafield)

    dalam rangka untuk memiliki daftar tergantung pada daftar atribut pelengkap lain:
    c_typent: Libelle: id: options_ parent_list_code | parent_column: filter

    dalam rangka untuk memiliki daftar tergantung pada daftar lain: c_typent
    : libelle: id: parent_list_code | parent_column: filter +ExtrafieldParamHelpsellist=Daftar nilai berasal dari tabel
    Sintaks: table_name: label_field: id_field :: filter
    Contoh: c_typent: libelle: id :: filter

    a = 1) untuk hanya menampilkan nilai aktif
    Anda juga dapat menggunakan $ ID $ dalam penyihir filter adalah id saat ini dari objek saat ini
    Untuk melakukan SELECT dalam menggunakan filter $ SEL $
    jika Anda ingin memfilter pada extrafields gunakan sintaks ekstra.fieldcode. = ... (di mana kode baris adalah kode extrafield)

    Untuk memiliki daftar tergantung pada daftar atribut pelengkap lain:
    c_typent: libelle: id: options_ a049271e8641c0b0e_03_03_03_03_03_03_03_03_03_03_03_03_03_03_03_03_0_03 daftar tergantung pada daftar lain:
    c_typent: libelle: id: parent_list_code a0ae64758bac3 3z0 | parent_column: filter +ExtrafieldParamHelpchkbxlst=Daftar nilai berasal dari tabel
    Sintaks: table_name: label_field: id_field :: filter
    Contoh: c_typent: libelle: id :: filter

    filter a hanya dapat ditampilkan sebagai contoh a juga dapat menggunakan $ ID $ dalam penyihir filter adalah id saat ini dari objek saat ini
    Untuk melakukan SELECT dalam menggunakan $ SEL $
    jika Anda ingin memfilter pada extrafields gunakan sintaks extra.fieldcode = ... (di mana kode baris adalah kode extrafield)

    dalam rangka untuk memiliki daftar tergantung pada daftar atribut pelengkap lain:
    c_typent: Libelle: id: options_ parent_list_code | parent_column: filter

    dalam rangka untuk memiliki daftar tergantung pada daftar lain: c_typent
    : libelle: id: parent_list_code | parent_column: filter ExtrafieldParamHelplink=Parameter harus ObjectName: Classpath
    Sintaks: ObjectName: Classpath
    Contoh:
    Societe: societe / class / societe.class.php a0342fccfda19bpp kontak: kontak / kontak dengan kontak kelas ExtrafieldParamHelpSeparator=Biarkan kosong untuk pemisah sederhana
    Setel ini menjadi 1 untuk pemisah runtuh (buka secara default untuk sesi baru, kemudian status disimpan untuk setiap sesi pengguna) status disimpan sebelum setiap sesi pengguna) LibraryToBuildPDF=Perpustakaan digunakan untuk pembuatan PDF @@ -446,7 +449,7 @@ LinkToTestClickToDial=Masukkan nomor telepon untuk menelepon untuk menunjukkan t RefreshPhoneLink=Segarkan tautan LinkToTest=Tautan yang dapat diklik yang dihasilkan untuk pengguna%s (klik nomor telepon untuk menguji) KeepEmptyToUseDefault=Biarkan kosong untuk menggunakan nilai default -KeepThisEmptyInMostCases=Dalam kebanyakan kasus, Anda dapat membiarkan bidang ini kosong. +KeepThisEmptyInMostCases=Dalam kebanyakan kasus, Anda dapat membiarkan baris ini kosong. DefaultLink=Link Standar SetAsDefault=Ditetapkan sebagai default ValueOverwrittenByUserSetup=Peringatan, nilai ini dapat ditimpa oleh pengaturan khusus pengguna (setiap pengguna dapat mengatur url clicktodialnya sendiri) @@ -481,7 +484,7 @@ WarningPHPMailSPF=Jika nama domain di alamat email pengirim Anda dilindungi oleh ClickToShowDescription=Klik untuk menampilkan deskripsi DependsOn=Modul ini membutuhkan modul RequiredBy=Modul ini diperlukan oleh modul -TheKeyIsTheNameOfHtmlField=Ini adalah nama bidang HTML. Pengetahuan teknis diperlukan untuk membaca konten halaman HTML untuk mendapatkan nama kunci bidang. +TheKeyIsTheNameOfHtmlField=Ini adalah nama baris HTML. Pengetahuan teknis diperlukan untuk membaca konten halaman HTML untuk mendapatkan nama kunci baris. PageUrlForDefaultValues=Anda harus memasukkan jalur relatif URL halaman. Jika Anda memasukkan parameter dalam URL, nilai default akan efektif jika semua parameter ditetapkan ke nilai yang sama. PageUrlForDefaultValuesCreate=
    Contoh:
    Untuk formulir untuk membuat pihak ketiga baru, itu%s .
    Untuk URL modul eksternal yang diinstal ke direktori kustom, jangan sertakan "custom /", jadi gunakan path sepertimymodule / mypage.php dan bukan custom / mymodule / mypage.php.
    Jika Anda ingin nilai default hanya jika url memiliki beberapa parameter, Anda dapat menggunakan%s PageUrlForDefaultValuesList=
    Contoh:
    Untuk halaman yang berisi daftar pihak ketiga, itu adalah%s .
    Untuk URL modul eksternal yang diinstal ke direktori custom, jangan sertakan "custom /" jadi gunakan path sepertimymodule / mypagelist.php dan bukan custom / mymodule / mypagelist.php.
    Jika Anda ingin nilai default hanya jika url memiliki beberapa parameter, Anda dapat menggunakan%s @@ -489,8 +492,8 @@ AlsoDefaultValuesAreEffectiveForActionCreate=Perhatikan juga bahwa menimpa nilai EnableDefaultValues=Aktifkan penyesuaian nilai default EnableOverwriteTranslation=Aktifkan penggunaan terjemahan yang ditimpa GoIntoTranslationMenuToChangeThis=Terjemahan telah ditemukan untuk kunci dengan kode ini. Untuk mengubah nilai ini, Anda harus mengeditnya dari Home-Setup-translation. -WarningSettingSortOrder=Peringatan, pengaturan urutan penyortiran default dapat menyebabkan kesalahan teknis saat membuka halaman daftar jika bidang adalah bidang yang tidak dikenal. Jika Anda mengalami kesalahan seperti itu, kembali ke halaman ini untuk menghapus urutan penyortiran default dan mengembalikan perilaku default. -Field=Bidang +WarningSettingSortOrder=Peringatan, pengaturan urutan penyortiran default dapat menyebabkan kesalahan teknis saat membuka halaman daftar jika baris adalah baris yang tidak dikenal. Jika Anda mengalami kesalahan seperti itu, kembali ke halaman ini untuk menghapus urutan penyortiran default dan mengembalikan perilaku default. +Field=Baris ProductDocumentTemplates=Templat dokumen untuk menghasilkan dokumen produk FreeLegalTextOnExpenseReports=Teks hukum gratis tentang laporan pengeluaran WatermarkOnDraftExpenseReports=Tanda air pada draft laporan pengeluaran @@ -543,9 +546,9 @@ Module54Desc=Manajemen kontrak (layanan atau langganan berulang) Module55Name=Barcode Module55Desc=Manajemen barcode Module56Name=Pembayaran dengan transfer kredit -Module56Desc=Manajemen pembayaran pemasok dengan perintah transfer kredit. Ini termasuk pembuatan file SEPA untuk negara-negara Eropa. -Module57Name=Pembayaran Debit Bank Langsung -Module57Desc=Manajemen pesanan pembayaran Debit Langsung. Ini termasuk pembuatan file SEPA untuk negara-negara Eropa. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integrasi sistem ClickToDial (Asterisk, ...) Module59Name=Bookmark4u @@ -606,7 +609,7 @@ Module1520Desc=Pembuatan dokumen email massal Module1780Name=Kategori-Kategori Module1780Desc=Buat tag / kategori (produk, pelanggan, pemasok, kontak, atau anggota) Module2000Name=Editor WYSIWYG -Module2000Desc=Izinkan bidang teks diedit / diformat menggunakan CKEditor (html) +Module2000Desc=Izinkan baris teks diedit / diformat menggunakan CKEditor (html) Module2200Name=Harga Dinamis Module2200Desc=Gunakan ekspresi matematika untuk menghasilkan harga secara otomatis Module2300Name=Pekerjaan terjadwal @@ -836,9 +839,16 @@ Permission532=Membuat/Merubah Jasa Permission534=Menghapus Jasa Permission536=Lihat / kelola layanan tersembunyi Permission538=Layanan ekspor +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Baca Bills of Material Permission651=Buat / Perbarui Bills of Material Permission652=Hapus Bills of Material +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Membaca Sumbangan Permission702=Membuat/Merubah Sumbangan Permission703=Menghapus Sumbangan @@ -848,6 +858,8 @@ Permission773=Hapus laporan pengeluaran Permission774=Baca semua laporan pengeluaran (bahkan untuk pengguna bukan bawahan) Permission775=Menyetujui laporan pengeluaran Permission776=Membayar laporan pengeluaran +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Laporan pengeluaran ekspor Permission1001=Membaca Stok Permission1002=Membuat/Merubah Gudang @@ -900,6 +912,7 @@ Permission2515=Siapkan direktori dokumen Permission2801=Gunakan klien FTP dalam mode baca (hanya menjelajah dan mengunduh) Permission2802=Gunakan klien FTP dalam mode tulis (hapus atau unggah file) Permission3200=Baca agenda yang diarsipkan dan sidik jari +Permission3301=Generate new modules Permission4001=Lihat karyawan Permission4002=Buat karyawan Permission4003=Hapus karyawan @@ -947,7 +960,8 @@ Permission63003=Hapus sumber daya Permission63004=Tautkan sumber daya ke agenda agenda DictionaryCompanyType=Jenis pihak ketiga DictionaryCompanyJuridicalType=Badan hukum pihak ketiga -DictionaryProspectLevel=Potensi prospek +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Negara Bagian / Provinsi DictionaryRegion=Daerah DictionaryCountry=Negara @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Template Email DictionaryUnits=Unit DictionaryMeasuringUnits=Unit Pengukur DictionarySocialNetworks=Jaringan sosial -DictionaryProspectStatus=Status prospek +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Jenis cuti DictionaryOpportunityStatus=Status memimpin untuk proyek / prospek DictionaryExpenseTaxCat=Laporan biaya - Kategori transportasi @@ -1076,7 +1091,7 @@ LoginPage=Halaman masuk BackgroundImageLogin=Gambar latar belakang PermanentLeftSearchForm=Formulir pencarian permanen di menu sebelah kiri DefaultLanguage=Bahasa default -EnableMultilangInterface=Aktifkan dukungan multi bahasa +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Tampilkan logo perusahaan di menu CompanyInfo=Perusahaan/Organisasi CompanyIds=Identitas Perusahaan / Organisasi @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Kriteria pencarian diperlukan setidaknya NewTranslationStringToShow=String terjemahan baru untuk ditampilkan OriginalValueWas=Terjemahan aslinya ditimpa. Nilai asli adalah:

    %s TransKeyWithoutOriginalValue=Anda memaksa terjemahan baru untuk kunci terjemahan ' %s ' yang tidak ada dalam file bahasa apa pun -TotalNumberOfActivatedModules=Aplikasi / modul yang diaktifkan:%s/%s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Anda setidaknya harus mengaktifkan 1 modul ClassNotFoundIntoPathWarning=Kelas %s tidak ditemukan di jalur PHP YesInSummer=Ya di musim panas @@ -1260,7 +1276,7 @@ PreloadOPCode=OPCode preloaded digunakan AddRefInList=Tampilkan Pelanggan / Vendor ref. daftar info (daftar pilih atau kotak kombo) dan sebagian besar hyperlink.
    Pihak Ketiga akan muncul dengan format nama "CC12345 - SC45678 - The Big Company corp." alih-alih "Perusahaan Besar Perusahaan". AddAdressInList=Tampilkan daftar info alamat Pelanggan / Vendor (daftar pilih atau kotak kombo)
    Pihak Ketiga akan muncul dengan format nama "Korporasi Perusahaan Besar - 21 lompat jalan 123456 Kota besar - AS" alih-alih "Korps Perusahaan Besar". AskForPreferredShippingMethod=Mintalah metode pengiriman pilihan untuk Pihak Ketiga. -FieldEdition=Edisi bidang %s +FieldEdition=Edisi baris %s FillThisOnlyIfRequired=Contoh: +2 (isi hanya jika masalah offset zona waktu dialami) GetBarCode=Dapatkan barcode NumberingModules=Model penomoran @@ -1529,8 +1545,8 @@ DefaultValuesDesc=Di sini Anda dapat menentukan nilai default yang ingin Anda gu DefaultCreateForm=Nilai default (untuk digunakan pada formulir) DefaultSearchFilters=Filter pencarian default DefaultSortOrder=Sortir pesanan default -DefaultFocus=Bidang fokus default -DefaultMandatory=Bidang formulir wajib +DefaultFocus=Baris fokus default +DefaultMandatory=Baris formulir wajib ##### Products ##### ProductSetup=Pengaturan modul produk ServiceSetup=Pengaturan modul layanan @@ -1646,7 +1662,7 @@ DetailTarget=Target untuk tautan (_blank atas membuka jendela baru) DetailLevel=Level (-1: menu atas, 0: menu header,> 0 menu dan sub menu) ModifMenu=Perubahan menu DeleteMenu=Hapus entri menu -ConfirmDeleteMenu=Apakah Anda yakin ingin menghapus entri menu%s ? +ConfirmDeleteMenu=Apakah Anda yakin ingin menghapus entri menu%s? FailedToInitializeMenu=Gagal menginisialisasi menu ##### Tax ##### TaxSetup=Pajak, pajak sosial atau fiskal dan pengaturan modul dividen @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Gunakan jenis agenda (dikelola dalam Pengaturan menu -> Ka AGENDA_USE_EVENT_TYPE_DEFAULT=Secara otomatis mengatur nilai default ini untuk jenis agenda di agenda buat formulir AGENDA_DEFAULT_FILTER_TYPE=Secara otomatis mengatur jenis agenda ini di filter pencarian tampilan agenda AGENDA_DEFAULT_FILTER_STATUS=Secara otomatis mengatur status ini untuk agenda di filter pencarian tampilan agenda -AGENDA_DEFAULT_VIEW=Tab mana yang ingin Anda buka secara default saat memilih menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Aktifkan pengingat agendamelalui email(opsi pengingat / penundaan dapat ditentukan pada setiap agenda). Catatan: Modul%s harus diaktifkan dan diatur dengan benar agar pengingat dikirim pada frekuensi yang benar. AGENDA_REMINDER_BROWSER=Aktifkan pengingat agendadi browser pengguna(ketika tanggal agenda tercapai, setiap pengguna dapat menolak ini dari pertanyaan konfirmasi browser) AGENDA_REMINDER_BROWSER_SOUND=Aktifkan pemberitahuan suara @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Tampilkan objek yang ditautkan ke tampilan agenda ##### Clicktodial ##### ClickToDialSetup=Klik Untuk Memanggil pengaturan modul ClickToDialUrlDesc=Url dipanggil ketika klik pada telepon picto dilakukan. Di URL, Anda dapat menggunakan tag
    __PHONETO__yang akan diganti dengan nomor telepon orang untuk memanggil
    __PHONEFROM__yang akan diganti dengan nomor telepon memanggil orang (Anda)
    __LOGIN__yang akan diganti dengan clicktodial login (didefinisikan pada kartu pengguna)
    __PASS__yang akan diganti dengan password clicktodial (didefinisikan pada kartu pengguna). -ClickToDialDesc=Modul ini membuat nomor telepon tautan yang dapat diklik. Klik ikon akan membuat ponsel Anda memanggil nomor tersebut. Ini dapat digunakan untuk memanggil sistem call-center dari Dolibarr yang dapat memanggil nomor telepon pada sistem SIP misalnya. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Gunakan hanya tautan "tel:" pada nomor telepon ClickToDialUseTelLinkDesc=Gunakan metode ini jika pengguna Anda memiliki softphone atau antarmuka perangkat lunak yang diinstal pada komputer yang sama dengan browser, dan dipanggil ketika Anda mengklik tautan di browser Anda yang dimulai dengan "tel:". Jika Anda memerlukan solusi server lengkap (tidak perlu instalasi perangkat lunak lokal), Anda harus mengatur ini ke "Tidak" dan isi kolom selanjutnya. ##### Point Of Sale (CashDesk) ##### @@ -1813,10 +1829,11 @@ BackgroundTableLineOddColor=Warna latar untuk garis tabel ganjil BackgroundTableLineEvenColor=Warna latar belakang untuk garis tabel genap MinimumNoticePeriod=Periode pemberitahuan minimum (Permintaan cuti Anda harus dilakukan sebelum penundaan ini) NbAddedAutomatically=Jumlah hari yang ditambahkan ke penghitung pengguna (secara otomatis) setiap bulan -EnterAnyCode=Bidang ini berisi referensi untuk mengidentifikasi baris. Masukkan nilai apa pun pilihan Anda, tetapi tanpa karakter khusus. +EnterAnyCode=Baris ini berisi referensi untuk mengidentifikasi baris. Masukkan nilai apa pun pilihan Anda, tetapi tanpa karakter khusus. Enter0or1=Masukkan 0 atau 1 UnicodeCurrency=Masukkan di sini di antara kurung kurawal, daftar nomor byte yang mewakili simbol mata uang. Misalnya: untuk $, masukkan [36] - untuk brazil real R $ [82,36] - untuk €, masukkan [8364] ColorFormat=Warna RGB dalam format HEX, mis .: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Posisi baris ke dalam daftar kombo SellTaxRate=Tarif pajak penjualan RecuperableOnly=Ya untuk PPN "Tidak Ditanggapi tetapi Dapat Dipulihkan" yang didedikasikan untuk beberapa negara bagian di Prancis. Simpan nilai "Tidak" dalam semua kasus lainnya. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Permintaan kutipan MailToSendSupplierOrder=Order pembelian MailToSendSupplierInvoice=Faktur vendor MailToSendContract=Kontrak +MailToSendReception=Penerimaan MailToThirdparty=Pihak Ketiga MailToMember=Anggota MailToUser=Pengguna @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s tersedia. Versi %s ada ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s tersedia. Versi %s adalah versi pemeliharaan, jadi hanya berisi perbaikan bug. Kami menyarankan semua pengguna untuk meningkatkan ke versi ini. Rilis pemeliharaan tidak memperkenalkan fitur baru atau perubahan pada database. Anda dapat mengunduhnya dari area unduhan https://www.dolibarr.org portal (subdirektori versi Stabil). Anda dapat membaca ChangeLog untuk daftar lengkap perubahan. MultiPriceRuleDesc=Ketika opsi "Beberapa tingkat harga per produk / layanan" diaktifkan, Anda dapat menentukan harga yang berbeda (satu per tingkat harga) untuk setiap produk. Untuk menghemat waktu Anda, di sini Anda dapat memasukkan aturan untuk secara otomatis menghitung ulang harga untuk setiap level berdasarkan harga level pertama, jadi Anda hanya perlu memasukkan harga untuk level pertama untuk setiap produk. Halaman ini dirancang untuk menghemat waktu Anda tetapi hanya berguna jika harga Anda untuk setiap level relatif terhadap level pertama. Anda dapat mengabaikan halaman ini dalam banyak kasus. ModelModulesProduct=Template untuk dokumen produk +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Agar dapat menghasilkan kode secara otomatis, Anda harus terlebih dahulu menetapkan manajer untuk secara otomatis menentukan nomor kode batang. SeeSubstitutionVars=Lihat * catatan untuk daftar kemungkinan variabel substitusi SeeChangeLog=Lihat file ChangeLog (hanya bahasa Inggris) @@ -1894,9 +1913,10 @@ MAIN_PDF_MARGIN_LEFT=Margin kiri pada PDF MAIN_PDF_MARGIN_RIGHT=Margin kanan pada PDF MAIN_PDF_MARGIN_TOP=Margin teratas pada PDF MAIN_PDF_MARGIN_BOTTOM=Margin bawah pada PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Tidak diperlukan pengaturan khusus untuk modul ini. SetToYesIfGroupIsComputationOfOtherGroups=Setel ini menjadi ya jika grup ini merupakan perhitungan grup lain -EnterCalculationRuleIfPreviousFieldIsYes=Masukkan aturan kalkulasi jika bidang sebelumnya disetel ke Ya (Misalnya 'CODEGRP1 + CODEGRP2') +EnterCalculationRuleIfPreviousFieldIsYes=Masukkan aturan kalkulasi jika baris sebelumnya disetel ke Ya (Misalnya 'CODEGRP1 + CODEGRP2') SeveralLangugeVariatFound=Beberapa varian bahasa ditemukan RemoveSpecialChars=Hapus karakter khusus COMPANY_AQUARIUM_CLEAN_REGEX=Regex filter untuk membersihkan nilai (COMPANY_AQUARIUM_CLEAN_REGEX) @@ -1905,14 +1925,14 @@ COMPANY_DIGITARIA_UNIQUE_CODE=Duplikat tidak diizinkan GDPRContact=Petugas Perlindungan Data (DPO, Privasi Data, atau kontak GDPR) GDPRContactDesc=Jika Anda menyimpan data tentang perusahaan / warga negara Eropa, Anda dapat menyebutkan kontak yang bertanggung jawab atas Peraturan Perlindungan Data Umum di sini HelpOnTooltip=Bantu teks untuk ditampilkan di tooltip -HelpOnTooltipDesc=Letakkan teks atau kunci terjemahan di sini agar teks ditampilkan di tooltip saat bidang ini muncul dalam formulir +HelpOnTooltipDesc=Letakkan teks atau kunci terjemahan di sini agar teks ditampilkan di tooltip saat baris ini muncul dalam formulir YouCanDeleteFileOnServerWith=Anda dapat menghapus file ini di server dengan Command Line:
    %s ChartLoaded=Bagan akun dimuat SocialNetworkSetup=Pengaturan modul Jejaring Sosial EnableFeatureFor=Aktifkan fitur untuk%s VATIsUsedIsOff=Catatan: Opsi untuk menggunakan Pajak Penjualan atau PPN telah ditetapkan keOff dalam menu %s - %s, jadi pajak penjualan atau PPN yang digunakan akan selalu 0 untuk penjualan. SwapSenderAndRecipientOnPDF=Tukar posisi pengirim dan alamat penerima pada dokumen PDF -FeatureSupportedOnTextFieldsOnly=Peringatan, fitur yang didukung hanya pada bidang teks. Juga parameter URL action = buat atau action = edit harus diatur ATAU nama halaman harus diakhiri dengan 'new.php' untuk memicu fitur ini. +FeatureSupportedOnTextFieldsOnly=Peringatan, fitur yang didukung hanya pada baris teks. Juga parameter URL action = buat atau action = edit harus diatur ATAU nama halaman harus diakhiri dengan 'new.php' untuk memicu fitur ini. EmailCollector=Kolektor email EmailCollectorDescription=Tambahkan pekerjaan terjadwal dan halaman pengaturan untuk memindai secara teratur kotak email (menggunakan protokol IMAP) dan merekam email yang diterima ke dalam aplikasi Anda, di tempat yang tepat dan / atau membuat beberapa catatan secara otomatis (seperti lead). NewEmailCollector=Kolektor Email Baru @@ -1933,13 +1953,14 @@ NothingProcessed=Tidak ada yang dilakukan XEmailsDoneYActionsDone=email %s memenuhi syarat, email %s berhasil diproses (untuk catatan / tindakan %s dilakukan) RecordEvent=Rekam agenda email CreateLeadAndThirdParty=Buat timbal (dan pihak ketiga jika perlu) -CreateTicketAndThirdParty=Buat tiket (dan pihak ketiga jika perlu) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Kode hasil terbaru NbOfEmailsInInbox=Jumlah email dalam direktori sumber LoadThirdPartyFromName=Muat pihak ketiga yang mencari di %s (hanya memuat) LoadThirdPartyFromNameOrCreate=Muat pencarian pihak ketiga di %s (buat jika tidak ditemukan) -WithDolTrackingID=Referensi Dolibarr ditemukan di ID Pesan -WithoutDolTrackingID=Referensi Dolibarr tidak ditemukan di ID Pesan +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Kode Pos MainMenuCode=Kode entri menu (mainmenu) ECMAutoTree=Tampilkan pohon ECM otomatis @@ -1981,10 +2002,10 @@ ImportSetup=Pengaturan impor modul InstanceUniqueID=ID unik dari instance SmallerThan=Lebih kecil dari LargerThan=lebih besar dari -IfTrackingIDFoundEventWillBeLinked=Perhatikan bahwa Jika ID pelacakan ditemukan dalam email yang masuk, agenda tersebut akan secara otomatis ditautkan ke objek terkait. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Dengan akun GMail, jika Anda mengaktifkan validasi 2 langkah, disarankan untuk membuat kata sandi khusus kedua untuk aplikasi alih-alih menggunakan kata sandi akun Anda sendiri dari https://myaccount.google.com/. EmailCollectorTargetDir=Ini mungkin merupakan perilaku yang diinginkan untuk memindahkan email ke tag / direktori lain ketika berhasil diproses. Cukup atur nama direktori di sini untuk menggunakan fitur ini (JANGAN menggunakan karakter khusus dalam nama). Perhatikan bahwa Anda juga harus menggunakan akun login baca / tulis. -EmailCollectorLoadThirdPartyHelp=Anda dapat menggunakan tindakan ini untuk menggunakan konten email untuk menemukan dan memuat pihak ketiga yang ada di database Anda. Pihak ketiga yang ditemukan (atau dibuat) akan digunakan untuk mengikuti tindakan yang membutuhkannya. Di bidang parameter Anda dapat menggunakan misalnya 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' jika Anda ingin mengekstrak nama pihak ketiga dari string 'Nama: nama untuk menemukan' ditemukan di dalam tubuh. +EmailCollectorLoadThirdPartyHelp=Anda dapat menggunakan tindakan ini untuk menggunakan konten email untuk menemukan dan memuat pihak ketiga yang ada di database Anda. Pihak ketiga yang ditemukan (atau dibuat) akan digunakan untuk mengikuti tindakan yang membutuhkannya. Di baris parameter Anda dapat menggunakan misalnya 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' jika Anda ingin mengekstrak nama pihak ketiga dari string 'Nama: nama untuk menemukan' ditemukan di dalam tubuh. EndPointFor=Titik akhir untuk %s: %s DeleteEmailCollector=Hapus pengumpul email ConfirmDeleteEmailCollector=Anda yakin ingin menghapus pengumpul email ini? @@ -2005,3 +2026,7 @@ RssNote=Catatan: Setiap definisi umpan RSS menyediakan widget yang harus Anda ak JumpToBoxes=Langsung ke Pengaturan -> Widget MeasuringUnitTypeDesc=Gunakan di sini nilai seperti "ukuran", "permukaan", "volume", "berat", "waktu" MeasuringScaleDesc=Skala adalah jumlah tempat Anda harus memindahkan bagian desimal untuk mencocokkan unit referensi default. Untuk tipe unit "waktu", itu adalah jumlah detik. Nilai antara 80 dan 99 adalah nilai yang dicadangkan. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/id_ID/agenda.lang b/htdocs/langs/id_ID/agenda.lang index 800cf53c3bf..e3bcae405c6 100644 --- a/htdocs/langs/id_ID/agenda.lang +++ b/htdocs/langs/id_ID/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Jumlah kejadian ListOfActions=Daftar kejadian EventReports=Laporan agenda Location=Tempat -ToUserOfGroup=Pada setiap pengguna dalam grup +ToUserOfGroup=Agenda yang ditugaskan untuk setiap pengguna dalam grup EventOnFullDay=Perihal di sepanjang hari (s) MenuToDoActions=Semua peristiwa yang tidak lengkap MenuDoneActions=Semua agenda dihentikan @@ -86,6 +86,8 @@ ProposalDeleted=Proposal dihapus OrderDeleted=Pesanan dihapus InvoiceDeleted=Faktur dihapus DraftInvoiceDeleted=Faktur konsep dihapus +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Produk %s dibuat PRODUCT_MODIFYInDolibarr=Produk %s dimodifikasi PRODUCT_DELETEInDolibarr=Produk %s dihapus @@ -158,3 +160,9 @@ DateStartPlusOne=Tanggal mulai + 1 jam SetAllEventsToTodo=Atur semua agenda untuk dikerjakan SetAllEventsToInProgress=Setel semua agenda sedang berlangsung SetAllEventsToFinished=Setel semua agenda hingga selesai +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/id_ID/banks.lang b/htdocs/langs/id_ID/banks.lang index 40a7fcab285..0b560405473 100644 --- a/htdocs/langs/id_ID/banks.lang +++ b/htdocs/langs/id_ID/banks.lang @@ -37,7 +37,7 @@ IbanValid=BAN valid IbanNotValid=BAN tidak valid StandingOrders=Pesanan debit langsung StandingOrder=Pesanan debit langsung -PaymentByDirectDebit=Payment by direct debit +PaymentByDirectDebit=Pembayaran dengan debit langsung PaymentByBankTransfers=Pembayaran dengan transfer kredit PaymentByBankTransfer=Pembayaran dengan transfer kredit AccountStatement=Rekening diff --git a/htdocs/langs/id_ID/boxes.lang b/htdocs/langs/id_ID/boxes.lang index 44f5cc1992f..d4ae8002577 100644 --- a/htdocs/langs/id_ID/boxes.lang +++ b/htdocs/langs/id_ID/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Pesanan Vendor: %s terakhir dimodifikasi BoxTitleLastModifiedCustomerBills=Faktur Pelanggan: %s terakhir dimodifikasi BoxTitleLastModifiedCustomerOrders=Pesanan Penjualan: %s terakhir dimodifikasi BoxTitleLastModifiedPropals=Proposal dimodifikasi %s terbaru +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Tagihan pelanggan ForCustomersOrders=Pesanan pelanggan ForProposals=Proposal @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Akun penangguhan tidak ditentukan BoxLastCustomerShipments=Pengiriman pelanggan terakhir BoxTitleLastCustomerShipments=Pengiriman pelanggan %s terbaru NoRecordedShipments=Tidak ada pengiriman pelanggan yang direkam +# Pages +AccountancyHome=Akuntansi diff --git a/htdocs/langs/id_ID/cashdesk.lang b/htdocs/langs/id_ID/cashdesk.lang index 24bb046b5f9..bc39b8bf56b 100644 --- a/htdocs/langs/id_ID/cashdesk.lang +++ b/htdocs/langs/id_ID/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=Modul POS BasicPhoneLayout=Gunakan tata letak dasar untuk ponsel SetupOfTerminalNotComplete=Pengaturan terminal %s tidak lengkap DirectPayment=Pembayaran langsung -DirectPaymentButton=Tombol pembayaran tunai langsung +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Faktur sudah divalidasi NoLinesToBill=Tidak ada garis untuk ditagih CustomReceipt=Tanda Terima Kustom @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Modul eksternal dengan fitur tambahan. Dapat m PrintMethod=Metode cetak ReceiptPrinterMethodDescription=Metode yang kuat dengan banyak parameter. Penuh dapat disesuaikan dengan templat. Tidak dapat mencetak dari cloud. ByTerminal=Dengan terminal -TakeposNumpadUsePaymentIcon=Gunakan ikon pembayaran di numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Modul penomoran untuk penjualan POS CashDeskGenericMaskCodes6 = tag
    {TN}digunakan untuk menambahkan nomor terminal TakeposGroupSameProduct=Kelompokkan lini produk yang sama StartAParallelSale=Mulai penjualan paralel baru -ControlCashOpening=Kontrol kotak uang di pos pembukaan +ControlCashOpening=Control cash box at opening POS CloseCashFence=Tutup pagar uang CashReport=Laporan tunai MainPrinterToUse=Printer utama untuk digunakan @@ -112,8 +112,13 @@ RestaurantMenu=Tidak bisa CustomerMenu=Menu pelanggan ScanToMenu=Pindai kode QR untuk melihat menu ScanToOrder=Pindai kode QR untuk memesan -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +Appearance=Penampilan +HideCategoryImages=Sembunyikan Kategori Gambar +HideProductImages=Sembunyikan Gambar Produk +NumberOfLinesToShow=Jumlah baris gambar untuk ditampilkan +DefineTablePlan=Definisikan rencana tabel +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/id_ID/compta.lang b/htdocs/langs/id_ID/compta.lang index 8f26144e6ee..5b49606be63 100644 --- a/htdocs/langs/id_ID/compta.lang +++ b/htdocs/langs/id_ID/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Pajak sosial atau fiskal SocialContributions=Pajak sosial atau fiskal SocialContributionsDeductibles=Pajak sosial atau fiskal yang dapat dikurangkan SocialContributionsNondeductibles=Pajak sosial atau fiskal yang tidak dapat dikurangi +DateOfSocialContribution=Tanggal untuk pajak sosial atau fiskal LabelContrib=Kontribusi label TypeContrib=Ketik kontribusi MenuSpecialExpenses=Pengeluaran khusus diff --git a/htdocs/langs/id_ID/contracts.lang b/htdocs/langs/id_ID/contracts.lang index 956889624f2..d4c44c66371 100644 --- a/htdocs/langs/id_ID/contracts.lang +++ b/htdocs/langs/id_ID/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Menjalankan layanan MenuExpiredServices=Layanan kedaluwarsa MenuClosedServices=Layanan tertutup NewContract=Kontrak baru -NewContractSubscription=Kontrak / langganan baru +NewContractSubscription=Kontrak baru atau langganan baru AddContract=Buat kontrak DeleteAContract=Hapus kontrak ActivateAllOnContract=Aktifkan semua layanan diff --git a/htdocs/langs/id_ID/errors.lang b/htdocs/langs/id_ID/errors.lang index 01e1b2bd8fb..0d776c69a27 100644 --- a/htdocs/langs/id_ID/errors.lang +++ b/htdocs/langs/id_ID/errors.lang @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Sintaks buruk untuk kode vendor ErrorSupplierCodeRequired=Diperlukan kode vendor ErrorSupplierCodeAlreadyUsed=Kode vendor sudah digunakan ErrorBadParameters=Parameter buruk -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Parameter salah atau hilang ErrorBadValueForParameter=Nilai salah '%s' untuk parameter '%s' ErrorBadImageFormat=File gambar tidak memiliki format yang didukung (PHP Anda tidak mendukung fungsi untuk mengonversi gambar dari format ini) ErrorBadDateFormat=Nilai '%s' memiliki format tanggal yang salah @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nilai baru tidak bisa sama dengan nilai lama ErrorFailedToValidatePasswordReset=Gagal menginstal ulang kata sandi. Mungkin pengulangan sudah dilakukan (tautan ini hanya dapat digunakan satu kali). Jika tidak, coba restart proses reinit. ErrorToConnectToMysqlCheckInstance=Koneksi ke basis data gagal. Periksa server database sedang berjalan (misalnya, dengan mysql / mariadb, Anda dapat meluncurkannya dari baris perintah dengan 'sudo service mysql start'). ErrorFailedToAddContact=Gagal menambahkan kontak -ErrorDateMustBeBeforeToday=Tanggal tidak boleh lebih besar dari hari ini +ErrorDateMustBeBeforeToday=Tanggal harus lebih rendah dari hari ini +ErrorDateMustBeInFuture=Tanggal harus lebih besar dari hari ini ErrorPaymentModeDefinedToWithoutSetup=Mode pembayaran ditetapkan untuk mengetik %s tetapi pengaturan modul Faktur tidak selesai untuk menentukan informasi yang akan ditampilkan untuk mode pembayaran ini. ErrorPHPNeedModule=Kesalahan, PHP Anda harus memiliki modul%sdiinstal untuk menggunakan fitur ini. ErrorOpenIDSetupNotComplete=Anda menyiapkan file konfigurasi Dolibarr untuk mengizinkan otentikasi OpenID, tetapi URL layanan OpenID tidak didefinisikan ke dalam konstanta %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Tidak ada jumlah yang cukup ErrorOnlyOneFieldForGroupByIsPossible=Hanya 1 bidang untuk 'Kelompokkan menurut' yang dimungkinkan (yang lain dibuang) ErrorTooManyDifferentValueForSelectedGroupBy=Ditemukan terlalu banyak nilai yang berbeda (lebih dari%s ) untuk bidang ' %s ', jadi kami tidak dapat menggunakan grafik ', jadi kami tidak dapat menggunakan grafik', jadi kami tidak dapat menggunakan grafik ', jadi kami tidak dapat menggunakan grafik', jadi kami tidak dapat menggunakan grafik ', jadi kami tidak dapat menggunakan grafik', jadi kami tidak dapat menggunakan grafik ', jadi kami tidak dapat menggunakan grafik', jadi kami tidak dapat menggunakannya sebagai grafik ' Bidang 'Grup Menurut' telah dihapus. Mungkin Anda ingin menggunakannya sebagai X-Axis? ErrorReplaceStringEmpty=Kesalahan, string untuk diganti menjadi kosong +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Parameter PHP Anda upload_max_filesize (%s) lebih tinggi dari parameter PHP post_max_size (%s). Ini bukan pengaturan yang konsisten. WarningPasswordSetWithNoAccount=Kata sandi ditetapkan untuk anggota ini. Namun, tidak ada akun pengguna yang dibuat. Jadi kata sandi ini disimpan tetapi tidak dapat digunakan untuk masuk ke Dolibarr. Ini dapat digunakan oleh modul / antarmuka eksternal tetapi jika Anda tidak perlu mendefinisikan login atau kata sandi untuk anggota, Anda dapat menonaktifkan opsi "Kelola login untuk setiap anggota" dari pengaturan modul Anggota. Jika Anda perlu mengelola login tetapi tidak memerlukan kata sandi, Anda dapat mengosongkan isian ini untuk menghindari peringatan ini. Catatan: Email juga dapat digunakan sebagai login jika anggota tersebut tertaut ke pengguna. diff --git a/htdocs/langs/id_ID/holiday.lang b/htdocs/langs/id_ID/holiday.lang index 283a6e10913..8d92bbbc9c4 100644 --- a/htdocs/langs/id_ID/holiday.lang +++ b/htdocs/langs/id_ID/holiday.lang @@ -15,7 +15,7 @@ CancelCP=Dibatalkan RefuseCP=Ditolak ValidatorCP=Penyetuju ListeCP=Daftar cuti -Leave=Leave request +Leave=Permintaan cuti pergi LeaveId=Tinggalkan ID ReviewedByCP=Akan disetujui oleh UserID=identitas pengguna diff --git a/htdocs/langs/id_ID/languages.lang b/htdocs/langs/id_ID/languages.lang index ce0c67973e3..e8207abbf96 100644 --- a/htdocs/langs/id_ID/languages.lang +++ b/htdocs/langs/id_ID/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Etiopia Language_ar_AR=Arab Language_ar_EG=Arab (Mesir) Language_ar_SA=Arab +Language_az_AZ=Azerbaijan Language_bn_BD=Bengal +Language_bn_IN=Bengal (India) Language_bg_BG=Bulgaria Language_bs_BA=Bosnia Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=Inggris (United Kingdom) Language_en_IN=Inggris (India) Language_en_NZ=Inggris (Selandia Baru) Language_en_SA=Inggris (Saudi Arabia) +Language_en_SG=Inggris (Singapura) Language_en_US=Inggris (Amerika Serikat) Language_en_ZA=Inggris (Afrika Selatan) Language_es_ES=Spanyol @@ -29,6 +33,7 @@ Language_es_CL=Spanyol (Cili) Language_es_CO=Spanyol (Colombia) Language_es_DO=Spanyol (Republik Dominika) Language_es_EC=Spanyol (Ecuador) +Language_es_GT=Spanyol (Guatemala) Language_es_HN=Spanyol (Honduras) Language_es_MX=Spanyol (Mexico) Language_es_PA=Spanyol (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanyol (Paraguay) Language_es_PE=Spanyol (Peru) Language_es_PR=Spanyol (Puerto Rico) Language_es_UY=Spanyol (Uruguay) +Language_es_GT=Spanyol (Guatemala) Language_es_VE=Spanyol (Venezuela) Language_et_EE=Estonia Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finlandia Language_fr_BE=Perancis (Belgia) Language_fr_CA=Perancis (Kanada) Language_fr_CH=Perancis (Swiss) +Language_fr_CI=Perancis (Pantai Gading) +Language_fr_CM=Prancis (Kamerun) Language_fr_FR=Perancis +Language_fr_GA=Perancis (Gabon) Language_fr_NC=Perancis (Kaledonia Baru) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisia +Language_gl_ES=Galicia Language_he_IL=Ibrani +Language_hi_IN=Hindi (India) Language_hr_HR=Kroasia Language_hu_HU=Hongaria Language_id_ID=Indonesia Language_is_IS=Icelandic Language_it_IT=Italia +Language_it_CH=Italia (Swiss) Language_ja_JP=Jepang Language_ka_GE=Georgia Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvia Language_mk_MK=Macedonia Language_mn_MN=Mongolia Language_nb_NO=Norwegia (Bokmål) +Language_ne_NP=Nepal Language_nl_BE=Belanda (Belgia) Language_nl_NL=Belanda Language_pl_PL=Polandia @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnam Language_zh_CN=Cina Language_zh_TW=Cina (Tradisional) +Language_zh_HK=China (Hong Kong) Language_bh_MY=Malaysia diff --git a/htdocs/langs/id_ID/mails.lang b/htdocs/langs/id_ID/mails.lang index 4c387f53313..60dae133949 100644 --- a/htdocs/langs/id_ID/mails.lang +++ b/htdocs/langs/id_ID/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Pengaturan Email Keluar (untuk modul %s) DefaultOutgoingEmailSetup=Pengaturan email keluar standar Information=Informasi ContactsWithThirdpartyFilter=Kontak dengan filter pihak ketiga +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/id_ID/main.lang b/htdocs/langs/id_ID/main.lang index 08a09b9fb3c..04dbbf3fcba 100644 --- a/htdocs/langs/id_ID/main.lang +++ b/htdocs/langs/id_ID/main.lang @@ -355,8 +355,8 @@ PriceUTTC=NAIK. (termasuk pajak) Amount=Jumlah AmountInvoice=Jumlah tagihan AmountInvoiced=Jumlah yang ditagih -AmountInvoicedHT=Jumlah yang ditagih (termasuk pajak) -AmountInvoicedTTC=Jumlah yang ditagih (tidak termasuk pajak) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Jumlah pembayaran AmountHTShort=Jumlah (tidak termasuk) AmountTTCShort=Jumlah (termasuk pajak) @@ -485,6 +485,7 @@ Categories=Tag / kategori Category=Tag / kategori By=Oleh From=Dari +FromDate=Dari FromLocation=Dari to=untuk To=untuk @@ -687,6 +688,7 @@ Method=metode Receive=Menerima CompleteOrNoMoreReceptionExpected=Lengkap atau tidak ada yang lebih diharapkan ExpectedValue=Nilai yang diharapkan +ExpectedQty=Expected Qty PartialWoman=Sebagian TotalWoman=Total NeverReceived=Tidak pernah menerima @@ -703,6 +705,7 @@ MenuECM=Dokumen MenuAWStats=AWStats MenuMembers=Anggota MenuAgendaGoogle=Agenda Google +MenuTaxesAndSpecialExpenses=Pajak | Pengeluaran khusus ThisLimitIsDefinedInSetup=Batas Dolibarr (Menu home-setup-security): %s Kb, batas PHP: %s Kb NoFileFound=Tidak ada dokumen yang disimpan dalam direktori ini CurrentUserLanguage=Bahasa saat ini @@ -725,7 +728,7 @@ Page=Halaman Notes=Catatan AddNewLine=Tambahkan baris baru AddFile=Tambah berkas -FreeZone=Bukan produk / layanan yang telah ditentukan +FreeZone=Produk teks-bebas FreeLineOfType=Item teks bebas, ketik: CloneMainAttributes=Mengkloning objek dengan atribut utamanya ReGeneratePDF=Menghasilkan kembali PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Pilih templat email SetRef=Tetapkan ref Select2ResultFoundUseArrows=Beberapa hasil ditemukan. Gunakan panah untuk memilih. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Alihkan dalam mode edit untuk menambahkan terje NotUsedForThisCustomer=Tidak digunakan untuk pelanggan ini AmountMustBePositive=Jumlahnya harus positif ByStatus=Menurut status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/id_ID/members.lang b/htdocs/langs/id_ID/members.lang index f4e764d5f61..81d24556342 100644 --- a/htdocs/langs/id_ID/members.lang +++ b/htdocs/langs/id_ID/members.lang @@ -81,7 +81,7 @@ DeleteType=Hapus VoteAllowed=Vote diizinkan Physical=Fisik Moral=Moral -MorPhy=Moral / Fisik +MorPhy=Nature Reenable=Diaktifkan kembali ResiliateMember=Hentikan anggota ConfirmResiliateMember=Anda yakin ingin memberhentikan anggota ini? diff --git a/htdocs/langs/id_ID/mrp.lang b/htdocs/langs/id_ID/mrp.lang index 21cb567fd68..5d0342b3136 100644 --- a/htdocs/langs/id_ID/mrp.lang +++ b/htdocs/langs/id_ID/mrp.lang @@ -1,5 +1,6 @@ Mrp=Pesanan Manufaktur MO=Pesanan manufaktur +MOs=Manufacturing orders MRPDescription=Modul untuk mengelola produksi dan Pesanan Manufaktur (MO). MRPArea=Area MRP MrpSetupPage=Pengaturan MRP modul diff --git a/htdocs/langs/id_ID/other.lang b/htdocs/langs/id_ID/other.lang index a4fc421b365..67d6dae2501 100644 --- a/htdocs/langs/id_ID/other.lang +++ b/htdocs/langs/id_ID/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Halo)__\n\nSilakan temukan pesanan kam PredefinedMailContentSendSupplierInvoice=__(Halo)__\n\nHarap temukan faktur __REF__ terlampir\n\n\n__ (Hormat) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Halo)__\n\nSilakan temukan pengiriman __REF__ terlampir\n\n\n__ (Hormat) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Halo)__\n\nSilakan temukan intervensi __REF__ terlampir\n\n\n__ (Hormat) __\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Halo)__\n\n\n__ (Hormat) __\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Halo)__\n\n\n__ (Hormat) __\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Halo)__\n\n\n__ (Hormat) __\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Anda dapat mengklik tautan di bawah untuk melakukan pembayaran jika belum dilakukan.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr adalah ERP / CRM ringkas yang mendukung beberapa modul bisnis. Demo yang menampilkan semua modul tidak masuk akal karena skenario ini tidak pernah terjadi (beberapa ratus tersedia). Jadi, beberapa profil demo tersedia. ChooseYourDemoProfil=Pilih profil demo yang paling sesuai dengan kebutuhan Anda ... ChooseYourDemoProfilMore=... atau buat profil Anda sendiri
    (pemilihan modul manual) @@ -280,7 +278,9 @@ LinesToImport=Baris untuk diimpor MemoryUsage=Penggunaan memori RequestDuration=Durasi permintaan +ProductsPerPopularity=Products/Services by popularity PopuProp=Produk / Layanan berdasarkan popularitas dalam Proposal PopuCom=Produk / Layanan berdasarkan popularitas dalam Pesanan ProductStatistics=Statistik Produk / Layanan NbOfQtyInOrders=Jumlah pesanan +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/id_ID/products.lang b/htdocs/langs/id_ID/products.lang index 19e3cf56893..651f6e9750e 100644 --- a/htdocs/langs/id_ID/products.lang +++ b/htdocs/langs/id_ID/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Setel jenis barcode BarcodeValue=Nilai barcode NoteNotVisibleOnBill=Catatan (tidak terlihat pada faktur, proposal ...) ServiceLimitedDuration=Jika produk adalah layanan dengan durasi terbatas: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Beberapa segmen harga per produk / layanan (setiap pelanggan berada dalam satu segmen harga) MultiPricesNumPrices=Jumlah harga DefaultPriceType=Basis harga per default (dengan versus tanpa pajak) saat menambahkan harga jual baru @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Harga vendor (produk atau layanan) CustomCode=Bea Cukai / Komoditas / kode HS CountryOrigin=Negara Asal Nature=Sifat produk (bahan / selesai) +NatureOfProductShort=Sifat produk +NatureOfProductDesc=Bahan baku mentah atau produk jadi ShortLabel=Label pendek Unit=Satuan p=kamu @@ -359,6 +362,9 @@ SelectCombination=Pilih kombinasi ProductCombinationGenerator=Generator varian Features=fitur PriceImpact=Dampak harga +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Dampak berat NewProductAttribute=Atribut baru NewProductAttributeValue=Nilai atribut baru diff --git a/htdocs/langs/id_ID/projects.lang b/htdocs/langs/id_ID/projects.lang index a36b442b9f8..51c8fa22f38 100644 --- a/htdocs/langs/id_ID/projects.lang +++ b/htdocs/langs/id_ID/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Penyumbang TypeContact_project_task_external_TASKCONTRIBUTOR=Penyumbang SelectElement=Pilih elemen AddElement=Tautan ke elemen +LinkToElementShort=Tautan ke # Documents models DocumentModelBeluga=Templat dokumen proyek untuk ikhtisar objek yang ditautkan DocumentModelBaleine=Templat dokumen proyek untuk tugas-tugas @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Jumlah proyek yang dibuat berdasarkan bulan ProjectNbTaskByMonth=Jumlah tugas yang dibuat berdasarkan bulan ProjectOppAmountOfProjectsByMonth=Jumlah lead menurut bulan ProjectWeightedOppAmountOfProjectsByMonth=Jumlah timah tertimbang menurut bulan -ProjectOpenedProjectByOppStatus=Buka proyek / pimpin dengan status pimpin -ProjectsStatistics=Statistik proyek / prospek -TasksStatistics=Statistik proyek / tugas utama +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Tugas yang diberikan. Memasukkan waktu pada tugas ini harus dimungkinkan. IdTaskTime=Waktu tugas id YouCanCompleteRef=Jika Anda ingin melengkapi ref dengan suffix, disarankan untuk menambahkan karakter untuk memisahkannya, sehingga penomoran otomatis akan tetap berfungsi dengan benar untuk proyek selanjutnya. Misalnya %s-MYSUFFIX diff --git a/htdocs/langs/id_ID/recruitment.lang b/htdocs/langs/id_ID/recruitment.lang new file mode 100644 index 00000000000..c0e50f5ddcf --- /dev/null +++ b/htdocs/langs/id_ID/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Pengaturan +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/id_ID/stocks.lang b/htdocs/langs/id_ID/stocks.lang index 50602be7c9d..51b9473c02a 100644 --- a/htdocs/langs/id_ID/stocks.lang +++ b/htdocs/langs/id_ID/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Batalkan pengiriman DeleteSending=Hapus pengiriman Stock=Persediaan Stocks=Stok -MissingStocks=Missing stocks -StockAtDate=Tanggal Pengadaan -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Stok yang hilang +StockAtDate=Stok pada tanggal +StockAtDateInPast=Tanggal di saat lalu +StockAtDateInFuture=Tanggal di saat mendatang StocksByLotSerial=Stok berdasarkan lot/serial LotSerial=Lot/Serial LotSerialList=Daftar lot/serial @@ -34,7 +34,7 @@ StockMovementForId=ID Gerakan %d ListMouvementStockProject=Daftar pergerakan stok yang terkait dengan proyek StocksArea=Area gudang AllWarehouses=Semua gudang -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock=Termasuk juga stok yang tidak ditentukan IncludeAlsoDraftOrders=Sertakan juga konsep pesanan Location=Tempat LocationSummary=Lokasi nama pendek @@ -95,14 +95,16 @@ RealStock=Stok nyata RealStockDesc=Stok fisik/nyata adalah stok saat ini di gudang. RealStockWillAutomaticallyWhen=Stok nyata akan dimodifikasi sesuai dengan aturan ini (sebagaimana didefinisikan dalam modul Stok): VirtualStock=Stok virtual -VirtualStockDesc=Stok virtual adalah stok terhitung yang tersedia setelah semua tindakan terbuka/tertunda (yang memengaruhi stok) ditutup (pesanan pembelian diterima, pesanan penjualan dikirim, dll.) +VirtualStockAtDate=Stok virtual pda tanggal +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Stock virtual adalah stok terhitung yang tersedia setelah semua tindakan yang terbuka/tertunda (yang mempengaruhi stok) ditutup (pesanan pembelian diterima, pesanan penjualan dikirim, pesanan manufaktur diproduksi, dll) IdWarehouse=Gudang id DescWareHouse=Deskripsi gudang LieuWareHouse=Gudang lokalisasi WarehousesAndProducts=Gudang dan produk WarehousesAndProductsBatchDetail=Gudang dan produk (dengan detail per lot/serial) -AverageUnitPricePMPShort=Harga input rata-rata tertimbang -AverageUnitPricePMP=Harga input rata-rata tertimbang +AverageUnitPricePMPShort=Harga rata-rata yang ditimbang +AverageUnitPricePMPDesc=Input harga rata-rata unit yang harus dibayarkan kepada pemasok untuk memasukkan produk ke dalam stok. SellPriceMin=Harga Jual Unit EstimatedStockValueSellShort=Nilai jual EstimatedStockValueSell=Nilai jual @@ -130,7 +132,7 @@ CurentlyUsingPhysicalStock=Stok fisik RuleForStockReplenishment=Aturan untuk pengisian kembali stok SelectProductWithNotNullQty=Pilih setidaknya satu produk dengan jumlah bukan nol dan vendor AlertOnly= Hanya peringatan -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Sertakan juga stok negatif untuk produk yang jumlah yang diinginkan tidak didefinisikan, untuk mengembalikannya ke 0 WarehouseForStockDecrease=Gudang%sakan digunakan untuk penurunan stok WarehouseForStockIncrease=Gudang%sakan digunakan untuk peningkatan stok ForThisWarehouse=Untuk gudang ini @@ -141,7 +143,7 @@ Replenishments=Pengisian ulang NbOfProductBeforePeriod=Jumlah produk %s dalam stok sebelum periode yang dipilih (<%s) NbOfProductAfterPeriod=Jumlah produk %s dalam persediaan setelah periode yang dipilih (> %s) MassMovement=Gerakan massa -SelectProductInAndOutWareHouse=Pilih produk, jumlah, gudang sumber dan gudang target, lalu klik "%s". Setelah ini dilakukan untuk semua gerakan yang diperlukan, klik pada "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Rekam transfer ReceivingForSameOrder=Tanda terima untuk pesanan ini StockMovementRecorded=Pergerakan stok tercatat @@ -234,4 +236,7 @@ ForceTo=Dipaksa untuk AlwaysShowFullArbo=Tampilkan daftar lengkap gudang di sembulan tautan gudang (Peringatan: Ini dapat menurunkan kinerja secara dramatis) StockAtDatePastDesc=Disini Anda dapat melihat pengadaan (pengadaan asli) pada waktu di kemudian hari StockAtDateFutureDesc=Disini Anda dapat melihat pengadaan (pengadaan virtual) pada waktu di kemudian hari -CurrentStock=Current stock +CurrentStock=Stok saat ini +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/id_ID/suppliers.lang b/htdocs/langs/id_ID/suppliers.lang index 7896a6c8610..767dcf77087 100644 --- a/htdocs/langs/id_ID/suppliers.lang +++ b/htdocs/langs/id_ID/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Kualitas rendah ReputationForThisProduct=Reputasi BuyerName=Nama pembeli AllProductServicePrices=Semua harga produk / layanan -AllProductReferencesOfSupplier=Semua referensi produk / layanan vendor +AllProductReferencesOfSupplier=Semua referensi untuk vendor BuyingPriceNumShort=Harga penjual diff --git a/htdocs/langs/id_ID/ticket.lang b/htdocs/langs/id_ID/ticket.lang index 43561ccb0c5..d8bc9fd797a 100644 --- a/htdocs/langs/id_ID/ticket.lang +++ b/htdocs/langs/id_ID/ticket.lang @@ -72,7 +72,6 @@ Deleted=Dihapus # Dict Type=Tipe -Category=Kode analitik Severity=Kerasnya # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Secara otomatis menetapkan pengguna yang membuat tiket TicketsAutoAssignTicketHelp=Saat membuat tiket, pengguna dapat secara otomatis ditugaskan ke tiket. TicketNumberingModules=Modul penomoran tiket TicketNotifyTiersAtCreation=Beri tahu pihak ketiga saat membuat -TicketGroup=Kelompok TicketsDisableCustomerEmail=Selalu nonaktifkan email saat tiket dibuat dari antarmuka publik TicketsPublicNotificationNewMessage=Kirim email saat pesan baru ditambahkan TicketsPublicNotificationNewMessageHelp=Kirim email ketika pesan baru ditambahkan dari antarmuka publik (ke pengguna yang ditetapkan atau email notifikasi ke (pembaruan) dan/atau email notifikasi ke) @@ -162,7 +160,7 @@ CreatedBy=Dibuat oleh NewTicket=Tiket Baru SubjectAnswerToTicket=Jawaban tiket TicketTypeRequest=Jenis permintaan -TicketCategory=Kode analitik +TicketCategory=Group SeeTicket=Lihat tiket TicketMarkedAsRead=Tiket telah ditandai sebagai sudah dibaca TicketReadOn=Baca terus diff --git a/htdocs/langs/id_ID/users.lang b/htdocs/langs/id_ID/users.lang index 001508ab4fc..8a5d6ee6cdc 100644 --- a/htdocs/langs/id_ID/users.lang +++ b/htdocs/langs/id_ID/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Dinonaktifkan dalam mode pemeliharaan UserAccountancyCode=Kode akuntansi pengguna UserLogoff=Logout pengguna UserLogged=Pengguna login +DateOfEmployment=Tanggal masuk kerja DateEmployment=Tanggal Mulai Pekerjaan DateEmploymentEnd=Tanggal Akhir Pekerjaan CantDisableYourself=Anda tidak dapat menonaktifkan catatan pengguna Anda sendiri @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Validator permintaan cuti paksa ValidatorIsSupervisorByDefault=Secara default, validator adalah pengawas pengguna. Tetap kosong untuk menjaga perilaku ini. UserPersonalEmail=Email pribadi UserPersonalMobile=Ponsel pribadi +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/id_ID/withdrawals.lang b/htdocs/langs/id_ID/withdrawals.lang index 688e56c7a0f..1ff4c8b5eef 100644 --- a/htdocs/langs/id_ID/withdrawals.lang +++ b/htdocs/langs/id_ID/withdrawals.lang @@ -10,8 +10,8 @@ PaymentByBankTransferReceipts=Pesanan transfer kredit PaymentByBankTransferLines=Jalur pemesanan transfer kredit WithdrawalsReceipts=Pesanan debit langsung WithdrawalReceipt=Pesanan debit langsung -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order +BankTransferReceipts=Pesanan transfer kredit +BankTransferReceipt=Pesanan transfer kredit LatestBankTransferReceipts=Pesanan transfer kredit %s terbaru LastWithdrawalReceipts=File debit langsung %s terbaru WithdrawalsLine=Jalur pemesanan debit langsung @@ -63,7 +63,9 @@ InvoiceRefused=Faktur ditolak (Mengisi daya penolakan untuk pelanggan) StatusDebitCredit=Debit status / kredit StatusWaiting=Menunggu StatusTrans=Terkirim +StatusDebited=Debited StatusCredited=Dikreditkan +StatusPaid=Dibayar StatusRefused=Ditolak StatusMotif0=Tidak ditentukan StatusMotif1=Dana tidak mencukupi @@ -77,13 +79,13 @@ StatusMotif8=Alasan lain CreateForSepaFRST=Buat file debit langsung (SEPA FRST) CreateForSepaRCUR=Buat file debit langsung (SEPA RCUR) CreateAll=Buat file debit langsung (semua) -CreateFileForPaymentByBankTransfer=Buat transfer kredit (semua) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Buat file transfer kredit (SEPA) CreateGuichet=Hanya kantor CreateBanque=Hanya bank OrderWaiting=Menunggu perawatan -NotifyTransmision=Penarikan Penarikan -NotifyCredit=Kredit Penarikan +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Nomor Pemancar Nasional WithBankUsingRIB=Untuk rekening bank menggunakan RIB WithBankUsingBANBIC=Untuk rekening bank menggunakan IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Kredit aktif WithdrawalFileNotCapable=Tidak dapat membuat file tanda terima penarikan untuk negara Anda %s (Negara Anda tidak didukung) ShowWithdraw=Tampilkan Pesanan Debit Langsung IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Namun, jika faktur memiliki setidaknya satu pesanan pembayaran debit langsung belum diproses, itu tidak akan ditetapkan sebagai dibayar untuk memungkinkan manajemen penarikan sebelumnya. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=File penarikan +DoStandingOrdersBeforePayments=Tab ini memungkinkan Anda untuk meminta pesanan pembayaran debit langsung. Setelah selesai, masuk ke menu Bank->Pembayaran dengan debit langsung untuk menghasilkan dan mengelola pesanan debit langsung. Ketika pesanan debit langsung ditutup, pembayaran pada faktur akan secara otomatis dicatat, dan faktur ditutup jika sisa untuk membayar adalah nol. +DoCreditTransferBeforePayments=Tab ini memungkinkan Anda untuk meminta pesanan transfer kredit. Setelah selesai, masuk ke menu Bank->Pembayaran dengan transfer kredit untuk menghasilkan dan mengelola pesanan transfer kredit. Ketika pesanan transfer kredit ditutup, pembayaran pada faktur akan secara otomatis dicatat, dan faktur ditutup jika sisa untuk dibayarkan adalah nol. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Setel ke status "File Terkirim" ThisWillAlsoAddPaymentOnInvoice=Ini juga akan mencatat pembayaran pada faktur dan akan mengklasifikasikannya sebagai "Dibayar" jika tetap membayar nol StatisticsByLineStatus=Statistik berdasarkan status garis @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Jenis pembayaran ModeRECUR=Pembayaran berulang ModeFRST=Pembayaran satu kali PleaseCheckOne=Silakan periksa satu saja +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Pesanan debit langsung %s dibuat AmountRequested=Jumlah yang diminta SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Jumlah: %s
    Metode: %s
    Tanggal: %s InfoRejectSubject=Pesanan pembayaran debit langsung ditolak InfoRejectMessage=Halo,

    , urutan pembayaran debit langsung dari %s yang terkait dengan perusahaan %s, dengan jumlah %s telah ditolak oleh bank.

    -
    %s ModeWarning=Opsi untuk mode nyata tidak disetel, kami berhenti setelah simulasi ini +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/id_ID/workflow.lang b/htdocs/langs/id_ID/workflow.lang index 73e791c1df2..eab46445c72 100644 --- a/htdocs/langs/id_ID/workflow.lang +++ b/htdocs/langs/id_ID/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klasifikasi sumber pesanan penjuala # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Klasifikasi sumber proposal vendor tautan sebagai tertagih ketika faktur vendor divalidasi (dan jika jumlah faktur sama dengan jumlah total proposal tautan) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klasifikasi sumber pesanan pembelian tautan sebagai tertagih saat faktur vendor divalidasi (dan jika jumlah faktur sama dengan jumlah total pesanan tautan) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Pembuatan Otomatis AutomaticClassification=Pengklasifikasian Otomatis diff --git a/htdocs/langs/id_ID/zapier.lang b/htdocs/langs/id_ID/zapier.lang index 456834e54f3..c0506eac4b9 100644 --- a/htdocs/langs/id_ID/zapier.lang +++ b/htdocs/langs/id_ID/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier untuk modul Dolibarr # Admin page # ZapierForDolibarrSetup = Pengaturan Zapier untuk Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/is_IS/accountancy.lang b/htdocs/langs/is_IS/accountancy.lang index 550e48b1aa1..43dcc6fc6fe 100644 --- a/htdocs/langs/is_IS/accountancy.lang +++ b/htdocs/langs/is_IS/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/is_IS/admin.lang b/htdocs/langs/is_IS/admin.lang index 322da7fd011..c9e545315ad 100644 --- a/htdocs/langs/is_IS/admin.lang +++ b/htdocs/langs/is_IS/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Lögun er ekki í boði á Unix eins og kerfum. Próf sendmail program staðnum. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module skipulag ModulesSetup=Modules/Application setup ModuleFamilyBase=Kerfi @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Lykill að tryggja vefslóðir NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=Skoða sem PDF skjal -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Strikamerki er stjórnun Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDial sameining Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Búa til / breyta þjónusta Permission534=Eyða þjónustu Permission536=Sjá / stjórna falinn þjónusta Permission538=Útflutningur þjónustu +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Lesa Fjárframlög Permission702=Búa til / breyta framlög Permission703=Eyða Fjárframlög @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Lesa fiskistofna Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Skipulag skjöl framkvæmdarstjóra Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect möguleiki +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Svæði DictionaryCountry=Lönd @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Einingar DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect stöðu +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Varanleg leita mynd til vinstri valmynd DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Smelltu til að hringja mát skipulag ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Samningar +MailToSendReception=Receptions MailToThirdparty=Í þriðja aðila MailToMember=Meðlimir MailToUser=Notendur @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/is_IS/agenda.lang b/htdocs/langs/is_IS/agenda.lang index 9feadc98a82..88b56616ee0 100644 --- a/htdocs/langs/is_IS/agenda.lang +++ b/htdocs/langs/is_IS/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=Listi yfir atburði EventReports=Event reports Location=Staðsetning -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Atburður á fullu dag MenuToDoActions=Allar ófullnægjandi aðgerðir MenuDoneActions=Allir ljúka aðgerðum @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/is_IS/boxes.lang b/htdocs/langs/is_IS/boxes.lang index 2a559529900..d1b8a7367be 100644 --- a/htdocs/langs/is_IS/boxes.lang +++ b/htdocs/langs/is_IS/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=reikninga viðskiptavinar ForCustomersOrders=Customers orders ForProposals=Tillögur @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Bókhalds diff --git a/htdocs/langs/is_IS/cashdesk.lang b/htdocs/langs/is_IS/cashdesk.lang index 929f539b31c..e5ac19f8ff5 100644 --- a/htdocs/langs/is_IS/cashdesk.lang +++ b/htdocs/langs/is_IS/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/is_IS/compta.lang b/htdocs/langs/is_IS/compta.lang index 82960faedfc..8a3d0831930 100644 --- a/htdocs/langs/is_IS/compta.lang +++ b/htdocs/langs/is_IS/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/is_IS/contracts.lang b/htdocs/langs/is_IS/contracts.lang index 1a032710f88..5c6e41b7281 100644 --- a/htdocs/langs/is_IS/contracts.lang +++ b/htdocs/langs/is_IS/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running þjónusta MenuExpiredServices=Útrunninn þjónusta MenuClosedServices=Lokað þjónusta NewContract=Nýr samningur -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Eyða samning ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/is_IS/errors.lang b/htdocs/langs/is_IS/errors.lang index 114dc9762e2..05a5bca9bb6 100644 --- a/htdocs/langs/is_IS/errors.lang +++ b/htdocs/langs/is_IS/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/is_IS/languages.lang b/htdocs/langs/is_IS/languages.lang index ec6b3a1bc4a..d68088905cb 100644 --- a/htdocs/langs/is_IS/languages.lang +++ b/htdocs/langs/is_IS/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabíska +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosníska Language_ca_ES=Katalónska @@ -20,6 +23,7 @@ Language_en_GB=Enska (Bretland) Language_en_IN=Enska (Indland) Language_en_NZ=Enska (Nýja Sjáland) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=Enska (United States) Language_en_ZA=English (Suður Afríka) Language_es_ES=Spænska @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spænska (Hondúras) Language_es_MX=Spænska (Mexíkó) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spænska (Paraguay) Language_es_PE=Spænska (Peru) Language_es_PR=Spænska (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Eistneska Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Franska (Belgíu) Language_fr_CA=Franska (Kanada) Language_fr_CH=Franska (Sviss) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Franska +Language_fr_GA=French (Gabon) Language_fr_NC=Franska (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebreska +Language_hi_IN=Hindi (India) Language_hr_HR=Króatíska Language_hu_HU=Ungverska Language_id_ID=Indonesian Language_is_IS=Íslenska Language_it_IT=Italien +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanska Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Lettneska Language_mk_MK=Makedónska Language_mn_MN=Mongolian Language_nb_NO=Norska (bokmål) +Language_ne_NP=Nepali Language_nl_BE=Hollenska (Belgíu) Language_nl_NL=Dutch Language_pl_PL=Pólska @@ -86,4 +100,5 @@ Language_uz_UZ=Úsbekska Language_vi_VN=Víetnamska Language_zh_CN=Kínverska Language_zh_TW=Kínversku (hefðbundinni) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/is_IS/mails.lang b/htdocs/langs/is_IS/mails.lang index fd2e406a2e5..0c77e81bb81 100644 --- a/htdocs/langs/is_IS/mails.lang +++ b/htdocs/langs/is_IS/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/is_IS/main.lang b/htdocs/langs/is_IS/main.lang index 0521eea26e8..278c752c71e 100644 --- a/htdocs/langs/is_IS/main.lang +++ b/htdocs/langs/is_IS/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Upphæð AmountInvoice=Invoice upphæð AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Upphæð greiðslu AmountHTShort=Amount (excl.) AmountTTCShort=Magn (Inc skatt) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=Með því að From=Frá +FromDate=Frá FromLocation=Frá to=til To=til @@ -687,6 +688,7 @@ Method=Aðferð Receive=Fá CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Samtals NeverReceived=Aldrei fengið @@ -703,6 +705,7 @@ MenuECM=Skjöl MenuAWStats=Awstats MenuMembers=Members MenuAgendaGoogle=Google dagskrá +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr takmörk (Valmynd heim-skipulag-öryggi): %s KB, PHP takmörk: %s Kb NoFileFound=Engin skjöl sem vistuð eru í þessari möppu CurrentUserLanguage=Valið tungumál @@ -725,7 +728,7 @@ Page=Page Notes=Skýringar AddNewLine=Bæta við nýjum línu AddFile=Bæta við skrá -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Klóna mótmæla við helstu eiginleika hennar ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/is_IS/members.lang b/htdocs/langs/is_IS/members.lang index 464075592a6..1cc3a24b389 100644 --- a/htdocs/langs/is_IS/members.lang +++ b/htdocs/langs/is_IS/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Drög að meðlimir MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Staðfest +SubscriptionNotNeeded=No subscription needed NewCotisation=New framlag PaymentSubscription=New framlag greiðslu SubscriptionEndDate=enda áskrift er dagsetning @@ -78,7 +81,7 @@ DeleteType=Eyða VoteAllowed=Vote leyfðar Physical=Líkamleg Moral=Moral -MorPhy=Boðskapur / Líkamleg +MorPhy=Náttúra Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/is_IS/mrp.lang b/htdocs/langs/is_IS/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/is_IS/mrp.lang +++ b/htdocs/langs/is_IS/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/is_IS/other.lang b/htdocs/langs/is_IS/other.lang index b43adbb2145..6eef3ff2036 100644 --- a/htdocs/langs/is_IS/other.lang +++ b/htdocs/langs/is_IS/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/is_IS/products.lang b/htdocs/langs/is_IS/products.lang index 88a288ac601..096639572fb 100644 --- a/htdocs/langs/is_IS/products.lang +++ b/htdocs/langs/is_IS/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Setja barcode tegund BarcodeValue=Strikamerki gildi NoteNotVisibleOnBill=Ath (ekki sýnilegt á reikningum, tillögur ...) ServiceLimitedDuration=Ef varan er þjónusta við takmarkaðan tíma: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Fjöldi verð DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Uppruni land Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Nýtt eiginleiki NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/is_IS/projects.lang b/htdocs/langs/is_IS/projects.lang index f7a6ebd6bac..f48818ff1f4 100644 --- a/htdocs/langs/is_IS/projects.lang +++ b/htdocs/langs/is_IS/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Framlög TypeContact_project_task_external_TASKCONTRIBUTOR=Framlög SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/is_IS/recruitment.lang b/htdocs/langs/is_IS/recruitment.lang new file mode 100644 index 00000000000..b9e943394df --- /dev/null +++ b/htdocs/langs/is_IS/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Um +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/is_IS/stocks.lang b/htdocs/langs/is_IS/stocks.lang index 514a94e9cad..b6b8134e906 100644 --- a/htdocs/langs/is_IS/stocks.lang +++ b/htdocs/langs/is_IS/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Eyða sendingu Stock=Stock Stocks=Verðbréf MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real lager RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual Stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Auðkenni vörugeymsla DescWareHouse=Lýsing vörugeymsla LieuWareHouse=Staðsetning lager WarehousesAndProducts=Vöruhús og vörur WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Meðaltal inntak verð -AverageUnitPricePMP=Meðaltal inntak verð +AverageUnitPricePMPShort=Vegið meðalverð +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selja Unit verð EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/is_IS/suppliers.lang b/htdocs/langs/is_IS/suppliers.lang index 2a7f274f323..48d3a288d16 100644 --- a/htdocs/langs/is_IS/suppliers.lang +++ b/htdocs/langs/is_IS/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Þessi tilvísun birgir er nú þegar tengt með tilvísun: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Framboð -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Samþykkja þessari röð ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Upphæð: %s
    Metode: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Valkostur fyrir alvöru ham var ekki sett, að hætta við eftir þessa uppgerð +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/is_IS/workflow.lang b/htdocs/langs/is_IS/workflow.lang index 47aff549487..8f682447322 100644 --- a/htdocs/langs/is_IS/workflow.lang +++ b/htdocs/langs/is_IS/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Vinnuflæði mát skipulag -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/is_IS/zapier.lang b/htdocs/langs/is_IS/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/is_IS/zapier.lang +++ b/htdocs/langs/is_IS/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/it_CH/admin.lang b/htdocs/langs/it_CH/admin.lang new file mode 100644 index 00000000000..c1d306ec390 --- /dev/null +++ b/htdocs/langs/it_CH/admin.lang @@ -0,0 +1,3 @@ +# Dolibarr language file - Source file is en_US - admin +OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. +EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. diff --git a/htdocs/langs/it_IT/accountancy.lang b/htdocs/langs/it_IT/accountancy.lang index 10e9a0d170d..781085f58c4 100644 --- a/htdocs/langs/it_IT/accountancy.lang +++ b/htdocs/langs/it_IT/accountancy.lang @@ -58,8 +58,8 @@ AccountancyAreaDescActionOnceBis=I prossimi passi dovrebbero essere fatti per fa AccountancyAreaDescActionFreq=Le seguenti azioni vengono di solito eseguite ogni mese, settimana o giorno per le grandi compagnie... AccountancyAreaDescJournalSetup=PASSO %s: Crea o controlla il contenuto del tuo elenco del giornale dal menu %s -AccountancyAreaDescChartModel=STEP %s: Check that a model of chart of account exists or create one from menu %s -AccountancyAreaDescChart=STEP %s: Select and|or complete your chart of account from menu %s +AccountancyAreaDescChartModel=PASSAGGIO %s: verifica l'esistenza di un modello di piano dei conti o creane uno dal menu %s +AccountancyAreaDescChart=PASSAGGIO %s: selezionare e/o completare il piano dei conti dal menu %s AccountancyAreaDescVat=STEP %s: Definisci le voci del piano dei conti per ogni IVA/tassa. Per fare ciò usa il menu %s. AccountancyAreaDescDefault=STEP %s: Definisci gli account di contabilità di default. Per questo, usa la voce menù %s. @@ -121,7 +121,7 @@ InvoiceLinesDone=Righe di fatture bloccate ExpenseReportLines=Linee di note spese da associare ExpenseReportLinesDone=Linee vincolate di note spese IntoAccount=Collega linee con il piano dei conti -TotalForAccount=Total for accounting account +TotalForAccount=Totale per conto contabile Ventilate=Associa @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Consentire di gestire un diverso numero di zeri alla fine BANK_DISABLE_DIRECT_INPUT=Disabilita la registrazione diretta della transazione nel conto bancario ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Abilita la bozza di esportazione sul giornale ACCOUNTANCY_COMBO_FOR_AUX=Abilita l'elenco combinato per il conto secondario (potrebbe essere lento se hai un sacco di terze parti) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Giornale Vendite ACCOUNTING_PURCHASE_JOURNAL=Giornale Acquisti @@ -169,15 +170,15 @@ DONATION_ACCOUNTINGACCOUNT=Conto di contabilità per registrare le donazioni ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Conto contabile per registrare gli abbonamenti ACCOUNTING_PRODUCT_BUY_ACCOUNT=Conto di contabilità predefinito per i prodotti acquistati (se non definito nella scheda prodotto) -ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Accounting account by default for the bought products in EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought products and imported out of EEC (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Conto contabile predefinito per i prodotti acquistati in CEE (usato se non definito nella scheda prodotto) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Conto contabile predefinito per i prodotti acquistati e importati al di fuori della CEE (usato se non definito nella scheda prodotto) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Conto di contabilità predefinito per i prodotti venduti (se non definito nella scheda prodotto) ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Conto contabile per impostazione predefinita per i prodotti venduti in CEE (utilizzato se non definito nella scheda prodotto) ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Conto contabile per impostazione predefinita per l'esportazione dei prodotti venduti fuori dalla CEE (utilizzato se non definito nella scheda prodotto) ACCOUNTING_SERVICE_BUY_ACCOUNT=Conto di contabilità per impostazione predefinita per i servizi acquistati (utilizzato se non definito nel foglio di servizio) -ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Accounting account by default for the bought services in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought services and imported out of EEC (used if not defined in the service sheet) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Conto contabile per impostazione predefinita per i servizi acquistati in CEE (usato se non definito nel foglio di servizio) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Conto contabile per impostazione predefinita per i servizi acquistati e importati al di fuori della CEE (usato se non definito nel foglio di servizio) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Conto di contabilità per impostazione predefinita per i servizi venduti (utilizzato se non definito nel foglio di servizio) ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Conto contabile predefinito per i servizi venduti nella CEE (solo se non definito nella scheda servizio) ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Conto contabile predefinito per i servizi venduti ed esportati fuori dalla CEE (solo se non definito nella scheda servizio) @@ -230,19 +231,19 @@ ListAccounts=Lista delle voci del piano dei conti UnknownAccountForThirdparty=Conto di terze parti sconosciuto. Useremo %s UnknownAccountForThirdpartyBlocking=Conto di terze parti sconosciuto. Errore di blocco ThirdpartyAccountNotDefinedOrThirdPartyUnknown=Conto di terzi non definito o sconosciuto. Useremo %s -ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Third-party unknown and subledger not defined on the payment. We will keep the subledger account value empty. +ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Terze parti sconosciuta e sottoconti non definiti nel pagamento. Manterremo vuoto il valore sottoconto dell'account. ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Third-party account not defined or third party unknown. Blocking error. UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Unknown third-party account and waiting account not defined. Blocking error PaymentsNotLinkedToProduct=Payment not linked to any product / service -OpeningBalance=Opening balance +OpeningBalance=Saldo di apertura ShowOpeningBalance=Mostra bilancio di apertura HideOpeningBalance=Nascondi bilancio di apertura -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Mostra totale parziale per gruppo Pcgtype=Gruppo di conto -PcgtypeDesc=Group of account are used as predefined 'filter' and 'grouping' criteria for some accounting reports. For example, 'INCOME' or 'EXPENSE' are used as groups for accounting accounts of products to build the expense/income report. +PcgtypeDesc=Il gruppo di conti viene utilizzato come criterio 'filtro' e 'raggruppamento' predefiniti per alcuni report contabili. Ad esempio, "REDDITO" o "SPESA" sono utilizzati come gruppi per la contabilità dei prodotti per creare il rapporto spese / entrate. -Reconcilable=Reconcilable +Reconcilable=riconciliabile TotalVente=Fatturato totale al lordo delle imposte TotalMarge=Margine totale sulle vendite @@ -284,6 +285,7 @@ ShowTutorial=Mostra tutorial NotReconciled=Non conciliata ## Admin +BindingOptions=Binding options ApplyMassCategories=Applica categorie di massa AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed @@ -291,7 +293,7 @@ AccountingJournals=Libri contabili AccountingJournal=Accounting journal NewAccountingJournal=New accounting journal ShowAccountingJournal=Mostra diario contabile -NatureOfJournal=Nature of Journal +NatureOfJournal=Natura del diario AccountingJournalType1=Miscellaneous operations AccountingJournalType2=Vendite AccountingJournalType3=Acquisti @@ -317,13 +319,13 @@ Modelcsv_quadratus=Export for Quadratus QuadraCompta Modelcsv_ebp=Export for EBP Modelcsv_cogilog=Export for Cogilog Modelcsv_agiris=Export for Agiris -Modelcsv_LDCompta=Export for LD Compta (v9) (Test) -Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) +Modelcsv_LDCompta=Esporta per LD Compta (v9) (Test) +Modelcsv_LDCompta10=Esporta per LD Compta (v10 e successive) Modelcsv_openconcerto=Export for OpenConcerto (Test) Modelcsv_configurable=Export CSV Configurable Modelcsv_FEC=Export FEC Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland -Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta +Modelcsv_winfic=Esporta Winfic - eWinfic - WinSis Compta ChartofaccountsId=Id Piano dei Conti ## Tools - Init accounting account on product / service @@ -336,14 +338,14 @@ OptionModeProductSell=Modalità vendita OptionModeProductSellIntra=Mode sales exported in EEC OptionModeProductSellExport=Mode sales exported in other countries OptionModeProductBuy=Modalità acquisto -OptionModeProductBuyIntra=Mode purchases imported in EEC -OptionModeProductBuyExport=Mode purchased imported from other countries +OptionModeProductBuyIntra=Acquisti in modalità importati in CEE +OptionModeProductBuyExport=Modalità acquistata importata da altri paesi OptionModeProductSellDesc=Show all products with accounting account for sales. OptionModeProductSellIntraDesc=Show all products with accounting account for sales in EEC. OptionModeProductSellExportDesc=Show all products with accounting account for other foreign sales. OptionModeProductBuyDesc=Show all products with accounting account for purchases. -OptionModeProductBuyIntraDesc=Show all products with accounting account for purchases in EEC. -OptionModeProductBuyExportDesc=Show all products with accounting account for other foreign purchases. +OptionModeProductBuyIntraDesc=Mostra tutti i prodotti con conto contabile per gli acquisti in CEE. +OptionModeProductBuyExportDesc=Mostra tutti i prodotti con conto contabile per altri acquisti esteri. CleanFixHistory=Remove accounting code from lines that not exists into charts of account CleanHistory=Resetta tutti i collegamenti per l'anno corrente PredefinedGroups=Gruppi predefiniti @@ -354,8 +356,8 @@ AccountRemovedFromGroup=Account removed from group SaleLocal=Local sale SaleExport=Export sale SaleEEC=Sale in EEC -SaleEECWithVAT=Sale in EEC with a VAT not null, so we suppose this is NOT an intracommunautary sale and the suggested account is the standard product account. -SaleEECWithoutVATNumber=Sale in EEC with no VAT but the VAT ID of thirdparty is not defined. We fallback on the product account for standard sales. You can fix the VAT ID of thirdparty or the product account if needed. +SaleEECWithVAT=Vendita in CEE con IVA non nulla, quindi supponiamo che questa NON sia una vendita intracomunitaria e l'account suggerito sia l'account standard del prodotto. +SaleEECWithoutVATNumber=La vendita nella CEE senza IVA ma la partita IVA di terzi non è definita. Eseguiamo il fallback sull'account del prodotto per le vendite standard. È possibile correggere l'ID IVA di terze parti o l'account del prodotto, se necessario. ## Dictionary Range=Range of accounting account diff --git a/htdocs/langs/it_IT/admin.lang b/htdocs/langs/it_IT/admin.lang index a17250cef75..ba994d63003 100644 --- a/htdocs/langs/it_IT/admin.lang +++ b/htdocs/langs/it_IT/admin.lang @@ -40,7 +40,7 @@ WebUserGroup=Utente/gruppo del server web (per esempio www-data) NoSessionFound=La tua configurazione PHP sembra non permetta di mostrare le sessioni attive. La directory utilizzata per salvare le sessioni (%s) potrebbe non essere protetta (per esempio tramite permessi SO oppure dalla direttiva PHP open_basedir). DBStoringCharset=Charset per il salvataggio dei dati nel database DBSortingCharset=Set di caratteri del database per ordinare i dati -HostCharset=Host charset +HostCharset=Set di caratteri host ClientCharset=Client charset ClientSortingCharset=Client collation WarningModuleNotActive=Il modulo %s deve essere attivato @@ -219,7 +219,7 @@ Nouveauté=Novità AchatTelechargement=Aquista / Scarica GoModuleSetupArea=To deploy/install a new module, go to the Module setup area: %s. DoliStoreDesc=DoliStore, il mercato ufficiale dei moduli esterni per Dolibarr ERP/CRM -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. +DoliPartnersDesc=Elenco delle società che forniscono moduli o funzionalità sviluppati su misura.
    Nota: poiché Dolibarr è un'applicazione open source, chiunque esperto nella programmazione PHP dovrebbe essere in grado di sviluppare un modulo. WebSiteDesc=Siti web esterni per ulteriori moduli add-on (non essenziali)... DevelopYourModuleDesc=Spunti per sviluppare il tuo modulo... URL=Collegamento @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Email predefinita del mittente per l'invio manuale (e UserEmail=Email utente CompanyEmail=Company Email FeatureNotAvailableOnLinux=Funzione non disponibile sui sistemi Linux. Viene usato il server di posta installato sul server (es. sendmail). +FixOnTransifex=Correggi la traduzione sulla piattaforma di traduzione online del progetto SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Se la traduzione per questa lingua non è completa o trovi degli errori, puoi correggere i file presenti nella directory langs/%s e pubblicare i file modificati su dolibarr.org/forum oppure, se sei uno sviluppatore, su github.com/Dolibarr/dolibarr +SubmitTranslationENUS=Se la traduzione per questa lingua non è completa o trovi errori, puoi correggerla modificando i file nella directory langs / %s e inviare i file modificati su dolibarr.org/forum o, se sei uno sviluppatore, con un PR su github.com/Dolibarr/Dolibarr ModuleSetup=Impostazioni modulo ModulesSetup=Impostazione Modulo/Applicazione ModuleFamilyBase=Sistema @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Il modulo %s deve prima essere attivato per pote SecurityToken=Token di sicurezza NoSmsEngine=Nessun gestore mittente SMS disponibile. Un gestore mittente SMS non è installato con la distribuzione predefinita perché dipendono da un fornitore esterno, ma puoi trovarne alcuni su %s PDF=PDF -PDFDesc=Opzioni globali per la generazione di PDF. -PDFAddressForging=Regole per i box degli indirizzi sui documenti pdf +PDFDesc=Opzioni globali per la generazione di PDF +PDFAddressForging=Regole per la sezione degli indirizzi HideAnyVATInformationOnPDF=Nascondi tutte le informazioni relative all'IVA sui pdf generati. PDFRulesForSalesTax=Regole per tasse sulla vendita/IVA PDFLocaltax=Regole per %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Nascondi la tariffa %s nella colonna Imposta sulle vendite / IVA HideDescOnPDF=Nascondi le descrizioni dei prodotti nel pdf generato HideRefOnPDF=Nascondi il riferimento dei prodotti nel pdf generato HideDetailsOnPDF=Nascondi dettagli linee prodotti sui PDF generati @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modifica i prezzi con la valuta di base definita. MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Stringa +String1Line=Stringa (1 riga) TextLong=Testo Lungo +TextLongNLines=Testo lungo (n righe) HtmlText=Testo html Int=Intero Float=Decimale @@ -428,7 +431,7 @@ ExtrafieldCheckBox=Checkboxes ExtrafieldCheckBoxFromList=Checkboxes from table ExtrafieldLink=Collegamento ad un oggetto ComputedFormula=Campo calcolato -ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' +ComputedFormulaDesc=Puoi inserire qui una formula usando altre proprietà dell'oggetto o qualsiasi codice PHP per ottenere un valore calcolato dinamico. Puoi utilizzare qualsiasi formula compatibile con PHP incluso l'operatore condizione "?" e i seguenti oggetti globali: $db, $conf, $langs, $mysoc, $user, $object .
    ATTENZIONE : Potrebbero essere disponibili solo alcune proprietà di $object. Se hai bisogno di proprietà non caricate, recupera l'oggetto nella tua formula come nel secondo esempio.
    L'uso di un campo calcolato significa che non è possibile immettere alcun valore dall'interfaccia. Inoltre, se si verifica un errore di sintassi, la formula potrebbe non restituire nulla.

    Esempio di formula:
    $object->id < 10 ? round($object-> id / 2, 2): ($object-> id + 2 * $user-> id) * (int) substr($mysoc-> zip, 1, 2 )

    Esempio per ricaricare l'oggetto
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Altro esempio di formula per forzare il caricamento dell'oggetto e del suo oggetto padre:
    (($ reloaded = )) && ($ reloadedobj-> fetchNoCompute ($ object-> id)> 0) && ($ secondloadedobj = nuovo progetto ($ db)) && ($ secondloadedobj-> fetchNoCompute ($ reloadedobj-> fk_project)> 0))? $ secondloadedobj-> ref: 'Progetto padre non trovato' Computedpersistent=Store computed field ComputedpersistentDesc=Computed extra fields will be stored in the database, however, the value will only be recalculated when the object of this field is changed. If the computed field depends on other objects or global data this value might be wrong!! ExtrafieldParamHelpPassword=Leaving this field blank means this value will be stored without encryption (field must be only hidden with star on screen).
    Set 'auto' to use the default encryption rule to save password into database (then value read will be the hash only, no way to retrieve original value) @@ -446,7 +449,7 @@ LinkToTestClickToDial=Per testare l'indirizzo ClickToDial dell'utente %s RefreshPhoneLink=Link Aggiorna LinkToTest=Collegamento cliccabile generato per l'utente %s (clicca numero di telefono per testare) KeepEmptyToUseDefault=Lasciare vuoto per utilizzare il valore di default -KeepThisEmptyInMostCases=In most cases, you can keep this field empy. +KeepThisEmptyInMostCases=Nella maggior parte dei casi, è possibile mantenere questo campo vuoto. DefaultLink=Link predefinito SetAsDefault=Imposta come predefinito ValueOverwrittenByUserSetup=Attenzione, questo valore potrebbe essere sovrascritto da un impostazione specifica dell'utente (ogni utente può settare il proprio url clicktodial) @@ -543,9 +546,9 @@ Module54Desc=Gestione contratti (servizi o abbonamenti) Module55Name=Codici a barre Module55Desc=Gestione codici a barre Module56Name=Pagamento con bonifico bancario -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Ordini addebito diretto (SEPA) -Module57Desc=Gestione degli ordini di pagamento SEPA Direct Debit. Comprende anche la generazione di file SEPA per i paesi europei. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integrazione di un sistema ClickToDial (per esempio Asterisk) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Creare/modificare servizi Permission534=Eliminare servizi Permission536=Vedere/gestire servizi nascosti Permission538=Esportare servizi +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Vedere donazioni Permission702=Creare/modificare donazioni Permission703=Eliminare donazioni @@ -848,6 +858,8 @@ Permission773=Eliminare le note spese Permission774=Vedere tutte le note spese (anche per utenti non subordinati) Permission775=Approvare le note spese Permission776=Pagare le note spese +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Esporta note spese Permission1001=Vedere magazzino Permission1002=Crea/modifica magazzini @@ -900,6 +912,7 @@ Permission2515=Impostare directory documenti Permission2801=Client FTP in sola lettura (solo download e navigazione dei file) Permission2802=Client FTP in lettura e scrittura (caricamento e eliminazione dei file) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Elimina risorsa Permission63004=Collega le risorse agli eventi DictionaryCompanyType=Tipo di soggetto terzo DictionaryCompanyJuridicalType=Entità legali di terze parti -DictionaryProspectLevel=Liv. cliente potenziale +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Stati / Province DictionaryRegion=Regioni DictionaryCountry=Paesi @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Modelli e-mail DictionaryUnits=Unità DictionaryMeasuringUnits=Unità di misura DictionarySocialNetworks=Social networks -DictionaryProspectStatus=Stato cliente potenziale +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Tipi di ferie/permessi DictionaryOpportunityStatus=Stato opportunità per progetto/clienti potenziali DictionaryExpenseTaxCat=Note spesa - Categorie di trasporto @@ -1076,7 +1091,7 @@ LoginPage=Pagina di login BackgroundImageLogin=Immagine di sfondo PermanentLeftSearchForm=Modulo di ricerca permanente nel menu di sinistra DefaultLanguage=Lingua predefinita (codice lingua) -EnableMultilangInterface=Abilita supporto multilingua +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Abilita la visualizzazione del logo CompanyInfo=Società/Organizzazione CompanyIds=Informazioni società/fondazione @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=È necessario almeno un criterio di ricer NewTranslationStringToShow=Nuova stringa di testo da utilizzare OriginalValueWas=La traduzione originale è stata sovrascritta. Il testo originale era:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Applicazioni/moduli attivi: %s / %s +TitleNumberOfActivatedModules=Moduli attivati +TotalNumberOfActivatedModules=Moduli attivati: %s / %s YouMustEnableOneModule=Devi abilitare almeno un modulo ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Si in estate @@ -1264,7 +1280,7 @@ FieldEdition=Modifica del campo %s FillThisOnlyIfRequired=Per esempio: +2 (compilare solo se ci sono problemi di scostamento del fuso orario) GetBarCode=Ottieni codice a barre NumberingModules=Modelli di numerazione -DocumentModules=Document models +DocumentModules=Modelli di documenti ##### Module password generation PasswordGenerationStandard=Genera una password in base all'algoritmo interno di Dolibarr: 8 caratteri comprensivi di numeri e lettere minuscole. PasswordGenerationNone=Do not suggest a generated password. Password must be typed in manually. @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Quale scheda si desidera aprire per impostazione predefinita quando si seleziona il menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Attiva i suoni per le notifiche @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Impostazioni modulo ClickToDial (telefonate con un clic) ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=Questo modulo modifica i numeri di telefono, quando si utilizza un computer desktop, in collegamenti selezionabili. Un clic chiamerà il numero. Questo può essere usato per iniziare la telefonata quando si utilizza un softphone sul desktop o, ad esempio, quando si utilizza un sistema CTI basato sul protocollo SIP. Nota: quando si utilizza uno smartphone, i numeri di telefono sono sempre selezionabili. ClickToDialUseTelLink=Peri numeri di telefono basta usare un link di tipo "tel:" ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1703,8 +1719,8 @@ StockDecreaseForPointOfSaleDisabled=Stock decrease from Point of Sale disabled StockDecreaseForPointOfSaleDisabledbyBatch=Stock decrease in POS is not compatible with module Serial/Lot management (currently active) so stock decrease is disabled. CashDeskYouDidNotDisableStockDecease=You did not disable stock decrease when making a sale from Point of Sale. Hence a warehouse is required. CashDeskForceDecreaseStockLabel=La riduzione delle scorte per i prodotti batch è stata forzata. -CashDeskForceDecreaseStockDesc=Decrease first by the oldest eatby and sellby dates. -CashDeskReaderKeyCodeForEnter=Key code for "Enter" defined in barcode reader (Example: 13) +CashDeskForceDecreaseStockDesc=Diminuisci prima secondo le date più antiche di Eatby e Sellby. +CashDeskReaderKeyCodeForEnter=Codice chiave per "Inserisci" definito nel lettore di codici a barre (Esempio: 13) ##### Bookmark ##### BookmarkSetup=Impostazioni modulo segnalibri BookmarkDesc=Questo modulo consente di gestire i segnalibri web. È possibile aggiungere collegamenti a pagine Dolibarr o a qualsiasi altro sito web esterno al menu di sinistra. @@ -1808,7 +1824,7 @@ TopMenuDisableImages=Nascondi le icone nel menu superiore LeftMenuBackgroundColor=Colore di sfondo menù laterale BackgroundTableTitleColor=Colore di sfondo della riga di intestazione BackgroundTableTitleTextColor=Colore del testo per la riga del titolo delle tabelle -BackgroundTableTitleTextlinkColor=Text color for Table title link line +BackgroundTableTitleTextlinkColor=Colore del testo per la riga di collegamento del titolo della tabella BackgroundTableLineOddColor=Colore di sfondo per le linee dispari delle tabelle BackgroundTableLineEvenColor=Colore di sfondo per le linee pari delle tabelle MinimumNoticePeriod=Periodo minimo di avviso (le richieste di ferie/permesso dovranno essere effettuate prima di questo periodo) @@ -1817,6 +1833,7 @@ EnterAnyCode=Questo campo contiene un riferimento per identificare la linea. Ins Enter0or1=Inserire 0 o 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=Il colore RGB è nel formato HEX, es:FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Posizione di questo modello nella menu a tendina SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Richiesta di preventivo MailToSendSupplierOrder=Ordini d'acquisto MailToSendSupplierInvoice=Fatture Fornitore MailToSendContract=Contratti +MailToSendReception=Receptions MailToThirdparty=Soggetti terzi MailToMember=Membri MailToUser=Utenti @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Modelli per documenti prodotto +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=Guarda ChangeLog file (in inglese) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Margine sinistro sul PDF MAIN_PDF_MARGIN_RIGHT=Margine destro sul PDF MAIN_PDF_MARGIN_TOP=Margine superiore sul PDF MAIN_PDF_MARGIN_BOTTOM=Margine inferiore su PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Altezza per logo in PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,17 +1953,18 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Crea Opportunità (e Soggetto terzo se necessario) -CreateTicketAndThirdParty=Crea Ticket (e Soggetto terzo se necessario) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Ultimo codice risultato NbOfEmailsInInbox=Numero di e-mail nella directory di origine LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Tracking ID found -WithoutDolTrackingID=Dolibarr Tracking ID not found +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=CAP MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree -OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. +OperationParamDesc=Definire i valori da utilizzare per l'oggetto dell'azione o come estrarre i valori. Ad esempio:
    objproperty1=SET: il valore per impostare
    objproperty2=SET: un valore con la sostituzione di __objproperty1__
    objproperty3=SETIFEMPTY: valore usato se objproperty3 non è già pronto
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY: Il nome della mia azienda è\\s([^\\s]*)Usa il carattere ; come separatore per estrarre o impostare diverse proprietà. OpeningHours=Orari di apertura OpeningHoursDesc=Inserisci gli orari di apertura regolare della tua azienda. ResourceSetup=Configuration of Resource module @@ -1977,14 +1998,14 @@ WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramatical ModuleActivated=Module %s is activated and slows the interface EXPORTS_SHARE_MODELS=Export models are share with everybody ExportSetup=Setup of module Export -ImportSetup=Setup of module Import +ImportSetup=Impostazione del modulo Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. -EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. -EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. +EmailCollectorTargetDir=Potrebbe essere un comportamento desiderato spostare l'e-mail in un altro tag / directory quando è stata elaborata correttamente. Basta impostare il nome della directory qui per utilizzare questa funzione (NON usare caratteri speciali nel nome). Si noti che è necessario utilizzare anche un account di accesso in lettura / scrittura. +EmailCollectorLoadThirdPartyHelp=È possibile utilizzare questa azione per utilizzare il contenuto dell'email per trovare e caricare una terza parte esistente nel database. La terza parte trovata (o creata) verrà utilizzata per le seguenti azioni che ne hanno bisogno. Nel campo del parametro è possibile utilizzare ad esempio 'EXTRACT:BODY:Name:\\s([^\\s]*)' se si desidera estrarre il nome della terza parte da una stringa 'Nome: nome da trovare' trovato nel corpo. EndPointFor=End point for %s : %s DeleteEmailCollector=Delete email collector ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector? @@ -1994,7 +2015,7 @@ RESTRICT_ON_IP=Allow access to some host IP only (wildcard not allowed, use spac IPListExample=127.0.0.1 192.168.0.2 [::1] BaseOnSabeDavVersion=Based on the library SabreDAV version NotAPublicIp=Not a public IP -MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation. +MakeAnonymousPing=Effettua un ping anonimo '+1' al server della Fondazione Dolibarr (eseguito 1 volta solo dopo l'installazione) per consentire alla fondazione di contare il numero di installazioni Dolibarr. FeatureNotAvailableWithReceptionModule=Funzione non disponibile quando la ricezione del modulo è abilitata EmailTemplate=Modello per le e-mail EMailsWillHaveMessageID=Le e-mail avranno un tag "Riferimenti" corrispondente a questa sintassi @@ -2005,3 +2026,7 @@ RssNote=Nota: ogni definizione di feed RSS fornisce un widget che è necessario JumpToBoxes=Vai a Setup -> Widget MeasuringUnitTypeDesc=Usa qui un valore come "dimensione", "superficie", "volume", "peso", "tempo" MeasuringScaleDesc=La scala è il numero di posizioni in cui è necessario spostare la parte decimale in modo che corrisponda all'unità di riferimento predefinita. Per il tipo di unità "tempo", è il numero di secondi. I valori tra 80 e 99 sono valori riservati. +TemplateAdded=Template aggiunto +TemplateUpdated=Template aggiornato +TemplateDeleted=Template eliminato +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/it_IT/agenda.lang b/htdocs/langs/it_IT/agenda.lang index a23c7ae7b81..ae83e1cee06 100644 --- a/htdocs/langs/it_IT/agenda.lang +++ b/htdocs/langs/it_IT/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Numero di eventi ListOfActions=Lista degli eventi EventReports=Report eventi Location=Luogo -ToUserOfGroup=A qualsiasi utente nel gruppo +ToUserOfGroup=Evento assegnato a qualsiasi utente nel gruppo EventOnFullDay=Dura tutto il giorno MenuToDoActions=Tutte le azioni incomplete MenuDoneActions=Tutte le azioni passate @@ -63,7 +63,7 @@ ShipmentClassifyClosedInDolibarr=Spedizione %s classificata come fatturata ShipmentUnClassifyCloseddInDolibarr=Spedizione %s classificata come riaperta ShipmentBackToDraftInDolibarr=La spedizione %s torna allo stato bozza ShipmentDeletedInDolibarr=Spedizione %s eliminata -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=Ricezione %s convalidata OrderCreatedInDolibarr=Ordine %s creato OrderValidatedInDolibarr=Ordine convalidato OrderDeliveredInDolibarr=Ordine %s classificato consegnato @@ -86,13 +86,15 @@ ProposalDeleted=Proposta cancellata OrderDeleted=Ordine cancellato InvoiceDeleted=Fattura cancellata DraftInvoiceDeleted=Bozza di fattura eliminata +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Prodotto %s creato PRODUCT_MODIFYInDolibarr=Prodotto %s modificato PRODUCT_DELETEInDolibarr=Prodotto %s cancellato HOLIDAY_CREATEInDolibarr=Richiesta di congedo %s creata HOLIDAY_MODIFYInDolibarr=Richiesta di congedo %s modificata HOLIDAY_APPROVEInDolibarr=Richiesta di ferie %s approvata -HOLIDAY_VALIDATEInDolibarr=Request for leave %s validated +HOLIDAY_VALIDATEInDolibarr=Richiesta di congedo %s convalidata HOLIDAY_DELETEInDolibarr=Richiesta di congedo %s eliminata EXPENSE_REPORT_CREATEInDolibarr=Nota spese %s creata EXPENSE_REPORT_VALIDATEInDolibarr=Nota spese %s validata @@ -113,10 +115,10 @@ BOM_CLOSEInDolibarr=DBA disabilitata BOM_REOPENInDolibarr=DBA riaperta BOM_DELETEInDolibarr=BOM eliminata MRP_MO_VALIDATEInDolibarr=MO convalidato -MRP_MO_UNVALIDATEInDolibarr=MO set to draft status +MRP_MO_UNVALIDATEInDolibarr=MO impostato sullo stato bozza MRP_MO_PRODUCEDInDolibarr=MO prodotto MRP_MO_DELETEInDolibarr=MO eliminato -MRP_MO_CANCELInDolibarr=MO canceled +MRP_MO_CANCELInDolibarr=MO annullato ##### End agenda events ##### AgendaModelModule=Modelli di documento per eventi DateActionStart=Data di inizio @@ -127,7 +129,7 @@ AgendaUrlOptionsNotAdmin=logina=!%s per limitare l'output alle azioni non AgendaUrlOptions4=logint=%s per limitare l'output alle azioni assegnate all'utente %s (proprietario e altri). AgendaUrlOptionsProject=project= __PROJECT_ID__ per limitare l'output alle azioni collegate al progetto __PROJECT_ID__ . AgendaUrlOptionsNotAutoEvent=notactiontype=systemauto per escludere gli eventi automatici. -AgendaUrlOptionsIncludeHolidays=includeholidays=1 to include events of holidays. +AgendaUrlOptionsIncludeHolidays= includeholidays = 1 per includere eventi delle festività. AgendaShowBirthdayEvents=Visualizza i compleanni dei contatti AgendaHideBirthdayEvents=Nascondi i compleanni dei contatti Busy=Occupato @@ -155,6 +157,12 @@ EveryMonth=Ogni mese DayOfMonth=Giorno del mese DayOfWeek=Giorno della settimana DateStartPlusOne=Data inizio +1 ora -SetAllEventsToTodo=Set all events to todo -SetAllEventsToInProgress=Set all events to in progress -SetAllEventsToFinished=Set all events to finished +SetAllEventsToTodo=Imposta tutti gli eventi su da fare +SetAllEventsToInProgress=Imposta tutti gli eventi su in corso +SetAllEventsToFinished=Imposta tutti gli eventi su conclusi +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/it_IT/banks.lang b/htdocs/langs/it_IT/banks.lang index e45c9f36c3d..99e5e05c812 100644 --- a/htdocs/langs/it_IT/banks.lang +++ b/htdocs/langs/it_IT/banks.lang @@ -37,8 +37,8 @@ IbanValid=Il codice IBAN è valido IbanNotValid=Il codice IBAN non è valido StandingOrders=Ordini di addebito diretto StandingOrder=Ordine di addebito diretto -PaymentByDirectDebit=Payment by direct debit -PaymentByBankTransfers=Payments by credit transfer +PaymentByDirectDebit=Pagamento con addebito diretto +PaymentByBankTransfers=Pagamenti tramite bonifico bancario PaymentByBankTransfer=Pagamento con bonifico bancario AccountStatement=Estratto conto AccountStatementShort=Est. conto @@ -98,7 +98,7 @@ AddBankRecordLong=Aggiungi operazione manualmente Conciliated=Conciliata ConciliatedBy=Transazione conciliata da DateConciliating=Data di conciliazione -BankLineConciliated=Entry reconciled with bank receipt +BankLineConciliated=Voce riconciliata con ricevuta bancaria Reconciled=Conciliata NotReconciled=Non conciliata CustomerInvoicePayment=Pagamento fattura attiva @@ -106,8 +106,8 @@ SupplierInvoicePayment=Pagamento fornitore SubscriptionPayment=Pagamento adesione WithdrawalPayment=Domicil. banc. SocialContributionPayment=Pagamento delle imposte sociali/fiscali -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=Bonifico bancario +BankTransfers=Bonifici MenuBankInternalTransfer=Trasferimento interno TransferDesc=Transfer from one account to another, Dolibarr will write two records (a debit in source account and a credit in target account). The same amount (except sign), label and date will be used for this transaction) TransferFrom=Da diff --git a/htdocs/langs/it_IT/bills.lang b/htdocs/langs/it_IT/bills.lang index 2a2e30ab8b1..930f6948a9e 100644 --- a/htdocs/langs/it_IT/bills.lang +++ b/htdocs/langs/it_IT/bills.lang @@ -212,10 +212,10 @@ AmountOfBillsByMonthHT=Importo delle fatture per mese (al netto delle imposte) UseSituationInvoices=Allow situation invoice UseSituationInvoicesCreditNote=Allow situation invoice credit note Retainedwarranty=Retained warranty -AllowedInvoiceForRetainedWarranty=Retained warranty usable on the following types of invoices +AllowedInvoiceForRetainedWarranty=Garanzia trattenuta utilizzabile sulle seguenti tipologie di fatture RetainedwarrantyDefaultPercent=Retained warranty default percent -RetainedwarrantyOnlyForSituation=Make "retained warranty" available only for situation invoices -RetainedwarrantyOnlyForSituationFinal=On situation invoices the global "retained warranty" deduction is applied only on the final situation +RetainedwarrantyOnlyForSituation=Rendere la "garanzia trattenuta" disponibile solo per le fatture della situazione +RetainedwarrantyOnlyForSituationFinal=Sulle fatture di situazione la detrazione globale "garanzia trattenuta" viene applicata solo sulla situazione finale ToPayOn=To pay on %s toPayOn=to pay on %s RetainedWarranty=Retained Warranty @@ -328,7 +328,7 @@ InvoiceStatus=Stato Fattura InvoiceNote=Nota Fattura InvoicePaid=Fattura pagata InvoicePaidCompletely=Pagata completamente -InvoicePaidCompletelyHelp=Invoice that are paid completely. This excludes invoices that are paid partially. To get list of all 'Closed' or non 'Closed' invoices, prefer to use a filter on the invoice status. +InvoicePaidCompletelyHelp=Fattura pagata completamente. Ciò esclude le fatture pagate parzialmente. Per ottenere l'elenco di tutte le fatture "chiuse" o non "chiuse", preferisci utilizzare un filtro sullo stato della fattura. OrderBilled=Order billed DonationPaid=Donation paid PaymentNumber=Numero del pagamento @@ -383,7 +383,7 @@ GeneratedFromTemplate=Generated from template invoice %s WarningInvoiceDateInFuture=Attenzione, la data della fattura è successiva alla data odierna WarningInvoiceDateTooFarInFuture=Attenzione, la data della fattura è troppo lontana dalla data odierna ViewAvailableGlobalDiscounts=Mostra gli sconti disponibili -GroupPaymentsByModOnReports=Group payments by mode on reports +GroupPaymentsByModOnReports=Raggruppa i pagamenti per modalità sui report # PaymentConditions Statut=Stato PaymentConditionShortRECEP=Rimessa diretta @@ -410,10 +410,10 @@ PaymentConditionShort14D=14 giorni PaymentCondition14D=Pagamento a 14 giorni PaymentConditionShort14DENDMONTH=14 giorni fine mese PaymentCondition14DENDMONTH=Pagamento a 14 giorni fine mese -FixAmount=Fixed amount - 1 line with label '%s' +FixAmount=Importo fisso - 1 riga con etichetta "%s" VarAmount=Importo variabile (%% tot.) VarAmountOneLine=Variable amount (%% tot.) - 1 line with label '%s' -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Importo variabile (%% tot.) - tutte le stesse righe # PaymentType PaymentTypeVIR=Bonifico bancario PaymentTypeShortVIR=Bonifico bancario @@ -441,8 +441,8 @@ BankAccountNumberKey=Checksum Residence=Indirizzo IBANNumber=Codice IBAN IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=IBAN del cliente +SupplierIBAN=IBAN del venditore BIC=BIC/SWIFT BICNumber=Codice BIC/SWIFT ExtraInfos=Extra info @@ -516,8 +516,8 @@ TerreNumRefModelDesc1=Restituisce un numero nel formato %syymm-nnnn per le fattu MarsNumRefModelDesc1=restituisce un numero nel formato %saamm-nnnn per fatture standard, %syymm-nnnn per le fatture sostitutive, %syymm-nnnn per le note d'addebito e %syymm-nnnn per le note di credito dove yy sta per anno, mm per mese e nnnn è una sequenza progressiva, senza salti e che non si azzera. TerreNumRefModelError=Un altro modello di numerazione con sequenza $ syymm è già esistente e non è compatibile con questo modello. Rimuovere o rinominare per attivare questo modulo. CactusNumRefModelDesc1=Restituisce il numero con formato %syymm-nnnn per le fatture standard, %syymm-nnnn per le note di credito e %syymm-nnnn per le fatture di acconto dove yy è l'anno, mm è il mese e nnnn è una sequenza senza interruzioni e senza ritorno a 0 -EarlyClosingReason=Early closing reason -EarlyClosingComment=Early closing note +EarlyClosingReason=Motivo di chiusura anticipata +EarlyClosingComment=Nota di chiusura anticipata ##### Types de contacts ##### TypeContact_facture_internal_SALESREPFOLL=Responsabile pagamenti clienti TypeContact_facture_external_BILLING=Contatto fatturazioni clienti @@ -571,7 +571,7 @@ AutoFillDateTo=Imposta data di fine per la riga di servizio con la successiva da AutoFillDateToShort=Imposta data di fine MaxNumberOfGenerationReached=Max number of gen. reached BILL_DELETEInDolibarr=Fattura cancellata -BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted -UnitPriceXQtyLessDiscount=Unit price x Qty - Discount -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area +BILL_SUPPLIER_DELETEInDolibarr=Fattura fornitore eliminata +UnitPriceXQtyLessDiscount=Prezzo unitario x Qtà - Sconto +CustomersInvoicesArea=Area fatturazione clienti +SupplierInvoicesArea=Area di fatturazione del fornitore diff --git a/htdocs/langs/it_IT/blockedlog.lang b/htdocs/langs/it_IT/blockedlog.lang index b0cbfa4cdde..7a37bfa4034 100644 --- a/htdocs/langs/it_IT/blockedlog.lang +++ b/htdocs/langs/it_IT/blockedlog.lang @@ -8,7 +8,7 @@ BrowseBlockedLog=Unalterable logs ShowAllFingerPrintsMightBeTooLong=Show all archived logs (might be long) ShowAllFingerPrintsErrorsMightBeTooLong=Show all non-valid archive logs (might be long) DownloadBlockChain=Download fingerprints -KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, or has erased the previous archived record (check that line with previous # exists). +KoCheckFingerprintValidity=La voce del registro archiviata non è valida. Significa che qualcuno (un hacker?) Ha modificato alcuni dati di questo record dopo che è stato registrato, o ha cancellato il record archiviato precedentemente (controlla che esista quella riga con # precedente). OkCheckFingerprintValidity=Archived log record is valid. The data on this line was not modified and the entry follows the previous one. OkCheckFingerprintValidityButChainIsKo=Archived log seems valid compared to previous one but the chain was corrupted previously. AddedByAuthority=Stored into remote authority diff --git a/htdocs/langs/it_IT/boxes.lang b/htdocs/langs/it_IT/boxes.lang index 6eb3fbc421d..9c5a07767a4 100644 --- a/htdocs/langs/it_IT/boxes.lang +++ b/htdocs/langs/it_IT/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Ordini fornitore: ultimi %s modificati BoxTitleLastModifiedCustomerBills=Fatture attive: ultime %s modificate BoxTitleLastModifiedCustomerOrders=Ordini: ultimi %s modificati BoxTitleLastModifiedPropals=Ultime %s proposte modificate +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Fatture attive ForCustomersOrders=Ordini cliente ForProposals=Proposte @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=L'account Suspense non è definito BoxLastCustomerShipments=Ultime spedizioni cliente BoxTitleLastCustomerShipments=Ultime %s spedizioni cliente NoRecordedShipments=Nessuna spedizione cliente registrata +# Pages +AccountancyHome=Contabilità diff --git a/htdocs/langs/it_IT/cashdesk.lang b/htdocs/langs/it_IT/cashdesk.lang index 52a4524cf84..da0aaa59816 100644 --- a/htdocs/langs/it_IT/cashdesk.lang +++ b/htdocs/langs/it_IT/cashdesk.lang @@ -16,7 +16,7 @@ AddThisArticle=Aggiungi questo articolo RestartSelling=Rimetti in vendita SellFinished=Vendita completata PrintTicket=Stampa biglietto -SendTicket=Send ticket +SendTicket=Invia biglietto NoProductFound=Nessun articolo trovato ProductFound=Prodotto trovato NoArticle=Nessun articolo @@ -49,7 +49,7 @@ Footer=Footer AmountAtEndOfPeriod=Amount at end of period (day, month or year) TheoricalAmount=Theorical amount RealAmount=Real amount -CashFence=Cash fence +CashFence=Cassetta dei contanti CashFenceDone=Cash fence done for the period NbOfInvoices=Numero di fatture Paymentnumpad=Type of Pad to enter payment @@ -60,9 +60,9 @@ TakeposNeedsCategories=TakePOS needs product categories to work OrderNotes=Order Notes CashDeskBankAccountFor=Default account to use for payments in NoPaimementModesDefined=No paiment mode defined in TakePOS configuration -TicketVatGrouped=Group VAT by rate in tickets|receipts -AutoPrintTickets=Automatically print tickets|receipts -PrintCustomerOnReceipts=Print customer on tickets|receipts +TicketVatGrouped=Raggruppa l'IVA per aliquota in biglietti / ricevute +AutoPrintTickets=Stampa automaticamente biglietti / ricevute +PrintCustomerOnReceipts=Stampa cliente per biglietti / ricevute EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ? ConfirmDiscardOfThisPOSSale=Do you want to discard this current sale ? @@ -72,48 +72,53 @@ Terminal=Terminal NumberOfTerminals=Number of Terminals TerminalSelect=Select terminal you want to use: POSTicket=POS Ticket -POSTerminal=POS Terminal -POSModule=POS Module +POSTerminal=Terminale POS +POSModule=Modulo POS BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=La fattura è già stata convalidata NoLinesToBill=No lines to bill CustomReceipt=Ricevuta personalizzata ReceiptName=Nome ricevuta -ProductSupplements=Product Supplements -SupplementCategory=Supplement category -ColorTheme=Color theme -Colorful=Colorful +ProductSupplements=Prodotti di supplemento +SupplementCategory=Categorie di supplemento +ColorTheme=Colore del tema +Colorful=Colorato HeadBar=Head Bar -SortProductField=Field for sorting products +SortProductField=Campo per la selezione di prodotti Browser=Browser -BrowserMethodDescription=Simple and easy receipt printing. Only a few parameters to configure the receipt. Print via browser. -TakeposConnectorMethodDescription=External module with extra features. Posibility to print from the cloud. -PrintMethod=Print method -ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. -ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad -CashDeskRefNumberingModules=Numbering module for POS sales -CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number -TakeposGroupSameProduct=Group same products lines -StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos -CloseCashFence=Close cash fence -CashReport=Cash report -MainPrinterToUse=Main printer to use -OrderPrinterToUse=Order printer to use -MainTemplateToUse=Main template to use -OrderTemplateToUse=Order template to use -BarRestaurant=Bar Restaurant -AutoOrder=Order by the customer himself -RestaurantMenu=Menu -CustomerMenu=Customer menu -ScanToMenu=Scan QR code to see the menu -ScanToOrder=Scan QR code to order -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +BrowserMethodDescription=Stampa di ricevute semplice e facile. Solo pochi parametri per configurare la ricevuta. Stampa tramite browser. +TakeposConnectorMethodDescription=Modulo esterno con funzionalità extra. Possibilità di stampare dal cloud. +PrintMethod=Metodo di stampa +ReceiptPrinterMethodDescription=Metodo potente con molti parametri. Completamente personalizzabile con modelli. Impossibile stampare dal cloud. +ByTerminal=Da terminale +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad +CashDeskRefNumberingModules=Modulo di numerazione per vendite POS +CashDeskGenericMaskCodes6 =
    Il tag {TN} viene utilizzato per aggiungere il numero del terminale +TakeposGroupSameProduct=Raggruppa le stesse linee di prodotti +StartAParallelSale=Inizia una nuova vendita parallela +ControlCashOpening=Control cash box at opening POS +CloseCashFence=Chiudi cassetta contanti +CashReport=Rapporto di cassa +MainPrinterToUse=Stampante principale da utilizzare +OrderPrinterToUse=Ordine stampante da utilizzare +MainTemplateToUse=Modello principale da usare +OrderTemplateToUse=Ordine modello da utilizzare +BarRestaurant=Bar ristorante +AutoOrder=Ordine dal cliente stesso +RestaurantMenu=Menù +CustomerMenu=Menù cliente +ScanToMenu=Scansiona il codice QR per vedere il menù +ScanToOrder=Scansiona il codice QR per ordinare +Appearance=Aspetto +HideCategoryImages=Nascondi immagini di categoria +HideProductImages=Nascondi immagini del prodotto +NumberOfLinesToShow=Numero di righe di immagini da mostrare +DefineTablePlan=Definisci il piano dei tavoli +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/it_IT/categories.lang b/htdocs/langs/it_IT/categories.lang index 7ea6cadd248..0907cae5aaa 100644 --- a/htdocs/langs/it_IT/categories.lang +++ b/htdocs/langs/it_IT/categories.lang @@ -63,7 +63,7 @@ AccountsCategoriesShort=Conti di tag/categorie ProjectsCategoriesShort=Tag/categoria progetti UsersCategoriesShort=Users tags/categories StockCategoriesShort=Tag / categorie di magazzino -ThisCategoryHasNoItems=This category does not contain any items. +ThisCategoryHasNoItems=Questa categoria non contiene alcun elemento. CategId=ID Tag/categoria CatSupList=List of vendor tags/categories CatCusList=Lista delle tag/categorie clienti @@ -86,5 +86,5 @@ ByDefaultInList=Default nella lista ChooseCategory=Choose category StocksCategoriesArea=Area categorie magazzini ActionCommCategoriesArea=Area eventi categorie -WebsitePagesCategoriesArea=Page-Container Categories Area +WebsitePagesCategoriesArea=Pagina contenitore Area categorie UseOrOperatorForCategories=Uso o operatore per le categorie diff --git a/htdocs/langs/it_IT/companies.lang b/htdocs/langs/it_IT/companies.lang index 935d821995c..bc8d25726e2 100644 --- a/htdocs/langs/it_IT/companies.lang +++ b/htdocs/langs/it_IT/companies.lang @@ -71,7 +71,7 @@ Chat=Chat PhonePro=Telefono uff. PhonePerso=Telefono pers. PhoneMobile=Cellulare -No_Email=Refuse bulk emailings +No_Email=Rifiuta email di massa Fax=Fax Zip=CAP Town=Città @@ -246,11 +246,11 @@ ProfId3US=- ProfId4US=- ProfId5US=- ProfId6US=- -ProfId1RO=Prof Id 1 (CUI) -ProfId2RO=Prof Id 2 (Nr. Înmatriculare) -ProfId3RO=Prof Id 3 (CAEN) +ProfId1RO=Prof ID 1 (CUI) +ProfId2RO=Prof ID 2 (Nr. Immatricolazione) +ProfId3RO=Prof ID 3 (CAEN) ProfId4RO=- -ProfId5RO=Prof Id 5 (EUID) +ProfId5RO=Prof ID 5 (EUID) ProfId6RO=- ProfId1RU=OGRN ProfId2RU=INN @@ -325,7 +325,7 @@ CompanyDeleted=Società %s cancellata dal database. ListOfContacts=Elenco dei contatti ListOfContactsAddresses=Elenco dei contatti ListOfThirdParties=Elenco dei soggetti terzi -ShowCompany=Third Party +ShowCompany=Terze parti ShowContact=Contatto-Indirizzo ContactsAllShort=Tutti (Nessun filtro) ContactType=Tipo di contatto @@ -447,7 +447,7 @@ SaleRepresentativeFirstname=Nome del commerciale SaleRepresentativeLastname=Cognome del commerciale ErrorThirdpartiesMerge=Si è verificato un errore durante l'eliminazione di terze parti. Si prega di controllare il registro. Le modifiche sono state ripristinate. NewCustomerSupplierCodeProposed=Il codice cliente o fornitore è già in uso, è consigliato usare un codice diverso -KeepEmptyIfGenericAddress=Keep this field empty if this address is a generic address +KeepEmptyIfGenericAddress=Mantieni vuoto questo campo se questo indirizzo è generico #Imports PaymentTypeCustomer=Payment Type - Customer PaymentTermsCustomer=Termini di Pagamento - Cliente diff --git a/htdocs/langs/it_IT/compta.lang b/htdocs/langs/it_IT/compta.lang index c08cfa61481..8243a338ffc 100644 --- a/htdocs/langs/it_IT/compta.lang +++ b/htdocs/langs/it_IT/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Tassa o contributo SocialContributions=Tasse o contributi SocialContributionsDeductibles=Tasse o contributi deducibili SocialContributionsNondeductibles=Tasse o contributi non deducibili +DateOfSocialContribution=Data dell'imposta sociale o fiscale LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Spese straordinarie @@ -157,9 +158,9 @@ SeeReportInInputOutputMode=Vedi %sanalisi dei pagamenti%s per un calcolo sui pag SeeReportInDueDebtMode=Vedi %sanalisi delle fatture %s per un calcolo basato sulle fatture registrate anche se non ancora contabilizzate nel libro mastro. SeeReportInBookkeepingMode=See %sBookeeping report%s for a calculation on Bookkeeping Ledger table RulesAmountWithTaxIncluded=- Gli importi indicati sono tasse incluse -RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.
    - It is based on the billing date of invoices and on the due date for expenses or tax payments. For salaries defined with Salary module, the value date of payment is used. +RulesResultDue=- Include fatture in sospeso, spese, IVA, donazioni, indipendentemente dal fatto che siano pagate o meno. Comprende anche gli stipendi pagati.
    - Si basa sulla data di fatturazione delle fatture e sulla data di scadenza delle spese o dei pagamenti delle imposte. Per gli stipendi definiti con il modulo Salario, viene utilizzata la data valuta del pagamento. RulesResultInOut=- Include i pagamenti reali di fatture, spese e IVA.
    - Si basa sulle date di pagamento di fatture, spese e IVA. -RulesCADue=- It includes the customer's due invoices whether they are paid or not.
    - It is based on the billing date of these invoices.
    +RulesCADue=- Include le fatture scadute del cliente indipendentemente dal fatto che siano pagate o meno.
    - Si basa sulla data di fatturazione di queste fatture.
    RulesCAIn=- Comprende le fatture effettivamente pagate dai clienti.
    - Si basa sulla data dei pagamenti.
    RulesCATotalSaleJournal=It includes all credit lines from the Sale journal. RulesAmountOnInOutBookkeepingRecord=It includes record in your Ledger with accounting accounts that has the group "EXPENSE" or "INCOME" @@ -255,10 +256,12 @@ TurnoverbyVatrate=Fatturato per aliquota iva di vendita TurnoverCollectedbyVatrate=Fatturato per aliquota iva di vendita PurchasebyVatrate=Acquisti per aliquota iva LabelToShow=Etichetta breve -PurchaseTurnover=Purchase turnover -PurchaseTurnoverCollected=Purchase turnover collected -RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not.
    - It is based on the invoice date of these invoices.
    -RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.
    - It is based on the payment date of these invoices
    -RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. -ReportPurchaseTurnover=Purchase turnover invoiced -ReportPurchaseTurnoverCollected=Purchase turnover collected +PurchaseTurnover=Fatturato d'acquisto +PurchaseTurnoverCollected=Fatturato di acquisto raccolto +RulesPurchaseTurnoverDue=- Include le fatture scadute del fornitore, che siano pagate o meno.
    - Si basa sulla data di fatturazione di queste fatture.
    +RulesPurchaseTurnoverIn=- Comprende tutti i pagamenti effettivi delle fatture effettuate ai fornitori.
    - Si basa sulla data di pagamento di queste fatture
    +RulesPurchaseTurnoverTotalPurchaseJournal=Include tutte le righe di addebito dal giornale di registrazione acquisti. +ReportPurchaseTurnover=Fatturato di acquisto fatturato +ReportPurchaseTurnoverCollected=Fatturato di acquisto raccolto +IncludeVarpaysInResults = Includere vari pagamenti nei rapporti +IncludeLoansInResults = Includere prestiti nei report diff --git a/htdocs/langs/it_IT/contracts.lang b/htdocs/langs/it_IT/contracts.lang index b2b19bab32b..91fc0fd0bb8 100644 --- a/htdocs/langs/it_IT/contracts.lang +++ b/htdocs/langs/it_IT/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Servizi in esecuzione MenuExpiredServices=Servizi scaduti MenuClosedServices=Servizi chiusi NewContract=Nuovo contratto -NewContractSubscription=Nuovo contratto/sottoscrizione +NewContractSubscription=Nuovo contratto o abbonamento AddContract=Crea contratto DeleteAContract=Eliminazione di un contratto ActivateAllOnContract=Attiva tutti i servizi @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Contatto interno per i rapporti succes TypeContact_contrat_external_BILLING=Contatto di fatturazione TypeContact_contrat_external_CUSTOMER=Contatto di follow-up TypeContact_contrat_external_SALESREPSIGN=Contatto per la firma dei contratti -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Nascondi i servizi chiusi di default +ShowClosedServices=Mostra servizi chiusi +HideClosedServices=Nascondi servizi chiusi diff --git a/htdocs/langs/it_IT/errors.lang b/htdocs/langs/it_IT/errors.lang index 543b4e73b44..01a4e96f6b8 100644 --- a/htdocs/langs/it_IT/errors.lang +++ b/htdocs/langs/it_IT/errors.lang @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Bad syntax for vendor code ErrorSupplierCodeRequired=Il codice fornitore è richiesto ErrorSupplierCodeAlreadyUsed=Codice fornitore già utilizzato ErrorBadParameters=Parametri errati -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Parametri errati o mancanti ErrorBadValueForParameter=Valore '%s' non corretto per il parametro '%s' ErrorBadImageFormat=Tipo file immagine non supportato (la tua installazione di PHP non supporta le funzioni per convertire le immagini di questo formato) ErrorBadDateFormat=Il valore '%s' ha un formato della data sbagliato @@ -60,7 +60,7 @@ ErrorPartialFile=File non completamente ricevuto dal server. ErrorNoTmpDir=La directory temporanea %s non esiste. ErrorUploadBlockedByAddon=Upload bloccato da un plugin di Apache/PHP ErrorFileSizeTooLarge=La dimensione del file è troppo grande. -ErrorFieldTooLong=Field %s is too long. +ErrorFieldTooLong=Il campo %s è troppo lungo. ErrorSizeTooLongForIntType=Numero troppo lungo (massimo %s cifre) ErrorSizeTooLongForVarcharType=Stringa troppo lunga (limite di %s caratteri) ErrorNoValueForSelectType=Per favore immetti un valore per la lista di selezione @@ -119,9 +119,9 @@ ErrorLoginDoesNotExists=Utente con accesso %s inesistente ErrorLoginHasNoEmail=Questo utente non ha alcun indirizzo email. Processo interrotto. ErrorBadValueForCode=Valore del codice errato. Riprova con un nuovo valore... ErrorBothFieldCantBeNegative=I campi %s e %s non possono essere entrambi negativi -ErrorFieldCantBeNegativeOnInvoice=Field %s cannot be negative on this type of invoice. If you need to add a discount line, just create the discount first (from field '%s' in thirdparty card) and apply it to the invoice. -ErrorLinesCantBeNegativeForOneVATRate=Total of lines (net of tax) can't be negative for a given not null VAT rate (Found a negative total for VAT rate %s%%). -ErrorLinesCantBeNegativeOnDeposits=Lines can't be negative in a deposit. You will face problems when you will need to consume the deposit in final invoice if you do so. +ErrorFieldCantBeNegativeOnInvoice=Il campo %s non può essere negativo su questo tipo di fattura. Se è necessario aggiungere una riga di sconto, è sufficiente creare prima lo sconto (dal campo "%s" nella scheda di terze parti) e applicarlo alla fattura. +ErrorLinesCantBeNegativeForOneVATRate=Il totale delle righe (al netto delle imposte) non può essere negativo per un'aliquota IVA non nulla (Trovato un totale negativo per l'aliquota IVA %s %%). +ErrorLinesCantBeNegativeOnDeposits=Le linee non possono essere negative in un deposito. Dovrai affrontare problemi quando dovrai consumare il deposito nella fattura finale se lo fai. ErrorQtyForCustomerInvoiceCantBeNegative=La quantità di ciascuna riga della fattura cliente non può essere negativa ErrorWebServerUserHasNotPermission=L'account utente %s utilizzato per eseguire il server web non ha i permessi necessari ErrorNoActivatedBarcode=Nessun tipo di codice a barre attivato @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Il nuovo valore non può essere uguale al precede ErrorFailedToValidatePasswordReset=Cambio password fallito. Forse è già stato richiesto (questo link può essere usato una volta sola). Se no, prova a rifare la procedura dall'inizio. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Impossibile aggiungere il contatto -ErrorDateMustBeBeforeToday=La data non può essere successiva ad oggi +ErrorDateMustBeBeforeToday=La data deve essere inferiore a quella odierna +ErrorDateMustBeInFuture=La data deve essere maggiore di quella odierna ErrorPaymentModeDefinedToWithoutSetup=Un metodo di pagamento è stato impostato come %s ma il setup del modulo Fattura non è stato completato per definire le impostazioni da mostrare per questo metodo di pagamento. ErrorPHPNeedModule=Errore, il tuo PHP deve avere il modulo %s installato per usare questa funzionalità. ErrorOpenIDSetupNotComplete=Hai impostato il config file di Dolibarr per permettere l'autenticazione tramite OpenID, ma l'URL del service di OpenID non è definita nella costante %s @@ -184,7 +185,7 @@ ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad Definition Of Menu Array In ErrorSavingChanges=An error has occurred when saving the changes ErrorWarehouseRequiredIntoShipmentLine=Warehouse is required on the line to ship ErrorFileMustHaveFormat=Il file deve essere nel formato %s -ErrorFilenameCantStartWithDot=Filename can't start with a '.' +ErrorFilenameCantStartWithDot=Il nome del file non può iniziare con un "." ErrorSupplierCountryIsNotDefined=Country for this vendor is not defined. Correct this first. ErrorsThirdpartyMerge=Failed to merge the two records. Request canceled. ErrorStockIsNotEnoughToAddProductOnOrder=Stock is not enough for product %s to add it into a new order. @@ -228,17 +229,20 @@ ErrorSearchCriteriaTooSmall=Search criteria too small. ErrorObjectMustHaveStatusActiveToBeDisabled=Gli oggetti devono avere lo stato 'Attivo' per essere disabilitati ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Gli oggetti devono avere lo stato 'Bozza' o 'Disabilitato' per essere abilitato ErrorNoFieldWithAttributeShowoncombobox=Nessun campo ha la proprietà 'mostra nel quadrato combo' nella definizione dell'oggetto '%s'. Non c'è modo di mostrare la lista combo. -ErrorFieldRequiredForProduct=Field '%s' is required for product %s -ProblemIsInSetupOfTerminal=Problem is in setup of terminal %s. -ErrorAddAtLeastOneLineFirst=Add at least one line first -ErrorRecordAlreadyInAccountingDeletionNotPossible=Error, record is already transferred in accounting, deletion is not possible. -ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Error, language is mandatory if you set the page as a translation of another one. -ErrorLanguageOfTranslatedPageIsSameThanThisPage=Error, language of translated page is same than this one. -ErrorBatchNoFoundForProductInWarehouse=No lot/serial found for product "%s" in warehouse "%s". -ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this lot/serial for product "%s" in warehouse "%s". -ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) -ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? -ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorFieldRequiredForProduct=Il campo "%s" è obbligatorio per il prodotto %s +ProblemIsInSetupOfTerminal=Il problema è nella configurazione del terminale %s. +ErrorAddAtLeastOneLineFirst=Aggiungi prima almeno una riga +ErrorRecordAlreadyInAccountingDeletionNotPossible=Errore, il record è già stato trasferito in contabilità, la cancellazione non è possibile. +ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Errore, la lingua è obbligatoria se imposti la pagina come traduzione di un'altra. +ErrorLanguageOfTranslatedPageIsSameThanThisPage=Errore, la lingua della pagina tradotta è la stessa di questa. +ErrorBatchNoFoundForProductInWarehouse=Nessun lotto / numero di serie trovato per il prodotto "%s" nel magazzino "%s". +ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Quantità insufficiente per questo lotto / numero di serie per il prodotto "%s" nel magazzino "%s". +ErrorOnlyOneFieldForGroupByIsPossible=È possibile solo 1 campo per il "Raggruppa per" (gli altri vengono scartati) +ErrorTooManyDifferentValueForSelectedGroupBy=Sono stati trovati troppi valori diversi (più di %s ) per il campo " %s ", quindi non possiamo utilizzarlo come grafico "Group by". Il campo "Raggruppa per" è stato rimosso. Forse volevi usarlo come asse X? +ErrorReplaceStringEmpty=Errore, la stringa da sostituire è vuota +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. @@ -264,5 +268,5 @@ WarningAnEntryAlreadyExistForTransKey=Esiste già una voce tradotta per la chiav WarningNumberOfRecipientIsRestrictedInMassAction=Warning, number of different recipient is limited to %s when using the mass actions on lists WarningDateOfLineMustBeInExpenseReportRange=Warning, the date of line is not in the range of the expense report WarningProjectClosed=Il progetto è chiuso. È necessario prima aprirlo nuovamente. -WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +WarningSomeBankTransactionByChequeWereRemovedAfter=Alcune transazioni bancarie sono state rimosse dopo che è stata generata la ricevuta che le includeva. Quindi il numero di assegni e il totale dello scontrino possono differire dal numero e dal totale nell'elenco. +WarningFailedToAddFileIntoDatabaseIndex=Avviso, impossibile aggiungere la voce del file nella tabella dell'indice del database ECM diff --git a/htdocs/langs/it_IT/exports.lang b/htdocs/langs/it_IT/exports.lang index c475c13cffe..aa66a29179d 100644 --- a/htdocs/langs/it_IT/exports.lang +++ b/htdocs/langs/it_IT/exports.lang @@ -26,8 +26,8 @@ FieldTitle=Campi titolo NowClickToGenerateToBuildExportFile=Ora, fare clic su "Genera" per generare il file di esportazione ... AvailableFormats=Formati disponibili LibraryShort=Libreria -ExportCsvSeparator=Csv caracter separator -ImportCsvSeparator=Csv caracter separator +ExportCsvSeparator=Separatore di caratteri CSV +ImportCsvSeparator=Separatore di caratteri CSV Step=Passaggio FormatedImport=Importazione assistita FormatedImportDesc1=Questa sezione consente di importare dati personalizzati, utilizzando un assistente per aiutarti nel processo anche senza conoscenze tecniche. diff --git a/htdocs/langs/it_IT/holiday.lang b/htdocs/langs/it_IT/holiday.lang index 832225b61ca..ab9092c4d63 100644 --- a/htdocs/langs/it_IT/holiday.lang +++ b/htdocs/langs/it_IT/holiday.lang @@ -40,7 +40,7 @@ TypeOfLeaveId=Type of leave ID TypeOfLeaveCode=Type of leave code TypeOfLeaveLabel=Type of leave label NbUseDaysCP=Numero di giornate di ferie già godute -NbUseDaysCPHelp=The calculation takes into account the non working days and the holidays defined in the dictionary. +NbUseDaysCPHelp=Il calcolo tiene conto dei giorni non lavorativi e delle festività definiti nel dizionario. NbUseDaysCPShort=Days consumed NbUseDaysCPShortInMonth=Days consumed in month DayIsANonWorkingDay=%s non è un giorno lavorativo @@ -131,4 +131,4 @@ TemplatePDFHolidays=Template for leave requests PDF FreeLegalTextOnHolidays=Free text on PDF WatermarkOnDraftHolidayCards=Watermarks on draft leave requests HolidaysToApprove=Ferie da approvare -NobodyHasPermissionToValidateHolidays=Nobody has permission to validate holidays +NobodyHasPermissionToValidateHolidays=Nessuno ha il permesso di convalidare le vacanze diff --git a/htdocs/langs/it_IT/hrm.lang b/htdocs/langs/it_IT/hrm.lang index a962d229784..74aac91da31 100644 --- a/htdocs/langs/it_IT/hrm.lang +++ b/htdocs/langs/it_IT/hrm.lang @@ -1,6 +1,6 @@ # Dolibarr language file - en_US - hrm # Admin -HRM_EMAIL_EXTERNAL_SERVICE=Ma +HRM_EMAIL_EXTERNAL_SERVICE=Email per prevenire il servizio esterno HRM Establishments=Aziende Establishment=Azienda NewEstablishment=Nuova azienda @@ -11,7 +11,7 @@ CloseEtablishment=Chiudi azienda # Dictionary DictionaryPublicHolidays=HRM - Giorni festivi DictionaryDepartment=HRM - Lista dipartimenti -DictionaryFunction=HRM - Job positions +DictionaryFunction=HRM - Posizioni di lavoro # Module Employees=Dipendenti Employee=Dipendente diff --git a/htdocs/langs/it_IT/install.lang b/htdocs/langs/it_IT/install.lang index 1b2017ea9af..465f5ecf63e 100644 --- a/htdocs/langs/it_IT/install.lang +++ b/htdocs/langs/it_IT/install.lang @@ -16,7 +16,7 @@ PHPSupportCurl=This PHP supports Curl. PHPSupportCalendar=Questo PHP supporta le estensioni dei calendari. PHPSupportUTF8=This PHP supports UTF8 functions. PHPSupportIntl=This PHP supports Intl functions. -PHPSupportxDebug=This PHP supports extended debug functions. +PHPSupportxDebug=Questo PHP supporta funzioni estese di debug. PHPSupport=La versione di PHP supporta la funzione %s. PHPMemoryOK=La memoria massima per la sessione è fissata dal PHP a %s. Dovrebbe essere sufficiente. PHPMemoryTooLow=Your PHP max session memory is set to %s bytes. This is too low. Change your php.ini to set memory_limit parameter to at least %s bytes. @@ -27,7 +27,7 @@ ErrorPHPDoesNotSupportCurl=L'attuale installazione di PHP non supporta cURL. ErrorPHPDoesNotSupportCalendar=La tua installazione di PHP non supporta le estensioni del calendario php. ErrorPHPDoesNotSupportUTF8=Your PHP installation does not support UTF8 functions. Dolibarr cannot work correctly. Resolve this before installing Dolibarr. ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions. -ErrorPHPDoesNotSupportxDebug=Your PHP installation does not support extend debug functions. +ErrorPHPDoesNotSupportxDebug=La tua installazione di PHP non supporta l'estensione delle funzioni di debug. ErrorPHPDoesNotSupport=La tua installazione di PHP non supporta le funzioni %s. ErrorDirDoesNotExists=La directory %s non esiste. ErrorGoBackAndCorrectParameters=Go back and check/correct the parameters. @@ -93,7 +93,7 @@ GoToSetupArea=Vai alla pagina impostazioni MigrationNotFinished=The database version is not completely up to date: run the upgrade process again. GoToUpgradePage=Vai alla pagina di aggiornamento WithNoSlashAtTheEnd=Senza la barra "/" alla fine -DirectoryRecommendation=IMPORTANT: You must use a directory that is outside of the web pages (so do not use a subdirectory of previous parameter). +DirectoryRecommendation= IMPORTANTE : è necessario utilizzare una directory esterna alle pagine Web (quindi non utilizzare una sottodirectory del parametro precedente). LoginAlreadyExists=Esiste già DolibarrAdminLogin=Login dell'amministratore di Dolibarr AdminLoginAlreadyExists=Dolibarr administrator account '%s' already exists. Go back if you want to create another one. @@ -134,7 +134,7 @@ IfAlreadyExistsCheckOption=Se il nome è esatto e il database non esiste ancora, OpenBaseDir=Parametro openbasedir YouAskToCreateDatabaseSoRootRequired=You checked the box "Create database". For this, you need to provide the login/password of superuser (bottom of form). YouAskToCreateDatabaseUserSoRootRequired=You checked the box "Create database owner". For this, you need to provide the login/password of superuser (bottom of form). -NextStepMightLastALongTime=The current step may take several minutes. Please wait until the next screen is shown completely before continuing. +NextStepMightLastALongTime=Il passaggio in corso può richiedere diverso tempo. Attendi il caricamento completo della schermata successiva prima di continuare. MigrationCustomerOrderShipping=Migrate shipping for sales orders storage MigrationShippingDelivery=Aggiornamento spedizione MigrationShippingDelivery2=Aggiornamento spedizione 2 @@ -209,7 +209,7 @@ MigrationRemiseExceptEntity=Update entity field value of llx_societe_remise_exce MigrationUserRightsEntity=Aggiorna il valore del campo entità di llx_user_rights MigrationUserGroupRightsEntity=Aggiorna il valore del campo entità di llx_usergroup_rights MigrationUserPhotoPath=Migration of photo paths for users -MigrationFieldsSocialNetworks=Migration of users fields social networks (%s) +MigrationFieldsSocialNetworks=Migrazione dei social network dei campi utenti (%s) MigrationReloadModule=Ricarica modulo %s MigrationResetBlockedLog=Reset del modulo BlockedLog per l'algoritmo v7 ShowNotAvailableOptions=Mostra opzioni non disponibili @@ -218,6 +218,6 @@ ErrorFoundDuringMigration=Error(s) were reported during the migration process so YouTryInstallDisabledByDirLock=The application tried to self-upgrade, but the install/upgrade pages have been disabled for security (directory renamed with .lock suffix).
    YouTryInstallDisabledByFileLock=The application tried to self-upgrade, but the install/upgrade pages have been disabled for security (by the existence of a lock file install.lock in the dolibarr documents directory).
    ClickHereToGoToApp=Click here to go to your application -ClickOnLinkOrRemoveManualy=If an upgrade is in progress, please wait. If not, click on the following link. If you always see this same page, you must remove/rename the file install.lock in the documents directory. -Loaded=Loaded -FunctionTest=Function test +ClickOnLinkOrRemoveManualy=Se è in corso un aggiornamento, attendere. In caso contrario, fai clic sul seguente link. Se vedi sempre questa stessa pagina, devi rimuovere / rinominare il file install.lock nella directory dei documenti. +Loaded=Caricato +FunctionTest=Test di funzionalita diff --git a/htdocs/langs/it_IT/interventions.lang b/htdocs/langs/it_IT/interventions.lang index 5d0726bfdf2..449510235a8 100644 --- a/htdocs/langs/it_IT/interventions.lang +++ b/htdocs/langs/it_IT/interventions.lang @@ -4,7 +4,7 @@ Interventions=Interventi InterventionCard=Scheda intervento NewIntervention=Nuovo intervento AddIntervention=Crea intervento -ChangeIntoRepeatableIntervention=Change to repeatable intervention +ChangeIntoRepeatableIntervention=Cambia in intervento ricorrente ListOfInterventions=Elenco degli interventi ActionsOnFicheInter=Azioni di intervento LastInterventions=Ultimi %s interventi @@ -20,8 +20,8 @@ ConfirmValidateIntervention=Vuoi davvero convalidare questo intervento con il ri ConfirmModifyIntervention=Vuoi davvero modificare questo intervento? ConfirmDeleteInterventionLine=Vuoi davvero eliminare questa riga di intervento? ConfirmCloneIntervention=Vuoi davvero clonare questo intervento? -NameAndSignatureOfInternalContact=Name and signature of intervening: -NameAndSignatureOfExternalContact=Name and signature of customer: +NameAndSignatureOfInternalContact=Nome e firma del partecipante: +NameAndSignatureOfExternalContact=Nome e firma del cliente: DocumentModelStandard=Modello documento standard per gli interventi InterventionCardsAndInterventionLines=Interventi e righe degli interventi InterventionClassifyBilled=Classifica come "Fatturato" @@ -41,9 +41,7 @@ InterventionsArea=Zona dell'intervento DraftFichinter=Interventi in bozza LastModifiedInterventions=Ultimi %s interventi modificati FichinterToProcess=Interventions to process -##### Types de contacts ##### TypeContact_fichinter_external_CUSTOMER=Contatto di follow-up del cliente -# Modele numérotation PrintProductsOnFichinter=Stampa anche i "prodotti" (non solo i servizi) sulla scheda interventi PrintProductsOnFichinterDetails=interventi generati da ordini UseServicesDurationOnFichinter=Use services duration for interventions generated from orders @@ -53,7 +51,6 @@ InterventionStatistics=Statistiche degli interventi NbOfinterventions=No. of intervention cards NumberOfInterventionsByMonth=No. of intervention cards by month (date of validation) AmountOfInteventionNotIncludedByDefault=Amount of intervention is not included by default into profit (in most cases, timesheets are used to count time spent). Add option PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT to 1 into home-setup-other to include them. -##### Exports ##### InterId=ID intervento InterRef=Rif. intervento InterDateCreation=Data di creazione intervento @@ -65,3 +62,5 @@ InterLineId=Line id intervention InterLineDate=Line date intervention InterLineDuration=Line duration intervention InterLineDesc=Line description intervention +RepeatableIntervention=Modello di intervento +ToCreateAPredefinedIntervention=Per creare un intervento predefinito o ricorrente, creare un intervento comune e convertirlo in modello di intervento diff --git a/htdocs/langs/it_IT/languages.lang b/htdocs/langs/it_IT/languages.lang index b6d8428c3b7..3d88ef5f267 100644 --- a/htdocs/langs/it_IT/languages.lang +++ b/htdocs/langs/it_IT/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Etiope Language_ar_AR=Arabo Language_ar_EG=Arabo (Egitto) Language_ar_SA=Arabo +Language_az_AZ=Azero Language_bn_BD=Bengalese +Language_bn_IN=Bengalese (India) Language_bg_BG=Bulgaro Language_bs_BA=Bosniaco Language_ca_ES=Catalano @@ -20,6 +23,7 @@ Language_en_GB=English (Gran Bretagna) Language_en_IN=Inglese (India) Language_en_NZ=Inglese (Nuova Zelanda) Language_en_SA=Inglese (Arabia Saudita) +Language_en_SG=Inglese (Singapore) Language_en_US=Inglese (Stati Uniti) Language_en_ZA=Inglese (Sud Africa) Language_es_ES=Spagnolo @@ -29,6 +33,7 @@ Language_es_CL=Spagnolo (Cile) Language_es_CO=Spagnolo (Colombia) Language_es_DO=Spagnolo ( Repubblica Dominicana) Language_es_EC=Spagnolo (Ecuador) +Language_es_GT=Spagnolo (Guatemala) Language_es_HN=Spagnolo (Honduras) Language_es_MX=Spagnolo (Messico) Language_es_PA=Spagnolo (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spagnolo (Paraguay) Language_es_PE=Spagnolo (Perù) Language_es_PR=Spagnolo (Portorico) Language_es_UY=Spagnolo (Uruguay) +Language_es_GT=Spagnolo (Guatemala) Language_es_VE=Spagnolo (Venezuela) Language_et_EE=Estone Language_eu_ES=Basco @@ -44,15 +50,22 @@ Language_fi_FI=finlandese Language_fr_BE=Francese (Belgio) Language_fr_CA=Francese (Canada) Language_fr_CH=Francese (Svizzera) +Language_fr_CI=Francese (Costa d'Avorio) +Language_fr_CM=Francese (Camerun) Language_fr_FR=Francese +Language_fr_GA=Francese (Gabon) Language_fr_NC=Francese (Nuova Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisone +Language_gl_ES=Galiziano Language_he_IL=Ebraico +Language_hi_IN=Hindi (India) Language_hr_HR=Croato Language_hu_HU=Ungherese Language_id_ID=Indonesiano Language_is_IS=Islandese Language_it_IT=Italiano +Language_it_CH=Italiano (Svizzera) Language_ja_JP=Giapponese Language_ka_GE=Georgiano Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Lettone Language_mk_MK=Macedone Language_mn_MN=Mongolo Language_nb_NO=Norvegese (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Olandese (Belgio) Language_nl_NL=Olandese (Paesi Bassi) Language_pl_PL=Polacco @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbeko Language_vi_VN=Vietnamita Language_zh_CN=Cinese Language_zh_TW=Cinese (Tradizionale) +Language_zh_HK=Cinese (Hong Kong) Language_bh_MY=Malese diff --git a/htdocs/langs/it_IT/link.lang b/htdocs/langs/it_IT/link.lang index 5448ce32703..551802192d1 100644 --- a/htdocs/langs/it_IT/link.lang +++ b/htdocs/langs/it_IT/link.lang @@ -8,4 +8,4 @@ LinkRemoved=Il collegamento %s è stato rimosso ErrorFailedToDeleteLink= Impossibile rimuovere il collegamento '%s' ErrorFailedToUpdateLink= Impossibile caricare il collegamento '%s' URLToLink=Indirizzo del link -OverwriteIfExists=Overwrite file if exists +OverwriteIfExists=Sovrascrivi file se esiste diff --git a/htdocs/langs/it_IT/loan.lang b/htdocs/langs/it_IT/loan.lang index aab498f7982..8b6f0dae914 100644 --- a/htdocs/langs/it_IT/loan.lang +++ b/htdocs/langs/it_IT/loan.lang @@ -23,9 +23,9 @@ AddLoan=Create loan FinancialCommitment=Financial commitment InterestAmount=Interesse CapitalRemain=Capital remain -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Questo termine è già pagato +CantUseScheduleWithLoanStartedToPaid = Impossibile utilizzare lo scheduler per un prestito con pagamento avviato +CantModifyInterestIfScheduleIsUsed = Non è possibile modificare l'interesse se si utilizza la pianificazione # Admin ConfigLoan=Configurazione del modulo prestiti LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Accounting account capital by default diff --git a/htdocs/langs/it_IT/mails.lang b/htdocs/langs/it_IT/mails.lang index 8c6b1994892..af3f2044542 100644 --- a/htdocs/langs/it_IT/mails.lang +++ b/htdocs/langs/it_IT/mails.lang @@ -67,8 +67,8 @@ DateLastSend=Data dell'ultimo invio DateSending=Data di spedizione SentTo=Inviata a %s MailingStatusRead=Da leggere -YourMailUnsubcribeOK=The email %s is correctly unsubscribe from mailing list -ActivateCheckReadKey=Key used to encrypt URL used for "Read Receipt" and "Unsubscribe" feature +YourMailUnsubcribeOK=L'indirizzo e-mail %s è stato cancellato correttamente dalla mailing list +ActivateCheckReadKey=Chiave utilizzata per crittografare l'URL utilizzato per la funzione "Lettura ricevuta" e "Annulla iscrizione" EMailSentToNRecipients=Email sent to %s recipients. EMailSentForNElements=Email sent for %s elements. XTargetsAdded=%s destinatari aggiunti alla lista di invio @@ -164,7 +164,11 @@ NoContactWithCategoryFound=No contact/address with a category found NoContactLinkedToThirdpartieWithCategoryFound=No contact/address with a category found OutGoingEmailSetup=Configurazione email in uscita InGoingEmailSetup=Incoming email setup -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=Configurazione della posta elettronica in uscita (per il modulo %s) DefaultOutgoingEmailSetup=Impostazione predefinita email in uscita Information=Informazioni ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/it_IT/main.lang b/htdocs/langs/it_IT/main.lang index ac6b8f68408..1b80860c3bc 100644 --- a/htdocs/langs/it_IT/main.lang +++ b/htdocs/langs/it_IT/main.lang @@ -28,7 +28,7 @@ NoTemplateDefined=Nessun tema disponibile per questo tipo di email AvailableVariables=Variabili di sostituzione disponibili NoTranslation=Nessuna traduzione Translation=Traduzioni -EmptySearchString=Enter non empty search criterias +EmptySearchString=Inserisci criteri di ricerca non vuoti NoRecordFound=Nessun risultato trovato NoRecordDeleted=Nessun record eliminato NotEnoughDataYet=Dati insufficienti @@ -174,7 +174,7 @@ SaveAndStay=Salva e rimani SaveAndNew=Salva e nuovo TestConnection=Test connessione ToClone=Clonare -ConfirmCloneAsk=Are you sure you want to clone the object %s? +ConfirmCloneAsk=Sei sicuro di voler clonare l'oggetto %s ? ConfirmClone=Choose data you want to clone: NoCloneOptionsSpecified=Dati da clonare non definiti Of=di @@ -187,8 +187,8 @@ ShowCardHere=Visualizza scheda Search=Ricerca SearchOf=Cerca SearchMenuShortCut=Ctrl + Maiusc + f -QuickAdd=Quick add -QuickAddMenuShortCut=Ctrl + shift + l +QuickAdd=Aggiunta rapida +QuickAddMenuShortCut=CTRL + MAIUSC + L Valid=Convalida Approve=Approva Disapprove=Non approvare @@ -355,8 +355,8 @@ PriceUTTC=P.U.(lordo) Amount=Importo AmountInvoice=Importo della fattura AmountInvoiced=Importo fatturato -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Importo fatturato (al netto delle imposte) +AmountInvoicedHT=Importo fatturato (al netto delle imposte) +AmountInvoicedTTC=Importo fatturato (IVA inclusa) AmountPayment=Importo del pagamento AmountHTShort=Importo (netto) AmountTTCShort=Importo (IVA inc.) @@ -428,7 +428,7 @@ Modules=Moduli/Applicazioni Option=Opzione List=Elenco FullList=Elenco completo -FullConversation=Full conversation +FullConversation=Conversazione completa Statistics=Statistiche OtherStatistics=Altre statistiche Status=Stato @@ -485,6 +485,7 @@ Categories=Tag/categorie Category=Tag/categoria By=Per From=Da +FromDate=Da FromLocation=A partire dal to=a To=a @@ -666,7 +667,7 @@ Owner=Proprietario FollowingConstantsWillBeSubstituted=Le seguenti costanti saranno sostitute con i valori corrispondenti Refresh=Aggiorna BackToList=Torna alla lista -BackToTree=Back to tree +BackToTree=Torna all'albero GoBack=Torna indietro CanBeModifiedIfOk=Può essere modificato se valido CanBeModifiedIfKo=Può essere modificato se non valido @@ -687,6 +688,7 @@ Method=Metodo Receive=Ricevi CompleteOrNoMoreReceptionExpected=Completa o non attendere altro ExpectedValue=Valore atteso +ExpectedQty=Expected Qty PartialWoman=Parziale TotalWoman=Totale NeverReceived=Mai ricevuto @@ -703,6 +705,7 @@ MenuECM=Documenti MenuAWStats=AWStats MenuMembers=Membri MenuAgendaGoogle=Agenda Google +MenuTaxesAndSpecialExpenses=Tasse | Spese speciali ThisLimitIsDefinedInSetup=Limite applicazione (Menu home-impostazioni-sicurezza):%s Kb, limite PHP:%s Kb NoFileFound=Nessun documento salvato in questa directory CurrentUserLanguage=Lingua dell'utente @@ -725,7 +728,7 @@ Page=Pagina Notes=Note AddNewLine=Aggiungi una nuova riga AddFile=Aggiungi file -FreeZone=Non è un prodotto/servizio predefinito +FreeZone=Prodotto a testo libero FreeLineOfType=Testo libero, tipologia: CloneMainAttributes=Clona oggetto con i suoi principali attributi ReGeneratePDF=Rigenera PDF @@ -834,8 +837,8 @@ Gender=Genere Genderman=Uomo Genderwoman=Donna ViewList=Vista elenco -ViewGantt=Gantt view -ViewKanban=Kanban view +ViewGantt=Visualizzazione Gantt +ViewKanban=Visualizzazione Kanban Mandatory=Obbligatorio Hello=Ciao GoodBye=Addio @@ -843,7 +846,7 @@ Sincerely=Cordialmente ConfirmDeleteObject=Sei sicuro di voler eliminare questo oggetto? DeleteLine=Elimina riga ConfirmDeleteLine=Vuoi davvero eliminare questa riga? -ErrorPDFTkOutputFileNotFound=Error: the file was not generated. Please check that the 'pdftk' command is installed in a directory included in the $PATH environment variable (linux/unix only) or contact your system administrator. +ErrorPDFTkOutputFileNotFound=Errore: il file non è stato generato. Verificare che il comando "pdftk" sia installato in una directory inclusa nella variabile d'ambiente $ PATH (solo linux / unix) o contattare l'amministratore di sistema. NoPDFAvailableForDocGenAmongChecked=Non è possibile generare il documento PDF dai record selezionati TooManyRecordForMassAction=Too many records selected for mass action. The action is restricted to a list of %s records. NoRecordSelected=Nessun record selezionato @@ -858,7 +861,7 @@ Progress=Avanzamento ProgressShort=Progr. FrontOffice=Front office BackOffice=Backoffice -Submit=Submit +Submit=Invia View=Vista Export=Esportazione Exports=Esportazioni @@ -942,6 +945,39 @@ ShortThursday=Gio ShortFriday=Ven ShortSaturday=Sab ShortSunday=Dom +one=one +two=due +three=three +four=four +five=five +six=sei +seven=sette +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sedici +seventeen=diciassette +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Seleziona un tema email SetRef=Imposta rif. Select2ResultFoundUseArrows=Alcuni risultati trovati. Usa le frecce per selezionare. @@ -1023,19 +1059,27 @@ ContactDefault_propal=Preventivo ContactDefault_supplier_proposal=Proposta del fornitore ContactDefault_ticket=Ticket ContactAddedAutomatically=Contatto aggiunto dai ruoli di contatto di terze parti -More=More +More=Di Più ShowDetails=Mostra dettagli -CustomReports=Custom reports -StatisticsOn=Statistics on -SelectYourGraphOptionsFirst=Select your graph options to build a graph -Measures=Measures +CustomReports=Report personalizzati +StatisticsOn=Statistiche su +SelectYourGraphOptionsFirst=Seleziona le opzioni del grafico per creare un grafico +Measures=Le misure XAxis=Asse X YAxis=Asse Y -StatusOfRefMustBe=Status of %s must be %s -DeleteFileHeader=Confirm file delete -DeleteFileText=Do you really want delete this file? -ShowOtherLanguages=Show other languages -SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for this language -NotUsedForThisCustomer=Not used for this customer -AmountMustBePositive=Amount must be positive -ByStatus=By status +StatusOfRefMustBe=Lo stato di %s deve essere %s +DeleteFileHeader=Conferma l'eliminazione del file +DeleteFileText=Vuoi davvero eliminare questo file? +ShowOtherLanguages=Mostra altre lingue +SwitchInEditModeToAddTranslation=Passa alla modalità di modifica per aggiungere traduzioni per questa lingua +NotUsedForThisCustomer=Non utilizzato per questo cliente +AmountMustBePositive=L'importo deve essere positivo +ByStatus=Per stato +InformationMessage=Informazioni +Used=Used +ASAP=Il prima possibile +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/it_IT/members.lang b/htdocs/langs/it_IT/members.lang index 070cceee799..a21800a5013 100644 --- a/htdocs/langs/it_IT/members.lang +++ b/htdocs/langs/it_IT/members.lang @@ -81,7 +81,7 @@ DeleteType=Elimina VoteAllowed=E' permesso il voto Physical=Fisica Moral=Giuridica -MorPhy=Giuridica/fisica +MorPhy=Natura Reenable=Riattivare ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? @@ -175,7 +175,7 @@ MembersStatisticsDesc=Scegli quali statistiche visualizzare... MenuMembersStats=Statistiche LastMemberDate=Latest member date LatestSubscriptionDate=Data della sottoscrizione più recente -MemberNature=Nature of member +MemberNature=Natura del membro Public=Pubblico NewMemberbyWeb=Nuovo membro aggiunto. In attesa di approvazione NewMemberForm=Nuova modulo membri diff --git a/htdocs/langs/it_IT/modulebuilder.lang b/htdocs/langs/it_IT/modulebuilder.lang index db7e5ea8b69..d15a6328f84 100644 --- a/htdocs/langs/it_IT/modulebuilder.lang +++ b/htdocs/langs/it_IT/modulebuilder.lang @@ -27,7 +27,7 @@ DangerZone=Danger zone BuildPackage=Crea pacchetto BuildPackageDesc=You can generate a zip package of your application so your are ready to distribute it on any Dolibarr. You can also distribute it or sell it on marketplace like DoliStore.com. BuildDocumentation=Build documentation -ModuleIsNotActive=This module is not activated yet. Go to %s to make it live or click here +ModuleIsNotActive=Questo modulo non è ancora attivato. Vai su %s per renderlo live o fai clic qui ModuleIsLive=This module has been activated. Any change may break a current live feature. DescriptionLong=Long description EditorName=Name of editor @@ -83,18 +83,18 @@ ListOfDictionariesEntries=Elenco voci dizionari ListOfPermissionsDefined=List of defined permissions SeeExamples=Vedi esempi qui EnabledDesc=Condition to have this field active (Examples: 1 or $conf->global->MYMODULE_MYOPTION) -VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update).

    Using a negative value means field is not shown by default on list but can be selected for viewing).

    It can be an expression, for example:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
    Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)

    For document :
    0 = not displayed
    1 = display
    2 = display only if not empty

    For document lines :
    0 = not displayed
    1 = displayed in a column
    3 = display in line description column after the description
    4 = display in description column after the description only if not empty +VisibleDesc=Il campo è visibile? (Esempi: 0 = Mai visibile, 1 = Visibile su elenco e crea / aggiorna / visualizza moduli, 2 = Visibile solo su elenco, 3 = Visibile solo su crea / aggiorna / visualizza modulo (non elenco), 4 = Visibile su elenco e aggiorna / visualizza solo modulo (non crea), 5 = Visibile solo sul modulo di visualizzazione fine elenco (non crea, non aggiorna).

    L'uso di un valore negativo significa che il campo non è mostrato per impostazione predefinita nell'elenco ma può essere selezionato per la visualizzazione).

    Può essere un'espressione, ad esempio:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) +DisplayOnPdfDesc=Visualizza questo campo sui documenti PDF compatibili, puoi gestire la posizione con il campo "Posizione".
    Attualmente, noti modelli compatibili PDF sono: Eratostene (ordine), espadon (nave), spugna (fatture), ciano (PROPAL / citazione), cornas (ordine a fornitore)

    per il documento:
    0 = non visualizzato
    1 = visualizza
    2 = visualizza solo se non vuota

    Per linee documenti:
    0 = non visualizzato
    1 = visualizzati in colonna
    3 = visualizzazione nella descrizione di linea di colonna dopo la descrizione
    4 = visualizzazione nella descrizione di colonna dopo la descrizione solo se non vuota DisplayOnPdf=Mostra sul PDF IsAMeasureDesc=Can the value of field be cumulated to get a total into list? (Examples: 1 or 0) SearchAllDesc=Il campo è utilizzato per effettuare una ricerca dallo strumento di ricerca rapida? (Esempi: 1 o 0) SpecDefDesc=Enter here all documentation you want to provide with your module that is not already defined by other tabs. You can use .md or better, the rich .asciidoc syntax. LanguageDefDesc=Enter in this files, all the key and the translation for each language file. MenusDefDesc=Define here the menus provided by your module -DictionariesDefDesc=Define here the dictionaries provided by your module +DictionariesDefDesc=Definisci qui i dizionari forniti dal tuo modulo PermissionsDefDesc=Define here the new permissions provided by your module MenusDefDescTooltip=The menus provided by your module/application are defined into the array $this->menus into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), menus are also visible into the menu editor available to administrator users on %s. -DictionariesDefDescTooltip=The dictionaries provided by your module/application are defined into the array $this->dictionaries into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), dictionaries are also visible into the setup area to administrator users on %s. +DictionariesDefDescTooltip=I dizionari forniti dal modulo / applicazione sono definiti nell'array $this->dictionaries nel file descrittore del modulo. Puoi modificare manualmente questo file o utilizzare l'editor incorporato.

    Nota: una volta definiti (e riattivato il modulo), i dizionari sono visibili nell'area di configurazione anche agli utenti amministratori su %s. PermissionsDefDescTooltip=The permissions provided by your module/application are defined into the array $this->rights into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), permissions are visible into the default permissions setup %s. HooksDefDesc=Define in the module_parts['hooks'] property, in the module descriptor, the context of hooks you want to manage (list of contexts can be found by a search on 'initHooks(' in core code).
    Edit the hook file to add code of your hooked functions (hookable functions can be found by a search on 'executeHooks' in core code). TriggerDefDesc=Define in the trigger file the code you want to execute for each business event executed. @@ -116,8 +116,8 @@ ContentOfREADMECustomized=Nota: il contenuto del file README.md è stato sostitu RealPathOfModule=Real path of module ContentCantBeEmpty=Content of file can't be empty WidgetDesc=You can generate and edit here the widgets that will be embedded with your module. -CSSDesc=You can generate and edit here a file with personalized CSS embedded with your module. -JSDesc=You can generate and edit here a file with personalized Javascript embedded with your module. +CSSDesc=Puoi generare e modificare qui un file con CSS personalizzato incorporato nel tuo modulo. +JSDesc=Puoi generare e modificare qui un file con Javascript personalizzato incorporato nel tuo modulo. CLIDesc=You can generate here some command line scripts you want to provide with your module. CLIFile=CLI File NoCLIFile=No CLI files @@ -127,16 +127,16 @@ UseSpecificFamily = Use a specific family UseSpecificAuthor = Use a specific author UseSpecificVersion = Use a specific initial version ModuleMustBeEnabled=The module/application must be enabled first -IncludeRefGeneration=The reference of object must be generated automatically -IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference +IncludeRefGeneration=Il riferimento dell'oggetto deve essere generato automaticamente +IncludeRefGenerationHelp=Seleziona questa opzione se desideri includere il codice per gestire la generazione automatica del riferimento IncludeDocGeneration=Desidero generare alcuni documenti da questo oggetto -IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record. +IncludeDocGenerationHelp=Se selezioni questa opzione, verrà generato del codice per aggiungere una casella "Genera documento" al record. ShowOnCombobox=Mostra il valore dentro il combobox -KeyForTooltip=Key for tooltip +KeyForTooltip=Chiave per tooltip CSSClass=Classe CSS NotEditable=Non modificabile ForeignKey=Chiave esterna -TypeOfFieldsHelp=Type of fields:
    varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example) -AsciiToHtmlConverter=Ascii to HTML converter -AsciiToPdfConverter=Ascii to PDF converter -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. +TypeOfFieldsHelp=Tipo di campi:
    varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]]("1" significa che aggiungiamo un pulsante + dopo la combinazione per creare il record, "filtro" può essere "status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)" per esempio) +AsciiToHtmlConverter=Convertitore da Ascii a HTML +AsciiToPdfConverter=Convertitore da Ascii a PDF +TableNotEmptyDropCanceled=Tabella non vuota. Il rilascio è stato annullato. diff --git a/htdocs/langs/it_IT/mrp.lang b/htdocs/langs/it_IT/mrp.lang index 140ab7b5de4..9db0cbe4008 100644 --- a/htdocs/langs/it_IT/mrp.lang +++ b/htdocs/langs/it_IT/mrp.lang @@ -1,5 +1,6 @@ Mrp=Ordini di produzione MO=Ordine di produzione +MOs=Manufacturing orders MRPDescription=Modulo per la gestione degli ordini di produzione (MO). MRPArea=MRP Area MrpSetupPage=Configurazione del modulo MRP @@ -24,9 +25,9 @@ WatermarkOnDraftMOs=Filigrana sulla bozza degli ordini di produzione MO (se pres ConfirmCloneBillOfMaterials=Are you sure you want to clone this bill of material ? ConfirmCloneMo=Vuoi davvero clonare l'ordine di produzione %s? ManufacturingEfficiency=Manufacturing efficiency -ConsumptionEfficiency=Consumption efficiency +ConsumptionEfficiency=Efficienza dei consumi ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the production -ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product +ValueOfMeansLossForProductProduced=Il valore di 0,95 indica una media di 5%% di perdita del prodotto prodotto DeleteBillOfMaterials=Delete Bill Of Materials DeleteMo=Elimina Ordine di Produzione ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? @@ -38,40 +39,40 @@ DateStartPlannedMo=Data di inizio prevista DateEndPlannedMo=Fine della data prevista KeepEmptyForAsap=Vuoto significa "Il più presto possibile" EstimatedDuration=Durata stimata -EstimatedDurationDesc=Estimated duration to manufacture this product using this BOM -ConfirmValidateBom=Are you sure you want to validate the BOM with the reference %s (you will be able to use it to build new Manufacturing Orders) +EstimatedDurationDesc=Durata prevista per la fabbricazione di questo prodotto utilizzando questa distinta base +ConfirmValidateBom=Vuoi convalidare la distinta base con il riferimento %s (sarai in grado di usarlo per costruire nuovi ordini di produzione) ConfirmCloseBom=Vuoi davvero eliminare questa Distinta Base (non sarà più possibile utilizzarla per creare nuovi ordini di produzione) -ConfirmReopenBom=Are you sure you want to re-open this BOM (you will be able to use it to build new Manufacturing Orders) +ConfirmReopenBom=Sei sicuro di voler riaprire questa BOM (potrai usarla per creare nuovi ordini di produzione) StatusMOProduced=Prodotto QtyFrozen=Quantità congelata QuantityFrozen=Quantità congelata -QuantityConsumedInvariable=When this flag is set, the quantity consumed is always the value defined and is not relative to the quantity produced. -DisableStockChange=Stock change disabled -DisableStockChangeHelp=When this flag is set, there is no stock change on this product, whatever is the quantity consumed -BomAndBomLines=Bills Of Material and lines -BOMLine=Line of BOM +QuantityConsumedInvariable=Quando questo flag è impostato, la quantità consumata è sempre il valore definito e non è relativa alla quantità prodotta. +DisableStockChange=Cambio stock disabilitato +DisableStockChangeHelp=Quando questo flag è impostato, non ci sono variazioni di stock su questo prodotto, qualunque sia la quantità consumata +BomAndBomLines=Distinte base e righe +BOMLine=Riga di distinta base WarehouseForProduction=Magazzino per la produzione CreateMO=Crea Ordine di Produzione -ToConsume=To consume +ToConsume=Da consumare ToProduce=Da produrre QtyAlreadyConsumed=Q.tà già consumate QtyAlreadyProduced=Q.tà già prodotte -QtyRequiredIfNoLoss=Qty required if there is no loss (Manufacturing efficiency is 100%%) -ConsumeOrProduce=Consume or Produce -ConsumeAndProduceAll=Consume and Produce All -Manufactured=Manufactured -TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce. -ForAQuantityOf=For a quantity to produce of %s -ConfirmValidateMo=Are you sure you want to validate this Manufacturing Order? -ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and/or production for the quantities set. This will also update the stock and record stock movements. +QtyRequiredIfNoLoss=Qtà richiesta se non ci sono perdite (l'efficienza di produzione è 100%%) +ConsumeOrProduce=Consumare o produrre +ConsumeAndProduceAll=Consuma e produci tutto +Manufactured=Creato +TheProductXIsAlreadyTheProductToProduce=Il prodotto da aggiungere è già il prodotto da produrre. +ForAQuantityOf=Per una quantità da produrre di %s +ConfirmValidateMo=Sei sicuro di voler convalidare questo ordine di produzione? +ConfirmProductionDesc=Cliccando su '%s' convaliderai il consumo e / o la produzione per le quantità impostate. Ciò aggiornerà anche le azioni e registrerà i movimenti delle scorte. ProductionForRef=Produzione di %s -AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume and to produce are reached -NoStockChangeOnServices=No stock change on services -ProductQtyToConsumeByMO=Product quantity still to consume by open MO -ProductQtyToProduceByMO=Product quentity still to produce by open MO -AddNewConsumeLines=Add new line to consume -ProductsToConsume=Products to consume -ProductsToProduce=Products to produce -UnitCost=Unit cost -TotalCost=Total cost -BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) +AutoCloseMO=Chiude automaticamente l'ordine di produzione se vengono raggiunte le quantità da consumare e da produrre +NoStockChangeOnServices=Nessuna variazione di stock sui servizi +ProductQtyToConsumeByMO=Quantità di prodotto ancora da consumare con MO aperto +ProductQtyToProduceByMO=Quantità di prodotto ancora da produrre con MO aperto +AddNewConsumeLines=Aggiungi una nuova riga da consumare +ProductsToConsume=Prodotti da consumare +ProductsToProduce=Prodotti da produrre +UnitCost=Costo unitario +TotalCost=Costo totale +BOMTotalCost=Il costo per produrre questa distinta base in base al costo di ciascuna quantità e prodotto da consumare (utilizzare il prezzo di costo se definito, altrimenti il prezzo medio ponderato se definito, altrimenti il miglior prezzo di acquisto) diff --git a/htdocs/langs/it_IT/multicurrency.lang b/htdocs/langs/it_IT/multicurrency.lang index 1dafc929e0b..556b727c6d6 100644 --- a/htdocs/langs/it_IT/multicurrency.lang +++ b/htdocs/langs/it_IT/multicurrency.lang @@ -18,5 +18,5 @@ MulticurrencyReceived=Received, original currency MulticurrencyRemainderToTake=Remaining amout, original currency MulticurrencyPaymentAmount=Payment amount, original currency AmountToOthercurrency=Amount To (in currency of receiving account) -CurrencyRateSyncSucceed=Currency rate synchronization done successfuly -MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Use the currency of the document for online payments +CurrencyRateSyncSucceed=Sincronizzazione del tasso di cambio eseguita correttamente +MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Usa la valuta del documento per i pagamenti online diff --git a/htdocs/langs/it_IT/other.lang b/htdocs/langs/it_IT/other.lang index 5e6d2494fce..1e1fe945c8f 100644 --- a/htdocs/langs/it_IT/other.lang +++ b/htdocs/langs/it_IT/other.lang @@ -30,11 +30,11 @@ PreviousYearOfInvoice=Previous year of invoice date NextYearOfInvoice=Following year of invoice date DateNextInvoiceBeforeGen=Date of next invoice (before generation) DateNextInvoiceAfterGen=Date of next invoice (after generation) -GraphInBarsAreLimitedToNMeasures=Grapics are limited to %s measures in 'Bars' mode. The mode 'Lines' was automatically selected instead. -OnlyOneFieldForXAxisIsPossible=Only 1 field is currently possible as X-Axis. Only the first selected field has been selected. -AtLeastOneMeasureIsRequired=At least 1 field for measure is required -AtLeastOneXAxisIsRequired=At least 1 field for X-Axis is required -LatestBlogPosts=Latest Blog Posts +GraphInBarsAreLimitedToNMeasures=Le grafiche sono limitate a misure %s in modalità "Bars". La modalità "Linee" è stata invece selezionata automaticamente. +OnlyOneFieldForXAxisIsPossible=Al momento è possibile solo 1 campo come asse X. È stato selezionato solo il primo campo selezionato. +AtLeastOneMeasureIsRequired=È richiesto almeno 1 campo per la misura +AtLeastOneXAxisIsRequired=È richiesto almeno 1 campo per l'asse X. +LatestBlogPosts=Ultimi post del blog Notify_ORDER_VALIDATE=Sales order validated Notify_ORDER_SENTBYMAIL=Sales order sent by mail Notify_ORDER_SUPPLIER_SENTBYMAIL=Purchase order sent by email @@ -85,8 +85,8 @@ MaxSize=La dimensione massima è AttachANewFile=Allega un nuovo file/documento LinkedObject=Oggetto collegato NbOfActiveNotifications=Numero di notifiche (num. di email da ricevere) -PredefinedMailTest=__(Hello)__\nThis is a test mail sent to __EMAIL__.\nThe lines are separated by a carriage return.\n\n__USER_SIGNATURE__ -PredefinedMailTestHtml=__(Hello)__
    This is a test mail sent to __EMAIL__ (the word test must be in bold).
    The lines are separated by a carriage return.

    __USER_SIGNATURE__ +PredefinedMailTest=__(Ciao)__\nQuesta è una mail di prova inviata a __EMAIL__.\nLe righe sono separate da un ritorno a capo.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__ (Ciao) __
    Questa è una mail di prova inviata a __EMAIL__ (la parola prova deve essere in grassetto).
    Le righe sono separate da un ritorno a capo.

    __USER_SIGNATURE__ PredefinedMailContentContract=__(Buongiorno)__\n\n\n__(Cordialmente)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached \n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoiceReminder=__(Hello)__\n\nWe would like to remind you that the invoice __REF__ seems to have not been paid. A copy of the invoice is attached as a reminder.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Buongiorno)__\n\n\n__(Cordialmente)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Buongiorno)__\n\n\n__(Cordialmente)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Buongiorno)__\n\n\n__(Cordialmente)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Buongiorno)__\n\n\n__(Cordialmente)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr è un ERP/CRM compatto composto di diversi moduli funzionali. Un demo comprendente tutti i moduli non ha alcun senso, perché un caso simile non esiste nella realtà. Sono dunque disponibili diversi profili demo. ChooseYourDemoProfil=Scegli il profilo demo che corrisponde alla tua attività ... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -108,8 +106,8 @@ DemoFundation=Gestisci i membri di una Fondazione DemoFundation2=Gestisci i membri e un conto bancario di una Fondazione DemoCompanyServiceOnly=Gestire un'attività freelance di vendita di soli servizi DemoCompanyShopWithCashDesk=Gestire un negozio con una cassa -DemoCompanyProductAndStocks=Shop selling products with Point Of Sales -DemoCompanyManufacturing=Company manufacturing products +DemoCompanyProductAndStocks=Negozio di vendita di prodotti con punto vendita +DemoCompanyManufacturing=Azienda produttrice di prodotti DemoCompanyAll=Gestire una piccola o media azienda con più attività (tutti i moduli principali) CreatedBy=Creato da %s ModifiedBy=Modificato da %s @@ -190,7 +188,7 @@ NumberOfSupplierProposals=Numero di proposte del fornitore NumberOfSupplierOrders=Numero ordini d'acquisto NumberOfSupplierInvoices=Number of vendor invoices NumberOfContracts=Numero di contratti -NumberOfMos=Number of manufacturing orders +NumberOfMos=Numero di ordini di produzione NumberOfUnitsProposals=Numero di unità nei preventivi NumberOfUnitsCustomerOrders=Numero di unità sugli ordini cliente NumberOfUnitsCustomerInvoices=Numero di unità nelle fatture cliente @@ -198,7 +196,7 @@ NumberOfUnitsSupplierProposals=Numero di unità nelle proposte fornitori NumberOfUnitsSupplierOrders=Numero di unità negli ordini d'acquisto NumberOfUnitsSupplierInvoices=Numero di unità nelle fatture fornitore NumberOfUnitsContracts=Numero di unità nei contratti -NumberOfUnitsMos=Number of units to produce in manufacturing orders +NumberOfUnitsMos=Numero di unità da produrre negli ordini di produzione EMailTextInterventionAddedContact=A new intervention %s has been assigned to you. EMailTextInterventionValidated=Intervento %s convalidato EMailTextInvoiceValidated=La fattura %s è stata convalidata. @@ -274,13 +272,15 @@ WEBSITE_PAGEURL=Indirizzo URL della pagina WEBSITE_TITLE=Titolo WEBSITE_DESCRIPTION=Descrizione WEBSITE_IMAGE=Image -WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITE_KEY__ in the path if path depends on website name (for example: image/__WEBSITE_KEY__/stories/myimage.png). +WEBSITE_IMAGEDesc=Percorso relativo del supporto immagine. Puoi mantenerlo vuoto poiché è usato raramente (può essere usato dal contenuto dinamico per mostrare una miniatura in un elenco di post del blog). Utilizza __WEBSITE_KEY__ nel percorso se il percorso dipende dal nome del sito web (ad esempio: image / __ WEBSITE_KEY __ / stories / myimage.png). WEBSITE_KEYWORDS=Parole chiave LinesToImport=Righe da importare MemoryUsage=Utilizzo della memoria RequestDuration=Duration of request -PopuProp=Products/Services by popularity in Proposals -PopuCom=Products/Services by popularity in Orders -ProductStatistics=Products/Services Statistics -NbOfQtyInOrders=Qty in orders +ProductsPerPopularity=Prodotti / servizi per popolarità +PopuProp=Prodotti / servizi per popolarità nelle proposte +PopuCom=Prodotti / servizi per popolarità negli ordini +ProductStatistics=Statistiche sui prodotti / servizi +NbOfQtyInOrders=Qtà in ordini +SelectTheTypeOfObjectToAnalyze=Seleziona il tipo di oggetto da analizzare... diff --git a/htdocs/langs/it_IT/products.lang b/htdocs/langs/it_IT/products.lang index 9feed4c9e3b..6dd038a8389 100644 --- a/htdocs/langs/it_IT/products.lang +++ b/htdocs/langs/it_IT/products.lang @@ -22,8 +22,8 @@ ProductVatMassChangeDesc=Questo strumento aggiorna l'aliquota IVA definita su
    Supported values:
    - Keep empty: Can link any project of the company (default)
    - "all": Can link any projects, even projects of other companies
    - A list of third-party ids separated by commas: can link all projects of these third partys (Example: 123,4795,53)
    +AllowToLinkFromOtherCompany=Consenti di collegare progetti di altre società

    Valori supportati:
    - Mantieni vuoto: può collegare qualsiasi progetto dell'azienda (impostazione predefinita)
    - "tutto": può collegare qualsiasi progetto, anche progetti di altre società
    - Un elenco di ID di terze parti separati da virgole: può collegare tutti i progetti di queste terze parti (Esempio: 123,4795,53)
    LatestProjects=Ultimi %s progetti LatestModifiedProjects=Ultimi %s progetti modificati OtherFilteredTasks=Altre attività filtrate NoAssignedTasks=No assigned tasks found (assign project/tasks to the current user from the top select box to enter time on it) ThirdPartyRequiredToGenerateInvoice=A third party must be defined on project to be able to invoice it. -ChooseANotYetAssignedTask=Choose a task not yet assigned to you +ChooseANotYetAssignedTask=Scegli un'attività non ancora assegnata a te # Comments trans AllowCommentOnTask=Permetti agli utenti di commentare queste attività AllowCommentOnProject=Permetti agli utenti di commentare questi progetti @@ -253,9 +254,9 @@ TimeSpentForInvoice=Tempo lavorato OneLinePerUser=One line per user ServiceToUseOnLines=Service to use on lines InvoiceGeneratedFromTimeSpent=Invoice %s has been generated from time spent on project -ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include. +ProjectBillTimeDescription=Check se inserisci la scheda attività sulle attività del progetto E prevedi di generare fatture dalla scheda attività per fatturare al cliente il progetto (non verificare se si prevede di creare una fattura che non si basa sulle schede attività inserite). Nota: per generare una fattura, vai sulla scheda "Tempo trascorso" del progetto e seleziona le righe da includere. ProjectFollowOpportunity=Opportunità da seguire -ProjectFollowTasks=Follow tasks or time spent +ProjectFollowTasks=Segui le attività o il tempo trascorso Usage=Utilizzo UsageOpportunity=Utilizzo: opportunità UsageTasks=Uso: Compiti @@ -263,6 +264,6 @@ UsageBillTimeShort=Utilizzo: tempo di fatturazione InvoiceToUse=Fattura in bozza da usare NewInvoice=Nuova fattura OneLinePerTask=Una riga per compito -OneLinePerPeriod=One line per period -RefTaskParent=Ref. Parent Task -ProfitIsCalculatedWith=Profit is calculated using +OneLinePerPeriod=Una riga per periodo +RefTaskParent=Ref. Attività genitore +ProfitIsCalculatedWith=Il profitto viene calcolato utilizzando diff --git a/htdocs/langs/it_IT/propal.lang b/htdocs/langs/it_IT/propal.lang index 6b8fbeb5758..b5b78417e8d 100644 --- a/htdocs/langs/it_IT/propal.lang +++ b/htdocs/langs/it_IT/propal.lang @@ -84,4 +84,4 @@ DefaultModelPropalClosed=Modello predefinito quando si chiude un preventivo (da ProposalCustomerSignature=Accettazione scritta, timbro, data e firma ProposalsStatisticsSuppliers=Statistiche preventivi fornitori CaseFollowedBy=Caso seguito da -SignedOnly=Signed only +SignedOnly=Solo firmato diff --git a/htdocs/langs/it_IT/receiptprinter.lang b/htdocs/langs/it_IT/receiptprinter.lang index 816032153c5..a5fbeef5ad6 100644 --- a/htdocs/langs/it_IT/receiptprinter.lang +++ b/htdocs/langs/it_IT/receiptprinter.lang @@ -15,12 +15,12 @@ CONNECTOR_DUMMY=Stampante dummy CONNECTOR_NETWORK_PRINT=Stampante di rete CONNECTOR_FILE_PRINT=Stampante locale CONNECTOR_WINDOWS_PRINT=Stampante Windows locale -CONNECTOR_CUPS_PRINT=Cups Printer +CONNECTOR_CUPS_PRINT=Stampante per tazze CONNECTOR_DUMMY_HELP=Stampante di test (non stampa davvero) CONNECTOR_NETWORK_PRINT_HELP=10.x.x.x:9100 CONNECTOR_FILE_PRINT_HELP=/dev/usb/lp0, /dev/usb/lp1 CONNECTOR_WINDOWS_PRINT_HELP=LPT1, COM1, smb://FooUser:secret@computername/workgroup/Receipt Printer -CONNECTOR_CUPS_PRINT_HELP=CUPS printer name, example: HPRT_TP805L +CONNECTOR_CUPS_PRINT_HELP=Nome della stampante per tazze, esempio: HPRT_TP805L PROFILE_DEFAULT=Profilo predefinito PROFILE_SIMPLE=Profilo semplice PROFILE_EPOSTEP=Epos Tep Profile @@ -49,34 +49,34 @@ DOL_PRINT_LOGO=Stampa il logo della mia azienda DOL_PRINT_LOGO_OLD=Stampa il logo della mia azienda (vecchie stampe) DOL_BOLD=Grassetto DOL_BOLD_DISABLED=Disabilita grassetto -DOL_DOUBLE_HEIGHT=Double height size -DOL_DOUBLE_WIDTH=Double width size -DOL_DEFAULT_HEIGHT_WIDTH=Default height and width size -DOL_UNDERLINE=Enable underline -DOL_UNDERLINE_DISABLED=Disable underline -DOL_BEEP=Beed sound -DOL_PRINT_TEXT=Print text -DateInvoiceWithTime=Invoice date and time -YearInvoice=Invoice year -DOL_VALUE_MONTH_LETTERS=Invoice month in letters -DOL_VALUE_MONTH=Invoice month -DOL_VALUE_DAY=Invoice day -DOL_VALUE_DAY_LETTERS=Inovice day in letters -DOL_LINE_FEED_REVERSE=Line feed reverse -InvoiceID=Invoice ID +DOL_DOUBLE_HEIGHT=Doppia altezza +DOL_DOUBLE_WIDTH=Doppia larghezza +DOL_DEFAULT_HEIGHT_WIDTH=Altezza e larghezza predefinite +DOL_UNDERLINE=Abilita sottolineatura +DOL_UNDERLINE_DISABLED=Disabilita la sottolineatura +DOL_BEEP=Suono di Beed +DOL_PRINT_TEXT=Stampa il testo +DateInvoiceWithTime=Data e ora della fattura +YearInvoice=Anno della fattura +DOL_VALUE_MONTH_LETTERS=Mese della fattura in lettere +DOL_VALUE_MONTH=Mese della fattura +DOL_VALUE_DAY=Giorno della fattura +DOL_VALUE_DAY_LETTERS=Il giorno della fattura in lettere +DOL_LINE_FEED_REVERSE=Line feed inverso +InvoiceID=codice di identificazione della fattura InvoiceRef=Rif. fattura -DOL_PRINT_OBJECT_LINES=Invoice lines -DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name -DOL_VALUE_CUSTOMER_LASTNAME=Customer last name -DOL_VALUE_CUSTOMER_MAIL=Customer mail -DOL_VALUE_CUSTOMER_PHONE=Customer phone -DOL_VALUE_CUSTOMER_MOBILE=Customer mobile -DOL_VALUE_CUSTOMER_SKYPE=Customer Skype -DOL_VALUE_CUSTOMER_TAX_NUMBER=Customer tax number -DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Customer account balance -DOL_VALUE_MYSOC_NAME=Your company name -VendorLastname=Vendor last name -VendorFirstname=Vendor first name -VendorEmail=Vendor email -DOL_VALUE_CUSTOMER_POINTS=Customer points -DOL_VALUE_OBJECT_POINTS=Object points +DOL_PRINT_OBJECT_LINES=Righe fattura +DOL_VALUE_CUSTOMER_FIRSTNAME=Nome del cliente +DOL_VALUE_CUSTOMER_LASTNAME=Cognome del cliente +DOL_VALUE_CUSTOMER_MAIL=Mail del cliente +DOL_VALUE_CUSTOMER_PHONE=Telefono del cliente +DOL_VALUE_CUSTOMER_MOBILE=Cellulare del cliente +DOL_VALUE_CUSTOMER_SKYPE=Skype del cliente +DOL_VALUE_CUSTOMER_TAX_NUMBER=Codice fiscale del cliente +DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Saldo del conto del cliente +DOL_VALUE_MYSOC_NAME=Il nome della tua azienda +VendorLastname=Cognome del venditore +VendorFirstname=Nome del venditore +VendorEmail=Email del venditore +DOL_VALUE_CUSTOMER_POINTS=Punti del cliente +DOL_VALUE_OBJECT_POINTS=Punti oggetto diff --git a/htdocs/langs/it_IT/receptions.lang b/htdocs/langs/it_IT/receptions.lang index d38d3833246..001cfb9a3e7 100644 --- a/htdocs/langs/it_IT/receptions.lang +++ b/htdocs/langs/it_IT/receptions.lang @@ -43,5 +43,5 @@ ProductQtyInSuppliersReceptionAlreadyRecevied=Quantità prodotto dall'ordine for ValidateOrderFirstBeforeReception=You must first validate the order before being able to make receptions. ReceptionsNumberingModules=Numbering module for receptions ReceptionsReceiptModel=Document templates for receptions -NoMorePredefinedProductToDispatch=No more predefined products to dispatch +NoMorePredefinedProductToDispatch=Non ci sono più prodotti predefiniti da spedire diff --git a/htdocs/langs/it_IT/recruitment.lang b/htdocs/langs/it_IT/recruitment.lang new file mode 100644 index 00000000000..13d11c2e3ea --- /dev/null +++ b/htdocs/langs/it_IT/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Selezione +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Gestire e seguire le campagne di assunzione per le nuove posizioni lavorative + +# +# Admin page +# +RecruitmentSetup = Setup Selezione +Settings = Impostazioni +RecruitmentSetupPage = Inserisci qui le impostazioni delle opzioni principali per il modulo di selezione +RecruitmentArea=Area selezioni +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Info +RecruitmentAbout = Info Selezione +RecruitmentAboutPage = Sulla pagina Selezioni +NbOfEmployeesExpected=Numero previsto di dipendenti +JobLabel=Etichetta della posizione lavorativa +WorkPlace=Posto di lavoro +DateExpected=Data prevista +FutureManager=Manager futuro +ResponsibleOfRecruitement=Responsabile della selezione +IfJobIsLocatedAtAPartner=Se il luogo di lavoro è presso partner +PositionToBeFilled=Offerta di lavoro da compilare +PositionsToBeFilled=Offerte di lavoro da compilare +ListOfPositionsToBeFilled=Elenco delle offerte di lavoro da compilare +NewPositionToBeFilled=Nuove offerte di lavoro da compilare + +JobOfferToBeFilled=Offerta di lavoro da compilare +ThisIsInformationOnJobPosition=Informazioni sulla posizione lavorativa da compilare +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/it_IT/stocks.lang b/htdocs/langs/it_IT/stocks.lang index 2308806cbda..6e47d0098fa 100644 --- a/htdocs/langs/it_IT/stocks.lang +++ b/htdocs/langs/it_IT/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Annulla spedizione DeleteSending=Elimina spedizione Stock=Scorta Stocks=Scorte -MissingStocks=Missing stocks -StockAtDate=Stock at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Scorte mancanti +StockAtDate=Scorte alla data +StockAtDateInPast=Data nel passato +StockAtDateInFuture=Data in futuro StocksByLotSerial=Scorte per lotto / seriale LotSerial=Lotti / Seriali LotSerialList=Elenco lotti / seriali @@ -34,7 +34,7 @@ StockMovementForId=ID movimento %d ListMouvementStockProject=Elenco dei movimenti delle scorte associati al progetto StocksArea=Area magazzino e scorte AllWarehouses=Tutti i magazzini -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock=Includere anche stock desiderati non definiti IncludeAlsoDraftOrders=Includi anche bozze di ordini Location=Ubicazione LocationSummary=Ubicazione abbreviata @@ -61,12 +61,12 @@ PMPValueShort=MPP EnhancedValueOfWarehouses=Valore magazzini UserWarehouseAutoCreate=Crea anche un magazzino alla creazione di un utente AllowAddLimitStockByWarehouse=Gestisci anche i valori minimo e desiderato della scorta per abbinamento (prodotto - magazzino) oltre ai valori per prodotto -RuleForWarehouse=Rule for warehouses -WarehouseAskWarehouseDuringOrder=Set a warehouse on Sale orders -UserDefaultWarehouse=Set a warehouse on Users +RuleForWarehouse=Regola per i magazzini +WarehouseAskWarehouseDuringOrder=Imposta un magazzino sugli ordini di vendita +UserDefaultWarehouse=Imposta un magazzino per gli utenti MainDefaultWarehouse=Magazzino predefinito -MainDefaultWarehouseUser=Use a default warehouse for each user -MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. +MainDefaultWarehouseUser=Utilizza un magazzino predefinito per ogni utente +MainDefaultWarehouseUserDesc=Attivando questa opzione, in fase di creazione di un prodotto, su questo verrà definito il magazzino assegnato al prodotto. Se per l'utente non è definito alcun magazzino, viene definito il magazzino predefinito. IndependantSubProductStock=Le scorte di prodotto e di sottoprodotti sono indipendenti QtyDispatched=Quantità ricevuta QtyDispatchedShort=Q.ta ricevuta @@ -95,14 +95,16 @@ RealStock=Scorte reali RealStockDesc=Scorte fisiche/reali è la giacenza attualmente nei magazzini.\n RealStockWillAutomaticallyWhen=Le scorte fisiche saranno modificate secondo le seguenti regole (come definito nel modulo Magazzino): VirtualStock=Scorte virtuali -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Stock virtuale alla data +VirtualStockAtDateDesc=Stock virtuale una volta terminati tutti gli ordini in sospeso che si prevede di eseguire prima della data +VirtualStockDesc=Lo stock virtuale è lo stock calcolato disponibile una volta che tutte le azioni aperte / in sospeso (che interessano le scorte) sono state chiuse (ordini di acquisto ricevuti, ordini di vendita spediti, ordini di produzione prodotti, ecc.) IdWarehouse=Id magazzino DescWareHouse=Descrizione magazzino LieuWareHouse=Ubicazione magazzino WarehousesAndProducts=Magazzini e prodotti WarehousesAndProductsBatchDetail=Magazzini e prodotti (con indicazione dei lotti/numeri di serie) -AverageUnitPricePMPShort=Media prezzi scorte -AverageUnitPricePMP=Media dei prezzi delle scorte +AverageUnitPricePMPShort=Media ponderata prezzo +AverageUnitPricePMPDesc=Il prezzo unitario medio di input che abbiamo dovuto pagare ai fornitori per ottenere il prodotto nel nostro magazzino. SellPriceMin=Prezzo di vendita unitario EstimatedStockValueSellShort=Valori di vendita EstimatedStockValueSell=Valori di vendita @@ -130,18 +132,18 @@ CurentlyUsingPhysicalStock=Scorte fisiche RuleForStockReplenishment=Regola per il rifornimento delle scorte SelectProductWithNotNullQty=Select at least one product with a qty not null and a vendor AlertOnly= Solo avvisi -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Includi anche lo stock negativo per i prodotti senza la quantità desiderata definita, per ripristinarli a 0 WarehouseForStockDecrease=Il magazzino %s sarà usato per la diminuzione delle scorte WarehouseForStockIncrease=Il magazzino %s sarà usato per l'aumento delle scorte ForThisWarehouse=Per questo magazzino ReplenishmentStatusDesc=Questa è una lista di tutti i prodotti con una giacenza inferiore a quella desiderata (o inferiore al valore di allarme se la casella "solo allarme" è selezionata). Utilizzando la casella di controllo, è possibile creare ordini fornitori per colmare la differenza. -ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. +ReplenishmentStatusDescPerWarehouse=Se si desidera un rifornimento basato sulla quantità desiderata definita per magazzino, è necessario aggiungere un filtro al magazzino. ReplenishmentOrdersDesc=This is a list of all open purchase orders including predefined products. Only open orders with predefined products, so orders that may affect stocks, are visible here. Replenishments=Rifornimento NbOfProductBeforePeriod=Quantità del prodotto %s in magazzino prima del periodo selezionato (< %s) NbOfProductAfterPeriod=Quantità del prodotto %s in magazzino dopo il periodo selezionato (< %s) MassMovement=Movimentazione di massa -SelectProductInAndOutWareHouse=Seleziona un prodotto, una quantità, un magazzino di origine ed uno di destinazione, poi clicca "%s". Una volta terminato, per tutte le movimentazioni da effettuare, clicca su "%s". +SelectProductInAndOutWareHouse=Seleziona un magazzino di origine e un magazzino di destinazione, un prodotto e una quantità, quindi fai clic su "%s". Una volta fatto questo per tutti i movimenti richiesti, clicca su "%s". RecordMovement=Record transfer ReceivingForSameOrder=Ricevuta per questo ordine StockMovementRecorded=Movimentazione di scorte registrata @@ -156,7 +158,7 @@ InventoryCode=Codice di inventario o di spostamento IsInPackage=Contenuto nel pacchetto WarehouseAllowNegativeTransfer=Scorte possono essere negative qtyToTranferIsNotEnough=You don't have enough stock from your source warehouse and your setup does not allow negative stocks. -qtyToTranferLotIsNotEnough=You don't have enough stock, for this lot number, from your source warehouse and your setup does not allow negative stocks (Qty for product '%s' with lot '%s' is %s in warehouse '%s'). +qtyToTranferLotIsNotEnough=Non disponi di scorte sufficienti, per questo numero di lotto, dal magazzino di origine e la configurazione non consente scorte negative (la quantità per il prodotto "%s" con il lotto "%s" è %s nel magazzino "%s"). ShowWarehouse=Mostra magazzino MovementCorrectStock=Correzione scorte per il prodotto %s MovementTransferStock=Trasferisci scorte del prodotto %s in un altro magazzino @@ -206,7 +208,7 @@ TheoricalQty=Theorique qty TheoricalValue=Theorique qty LastPA=Last BP CurrentPA=Curent BP -RecordedQty=Recorded Qty +RecordedQty=Qtà registrata RealQty=Real Qty RealValue=Real Value RegulatedQty=Regulated Qty @@ -229,9 +231,12 @@ StockIncrease=Stock increase StockDecrease=Stock decrease InventoryForASpecificWarehouse=Inventario per un magazzino specifico InventoryForASpecificProduct=Inventario per un prodotto specifico -StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use -ForceTo=Force to -AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (Warning: This may decrease dramatically performances) -StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past -StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future -CurrentStock=Current stock +StockIsRequiredToChooseWhichLotToUse=Le scorte sono necessarie per scegliere quale lotto utilizzare +ForceTo=Costringere +AlwaysShowFullArbo=Visualizza l'albero completo del magazzino sul popup dei collegamenti del magazzino (avvertenza: questo potrebbe diminuire drasticamente le prestazioni) +StockAtDatePastDesc=È possibile visualizzare qui lo stock (stock reale) in una determinata data nel passato +StockAtDateFutureDesc=È possibile visualizzare qui lo stock (stock virtuale) in una determinata data futura +CurrentStock=Scorta attuale +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/it_IT/stripe.lang b/htdocs/langs/it_IT/stripe.lang index 2c4e9efe1fd..63954059a36 100644 --- a/htdocs/langs/it_IT/stripe.lang +++ b/htdocs/langs/it_IT/stripe.lang @@ -1,27 +1,27 @@ # Dolibarr language file - Source file is en_US - stripe StripeSetup=Impostazione modulo Stripe StripeDesc=Offri ai clienti una pagina di pagamento online Stripe per pagamenti con carte di credito / debito tramite Stripe . Questo modulo può essere usato per consentire ai tuoi clienti di effettuare pagamenti ad-hoc o per pagamenti relativi a un particolare oggetto Dolibarr (fattura, ordine, ...) -StripeOrCBDoPayment=Pay with credit card or Stripe +StripeOrCBDoPayment=Paga con carta di credito o Stripe FollowingUrlAreAvailableToMakePayments=Puoi utilizzare i seguenti indirizzi per permettere ai clienti di effettuare pagamenti su Dolibarr PaymentForm=Forma di pagamento -WelcomeOnPaymentPage=Welcome to our online payment service -ThisScreenAllowsYouToPay=Questa schermata consente di effettuare un pagamento online su %s. +WelcomeOnPaymentPage=Benvenuto sul nostro sistema di pagamento online +ThisScreenAllowsYouToPay=Questa schermata consente di effettuare un pagamento online per %s. ThisIsInformationOnPayment=Informazioni sul pagamento da effettuare ToComplete=Per completare YourEMail=Email per la conferma del pagamento -STRIPE_PAYONLINE_SENDEMAIL=Email notification after a payment attempt (success or fail) +STRIPE_PAYONLINE_SENDEMAIL=Email per la notifica dopo un tentativo di pagamento (accettato o fallito) Creditor=Creditore PaymentCode=Codice pagamento -StripeDoPayment=Pay with Stripe -YouWillBeRedirectedOnStripe=You will be redirected on secured Stripe page to input you credit card information +StripeDoPayment=Paga con Stripe +YouWillBeRedirectedOnStripe=Sarai reindirizzato sulla pagina sicura di Stripe per inserire i dati della tua carta di credito Continue=Successivo ToOfferALinkForOnlinePayment=URL per il pagamento %s -ToOfferALinkForOnlinePaymentOnOrder=URL to offer a %s online payment user interface for a sales order -ToOfferALinkForOnlinePaymentOnInvoice=URL per il pagamento %s di una fattura +ToOfferALinkForOnlinePaymentOnOrder=URL per il pagamento %s di un ordine di vendita +ToOfferALinkForOnlinePaymentOnInvoice=URL per il pagamento %s di una fattura di vendita ToOfferALinkForOnlinePaymentOnContractLine=URL per il pagamento %s di una riga di contratto -ToOfferALinkForOnlinePaymentOnFreeAmount=URL per il pagamento %s di un importo +ToOfferALinkForOnlinePaymentOnFreeAmount=URL per il pagamento %s di un importo senza riferimenti ToOfferALinkForOnlinePaymentOnMemberSubscription=URL per il pagamento %s dell'adesione di un membro -ToOfferALinkForOnlinePaymentOnDonation=URL to offer a %s online payment page for payment of a donation +ToOfferALinkForOnlinePaymentOnDonation=URL per offrire una pagina di pagamento online %s per il pagamento di una donazione YouCanAddTagOnUrl=Puoi anche aggiungere a qualunque di questi url il parametro &tag=value (richiesto solo per il pagamento gratuito) per aggiungere una tag con un tuo commento. SetupStripeToHavePaymentCreatedAutomatically=Setup your Stripe with url %s to have payment created automatically when validated by Stripe. AccountParameter=Dati account @@ -32,7 +32,7 @@ VendorName=Nome del venditore CSSUrlForPaymentForm=URL del foglio di stile CSS per il modulo di pagamento NewStripePaymentReceived=Nuovo pagamento Stripe ricevuto NewStripePaymentFailed=Nuovo pagamento Stripe provato ma non riuscito -FailedToChargeCard=Failed to charge card +FailedToChargeCard=Addebito sulla carta non riuscito STRIPE_TEST_SECRET_KEY=Secret test key STRIPE_TEST_PUBLISHABLE_KEY=Publishable test key STRIPE_TEST_WEBHOOK_KEY=Webhook test key @@ -46,27 +46,27 @@ ExampleOfTestCreditCard=Example of credit card for test: %s => valid, %s => erro StripeGateways=Stripe gateways OAUTH_STRIPE_TEST_ID=Stripe Connect Client ID (ca_...) OAUTH_STRIPE_LIVE_ID=Stripe Connect Client ID (ca_...) -BankAccountForBankTransfer=Bank account for fund payouts +BankAccountForBankTransfer=Conto bancario per il pagamento dei fondi StripeAccount=Stripe account -StripeChargeList=List of Stripe charges -StripeTransactionList=List of Stripe transactions -StripeCustomerId=Stripe customer id +StripeChargeList=Lista delle spese Stripe +StripeTransactionList=Lista delle transazioni Stripe +StripeCustomerId=ID Cliente Stripe StripePaymentModes=Tipo di pagamento Stripe LocalID=Local ID StripeID=Stripe ID -NameOnCard=Name on card -CardNumber=Card Number -ExpiryDate=Expiry Date +NameOnCard=Nome sulla Carta +CardNumber=Numero della Carta +ExpiryDate=Data di Scadenza CVN=CVN -DeleteACard=Delete Card -ConfirmDeleteCard=Are you sure you want to delete this Credit or Debit card? -CreateCustomerOnStripe=Create customer on Stripe -CreateCardOnStripe=Create card on Stripe -ShowInStripe=Show in Stripe -StripeUserAccountForActions=User account to use for email notification of some Stripe events (Stripe payouts) -StripePayoutList=List of Stripe payouts +DeleteACard=Elimina Carta +ConfirmDeleteCard=Sei sicuro che vuoi cancellare questa Carta di Credito/Debito? +CreateCustomerOnStripe=Crea cliente su Stripe +CreateCardOnStripe=Crea carta su Stripe +ShowInStripe=Visualizza su Stripe +StripeUserAccountForActions=Conto utente da utilizzare per le notifiche e-mail di alcuni eventi Stripe (pagamenti Stripe) +StripePayoutList=Elenco di pagamenti Stripe ToOfferALinkForTestWebhook=Link to setup Stripe WebHook to call the IPN (test mode) ToOfferALinkForLiveWebhook=Link to setup Stripe WebHook to call the IPN (live mode) PaymentWillBeRecordedForNextPeriod=Payment will be recorded for the next period. -ClickHereToTryAgain=Click here to try again... -CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authentication rules, creation of a card must be done from Stripe backoffice. You can click here to switch on Stripe customer record: %s +ClickHereToTryAgain=Clicca qui per riprovare... +CreationOfPaymentModeMustBeDoneFromStripeInterface=A causa delle forti regole di autenticazione del cliente, la creazione di una carta deve essere effettuata dal backoffice di Stripe. È possibile fare clic qui per attivare il record cliente Stripe: %s diff --git a/htdocs/langs/it_IT/suppliers.lang b/htdocs/langs/it_IT/suppliers.lang index deeb5548651..a1654b03fa0 100644 --- a/htdocs/langs/it_IT/suppliers.lang +++ b/htdocs/langs/it_IT/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Bassa qualità ReputationForThisProduct=Reputazione BuyerName=Nome acquirente AllProductServicePrices=Prezzi dei prodotti / servizi -AllProductReferencesOfSupplier=Referenze dei prodotti / servizi del fornitore +AllProductReferencesOfSupplier=Tutti i riferimenti del fornitore BuyingPriceNumShort=Prezzi fornitore diff --git a/htdocs/langs/it_IT/ticket.lang b/htdocs/langs/it_IT/ticket.lang index 2cac359e4bc..c51af811cb0 100644 --- a/htdocs/langs/it_IT/ticket.lang +++ b/htdocs/langs/it_IT/ticket.lang @@ -30,14 +30,14 @@ Permission56005=See tickets of all third parties (not effective for external use TicketDictType=Ticket - Types TicketDictCategory=Ticket - Groupes TicketDictSeverity=Ticket - Severities -TicketDictResolution=Ticket - Resolution +TicketDictResolution=Ticket - Risoluzione TicketTypeShortBUGSOFT=Dysfonctionnement logiciel TicketTypeShortBUGHARD=Dysfonctionnement matériel TicketTypeShortCOM=Commercial question -TicketTypeShortHELP=Request for functionnal help +TicketTypeShortHELP=Richiesta di aiuto funzionale TicketTypeShortISSUE=Issue, bug o problemi -TicketTypeShortREQUEST=Change or enhancement request +TicketTypeShortREQUEST=Richiesta di modifica o miglioramento TicketTypeShortPROJET=Progetto TicketTypeShortOTHER=Altro @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Tipo -Category=Analytic code Severity=Gravità # Email templates @@ -128,12 +127,11 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Gruppo TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added -TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) -TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update) -TicketPublicNotificationNewMessageDefaultEmailHelp=Send email new message notifications to this address if the ticket don't have a user assigned or the user don't have a email. +TicketsPublicNotificationNewMessage=Invia e-mail quando viene aggiunto un nuovo messaggio +TicketsPublicNotificationNewMessageHelp=Invia e-mail quando si aggiunge un nuovo messaggio dall'interfaccia pubblica (all'utente assegnato o all'e-mail di notifica a (aggiorna) e / o all'e-mail di notifica a) +TicketPublicNotificationNewMessageDefaultEmail=Notifiche via email (aggiornamento) +TicketPublicNotificationNewMessageDefaultEmailHelp=Invia e-mail notifiche di nuovi messaggi a questo indirizzo se al ticket non è stato assegnato un utente o se l'utente non ha un indirizzo e-mail. # # Index & list page # @@ -162,7 +160,7 @@ CreatedBy=Creato da NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Gruppo SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on @@ -258,7 +256,7 @@ TicketPublicDesc=You can create a support ticket or check from an existing ID. YourTicketSuccessfullySaved=Ticket has been successfully saved! MesgInfosPublicTicketCreatedWithTrackId=A new ticket has been created with ID %s. PleaseRememberThisId=Please keep the tracking number that we might ask you later. -TicketNewEmailSubject=Ticket creation confirmation - Ref %s (public ticket ID %s) +TicketNewEmailSubject=Conferma creazione ticket - Rif. %s (ID biglietto pubblico %s) TicketNewEmailSubjectCustomer=New support ticket TicketNewEmailBody=Questa email automatica conferma che è stato registrato un nuovo ticket TicketNewEmailBodyCustomer=This is an automatic email to confirm a new ticket has just been created into your account. @@ -277,7 +275,7 @@ Subject=Oggetto ViewTicket=Vedi ticket ViewMyTicketList=Vedi l'elenco dei miei ticket ErrorEmailMustExistToCreateTicket=Error: email address not found in our database -TicketNewEmailSubjectAdmin=New ticket created - Ref %s (public ticket ID %s) +TicketNewEmailSubjectAdmin=Nuovo biglietto creato - Rif. %s (ID biglietto pubblico %s) TicketNewEmailBodyAdmin=

    Ticket has just been created with ID #%s, see information:

    SeeThisTicketIntomanagementInterface=See ticket in management interface TicketPublicInterfaceForbidden=The public interface for the tickets was not enabled diff --git a/htdocs/langs/it_IT/users.lang b/htdocs/langs/it_IT/users.lang index a0dd542b471..f03887e2e65 100644 --- a/htdocs/langs/it_IT/users.lang +++ b/htdocs/langs/it_IT/users.lang @@ -70,7 +70,7 @@ ExportDataset_user_1=Users and their properties DomainUser=Utente di dominio %s Reactivate=Riattiva CreateInternalUserDesc=This form allows you to create an internal user in your company/organization. To create an external user (customer, vendor etc. ..), use the button 'Create Dolibarr User' from that third-party's contact card. -InternalExternalDesc=An internal user is a user that is part of your company/organization.
    An external user is a customer, vendor or other (Creating an external user for a third-party can be done from the contact record of the third-party).

    In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display) +InternalExternalDesc=Un utente interno è un utente che fa parte della tua azienda / organizzazione.
    Un utente esterno è un cliente, un fornitore o altro (La creazione di un utente esterno per una terza parte può essere effettuata dal record di contatto della terza parte).

    In entrambi i casi, le autorizzazioni definiscono i diritti su Dolibarr, anche l'utente esterno può avere un gestore di menu diverso rispetto all'utente interno (Vedi Home - Setup - Display) PermissionInheritedFromAGroup=Autorizzazioni ereditate dall'appartenenza al gruppo. Inherited=Ereditato UserWillBeInternalUser=L'utente sarà un utente interno (in quanto non collegato a un soggetto terzo) @@ -78,6 +78,7 @@ UserWillBeExternalUser=L'utente sarà un utente esterno (perché collegato ad un IdPhoneCaller=Id telefonico del chiamante NewUserCreated=Utente %s creato NewUserPassword=Cambio password per %s +NewPasswordValidated=La tua nuova password è stata convalidata e deve essere utilizzata ora per accedere. EventUserModified=Utente %s modificato UserDisabled=Utente %s disattivato UserEnabled=Utente %s attivato @@ -107,11 +108,13 @@ DisabledInMonoUserMode=Disabilitato in modalità manutenzione UserAccountancyCode=Codice contabile utente UserLogoff=Logout utente UserLogged=Utente connesso +DateOfEmployment=Data di assunzione DateEmployment=Data di assunzione DateEmploymentEnd=Data di fine rapporto lavorativo CantDisableYourself=You can't disable your own user record ForceUserExpenseValidator=Forza validatore rapporto spese ForceUserHolidayValidator=Convalida richiesta di congedo forzato ValidatorIsSupervisorByDefault=Per impostazione predefinita, il validatore è il supervisore dell'utente. Mantieni vuoto per mantenere questo comportamento. -UserPersonalEmail=Personal email -UserPersonalMobile=Personal mobile phone +UserPersonalEmail=E-mail personale +UserPersonalMobile=Cellulare personale +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/it_IT/website.lang b/htdocs/langs/it_IT/website.lang index dacf8fe00ff..44e82e1accc 100644 --- a/htdocs/langs/it_IT/website.lang +++ b/htdocs/langs/it_IT/website.lang @@ -16,7 +16,7 @@ WEBSITE_ROBOT=File Robot (robots.txt) WEBSITE_HTACCESS=Website .htaccess file WEBSITE_MANIFEST_JSON=Website manifest.json file WEBSITE_README=README.md file -WEBSITE_KEYWORDSDesc=Use a comma to separate values +WEBSITE_KEYWORDSDesc=Usa una virgola per separare i valori EnterHereLicenseInformation=Enter here meta data or license information to fille a README.md file. if you distribute your website as a template, the file will be included into the temptate package. HtmlHeaderPage=HTML header (specific to this page only) PageNameAliasHelp=Name or alias of the page.
    This alias is also used to forge a SEO URL when website is ran from a Virtual host of a Web server (like Apacke, Nginx, ...). Use the button "%s" to edit this alias. @@ -43,8 +43,8 @@ ViewPageInNewTab=Visualizza pagina in una nuova scheda SetAsHomePage=Imposta come homepage RealURL=Indirizzo URL vero ViewWebsiteInProduction=View web site using home URLs -SetHereVirtualHost=Use with Apache/NGinx/...
    Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on
    %s -ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: +SetHereVirtualHost= Usa con Apache / NGinx / ...
    Crea sul tuo server web (Apache, Nginx, ...) un host virtuale dedicato con PHP abilitato e una directory principale su
    %s +ExampleToUseInApacheVirtualHostConfig=Esempio da utilizzare nella configurazione dell'host virtuale Apache: YouCanAlsoTestWithPHPS=Use with PHP embedded server
    On develop environment, you may prefer to test the site with the PHP embedded web server (PHP 5.5 required) by running
    php -S 0.0.0.0:8080 -t %s YouCanAlsoDeployToAnotherWHP=Run your web site with another Dolibarr Hosting provider
    If you don't have a web server like Apache or NGinx available on internet, you can export and import your web site onto another Dolibarr instance provided by another Dolibarr hosting provider that provide full integration with the Website module. You can find a list of some Dolibarr hosting providers on https://saas.dolibarr.org CheckVirtualHostPerms=Check also that virtual host has permission %s on files into
    %s @@ -58,10 +58,10 @@ NoPageYet=No pages yet YouCanCreatePageOrImportTemplate=You can create a new page or import a full website template SyntaxHelp=Help on specific syntax tips YouCanEditHtmlSourceckeditor=You can edit HTML source code using the "Source" button in editor. -YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">

    To include an image stored into the documents directory, use the viewimage.php wrapper:
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    +YouCanEditHtmlSource=
    Puoi includere codice PHP in questa sorgente utilizzando i tag <?php ?> . Sono disponibili le seguenti variabili globali: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    Puoi anche includere il contenuto di un'altra Pagina / Contenitore con la seguente sintassi:
    <?php includeContainer('alias_of_container_to_include'); ?>

    È possibile effettuare un redirect ad un'altra pagina / contenitore con la seguente sintassi (Nota: non emettono alcun contenuto prima di un reindirizzamento):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    Per aggiungere un collegamento a un'altra pagina, utilizzare la sintassi:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    Per inserire un link per il download un file memorizzato nella cartella documenti , utilizzare il document.php wrapper:
    esempio, per un file in documenti / ECM (necessità di effettuare il login), la sintassi è:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    Per un file in documents / medias (directory aperta per accesso pubblico), la sintassi è:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    Per un file condiviso con un collegamento di condivisione (accesso aperto utilizzando la chiave hash di condivisione del file), la sintassi è:
    <a href="/document.php?hashp=publicsharekeyoffile">

    per includere un immagine immagazzinata nella cartella documenti , utilizzare la viewimage.php wrapper:
    Esempio, per un'immagine in documents/medias (cartella aperta per l'accesso pubblico), la sintassi è:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    #YouCanEditHtmlSource2=
    To include a image shared publicaly, use the viewimage.php wrapper:
    Example with a shared key 123456789, syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSourceMore=
    More examples of HTML or dynamic code available on the wiki documentation
    . +YouCanEditHtmlSource2=Per un'immagine condivisa con un link di condivisione (accesso aperto utilizzando la chiave hash di condivisione del file), la sintassi è:
    <img src="/viewimage.php?hashp=12345679012...">
    +YouCanEditHtmlSourceMore=
    Altri esempi di codice HTML o dinamico disponibili su la documentazione wiki
    . ClonePage=Clone page/container CloneSite=Clone site SiteAdded=Website added @@ -81,7 +81,7 @@ BlogPost=Articoli sul blog WebsiteAccount=Website account WebsiteAccounts=Website accounts AddWebsiteAccount=Create web site account -BackToListForThirdParty=Back to list for the third-party +BackToListForThirdParty=Torna all'elenco per le terze parti DisableSiteFirst=Disable website first MyContainerTitle=My web site title AnotherContainer=This is how to include content of another page/container (you may have an error here if you enable dynamic code because the embedded subcontainer may not exists) @@ -89,7 +89,7 @@ SorryWebsiteIsCurrentlyOffLine=Sorry, this website is currently off line. Please WEBSITE_USE_WEBSITE_ACCOUNTS=Enable the web site account table WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Enable the table to store web site accounts (login/pass) for each website / third party YouMustDefineTheHomePage=You must first define the default Home page -OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved for experienced users. Depending on the complexity of source page, the result of importation may differ from the original. Also if the source page uses common CSS styles or conflicting javascript, it may break the look or features of the Website editor when working on this page. This method is a quicker way to create a page but it is recommended to create your new page from scratch or from a suggested page template.
    Note also that the inline editor may not works correclty when used on a grabbed external page. +OnlyEditionOfSourceForGrabbedContentFuture=Avvertenza: la creazione di una pagina Web importando una pagina Web esterna è riservata agli utenti esperti. A seconda della complessità della pagina di origine, il risultato dell'importazione potrebbe differire dall'originale. Inoltre, se la pagina di origine utilizza stili CSS comuni o JavaScript in conflitto, potrebbe interrompere l'aspetto o le funzionalità dell'editor del sito Web quando si lavora su questa pagina. Questo metodo è un modo più rapido per creare una pagina, ma si consiglia di creare la nuova pagina da zero o da un modello di pagina suggerito.
    Nota anche che l'editor inline potrebbe non funzionare correttamente se utilizzato su una pagina esterna linkata OnlyEditionOfSourceForGrabbedContent=Only edition of HTML source is possible when content was grabbed from an external site GrabImagesInto=Grab also images found into css and page. ImagesShouldBeSavedInto=Images should be saved into directory @@ -124,14 +124,14 @@ ShowSubContainersOnOff=La modalità per eseguire il "contenuto dinamico&quo GlobalCSSorJS=File CSS / JS / header globale del sito web BackToHomePage=Torna alla home page ... TranslationLinks=Link alla traduzione -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) -UseTextBetween5And70Chars=For good SEO practices, use a text between 5 and 70 characters +YouTryToAccessToAFileThatIsNotAWebsitePage=Tenti di accedere a una pagina che non è disponibile.
    (ref = %s, type = %s, status = %s) +UseTextBetween5And70Chars=Per buone pratiche SEO, utilizza un testo compreso tra 5 e 70 caratteri MainLanguage=Lingua principale -OtherLanguages=Other languages -UseManifest=Provide a manifest.json file -PublicAuthorAlias=Public author alias -AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are defined into website properties -ReplacementDoneInXPages=Replacement done in %s pages or containers +OtherLanguages=Altre lingue +UseManifest=Fornisci un file manifest.json +PublicAuthorAlias=Alias dell'autore pubblico +AvailableLanguagesAreDefinedIntoWebsiteProperties=Le lingue disponibili sono definite nelle proprietà del sito web +ReplacementDoneInXPages=Sostituzione eseguite in%spagine o contenitori RSSFeed=Feed RSS -RSSFeedDesc=You can get a RSS feed of latest articles with type 'blogpost' using this URL -PagesRegenerated=%s page(s)/container(s) regenerated +RSSFeedDesc=Puoi ottenere un feed RSS degli articoli più recenti con il tipo "blogpost" utilizzando questo URL +PagesRegenerated=%s pagina(e)/contenitore(i) rigenerato diff --git a/htdocs/langs/it_IT/withdrawals.lang b/htdocs/langs/it_IT/withdrawals.lang index 26371a28c1a..296e0fc1975 100644 --- a/htdocs/langs/it_IT/withdrawals.lang +++ b/htdocs/langs/it_IT/withdrawals.lang @@ -1,46 +1,46 @@ # Dolibarr language file - Source file is en_US - withdrawals -CustomersStandingOrdersArea=Payments by Direct debit orders -SuppliersStandingOrdersArea=Payments by Credit transfer +CustomersStandingOrdersArea=Pagamenti tramite ordini di addebito diretto +SuppliersStandingOrdersArea=Pagamenti tramite bonifico bancario StandingOrdersPayment=Direct debit payment orders StandingOrderPayment=Domiciliazione bancaria NewStandingOrder=Nuovo ordine di addebito diretto -NewPaymentByBankTransfer=New payment by credit transfer +NewPaymentByBankTransfer=Nuovo pagamento tramite bonifico bancario StandingOrderToProcess=Da processare -PaymentByBankTransferReceipts=Credit transfer orders -PaymentByBankTransferLines=Credit transfer order lines +PaymentByBankTransferReceipts=Ordini di bonifico +PaymentByBankTransferLines=Righe ordine di bonifico WithdrawalsReceipts=Ordini di addebito diretto WithdrawalReceipt=Ordine di addebito diretto -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order -LatestBankTransferReceipts=Latest %s credit transfer orders +BankTransferReceipts=Ordini di bonifico +BankTransferReceipt=Ordine di trasferimento del credito +LatestBankTransferReceipts=Ultimi %s ordini di bonifico LastWithdrawalReceipts=Latest %s direct debit files -WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line +WithdrawalsLine=Riga ordine di addebito diretto +CreditTransferLine=Linea di trasferimento del credito WithdrawalsLines=Direct debit order lines -CreditTransferLines=Credit transfer lines -RequestStandingOrderToTreat=Requests for direct debit payment order to process -RequestStandingOrderTreated=Requests for direct debit payment order processed -RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed +CreditTransferLines=Linee di trasferimento del credito +RequestStandingOrderToTreat=Richieste di ordine di pagamento con addebito diretto da elaborare +RequestStandingOrderTreated=Richieste di ordine di pagamento con addebito diretto elaborate +RequestPaymentsByBankTransferToTreat=Richieste di bonifici da processare +RequestPaymentsByBankTransferTreated=Richieste di bonifici elaborate NotPossibleForThisStatusOfWithdrawReceiptORLine=Non ancora possibile. Lo stato dell'ordine deve essere "accreditato" prima di poter dichiarare la singola riga "rifiutata" -NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order +NbOfInvoiceToWithdraw=Numero di fatture cliente qualificate con ordine di addebito diretto in attesa NbOfInvoiceToWithdrawWithInfo=No. of customer invoice with direct debit payment orders having defined bank account information -NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer -SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer +NbOfInvoiceToPayByBankTransfer=Numero di fatture fornitore qualificate in attesa di un pagamento tramite bonifico bancario +SupplierInvoiceWaitingWithdraw=Fattura fornitore in attesa di pagamento tramite bonifico bancario InvoiceWaitingWithdraw=Invoice waiting for direct debit -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +InvoiceWaitingPaymentByBankTransfer=Fattura in attesa di bonifico AmountToWithdraw=Importo da prelevare -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. -NoSupplierInvoiceToWithdraw=No supplier invoice with open 'Direct credit requests' is waiting. Go on tab '%s' on invoice card to make a request. +NoInvoiceToWithdraw=Nessuna fattura aperta per '%s' è in attesa. Vai sulla scheda '%s' sulla scheda fattura per effettuare una richiesta. +NoSupplierInvoiceToWithdraw=Nessuna fattura fornitore con "Richieste di credito diretto" aperte è in attesa. Vai sulla scheda '%s' sulla scheda fattura per effettuare una richiesta. ResponsibleUser=User Responsible WithdrawalsSetup=Direct debit payment setup -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Impostazione del bonifico WithdrawStatistics=Direct debit payment statistics -CreditTransferStatistics=Credit transfer statistics +CreditTransferStatistics=Statistiche sul trasferimento di crediti Rejects=Respinge LastWithdrawalReceipt=Latest %s direct debit receipts MakeWithdrawRequest=Effettua una richiesta di addebito diretto -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Invia una richiesta di bonifico WithdrawRequestsDone=%s direct debit payment requests recorded ThirdPartyBankCode=Codice bancario del Soggetto terzo NoInvoiceCouldBeWithdrawed=No invoice debited successfully. Check that invoices are on companies with a valid IBAN and that IBAN has a UMR (Unique Mandate Reference) with mode %s. @@ -53,7 +53,7 @@ Lines=Righe StandingOrderReject=Invia rifiuto WithdrawsRefused=Direct debit refused WithdrawalRefused=Bonifici rifiutati -CreditTransfersRefused=Credit transfers refused +CreditTransfersRefused=Bonifici rifiutati WithdrawalRefusedConfirm=Vuoi davvero inserire un rifiuto per la società? RefusedData=Data del rifiuto RefusedReason=Motivo del rifiuto @@ -63,7 +63,9 @@ InvoiceRefused=Fattura rifiutata (Addebitare il costo al cliente) StatusDebitCredit=Status debit/credit StatusWaiting=In attesa StatusTrans=Trasmesso +StatusDebited=Debited StatusCredited=Accreditato +StatusPaid=Pagata StatusRefused=Rifiutato StatusMotif0=Imprecisato StatusMotif1=Disponibilità insufficiente @@ -77,27 +79,28 @@ StatusMotif8=Altri motivi CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateSepaFileForPaymentByBankTransfer=Crea file di bonifico (SEPA) CreateGuichet=Solo ufficio CreateBanque=Solo banca OrderWaiting=In attesa di esecuzione -NotifyTransmision=Trasmissione domiciliazione -NotifyCredit=Credito +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Numero nazionale dell'inviante WithBankUsingRIB=Per i conti correnti bancari che utilizzano RIB WithBankUsingBANBIC=Per conti bancari che utilizzano IBAN/BIC/SWIFT BankToReceiveWithdraw=Receiving Bank Account -BankToPayCreditTransfer=Bank Account used as source of payments +BankToPayCreditTransfer=Conto bancario utilizzato come fonte di pagamento CreditDate=Data di accredito WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Mostra ordine di addebito diretto IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Ricevuta bancaria +DoStandingOrdersBeforePayments=Questa scheda consente di richiedere un ordine di pagamento con addebito diretto. Una volta fatto, vai nel menu Banca-> Pagamento con addebito diretto per generare e gestire l'ordine di addebito diretto. Quando l'ordine di addebito diretto viene chiuso, il pagamento sulle fatture verrà automaticamente registrato e le fatture chiuse se il resto da pagare è nullo. +DoCreditTransferBeforePayments=Questa scheda consente di richiedere un ordine di bonifico. Una volta fatto, vai nel menu Banca-> Pagamento tramite bonifico per generare e gestire l'ordine di trasferimento del credito. Quando l'ordine di trasferimento del credito viene chiuso, il pagamento sulle fatture verrà automaticamente registrato e le fatture chiuse se il resto da pagare è nullo. +WithdrawalFile=File ordine di addebito +CreditTransferFile=File di trasferimento di credito SetToStatusSent=Imposta stato come "file inviato" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null +ThisWillAlsoAddPaymentOnInvoice=Ciò registrerà anche i pagamenti sulle fatture e li classificherà come "Pagati" se il resto da pagare è nullo StatisticsByLineStatus=Statistics by status of lines RUM=Unique Mandate Reference (UMR) DateRUM=Mandate signature date @@ -105,7 +108,7 @@ RUMLong=Riferimento Unico Mandato RUMWillBeGenerated=If empty, a UMR (Unique Mandate Reference) will be generated once the bank account information is saved. WithdrawMode=Tipologia sequenza d'incasso (FRST o RECUR) WithdrawRequestAmount=Amount of Direct debit request: -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Importo della richiesta di bonifico: WithdrawRequestErrorNilAmount=Unable to create direct debit request for empty amount. SepaMandate=Mandato per addebito diretto SEPA SepaMandateShort=Mandato SEPA @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Tipo di pagamento ModeRECUR=Recurring payment ModeFRST=Pagamento una tantum PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Ordine %s di trasferimento del credito creato DirectDebitOrderCreated=Ordine di addebito diretto %s creato AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -131,7 +135,7 @@ ICS=Creditor Identifier CI END_TO_END="EndToEndId" SEPA XML tag - Unique id assigned per transaction USTRD="Unstructured" SEPA XML tag ADDDAYS=Add days to Execution Date -NoDefaultIBANFound=No default IBAN found for this third party +NoDefaultIBANFound=Nessun IBAN predefinito trovato per questa terza parte ### Notifications InfoCreditSubject=Payment of direct debit payment order %s by the bank InfoCreditMessage=The direct debit payment order %s has been paid by the bank
    Data of payment: %s @@ -141,3 +145,4 @@ InfoTransData=Importo: %s
    Metodo: %s
    Data: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Non è stata impostata la modalità reale, ci fermiamo dopo questa simulazione +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/it_IT/workflow.lang b/htdocs/langs/it_IT/workflow.lang index 0e5736cc06a..98c533ca8d1 100644 --- a/htdocs/langs/it_IT/workflow.lang +++ b/htdocs/langs/it_IT/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classifica "da spedire" l'ordine cl # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Creazione automatica AutomaticClassification=Classificazione automatica diff --git a/htdocs/langs/it_IT/zapier.lang b/htdocs/langs/it_IT/zapier.lang index cf2795a5fbe..7b9ad04fa29 100644 --- a/htdocs/langs/it_IT/zapier.lang +++ b/htdocs/langs/it_IT/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier per modulo Dolibarr # Admin page # ZapierForDolibarrSetup = Installazione di Zapier per Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ja_JP/accountancy.lang b/htdocs/langs/ja_JP/accountancy.lang index 6692086b782..62e0a2c7bcd 100644 --- a/htdocs/langs/ja_JP/accountancy.lang +++ b/htdocs/langs/ja_JP/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/ja_JP/admin.lang b/htdocs/langs/ja_JP/admin.lang index e8f908ff2af..8d1a5c7e46a 100644 --- a/htdocs/langs/ja_JP/admin.lang +++ b/htdocs/langs/ja_JP/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=システムと同様にUnix上では使用できませんが備わっています。ローカルでsendmailプログラムをテストします。 +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=モジュールのセットアップ ModulesSetup=Modules/Application setup ModuleFamilyBase=システム @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=セキュリティで保護されたURLへの鍵 NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=文字列 +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=バーコード Module55Desc=バーコードの管理 Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDialシステムの統合(アスタリスク、...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=サービスを作成/変更 Permission534=サービスを削除する Permission536=隠されたサービスを参照してください/管理 Permission538=輸出サービス +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=寄付を読む Permission702=寄付を作成/変更 Permission703=寄付を削除します。 @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=株式を読む Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=セットアップのドキュメントディレクトリ Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=見通しの可能性 +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=地域 DictionaryCountry=国 @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=ユニット DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=見通しの状態 +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=左側のメニューの恒久的な検索フォーム DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=モジュールのセットアップをダイヤルする]をクリックします ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=契約 +MailToSendReception=Receptions MailToThirdparty=サードパーティ MailToMember=メンバー MailToUser=ユーザー @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=ZIP MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ja_JP/agenda.lang b/htdocs/langs/ja_JP/agenda.lang index 8d1f6ab110f..a918ed85c32 100644 --- a/htdocs/langs/ja_JP/agenda.lang +++ b/htdocs/langs/ja_JP/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=イベントのリスト EventReports=Event reports Location=場所 -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=一日のイベント MenuToDoActions=すべての不完全なイベント MenuDoneActions=すべての終了イベント @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ja_JP/boxes.lang b/htdocs/langs/ja_JP/boxes.lang index 4464d43f4d9..66e5cfb5bf2 100644 --- a/htdocs/langs/ja_JP/boxes.lang +++ b/htdocs/langs/ja_JP/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=顧客の請求書 ForCustomersOrders=Customers orders ForProposals=提案 @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=会計学 diff --git a/htdocs/langs/ja_JP/cashdesk.lang b/htdocs/langs/ja_JP/cashdesk.lang index ef717bafb20..aea5aeda5e3 100644 --- a/htdocs/langs/ja_JP/cashdesk.lang +++ b/htdocs/langs/ja_JP/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ja_JP/compta.lang b/htdocs/langs/ja_JP/compta.lang index b5359c7da1e..26766947802 100644 --- a/htdocs/langs/ja_JP/compta.lang +++ b/htdocs/langs/ja_JP/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/ja_JP/contracts.lang b/htdocs/langs/ja_JP/contracts.lang index 488def94a3e..faa4060b427 100644 --- a/htdocs/langs/ja_JP/contracts.lang +++ b/htdocs/langs/ja_JP/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=実行中のサービス MenuExpiredServices=期限切れのサービス MenuClosedServices=閉じたサービス NewContract=新規契約 -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=契約を削除する ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/ja_JP/errors.lang b/htdocs/langs/ja_JP/errors.lang index feb6f99629a..dbe55ff2079 100644 --- a/htdocs/langs/ja_JP/errors.lang +++ b/htdocs/langs/ja_JP/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/ja_JP/languages.lang b/htdocs/langs/ja_JP/languages.lang index edc2230a033..f62137f167c 100644 --- a/htdocs/langs/ja_JP/languages.lang +++ b/htdocs/langs/ja_JP/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=アラビア語 Language_ar_EG=Arabic (Egypt) Language_ar_SA=アラビア語 +Language_az_AZ=Azerbaijani Language_bn_BD=ベンガル語 +Language_bn_IN=Bengali (India) Language_bg_BG=ブルガリア語 Language_bs_BA=ボスニア Language_ca_ES=カタルにゃ語 @@ -20,6 +23,7 @@ Language_en_GB=英語 (イギリス) Language_en_IN=英語 (インド) Language_en_NZ=英語(ニュージーランド) Language_en_SA=英語(サウジアラビア) +Language_en_SG=English (Singapore) Language_en_US=英語 (アメリカ) Language_en_ZA=英語(南アフリカ) Language_es_ES=スペイン語 @@ -29,6 +33,7 @@ Language_es_CL=スペイン語 (チリ) Language_es_CO=スペイン語 (コロンビア) Language_es_DO=スペイン語 (ドミニカ共和国) Language_es_EC=スペイン語 (エクアドル) +Language_es_GT=Spanish (Guatemala) Language_es_HN=スペイン語(ホンジュラス) Language_es_MX=スペイン語(メキシコ) Language_es_PA=スペイン語 (パナマ) @@ -36,6 +41,7 @@ Language_es_PY=スペイン語(パラグアイ) Language_es_PE=スペイン語(ペルー) Language_es_PR=スペイン語(プエルトリコ) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=スペイン語 (ベネズエラ) Language_et_EE=エストニア語 Language_eu_ES=バスク @@ -44,15 +50,22 @@ Language_fi_FI=フィンランド語 Language_fr_BE=フランス語 (ベルギー) Language_fr_CA=フランス語 (カナダ) Language_fr_CH=フランス語 (スイス) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=フランス語 +Language_fr_GA=French (Gabon) Language_fr_NC=フランス(ニューカレドニア) +Language_fr_SN=French (Senegal) Language_fy_NL=フリジア語 +Language_gl_ES=Galician Language_he_IL=ヘブライ語の +Language_hi_IN=Hindi (India) Language_hr_HR=クロアチア語 Language_hu_HU=ハンガリー語 Language_id_ID=インドネシア語 Language_is_IS=アイスランド語 Language_it_IT=イタリア語 +Language_it_CH=Italian (Switzerland) Language_ja_JP=日本語 Language_ka_GE=ジョージア語 Language_km_KH=クメール語 @@ -64,6 +77,7 @@ Language_lv_LV=ラトビアの Language_mk_MK=マケドニア語 Language_mn_MN=モンゴル語 Language_nb_NO=ノルウエー語 (ブーケモール) +Language_ne_NP=Nepali Language_nl_BE=オランダ語 (ベルギー) Language_nl_NL=Dutch Language_pl_PL=ポーランド語 @@ -86,4 +100,5 @@ Language_uz_UZ=ウズベク語 Language_vi_VN=ベトナムの Language_zh_CN=中国語 Language_zh_TW=(繁体字)中国語 +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/ja_JP/mails.lang b/htdocs/langs/ja_JP/mails.lang index cdd1d8e1eeb..c58b186935e 100644 --- a/htdocs/langs/ja_JP/mails.lang +++ b/htdocs/langs/ja_JP/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/ja_JP/main.lang b/htdocs/langs/ja_JP/main.lang index 678deac09d5..07684b7faab 100644 --- a/htdocs/langs/ja_JP/main.lang +++ b/htdocs/langs/ja_JP/main.lang @@ -7,7 +7,7 @@ DIRECTION=ltr FONTFORPDF=cid0jp FONTSIZEFORPDF=9 SeparatorDecimal=. -SeparatorThousand=None +SeparatorThousand=, FormatDateShort=%m/%d/%Y FormatDateShortInput=%m/%d/%Y FormatDateShortJava=MM/dd/yyyy @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=量 AmountInvoice=請求額 AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=支払金額 AmountHTShort=Amount (excl.) AmountTTCShort=金額(税込) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=によって From=から +FromDate=から FromLocation=から to=へ To=へ @@ -687,6 +688,7 @@ Method=方法 Receive=受け取る CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=部分的な TotalWoman=合計 NeverReceived=受信しませんでした @@ -703,6 +705,7 @@ MenuECM=ドキュメント MenuAWStats=AWStatsは MenuMembers=メンバー MenuAgendaGoogle=Googleの議題 +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr制限(メニューホームセットアップ·セキュリティ):%s KB、PHP制限:%s KB NoFileFound=このディレクトリに保存されない文書ません CurrentUserLanguage=現在の言語 @@ -725,7 +728,7 @@ Page=ページ Notes=注釈 AddNewLine=新しい行を追加します。 AddFile=ファイルを追加します。 -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=その主な属性を持つオブジェクトのクローンを作成する ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ja_JP/members.lang b/htdocs/langs/ja_JP/members.lang index ab811b3e348..d2fca5cf7d3 100644 --- a/htdocs/langs/ja_JP/members.lang +++ b/htdocs/langs/ja_JP/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=ドラフトのメンバー MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=検証 +SubscriptionNotNeeded=No subscription needed NewCotisation=新しい貢献 PaymentSubscription=新しい貢献の支払い SubscriptionEndDate=サブスクリプションの終了日 @@ -78,7 +81,7 @@ DeleteType=削除する VoteAllowed=許可される投票 Physical=物理的な Moral=道徳 -MorPhy=物理的/道徳的な +MorPhy=自然 Reenable=再度有効にする ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/ja_JP/mrp.lang b/htdocs/langs/ja_JP/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/ja_JP/mrp.lang +++ b/htdocs/langs/ja_JP/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/ja_JP/other.lang b/htdocs/langs/ja_JP/other.lang index 0ee2b871636..87098706f4d 100644 --- a/htdocs/langs/ja_JP/other.lang +++ b/htdocs/langs/ja_JP/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/ja_JP/products.lang b/htdocs/langs/ja_JP/products.lang index b0459e1a258..1ed881cc6f4 100644 --- a/htdocs/langs/ja_JP/products.lang +++ b/htdocs/langs/ja_JP/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=バーコードの種類を設定します。 BarcodeValue=バーコードの値 NoteNotVisibleOnBill=注意してください(請求書、提案...上に表示されません) ServiceLimitedDuration=製品は、限られた期間を持つサービスの場合: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=価格数 DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=原産国 Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=ユニット p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=新しい属性 NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/ja_JP/projects.lang b/htdocs/langs/ja_JP/projects.lang index 65484866be4..eb84ec5c3c0 100644 --- a/htdocs/langs/ja_JP/projects.lang +++ b/htdocs/langs/ja_JP/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=貢献者 TypeContact_project_task_external_TASKCONTRIBUTOR=貢献者 SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/ja_JP/propal.lang b/htdocs/langs/ja_JP/propal.lang index d2065e007a3..373ac4a2ce2 100644 --- a/htdocs/langs/ja_JP/propal.lang +++ b/htdocs/langs/ja_JP/propal.lang @@ -85,3 +85,7 @@ ProposalCustomerSignature=承諾書、会社印、日付、署名 ProposalsStatisticsSuppliers=Vendor proposals statistics CaseFollowedBy=Case followed by SignedOnly=Signed only +IdProposal=提案番号 +IdProduct=製品番号 +PrParentLine=提案親ライン +LineBuyPriceHT=購入価格ラインの税控除後の金額 diff --git a/htdocs/langs/ja_JP/recruitment.lang b/htdocs/langs/ja_JP/recruitment.lang new file mode 100644 index 00000000000..63690e8b83f --- /dev/null +++ b/htdocs/langs/ja_JP/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = 約 +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ja_JP/stocks.lang b/htdocs/langs/ja_JP/stocks.lang index aa2e160a82e..a16ebdd7c63 100644 --- a/htdocs/langs/ja_JP/stocks.lang +++ b/htdocs/langs/ja_JP/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=送信削除 Stock=株式 Stocks=ストック MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=実在庫 RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=仮想在庫 -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=イド倉庫 DescWareHouse=説明倉庫 LieuWareHouse=ローカリゼーション倉庫 WarehousesAndProducts=倉庫と製品 WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=加重平均の入力価格 -AverageUnitPricePMP=加重平均の入力価格 +AverageUnitPricePMPShort=加重平均価格 +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=販売単価 EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ja_JP/suppliers.lang b/htdocs/langs/ja_JP/suppliers.lang index 8b9d1e6289b..70a684ddeba 100644 --- a/htdocs/langs/ja_JP/suppliers.lang +++ b/htdocs/langs/ja_JP/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=このリファレンス·サプライヤーは、すでに参照に関連付けられています。%s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=可用性 -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=この注文を承認 ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=金額:%s
    Metode:%s
    日付:%s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=リアルモードのオプションが設定されていない、我々は、このシミュレーションの後に停止 +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/ja_JP/workflow.lang b/htdocs/langs/ja_JP/workflow.lang index bc879bb4c0d..ab06c374860 100644 --- a/htdocs/langs/ja_JP/workflow.lang +++ b/htdocs/langs/ja_JP/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=ワークフローモジュールのセットアップ -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/ja_JP/zapier.lang b/htdocs/langs/ja_JP/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/ja_JP/zapier.lang +++ b/htdocs/langs/ja_JP/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ka_GE/accountancy.lang b/htdocs/langs/ka_GE/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/ka_GE/accountancy.lang +++ b/htdocs/langs/ka_GE/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/ka_GE/admin.lang b/htdocs/langs/ka_GE/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/ka_GE/admin.lang +++ b/htdocs/langs/ka_GE/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ka_GE/agenda.lang b/htdocs/langs/ka_GE/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/ka_GE/agenda.lang +++ b/htdocs/langs/ka_GE/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ka_GE/boxes.lang b/htdocs/langs/ka_GE/boxes.lang index 8fe1f84b149..d6fd298a3a7 100644 --- a/htdocs/langs/ka_GE/boxes.lang +++ b/htdocs/langs/ka_GE/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/ka_GE/cashdesk.lang b/htdocs/langs/ka_GE/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/ka_GE/cashdesk.lang +++ b/htdocs/langs/ka_GE/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ka_GE/compta.lang b/htdocs/langs/ka_GE/compta.lang index 6cd046c5607..8f4f058bb87 100644 --- a/htdocs/langs/ka_GE/compta.lang +++ b/htdocs/langs/ka_GE/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/ka_GE/contracts.lang b/htdocs/langs/ka_GE/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/ka_GE/contracts.lang +++ b/htdocs/langs/ka_GE/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/ka_GE/errors.lang b/htdocs/langs/ka_GE/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/ka_GE/errors.lang +++ b/htdocs/langs/ka_GE/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/ka_GE/languages.lang b/htdocs/langs/ka_GE/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/ka_GE/languages.lang +++ b/htdocs/langs/ka_GE/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/ka_GE/mails.lang b/htdocs/langs/ka_GE/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/ka_GE/mails.lang +++ b/htdocs/langs/ka_GE/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/ka_GE/main.lang b/htdocs/langs/ka_GE/main.lang index adbc443198f..0af5c66f0e0 100644 --- a/htdocs/langs/ka_GE/main.lang +++ b/htdocs/langs/ka_GE/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ka_GE/members.lang b/htdocs/langs/ka_GE/members.lang index 5886c598d52..5ef946ddf67 100644 --- a/htdocs/langs/ka_GE/members.lang +++ b/htdocs/langs/ka_GE/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/ka_GE/mrp.lang b/htdocs/langs/ka_GE/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/ka_GE/mrp.lang +++ b/htdocs/langs/ka_GE/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/ka_GE/other.lang b/htdocs/langs/ka_GE/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/ka_GE/other.lang +++ b/htdocs/langs/ka_GE/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/ka_GE/products.lang b/htdocs/langs/ka_GE/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/ka_GE/products.lang +++ b/htdocs/langs/ka_GE/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/ka_GE/projects.lang b/htdocs/langs/ka_GE/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/ka_GE/projects.lang +++ b/htdocs/langs/ka_GE/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/ka_GE/recruitment.lang b/htdocs/langs/ka_GE/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/ka_GE/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ka_GE/stocks.lang b/htdocs/langs/ka_GE/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/ka_GE/stocks.lang +++ b/htdocs/langs/ka_GE/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ka_GE/suppliers.lang b/htdocs/langs/ka_GE/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/ka_GE/suppliers.lang +++ b/htdocs/langs/ka_GE/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/ka_GE/workflow.lang b/htdocs/langs/ka_GE/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/ka_GE/workflow.lang +++ b/htdocs/langs/ka_GE/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/ka_GE/zapier.lang b/htdocs/langs/ka_GE/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/ka_GE/zapier.lang +++ b/htdocs/langs/ka_GE/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/km_KH/accountancy.lang b/htdocs/langs/km_KH/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/km_KH/accountancy.lang +++ b/htdocs/langs/km_KH/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/km_KH/admin.lang b/htdocs/langs/km_KH/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/km_KH/admin.lang +++ b/htdocs/langs/km_KH/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/km_KH/agenda.lang b/htdocs/langs/km_KH/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/km_KH/agenda.lang +++ b/htdocs/langs/km_KH/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/km_KH/boxes.lang b/htdocs/langs/km_KH/boxes.lang index bd62684421a..d6fd298a3a7 100644 --- a/htdocs/langs/km_KH/boxes.lang +++ b/htdocs/langs/km_KH/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/km_KH/cashdesk.lang b/htdocs/langs/km_KH/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/km_KH/cashdesk.lang +++ b/htdocs/langs/km_KH/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/km_KH/compta.lang b/htdocs/langs/km_KH/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/km_KH/compta.lang +++ b/htdocs/langs/km_KH/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/km_KH/contracts.lang b/htdocs/langs/km_KH/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/km_KH/contracts.lang +++ b/htdocs/langs/km_KH/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/km_KH/errors.lang b/htdocs/langs/km_KH/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/km_KH/errors.lang +++ b/htdocs/langs/km_KH/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/km_KH/languages.lang b/htdocs/langs/km_KH/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/km_KH/languages.lang +++ b/htdocs/langs/km_KH/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/km_KH/mails.lang b/htdocs/langs/km_KH/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/km_KH/mails.lang +++ b/htdocs/langs/km_KH/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/km_KH/main.lang b/htdocs/langs/km_KH/main.lang index e5ad284bbb5..7f2168fdea2 100644 --- a/htdocs/langs/km_KH/main.lang +++ b/htdocs/langs/km_KH/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/km_KH/members.lang b/htdocs/langs/km_KH/members.lang index dd0a5bf49e2..5ef946ddf67 100644 --- a/htdocs/langs/km_KH/members.lang +++ b/htdocs/langs/km_KH/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/km_KH/mrp.lang b/htdocs/langs/km_KH/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/km_KH/mrp.lang +++ b/htdocs/langs/km_KH/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/km_KH/other.lang b/htdocs/langs/km_KH/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/km_KH/other.lang +++ b/htdocs/langs/km_KH/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/km_KH/products.lang b/htdocs/langs/km_KH/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/km_KH/products.lang +++ b/htdocs/langs/km_KH/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/km_KH/projects.lang b/htdocs/langs/km_KH/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/km_KH/projects.lang +++ b/htdocs/langs/km_KH/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/km_KH/recruitment.lang b/htdocs/langs/km_KH/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/km_KH/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/km_KH/stocks.lang b/htdocs/langs/km_KH/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/km_KH/stocks.lang +++ b/htdocs/langs/km_KH/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/km_KH/suppliers.lang b/htdocs/langs/km_KH/suppliers.lang index b69b11272b4..51562b8bb7a 100644 --- a/htdocs/langs/km_KH/suppliers.lang +++ b/htdocs/langs/km_KH/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/km_KH/ticket.lang b/htdocs/langs/km_KH/ticket.lang index a9cff9391d0..59519282c80 100644 --- a/htdocs/langs/km_KH/ticket.lang +++ b/htdocs/langs/km_KH/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/km_KH/users.lang b/htdocs/langs/km_KH/users.lang index 41a5ebd0981..25d9205457b 100644 --- a/htdocs/langs/km_KH/users.lang +++ b/htdocs/langs/km_KH/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/km_KH/withdrawals.lang b/htdocs/langs/km_KH/withdrawals.lang index cccd8196481..114a8d9dd6c 100644 --- a/htdocs/langs/km_KH/withdrawals.lang +++ b/htdocs/langs/km_KH/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Paid StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/km_KH/workflow.lang b/htdocs/langs/km_KH/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/km_KH/workflow.lang +++ b/htdocs/langs/km_KH/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/km_KH/zapier.lang b/htdocs/langs/km_KH/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/km_KH/zapier.lang +++ b/htdocs/langs/km_KH/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/kn_IN/accountancy.lang b/htdocs/langs/kn_IN/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/kn_IN/accountancy.lang +++ b/htdocs/langs/kn_IN/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/kn_IN/admin.lang b/htdocs/langs/kn_IN/admin.lang index 1f4687bf75e..1a4b882ff57 100644 --- a/htdocs/langs/kn_IN/admin.lang +++ b/htdocs/langs/kn_IN/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=ಸಂಭಾವ್ಯ ನಿರೀಕ್ಷಿತರು +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=ನಿರೀಕ್ಷಿತರ ಸ್ಥಿತಿ +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=ಮೂರನೇ ಪಕ್ಷಗಳು MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/kn_IN/agenda.lang b/htdocs/langs/kn_IN/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/kn_IN/agenda.lang +++ b/htdocs/langs/kn_IN/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/kn_IN/boxes.lang b/htdocs/langs/kn_IN/boxes.lang index 8fe1f84b149..d6fd298a3a7 100644 --- a/htdocs/langs/kn_IN/boxes.lang +++ b/htdocs/langs/kn_IN/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/kn_IN/cashdesk.lang b/htdocs/langs/kn_IN/cashdesk.lang index 110bd02427e..caa77612db5 100644 --- a/htdocs/langs/kn_IN/cashdesk.lang +++ b/htdocs/langs/kn_IN/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/kn_IN/compta.lang b/htdocs/langs/kn_IN/compta.lang index 6cd046c5607..8f4f058bb87 100644 --- a/htdocs/langs/kn_IN/compta.lang +++ b/htdocs/langs/kn_IN/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/kn_IN/contracts.lang b/htdocs/langs/kn_IN/contracts.lang index a9229022d15..2862112a9c5 100644 --- a/htdocs/langs/kn_IN/contracts.lang +++ b/htdocs/langs/kn_IN/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/kn_IN/errors.lang b/htdocs/langs/kn_IN/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/kn_IN/errors.lang +++ b/htdocs/langs/kn_IN/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/kn_IN/languages.lang b/htdocs/langs/kn_IN/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/kn_IN/languages.lang +++ b/htdocs/langs/kn_IN/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/kn_IN/mails.lang b/htdocs/langs/kn_IN/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/kn_IN/mails.lang +++ b/htdocs/langs/kn_IN/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/kn_IN/main.lang b/htdocs/langs/kn_IN/main.lang index 47b40caa689..aaf4819a944 100644 --- a/htdocs/langs/kn_IN/main.lang +++ b/htdocs/langs/kn_IN/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/kn_IN/members.lang b/htdocs/langs/kn_IN/members.lang index 5886c598d52..5ef946ddf67 100644 --- a/htdocs/langs/kn_IN/members.lang +++ b/htdocs/langs/kn_IN/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/kn_IN/mrp.lang b/htdocs/langs/kn_IN/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/kn_IN/mrp.lang +++ b/htdocs/langs/kn_IN/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/kn_IN/other.lang b/htdocs/langs/kn_IN/other.lang index 6f1c0edfbb3..66bda179f9b 100644 --- a/htdocs/langs/kn_IN/other.lang +++ b/htdocs/langs/kn_IN/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/kn_IN/products.lang b/htdocs/langs/kn_IN/products.lang index ececf240ce1..8900044765c 100644 --- a/htdocs/langs/kn_IN/products.lang +++ b/htdocs/langs/kn_IN/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/kn_IN/projects.lang b/htdocs/langs/kn_IN/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/kn_IN/projects.lang +++ b/htdocs/langs/kn_IN/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/kn_IN/recruitment.lang b/htdocs/langs/kn_IN/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/kn_IN/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/kn_IN/stocks.lang b/htdocs/langs/kn_IN/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/kn_IN/stocks.lang +++ b/htdocs/langs/kn_IN/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/kn_IN/suppliers.lang b/htdocs/langs/kn_IN/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/kn_IN/suppliers.lang +++ b/htdocs/langs/kn_IN/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/kn_IN/workflow.lang b/htdocs/langs/kn_IN/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/kn_IN/workflow.lang +++ b/htdocs/langs/kn_IN/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/kn_IN/zapier.lang b/htdocs/langs/kn_IN/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/kn_IN/zapier.lang +++ b/htdocs/langs/kn_IN/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ko_KR/accountancy.lang b/htdocs/langs/ko_KR/accountancy.lang index 7ce7f73a40e..5f53ebb4389 100644 --- a/htdocs/langs/ko_KR/accountancy.lang +++ b/htdocs/langs/ko_KR/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=매출분개장 ACCOUNTING_PURCHASE_JOURNAL=구매분개장 @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/ko_KR/admin.lang b/htdocs/langs/ko_KR/admin.lang index a95c41e388d..9a09326a0c5 100644 --- a/htdocs/langs/ko_KR/admin.lang +++ b/htdocs/langs/ko_KR/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=미래 잠재고객 +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=잠재 고객 상태 +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=계약서 +MailToSendReception=Receptions MailToThirdparty=협력업체 MailToMember=구성원 MailToUser=사용자 @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ko_KR/agenda.lang b/htdocs/langs/ko_KR/agenda.lang index 768f95f611a..fbdadd09422 100644 --- a/htdocs/langs/ko_KR/agenda.lang +++ b/htdocs/langs/ko_KR/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=이벤트 목록 EventReports=Event reports Location=위치 -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ko_KR/boxes.lang b/htdocs/langs/ko_KR/boxes.lang index 566b00edc22..f070f401eb4 100644 --- a/htdocs/langs/ko_KR/boxes.lang +++ b/htdocs/langs/ko_KR/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=최근 %s 기록 공급자 BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=최근 %s 고객 또는 잠재 고객 -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=최근 %s 구성원 BoxTitleLastFicheInter=최근 %s 수정 된 개입 @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=고객 송장 ForCustomersOrders=고객 주문 ForProposals=제안 @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/ko_KR/cashdesk.lang b/htdocs/langs/ko_KR/cashdesk.lang index 7381cb11248..266158be744 100644 --- a/htdocs/langs/ko_KR/cashdesk.lang +++ b/htdocs/langs/ko_KR/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ko_KR/compta.lang b/htdocs/langs/ko_KR/compta.lang index 025d45b7e1e..0761985d4aa 100644 --- a/htdocs/langs/ko_KR/compta.lang +++ b/htdocs/langs/ko_KR/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/ko_KR/contracts.lang b/htdocs/langs/ko_KR/contracts.lang index 6358c2799ef..0c7979156c3 100644 --- a/htdocs/langs/ko_KR/contracts.lang +++ b/htdocs/langs/ko_KR/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/ko_KR/errors.lang b/htdocs/langs/ko_KR/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/ko_KR/errors.lang +++ b/htdocs/langs/ko_KR/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/ko_KR/languages.lang b/htdocs/langs/ko_KR/languages.lang index 989790a4ef8..5359947a598 100644 --- a/htdocs/langs/ko_KR/languages.lang +++ b/htdocs/langs/ko_KR/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=아랍어 Language_ar_EG=Arabic (Egypt) Language_ar_SA=아랍어 +Language_az_AZ=Azerbaijani Language_bn_BD=벵골어 +Language_bn_IN=Bengali (India) Language_bg_BG=불가리아어 Language_bs_BA=보스니아어 Language_ca_ES=카탈로니아어 @@ -20,6 +23,7 @@ Language_en_GB=영어 (영국) Language_en_IN=영어 (인도) Language_en_NZ=영어 (뉴질랜드) Language_en_SA=영어 (사우디 아라비아) +Language_en_SG=English (Singapore) Language_en_US=영어 (미국) Language_en_ZA=영어 (남아프리카 공화국) Language_es_ES=스페인어 @@ -29,6 +33,7 @@ Language_es_CL=스페인어 (칠레) Language_es_CO=스페인어 (콜롬비아) Language_es_DO=스페인어 (도미니카 공화국) Language_es_EC=스페인어 (에콰도르) +Language_es_GT=Spanish (Guatemala) Language_es_HN=스페인어 (온두라스) Language_es_MX=스페인어 (멕시코) Language_es_PA=스페인어 (파나마) @@ -36,6 +41,7 @@ Language_es_PY=스페인어 (파라과이) Language_es_PE=스페인어 (페루) Language_es_PR=스페인어 (푸에르토 리코) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=스페인어 (베네수엘라) Language_et_EE=에스토니아어 Language_eu_ES=바스크어 @@ -44,15 +50,22 @@ Language_fi_FI=핀란드어 Language_fr_BE=프랑스어 (벨기에) Language_fr_CA=프랑스어 (캐나다) Language_fr_CH=프랑스어 (스위스) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=프랑스어 +Language_fr_GA=French (Gabon) Language_fr_NC=프랑스어 (뉴 칼레도니아) +Language_fr_SN=French (Senegal) Language_fy_NL=프리시아어 +Language_gl_ES=Galician Language_he_IL=히브리어 +Language_hi_IN=Hindi (India) Language_hr_HR=크로아티아어 Language_hu_HU=헝가리어 Language_id_ID=인도네시아어 Language_is_IS=아이슬란드어 Language_it_IT=이탈리아어 +Language_it_CH=Italian (Switzerland) Language_ja_JP=일본어 Language_ka_GE=조르지아어 Language_km_KH=크메르어 @@ -64,6 +77,7 @@ Language_lv_LV=라트비아어 Language_mk_MK=마케도니아어 Language_mn_MN=몽골어 Language_nb_NO=노르웨이어 (보크 말) +Language_ne_NP=Nepali Language_nl_BE=네덜란드어 (벨기에) Language_nl_NL=Dutch Language_pl_PL=폴란드어 @@ -86,4 +100,5 @@ Language_uz_UZ=우즈벡어 Language_vi_VN=베트남어 Language_zh_CN=중국어 Language_zh_TW=중국어 (번체) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/ko_KR/mails.lang b/htdocs/langs/ko_KR/mails.lang index fb9f072a3a9..14c7f27948a 100644 --- a/htdocs/langs/ko_KR/mails.lang +++ b/htdocs/langs/ko_KR/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/ko_KR/main.lang b/htdocs/langs/ko_KR/main.lang index 8480b1274e9..5392faabe13 100644 --- a/htdocs/langs/ko_KR/main.lang +++ b/htdocs/langs/ko_KR/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (세금 포함) Amount=금액 AmountInvoice=송장 금액 AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=결제 금액 AmountHTShort=Amount (excl.) AmountTTCShort=금액 (세금 포함) @@ -485,6 +485,7 @@ Categories=태그 / 카테고리 Category=태그 / 카테고리 By=별 From=부터 +FromDate=부터 FromLocation=부터 to=까지 To=까지 @@ -687,6 +688,7 @@ Method=방법 Receive=수령 CompleteOrNoMoreReceptionExpected=완료되었거나 더 이상 기대되지 않음 ExpectedValue=예상 값 +ExpectedQty=Expected Qty PartialWoman=분할 TotalWoman=합계 NeverReceived=수령 못함 @@ -703,6 +705,7 @@ MenuECM=문서 MenuAWStats=AWStats MenuMembers=회원 MenuAgendaGoogle=구글 의제 +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr한계 (메뉴 홈-설정-보안): %s Kb, PHP 한계: %s Kb NoFileFound=이 디렉토리에 저장된 문서가 없습니다. CurrentUserLanguage=현재 언어 @@ -725,7 +728,7 @@ Page=페이지 Notes=노트 AddNewLine=새 줄 추가 AddFile=파일 추가 -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=주요 속성을 가진 객체 복제 ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=목 ShortFriday=금 ShortSaturday=토 ShortSunday=일 +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=참조 설정 Select2ResultFoundUseArrows=일부 결과가 발견되었습니다. 화살표를 사용하여 선택하십시오. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ko_KR/members.lang b/htdocs/langs/ko_KR/members.lang index af849a915cc..32c684190be 100644 --- a/htdocs/langs/ko_KR/members.lang +++ b/htdocs/langs/ko_KR/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=확인 함 +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=지우다 VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/ko_KR/mrp.lang b/htdocs/langs/ko_KR/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/ko_KR/mrp.lang +++ b/htdocs/langs/ko_KR/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/ko_KR/other.lang b/htdocs/langs/ko_KR/other.lang index 84c88766bf0..a39cc328af3 100644 --- a/htdocs/langs/ko_KR/other.lang +++ b/htdocs/langs/ko_KR/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/ko_KR/products.lang b/htdocs/langs/ko_KR/products.lang index 40e6d3404c6..acd9124600e 100644 --- a/htdocs/langs/ko_KR/products.lang +++ b/htdocs/langs/ko_KR/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=새로운 속성 NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/ko_KR/projects.lang b/htdocs/langs/ko_KR/projects.lang index b02a87add1e..f9e32599c26 100644 --- a/htdocs/langs/ko_KR/projects.lang +++ b/htdocs/langs/ko_KR/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/ko_KR/propal.lang b/htdocs/langs/ko_KR/propal.lang index 93708eb0955..26a86464f91 100644 --- a/htdocs/langs/ko_KR/propal.lang +++ b/htdocs/langs/ko_KR/propal.lang @@ -85,3 +85,7 @@ ProposalCustomerSignature=Written acceptance, company stamp, date and signature ProposalsStatisticsSuppliers=Vendor proposals statistics CaseFollowedBy=Case followed by SignedOnly=Signed only +IdProposal=Proposal ID +IdProduct=Product ID +PrParentLine=Proposal Parent Line +LineBuyPriceHT=Buy Price Amount net of tax for line diff --git a/htdocs/langs/ko_KR/recruitment.lang b/htdocs/langs/ko_KR/recruitment.lang new file mode 100644 index 00000000000..d9a6cc70b6d --- /dev/null +++ b/htdocs/langs/ko_KR/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = 개략 +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ko_KR/stocks.lang b/htdocs/langs/ko_KR/stocks.lang index cf05c2c4958..0345634f4bf 100644 --- a/htdocs/langs/ko_KR/stocks.lang +++ b/htdocs/langs/ko_KR/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ko_KR/suppliers.lang b/htdocs/langs/ko_KR/suppliers.lang index 7b81f84d024..2a5cfe1d008 100644 --- a/htdocs/langs/ko_KR/suppliers.lang +++ b/htdocs/langs/ko_KR/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=구매가등록 ChangeSupplierPrice=구매가변경 SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=이용가능여부 -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=주문 승인 ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=주문 거절 @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/ko_KR/workflow.lang b/htdocs/langs/ko_KR/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/ko_KR/workflow.lang +++ b/htdocs/langs/ko_KR/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/ko_KR/zapier.lang b/htdocs/langs/ko_KR/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/ko_KR/zapier.lang +++ b/htdocs/langs/ko_KR/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/lo_LA/accountancy.lang b/htdocs/langs/lo_LA/accountancy.lang index 18767496e2f..f7f3aa2fec7 100644 --- a/htdocs/langs/lo_LA/accountancy.lang +++ b/htdocs/langs/lo_LA/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/lo_LA/admin.lang b/htdocs/langs/lo_LA/admin.lang index 59d91bea20e..511378bb6e3 100644 --- a/htdocs/langs/lo_LA/admin.lang +++ b/htdocs/langs/lo_LA/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/lo_LA/agenda.lang b/htdocs/langs/lo_LA/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/lo_LA/agenda.lang +++ b/htdocs/langs/lo_LA/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/lo_LA/boxes.lang b/htdocs/langs/lo_LA/boxes.lang index 8fe1f84b149..d6fd298a3a7 100644 --- a/htdocs/langs/lo_LA/boxes.lang +++ b/htdocs/langs/lo_LA/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/lo_LA/cashdesk.lang b/htdocs/langs/lo_LA/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/lo_LA/cashdesk.lang +++ b/htdocs/langs/lo_LA/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/lo_LA/compta.lang b/htdocs/langs/lo_LA/compta.lang index b4eb327c94d..29c2f72f5bf 100644 --- a/htdocs/langs/lo_LA/compta.lang +++ b/htdocs/langs/lo_LA/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/lo_LA/contracts.lang b/htdocs/langs/lo_LA/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/lo_LA/contracts.lang +++ b/htdocs/langs/lo_LA/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/lo_LA/errors.lang b/htdocs/langs/lo_LA/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/lo_LA/errors.lang +++ b/htdocs/langs/lo_LA/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/lo_LA/languages.lang b/htdocs/langs/lo_LA/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/lo_LA/languages.lang +++ b/htdocs/langs/lo_LA/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/lo_LA/mails.lang b/htdocs/langs/lo_LA/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/lo_LA/mails.lang +++ b/htdocs/langs/lo_LA/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/lo_LA/main.lang b/htdocs/langs/lo_LA/main.lang index 3e3c7ed437f..96d7ae3cb09 100644 --- a/htdocs/langs/lo_LA/main.lang +++ b/htdocs/langs/lo_LA/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/lo_LA/members.lang b/htdocs/langs/lo_LA/members.lang index f3beb23deef..d516088ccf3 100644 --- a/htdocs/langs/lo_LA/members.lang +++ b/htdocs/langs/lo_LA/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=ລຶບ VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/lo_LA/mrp.lang b/htdocs/langs/lo_LA/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/lo_LA/mrp.lang +++ b/htdocs/langs/lo_LA/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/lo_LA/other.lang b/htdocs/langs/lo_LA/other.lang index f611612ab3f..30dcda87f53 100644 --- a/htdocs/langs/lo_LA/other.lang +++ b/htdocs/langs/lo_LA/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/lo_LA/products.lang b/htdocs/langs/lo_LA/products.lang index 2e0cb4da31f..10a26e629e5 100644 --- a/htdocs/langs/lo_LA/products.lang +++ b/htdocs/langs/lo_LA/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/lo_LA/projects.lang b/htdocs/langs/lo_LA/projects.lang index 6caacb54f22..bfe42b3a2d0 100644 --- a/htdocs/langs/lo_LA/projects.lang +++ b/htdocs/langs/lo_LA/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/lo_LA/recruitment.lang b/htdocs/langs/lo_LA/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/lo_LA/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/lo_LA/stocks.lang b/htdocs/langs/lo_LA/stocks.lang index 2e5c5c11748..f00ee3d2f05 100644 --- a/htdocs/langs/lo_LA/stocks.lang +++ b/htdocs/langs/lo_LA/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/lo_LA/suppliers.lang b/htdocs/langs/lo_LA/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/lo_LA/suppliers.lang +++ b/htdocs/langs/lo_LA/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/lo_LA/workflow.lang b/htdocs/langs/lo_LA/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/lo_LA/workflow.lang +++ b/htdocs/langs/lo_LA/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/lo_LA/zapier.lang b/htdocs/langs/lo_LA/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/lo_LA/zapier.lang +++ b/htdocs/langs/lo_LA/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/lt_LT/accountancy.lang b/htdocs/langs/lt_LT/accountancy.lang index bcc3c614012..ba180500a96 100644 --- a/htdocs/langs/lt_LT/accountancy.lang +++ b/htdocs/langs/lt_LT/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Išjungti tiesioginį sandorio įrašymą banko sąskaitoje ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Įgalinti eksporto projektą žurnale ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Pardavimų žurnalas ACCOUNTING_PURCHASE_JOURNAL=Pirkimų žurnalas @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/lt_LT/admin.lang b/htdocs/langs/lt_LT/admin.lang index e28d8560cd2..4770b9982b6 100644 --- a/htdocs/langs/lt_LT/admin.lang +++ b/htdocs/langs/lt_LT/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Funkcija negalima Unix tipo sistemose. Patikrinti el. pašto siuntimo vietinę programą. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Modulio nuostatos ModulesSetup=Modules/Application setup ModuleFamilyBase=Sistema @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=URL apsaugos raktai NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modifikuoti kainas su apibrėžta bazinės vertės nuoroda MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Serija +String1Line=String (1 line) TextLong=Ilgas tekstas +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Sveikasis skaičius Float=Slankus @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Brūkšniniai kodai Module55Desc=Brūkšninių kodų valdymas Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDial sistemos integracija (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Sukurti/keisti paslaugas Permission534=Ištrinti paslaugas Permission536=Žiūrėti/tvarkyti paslėptas paslaugas Permission538=Eksportuoti paslaugas +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Skaityti aukas Permission702=Sukurti/keisti aukas Permission703=Ištrinti aukas @@ -848,6 +858,8 @@ Permission773=Ištrinti išlaidų ataskaitas Permission774=Skaityti visas išlaidų ataskaitas (net nepalald-iam vartotojui) Permission775=Patvirtinti išlaidų ataskaitas Permission776=Mokamų išlaidų ataskaitos +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Eksportuoti išlaidų ataskaitas Permission1001=Skaityti atsargas Permission1002=Sukurti / keisti sandėlius @@ -900,6 +912,7 @@ Permission2515=Nustatyti dokumentų katalogus Permission2801=Naudokite FTP klientą skaitymo režime (tik naršyti ir parsisiųsti) Permission2802=Naudokite FTP klientą įrašymo režimu (ištrinti ar įkelti failus) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Numatomų klientų potencialas +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regionai DictionaryCountry=Šalys @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Vienetai DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Numatomo kliento būklė +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Nuolatinė paieškos forma kairiajame meniu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Jūs turite įjungti bent 1 modulį ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Taip vasarą @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Kurią kortelę norite atidaryti pagal nutylėjimą renkantis meniu Darbotvarkė +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial modulio nuostatos ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Sutartys +MailToSendReception=Receptions MailToThirdparty=Trečiosios šalys MailToMember=Nariai MailToUser=Vartotojai @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Pašto kodas MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/lt_LT/agenda.lang b/htdocs/langs/lt_LT/agenda.lang index e806a19824e..4190286b778 100644 --- a/htdocs/langs/lt_LT/agenda.lang +++ b/htdocs/langs/lt_LT/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Įvykių skaičius ListOfActions=Įvykių sąrašas EventReports=Event reports Location=Vieta -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Visos (-ų) dienos (-ų) įvykis MenuToDoActions=Visi neužbaigti įvykiai MenuDoneActions=Visi užbaigti/nutraukti įvykiai @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/lt_LT/boxes.lang b/htdocs/langs/lt_LT/boxes.lang index dd70b597e9a..bed53614fc0 100644 --- a/htdocs/langs/lt_LT/boxes.lang +++ b/htdocs/langs/lt_LT/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Klientų sąskaitos-faktūros ForCustomersOrders=Klientų užsakymai ForProposals=Pasiūlymai @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Apskaita diff --git a/htdocs/langs/lt_LT/cashdesk.lang b/htdocs/langs/lt_LT/cashdesk.lang index 5ea75e3785a..00c067dd151 100644 --- a/htdocs/langs/lt_LT/cashdesk.lang +++ b/htdocs/langs/lt_LT/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/lt_LT/compta.lang b/htdocs/langs/lt_LT/compta.lang index d645b4e329e..ba0519c1662 100644 --- a/htdocs/langs/lt_LT/compta.lang +++ b/htdocs/langs/lt_LT/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Specialios išlaidos @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/lt_LT/contracts.lang b/htdocs/langs/lt_LT/contracts.lang index 0c06a6cec6e..77f62e938ef 100644 --- a/htdocs/langs/lt_LT/contracts.lang +++ b/htdocs/langs/lt_LT/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Veikiančios paslaugas MenuExpiredServices=Pasibaigusios paslaugos MenuClosedServices=Uždarytos paslaugos NewContract=Nauja sutartis -NewContractSubscription=Nauji Sutartys / Abonentai +NewContractSubscription=New contract or subscription AddContract=Sukurti sutartį DeleteAContract=Ištrinti sutartį ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/lt_LT/errors.lang b/htdocs/langs/lt_LT/errors.lang index f56f900da60..e22aa414772 100644 --- a/htdocs/langs/lt_LT/errors.lang +++ b/htdocs/langs/lt_LT/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nauja reikšmė negali būti lygi senai reikšmei ErrorFailedToValidatePasswordReset=Nepavyko inicijuoti slaptažodžio. Gali būti inicijavimas jau buvo padarytas (ši nuoroda gali būti naudojamas tik vieną kartą). Jei ne, pabandykite iš naujo paleisti inicijavimo procesą. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Nepavyko pridėti kontakto -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Mokėjimo būdo tipas buvo nustatytas %s, bet modulio Sąskaita faktūra nustatymas nebuvo pilnai baigtas mokėjimo būdo informacijos parodymui. ErrorPHPNeedModule=Klaida, Jūsų PHP turi turėti modulį %s įdiegtą šios funkcijos naudojimui. ErrorOpenIDSetupNotComplete=Nustatyti Dolibarr config failą, kad būtų leidžiama OpenID patvirtinimas, bet OpenID paslaugos URL nėra apibrėžtas kaip konstanta %s. @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/lt_LT/languages.lang b/htdocs/langs/lt_LT/languages.lang index 175f54526f7..77a7c15b777 100644 --- a/htdocs/langs/lt_LT/languages.lang +++ b/htdocs/langs/lt_LT/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabų Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabų +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarų Language_bs_BA=Bosnijos Language_ca_ES=Katalonų @@ -20,6 +23,7 @@ Language_en_GB=Anglų (Jungtinė Karalystė) Language_en_IN=Anglų (Indija) Language_en_NZ=Anglų (Naujoji Zelandija) Language_en_SA=Anglų (Saudo Arabija) +Language_en_SG=English (Singapore) Language_en_US=Anglų (JAV) Language_en_ZA=Anglų (Pietų Afrika) Language_es_ES=Ispanų @@ -29,6 +33,7 @@ Language_es_CL=Ispanų (Čilė) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Ispanų (Hondūras) Language_es_MX=Ispanų (Meksika) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Ispanų (Paragvajus) Language_es_PE=Ispanų (Peru) Language_es_PR=Ispanų (Puerto Rikas) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estijos Language_eu_ES=Baskų @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Prancūzų (Belgija) Language_fr_CA=Prancūzų (Kanada) Language_fr_CH=Prancūzų (Šveicarija) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Prancūzų +Language_fr_GA=French (Gabon) Language_fr_NC=Prancūzų (Naujoji Kaledonija) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrajų +Language_hi_IN=Hindi (India) Language_hr_HR=Kroatijos Language_hu_HU=Vengrų Language_id_ID=Indonesian Language_is_IS=Islandų Language_it_IT=Italijos +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japonijos Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvijos Language_mk_MK=Makedonijos Language_mn_MN=Mongolian Language_nb_NO=Norvegų (knyginė) +Language_ne_NP=Nepali Language_nl_BE=Olandų (Belgija) Language_nl_NL=Dutch Language_pl_PL=Lenkijos @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbekų Language_vi_VN=Vietnamo Language_zh_CN=Kinijos Language_zh_TW=Kinų (Tradicinė) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/lt_LT/mails.lang b/htdocs/langs/lt_LT/mails.lang index ac1348c61ed..485609c9c59 100644 --- a/htdocs/langs/lt_LT/mails.lang +++ b/htdocs/langs/lt_LT/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Informacija ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/lt_LT/main.lang b/htdocs/langs/lt_LT/main.lang index f4c96047de6..52ee700de75 100644 --- a/htdocs/langs/lt_LT/main.lang +++ b/htdocs/langs/lt_LT/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Vnt. kaina (su PVM) Amount=Suma AmountInvoice=Sąskaitos-faktūros suma AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Mokėjimo suma AmountHTShort=Amount (excl.) AmountTTCShort=Suma (su PVM) @@ -485,6 +485,7 @@ Categories=Žymės / kategorijos Category=Žymė / Kategorija By=Pagal From=Nuo +FromDate=Pardavėjas FromLocation=Pardavėjas to=į To=į @@ -687,6 +688,7 @@ Method=Metodas Receive=Gauti CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Dalinis TotalWoman=Visas NeverReceived=Niekada negautas @@ -703,6 +705,7 @@ MenuECM=Dokumentai MenuAWStats=AWStats MenuMembers=Nariai MenuAgendaGoogle=Google operacijos +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr apribojimas (Meniu Pagrindinis-Nustatymai-Saugumas): %s kb, PHP apribojimas: %s kb NoFileFound=Šiame kataloge nėra išsaugotų dokumentų CurrentUserLanguage=Dabartinė vartojama kalba @@ -725,7 +728,7 @@ Page=Puslapis Notes=Pastabos AddNewLine=Pridėti naują eilutę AddFile=Pridėti failą -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Klonuoti objektą su savo pagrindiniais atributais ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=Ke ShortFriday=Pe ShortSaturday=Še ShortSunday=Se +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informacija +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/lt_LT/members.lang b/htdocs/langs/lt_LT/members.lang index 71838d720d7..ebe886d722e 100644 --- a/htdocs/langs/lt_LT/members.lang +++ b/htdocs/langs/lt_LT/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Projektiniai nariai MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Galiojantis +SubscriptionNotNeeded=No subscription needed NewCotisation=Nauja įmoka PaymentSubscription=Naujas įmokos mokėjimas SubscriptionEndDate=Pasirašymo pabaigos data @@ -78,7 +81,7 @@ DeleteType=Ištrinti VoteAllowed=Balsuoti leidžiama Physical=Fizinis Moral=Moralinis -MorPhy=Moralinis/Fizinis +MorPhy=Prigimtis Reenable=Įjungti vėl ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/lt_LT/mrp.lang b/htdocs/langs/lt_LT/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/lt_LT/mrp.lang +++ b/htdocs/langs/lt_LT/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/lt_LT/other.lang b/htdocs/langs/lt_LT/other.lang index a85a056879d..7e6a654fefa 100644 --- a/htdocs/langs/lt_LT/other.lang +++ b/htdocs/langs/lt_LT/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/lt_LT/products.lang b/htdocs/langs/lt_LT/products.lang index 09e164fc556..3bd7e2542f7 100644 --- a/htdocs/langs/lt_LT/products.lang +++ b/htdocs/langs/lt_LT/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Nustatyti brūkšninio kodo tipą BarcodeValue=Brūkšninio kodo reikšmė NoteNotVisibleOnBill=Pastaba (nematoma ant sąskaitų-faktūrų, pasiūlymų ...) ServiceLimitedDuration=Jei produktas yra paslauga su ribota trukme: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Kainų skaičius DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Kilmės šalis Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Vienetas p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Naujas atributas NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/lt_LT/projects.lang b/htdocs/langs/lt_LT/projects.lang index 3cd450c5669..32e8539171e 100644 --- a/htdocs/langs/lt_LT/projects.lang +++ b/htdocs/langs/lt_LT/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Aukotojas TypeContact_project_task_external_TASKCONTRIBUTOR=Straipsnio autorius SelectElement=Pasirinkti elementą AddElement=Susieti su elementu +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/lt_LT/recruitment.lang b/htdocs/langs/lt_LT/recruitment.lang new file mode 100644 index 00000000000..758281511ed --- /dev/null +++ b/htdocs/langs/lt_LT/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Apie +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/lt_LT/stocks.lang b/htdocs/langs/lt_LT/stocks.lang index e07e54024b4..00b0a4e804d 100644 --- a/htdocs/langs/lt_LT/stocks.lang +++ b/htdocs/langs/lt_LT/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Ištrinti siuntimą Stock=Atsargos Stocks=Atsargos MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Realios atsargos RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtualios atsargos -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Sandėlio ID DescWareHouse=Sandėlio aprašymas LieuWareHouse=Sandėlio vieta WarehousesAndProducts=Sandėliai ir produktai WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Vidutinė svertinė įvedimo kaina -AverageUnitPricePMP=Vidutinė svertinė įvedimo kaina +AverageUnitPricePMPShort=Vidutinė svertinė kaina +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Vieneto pardavimo kaina EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Papildymai NbOfProductBeforePeriod=Produkto %s kiekis atsargose iki pasirinkto periodo (< %s) NbOfProductAfterPeriod=Produkto %s kiekis sandėlyje po pasirinkto periodo (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Pasirinkite produktą, kiekį, sandėlį šaltinį ir galutinį sandėlį, tada spauskite "%s". Kai tai bus padaryta visiems reikiamiems judėjimams, spauskite "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Įplaukos už šį užsakymą StockMovementRecorded=Įrašyti atsargų judėjimai @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/lt_LT/suppliers.lang b/htdocs/langs/lt_LT/suppliers.lang index acd6057e466..caa879a115a 100644 --- a/htdocs/langs/lt_LT/suppliers.lang +++ b/htdocs/langs/lt_LT/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Kai kurie subproduktai neturi apibrėžtos kainos AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Šis nuorodytas tiekėjas jau yra susietas su nuoroda: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Prieinamumas -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Patvirtinti šį užsakymą ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Atmesti šį užsakymą @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Išėmimo failas +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Nustatyti būklę "Failas išsiųstas" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Eilučių būklės statistika @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Suma:%s
    Metodas:%s
    Data:%s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Opcija realiam režimui nebuvo nustatyta, sustabdyta po šios simuliacijos +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/lt_LT/workflow.lang b/htdocs/langs/lt_LT/workflow.lang index 8f890cc26a4..0f340b1be9a 100644 --- a/htdocs/langs/lt_LT/workflow.lang +++ b/htdocs/langs/lt_LT/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow modulio nustatymas -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/lt_LT/zapier.lang b/htdocs/langs/lt_LT/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/lt_LT/zapier.lang +++ b/htdocs/langs/lt_LT/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/lv_LV/accountancy.lang b/htdocs/langs/lv_LV/accountancy.lang index 6b4ba7ad572..11ee0f767a8 100644 --- a/htdocs/langs/lv_LV/accountancy.lang +++ b/htdocs/langs/lv_LV/accountancy.lang @@ -111,7 +111,7 @@ CreateMvts=Izveidot jaunu darījumu UpdateMvts=Darījuma grozīšana ValidTransaction=Apstipriniet darījumu WriteBookKeeping=Reģistrēt darījumus Ledger -Bookkeeping=Ledger +Bookkeeping=Grāmatvedis AccountBalance=Konta bilance ObjectsRef=Avota objekta ref CAHTF=Kopējais pirkuma pārdevējs pirms nodokļu nomaksas @@ -149,11 +149,12 @@ ACCOUNTING_MANAGE_ZERO=Atļaujiet pārvaldīt atšķirīgu skaitu nulles grāmat BANK_DISABLE_DIRECT_INPUT=Atspējot tiešu darījumu reģistrāciju bankas kontā ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Iespējot eksporta projektu žurnālā ACCOUNTANCY_COMBO_FOR_AUX=Iespējot kombinēto sarakstu papildu kontam (var būt lēni, ja jums ir daudz trešo personu) +ACCOUNTING_DATE_START_BINDING=Definējiet datumu, lai sāktu iesiešanu un pārskaitīšanu grāmatvedībā. Zem šī datuma darījumi netiks pārnesti uz grāmatvedību. ACCOUNTING_SELL_JOURNAL=Pārdošanas žurnāls ACCOUNTING_PURCHASE_JOURNAL=Pirkuma žurnāls ACCOUNTING_MISCELLANEOUS_JOURNAL=Dažādi žurnāli -ACCOUNTING_EXPENSEREPORT_JOURNAL=Expense report journal +ACCOUNTING_EXPENSEREPORT_JOURNAL=Izdevumu atskaites žurnāls ACCOUNTING_SOCIAL_JOURNAL=Sociālais žurnāls ACCOUNTING_HAS_NEW_JOURNAL=Vai jauns Vēstnesis? @@ -284,6 +285,7 @@ ShowTutorial=Rādīt apmācību NotReconciled=Nesaskaņots ## Admin +BindingOptions=Iesiešanas iespējas ApplyMassCategories=Pielietot masu sadaļas AddAccountFromBookKeepingWithNoCategories=Pieejamais konts vēl nav personalizētajā grupā CategoryDeleted=Grāmatvedības konta kategorija ir noņemta @@ -307,7 +309,7 @@ NumberOfAccountancyMovements=Pārvietošanas skaits ## Export ExportDraftJournal=Eksporta žurnāla projekts Modelcsv=Eksporta modulis -Selectmodelcsv=Select a model of export +Selectmodelcsv=Atlasiet eksporta modeli Modelcsv_normal=Klasiskais eksports Modelcsv_CEGID=Eksports uz CEGID ekspertu kompāniju Modelcsv_COALA=Eksportēt Sage Coala diff --git a/htdocs/langs/lv_LV/admin.lang b/htdocs/langs/lv_LV/admin.lang index bdb4cca4796..9eb0b87e3e2 100644 --- a/htdocs/langs/lv_LV/admin.lang +++ b/htdocs/langs/lv_LV/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Noklusējuma sūtītāja e-pasta ziņojums manuālai UserEmail=Lietotāja e-pasts CompanyEmail=Uzņēmuma e-pasts FeatureNotAvailableOnLinux=Funkcija nav pieejams Unix tipa sistēmās. Pārbaudi savu sendmail programmu lokāli. +FixOnTransifex=Fiksējiet tulkojumu projekta tiešsaistes tulkošanas platformā SubmitTranslation=Ja šīs valodas tulkojums nav pilnīgs vai Jūs atradīsiet kļūdas, varat to labot, rediģējot failus direktorijā langs/%s un iesniedzot izmaiņas vietnē www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Ja šīs valodas tulkojums nav pilnīgs vai atrodat kļūdas, varat to labot, rediģējot failus direktorijā langs / %s un iesniedziet modificētus failus dolibarr.org/forum vai izstrādātājiem vietnē github.com/ Dolibarr / dolibarr. +SubmitTranslationENUS=Ja šīs valodas tulkojums nav pabeigts vai atrodat kļūdas, labojiet to, rediģējot failus direktorijā langs / %s un iesniedziet modificētus failus vietnē dolibarr.org/forum vai, ja esat izstrādātājs, ar PR vietni github. .com / Dolibarr / dolibarr ModuleSetup=Moduļa iestatīšana ModulesSetup=Moduļu/Aplikāciju iestatīšana ModuleFamilyBase=Sistēma @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modulim %s jābūt aktivizētam vispirms, ja jū SecurityToken=Atslēga uz drošu saiti NoSmsEngine=Nav pieejams neviens SMS sūtītāja pārvaldnieks. SMS sūtītāja pārvaldnieks nav instalēts ar noklusējuma izplatīšanu, jo tie ir atkarīgi no ārēja piegādātāja, bet jūs varat atrast kādu no %s PDF=PDF -PDFDesc=Globālās iespējas PDF ģenerēšanai. -PDFAddressForging=Adreses lodziņu noteikumi +PDFDesc=Globālās iespējas PDF ģenerēšanai +PDFAddressForging=Noteikumi par adreses sadaļu HideAnyVATInformationOnPDF=Slēpt visu informāciju, kas saistīta ar pārdošanas nodokli / PVN PDFRulesForSalesTax=Pārdošanas nodokļa / PVN noteikumi PDFLocaltax=Noteikumi par %s -HideLocalTaxOnPDF=Paslēpt %s likmi slejā Nodokļu pārdošana +HideLocalTaxOnPDF=Paslēpt %s likmi kolonnā Pārdošanas nodoklis / PVN HideDescOnPDF=Paslēpt produktu aprakstu HideRefOnPDF=Slēpt produktu ref. HideDetailsOnPDF=Slēpt informāciju par produktu līnijām @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Pārveidot par cenām ar bāzes atsauces vērtību, kas de MassConvert=Uzsākt lielapjoma reklāmguvumu PriceFormatInCurrentLanguage=Cenas formāts pašreizējā valodā String=Rinda +String1Line=Stīga (1 līnija) TextLong=Garš teksts +TextLongNLines=Garš teksts (n rindiņas) HtmlText=Html teksts Int=Vesels skaitlis Float=Peldēt @@ -544,8 +547,8 @@ Module55Name=Svītrkodi Module55Desc=Svītrkodu vadība Module56Name=Maksājums ar pārskaitījumu Module56Desc=Piegādātāju norēķinu vadīšana ar kredīta pārveduma rīkojumiem. Tas ietver SEPA faila ģenerēšanu Eiropas valstīm. -Module57Name=Bankas tiešā debeta maksājumi -Module57Desc=Tiešā debeta maksājuma uzdevumu pārvaldīšana. Tas ietver SEPA datnes izveidi Eiropas valstīm. +Module57Name=Maksājumi ar tiešo debetu +Module57Desc=Tiešā debeta rīkojumu vadība. Tas ietver SEPA faila ģenerēšanu Eiropas valstīm. Module58Name=NospiedLaiSavienotos Module58Desc=Integrācija ar ClickToDial sistēmas (zvaigznīte, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Izveidot/mainīt pakalpojumus Permission534=Dzēst pakalpojumus Permission536=Skatīt/vadīt slēptos pakalpojumus Permission538=Eksportēt pakalpojumus +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Lasīt materiālu rēķinus Permission651=Izveidot / atjaunināt materiālu rēķinus Permission652=Dzēst materiālu rēķinus +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Lasīt ziedojumus Permission702=Izveidot/mainīt ziedojumus Permission703=Dzēst ziedojumus @@ -848,6 +858,8 @@ Permission773=Dzēst izdevumu pārskatus Permission774=Read all expense reports (even for user not subordinates) Permission775=Apstiprināt izdevumu pārskatus Permission776=Apmaksāt izdevumu pārskatus +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Eksportēt izdevumu atskaites Permission1001=Lasīt krājumus Permission1002=Izveidot/labot noliktavas @@ -900,6 +912,7 @@ Permission2515=Iestatīt dokumentu direktorijas Permission2801=Lietot FTP klientu lasīšanas režīmā (pārlūko un lejupielādē) Permission2802=Lietot FTP klientu rakstīšanas režīmā (dzēst vai augšupielādēt failus) Permission3200=Lasīt arhivētos notikumus un pirkstu nospiedumus +Permission3301=Generate new modules Permission4001=Skatīt darbiniekus Permission4002=Izveidot darbiniekus Permission4003=Dzēst darbiniekus @@ -947,7 +960,8 @@ Permission63003=Dzēst resursus Permission63004=Saistīt resursus ar darba kārtības pasākumiem DictionaryCompanyType=Trešās puses veidi DictionaryCompanyJuridicalType=Trešo pušu juridiskās personas -DictionaryProspectLevel=Prospect potenciālu +DictionaryProspectLevel=Perspektējiet potenciālo līmeni uzņēmumiem +DictionaryProspectContactLevel=Paredziet potenciālo kontaktu līmeni DictionaryCanton=Valstis/provinces DictionaryRegion=Reģions DictionaryCountry=Valstis @@ -977,7 +991,8 @@ DictionaryEMailTemplates=E-pasta veidnes DictionaryUnits=Vienības DictionaryMeasuringUnits=Mērvienības DictionarySocialNetworks=Sociālie tīkli -DictionaryProspectStatus=Prospekta statuss +DictionaryProspectStatus=Prospekta statuss uzņēmumiem +DictionaryProspectContactStatus=Prospekta statuss kontaktiem DictionaryHolidayTypes=Atvaļinājumu veidi DictionaryOpportunityStatus=Vadošais statuss projektu / vadībai DictionaryExpenseTaxCat=Izdevumu pārskats - transporta kategorijas @@ -1076,7 +1091,7 @@ LoginPage=Pieteikšanās lapa BackgroundImageLogin=Fona attēls PermanentLeftSearchForm=Pastāvīgā meklēšanas forma kreisajā izvēlnē DefaultLanguage=Noklusējuma valoda -EnableMultilangInterface=Iespējot daudzvalodu atbalstu +EnableMultilangInterface=Iespējojiet daudzvalodu atbalstu klientu vai pārdevēju attiecībām EnableShowLogo=Izvēlnē attēlot uzņēmuma logotipu CompanyInfo=Uzņēmums / organizācija CompanyIds=Uzņēmuma / organizācijas identitāte @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Vismaz atslēgas vai tulkošanas virknei NewTranslationStringToShow=Jauna tulkošanas virkne, lai parādītu OriginalValueWas=Oriģinālais tulkojums ir pārrakstīts. Sākotnējā vērtība bija:

    %s TransKeyWithoutOriginalValue=Jūs piespiedāt jaunu tulkojumu tulkošanas taustiņam " %s", kas nav nevienā valodas failā -TotalNumberOfActivatedModules=Aktivizētā programma/moduļi: %s / %s +TitleNumberOfActivatedModules=Aktivizētie moduļi +TotalNumberOfActivatedModules=Aktivizētie moduļi: %s / %s YouMustEnableOneModule=Jums ir jābūt ieslēgtam vismaz 1 modulim ClassNotFoundIntoPathWarning=Klase %s nav atrodama PHP ceļā YesInSummer=Jā vasarā @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Izmantojiet notikumu tipus (tiek pārvaldīti izvēlnē Ie AGENDA_USE_EVENT_TYPE_DEFAULT=Veidojot notikuma veidlapu, automātiski iestatiet šo noklusējuma vērtību AGENDA_DEFAULT_FILTER_TYPE=Šādu pasākumu automātiski iestatīt darba kārtības skatā meklēšanas filtūrā AGENDA_DEFAULT_FILTER_STATUS=Automātiski iestatīt šo statusu notikumu skatīšanai darba filtru meklēšanas filtūrā -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Kuru skatu vēlaties atvērt pēc noklusējuma, izvēloties izvēlni Agenda AGENDA_REMINDER_EMAIL=Iespējot notikumu atgādinājumu pa e-pastu (atgādinājums par iespēju / kavēšanos var definēt katrā notikumā). Piezīme: modulis %s ir jāaktivizē un pareizi jāiestata, lai atgādinājums tiktu nosūtīts pareizā laikā. AGENDA_REMINDER_BROWSER=Iespējot notikuma atgādinājumu lietotāja pārlūkā (kad ir sasniegts notikuma datums, katrs lietotājs to var noraidīt no pārlūka apstiprinājuma jautājuma) AGENDA_REMINDER_BROWSER_SOUND=Iespējot skaņas paziņojumu @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Parādīt saistīto objektu darba kārtībā ##### Clicktodial ##### ClickToDialSetup=Klikšķiniet lai Dial moduļa uzstādīšanas ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=Šis modulis ļauj noklikšķināt uz numuriem, uz kuriem var noklikšķināt. Noklikšķinot uz ikonas, tālrunis zvanīs uz numuru. To var izmantot, lai izsauktu zvanu centra sistēmu no Dolibarr, kas var izsaukt tālruņa numuru, piemēram, SIP sistēmā. +ClickToDialDesc=Šis modulis maina tālruņu numurus, izmantojot galddatoru, uz noklikšķināmām saitēm. Klikšķis piezvanīs uz numuru. To var izmantot, lai sāktu tālruņa zvanu, kad, izmantojot darbvirsmu, izmantojat mīksto tālruni vai, piemēram, izmantojot CTI sistēmu, kuras pamatā ir SIP protokols. Piezīme. Izmantojot viedtālruni, uz tālruņu numuriem vienmēr var noklikšķināt. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Izmantojiet šo metodi, ja jūsu lietotājiem ir programmatūras tālrunis vai programmatūras interfeiss, kas uzstādīts uz tā paša datora kā pārlūks, un tiek izsaukts, kad jūs noklikšķināt uz savas pārlūkprogrammas saites, kas sākas ar "tel:". Ja jums ir nepieciešams pilnīgs servera risinājums (nav nepieciešama lokālā programmatūras instalēšana), jums tas jādara, lai tas būtu "nē" un aizpildītu nākamo lauku. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Ievadiet 0 vai 1 UnicodeCurrency=Ievadiet šeit starp aplikācijām, baitu skaitļu sarakstu, kas attēlo valūtas simbolu. Piemēram: attiecībā uz $ ievadiet [36] - Brazīlijas reālajam R $ [82,36] - par € ievadiet [8364] ColorFormat=RGB krāsa ir HEX formātā, piemēram: FF0000 +PictoHelp=Ikonas nosaukums dolibarr formātā ('image.png', ja pašreizējā motīvu direktorijā, 'image.png@nom_du_module', ja moduļa direktorijā / img /) PositionIntoComboList=Līnijas novietojums kombinētajos sarakstos SellTaxRate=Pārdošanas nodokļa likme RecuperableOnly=Jā par PVN "Neuztverams, bet atgūstams", kas paredzēts dažai Francijas valstij. Uzturiet vērtību "Nē" visos citos gadījumos. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Cenas pieprasījums MailToSendSupplierOrder=Pirkuma pasūtījumi MailToSendSupplierInvoice=Piegādātāja rēķini MailToSendContract=Līgumi +MailToSendReception=Pieņemšanas MailToThirdparty=Trešās puses MailToMember=Dalībnieki MailToUser=Lietotāji @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s ir pieejams. Versija % ExampleOfNewsMessageForMaintenanceRelease=Ir pieejams Dolibarr ERP & CRM %s. Versija %s ir apkopes versija, tāpēc tajā ir tikai kļūdu labojumi. Mēs iesakām visiem lietotājiem jaunināt uz šo versiju. Tehniskās apkopes izdevums neievieš jaunas funkcijas vai izmaiņas datubāzē. To var lejupielādēt no https://www.dolibarr.org portāla lejupielādes apgabala (apakšdirektorija Stabilas versijas). Lai iegūtu pilnīgu izmaiņu sarakstu, varat izlasīt ChangeLog . MultiPriceRuleDesc=Ja ir iespējota opcija "Vairāki cenu līmeņi uz produktu / pakalpojumu", katram produktam varat noteikt dažādas cenas (vienu cenu līmenī). Lai ietaupītu laiku, šeit jūs varat ievadīt noteikumu, lai automātiski aprēķinātu cenu katram līmenim, pamatojoties uz pirmā līmeņa cenu, tāpēc katram produktam būs jāievada tikai pirmā līmeņa cena. Šī lapa ir izstrādāta, lai ietaupītu jūsu laiku, taču tā ir noderīga tikai tad, ja jūsu cenas katram līmenim ir saistītas ar pirmo līmeni. Vairumā gadījumu šo lapu varat ignorēt. ModelModulesProduct=Veidlapas produktu dokumentos +WarehouseModelModules=Noliktavu dokumentu paraugi ToGenerateCodeDefineAutomaticRuleFirst=Lai varētu automātiski ģenerēt kodus, vispirms jādefinē pārvaldnieks, lai automātiski definētu svītrkoda numuru. SeeSubstitutionVars=Iespējamo aizvietojošo mainīgo sarakstu skatīt * piezīmē SeeChangeLog=Skatīt ChangeLog failu (tikai angļu valodā) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Kreisā puse PDF failā MAIN_PDF_MARGIN_RIGHT=Labā puse PDF failā MAIN_PDF_MARGIN_TOP=Galvene PDF failā MAIN_PDF_MARGIN_BOTTOM=Kājene PDF failā +MAIN_DOCUMENTS_LOGO_HEIGHT=Logotipa augstums PDF formātā NothingToSetup=Šim modulim nav nepieciešama īpaša iestatīšana. SetToYesIfGroupIsComputationOfOtherGroups=Iestatiet to uz "jā", ja šī grupa ir citu grupu aprēķins EnterCalculationRuleIfPreviousFieldIsYes=Ievadiet aprēķina kārtulu, ja iepriekšējais lauks ir iestatīts uz Jā (Piemēram, 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nekas nav paveikts XEmailsDoneYActionsDone=%s kvalificēti e-pasta ziņojumi, %s veiksmīgi apstrādāti e-pasta ziņojumi (par %s ierakstu / veiktajām darbībām) RecordEvent=Ierakstiet e-pasta notikumu CreateLeadAndThirdParty=Izveidot vadību (un, ja nepieciešams, trešo personu) -CreateTicketAndThirdParty=Izveidot biļeti (un, ja nepieciešams, trešo personu) +CreateTicketAndThirdParty=Izveidot biļeti (un saiti uz trešo personu, ja tā ir ielādēta iepriekšējās operācijas laikā) CodeLastResult=Jaunākais rezultātu kods NbOfEmailsInInbox=E-pasta ziņojumu skaits avota direktorijā LoadThirdPartyFromName=Ielādējiet trešo personu meklēšanu pakalpojumā %s (tikai ielāde) LoadThirdPartyFromNameOrCreate=Ielādējiet trešo personu meklēšanu pakalpojumā %s (izveidojiet, ja nav atrasts) -WithDolTrackingID=Dolibarr atsauce atrodama ziņojuma ID -WithoutDolTrackingID=Ziņojuma ID nav atrasta Dolibarr atsauce +WithDolTrackingID=Ziņojums no sarunas, kuru aizsāka pirmais e-pasts, kas nosūtīts no Dolibarr +WithoutDolTrackingID=Ziņojums no sarunas, kuru aizsāka pirmais e-pasts, kuru NAV nosūtīts no Dolibarr +CreateCandidature=Izveidojiet kandidatūru FormatZip=Pasta indekss MainMenuCode=Izvēlnes ievades kods (mainmenu) ECMAutoTree=Rādīt automātisko ECM koku @@ -1981,7 +2002,7 @@ ImportSetup=Moduļa importēšanas iestatīšana InstanceUniqueID=Unikāls gadījuma ID SmallerThan=Mazāks nekā LargerThan=Lielāks nekā -IfTrackingIDFoundEventWillBeLinked=Ņemiet vērā, ka, ja ienākošajā e-pastā tiek atrasts izsekošanas ID, notikums tiks automātiski saistīts ar saistītajiem objektiem. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Izmantojot GMail kontu, ja esat iespējojis 2 soļu validāciju, ieteicams izveidot īpašu lietojumprogrammas otro paroli, nevis izmantot sava konta caurlaides paroli no https://myaccount.google.com/. EmailCollectorTargetDir=Vēlama rīcība var būt e-pasta pārvietošana citā tagā / direktorijā, kad tas tika veiksmīgi apstrādāts. Vienkārši šeit iestatiet direktorijas nosaukumu, lai izmantotu šo funkciju (nelietojiet nosaukumā īpašās rakstzīmes). Ņemiet vērā, ka jāizmanto arī lasīšanas / rakstīšanas pieteikšanās konts. EmailCollectorLoadThirdPartyHelp=Varat izmantot šo darbību, lai izmantotu e-pasta saturu, lai atrastu un ielādētu esošu trešo personu savā datu bāzē. Atrasta (vai izveidota) trešā puse tiks izmantota sekojošām darbībām, kurām tā nepieciešama. Parametru laukā varat izmantot, piemēram, 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)', ja vēlaties iegūt trešās puses vārdu no atrastās virknes 'Name: name to find'. ķermenis. @@ -2005,3 +2026,7 @@ RssNote=Piezīme. Katra RSS plūsmas definīcija nodrošina logrīku, kas jums j JumpToBoxes=Pāriet uz Iestatīšana -> logrīki MeasuringUnitTypeDesc=Šeit izmantojiet tādas vērtības kā "lielums", "virsma", "tilpums", "svars", "laiks" MeasuringScaleDesc=Skala ir to vietu skaits, kuras jums jāpārvieto aiz komata, lai atbilstu noklusējuma atsauces vienībai. "Laika" vienības tipam tas ir sekunžu skaits. Vērtības no 80 līdz 99 ir rezervētas vērtības. +TemplateAdded=Pievienota veidne +TemplateUpdated=Veidne ir atjaunināta +TemplateDeleted=Veidne ir izdzēsta +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/lv_LV/agenda.lang b/htdocs/langs/lv_LV/agenda.lang index 56e7da23660..43e497ee2d1 100644 --- a/htdocs/langs/lv_LV/agenda.lang +++ b/htdocs/langs/lv_LV/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Notikumu skaits ListOfActions=Notikumu saraksts EventReports=Pasākumu atskaites Location=Atrašanās vieta -ToUserOfGroup=Jebkuram grupas lietotājam +ToUserOfGroup=Notikums piešķirts jebkuram grupas lietotājam EventOnFullDay=Notikums visu -ām dienu -ām MenuToDoActions=Visi nepabeigtie pasākumi MenuDoneActions=Visi izbeigtie notikumi @@ -86,6 +86,8 @@ ProposalDeleted=Piedāvājums dzēsts OrderDeleted=Pasūtījums dzēsts InvoiceDeleted=Rēķins dzēsts DraftInvoiceDeleted=Rēķina melnraksts ir izdzēsts +CONTACT_CREATEInDolibarr=Kontaktpersona %s ir izveidota +CONTACT_DELETEInDolibarr=Kontaktpersona %s ir izdzēsta PRODUCT_CREATEInDolibarr=Produkts %s ir izveidots PRODUCT_MODIFYInDolibarr=Produkts %s ir labots PRODUCT_DELETEInDolibarr=Produkts %s dzēsts @@ -158,3 +160,9 @@ DateStartPlusOne=S'akuma datums + 1 stunda SetAllEventsToTodo=Iestatiet, lai visi notikumi tiek uzlikti SetAllEventsToInProgress=Iestatiet visus notiekošos pasākumus SetAllEventsToFinished=Iestatiet, lai visi notikumi būtu pabeigti +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/lv_LV/banks.lang b/htdocs/langs/lv_LV/banks.lang index ac3fc67c85d..4f61035b651 100644 --- a/htdocs/langs/lv_LV/banks.lang +++ b/htdocs/langs/lv_LV/banks.lang @@ -37,7 +37,7 @@ IbanValid=Derīgs BAN IbanNotValid=BAN nav derīgs StandingOrders=Tiešā debeta pasūtījumi StandingOrder=Tiešā debeta rīkojums -PaymentByDirectDebit=Payment by direct debit +PaymentByDirectDebit=Maksājums ar tiešo debetu PaymentByBankTransfers=Maksājumi ar pārskaitījumu PaymentByBankTransfer=Maksājums ar pārskaitījumu AccountStatement=Konta izraksts @@ -130,7 +130,7 @@ BankMovements=Kustība PlannedTransactions=Plānotie darījumi Graph=Grafiks ExportDataset_banque_1=Banku darījumi un konta izraksts -ExportDataset_banque_2=Deposit slip +ExportDataset_banque_2=Depozīta kvīts TransactionOnTheOtherAccount=Pārskaitījums uz otru kontu PaymentNumberUpdateSucceeded=Maksājuma numurs veiksmīgi atjaunots PaymentNumberUpdateFailed=Maksājumu numuru nevar atjaunināt diff --git a/htdocs/langs/lv_LV/bills.lang b/htdocs/langs/lv_LV/bills.lang index 1a3f66be709..8b7fb54ed1a 100644 --- a/htdocs/langs/lv_LV/bills.lang +++ b/htdocs/langs/lv_LV/bills.lang @@ -289,7 +289,7 @@ AddGlobalDiscount=Izveidot absolūto atlaidi EditGlobalDiscounts=Labot absolūtās atlaides AddCreditNote=Izveidot kredīta piezīmi ShowDiscount=Rādīt atlaidi -ShowReduc=Parādiet atlaidi +ShowReduc=Parādīt atlaidi ShowSourceInvoice=Parādiet avota rēķinu RelativeDiscount=Relatīva atlaide GlobalDiscount=Globālā atlaide @@ -369,7 +369,7 @@ FrequencyUnit=Frekvences vienība toolTipFrequency=Piemēri:
    Iestatīt 7, Diena : piešķirt jaunu rēķinu ik pēc 7 dienām
    Iestatīt 3, mēnesi : piešķirt jaunu rēķinu reizi 3 mēnešos NextDateToExecution=Nākamās rēķina izveidošanas datums NextDateToExecutionShort=Datums nākamais gen. -DateLastGeneration=Date of latest generation +DateLastGeneration=Jaunākais veidošanas datums DateLastGenerationShort=Datuma pēdējais gen. MaxPeriodNumber=Maks. rēķinu veidošanas skaits NbOfGenerationDone=Rēķina paaudzes skaits jau ir pabeigts @@ -505,7 +505,7 @@ ToMakePayment=Maksāt ToMakePaymentBack=Atmaksāt ListOfYourUnpaidInvoices=Saraksts ar neapmaksātiem rēķiniem NoteListOfYourUnpaidInvoices=Piezīme: Šis saraksts satur tikai rēķinus par trešo pušu Jums ir saistīti ar kā pārdošanas pārstāvis. -RevenueStamp=Nodokļa zīmogs +RevenueStamp=Nodokļu zīmogs YouMustCreateInvoiceFromThird=Šī opcija ir pieejama tikai tad, ja izveidojat rēķinu no trešās personas cilnes "Klients" YouMustCreateInvoiceFromSupplierThird=Šī opcija ir pieejama tikai tad, ja izveidojat rēķinu no trešās puses cilnes „Pārdevējs” YouMustCreateStandardInvoiceFirstDesc=Vispirms vispirms jāizveido standarta rēķins un jāpārveido tas par "veidni", lai izveidotu jaunu veidnes rēķinu diff --git a/htdocs/langs/lv_LV/boxes.lang b/htdocs/langs/lv_LV/boxes.lang index 4ad1e26d651..88d7803c340 100644 --- a/htdocs/langs/lv_LV/boxes.lang +++ b/htdocs/langs/lv_LV/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Jaunākie %s reģistrēti piegādātāji BoxTitleLastModifiedSuppliers=Pārdevēji: pēdējais %s labotais BoxTitleLastModifiedCustomers=Klienti: pēdējais %s labotais BoxTitleLastCustomersOrProspects=Jaunākie %s klienti vai perspektīvas -BoxTitleLastCustomerBills=Jaunākie %s klientu rēķini -BoxTitleLastSupplierBills=Jaunākie %s pārdevēju rēķini +BoxTitleLastCustomerBills=Jaunākie %s modificētie klientu rēķini +BoxTitleLastSupplierBills=Jaunākie %s modificētie pārdevēja rēķini BoxTitleLastModifiedProspects=Perspektīvas: pēdējais %s modificēts BoxTitleLastModifiedMembers=Jaunākie %s dalībnieki BoxTitleLastFicheInter=Jaunākās %s izmaiņas iejaukšanās @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Pārdevēja pasūtījumi: pēdējais %s mod BoxTitleLastModifiedCustomerBills=Klienta rēķini: pēdējie %s modificēti BoxTitleLastModifiedCustomerOrders=Pārdošanas pasūtījumi: pēdējais %s modificēts BoxTitleLastModifiedPropals=Pēdējie %s labotie priekšlikumi +BoxTitleLatestModifiedJobPositions=Jaunākie %s pārveidotie darbi +BoxTitleLatestModifiedCandidatures=Jaunākās %s modificētās kandidatūras ForCustomersInvoices=Klientu rēķini ForCustomersOrders=Klientu pasūtījumi ForProposals=Priekšlikumi @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Apturēšanas konts nav definēts BoxLastCustomerShipments=Pēdējo klientu sūtījumi BoxTitleLastCustomerShipments=Jaunākie %s klientu sūtījumi NoRecordedShipments=Nav reģistrēts klienta sūtījums +# Pages +AccountancyHome=Grāmatvedība diff --git a/htdocs/langs/lv_LV/cashdesk.lang b/htdocs/langs/lv_LV/cashdesk.lang index a46e6edc72b..773bfdf4601 100644 --- a/htdocs/langs/lv_LV/cashdesk.lang +++ b/htdocs/langs/lv_LV/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS modulis BasicPhoneLayout=Izmantojiet telefonu pamata izkārtojumu SetupOfTerminalNotComplete=Termināļa %s iestatīšana nav pabeigta DirectPayment=Tiešais maksājums -DirectPaymentButton=Poga Tiešais naudas maksājums +DirectPaymentButton=Pievienojiet pogu “Tiešais maksājums skaidrā naudā” InvoiceIsAlreadyValidated=Rēķins jau ir apstiprināts NoLinesToBill=Nav rēķinu CustomReceipt=Pielāgota kvīts @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Ārējs modulis ar papildu funkcijām. Iespēj PrintMethod=Drukas metode ReceiptPrinterMethodDescription=Jaudīga metode ar daudziem parametriem. Pilnībā pielāgojams ar veidnēm. Nevar izdrukāt no mākoņa. ByTerminal=Ar termināli -TakeposNumpadUsePaymentIcon=Izmantojiet maksājuma ikonu uz numpad +TakeposNumpadUsePaymentIcon=Izmantojiet ikonu, nevis tekstu uz numpad numura maksāšanas pogām CashDeskRefNumberingModules=Numerācijas modulis tirdzniecības vietu tirdzniecībai CashDeskGenericMaskCodes6 =  
    {TN} tagu izmanto, lai pievienotu termināļa numuru TakeposGroupSameProduct=Grupējiet tās pašas produktu līnijas StartAParallelSale=Sāciet jaunu paralēlu izpārdošanu -ControlCashOpening=Kontrolējiet kasi, atverot poz +ControlCashOpening=Kontrolējiet kases atvēršanu kasē CloseCashFence=Aizveriet naudas žogu CashReport=Skaidras naudas pārskats MainPrinterToUse=Galvenais izmantojamais printeris @@ -112,8 +112,13 @@ RestaurantMenu=Izvēlne CustomerMenu=Klientu izvēlne ScanToMenu=Lai redzētu izvēlni, skenējiet QR kodu ScanToOrder=Skenējiet QR kodu, lai pasūtītu -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +Appearance=Izskats +HideCategoryImages=Slēpt kategorijas attēlus +HideProductImages=Slēpt produktu attēlus +NumberOfLinesToShow=Parādāmo attēlu līniju skaits +DefineTablePlan=Definējiet tabulu plānu +GiftReceiptButton=Pievienojiet pogu Dāvanu kvīts +GiftReceipt=Dāvanu kvīts +ModuleReceiptPrinterMustBeEnabled=Vispirms jābūt iespējotam moduļa saņemšanas printerim +AllowDelayedPayment=Atļaut kavētu maksājumu +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/lv_LV/companies.lang b/htdocs/langs/lv_LV/companies.lang index 824b0faf525..58d83a7fb6a 100644 --- a/htdocs/langs/lv_LV/companies.lang +++ b/htdocs/langs/lv_LV/companies.lang @@ -24,7 +24,7 @@ ThirdPartyContact=Trešās puses kontaktpersona/adrese Company=Uzņēmums CompanyName=Uzņēmuma nosaukums AliasNames=Pseidonīms (komerciāls, preču zīme, ...) -AliasNameShort=Alias ​​vārds +AliasNameShort=Pseidonīma nosaukums Companies=Uzņēmumi CountryIsInEEC=Valsts atrodas Eiropas Ekonomikas kopienā PriceFormatInCurrentLanguage=Cenu attēlošanas formāts pašreizējā valodā un valūtā diff --git a/htdocs/langs/lv_LV/compta.lang b/htdocs/langs/lv_LV/compta.lang index 2e3ca1e5d05..a4add9768be 100644 --- a/htdocs/langs/lv_LV/compta.lang +++ b/htdocs/langs/lv_LV/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Sociālais vai fiskālais nodoklis SocialContributions=Sociālie vai fiskālie nodokļi SocialContributionsDeductibles=Atskaitāmi sociālie vai fiskālie nodokļi SocialContributionsNondeductibles=Nekonkurējoši sociālie vai fiskālie nodokļi +DateOfSocialContribution=Sociālā vai fiskālā nodokļa datums LabelContrib=Marķējuma ieguldījums TypeContrib=Veida iemaksa MenuSpecialExpenses=Īpašie izdevumi diff --git a/htdocs/langs/lv_LV/contracts.lang b/htdocs/langs/lv_LV/contracts.lang index 2be687c5e7d..df3f4b80956 100644 --- a/htdocs/langs/lv_LV/contracts.lang +++ b/htdocs/langs/lv_LV/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Darbojošies pakalpojumi MenuExpiredServices=Beigušies pakalpojumi MenuClosedServices=Slēgtie pakalpojumi NewContract=Jaunu līgumu -NewContractSubscription=New contract/subscription +NewContractSubscription=Jauns līgums vai abonements AddContract=Izveidot līgmu DeleteAContract=Dzēst līgumu ActivateAllOnContract=Aktivizēt visus pakalpojumus diff --git a/htdocs/langs/lv_LV/errors.lang b/htdocs/langs/lv_LV/errors.lang index 250a96a3e73..43bb39dad54 100644 --- a/htdocs/langs/lv_LV/errors.lang +++ b/htdocs/langs/lv_LV/errors.lang @@ -6,7 +6,7 @@ NoErrorCommitIsDone=Nav kļūda, mēs apstiprinam ErrorButCommitIsDone=Kļūdas atrasta, bet mēs apstiprinājām neskatoties uz to ErrorBadEMail=E-pasts %s ir nepareizs ErrorBadUrl=Url %s ir nepareizs -ErrorBadValueForParamNotAString=Bad value for your parameter. It appends generally when translation is missing. +ErrorBadValueForParamNotAString=Jūsu parametra nepareiza vērtība. Tas parasti parādās, ja trūkst tulkojuma. ErrorLoginAlreadyExists=Lietotājs %s jau pastāv. ErrorGroupAlreadyExists=Grupa %s jau pastāv. ErrorRecordNotFound=Ierakstīt nav atrasts. @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Pārdevēja kodu nepareiza sintakse ErrorSupplierCodeRequired=Nepieciešams piegādātāja kods ErrorSupplierCodeAlreadyUsed=Pārdevēja kods jau ir izmantots ErrorBadParameters=Slikts parametrs -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Nepareizi parametri vai to nav ErrorBadValueForParameter=Nepareiza vērtība '%s' parametram '%s' ErrorBadImageFormat=Attēla failam nav atbalstītais formāts (jūsu PHP neatbalsta šīs formāta attēlu pārveidošanas funkciju) ErrorBadDateFormat=Vērtībai '%s' ir nepareizs datuma formāts @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Jaunā vērtība nevar būt vienāds ar veco ErrorFailedToValidatePasswordReset=Neizdevās reinit paroli. Var būt reinit tika izdarīts (šī saite var izmantot tikai vienu reizi). Ja tā nav, mēģiniet restartēt reinit procesu. ErrorToConnectToMysqlCheckInstance=Izveidot savienojumu ar datubāzi neizdodas. Pārbauda datu bāzes serveri (piemēram, ar mysql / mariadb, jūs varat to palaist no komandrindas ar 'sudo service mysql start'). ErrorFailedToAddContact=Neizdevās pievienot kontaktu -ErrorDateMustBeBeforeToday=Datums nevar būt lielāks kā šodien +ErrorDateMustBeBeforeToday=Datumam jābūt mazākam par šodienu +ErrorDateMustBeInFuture=Datumam jābūt lielākam nekā šodien ErrorPaymentModeDefinedToWithoutSetup=Maksājumu režīms tika noteikts rakstīt %s, bet uzstādīšana moduļa rēķins netika pabeigts, lai noteiktu informāciju, lai parādītu šo maksājumu režīmā. ErrorPHPNeedModule=Kļūda, jūsu PHP ir jābūt moduli %s uzstādītas, lai izmantotu šo funkciju. ErrorOpenIDSetupNotComplete=Jūs uzstādīšana Dolibarr config failu, lai ļautu OpenID autentifikācijas, bet OpenID pakalpojuma URL nav definēts spēkā salīdzināmajās %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Šai partijai/sērijai nav ErrorOnlyOneFieldForGroupByIsPossible=“Grupēt pēc” ir iespējams tikai 1 lauks (citi tiek atmesti) ErrorTooManyDifferentValueForSelectedGroupBy=Tika atrasts pārāk daudz dažādu vērtību (vairāk nekā %s ) laukam “ %s a09a4b739f17f17f8z0”. Lauks 'Grupēt pēc' ir noņemts. Varbūt vēlaties to izmantot kā X asi? ErrorReplaceStringEmpty=Kļūda: aizvietojamā virkne ir tukša +ErrorProductNeedBatchNumber=Kļūda, produktam “ %s ” ir nepieciešama partija / sērijas numurs +ErrorProductDoesNotNeedBatchNumber=Kļūda, produkts ' %s ' nepieņem partiju / sērijas numuru +ErrorFailedToReadObject=Kļūda, neizdevās nolasīt tipa objektu. %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Jūsu PHP parametrs upload_max_filesize (%s) ir augstāks nekā PHP parametrs post_max_size (%s). Šī nav konsekventa iestatīšana. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/lv_LV/exports.lang b/htdocs/langs/lv_LV/exports.lang index a2387ca5879..8f3f62628ff 100644 --- a/htdocs/langs/lv_LV/exports.lang +++ b/htdocs/langs/lv_LV/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Lauka nosaukums NowClickToGenerateToBuildExportFile=Tagad atlasiet faila formātu kombinētajā lodziņā un noklikšķiniet uz Izveidot, lai izveidotu eksporta failu ... AvailableFormats=Pieejamie formāti LibraryShort=Bibliotēka +ExportCsvSeparator=Csv rakstzīmju atdalītājs +ImportCsvSeparator=Csv rakstzīmju atdalītājs Step=Solis FormatedImport=Importa palīgs FormatedImportDesc1=Šis modulis ļauj atjaunināt esošos datus vai pievienot jaunus objektus datu bāzē no faila bez tehniskām zināšanām, izmantojot palīgu. @@ -92,11 +94,11 @@ DataComeFromNoWhere=Vērtību, lai ievietotu nāk no nekur avota failā. DataComeFromFileFieldNb=Vērtību, lai ievietotu nāk no lauka skaits %s, kas avota failā. DataComeFromIdFoundFromRef=Sākotnējā faila lauka skaitļa %s vērtība tiks izmantota, lai atrastu izmantotā vecā objekta ID (tādēļ objekts %s , kuram ir atsauces no avota faila jābūt datu bāzē). DataComeFromIdFoundFromCodeId=Avota faila lauka skaitļa kods %s tiks izmantots, lai atrastu izmantojamā vecāka objekta ID (tādēļ vārdnīcas kodam jābūt eksemplāram %s ) Ņemiet vērā, ka, ja jūs zināt id, varat to izmantot arī avota failā, nevis kodu. Importam jādarbojas abos gadījumos. -DataIsInsertedInto=Dati, kas nāk no avota fails tiks ievietota pēc lauka: +DataIsInsertedInto=Dati, kas nāk no avota faila tiks ievietota sekojošā laukā: DataIDSourceIsInsertedInto=Mātes objekta ID tika atrasts, izmantojot avota faila datus, tiks ievietots šādā laukā: DataCodeIDSourceIsInsertedInto=Mātes līnijas atrasts no koda id, tiks ievietota šādā jomā: SourceRequired=Datu vērtība ir obligāta -SourceExample=Piemērs par iespējamo datu vērtības +SourceExample=Piemērs par iespējamo datu vērtību ExampleAnyRefFoundIntoElement=Jebkura atsauce atrasts elementu %s ExampleAnyCodeOrIdFoundIntoDictionary=Jebkurš kods (vai id), kas atrasts vārdnīcā %s CSVFormatDesc=Komata atdalītas vērtības faila formāts (.csv).
    Šis ir teksta faila formāts, kurā lauki atdalīti ar [%s]. Ja lauka saturā atrodas atdalītājs, lauku noapaļo līdz apaļam skaitlim [%s]. Lai izvairītos no apaļošanas ir jāizmanto[%s]. diff --git a/htdocs/langs/lv_LV/interventions.lang b/htdocs/langs/lv_LV/interventions.lang index 424ef5518c6..d58806a19e5 100644 --- a/htdocs/langs/lv_LV/interventions.lang +++ b/htdocs/langs/lv_LV/interventions.lang @@ -37,8 +37,8 @@ InterventionClassifiedBilledInDolibarr=Intervention %s set as billed InterventionClassifiedUnbilledInDolibarr=Intervention %s set as unbilled InterventionSentByEMail=Intervence %s nosūtīta pa e-pastu InterventionDeletedInDolibarr=Intervention %s deleted -InterventionsArea=Interventions area -DraftFichinter=Draft interventions +InterventionsArea=Intervences zona +DraftFichinter=Intervences projekts LastModifiedInterventions=Jaunākās %s labotās iejaukšanās FichinterToProcess=Intervences process TypeContact_fichinter_external_CUSTOMER=Šādi-up klientu kontaktu @@ -51,12 +51,12 @@ InterventionStatistics=Intervences statistika NbOfinterventions=Intervences karšu skaits NumberOfInterventionsByMonth=Intervences karšu skaits pēc mēneša (validācijas datums) AmountOfInteventionNotIncludedByDefault=Ienākuma summa pēc noklusējuma netiek iekļauta peļņā (vairumā gadījumu laika kontrolsaraksts tiek izmantots, lai uzskaitītu pavadīto laiku). Lai tos iekļautu, pievienojiet opciju PROJECT_INCLUDE_INTERVENTION_AMOUNT_IN_PROFIT uz 1 sākuma iestatīšanas pogu. -InterId=Intervention id -InterRef=Intervention ref. +InterId=Intervences id +InterRef=Intervences atsauce InterDateCreation=Date creation intervention InterDuration=Duration intervention InterStatus=Status intervention -InterNote=Note intervention +InterNote=Piezīme intervence InterLine=Intervences līnija InterLineId=Line id intervention InterLineDate=Line date intervention diff --git a/htdocs/langs/lv_LV/languages.lang b/htdocs/langs/lv_LV/languages.lang index 83adff44eea..513c7c95a56 100644 --- a/htdocs/langs/lv_LV/languages.lang +++ b/htdocs/langs/lv_LV/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Etiopietis Language_ar_AR=Arābu Language_ar_EG=Arābu (Ēģipte) Language_ar_SA=Arābu +Language_az_AZ=Azerbaidžāņi Language_bn_BD=Bengali +Language_bn_IN=Bengāļu (Indija) Language_bg_BG=Bulgāru Language_bs_BA=Bosniešu Language_ca_ES=Katalāņu @@ -20,6 +23,7 @@ Language_en_GB=Angļu (Apvienotā Karaliste) Language_en_IN=Angļu (Indija) Language_en_NZ=Angļu (Jaunzēlande) Language_en_SA=Angļu (Saūda Arābija) +Language_en_SG=Angļu (Singapūra) Language_en_US=Angļu (ASV) Language_en_ZA=English (Dienvidāfrika) Language_es_ES=Spāņu @@ -29,6 +33,7 @@ Language_es_CL=Spāņu (Ķīle) Language_es_CO=Spāņu (Kolumbija) Language_es_DO=Spāņu (Dominikānas Republika) Language_es_EC=Spāņu (Ekvadora) +Language_es_GT=Spāņu (Gvatemala) Language_es_HN=Spāņu (Hondurasa) Language_es_MX=Spāņu (Meksika) Language_es_PA=Spāņu (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spāņu (Paragvaja) Language_es_PE=Spāņu (Peru) Language_es_PR=Spāņu (Puertoriko) Language_es_UY=Spāņu (Urugvaja) +Language_es_GT=Spāņu (Gvatemala) Language_es_VE=Spāņu (Venecuēla) Language_et_EE=Igauņu Language_eu_ES=Basku @@ -44,15 +50,22 @@ Language_fi_FI=Pabeigt Language_fr_BE=Franču (Beļģija) Language_fr_CA=Franču (Kanāda) Language_fr_CH=Franču (Šveices) +Language_fr_CI=Franču valoda (Cost Ivory) +Language_fr_CM=Franču (Kamerūna) Language_fr_FR=Franču +Language_fr_GA=Franču (Gabona) Language_fr_NC=Franču (Jaunkaledonija) +Language_fr_SN=Franču (Senegāla) Language_fy_NL=Frisian +Language_gl_ES=Galisiešu Language_he_IL=Ebreju +Language_hi_IN=Hindi (Indija) Language_hr_HR=Horvātu Language_hu_HU=Ungāru Language_id_ID=Indonēziešu Language_is_IS=Islandiešu Language_it_IT=Itāļu +Language_it_CH=Itāļu (Šveice) Language_ja_JP=Japāņu Language_ka_GE=Gruzīnu valoda Language_km_KH=Khmeru @@ -64,6 +77,7 @@ Language_lv_LV=Latviešu Language_mk_MK=Maķedoniešu Language_mn_MN=Mongoļu Language_nb_NO=Norvēģu (bukmols) +Language_ne_NP=Nepālietis Language_nl_BE=Holandiešu (Beļģijas) Language_nl_NL=Holandiešu Language_pl_PL=Poļu @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbeku Language_vi_VN=Vjetnamiešu Language_zh_CN=Ķīniešu Language_zh_TW=Ķīniešu (tradicionālā) +Language_zh_HK=Ķīniešu (Honkonga) Language_bh_MY=Malajiešu valoda diff --git a/htdocs/langs/lv_LV/mails.lang b/htdocs/langs/lv_LV/mails.lang index f9c3b411857..f8975257031 100644 --- a/htdocs/langs/lv_LV/mails.lang +++ b/htdocs/langs/lv_LV/mails.lang @@ -164,7 +164,11 @@ NoContactWithCategoryFound=Nav kontaktpersonas / adreses ar atrastu kategoriju NoContactLinkedToThirdpartieWithCategoryFound=Nav kontaktpersonas / adreses ar atrastu kategoriju OutGoingEmailSetup=Izejošā e-pasta iestatīšana InGoingEmailSetup=Ienākošā e-pasta iestatīšana -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=Izejošā e-pasta iestatīšana (modulim %s) DefaultOutgoingEmailSetup=Noklusējuma izejošā e-pasta iestatīšana Information=Informācija ContactsWithThirdpartyFilter=Kontakti ar trešās puses filtru +Unanswered=Neatbildēts +Answered=Atbildēts +IsNotAnAnswer=Nav atbildes (sākotnējais e-pasts) +IsAnAnswer=Vai ir atbilde uz sākotnējo e-pastu diff --git a/htdocs/langs/lv_LV/main.lang b/htdocs/langs/lv_LV/main.lang index f90d0afa56c..93b12e1a730 100644 --- a/htdocs/langs/lv_LV/main.lang +++ b/htdocs/langs/lv_LV/main.lang @@ -350,13 +350,13 @@ UnitPriceHTCurrency=Vienības cena (izņemot) (valūta) UnitPriceTTC=Vienības cena PriceU=UP PriceUHT=UP (neto) -PriceUHTCurrency=U.P (currency) +PriceUHTCurrency=ASV (valūta) PriceUTTC=U.P. (inc. tax) Amount=Summa AmountInvoice=Rēķina summa AmountInvoiced=Rēķinā iekļautā summa -AmountInvoicedHT=Rēķina summa (ar nodokļiem) -AmountInvoicedTTC=Rēķina summa (bez nodokļiem) +AmountInvoicedHT=Rēķina summa (bez nodokļiem) +AmountInvoicedTTC=Rēķina summa (ar nodokļiem) AmountPayment=Maksājuma summa AmountHTShort=Summa (izņemot) AmountTTCShort=Summa (ar PVN) @@ -464,7 +464,7 @@ NActionsLate=%s vēlu ToDo=Jāizdara Completed=Pabeigts Running=Procesā -RequestAlreadyDone=Request already recorded +RequestAlreadyDone=Pieprasījums jau ir ierakstīts Filter=Filtrs FilterOnInto=Meklēšanas kritēriji ' %s' laukos %s RemoveFilter=Noņemt filtru @@ -485,6 +485,7 @@ Categories=Atslēgvārdi / sadaļas Category=Atslēgvārds / sadaļa By=Līdz From=No +FromDate=No FromLocation=No to=līdz To=līdz @@ -687,6 +688,7 @@ Method=Metode Receive=Saņemt CompleteOrNoMoreReceptionExpected=Pabeigts vai nekas vairāk nav gaidīts ExpectedValue=Paredzamā vērtība +ExpectedQty=Paredzamais daudzums PartialWoman=Daļējs TotalWoman=Kopsumma NeverReceived=Nekad nav saņemts @@ -703,6 +705,7 @@ MenuECM=Dokumenti MenuAWStats=AWStats MenuMembers=Dalībnieki MenuAgendaGoogle=Google darba kārtība +MenuTaxesAndSpecialExpenses=Nodokļi | Īpašie izdevumi ThisLimitIsDefinedInSetup=Dolibarr robeža (Menu mājas uzstādīšana-drošība): %s Kb, PHP robeža: %s Kb NoFileFound=Neviens dokuments nav saglabāts šajā direktorijā CurrentUserLanguage=Pašreizējā valoda @@ -725,8 +728,8 @@ Page=Lappuse Notes=Piezīmes AddNewLine=Pievienot jaunu līniju AddFile=Pievienot failu -FreeZone=Nav iepriekš definētu produktu/pakalpojumu -FreeLineOfType=Brīvā teksta vienums, ierakstiet: +FreeZone=Brīvā teksta produkts +FreeLineOfType=Brīvais teksts, ierakstiet: CloneMainAttributes=Klonēt objektu ar tā galvenajiem atribūtiem ReGeneratePDF=Pārveidojiet PDF failu PDFMerge=Apvienot PDF @@ -833,10 +836,10 @@ ListOfTemplates=Saraksts ar veidnēm Gender=Dzimums Genderman=Vīrietis Genderwoman=Sieviete -ViewList=List view +ViewList=Saraksta skats ViewGantt=Ganta skats ViewKanban=Kanban skats -Mandatory=Mandatory +Mandatory=Obligāts Hello=Labdien GoodBye=Uz redzēšanos Sincerely=Ar cieņu @@ -942,6 +945,39 @@ ShortThursday=Ce ShortFriday=P ShortSaturday=Se ShortSunday=Sv +one=viens +two=divi +three=trīs +four=četri +five=pieci +six=seši +seven=septiņi +eight=astoņi +nine=deviņi +ten=desmit +eleven=vienpadsmit +twelve=divpadsmit +thirteen=trejpadsmit +fourteen=četrpadsmit +fifteen=piecpadsmit +sixteen=sešpadsmit +seventeen=septiņpadsmit +eighteen=astoņpadsmit +nineteen=deviņpadsmit +twenty=divdesmit +thirty=trīsdesmit +forty=četrdesmit +fifty=piecdesmit +sixty=sešdesmit +seventy=septiņdesmit +eighty=astoņdesmit +ninety=deviņdesmit +hundred=simts +thousand=tūkstoši +million=miljons +billion=miljardu +trillion=triljons +quadrillion=kvadriljons SelectMailModel=Izvēlieties e-pasta veidni SetRef=Set ref Select2ResultFoundUseArrows=Daži rezultāti ir atrasti. Izmantojiet bultiņas, lai izvēlētos. @@ -966,7 +1002,7 @@ SearchIntoCustomerOrders=Pārdošanas pasūtījumi SearchIntoSupplierOrders=Pirkuma pasūtījumi SearchIntoCustomerProposals=Komerciālie priekšlikumi SearchIntoSupplierProposals=Pārdevēja priekšlikumi -SearchIntoInterventions=Interventions +SearchIntoInterventions=Iejaukšanās SearchIntoContracts=Līgumi SearchIntoCustomerShipments=Klientu sūtījumi SearchIntoExpenseReports=Izdevumu atskaites @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Pārslēdzieties rediģēšanas režīmā, lai NotUsedForThisCustomer=Nav izmantots šim klientam AmountMustBePositive=Summai jābūt pozitīvai ByStatus=Pēc statusa +InformationMessage=Informācija +Used=Used +ASAP=Tik drīz cik vien iespējams +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/lv_LV/members.lang b/htdocs/langs/lv_LV/members.lang index 3f7ae46d252..44bee5feaef 100644 --- a/htdocs/langs/lv_LV/members.lang +++ b/htdocs/langs/lv_LV/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Apturēts dalībnieks MemberStatusResiliatedShort=Izbeigta MembersStatusToValid=Projektu dalībnieki MembersStatusResiliated=Izbeigti dalībnieki +MemberStatusNoSubscription=Validēts (abonēšana nav nepieciešama) +MemberStatusNoSubscriptionShort=Apstiprināts +SubscriptionNotNeeded=Abonēšana nav nepieciešama NewCotisation=Jauns ieguldījums PaymentSubscription=Jauns ieguldījums, maksājums SubscriptionEndDate=Abonēšanas beigu datums @@ -78,7 +81,7 @@ DeleteType=Dzēst VoteAllowed=Balsot atļauts Physical=Fizisks Moral=Morāls -MorPhy=Morālā/Fiziskā +MorPhy=Daba Reenable=Atkārtoti ieslēdzams ResiliateMember=Izslēgt dalībnieku ConfirmResiliateMember=Vai tiešām vēlaties pārtraukt šo dalībnieku? @@ -124,7 +127,7 @@ CardContent=Saturu jūsu dalības kartes # Text of email templates ThisIsContentOfYourMembershipRequestWasReceived=Mēs vēlamies jūs informēt, ka jūsu dalības pieprasījums ir saņemts.

    ThisIsContentOfYourMembershipWasValidated=Mēs vēlamies jūs informēt, ka jūsu dalība tika apstiprināta ar šādu informāciju:

    -ThisIsContentOfYourSubscriptionWasRecorded=Mēs vēlamies jūs informēt, ka jūsu jaunais abonements tika reģistrēts.

    +ThisIsContentOfYourSubscriptionWasRecorded=Mēs vēlamies Jūs informēt, ka jaunais abonements tika reģistrēts.

    ThisIsContentOfSubscriptionReminderEmail=Vēlamies informēt, ka jūsu abonements beidzas vai ir beidzies (__MEMBER_LAST_SUBSCRIPTION_DATE_END__). Mēs ceram, ka jūs to atjaunosit.

    ThisIsContentOfYourCard=Tas ir informācijas kopsavilkums, kas mums ir par jums. Lūdzu, sazinieties ar mums, ja kaut kas nav pareizs.

    DescADHERENT_AUTOREGISTER_NOTIF_MAIL_SUBJECT=Paziņojuma e-pasta objekts, kas saņemts viesa automātiskās uzrakstīšanas gadījumā @@ -136,7 +139,7 @@ DescADHERENT_EMAIL_TEMPLATE_REMIND_EXPIRATION=E-pasta veidne, ko izmanto, lai no DescADHERENT_EMAIL_TEMPLATE_CANCELATION=E-pasta veidne, kas jāizmanto, lai nosūtītu e-pastu dalībniekam dalībnieka atcelšanas laikā DescADHERENT_MAIL_FROM=Sūtītāja e-pasts automātiskajiem e-pastiem DescADHERENT_ETIQUETTE_TYPE=Formāts etiķešu lapā -DescADHERENT_ETIQUETTE_TEXT=Teksts drukāts uz dalībvalstu adrese lapām +DescADHERENT_ETIQUETTE_TEXT=Teksts drukāts uz dalībnieku adrešu lapām DescADHERENT_CARD_TYPE=Formāts kartes lapas DescADHERENT_CARD_HEADER_TEXT=Teksts drukāts virsū uz biedru kartes augšpusē DescADHERENT_CARD_TEXT=Teksts drukāts uz biedru kartes (izlīdzinājums pa kreisi) diff --git a/htdocs/langs/lv_LV/mrp.lang b/htdocs/langs/lv_LV/mrp.lang index 30b84687b15..d55d005dbd0 100644 --- a/htdocs/langs/lv_LV/mrp.lang +++ b/htdocs/langs/lv_LV/mrp.lang @@ -1,5 +1,6 @@ Mrp=Ražošanas pasūtījumi MO=Ražošanas pasūtījums +MOs=Manufacturing orders MRPDescription=Ražošanas un ražošanas pasūtījumu (MO) pārvaldības modulis. MRPArea=MRP apgabals MrpSetupPage=MRP moduļa iestatīšana diff --git a/htdocs/langs/lv_LV/oauth.lang b/htdocs/langs/lv_LV/oauth.lang index 0a4a336d2df..defd31b4462 100644 --- a/htdocs/langs/lv_LV/oauth.lang +++ b/htdocs/langs/lv_LV/oauth.lang @@ -4,7 +4,7 @@ OAuthServices=OAuth pakalpojumi ManualTokenGeneration=Manual token generation TokenManager=Žetonu pārvaldnieks IsTokenGenerated=Vai tiek ģenerēts marķieris? -NoAccessToken=No access token saved into local database +NoAccessToken=Lokālajā datu bāzē nav saglabāts piekļuves marķieris HasAccessToken=Tika izveidots marķieris un saglabāts lokālajā datu bāzē NewTokenStored=Token received and saved ToCheckDeleteTokenOnProvider=Click here to check/delete authorization saved by %s OAuth provider diff --git a/htdocs/langs/lv_LV/orders.lang b/htdocs/langs/lv_LV/orders.lang index 9c6ca231797..1276c32c910 100644 --- a/htdocs/langs/lv_LV/orders.lang +++ b/htdocs/langs/lv_LV/orders.lang @@ -141,11 +141,12 @@ OrderByEMail=E-pasts OrderByWWW=Online OrderByPhone=Telefons # Documents models -PDFEinsteinDescription=Pilns pasūtījuma modelis +PDFEinsteinDescription=Pilns pasūtījuma modelis (Eratosthene veidnes vecā ieviešana) PDFEratostheneDescription=Pilns pasūtījuma modelis PDFEdisonDescription=Vienkāršs pasūtīt modeli PDFProformaDescription=Pilnīga Proforma rēķina veidne CreateInvoiceForThisCustomer=Rēķinu pasūtījumi +CreateInvoiceForThisSupplier=Rēķinu pasūtījumi NoOrdersToInvoice=Nav pasūtījumi apmaksājamo CloseProcessedOrdersAutomatically=Klasificēt "apstrādā" visus atlasītos pasūtījumus. OrderCreation=Pasūtījumu izveide diff --git a/htdocs/langs/lv_LV/other.lang b/htdocs/langs/lv_LV/other.lang index cbebd72fa7b..74075151ce5 100644 --- a/htdocs/langs/lv_LV/other.lang +++ b/htdocs/langs/lv_LV/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Labdien)__\n\nLūdzu, apskatiet pievie PredefinedMailContentSendSupplierInvoice=__(Labdien)__\n\nLūdzu, apskatiet pievienoto rēķinu __REF__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Labdien)__\n\nLūdzu, nosūtiet sūtījumu __REF__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Labdien)__\n\nLūdzu, skatiet interviju __REF__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Labdien)__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Labdien,)__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Labdien,)__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Jūs varat noklikšķināt uz zemāk esošās saites, lai veiktu maksājumu, ja tas vēl nav izdarīts.\n\n%s\n\n +PredefinedMailContentGeneric=__(Labdien)__\n\n\n__ (Ar cieņu) __\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr ir kompakts ERP / CRM, kas atbalsta vairākus biznesa moduļus. Demonstrācija, kas demonstrē visus moduļus, nav jēga, jo šis scenārijs nekad nenotiek (pieejami vairāki simti). Tātad, ir pieejami vairāki demo profili. ChooseYourDemoProfil=Izvēlies demo profilu, kas vislabāk atbilst jūsu vajadzībām ... ChooseYourDemoProfilMore=... vai izveidojiet savu profilu
    (manuālā moduļa izvēle) @@ -280,7 +278,9 @@ LinesToImport=Importējamās līnijas MemoryUsage=Atmiņas izmantošana RequestDuration=Pieprasījuma ilgums +ProductsPerPopularity=Produkti / pakalpojumi pēc popularitātes PopuProp=Produkti / pakalpojumi pēc popularitātes priekšlikumos PopuCom=Produkti / pakalpojumi pēc popularitātes pasūtījumos ProductStatistics=Produktu/pakalpojumu statistika NbOfQtyInOrders=Daudzums pasūtījumos +SelectTheTypeOfObjectToAnalyze=Atlasiet analizējamā objekta veidu ... diff --git a/htdocs/langs/lv_LV/printing.lang b/htdocs/langs/lv_LV/printing.lang index 55628ecdd0f..ca4b5a4eda7 100644 --- a/htdocs/langs/lv_LV/printing.lang +++ b/htdocs/langs/lv_LV/printing.lang @@ -16,7 +16,7 @@ PleaseConfigureDriverfromList=Please configure the selected driver from list. SetupDriver=Draivera iestatījumi TargetedPrinter=Noklusējuma printeris UserConf=Iestatījumi katram lietotājam -PRINTGCP_INFO=Google OAuth API setup +PRINTGCP_INFO=Google OAuth API iestatīšana PRINTGCP_AUTHLINK=Autentifikācija PRINTGCP_TOKEN_ACCESS=Google mākoņdrukas OAuth marķieris PrintGCPDesc=Šis draiveris ļauj sūtīt dokumentus tieši printerim, izmantojot Google mākoņdruku. @@ -46,9 +46,9 @@ IPP_Device=Ierīce IPP_Media=Printera multivide IPP_Supported=Mediju veids DirectPrintingJobsDesc=This page lists printing jobs found for available printers. -GoogleAuthNotConfigured=Google OAuth setup not done. Enable module OAuth and set a Google ID/Secret. +GoogleAuthNotConfigured=Google OAuth nav iestatīts. Iespējot moduli OAuth un iestatiet Google ID / noslēpumu. GoogleAuthConfigured=Google OAuth akreditācijas dati tika atrasti moduļa OAuth iestatījumos. PrintingDriverDescprintgcp=Configuration variables for printing driver Google Cloud Print. PrintingDriverDescprintipp=Konfigurācijas mainīgie drukāšanas vadītāja krūzes. -PrintTestDescprintgcp=List of Printers for Google Cloud Print. +PrintTestDescprintgcp=Google mākoņdrukas printeru saraksts. PrintTestDescprintipp=CUPS printeru saraksts. diff --git a/htdocs/langs/lv_LV/products.lang b/htdocs/langs/lv_LV/products.lang index d673531b84e..9292cb3f9c2 100644 --- a/htdocs/langs/lv_LV/products.lang +++ b/htdocs/langs/lv_LV/products.lang @@ -78,7 +78,7 @@ CostPriceUsage=Šo vērtību var izmantot, lai aprēķinātu peļņu. SoldAmount=Pārdošanas apjoms PurchasedAmount=Iegādātā summa NewPrice=Jaunā cena -MinPrice=Min. pārdot cenu +MinPrice=Min. pārdošanas cena EditSellingPriceLabel=Labot pārdošanas cenas nosaukumu CantBeLessThanMinPrice=Pārdošanas cena nevar būt zemāka par minimālo pieļaujamo šī produkta (%s bez PVN). Šis ziņojums var būt arī parādās, ja esat ievadījis pārāk lielu atlaidi. ContractStatusClosed=Slēgts @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Uzstādīt svītrkoda veidu BarcodeValue=Svītrkoda vērtība NoteNotVisibleOnBill=Piezīme (nav redzama rēķinos, priekšlikumos ...) ServiceLimitedDuration=Ja produkts ir pakalpojums ir ierobežots darbības laiks: +FillWithLastServiceDates=Aizpildiet pēdējos pakalpojumu līnijas datumus MultiPricesAbility=Vairāki cenu segmenti katram produktam / pakalpojumam (katrs klients atrodas vienā cenu segmentā) MultiPricesNumPrices=Cenu skaits DefaultPriceType=Cenu bāze par saistību neizpildi (ar nodokli bez nodokļa), pievienojot jaunas pārdošanas cenas @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Pārdevēja cenas (produktiem vai pakalpojum CustomCode=Muita / Prece / HS kods CountryOrigin=Izcelsmes valsts Nature=Produkta veids (materiāls / gatavs) +NatureOfProductShort=Produkta veids +NatureOfProductDesc=Izejviela vai gatavais produkts ShortLabel=Īsais nosaukums Unit=Vienība p=u. @@ -285,14 +288,14 @@ PriceMode=Cenas veids PriceNumeric=Numurs DefaultPrice=Noklusējuma cena ComposedProductIncDecStock=Increase/Decrease stock on parent change -ComposedProduct=Bērnu produkti +ComposedProduct=Apakš produkti MinSupplierPrice=Minimālā iepirkuma cena MinCustomerPrice=Minimālā pārdošanas cena DynamicPriceConfiguration=Dynamic price configuration DynamicPriceDesc=Jūs varat noteikt matemātiskās formulas, lai aprēķinātu Klienta vai pārdevēja cenas. Šādas formulas var izmantot visus matemātiskos operatorus, dažas konstantes un mainīgos. Šeit varat definēt mainīgos, kurus vēlaties izmantot. Ja mainīgajam nepieciešams automātisks atjauninājums, varat definēt ārējo URL, lai Dolibarr varētu automātiski atjaunināt vērtību. AddVariable=Pievienot mainīgo AddUpdater=Pievienot Atjaunotāju -GlobalVariables=Global variables +GlobalVariables=Globālie mainīgie VariableToUpdate=Mainīgais kas jāatjauno GlobalVariableUpdaters=Mainīgo lielumu ārējie atjauninājumi GlobalVariableUpdaterType0=JSON dati @@ -359,6 +362,9 @@ SelectCombination=Izvēlieties kombināciju ProductCombinationGenerator=Variantu ģenerators Features=Iespējas PriceImpact=Cenu ietekme +ImpactOnPriceLevel=Ietekme uz cenu līmeni %s +ApplyToAllPriceImpactLevel= Piesakies visiem līmeņiem +ApplyToAllPriceImpactLevelHelp=Noklikšķinot šeit, jūs iestatāt vienādu cenu ietekmi uz visiem līmeņiem WeightImpact=Svara ietekme NewProductAttribute=Jauns atribūts NewProductAttributeValue=Jauna atribūta vērtība diff --git a/htdocs/langs/lv_LV/projects.lang b/htdocs/langs/lv_LV/projects.lang index cd16f005da0..28e163375b4 100644 --- a/htdocs/langs/lv_LV/projects.lang +++ b/htdocs/langs/lv_LV/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Ieguldītājs TypeContact_project_task_external_TASKCONTRIBUTOR=Ieguldītājs SelectElement=Izvēlieties elementu AddElement=Saite uz elementu +LinkToElementShort=Saite uz # Documents models DocumentModelBeluga=Saistīto objektu kopsavilkuma projekta dokumenta veidne DocumentModelBaleine=Projekta dokumenta veidne uzdevumiem @@ -210,11 +211,11 @@ ProjectNbProjectByMonth=Izveidoto projektu skaits pēc mēneša ProjectNbTaskByMonth=Izveidoto darbu skaits pa mēnešiem ProjectOppAmountOfProjectsByMonth=Izložu skaits pēc mēnešiem ProjectWeightedOppAmountOfProjectsByMonth=Vidējā svērto klientu skaits pēc mēneša -ProjectOpenedProjectByOppStatus=Atklāts projekts / vadošais statuss -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistika par projektu / vadošajiem uzdevumiem +ProjectOpenedProjectByOppStatus=Atvērts projekts | svina statuss +ProjectsStatistics=Statistika par projektiem vai potenciālajiem klientiem +TasksStatistics=Statistika par projektu vai potenciālo klientu uzdevumiem TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. -IdTaskTime=Id task time +IdTaskTime=Id uzdevuma laiks YouCanCompleteRef=Ja vēlaties aizpildīt ref ar kādu sufiksu, ieteicams pievienot a-rakstzīmi, lai to atdalītu, tāpēc automātiskā numerācija joprojām darbosies pareizi nākamajiem projektiem. Piemēram, %s-MYSUFFIX OpenedProjectsByThirdparties=Atvērt trešo pušu projektus OnlyOpportunitiesShort=Tikai ved diff --git a/htdocs/langs/lv_LV/recruitment.lang b/htdocs/langs/lv_LV/recruitment.lang new file mode 100644 index 00000000000..5529a282136 --- /dev/null +++ b/htdocs/langs/lv_LV/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Darbā pieņemšana +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Pārvaldiet un sekojiet personāla atlases kampaņām jaunām darba vietām + +# +# Admin page +# +RecruitmentSetup = Personāla atlases iestatīšana +Settings = Iestatījumi +RecruitmentSetupPage = Šeit ievadiet personāla atlases moduļa galveno opciju iestatīšanu +RecruitmentArea=Darbā pieņemšanas sadaļa +PublicInterfaceRecruitmentDesc=Darba publiskās lapas ir publiski vietrāži URL, lai parādītu atvērtās darba vietas un atbildētu uz tām. Katram atklātajam darbam ir viena atšķirīga saite, kas atrodama katrā darba ierakstā. +EnablePublicRecruitmentPages=Iespējojiet atvērto darbu publiskās lapas + +# +# About page +# +About = Par +RecruitmentAbout = Par darbā pieņemšanu +RecruitmentAboutPage = Darbā pieņemšana par lapu +NbOfEmployeesExpected=Paredzamais darbinieku skaits +JobLabel=Amats +WorkPlace=Darba vieta +DateExpected=Paredzamais datums +FutureManager=Topošais vadītājs +ResponsibleOfRecruitement=Atbildīgais par darbā pieņemšanu +IfJobIsLocatedAtAPartner=Ja darbs atrodas partnera vietā +PositionToBeFilled=Aizpildāms darba piedāvājums +PositionsToBeFilled=Darba piedāvājumi jāaizpilda +ListOfPositionsToBeFilled=Aizpildāmo darba piedāvājumu saraksts +NewPositionToBeFilled=Jāaizpilda jauni darba piedāvājumi + +JobOfferToBeFilled=Aizpildāms darba piedāvājums +ThisIsInformationOnJobPosition=Informācija par aizpildāmo darba vietu +ContactForRecruitment=Kontaktpersona personāla atlasei +EmailRecruiter=E-pasta vervētājs +ToUseAGenericEmail=Lai izmantotu vispārīgu e-pastu. Ja tas nav noteikts, tiks izmantots e-pasts, kas atbildīgs par personāla atlasi +NewCandidature=Jauna kandidatūra +ListOfCandidatures=Kandidātu saraksts +RequestedRemuneration=Pieprasītā atlīdzība +ProposedRemuneration=Piedāvātā atlīdzība +ContractProposed=Piedāvātais līgums +ContractSigned=Parakstīts līgums +RecruitmentCandidature=Kandidāts +JobPositions=Darba pozīcijas +RecruitmentCandidatures=Kandidāti +InterviewToDo=Intervija, kas jādara +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/lv_LV/stocks.lang b/htdocs/langs/lv_LV/stocks.lang index 2d8aec93100..ed7cf7b7f30 100644 --- a/htdocs/langs/lv_LV/stocks.lang +++ b/htdocs/langs/lv_LV/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Atcelt sūtīšanu DeleteSending=Dzēst nosūtot Stock=Krājums Stocks=Krājumi -MissingStocks=Missing stocks +MissingStocks=Trūkst krājumu StockAtDate=Krājumi datumā -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +StockAtDateInPast=Datums pagātnē +StockAtDateInFuture=Datums nākotnē StocksByLotSerial=Krājumi pēc partijas/sērijas LotSerial=Daudz / sērijas nr LotSerialList=Partijas saraksts / sērijas nr @@ -34,7 +34,7 @@ StockMovementForId=Pārvietošanas ID %d ListMouvementStockProject=Ar projektu saistīto krājumu kustību saraksts StocksArea=Noliktavas platība AllWarehouses=Visas noliktavas -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock=Iekļaujiet arī nenosakāmus vēlamos krājumus IncludeAlsoDraftOrders=Iekļaujiet arī pasūtījumu projektus Location=Vieta LocationSummary=Īsais atrašanās vietas nosaukums @@ -95,14 +95,16 @@ RealStock=Rālie krājumi RealStockDesc=Fiziskā / reālā krājumi ir krājumi, kas pašlaik atrodas noliktavās. RealStockWillAutomaticallyWhen=Reālais krājums tiks mainīts saskaņā ar šo noteikumu (kā noteikts Stock modulī): VirtualStock=Virtuālie krājumi -VirtualStockDesc=Virtuālais krājums ir aprēķinātais krājums, kas pieejams, kad visas atvērtās / nepabeigtās darbības (kas ietekmē krājumus) ir slēgtas (saņemtie pasūtījumi, nosūtītie pasūtījumi utt.) +VirtualStockAtDate=Virtuālais krājums datumā +VirtualStockAtDateDesc=Virtuālais krājums, kad būs pabeigti visi neapstiprinātie pasūtījumi, kurus plānots veikt pirms datuma +VirtualStockDesc=Virtuālais krājums ir aprēķinātais krājums, kas pieejams, kad visas atvērtās / neapstiprinātās darbības (kas ietekmē krājumus) ir aizvērtas (saņemti pirkumu pasūtījumi, nosūtīti pārdošanas pasūtījumi, saražoti ražošanas pasūtījumi utt.) IdWarehouse=Id noliktava DescWareHouse=Apraksts noliktava LieuWareHouse=Lokālā noliktava WarehousesAndProducts=Noliktavas un produkti WarehousesAndProductsBatchDetail=Noliktavas un produkti (ar informāciju par partiju/sēriju) -AverageUnitPricePMPShort=Vidējais svērtais ieejas cena -AverageUnitPricePMP=Vidējais svērtais ieejas cena +AverageUnitPricePMPShort=Vidējā svērtā cena +AverageUnitPricePMPDesc=Vidējā vienības cena, kas mums bija jāmaksā piegādātājiem, lai produkts nonāktu mūsu noliktavā. SellPriceMin=Pārdošanas Vienības cena EstimatedStockValueSellShort=Pārdošanas cena EstimatedStockValueSell=Pārdošanas cena @@ -130,7 +132,7 @@ CurentlyUsingPhysicalStock=Reāla noliktava RuleForStockReplenishment=Noteikums par krājumu papildināšanu SelectProductWithNotNullQty=Atlasiet vismaz vienu produktu, kura daudzums nav null un pārdevējs AlertOnly= Brīdinājumi tikai -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Iekļaujiet arī negatīvos krājumus izstrādājumiem, kuriem nav noteikts vēlamais daudzums, lai tos atjaunotu 0 WarehouseForStockDecrease=Noliktava %s tiks izmantota krājumu samazināšanai WarehouseForStockIncrease=Noliktava %s tiks izmantota krājumu palielināšanai ForThisWarehouse=Šai noliktavai @@ -141,7 +143,7 @@ Replenishments=Papildinājumus NbOfProductBeforePeriod=Produktu daudzums %s noliktavā pirms izvēlētā perioda (< %s) NbOfProductAfterPeriod=Produktu daudzums %s krājumā pēc izvēlētā perioda (>%s) MassMovement=Masveida pārvietošana -SelectProductInAndOutWareHouse=Izvēlieties produktu, daudzumu, avota noliktavu un mērķa noliktavu, tad noklikšķiniet uz "%s". Kad tas ir izdarīts visām nepieciešamajām kustībām, noklikšķiniet uz "%s". +SelectProductInAndOutWareHouse=Atlasiet avota noliktavu un mērķa noliktavu, produktu un daudzumu un pēc tam noklikšķiniet uz "%s". Kad tas ir izdarīts visām nepieciešamajām kustībām, noklikšķiniet uz "%s". RecordMovement=Ierakstīt pārvietošanu ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Krājumu pārvietošana saglabāta @@ -234,4 +236,7 @@ ForceTo=Piespiest līdz AlwaysShowFullArbo=Parādiet pilnu noliktavas koku uznirstošajās noliktavu saitēs (Brīdinājums: tas var dramatiski samazināt veiktspēju) StockAtDatePastDesc=Šeit varat apskatīt krājumus (reālos krājumus) noteiktā datumā pagātnē StockAtDateFutureDesc=Šeit varat apskatīt krājumus (virtuālos krājumus) noteiktā datumā nākotnē -CurrentStock=Current stock +CurrentStock=Pašreizējais krājums +InventoryRealQtyHelp=Iestatiet vērtību 0, lai atiestatītu daudzumu
    . Saglabājiet lauku tukšu vai noņemiet līniju, lai paliktu nemainīgs +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/lv_LV/supplier_proposal.lang b/htdocs/langs/lv_LV/supplier_proposal.lang index 25522229488..a092448a3fc 100644 --- a/htdocs/langs/lv_LV/supplier_proposal.lang +++ b/htdocs/langs/lv_LV/supplier_proposal.lang @@ -43,9 +43,9 @@ ConfirmDeleteAsk=Vai tiešām vēlaties dzēst šo cenu pieprasījumu %s ActionsOnSupplierProposal=Pasākumi pēc cenas pieprasījuma DocModelAuroreDescription=Pilns pieprasījuma modelis (logotips ...) CommercialAsk=Cenas pieprasījums -DefaultModelSupplierProposalCreate=Default model creation -DefaultModelSupplierProposalToBill=Default template when closing a price request (accepted) -DefaultModelSupplierProposalClosed=Default template when closing a price request (refused) +DefaultModelSupplierProposalCreate=Noklusējuma modeļa izveidošana +DefaultModelSupplierProposalToBill=Noklusējuma veidne, aizverot cenu pieprasījumu (pieņemts) +DefaultModelSupplierProposalClosed=Noklusējuma veidne, aizverot cenu pieprasījumu (noraidīts) ListOfSupplierProposals=Pārdevēja piedāvājuma pieprasījumu saraksts ListSupplierProposalsAssociatedProject=Ar projektu saistīto projektu iesniedzēju saraksts SupplierProposalsToClose=Pārdevēja priekšlikumi slēgt diff --git a/htdocs/langs/lv_LV/suppliers.lang b/htdocs/langs/lv_LV/suppliers.lang index 1045e43c00d..50c331400e1 100644 --- a/htdocs/langs/lv_LV/suppliers.lang +++ b/htdocs/langs/lv_LV/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Zemas kvalitātes ReputationForThisProduct=Reputācija BuyerName=Pircēja vārds AllProductServicePrices=Visas produktu / pakalpojumu cenas -AllProductReferencesOfSupplier=Visas pārdevēja produktu / pakalpojumu atsauces +AllProductReferencesOfSupplier=Visas pārdevēja atsauces BuyingPriceNumShort=Pārdevēja cenas diff --git a/htdocs/langs/lv_LV/ticket.lang b/htdocs/langs/lv_LV/ticket.lang index 8bb9b71b746..b1947dfcce0 100644 --- a/htdocs/langs/lv_LV/ticket.lang +++ b/htdocs/langs/lv_LV/ticket.lang @@ -72,7 +72,6 @@ Deleted=Dzēsts # Dict Type=Veids -Category=Analītiskais kods Severity=Smagums # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automātiski piešķirt lietotāju, kas izveidojis biļe TicketsAutoAssignTicketHelp=Veidojot biļeti, lietotājs var automātiski piešķirt biļeti. TicketNumberingModules=Čeku numerācijas modulis TicketNotifyTiersAtCreation=Paziņot trešajai pusei radīšanas laikā -TicketGroup=Grupa TicketsDisableCustomerEmail=Vienmēr atspējojiet e-pasta ziņojumus, ja biļete tiek veidota no publiskās saskarnes TicketsPublicNotificationNewMessage=Sūtiet e-pastu (s), kad tiek pievienots jauns ziņojums TicketsPublicNotificationNewMessageHelp=Sūtiet e-pastu (s), kad no publiskās saskarnes tiek pievienots jauns ziņojums (piešķirtajam lietotājam vai paziņojumu e-pastu uz (atjaunināt) un / vai paziņojumu e-pastu uz) @@ -162,7 +160,7 @@ CreatedBy=Izveidojis NewTicket=Jauns notikums SubjectAnswerToTicket=Pieteikuma atbilde TicketTypeRequest=Pieprasījuma veids -TicketCategory=Analītiskais kods +TicketCategory=Grupa SeeTicket=Apskatīt pieteikumu TicketMarkedAsRead=Pieteikums ir atzīmēts kā lasīts TicketReadOn=Izlasīts diff --git a/htdocs/langs/lv_LV/users.lang b/htdocs/langs/lv_LV/users.lang index c94221b7171..29e4d5d55ec 100644 --- a/htdocs/langs/lv_LV/users.lang +++ b/htdocs/langs/lv_LV/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Atspējots uzturēšanas režīmā UserAccountancyCode=Lietotāja grāmatvedības kods UserLogoff=Lietotājs atslēdzies UserLogged=Lietotājs pieteicies +DateOfEmployment=Nodarbināšanas datums DateEmployment=Nodarbinātības sākuma datums DateEmploymentEnd=Nodarbinātības beigu datums CantDisableYourself=Jūs nevarat atspējot savu lietotāja ierakstu @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Piespiedu atvaļinājuma pieprasījuma validētājs ValidatorIsSupervisorByDefault=Pēc noklusējuma validētājs ir lietotāja uzraugs. Lai saglabātu šo uzvedību, atstājiet tukšu. UserPersonalEmail=Personīgais e-pasts UserPersonalMobile=Personīgais mobilais tālrunis +WarningNotLangOfInterface=Brīdinājums: šī ir galvenā valoda, kurā runā lietotājs, nevis tā saskarnes valoda, kuru viņš izvēlējās redzēt. Lai mainītu interfeisa valodu, kuru redz šis lietotājs, dodieties uz cilni %s diff --git a/htdocs/langs/lv_LV/website.lang b/htdocs/langs/lv_LV/website.lang index 57c1e042f77..839d6a901d8 100644 --- a/htdocs/langs/lv_LV/website.lang +++ b/htdocs/langs/lv_LV/website.lang @@ -22,7 +22,7 @@ HtmlHeaderPage=HTML virsraksts (tikai šai lapai) PageNameAliasHelp=Lapas nosaukums vai pseidonīms.
    Šis aizstājvārds tiek izmantots arī, lai izveidotu SEO vietrādi, ja vietne tiek izmantota no Web servera virtuālās saimniekdatora (piemēram, Apacke, Nginx, ...). Izmantojiet pogu " %s , lai rediģētu šo aizstājvārdu. EditTheWebSiteForACommonHeader=Piezīme: ja vēlaties norādīt personalizētu galveni visām lapām, rediģējiet virsrakstu vietnes līmenī, nevis lapā / konteinerā. MediaFiles=Mediju bibliotēka -EditCss=Rediģēt vietnes rekvizīt +EditCss=Rediģēt vietnes rekvizītus EditMenu=Labot izvēlni EditMedias=Rediģēt medijus EditPageMeta=Rediģējiet lapas / konteinera īpašības @@ -32,7 +32,7 @@ Webpage=Web lapa / konteiners AddPage=Pievienot lapu / konteineru HomePage=Mājas lapa PageContainer=Lapa / konteiners -PreviewOfSiteNotYetAvailable=Jūsu vietnes %s priekšskatījums vēl nav pieejams. Vispirms jums ir jāievieto Importēt pilnu vietnes veidni vai vienkārši Pievienot lapu / konteineru ". +PreviewOfSiteNotYetAvailable=Jūsu vietnes %s priekšskatījums vēl nav pieejams. Vispirms jums ir Jāimportē pilnu vietnes veidni vai vienkārši Pievienot lapu/konteineru". RequestedPageHasNoContentYet=Pieprasītā lapa ar id %s vēl nav ievietota, vai kešatmiņas fails .tpl.php tika noņemts. Rediģējiet lapas saturu, lai to atrisinātu. SiteDeleted=Tīmekļa vietne '%s' dzēsta PageContent=Lapa / Konteiners diff --git a/htdocs/langs/lv_LV/withdrawals.lang b/htdocs/langs/lv_LV/withdrawals.lang index 5d2e3f69f9d..b041cca3eff 100644 --- a/htdocs/langs/lv_LV/withdrawals.lang +++ b/htdocs/langs/lv_LV/withdrawals.lang @@ -10,8 +10,8 @@ PaymentByBankTransferReceipts=Kredīta pārveduma rīkojumi PaymentByBankTransferLines=Kredīta pārveduma pasūtījuma līnijas WithdrawalsReceipts=Tiešā debeta rīkojumi WithdrawalReceipt=Tiešā debeta rīkojums -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order +BankTransferReceipts=Kredīta pārveduma rīkojumi +BankTransferReceipt=Kredīta pārveduma rīkojums LatestBankTransferReceipts=Jaunākie kredīta pārveduma rīkojumi %s LastWithdrawalReceipts=Jaunākie %s tiešā debeta faili WithdrawalsLine=Tiešā debeta pasūtījuma līnija @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Statuss debets/kredīts StatusWaiting=Gaidīšana StatusTrans=Sūtīt +StatusDebited=Debīts StatusCredited=Kredīts +StatusPaid=Apmaksāts StatusRefused=Atteikts StatusMotif0=Nenoteikts StatusMotif1=Nepietiekami līdzekļi @@ -77,13 +79,13 @@ StatusMotif8=Cits iemesls CreateForSepaFRST=Izveidot tiešā debeta failu (SEPA FRST) CreateForSepaRCUR=Izveidojiet tiešā debeta failu (SEPA RCUR) CreateAll=Izveidot tiešā debeta failu (visu) -CreateFileForPaymentByBankTransfer=Izveidot kredīta pārvedumu (visu) +CreateFileForPaymentByBankTransfer=Izveidojiet failu kredīta pārskaitīšanai CreateSepaFileForPaymentByBankTransfer=Izveidot kredīta pārveduma failu (SEPA) CreateGuichet=Tikai birojs CreateBanque=Tikai banka OrderWaiting=Gaida ārstēšanai -NotifyTransmision=Izstāšanās Transmisija -NotifyCredit=Izstāšanās Kredīts +NotifyTransmision=Reģistrācijas datnes pasūtījuma pārsūtīšana +NotifyCredit=Ieraksta pasūtījuma kredīts NumeroNationalEmetter=Valsts raidītājs skaits WithBankUsingRIB=Attiecībā uz banku kontiem, izmantojot RIB WithBankUsingBANBIC=Attiecībā uz banku kontiem, izmantojot IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Kredīts WithdrawalFileNotCapable=Nevar ģenerēt izņemšanas kvīts failu jūsu valstij %s (jūsu valsts netiek atbalstīta) ShowWithdraw=Rādīt tiešā debeta rīkojumu IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Tomēr, ja rēķinam ir vismaz viens tiešā debeta maksājuma rīkojums, kas vēl nav apstrādāts, tas netiks iestatīts kā maksāts, lai varētu veikt iepriekšēju izņemšanas pārvaldību. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Izstāšanās fails +DoStandingOrdersBeforePayments=Šī cilne ļauj pieprasīt tiešā debeta maksājuma rīkojumu. Kad tas ir izdarīts, dodieties uz izvēlni Banka-> Maksājums ar tiešo debetu, lai ģenerētu un pārvaldītu tiešā debeta rīkojumu. Kad tiešā debeta maksājums tiek aizvērts, rēķinu apmaksa tiks automātiski reģistrēta, un rēķini tiks aizvērti, ja atlikušais maksājuma apjoms nebūs spēkā. +DoCreditTransferBeforePayments=Šī cilne ļauj pieprasīt kredīta pārveduma rīkojumu. Kad tas ir izdarīts, dodieties uz izvēlni Banka-> Maksājums ar pārskaitījumu, lai ģenerētu un pārvaldītu kredīta pārveduma rīkojumu. Kad kredīta pārveduma pasūtījums tiek aizvērts, rēķinu apmaksa tiks automātiski reģistrēta, un rēķini tiks aizvērti, ja atlikušais maksājuma apjoms nebūs spēkā. +WithdrawalFile=Debeta pasūtījuma fails +CreditTransferFile=Kredīta pārveduma fails SetToStatusSent=Nomainīt uz statusu "Fails nosūtīts" ThisWillAlsoAddPaymentOnInvoice=Tas arī reģistrēs maksājumus rēķinos un klasificēs tos kā “Apmaksāts”, ja atlikušais maksājums būs spēkā neesošs StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Maksājuma veids ModeRECUR=Atkārtots maksājums ModeFRST=Vienreizējs maksājums PleaseCheckOne=Lūdzu izvēlaties tikai vienu +CreditTransferOrderCreated=Izveidots kredīta pārveduma rīkojums %s DirectDebitOrderCreated=Tiešais debeta uzdevums %s izveidots AmountRequested=Pieprasītais daudzums SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Daudzums: %s
    Metode: %s
    Datums: %s InfoRejectSubject=Tiešais debeta maksājuma uzdevums ir noraidīts InfoRejectMessage=Labdien,

    banka noraidījusi rēķina %s tiešā debeta maksājuma uzdevumu saistībā ar uzņēmumu %s ar summu %s.

    -
    %s ModeWarning=Iespēja reālā režīmā nav noteikts, mēs pārtraucam pēc šīs simulācijas +ErrorCompanyHasDuplicateDefaultBAN=Uzņēmumam ar ID %s ir vairāk nekā viens noklusējuma bankas konts. Nevar uzzināt, kuru izmantot. diff --git a/htdocs/langs/lv_LV/workflow.lang b/htdocs/langs/lv_LV/workflow.lang index 2cac3b3f650..2e7aff69db9 100644 --- a/htdocs/langs/lv_LV/workflow.lang +++ b/htdocs/langs/lv_LV/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Darbplūsmu moduļa iestatīšana -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. -ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. +WorkflowDesc=Šis modulis nodrošina dažas automātiskas darbības. Pēc noklusējuma darbplūsma ir atvērta (jūs varat darīt lietas vēlamajā secībā), taču šeit jūs varat aktivizēt dažas automātiskas darbības. +ThereIsNoWorkflowToModify=Nav aktivizētu moduļu darbplūsmas izmaiņām. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automātiski izveidojiet pārdošanas pasūtījumu pēc tam, kad ir parakstīts komerciāls priekšlikums (jaunajam pasūtījumam būs tāds pats apjoms kā piedāvājumam) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automātiski izveidojiet klienta rēķinu pēc komerciāla piedāvājuma parakstīšanas (jaunajā rēķinā būs tāda pati summa kā piedāvājumā) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automātiski izveidot klienta rēķinu pēc līguma apstiprināšanas -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automātiski izveidojiet klienta rēķinu pēc pārdošanas pasūtījuma slēgšanas (jaunajam rēķinam būs tāda pati summa kā pasūtījumam) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Klasificējiet saistītā avota priekšlikumu kā rēķinu, kad pārdošanas pasūtījums ir iestatīts uz rēķinu (un ja pasūtījuma summa ir vienāda ar parakstītā saistītā priekšlikuma kopējo summu) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Klasificēt saistīto avota priekšlikumu kā rēķinu, kad klienta rēķins ir apstiprināts (un ja rēķina summa ir tāda pati kā parakstītā saistītā piedāvājuma kopējā summa) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Klasificējiet saistītā avota pārdošanas pasūtījumu kā rēķinu, kad klients rēķins ir apstiprināts (un ja rēķina summa ir vienāda ar kopējo piesaistītā pasūtījuma summu) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Klasificējiet saistītā avota pārdošanas pasūtījumu kā rēķinu, kad klienta rēķins ir apmaksāts (un ja rēķina summa ir vienāda ar saistītā pasūtījuma kopējo summu) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klasificējiet saistīto avota pārdošanas pasūtījumu, kas nosūtīts, kad sūtījums ir apstiprināts (un ja visu sūtījumu sūtītais daudzums ir tāds pats kā atjaunināšanas rīkojumā) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Saistīto avotu pārdevēju priekšlikuma klasifikācija tiek apmaksāta, kad tiek apstiprināts piegādātāja rēķins (un ja rēķina summa ir tāda pati kā saistītā piedāvājuma kopējā summa) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klasificēt saistīto avotu pirkuma pasūtījumu, par kuru jāmaksā, kad tiek apstiprināts piegādātāja rēķins (un ja rēķina summa ir tāda pati kā saistītā pasūtījuma summa) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automātiska veidošana AutomaticClassification=Automātiskā klasifikācija diff --git a/htdocs/langs/lv_LV/zapier.lang b/htdocs/langs/lv_LV/zapier.lang index 918fcac049e..01aa75944cb 100644 --- a/htdocs/langs/lv_LV/zapier.lang +++ b/htdocs/langs/lv_LV/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Par zapier Dolibarr moduli # Admin page # ZapierForDolibarrSetup = Zapier iestatīšana Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/mk_MK/accountancy.lang b/htdocs/langs/mk_MK/accountancy.lang index 85a60bc34c1..2d3a4148592 100644 --- a/htdocs/langs/mk_MK/accountancy.lang +++ b/htdocs/langs/mk_MK/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/mk_MK/admin.lang b/htdocs/langs/mk_MK/admin.lang index fcccf8203a1..5f849265afa 100644 --- a/htdocs/langs/mk_MK/admin.lang +++ b/htdocs/langs/mk_MK/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Фактури на добавувачи MailToSendContract=Договори +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Корисници MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/mk_MK/agenda.lang b/htdocs/langs/mk_MK/agenda.lang index d496042c639..30c0db6cc9f 100644 --- a/htdocs/langs/mk_MK/agenda.lang +++ b/htdocs/langs/mk_MK/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Број на настани ListOfActions=Листа на настани EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/mk_MK/boxes.lang b/htdocs/langs/mk_MK/boxes.lang index 9ca344b850b..98e75053287 100644 --- a/htdocs/langs/mk_MK/boxes.lang +++ b/htdocs/langs/mk_MK/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Добавувачи: најнови %s измени BoxTitleLastModifiedCustomers=Клиенти: најнови %s измени BoxTitleLastCustomersOrProspects=Најнови %s клиенти или потенцијални клиенти -BoxTitleLastCustomerBills=Најнови %s фактури за клиенти -BoxTitleLastSupplierBills=Најнови %s фактури за добавувачи +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Потенцијални клиенти: најнови %s измени BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Нарачки на добавувачи: BoxTitleLastModifiedCustomerBills=Фактури на клиенти: најнови %s измени BoxTitleLastModifiedCustomerOrders=Нарачки за продажба: најнови %s изменети BoxTitleLastModifiedPropals=Најнови %sизменети понуди +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Фактури на клиенти ForCustomersOrders=Нарачки на клиенти ForProposals=Понуди @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Сметководство diff --git a/htdocs/langs/mk_MK/cashdesk.lang b/htdocs/langs/mk_MK/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/mk_MK/cashdesk.lang +++ b/htdocs/langs/mk_MK/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/mk_MK/compta.lang b/htdocs/langs/mk_MK/compta.lang index 6cd046c5607..8f4f058bb87 100644 --- a/htdocs/langs/mk_MK/compta.lang +++ b/htdocs/langs/mk_MK/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/mk_MK/contracts.lang b/htdocs/langs/mk_MK/contracts.lang index 0ef3bd087f5..d9c15d52a07 100644 --- a/htdocs/langs/mk_MK/contracts.lang +++ b/htdocs/langs/mk_MK/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Активни услуги MenuExpiredServices=Истечени услуги MenuClosedServices=Склучени услуги NewContract=Нов Договор -NewContractSubscription=Нов Договор / Претплата +NewContractSubscription=New contract or subscription AddContract=Креирај Договор DeleteAContract=Избриши Договор ActivateAllOnContract=Активирај ги сите услуги diff --git a/htdocs/langs/mk_MK/errors.lang b/htdocs/langs/mk_MK/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/mk_MK/errors.lang +++ b/htdocs/langs/mk_MK/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/mk_MK/languages.lang b/htdocs/langs/mk_MK/languages.lang index 28aadaa3c41..3e571f0e756 100644 --- a/htdocs/langs/mk_MK/languages.lang +++ b/htdocs/langs/mk_MK/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Арапски Language_ar_EG=Arabic (Egypt) Language_ar_SA=Арапски +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Бугарската Language_bs_BA=Босанската Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=Англиски (Велика Британија) Language_en_IN=Англиски (Индија) Language_en_NZ=Англиски (Нов Зеланд) Language_en_SA=Англиски (Саудиска Арабија) +Language_en_SG=English (Singapore) Language_en_US=Англиски јазик (САД) Language_en_ZA=Англиски (Јужна Африка) Language_es_ES=Шпански @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Шпански (Хондурас) Language_es_MX=Шпански (Мексико) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Шпански (Парагвај) Language_es_PE=Шпански (Перу) Language_es_PR=Шпански (Порто Рико) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Естонскиот Language_eu_ES=Баскиската @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Француски (Белгија) Language_fr_CA=Француски (Канада) Language_fr_CH=Француски (Швајцарија) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Француски +Language_fr_GA=French (Gabon) Language_fr_NC=Француски (Нова Каледонија) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Хебрејски +Language_hi_IN=Hindi (India) Language_hr_HR=Хрватската Language_hu_HU=Унгарската Language_id_ID=Indonesian Language_is_IS=Исландски Language_it_IT=Италијански +Language_it_CH=Italian (Switzerland) Language_ja_JP=Јапонски Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Летонски Language_mk_MK=Македонски Language_mn_MN=Mongolian Language_nb_NO=Норвешки (бокмал) +Language_ne_NP=Nepali Language_nl_BE=Холанѓаните (Белгија) Language_nl_NL=Dutch Language_pl_PL=Полскиот @@ -86,4 +100,5 @@ Language_uz_UZ=Узбекистански Language_vi_VN=Виетнамски Language_zh_CN=Кинески Language_zh_TW=Кинески (традиционален) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/mk_MK/mails.lang b/htdocs/langs/mk_MK/mails.lang index 6708fce5b2c..4d668952b76 100644 --- a/htdocs/langs/mk_MK/mails.lang +++ b/htdocs/langs/mk_MK/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/mk_MK/main.lang b/htdocs/langs/mk_MK/main.lang index 504172c8a82..5d4bfbd830e 100644 --- a/htdocs/langs/mk_MK/main.lang +++ b/htdocs/langs/mk_MK/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Корисници MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/mk_MK/members.lang b/htdocs/langs/mk_MK/members.lang index 87cdf8cbc8b..467272c0dca 100644 --- a/htdocs/langs/mk_MK/members.lang +++ b/htdocs/langs/mk_MK/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/mk_MK/mrp.lang b/htdocs/langs/mk_MK/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/mk_MK/mrp.lang +++ b/htdocs/langs/mk_MK/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/mk_MK/other.lang b/htdocs/langs/mk_MK/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/mk_MK/other.lang +++ b/htdocs/langs/mk_MK/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/mk_MK/products.lang b/htdocs/langs/mk_MK/products.lang index 746acff477a..9dd0aa9f659 100644 --- a/htdocs/langs/mk_MK/products.lang +++ b/htdocs/langs/mk_MK/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/mk_MK/projects.lang b/htdocs/langs/mk_MK/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/mk_MK/projects.lang +++ b/htdocs/langs/mk_MK/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/mk_MK/recruitment.lang b/htdocs/langs/mk_MK/recruitment.lang new file mode 100644 index 00000000000..79e3e8dfbaf --- /dev/null +++ b/htdocs/langs/mk_MK/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Подесувања +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/mk_MK/stocks.lang b/htdocs/langs/mk_MK/stocks.lang index b54d54f93cc..8c01a131abc 100644 --- a/htdocs/langs/mk_MK/stocks.lang +++ b/htdocs/langs/mk_MK/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/mk_MK/suppliers.lang b/htdocs/langs/mk_MK/suppliers.lang index def35a334b4..3f3c872195a 100644 --- a/htdocs/langs/mk_MK/suppliers.lang +++ b/htdocs/langs/mk_MK/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s ? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/mk_MK/workflow.lang b/htdocs/langs/mk_MK/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/mk_MK/workflow.lang +++ b/htdocs/langs/mk_MK/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/mk_MK/zapier.lang b/htdocs/langs/mk_MK/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/mk_MK/zapier.lang +++ b/htdocs/langs/mk_MK/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/mn_MN/accountancy.lang b/htdocs/langs/mn_MN/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/mn_MN/accountancy.lang +++ b/htdocs/langs/mn_MN/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/mn_MN/admin.lang b/htdocs/langs/mn_MN/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/mn_MN/admin.lang +++ b/htdocs/langs/mn_MN/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/mn_MN/agenda.lang b/htdocs/langs/mn_MN/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/mn_MN/agenda.lang +++ b/htdocs/langs/mn_MN/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/mn_MN/boxes.lang b/htdocs/langs/mn_MN/boxes.lang index 8fe1f84b149..d6fd298a3a7 100644 --- a/htdocs/langs/mn_MN/boxes.lang +++ b/htdocs/langs/mn_MN/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/mn_MN/cashdesk.lang b/htdocs/langs/mn_MN/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/mn_MN/cashdesk.lang +++ b/htdocs/langs/mn_MN/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/mn_MN/compta.lang b/htdocs/langs/mn_MN/compta.lang index 6cd046c5607..8f4f058bb87 100644 --- a/htdocs/langs/mn_MN/compta.lang +++ b/htdocs/langs/mn_MN/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/mn_MN/contracts.lang b/htdocs/langs/mn_MN/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/mn_MN/contracts.lang +++ b/htdocs/langs/mn_MN/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/mn_MN/errors.lang b/htdocs/langs/mn_MN/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/mn_MN/errors.lang +++ b/htdocs/langs/mn_MN/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/mn_MN/languages.lang b/htdocs/langs/mn_MN/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/mn_MN/languages.lang +++ b/htdocs/langs/mn_MN/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/mn_MN/mails.lang b/htdocs/langs/mn_MN/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/mn_MN/mails.lang +++ b/htdocs/langs/mn_MN/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/mn_MN/main.lang b/htdocs/langs/mn_MN/main.lang index 8eb796fa94e..1332148ae67 100644 --- a/htdocs/langs/mn_MN/main.lang +++ b/htdocs/langs/mn_MN/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/mn_MN/members.lang b/htdocs/langs/mn_MN/members.lang index 5886c598d52..5ef946ddf67 100644 --- a/htdocs/langs/mn_MN/members.lang +++ b/htdocs/langs/mn_MN/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/mn_MN/mrp.lang b/htdocs/langs/mn_MN/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/mn_MN/mrp.lang +++ b/htdocs/langs/mn_MN/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/mn_MN/other.lang b/htdocs/langs/mn_MN/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/mn_MN/other.lang +++ b/htdocs/langs/mn_MN/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/mn_MN/products.lang b/htdocs/langs/mn_MN/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/mn_MN/products.lang +++ b/htdocs/langs/mn_MN/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/mn_MN/projects.lang b/htdocs/langs/mn_MN/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/mn_MN/projects.lang +++ b/htdocs/langs/mn_MN/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/mn_MN/recruitment.lang b/htdocs/langs/mn_MN/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/mn_MN/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/mn_MN/stocks.lang b/htdocs/langs/mn_MN/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/mn_MN/stocks.lang +++ b/htdocs/langs/mn_MN/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/mn_MN/suppliers.lang b/htdocs/langs/mn_MN/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/mn_MN/suppliers.lang +++ b/htdocs/langs/mn_MN/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/mn_MN/workflow.lang b/htdocs/langs/mn_MN/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/mn_MN/workflow.lang +++ b/htdocs/langs/mn_MN/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/mn_MN/zapier.lang b/htdocs/langs/mn_MN/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/mn_MN/zapier.lang +++ b/htdocs/langs/mn_MN/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/nb_NO/accountancy.lang b/htdocs/langs/nb_NO/accountancy.lang index 245636d5c7e..5bc3643e0f4 100644 --- a/htdocs/langs/nb_NO/accountancy.lang +++ b/htdocs/langs/nb_NO/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Tillat å administrere forskjellig antall nuller på slut BANK_DISABLE_DIRECT_INPUT=Deaktiver direkteregistrering av transaksjoner på bankkonto ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Aktiver eksportutkast i journal ACCOUNTANCY_COMBO_FOR_AUX=Aktiver kombinasjonsliste for datterkonto (kan være treg hvis du har mange tredjeparter) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Salgsjournal ACCOUNTING_PURCHASE_JOURNAL=Innkjøpsjournal @@ -284,6 +285,7 @@ ShowTutorial=Vis veiledning NotReconciled=Ikke sammenslått ## Admin +BindingOptions=Binding options ApplyMassCategories=Masseinnlegging av kategorier AddAccountFromBookKeepingWithNoCategories=Tilgjengelig konto er ennå ikke i en personlig gruppe CategoryDeleted=Kategori for regnskapskontoen er blitt slettet diff --git a/htdocs/langs/nb_NO/admin.lang b/htdocs/langs/nb_NO/admin.lang index 99fec9a8f23..57f0782b96f 100644 --- a/htdocs/langs/nb_NO/admin.lang +++ b/htdocs/langs/nb_NO/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Standard avsender-epost for manuell sending (Bruker-e UserEmail=Bruker-epost CompanyEmail=Firma epost FeatureNotAvailableOnLinux=Funksjonen er ikke tilgjengelig på Unix/Linux. Test sendmail lokalt. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Hvis oversettelsen for dette språket ikke er fullført, eller du finner feil, kan du rette opp dette ved å redigere filer i katalogen langs/%s og sende inn endringen til www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Hvis oversettelse for dette språket ikke er fullstendig eller du finner feil, kan du korrigere dette ved å redigere filer i katalogen langs/%s og sende endrede filer på dolibarr.org/forum eller for utviklere på github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Modulinnstillinger ModulesSetup=Moduler/Applikasjonsoppsett ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modulen %s må aktiveres før du kan bruke denne SecurityToken=Nøkkel til sikre nettadresser NoSmsEngine=Ingen SMS avsender tilgjengelig. SMS-håndterer er ikke installert med standardinstallasjon (fordi de er avhengig av en ekstern leverandør), men du kan finne noen på %s PDF=PDF -PDFDesc=Globale alternativer for PDF-generering -PDFAddressForging=Regler for adressebokser +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Skjul all informasjon relatert til skatt/MVA på generert PDF PDFRulesForSalesTax=Regler for salgsskatt/mva PDFLocaltax=Regler for %s -HideLocalTaxOnPDF=Skjul %s rate i kolonne MVA Salg +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Skjul varebeskrivelse HideRefOnPDF=Skjul varereferanse HideDetailsOnPDF=Skjul linjer med varedetaljer @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Endre på prisene med base referanseverdi definert på MassConvert=Start massekonvertering PriceFormatInCurrentLanguage=Prisformat på nåværende språk String=Streng +String1Line=String (1 line) TextLong=Lang tekst +TextLongNLines=Long text (n lines) HtmlText=HTML-tekst Int=Integer Float=Float @@ -446,7 +449,7 @@ LinkToTestClickToDial=Angi et telefonnummer å ringe for å vise en link for å RefreshPhoneLink=Oppdater kobling LinkToTest=Klikkbar link generert for bruker%s (klikk telefonnummer for å teste) KeepEmptyToUseDefault=Hold tomt for å bruke standardverdien -KeepThisEmptyInMostCases=In most cases, you can keep this field empy. +KeepThisEmptyInMostCases=I de fleste tilfeller kan du beholde dette feltet tomt. DefaultLink=Standard kobling SetAsDefault=Sett som standard ValueOverwrittenByUserSetup=Advarsel, denne verdien kan bli overskrevet av brukerspesifikke oppsett (hver bruker kan sette sitt eget clicktodial url) @@ -542,10 +545,10 @@ Module54Name=Kontrakter/abonnement Module54Desc=Forvaltning av kontrakter (tjenester eller tilbakevendende abonnementer) Module55Name=Strekkoder Module55Desc=Behandling av strekkoder -Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direkte Debitbetalinger -Module57Desc=Håndtering av direktedebet betalingsordre. Inkluderer generering av SEPA-fil for europeiske land +Module56Name=Betaling med kredittoverføring +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=ClickToDial integrasjon Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Opprett/endre tjenester Permission534=Slett tjenester Permission536=Administrer skjulte tjenester Permission538=Eksporter tjenester +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Les BOM (Bills of Materials) Permission651=Opprett/oppdater BOM Permission652=Slett BOM +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Vis donasjoner Permission702=Opprett/endre donasjoner Permission703=Slett donasjoner @@ -848,6 +858,8 @@ Permission773=Slett utgiftsrapport Permission774=Les alle utgiftsrapporter (alle brukere) Permission775=Godkjenn utgiftsrapport Permission776=Betal utgift +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Eksporter utgiftsrapporter Permission1001=Vis beholdning Permission1002=Opprett/endre lager @@ -900,6 +912,7 @@ Permission2515=Oppsett av dokumentmapper Permission2801=Bruk FTP-klient i lesemodus (bla gjennom og laste ned) Permission2802=Bruk FTP-klient i skrivemodus (slette eller laste opp filer) Permission3200=Les arkiverte hendelser og fingeravtrykk +Permission3301=Generate new modules Permission4001=Se ansatte Permission4002=Opprett ansatte Permission4003=Slett ansatte @@ -947,7 +960,8 @@ Permission63003=Slett ressurser Permission63004=Koble ressurser til agendahendelser DictionaryCompanyType=Tredjepartstyper DictionaryCompanyJuridicalType=Tredjeparts juridiske enheter -DictionaryProspectLevel=Prospektpotensiale +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Stater/provinser DictionaryRegion=Region DictionaryCountry=Land @@ -977,7 +991,8 @@ DictionaryEMailTemplates=E-postmaler DictionaryUnits=Enheter DictionaryMeasuringUnits=Måleenheter DictionarySocialNetworks=Sosiale nettverk -DictionaryProspectStatus=Prospektstatus +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Typer permisjon DictionaryOpportunityStatus=Lead status for prosjekt/lead DictionaryExpenseTaxCat=Utgiftsrapport - Transportkategorier @@ -1076,7 +1091,7 @@ LoginPage=Innloggingsside BackgroundImageLogin=Bakgrunnsbilde PermanentLeftSearchForm=Permanent søkeskjema i venstre meny DefaultLanguage=Standardspråk -EnableMultilangInterface=Aktiver flerspråklig støtte +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Vis firmalogoen i menyen CompanyInfo=Firma/organisasjon CompanyIds=Firma-/organisasjonsidentiteter @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Et søkekriterie er nødvendig for nøkke NewTranslationStringToShow=Ny oversettelsesstreng som skal vises OriginalValueWas=Den originale oversettelsen er overskrevet. Original verdi var:

    %s TransKeyWithoutOriginalValue=Du tvang en ny oversettelse for oversettelsesnøkkelen ' %s' som ikke finnes i noen språkfiler -TotalNumberOfActivatedModules=Aktiverte applikasjoner/moduler: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Du må minst aktivere en modul ClassNotFoundIntoPathWarning=Klasse %s ikke funnet i PHP banen YesInSummer=Ja i sommer @@ -1264,7 +1280,7 @@ FieldEdition=Endre felt %s FillThisOnlyIfRequired=Eksempel: +2 (brukes kun hvis du opplever problemer med tidssone offset) GetBarCode=Hent strekkode NumberingModules=Nummereringsmodeller -DocumentModules=Document models +DocumentModules=Dokumentmodeller ##### Module password generation PasswordGenerationStandard=Gir et automatisk laget passord med 8 tegn (bokstaver og tall) i små bokstaver. PasswordGenerationNone=Ikke foreslå å generere passord. Passord må legges inn manuelt. @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Bruk hendelsestyper (administrert i menyoppsett -> Ordbøk AGENDA_USE_EVENT_TYPE_DEFAULT=Angi denne standardverdien automatisk for type hendelse i skjema for hendelsesoppretting AGENDA_DEFAULT_FILTER_TYPE=Still inn denne typen hendelse automatisk i søkefilter i agendavisning AGENDA_DEFAULT_FILTER_STATUS=Angi denne status automatisk for hendelser i søkefilter i agendavisning -AGENDA_DEFAULT_VIEW=Hvilken fane vil åpne som standard når du velger Agenda-menyen? +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Aktiver hendelsespåminnelse via e-post (påminnelsesalternativ/forsinkelse kan defineres for hver hendelse). Merk: Modul %s må være aktivert og riktig satt opp for å få påminnelse sendt med riktig frekvens. AGENDA_REMINDER_BROWSER=Aktiver hendelsespåminnelse i brukerens nettleser (når hendelsesdatoen er nådd, kan hver bruker nekte dette fra spørsmålet om nettleserbekreftelse) AGENDA_REMINDER_BROWSER_SOUND=Aktiver lydvarsler @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Vis koblet objekt i agendavisning ##### Clicktodial ##### ClickToDialSetup='Click To Dial' modul ClickToDialUrlDesc=Url som kalles når man klikker på telefonpiktogrammet. I URL kan du bruke koder
    __ PHONETO __ som blir erstattet med telefonnummeret til personen som skal ringes
    __ PHONEFROM __ som blir erstattet med telefonnummeret til den som ringer(din)
    __ LOGIN __ som vil bli erstattet med clicktodial login (definert på brukerkort)
    __ PASS __ som vil bli erstattet med clicktodial passord (definert på brukerkort). -ClickToDialDesc=Denne modulen gjør telefonnumre til klikkbare koblinger. Et klikk på ikonet vil få telefonen til å ringe nummeret. Dette kan brukes til å ringe et call-center-system fra Dolibarr som kan ringe telefonnummeret på et SIP-system. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Bruk kun en lenke "tlf:" for telefonnumre ClickToDialUseTelLinkDesc=Bruk denne metoden hvis brukerne har en softphone eller et programvaregrensesnitt installert på samme datamaskin som nettleseren, og kalles når du klikker på en link i nettleseren din som starter med "tel:". Hvis du trenger en full server-løsning (uten behov for lokal installasjon av programvare), må du sette denne på "Nei" og fylle neste felt. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Dette feltet inneholder en referanse til identifikasjon av linje. B Enter0or1=Skriv inn 0 eller 1 UnicodeCurrency=Her legger du inn en liste med Ascii-verdier, som representerer et valutasymbol. For eksempel: $ = [36], Brasilsk real R$ = [82,36], € = [8364] ColorFormat=RGB-fargen er i HEX-format, for eksempel: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Plassering av linje i kombinasjonslister SellTaxRate=Salgs-skattesats RecuperableOnly=Ja for MVA"Ikke oppfattet, men gjenopprettelig" dedikert til noen steder i Frankrike. Hold verdien til "Nei" i alle andre tilfeller. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Prisforespørsel MailToSendSupplierOrder=Innkjøpsordrer MailToSendSupplierInvoice=Leverandørfakturaer MailToSendContract=Kontrakter +MailToSendReception=Mottak MailToThirdparty=Tredjeparter MailToMember=Medlemmer MailToUser=Brukere @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s er tilgjengelig. Versj ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s er tilgjengelig. Versjon %s er en vedlikeholdsversjon, så den inneholder bare feilrettinger. Vi anbefaler alle brukere å oppgradere til denne versjonen. En vedlikeholdsløsning introduserer ikke nye funksjoner eller endringer i databasen. Du kan laste den ned fra nedlastingsområdet på https://www.dolibarr.org portal (underkatalog Stable versions). Du kan lese ChangeLog for fullstendig liste over endringer. MultiPriceRuleDesc=Når alternativet "Flere prisnivået pr. vare/tjeneste" er på, kan du definere forskjellige priser (ett pr prisnivå) for hvert produkt. For å spare tid, kan du lage en regel som gir pris for hvert nivå autokalkulert i forhold til prisen på første nivå, slik at du bare legger inn en pris for hvert produkt. Denne siden er laget for å spare tid og kan være nyttig hvis prisene for hvert nivå står i forhold til første nivå. Du kan ignorere denne siden i de fleste tilfeller. ModelModulesProduct=Maler for produkt-dokumenter +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=For å kunne generere koder automatisk, må du først definere et program for å automatisk definere strekkodenummeret. SeeSubstitutionVars=Relaterte gjentakende fakturaer SeeChangeLog=Se Endringslogg-fil (kun på engelsk) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Venstremarg på PDF MAIN_PDF_MARGIN_RIGHT=Høyremarg på PDF MAIN_PDF_MARGIN_TOP=Toppmarg på PDF MAIN_PDF_MARGIN_BOTTOM=Bunnmarg på PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Det er ikke noe spesifikt oppsett som kreves for denne modulen. SetToYesIfGroupIsComputationOfOtherGroups=Sett til ja hvis denne gruppen er en beregning av andre grupper EnterCalculationRuleIfPreviousFieldIsYes=Angi kalkuleringsregel hvis tidligere felt ble satt til Ja (for eksempel 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Ingenting gjort XEmailsDoneYActionsDone=%s e-postmeldinger kvalifiserte, %s e-postmeldinger som er vellykket behandlet (for %s-post/handlinger utført) RecordEvent=Registrer e-posthendelse CreateLeadAndThirdParty=Opprett lead (og tredjepart om nødvendig) -CreateTicketAndThirdParty=Opprett billett (og tredjepart om nødvendig) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Siste resultatkode NbOfEmailsInInbox=Antall e-poster i kildemappen LoadThirdPartyFromName=Legg inn tredjepartsøk på %s (bare innlasting) LoadThirdPartyFromNameOrCreate=Legg inn tredjepartsøk på %s (opprett hvis ikke funnet) -WithDolTrackingID=Dolibarr referanse funnet i Meldings-ID -WithoutDolTrackingID=Dolibarr referanse ikke funnet i Meldings-ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Postnummer MainMenuCode=Meny-oppføringskode (hovedmeny) ECMAutoTree=Vis ECM-tre automatisk  @@ -1981,7 +2002,7 @@ ImportSetup=Oppsett av importmodul InstanceUniqueID=Unik ID for forekomsten SmallerThan=Mindre enn LargerThan=Større enn -IfTrackingIDFoundEventWillBeLinked=Merk at hvis en sporings-ID er funnet i innkommende e-post, blir hendelsen automatisk koblet til relaterte objekter. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Med en Gmail-konto, hvis du aktiverte 2-trinns validering, anbefales det å opprette et dedikert annet passord for applikasjonen, i stedet for å bruke ditt eget kontopassord fra https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=Du kan bruke denne handlingen til å bruke e-postinnholdet til å finne og laste inn en eksisterende tredjepart i databasen din. Den funnet (eller opprettede) tredjeparten vil bli brukt til å følge handlinger som trenger det. I parameterfeltet kan du bruke for eksempel 'EXTRACT:BODY:Name:\\s([^\\s]*)' hvis du vil trekke ut navnet på tredjeparten fra en streng 'Name: name to find' funnet i teksten. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Gå til Setup -> Widgets MeasuringUnitTypeDesc=Bruk en verdi som "størrelse", "overflate", "volum", "vekt", "tid" MeasuringScaleDesc=Skalaen er antall steder du må flytte kommaet for å samsvare med standard referansenhet. For enhetstypen "tid" er det antall sekunder. Verdier mellom 80 og 99 er reserverte verdier. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/nb_NO/agenda.lang b/htdocs/langs/nb_NO/agenda.lang index 9861d576c3d..755d782a5e0 100644 --- a/htdocs/langs/nb_NO/agenda.lang +++ b/htdocs/langs/nb_NO/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Antall hendelser ListOfActions=Oversikt over hendelser EventReports=Hendelsesrapporter Location=Lokasjon -ToUserOfGroup=Til tilfeldig bruker i gruppe +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Hendelse over hele dagen(e) MenuToDoActions=Alle åpne handlinger MenuDoneActions=Alle avsluttede handlinger @@ -63,7 +63,7 @@ ShipmentClassifyClosedInDolibarr=Forsendelse %s klassifisert fakturert ShipmentUnClassifyCloseddInDolibarr=Forsendelse %s klassifisert gjenåpnet ShipmentBackToDraftInDolibarr=Sett levering %s tilbake til utkaststatus ShipmentDeletedInDolibarr=Leveranse %s slettet -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=Mottak %s validert OrderCreatedInDolibarr=Ordre %s opprettet OrderValidatedInDolibarr=Ordre %s validert OrderDeliveredInDolibarr=Ordre %s klassifisert som levert @@ -86,6 +86,8 @@ ProposalDeleted=Tilbud slettet OrderDeleted=Ordre slettet InvoiceDeleted=Faktura slettet DraftInvoiceDeleted=Fakturautkast slettet +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Vare%s opprettet PRODUCT_MODIFYInDolibarr=Vare %s endret PRODUCT_DELETEInDolibarr=Vare %s slettet @@ -158,3 +160,9 @@ DateStartPlusOne=Startdato + 1 time SetAllEventsToTodo=Sett alle hendelser til ToDo SetAllEventsToInProgress=Sett alle begivenheter til Pågår SetAllEventsToFinished=Sett alle hendelser til Ferdig +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/nb_NO/banks.lang b/htdocs/langs/nb_NO/banks.lang index 27d5370144a..dfe2685ab83 100644 --- a/htdocs/langs/nb_NO/banks.lang +++ b/htdocs/langs/nb_NO/banks.lang @@ -39,7 +39,7 @@ StandingOrders=Direktedebetsordre StandingOrder=Direktedebet-ordre PaymentByDirectDebit=Payment by direct debit PaymentByBankTransfers=Payments by credit transfer -PaymentByBankTransfer=Payment by credit transfer +PaymentByBankTransfer=Betaling med kredittoverføring AccountStatement=Kontoutskrift AccountStatementShort=Utskrift AccountStatements=Kontoutskrifter diff --git a/htdocs/langs/nb_NO/bills.lang b/htdocs/langs/nb_NO/bills.lang index 96ec3ebe05e..0ce361d058e 100644 --- a/htdocs/langs/nb_NO/bills.lang +++ b/htdocs/langs/nb_NO/bills.lang @@ -383,7 +383,7 @@ GeneratedFromTemplate=Generert fra fakturamal %s WarningInvoiceDateInFuture=Advarsel, fakturadato er høyere enn dagens dato WarningInvoiceDateTooFarInFuture=Advarsel, er fakturadato for langt fra dagens dato ViewAvailableGlobalDiscounts=Vis tilgjengelige rabatter -GroupPaymentsByModOnReports=Group payments by mode on reports +GroupPaymentsByModOnReports=Gruppebetalinger etter modus på rapporter # PaymentConditions Statut=Status PaymentConditionShortRECEP=Forfall ved mottak @@ -441,8 +441,8 @@ BankAccountNumberKey=Sjekksum Residence=Adresse IBANNumber=IBAN kontonummer IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=Kundes IBAN +SupplierIBAN=Leverandørs IBAN BIC=BIC/SWIFT BICNumber=BIC/SWIFT-kode ExtraInfos=Ekstra informasjon @@ -572,6 +572,6 @@ AutoFillDateToShort=Angi sluttdato MaxNumberOfGenerationReached=Maks ant. genereringer nådd BILL_DELETEInDolibarr=Faktura slettet BILL_SUPPLIER_DELETEInDolibarr=Leverandørfaktura slettet -UnitPriceXQtyLessDiscount=Unit price x Qty - Discount -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area +UnitPriceXQtyLessDiscount=Enhetspris x Antall - Rabatt +CustomersInvoicesArea=Kunde-faktureringsområde +SupplierInvoicesArea=Leverandør faktureringsområde diff --git a/htdocs/langs/nb_NO/boxes.lang b/htdocs/langs/nb_NO/boxes.lang index 42dfc31daa7..494febc0a2f 100644 --- a/htdocs/langs/nb_NO/boxes.lang +++ b/htdocs/langs/nb_NO/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Siste %s registrerte leverandører BoxTitleLastModifiedSuppliers=Leverandører: siste %s endret BoxTitleLastModifiedCustomers=Kunder: Siste%s endret BoxTitleLastCustomersOrProspects=Siste %s endrede kunder eller prospekter -BoxTitleLastCustomerBills=Siste %s Kundefakturaer -BoxTitleLastSupplierBills=Siste %s Leverandørfakturaer +BoxTitleLastCustomerBills=Siste %s endrede kundefakturaer +BoxTitleLastSupplierBills=Siste %s endrede leverandørfakturaer BoxTitleLastModifiedProspects=Prospekter: siste %s endret BoxTitleLastModifiedMembers=Siste %s medlemmer BoxTitleLastFicheInter=Siste %s endrede intervensjoner @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Leverandørordre: siste %s endret BoxTitleLastModifiedCustomerBills=Kundefakturaer: siste %s endret BoxTitleLastModifiedCustomerOrders=Salgsordre: siste %s endret BoxTitleLastModifiedPropals=Siste %s endrede tilbud +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Kundefakturaer ForCustomersOrders=Kundeordrer ForProposals=Tilbud @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Spenningskonto er ikke definert BoxLastCustomerShipments=Siste kundeforsendelser BoxTitleLastCustomerShipments=Siste %s kundeforsendelser NoRecordedShipments=Ingen registrert kundesending +# Pages +AccountancyHome=Regnskap diff --git a/htdocs/langs/nb_NO/cashdesk.lang b/htdocs/langs/nb_NO/cashdesk.lang index 2db692330d1..de0728f2754 100644 --- a/htdocs/langs/nb_NO/cashdesk.lang +++ b/htdocs/langs/nb_NO/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS-modul BasicPhoneLayout=Bruk grunnleggende oppsett for telefoner SetupOfTerminalNotComplete=Installasjonen av terminal %s er ikke fullført DirectPayment=Direktebetaling -DirectPaymentButton=Direkte kontantbetalings-knapp +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Faktura er allerede validert NoLinesToBill=Ingen linjer å fakturere CustomReceipt=Tilpasset kvittering @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Ekstern modul med ekstra funksjoner. Mulighet PrintMethod=Utskriftsmetode ReceiptPrinterMethodDescription=Metode med mange parametere. Full tilpassbar med maler. Kan ikke skrive ut fra skyen. ByTerminal=Med terminal -TakeposNumpadUsePaymentIcon=Bruk betalingsikonet på numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN}-tag brukes til å legge til terminalnummeret TakeposGroupSameProduct=Grupper samme produktlinjer StartAParallelSale=Start et nytt parallellsalg -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Kontantrapport MainPrinterToUse=Hovedskriver som skal brukes @@ -108,12 +108,17 @@ MainTemplateToUse=Hovedmal som skal brukes OrderTemplateToUse=Ordremal som skal brukes BarRestaurant=Bar Restaurant AutoOrder=Order by the customer himself -RestaurantMenu=Menu -CustomerMenu=Customer menu -ScanToMenu=Scan QR code to see the menu -ScanToOrder=Scan QR code to order +RestaurantMenu=Meny +CustomerMenu=Kundemeny +ScanToMenu=Skann QR-koden for å se menyen +ScanToOrder=Skann QR-koden for å bestille Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/nb_NO/compta.lang b/htdocs/langs/nb_NO/compta.lang index 4d55842aec8..3cdb939010a 100644 --- a/htdocs/langs/nb_NO/compta.lang +++ b/htdocs/langs/nb_NO/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Skatt eller avgift SocialContributions=Skatter eller avgifter SocialContributionsDeductibles=Fradragsberettigede avgifter SocialContributionsNondeductibles=Ikke fradragsberettigede avgifter +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Etikett bidrag TypeContrib=Type bidrag MenuSpecialExpenses=Spesielle utgifter diff --git a/htdocs/langs/nb_NO/contracts.lang b/htdocs/langs/nb_NO/contracts.lang index 9a7cf3c6a2d..1a0c7a929c8 100644 --- a/htdocs/langs/nb_NO/contracts.lang +++ b/htdocs/langs/nb_NO/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Løpende tjenester MenuExpiredServices=Utløpte tjenester MenuClosedServices=Lukkede tjenester NewContract=Ny kontrakt -NewContractSubscription=Ny kontrakt/abonnement +NewContractSubscription=Ny kontrakt eller abonnement AddContract=Opprett kontrakt DeleteAContract=Slett kontrakt ActivateAllOnContract=Aktiver alle tjenester @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Salgsrepresentant som følger opp kont TypeContact_contrat_external_BILLING=Kundekontakt faktura TypeContact_contrat_external_CUSTOMER=Kundekontakt oppfølging TypeContact_contrat_external_SALESREPSIGN=Kundens signaturkontakt -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Skjul lukkede tjenester som standard +ShowClosedServices=Vis lukkede tjenester +HideClosedServices=Skjul lukkede tjenester diff --git a/htdocs/langs/nb_NO/errors.lang b/htdocs/langs/nb_NO/errors.lang index 9d8e9ac47fb..7a37155c119 100644 --- a/htdocs/langs/nb_NO/errors.lang +++ b/htdocs/langs/nb_NO/errors.lang @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Feil syntaks for leverandørkode ErrorSupplierCodeRequired=Leverandørkode kreves ErrorSupplierCodeAlreadyUsed=Leverandørkode allerede brukt ErrorBadParameters=Ugyldige parametere -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Feil eller manglende parametre ErrorBadValueForParameter=Feil verdi '%s' for parameter '%s' ErrorBadImageFormat=Bildeformatet støttes ikke (Din PHP støtter ikke konvertering av dette formatet) ErrorBadDateFormat=Verdien '%s' har feil datoformat @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Ny verdi kan ikke være lik den gamle ErrorFailedToValidatePasswordReset=Klarte ikke å initialisere passordet på nytt. Initialiseringen kan allerede ha blitt utført (denne lenken kan bare brukes en gang). Hvis ikke, prøv å starte prosessen på nytt ErrorToConnectToMysqlCheckInstance=Tilkobling til databasen feiler. Sjekk at databaseserveren kjører (for eksempel med mysql/mariadb, kan du starte den fra kommandolinjen med 'sudo service mysql start'). ErrorFailedToAddContact=Klarte ikke å legge til kontakt -ErrorDateMustBeBeforeToday=Datoen kan ikke settes til etter i dag +ErrorDateMustBeBeforeToday=Datoen må være før i dag +ErrorDateMustBeInFuture=Datoen må være etter i dag ErrorPaymentModeDefinedToWithoutSetup=En betalingsmodus var satt til å skrive %s, men oppsett av modulen Faktura er ikke ferdig definert for å vise for denne betalingsmodusen. ErrorPHPNeedModule=Feil! Din PHP må ha modulen %s installert for å kunne bruke denne funksjonen. ErrorOpenIDSetupNotComplete=Du satte opp Dolibarr config-filen til å tillate OpenID-autentisering, men url til OpenID-tjenesten er ikke definert i konstanten %s @@ -184,7 +185,7 @@ ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Bad Definition Of Menu Array In ErrorSavingChanges=En feil oppsto under lagring av endringer ErrorWarehouseRequiredIntoShipmentLine=Lager er obligatorisk for å kunne levere ErrorFileMustHaveFormat=Filen må ha formatet %s -ErrorFilenameCantStartWithDot=Filename can't start with a '.' +ErrorFilenameCantStartWithDot=Filnavn kan ikke starte med et '.' ErrorSupplierCountryIsNotDefined=Land for denne leverandøren er ikke definert. Rett dette først. ErrorsThirdpartyMerge=Klarte ikke å flette de to postene. Forespørsel ble avbrutt. ErrorStockIsNotEnoughToAddProductOnOrder=Lagernivå er for lavt for å legge %s til i en ny ordre @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Ikke nok mengde for dette p ErrorOnlyOneFieldForGroupByIsPossible=Bare ett felt for 'Grupper etter' er mulig (andre blir forkastet) ErrorTooManyDifferentValueForSelectedGroupBy=Fant for mange forskjellige verdier (mer enn %s ) for feltet ' %s ', så vi kan ikke bruke det 'Gruppering' for grafikk. Feltet 'Grupper etter' er fjernet. Kan det være du ønsket å bruke den som en X-akse? ErrorReplaceStringEmpty=Feil, strengen du vil erstatte til er tom +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHP-parameteren upload_max_filesize (%s) er høyere enn PHP-parameteren post_max_size (%s). Dette er ikke et konsistent oppsett. WarningPasswordSetWithNoAccount=Et passord ble satt for dette medlemmet, men ingen brukerkonto ble opprettet. Det fører til at passordet ikke kan benyttes for å logge inn på Dolibarr. Det kan brukes av en ekstern modul/grensesnitt, men hvis du ikke trenger å definere noen innlogging eller passord for et medlem, kan du deaktivere alternativet "opprett en pålogging for hvert medlem" fra medlemsmodul-oppsettet. Hvis du trenger å administrere en pålogging, men ikke trenger noe passord, kan du holde dette feltet tomt for å unngå denne advarselen. Merk: E-post kan også brukes som en pålogging dersom medlemmet er knyttet til en bruker. @@ -265,4 +269,4 @@ WarningNumberOfRecipientIsRestrictedInMassAction=Advarsel, antall forskjellige m WarningDateOfLineMustBeInExpenseReportRange=Advarsel, datoen for linjen ligger utenfor tiden til utgiftsrapporten WarningProjectClosed=Prosjektet er stengt. Du må gjenåpne det først. WarningSomeBankTransactionByChequeWereRemovedAfter=Noen banktransaksjoner ble fjernet etter at kvitteringen deres ble generert. Antall sjekker og total mottak kan avvike fra antall og total på listen. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +WarningFailedToAddFileIntoDatabaseIndex=Advarsel, kunne ikke legge filoppføring i ECM-databasens indekstabell diff --git a/htdocs/langs/nb_NO/hrm.lang b/htdocs/langs/nb_NO/hrm.lang index 413e52273a4..0dbd0e83398 100644 --- a/htdocs/langs/nb_NO/hrm.lang +++ b/htdocs/langs/nb_NO/hrm.lang @@ -11,7 +11,7 @@ CloseEtablishment=Lukk firma # Dictionary DictionaryPublicHolidays=HRM - Helligdager DictionaryDepartment=HRM - Departementliste -DictionaryFunction=HRM - Job positions +DictionaryFunction=HRM - Jobbstillinger # Module Employees=Ansatte Employee=Ansatt diff --git a/htdocs/langs/nb_NO/languages.lang b/htdocs/langs/nb_NO/languages.lang index fc8f964bff7..5a1c4ec625f 100644 --- a/htdocs/langs/nb_NO/languages.lang +++ b/htdocs/langs/nb_NO/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Etiopisk Language_ar_AR=Arabisk Language_ar_EG=Arabisk (Egypt) Language_ar_SA=Arabisk +Language_az_AZ=Aserbajdsjansk Language_bn_BD=Bengalsk +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarsk Language_bs_BA=Bosnisk Language_ca_ES=Katalansk @@ -20,6 +23,7 @@ Language_en_GB=Engelsk (U.K.) Language_en_IN=Engelsk (India) Language_en_NZ=Engelsk (New Zealand) Language_en_SA=Engelsk (Saudi-Arabia) +Language_en_SG=Engelsk (Singapore) Language_en_US=Engelsk (USA) Language_en_ZA=Engelsk (Sør-Afrika) Language_es_ES=Spansk @@ -29,6 +33,7 @@ Language_es_CL=Spansk (Chile) Language_es_CO=Spansk (Colombia) Language_es_DO=Spansk (Den Dominikanske republikk) Language_es_EC=Spansk (Ecuador) +Language_es_GT=Spansk (Guatemala) Language_es_HN=Spansk (Honduras) Language_es_MX=Spansk (Mexico) Language_es_PA=Spansk (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spansk (Paraguay) Language_es_PE=Spansk (Peru) Language_es_PR=Spansk (Puerto Rico) Language_es_UY=Spansk (Uruguay) +Language_es_GT=Spansk (Guatemala) Language_es_VE=Spansk (Venezuela) Language_et_EE=Estonsk Language_eu_ES=Baskisk @@ -44,15 +50,22 @@ Language_fi_FI=Finsk Language_fr_BE=Fransk (Belgia) Language_fr_CA=Fransk (Canada) Language_fr_CH=Fransk (Sveits) +Language_fr_CI=Fransk (Elfenbenskysten) +Language_fr_CM=Fransk (Kamerun) Language_fr_FR=Fransk +Language_fr_GA=Fransk (Gabon) Language_fr_NC=Fransk (Ny Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisisk +Language_gl_ES=Gælisk Language_he_IL=Hebraisk +Language_hi_IN=Hindi (India) Language_hr_HR=Kroatisk Language_hu_HU=Ungarsk Language_id_ID=Indonesisk Language_is_IS=Islandsk Language_it_IT=Italiensk +Language_it_CH=Italiensk (Sveits) Language_ja_JP=Japansk Language_ka_GE=Georgisk Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvisk Language_mk_MK=Makedonsk Language_mn_MN=Mongolsk Language_nb_NO=Norsk (bokmål) +Language_ne_NP=Nepalsk Language_nl_BE=Nederlandsk (Belgia) Language_nl_NL=Nederlandsk Language_pl_PL=Polsk @@ -86,4 +100,5 @@ Language_uz_UZ=Usbekisk Language_vi_VN=Vietnamesisk Language_zh_CN=Kinesisk Language_zh_TW=Kinesisk (tradisjonell) +Language_zh_HK=Kinesisk (Hong Kong) Language_bh_MY=Malayisisk diff --git a/htdocs/langs/nb_NO/loan.lang b/htdocs/langs/nb_NO/loan.lang index 06230a91d3c..3950d015409 100644 --- a/htdocs/langs/nb_NO/loan.lang +++ b/htdocs/langs/nb_NO/loan.lang @@ -23,9 +23,9 @@ AddLoan=Opprett lån FinancialCommitment=Finansiell forpliktelse InterestAmount=Rente CapitalRemain=Gjenstående kapital -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Denne terminen er allerede betalt +CantUseScheduleWithLoanStartedToPaid = Kan ikke bruke planlegger for et lån med startet betaling +CantModifyInterestIfScheduleIsUsed = Du kan ikke endre rente hvis du bruker tidsplan # Admin ConfigLoan=Oppset av lån-modulen LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Standard regnskapskonto kapital diff --git a/htdocs/langs/nb_NO/mails.lang b/htdocs/langs/nb_NO/mails.lang index 415ecec5f1a..42c280be51f 100644 --- a/htdocs/langs/nb_NO/mails.lang +++ b/htdocs/langs/nb_NO/mails.lang @@ -164,7 +164,11 @@ NoContactWithCategoryFound=Ingen kontakter/adresser med kategori funnet NoContactLinkedToThirdpartieWithCategoryFound=Ingen kontakter/adresser med kategori funnet OutGoingEmailSetup=Oppsett for utgående epost InGoingEmailSetup=Oppsett for innkommende epost -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=Oppsett for utgående e-post (for modul %s) DefaultOutgoingEmailSetup=Standard utgående e-postoppsett Information=Informasjon ContactsWithThirdpartyFilter=Kontakter med tredjepartsfilter +Unanswered=Unanswered +Answered=Besvarte +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/nb_NO/main.lang b/htdocs/langs/nb_NO/main.lang index c69c8556b27..b8fcb183568 100644 --- a/htdocs/langs/nb_NO/main.lang +++ b/htdocs/langs/nb_NO/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inkl. avgift) Amount=Beløp AmountInvoice=Fakturabeløp AmountInvoiced=Beløp fakturert -AmountInvoicedHT=Fakturert beløp (inkl. MVA) -AmountInvoicedTTC=Fakturert beløp (ekskl. MVA) +AmountInvoicedHT=Fakturert beløp (ekskl. MVA) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Betalingsbeløp AmountHTShort=Beløp (ekskl.) AmountTTCShort=Beløp (inkl. MVA) @@ -485,6 +485,7 @@ Categories=Merker/kategorier Category=Merke/Kategori By=Av From=Fra +FromDate=Fra FromLocation=Fra to=til To=til @@ -687,6 +688,7 @@ Method=Metode Receive=Motta CompleteOrNoMoreReceptionExpected=Komplett eller ingenting mer forventet ExpectedValue=Forventet verdi +ExpectedQty=Expected Qty PartialWoman=Delvis TotalWoman=Total NeverReceived=Aldri mottatt @@ -703,6 +705,7 @@ MenuECM=Dokumenter MenuAWStats=AWStats MenuMembers=Medlemmer MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr grense (Menu home-setup-security): %s Kb, PHP grense: %s Kb NoFileFound=Ingen dokumenter er lagret i denne mappen CurrentUserLanguage=Gjeldende språk @@ -725,7 +728,7 @@ Page=Side Notes=Merknader AddNewLine=Legg til ny linje AddFile=Legg til fil -FreeZone=Ikke et forhåndsdefinert vare/tjeneste +FreeZone=Free-text product FreeLineOfType=Fritekst element, type: CloneMainAttributes=Klon objektet med de viktigste attributtene ReGeneratePDF=Regenerere PDF @@ -942,6 +945,39 @@ ShortThursday=To ShortFriday=F ShortSaturday=L ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Velg en e-postmal SetRef=Sett ref Select2ResultFoundUseArrows=Noen resultater funnet. Bruk pilene for å velge @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Bytt i redigeringsmodus for å legge til overse NotUsedForThisCustomer=Ikke brukt for denne kunden AmountMustBePositive=Beløpet må være positivt ByStatus=Etter status +InformationMessage=Informasjon +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/nb_NO/members.lang b/htdocs/langs/nb_NO/members.lang index 2c81e953545..699fcd4aa2c 100644 --- a/htdocs/langs/nb_NO/members.lang +++ b/htdocs/langs/nb_NO/members.lang @@ -29,7 +29,7 @@ MenuMembersUpToDate=Oppdaterte medlemmer MenuMembersNotUpToDate=Utdaterte medlemmer MenuMembersResiliated=Terminerte medlemmer MembersWithSubscriptionToReceive=Medlemmer som venter på abonnement -MembersWithSubscriptionToReceiveShort=Subscription to receive +MembersWithSubscriptionToReceiveShort=Abonnement på å motta DateSubscription=Abonnement dato DateEndSubscription=Abonnement sluttdato EndSubscription=Avslutt abonnement @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminert medlem MemberStatusResiliatedShort=Terminert MembersStatusToValid=Utkast medlemmer MembersStatusResiliated=Terminerte medlemmer +MemberStatusNoSubscription=Validert (ingen abonnement nødvendig) +MemberStatusNoSubscriptionShort=Validert +SubscriptionNotNeeded=Ingen abonnement nødvendig NewCotisation=Nytt bidrag PaymentSubscription=Ny bidragsinnbetaling SubscriptionEndDate=Abonnementets sluttdato @@ -78,7 +81,7 @@ DeleteType=Slett VoteAllowed=Stemming tillatt Physical=Fysisk Moral=Moralsk -MorPhy=Moralsk/Fysisk +MorPhy=Natur Reenable=Reaktiverer ResiliateMember=Terminer et medlem ConfirmResiliateMember=Er du sikker på at du vil terminere dette medlemmet? diff --git a/htdocs/langs/nb_NO/modulebuilder.lang b/htdocs/langs/nb_NO/modulebuilder.lang index 264c272dc05..7d1aa17dc38 100644 --- a/htdocs/langs/nb_NO/modulebuilder.lang +++ b/htdocs/langs/nb_NO/modulebuilder.lang @@ -139,4 +139,4 @@ ForeignKey=Fremmed nøkkel TypeOfFieldsHelp=Type felt:
    varchar (99), dobbel (24,8), ekte, tekst, html, datetime, tidstempel, heltall, heltall:ClassName:relativepath/to/classfile.class.php [:1[:filter]] ('1' betyr at vi legger til en + -knapp etter kombinasjonsboksen for å opprette posten, 'filter' kan være 'status=1 OG fk_user=__USER_ID OG enhet IN (__SHARED_ENTITIES__)' for eksempel) AsciiToHtmlConverter=Ascii til HTML konverter AsciiToPdfConverter=Ascii til PDF konverter -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. +TableNotEmptyDropCanceled=Tabellen er ikke tom. Drop har blitt kansellert. diff --git a/htdocs/langs/nb_NO/mrp.lang b/htdocs/langs/nb_NO/mrp.lang index 5d307d14280..e6ea08e39d7 100644 --- a/htdocs/langs/nb_NO/mrp.lang +++ b/htdocs/langs/nb_NO/mrp.lang @@ -1,5 +1,6 @@ Mrp=Produksjonsordrer MO=Produksjonsordre +MOs=Manufacturing orders MRPDescription=Modul for å administrere produksjons- og produksjonsordrer (PO). MRPArea=MRP-område MrpSetupPage=Oppsett av MRP-modul diff --git a/htdocs/langs/nb_NO/other.lang b/htdocs/langs/nb_NO/other.lang index fd68664e5c8..e39eb70042d 100644 --- a/htdocs/langs/nb_NO/other.lang +++ b/htdocs/langs/nb_NO/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hei)__\n\nBestilling __REF__ vedlagt\n PredefinedMailContentSendSupplierInvoice=__(Hei)__\n\nFaktura __REF__ vedlagt\n\n\n__(Vennlig hilsen)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hei)__\n\nFraktbrev __REF__ vedlagt\n\n\n__(Vennlig hilsen)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hei)__\n\nIntervensjon __REF__ vedlagt\n\n\n__(Vennlig hilsen)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hei)__\n\n\n__(Vennlig hilsen)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hei)__\n\n\n__(Vennlig hilsen)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hei)__\n\n\n__(Vennlig hilsen)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Du kan klikke på linken under for å utføre betalingen din, hvis det ikke allerede er gjort.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hei)__\n\n\n__(Vennlig hilsen)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr er en kompakt ERP/CRM med støtte for flere forretningsmoduler. En demo som viser alle moduler gir ingen mening da dette scenariet aldri skjer (flere hundre tilgjengelig). Derforer flere demoprofiler er tilgjengelig. ChooseYourDemoProfil=Velg en demoprofil som passer best til dine krav ChooseYourDemoProfilMore=... eller bygg din egen profil
    (manuell utvelgelse av moduler) @@ -280,7 +278,9 @@ LinesToImport=Linjer å importere MemoryUsage=Minnebruk RequestDuration=Varighet av forespørsel +ProductsPerPopularity=Products/Services by popularity PopuProp=Varer/tjenester etter popularitet i tilbud PopuCom=Varer/tjenester etter popularitet i ordre ProductStatistics=Varer/Tjenestestatistikk NbOfQtyInOrders=Antall i ordre +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/nb_NO/products.lang b/htdocs/langs/nb_NO/products.lang index 705a565ec58..72204d17cac 100644 --- a/htdocs/langs/nb_NO/products.lang +++ b/htdocs/langs/nb_NO/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Angi strekkodetype BarcodeValue=Strekkodeverdi NoteNotVisibleOnBill=Notat (vises ikke på fakturaer, tilbud...) ServiceLimitedDuration=Hvis varen er en tjeneste med begrenset varighet: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Flere prissegmenter for hver vare/tjeneste (hver kunde er i et segment) MultiPricesNumPrices=Pris antall DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Leverandørpriser (av varer eller tjenester) CustomCode=Toll / vare / HS-kode CountryOrigin=Opprinnelsesland Nature=Produktets art (materiale/ferdig) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Kort etikett Unit=Enhet p= stk @@ -359,6 +362,9 @@ SelectCombination=Velg kombinasjon ProductCombinationGenerator=Variantgenerator Features=Egenskaper PriceImpact=Prisinnvirkning +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Vektinnvirkning NewProductAttribute=Ny attributt NewProductAttributeValue=Ny attributtverdi diff --git a/htdocs/langs/nb_NO/projects.lang b/htdocs/langs/nb_NO/projects.lang index 2afc5c84ce9..5ab97f6c58a 100644 --- a/htdocs/langs/nb_NO/projects.lang +++ b/htdocs/langs/nb_NO/projects.lang @@ -7,7 +7,7 @@ ProjectsArea=Prosjektområde ProjectStatus=Prosjektstatus SharedProject=Alle PrivateProject=Prosjektkontakter -ProjectsImContactFor=Projects for which I am explicitly a contact +ProjectsImContactFor=Prosjekter som jeg eksplisitt er en kontakt for AllAllowedProjects=Alt prosjekter jeg kan lese (min + offentlig) AllProjects=Alle prosjekter MyProjectsDesc=Denne visningen er begrenset til prosjekter du er en kontakt for @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Bidragsyter TypeContact_project_task_external_TASKCONTRIBUTOR=Bidragsyter SelectElement=Velg element AddElement=Lenke til element +LinkToElementShort=Lenke til # Documents models DocumentModelBeluga=Prosjekt-dokumentmal for oversikt over koblede objekter DocumentModelBaleine=Prosjektdokumentmal for oppgaver @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Antall opprettede prosjekter etter måned ProjectNbTaskByMonth=Antall opprettede oppgaver etter måned ProjectOppAmountOfProjectsByMonth=Beløp i leads pr. måned ProjectWeightedOppAmountOfProjectsByMonth=Vektet beløp i leads pr. måned -ProjectOpenedProjectByOppStatus=Åpne prosjekt/lead etter lead-status -ProjectsStatistics=Statistikk over muligheter -TasksStatistics=Statistikk over prosjekter/hovedoppgaver +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Oppgave tildelt. Tidsbruk kan legges til IdTaskTime=Oppgave-tid ID YouCanCompleteRef=Hvis du vil fullføre referansen med en suffiks, anbefales det å legge til et tegn for å skille det, slik at den automatiske nummereringen fortsatt fungerer riktig for neste prosjekt. For eksempel %s-MYSUFFIX @@ -265,4 +266,4 @@ NewInvoice=Ny faktura OneLinePerTask=Én linje per oppgave OneLinePerPeriod=Én linje per periode RefTaskParent=Ref. forelderoppgave -ProfitIsCalculatedWith=Profit is calculated using +ProfitIsCalculatedWith=Fortjenesten beregnes ved å bruke diff --git a/htdocs/langs/nb_NO/propal.lang b/htdocs/langs/nb_NO/propal.lang index d3ea17c2baa..548c9260382 100644 --- a/htdocs/langs/nb_NO/propal.lang +++ b/htdocs/langs/nb_NO/propal.lang @@ -84,4 +84,4 @@ DefaultModelPropalClosed=Standardmal når du lukker et tilbud (ufakturert) ProposalCustomerSignature=Skriftlig aksept, firmastempel, dato og signatur ProposalsStatisticsSuppliers=Leverandørs tilbudsstatistikk CaseFollowedBy=Sak fulgt av -SignedOnly=Signed only +SignedOnly=Kun signert diff --git a/htdocs/langs/nb_NO/receiptprinter.lang b/htdocs/langs/nb_NO/receiptprinter.lang index 08eb4272132..67c8c29c91b 100644 --- a/htdocs/langs/nb_NO/receiptprinter.lang +++ b/htdocs/langs/nb_NO/receiptprinter.lang @@ -77,6 +77,6 @@ DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Kundes saldo DOL_VALUE_MYSOC_NAME=Ditt firmanavn VendorLastname=Leverandørs etternavn VendorFirstname=Leverandørs fornavn -VendorEmail=Vendor email +VendorEmail=Leverandørens e-post DOL_VALUE_CUSTOMER_POINTS=Kundepoeng DOL_VALUE_OBJECT_POINTS=Objektpoeng diff --git a/htdocs/langs/nb_NO/recruitment.lang b/htdocs/langs/nb_NO/recruitment.lang new file mode 100644 index 00000000000..e131268a03f --- /dev/null +++ b/htdocs/langs/nb_NO/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = innstillinger +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Om +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/nb_NO/stocks.lang b/htdocs/langs/nb_NO/stocks.lang index fdd1b46caec..9db136a8d9a 100644 --- a/htdocs/langs/nb_NO/stocks.lang +++ b/htdocs/langs/nb_NO/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Slett levering Stock=Lagerbeholdning Stocks=Lagerbeholdning MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Lager etter LOT/serienummer @@ -95,14 +95,16 @@ RealStock=Virkelig beholdning RealStockDesc=Fysisk/reelt lager er beholdningen du for øyeblikket har i dine interne lagre. RealStockWillAutomaticallyWhen=Virkelig beholdning vil bli endret i henhold til denne regelen (som definert i Lager-modulen): VirtualStock=Virtuell beholdning -VirtualStockDesc=Virtuelt lager er beregnet beholdning tilgjengelig når alle åpne/ventende handlinger (som påvirker beholdning) er lukket (innkjøpsordre mottatt, salgsordre sendt osv.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Lager-ID DescWareHouse=Beskrivelse av lager LieuWareHouse=Lagerlokasjon WarehousesAndProducts=Lager og varer WarehousesAndProductsBatchDetail=Lager og varer (med detaljer pr. lot/serienummer) -AverageUnitPricePMPShort=Vektet gjennomsnittlig innkjøpspris -AverageUnitPricePMP=Vektet gjennomsnittlig innkjøpspris +AverageUnitPricePMPShort=Vektet gjennomsnittspris +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Utsalgspris EstimatedStockValueSellShort=Verdi å selge EstimatedStockValueSell=Verdi å selge @@ -141,7 +143,7 @@ Replenishments=Lagerpåfyllinger NbOfProductBeforePeriod=Beholdning av varen %s før valgte periode (< %s) NbOfProductAfterPeriod=Beholdning av varen %s før etter periode (< %s) MassMovement=Massebevegelse -SelectProductInAndOutWareHouse=Velg en vare, etnkvantum, et kildelager og et mållager, og klikk deretter på "%s". Når dette er gjort for alle nødvendige bevegelser, klikk på "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Postoverføring ReceivingForSameOrder=Kvitteringer for denne ordren StockMovementRecorded=Registrerte varebevegelser @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Vis hele lagertreet med popup av lagerkoblinger (Advarsel: De StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/nb_NO/suppliers.lang b/htdocs/langs/nb_NO/suppliers.lang index e9d6fa251ab..02803b3f7e7 100644 --- a/htdocs/langs/nb_NO/suppliers.lang +++ b/htdocs/langs/nb_NO/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Leverandører SuppliersInvoice=Leverandørfaktura ShowSupplierInvoice=Vis leverandørfaktura @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Noen sub-varer har ingen pris definert AddSupplierPrice=Legg til innkjøpspris ChangeSupplierPrice=Endre innkjøpspris SupplierPrices=Leverandørpriser -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Denne leverandørreferansen er allerede tilknyttet en referanse: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=Denne leverandørreferansen er allerede knyttet til et produkt: %s NoRecordedSuppliers=Ingen leverandør registrert SupplierPayment=Leverandørbetaling SuppliersArea=Leverandørområde RefSupplierShort=Ref. leverandør Availability=Tilgjengelighet -ExportDataset_fournisseur_1=Leverandørfaktura-liste og faktura linjer +ExportDataset_fournisseur_1=Leverandørfakturaer og faktura detaljer ExportDataset_fournisseur_2=Leverandørfakturaer og betalinger -ExportDataset_fournisseur_3=Innkjøpsordrer og ordrelinjer +ExportDataset_fournisseur_3=Innkjøpsordrer og bestillingsdetaljer ApproveThisOrder=Godkjenn denne innkjøpsordren ConfirmApproveThisOrder=Er du sikker på at du vil godkjenne ordre %s? DenyingThisOrder=Avvis denne ordren @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=Liste over produkter og priser for leverandør SentToSuppliers=Sendt til leverandører ListOfSupplierOrders=Liste over innkjøpsordrer MenuOrdersSupplierToBill=Innkjøpsordre til faktura -NbDaysToDelivery=Leveringsforsinkelse i dager -DescNbDaysToDelivery=Største leveringsforsinkelse av varer fra denne ordren +NbDaysToDelivery=Leveringsforsinkelse (dager) +DescNbDaysToDelivery=Den lengste leveringsforsinkelsen til produktene i denne ordre SupplierReputation=Leverandørens rykte DoNotOrderThisProductToThisSupplier=Ikke bestill -NotTheGoodQualitySupplier=Feil kvalitet +NotTheGoodQualitySupplier=Lav kvalitet ReputationForThisProduct=Rykte BuyerName=Kjøpernavn AllProductServicePrices=Alle vare-/tjenestepriser -AllProductReferencesOfSupplier=Alle vare-/tjenestereferanser til leverandør +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Leverandørpriser diff --git a/htdocs/langs/nb_NO/ticket.lang b/htdocs/langs/nb_NO/ticket.lang index 64d36bf48d1..db72750d860 100644 --- a/htdocs/langs/nb_NO/ticket.lang +++ b/htdocs/langs/nb_NO/ticket.lang @@ -72,7 +72,6 @@ Deleted=Slettede # Dict Type=Type -Category=Analytisk kode Severity=Alvorlighetsgrad # Email templates @@ -128,11 +127,10 @@ TicketsAutoAssignTicket=Tilordne automatisk brukeren som opprettet supportseddel TicketsAutoAssignTicketHelp=Når du lager en supportseddel, kan brukeren automatisk tildeles billetten. TicketNumberingModules=Supportseddel nummereringsmodul TicketNotifyTiersAtCreation=Varsle tredjepart ved opprettelse -TicketGroup=Gruppe TicketsDisableCustomerEmail=Slå alltid av e-post når en billett er opprettet fra det offentlige grensesnittet TicketsPublicNotificationNewMessage=Send e-post(er) når en ny melding legges til TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) -TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update) +TicketPublicNotificationNewMessageDefaultEmail=E-postvarsler til (oppdatere) TicketPublicNotificationNewMessageDefaultEmailHelp=Send email new message notifications to this address if the ticket don't have a user assigned or the user don't have a email. # # Index & list page @@ -162,7 +160,7 @@ CreatedBy=Laget av NewTicket=Ny supportseddel SubjectAnswerToTicket=Supportseddel-svar TicketTypeRequest=Forespørselstype -TicketCategory=Analytisk kode +TicketCategory=Gruppe SeeTicket=Se supportseddel TicketMarkedAsRead=Supportseddel merket som lest TicketReadOn=Les videre diff --git a/htdocs/langs/nb_NO/users.lang b/htdocs/langs/nb_NO/users.lang index 51aab186f73..d3559aaf104 100644 --- a/htdocs/langs/nb_NO/users.lang +++ b/htdocs/langs/nb_NO/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Deaktivert i vedlikeholds-modus UserAccountancyCode=Bruker regnskapskode UserLogoff=Brukerutlogging UserLogged=Bruker innlogget +DateOfEmployment=Ansettelsesdato DateEmployment=Ansettelse startdato DateEmploymentEnd=Ansettelse sluttdato CantDisableYourself=Du kan ikke deaktivere din egen brukeroppføring @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Tvunget friforespørsel-validator ValidatorIsSupervisorByDefault=Som standard er validatoren veileder for brukeren. Hold tom for å beholde denne oppførselen. UserPersonalEmail=Privat e-post UserPersonalMobile=Privat mobil +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/nb_NO/website.lang b/htdocs/langs/nb_NO/website.lang index 8f6644ef909..bb30c3c4339 100644 --- a/htdocs/langs/nb_NO/website.lang +++ b/htdocs/langs/nb_NO/website.lang @@ -16,7 +16,7 @@ WEBSITE_ROBOT=Robotfil (robots.txt) WEBSITE_HTACCESS=Nettstedets .htaccess-fil WEBSITE_MANIFEST_JSON=Nettstedets manifest.json-fil WEBSITE_README=README.md-fil -WEBSITE_KEYWORDSDesc=Use a comma to separate values +WEBSITE_KEYWORDSDesc=Bruk et komma for å skille verdier EnterHereLicenseInformation=Skriv inn metadata eller lisensinformasjon for å arkivere en README.md-fil. Hvis du distribuerer nettstedet ditt som en mal, vil filen bli inkludert i mal-pakken. HtmlHeaderPage=HTML-header (kun for denne siden) PageNameAliasHelp=Navn eller alias på siden.
    Dette aliaset brukes også til å lage en SEO-URL når nettsiden blir kjørt fra en virtuell vert til en webserver (som Apacke, Nginx, ...). Bruk knappen "%s" for å redigere dette aliaset. diff --git a/htdocs/langs/nb_NO/withdrawals.lang b/htdocs/langs/nb_NO/withdrawals.lang index d2efabf96c2..50f65e74855 100644 --- a/htdocs/langs/nb_NO/withdrawals.lang +++ b/htdocs/langs/nb_NO/withdrawals.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - withdrawals CustomersStandingOrdersArea=Payments by Direct debit orders -SuppliersStandingOrdersArea=Payments by Credit transfer +SuppliersStandingOrdersArea=Betalinger med kredittoverføring StandingOrdersPayment=Direktedebet betalingsordre StandingOrderPayment=Direktedebet betalingsordre NewStandingOrder=Ny direktedebetsordre @@ -10,8 +10,8 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direktedebetsordre WithdrawalReceipt=Direktedebiter ordre -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order +BankTransferReceipts=Credit transfer orders +BankTransferReceipt=Kredittoverføringsordre LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Siste %s direktedebetslinjer WithdrawalsLine=Direct debit order line @@ -21,11 +21,11 @@ CreditTransferLines=Credit transfer lines RequestStandingOrderToTreat=Requests for direct debit payment order to process RequestStandingOrderTreated=Requests for direct debit payment order processed RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed +RequestPaymentsByBankTransferTreated=Forespørsler om kredittoverføring behandlet NotPossibleForThisStatusOfWithdrawReceiptORLine=Ennå ikke mulig. Tilbaketrekkings-status må være satt til 'kreditert' før fjerning fra spesifikke linjer. NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order NbOfInvoiceToWithdrawWithInfo=Antall kundefakturaer med direktedebetsordre som har definert bankkontoinformasjon -NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer +NbOfInvoiceToPayByBankTransfer=Antall kvalifiserte leverandørfakturaer som venter på betaling med kredittoverføring SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer InvoiceWaitingWithdraw=Faktura som venter på direktedebet InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer @@ -34,9 +34,9 @@ NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoi NoSupplierInvoiceToWithdraw=Ingen leverandørfaktura med åpne 'Direkte kredittforespørsler' venter. Gå til fanen '%s' på fakturakortet for å sende en forespørsel. ResponsibleUser=Brukeransvarlig WithdrawalsSetup=Oppsett av direktedebetsbetalinger -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Oppsett av kredittoverføring WithdrawStatistics=Statistikk over direktedebetsbetalinger -CreditTransferStatistics=Credit transfer statistics +CreditTransferStatistics=Kredittoverføringsstatistikk Rejects=Avvisninger LastWithdrawalReceipt=Siste %s direktedebetskvitteringer MakeWithdrawRequest=Foreta en direktedebet betalingsforespørsel @@ -63,7 +63,9 @@ InvoiceRefused=Faktura avvist (Kunden skal belastes for avvisningen) StatusDebitCredit=Status debet/kreditt StatusWaiting=Venter StatusTrans=Sendt +StatusDebited=Debited StatusCredited=Kreditert +StatusPaid=Betalt StatusRefused=Nektet StatusMotif0=Uspesifisert StatusMotif1=Ikke nok midler @@ -77,25 +79,26 @@ StatusMotif8=Annen grunn CreateForSepaFRST=Opprett direktedebetsfil (SEPA FRST) CreateForSepaRCUR=Opprett direktedebitfil (SEPA RCUR) CreateAll=Opprett direktedebetfil (alle) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateFileForPaymentByBankTransfer=Create file for credit transfer +CreateSepaFileForPaymentByBankTransfer=Opprett kreditoverføringsfil (SEPA) CreateGuichet=Bare kontor CreateBanque=Bare bank OrderWaiting=Venter på behandling -NotifyTransmision=Overføring av tilbakekalling -NotifyCredit=Kreditt tilbakekalling +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bankkontoer som bruker RIB WithBankUsingBANBIC=For bankkontoer som bruker IBAN/BIC/SWIFT BankToReceiveWithdraw=Mottakende bankkonto -BankToPayCreditTransfer=Bank Account used as source of payments +BankToPayCreditTransfer=Bankkonto brukt som betalingskilde CreditDate=Kreditt på WithdrawalFileNotCapable=Kan ikke ikke generere kvitteringsfil for tilbaketrekking for landet ditt %s (Landet er ikke støttet) ShowWithdraw=Vis direkte debitordre IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Men, hvis fakturaen har minst én avbestillingsordre som ikke er behandlet ennå, blir den ikke satt som betalt for å tillate tidligere håndtering av tilbaketrekninger. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Tilbaketrekkingsfil +DoStandingOrdersBeforePayments=Denne fanen lar deg be om en betalingsordre med direkte belastning. Når du er ferdig, kan du gå til menyen Bank-> Betaling med direkte belastning for å generere og administrere direkte belastning. Når ordre med direkte belastning blir stengt, blir betaling på fakturaer automatisk registrert, og fakturaer stengt hvis resten til betaling er null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Sett status til "Fil Sendt" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistikk etter linjestatus @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Betalingstype ModeRECUR=Gjentakende betaling ModeFRST=Engangsbetaling PleaseCheckOne=Vennligs kryss av kun en +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direktedebet-ordre %s opprettet AmountRequested=Beløp forespurt SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Beløp: %s
    Metode: %s
    Dato: %s InfoRejectSubject=Direktedebet betalingsordre avvist InfoRejectMessage=Hei,

    direktedebet betalingsordre av faktura %s tilhørende firma %s, med beløpet %s er blitt avvist av banken.

    --
    %s ModeWarning=Opsjon for reell-modus ble ikke satt, så vi stopper etter denne simuleringen +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/nb_NO/workflow.lang b/htdocs/langs/nb_NO/workflow.lang index f171459979d..1c08b5b0b78 100644 --- a/htdocs/langs/nb_NO/workflow.lang +++ b/htdocs/langs/nb_NO/workflow.lang @@ -9,12 +9,15 @@ descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Opprett automatisk en kundefaktura når descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Opprett en kundefaktura automatisk etter at en kundeordre er stengt (ny faktura vil ha samme beløp som ordre) # Autoclassify customer proposal or order descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Klassifiser tilknyttede kildetilbud til fakturert(e) når kundeordren er satt til fakturert (og hvis beløpet av bestillingen er det samme som totalbeløpet av signerte koblede tilbud) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Klassifiser koblede kilde-tilbud som fakturert(t) når faktura er validert (og hvis fakturabeløpet er det samme som totalbeløpet av signerte tilbud) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Klassifiser koblede kilde-tilbud som fakturert(e) når faktura er validert (og hvis fakturabeløpet er det samme som totalbeløpet av signerte tilbud) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Klassifiser koblede kilde-kundeordre som fakturert(t) når faktura er validert (og hvis fakturabeløpet er det samme som totalbeløpet av koblede ordrer) descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Klassifiser koblede kilde-kundeordre som fakturert(t) når faktura er satt til betalt (og hvis fakturabeløpet er det samme som totalbeløpet av koblede ordrer) descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klassifiser koblet kilde-kundeordre til sendt når en forsendelse er validert (og hvis kvantitet som sendes av alle forsendelser, er det samme som i bestillingen som skal oppdateres) -# Autoclassify supplier order +# Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Klassifiser tilsluttede kildeleverandørtilbud som fakturert når leverandørfaktura er validert (og hvis fakturabeløp er det samme som totalbeløp på koblede tilbud) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klassifiser kildekjøpsordre (kjøpsordre) som fakturert når leverandørfakturaen er validert (og hvis fakturabeløp er det samme som totalbeløp på koblede ordre) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatisk opprettelse AutomaticClassification=Automatisk klassifisering diff --git a/htdocs/langs/nb_NO/zapier.lang b/htdocs/langs/nb_NO/zapier.lang index 7793dff866f..5ab1b99ecf3 100644 --- a/htdocs/langs/nb_NO/zapier.lang +++ b/htdocs/langs/nb_NO/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr-modul # Admin page # ZapierForDolibarrSetup = Oppsett av Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ne_NP/accountancy.lang b/htdocs/langs/ne_NP/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/ne_NP/accountancy.lang +++ b/htdocs/langs/ne_NP/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/ne_NP/admin.lang b/htdocs/langs/ne_NP/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/ne_NP/admin.lang +++ b/htdocs/langs/ne_NP/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ne_NP/agenda.lang b/htdocs/langs/ne_NP/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/ne_NP/agenda.lang +++ b/htdocs/langs/ne_NP/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ne_NP/boxes.lang b/htdocs/langs/ne_NP/boxes.lang index bd62684421a..d6fd298a3a7 100644 --- a/htdocs/langs/ne_NP/boxes.lang +++ b/htdocs/langs/ne_NP/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/ne_NP/cashdesk.lang b/htdocs/langs/ne_NP/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/ne_NP/cashdesk.lang +++ b/htdocs/langs/ne_NP/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ne_NP/compta.lang b/htdocs/langs/ne_NP/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/ne_NP/compta.lang +++ b/htdocs/langs/ne_NP/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/ne_NP/contracts.lang b/htdocs/langs/ne_NP/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/ne_NP/contracts.lang +++ b/htdocs/langs/ne_NP/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/ne_NP/errors.lang b/htdocs/langs/ne_NP/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/ne_NP/errors.lang +++ b/htdocs/langs/ne_NP/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/ne_NP/languages.lang b/htdocs/langs/ne_NP/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/ne_NP/languages.lang +++ b/htdocs/langs/ne_NP/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/ne_NP/mails.lang b/htdocs/langs/ne_NP/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/ne_NP/mails.lang +++ b/htdocs/langs/ne_NP/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/ne_NP/main.lang b/htdocs/langs/ne_NP/main.lang index adbc443198f..0af5c66f0e0 100644 --- a/htdocs/langs/ne_NP/main.lang +++ b/htdocs/langs/ne_NP/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ne_NP/members.lang b/htdocs/langs/ne_NP/members.lang index dd0a5bf49e2..5ef946ddf67 100644 --- a/htdocs/langs/ne_NP/members.lang +++ b/htdocs/langs/ne_NP/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/ne_NP/mrp.lang b/htdocs/langs/ne_NP/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/ne_NP/mrp.lang +++ b/htdocs/langs/ne_NP/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/ne_NP/other.lang b/htdocs/langs/ne_NP/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/ne_NP/other.lang +++ b/htdocs/langs/ne_NP/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/ne_NP/products.lang b/htdocs/langs/ne_NP/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/ne_NP/products.lang +++ b/htdocs/langs/ne_NP/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/ne_NP/projects.lang b/htdocs/langs/ne_NP/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/ne_NP/projects.lang +++ b/htdocs/langs/ne_NP/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/ne_NP/recruitment.lang b/htdocs/langs/ne_NP/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/ne_NP/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ne_NP/stocks.lang b/htdocs/langs/ne_NP/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/ne_NP/stocks.lang +++ b/htdocs/langs/ne_NP/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ne_NP/suppliers.lang b/htdocs/langs/ne_NP/suppliers.lang index b69b11272b4..51562b8bb7a 100644 --- a/htdocs/langs/ne_NP/suppliers.lang +++ b/htdocs/langs/ne_NP/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/ne_NP/ticket.lang b/htdocs/langs/ne_NP/ticket.lang index a9cff9391d0..59519282c80 100644 --- a/htdocs/langs/ne_NP/ticket.lang +++ b/htdocs/langs/ne_NP/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/ne_NP/users.lang b/htdocs/langs/ne_NP/users.lang index 41a5ebd0981..25d9205457b 100644 --- a/htdocs/langs/ne_NP/users.lang +++ b/htdocs/langs/ne_NP/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/ne_NP/withdrawals.lang b/htdocs/langs/ne_NP/withdrawals.lang index cccd8196481..114a8d9dd6c 100644 --- a/htdocs/langs/ne_NP/withdrawals.lang +++ b/htdocs/langs/ne_NP/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Paid StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/ne_NP/workflow.lang b/htdocs/langs/ne_NP/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/ne_NP/workflow.lang +++ b/htdocs/langs/ne_NP/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/ne_NP/zapier.lang b/htdocs/langs/ne_NP/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/ne_NP/zapier.lang +++ b/htdocs/langs/ne_NP/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/nl_BE/admin.lang b/htdocs/langs/nl_BE/admin.lang index 009d9292997..b9fa95882a3 100644 --- a/htdocs/langs/nl_BE/admin.lang +++ b/htdocs/langs/nl_BE/admin.lang @@ -1,12 +1,13 @@ # Dolibarr language file - Source file is en_US - admin +Publisher=Uitgever VersionLastInstall=Versie van eerste installatie FileCheck=Fileset Integriteitscontrole FileCheckDesc=Met deze tool kunt u de integriteit van bestanden en de instellingen van uw toepassing controleren door elk bestand te vergelijken met het officiële bestand. De waarde van sommige setup-constanten kan ook worden gecontroleerd. U kunt dit hulpprogramma gebruiken om te bepalen of bestanden zijn gewijzigd (bijvoorbeeld door een hacker). +FileIntegrityIsStrictlyConformedWithReference=Bestandsintegriteit is strikt conform de referentie. FileIntegrityIsOkButFilesWereAdded=Controle van de integriteit van bestanden is verstreken, maar er zijn enkele nieuwe bestanden toegevoegd. FileIntegritySomeFilesWereRemovedOrModified=Controle van de integriteit van bestanden is mislukt. Sommige bestanden zijn gewijzigd, verwijderd of toegevoegd. GlobalChecksum=Globale checksum RemoteSignature=Remote distant handtekening (betrouwbaarder) -FilesModified=Gewijzigde bestanden FilesAdded=Bestanden toegevoegd AvailableOnlyOnPackagedVersions=Het lokale bestand voor integriteitscontrole is alleen beschikbaar als de toepassing is geïnstalleerd vanuit een officieel pakket XmlNotFound=Xml-integriteitsbestand van toepassing niet gevonden @@ -20,21 +21,32 @@ DBStoringCharset=Databasekarakterset voor het opslaan van gegevens DBSortingCharset=Databasekarakterset voor het sorteren van gegevens ClientCharset=Client-tekenset ClientSortingCharset=Klantverzameling +WarningOnlyPermissionOfActivatedModules=Hier worden alleen de rechten van geactiveerde modules weergegeven. U kunt andere modules in het menu Home->Instellingen->Modules activeren. +DolibarrSetup=Installatie of upgrade van Dolibarr +GUISetup=Scherm UploadNewTemplate=Upload nieuwe template(s) RestoreLock=Herstel het bestand %s , met enkel leesrechten, om verder gebruik van de Update / Install-tool uit te schakelen. SecurityFilesDesc=Definieer opties met betrekking tot beveiliging voor het uploaden van bestanden. +DictionarySetup=Woordenboek setup +Dictionary=Woordenboeken DisableJavascript=Schakel JavaScript en Ajax-functies uit. DelaiedFullListToSelectCompany=Wacht tot een toets wordt ingedrukt voordat u de inhoud van de combinatielijst van derden laadt.
    Dit kan de prestaties verbeteren als u een groot aantal derden hebt, maar het is minder handig. DelaiedFullListToSelectContact=Wacht tot een toets wordt ingedrukt voordat u de inhoud van de contact combinatie-lijst laadt.
    Dit kan de prestaties verbeteren als u een groot aantal contacten hebt, maar het is minder handig) SearchString=Zoekopdracht AllowToSelectProjectFromOtherCompany=Op een document van een derde partij, kunt u een project kiezen dat is gekoppeld aan een andere derde partij +UsePreviewTabs=Gebruik voorbeelweergavetabbladen +ShowPreview=Toon voorbeelweergave +CurrentTimeZone=Huidige Tijdszone TZHasNoEffect=Datums worden opgeslagen en geretourneerd door de databaseserver alsof ze worden bewaard als verzonden string. De tijdzone heeft alleen effect bij het gebruik van de UNIX_TIMESTAMP-functie (die niet door Dolibarr mag worden gebruikt, dus database TZ zou geen effect mogen hebben, zelfs als deze wordt gewijzigd nadat gegevens zijn ingevoerd). NextValueForDeposit=Volgende waarde (aanbetaling) UserSetup=Gebruikersbeheerinstellingen MultiCurrencySetup=Instellingen voor meerdere valuta +AllMenus=Alle NotConfigured=Module/Applicatie is niet geconfigureerd OtherSetup=Overige instellingen LocalisationDolibarrParameters=Lokalisatieparameters +PHPTZ=Tijdzone binnen de PHP server +CurrentHour=Huidige tijd op server CurrentSessionTimeOut=Huidige sessietimeout YouCanEditPHPTZ=Om een andere PHP-tijdzone in te stellen (niet vereist), kunt u proberen een .htaccess-bestand toe te voegen met een regel als deze "SetEnv TZ Europe/Paris" HoursOnThisPageAreOnServerTZ=Waarschuwing, in tegenstelling tot andere schermen, zijn de uren op deze pagina niet in uw lokale tijdzone, maar in de tijdzone van de server. @@ -56,6 +68,7 @@ NoBackupFileAvailable=Geen backupbestanden beschikbaar. ToBuildBackupFileClickHere=Om een backupbestand te maken, klik hier. CommandsToDisableForeignKeysForImportWarning=Verplicht als je je sql neerslag later wil gebruiken ExportUseMySQLQuickParameterHelp=De parameter '--quick' helpt het RAM-verbruik voor grote tabellen te beperken. +MySqlExportParameters=MySQL exporteer instellingen ExportStructure=Struktuur NameColumn=Kollomennaam FeatureAvailableOnlyOnStable=Functie alleen beschikbaar op officiële stabiele versies @@ -64,10 +77,9 @@ ModulesMarketPlaceDesc=Je kan meer modules vinden door te zoeken op andere exter ModulesMarketPlaces=Zoek externe app / modules ModulesDevelopYourModule=Ontwikkel je eigen app / modules SeeInMarkerPlace=Zie Marktplaats -AchatTelechargement=Kopen / Downloaden +Nouveauté=Nieuwigheid GoModuleSetupArea=Ga naar het gedeelte Module-instellingen om een nieuwe module te implementeren / installeren: %s . DoliStoreDesc=DoliStore, de officiële markt voor externe Dolibarr ERP / CRM modules -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. WebSiteDesc=Externe websites voor meer add-on (niet-basis) modules ... BoxesActivated=Geactiveerde widgets DoNotStoreClearPassword=Versleutel wachtwoorden opgeslagen in database (NIET als platte tekst). Het wordt sterk aanbevolen om deze optie te activeren. @@ -96,6 +108,7 @@ MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP / SMTPS-poort (niet gedefinieer MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP / SMTPS-host (niet gedefinieerd in PHP op Unix-achtige systemen) MAIN_MAIL_EMAIL_FROM=E-mail afzender voor automatische e-mails (standaardwaarde in php.ini: %s ) MAIN_MAIL_ERRORS_TO=E-mail gebruikt voor foutmeldingen retourneert e-mails (velden 'Errors-To' in verzonden e-mails) +MAIN_MAIL_AUTOCOPY_TO=Kopieer (Bcc) alle verzonden e-mails naar MAIN_MAIL_SMTPS_ID=SMTP ID (als verzendende server authenticatie vereist) MAIN_MAIL_SMTPS_PW=SMTP-wachtwoord (als verzendende server verificatie vereist) MAIN_MAIL_EMAIL_TLS=Gebruik TLS (SSL) -versleuteling @@ -107,7 +120,6 @@ MAIN_MAIL_SMS_FROM=Standaard telefoonnummer van afzender voor sms-verzending MAIN_MAIL_DEFAULT_FROMTYPE=Standaard afzender-e-mailadres voor handmatig verzenden (e-mailadres gebruiker of professionele e-mail) UserEmail=Email gebruiker CompanyEmail=Professionele e-mail -SubmitTranslationENUS=Als de vertaling voor deze taal niet volledig is of een fout bevat, dan kunt u dit corrigeren door het bewuste taalbestand in de map Langs/%s te wijzigen en de wijzigingen op het Dolibarr forum te delen met anderen: www.dolibarr.org. ModulesSetup=Instellingen voor Modules / Applicaties ModuleFamilyProducts=Productbeheer (PM) ModuleFamilyHr=Personeelszaken (HR) @@ -132,15 +144,13 @@ DescWeather=De volgende afbeeldingen worden op het dashboard weergegeven wanneer ConnectionTimeout=Time-out verbinding ModuleMustBeEnabledFirst=Module %s moet eerst worden ingeschakeld als u deze functie nodig hebt. NoSmsEngine=Geen SMS-afzenderbeheerder beschikbaar. Een SMS-afzenderbeheer is niet geïnstalleerd met de standaarddistributie omdat deze afhankelijk zijn van een externe leverancier, maar u kunt er enkele vinden op %s -PDFDesc=Wereldwijde opties voor het genereren van PDF's. -PDFAddressForging=Regels voor adresvakken HideAnyVATInformationOnPDF=Verberg alle informatie met betrekking tot omzetbelasting / btw PDFRulesForSalesTax=Regels voor omzetbelasting / btw -HideLocalTaxOnPDF=Tarief %s verbergen in de kolom Belastinguitverkoop HideDescOnPDF=Productbeschrijving verbergen HideRefOnPDF=Verberg ref. producten HideDetailsOnPDF=Verberg details van productlijnen PlaceCustomerAddressToIsoLocation=Gebruik de Franse standaardpositie (La Poste) voor de positie van het klantadres +GetSecuredUrl=Get berekend URL ButtonHideUnauthorized=Knoppen verbergen voor niet-beheerders voor ongeautoriseerde acties in plaats van grijze uitgeschakelde knoppen te tonen MassConvert=Start bulkconversie Boolean=Boolean (één selectievakje) @@ -151,7 +161,9 @@ ExtrafieldRadio=Radioknoppen (slechts één keuze) ExtrafieldCheckBox=checkboxes ExtrafieldCheckBoxFromList=Selectievakjes uit tabel LibraryToBuildPDF=Bibliotheek om PDF bestanden te genereren. +RefreshPhoneLink=Herladen link SetAsDefault=Instellen als standaard +BarcodeInitForProductsOrServices=Mass barcode init of reset voor producten of diensten NoDetails=Geen aanvullende details in voettekst DisplayCompanyInfo=Bedrijfsadres weergeven DisplayCompanyManagers=Namen van beheerders weergeven @@ -160,16 +172,44 @@ ModuleCompanyCodePanicum=Retourneer een lege boekhoudcode. Module40Name=Verkoper Module1780Name=Labels/Categorien Module1780Desc=Label/categorie maken (producten, klanten, leveranciers, contacten of leden) +Permission22=Creëer / wijzig offertes +Permission24=Valideer offertes +Permission32=Creëer / wijzig producten / diensten +Permission95=Bekijk de verslagen +Permission161=Lees contracten/abonnementen +Permission193=Regels beëindigen +Permission204=Creëer links Permission221=Bekijk EMailings +PermissionAdvanced251=Lees andere gebruikers +Permission252=Creëren / wijzigen van andere gebruikers, groepen en rechten +Permission255=Creëren / wijzigen eigen gebruikersgegevens +Permission256=Wijzigen eigen wachtwoord +Permission286=Contactpersonen Exporteren Permission1004=Bekijk voorraadmutaties Permission1005=Creëren / wijzigen voorraadmutaties +Permission2502=Uploaden of verwijderen van documenten +Permission2503=In te dienen of te verwijderen documenten +Permission2515=Instellen documentabonneelijsten +Permission50202=Import transacties +DatabaseUser=Databasegebruikersnaam +DatabasePassword=Databasewachwoord +Skin=Uiterlijksthema +DefaultSkin=Standaard uiterlijksthema +CompanyCurrency=Belangrijkste valuta InfoWebServer=Over webserver InfoDatabase=Over de database AccountantFileNumber=Code voor boekhouder AvailableModules=Beschikbare app / modules +ParameterActiveForNextInputOnly=De instelling word pas actief voor de volgende invoer +YouMustEnableOneModule=Je moet minstens 1 module aktiveren +BillsPDFModules=Factuur documentsjablonen +LDAPGlobalParameters=Globale instellingen +LDAPPassword=Beheerderswachtwoord SalariesSetup=Setup van module salarissen MailToSendProposal=Klant voorstellen MailToSendInvoice=Klantfacturen +MailToSendReception=Ontvangen +MailToThirdparty=Klant AddBoxes=Widgets toevoegen OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. GeneralOptions=Algemene opties diff --git a/htdocs/langs/nl_BE/agenda.lang b/htdocs/langs/nl_BE/agenda.lang index fc56ebd9bba..264f28e932a 100644 --- a/htdocs/langs/nl_BE/agenda.lang +++ b/htdocs/langs/nl_BE/agenda.lang @@ -1,6 +1,5 @@ # Dolibarr language file - Source file is en_US - agenda EventReports=Gebeurtenisrapporten -ToUserOfGroup=Aan elke gebruiker in groep ViewPerType=Overzicht per type AgendaAutoActionDesc=Hier kunt u gebeurtenissen definiëren die u Dolibarr automatisch in Agenda wilt laten maken. Als er niets wordt gecontroleerd, worden alleen handmatige acties opgenomen in logboeken en weergegeven in Agenda. Automatisch bijhouden van zakelijke acties die worden uitgevoerd op objecten (validatie, statuswijziging), wordt niet opgeslagen. AgendaSetupOtherDesc=Deze pagina biedt opties voor het exporteren van uw Dolibarr-evenementen naar een externe agenda (Thunderbird, Google Agenda, enz.) diff --git a/htdocs/langs/nl_BE/boxes.lang b/htdocs/langs/nl_BE/boxes.lang index ec54c5aa572..030c0a528c9 100644 --- a/htdocs/langs/nl_BE/boxes.lang +++ b/htdocs/langs/nl_BE/boxes.lang @@ -24,3 +24,4 @@ BoxTitleLastModifiedPropals=Laatste %s gewijzigde offertes LastXMonthRolling=De laatste %s maand rollen ChooseBoxToAdd=Widget toevoegen aan uw dashbord BoxAdded=Widget is toegevoegd in je dashbord +AccountancyHome=Boekhouding diff --git a/htdocs/langs/nl_BE/main.lang b/htdocs/langs/nl_BE/main.lang index 34b534324fb..d99036d1bdf 100644 --- a/htdocs/langs/nl_BE/main.lang +++ b/htdocs/langs/nl_BE/main.lang @@ -19,7 +19,6 @@ FormatDateHourShort=%d-%m-%Y %H:%M FormatDateHourSecShort=%d/%m/%Y %I:%M:%S %p FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M -EmptySearchString=Enter non empty search criterias NoRecordFound=Geen record gevonden ErrorCanNotCreateDir=Kan dir %s niet maken ErrorCanNotReadDir=Kan dir %s niet lezen @@ -72,9 +71,11 @@ PriceQtyMinHTCurrency=Prijs hoeveelheid min. (excl. BTW) (valuta) ActionRunningShort=Bezig Running=Bezig Categories=Tags / categorieën +Category=Tag / categorie to=aan To=aan ApprovedBy2=Goedgekeurd door (tweede goedkeuring) +Offered=Beschikbaar SetLinkToAnotherThirdParty=Link naar een derde partij SelectAction=Selecteer actie Deny=Weigeren diff --git a/htdocs/langs/nl_BE/stocks.lang b/htdocs/langs/nl_BE/stocks.lang index 4a966b06687..2606eb29f32 100644 --- a/htdocs/langs/nl_BE/stocks.lang +++ b/htdocs/langs/nl_BE/stocks.lang @@ -1,5 +1,4 @@ # Dolibarr language file - Source file is en_US - stocks -SelectProductInAndOutWareHouse=Kies een product, een aantal, een van-magazijn, een naar-magazijn, en klik "%s". Als alle nodige bewegingen zijn aangeduid, klik op "%s". inventoryDraft=Actief inventoryConfirmCreate=Aanmaken inventoryDeleteLine=Verwijder lijn diff --git a/htdocs/langs/nl_BE/ticket.lang b/htdocs/langs/nl_BE/ticket.lang index d5d1f09c883..52a0a417fb8 100644 --- a/htdocs/langs/nl_BE/ticket.lang +++ b/htdocs/langs/nl_BE/ticket.lang @@ -19,7 +19,6 @@ Read=Lezen Assigned=Toegewezen InProgress=Bezig Closed=Afgesloten -Category=Analytische code Severity=Strengheid TicketSetup=Installatie van ticketmodule TicketPublicAccess=Een openbare interface die geen identificatie vereist, is beschikbaar op de volgende URL diff --git a/htdocs/langs/nl_BE/website.lang b/htdocs/langs/nl_BE/website.lang index 05a97bd129a..e8f0a2d4af0 100644 --- a/htdocs/langs/nl_BE/website.lang +++ b/htdocs/langs/nl_BE/website.lang @@ -7,4 +7,3 @@ ViewSiteInNewTab=Bekijk de site in een nieuwe tab ViewPageInNewTab=Bekijk de pagina in een nieuwe tab SetAsHomePage=Zet als Homepagina ViewWebsiteInProduction=Bekijk website via de home URL's -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) diff --git a/htdocs/langs/nl_NL/accountancy.lang b/htdocs/langs/nl_NL/accountancy.lang index 81e55b3c1de..9d842f37068 100644 --- a/htdocs/langs/nl_NL/accountancy.lang +++ b/htdocs/langs/nl_NL/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Sta toe om een verschillend aantal nullen aan het einde v BANK_DISABLE_DIRECT_INPUT=Rechtstreeks boeken van transactie in bankboek uitzetten ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Schakel concept export van het journaal in ACCOUNTANCY_COMBO_FOR_AUX=Combo-lijst inschakelen voor dochteronderneming-account (kan traag zijn als u veel externe partijen hebt) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Verkoopboek ACCOUNTING_PURCHASE_JOURNAL=Inkoopboek @@ -188,7 +189,7 @@ Docref=Reference LabelAccount=Label account LabelOperation=Werking label Sens=D/C -LetteringCode=Belettering code +LetteringCode=Aflettercode Lettering=Afletteren Codejournal=Journaal JournalLabel=Journaal label @@ -263,7 +264,7 @@ DescVentilDoneExpenseReport=Hier kunt u de lijst raadplegen van kostenregels met DescClosure=Raadpleeg hier het aantal bewegingen per maand die niet zijn gevalideerd en fiscale jaren die al open zijn OverviewOfMovementsNotValidated=Stap 1 / Overzicht van bewegingen niet gevalideerd. (Noodzakelijk om een boekjaar af te sluiten) ValidateMovements=Valideer wijzigingen -DescValidateMovements=Elke wijziging of verwijdering van schrijven, belettering en verwijderingen is verboden. Alle inzendingen voor een oefening moeten worden gevalideerd, anders is afsluiten niet mogelijk +DescValidateMovements=Elke wijziging of verwijdering van inboeken, afletteren en verwijderingen is verboden. Alle boekingen moeten worden gevalideerd, anders is afsluiten niet mogelijk SelectMonthAndValidate=Selecteer een maand en valideer bewerkingen ValidateHistory=Automatisch boeken @@ -271,7 +272,7 @@ AutomaticBindingDone=Automatisch koppelen voltooid ErrorAccountancyCodeIsAlreadyUse=Error, you cannot delete this accounting account because it is used MvtNotCorrectlyBalanced=Boeking is niet in balans. Debet = %s | Credit = %s -Balancing=Balancen +Balancing=Balansen FicheVentilation=Koppelen card GeneralLedgerIsWritten=Grootboek transacties GeneralLedgerSomeRecordWasNotRecorded=Sommige transacties konden niet worden doorgeboekt. Als er geen andere foutmelding is, komt dit waarschijnlijk omdat ze reeds zijn doorgeboekt. @@ -284,6 +285,7 @@ ShowTutorial=Handleiding weergeven NotReconciled=Niet afgestemd ## Admin +BindingOptions=Binding options ApplyMassCategories=Categorieën a-mass toepassen AddAccountFromBookKeepingWithNoCategories=Beschikbare rekening nog niet in de gepersonaliseerde groep CategoryDeleted=Categorie van deze grootboekrekening is verwijderd diff --git a/htdocs/langs/nl_NL/admin.lang b/htdocs/langs/nl_NL/admin.lang index 3d21b2b8e17..ed10bfd1ad4 100644 --- a/htdocs/langs/nl_NL/admin.lang +++ b/htdocs/langs/nl_NL/admin.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - admin Foundation=Stichting Version=Versie -Publisher=Uitgever +Publisher=Auteur VersionProgram=Programmaversie VersionLastInstall=Initiële installatie versie VersionLastUpgrade=Laatste versie upgrade @@ -11,8 +11,8 @@ VersionUnknown=Onbekend VersionRecommanded=Aanbevolen FileCheck=Bestands integriteit controles FileCheckDesc=Met deze tool kunt u de integriteit van bestanden en de installatie van uw applicatie controleren door elk bestand met het officiële bestand te vergelijken. De waarde van sommige setup-constanten kan ook worden gecontroleerd. U kunt deze tool gebruiken om te bepalen of bestanden zijn gewijzigd (bijvoorbeeld door een hacker). -FileIntegrityIsStrictlyConformedWithReference=Bestandsintegriteit is strikt conform de referentie. -FileIntegrityIsOkButFilesWereAdded=Er heeft controle plaatsgevonden van de bestandsintegriteit, maar er zijn enkele nieuwe bestanden toegevoegd. +FileIntegrityIsStrictlyConformedWithReference=Bestandsintegriteit is sterk conform de referentiebestanden. +FileIntegrityIsOkButFilesWereAdded=Integriteitscontrole is geslaagd, echter zijn er nieuwe bestanden toegevoegd. FileIntegritySomeFilesWereRemovedOrModified=Controle op integriteit van de bestanden is mislukt. Sommige bestanden zijn gewijzigd, verwijderd of toegevoegd. GlobalChecksum=Globaal controlegetal MakeIntegrityAnalysisFrom=Maak integriteitsanalyse van toepassingsbestanden van @@ -20,14 +20,14 @@ LocalSignature=Ingebedde lokale handtekening (minder betrouwbaar) RemoteSignature=Remote handtekening (betrouwbaarder) FilesMissing=Ontbrekende bestanden FilesUpdated=Bijgewerkte bestanden -FilesModified=Bijgewerkte bestanden +FilesModified=Gewijzigde bestanden FilesAdded=Toegevoegde bestanden FileCheckDolibarr=Controleer de integriteit van applicatiebestanden AvailableOnlyOnPackagedVersions=Het lokale bestand voor integriteitscontrole is alleen beschikbaar wanneer de toepassing wordt geïnstalleerd vanuit een officieel pakket XmlNotFound=Xml-integriteitsbestand van de toepassing is niet gevonden SessionId=Sessie-ID SessionSaveHandler=Wijze van sessieopslag -SessionSavePath=sessie opslag location +SessionSavePath=Sessie opslag locatie PurgeSessions=Verwijderen van sessies ConfirmPurgeSessions=Wilt u werkelijk alle sessies sluiten? Dit zal elke gebruikerssessie afbreken (behalve die van uzelf). NoSessionListWithThisHandler=Save session handler geconfigureerd in uw PHP staat niet toe dat alle lopende sessies worden vermeld. @@ -35,7 +35,7 @@ LockNewSessions=Blokkeer nieuwe sessies ConfirmLockNewSessions=Weet je zeker dat je elke nieuwe Dolibarr-verbinding wilt beperken tot jezelf? Alleen gebruiker %s kan daarna verbinding maken. UnlockNewSessions=Verwijder sessieblokkering YourSession=Uw sessie -Sessions=gebruikers sessie +Sessions=Gebruikersessies WebUserGroup=Webserver gebruiker / groep NoSessionFound=Uw PHP-configuratie lijkt geen lijst van actieve sessies toe te staan. De map die wordt gebruikt om sessies op te slaan ( %s ) kan worden beschermd (bijvoorbeeld door OS-machtigingen of door PHP-richtlijn open_basedir). DBStoringCharset=Database karakterset voor het opslaan van gegevens @@ -44,13 +44,13 @@ HostCharset=Host-tekenset ClientCharset=Cliënt tekenset ClientSortingCharset=Cliënt vergelijking WarningModuleNotActive=Module %s dient te worden ingeschakeld -WarningOnlyPermissionOfActivatedModules=Hier worden alleen de rechten van geactiveerde modules weergegeven. U kunt andere modules in het menu Home->Instellingen->Modules activeren. -DolibarrSetup=Installatie of upgrade van Dolibarr +WarningOnlyPermissionOfActivatedModules=Hier worden alleen de rechten van geactiveerde modules weergegeven. U kunt andere modules activeren in het menu Home > Instellingen > Modules +DolibarrSetup=Installatie of update van Dolibarr InternalUser=Interne gebruiker ExternalUser=Externe gebruiker InternalUsers=Interne gebruikers ExternalUsers=Externe gebruikers -GUISetup=Scherm +GUISetup=Weergave SetupArea=Instellingen UploadNewTemplate=Nieuwe template(s) uploaden FormToTestFileUploadForm=Formulier waarmee bestandsupload kan worden getest (afhankelijk van de gekozen opties) @@ -62,8 +62,8 @@ SecurityFilesDesc=Definieer hier de opties met betrekking tot beveiliging bij he ErrorModuleRequirePHPVersion=Fout, deze module vereist PHP versie %s of hoger. ErrorModuleRequireDolibarrVersion=Fout, deze module vereist Dolibarr versie %s of hoger. ErrorDecimalLargerThanAreForbidden=Fout, een nauwkeurigheid van meer dan %s wordt niet ondersteund. -DictionarySetup=Woordenboek setup -Dictionary=Woordenboeken +DictionarySetup=Veldwaarde instellingen +Dictionary=Veld waarden ErrorReservedTypeSystemSystemAuto=De waarde 'system' en 'systemauto' als type zijn voorbehouden voor het systeem. Je kan 'user' als waarde gebruiken om je eigen gegevens-record toe te voegen. ErrorCodeCantContainZero=Code mag geen 0 bevatten DisableJavascript=Schakel JavaScript en AJAX-functionaliteit uit @@ -78,12 +78,12 @@ SearchString=Zoekstring NotAvailableWhenAjaxDisabled=Niet beschikbaar wanneer AJAX functionaliteit uitgeschakeld is AllowToSelectProjectFromOtherCompany=Bij een document van een relatiej, kan een project worden gekozen dat is gekoppeld aan een relatie JavascriptDisabled=JavaScript uitgeschakeld -UsePreviewTabs=Gebruik voorbeelweergavetabbladen -ShowPreview=Toon voorbeelweergave +UsePreviewTabs=Gebruik voorbeeld tabbladen +ShowPreview=Toon voorbeeldweergave PreviewNotAvailable=Voorbeeldweergave niet beschikbaar ThemeCurrentlyActive=Huidige thema -CurrentTimeZone=Huidige Tijdszone -MySQLTimeZone=Tijdzone(database) +CurrentTimeZone=Huidige tijdzone (server) +MySQLTimeZone=Huidige tijdzone (database) TZHasNoEffect=Datums worden opgeslagen en geretourneerd door de databaseserver alsof ze werden bewaard als ingeleverde reeks. De tijdzone heeft alleen effect wanneer de UNIX_TIMESTAMP-functie wordt gebruikt (die niet door Dolibarr zou moeten worden gebruikt, dus database-TZ zou geen effect moeten hebben, zelfs als deze werd gewijzigd nadat gegevens waren ingevoerd). Space=Ruimte Table=Tabel @@ -110,7 +110,7 @@ MenuLimits=Limieten en nauwkeurigheid MenuIdParent=ID van het bovenliggende menu DetailMenuIdParent=ID van het bovenliggend menu (0 voor een hoogste menu) DetailPosition=Sorteren aantal te definiëren menupositie -AllMenus=Alle +AllMenus=Alles NotConfigured=Module/applicatie niet geconfigureerd Active=Actief SetupShort=Instellingen @@ -120,15 +120,15 @@ CurrentValueSeparatorDecimal=Decimaal scheidingsteken CurrentValueSeparatorThousand=Duizend scheidingsteken Destination=Bestemming IdModule=Module ID -IdPermissions=Permissions ID +IdPermissions=Rechten ID LanguageBrowserParameter=Instelling %s LocalisationDolibarrParameters=Localisatie-instellingen ClientTZ=Tijdzone van de klant (gebruiker) ClientHour=Tijd bij de klant (gebruiker) -OSTZ=Server OS Time Zone -PHPTZ=Tijdzone binnen de PHP server +OSTZ=Server OS tijdzone +PHPTZ=Tijdzone PHP server DaylingSavingTime=Zomertijd (gebruiker) -CurrentHour=Huidige tijd op server +CurrentHour=Huidige tijd (server) CurrentSessionTimeOut=Huidige sessie timeout YouCanEditPHPTZ=Om een ​​andere PHP-tijdzone in te stellen (niet verplicht), kunt u proberen een .htaccess-bestand toe te voegen met de volgende regel: "SetEnv TZ Europe / Paris" HoursOnThisPageAreOnServerTZ=Waarschuwing, in tegenstelling tot andere schermen, bevinden de uren op deze pagina zich niet in uw lokale tijdzone, maar in de tijdzone van de server. @@ -181,7 +181,7 @@ CommandsToDisableForeignKeysForImportWarning=Verplicht als je je SQL dump later ExportCompatibility=Uitwisselbaarheid (compatibiliteit) van het gegenereerde exportbestand ExportUseMySQLQuickParameter=Gebruik de parameter --quick ExportUseMySQLQuickParameterHelp=De parameter "--quick" helpt het RAM-verbruik voor grote tabellen te beperken. -MySqlExportParameters=MySQL exporteer instellingen +MySqlExportParameters=MySQL export instellingen PostgreSqlExportParameters= PostgreSQL uitvoer parameters UseTransactionnalMode=Gebruik transactionele modus FullPathToMysqldumpCommand=Het volledige pad naar het 'MySQL dump' commando @@ -212,11 +212,11 @@ FreeModule=Gratis CompatibleUpTo=Compatibel met versie %s NotCompatible=Deze module lijkt niet compatibel met uw Dolibarr %s (Min %s - Max %s). CompatibleAfterUpdate=Deze module vereist een update van uw Dolibarr %s (Min %s - Max %s). -SeeInMarkerPlace=Zie op de Marktplaats +SeeInMarkerPlace=Bekijk in winkel SeeSetupOfModule=Zie setup van module%s Updated=Bijgewerkt -Nouveauté=Nieuwigheid -AchatTelechargement=Kopen/Downloaden +Nouveauté=Nieuwsitems +AchatTelechargement=Kopen / Downloaden GoModuleSetupArea=Ga naar het gedeelte Module-instellingen om een nieuwe module te implementeren/installeren: %s . DoliStoreDesc=DoliStore, de officiële markt voor externe Dolibarr ERP / CRM modules. DoliPartnersDesc=Lijst met bedrijven die op maat ontwikkelde modules of functies leveren.
    Opmerking: aangezien Dolibarr een open source-applicatie is, moet iedereen die ervaring heeft met PHP-programmering een module moeten kunnen ontwikkelen. @@ -280,7 +280,7 @@ MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP/SMTPS-poort (niet gedefinieerd MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP/SMTPS Host (niet gedefinieerd in PHP op Unix-achtige systemen) MAIN_MAIL_EMAIL_FROM=E-mail afzender voor automatische e-mails (standaardwaarde in php.ini: %s) MAIN_MAIL_ERRORS_TO=E-mailadres voor gebruikt foute e-mails (velden 'Fout-Aan' in verzonden e-mails) -MAIN_MAIL_AUTOCOPY_TO= Kopieer (Bcc) alle verzonden e-mails naar +MAIN_MAIL_AUTOCOPY_TO= Kopieer (BCC) alle verzonden e-mails naar MAIN_DISABLE_ALL_MAILS=Schakel alle e-mailverzending uit (voor testdoeleinden of demo's) MAIN_MAIL_FORCE_SENDTO=Stuur alle e-mails naar (in plaats van echte ontvangers, voor testdoeleinden) MAIN_MAIL_ENABLED_USER_DEST_SELECT=Stel e-mails van werknemers (indien gedefinieerd) voor in de lijst met vooraf gedefinieerde ontvangers bij het schrijven van een nieuwe e-mail @@ -296,12 +296,13 @@ MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Persoonlijke sleutel voor dkim-ondertekening MAIN_DISABLE_ALL_SMS=Schakel alle sms-verzending uit (voor testdoeleinden of demo's) MAIN_SMS_SENDMODE=Methode te gebruiken om SMS te verzenden MAIN_MAIL_SMS_FROM=Standaard afzender telefoonnummer voor SMS-verzending -MAIN_MAIL_DEFAULT_FROMTYPE=Standaard afzender e-mail voor handmatig verzenden (e-mailadres gebruiker of bedrijfs e-mail) +MAIN_MAIL_DEFAULT_FROMTYPE=Standaard afzender e-mail voor handmatig verzenden (gebruikers e-mail of bedrijf e-mail) UserEmail=E-mailadres gebruiker CompanyEmail=E-mailadres bedrijf FeatureNotAvailableOnLinux=Functionaliteit niet beschikbaar op Unix-achtige systemen. Test uw lokale 'sendmail' programma. +FixOnTransifex=Verbeter de vertaling op het online vertaalplatform van het project SubmitTranslation=Als de vertaling voor deze taal niet compleet is of als u fouten vindt, kunt u dit corrigeren door bestanden in directory langs / %s te bewerken en uw wijziging in te dienen op www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Als vertaling voor deze taal niet compleet is of als u fouten aantreft, kunt u dit corrigeren door bestanden in map langs / %s te bewerken en gewijzigde bestanden in te dienen op dolibarr.org/forum of voor ontwikkelaars op github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=Als de vertaling voor deze taal niet compleet is of als je fouten tegenkomt, kun je dit corrigeren door bestanden te bewerken in de directory langs / %s en aangepaste bestanden in te dienen op dolibarr.org/forum of, als je een ontwikkelaar bent, met een PR op github .com / Dolibarr / dolibarr ModuleSetup=Module-instellingen ModulesSetup=Instellingen van modules & applicatie ModuleFamilyBase=Systeem @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s moet eerst worden ingeschakeld als je SecurityToken=Sleutel tot URL beveiligen NoSmsEngine=Geen SMS-afzende-rbeheerder beschikbaar. Een SMS-afzenderbeheer is niet geïnstalleerd met de standaarddistributie omdat deze afhankelijk zijn van een externe leverancier, maar u kunt er enkele vinden op %s PDF=PDF -PDFDesc=Globale opties voor het genereren van een PDF -PDFAddressForging=Regels voor adresbox +PDFDesc=Algemene opties voor het genereren van PDF's +PDFAddressForging=Regels voor adres sectie HideAnyVATInformationOnPDF=Verberg alle informatie met betrekking tot omzetbelasting / BTW PDFRulesForSalesTax=Regels voor omzet-belasting/btw PDFLocaltax=Regels voor %s -HideLocalTaxOnPDF=Tarief %s verbergen in de BTW-kolom +HideLocalTaxOnPDF=Verberg het %s-tarief in de kolom Verkoopbelasting / btw HideDescOnPDF=Verberg productomschrijving HideRefOnPDF=Verberg productreferentie HideDetailsOnPDF=Verberg productdetails @@ -400,7 +401,7 @@ Library=Bibliotheek UrlGenerationParameters=Parameters om URL beveiligen SecurityTokenIsUnique=Gebruik een unieke securekey parameter voor elke URL EnterRefToBuildUrl=Geef referentie voor object %s -GetSecuredUrl=Get berekend URL +GetSecuredUrl=Get berekende URL ButtonHideUnauthorized=Verberg de knoppen voor niet-beheerders bij ongeoorloofde acties in plaats van grijs gekleurde, uitgeschakelde knoppen OldVATRates=Oud BTW tarief NewVATRates=Nieuw BTW tarief @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Wijzig op prijzen waarop een base reference waarde gedefin MassConvert=Start conversie PriceFormatInCurrentLanguage=Prijsindeling in huidige taal String=String +String1Line=String (1 regel) TextLong=Lange tekst +TextLongNLines=Lange tekst (n regels) HtmlText=HTML-tekst Int=Integer Float=Float @@ -443,7 +446,7 @@ LibraryToBuildPDF=Gebruikte library voor generen PDF LocalTaxDesc=Sommige landen kunnen twee of drie belastingen toepassen op elke factuurregel. Als dit het geval is, kiest u het type voor de tweede en derde belasting en het tarief. Mogelijk type zijn:
    1: lokale belasting van toepassing op producten en diensten zonder btw (lokale belasting wordt berekend op bedrag zonder btw)
    2: lokale belasting van toepassing op producten en diensten inclusief btw (lokale belasting wordt berekend op bedrag + hoofdbelasting)
    3: lokale belasting van toepassing op producten zonder btw (lokale belasting wordt berekend op bedrag zonder btw)
    4: lokale belasting van toepassing op producten inclusief btw (lokale belasting wordt berekend op bedrag + hoofd btw)
    5: lokale belasting van toepassing op diensten zonder btw (lokale belasting wordt berekend op bedrag zonder btw)
    6: lokale belasting van toepassing op diensten inclusief btw (lokale belasting wordt berekend op bedrag + belasting) SMS=SMS LinkToTestClickToDial=Geef een telefoonnummer om de ClickToDial link te testen voor gebruiker %s -RefreshPhoneLink=Herladen link +RefreshPhoneLink=Refresh link LinkToTest=Klikbare link gegenereerd voor gebruiker% s (klik telefoonnummer om te testen) KeepEmptyToUseDefault=Laat leeg om standaardwaarde te gebruiken KeepThisEmptyInMostCases=In de meeste gevallen kunt u dit veld leeglaten. @@ -452,8 +455,8 @@ SetAsDefault=Gebruik standaard ValueOverwrittenByUserSetup=Waarschuwing, deze waarde kan worden overschreven door de gebruiker specifieke setup (elke gebruiker kan zijn eigen ClickToDial url ingestellen) ExternalModule=Externe module InstalledInto=Geïnstalleerd in directory %s -BarcodeInitForThirdparties=Massa streepjescode initialisatie relaties -BarcodeInitForProductsOrServices=Mass barcode init of reset voor producten of diensten +BarcodeInitForThirdparties=Massa streepjescode init voor derde partijen +BarcodeInitForProductsOrServices=Massa barcode init of reset voor producten of diensten CurrentlyNWithoutBarCode=Momenteel hebt u een %s record op %s%s zonder gedefinieerde streepjescode. InitEmptyBarCode=Init waarde voor de volgende %s lege records EraseAllCurrentBarCode=Wis alle huidige barcode waarden @@ -465,7 +468,7 @@ ShowDetailsInPDFPageFoot=Voeg meer details toe in de voettekst, zoals bedrijfsad NoDetails=Geen extra details in footer DisplayCompanyInfo=Toon adresgegevens van het bedrijf DisplayCompanyManagers=Toon namen managers -DisplayCompanyInfoAndManagers=Geef adresgegevens en namen manager weer +DisplayCompanyInfoAndManagers=Geef adresgegevens bedrijf en namen manager weer EnableAndSetupModuleCron=Als u deze terugkerende factuur automatisch wilt laten genereren, moet module *%s* zijn ingeschakeld en correct zijn ingesteld. Anders moet het genereren van facturen handmatig worden uitgevoerd vanuit deze sjabloon met de knop * Maken *. Merk op dat zelfs als u automatisch genereren hebt ingeschakeld, u nog steeds veilig handmatig genereren kunt starten. Het genereren van duplicaten voor dezelfde periode is niet mogelijk. ModuleCompanyCodeCustomerAquarium=%s gevolgd door klantcode voor een klantaccountingcode ModuleCompanyCodeSupplierAquarium=%s gevolgd door leverancierscode voor een leveranciers boekhoudcode @@ -543,9 +546,9 @@ Module54Desc=Beheer van contracten (diensten of terugkerende abonnementen) Module55Name=Streepjescodes Module55Desc=Streepjescodesbeheer Module56Name=Betaling via overschrijving -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. Module57Name=Betalingen via automatische incasso -Module57Desc=Beheer van betalingsopdrachten voor automatische incasso. Het omvat het genereren van SEPA-bestanden voor Europese landen. +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integratie van een 'ClickToDial' systeem (Asterisk, etc) Module59Name=Bookmark4u @@ -674,14 +677,14 @@ Permission15=Afnemersfacturen verzenden via e-mail Permission16=Creëer betalingen voor afnemersfacturen Permission19=Verwijder afnemersfacturen Permission21=Bekijk offertes -Permission22=Creëer / wijzig offertes -Permission24=Valideer offertes +Permission22=Maak / wijzig offertes +Permission24=Bevestig offertes Permission25=Stuur offertes Permission26=Sluit offertes Permission27=Verwijder offertes Permission28=Exporteer offertes Permission31=Bekijk producten / diensten -Permission32=Creëer / wijzig producten / diensten +Permission32=Maak / wijzig producten en diensten Permission34=Verwijderen producten / diensten Permission36=Exporteer producten / diensten Permission38=Export producten @@ -711,7 +714,7 @@ Permission91=Lees sociale of fiscale belastingen en BTW Permission92=Aanmaken/wijzigen van sociale of fiscale belastingen en BTW Permission93=Verwijderen van sociale of fiscale belastingen en BTW Permission94=Exporteer sociale of fiscale belastingen -Permission95=Bekijk de verslagen +Permission95=Bekijk de rapporten Permission101=Bekijk verzendingen Permission102=Creëer / wijzig verzendingen Permission104=Valideer verzendingen @@ -737,7 +740,7 @@ Permission151=Inlezen incasso-opdracht Permission152=Aanmaken/aanpassen incasso-opdracht Permission153=Versturen/verzenden incasso-opdrachten Permission154=Credits / afwijzingen van betalingsopdrachten voor automatische incasso opnemen -Permission161=Lees contracten/abonnementen +Permission161=Bekijk contracten/abonnementen Permission162=Creëren/aanpassen contracten/abonnementen Permission163=Een dienst/abonnement van een contract activeren Permission164=Een dienst/abonnement van een contract uitschakelen @@ -751,18 +754,18 @@ Permission178=Exporteer reis- en onkosten Permission180=Bekijk leveranciers Permission181=Lees inkooporders Permission182=Bestellingen maken/wijzigen -Permission183=Bestellingen valideren +Permission183=Bestellingen bevestigen Permission184=Bestellingen goedkeuren Permission185=Verwerk of annuleer inkooporders Permission186=Ontvang inkooporders Permission187=Aankooporders sluiten Permission188=Annuleer inkooporders Permission192=Regels aanmaken -Permission193=Regels beëindigen +Permission193=Regels annuleren Permission194=Lees de bandbreedtelijnen Permission202=Creëer DSL-aansluitingen Permission203=links inzien -Permission204=Creëer links +Permission204=Order verbindingen Permission205=Beheer links Permission206=Bladeren links Permission211=Consult telefonie @@ -782,13 +785,13 @@ Permission242=Creëren / wijzigen categorieën Permission243=Verwijderen categorieën Permission244=Zie de inhoud van de verborgen categorieën Permission251=Bekijk de andere gebruikers en groepen -PermissionAdvanced251=Lees andere gebruikers -Permission252=Creëren / wijzigen van andere gebruikers, groepen en rechten +PermissionAdvanced251=Bekijk andere gebruikers +Permission252=Rechten van andere gebruikers bekijken Permission253=Maak / wijzig andere gebruikers, groepen en machtigingen PermissionAdvanced253=Creëer / wijzig de rechten van internet / externe gebruikers Permission254=Verwijderen of uitschakelen van andere gebruikers -Permission255=Creëren / wijzigen eigen gebruikersgegevens -Permission256=Wijzigen eigen wachtwoord +Permission255=Wachtwoord andere gebruikers wijzigen +Permission256=Andere gebruikers verwijderen of uitschakelen Permission262=Toegang uitbreiden tot alle derde partijen (niet alleen derde partijen waarvoor die gebruiker een verkoopvertegenwoordiger is).
    Niet effectief voor externe gebruikers (altijd beperkt tot zichzelf voor voorstellen, bestellingen, facturen, contracten, enz.).
    Niet effectief voor projecten (alleen regels over projectmachtigingen, zichtbaarheid en toewijzingsaangelegenheden). Permission271=Lees CA Permission272=Facturen inzien @@ -796,7 +799,7 @@ Permission273=Facturen uitgeven Permission281=Bekijk contactpersonen Permission282=Creëren / wijzigen contactpersonen Permission283=Contactpersonen verwijderen -Permission286=Contactpersonen Exporteren +Permission286=Contactpersonen exporteren Permission291=Tarieven inzien Permission292=Stel rechten voor tarieven in Permission293=Wijzig klant-tarieven @@ -836,9 +839,16 @@ Permission532=Creëren / wijzigen van diensten Permission534=Diensten verwijderen Permission536=Inzien / beheren van verborgen diensten Permission538=Diensten exporteren +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Lees stuklijsten Permission651=Materiaalrekeningen maken / bijwerken Permission652=Materiaalrekeningen verwijderen +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Bekijk donaties Permission702=Creëren / wijzigen donaties Permission703=Verwijderen donaties @@ -848,6 +858,8 @@ Permission773=Verwijderen onkostennota's Permission774=Lees alle onkostennota's (ook voor de gebruiker niet ondergeschikten) Permission775=Goedkeuren onkostennota's Permission776=Betalen onkostennota's +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export onkostennota's Permission1001=Bekijk voorraden Permission1002=Toevoegen/wijzigen van een magazijn @@ -861,7 +873,7 @@ Permission1109=Ontvangstbewijzen verwijderen Permission1121=Lees leveranciersvoorstellen Permission1122=Leveranciersvoorstellen maken / wijzigen Permission1123=Valideer leveranciersvoorstellen -Permission1124=Stuur leveranciersvoorstellen +Permission1124=Verzend leveranciersvoorstellen Permission1125=Verwijder leveranciersvoorstellen Permission1126=Prijsaanvragen leverancier sluiten Permission1181=Bekijk leveranciers @@ -894,12 +906,13 @@ Permission2412=Creëer/delete acties (gebeurtenissen of taken) van anderen Permission2413=Wijzig acties (gebeurtenissen of taken) van anderen Permission2414=Acties / taken van anderen exporteren Permission2501=Inzien van documenten -Permission2502=Uploaden of verwijderen van documenten -Permission2503=In te dienen of te verwijderen documenten -Permission2515=Instellen documentabonneelijsten +Permission2502=Download document +Permission2503=Indienen of verwijderen van documenten +Permission2515=Stel document mappen in Permission2801=Gebruik FTP-client in lees modus (enkel verkennen en downloaden) Permission2802=Gebruik FTP-client in schrijf modus (verwijderen of bestanden uploaden) Permission3200=Lees gearchiveerde evenementen en vingerafdrukken +Permission3301=Generate new modules Permission4001=Bekijk medewerkers Permission4002=Creëer medewerkers Permission4003=Verwijder werknemers @@ -921,7 +934,7 @@ Permission23003=Verwijder geplande taak Permission23004=Voer geplande taak uit Permission50101=Gebruik Point Of Sale Permission50201=Lees transacties -Permission50202=Import transacties +Permission50202=Importeer transacties Permission50401=Bind producten en facturen met boekhoudrekeningen Permission50411=Bewerkingen lezen in grootboek Permission50412=Bewerkingen schrijven / bewerken in het grootboek @@ -947,13 +960,14 @@ Permission63003=Verwijder resources Permission63004=Koppel middelen aan agenda-evenementen DictionaryCompanyType=Relatietype DictionaryCompanyJuridicalType=Externe rechtspersonen -DictionaryProspectLevel=Prospectpotentieel +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potentieel niveau voor contacten DictionaryCanton=Staten / Provincies DictionaryRegion=Regio DictionaryCountry=Landen DictionaryCurrency=Valuta -DictionaryCivility=Eervolle titels -DictionaryActions=Agenda evenementen +DictionaryCivility=Aanspreekvormen +DictionaryActions=Agenda items DictionarySocialContributions=Soorten sociale of fiscale belastingen DictionaryVAT=BTW-tarieven of Verkoop Tax tarieven DictionaryRevenueStamp=Aantal belastingzegels @@ -972,12 +986,13 @@ DictionaryOrderMethods=Bestel methodes DictionarySource=Oorsprong van offertes / bestellingen DictionaryAccountancyCategory=Gepersonaliseerde groepen voor rapporten DictionaryAccountancysystem=Modellen voor rekeningschema -DictionaryAccountancyJournal=Daboeken +DictionaryAccountancyJournal=Dagboeken DictionaryEMailTemplates=E-mailsjablonen DictionaryUnits=Eenheden DictionaryMeasuringUnits=Meeteenheden DictionarySocialNetworks=Sociale netwerken -DictionaryProspectStatus=Prospectstatus +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect-status voor contacten DictionaryHolidayTypes=Soorten verlof DictionaryOpportunityStatus=Leadstatus voor project / lead DictionaryExpenseTaxCat=Onkostenoverzicht - Vervoerscategorieën @@ -1053,8 +1068,8 @@ Database=Database DatabaseServer=Databasehost DatabaseName=Databasenaam DatabasePort=Databasepoort -DatabaseUser=Databasegebruikersnaam -DatabasePassword=Databasewachwoord +DatabaseUser=Database gebruikersnaam +DatabasePassword=Database wachtwoord Tables=Tabellen TableName=Tabelnaam NbOfRecord=Aantal records @@ -1065,8 +1080,8 @@ SummaryConst=Lijst van alle Dolibarr-instellingen MenuCompanySetup=Bedrijf/Organisatie DefaultMenuManager= standaard menuverwerker DefaultMenuSmartphoneManager=standaard smartphonemenuverwerker -Skin=Uiterlijksthema -DefaultSkin=Standaard uiterlijksthema +Skin=Thema +DefaultSkin=Standaard thema MaxSizeList=Maximale lijstlengte DefaultMaxSizeList=Standaard maximum lengte voor lijsten DefaultMaxSizeShortList=Standaard maximale lengte voor korte lijsten (bijv. In klantenkaart) @@ -1076,7 +1091,7 @@ LoginPage=Inlogpagina BackgroundImageLogin=Achtergrond afbeelding PermanentLeftSearchForm=Permanent zoekformulier in linker menu DefaultLanguage=Standaard taal -EnableMultilangInterface=Ondersteuning voor meerdere talen inschakelen +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Toon het bedrijfslogo in het menu CompanyInfo=Bedrijf/Organisatie CompanyIds=Bedrijfs-/organisatie-identiteiten @@ -1085,7 +1100,7 @@ CompanyAddress=Adres CompanyZip=Postcode CompanyTown=Plaats CompanyCountry=Land -CompanyCurrency=Belangrijkste valuta +CompanyCurrency=Hoofdvaluta CompanyObject=Soort bedrijf IDCountry=ID land Logo=Logo @@ -1165,7 +1180,7 @@ MAIN_MAX_DECIMALS_SHOWN=Max. decimalen voor prijzen op het scherm . Voeg MAIN_ROUNDING_RULE_TOT=Stap van afrondingsbereik (voor landen waar het afronden op iets anders dan op basis 10 wordt uitgevoerd. Zet bijvoorbeeld 0,05 als afronden wordt uitgevoerd met 0,05 stappen) UnitPriceOfProduct=Prijs per eenheid van een product TotalPriceAfterRounding=Totale prijs (excl / btw / incl btw) na afronding -ParameterActiveForNextInputOnly=De instelling word pas actief voor de volgende invoer +ParameterActiveForNextInputOnly=De instelling wordt pas actief voor de volgende invoer NoEventOrNoAuditSetup=Er is geen beveiligingsgebeurtenis vastgelegd. Dit is normaal als Audit niet is ingeschakeld op de pagina "Setup - Beveiliging - Gebeurtenissen". NoEventFoundWithCriteria=Er zijn geen beveiligingsgebeurtenissen gevonden voor deze zoekcriteria. SeeLocalSendMailSetup=Controleer de instellingen van uw lokale "sendmail"-programma @@ -1240,8 +1255,9 @@ WarningAtLeastKeyOrTranslationRequired=Een zoekcriterium is minimaal vereist voo NewTranslationStringToShow=Weergeven nieuwe vertaal string OriginalValueWas=De originele vertaling is overschreven. Oorspronkelijke waarde was:

    %s TransKeyWithoutOriginalValue=U hebt een nieuwe vertaling geforceerd voor de vertaalsleutel ' %s ' die in geen enkele taalbestand bestaat -TotalNumberOfActivatedModules=Geactiveerde applicaties/modules: %s / %s -YouMustEnableOneModule=Je moet minstens 1 module aktiveren +TitleNumberOfActivatedModules=Geactiveerde modules +TotalNumberOfActivatedModules=Geactiveerde modules: %s / %s +YouMustEnableOneModule=Je moet minstens 1 module activeren ClassNotFoundIntoPathWarning=Klasse %s niet gevonden in PHP-pad YesInSummer=Ja in de zomer OnlyFollowingModulesAreOpenedToExternalUsers=Merk op dat alleen de volgende modules beschikbaar zijn voor externe gebruikers (ongeacht de machtigingen van dergelijke gebruikers) en alleen als machtigingen worden verleend:
    @@ -1296,7 +1312,7 @@ JSOnPaimentBill=Activeert functie om de betalingslijnen op betalingsformulieren CompanyIdProfChecker=Regels voor professionele ID's MustBeUnique=Moet het uniek zijn? MustBeMandatory=Verplicht om derden te creëren (indien btw-nummer of type onderneming gedefinieerd)? -MustBeInvoiceMandatory=Verplichting om facturen te valideren? +MustBeInvoiceMandatory=Facturen bevestigen verplicht? TechnicalServicesProvided=Technische diensten verleend #####DAV ##### WebDAVSetupDesc=Dit is de link om toegang te krijgen tot de WebDAV-directory. Het bevat een "openbare" map die open staat voor elke gebruiker die de URL kent (indien toegang tot de openbare map is toegestaan) en een "persoonlijke" map die een bestaand inlogaccount / wachtwoord nodig heeft voor toegang. @@ -1306,7 +1322,7 @@ WebCalUrlForVCalExport=Een exportlink naar het %s formaat is beschikbaar ##### Invoices ##### BillsSetup=Facturenmodule instellen BillsNumberingModule=Nummeringsmodule voor facturen en creditnota's -BillsPDFModules=Factuur documentsjablonen +BillsPDFModules=Factuur sjablonen BillsPDFModulesAccordindToInvoiceType=Factuur documenteert modellen volgens factuurtype PaymentsPDFModules=Modellen betaal documenten ForceInvoiceDate=Forceer factuurdatum naar validatiedatum @@ -1367,7 +1383,7 @@ VisitorCanChooseItsPaymentMode=Bezoeker kan kiezen uit beschikbare betalingsmodi MEMBER_REMINDER_EMAIL=Automatische herinnering per e-mail inschakelen voor verlopen abonnementen. Opmerking: Module %s moet zijn ingeschakeld en correct zijn ingesteld om herinneringen te verzenden. ##### LDAP setup ##### LDAPSetup=LDAP-instellingen -LDAPGlobalParameters=Globale instellingen +LDAPGlobalParameters=Algemene instellingen LDAPUsersSynchro=Gebruikers LDAPGroupsSynchro=Groepen LDAPContactsSynchro=Contacten @@ -1393,7 +1409,7 @@ LDAPServerUseTLSExample=Uw LDAP-server gebruik TLS LDAPServerDn=Server DN LDAPAdminDn=Administrator DN LDAPAdminDnExample=Volledige DN (bijv. Cn = admin, dc = voorbeeld, dc = com of cn = Administrator, cn = Gebruikers, dc = voorbeeld, dc = com voor active directory) -LDAPPassword=Beheerderswachtwoord +LDAPPassword=LDAP Administrator wachtwoord LDAPUserDn=Gebruikers DN LDAPUserDnExample=Complete DN (voorbeeld: ou=users,dc=society,dc=com) LDAPGroupDn=Groepen DN @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Gebruik gebeurtenistypen (beheerd in menu Setup -> Woor AGENDA_USE_EVENT_TYPE_DEFAULT=Stel deze standaardwaarde automatisch in voor het type evenement in het formulier voor het maken van een evenement AGENDA_DEFAULT_FILTER_TYPE=Stel dit type evenement automatisch in het zoekfilter van de agendaweergave in AGENDA_DEFAULT_FILTER_STATUS=Stel deze status automatisch in voor evenementen in het zoekfilter van de agendaweergave -AGENDA_DEFAULT_VIEW=Welk tabblad wilt u standaard openen bij het selecteren van menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Herinnering gebeurtenis inschakelen via e-mail (herinneringsoptie / vertraging kan worden gedefinieerd voor elke gebeurtenis). Opmerking: Module %s moet zijn ingeschakeld en correct zijn ingesteld om herinneringen op de juiste frequentie te laten verzenden. AGENDA_REMINDER_BROWSER=Herinnering gebeurtenis inschakelen in de browser van de gebruiker (wanneer de datum van de gebeurtenis wordt bereikt, kan elke gebruiker dit weigeren via de bevestigingsvraag van de browser) AGENDA_REMINDER_BROWSER_SOUND=Schakel geluidsmelding in @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Gekoppeld object weergeven in agendaweergave ##### Clicktodial ##### ClickToDialSetup='Click-To-Dial' moduleinstellingen ClickToDialUrlDesc=URL gebeld wanneer een klik op het telefoonpictogram is voltooid. In URL kunt u tags gebruiken
    __PHONETO__ die wordt vervangen door het telefoonnummer van de persoon die moet worden gebeld
    __PHONEFROM__ die wordt vervangen door het telefoonnummer van de bellende persoon (die van u)
    __LOGIN__ die wordt vervangen door clicktodial login (gedefinieerd op gebruikerskaart)
    __PASS__ die wordt vervangen door clicktodial wachtwoord (gedefinieerd op gebruikerskaart). -ClickToDialDesc=Deze module maakt telefoonnummers klikbare links. Een klik op het pictogram zal uw nummer bellen. Dit kan worden gebruikt om een callcentersysteem van Dolibarr te bellen dat bijvoorbeeld het telefoonnummer op een SIP-systeem kan bellen. +ClickToDialDesc=Deze module verandert telefoonnummers bij gebruik van een desktopcomputer in klikbare links. Bij een klik zal het nummer gebeld worden. Dit kan worden gebruikt om het telefoongesprek te starten wanneer u een softphone op uw bureaublad gebruikt of wanneer u bijvoorbeeld een CTI-systeem op basis van het SIP-protocol gebruikt. Let op: Bij het gebruik van een smartphone zijn telefoonnummers altijd klikbaar. ClickToDialUseTelLink=Gebruik alleen de link "tel:" bij telefoonnummers ClickToDialUseTelLinkDesc=Gebruik deze methode als uw gebruikers een softphone of een software-interface op dezelfde computer als de browser hebben geïnstalleerd en deze oproepen wanneer u op een link in uw browser klikt die begint met "tel:". Als u een volledige serveroplossing nodig hebt (geen lokale software-installatie vereist), moet u dit instellen op "Nee" en het volgende veld invullen. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Dit veld bevat een referentie om de lijn te identificeren. Voer een Enter0or1=Voer 0 of 1 in UnicodeCurrency=Voer hier tussen accolades in, lijst met byte-nummers die het valutasymbool vertegenwoordigen. Bijvoorbeeld: voer voor $ [36] in - voor Brazilië real R $ [82,36] - voer voor € [8364] in ColorFormat=De RGB-kleur heeft het HEX-formaat, bijvoorbeeld: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Positie van regel in combolijst SellTaxRate=BTW tarief RecuperableOnly=Ja voor BTW "Niet waargemaakt maar herstelbaar", bestemd voor een deelstaat in Frankrijk. Houd in alle andere gevallen de waarde "Nee" aan. @@ -1841,9 +1858,10 @@ MailToSendShipment=Verzendingen MailToSendIntervention=Interventies MailToSendSupplierRequestForQuotation=Offerte aanvraag MailToSendSupplierOrder=Inkooporders -MailToSendSupplierInvoice=Facturen van leveranciers +MailToSendSupplierInvoice=Inkoopfacturen MailToSendContract=Contracten -MailToThirdparty=Klant +MailToSendReception=Ontvangsten +MailToThirdparty=Derde partijen MailToMember=Leden MailToUser=Gebruikers MailToProject=Projecten pagina @@ -1856,18 +1874,19 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is beschikbaar. Ve ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is beschikbaar. Versie %s is een onderhoudsversie, dus bevat alleen bugfixes. We raden alle gebruikers aan om naar deze versie te upgraden. Een onderhoudsrelease introduceert geen nieuwe functies of wijzigingen in de database. U kunt het downloaden van het downloadgedeelte van de https://www.dolibarr.org portal (submap Stabiele versies). U kunt de ChangeLog lezen voor een volledige lijst met wijzigingen. MultiPriceRuleDesc=Wanneer de optie "Meerdere prijsniveaus per product / service" is ingeschakeld, kunt u verschillende prijzen (één per prijsniveau) voor elk product definiëren. Om u tijd te besparen, kunt u hier een regel invoeren om een prijs voor elk niveau automatisch te berekenen op basis van de prijs van het eerste niveau, dus u hoeft alleen een prijs voor het eerste niveau voor elk product in te voeren. Deze pagina is ontworpen om u tijd te besparen, maar is alleen nuttig als uw prijzen voor elk niveau relatief zijn aan het eerste niveau. U kunt deze pagina in de meeste gevallen negeren. ModelModulesProduct=Sjablonen voor productdocumenten +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Om codes automatisch te kunnen genereren, moet u eerst een manager definiëren om het barcodenummer automatisch te definiëren. SeeSubstitutionVars=Zie * opmerking voor een lijst met mogelijke substitutievariabelen SeeChangeLog=Zie ChangeLog bestand (alleen in het Engels) -AllPublishers=Alle uitgevers -UnknownPublishers=Onbekende uitgevers +AllPublishers=Alle auteurs +UnknownPublishers=Onbekende auteurs AddRemoveTabs=Verwijder of voeg tabs toe AddDataTables=Objecttabellen toevoegen AddDictionaries=Voeg woordenboeken toe AddData=Objecten of woordenboekgegevens toevoegen AddBoxes=Voeg widgets toe AddSheduledJobs=Voeg geplande taken toe -AddHooks=Voeg haken toe +AddHooks=Voeg webhooks toe AddTriggers=Voeg triggers toe AddMenus=Voeg menu's toe AddPermissions=Voeg rechten toe @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Linker marge op PDF MAIN_PDF_MARGIN_RIGHT=Rechter marge op PDF MAIN_PDF_MARGIN_TOP=Bovenmarge op PDF MAIN_PDF_MARGIN_BOTTOM=Onder-marge op PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Hoogte voor logo op PDF NothingToSetup=Er is geen specifieke installatie vereist voor deze module. SetToYesIfGroupIsComputationOfOtherGroups=Stel dit in op Ja als deze groep een berekening van andere groepen is EnterCalculationRuleIfPreviousFieldIsYes=Voer de berekeningsregel in als het vorige veld was ingesteld op Ja (bijvoorbeeld 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Niets gedaan XEmailsDoneYActionsDone=%s e-mails gekwalificeerd, %s e-mails succesvol verwerkt (voor %s record / acties gedaan) RecordEvent=E-mail gebeurtenis opnemen CreateLeadAndThirdParty=Creëer lead (en relatie indien nodig) -CreateTicketAndThirdParty=Ticket aanmaken (en eventueel relatie) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Laatste resultaatcode NbOfEmailsInInbox=Aantal e-mails in bronmap LoadThirdPartyFromName=Zoeken van derden laden op %s (alleen laden) LoadThirdPartyFromNameOrCreate=Zoeken van derden laden op %s (maken indien niet gevonden) -WithDolTrackingID=Dolibarr Reference gevonden in Message ID -WithoutDolTrackingID=Dolibarr Reference niet gevonden in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu toegangscode (hoofdmenu) ECMAutoTree=Toon automatische ECM-structuur @@ -1981,9 +2002,9 @@ ImportSetup=Instellen van module Import InstanceUniqueID=Uniek ID van de instantie SmallerThan=Kleiner dan LargerThan=Groter dan -IfTrackingIDFoundEventWillBeLinked=Houd er rekening mee dat als een tracking-ID wordt gevonden in inkomende e-mail, de gebeurtenis automatisch wordt gekoppeld aan de gerelateerde objecten. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Als u bij een GMail-account de validatie in 2 stappen hebt ingeschakeld, wordt aanbevolen om een speciaal tweede wachtwoord voor de toepassing te maken in plaats van uw eigen wachtwoord van https://myaccount.google.com/. -EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. +EmailCollectorTargetDir=Het kan een gewenst gedrag zijn om de e-mail naar een andere tag / directory te verplaatsen wanneer deze met succes is verwerkt. Stel hier gewoon de naam van de map in om deze functie te gebruiken (gebruik GEEN speciale tekens in de naam). Houd er rekening mee dat u ook een inlogaccount voor lezen / schrijven moet gebruiken. EmailCollectorLoadThirdPartyHelp=U kunt deze actie gebruiken om de e-mailinhoud te gebruiken om een bestaande relatie in uw database te zoeken en te laden. De gevonden (of gecreëerde) relatie zal worden gebruikt voor het volgen van acties die het nodig hebben. In het parameterveld kunt u bijvoorbeeld 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' gebruiken als u de naam van de relatie wilt extraheren uit een string 'Name: name to find' gevonden in de bron. EndPointFor=Eindpunt voor %s: %s DeleteEmailCollector=E-mailverzamelaar verwijderen @@ -2005,3 +2026,7 @@ RssNote=Opmerking: elke RSS-feeddefinitie biedt een widget die u moet inschakele JumpToBoxes=Ga naar Setup -> Widgets MeasuringUnitTypeDesc=Gebruik hier een waarde als "grootte", "oppervlakte", "volume", "gewicht", "tijd" MeasuringScaleDesc=De schaal is het aantal plaatsen dat u nodig heeft om het decimale gedeelte te verplaatsen zodat het overeenkomt met de standaard referentie-eenheid. Voor het type "tijd" is dit het aantal seconden. Waarden tussen 80 en 99 zijn gereserveerde waarden. +TemplateAdded=Sjabloon toegevoegd +TemplateUpdated=Sjabloon bijgewerkt +TemplateDeleted=Sjabloon verwijderd +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/nl_NL/agenda.lang b/htdocs/langs/nl_NL/agenda.lang index 5f35f56dc18..83cf46b9711 100644 --- a/htdocs/langs/nl_NL/agenda.lang +++ b/htdocs/langs/nl_NL/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Aantal gebeurtenissen ListOfActions=Gebeurtenissenlijst EventReports=Overzicht gebeurtenissen Location=Locatie -ToUserOfGroup=Naar elke gebruiker in deze groep +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Gebeurtenis volledige dag MenuToDoActions=Alle openstaande acties MenuDoneActions=Alle beëindigde acties @@ -86,6 +86,8 @@ ProposalDeleted=Voorstel verwijderd OrderDeleted=Bestelling verwijderd InvoiceDeleted=Factuur verwijderd DraftInvoiceDeleted=Conceptfactuur verwijderd +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s aangemaakt PRODUCT_MODIFYInDolibarr=Product %s aangepast PRODUCT_DELETEInDolibarr=Product %s verwijderd @@ -158,3 +160,9 @@ DateStartPlusOne=Begindatum + 1 uur SetAllEventsToTodo=Zet alle evenementen op te doen SetAllEventsToInProgress=Stel alle evenementen in proces SetAllEventsToFinished=Stel alle evenementen in op voltooid +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/nl_NL/banks.lang b/htdocs/langs/nl_NL/banks.lang index 9b569592ae3..da458aef622 100644 --- a/htdocs/langs/nl_NL/banks.lang +++ b/htdocs/langs/nl_NL/banks.lang @@ -37,7 +37,7 @@ IbanValid=IBAN geldig IbanNotValid=IBAN is niet geldig StandingOrders=Incasso-opdrachten StandingOrder=Incasso-opdracht -PaymentByDirectDebit=Payment by direct debit +PaymentByDirectDebit=Betaling via automatische incasso PaymentByBankTransfers=Betalingen via overschrijving PaymentByBankTransfer=Betaling via overschrijving AccountStatement=Rekeningafschrift diff --git a/htdocs/langs/nl_NL/boxes.lang b/htdocs/langs/nl_NL/boxes.lang index a2134a6df91..71c851c2c3b 100644 --- a/htdocs/langs/nl_NL/boxes.lang +++ b/htdocs/langs/nl_NL/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Orders van leveranciers: laatste %s gewijzi BoxTitleLastModifiedCustomerBills=Klantfacturen: laatste %s gewijzigd BoxTitleLastModifiedCustomerOrders=Klantorders: laatste %s gewijzigd BoxTitleLastModifiedPropals=Laatste %s aangepaste offertes +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Afnemersfacturen ForCustomersOrders=Klantenbestellingen ForProposals=Zakelijke voorstellen / Offertes @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense-account is niet gedefinieerd BoxLastCustomerShipments=Laatste klantzendingen BoxTitleLastCustomerShipments=Laatste %s klantverzendingen NoRecordedShipments=Geen geregistreerde klantverzending +# Pages +AccountancyHome=Boekhouden diff --git a/htdocs/langs/nl_NL/cashdesk.lang b/htdocs/langs/nl_NL/cashdesk.lang index 83941d186f7..78734e4b981 100644 --- a/htdocs/langs/nl_NL/cashdesk.lang +++ b/htdocs/langs/nl_NL/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS-module BasicPhoneLayout=Gebruik basislay-out voor telefoons SetupOfTerminalNotComplete=Het instellen van terminal %s is niet voltooid DirectPayment=Directe betaling -DirectPaymentButton=Directe contante betaalknop +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Factuur is al gevalideerd NoLinesToBill=Geen regels om te factureren CustomReceipt=Aangepaste kwitantie @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Externe module met extra functies. Mogelijkhei PrintMethod=Afdrukmethode ReceiptPrinterMethodDescription=Krachtige methode met veel parameters. Volledig aanpasbaar met sjablonen. Kan niet afdrukken vanuit de cloud. ByTerminal=Per terminal -TakeposNumpadUsePaymentIcon=Gebruik betalingspictogram op numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Nummeringsmodule voor POS-verkoop CashDeskGenericMaskCodes6 =  
    {TN} tag wordt gebruikt om het terminalnummer toe te voegen TakeposGroupSameProduct=Groepeer dezelfde productlijnen StartAParallelSale=Start een nieuwe parallelle verkoop -ControlCashOpening=Controle kassa bij opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Sluit de kassa CashReport=Kassa verslag MainPrinterToUse=Hoofdprinter om te gebruiken @@ -107,13 +107,18 @@ OrderPrinterToUse=Bestel printer om te gebruiken MainTemplateToUse=Hoofdsjabloon om te gebruiken OrderTemplateToUse=Bestelsjabloon te gebruiken BarRestaurant=Bar Restaurant -AutoOrder=Order by the customer himself +AutoOrder=Eigen bestelling door klant RestaurantMenu=Menu CustomerMenu=Klantmenu ScanToMenu=Scan QR code to see the menu ScanToOrder=Scan QR code to order -Appearance=Appearance +Appearance=Weergave HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +HideProductImages=Verberg productafbeeldingen +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/nl_NL/compta.lang b/htdocs/langs/nl_NL/compta.lang index 549f9fa3400..c811965f35d 100644 --- a/htdocs/langs/nl_NL/compta.lang +++ b/htdocs/langs/nl_NL/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Sociale of fiscale heffingen/belasting SocialContributions=Sociale of fiscale heffingen/belastingen SocialContributionsDeductibles=Aftrekbare sociale/fiscale lasten/belastingen SocialContributionsNondeductibles=Niet aftrekbare sociale/fiscale lasten/belastingen +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Labelbijdrage TypeContrib=Type bijdrage MenuSpecialExpenses=Speciale uitgaven diff --git a/htdocs/langs/nl_NL/contracts.lang b/htdocs/langs/nl_NL/contracts.lang index 77e28620636..9cbf6c3b23e 100644 --- a/htdocs/langs/nl_NL/contracts.lang +++ b/htdocs/langs/nl_NL/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Actieve diensten MenuExpiredServices=Verlopen diensten MenuClosedServices=Gesloten diensten NewContract=Nieuw contract -NewContractSubscription=Nieuw contract/abonnement +NewContractSubscription=New contract or subscription AddContract=Nieuw contract DeleteAContract=Verwijder een contract ActivateAllOnContract=Activeer alle services diff --git a/htdocs/langs/nl_NL/errors.lang b/htdocs/langs/nl_NL/errors.lang index d401126c69e..d9b7214e8d9 100644 --- a/htdocs/langs/nl_NL/errors.lang +++ b/htdocs/langs/nl_NL/errors.lang @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Slechte syntaxis voor leverancierscode ErrorSupplierCodeRequired=Vendor code vereist ErrorSupplierCodeAlreadyUsed=Leverancierscode al gebruikt ErrorBadParameters=Verkeerde parameters -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Foutieve of ontbrekende parameters ErrorBadValueForParameter=Verkeerde waarde '%s' voor parameter '%s' ErrorBadImageFormat=Afbeeldingsbestand heeft geen ondersteunde indeling (uw PHP ondersteunt geen functies om afbeeldingen van dit formaat te converteren) ErrorBadDateFormat=Waarde %s heeft verkeerde datum formaat @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nieuwe waarde kan niet gelijk is aan de oude ErrorFailedToValidatePasswordReset=Mislukt om wachtwoord opnieuw te initialiseren. Misschien werd de her-init al gedaan (deze link kan slechts een keer worden). Zo niet, probeer dan het her-init proces opnieuw te starten. ErrorToConnectToMysqlCheckInstance=Verbinding maken met database mislukt. Controleer of de databaseserver actief is (bijvoorbeeld, met mysql / mariadb, kunt u het starten vanaf de opdrachtregel met 'sudo service mysql start'). ErrorFailedToAddContact=Mislukt om contact toe te voegen -ErrorDateMustBeBeforeToday=De datum kan niet hoger zijn dan vandaag +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Er is een betalingsmodus ingesteld om %s te typen, maar het instellen van de module Factuur is niet voltooid om te definiëren welke informatie moet worden weergegeven voor deze betalingsmodus. ErrorPHPNeedModule=Fout, op uw PHP moet module %s zijn geïnstalleerd om deze functie te gebruiken. ErrorOpenIDSetupNotComplete=U stelt het Dolibarr-configuratiebestand in om OpenID-authenticatie toe te staan, maar de URL van de OpenID-service is niet gedefinieerd als een constante %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Geen voorraad voor dit lot ErrorOnlyOneFieldForGroupByIsPossible=Slechts 1 veld voor de 'Groepeer op' is mogelijk (andere worden weggegooid) ErrorTooManyDifferentValueForSelectedGroupBy=Te veel verschillende waarden gevonden (meer dan %s ) voor het veld ' %s ', dus we kunnen het niet gebruiken voor afbeeldingen als '. Het veld 'Goepeer op' is verwijderd. Misschien wil je het gebruiken als een X-as? ErrorReplaceStringEmpty=Fout, de tekenreeks waarin moet worden vervangen, is leeg +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Uw PHP-parameter upload_max_filesize (%s) is hoger dan PHP-parameter post_max_size (%s). Dit is geen consistente opstelling. WarningPasswordSetWithNoAccount=Er is een wachtwoord ingesteld voor dit lid. Er is echter geen gebruikersaccount gemaakt. Dus dit wachtwoord is opgeslagen maar kan niet worden gebruikt om in te loggen bij Dolibarr. Het kan worden gebruikt door een externe module / interface, maar als u geen gebruikersnaam of wachtwoord voor een lid hoeft aan te maken, kunt u de optie "Beheer een login voor elk lid" in de module-setup van Member uitschakelen. Als u een login moet beheren maar geen wachtwoord nodig heeft, kunt u dit veld leeg houden om deze waarschuwing te voorkomen. Opmerking: e-mail kan ook worden gebruikt als login als het lid aan een gebruiker is gekoppeld. diff --git a/htdocs/langs/nl_NL/languages.lang b/htdocs/langs/nl_NL/languages.lang index ba209897d36..186ee537182 100644 --- a/htdocs/langs/nl_NL/languages.lang +++ b/htdocs/langs/nl_NL/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabisch Language_ar_EG=Arabisch (Egyptisch) Language_ar_SA=Arabisch +Language_az_AZ=Azerbaijani Language_bn_BD=Bengaals +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgaarse Language_bs_BA=Bosnisch Language_ca_ES=Catalaans @@ -20,6 +23,7 @@ Language_en_GB=Engels (Groot Brittannië) Language_en_IN=Engels (India) Language_en_NZ=Engels (Nieuw Zeeland) Language_en_SA=Engels (Saoedi-Arabië) +Language_en_SG=English (Singapore) Language_en_US=Engels (Verenigde Staten) Language_en_ZA=Engels (Zuid-Afrika) Language_es_ES=Spaans @@ -29,6 +33,7 @@ Language_es_CL=Spaans (Chili) Language_es_CO=Spaans (Colombia) Language_es_DO=Spaans (Dominicaanse Republiek) Language_es_EC=Spaans (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spaans (Honduras) Language_es_MX=Spaans (Mexico) Language_es_PA=Spaans (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spaans (Paraguay) Language_es_PE=Spaans (Peru) Language_es_PR=Spaans (Puerto Rico) Language_es_UY=Spaans (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spaans (Venezuela) Language_et_EE=Estlands Language_eu_ES=Bask @@ -44,15 +50,22 @@ Language_fi_FI=Voltooi Language_fr_BE=Frans (België) Language_fr_CA=Frans (Canada) Language_fr_CH=Frans (Zwitserland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Frans (Frankrijk) +Language_fr_GA=French (Gabon) Language_fr_NC=Frans (Nieuw-Caledonië) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebreeuws +Language_hi_IN=Hindi (India) Language_hr_HR=Kroatisch Language_hu_HU=Hongaars Language_id_ID=Indonesisch Language_is_IS=IJslands Language_it_IT=Italiaans +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japans Language_ka_GE=Georgisch Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Lets Language_mk_MK=Macedonisch Language_mn_MN=Mongools Language_nb_NO=Noors (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Nederlands (België) Language_nl_NL=Nederlands Language_pl_PL=Pools @@ -86,4 +100,5 @@ Language_uz_UZ=Oezbeeks Language_vi_VN=Vietnamees Language_zh_CN=Chinees Language_zh_TW=Chinees (traditioneel) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Maleis- diff --git a/htdocs/langs/nl_NL/mails.lang b/htdocs/langs/nl_NL/mails.lang index 78ae4fd91dc..f5438b0a507 100644 --- a/htdocs/langs/nl_NL/mails.lang +++ b/htdocs/langs/nl_NL/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Uitgaande e-mailinstellingen (voor module %s) DefaultOutgoingEmailSetup=Standaard uitgaande e-mail instellen Information=Informatie ContactsWithThirdpartyFilter=Contacten met filter van derden +Unanswered=Unanswered +Answered=Beantwoord +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/nl_NL/main.lang b/htdocs/langs/nl_NL/main.lang index 1390f6bf0ab..3356b74ed78 100644 --- a/htdocs/langs/nl_NL/main.lang +++ b/htdocs/langs/nl_NL/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. belasting) Amount=Hoeveelheid AmountInvoice=Factuurbedrag AmountInvoiced=Gefactureerd bedrag -AmountInvoicedHT=Gefactureerd bedrag (incl. BTW) -AmountInvoicedTTC=Gefactureerd bedrag (excl. BTW) +AmountInvoicedHT=Gefactureerd bedrag (excl. BTW) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Betalingsbedrag AmountHTShort=Bedrag (excl.) AmountTTCShort=Bedrag met BTW @@ -485,6 +485,7 @@ Categories=Labels/categorieën Category=Label/categorie By=Door From=Van +FromDate=Van FromLocation=Van to=t/m To=t/m @@ -680,13 +681,14 @@ RecordsGenerated=%s record (s) gegenereerd AutomaticCode=Automatische code FeatureDisabled=Functie uitgeschakeld MoveBox=Verplaats widget -Offered=Beschikbaar +Offered=Aanbod NotEnoughPermissions=U heeft geen toestemming voor deze actie SessionName=Sessienaam Method=Methode Receive=Ontvangen CompleteOrNoMoreReceptionExpected=Voltooid of niets meer verwacht ExpectedValue=Verwachte waarde +ExpectedQty=Expected Qty PartialWoman=Gedeeltelijke TotalWoman=Totaal NeverReceived=Nooit ontvangen @@ -703,6 +705,7 @@ MenuECM=Documenten MenuAWStats=AWStats MenuMembers=Leden MenuAgendaGoogle=Google-agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limiet (Menu Home-Instellingen-Beveiliging): %s Kb, PHP grens: %s Kb NoFileFound=Geen documenten die zijn opgeslagen in deze map CurrentUserLanguage=Huidige taal @@ -725,7 +728,7 @@ Page=Pagina Notes=Notitie AddNewLine=Voeg nieuwe regel toe AddFile=Voeg bestand toe -FreeZone=Geen vooraf gedefinieerde product/dienst +FreeZone=Free-text product FreeLineOfType=Vrije omschrijving, type: CloneMainAttributes=Kloon het object met de belangrijkste kenmerken ReGeneratePDF=PDF opnieuw genereren @@ -942,6 +945,39 @@ ShortThursday=Do ShortFriday=Vr ShortSaturday=Za ShortSunday=Zo +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Selecteer een e-mail template SetRef=Stel ref in Select2ResultFoundUseArrows=Resultaten gevonden. Gebruik de pijlen om te selecteren. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Schakel in de bewerkingsmodus om vertalingen vo NotUsedForThisCustomer=Niet gebruikt voor deze klant AmountMustBePositive=Bedrag moet positief zijn ByStatus=Op status +InformationMessage=Informatie +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/nl_NL/members.lang b/htdocs/langs/nl_NL/members.lang index bfd2f2983be..c0a91e8b1ca 100644 --- a/htdocs/langs/nl_NL/members.lang +++ b/htdocs/langs/nl_NL/members.lang @@ -81,7 +81,7 @@ DeleteType=Verwijderen VoteAllowed=Stemming toegestaan Physical=Fysiek Moral=Moreel -MorPhy=Moreel / Fysiek +MorPhy=Natuur Reenable=Opnieuw inschakelen ResiliateMember=Verwijder een lid ConfirmResiliateMember=Weet je zeker dat je dit lidmaatschap wilt beëindigen? diff --git a/htdocs/langs/nl_NL/mrp.lang b/htdocs/langs/nl_NL/mrp.lang index e8efd2673df..eaaa9d827a5 100644 --- a/htdocs/langs/nl_NL/mrp.lang +++ b/htdocs/langs/nl_NL/mrp.lang @@ -1,5 +1,6 @@ Mrp=Productieorders MO=Productieorder +MOs=Manufacturing orders MRPDescription=Module om productie- en productieorders (PO) te beheren. MRPArea=MRP-gebied MrpSetupPage=Installatie van module MRP diff --git a/htdocs/langs/nl_NL/other.lang b/htdocs/langs/nl_NL/other.lang index 6f6ff18ad10..d6bbceb831c 100644 --- a/htdocs/langs/nl_NL/other.lang +++ b/htdocs/langs/nl_NL/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__ (Hallo) __ Vind onze bestelling __REF_ PredefinedMailContentSendSupplierInvoice=__ (Hallo) __ Vind factuur __REF__ bijgevoegd __ (Met vriendelijke groet) __ __USER_SIGNATURE__ PredefinedMailContentSendShipping=__ (Hallo) __ Vind verzending __REF__ bijgevoegd __ (Met vriendelijke groet) __ __USER_SIGNATURE__ PredefinedMailContentSendFichInter=__ (Hallo) __ Zoek interventie __REF__ bijgevoegd __ (Met vriendelijke groet) __ __USER_SIGNATURE__ -PredefinedMailContentThirdparty=__ (Hallo) __ __ (Met vriendelijke groet) __ __USER_SIGNATURE__ -PredefinedMailContentContact=__ (Hallo) __ __ (Met vriendelijke groet) __ __USER_SIGNATURE__ -PredefinedMailContentUser=__ (Hallo) __ __ (Met vriendelijke groet) __ __USER_SIGNATURE__ PredefinedMailContentLink=Indien u nog niet heeft betaald kunt u op de onderstaande link klikken. %s +PredefinedMailContentGeneric=__ (Hallo) __ __ (Met vriendelijke groet) __ __USER_SIGNATURE__ DemoDesc=Dolibarr is een compacte ERP / CRM die verschillende bedrijfsmodules ondersteunt. Een demo met alle modules heeft geen zin omdat dit scenario zich nooit voordoet (enkele honderden beschikbaar). Er zijn dus verschillende demoprofielen beschikbaar. ChooseYourDemoProfil=Kies het demoprofiel dat het beste bij u past ... ChooseYourDemoProfilMore=... of bouw je eigen profiel
    (handmatige moduleselectie) @@ -280,7 +278,9 @@ LinesToImport=Regels om te importeren MemoryUsage=Geheugengebruik RequestDuration=Duur van het verzoek +ProductsPerPopularity=Products/Services by popularity PopuProp=Producten / diensten op populariteit in voorstellen PopuCom=Producten / services op populariteit in Orders ProductStatistics=Producten / diensten Statistieken NbOfQtyInOrders=Aantal in bestellingen +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/nl_NL/products.lang b/htdocs/langs/nl_NL/products.lang index dd6c386ddd6..9b29ea2e06a 100644 --- a/htdocs/langs/nl_NL/products.lang +++ b/htdocs/langs/nl_NL/products.lang @@ -55,7 +55,7 @@ Movements=Verplaatsingen Sell=Verkopen Buy=Inkoop OnSell=Voor verkoop -OnBuy=Gekocht +OnBuy=Voor inkoop NotOnSell=Vervallen ProductStatusOnSell=Beschikbaar ProductStatusNotOnSell=Vervallen @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Stel type streepjescode in BarcodeValue=Waarde streepjescode NoteNotVisibleOnBill=Notitie (niet zichtbaar op facturen, offertes, etc) ServiceLimitedDuration=Als product een dienst is met een beperkte houdbaarheid: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Meerdere prijssegmenten per product / dienst (elke klant bevindt zich in één prijssegment) MultiPricesNumPrices=Aantal prijzen DefaultPriceType=Basisprijzen per standaard (met versus zonder belasting) bij het toevoegen van nieuwe verkoopprijzen @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Leverancierprijzen (van producten of service CustomCode=Douane / Commodity / HS-code CountryOrigin=Land van herkomst Nature=Aard van het product (materiaal / afgewerkt) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Kort label Unit=Eenheid p=u. @@ -359,6 +362,9 @@ SelectCombination=Selecteer combinatie ProductCombinationGenerator=Variatie generator Features=Kenmerken PriceImpact=Gevolgen voor prijs +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Gevolgen voor gewicht NewProductAttribute=Nieuwe attribuut NewProductAttributeValue=Waarde nieuw attribuut diff --git a/htdocs/langs/nl_NL/projects.lang b/htdocs/langs/nl_NL/projects.lang index 361f3da9e51..42a2ddefac7 100644 --- a/htdocs/langs/nl_NL/projects.lang +++ b/htdocs/langs/nl_NL/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Inzender TypeContact_project_task_external_TASKCONTRIBUTOR=Inzender SelectElement=Kies een element AddElement=Koppeling naar element +LinkToElementShort=Link naar # Documents models DocumentModelBeluga=Projectdocumentsjabloon voor overzicht gekoppelde objecten DocumentModelBaleine=Projectdocumentsjabloon voor taken @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Aantal gemaakte projecten per maand ProjectNbTaskByMonth=Aantal gemaakte taken per maand ProjectOppAmountOfProjectsByMonth=Aantal leads per maand ProjectWeightedOppAmountOfProjectsByMonth=Gewogen aantal leads per maand -ProjectOpenedProjectByOppStatus=Open project / lead per leadstatus -ProjectsStatistics=Projecten/leads statistieken -TasksStatistics=Statistieken over project- / leadtaken +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Taak toegewezen. Tijd invoeren voor deze taak moet mogelijk zijn. IdTaskTime=Id taak tijd YouCanCompleteRef=Als je de ref met een achtervoegsel wilt voltooien, wordt aanbevolen om een - -teken toe te voegen om het te scheiden, zodat de automatische nummering nog steeds correct werkt voor volgende projecten. Bijvoorbeeld %s-MYSUFFIX diff --git a/htdocs/langs/nl_NL/recruitment.lang b/htdocs/langs/nl_NL/recruitment.lang new file mode 100644 index 00000000000..f1678cf9f58 --- /dev/null +++ b/htdocs/langs/nl_NL/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Werving +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Beheer en volg wervingscampagnes voor nieuwe vacatures + +# +# Admin page +# +RecruitmentSetup = Werving instellingen +Settings = Instellingen +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Werving gebied +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Over +RecruitmentAbout = Over werving +RecruitmentAboutPage = Over Werving pagina +NbOfEmployeesExpected=Verwacht aantal werknemers +JobLabel=Label van de vacature +WorkPlace=Werkplek +DateExpected=Verwachte datum +FutureManager=Toekomstige manager +ResponsibleOfRecruitement=Verantwoordelijk voor werving +IfJobIsLocatedAtAPartner=Als baan zich op een partnerlocatie bevindt +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/nl_NL/sendings.lang b/htdocs/langs/nl_NL/sendings.lang index 8bd92402653..2c3d237a2db 100644 --- a/htdocs/langs/nl_NL/sendings.lang +++ b/htdocs/langs/nl_NL/sendings.lang @@ -20,7 +20,7 @@ CreateShipment=Creëer verzending QtyShipped=Aantal verzonden QtyShippedShort=Stk verz. QtyPreparedOrShipped=Aantal bereid of verzonden -QtyToShip=Aantal te verzenden +QtyToShip=Geleverd QtyToReceive=Te ontvangen hoeveelheid QtyReceived=Aantal ontvangen QtyInOtherShipments=Aantal in andere zendingen diff --git a/htdocs/langs/nl_NL/stocks.lang b/htdocs/langs/nl_NL/stocks.lang index a03e6c2a3e0..ebb500d6f7b 100644 --- a/htdocs/langs/nl_NL/stocks.lang +++ b/htdocs/langs/nl_NL/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Annuleer verzending DeleteSending=Verwijder verzending Stock=Voorraad Stocks=Voorraden -MissingStocks=Missing stocks -StockAtDate=Stock at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Ontbrekende voorraad +StockAtDate=Stocks at date +StockAtDateInPast=Datum uit het verleden +StockAtDateInFuture=Toekomstige datum StocksByLotSerial=Voorraad volgorde op lot/serienummer LotSerial=Partij/Serienummer LotSerialList=Overzicht van partij/serienummers @@ -65,7 +65,7 @@ RuleForWarehouse=Voorwaarden magazijnen WarehouseAskWarehouseDuringOrder=Stel een magazijn in op Verkooporders UserDefaultWarehouse=Stel een magazijn in op gebruikers MainDefaultWarehouse=Standaardmagazijn -MainDefaultWarehouseUser=Use a default warehouse for each user +MainDefaultWarehouseUser=Gebruik standaard magazijn voor elke gebruiker MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. IndependantSubProductStock=Product voorraad en subproduct voorraad zijn onafhankelijk QtyDispatched=Hoeveelheid verzonden @@ -95,14 +95,16 @@ RealStock=Werkelijke voorraad RealStockDesc=Fysieke/echte voorraad is de voorraad die momenteel in de magazijnen aanwezig is. RealStockWillAutomaticallyWhen=De werkelijke voorraad wordt aangepast volgens deze regel (zoals gedefinieerd in de module Voorraad): VirtualStock=Virtuele voorraad -VirtualStockDesc=Virtuele voorraad is de berekende voorraad die beschikbaar is zodra alle open/in behandeling zijnde acties (die van invloed zijn op voorraden) zijn verwerkt (ontvangen inkooporders, verzonden verkooporders etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Magazijn-ID DescWareHouse=Beschrijving magazijn LieuWareHouse=Localisatie magazijn WarehousesAndProducts=Magazijn en producten WarehousesAndProductsBatchDetail=Magazijnen en producten (met detail per lot/serieenummer) -AverageUnitPricePMPShort=Gewogen gemiddelde inkoopprijs -AverageUnitPricePMP=Gewogen gemiddelde inkoopprijs +AverageUnitPricePMPShort=Waardering (PMP) +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Verkopen Prijs per Eenheid EstimatedStockValueSellShort=Verkoopwaarde EstimatedStockValueSell=Verkoopwaarde @@ -141,7 +143,7 @@ Replenishments=Bevoorradingen NbOfProductBeforePeriod=Aantal op voorraad van product %s voor de gekozen periode (<%s) NbOfProductAfterPeriod=Aantal op voorraad van product %s na de gekozen periode (<%s) MassMovement=Volledige verplaatsing -SelectProductInAndOutWareHouse=Kies een product, een aantal, een van-magazijn, een naar-magazijn, en klik "%s". Als alle nodige bewegingen zijn gemaakt, klik op "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Vastleggen verplaatsing ReceivingForSameOrder=Ontvangsten voor deze bestelling StockMovementRecorded=Geregistreerde voorraadbewegingen @@ -234,4 +236,7 @@ ForceTo=Dwingen tot AlwaysShowFullArbo=Volledige boomstructuur van magazijn weergeven op pop-up van magazijnkoppelingen (Waarschuwing: dit kan de prestaties drastisch verminderen) StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future -CurrentStock=Current stock +CurrentStock=Huidige voorraad +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/nl_NL/suppliers.lang b/htdocs/langs/nl_NL/suppliers.lang index bed0c1c5b49..041aa6ba0ec 100644 --- a/htdocs/langs/nl_NL/suppliers.lang +++ b/htdocs/langs/nl_NL/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Lage kwaliteit ReputationForThisProduct=Reputatie BuyerName=Afnemer AllProductServicePrices=Prijzen alle producten/diensten -AllProductReferencesOfSupplier=Alle product- / service-referenties van leverancier +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Prijzen van leveranciers diff --git a/htdocs/langs/nl_NL/ticket.lang b/htdocs/langs/nl_NL/ticket.lang index 577c2fa1dfd..9af5045058e 100644 --- a/htdocs/langs/nl_NL/ticket.lang +++ b/htdocs/langs/nl_NL/ticket.lang @@ -72,7 +72,6 @@ Deleted=Verwijderd # Dict Type=Type -Category=Analisten code Severity=Prioriteit # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Wijs automatisch de gebruiker toe die het ticket heeft a TicketsAutoAssignTicketHelp=Bij het maken van een ticket kan de gebruiker automatisch aan het ticket worden toegewezen. TicketNumberingModules=Nummering module voor tickets TicketNotifyTiersAtCreation=Breng relatie op de hoogte bij het aanmaken -TicketGroup=Groep TicketsDisableCustomerEmail=Schakel e-mails altijd uit wanneer een ticket wordt gemaakt vanuit de openbare interface TicketsPublicNotificationNewMessage=Stuur e-mail (s) wanneer een nieuw bericht is toegevoegd TicketsPublicNotificationNewMessageHelp=Stuur e-mail (s) wanneer een nieuw bericht is toegevoegd vanuit de openbare interface (naar de toegewezen gebruiker of de e-mail met meldingen naar (update) en / of de e-mail met meldingen naar) @@ -162,7 +160,7 @@ CreatedBy=Aangemaakt door NewTicket=Nieuw Ticket SubjectAnswerToTicket=Ticket antwoord TicketTypeRequest=Aanvraag type -TicketCategory=Analisten code +TicketCategory=Groep SeeTicket=Bekijk ticket TicketMarkedAsRead=Ticket is gemarkeerd als gelezen TicketReadOn=Lees verder diff --git a/htdocs/langs/nl_NL/users.lang b/htdocs/langs/nl_NL/users.lang index f0092998867..20ea6e8fba2 100644 --- a/htdocs/langs/nl_NL/users.lang +++ b/htdocs/langs/nl_NL/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Uitgeschakeld in onderhoudsmodus UserAccountancyCode=Gebruiker accounting code UserLogoff=Gebruiker uitgelogd UserLogged=Gebruiker gelogd +DateOfEmployment=Employment date DateEmployment=Startdatum dienstverband DateEmploymentEnd=Einddatum dienstverband CantDisableYourself=U kunt uw eigen gebruikersrecord niet uitschakelen @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Forceer verlofaanvraag validator ValidatorIsSupervisorByDefault=Standaard is de validator de supervisor van de gebruiker. Blijf leeg om dit gedrag te behouden. UserPersonalEmail=Persoonlijke e-mail UserPersonalMobile=Persoonlijke mobiele telefoon +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/nl_NL/withdrawals.lang b/htdocs/langs/nl_NL/withdrawals.lang index 64812b62a35..fe5dc16fe25 100644 --- a/htdocs/langs/nl_NL/withdrawals.lang +++ b/htdocs/langs/nl_NL/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Overboekingsopdrachten PaymentByBankTransferLines=Overschrijvingsorderregels WithdrawalsReceipts=Incasso-opdrachten WithdrawalReceipt=Incasso-opdracht -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Overboekingsopdrachten BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Laatste %s overboekingsopdrachten LastWithdrawalReceipts=Laatste %s incassobestanden @@ -34,7 +34,7 @@ NoInvoiceToWithdraw=Er staat geen factuur open voor '%s'. Ga op tabblad '%s' op NoSupplierInvoiceToWithdraw=Geen leveranciersfactuur met open 'betalingsverzoek'. Ga op tabblad '%s' op factuurkaart om een verzoek in te dienen. ResponsibleUser=Verantwoordelijke gebruiker WithdrawalsSetup=Instelling voor automatische incasso -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Instelling voor overboeking WithdrawStatistics=Automatische incasso statistieken CreditTransferStatistics=Overboeking statistieken Rejects=Verworpen @@ -63,7 +63,9 @@ InvoiceRefused=Factuur geweigerd (de afwijzing door belasten aan de klant) StatusDebitCredit=Status debet / credit StatusWaiting=Wachtend StatusTrans=Verzonden +StatusDebited=Debited StatusCredited=Gecrediteerd +StatusPaid=Betaald StatusRefused=Geweigerd StatusMotif0=Niet gespecificeerd StatusMotif1=Ontoereikende voorziening @@ -77,13 +79,13 @@ StatusMotif8=Andere reden CreateForSepaFRST=Maak een domiciliëringsbestand (SEPA FRST) CreateForSepaRCUR=Maak een domiciliëringsbestand (SEPA RCUR) CreateAll=Maak een domiciliëringsbestand (alles) -CreateFileForPaymentByBankTransfer=Maak een overboeking (alles) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Maak een overboekingsbestand (SEPA) aan CreateGuichet=Alleen kantoor CreateBanque=Alleen de bank OrderWaiting=Wachtend op behandeling -NotifyTransmision=Intrekking transmissie -NotifyCredit=Intrekking Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Nationale zender nummer WithBankUsingRIB=Voor bankrekeningen die gebruik maken van RIB WithBankUsingBANBIC=Voor bankrekeningen die gebruik maken van IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Crediteer op WithdrawalFileNotCapable=Kan geen ontvangstbewijsbestand voor uw land genereren %s (uw land wordt niet ondersteund) ShowWithdraw=Incasso-opdracht weergeven IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Als de factuur echter ten minste één betalingsopdracht voor automatische incasso bevat die nog niet is verwerkt, wordt deze niet ingesteld als betaald om voorafgaand opnamebeheer mogelijk te maken. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Intrekkingsbestand +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Stel de status in "Bestand verzonden" ThisWillAlsoAddPaymentOnInvoice=Dit registreert ook betalingen op facturen en classificeert ze als "Betaald" als het resterende bedrag niet is betaald StatisticsByLineStatus=Statistieken per status van lijnen @@ -105,7 +108,7 @@ RUMLong=Unieke machtigingsreferentie RUMWillBeGenerated=Indien leeg, wordt een UMR (Unique Mandate Reference) gegenereerd zodra de bankrekeninginformatie is opgeslagen. WithdrawMode=Incassomodus (FRST of RECUR) WithdrawRequestAmount=Bedrag van automatische incasso: -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Over te maken bedrag: WithdrawRequestErrorNilAmount=Kan geen automatische incasso-aanvraag maken voor een leeg bedrag. SepaMandate=Machtiging doorlopende SEPA incasso SepaMandateShort=SEPA-mandaat @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Soort betaling ModeRECUR=Terugkomende betaling ModeFRST=Eenmalige incasso PleaseCheckOne=Alleen één controleren +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Incasso-opdracht %s gemaakt AmountRequested=Aangevraagde hoeveelheid SEPARCUR=SEPA CUR @@ -131,7 +135,7 @@ ICS=Creditor Identifier CI END_TO_END="EndToEndId" SEPA XML-tag - Uniek ID toegewezen per transactie USTRD="Ongestructureerde" SEPA XML-tag ADDDAYS=Dagen toevoegen aan uitvoeringsdatum -NoDefaultIBANFound=No default IBAN found for this third party +NoDefaultIBANFound=Geen standaard IBAN gevonden bij deze relatie ### Notifications InfoCreditSubject=Betaling van een domiciliëringsopdracht %s door de bank InfoCreditMessage=De betaalopdracht %s is door de bank betaald
    Betalingsgegevens: %s @@ -141,3 +145,4 @@ InfoTransData=Bedrag: %s
    Wijze: %s
    Datum: %s InfoRejectSubject=Betalingsopdracht voor automatische incasso geweigerd InfoRejectMessage=M,

    de incasso van factuur %s voor bedrijf %s, met een bedrag van %s is geweigerd door de bank.

    --
    %s ModeWarning=Optie voor echte modus was niet ingesteld, we stoppen na deze simulatie +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/nl_NL/workflow.lang b/htdocs/langs/nl_NL/workflow.lang index f305f856b66..9d4ed65e55b 100644 --- a/htdocs/langs/nl_NL/workflow.lang +++ b/htdocs/langs/nl_NL/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classificeer gekoppelde bronverkoop # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classificeer het gekoppelde bronvoorstel als gefactureerd wanneer de leveranciersfactuur is gevalideerd (en als het factuurbedrag gelijk is aan het totale bedrag van het gekoppelde voorstel) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classificeer gekoppelde inkooporder als gefactureerd wanneer leveranciersfactuur is gevalideerd (en als het factuurbedrag gelijk is aan het totale bedrag van de gekoppelde order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatisch aanmaken AutomaticClassification=Automatisch classificeren diff --git a/htdocs/langs/nl_NL/zapier.lang b/htdocs/langs/nl_NL/zapier.lang index 41961119393..770a821038b 100644 --- a/htdocs/langs/nl_NL/zapier.lang +++ b/htdocs/langs/nl_NL/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier voor Dolibarr-module # Admin page # ZapierForDolibarrSetup = Installatie van Zapier voor Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/pl_PL/accountancy.lang b/htdocs/langs/pl_PL/accountancy.lang index 5e8bbad5609..2bb1cd7da36 100644 --- a/htdocs/langs/pl_PL/accountancy.lang +++ b/htdocs/langs/pl_PL/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Wyłącz bezpośrednią rejestrację transakcji na koncie bankowym ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Dziennik sprzedaży ACCOUNTING_PURCHASE_JOURNAL=Dziennik zakupów @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Dodaj masowo kategorie AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Kategoria dla konta księgowego została usunięta diff --git a/htdocs/langs/pl_PL/admin.lang b/htdocs/langs/pl_PL/admin.lang index 9a19685c5d5..2b31e9f5042 100644 --- a/htdocs/langs/pl_PL/admin.lang +++ b/htdocs/langs/pl_PL/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Domyślny adres konta e-mail (użytkownika lub firmow UserEmail=Adres email użytkownika CompanyEmail=Adres firmowego konta e-mail FeatureNotAvailableOnLinux=Cechy te nie są dostępne w systemach Unix, takich jak. Przetestuj swój program sendmail lokalnie. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Jeśli tłumaczenie dla tego języka nie jest kompletne lub znajdziesz błędy, możesz to poprawić, edytując pliki w katalogu langs/%s. Prześlij potem swoją zmianę na www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Moduł konfiguracji ModulesSetup=Ustawienia Modułów/Aplikacji ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=%s moduł musi być włączony przed użyciem te SecurityToken=Klucz do bezpiecznego URL NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Zasady dla %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Zmiana dla cen opartych na wartości referencyjnej ustalon MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Ciąg znaków +String1Line=String (1 line) TextLong=Długi tekst +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Liczba całkowita Float=Liczba zmiennoprzecinkowa @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Kody kreskowe Module55Desc=Kody kreskowe zarządzania Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integracja systemu ClickToDial (Asterisk,...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Tworzenie / modyfikacja usług Permission534=Usuwanie usług Permission536=Zobacz / zarządzaj ukrytymi usługami Permission538=Eksport usług +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Zobacz darowizny Permission702=Tworzenie / modyfikacja darowizn Permission703=Usuń darowizny @@ -848,6 +858,8 @@ Permission773=Usuń raporty wydatków Permission774=Przeczytaj wszystkie raporty wydatków (nawet dla użytkowników nie podwładni) Permission775=Zatwierdzanie raportów wydatków Permission776=Zapłać raporty wydatków +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Eksport raportów kosztów Permission1001=Zobacz zasoby Permission1002=Tworzenie / modyfikacja magazynów @@ -900,6 +912,7 @@ Permission2515=Konfiguracja katalogów dokumentów Permission2801=Użyj klienta FTP w trybie odczytu (tylko przeglądanie i pobieranie) Permission2802=Użyj klienta FTP w trybie zapisu (usuwanie lub przesyłanie plików) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Usuń zasoby Permission63004=Dołącz zasoby do zdarzeń w agendzie DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Potencjał potencjalnego klienta +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regiony DictionaryCountry=Kraje @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Szablony wiadomości e-mail DictionaryUnits=Units DictionaryMeasuringUnits=Jednostki pomiarowe DictionarySocialNetworks=Sieci społecznościowe -DictionaryProspectStatus=Stan oferty +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Strona logowania BackgroundImageLogin=Obrazek tła PermanentLeftSearchForm=Stały formularz wyszukiwania w lewym menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Firma/Organizacja CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Aktywowane aplikacje/moduły: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Musisz przynajmniej umożliwić 1 moduł ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Tak w lecie @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Która karta chcesz otworzyć domyślnie po wybraniu menu Agendę +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Kliknij, aby Dial konfiguracji modułu ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Używaj tylko łącza "tel:" na numery telefonów ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Wpisz 0 lub 1 UnicodeCurrency=Wpisz między nawiasami kwadratowymi wielkość dziesiętną Unicode reprezentującą symbol waluty. Na przykład: dla $ [36] - dla zł [122,322] - dla € wpisz [8364] ColorFormat=Kolor RGB jest w formacie HEX, np .: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly="Tak" dla podatku VAT „Not Perceived but Recoverable” stosowanego w niektórych stanach Francji. Ustaw „Nie” dla wszelkich innych lokalizacji. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Zapytanie ofertowe MailToSendSupplierOrder=Zamówienia zakupowe MailToSendSupplierInvoice=Faktury dostawcy MailToSendContract=Kontrakty +MailToSendReception=Receptions MailToThirdparty=Kontrahenci MailToMember=Członkowie MailToUser=Użytkownicy @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s jest dostępny. Wersja ExampleOfNewsMessageForMaintenanceRelease=System ERP i CRM Dolibarr %s jest dostępny. Wersja %s jest wersją serwisową. Wersja serwisowa nie wprowadza nowych funkcji ani zmian w bazie danych. Zawiera jedynie poprawki błędów. Wszystkim użytkownikom zalecamy uaktualnienie do tej wersji. Możesz pobrać ją z obszaru pobierania portalu https://www.dolibarr.org (Downloads > Stable versions). Możesz przeczytać ChangeLog, aby uzyskać pełną listę zmian. MultiPriceRuleDesc=Przy włączonej opcji „Kilka poziomów cen za produkt/usługę”, możesz zdefiniować różne ceny (jeden na poziom cen) dla każdego produktu. Aby zaoszczędzić swój czas, możesz wprowadzić regułę automatycznego obliczania ceny dla każdego poziomu w oparciu o cenę pierwszego poziomu, więc będziesz musiał wprowadzić cenę tylko dla pierwszego poziomu dla każdego produktu. Ta strona została zaprojektowana w celu zaoszczędzenia czasu, ale jest przydatna tylko wtedy, gdy ceny dla każdego poziomu są w stosunku do pierwszego poziomu. W większości przypadków możesz zignorować tę stronę. ModelModulesProduct=Szablon dokumentu produktu +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Aby móc automatycznie generować kody, musisz najpierw zdefiniować menedżera, aby automatycznie zdefiniował numer kodu kreskowego. SeeSubstitutionVars=Spójrz na *, aby uzyskać listę możliwych zmiennych podstawienia SeeChangeLog=Zobacz plik ChangeLog (tylko w języku angielskim) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Lewy margines w pliku PDF MAIN_PDF_MARGIN_RIGHT=Prawy margines w pliku PDF MAIN_PDF_MARGIN_TOP=Górny margines w pliku PDF MAIN_PDF_MARGIN_BOTTOM=Dolny margines w pliku PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Dla tego modułu nie jest wymagana żadna konkretna konfiguracja. SetToYesIfGroupIsComputationOfOtherGroups=Ustaw na Tak, jeśli grupa ta pochodzi z przetworzenia innych grup EnterCalculationRuleIfPreviousFieldIsYes=Wprowadź regułę obliczania, jeśli poprzednie pole było ustawione na Tak (na przykład „CODEGRP1 + CODEGRP2”) @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Kod pocztowy MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Przejdź do Konfiguracja -> Widżety MeasuringUnitTypeDesc=Użyj tu wartości takich jak „rozmiar”, „powierzchnia”, „objętość”, „waga”, „czas” MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/pl_PL/agenda.lang b/htdocs/langs/pl_PL/agenda.lang index f5f09290275..308e26c0b51 100644 --- a/htdocs/langs/pl_PL/agenda.lang +++ b/htdocs/langs/pl_PL/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Ilość zdarzeń ListOfActions=Lista zdarzeń EventReports=Raport zdarzeń Location=Lokalizacja -ToUserOfGroup=Dla każdego użytkownika w grupie +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Wydarzenia całodniowe MenuToDoActions=Wszystkie zdarzenia niekompletne MenuDoneActions=Wszystkie zdarzenia zakończone @@ -86,6 +86,8 @@ ProposalDeleted=Oferta usunięta OrderDeleted=Zamówienie usunięte InvoiceDeleted=Faktura usunięta DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Produkt %s utworzony PRODUCT_MODIFYInDolibarr=Produkt %s zmodyfikowany PRODUCT_DELETEInDolibarr=Produkt %s usunięty @@ -158,3 +160,9 @@ DateStartPlusOne=Data rozpoczęcia + 1 godzina SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/pl_PL/boxes.lang b/htdocs/langs/pl_PL/boxes.lang index ba51f9a09fa..3c3730b9e9c 100644 --- a/htdocs/langs/pl_PL/boxes.lang +++ b/htdocs/langs/pl_PL/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Ostani %s zapisani dostawcy BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Ostatnich %s klientów lub potencjalnych klientów -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Ostatnich %s członków BoxTitleLastFicheInter=Ostatnie %s zmodyfikowane interwencje @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Ostatnie %s zmodyfikowane oferty +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Faktury Klientów ForCustomersOrders=Zamówienia klientów ForProposals=Oferty @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Księgowość diff --git a/htdocs/langs/pl_PL/cashdesk.lang b/htdocs/langs/pl_PL/cashdesk.lang index bd6dd47d637..337d7d5708e 100644 --- a/htdocs/langs/pl_PL/cashdesk.lang +++ b/htdocs/langs/pl_PL/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/pl_PL/compta.lang b/htdocs/langs/pl_PL/compta.lang index 87f0a968943..1596c31aaa7 100644 --- a/htdocs/langs/pl_PL/compta.lang +++ b/htdocs/langs/pl_PL/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Opłata ZUS lub podatek SocialContributions=Opłaty ZUS lub podatki SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Koszty specjalne @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/pl_PL/contracts.lang b/htdocs/langs/pl_PL/contracts.lang index d3d46588c71..1e6393b597f 100644 --- a/htdocs/langs/pl_PL/contracts.lang +++ b/htdocs/langs/pl_PL/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Uruchomione usługi MenuExpiredServices=Wygasłe usługi MenuClosedServices=Zamknięte usługi NewContract=Nowy kontrakt -NewContractSubscription=Nowa umowa/subskrypcja +NewContractSubscription=New contract or subscription AddContract=Stwórz kontrakt DeleteAContract=Usuń kontrakt ActivateAllOnContract=Aktywuj wszystkie usługi diff --git a/htdocs/langs/pl_PL/errors.lang b/htdocs/langs/pl_PL/errors.lang index d38e189dbff..13d89600986 100644 --- a/htdocs/langs/pl_PL/errors.lang +++ b/htdocs/langs/pl_PL/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nowa wartość nie może być równa starego ErrorFailedToValidatePasswordReset=Nie udało się REINIT hasło. Mogą być wykonywane już reinit (ten link może być używany tylko jeden raz). Jeśli nie, spróbuj ponownie uruchomić proces reinit. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Nie udało się dodać kontaktu -ErrorDateMustBeBeforeToday=Data nie może być nowsza od dzisiejszej +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Tryb płatność została ustawiona na typ% s, ale konfiguracja modułu faktury nie została zakończona do określenia informacji, aby pokazać tym trybie płatności. ErrorPHPNeedModule=Błąd, PHP musi mieć zainstalowany moduł %s, aby korzystać z tej funkcji. ErrorOpenIDSetupNotComplete=Ty konfiguracji Dolibarr plik konfiguracyjny, aby umożliwić uwierzytelnianie OpenID, ale adres URL usługi OpenID nie jest zdefiniowany w stałej% s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Hasło zostało ustawione dla tego użytkownika. Jednakże nie Konto użytkownika zostało utworzone. Więc to hasło jest przechowywane, ale nie mogą być używane do logowania do Dolibarr. Może być stosowany przez zewnętrzny moduł / interfejsu, ale jeśli nie trzeba definiować dowolną logowania ani hasła do członka, można wyłączyć opcję "Zarządzaj login dla każdego członka" od konfiguracji modułu użytkownika. Jeśli potrzebujesz zarządzać logowanie, ale nie wymagają hasła, możesz zachować to pole puste, aby uniknąć tego ostrzeżenia. Uwaga: E może być również stosowany jako login, jeśli element jest połączony do użytkownika. diff --git a/htdocs/langs/pl_PL/languages.lang b/htdocs/langs/pl_PL/languages.lang index 6fc11d89c58..8448976c9dd 100644 --- a/htdocs/langs/pl_PL/languages.lang +++ b/htdocs/langs/pl_PL/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabski Language_ar_EG=Arabski (Egipt) Language_ar_SA=Arabski +Language_az_AZ=Azerbaijani Language_bn_BD=Bengalski +Language_bn_IN=Bengali (India) Language_bg_BG=Bułgarski Language_bs_BA=Bośniacki Language_ca_ES=Kataloński @@ -20,6 +23,7 @@ Language_en_GB=Angielski (Zjednoczone Królestwo) Language_en_IN=Angielski (Indie) Language_en_NZ=Angielski (Nowa Zelandia) Language_en_SA=Angielski (Arabia Saudyjska) +Language_en_SG=English (Singapore) Language_en_US=Angielski (Stany Zjednoczone) Language_en_ZA=Angielski (Republika Południowej Afryki) Language_es_ES=Hiszpański @@ -29,6 +33,7 @@ Language_es_CL=Hiszpański (Chile) Language_es_CO=Hiszpański (Kolumbia) Language_es_DO=Hiszpański (Dominikana) Language_es_EC=Hiszpański (Ewkador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Hiszpański (Honduras) Language_es_MX=Hiszpański (Meksyk) Language_es_PA=Hiszpański (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Hiszpański (Paragwaj) Language_es_PE=Hiszpański (Peru) Language_es_PR=Hiszpański (Portoryko) Language_es_UY=Hiszpański (Urugwaj) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Hiszpański (Wenezuela) Language_et_EE=Estoński Language_eu_ES=Baskijski @@ -44,15 +50,22 @@ Language_fi_FI=Fiński Language_fr_BE=Francuski (Belgia) Language_fr_CA=Francuski (Kanada) Language_fr_CH=Francuski (Szwajcaria) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francuski +Language_fr_GA=French (Gabon) Language_fr_NC=Francuski (Nowa Kaledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Fryzyjski +Language_gl_ES=Galician Language_he_IL=Hebrajski +Language_hi_IN=Hindi (India) Language_hr_HR=Chorwacki Language_hu_HU=Węgierski Language_id_ID=Indonezyjski Language_is_IS=Islandzki Language_it_IT=Włoski +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japoński Language_ka_GE=Gruziński Language_km_KH=Khmerski @@ -64,6 +77,7 @@ Language_lv_LV=Łotewski Language_mk_MK=Macedoński Language_mn_MN=Mongolski Language_nb_NO=Norweski (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Holenderski (Belgia) Language_nl_NL=Dutch Language_pl_PL=Polski @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Wietnamski Language_zh_CN=Chiński Language_zh_TW=Chiński (tradycyjny) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malajski diff --git a/htdocs/langs/pl_PL/mails.lang b/htdocs/langs/pl_PL/mails.lang index 70e3426dcdb..10ef6063468 100644 --- a/htdocs/langs/pl_PL/mails.lang +++ b/htdocs/langs/pl_PL/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Informacja ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/pl_PL/main.lang b/htdocs/langs/pl_PL/main.lang index fbcd7ee2879..3a69a3bf91d 100644 --- a/htdocs/langs/pl_PL/main.lang +++ b/htdocs/langs/pl_PL/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Podatek należny/naliczony Amount=Ilość AmountInvoice=Kwota faktury AmountInvoiced=Kwota zafakturowana -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Kwota płatności AmountHTShort=Amount (excl.) AmountTTCShort=Kwota (zawierająca VAT) @@ -485,6 +485,7 @@ Categories=Tagi / kategorie Category=Tag / kategoria By=Przez From=Od +FromDate=Z FromLocation=Z to=do To=do @@ -687,6 +688,7 @@ Method=Metoda Receive=Odbiór CompleteOrNoMoreReceptionExpected=Pełna lub niczego więcej nie oczekiwano ExpectedValue=Oczekiwana wartość +ExpectedQty=Expected Qty PartialWoman=Część TotalWoman=Razem NeverReceived=Nigdy nie otrzymała @@ -703,6 +705,7 @@ MenuECM=Dokumenty MenuAWStats=AWStats MenuMembers=Członkowie MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Limit Dollibara (Menu główne-setup-bezpieczeństwo): %s KB, PHP, limit: %s KB NoFileFound=Brak dokumentów zapisanych w tym katalogu CurrentUserLanguage=Język bieżący @@ -725,7 +728,7 @@ Page=Strona Notes=Uwagi AddNewLine=Dodaj nowy wiersz AddFile=Dodaj plik -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Skopiuj obiekt z jego głównymi atrybutami ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=Cz ShortFriday=Pi ShortSaturday=So ShortSunday=Ni +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Wybierz szablon wiadomości email SetRef=Ustaw referencję Select2ResultFoundUseArrows=Znaleziono pewne wyniki. Użyj strzałek, aby wybrać. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informacja +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/pl_PL/members.lang b/htdocs/langs/pl_PL/members.lang index 99c90443f4d..3c5e9fca126 100644 --- a/htdocs/langs/pl_PL/members.lang +++ b/htdocs/langs/pl_PL/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Projekt członków MembersStatusResiliated=członkowie zakończone +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Zatwierdzony +SubscriptionNotNeeded=No subscription needed NewCotisation=Nowe Wkład PaymentSubscription=Nowy wkład płatności SubscriptionEndDate=Data zakończenia subskrypcji @@ -78,7 +81,7 @@ DeleteType=Usuń VoteAllowed=Głosowanie dozwolone Physical=Fizyczne Moral=Moralny -MorPhy=Moralnej i fizycznej +MorPhy=Natura Reenable=Ponownym włączeniu ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/pl_PL/mrp.lang b/htdocs/langs/pl_PL/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/pl_PL/mrp.lang +++ b/htdocs/langs/pl_PL/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/pl_PL/other.lang b/htdocs/langs/pl_PL/other.lang index b8854d61787..42937a4dc0d 100644 --- a/htdocs/langs/pl_PL/other.lang +++ b/htdocs/langs/pl_PL/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Wybierz profil demo najlepiej odzwierciedlający twoje potrzeby... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/pl_PL/products.lang b/htdocs/langs/pl_PL/products.lang index 1f7215d547e..34f265a9867 100644 --- a/htdocs/langs/pl_PL/products.lang +++ b/htdocs/langs/pl_PL/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Ustaw typ kodu kreskowego BarcodeValue=Wartość kodu kreskowego NoteNotVisibleOnBill=Notatka (nie widoczna na fakturach, ofertach...) ServiceLimitedDuration=Jeśli produkt jest usługą z ograniczonym czasem trwania: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Ilość cen DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Kraj pochodzenia Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Krótka etykieta Unit=Jednostka p=jedn. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Generator wariantów Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Nowy atrybut NewProductAttributeValue=Nowa wartość atrybutu diff --git a/htdocs/langs/pl_PL/projects.lang b/htdocs/langs/pl_PL/projects.lang index bb75befb4e0..05a7af17809 100644 --- a/htdocs/langs/pl_PL/projects.lang +++ b/htdocs/langs/pl_PL/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Współpracownik TypeContact_project_task_external_TASKCONTRIBUTOR=Współpracownik SelectElement=Wybierz element AddElement=Link do elementu +LinkToElementShort=Link do # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statystyki dotyczące projektów / przewodów -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Zadanie przypisanie. Wprowadzenie czasu na zadanie powinno być możliwe. IdTaskTime=Id razem zadaniem YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/pl_PL/recruitment.lang b/htdocs/langs/pl_PL/recruitment.lang new file mode 100644 index 00000000000..f55547daa9d --- /dev/null +++ b/htdocs/langs/pl_PL/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Ustawienia +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = O +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/pl_PL/stocks.lang b/htdocs/langs/pl_PL/stocks.lang index 3dfabc4c372..bb473086ac7 100644 --- a/htdocs/langs/pl_PL/stocks.lang +++ b/htdocs/langs/pl_PL/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Usuń wysyłanie Stock=Stan Stocks=Stany MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Zapasy według lotu/nr seryjnego @@ -95,14 +95,16 @@ RealStock=Realny magazyn RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Wirtualny zapas -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Identyfikator magazynu DescWareHouse=Opis magazynu LieuWareHouse=Lokalizacja magazynu WarehousesAndProducts=Magazyny i produkty WarehousesAndProductsBatchDetail=Magazyny i produkty (z detalami na lot / serial) -AverageUnitPricePMPShort=Średnia ważona ceny wejściowej -AverageUnitPricePMP=Średnia ważona ceny wejściowej +AverageUnitPricePMPShort=Średnia ważona ceny +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Cena sprzedaży jednostki EstimatedStockValueSellShort=Wartość sprzedaży EstimatedStockValueSell=Wartość sprzedaży @@ -141,7 +143,7 @@ Replenishments=Uzupełnienie NbOfProductBeforePeriod=Ilość produktów w magazynie% s przed wybrany okres (<% s) NbOfProductAfterPeriod=Ilość produktów w magazynie% s po wybraniu okres (>% s) MassMovement=Masowe przesunięcie -SelectProductInAndOutWareHouse=Wybierz produkt, ilość, magazyn źródłowy i docelowy magazyn, a następnie kliknij przycisk "% s". Po wykonaniu tych wszystkich wymaganych ruchów, kliknij na "% s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Wpływy do tego celu StockMovementRecorded=Przesunięcia zapasu zarejestrowane @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/pl_PL/suppliers.lang b/htdocs/langs/pl_PL/suppliers.lang index e6b7942c0fb..f9cfa1e9546 100644 --- a/htdocs/langs/pl_PL/suppliers.lang +++ b/htdocs/langs/pl_PL/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Dostawcy SuppliersInvoice=Faktura dostawcy ShowSupplierInvoice=Pokaż fakturę dostawcy @@ -15,33 +15,33 @@ SomeSubProductHaveNoPrices=Niektóre podprodukty nie mają zdefiniowanych cen AddSupplierPrice=Dodaj cenę zakupu ChangeSupplierPrice=Zmień cenę zakupu SupplierPrices=Ceny dostawców -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Ten dostawca jest już powiązany z referencją: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Płatność dostawcy SuppliersArea=Obszar dostawcy -RefSupplierShort=Ref. vendor +RefSupplierShort=Symbol dostawcy Availability=Dostępność -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Faktury i płatności dostawcy -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Zatwierdź to zamówienie ConfirmApproveThisOrder=Czy zaakceptować zamówienie %s? DenyingThisOrder=Odrzuć to zamówienie ConfirmDenyingThisOrder=Czy odrzucić zamówienie %s? ConfirmCancelThisOrder=Czy anulować zamówienie %s? -AddSupplierOrder=Create Purchase Order -AddSupplierInvoice=Create vendor invoice +AddSupplierOrder=Utwórz zamówienie +AddSupplierInvoice=Utwórz fakturę dostawcy ListOfSupplierProductForSupplier=List of products and prices for vendor %s -SentToSuppliers=Sent to vendors -ListOfSupplierOrders=List of purchase orders -MenuOrdersSupplierToBill=Purchase orders to invoice -NbDaysToDelivery=Opóźnienie dostawy w dniach -DescNbDaysToDelivery=Największe opóźnienie dostawy wśród produktów z tego zamówienia -SupplierReputation=Vendor reputation +SentToSuppliers=Wyślij do dostawców +ListOfSupplierOrders=Lista zamówień +MenuOrdersSupplierToBill=Zamówienia do zafakturowania +NbDaysToDelivery=Delivery delay (days) +DescNbDaysToDelivery=The longest delivery delay of the products from this order +SupplierReputation=Reputacja dostawcy DoNotOrderThisProductToThisSupplier=Nie zamawiaj -NotTheGoodQualitySupplier=Zła jakość -ReputationForThisProduct=Reputation +NotTheGoodQualitySupplier=Low quality +ReputationForThisProduct=Reputacja BuyerName=Nazwa kupującego -AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of supplier +AllProductServicePrices=Ceny wszystkich produktów/usług +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Ceny dostawców diff --git a/htdocs/langs/pl_PL/ticket.lang b/htdocs/langs/pl_PL/ticket.lang index ed3cb9d87df..e33e54c62e2 100644 --- a/htdocs/langs/pl_PL/ticket.lang +++ b/htdocs/langs/pl_PL/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Typ -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Grupa TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Grupa SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/pl_PL/users.lang b/htdocs/langs/pl_PL/users.lang index 19dd2de7727..e6d255dfee3 100644 --- a/htdocs/langs/pl_PL/users.lang +++ b/htdocs/langs/pl_PL/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Utworzony użytkownik będzie zewnętrzny użytkownik (po IdPhoneCaller=ID dzwoniącego NewUserCreated=Użytkownik %s utworzony NewUserPassword=Zmiana hasła dla %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Użytkownik %s zmodyfikowany UserDisabled=Użytkownik %s wyłączony UserEnabled=Użytkownik %s aktywowany @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Wyłączone w trybie konserwacji UserAccountancyCode=Kod księgowy użytkownika UserLogoff=Użytkownik wylogowany UserLogged=Użytkownik zalogowany +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/pl_PL/withdrawals.lang b/htdocs/langs/pl_PL/withdrawals.lang index ab3cdc6ec52..a9750a149e1 100644 --- a/htdocs/langs/pl_PL/withdrawals.lang +++ b/htdocs/langs/pl_PL/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Zamówienie polecenia zapłaty -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Faktura odmówił (Naładuj odrzucenie do klienta) StatusDebitCredit=Status debit/credit StatusWaiting=Czekanie StatusTrans=Przekazywane +StatusDebited=Debited StatusCredited=Dobro +StatusPaid=Płatność StatusRefused=Odmówił StatusMotif0=Nieokreślone StatusMotif1=Przepis insuffisante @@ -77,13 +79,13 @@ StatusMotif8=Inny powód CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Tylko biuro CreateBanque=Tylko bank OrderWaiting=Oczekiwania na leczenie -NotifyTransmision=Wycofanie Przekazanie -NotifyCredit=Odstąpienia od umowy kredytowej +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Krajowy numer nadajnika WithBankUsingRIB=Na rachunkach bankowych z wykorzystaniem RIB WithBankUsingBANBIC=Na rachunkach bankowych z wykorzystaniem IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Kredyt na WithdrawalFileNotCapable=Nie można wygenerować plik paragon wycofania dla danego kraju:% s (Twój kraj nie jest obsługiwany) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Plik Wycofanie +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Ustaw status "Plik Wysłane" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statystyki według stanu linii @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Rodzaj płatności ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Proszę wybierz tylko jedną +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Żądana kwota SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Kwota: %s
    Metode: %s
    Data: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Opcja dla trybu rzeczywistego nie był ustawiony, zatrzymujemy po tej symulacji +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/pl_PL/workflow.lang b/htdocs/langs/pl_PL/workflow.lang index f33d455c02a..384e999ce1e 100644 --- a/htdocs/langs/pl_PL/workflow.lang +++ b/htdocs/langs/pl_PL/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Konfiguracja modułu przepływu pracy -WorkflowDesc=Moduł ten jest przeznaczony do zmiany zachowania automatycznych działań na język aplikacji. Domyślnie pracy jest otwarty (można robić rzeczy w określonej kolejności). Możesz włączyć automatyczne czynności, które są zainteresowane. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=Nie ma zmiany workflow dostępne z aktywnych modułów. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatycznie stwórz zamówienie klienta po podpisaniu propozycji handlowej (nowe zamówienie będzie miało taką samą kwotę jak oferta) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatycznie stwórz fakturę dla klienta po zatwierdzeniu kontraktu -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Sklasyfikuj powiązaną(e) propozycje handlowe jako zafakturowane, gdy zamówienie klienta jest ustawione jako zafakturowane (i jeśli kwota zamówienia jest taka sama, jak całkowita kwota podpisanych powiązanych propozycji) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatyczne utworzenie AutomaticClassification=Automatyczne zaklasyfikowanie diff --git a/htdocs/langs/pl_PL/zapier.lang b/htdocs/langs/pl_PL/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/pl_PL/zapier.lang +++ b/htdocs/langs/pl_PL/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/pt_BR/accountancy.lang b/htdocs/langs/pt_BR/accountancy.lang index 0256ca74930..b515e57a41a 100644 --- a/htdocs/langs/pt_BR/accountancy.lang +++ b/htdocs/langs/pt_BR/accountancy.lang @@ -163,6 +163,7 @@ UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Conta de terceiro OpeningBalance=Saldo inicial ShowOpeningBalance=Mostrar saldo inicial HideOpeningBalance=Ocultar saldo inicial +ShowSubtotalByGroup=Mostrar subtotal por grupo Pcgtype=Plano de Contas PcgtypeDesc=O grupo de contas é usado como critério predefinido de 'filtro' e 'agrupamento' para alguns relatórios contábeis. Por exemplo, 'RENDA' ou 'DESPESA' são usados ​​como grupos para contas contábeis de produtos para criar o relatório de despesas / receitas. Reconcilable=Reconciliável diff --git a/htdocs/langs/pt_BR/admin.lang b/htdocs/langs/pt_BR/admin.lang index 0eecbdb7b51..cda7582a8f9 100644 --- a/htdocs/langs/pt_BR/admin.lang +++ b/htdocs/langs/pt_BR/admin.lang @@ -225,8 +225,8 @@ MAIN_SMS_SENDMODE=Método usado para enviar SMS UserEmail=E-mail do usuário CompanyEmail=E-mail da empresa FeatureNotAvailableOnLinux=Função não disponível para sistemas tipo Unix. Teste de envio local. +FixOnTransifex=Corrija a tradução na plataforma de tradução on-line do projeto SubmitTranslation=Se a tradução para este idioma não estiver completa ou você encontrar erros, você pode corrigir isso editando os arquivos no diretório langs / %s e enviar sua alteração para www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Se a tradução para este idioma não está completa ou você encontrar erros, você pode corrigir pela edição dos arquivos no diretório langs/%s e enviar os arquivos modificados para dolibarr.org/forum ou para os desenvolvedores em github.com/Dolibarr/dolibarr. ModuleSetup=Conf. do módulo ModulesSetup=Configuração de Módulos/Aplicativos ModuleFamilyCrm=Gestão de Relacionamento com o Cliente (CRM) @@ -293,11 +293,11 @@ SmsTestMessage=Mensagem Teste de __PHONEFROM__ para __PHONETO__ ModuleMustBeEnabledFirst=O módulo %s deve estar primeiramente habilitado se você precisa desta funcionalidade. SecurityToken=Chave para proteção das URLs NoSmsEngine=Nenhum gerenciador de remetente de SMS disponível. Um gerenciador de remetentes SMS não é instalado com a distribuição padrão porque eles dependem de um fornecedor externo, mas você pode encontrar alguns em %s -PDFDesc=Opções globais para geração de PDF. -PDFAddressForging=Regras para caixas de endereço +PDFDesc=Opções globais para geração de PDF +PDFAddressForging=Regras para seção de endereço HideAnyVATInformationOnPDF=Ocultar todas as informações relacionadas a imposto sobre vendas/IVA PDFRulesForSalesTax=Regras para ICMS -HideLocalTaxOnPDF=Ocultar taxa %s na coluna Venda de imposto +HideLocalTaxOnPDF=Ocultar %s taxa na coluna Imposto sobre vendas / IVA HideDescOnPDF=Ocultar descrição dos produtos HideRefOnPDF=Ocultar ref. dos produtos. HideDetailsOnPDF=Ocultar detalhes das linhas de produtos @@ -311,6 +311,8 @@ NewVATRates=Taxa de ICMS nova PriceBaseTypeToChange=Modificar os preços com base no valor de referência defino em MassConvert=Iniciar a conversão em massa String=Variável +String1Line=String (1 linha) +TextLongNLines=Texto longo (n linhas) Int=Inteiro Float=Flutuante DateAndTime=Data e Hora @@ -338,11 +340,13 @@ LinkToTestClickToDial=Entre com um número telefônico para chamar e mostrar um RefreshPhoneLink=Atualizar link LinkToTest=Clique no link gerado pelo usuário %s (clique no número telefônico para testar) KeepEmptyToUseDefault=Deixe em branco para usar o valor padrão +KeepThisEmptyInMostCases=Na maioria dos casos, você pode manter esse campo vazio. DefaultLink=Link padrão SetAsDefault=Definir como padrão ValueOverwrittenByUserSetup=Aviso, esse valor pode ser substituido pela configuração especifícada pelo usuário (cada usuário pode ter seu propria URL CliqueParaDiscar) ExternalModule=Módulo externo InstalledInto=Instalado no diretório %s +BarcodeInitForThirdparties=Inicialização de código de barras em massa para terceiros BarcodeInitForProductsOrServices=Inicialização de código de barras em massa ou redefinir de produtos ou serviços CurrentlyNWithoutBarCode=Atualmente, você tem %s registro(s) no %s %s sem um código de barras definido. InitEmptyBarCode=Valor Init para o próximo registros vazios @@ -410,7 +414,10 @@ Module53Desc=Gestão de Serviços Module54Name=Contratos/Assinaturas Module55Name=Códigos de Barra Module55Desc=Gestor de Códigos de Barra -Module57Name=Pagamentos por débito direto bancário +Module56Name=Pagamento por transferência de crédito +Module56Desc=Gestão do pagamento de fornecedores por ordens de Transferência a Crédito. Inclui a geração de arquivo SEPA para países europeus. +Module57Name=Pagamentos por Débito Direto +Module57Desc=Gerenciamento de pedidos de Débito Direto. Inclui a geração de arquivo SEPA para países europeus. Module58Name=CliqueParaDiscarl Module58Desc=Integração do Sistema CliqueParaDiscar (Asterisk, etc.) Module59Desc=Adicione uma função para gerar uma conta Bookmark4u de uma conta Dolibarr @@ -757,7 +764,8 @@ Permission63003=Excluir recursos Permission63004=Conectar os recursos aos eventos da agenda DictionaryCompanyType=Tipos de terceiros DictionaryCompanyJuridicalType=Entidades jurídicas de terceiros -DictionaryProspectLevel=Possível cliente +DictionaryProspectLevel=Nível potencial de prospecção para empresas +DictionaryProspectContactLevel=Nível potencial de prospecção para contatos DictionaryCanton=Estados / Cidades DictionaryRegion=Regiões DictionaryCivility=Títulos honorários @@ -782,7 +790,8 @@ DictionaryAccountancyJournal=Relatórios da contabilidade DictionaryEMailTemplates=Templates de e-mail DictionaryMeasuringUnits=Unidades de Medição DictionarySocialNetworks=Redes Sociais -DictionaryProspectStatus=Status de prospecto de cliente +DictionaryProspectStatus=Status em potencial para empresas +DictionaryProspectContactStatus=Status do cliente potencial para contatos SetupSaved=Configurações Salvas SetupNotSaved=Configuração não salva BackToModuleList=Voltar à lista do módulo @@ -846,7 +855,6 @@ MessageLogin=Mensagem da página de login LoginPage=Página de login PermanentLeftSearchForm=Formulário permanente de pesquisa no menu esquerdo DefaultLanguage=Idioma padrão -EnableMultilangInterface=Ativar suporte multilíngue EnableShowLogo=Mostrar o logotipo da empresa no menu CompanyInfo=Empresa / Organização CompanyIds=Identidades da empresa / organização @@ -971,7 +979,7 @@ WarningAtLeastKeyOrTranslationRequired=Pelo menos um critério de busca é exigi NewTranslationStringToShow=Nova variável de tradução a ser exibida OriginalValueWas=A tradução original foi sobrescrita. O valor original era:

    %s TransKeyWithoutOriginalValue=Você forçou uma nova tradução para a chave de tradução ' %s ' que não existe em nenhum arquivo de idioma -TotalNumberOfActivatedModules=Aplicação / módulos ativados: %s / %s +TitleNumberOfActivatedModules=Módulos ativados YouMustEnableOneModule=Você pelo menos deve ativar 1 módulo YesInSummer=Sim em verão OnlyFollowingModulesAreOpenedToExternalUsers=Observe que apenas os módulos a seguir estão disponíveis para usuários externos (independentemente das permissões de tais usuários) e somente se as permissões forem concedidas:
    @@ -987,6 +995,7 @@ AddRefInList=Mostrar ref. Cliente / fornecedor lista de informações (lista de AddAdressInList=Exibir lista de informações de endereço do cliente / fornecedor (lista de seleção ou caixa de combinação)
    Terceiros aparecerão com um formato de nome de "Empresa X. - Rua tal, n°:21, sala: 123456, Cidade/Estado - Brasil" em vez de "Empresa X". FillThisOnlyIfRequired=Exemplo: +2 (Preencha somente se compensar o problema do timezone é experiente) NumberingModules=Modelos de numeração +DocumentModules=Modelos de documentos PasswordGenerationStandard=Retorna uma senha gerara de acordo com o algorítimo interno do Dolibarr: 8 caracteres contendo números e letras em letras minusculas. PasswordGenerationPerso=Retornar uma senha de acordo com a configuração definida para a sua personalidade. PasswordPatternDesc=Descrição do padrão de senha @@ -1286,14 +1295,12 @@ AccountancyCodeBuy=Código de contas de compras AgendaSetup=Configurações do módulo de eventos e agenda PasswordTogetVCalExport=Chave para autorizar exportação do link PastDelayVCalExport=Não exportar eventos antigos de -AGENDA_DEFAULT_VIEW=Qual aba voçê quer abrir por padrão quando o menu Agenda e selecionado AGENDA_REMINDER_EMAIL=Ativar lembrete de evento por e-mails (A opção de lembrar / atraso pode ser definida em cada evento). Nota: Módulo 1 %s deve ser habilitado e configurado corretamente para que o lembrete seja enviado na freqüência correta. AGENDA_REMINDER_BROWSER=Ativar lembrete de evento no navegador do usuário (quando a data do evento é atingida, cada usuário pode recusar isso da pergunta de confirmação do navegador) AGENDA_REMINDER_BROWSER_SOUND=Habilitar a notificação sonora AGENDA_SHOW_LINKED_OBJECT=Exibir objeto conectado na visualização da agenda ClickToDialSetup=Configurações do módulo clique para discar ClickToDialUrlDesc=URL chamada quando clica-se no ícone do telefone. Na URL, você pode usar as tags
    __PHONETO__ que será substituída pelo número do telefone da pessoa a chamar
    __PHONEFROM__ que será substituída pelo telefone da pessoa que está chamando (o seu)
    __LOGIN__ que será substituída pelo login clicktodial (definido no cartão do usuário)
    __PASS__ que será substituída pela senha clicktodial (definida no cartão do usuário). -ClickToDialDesc=Este módulo faz um número de telefone links clicáveis. Um clique no ícone fará com que seu telefone ligue para o número. Isso pode ser usado para chamar um sistema de call center da Dolibarr que pode ligar para o número de telefone em um sistema SIP, por exemplo. ClickToDialUseTelLink=Use apenas o link "tel." para os números de telefone CashDeskSetup=Configuração do módulo de ponto de vendas CashDeskBankAccountForSell=Conta default para usar nos pagamentos em dinheiro @@ -1409,6 +1416,7 @@ ForcedConstants=Valores constantes exigidos MailToSendProposal=Propostas de cliente MailToSendOrder=Pedido de Venda MailToSendShipment=Fretes +MailToSendReception=Recebimentos MailToUser=Usuários ByDefaultInList=Exibir como padrão na visualização em lista YouUseLastStableVersion=Você utiliza a última versão estável @@ -1440,6 +1448,7 @@ MAIN_PDF_MARGIN_LEFT=Margem esquerda no PDF MAIN_PDF_MARGIN_RIGHT=Margem direita no PDF MAIN_PDF_MARGIN_TOP=Margem superior no PDF MAIN_PDF_MARGIN_BOTTOM=Margem inferior no PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Altura para o logotipo em PDF NothingToSetup=Não há configuração específica necessária para este módulo. SetToYesIfGroupIsComputationOfOtherGroups=Defina isto como yes se este grupo for um cálculo de outros grupos SeveralLangugeVariatFound=Várias variantes de idioma encontradas @@ -1466,13 +1475,10 @@ NoNewEmailToProcess=Nenhum novo e-mail (filtros correspondentes) para processar XEmailsDoneYActionsDone=%s e-mails qualificados, %s e-mails processados com sucesso (para registro %s/ações executadas) RecordEvent=Registrar evento de e-mail CreateLeadAndThirdParty=Criar lead (e terceiro, se necessário) -CreateTicketAndThirdParty=Criar ticket (e terceiros, se necessário) CodeLastResult=Código do último resultado NbOfEmailsInInbox=Número de e-mails no diretório de origem LoadThirdPartyFromName=Carregar pesquisa de terceiros em %s (carregar somente) LoadThirdPartyFromNameOrCreate=Carregar pesquisa de terceiros em %s (criar se não for encontrado) -WithDolTrackingID=Referência Dolibarr encontrada no ID da mensagem -WithoutDolTrackingID=Referência Dolibarr não encontrada no ID da mensagem FormatZip=CEP MainMenuCode=Código de entrada do menu (mainmenu) ECMAutoTree=Mostrar árvore de ECM automática @@ -1507,8 +1513,8 @@ ImportSetup=Configuração do módulo Importar InstanceUniqueID=ID exclusivo da instância SmallerThan=Menor que LargerThan=Maior que -IfTrackingIDFoundEventWillBeLinked=Observe que, se um ID de rastreamento for encontrado no e-mail recebido, o evento será automaticamente vinculado aos objetos relacionados. WithGMailYouCanCreateADedicatedPassword=Com uma conta do GMail, se você ativou a validação de 2 etapas, é recomendável criar uma segunda senha dedicada para o aplicativo, em vez de usar sua própria senha da conta em https://myaccount.google.com/. +EmailCollectorTargetDir=Pode ser um comportamento desejado mover o email para outra tag / diretório quando ele foi processado com êxito. Basta definir o nome do diretório aqui para usar este recurso (NÃO use caracteres especiais no nome). Observe que você também deve usar uma conta de logon de leitura / gravação. EmailCollectorLoadThirdPartyHelp=Você pode usar esta ação para usar o conteúdo de email para localizar e carregar uma terceira parte existente em seu banco de dados. A terceira parte encontrada (ou criada) será usada para seguir as ações que precisam dela. No campo de parâmetro, você pode usar, por exemplo, 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' se desejar extrair o nome da terceira parte de uma cadeia de caracteres 'Name: name to find' encontrada na corpo. EndPointFor=Ponto final para %s : %s DeleteEmailCollector=Excluir coletor de e-mail diff --git a/htdocs/langs/pt_BR/agenda.lang b/htdocs/langs/pt_BR/agenda.lang index bf6409fc199..3a43dd851ea 100644 --- a/htdocs/langs/pt_BR/agenda.lang +++ b/htdocs/langs/pt_BR/agenda.lang @@ -4,7 +4,7 @@ LocalAgenda=Calendário local ActionsOwnedBy=Evento de propriedade do ListOfActions=Lista de eventos EventReports=Relatório de eventos -ToUserOfGroup=Para qualquer usuário no grupo +ToUserOfGroup=Evento atribuído a qualquer usuário no grupo EventOnFullDay=Evento no(s) dia(s) todo MenuToDoMyActions=Meus eventos incompletos MenuDoneMyActions=Meus eventos terminados @@ -44,6 +44,7 @@ ShipmentClassifyClosedInDolibarr=Expedição%s classificado(s) e faturado(s) ShipmentUnClassifyCloseddInDolibarr=Remessa %s classificada como reaberta ShipmentBackToDraftInDolibarr=Embarque %s voltou à situação rascunho ShipmentDeletedInDolibarr=Envio %s cancelado +ReceptionValidatedInDolibarr=Recepção %s validada OrderCreatedInDolibarr=Pedido %s criado OrderValidatedInDolibarr=Pedido %s validado OrderDeliveredInDolibarr=Ordem %s classificadas entregues @@ -119,3 +120,6 @@ RepeatEvent=Repita evento EveryWeek=Toda semana EveryMonth=Todo mês DateStartPlusOne=Data de início + 1 hora +SetAllEventsToTodo=Defina todos os eventos para todo +SetAllEventsToInProgress=Defina todos os eventos como em andamento +SetAllEventsToFinished=Definir todos os eventos como concluídos diff --git a/htdocs/langs/pt_BR/bills.lang b/htdocs/langs/pt_BR/bills.lang index 2c24ee6c107..34fb1404b65 100644 --- a/htdocs/langs/pt_BR/bills.lang +++ b/htdocs/langs/pt_BR/bills.lang @@ -177,6 +177,7 @@ setPaymentConditionsShortRetainedWarranty=Definir condições de pagamento da ga setretainedwarranty=Definir garantia estendida setretainedwarrantyDateLimit=Definir limite de data de garantia estendida RetainedWarrantyDateLimit=Limite de data de garantia estendida +RetainedWarrantyNeed100Percent=O progresso da fatura precisa estar em 100%% para que possa ser exibida em PDF AlreadyPaid=Já está pago AlreadyPaidBack=Já está estornado RemainderToPay=Restante para pagar @@ -272,6 +273,7 @@ DateIsNotEnough=Data ainda não alcançada InvoiceGeneratedFromTemplate=Fatura %s gerada a partir do tema de fatura recorrente %s GeneratedFromTemplate=Gerado a partir da fatura do modelo %s WarningInvoiceDateInFuture=Atenção, a data da fatura é superior à data atual +GroupPaymentsByModOnReports=Agrupar pagamentos por modo nos relatórios PaymentConditionShortRECEP=Após o recebimento PaymentConditionRECEP=Após o recebimento PaymentConditionShort30DENDMONTH=30 dias do fim do mês @@ -300,6 +302,8 @@ BankAccountNumberKey=Soma de verificação Residence=Endereço IBANNumber=Número da conta IBAN IBAN=Agencia +CustomerIBAN=IBAN do cliente +SupplierIBAN=IBAN do fornecedor BICNumber=Código BIC/SWIFT ExtraInfos=Informações extras RegulatedOn=Regulamentado em @@ -398,3 +402,5 @@ DoNotGenerateDoc=Não gere arquivo de documento BILL_DELETEInDolibarr=Fatura excluída BILL_SUPPLIER_DELETEInDolibarr=Fatura de fornecedor excluída UnitPriceXQtyLessDiscount=Preço unitário x Qtd. - Desconto +CustomersInvoicesArea=Área de cobrança do cliente +SupplierInvoicesArea=Área de cobrança do cliente diff --git a/htdocs/langs/pt_BR/boxes.lang b/htdocs/langs/pt_BR/boxes.lang index 6d8c6cb4ea8..77eb32557aa 100644 --- a/htdocs/langs/pt_BR/boxes.lang +++ b/htdocs/langs/pt_BR/boxes.lang @@ -20,8 +20,8 @@ BoxTitleLastSuppliers=Últimos %s fornecedores registrados BoxTitleLastModifiedSuppliers=Fornecedores: último %s modificado BoxTitleLastModifiedCustomers=Clientes: último %s modificado BoxTitleLastCustomersOrProspects=Últimos %s clientes ou prospectos de cliente -BoxTitleLastCustomerBills=Últimas faturas do cliente %s -BoxTitleLastSupplierBills=Últimas %s faturas do fornecedor +BoxTitleLastCustomerBills=Últimas %s faturas de cliente modificadas mais recentes +BoxTitleLastSupplierBills=Últimas %s faturas de fornecedor modificadas mais recentes BoxTitleLastModifiedProspects=Perspectivas: último %s modificado BoxTitleOldestUnpaidCustomerBills=Faturas do cliente: o mais antigo %s não pago BoxTitleOldestUnpaidSupplierBills=Faturas do fornecedor: o mais antigo %s não remunerado @@ -66,6 +66,7 @@ BoxTitleLatestModifiedSupplierOrders=Ordens do Vendedor: último %s modificado BoxTitleLastModifiedCustomerBills=Faturas do cliente: último %s modificado BoxTitleLastModifiedCustomerOrders=Pedidos de Vendas: último %s modificado BoxTitleLastModifiedPropals=Últimas %s propostas modificadas +BoxTitleLatestModifiedJobPositions=Últimos %s trabalhos alterados ForCustomersInvoices=Faturas de clientes ForCustomersOrders=Pedidos de clientes LastXMonthRolling=Ultima %s mensal diff --git a/htdocs/langs/pt_BR/cashdesk.lang b/htdocs/langs/pt_BR/cashdesk.lang index f75ae1d2536..ff2e4bbd438 100644 --- a/htdocs/langs/pt_BR/cashdesk.lang +++ b/htdocs/langs/pt_BR/cashdesk.lang @@ -51,7 +51,6 @@ POSModule=Módulo PDV BasicPhoneLayout=Usar layout básico para telefones SetupOfTerminalNotComplete=A configuração do terminal 1%s não está concluída DirectPayment=Pagamento direto -DirectPaymentButton=Botão de pagamento direto em dinheiro InvoiceIsAlreadyValidated=A fatura já está validada NoLinesToBill=Nenhuma linha para cobrança CustomReceipt=Recibo personalizado @@ -67,12 +66,10 @@ TakeposConnectorMethodDescription=Módulo externo com recursos extras. Possibili PrintMethod=Método de impressão ReceiptPrinterMethodDescription=Método poderoso com muitos parâmetros. Completamente personalizável com modelos. Não é possível imprimir a partir da nuvem. ByTerminal=Pelo terminal -TakeposNumpadUsePaymentIcon=Use o ícone de pagamento no numpad CashDeskRefNumberingModules=Módulo de numeração para vendas PDV CashDeskGenericMaskCodes6 =
    A tag {TN} é usada para adicionar o número do terminal TakeposGroupSameProduct=Agrupe as mesmas linhas de produtos StartAParallelSale=Iniciar uma nova venda paralela -ControlCashOpening=Caixa de controle na posição de abertura CloseCashFence=Fechar cerca de dinheiro CashReport=Relatório de caixa MainPrinterToUse=Impressora principal a ser usada @@ -80,3 +77,14 @@ OrderPrinterToUse=Solicite impressora a ser usada MainTemplateToUse=Modelo principal a ser usado OrderTemplateToUse=Modelo de pedido a ser usado BarRestaurant=Bar Restaurante +AutoOrder=Encomendado pelo próprio cliente +CustomerMenu=Menu do cliente +ScanToMenu=Digitalize o código QR para ver o menu +ScanToOrder=Digitalize o código QR para fazer o pedido +Appearance=Aparência +HideCategoryImages=Ocultar imagens da categoria +HideProductImages=Ocultar imagens do produto +NumberOfLinesToShow=Número de linhas de imagens a mostrar +DefineTablePlan=Definir plano de tabelas +GiftReceipt=Recibo de presente +ModuleReceiptPrinterMustBeEnabled=A impressora de recibos do módulo deve ter sido habilitada primeiro diff --git a/htdocs/langs/pt_BR/errors.lang b/htdocs/langs/pt_BR/errors.lang index 5ac8584e46f..afe2c1ac0b2 100644 --- a/htdocs/langs/pt_BR/errors.lang +++ b/htdocs/langs/pt_BR/errors.lang @@ -26,6 +26,7 @@ ErrorBarCodeAlreadyUsed=Código de barras já usado ErrorSupplierCodeRequired=Código de fornecedor necessário ErrorSupplierCodeAlreadyUsed=Código do fornecedor já usado ErrorBadParameters=Parâmetros inadequados +ErrorWrongParameters=Parâmetros errados ou ausentes ErrorBadValueForParameter=Valor incorreto '%s' para o parâmetro '%s' ErrorBadImageFormat=Arquivo imagem de formato não suportado (Seu PHP não suporta funções para converter neste formato) ErrorBadDateFormat=O valor '%s' tem o formato de data errada @@ -108,7 +109,8 @@ ErrorFailedToRemoveToMailmanList=Falha ao remover registro% s para% s Mailman li ErrorNewValueCantMatchOldValue=O novo valor não pode ser igual ao anterior ErrorFailedToValidatePasswordReset=Falha ao reinicializar senha. Pode ser o reinit já foi feito (este link pode ser usado apenas uma vez). Se não, tente reiniciar o processo reinit. ErrorFailedToAddContact=Houve uma falha ao adicionar o contato -ErrorDateMustBeBeforeToday=A data não pode ser posterior ao dia de hoje +ErrorDateMustBeBeforeToday=A data deve ser menor que hoje +ErrorDateMustBeInFuture=A data deve ser maior que hoje ErrorPaymentModeDefinedToWithoutSetup=A modalidade de pagamento foi definido para tipo% s mas a configuração do módulo de fatura não foi concluída para definir as informações para mostrar para esta modalidade de pagamento. ErrorPHPNeedModule=Erro, o PHP deve ter módulo% s instalado para usar este recurso. ErrorOpenIDSetupNotComplete=Você arquivo de configuração Dolibarr configuração para permitir a autenticação OpenID, mas a URL de serviço OpenID não está definido em constante% s @@ -134,6 +136,7 @@ ErrorMandatoryParametersNotProvided=Parâmetro (s) de preenchimento obrigatório ErrorOppStatusRequiredIfAmount=Você define um valor estimado para esse lead. Então você também deve inserir seu status. ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Má definição da matriz Menu No Módulo Descritor (mau valor para fk_menu chave) ErrorWarehouseRequiredIntoShipmentLine=É exigido um armazém na linha para a remessa +ErrorFilenameCantStartWithDot=O nome do arquivo não pode começar com com caracteres especiais ErrorSupplierCountryIsNotDefined=País para este fornecedor não está definido. Corrija isso primeiro. ErrorsThirdpartyMerge=Falha em mesclar os dois registros. Solicitação cancelada. ErrorModuleNotFound=O arquivo do módulo não foi encontrado. @@ -180,3 +183,4 @@ WarningSomeLinesWithNullHourlyRate=Algumas vezes foram registrados por alguns us WarningYourLoginWasModifiedPleaseLogin=O seu login foi modificado. Por questões de segurança, você terá de autenticar-se com o seu novo login antes da próxima ação. WarningProjectClosed=O projeto está fechado. Você deve reabri-lo primeiro. WarningSomeBankTransactionByChequeWereRemovedAfter=Algumas transações bancárias foram removidas após geração do recebimento, incluindo elas. Portanto, o número de cheques e o total de recebimento podem diferir do número e do total na lista. +WarningFailedToAddFileIntoDatabaseIndex=Aviso, falha ao adicionar entrada de arquivo na tabela de índice do banco de dados ECM diff --git a/htdocs/langs/pt_BR/languages.lang b/htdocs/langs/pt_BR/languages.lang index 6f7ded306ea..b266a10b972 100644 --- a/htdocs/langs/pt_BR/languages.lang +++ b/htdocs/langs/pt_BR/languages.lang @@ -9,6 +9,5 @@ Language_ka_GE=Georgiano Language_lo_LA=Laosiano Language_mk_MK=Macedônio Language_mn_MN=mongol -Language_nl_NL=Holandês Language_pl_PL=Polonês Language_bh_MY=malaio diff --git a/htdocs/langs/pt_BR/mails.lang b/htdocs/langs/pt_BR/mails.lang index 773a06e5e08..e0efe3c7f34 100644 --- a/htdocs/langs/pt_BR/mails.lang +++ b/htdocs/langs/pt_BR/mails.lang @@ -96,5 +96,6 @@ NoContactWithCategoryFound=Nenhum foi encontrado nenhum contato/endereço com um NoContactLinkedToThirdpartieWithCategoryFound=Nenhum foi encontrado nenhum contato/endereço com uma categoria OutGoingEmailSetup=Configuração de e-mail de saída InGoingEmailSetup=Configuração de e-mail de entrada +OutGoingEmailSetupForEmailing=Configuração de email de saída (para o módulo %s) DefaultOutgoingEmailSetup=Configuração de e-mail de saída padrão ContactsWithThirdpartyFilter=Contatos com filtro de terceiros diff --git a/htdocs/langs/pt_BR/main.lang b/htdocs/langs/pt_BR/main.lang index b1f7b0dbc05..16df49a3432 100644 --- a/htdocs/langs/pt_BR/main.lang +++ b/htdocs/langs/pt_BR/main.lang @@ -21,6 +21,7 @@ FormatDateHourTextShort=%d %b, %Y, %I:%M %p FormatDateHourText=%d %B, %Y, %I:%M %p DatabaseConnection=Login à Base de Dados NoTemplateDefined=Nenhum modelo disponível para este tipo de email +EmptySearchString=Digite critérios na pesquisa NoRecordFound=Nenhum registro encontrado NoRecordDeleted=Nenhum registro foi deletado NotEnoughDataYet=Sem dados suficientes @@ -121,6 +122,7 @@ Show=Ver Hide=ocultar ShowCardHere=Mostrar cartão SearchMenuShortCut=Ctrl + Shift + F +QuickAdd=Adição rápida Upload=Carregar Resize=Modificar tamanho ResizeOrCrop=Redimensionar ou cortar @@ -193,8 +195,7 @@ PriceUTTC=U.P. (inc. Impostos) Amount=Valor AmountInvoice=Valor Fatura AmountInvoiced=Valor faturado -AmountInvoicedHT=Valor faturado (incl. impostos) -AmountInvoicedTTC=Valor faturado (sem imposto) +AmountInvoicedHT=Valor faturado (sem imposto) AmountPayment=Valor Pagamento AmountHTShort=Quantidade (liq.) AmountTTCShort=Valor (incl. taxas) @@ -277,6 +278,7 @@ Available=Disponivel NotYetAvailable=Ainda não disponível NotAvailable=Não disponível Categories=Tags / categorias +Category=Tag / categoria to=para To=para OtherInformations=Outra informação @@ -322,6 +324,7 @@ AlreadyRead=Já lido NoMobilePhone=Sem celular Refresh=Atualizar BackToList=Mostar Lista +BackToTree=Voltar à árvore CanBeModifiedIfOk=Pode modificarse se é valido CanBeModifiedIfKo=Pode modificarse senão é valido ValueIsValid=Valor é válido @@ -339,6 +342,7 @@ YouCanChangeValuesForThisListFromDictionarySetup=Você pode alterar valores para YouCanChangeValuesForThisListFrom=Você pode alterar valores para esta lista no menu %s YouCanSetDefaultValueInModuleSetup=Você pode definir o valor padrão usado ao criar um novo registro na configuração do módulo UploadDisabled=Carregamento Desativada +MenuTaxesAndSpecialExpenses=Impostos | Despesas especiais ThisLimitIsDefinedInSetup=Límite Dolibarr (menu inicio-configuração-segurança): %s Kb, PHP limit: %s Kb CurrentTheme=Tema atual CurrentMenuManager=Administração do menu atual @@ -348,7 +352,7 @@ HidePassword=Mostrar comando com senha oculta UnHidePassword=Mostrar comando real com a senha visivel RootOfMedias=Raiz das mídias públicas (/ media) AddFile=Adicionar arquivo -FreeZone=Não é um produto / serviço predefinido +FreeZone=Produto de texto livre FreeLineOfType=Item de texto livre, digite: CloneMainAttributes=Clonar o objeto com estes atributos ReGeneratePDF=Re-gerar PDF @@ -433,6 +437,7 @@ Sincerely=Sinceramente ConfirmDeleteObject=Tem certeza de que deseja excluir este objeto? DeleteLine=Apagar linha ConfirmDeleteLine=Você tem certeza que deseja excluir esta linha? +ErrorPDFTkOutputFileNotFound=Erro: o arquivo não foi gerado. Verifique se o comando 'pdftk' está instalado em um diretório incluído na variável de ambiente $ PATH (somente linux / unix) ou entre em contato com o administrador do sistema. NoPDFAvailableForDocGenAmongChecked=Nenhum PDF estava disponível para a geração de documentos entre os registros verificados TooManyRecordForMassAction=Registros demais selecionados para ação em massa. A ação é restrita a uma lista de registros %s. NoRecordSelected=Nenhum registro selecionado @@ -544,3 +549,5 @@ DeleteFileText=Deseja realmente excluir este arquivo? ShowOtherLanguages=Mostrar outros idiomas SwitchInEditModeToAddTranslation=Alterne modo de edição para adicionar traduções para este idioma NotUsedForThisCustomer=Não usado para este cliente +AmountMustBePositive=O valor deve ser positivo +ByStatus=Por status diff --git a/htdocs/langs/pt_BR/members.lang b/htdocs/langs/pt_BR/members.lang index 75beb2d23b6..f78ff76914b 100644 --- a/htdocs/langs/pt_BR/members.lang +++ b/htdocs/langs/pt_BR/members.lang @@ -33,6 +33,8 @@ MemberStatusPaidShort=Até à data MemberStatusResiliated=Membro encerrado MemberStatusResiliatedShort=Encerrado MembersStatusResiliated=Membros encerrados +MemberStatusNoSubscription=Validado (nenhuma assinatura é necessária) +SubscriptionNotNeeded=Nenhuma assinatura necessária PaymentSubscription=Subscrição de Pagamento SubscriptionEndDate=data final filiação NewSubscriptionDesc=Este formulário permite que você grave a sua assinatura como um novo membro da fundação. Se você quiser renovar a sua assinatura (se já for membro), por favor, entre em contato com Conselho de Fundadores não por e-mail. @@ -44,7 +46,7 @@ SendCardByMail=Enviar cartão por e-mail NoTypeDefinedGoToSetup=nenhum tipo de membro definido. ir a configuração -> Tipos de Membros WelcomeEMail=Bem-vindo e-mail Physical=Físico -MorPhy=Moral/Físico +MorPhy=Tipo de produto Reenable=Reativar ResiliateMember=Encerrar um membro ConfirmResiliateMember=Você tem certeza que deseja encerrar este membro? diff --git a/htdocs/langs/pt_BR/mrp.lang b/htdocs/langs/pt_BR/mrp.lang index bfb2005baea..ee398122b08 100644 --- a/htdocs/langs/pt_BR/mrp.lang +++ b/htdocs/langs/pt_BR/mrp.lang @@ -3,7 +3,6 @@ Mrp=Ordens de fabricação MO=Ordem de fabricação MRPDescription=Módulo para gerenciar ordens de produção e manufatura (MO). MRPArea=Area MRP -MrpSetupPage=Configuração do módulo MRP MenuBOM=Lista de materiais LatestBOMModified=Última BOM modificada %s LatestMOModified=%s pedidos de manufatura mais recentes modificados @@ -25,7 +24,6 @@ WatermarkOnDraftMOs=Marca d'água no rascunho MO ConfirmCloneBillOfMaterials=Tem certeza de que deseja clonar a lista de materiais %s? ConfirmCloneMo=Tem certeza de que deseja clonar a ordem de fabricação %s? ManufacturingEfficiency=Eficiência de fabricação -ConsumptionEfficiency=Eficiência de consumo ValueOfMeansLoss=Valor de 0,95 significa uma média de 5 %% de perda durante a produção ValueOfMeansLossForProductProduced=Valor de 0,95 significa uma média de 5 %% de perda na produção do produto DeleteBillOfMaterials=Excluir lista de materiais @@ -38,12 +36,10 @@ QtyToProduce=Qtd. para produzir DateStartPlannedMo=Data início planejada DateEndPlannedMo=Data final planejada KeepEmptyForAsap=Vazio significa "o mais breve possível" -EstimatedDuration=Duração estimada EstimatedDurationDesc=Duração estimada para fabricar este produto usando esta lista técnica ConfirmValidateBom=Tem certeza que deseja validar a lista técnica com a referência %s (você poderá usá-la para criar novas ordens de fabricação) ConfirmCloseBom=Tem certeza de que deseja cancelar esta lista técnica (você não poderá mais usá-la para criar novas ordens de fabricação)? ConfirmReopenBom=Tem certeza de que deseja reabrir esta lista técnica (você poderá usá-la para criar novas ordens de fabricação) -StatusMOProduced=Produzido QtyFrozen=Qtd. congelada QuantityFrozen=Quantidade congelada QuantityConsumedInvariable=Quando esse sinalizador é definido, a quantidade consumida é sempre o valor definido e não é relativa à quantidade produzida. @@ -58,7 +54,6 @@ ToProduce=Produzir QtyAlreadyConsumed=Quant. consumida QtyAlreadyProduced=Quant. produzida QtyRequiredIfNoLoss=Quantidade necessária se não houver perda (a eficiência de fabricação é 100 %%) -ConsumeOrProduce=Consumir ou Produzir ConsumeAndProduceAll=Consumir e produzir todos Manufactured=Fabricado TheProductXIsAlreadyTheProductToProduce=O produto a ser adicionado já é o produto a ser produzido. @@ -72,7 +67,4 @@ ProductQtyToConsumeByMO=Quantidade do produto a ser consumida por MO aberto ProductQtyToProduceByMO=Quantidade do produto ser produzida por MO aberto AddNewConsumeLines=Adicione nova linha para consumir ProductsToConsume=Produtos para consumir -ProductsToProduce=Produtos para produzir -UnitCost=Custo unitário -TotalCost=Custo total BOMTotalCost=O custo para produzir essa lista técnica com base no custo de cada quantidade e produto a consumir (use o preço de custo, se definido, ou o preço médio ponderado, se definido, ou o melhor preço de compra) diff --git a/htdocs/langs/pt_BR/products.lang b/htdocs/langs/pt_BR/products.lang index e3dcffe327a..c529c093c03 100644 --- a/htdocs/langs/pt_BR/products.lang +++ b/htdocs/langs/pt_BR/products.lang @@ -28,6 +28,7 @@ ServicesOnPurchase=Serviços para compra ServicesOnPurchaseOnly=Serviços somente para compra ServicesNotOnSell=Serviços não para venda e não para compra ServicesOnSellAndOnBuy=Serviços para venda e compra +LastModifiedProductsAndServices=Últimos %s produtos | serviços alterados recentemente LastRecordedProducts=Últimos %s produtos gravados LastRecordedServices=Últimos %s serviços gravados Stock=Estoque @@ -61,6 +62,7 @@ SupplierCard=Cartão do fornecedor NoteNotVisibleOnBill=Nota (não visivel em faturas, orçamentos etc.) MultiPricesAbility=Vários segmentos de preço por produto/serviço (cada cliente está em um segmento de preço) MultiPricesNumPrices=Número de preços +DefaultPriceType=Base de preços por padrão (com ou sem impostos) ao adicionar novos preços de venda AssociatedProductsNumber=N� de produtos associados ParentProductsNumber=Numero de pacotes pais do produto ParentProducts=Produtos pai @@ -105,6 +107,8 @@ SuppliersPrices=Preços de fornecedores SuppliersPricesOfProductsOrServices=Preços do fornecedor (produtos ou serviços) CountryOrigin=Pais de origem Nature=Natureza do produto (material / finalizado) +NatureOfProductShort=Natureza do produto +NatureOfProductDesc=Matéria-prima ou produto acabado ShortLabel=Etiqueta curta set=conjunto se=conjunto diff --git a/htdocs/langs/pt_BR/projects.lang b/htdocs/langs/pt_BR/projects.lang index 14be8f16e1d..716fa43b767 100644 --- a/htdocs/langs/pt_BR/projects.lang +++ b/htdocs/langs/pt_BR/projects.lang @@ -113,6 +113,7 @@ TypeContact_project_task_internal_TASKEXECUTIVE=Tarefa executada TypeContact_project_task_external_TASKEXECUTIVE=Tarefa executada SelectElement=Selecionar componente AddElement=Link para componente +LinkToElementShort=Link para PlannedWorkload=carga horária planejada ProjectMustBeValidatedFirst=O projeto tem que primeiramente ser validado FirstAddRessourceToAllocateTime=Atribuir um recurso do usuário como contato do projeto para alocar tempo @@ -123,7 +124,6 @@ ProjectOverview=Visão geral ManageOpportunitiesStatus=Use projetos para acompanhar leads / opportinuties ProjectNbProjectByMonth=Nº. de projetos criados por mês ProjectNbTaskByMonth=Nº. de tarefas criadas por mês -ProjectsStatistics=As estatísticas sobre projetos / leads TaskAssignedToEnterTime=Tarefa atribuída. Entrando tempo nesta tarefa deve ser possível. IdTaskTime=Horário do ID da tarefa YouCanCompleteRef=Se vc quiser completar o num.ref com algum sufixo, é recomendado adicionar um caractere separador, dessa forma a numeração automática irá funcionar corretamente para os prox. projetos. Ex. 1%s-meusufix diff --git a/htdocs/langs/pt_BR/receiptprinter.lang b/htdocs/langs/pt_BR/receiptprinter.lang index b9a7da6e026..fcf16791aac 100644 --- a/htdocs/langs/pt_BR/receiptprinter.lang +++ b/htdocs/langs/pt_BR/receiptprinter.lang @@ -37,7 +37,6 @@ DOL_ACTIVATE_BUZZER=Ative buzzer DOL_PRINT_QRCODE=Imprimir QR Code DOL_PRINT_LOGO=Imprimir logotipo da minha empresa DOL_PRINT_LOGO_OLD=Imprimir logotipo da minha empresa (impressoras antigas) -DOL_BOLD=Negrito DOL_BOLD_DISABLED=Desabilitar negrito DOL_DOUBLE_HEIGHT=Tamanho duplo para altura DOL_DOUBLE_WIDTH=Tamanho duplo para largura @@ -45,26 +44,14 @@ DOL_DEFAULT_HEIGHT_WIDTH=Tamanho padrão para altura e largura DOL_UNDERLINE=Habilitar sublinhado DOL_UNDERLINE_DISABLED=Desabilitar sublinhado DOL_BEEP=Som Beep -DOL_PRINT_TEXT=Imprimir texto -DateInvoiceWithTime=Data e hora da fatura -YearInvoice=Ano da fatura DOL_VALUE_MONTH_LETTERS=Ano da fatura DOL_VALUE_MONTH=Ano da fatura -DOL_VALUE_DAY=Dia da fatura DOL_VALUE_DAY_LETTERS=Data da fatura em letras -DOL_LINE_FEED_REVERSE=Alimentação de linha reversa InvoiceID=ID da fatura -DOL_PRINT_OBJECT_LINES=Linhas da fatura DOL_VALUE_CUSTOMER_FIRSTNAME=Nome do cliente DOL_VALUE_CUSTOMER_LASTNAME=Sobrenome do cliente DOL_VALUE_CUSTOMER_MAIL=E-mail do cliente -DOL_VALUE_CUSTOMER_PHONE=Telefone do cliente DOL_VALUE_CUSTOMER_MOBILE=Celular do cliente -DOL_VALUE_CUSTOMER_SKYPE=Skype do cliente DOL_VALUE_CUSTOMER_TAX_NUMBER=Número fiscal do cliente -DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Saldo da conta do cliente -DOL_VALUE_MYSOC_NAME=O nome da sua empresa VendorLastname=Sobrenome do fornecedor VendorFirstname=Nome do fornecedor -DOL_VALUE_CUSTOMER_POINTS=Pontos do cliente -DOL_VALUE_OBJECT_POINTS=Pontos de objeto diff --git a/htdocs/langs/pt_BR/recruitment.lang b/htdocs/langs/pt_BR/recruitment.lang new file mode 100644 index 00000000000..15059d4cc8d --- /dev/null +++ b/htdocs/langs/pt_BR/recruitment.lang @@ -0,0 +1,7 @@ +# Dolibarr language file - Source file is en_US - recruitment +ModuleRecruitmentDesc =Gerenciar e acompanhar campanhas de recrutamento para novos cargos +RecruitmentSetup =Configuração de recrutamento +RecruitmentAbout =Sobre o recrutamento +RecruitmentAboutPage =Recrutamento sobre a página +NbOfEmployeesExpected=Número esperado de funcionários +JobLabel=Etiqueta do cargo diff --git a/htdocs/langs/pt_BR/stocks.lang b/htdocs/langs/pt_BR/stocks.lang index a04e49809f8..b99798f63a0 100644 --- a/htdocs/langs/pt_BR/stocks.lang +++ b/htdocs/langs/pt_BR/stocks.lang @@ -8,6 +8,10 @@ WarehouseTarget=Armazém de destino ValidateSending=Apagar envio CancelSending=Cancelar envio DeleteSending=Apagar envio +MissingStocks=Estoques ausentes +StockAtDate=Estoques por data +StockAtDateInPast=Data anterior +StockAtDateInFuture=Próxima futura StocksByLotSerial=Estoques por lote/nº de série LotSerial=Lotes/Series LotSerialList=Listagem de lotes/series @@ -17,6 +21,7 @@ MovementId=ID de movimento StockMovementForId=ID de movimento %d StocksArea=Setor de armazenagem AllWarehouses=Todos os armazéns +IncludeEmptyDesiredStock=Incluir também o estoque indefinido desejado IncludeAlsoDraftOrders=Incluir também projetos de pedidos NumberOfProducts=Número total de produtos LastMovement=Último movimento @@ -29,6 +34,11 @@ UnitPurchaseValue=Preço unitário de compra StockTooLow=Estoque muito baixo EnhancedValueOfWarehouses=Valor de estoques AllowAddLimitStockByWarehouse=Gerenciar também o valor do estoque mínimo e desejado por emparelhamento (armazém de produtos), além do valor do estoque mínimo e desejado por produto +RuleForWarehouse=Regra para armazéns +WarehouseAskWarehouseDuringOrder=Definir um armazém em Pedidos de venda +UserDefaultWarehouse=Definir um armazém em Usuários +MainDefaultWarehouse=Armazém padrão +MainDefaultWarehouseUser=Use um armazém padrão para cada usuário QtyDispatched=Quantidade despachada QtyDispatchedShort=Qtde despachada QtyToDispatchShort=Qtde a despachar @@ -48,13 +58,10 @@ RealStock=Estoque real RealStockDesc=Estoque físico/real é o estoque atualmente nos depósitos. RealStockWillAutomaticallyWhen=O estoque real será modificado de acordo com esta regra (conforme definido no módulo Stock): VirtualStock=Estoque virtual -VirtualStockDesc=O estoque virtual é o estoque calculado disponível uma vez que todas as ações abertas/pendentes (que afetam os estoques) sejam fechadas (pedidos de compra recebidos, pedidos de vendas enviados etc.) IdWarehouse=Id. armazenamento DescWareHouse=Descrição do armazém LieuWareHouse=Localização do armazenamento WarehousesAndProducts=Armazenamento de produtos -AverageUnitPricePMPShort=Preço médio de entrada -AverageUnitPricePMP=Preço médio de entrada SellPriceMin=Venda Preço unitário EstimatedStockValueSellShort=Valor para venda EstimatedStockValueSell=Valor para venda @@ -88,7 +95,6 @@ ReplenishmentOrdersDesc=Esta é uma lista de todos os pedidos de compra em abert NbOfProductBeforePeriod=Quantidade de produtos em estoque antes do período selecionado NbOfProductAfterPeriod=Quantidade de produtos em estoque período selecionado depois MassMovement=Movimentações em massa -SelectProductInAndOutWareHouse=Selecione um produto, uma quantidade, um armazém de origem e um armazém de destino e clique em "% s". Uma vez feito isso para todos os movimentos necessários, clique em "% s". ReceivingForSameOrder=Recibos para este fim StockMovementRecorded=Movimentações de estoque registradas RuleForStockAvailability=Regras sobre os requisitos de ações @@ -122,3 +128,4 @@ InventoryForASpecificWarehouse=Inventário para um armazém específico InventoryForASpecificProduct=Inventário para um produto específico StockIsRequiredToChooseWhichLotToUse=É necessário estoque para escolher qual lote usar ForceTo=Forçar a +AlwaysShowFullArbo=Exibir a árvore completa do armazém no pop-up dos links do armazém (Aviso: isso pode diminuir drasticamente o desempenho) diff --git a/htdocs/langs/pt_BR/suppliers.lang b/htdocs/langs/pt_BR/suppliers.lang index 85614b809bb..e3155bfae84 100644 --- a/htdocs/langs/pt_BR/suppliers.lang +++ b/htdocs/langs/pt_BR/suppliers.lang @@ -1,18 +1,15 @@ # Dolibarr language file - Source file is en_US - suppliers -Suppliers=Vendedores -SuppliersInvoice=Fatura do fornecedores -ShowSupplierInvoice=Mostrar fatura do fornecedores -NewSupplier=Novo fornecedores -ShowSupplier=Mostrar fornecedores +SuppliersInvoice=Fatura do fornecedor +ShowSupplierInvoice=Mostrar fatura do fornecedor TotalBuyingPriceMinShort=Total de precos de compra dos subprodutos TotalSellingPriceMinShort=Total de preços de venda de sub-produtos SomeSubProductHaveNoPrices=Algums dos sub-produtos nao tem um preco definido ChangeSupplierPrice=Modificar preço de compra SupplierPrices=Preços de fornecedores -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Este código de fornec. já está associado com um produto %s -NoRecordedSuppliers=Nenhum fornecedores gravado -SupplierPayment=Pagamento do fornecedores -SuppliersArea=Área do fornecedores +ReferenceSupplierIsAlreadyAssociatedWithAProduct=Este código de fornec. já está associado a um produto %s +NoRecordedSuppliers=Nenhum fornecedor registrado +SupplierPayment=Pagamento de fornecedores +SuppliersArea=Área de fornecedores RefSupplierShort=Ref. fornecedor Availability=Entrega ExportDataset_fournisseur_1=Faturas do fornecedores e detalhes da fatura @@ -34,5 +31,5 @@ SupplierReputation=Reputação do fornecedores DoNotOrderThisProductToThisSupplier=Não pedir NotTheGoodQualitySupplier=Baixa qualidade AllProductServicePrices=Todos os preços dos produtos / serviços -AllProductReferencesOfSupplier=Todos os produtos / Referencias de serviço do vendedor +AllProductReferencesOfSupplier=Todas as referências do fornecedor BuyingPriceNumShort=Preços de fornecedores diff --git a/htdocs/langs/pt_BR/ticket.lang b/htdocs/langs/pt_BR/ticket.lang index dfc5a295944..24ce002657a 100644 --- a/htdocs/langs/pt_BR/ticket.lang +++ b/htdocs/langs/pt_BR/ticket.lang @@ -21,7 +21,6 @@ TypeContact_ticket_external_CONTRIBUTOR=Contribuidor externo Notify_TICKET_SENTBYMAIL=Envio do ticket por e-mail NeedMoreInformation=Aguardando informação Waiting=Aguardando -Category=Código analitico Severity=Gravidade MailToSendTicketMessage=Para enviar e-mail da mensagem do ticket TicketSetup=Configuração do módulo de ticket @@ -46,6 +45,10 @@ TicketsActivatePublicInterfaceHelp=A interface pública permite que qualquer vis TicketNumberingModules=Módulo de numeração de bilhetes TicketNotifyTiersAtCreation=Notificar o terceiro no momento do terceiro TicketsDisableCustomerEmail=Sempre disabilitar e-mail quando um ticket é criado de uma interface pública +TicketsPublicNotificationNewMessage=Enviar e-mail (s) quando uma nova mensagem for adicionada +TicketsPublicNotificationNewMessageHelp=Enviar e-mail (s) quando uma nova mensagem for adicionada da interface pública (para o usuário atribuído ou o e-mail de notificações para (atualizar) e / ou o e-mail de notificações para) +TicketPublicNotificationNewMessageDefaultEmail=Email de notificações para (atualização) +TicketPublicNotificationNewMessageDefaultEmailHelp=Envie notificações de novas mensagens por e-mail para este endereço se o tíquete não tiver um usuário atribuído ou se o usuário não tiver um e-mail. TicketsIndex=Área de Tickets TicketList=Lista de bilhetes TicketAssignedToMeInfos=Esta página mostra os tíquetes criado pelo ou assinalados para o usuário corrente @@ -59,7 +62,6 @@ MessageListViewType=Mostrar como lista de tabelas TicketCard=Bilhete de cartão TicketsManagement=Gestão de bilhetes NewTicket=Novo Bilhete -TicketCategory=Código analitico SeeTicket=Veja o ingresso TicketReadOn=Leia MarkAsRead=Marcar ingresso como lido diff --git a/htdocs/langs/pt_BR/users.lang b/htdocs/langs/pt_BR/users.lang index 4aad9c9d6d1..07fd926c913 100644 --- a/htdocs/langs/pt_BR/users.lang +++ b/htdocs/langs/pt_BR/users.lang @@ -67,6 +67,7 @@ UserWillBeExternalUser=Usuario criado sera um usuario externo (porque esta conec IdPhoneCaller=ID chamador (telefone) NewUserCreated=Usuário %s Criado NewUserPassword=Senha alterada para %s +NewPasswordValidated=Sua nova senha foi validada e deve ser usada agora para fazer login. EventUserModified=Usuário %s Modificado UserDisabled=Usuário %s Desativado UserEnabled=Usuário %s Ativado @@ -93,6 +94,7 @@ ColorUser=Cor do usuario UserAccountancyCode=Código de contabilidade do usuário UserLogoff=Usuário desconetado UserLogged=Usuário Conectado +DateOfEmployment=Data de emprego DateEmployment=Data de Início do Emprego DateEmploymentEnd=Data de término do emprego CantDisableYourself=Você não pode desativar seu próprio registro de usuário @@ -101,3 +103,4 @@ ForceUserHolidayValidator=Forçar validação da solicitação de licença ValidatorIsSupervisorByDefault=Por padrão, a validação é feita pelo supervisor do usuário. Mantenha vazio para continuar desta maneira. UserPersonalEmail=E-mail pessoal UserPersonalMobile=Celular pessoal +WarningNotLangOfInterface=Atenção, este é o idioma principal do usuário, não o idioma da interface que ele escolheu ver. Para alterar o idioma da interface visível por este usuário, vá na guia %s diff --git a/htdocs/langs/pt_BR/withdrawals.lang b/htdocs/langs/pt_BR/withdrawals.lang index 5b7bccd9473..5d560f9548b 100644 --- a/htdocs/langs/pt_BR/withdrawals.lang +++ b/htdocs/langs/pt_BR/withdrawals.lang @@ -30,6 +30,7 @@ NoInvoiceRefused=Não carregue a rejeição InvoiceRefused=Fatura recusada (Verificar a rejeição junto ao cliente) StatusDebitCredit=Status débito / crédito StatusWaiting=Aguardando +StatusPaid=Pago StatusRefused=Negado StatusMotif1=Saldo insuficiente StatusMotif2=Solicitação contestada @@ -38,15 +39,12 @@ StatusMotif4=Pedido de venda StatusMotif8=Outras razões CreateGuichet=Apenas do escritório OrderWaiting=Aguardando resolução -NotifyTransmision=Retirada de Transmissão -NotifyCredit=Revogação de crédito NumeroNationalEmetter=Nacional Número Transmissor BankToReceiveWithdraw=Conta bancária de recebimento CreditDate=A crédito WithdrawalFileNotCapable=Não foi possível gerar arquivos recibo retirada para o seu país %s (O seu país não é suportado) ShowWithdraw=Mostrar ordem de débito direto IfInvoiceNeedOnWithdrawPaymentWontBeClosed=No entanto, se a fatura tiver pelo menos uma ordem de pagamento por débito direto ainda não processada, ela não será definida como paga para permitir o gerenciamento prévio da retirada. -WithdrawalFile=Arquivo Retirada SetToStatusSent=Defina o status "arquivo enviado" StatisticsByLineStatus=Estatísticas por situação de linhas DateRUM=Data da assinatura diff --git a/htdocs/langs/pt_PT/accountancy.lang b/htdocs/langs/pt_PT/accountancy.lang index 1f809ec4e87..8037ba7cc8c 100644 --- a/htdocs/langs/pt_PT/accountancy.lang +++ b/htdocs/langs/pt_PT/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Desactivar a gravação direta de transação na conta bancária ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Ativar exportação de rascunho em diário ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Diário de vendas ACCOUNTING_PURCHASE_JOURNAL=Diário de compras @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Aplicar categorias em massa AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Categoria para a conta contabilística foi removida diff --git a/htdocs/langs/pt_PT/admin.lang b/htdocs/langs/pt_PT/admin.lang index da5bb5690eb..185304a51ae 100644 --- a/htdocs/langs/pt_PT/admin.lang +++ b/htdocs/langs/pt_PT/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=E-mail do remetente padrão para envio manual (e-mail UserEmail=Email do utilizador CompanyEmail=Company Email FeatureNotAvailableOnLinux=Funcionalidade não disponivel em sistemas Unix. Teste parâmetros sendmail localmente. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Se a tradução para este idioma não estiver completa ou se encontrar erros, pode corrigi-los editando os ficheiros na diretoria langs/ %s e submeta os ficheiros modificados em dolibarr.org/forum ou para os programadores em github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Configuração do módulo ModulesSetup=Módulos/Aplicação - Configuração ModuleFamilyBase=Sistema @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Se precisa desta função, o módulo %s deve ser SecurityToken=A chave para URLs seguras NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Regras para Imposto sobre Vendas / IVA PDFLocaltax=Regras para %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modificar nos preços com valor de referência base defini MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Sequencia de caracteres +String1Line=String (1 line) TextLong=Texto longo +TextLongNLines=Long text (n lines) HtmlText=Texto HTML Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Gestão de contratos (serviços ou assinaturas recorrentes) Module55Name=Códigos de barras Module55Desc=Gestão dos códigos de barras Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Gerenciamento de ordens de pagamento de débito direto. Inclui a geração de arquivos SEPA para os países europeus. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integração com um sistema ClickToDial (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Criar/modificar serviços Permission534=Eliminar serviços Permission536=Ver/gerir serviços ocultos Permission538=Exportar serviços +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Consultar donativos Permission702=Criar/modificar donativos Permission703=Eliminar donativos @@ -848,6 +858,8 @@ Permission773=Eliminar relatórios de despesas Permission774=Consultar todos os relatórios de despesa (mesmo para utilizadores que não são subordinados) Permission775=Aprovar relatórios de despesas Permission776=Pagar relatórios de despesas +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Exportar relatórios de despesas Permission1001=Consultar stocks Permission1002=Criar/modificar armazéns @@ -900,6 +912,7 @@ Permission2515=Configuração de diretórios de documentos Permission2801=Usar cliente FTP em modo de leitura (listar e descarregar apenas) Permission2802=Usar o cliente FTP em modo de escrita (eliminar ou carregar ficheiros) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Eliminar recursos Permission63004=Associar recursos a eventos da agenda DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Cliente Potencial +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Distritos DictionaryCountry=Países @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Templates de Email DictionaryUnits=Unidades DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Redes sociais -DictionaryProspectStatus=Estado da prospeção +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Tipos de licença DictionaryOpportunityStatus=Status de lead para projeto / lead DictionaryExpenseTaxCat=Relatório de despesas - categorias de transporte @@ -1076,7 +1091,7 @@ LoginPage=Página de inicio de sessão BackgroundImageLogin=Imagem de fundo PermanentLeftSearchForm=Zona de pesquisa permanente no menu esquerdo DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Empresa/Organização CompanyIds=Identidades da Empresa/Organização @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=É necessário pelo menos um critério de NewTranslationStringToShow=Novo texto de tradução a exibir OriginalValueWas=A tradução original foi alterada. O valor original era:

    %s TransKeyWithoutOriginalValue=Você forçou uma nova tradução para a chave de tradução ' %s ' que não existe em nenhum arquivo de idioma -TotalNumberOfActivatedModules=Aplicação/módulos ativados: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Deve ativar, pelo menos, 1 módulo ClassNotFoundIntoPathWarning=Classe %s não encontrada no caminho do PHP YesInSummer=Sim no verão @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use tipos de eventos (gerenciados no menu Setup -> Diction AGENDA_USE_EVENT_TYPE_DEFAULT=Definir automaticamente este valor padrão para o tipo de evento no formulário de criação de evento AGENDA_DEFAULT_FILTER_TYPE=Definir automaticamente esse tipo de evento no filtro de pesquisa da visualização da agenda AGENDA_DEFAULT_FILTER_STATUS=Definir automaticamente este status para eventos no filtro de pesquisa da visualização da agenda -AGENDA_DEFAULT_VIEW=Qual é o separador que você deseja abrir por defeito quando seleciona o menu "Agenda" +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Ativar lembrete de eventos por e-mails (lembrar opção / atraso pode ser definido em cada evento). Nota: O módulo %sdeve estar habilitado e configurado corretamente para que o lembrete seja enviado na freqüência correta. AGENDA_REMINDER_BROWSER=Ativar lembrete de evento no navegador do usuário (quando a data do evento é atingida, cada usuário pode recusar isso da pergunta de confirmação do navegador) AGENDA_REMINDER_BROWSER_SOUND=Ativar notificação sonora @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Mostrar o objeto associado na vista de agenda ##### Clicktodial ##### ClickToDialSetup=Configuração do módulo "Click To Dial" ClickToDialUrlDesc=Uma chamada é efetuada quando o icon é clicado. No URL pode usar as tags:
    __PHONETO__ que será substituída pelo número do destinatário
    __PHONEFROM__ que será substituída pelo número do remetente
    __LOGIN__ que será substituída pelo nome de utilizador da sua conta ClickToDial (definido no seu cartão de utilizador)
    __PASS__ que será substituída pela palavra-passe da sua conta ClickToDial (definida no seu cartão de utilizador). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Usar apenas um link "tel:" em números de telefone ClickToDialUseTelLinkDesc=Use esse método se os usuários tiverem um softphone ou uma interface de software instalada no mesmo computador que o navegador e chamados quando você clicar em um link em seu navegador que comece com "tel:". Se você precisar de uma solução de servidor completa (sem necessidade de instalação de software local), deverá definir isso como "Não" e preencher o próximo campo. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Este campo contém uma referência para identificar a linha. Digite Enter0or1=Enter 0 or 1 UnicodeCurrency=Entre aqui entre chaves, lista de números de bytes que representam o símbolo da moeda. Por exemplo: para $, insira [36] - para o brasil real R $ [82,36] - para €, insira [8364] ColorFormat=As cores RGB está no formato HEX, por exemplo: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Posição da linha nas listas de seleção SellTaxRate=Taxa de imposto de venda RecuperableOnly=Sim para IVA "Não Percebido, mas Recuperável" dedicado a algum regiões ultramarinas da França. Mantenha o valor de "Não" em todos os outros casos.\n\n @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Solicitação de cotação MailToSendSupplierOrder=Ordens de compra MailToSendSupplierInvoice=Faturas do fornecedor MailToSendContract=Contratos +MailToSendReception=Receptions MailToThirdparty=Terceiros MailToMember=Membros MailToUser=Utilizadores @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=O Dolibarr ERP e CRM %s está disponível. A ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Modelos para documentos de produto +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=Veja a nota * para uma lista de possíveis variáveis ​​de substituição SeeChangeLog=Consulte o arquivo ChangeLog (somente em inglês) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Margem esquerda do PDF MAIN_PDF_MARGIN_RIGHT=Margem direita do PDF MAIN_PDF_MARGIN_TOP=Margem superior do PDF MAIN_PDF_MARGIN_BOTTOM=Margem inferior do PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Defina isto como "sim" se este grupo for uma computação de outros grupos EnterCalculationRuleIfPreviousFieldIsYes=Insira a regra de cálculo se o campo anterior foi definido como Sim (por exemplo, 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nada feito XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Registrar evento de email CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Código postal MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/pt_PT/agenda.lang b/htdocs/langs/pt_PT/agenda.lang index 00ee90a391e..de774f7acff 100644 --- a/htdocs/langs/pt_PT/agenda.lang +++ b/htdocs/langs/pt_PT/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Número de eventos ListOfActions=Lista de Eventos EventReports=Relatórios de eventos Location=Localização -ToUserOfGroup=Para qualquer utilizador no grupo +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Evento para todo(s) o(s) dia(s) MenuToDoActions=Todos os eventos incompletos MenuDoneActions=Todos os eventos terminados @@ -86,6 +86,8 @@ ProposalDeleted=Orçamento eliminado OrderDeleted=Encomenda eliminada InvoiceDeleted=Fatura eliminada DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=O produto %s foi criado PRODUCT_MODIFYInDolibarr=O produto %s foi modificado PRODUCT_DELETEInDolibarr=O produto %s foi eliminado @@ -158,3 +160,9 @@ DateStartPlusOne=Data de início +1 hora SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/pt_PT/boxes.lang b/htdocs/langs/pt_PT/boxes.lang index 26854f5e663..bfe70c39c7e 100644 --- a/htdocs/langs/pt_PT/boxes.lang +++ b/htdocs/langs/pt_PT/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Últimos %s fornecedores registados BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Últimos %s clientes ou prospeções -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Últimos %s membros BoxTitleLastFicheInter=Últimas %s intervenções modificadas @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Últimos %s orçamentos modificados +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Faturas a clientes ForCustomersOrders=Encomendas de clientes ForProposals=Orçamentos @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Contabilidade diff --git a/htdocs/langs/pt_PT/cashdesk.lang b/htdocs/langs/pt_PT/cashdesk.lang index 3fbde99a2a1..d1dba40375b 100644 --- a/htdocs/langs/pt_PT/cashdesk.lang +++ b/htdocs/langs/pt_PT/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/pt_PT/compta.lang b/htdocs/langs/pt_PT/compta.lang index c19fc1ec380..429e6922009 100644 --- a/htdocs/langs/pt_PT/compta.lang +++ b/htdocs/langs/pt_PT/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Imposto social ou fiscal SocialContributions=Impostos sociais ou fiscais SocialContributionsDeductibles=Impostos sociais ou fiscais dedutíveis SocialContributionsNondeductibles=Impostos sociais ou fiscais não dedutíveis +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Contribuição de etiqueta TypeContrib=Digite contribuição MenuSpecialExpenses=Despesas Especiais @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/pt_PT/contracts.lang b/htdocs/langs/pt_PT/contracts.lang index 66974e4e029..2725756cce3 100644 --- a/htdocs/langs/pt_PT/contracts.lang +++ b/htdocs/langs/pt_PT/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Serviços ativos MenuExpiredServices=Serviços expirados MenuClosedServices=Serviços fechados NewContract=Novo contrato -NewContractSubscription=Novo contrato/subscrição +NewContractSubscription=New contract or subscription AddContract=Criar contrato DeleteAContract=Eliminar um contrato ActivateAllOnContract=Ativar todos os serviços diff --git a/htdocs/langs/pt_PT/errors.lang b/htdocs/langs/pt_PT/errors.lang index b04e564f058..1750e06b3f6 100644 --- a/htdocs/langs/pt_PT/errors.lang +++ b/htdocs/langs/pt_PT/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=O novo valor não pode ser igual ao antigo ErrorFailedToValidatePasswordReset=Não foi possível reinicializar a senha. Pode ser que a reinicialização já tenha sido feita (esse link pode ser usado apenas uma vez). Caso contrário, tente reiniciar o processo de reinicialização. ErrorToConnectToMysqlCheckInstance=Conectar-se ao banco de dados falha. Verifique se o servidor de banco de dados está em execução (por exemplo, com mysql / mariadb, você pode iniciá-lo a partir da linha de comando com 'sudo service mysql start'). ErrorFailedToAddContact=Falha ao adicionar contato -ErrorDateMustBeBeforeToday=A data não pode ser maior que hoje +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Um modo de pagamento foi definido para digitar %s, mas a configuração do módulo Fatura não foi concluída para definir informações a serem exibidas para esse modo de pagamento. ErrorPHPNeedModule=Erro, o php deve ter o módulo %s instalado para utilizar esta funcionalidade ErrorOpenIDSetupNotComplete=Você configura o arquivo de configuração Dolibarr para permitir a autenticação OpenID, mas o URL do serviço OpenID não está definido em %s constante @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Uma senha foi definida para este membro. No entanto, nenhuma conta de usuário foi criada. Portanto, essa senha é armazenada, mas não pode ser usada para fazer login no Dolibarr. Pode ser usado por um módulo externo / interface, mas se você não precisa definir nenhum login nem senha para um membro, você pode desativar a opção "Gerenciar um login para cada membro" da configuração do módulo de membro. Se você precisar gerenciar um login, mas não precisar de nenhuma senha, poderá manter esse campo vazio para evitar esse aviso. Nota: O email também pode ser usado como um login se o membro estiver vinculado a um usuário. diff --git a/htdocs/langs/pt_PT/languages.lang b/htdocs/langs/pt_PT/languages.lang index c97fe5a83ae..31689948085 100644 --- a/htdocs/langs/pt_PT/languages.lang +++ b/htdocs/langs/pt_PT/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Amárico (Etiópia) Language_ar_AR=Árabe Language_ar_EG=Árabe (Egito) Language_ar_SA=Árabe +Language_az_AZ=Azerbaijão Language_bn_BD=Bengali +Language_bn_IN=Bengali (Índia) Language_bg_BG=Búlgaro Language_bs_BA=Bósnio Language_ca_ES=Catalão @@ -20,6 +23,7 @@ Language_en_GB=Inglês (Reino Unido) Language_en_IN=Inglês (Índia) Language_en_NZ=Inglês (Nova Zelândia) Language_en_SA=Inglês (Arábia Saudita) +Language_en_SG=Inglês (Singapura) Language_en_US=Inglês (Estados Unidos) Language_en_ZA=Inglês (África do Sul) Language_es_ES=Espanhol @@ -29,6 +33,7 @@ Language_es_CL=Espanhol (Chile) Language_es_CO=Espanhol (Colombia) Language_es_DO=Espanhol (República Dominicana) Language_es_EC=Espanhol (Equador) +Language_es_GT=Espanhol (Guatemala) Language_es_HN=Espanhol (Honduras) Language_es_MX=Espanhol (México) Language_es_PA=Espanhol (Panamá) @@ -36,6 +41,7 @@ Language_es_PY=Espanhol (Paraguai) Language_es_PE=Espanhol (Peru) Language_es_PR=Espanhol (Porto Rico) Language_es_UY=Espanhol (Uruguai) +Language_es_GT=Espanhol (Guatemala) Language_es_VE=Espanhol (Venezuela) Language_et_EE=Estónio Language_eu_ES=Basco @@ -44,15 +50,22 @@ Language_fi_FI=Finlandês Language_fr_BE=Francês (Bélgica) Language_fr_CA=Francês (Canadá) Language_fr_CH=Francês (Suíça) +Language_fr_CI=Francês (Costa de Marfim) +Language_fr_CM=Francês (Camarões) Language_fr_FR=Francês +Language_fr_GA=Francês (Gabão) Language_fr_NC=Francês (Nova Caledónia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frísio +Language_gl_ES=Galego Language_he_IL=Hebreu +Language_hi_IN=Hindi (Índia) Language_hr_HR=Croata Language_hu_HU=Húngaro Language_id_ID=Indonésio Language_is_IS=Islandês Language_it_IT=Italiano +Language_it_CH=Italiano (Suiça) Language_ja_JP=Japonês Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,8 +77,9 @@ Language_lv_LV=Letão Language_mk_MK=Macedónio Language_mn_MN=Mongol Language_nb_NO=Norueguês (Bokmål) +Language_ne_NP=Nepalês Language_nl_BE=Holandês (Bélgica) -Language_nl_NL=Dutch +Language_nl_NL=Holandês Language_pl_PL=Polaco Language_pt_BR=Português (Brasil) Language_pt_PT=Português @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbeque Language_vi_VN=Vietnamita Language_zh_CN=Chinês Language_zh_TW=Chinês (Tradicional) -Language_bh_MY=Malay +Language_zh_HK=Chinês (Hong Kong) +Language_bh_MY=Malaio diff --git a/htdocs/langs/pt_PT/mails.lang b/htdocs/langs/pt_PT/mails.lang index e742b00fd45..4711f17de75 100644 --- a/htdocs/langs/pt_PT/mails.lang +++ b/htdocs/langs/pt_PT/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Configuração de email de saída padrão Information=Informação ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/pt_PT/main.lang b/htdocs/langs/pt_PT/main.lang index 0e4bce5b52b..6ec47dcf6fc 100644 --- a/htdocs/langs/pt_PT/main.lang +++ b/htdocs/langs/pt_PT/main.lang @@ -355,8 +355,8 @@ PriceUTTC=P.U. (inc. impostos) Amount=Montante AmountInvoice=Montante da Fatura AmountInvoiced=Montante faturado -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Montatne do pagamento AmountHTShort=Amount (excl.) AmountTTCShort=Montante (IVA inc.) @@ -485,6 +485,7 @@ Categories=Etiquetas/Categorias Category=Etiqueta/Categoria By=Por From=De +FromDate=De FromLocation=De to=Para To=Para @@ -687,6 +688,7 @@ Method=Método Receive=Receção CompleteOrNoMoreReceptionExpected=Complete ou nada mais é esperado ExpectedValue=Valor esperado +ExpectedQty=Expected Qty PartialWoman=Parcial TotalWoman=Total NeverReceived=Nunca Recebido @@ -703,6 +705,7 @@ MenuECM=Documentos MenuAWStats=Estatisticas MenuMembers=Membros MenuAgendaGoogle=Agenda Google +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Límite Dolibarr (Menu inicio->configuração->segurança): %s Kb, PHP limit: %s Kb NoFileFound=Não existem documentos guardados nesta pasta CurrentUserLanguage=Idioma atual @@ -725,7 +728,7 @@ Page=Página Notes=Notas AddNewLine=Adicionar nova linha AddFile=Adicionar ficheiro -FreeZone=Não é um produto/serviço predefinido +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Copiar objeto com os seus atributos principais ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=Qui ShortFriday=Sex ShortSaturday=Sab ShortSunday=Dom +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Selecione um modelo de e-mail SetRef=Definir referência Select2ResultFoundUseArrows=Foram encontrados alguns resultados. Utilize as setas para selecionar o desejado. @@ -958,7 +994,7 @@ SearchIntoMembers=Membros SearchIntoUsers=Utilizadores SearchIntoProductsOrServices=Produtos ou serviços SearchIntoProjects=Projetos -SearchIntoMO=Manufacturing Orders +SearchIntoMO=Ordens de Fabrico SearchIntoTasks=Tarefas SearchIntoCustomerInvoices=Faturas a clientes SearchIntoSupplierInvoices=Faturas do fornecedor @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informação +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/pt_PT/members.lang b/htdocs/langs/pt_PT/members.lang index fcf41de278b..882250687bc 100644 --- a/htdocs/langs/pt_PT/members.lang +++ b/htdocs/langs/pt_PT/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Membro inativo MemberStatusResiliatedShort=Inativo MembersStatusToValid=Membros rascunho MembersStatusResiliated=Membros inativos +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validado +SubscriptionNotNeeded=No subscription needed NewCotisation=Nova filiação PaymentSubscription=Nova contribuição pagamento SubscriptionEndDate=Data fim filiação @@ -78,7 +81,7 @@ DeleteType=Apagar VoteAllowed=Voto autorizado Physical=Pessoa Singular Moral=Pessoa Coletiva -MorPhy=Pessoa Singular/Pessoa Coletiva +MorPhy=Natureza Reenable=Reactivar ResiliateMember=Terminar um membro ConfirmResiliateMember=Tem certeza de que deseja encerrar este membro? diff --git a/htdocs/langs/pt_PT/mrp.lang b/htdocs/langs/pt_PT/mrp.lang index ab5f6d81fad..5128c7a5d91 100644 --- a/htdocs/langs/pt_PT/mrp.lang +++ b/htdocs/langs/pt_PT/mrp.lang @@ -1,77 +1,78 @@ -Mrp=Manufacturing Orders -MO=Manufacturing Order -MRPDescription=Module to manage production and Manufacturing Orders (MO). -MRPArea=MRP Area -MrpSetupPage=Setup of module MRP -MenuBOM=Bills of material -LatestBOMModified=Latest %s Bills of materials modified -LatestMOModified=Latest %s Manufacturing Orders modified -Bom=Bills of Material -BillOfMaterials=Bill of Material -BOMsSetup=Setup of module BOM -ListOfBOMs=List of bills of material - BOM -ListOfManufacturingOrders=List of Manufacturing Orders -NewBOM=New bill of material +Mrp=Encomendas de Manufatura +MO=Encomenda de Manufatura +MOs=Manufacturing orders +MRPDescription=Módulo para gerir a produção e as «Encomendas de Manufatura» (EM). +MRPArea=Área de MRP +MrpSetupPage=Configuração do módulo MRP +MenuBOM=Faturas do material +LatestBOMModified=Últimas %s Faturas do material modificadas +LatestMOModified=Últimas %s Encomendas de Manufatura modificadas +Bom=Faturas do Material +BillOfMaterials=Fatura do Material +BOMsSetup=Configuração do módulo de FM +ListOfBOMs=Lista das faturas do material - FM +ListOfManufacturingOrders=Lista das Encomendas de Manufaturação +NewBOM=Nova fatura de material ProductBOMHelp=Product to create with this BOM.
    Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list. -BOMsNumberingModules=BOM numbering templates -BOMsModelModule=BOM document templates -MOsNumberingModules=MO numbering templates -MOsModelModule=MO document templates -FreeLegalTextOnBOMs=Free text on document of BOM -WatermarkOnDraftBOMs=Watermark on draft BOM -FreeLegalTextOnMOs=Free text on document of MO -WatermarkOnDraftMOs=Watermark on draft MO +BOMsNumberingModules=Modelos de numeração de FM +BOMsModelModule=Modelos de documento de FM +MOsNumberingModules=Modelos de numeração de EM +MOsModelModule=Modelos de documento de EM +FreeLegalTextOnBOMs=Texto livre no documento de FM +WatermarkOnDraftBOMs=Marca de água no rascunho de FM +FreeLegalTextOnMOs=Texto livre no documento de EM +WatermarkOnDraftMOs=Marca de água no rascunho de EM ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ? -ManufacturingEfficiency=Manufacturing efficiency -ConsumptionEfficiency=Consumption efficiency +ManufacturingEfficiency=Eficiência de manufaturação +ConsumptionEfficiency=Eficiência de consumo ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the production ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product -DeleteBillOfMaterials=Delete Bill Of Materials -DeleteMo=Delete Manufacturing Order +DeleteBillOfMaterials=Eliminar Faturas de Materiais +DeleteMo=Eliminar Encomenda de Manufaturação ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? -MenuMRP=Manufacturing Orders -NewMO=New Manufacturing Order -QtyToProduce=Qty to produce +MenuMRP=Encomendas de Manufatura +NewMO=Nova Encomenda de Manufatura +QtyToProduce=Qt. a produzir DateStartPlannedMo=Date start planned DateEndPlannedMo=Date end planned KeepEmptyForAsap=Empty means 'As Soon As Possible' -EstimatedDuration=Estimated duration +EstimatedDuration=Duração estimada EstimatedDurationDesc=Estimated duration to manufacture this product using this BOM ConfirmValidateBom=Are you sure you want to validate the BOM with the reference %s (you will be able to use it to build new Manufacturing Orders) ConfirmCloseBom=Are you sure you want to cancel this BOM (you won't be able to use it to build new Manufacturing Orders anymore) ? ConfirmReopenBom=Are you sure you want to re-open this BOM (you will be able to use it to build new Manufacturing Orders) -StatusMOProduced=Produced -QtyFrozen=Frozen Qty -QuantityFrozen=Frozen Quantity +StatusMOProduced=Produzido +QtyFrozen=Qt. Congelada +QuantityFrozen=Quantidade Congelada QuantityConsumedInvariable=When this flag is set, the quantity consumed is always the value defined and is not relative to the quantity produced. DisableStockChange=Stock change disabled DisableStockChangeHelp=When this flag is set, there is no stock change on this product, whatever is the quantity consumed -BomAndBomLines=Bills Of Material and lines -BOMLine=Line of BOM -WarehouseForProduction=Warehouse for production -CreateMO=Create MO -ToConsume=To consume -ToProduce=To produce -QtyAlreadyConsumed=Qty already consumed -QtyAlreadyProduced=Qty already produced +BomAndBomLines=Faturas do Material e linhas +BOMLine=Linhas de FM +WarehouseForProduction=Armazém para produção +CreateMO=Criar EM +ToConsume=Para consumir +ToProduce=Para produzir +QtyAlreadyConsumed=Qt. já consumida +QtyAlreadyProduced=Qt. já produzida QtyRequiredIfNoLoss=Qty required if there is no loss (Manufacturing efficiency is 100%%) -ConsumeOrProduce=Consume or Produce -ConsumeAndProduceAll=Consume and Produce All -Manufactured=Manufactured +ConsumeOrProduce=Consumir ou Produzir +ConsumeAndProduceAll=Consumir e Produzir Tudo +Manufactured=Manufaturado TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce. ForAQuantityOf=For a quantity to produce of %s ConfirmValidateMo=Are you sure you want to validate this Manufacturing Order? ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and/or production for the quantities set. This will also update the stock and record stock movements. ProductionForRef=Production of %s AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume and to produce are reached -NoStockChangeOnServices=No stock change on services +NoStockChangeOnServices=Nenhuma alteração de ''stock'' nos serviços ProductQtyToConsumeByMO=Product quantity still to consume by open MO ProductQtyToProduceByMO=Product quentity still to produce by open MO -AddNewConsumeLines=Add new line to consume -ProductsToConsume=Products to consume -ProductsToProduce=Products to produce -UnitCost=Unit cost -TotalCost=Total cost +AddNewConsumeLines=Adicionar nova linha para consumir +ProductsToConsume=Produtos para produzir +ProductsToProduce=Produtos para produzir +UnitCost=Custo unitário +TotalCost=Custo total BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) diff --git a/htdocs/langs/pt_PT/other.lang b/htdocs/langs/pt_PT/other.lang index adecd38170f..ce2b87ce1ac 100644 --- a/htdocs/langs/pt_PT/other.lang +++ b/htdocs/langs/pt_PT/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Olá)__\n\n\n__(Atenciosamente)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Olá)__\n\n\n__(Atenciosamente)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Olá)__\n\n\n__(Atenciosamente)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Você pode clicar no link abaixo para fazer seu pagamento, se ainda não estiver pronto.\n\n%s\n\n +PredefinedMailContentGeneric=__(Olá)__\n\n\n__(Atenciosamente)__\n\n__USER_SIGNATURE__ DemoDesc=O Dolibarr é um ERP/CRM compacto que suporta vários módulos de negócios. Uma demonstração mostrando todos os módulos não faz sentido porque esse cenário nunca ocorre (várias centenas disponíveis). Assim, vários perfis de demonstração estão disponíveis. ChooseYourDemoProfil=Escolha o perfil de demonstração que melhor se adequa às suas necessidades ... ChooseYourDemoProfilMore=...ou crie o seu próprio perfil
    (seleção manual de módulo) @@ -280,7 +278,9 @@ LinesToImport=Linhas a importar MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/pt_PT/products.lang b/htdocs/langs/pt_PT/products.lang index 0ca4ef598b4..95a866d3006 100644 --- a/htdocs/langs/pt_PT/products.lang +++ b/htdocs/langs/pt_PT/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Defina o tipo de código de barras BarcodeValue=Valor do código de barras NoteNotVisibleOnBill=Nota (não visível nas faturas, orçamentos, ...) ServiceLimitedDuration=Sim o serviço é de Duração limitada : +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Nº de preços DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Código Aduaneiro / Commodity / HS CountryOrigin=País de origem Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Rótulo curto Unit=Unidade p=você. @@ -359,6 +362,9 @@ SelectCombination=Selecione a combinação ProductCombinationGenerator=Gerador de variantes Features=Características PriceImpact=Impacto no preço +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Impacto no peso NewProductAttribute=Novo atributo NewProductAttributeValue=Novo valor de atributo diff --git a/htdocs/langs/pt_PT/projects.lang b/htdocs/langs/pt_PT/projects.lang index dd6269cc07c..bc1713523d8 100644 --- a/htdocs/langs/pt_PT/projects.lang +++ b/htdocs/langs/pt_PT/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Colaborador TypeContact_project_task_external_TASKCONTRIBUTOR=Colaborador SelectElement=Selecionar elemento AddElement=Ligar ao elemento +LinkToElementShort=Associar a # Documents models DocumentModelBeluga=Modelo de documento de projeto para visão geral de objetos vinculados DocumentModelBaleine=Modelo de documento de projeto para tarefas @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Nº de projetos criados por mês ProjectNbTaskByMonth=Nº de tarefas criadas por mês ProjectOppAmountOfProjectsByMonth=Quantidade de leads por mês ProjectWeightedOppAmountOfProjectsByMonth=Quantidade ponderada de leads por mês -ProjectOpenedProjectByOppStatus=Abrir projeto / liderar por status de lead -ProjectsStatistics=Estatísticas sobre projetos / leads -TasksStatistics=Estatísticas sobre tarefas de projeto / lead +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Tarefa atribuída. A inserção de tempo nesta tarefa deve ser possível. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/pt_PT/receiptprinter.lang b/htdocs/langs/pt_PT/receiptprinter.lang index 259efad08fe..382fa2fd17f 100644 --- a/htdocs/langs/pt_PT/receiptprinter.lang +++ b/htdocs/langs/pt_PT/receiptprinter.lang @@ -15,12 +15,12 @@ CONNECTOR_DUMMY=Impressora de Teste CONNECTOR_NETWORK_PRINT=Impressora de Rede CONNECTOR_FILE_PRINT=Impressora Local CONNECTOR_WINDOWS_PRINT=Impressora do Windows Local -CONNECTOR_CUPS_PRINT=Cups Printer +CONNECTOR_CUPS_PRINT=Impressora Cups CONNECTOR_DUMMY_HELP=Impressora de Teste para testar, não faz nada CONNECTOR_NETWORK_PRINT_HELP=10.x.x.x:9100 CONNECTOR_FILE_PRINT_HELP=/dev/usb/lp0, /dev/usb/lp1 CONNECTOR_WINDOWS_PRINT_HELP=LPT1, COM1, smb://FooUser:secret@computername/workgroup/Receipt Printer -CONNECTOR_CUPS_PRINT_HELP=CUPS printer name, example: HPRT_TP805L +CONNECTOR_CUPS_PRINT_HELP=Nome da impressora CUPS, exemplo: HPRT_TP805L PROFILE_DEFAULT=Perfil Predefinido PROFILE_SIMPLE=Perfil Simples PROFILE_EPOSTEP=Epos Tep Profile @@ -28,10 +28,10 @@ PROFILE_P822D=Perfil P822D PROFILE_STAR=Perfil da Estrela PROFILE_DEFAULT_HELP=Perfil predefinido adequado para as impressoras Epson PROFILE_SIMPLE_HELP=Perfil simples sem gráficos -PROFILE_EPOSTEP_HELP=Epos Tep Profile +PROFILE_EPOSTEP_HELP=Perfil de Tep Epos PROFILE_P822D_HELP=Perfil do P822D sem gráficos PROFILE_STAR_HELP=Perfil da Estrela -DOL_LINE_FEED=Skip line +DOL_LINE_FEED=Ignorar linha DOL_ALIGN_LEFT=Texto alinhado à esquerda DOL_ALIGN_CENTER=Texto centrado DOL_ALIGN_RIGHT=Texto alinhado à direita @@ -45,38 +45,38 @@ DOL_CUT_PAPER_PARTIAL=Cortar ticket parcialmente DOL_OPEN_DRAWER=Abrir gaveta do dinheiro DOL_ACTIVATE_BUZZER=Ativar campainha DOL_PRINT_QRCODE=Imprimir Código QR -DOL_PRINT_LOGO=Print logo of my company -DOL_PRINT_LOGO_OLD=Print logo of my company (old printers) -DOL_BOLD=Bold -DOL_BOLD_DISABLED=Disable bold +DOL_PRINT_LOGO=Imprimir logótipo da minha empresa +DOL_PRINT_LOGO_OLD=Imprimir logótipo da minha empresa (impressora antigas) +DOL_BOLD=Negrito +DOL_BOLD_DISABLED=Desativar negrito DOL_DOUBLE_HEIGHT=Double height size DOL_DOUBLE_WIDTH=Double width size DOL_DEFAULT_HEIGHT_WIDTH=Default height and width size -DOL_UNDERLINE=Enable underline -DOL_UNDERLINE_DISABLED=Disable underline +DOL_UNDERLINE=Ativar sublinhado +DOL_UNDERLINE_DISABLED=Desativar sublinhado DOL_BEEP=Beed sound -DOL_PRINT_TEXT=Print text -DateInvoiceWithTime=Invoice date and time -YearInvoice=Invoice year -DOL_VALUE_MONTH_LETTERS=Invoice month in letters -DOL_VALUE_MONTH=Invoice month -DOL_VALUE_DAY=Invoice day -DOL_VALUE_DAY_LETTERS=Inovice day in letters -DOL_LINE_FEED_REVERSE=Line feed reverse -InvoiceID=Invoice ID +DOL_PRINT_TEXT=Imprimir texto +DateInvoiceWithTime=Data e hora da fatura +YearInvoice=Ano da fatura +DOL_VALUE_MONTH_LETTERS=Mês da fatura em letras +DOL_VALUE_MONTH=Mês da fatura +DOL_VALUE_DAY=Dia da fatura +DOL_VALUE_DAY_LETTERS=Dia da fatura em letras +DOL_LINE_FEED_REVERSE=Alimentação de linha reversa +InvoiceID=Id. da Fatura InvoiceRef=Ref. fatura -DOL_PRINT_OBJECT_LINES=Invoice lines -DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name -DOL_VALUE_CUSTOMER_LASTNAME=Customer last name -DOL_VALUE_CUSTOMER_MAIL=Customer mail -DOL_VALUE_CUSTOMER_PHONE=Customer phone -DOL_VALUE_CUSTOMER_MOBILE=Customer mobile -DOL_VALUE_CUSTOMER_SKYPE=Customer Skype -DOL_VALUE_CUSTOMER_TAX_NUMBER=Customer tax number -DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Customer account balance -DOL_VALUE_MYSOC_NAME=Your company name -VendorLastname=Vendor last name -VendorFirstname=Vendor first name -VendorEmail=Vendor email -DOL_VALUE_CUSTOMER_POINTS=Customer points -DOL_VALUE_OBJECT_POINTS=Object points +DOL_PRINT_OBJECT_LINES=Linhas da fatura +DOL_VALUE_CUSTOMER_FIRSTNAME=Primeiro nome do cliente +DOL_VALUE_CUSTOMER_LASTNAME=Último nome do cliente +DOL_VALUE_CUSTOMER_MAIL=Correio do cliente +DOL_VALUE_CUSTOMER_PHONE=Telefone do cliente +DOL_VALUE_CUSTOMER_MOBILE=Telemóvel do cliente +DOL_VALUE_CUSTOMER_SKYPE=Skype do cliente +DOL_VALUE_CUSTOMER_TAX_NUMBER=Número de contribuinte do cliente +DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Saldo da conta do cliente +DOL_VALUE_MYSOC_NAME=O nome da sua empresa +VendorLastname=Último nome do fornecedor +VendorFirstname=Primeiro nome do fornecedor +VendorEmail=E-mail do fornecedor +DOL_VALUE_CUSTOMER_POINTS=Pontos do cliente +DOL_VALUE_OBJECT_POINTS=Pontos de objeto diff --git a/htdocs/langs/pt_PT/recruitment.lang b/htdocs/langs/pt_PT/recruitment.lang new file mode 100644 index 00000000000..dc0d79996e3 --- /dev/null +++ b/htdocs/langs/pt_PT/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recrutamento +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Gerir e acompanhar as campanhas de recrutamento para os novos cargos + +# +# Admin page +# +RecruitmentSetup = Configuração do recrutamento +Settings = Definições +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Área de recrutamento +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Sobre +RecruitmentAbout = Sobre Recrutamento +RecruitmentAboutPage = Página sobre Recrutamento +NbOfEmployeesExpected=Esperado nb de funcionários +JobLabel=Nome do cargo +WorkPlace=Local de trabalho +DateExpected=Data esperada +FutureManager=Futuro gerente +ResponsibleOfRecruitement=Responsável pelo recrutamento +IfJobIsLocatedAtAPartner=Se o trabalho estiver localizado num local de parceiro +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/pt_PT/stocks.lang b/htdocs/langs/pt_PT/stocks.lang index 5a651407cb5..0ed339d10ed 100644 --- a/htdocs/langs/pt_PT/stocks.lang +++ b/htdocs/langs/pt_PT/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Eliminar Envío Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks por lote/número de série @@ -95,14 +95,16 @@ RealStock=Stock real RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Stock virtual -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id. armazem DescWareHouse=Descrição armazem LieuWareHouse=Localização armazem WarehousesAndProducts=Armazens e produtos WarehousesAndProductsBatchDetail=Armazéns e produtos (com detalhe por lote / série) -AverageUnitPricePMPShort=Média dos preços de entrada -AverageUnitPricePMP=Média dos preços de entrada +AverageUnitPricePMPShort=Valor (PMP) +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Vendendo Preço unitário EstimatedStockValueSellShort=Valor para vender EstimatedStockValueSell=Valor para vender @@ -141,7 +143,7 @@ Replenishments=Reabastecimentos NbOfProductBeforePeriod=Quantidade de produto %s em estoque antes do período selecionado (<%s) NbOfProductAfterPeriod=Quantidade de produto %s em estoque após o período selecionado (> %s) MassMovement=Movimento de massa -SelectProductInAndOutWareHouse=Selecione um produto, uma quantidade, um warehouse de origem e um warehouse de destino e clique em "%s". Assim que isso for feito para todos os movimentos necessários, clique em "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Transferência de registro ReceivingForSameOrder=Receções para esta encomenda StockMovementRecorded=Movimentos de estoque registrados @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/pt_PT/suppliers.lang b/htdocs/langs/pt_PT/suppliers.lang index f9ceed462c7..8dcadcefa7e 100644 --- a/htdocs/langs/pt_PT/suppliers.lang +++ b/htdocs/langs/pt_PT/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Fornecedores SuppliersInvoice=Fatura de fornecedor ShowSupplierInvoice=Mostrar Fatura do Fornecedor @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Alguns sub-produtos não têm preço definido AddSupplierPrice=Adicionar preço de compra ChangeSupplierPrice=Alterar o preço de compra SupplierPrices=Preços de fornecedor -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Este fornecedor de referência já está associado com uma referência: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=Nenhum fornecedor registado SupplierPayment=Pagamento de fornecedor SuppliersArea=Área de forncedores RefSupplierShort=Ref. do fornecedor Availability=Disponibilidade -ExportDataset_fournisseur_1=Lista de faturas de fornecedor e linhas de fatura +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Faturas e pagamentos de fornecedor -ExportDataset_fournisseur_3=Encomendas a fornecedores e linhas de encomenda +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Aprovar este Pedido ConfirmApproveThisOrder=Tem certeza de que deseja aprovar a encomenda %s ? DenyingThisOrder=Negar esta encomenda @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=Lista de produtos e preços do fornecedor %s SentToSuppliers=Enviado para os fornecedores ListOfSupplierOrders=Lista de ordens de compra MenuOrdersSupplierToBill=Encomendas a fornecedor por faturar -NbDaysToDelivery=Atraso da entrega em dias -DescNbDaysToDelivery=O maior atraso na entrega dos produtos desta encomenda +NbDaysToDelivery=Delivery delay (days) +DescNbDaysToDelivery=The longest delivery delay of the products from this order SupplierReputation=Reputação do fornecedor DoNotOrderThisProductToThisSupplier=Não encomendar -NotTheGoodQualitySupplier=Qualidade errada +NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputação BuyerName=Nome do comprador AllProductServicePrices=Todos os preços de produtos/serviços -AllProductReferencesOfSupplier=Todas as referências de produtos/serviços do fornecedor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Preços de fornecedor diff --git a/htdocs/langs/pt_PT/ticket.lang b/htdocs/langs/pt_PT/ticket.lang index 656bd0469ca..4ef4dab738e 100644 --- a/htdocs/langs/pt_PT/ticket.lang +++ b/htdocs/langs/pt_PT/ticket.lang @@ -72,7 +72,6 @@ Deleted=Excluído # Dict Type=Tipo -Category=Analytic code Severity=Severidade # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Atribuir automaticamente o usuário que criou o ticket TicketsAutoAssignTicketHelp=Ao criar um ticket, o usuário pode ser atribuído automaticamente ao ticket. TicketNumberingModules=Módulo de numeração de ingressos TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Grupo TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Criado por NewTicket=Novo ticket SubjectAnswerToTicket=Bilhete de resposta TicketTypeRequest=Tipo de solicitação -TicketCategory=Analytic code +TicketCategory=Grupo SeeTicket=Ver ticket TicketMarkedAsRead=O ticket foi marcado como lido TicketReadOn=Lido a diff --git a/htdocs/langs/pt_PT/users.lang b/htdocs/langs/pt_PT/users.lang index a5e87314b36..ddeade51c09 100644 --- a/htdocs/langs/pt_PT/users.lang +++ b/htdocs/langs/pt_PT/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=O utilizador criado irá ser um utilizador externo (porqu IdPhoneCaller=Id. do Chamador (telefone) NewUserCreated=Utilizador %s Criado NewUserPassword=Palavra-passe alterada para %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Utilizador %s Modificado UserDisabled=Utilizador %s Desativado UserEnabled=Utilizador %s Ativado @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Desativado no modo de manutenção UserAccountancyCode=Código de contabilidade do utilizador UserLogoff=Terminar sessão do utilizador UserLogged=Utilizador conectado +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/pt_PT/withdrawals.lang b/htdocs/langs/pt_PT/withdrawals.lang index 6e8942fb2cf..56a6745c1c0 100644 --- a/htdocs/langs/pt_PT/withdrawals.lang +++ b/htdocs/langs/pt_PT/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Encomenda de débito direto WithdrawalReceipt=Encomenda de Débito Direto -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Últimos arquivos de débito direto %s @@ -63,7 +63,9 @@ InvoiceRefused=Fatura recusada (cobrar a rejeição ao cliente) StatusDebitCredit=Estado do débito/crédito StatusWaiting=Em espera StatusTrans=Enviado +StatusDebited=Debited StatusCredited=Creditado +StatusPaid=Paga StatusRefused=Rejeitado StatusMotif0=Não especificado StatusMotif1=Fundos insuficientes @@ -77,13 +79,13 @@ StatusMotif8=Outro motivo CreateForSepaFRST=Criar arquivo de débito direto (SEPA FRST) CreateForSepaRCUR=Criar arquivo de débito direto (SEPA RCUR) CreateAll=Criar arquivo de débito direto (todos) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Apenas escritório CreateBanque=Apenas banco OrderWaiting=À espera de tratamento -NotifyTransmision=levantamento Envio -NotifyCredit=levantamento de crédito +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Número Nacional de Transmissor WithBankUsingRIB=Para contas bancárias usando RIB WithBankUsingBANBIC=Para contas bancárias usando IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Crédito em WithdrawalFileNotCapable=Não é possível gerar o arquivo de recibo de retirada para o seu país %s (Seu país não é suportado) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=arquivo retirado +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Definir o estado como "Ficheiro Enviado" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Estatísticas por status de linhas @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Tipo de pagamento ModeRECUR=Recurring payment ModeFRST=Pagamento único PleaseCheckOne=Por favor, marque apenas um +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Ordem de débito direto %s criada AmountRequested=Quantidade solicitada SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Valor: %s
    Metode: %s
    Data: %s InfoRejectSubject=Pedido de pagamento por débito direto recusado InfoRejectMessage=Olá,

    a ordem de pagamento de débito directo da factura %s relacionada com a empresa %s, com uma quantidade de %s foi recusada pelo banco.



    %s ModeWarning=Opção para o modo real não foi definido, nós paramos depois desta simulação +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/pt_PT/workflow.lang b/htdocs/langs/pt_PT/workflow.lang index e2fe241392b..c657d1eb8c2 100644 --- a/htdocs/langs/pt_PT/workflow.lang +++ b/htdocs/langs/pt_PT/workflow.lang @@ -3,18 +3,21 @@ WorkflowSetup=Configurar módulo de fluxo de frabalho WorkflowDesc=Este módulo fornece algumas ações automáticas. Por padrão, o fluxo de trabalho é aberto (você pode fazer as coisas na ordem desejada), mas aqui você pode ativar algumas ações automáticas. ThereIsNoWorkflowToModify=Não há modificações de fluxo de trabalho disponíveis para os módulos ativados. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Criar automaticamente um pedido do cliente após a assinatura de uma proposta comercial (o novo pedido terá o mesmo valor da proposta) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Criar automaticamente uma fatura do cliente depois que uma proposta comercial for assinada (a nova fatura terá o mesmo valor da proposta) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Criar automaticamente uma fatura a cliente após a validação de um contrato -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Criar automaticamente uma fatura do cliente após o fechamento do pedido do cliente (a nova fatura terá o mesmo valor do pedido) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classificar proposta de origem vinculada como faturada quando o pedido do cliente é definido como faturado (e se o valor do pedido é o mesmo que o valor total da proposta vinculada assinada) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classificar a proposta de origem vinculada como faturada quando a fatura do cliente é validada (e se o valor da fatura é o mesmo que o valor total da proposta vinculada assinada) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classificar o pedido do cliente de origem vinculada como faturado quando a fatura do cliente é validada (e se o valor da fatura é o mesmo que o valor total do pedido vinculado) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classificar o pedido do cliente de origem vinculada como faturado quando a fatura do cliente é definida como paga (e se o valor da fatura é o mesmo que o valor total do pedido vinculado) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classificar o pedido do cliente de origem vinculada como enviado quando uma remessa é validada (e se a quantidade enviada por todas as remessas é a mesma que na ordem de atualização) -# Autoclassify supplier order +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classificar a proposta do fornecedor de origem vinculada como faturada quando a fatura do fornecedor é validada (e se o valor da fatura é o mesmo que o valor total da proposta vinculada) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classificar o pedido de compra de origem vinculado como faturado quando a fatura do fornecedor é validada (e se o valor da fatura é o mesmo que o valor total do pedido vinculado) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Criação automática AutomaticClassification=Classificação automática diff --git a/htdocs/langs/pt_PT/zapier.lang b/htdocs/langs/pt_PT/zapier.lang index db32d03ccc0..b5fe0501b73 100644 --- a/htdocs/langs/pt_PT/zapier.lang +++ b/htdocs/langs/pt_PT/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier para o módulo Dolibarr # Admin page # ZapierForDolibarrSetup = Configuração do Zapier para Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ro_RO/accountancy.lang b/htdocs/langs/ro_RO/accountancy.lang index ce99797f0d1..9d39b675134 100644 --- a/htdocs/langs/ro_RO/accountancy.lang +++ b/htdocs/langs/ro_RO/accountancy.lang @@ -58,8 +58,8 @@ AccountancyAreaDescActionOnceBis=Următorii pași trebuie făcuți pentru a vă AccountancyAreaDescActionFreq=Următoarele acțiuni sunt executate de obicei în fiecare lună, săptămână sau zi pentru companii foarte mari ... AccountancyAreaDescJournalSetup=PASUL %s: Creați sau verificați conținutul jurnalului din meniu %s -AccountancyAreaDescChartModel=STEP %s: Check that a model of chart of account exists or create one from menu %s -AccountancyAreaDescChart=STEP %s: Select and|or complete your chart of account from menu %s +AccountancyAreaDescChartModel=PASUL %s: Verificați dacă există un plan de conturi sau creați unul din meniul %s +AccountancyAreaDescChart=PASUL %s: Selectaţi şi|sau completaţi planul de conturi din meniul %s AccountancyAreaDescVat=PASUL %s: Definirea conturilor contabile pentru fiecare TVA. Pentru aceasta, utilizați intrarea din meniu %s. AccountancyAreaDescDefault=PAS %s: Definiți conturile implicite de contabilitate. Pentru aceasta, utilizați intrarea în meniu %s. @@ -98,7 +98,7 @@ MenuExpenseReportAccounts=Conturi de rapoarte de cheltuieli MenuLoanAccounts=Conturi de împrumut MenuProductsAccounts=Conturi de produs MenuClosureAccounts=Conturi de închidere -MenuAccountancyClosure=Closure +MenuAccountancyClosure=Închidere MenuAccountancyValidationMovements=Validare trasferuri ProductsBinding=Conturi de produse TransferInAccounting=Transfer în contabilitate @@ -121,7 +121,7 @@ InvoiceLinesDone=Asociaza liniile facturii ExpenseReportLines=Linii de rapoarte de cheltuieli de asociat ExpenseReportLinesDone=Linii asociate de rapoarte de cheltuieli IntoAccount=Asociaza linia cu contul contabil -TotalForAccount=Total for accounting account +TotalForAccount=Total pentru contabilitate Ventilate=Asociaza @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Permite gestionarea unui număr diferit de zerouri la sf BANK_DISABLE_DIRECT_INPUT=Dezactivați înregistrarea directă a tranzacției în contul bancar ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Activați schița de export în jurnal ACCOUNTANCY_COMBO_FOR_AUX=Activați lista combo pentru cont auxiliar (poate fi lentă dacă aveți o mulțime de terți) +ACCOUNTING_DATE_START_BINDING=Definiți o dată pentru a începe legarea și transferul în contabilitate. Înainte de această dată, tranzacțiile nu vor fi transferate în contabilitate. ACCOUNTING_SELL_JOURNAL=Jurnal vânzări ACCOUNTING_PURCHASE_JOURNAL=Jurnal cumpărări @@ -162,25 +163,25 @@ ACCOUNTING_RESULT_LOSS=Contul contabil rezultat (pierdere) ACCOUNTING_CLOSURE_DEFAULT_JOURNAL=Jurnal de închidere ACCOUNTING_ACCOUNT_TRANSFER_CASH=Contul contabil al transferului bancar în tranziție -TransitionalAccount=Transitional bank transfer account +TransitionalAccount=Cont tranzitoriu de transfer bancar ACCOUNTING_ACCOUNT_SUSPENSE=Contul contabil de așteptare DONATION_ACCOUNTINGACCOUNT=Contul contabil pentru a înregistra donații ADHERENT_SUBSCRIPTION_ACCOUNTINGACCOUNT=Contul Contabilitate pentru a înregistra abonamente -ACCOUNTING_PRODUCT_BUY_ACCOUNT=Accounting account by default for the bought products (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT=Accounting account by default for the bought products in EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought products and imported out of EEC (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_BUY_ACCOUNT=Contul contabil implicit pentru produsele cumpărate (se foloseşte dacă nu este definit în fișa de produs) +ACCOUNTING_PRODUCT_BUY_INTRA_ACCOUNT= Contul contabil implicit pentru produsele cumpărate din CEE (utilizat dacă nu este definit în fișa de produs) +ACCOUNTING_PRODUCT_BUY_EXPORT_ACCOUNT= Contul contabil implicit pentru produsele cumpărate și importate din CEE (utilizate dacă nu sunt definite în fișa de produs) ACCOUNTING_PRODUCT_SOLD_ACCOUNT=Cont contabil implicit pentru produsele vândute (utilizate dacă nu este definit în fișa produsului) -ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Accounting account by default for the products sold in EEC (used if not defined in the product sheet) -ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Accounting account by default for the products sold and exported out of EEC (used if not defined in the product sheet) +ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT=Cont contabil implicit pentru produsele vândute în CEE (se utilizează dacă nu este definit în fișa de produs) +ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT=Cont contabil implicit pentru produsele vândute și exportate din CEE (se utilizează dacă nu este definit în fișa de produs) ACCOUNTING_SERVICE_BUY_ACCOUNT=Contul contabil implicit pentru serviciile cumpărate (utilizat dacă nu este definit în fișa serviciului) -ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Accounting account by default for the bought services in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Accounting account by default for the bought services and imported out of EEC (used if not defined in the service sheet) +ACCOUNTING_SERVICE_BUY_INTRA_ACCOUNT=Cont contabil implicit pentru serviciile cumpărate din CEE (se utilizează dacă nu este definit în fișa de servicii) +ACCOUNTING_SERVICE_BUY_EXPORT_ACCOUNT=Cont contabil implicit pentru serviciile cumpărate și importate din CEE (utilizat dacă nu este definit în fișa de servicii) ACCOUNTING_SERVICE_SOLD_ACCOUNT=Contul contabil implicit pentru serviciile vândute (utilizat dacă nu este definit în fișa de servicii) -ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Accounting account by default for the services sold in EEC (used if not defined in the service sheet) -ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Accounting account by default for the services sold and exported out of EEC (used if not defined in the service sheet) +ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT=Contul contabil implicit pentru serviciile vândute în CEE (folosit dacă nu este definit în fișa de servicii) +ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT=Contul contabil implicit pentru serviciile vândute și exportate din CEE (utilizat dacă nu este definit în fișa de servicii) Doctype=Tipul documentului Docdate=Data @@ -189,7 +190,7 @@ LabelAccount=Etichetă cont LabelOperation=Etichetarea operaţiei Sens=Sens LetteringCode=Codul de scriere -Lettering=Lettering +Lettering=Numerotare Codejournal=Journal JournalLabel=Eticheta jurnalului NumPiece=Număr nota contabila @@ -206,7 +207,7 @@ DeleteMvt=Ștergeți liniile din Cartea Mare DelMonth=Luna care se şterge DelYear=Anul pentru ștergere DelJournal=Jurnalul de șters -ConfirmDeleteMvt=This will delete all lines of the Ledger for the year/month and/or from a specific journal (At least one criterion is required). You will have to reuse the feature 'Registration in accounting' to have the deleted record back in the ledger. +ConfirmDeleteMvt= Aceasta va șterge toate liniile din Jurnal pentru anul/luna și/sau dintr-un jurnal specific (este necesar cel puțin un criteriu). Va trebui să reutilizați funcția „Înregistrare în contabilitate” pentru a înregistra din nou tranzacţiile şterse. ConfirmDeleteMvtPartial=Aceasta va șterge toate liniile Cărţii Mari (toate liniile legate de aceeași tranzacție vor fi șterse) FinanceJournal=Jurnal Bancă ExpenseReportsJournal=Jurnalul rapoartelor de cheltuieli @@ -234,15 +235,15 @@ ThirdpartyAccountNotDefinedOrThirdPartyUnknownSubledgerIgnored=Terț necunoscut ThirdpartyAccountNotDefinedOrThirdPartyUnknownBlocking=Contul terț nu este definit sau este necunoscut. Eroare de blocare. UnknownAccountForThirdpartyAndWaitingAccountNotDefinedBlocking=Conturile terț și de așteptare necunoscute nu sunt definite. Eroare de blocare PaymentsNotLinkedToProduct=Plata nu legată de vreun produs/serviciu -OpeningBalance=Opening balance +OpeningBalance=Sold iniţial de deschidere ShowOpeningBalance=Afişează soldurile de deschidere HideOpeningBalance=Ascunde soldurile de deschidere -ShowSubtotalByGroup=Show subtotal by group +ShowSubtotalByGroup=Afişare subtotal după grupă Pcgtype=Grup de conturi -PcgtypeDesc=Group of account are used as predefined 'filter' and 'grouping' criteria for some accounting reports. For example, 'INCOME' or 'EXPENSE' are used as groups for accounting accounts of products to build the expense/income report. +PcgtypeDesc=Grupele de conturi sunt utilizate ca criterii predefinite de 'filtrare' și 'grupare' pentru unele rapoarte contabile. De exemplu, 'VENITURI' sau 'CHELTUIELI' sunt utilizate ca grupe pentru conturile contabile ale produselor pentru a construi raportul de cheltuieli/venituri. -Reconcilable=Reconcilable +Reconcilable=Compensabil TotalVente=Cifra de afaceri totală înainte de impozitare TotalMarge=Total Marje vânzări @@ -253,15 +254,15 @@ DescVentilDoneCustomer=Consultați aici lista liniilor de facturare pentru clien DescVentilTodoCustomer=Ascoiază linii de facturare care nu sunt deja legate de contul contabil al produsului ChangeAccount=Modificați contul contabil al produsului / serviciului pentru liniile selectate cu următorul cont contabil: Vide=- -DescVentilSupplier=Consult here the list of vendor invoice lines bound or not yet bound to a product accounting account (only record not already transfered in accountancy are visible) +DescVentilSupplier=Consultați aici lista liniilor de pe factura de achiziţie asociate sau nu la un cont de produs (doar înregistrările care nu au fost deja transferate în contabilitate sunt vizibile) DescVentilDoneSupplier=Consultați aici lista liniilor facturilor furnizorilor și contul lor contabil DescVentilTodoExpenseReport=Linii de raportare a cheltuielilor care nu sunt deja asociate unui cont contabile de taxe DescVentilExpenseReport=Consultați aici lista liniilor de raportare a cheltuielilor asociate (sau nu) unui cont contabile de taxe DescVentilExpenseReportMore=Dacă configurați contul de contabilitate pe linii de raportare a tipurilor de cheltuieli, aplicația va putea face toate legătura între liniile dvs. de raportare a cheltuielilor și contul contabil al planului dvs. de conturi, într-un singur clic „%s“ . În cazul în care contul nu a fost stabilit în dicționar de taxe sau dacă aveți încă anumite linii care nu sunt legate de niciun cont, va trebui să faceți o legare manuală din meniu %s ". DescVentilDoneExpenseReport=Consultați aici lista liniilor rapoartelor privind cheltuielile și contul contabil a taxelor lor -DescClosure=Consult here the number of movements by month who are not validated & fiscal years already open -OverviewOfMovementsNotValidated=Step 1/ Overview of movements not validated. (Necessary to close a fiscal year) +DescClosure=Consultați aici numărul de tranzacţii lunare care nu sunt validate și se află în anii fiscali deschişi +OverviewOfMovementsNotValidated=Pasul 1 / Prezentarea generală a tranzacţiilor nevalidate. (Necesar pentru a închide un an fiscal) ValidateMovements=Vallidare trasferuri DescValidateMovements= Orice modificare sau ștergere a înregistrărilor va fi interzisă. Toate intrările pentru un exercițiu financiar trebuie validate, altfel închiderea nu va fi posibilă SelectMonthAndValidate=Selectează luna şi validează trasferurile @@ -284,6 +285,7 @@ ShowTutorial=Arată tutorial NotReconciled=Nu este conciliat ## Admin +BindingOptions=Opțiuni de legare ApplyMassCategories=Aplica categorii bulk AddAccountFromBookKeepingWithNoCategories=Contul contabil disponibil nu este încă într-o grupă personalizată CategoryDeleted=Categoria pentru contul contabil a fost eliminată @@ -317,12 +319,12 @@ Modelcsv_quadratus=Export pentru Quadratus QuadraCompta Modelcsv_ebp=Export pentru EBP Modelcsv_cogilog=Export pentru Cogilog Modelcsv_agiris=Export pentru Agiris -Modelcsv_LDCompta=Export for LD Compta (v9) (Test) -Modelcsv_LDCompta10=Export for LD Compta (v10 & higher) +Modelcsv_LDCompta=Export pentru LD Compta (v9) (Test) +Modelcsv_LDCompta10=Export pentru LD Compta (v10 & mai nou) Modelcsv_openconcerto=Export pentru OpenConcerto (Test) Modelcsv_configurable=Exportați CSV configurabil Modelcsv_FEC=Exportă fişier FEC -Modelcsv_Sage50_Swiss=Export for Sage 50 Switzerland +Modelcsv_Sage50_Swiss=Export pentru Sage 50 Switzerland Modelcsv_winfic=Export Winfic - eWinfic - WinSis Compta ChartofaccountsId=Id-ul listei de conturi @@ -330,20 +332,20 @@ ChartofaccountsId=Id-ul listei de conturi InitAccountancy=Init contabilitate InitAccountancyDesc=Această pagină poate fi utilizată pentru a inițializa un cont contabil pentru produse și servicii care nu au cont contabil definit pentru vânzări și achiziții. DefaultBindingDesc=Această pagină poate fi utilizată pentru a seta un cont implicit care să fie folosit pentru a lega înregistrarea tranzacțiilor cu privire la salariile de plată, donațiile, impozitele și taxe atunci când nu a fost deja stabilit niciun cont contabil. -DefaultClosureDesc=This page can be used to set parameters used for accounting closures. +DefaultClosureDesc= Această pagină poate fi utilizată pentru a seta parametrii folosiți pentru închiderile contabile. Options=Opţiuni OptionModeProductSell=Mod vanzari OptionModeProductSellIntra=Mod vânzări export în CEE OptionModeProductSellExport=Mod vânzări export în alte ţări OptionModeProductBuy=Mod cumparari -OptionModeProductBuyIntra=Mode purchases imported in EEC -OptionModeProductBuyExport=Mode purchased imported from other countries +OptionModeProductBuyIntra=Modul achiziţii import din CEE +OptionModeProductBuyExport=Modul achiziţii import din alte ţări OptionModeProductSellDesc=Afișați toate produsele ce au cont contabil pentru vânzări. OptionModeProductSellIntraDesc=Afișează toate produsele cu cont contabil pentru vânzările în CEE. OptionModeProductSellExportDesc=Afișează toate produsele cu cont contabil pentru vânzările în alte ţări. OptionModeProductBuyDesc=Afișați toate produsele ce au cont contabil pentru achiziții. -OptionModeProductBuyIntraDesc=Show all products with accounting account for purchases in EEC. -OptionModeProductBuyExportDesc=Show all products with accounting account for other foreign purchases. +OptionModeProductBuyIntraDesc=Afişează toate produsele achiziţionate din CEE. +OptionModeProductBuyExportDesc=Afişează toate produsele achiziţionate din alte ţări. CleanFixHistory=Eliminați codul contabil din linii care nu există în diagramele de cont CleanHistory=Resetați toate asocierile pentru anul selectat PredefinedGroups=Grupuri predefinite @@ -354,8 +356,8 @@ AccountRemovedFromGroup=Cont contabil eliminat din grupă SaleLocal=Vânzare locală SaleExport=Vânzare la export SaleEEC=Vânzări în CEE -SaleEECWithVAT=Sale in EEC with a VAT not null, so we suppose this is NOT an intracommunautary sale and the suggested account is the standard product account. -SaleEECWithoutVATNumber=Sale in EEC with no VAT but the VAT ID of thirdparty is not defined. We fallback on the product account for standard sales. You can fix the VAT ID of thirdparty or the product account if needed. +SaleEECWithVAT=Vânzarea în CEE cu cota TVA diferită de zero, deci presupunem că aceasta NU este o vânzare intracomunitară, iar contul contabil este cel standard al produsului. +SaleEECWithoutVATNumber=Vânzare în CEE fără TVA, dar codul TVA al terțului nu este definit. Se va utiliza contul contabil de produs pentru vânzările standard. Completaţi codul de TVA al terțului sau contul contabil aferent produsului. ## Dictionary Range=Rang cont contabil diff --git a/htdocs/langs/ro_RO/admin.lang b/htdocs/langs/ro_RO/admin.lang index e78c72784c6..fa9ced9b194 100644 --- a/htdocs/langs/ro_RO/admin.lang +++ b/htdocs/langs/ro_RO/admin.lang @@ -18,29 +18,29 @@ GlobalChecksum=Sumă de control globală MakeIntegrityAnalysisFrom=Analizați integritatea fișierelor de aplicații de la LocalSignature=Semnătura locală încorporată (mai puțin fiabilă) RemoteSignature=Semnătura remote (mai fiabilă) -FilesMissing= Fișiere Lipsa -FilesUpdated= Fișiere Actualizate +FilesMissing=Fișiere lipsă +FilesUpdated=Fișiere actualizate FilesModified=Fișiere modificate FilesAdded=Fișiere adăugate FileCheckDolibarr=Verificați integritatea fișierelor de aplicații AvailableOnlyOnPackagedVersions=Fișierul local pentru verificarea integrității este disponibil numai când aplicația este instalată dintr-un pachet oficial XmlNotFound=Integritatea fișierului de aplicație Xml nu a fost găsit -SessionId=ID Sesiune +SessionId=ID sesiune SessionSaveHandler=Handler pentru a salva sesiunile SessionSavePath=Locația sesiunii salvate PurgeSessions=Goleşte sesiunile ConfirmPurgeSessions=Chiar vrei să ștergi toate sesiunile? Acest lucru va deconecta fiecare utilizator (cu excepția dvs.). NoSessionListWithThisHandler=Handlerul sesiunii salvate configurat la dvs. în PHP nu permite afișarea tuturor sesiunilor in derulare. -LockNewSessions=Blocare conexiuni noi +LockNewSessions=Blocare conexiuni noi ConfirmLockNewSessions=Sigur doriți să restricționați orice nouă conexiune Dolibarr către dvs.? Numai utilizatorul %s se va putea conecta după aceea. -UnlockNewSessions=Înlăturaţi blocarea conexiunii -YourSession=Sesiuniea dvs +UnlockNewSessions=Înlăturaţi blocarea conexiunilor +YourSession=Sesiunea dvs Sessions=Sesiuni utilizatori -WebUserGroup=Web Server utilizator / grup +WebUserGroup=Utilizator/grup Web Server NoSessionFound=Configurația dvs. PHP pare să nu permită listarea sesiunilor active. Directorul utilizat pentru salvarea sesiunilor ( %s ) ar putea fi protejat (de exemplu prin permisiuni ale sistemului de operare sau prin directiva PHP open_basedir). DBStoringCharset=Set caractere al bazei de date pentru stocarea datelor DBSortingCharset=Set caractereal bazei de date pentru sortarea datelor -HostCharset=Host charset +HostCharset=Charset gazdă ClientCharset=Set de caractere client ClientSortingCharset=Compararea clienților WarningModuleNotActive=Modulul %s trebuie să fie activat @@ -95,14 +95,14 @@ NextValueForInvoices=Urmatoarea valoare (facturi) NextValueForCreditNotes=Urmatoarea valoare (credit note) NextValueForDeposit=Valoarea următoare (plata în avans) NextValueForReplacements=Urmatoarea valoare(înlocuiri) -MustBeLowerThanPHPLimit=Note: your PHP configuration currently limits the maximum filesize for upload to %s %s, irrespective of the value of this parameter +MustBeLowerThanPHPLimit=Notă: Configuraţia ta PHP permite încărcarea de fişiere cu dimensiuni de până la %s%s, indiferent de valoarea acestui parametru NoMaxSizeByPHPLimit=Notă: Nicio limită setată în configuraţia dvs. PHP MaxSizeForUploadedFiles=Mărimea maximă pentru fişierele încărcate (0 pentru a interzice orice încărcare) UseCaptchaCode=Utilizaţi codul grafic (CAPTCHA) pe pagina de login AntiVirusCommand=Calea completă la comanda antivirus -AntiVirusCommandExample=Example for ClamAv Daemon (require clamav-daemon): /usr/bin/clamdscan
    Example for ClamWin (very very slow): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe +AntiVirusCommandExample=Exemplu pentru ClamAv Daemon (necesită clamav-daemon): /usr/bin/clamdscan
    Exemplu pentru ClamWin (foarte foarte lent): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe AntiVirusParam= Mai multe despre parametrii în linia de comandă -AntiVirusParamExample=Example for ClamAv Daemon: --fdpass
    Example for ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" +AntiVirusParamExample=Exemplu pentru ClamAv Daemon: --fdpass
    Exemplu pentru ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" ComptaSetup=Setări Modul Contabilitate UserSetup=Setări Modul Utilizatori MultiCurrencySetup=Setarea în mai multe valute @@ -179,8 +179,8 @@ Compression=Compresie CommandsToDisableForeignKeysForImport=Comandă pentru a dezactiva cheile străine la import CommandsToDisableForeignKeysForImportWarning=Necesar dacă doriți să puteţi restaura sql dump -ul dvs mai târziu ExportCompatibility=Compatibilitatea fişierului de export generat -ExportUseMySQLQuickParameter=Use the --quick parameter -ExportUseMySQLQuickParameterHelp=The '--quick' parameter helps limit RAM consumption for large tables. +ExportUseMySQLQuickParameter=Foloseşte parametrul --quick +ExportUseMySQLQuickParameterHelp=Parametrul '--quick' ajută la limitarea consumului de memorie RAM pentru tabelele mari. MySqlExportParameters=Parametrii export MySQL PostgreSqlExportParameters= Parametrii export PostgreSQL UseTransactionnalMode=Utilizaţi mod tranzacţional @@ -200,7 +200,7 @@ FeatureDisabledInDemo=Funcţonalitate dezactivată în demo FeatureAvailableOnlyOnStable=Funcție disponibilă numai pe versiuni oficiale stabile BoxesDesc=Widgeturile sunt componente care prezintă unele informații pe care le puteți adăuga pentru a personaliza unele pagini. Puteți alege între afișarea sau neafișarea widget-ului , selectând pagina țintă și dând clic pe "Activați" sau făcând clic pe coșul de gunoi pentru a o dezactiva. OnlyActiveElementsAreShown=Numai elementele din module activate sunt afişate. -ModulesDesc=The modules/applications determine which features are available in the software. Some modules require permissions to be granted to users after activating the module. Click the on/off button %s of each module to enable or disable a module/application. +ModulesDesc=Modulele/aplicațiile determină ce caracteristici sunt disponibile în software. Unele module necesită acordarea de permisiuni utilizatorilor după activare. Faceți clic pe butonul on/off%s din fiecare modul pentru a activa sau dezactiva un modulul/aplicația. ModulesMarketPlaceDesc=Puteți descărca mai multe module de pe site-uri externe de pe Internet ... ModulesDeployDesc=Dacă permisiunile sistemului dvs. de fișiere permit acest lucru, puteți utiliza acest instrument pentru a implementa un modul extern. Modulul va fi apoi vizibil în tab %s . ModulesMarketPlaces=Găsiți aplicația / modulele externe @@ -219,11 +219,11 @@ Nouveauté=Noutate AchatTelechargement=Cumpărați / Descărcați GoModuleSetupArea=Pentru a implementa / instala un nou modul, accesați zona de configurare a modulelor: %s . DoliStoreDesc=DoliStore, market place oficial pentru module externe Dolibarr ERP / CRM -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. +DoliPartnersDesc=Lista companiilor care furnizează module sau funcții dezvoltate personalizat.
    Notă: Având în vedere că Dolibarr este o aplicație open source, orice utilizator experimentat în programarea PHP ar trebui să poată dezvolta un modul WebSiteDesc=Site-uri externe pentru module suplimentare (non-core) ... DevelopYourModuleDesc=Unele soluții pentru a vă dezvolta propriul modul ... URL=URL -RelativeURL=Relative URL +RelativeURL=URL relativ BoxesAvailable=Widgeturi disponibile BoxesActivated=Widgeturile activate ActivateOn=Activaţi pe @@ -273,7 +273,7 @@ Emails=E-mailuri EMailsSetup=Setarea e-mailurilor EMailsDesc=Această pagină vă permite să înlocuiți parametrii impliciți PHP pentru trimiterea e-mailurilor. În majoritatea cazurilor pe sistemul de operare Unix / Linux, configurarea PHP este corectă și acești parametri nu sunt necesari. EmailSenderProfiles=Profilurile expeditorului mailurilor -EMailsSenderProfileDesc=You can keep this section empty. If you enter some emails here, they will be added to the list of possible senders into the combobox when your write a new email. +EMailsSenderProfileDesc=Puteți lăsa această secțiune goală. Dacă introduceți câteva e-mailuri aici, acestea vor fi adăugate la lista posibililor expeditori în combobox atunci când scrieți un nou e-mail. MAIN_MAIL_SMTP_PORT=Portul SMTP / SMTPS (valoarea implicită în php.ini: %s ) MAIN_MAIL_SMTP_SERVER=Gazdă SMTP / SMTPS (valoarea implicită în php.ini: %s ) MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Portul SMTP / SMTPS (nu este definit în PHP pe sistemele de tip Unix) @@ -283,7 +283,7 @@ MAIN_MAIL_ERRORS_TO=E-mailul utilizat pentru e-mailurile care se întorc cu eror MAIN_MAIL_AUTOCOPY_TO= Copiați (Bcc) toate e-mailurile trimise către MAIN_DISABLE_ALL_MAILS=Dezactivați trimiterea tuturor e-mailurilor (în scopuri de testare sau demonstrații) MAIN_MAIL_FORCE_SENDTO=Trimiteți toate e-mailurile către (în loc de destinatari reali, în scopuri de testare) -MAIN_MAIL_ENABLED_USER_DEST_SELECT=Suggest emails of employees (if defined) into the list of predefined recipient when writing a new email +MAIN_MAIL_ENABLED_USER_DEST_SELECT=Sugerați e-mailuri ale angajaților (dacă sunt definiți) în lista destinatarului predefinit atunci când scrieți un nou e-mail MAIN_MAIL_SENDMODE=Metoda de trimitere prin e-mail MAIN_MAIL_SMTPS_ID=ID SMTP (dacă serverul de expediere necesită autentificare) MAIN_MAIL_SMTPS_PW=Parola SMTP (dacă serverul de trimitere necesită autentificare) @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=E-mailul implicit al expeditorului pentru trimiterea UserEmail=E-mailul utilizatorului CompanyEmail=E-mailul companiei FeatureNotAvailableOnLinux=Caracteristicã nu sunt disponibile pe Unix, cum ar fi sisteme. Testaţi-vă sendmail program la nivel local. +FixOnTransifex=Remediază traducerea pe platforma de traducere online a proiectului SubmitTranslation=Dacă traducerea pentru această limbă nu este completă sau dacă găsiți erori, puteți corecta aceasta prin editarea fișierelor din directorul langs / %s și trimiteți modificarea la www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Dacă traducerea pentru această limbă nu este completă sau dacă găsiți erori, puteți corecta aceasta prin editarea fișierelor în directorul langs / %s și trimiteți fișiere modificate pe dolibarr.org/forum sau pentru dezvoltatori pe github.com/ Dolibarr / Dolibarr. +SubmitTranslationENUS=Dacă traducerea pentru această limbă nu este completă sau găsiți erori, puteți corecta aceasta modificând fișierele din directorul langs/%s şi trimiţând fişierele modificate la dolibarr.org/forum sau, dacă eşti developer cu un PR la github.com/Dolibarr/dolibarr ModuleSetup=Configurare Modul ModulesSetup=Configurare Module / Aplicație ModuleFamilyBase=Sistem @@ -331,7 +332,7 @@ SetupIsReadyForUse=Implementarea modulului a fost terminată. Cu toate acestea, NotExistsDirect=Directorul rădăcină alternativ nu este atribuit unui director existent.
    InfDirAlt=De la versiunea 3, este posibil să se definească un director rădăcină alternativ. Acest lucru vă permite să stocați, într-un director dedicat, plug-in-uri și șabloane personalizate.
    Doar creați un director in rădăcina Dolibarr (de exemplu: personalizat).
    InfDirExample=
    Atunci declarați în fișierul conf.php
    $ dolibarr_main_url_root_alt = '/ custom'
    $ dolibarr_main_document_root_alt = '/ calea / din / dolibarr / htdocs / personalizat'
    Dacă aceste linii sunt comentate cu "#", pentru a le activa, doar anulaţi comentarea prin eliminarea caracterului "#". -YouCanSubmitFile=You can upload the .zip file of module package from here: +YouCanSubmitFile=Poţi încărca un fişier .zip al pachetului de modul de aici: CurrentVersion=Dolibarr versiunea curentă CallUpdatePage=Navigați la pagina care actualizează structura și datele bazei de date: %s. LastStableVersion=Ultima versiune stabilă @@ -340,7 +341,7 @@ LastActivationAuthor=Ultimul autor de activare LastActivationIP=Ultimul IP de activare UpdateServerOffline=Update server offline WithCounter=Gestionați un contor -GenericMaskCodes=Puteți introduce orice mască de numerotare. În această mască, ar putea fi folosit următoarele etichete:
    {000000} corespunde unui număr care va fi incrementat pe fiecare% s. Introduceți cât mai multe zerouri ca lungimea dorită a contra. Contorul va fi completat cu zerouri la stânga, în scopul de a avea cât mai multe zerouri ca masca.
    {000000} +000 fel ca și anterior, dar o compensare corespunzător cu numărul din dreapta semnului + se aplică începând cu prima% s.
    {000000 @ x} fel ca și anterior, dar contorul este resetat la zero atunci când se ajunge la o lună x (x între 1 și 12, sau 0 pentru a folosi primele luni ale anului fiscal definite în configurația dvs., sau 99 pentru a reseta la zero în fiecare lună ). Dacă această opțiune este folosită și x este 2 sau mai mare, atunci secvența {aa} {mm} sau {AAAA} {mm} este de asemenea necesară.
    {Dd} zi (01 la 31).
    {Mm} luni (01 la 12).
    {AA}, {AAAA} sau {y} an peste 2, 4 sau 1 numere.
    +GenericMaskCodes=Puteți introduce orice mască de numerotare. În această mască, ar putea fi folosit următoarele etichete:
    {000000} corespunde unui număr care va fi incrementat pe fiecare %s. Introduceți cât mai multe zerouri ca lungimea dorită a contra. Contorul va fi completat cu zerouri la stânga, în scopul de a avea cât mai multe zerouri ca masca.
    {000000} +000 fel ca și anterior, dar o compensare corespunzător cu numărul din dreapta semnului + se aplică începând cu prima %s.
    {000000 @ x} fel ca și anterior, dar contorul este resetat la zero atunci când se ajunge la o lună x (x între 1 și 12, sau 0 pentru a folosi primele luni ale anului fiscal definite în configurația dvs., sau 99 pentru a reseta la zero în fiecare lună ). Dacă această opțiune este folosită și x este 2 sau mai mare, atunci secvența {aa} {mm} sau {AAAA} {mm} este de asemenea necesară.
    {Dd} zi (01 la 31).
    {Mm} luni (01 la 12).
    {AA}, {AAAA} sau {y} an peste 2, 4 sau 1 numere.
    GenericMaskCodes2= {cccc} codul clientului pe n caractere
    {cccc000} codul clientului pe n caractere este urmat de un contor dedicat clientului. Acest contor dedicat clientului este resetat în același timp cu contorul global.
    {tttt} Codul tipului de terță parte pe n caractere (vedeți meniul Acasă - Configurare - Dicționar - Tipuri de terțe părți) . Dacă adăugați această etichetă, contorul va fi diferit pentru fiecare tip de terță parte
    \n GenericMaskCodes3=Toate celelalte caractere în masca va rămâne intactă.
    Spaţiile nu sunt permise.
    GenericMaskCodes4a= Exemplu privind al 99-lea %s terț TheCompany, cu data 2007-01-31:
    @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modulul %s trebuie să fie activat daca aveti n SecurityToken=Cheia pentru URL-uri sigure NoSmsEngine=Nu este disponibil niciun manager de expediere SMS-uri. Un manager de expediere SMS-uri nu este instalat cu distribuția implicită deoarece acesta depinde de un furnizor extern, dar puteți găsi pe %s PDF=PDF -PDFDesc=Opțiuni globale pentru generare PDF. -PDFAddressForging=Reguli pentru casetele de adrese +PDFDesc=Opţiuni globale pentru generarea PDF +PDFAddressForging=Reguli pentru secţiunea adresă HideAnyVATInformationOnPDF=Ascundeți toate informațiile referitoare la taxa pe vânzări / TVA PDFRulesForSalesTax=Reguli pentru taxa pe vânzări / TVA PDFLocaltax=Reguli pentru %s -HideLocalTaxOnPDF=Ascundeți %s rata în coloana Vânzare fiscală +HideLocalTaxOnPDF=Ascunde cota %s în coloana Taxă vânzări / TVA HideDescOnPDF=Ascunde descrierea produselor HideRefOnPDF=Ascundeți referinţele produselor HideDetailsOnPDF=Ascundeți detaliile liniei de produs @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modifică la prețuri cu valoarea de referință de bază MassConvert=Lansați conversia în bloc PriceFormatInCurrentLanguage=Formatul prețului în format de valută String=String +String1Line=String (1 linie) TextLong=Long text +TextLongNLines=Text lung (n linii) HtmlText=Text HTML Int=Întreg Float=Float @@ -428,7 +431,7 @@ ExtrafieldCheckBox=Casetele de selectare ExtrafieldCheckBoxFromList=Căsuțele de selectare din tabel ExtrafieldLink=Link către un obiect ComputedFormula=Câmp calculat -ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' +ComputedFormulaDesc=Puteți introduce aici o formulă folosind alte proprietăți ale obiectului sau orice cod PHP pentru a obține o valoare calculată dinamic. Puteți utiliza orice formule compatibile PHP, inclusiv "?" operator de condiții și următorul obiect global: $db, $conf, $langs, $mysoc, $user, $object.
    ATENŢIE: Doar unele proprietăți $object pot fi disponibile. Dacă aveți nevoie de o proprietate care nu este încărcată, introduceți singur obiectul în formula dvs. ca în cel de-al doilea exemplu.
    Utilizarea unui câmp calculat înseamnă că nu puteți introduce nici o valoare din interfață. De asemenea, dacă există o eroare de sintaxă, formula nu poate returna nimic.\n

    Exemplu de formulă
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Exemplu cu reîncărcarea obiectului
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Un alt exemplu de formulă pentru a forța încărcarea obiectului și a obiectului său părinte:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Proiectul părinte nu a fost găsit' Computedpersistent=Stocați câmpul calculat ComputedpersistentDesc=Câmpurile suplimentare computerizate vor fi stocate în baza de date, cu toate acestea, valoarea va fi recalculată numai atunci când obiectul acestui câmp este modificat. Dacă câmpul calculat depinde de alte obiecte sau date globale, această valoare ar putea fi greșită !! ExtrafieldParamHelpPassword=Lăsând acest câmp necompletat înseamnă că această valoare va fi stocată fără criptare (câmpul trebuie ascuns numai cu stea pe ecran).
    Setarea "auto" pentru utilizarea regulii de criptare implicită pentru a salva parola în baza de date (atunci valoarea citită va fi hash numai, nici o şansă de a recupera valoarea inițială) @@ -444,14 +447,14 @@ LocalTaxDesc=Unele țări pot aplica două sau trei taxe pe fiecare linie de fac SMS=SMS LinkToTestClickToDial=Introduceți un număr de telefon pentru a afișa un link de test ClickToDial Url pentru utilizatorul%s RefreshPhoneLink=Refresh link -LinkToTest=Link accesibil generat pentru utilizatorul % s (faceți clic pe numărul de telefon pentru a testa) +LinkToTest=Link accesibil generat pentru utilizatorul %s (faceți clic pe numărul de telefon pentru a testa) KeepEmptyToUseDefault=Lasă gol pentru utilizarea valorii implicite -KeepThisEmptyInMostCases=In most cases, you can keep this field empy. +KeepThisEmptyInMostCases=În majoritatea cazurilor, poţi lăsa acest câmp necompletat. DefaultLink=Link implicit SetAsDefault=Setați ca implicit ValueOverwrittenByUserSetup=Atenție, această valoare poate fi suprascrisă de setările specifice utilizatorului (fiecare utilizator poate seta propriul url clicktodial) -ExternalModule=External module -InstalledInto=Installed into directory %s +ExternalModule=Modul extern +InstalledInto=Instalat în director %s BarcodeInitForThirdparties=Cod de bare de masă pentru terți BarcodeInitForProductsOrServices=Init sau reset cod de bare în masă pentru produse şi servicii CurrentlyNWithoutBarCode=În prezent, aveti %s inregistrari pe %s %s fără cod de bare definit. @@ -477,7 +480,7 @@ Use3StepsApproval=În mod implicit, comenzile de cumpărare trebuie să fie crea UseDoubleApproval=Utilizați o aprobare de 3 pași atunci când suma (fără taxă) este mai mare decât ... WarningPHPMail=AVERTISMENT: Este adesea mai bine să configurați e-mailurile de trimis pentru a utiliza serverul de e-mail al furnizorului dvs. în loc de setarea implicită. Unii furnizori de e-mail (cum ar fi Yahoo) nu vă permit să trimiteți un e-mail de la un alt server decât propriul lor server. Setarea dvs. curentă utilizează serverul aplicației pentru a trimite e-mailuri și nu serverul furnizorului de servicii de e-mail, astfel încât unii destinatari (cel compatibil cu protocolul DMARC restrictiv) vor întreba furnizorul dvs. de e-mail dacă pot accepta e-mailul dvs. și anumiți furnizori de e-mail (cum ar fi Yahoo) pot răspunde "nu" deoarece serverul nu este al lor, astfel încât puține dintre e-mailurile trimise nu pot fi acceptate (aveți grijă și de cota de trimitere a furnizorului de servicii de e-mail). această restricție trebuie să schimbați configurarea e-mailului pentru a alege cealaltă metodă "server SMTP" și introduceți serverul SMTP și acreditările furnizate de furnizorul dvs. de e-mail. WarningPHPMail2=Dacă furnizorul dvs. de e-mail SMTP trebuie să restricționeze clientul de e-mail la unele adrese IP (foarte rar), aceasta este adresa IP a agentului utilizator de e-mail (MUA) pentru aplicația ERP CRM: %s . -WarningPHPMailSPF=If the domain name in your sender email address is protected by SPF (ask you email provider), you must include the following IPs in the SPF record of the DNS of your domain: %s. +WarningPHPMailSPF=Dacă numele de domeniu din adresa de e-mail a expeditorului este protejat de SPF (solicitat de furnizorul de e-mail), trebuie să includeți următoarele IP-uri în înregistrarea SPF DNS a domeniului dvs.:%s. ClickToShowDescription=Faceți clic pentru a afișa descrierea DependsOn=Acest modul are nevoie de modulul (modulele) RequiredBy=Acest modul este solicitat de modulul (modulele) @@ -506,10 +509,10 @@ DAV_ALLOW_PUBLIC_DIRTooltip=Directorul public generic este un director WebDAV pe DAV_ALLOW_ECM_DIR=Activați directorul privat DMS / ECM (directorul rădăcină al modulului DMS / ECM - este necesară autentificarea) DAV_ALLOW_ECM_DIRTooltip=Directorul rădăcină în care toate fișierele sunt încărcate manual când se utilizează modulul DMS / ECM. Similar accesului din interfața web, veți avea nevoie de autentificare/parolă valabilă, cu permisiuni adecvate de accesare a acestuia. # Modules -Module0Name=Utilizatorii & Grupuri -Module0Desc=Managementul Utilizatorilor/Angajaților și Grupurilor -Module1Name=Terțe părți -Module1Desc=Gestionarea companiilor și a contactelor (clienți, perspective ...) +Module0Name=Utilizatori & Grupuri +Module0Desc=Managementul Utilizatorilor/Angajaților și al Grupurilor +Module1Name=Terți +Module1Desc=Gestionarea companiilor și a contactelor (clienți, prospecţi...) Module2Name=Comercial Module2Desc=Management Comercial Module10Name=Contabilitate (simplificată) @@ -525,7 +528,7 @@ Module25Desc=Gestionarea comenzilor de vânzări Module30Name=Facturi Module30Desc=Gestionarea facturilor și a bonurilor de credit pentru clienți. Gestionarea facturilor și a bonurilor de credit pentru furnizori Module40Name=Furnizori -Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) +Module40Desc=Managementul furnizorilor și achizițiilor (comenzi de achiziţie și facturi furnizor) Module42Name=Depanați jurnalele Module42Desc=Facilități de înregistrare (fișier, syslog, ...). Aceste jurnale sunt pentru scopuri tehnice / de depanare. Module49Name=Editori @@ -542,16 +545,16 @@ Module54Name=Contracte / Abonamente Module54Desc=Gestionarea contractelor (servicii sau abonamente periodice) Module55Name=Coduri de bare Module55Desc=Coduri de bare "de gestionare a -Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Plăți debitoare bancare directe -Module57Desc=Gestionarea ordinelor de plată directă. Aceasta include generarea dosarului SEPA pentru țările europene. +Module56Name=Plată prin transfer credit +Module56Desc=Gestionarea plății furnizorilor efectuate prin ordine de transfer de credit. Acesta include generarea de fișiere SEPA pentru țările europene. +Module57Name=Plăţi prin direct debit +Module57Desc=Gestionarea ordinelor de direct debit. Acesta include generarea de fișiere SEPA pentru țările europene. Module58Name=ClickToDial Module58Desc=ClickToDial integrare Module59Name=Bookmark4u Module59Desc=Adauga funcţia de a genera Bookmark4u de cont de la un cont Dolibarr -Module60Name=Stickers -Module60Desc=Management of stickers +Module60Name=Stickere +Module60Desc=Management stickere Module70Name=Intervenţii Module70Desc=Managementul Intervenţiilor Module75Name=Ordine de deplasare şi Note de Cheltuieli @@ -569,9 +572,9 @@ Module200Desc=Sincronizarea directorului LDAP Module210Name=PostNuke Module210Desc=PostNuke integrare Module240Name=Exportul de date -Module240Desc=Tool to export Dolibarr data (with assistance) +Module240Desc=Instrument pentru export date din Dolibarr (asistat) Module250Name=Date importurile -Module250Desc=Tool to import data into Dolibarr (with assistance) +Module250Desc=Instrument pentru import date în Dolibarr (asistat) Module310Name=Membri Module310Desc=Fundatia membri de management Module320Name=Feed RSS @@ -635,7 +638,7 @@ Module5000Desc=Vă permite să administraţi mai multe companii Module6000Name=Flux de lucru Module6000Desc=Gestionarea fluxului de lucru (crearea automată a modificării obiectului și / sau a stării automate) Module10000Name=Site-uri -Module10000Desc=Create websites (public) with a WYSIWYG editor. This is a webmaster or developer oriented CMS (it is better to know HTML and CSS language). Just setup your web server (Apache, Nginx, ...) to point to the dedicated Dolibarr directory to have it online on the internet with your own domain name. +Module10000Desc=Creați site-uri web (publice) cu un editor WYSIWYG. Acesta este un CMS pentru webmasteri sau dezvoltatori (este recomandat să cunoașteți limbajul HTML și CSS). Trebuie doar să configurați serverul web (Apache, Nginx, ...) pentru a indica directorul Dolibarr dedicat pentru a-l avea online pe internet cu propriul nume de domeniu. Module20000Name=Managementul cererilor de concediu Module20000Desc=Definiți și urmăriți cererile de concediu pentru angajați Module39000Name=Loturi de producţie @@ -647,7 +650,7 @@ Module50000Desc=Oferiți clienților o pagină pentru plata online PayBox (cardu Module50100Name=POS SimplePOS Module50100Desc=Punct de vânzare modul SimplePOS (POS simplu). Module50150Name=POS TakePOS -Module50150Desc=Point of Sale module TakePOS (touchscreen POS, for shops, bars or restaurants). +Module50150Desc=Modulul Punct de Vânzare TakePOS (POS cu ecran tactil, pentru magazine, baruri sau restaurante). Module50200Name=PayPal Module50200Desc=Oferiți clienților o pagină de plată online PayPal (cont PayPal sau carduri de credit / debit). Aceasta poate fi utilizată pentru a permite clienților dvs. să efectueze plăți ad-hoc sau plăți legate de un anumit obiect Dolibarr (factură, comandă etc.) Module50300Name=Dunga @@ -781,9 +784,9 @@ Permission241=Citeşte categorii Permission242=Creare / Modificare categorii Permission243=Ştergere categorii Permission244=A se vedea conţinutul ascunse categorii -Permission251=Citiţi cu alţi utilizatori şi grupuri +Permission251=Citeşte alţi utilizatori şi grupuri PermissionAdvanced251=Citeste alţi utilizatori -Permission252=Creare / Modificare altor utilizatori, grupuri şi a ta permisssions +Permission252=Citire permisiunile altor utilizatori Permission253=Creați / modificați alți utilizatori, grupuri și permisiuni PermissionAdvanced253=Crearea / modificarea utilizatorii interni / externi şi permisiuni Permission254=Ştergere sau dezactiva alţi utilizatori @@ -836,9 +839,16 @@ Permission532=Creare / Modificare servicii Permission534=Ştergere servicii Permission536=A se vedea / administra serviciile ascunse Permission538=Exportul de servicii +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Citiți facturile de materiale Permission651=Creați / actualizați facturile de materiale Permission652=Ștergeți facturile de materiale +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Citiţi donaţii Permission702=Creare / Modificare donaţii Permission703=Ştergere donaţii @@ -848,16 +858,18 @@ Permission773=Șterge rapoarte de cheltuieli Permission774=Citiți toate rapoartele de cheltuieli (chiar și pentru utilizatorii care nu sunt subordonații dvs.) Permission775=Aproba rapoarte de cheltuieli Permission776=Plăste rapoarte de cheltuieli +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export Rapoarte Cheltuieli Permission1001=Citeşte stocuri Permission1002=Creare / modificare depozite Permission1003=Ștergere depozite Permission1004=Citeşte stoc deplasările Permission1005=Creare / Modificare stoc deplasările -Permission1101=Read delivery receipts -Permission1102=Create/modify delivery receipts -Permission1104=Validate delivery receipts -Permission1109=Delete delivery receipts +Permission1101=Citeşte confirmările de livrare +Permission1102=Creare/modificare confirmări de livrare +Permission1104=Validează confirmările de livrare +Permission1109=Şterge confirmările de livrare Permission1121=Citiți propunerile furnizorilor Permission1122=Creați / modificați propunerile furnizorilor Permission1123=Validați propunerile furnizorilor @@ -886,9 +898,9 @@ Permission1251=Run masa importurile de date externe în baza de date (date de sa Permission1321=Export client facturi, atribute şi plăţile Permission1322=Redeschide o factură plătită Permission1421=Exportaţi comenzi de vânzări și atribute -Permission2401=Read actions (events or tasks) linked to his user account (if owner of event or just assigned to) -Permission2402=Create/modify actions (events or tasks) linked to his user account (if owner of event) -Permission2403=Delete actions (events or tasks) linked to his user account (if owner of event) +Permission2401=Citeşte acțiuni (evenimente sau sarcini) legate de contul său de utilizator (dacă este proprietar al unui eveniment sau doar i s-a atribuit) +Permission2402= \n \nCreare/modificare acțiuni (evenimente sau sarcini) legate de contul său de utilizator (dacă este proprietar al evenimentului) +Permission2403=Șterge acțiuni (evenimente sau sarcini) legate de contul său de utilizator (dacă este proprietar al evenimentului) Permission2411=Citeşte acţiuni (evenimente sau sarcini) ale altor persoane Permission2412=Crearea / modificarea acţiuni (evenimente sau sarcini) ale altor persoane Permission2413=Ştergeţi acţiuni (evenimente sau sarcini) ale altor persoane @@ -900,6 +912,7 @@ Permission2515=Setup documente directoare Permission2801=Folosiți client FTP în modul de citire (numai navigare și descărcare ) Permission2802=Folosiți client FTP în modul de scriere (ştergere şi încărcare fişiere ) Permission3200=Citiți evenimente arhivate și amprente digitale +Permission3301=Generate new modules Permission4001=Vezi angajații Permission4002=Creați angajați Permission4003=Ștergeți angajații @@ -914,7 +927,7 @@ Permission20003=Şterge cererile de concediu Permission20004=Citiți toate solicitările de concediu (chiar și pentru utilizatori care nu sunt subordonați) Permission20005=Creați/modificați solicitările de concediu pentru toată lumea (chiar și pentru utilizatorii care nu sunt subordonați) Permission20006=Solicitări de concediu ale administrării (gestionare si actualizare balanţă) -Permission20007=Approve leave requests +Permission20007=Aprobare cereri de concediu Permission23001=Citeste Joburi programate Permission23002=Creare/Modificare job programat Permission23003=Şterge Joburi programate @@ -929,12 +942,12 @@ Permission50414=Ștergeți operațiunile în cartea mare Permission50415=Ștergeți toate operațiunile pe an și jurnal în cartea mare Permission50418=Exportați operațiunile din cartea mare Permission50420=Rapoarte și exporturi (cifră de afaceri, balante, jurnale, carte mare) -Permission50430=Define fiscal periods. Validate transactions and close fiscal periods. -Permission50440=Manage chart of accounts, setup of accountancy -Permission51001=Read assets -Permission51002=Create/Update assets -Permission51003=Delete assets -Permission51005=Setup types of asset +Permission50430=Defineşte perioadele fiscale. Validează tranzacţiile şi perioadele fiscale. +Permission50440=Administrează schema de conturi, configurează contabilitatea +Permission51001=Citeşte active +Permission51002=Creare/Modificare active +Permission51003=Ştergere active +Permission51005=Setare tipuri de active Permission54001=Printare Permission55001=Cieşte sondaje Permission55002=Creare / Modificare sondaje @@ -947,12 +960,13 @@ Permission63003=Ștergeți resursele Permission63004=Asociaţi resursele la agenda de evenimentele DictionaryCompanyType=Tipuri de terţi DictionaryCompanyJuridicalType=Entități juridice terțe -DictionaryProspectLevel=Prospect potenţial +DictionaryProspectLevel=Nivel potenţial prospect pentru companii +DictionaryProspectContactLevel=Nivel potenţial prospect pentru contacte DictionaryCanton=State/Provincii DictionaryRegion=Regiuni DictionaryCountry=Ţări DictionaryCurrency=Monede -DictionaryCivility=Honorific titles +DictionaryCivility=Titluri onorifice DictionaryActions=Tipuri evenimente agenda DictionarySocialContributions=Tipuri de taxe sociale si fiscale DictionaryVAT=Cote TVA sau Cote Taxe Vanzări @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Șabloane de e-mail DictionaryUnits=Unităţi DictionaryMeasuringUnits=Unități de măsură DictionarySocialNetworks=Retele sociale -DictionaryProspectStatus=Statut Prospect +DictionaryProspectStatus=Status prospect pentru companii +DictionaryProspectContactStatus=Status prospect pentru contacte DictionaryHolidayTypes=Tipuri de concediu DictionaryOpportunityStatus=Stare de conducere pentru proiect/conducere DictionaryExpenseTaxCat=Raport de cheltuieli - Categorii de transport @@ -993,7 +1008,7 @@ VATIsNotUsedDesc=Implicit, taxa de vânzare propusă este 0, ea poate fi utiliza VATIsUsedExampleFR=În Franța, înseamnă companii sau organizații care au un sistem fiscal real (Simplificat real sau normal real). Un sistem în care TVA este declarată . VATIsNotUsedExampleFR=În Franța, înseamnă că sunt declarate asociații care nu sunt plătitoare de taxe sau societăți, organizații sau profesii liberale care au ales sistemul fiscal micro intreprindere (taxe de vânzări în franciză) şi plătesc taxe de vânzare de franciză fără nicio declarație de taxe de vânzare. Această opțiune va afișa referinţa "Vânzări cu taxe neaplicabile - art-293B de CGI" pe facturi. ##### Local Taxes ##### -TypeOfSaleTaxes=Type of sales tax +TypeOfSaleTaxes=Tipuri taxe vânzări LTRate=Rată LocalTax1IsNotUsed=Nu utilizează taxa secundă LocalTax1IsUsedDesc=Utilizați un al doilea tip de taxă (alta decât prima) @@ -1008,7 +1023,7 @@ LocalTax2Management=Tipul trei al taxei LocalTax2IsUsedExample= LocalTax2IsNotUsedExample= LocalTax1ManagementES=RE Management -LocalTax1IsUsedDescES=Rata RE în mod implicit la crearea perspectivelor, facturilor, comenzilor etc. respectă regula standard activă:
    Dacă cumpărătorul nu este supus ratei RE, RE impliciy va fi 0. Sfârșitul regulii.
    Dacă cumpărătorul este supus ratei RE, este RE implicit. Sfârșitul regulii.
    +LocalTax1IsUsedDescES=Rata RE în mod implicit la crearea propecţilor, facturilor, comenzilor etc. respectă regula standard activă:
    Dacă cumpărătorul nu este supus ratei RE, RE impliciy va fi 0. Sfârșitul regulii.
    Dacă cumpărătorul este supus ratei RE, este RE implicit. Sfârșitul regulii.
    LocalTax1IsNotUsedDescES=În mod implicit RE propus este 0. Sfârşitul regulă. LocalTax1IsUsedExampleES=În Spania sunt profesionisti supuse unor secţiuni specifice ale IAE spaniole. LocalTax1IsNotUsedExampleES=În Spania sunt profesionişti şi societăţile şi sub rezerva la anumite secţiuni ale IAE spaniole. @@ -1017,9 +1032,9 @@ LocalTax2IsUsedDescES=Rata IRPF în mod implicit când se creează perspective, LocalTax2IsNotUsedDescES=În mod implicit propus IRPF este 0. Sfârşitul regulă. LocalTax2IsUsedExampleES=În Spania, liber profesionişti şi specialişti independenţi, care presta servicii şi companiile care au ales sistemul de impozitare de module. LocalTax2IsNotUsedExampleES=În Spania, sunt întreprinderi care nu sunt supuse sistemului de taxare pe module. -RevenueStampDesc=The "tax stamp" or "revenue stamp" is a fixed tax you per invoice (It does not depend on amount of invoice). It can also be a percent tax but using the second or third type of tax is better for percent taxes as tax stamps does not provide any reporting. Only few countries uses this type of tax. -UseRevenueStamp=Use a tax stamp -UseRevenueStampExample=The value of tax stamp is defined by default into the setup of dictionaries (%s - %s - %s) +RevenueStampDesc="Taxa fiscală" sau "taxa de venituri" este un impozit fix pe care îl facturați (nu depinde de valoarea facturii). Poate fi de asemenea un procent de impozit, dar utilizarea celui de-al doilea sau al treilea tip de impozit este mai bună pentru impozitele procentuale, deoarece taxele fiscale nu oferă nicio raportare. Doar puține țări folosesc acest tip de impozit. +UseRevenueStamp= Folosiți un timbru fiscal +UseRevenueStampExample=Valoarea implicită a timbrelor fiscale este definită în configurarea dicționarelor (%s - %s - %s) CalcLocaltax=Rapoarte pe taxe locale CalcLocaltax1=Vânzări - Cumpârări CalcLocaltax1Desc=Rapoarte Taxe Locale este calcult ca diferenţă dintre taxele locale de vanzare şi taxele locale de cumparare @@ -1027,11 +1042,11 @@ CalcLocaltax2=Achiziţii CalcLocaltax2Desc=Rapoarte Taxe Locale este totalul taxelor locale de cumpărare CalcLocaltax3=Vânzări CalcLocaltax3Desc=Rapoarte Taxe Locale este totalul taxelor locale de vanzare -NoLocalTaxXForThisCountry=According to the setup of taxes (See %s - %s - %s), your country does not need to use such type of tax +NoLocalTaxXForThisCountry= Conform configurării de impozite şi taxe (Vezi %s-%s-%s), ţara ta nu foloseşte aceste tipuri de taxe LabelUsedByDefault=Eticheta utilizat în mod implicit în cazul în care nu poate fi găsit de traducere pentru codul LabelOnDocuments=Eticheta de pe documente LabelOrTranslationKey=Etichetă sau cheie de traducere -ValueOfConstantKey=Value of a configuration constant +ValueOfConstantKey=Valoarea unei constante de configurare NbOfDays=Nr. de zile AtEndOfMonth=La sfârşitul lunii CurrentNext=Curent / Urmatoarea @@ -1076,8 +1091,8 @@ LoginPage=Pagină de autentificare BackgroundImageLogin=Imagine de fundal PermanentLeftSearchForm=Formular de căutare permanent in meniu din stânga DefaultLanguage=Limba implicită -EnableMultilangInterface=Activați suportul multilingv -EnableShowLogo=Show the company logo in the menu +EnableMultilangInterface=Activați asistența în mai multe limbi pentru relațiile cu clienții sau furnizorii +EnableShowLogo=Afişează logo-ul companiei în meniu CompanyInfo=Compania/Instituția CompanyIds=Identități ale companiei/organizației CompanyName=Nume @@ -1085,13 +1100,13 @@ CompanyAddress=Adresă CompanyZip=Zip CompanyTown=Oraş CompanyCountry=Ţară -CompanyCurrency=Deviza principală +CompanyCurrency=Moneda principală CompanyObject=Obiectul companiei -IDCountry=ID country +IDCountry=ID ţară Logo=Logo -LogoDesc=Main logo of company. Will be used into generated documents (PDF, ...) -LogoSquarred=Logo (squarred) -LogoSquarredDesc=Must be a squarred icon (width = height). This logo will be used as the favorite icon or other need like for the top menu bar (if not disabled into display setup). +LogoDesc=Logo-ul principal al companiei. Va fi utilizat în documentele generate(PDF, ...) +LogoSquarred=Logo(pătrat) +LogoSquarredDesc=Trebuie să fie o pictogramă pătrată (lățime = înălțime). Acest logo va fi utilizat ca pictogramă favorită sau pentru alte necesităţi, cum ar fi bara de meniu de sus (dacă nu este dezactivată în configurarea afișajului). DoNotSuggestPaymentMode=Nu sugerează NoActiveBankAccountDefined=Niciun cont bancar activ definit OwnerOfBankAccount=Titular de cont bancar %s @@ -1115,11 +1130,11 @@ Delays_MAIN_DELAY_TRANSACTIONS_TO_CONCILIATE=În așteptarea reconcilierii banca Delays_MAIN_DELAY_MEMBERS=Taxă de membru întârziată Delays_MAIN_DELAY_CHEQUES_TO_DEPOSIT=Cecul nu a fost creat Delays_MAIN_DELAY_EXPENSEREPORTS=Raportul de cheltuieli pentru aprobare -Delays_MAIN_DELAY_HOLIDAYS=Leave requests to approve +Delays_MAIN_DELAY_HOLIDAYS=Cereri de concediu de aprobat SetupDescription1=Înainte de a începe să utilizați Dolibarr, unii parametri inițiali trebuie să fie definiți and modulele activate/configurate. SetupDescription2=Următoarele două secțiuni sunt obligatorii (primele două intrări din meniul de configurare) -SetupDescription3=%s -> %s

    Basic parameters used to customize the default behavior of your application (e.g for country-related features). -SetupDescription4=%s -> %s

    This software is a suite of many modules/applications. The modules related to your needs must be enabled and configured. Menu entries will appears with the activation of these modules. +SetupDescription3=%s->%s

    Parametri de bază folosiți pentru a personaliza comportamentul implicit al aplicației (de exemplu, pentru funcțiile legate de țară). +SetupDescription4=%s->%s

    Acest software este o suită de mai multe module/aplicații. Modulele necesare trebuie să fie activate și configurate. Intrările din meniu vor apărea odată cu activarea acestor module. SetupDescription5=Alte intrări în meniul de configurare gestionează parametrii opționali. LogEvents=Audit de securitate evenimente Audit=Audit @@ -1138,15 +1153,15 @@ LogEventDesc=Activați autentificarea pentru anumite evenimente de securitate. A AreaForAdminOnly=Parametrii de configurare pot fi setați numai de utilizatorii administratori . SystemInfoDesc=Sistemul de informare este diverse informaţii tehnice ai citit doar în modul şi vizibil doar pentru administratori. SystemAreaForAdminOnly=Acest zonă este disponibilă numai administratori. Permisiunile utilizatorilor Dolibarr nu pot modifica această restricție -CompanyFundationDesc=Edit the information of your company/organization. Click on "%s" button at the bottom of the page when done. -AccountantDesc=If you have an external accountant/bookkeeper, you can edit here its information. -AccountantFileNumber=Accountant code +CompanyFundationDesc=Editează informaţiile despre compania/organizaţia ta. Dă click pe butonul "%s" din josul paginii când ai terminat. +AccountantDesc= Dacă aveți un contabil/firmă de contabilitate externă, puteți modifica aici informațiile aferente. +AccountantFileNumber=Cod contabil DisplayDesc=Parametrii care afectează aspectul şi comportamentul Dolibarr pot fi modificaţi aici. AvailableModules=Aplicații/module disponibile ToActivateModule=Pentru a activa modulele, du-te la zona de configurare. SessionTimeOut=Time out pentru sesiune SessionExplanation=Acest număr garantează că sesiunea nu va expira niciodată înainte de această întârziere, în cazul în care curățarea sesiunii este efectuată de Cleaner intern pentru sesiuni PHP (și nimic altceva). Interfața de curățare internă a sesiunii PHP nu garantează că sesiunea va expira după această întârziere. Va expira, după această întârziere și atunci când curățătorul sesiunii va fi rulat, astfel încât fiecare %s / %s , acces dar numai în timpul accesului realizat de alte sesiuni (dacă valoarea este 0, înseamnă că ștergerea sesiunii se face numai printr-un proces extern).
    Notă: pe unele servere cu mecanism extern de curățare a sesiunilor (cron sub debian, ubuntu ...) sesiunile pot fi distruse după o perioadă definită de o configurație externă, indiferent de valoarea introdusă aici. -SessionsPurgedByExternalSystem=Sessions on this server seems to be cleaned by an external mechanism (cron under debian, ubuntu ...), probably every %s seconds (= value of parameter session.gc_maxlifetime), so changing the value here has no effect. You must ask the server administrator to change session delay. +SessionsPurgedByExternalSystem=Sesiunile de pe acest server par a fi şterse, curățate de un mecanism extern (cron sub debian, ubuntu ...), probabil fiecare la fiecare %s secunde (=valoarea parametrului session.gc_maxlifetime),  \ndeci schimbarea valorii aici nu are efect. Trebuie să ceri administratorului serverului să modifice durata de păstrare a sesiunii. TriggersAvailable=Disponibil declanşează TriggersDesc=Triggerele sunt fișiere care vor modifica comportamentul fluxului de lucru Dolibarr după copierea în director htdocs / core / triggers . Ei realizează acțiuni noi, activate la evenimentele Dolibarr (creare de noi companii, validare facturi ...). TriggerDisabledByName=Declanşările în acest dosar sunt dezactivate de-NoRun sufix în numele lor. @@ -1155,7 +1170,7 @@ TriggerAlwaysActive=Declanşările în acest dosar sunt întotdeauna activ, ce s TriggerActiveAsModuleActive=Declanşările în acest dosar sunt active ca modul %s este activată. GeneratedPasswordDesc=Alegeți metoda care va fi utilizată pentru parolele auto-generate. DictionaryDesc=Introduceți toate datele de referință. Puteți adăuga valorile dvs. la valorile implicite. -ConstDesc=This page allows you to edit (override) parameters not available in other pages. These are mostly reserved parameters for developers/advanced troubleshooting only. +ConstDesc=Această pagină vă permite să editați (să suprascrieţi) parametrii care nu sunt disponibili în alte pagini. Aceștia sunt în mare parte parametri rezervați doar pentru dezvoltatori/soluționare avansată a problemelor. MiscellaneousDesc=Toți ceilalți parametri legați de securitate sunt definiți aici. LimitsSetup=Limitele / Precizie LimitsDesc=Puteți defini limite, precizări şi optimizări utilizate de Dolibarr aici @@ -1170,7 +1185,7 @@ NoEventOrNoAuditSetup=Nu a fost înregistrat niciun eveniment de securitate. Ace NoEventFoundWithCriteria=Nu a fost găsit niciun eveniment de securitate pentru aceste criterii de căutare. SeeLocalSendMailSetup=Vedeţi-vă locale sendmail setup BackupDesc=O completă copie de rezervă a unei instalări Dolibarr necesită doi pași. -BackupDesc2=Backup the contents of the "documents" directory (%s) containing all uploaded and generated files. This will also include all the dump files generated in Step 1. This operation may last several minutes. +BackupDesc2=Copia de rezervă a conținutului directorului „documente” (%s) care conține toate fișierele încărcate și generate. Aceasta va include, de asemenea, toate fișierele dump generate în Pasul 1. Această operație poate dura câteva minute. BackupDesc3=Faceţi o copie de rezervă la structura și conținutul bazei de date ( %s ) într-un cos de gunoi. Pentru aceasta, puteți utiliza următorul asistent BackupDescX=Directorul arhivat trebuie să fie stocat într-un loc sigur. BackupDescY=Generate de fişier de imagine memorie trebuie să fie depozitate într-un loc sigur. @@ -1181,7 +1196,7 @@ RestoreDesc3=Restaurați structura bazei de date și datele dintr-un fișier de RestoreMySQL=MySQL import ForcedToByAModule= Această regulă este obligat la %s către un activat modulul PreviousDumpFiles=Fișiere de rezervă existente -PreviousArchiveFiles=Existing archive files +PreviousArchiveFiles=Fişiere arhivă existente WeekStartOnDay=Prima zi a săptămânii RunningUpdateProcessMayBeRequired=Rularea procesului de actualizare pare a fi necesară (versiunea programului %s diferă de versiunea bazei de date %s) YouMustRunCommandFromCommandLineAfterLoginToUser=Trebuie să rulaţi această comandă de la linia de comandă, după login la un raft cu %s utilizator. @@ -1221,7 +1236,7 @@ ExtraFieldsSupplierOrders=Atribute complementare (comenzi) ExtraFieldsSupplierInvoices=Atribute complementare (facturi) ExtraFieldsProject=Atribute complementare (proiecte) ExtraFieldsProjectTask=Atribute complementare (sarcini) -ExtraFieldsSalaries=Complementary attributes (salaries) +ExtraFieldsSalaries=Atribute complementare (salarii) ExtraFieldHasWrongValue=Atributul %s are o valoare greşită. AlphaNumOnlyLowerCharsAndNoSpace=numai caractere minuscule, alfanumerice fără spaţiu SendmailOptionNotComplete=Atenţie, pe unele sisteme Linux, pentru a trimite e-mail de la e-mail, sendmail configurare execuţie trebuie să conatins optiunea-ba (mail.force_extra_parameters parametri în fişierul php.ini). Dacă nu unor destinatari a primi e-mailuri, încercaţi să editaţi acest parametru PHP cu mail.force_extra_parameters =-BA). @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Un criteriu de căutare este necesar cel NewTranslationStringToShow=Noul șir de traducere de afișat OriginalValueWas=Traducerea originală este suprascrisă. Valoarea originală a fost:

    %s TransKeyWithoutOriginalValue=Ați forțat o traducere nouă pentru cheia de traducere ' %s ' care nu există în niciun fişier de limbă -TotalNumberOfActivatedModules=Aplicație / module activate: %s / %s +TitleNumberOfActivatedModules=Module activate +TotalNumberOfActivatedModules=Module activate: %s / %s YouMustEnableOneModule=Trebuie activat cel puţin 1 modul ClassNotFoundIntoPathWarning=Clasa %s nu a fost găsită în calea PHP YesInSummer=Da în vară @@ -1249,22 +1265,22 @@ SuhosinSessionEncrypt=Stocarea sesiune criptată prin Suhosin ConditionIsCurrently=Condiția este momentan %s YouUseBestDriver=Utilizați driverul %s, care este cel mai bun driver disponibil în prezent. YouDoNotUseBestDriver=Utilizați driverul %s dar driverul %s este recomandat. -NbOfObjectIsLowerThanNoPb=You have only %s %s in the database. This does not require any particular optimization. +NbOfObjectIsLowerThanNoPb=Aveţi doar %s%s în baza de date. Aceasta nu necesită nicio optimizare specială. SearchOptim=Optimizare căutare -YouHaveXObjectUseSearchOptim=You have %s %s in the database. You should add the constant %s to 1 in Home-Setup-Other. Limit the search to the beginning of strings which makes it possible for the database to use indexes and you should get an immediate response. -YouHaveXObjectAndSearchOptimOn=You have %s %s in the database and constant %s is set to 1 in Home-Setup-Other. +YouHaveXObjectUseSearchOptim=Aveţi %s%s în baza de date. Ar trebui să adăgaţi constanta %scu valoarea 1 în Acasă-Setup-Altele. Limitați căutarea la începutul șirurilor, ceea ce face posibilă utilizarea bazei de date cu indecşi și ar trebui să obțineți un răspuns imediat. +YouHaveXObjectAndSearchOptimOn=Aveţi %s%s în baza de date şi constanta %s este setată la valoarea 1 în Acasă-Setup-Altele. BrowserIsOK=Utilizați browserul web %s. Acest browser este ok pentru securitate și performanţă. BrowserIsKO=Utilizați browserul web %s. Acest browser este cunoscut ca fiind o alegere proastă pentru securitate, fiabilitate și performanță. Vă recomandăm să utilizați Firefox, Chrome, Opera sau Safari. -PHPModuleLoaded=PHP component %s is loaded -PreloadOPCode=Preloaded OPCode is used +PHPModuleLoaded=Componenta PHP %seste încărcată +PreloadOPCode=Componenta OPCode preîncărcată este utilizată AddRefInList=Afișați Lista de informatii a clientului/Furnizorului (selectați lista sau combobox) și cea mai mare parte a hiperlinkului.
    Terții vor apărea cu un format de nume "CC12345 - SC45678 - The Big Company corp". în loc de "The Big Company corp". AddAdressInList=Afișați Lista de informatii a clientului/Furnizorului (selectați lista sau combobox).
    Terții i vor apărea cu numele format din "Big Company corp - 21 jump street 123456 Big city - USA" în loc de "Big Company corp". AskForPreferredShippingMethod=Solicitați o metodă de transport preferată pentru terți. FieldEdition=Editarea campului %s FillThisOnlyIfRequired=Exemplu: +2 (completați numai dacă problemele decalajjului fusului orar sunt cunoscute) GetBarCode=Dă codbare -NumberingModules=Numbering models -DocumentModules=Document models +NumberingModules=Modele de numerotare +DocumentModules=Şabloane documente ##### Module password generation PasswordGenerationStandard=Întoarceţi-vă o parolă generate în funcţie de interne Dolibarr algoritmul: 8 caractere care conţin numere în comun şi în caractere minuscule. PasswordGenerationNone=Nu sugerați o parolă generată. Parola trebuie introdusă manual. @@ -1276,9 +1292,9 @@ RuleForGeneratedPasswords=Reguli pentru generarea și validarea parolelor DisableForgetPasswordLinkOnLogonPage=Nu afișați link-ul "Parola uitată" pe pagina de autentificare UsersSetup=Utilizatorii modul de configurare UserMailRequired=E-mailul necesar pentru a crea un utilizator nou -UserHideInactive=Hide inactive users from all combo lists of users (Not recommended: this may means you won't be able to filter or search on old users on some pages) -UsersDocModules=Document templates for documents generated from user record -GroupsDocModules=Document templates for documents generated from a group record +UserHideInactive=Ascundeți utilizatorii inactivi în toate listele combinate de utilizatori (Nu este recomandat: acest lucru înseamnă că nu veți putea filtra sau căuta pe utilizatori vechi pe unele pagini) +UsersDocModules= Șabloane de documente pentru documentele generate din înregistrarea utilizatorului +GroupsDocModules=Șabloane de documente generate dintr-o înregistrare de grup ##### HRM setup ##### HRMSetup=Configurare Modul HRM ##### Company setup ##### @@ -1310,7 +1326,7 @@ BillsPDFModules=Factura modele de documente BillsPDFModulesAccordindToInvoiceType=Modele de documente de facturare în funcție de tipul de factură PaymentsPDFModules=Modele de documente de plată ForceInvoiceDate=Vigoare la data facturii de validare data -SuggestedPaymentModesIfNotDefinedInInvoice=Suggested payments mode on invoice by default if not defined on the invoice +SuggestedPaymentModesIfNotDefinedInInvoice=Modalitatea de plată sugerată pe factură în mod implicit, dacă nu este definită pe factură SuggestPaymentByRIBOnAccount=Sugerați plata prin retragere din cont SuggestPaymentByChequeToAddress=Sugerați plata de prin cec către FreeLegalTextOnInvoices=Free text pe facturi @@ -1322,7 +1338,7 @@ SupplierPaymentSetup=Configurarea plăților furnizorului PropalSetup=Modul configurare Oferte Comerciale ProposalsNumberingModules=Modele numerotare Oferte Comerciale ProposalsPDFModules=Modele documente Oferte Comerciale -SuggestedPaymentModesIfNotDefinedInProposal=Suggested payments mode on proposal by default if not defined on the proposal +SuggestedPaymentModesIfNotDefinedInProposal=Modalitatea de plată sugerată pe ofertă în mod implicit, dacă nu este definită pe oferta comercială FreeLegalTextOnProposal=Text liber pe ofertele comerciale WatermarkOnDraftProposal=Filigranul pe ofertele comerciale schiţă (niciunul daca e gol) BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL=Cere contul bancar destinație al ofertei @@ -1337,7 +1353,7 @@ WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER=Cereţi sursa depozitului pentru comandă ##### Suppliers Orders ##### BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER=Cereţi contul bancar al beneficiarului unei comenzi de achiziție ##### Orders ##### -SuggestedPaymentModesIfNotDefinedInOrder=Suggested payments mode on sale order by default if not defined on the order +SuggestedPaymentModesIfNotDefinedInOrder=Modalitatea de plată sugerată pe comanda de vânzare în mod implicit, dacă nu este definită pe comandă OrdersSetup=Setări pentru gestionarea comenzilor de vânzări OrdersNumberingModules=Ordinele de numerotare module OrdersModelModule=Ordinul modele de documente @@ -1368,7 +1384,7 @@ MEMBER_REMINDER_EMAIL=Activați memento automat prin email de abonament ##### LDAP setup ##### LDAPSetup=LDAP Setup LDAPGlobalParameters=Global parametrii -LDAPUsersSynchro=Utilizatorii +LDAPUsersSynchro=Utilizatori LDAPGroupsSynchro=Grupuri LDAPContactsSynchro=Contacte LDAPMembersSynchro=Membri @@ -1489,13 +1505,13 @@ LDAPFieldSidExample=Examplu: objectsid LDAPFieldEndLastSubscription=Data de sfârşit de abonament LDAPFieldTitle=Funcţie LDAPFieldTitleExample=Examplu: titlu -LDAPFieldGroupid=Group id -LDAPFieldGroupidExample=Exemple : gidnumber -LDAPFieldUserid=User id -LDAPFieldUseridExample=Exemple : uidnumber -LDAPFieldHomedirectory=Home directory -LDAPFieldHomedirectoryExample=Exemple : homedirectory -LDAPFieldHomedirectoryprefix=Home directory prefix +LDAPFieldGroupid=Id grup +LDAPFieldGroupidExample=Exemplu : gidnumber +LDAPFieldUserid=Id utilizator +LDAPFieldUseridExample=Exemplu : uidnumber +LDAPFieldHomedirectory=Director home +LDAPFieldHomedirectoryExample=Exemplu : homedirectory +LDAPFieldHomedirectoryprefix=Prefix director home LDAPSetupNotComplete=LDAP setup nu complet (merg pe alţii file) LDAPNoUserOrPasswordProvidedAccessIsReadOnly=Nr administrator sau parola furnizate. LDAP de acces vor fi anonime şi modul doar în citire. LDAPDescContact=Această pagină vă permite să definiţi numele atribute LDAP LDAP în copac pentru fiecare date găsite pe Dolibarr contact. @@ -1617,7 +1633,7 @@ FCKeditorForProductDetails=WYSIWIG creare / editare de linii cu detalii ale prod FCKeditorForMailing= WYSIWIG crearea / ediţie de mailing FCKeditorForUserSignature=Creare/editare WYSIWIG a semnăturii utilizatorilor FCKeditorForMail=Crearea / editarea WYSIWIG pentru toate e-mailurile (cu excepția Tools-> eMailing) -FCKeditorForTicket=WYSIWIG creation/edition for tickets +FCKeditorForTicket=Creare/editare de tip WYSIWIG pentru tichete ##### Stock ##### StockSetup=Gestionarea modulelor de stoc IfYouUsePointOfSaleCheckModule=Dacă utilizați modulul Punct de vânzare (POS) furnizat în mod implicit sau un modul extern, această configurare poate fi ignorată de modulul POS. Cele mai multe module POS sunt proiectate în mod implicit pentru a crea o factură imediat și pentru a scădea din stoc, indiferent de opțiunile de aici. Deci, dacă aveți nevoie sau nu să aveți o scădere din stoc la înregistrarea unei vânzări de pe POS, verificați și configurarea modulului POS. @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Utilizați tipuri de evenimente (gestionate în menu Confi AGENDA_USE_EVENT_TYPE_DEFAULT=Puneți automat această valoare implicită pentru tipul de eveniment în formularul de creare a evenimentului AGENDA_DEFAULT_FILTER_TYPE=Puneți automat acest tip de eveniment în filtrul de căutare al vizualizării agendei AGENDA_DEFAULT_FILTER_STATUS=Puneți automat această stare pentru evenimentele din filtrul de căutare din vizualizarea agendei -AGENDA_DEFAULT_VIEW=Care tab doriţi să deschideţi când selectaţi meniul Agenda +AGENDA_DEFAULT_VIEW=Ce vizualizare doriți să deschideți implicit atunci când selectați meniul Agenda AGENDA_REMINDER_EMAIL=Activați memento-ul evenimentului de emailuri (opțiunea de reamintire / întârziere poate fi definită pe fiecare event). Nota: Modulul %s trebuie să fie activat and gestionat corect pentru a avea memento trimis la frecvența corectă. AGENDA_REMINDER_BROWSER=Activați memento-ul evenimentului pe browser-ul utlizatorului (când se ajunge la data evenimentului, fiecare utilizator poate să refuze întrebarea de confirmare a browserului) AGENDA_REMINDER_BROWSER_SOUND=Activați notificarea sonoră @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Afișați un obiect asociat în vizualizarea agendei ##### Clicktodial ##### ClickToDialSetup=Click pentru a Dial modul setup ClickToDialUrlDesc=URL-ul se apelează când se face clic pe pictograma telefonului. În URL-ul, puteți utiliza etichete
    __PHONETO__ care va fi înlocuit cu numărul de telefon al persoanei de apelat
    __PHONEFROM__ care va fi înlocuit cu numărul de telefon al apelantului (al tău)
    __LOGIN__ , care va fi înlocuit cu autentificare clicktodial (definită pe cartela de utilizator)
    __PASS__ care va fi înlocuit cu parola clicktodial (definită pe cartela de utilizator). -ClickToDialDesc=Acest modul face ca numerele de telefon să facă clic pe link-uri. Un clic pe pictogramă va face telefonul să apeleze numărul. Acesta poate fi utilizat pentru a apela un sistem de call-center de la Dolibarr care poate apela numărul de telefon dintr-un sistem SIP, de exemplu +ClickToDialDesc=Acest modul schimbă numerele de telefon, atunci când utilizați un computer desktop, în linkuri cu clic. Un clic va apela numărul. Acest lucru poate fi folosit pentru a porni apelul telefonic atunci când utilizați un telefon smart sau când utilizați un sistem CTI bazat pe protocolul SIP, de exemplu. Notă: Când utilizați un smartphone, numerele de telefon sunt întotdeauna făcute clic. ClickToDialUseTelLink=Utilizați doar link "tel:" pe numerele de telefon ClickToDialUseTelLinkDesc=Utilizați această metodă dacă utilizatorii dvs. au un softphone sau o interfață software instalată pe același computer ca browserul și sună când faceți clic pe un link din browser care începe cu "tel:". Dacă aveți nevoie de o soluție completă de server (nu este nevoie de instalarea software-ului local), trebuie să setați această opțiune la "Nu" și să completați câmpul următor ##### Point Of Sale (CashDesk) ##### @@ -1696,15 +1712,15 @@ CashDeskThirdPartyForSell=Terț generic implicit de utilizat pentru vânzări CashDeskBankAccountForSell=Case de cont pentru a utiliza pentru vinde CashDeskBankAccountForCheque=Contul implicit de folosit pentru a primi plata cu cec CashDeskBankAccountForCB=Cont pentru a folosi pentru a primi plăţi în numerar de carduri de credit -CashDeskBankAccountForSumup=Default bank account to use to receive payments by SumUp +CashDeskBankAccountForSumup=Contul bancar implicit utilizat pentru a primi plăţi de la SumUp CashDeskDoNotDecreaseStock=Dezactivați scăderea stocului atunci când o vânzare se face prin POS (dacă "nu", scaderea stocului se face pentru fiecare vânzare făcută prin POS, indiferent de opțiunea stabilită în modulul Stoc). CashDeskIdWareHouse=Forţează și limitează depozitul să folosească scăderea stocului StockDecreaseForPointOfSaleDisabled=Scăderea stocului la vânzarea făcută prin POS dezactivată StockDecreaseForPointOfSaleDisabledbyBatch=Scăderea stocului la plata prin POS nu este compatibilă cu gestionarea modulului Serial/Lot (activă în prezent), astfel că scăderea stocului este dezactivată. CashDeskYouDidNotDisableStockDecease=Nu ați dezactivat scăderea stocului la efectuarea unei vânzări de la POS. Prin urmare, este necesar un depozit. -CashDeskForceDecreaseStockLabel=Stock decrease for batch products was forced. -CashDeskForceDecreaseStockDesc=Decrease first by the oldest eatby and sellby dates. -CashDeskReaderKeyCodeForEnter=Key code for "Enter" defined in barcode reader (Example: 13) +CashDeskForceDecreaseStockLabel=Scăderea stocului pentru produsele din lot a fost forțată. +CashDeskForceDecreaseStockDesc=Scădere mai întâi după cea mai vechi date de consum şi de vânzare. +CashDeskReaderKeyCodeForEnter=Cod tastă pentru "Enter" definit în cititorul de coduri de bare(Exemplu: 13) ##### Bookmark ##### BookmarkSetup=Bookmark modul de configurare BookmarkDesc=Acest modul vă permite să gestionați marcajele. De asemenea, puteți adăuga comenzi rapide la orice pagini Dolibarr sau site-uri externe din meniul din stânga. @@ -1735,14 +1751,14 @@ ChequeReceiptsNumberingModule=Modul de verificare a numerotării chitanţelor MultiCompanySetup=Multi-societate modul setup ##### Suppliers ##### SuppliersSetup=Configurarea modulului furnizor -SuppliersCommandModel=Complete template of Purchase Order -SuppliersCommandModelMuscadet=Complete template of Purchase Order (old implementation of cornas template) -SuppliersInvoiceModel=Complete template of Vendor Invoice +SuppliersCommandModel=Şablon complet pentru comanda de achiziţie +SuppliersCommandModelMuscadet=Şablon complet pentru Comandă de achiziţie (vechea implementare a şablonului cornas) +SuppliersInvoiceModel=Şablon complet de factură furnizor SuppliersInvoiceNumberingModel=Modele de numerotare a facturilor furnizorilor -IfSetToYesDontForgetPermission=If set to a non null value, don't forget to provide permissions to groups or users allowed for the second approval +IfSetToYesDontForgetPermission=Dacă este setată o valoare nulă, nu uitați să furnizați permisiuni grupurilor sau utilizatorilor autorizați pentru a doua aprobare ##### GeoIPMaxmind ##### GeoIPMaxmindSetup=GeoIP Maxmind modul de configurare -PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.
    Examples:
    /usr/local/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoLite2-Country.mmdb +PathToGeoIPMaxmindCountryDataFile=Calea spre fişierul Maxmind care conţine translatarea IP la ţară.
    Exemple:
    /usr/local/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoIP.dat
    /usr/share/GeoIP/GeoLite2-Country.mmdb NoteOnPathLocation=Reţineţi că dvs. de IP la datele din ţara Dosarul trebuie să fie într-un director PHP poate citi (Verificaţi configurarea PHP open_basedir şi permisiunile de fişiere). YouCanDownloadFreeDatFileTo=Puteţi descărca o versiune demo gratuită a ţării dosar GeoIP Maxmind la %s. YouCanDownloadAdvancedDatFileTo=Puteţi descărca de asemenea, o versiune mai completă, cu actualizari ale ţării dosar GeoIP Maxmind la %s. @@ -1783,21 +1799,21 @@ ExpenseReportsRulesSetup=Configurare din module Rapoarte de cheltuieli - Reguli ExpenseReportNumberingModules=Modul de numerotare a rapoartelor de cheltuieli NoModueToManageStockIncrease=Nu a fost activat niciun modul capabil să gestioneze creșterea stocului automat. Creșterea stocurilor se va face doar prin introducere manuală. YouMayFindNotificationsFeaturesIntoModuleNotification=Puteți găsi opțiuni pentru notificările prin e-mail prin activarea și configurarea modulului "Notificare". -ListOfNotificationsPerUser=List of automatic notifications per user* -ListOfNotificationsPerUserOrContact=List of possible automatic notifications (on business event) available per user* or per contact** -ListOfFixedNotifications=List of automatic fixed notifications +ListOfNotificationsPerUser=Lista notificărilor automate pentru utilizator* +ListOfNotificationsPerUserOrContact=Lista posibilelor notificări automate (în cadrul evenimentului comercial) disponibile pentru utilizator* sau pentru contact** +ListOfFixedNotifications=Listă notificări automate GoOntoUserCardToAddMore=Accesați fila "Notificări" a unui mesaj de utilizator pentru a adăuga sau elimina notificările pentru utilizatori -GoOntoContactCardToAddMore=Go to the tab "Notifications" of a third party to add or remove notifications for contacts/addresses +GoOntoContactCardToAddMore=Accesați fila "Notificări" a terțului pentru a adăuga sau elimina notificări pentru contacte/adrese Threshold=Prag -BackupDumpWizard=Wizard to build the database dump file -BackupZipWizard=Wizard to build the archive of documents directory +BackupDumpWizard=Wizard pentru generarea fişierului dump al bazei de date +BackupZipWizard=Wizard pentru generarea arhivei cu directul de documente SomethingMakeInstallFromWebNotPossible=Instalarea modulului extern nu este posibilă din interfața web din următorul motiv: SomethingMakeInstallFromWebNotPossible2=Din acest motiv, procesul de actualizare descris aici este un proces manual pe care numai un utilizator privilegiat poate face. InstallModuleFromWebHasBeenDisabledByFile=Instalarea modulului extern din aplicație a fost dezactivată de administratorul dvs. Trebuie să-l rogi să-l elimine fişierul %s pentru a permite această caracteristică ConfFileMustContainCustom=Instalarea sau construirea unui modul extern din aplicație trebuie să salveze fişierele modulului în directorul %s . Pentru a avea acest director procesat de Dolibarr, trebuie să vă configuraţi conf / conf.php pentru a adăuga 2 linii directoare:
    $ dolibarr_main_url_root_alt = '/ custom';
    $ dolibarr_main_document_root_alt = '%s / personalizat'; HighlightLinesOnMouseHover=Evidențiați liniile tabelului când mișcarea mouse-ului trece peste ele -HighlightLinesColor=Highlight color of the line when the mouse passes over (use 'ffffff' for no highlight) -HighlightLinesChecked=Highlight color of the line when it is checked (use 'ffffff' for no highlight) +HighlightLinesColor=Evidențiere culoare linie la trecerea cu mouse-ul (foloseşte „ffffff” pentru dezactivare) +HighlightLinesChecked=Evidențiere culoare linie atunci când este bifată (foloseşte „ffffff” pentru dezactivare) TextTitleColor=Culoarea textului paginii de titlu LinkColor=Culoare link-uri PressF5AfterChangingThis=Apăsați CTRL + F5 pe tastatură sau ștergeți memoria cache a browserului după ce ați modificat această valoare pentru a o avea eficientă @@ -1808,15 +1824,16 @@ TopMenuDisableImages=Ascundeți imaginile în meniul de deasupra LeftMenuBackgroundColor=Culoare Background pentru Left menu BackgroundTableTitleColor=Culoarea de fundal pentru linia de titlul a tabelului BackgroundTableTitleTextColor=Culoarea textului pentru linia de titlul a tabelului -BackgroundTableTitleTextlinkColor=Text color for Table title link line +BackgroundTableTitleTextlinkColor=Culoarea textului pentru link-urile din titlul tabelelor BackgroundTableLineOddColor=Culoarea de fundal pentru liniile impare ale tabelului BackgroundTableLineEvenColor=Culoarea de fundal pentru liniile pare ale tabelului MinimumNoticePeriod=Perioada minimă de preaviz (cererea dvs. de concediu trebuie făcută înainte de această întârziere) NbAddedAutomatically=Număr de zile adăugate la contoarele utilizatorilor (automat) în fiecare lună EnterAnyCode=Acest câmp conține o referinţă pentru a identifica linia. Introduceţi o valoare aleatoare, dar fără caractere speciale. -Enter0or1=Enter 0 or 1 +Enter0or1=Introdu 0 sau 1 UnicodeCurrency=Enter aici între paranteze, lista de octeți care reprezintă simbolul monedei. De exemplu: pentru $, enter [36] - pentru Brazilia real R$ [82,36] - pentru €, enter [8364] ColorFormat=Culoarea RGB este în format HEX , de exemplu: FF0000 +PictoHelp=Numele pictogramei în format dolibarr ('image.png' dacă se află în directorul temei actuale, 'image.png@nume_modul' dacă se află în directorul /img/ al unui modul) PositionIntoComboList=Poziția linei în listele combo SellTaxRate=Rata taxei de vânzare RecuperableOnly=Da pentru TVA "neperceput, dar recuperabil" dedicat pentru unele state din Franța. Mențineți valoarea "Nu" în toate celelalte cazuri. @@ -1831,8 +1848,8 @@ FixTZ=Fixează TimeZone FillFixTZOnlyIfRequired=Examplu: +2 (completați numai dacă se întâlnește o problemă) ExpectedChecksum=Checksum așteptat CurrentChecksum=Checksum curent -ExpectedSize=Expected size -CurrentSize=Current size +ExpectedSize=Dimensiune aşteptată +CurrentSize=Dimensiune curentă ForcedConstants=Valori constante necesare MailToSendProposal=Oferte Clienti MailToSendOrder=Ordine de vânzări @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Cerere de cotaţie MailToSendSupplierOrder=Comenzile de achiziție MailToSendSupplierInvoice=Facturi Furnizori MailToSendContract=Contracte +MailToSendReception=Receptii MailToThirdparty=Terţi MailToMember=Membri MailToUser=Utilizatori @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s este disponibil. Versi ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s este disponibil. Versiunea %s este o versiune de întreținere, deci conține doar corecții de erori. Recomandăm tuturor utilizatoriilor să faceți upgrade la această versiune. O versiune de întreținere nu introduce noi caracteristici sau modificări la baza de date. Puteți să o descărcați din https://www.dolibarr.org (versiuni stabile subdirector). Puteți să citiţi ChangeLog pentru lista completă a modificărilor. MultiPriceRuleDesc=Când opțiunea "Mai multe niveluri de prețuri pe produs / serviciu" este activată, puteți defini diferite prețuri (câte unul pentru fiecare nivel de preț) pentru fiecare produs. Pentru a vă economisi timp, aici puteți introduce o regulă pentru a calcula automat un preț pentru fiecare nivel, pe baza prețului primului nivel, astfel încât va trebui să introduceți un preț pentru primul nivel pentru fiecare produs. Această pagină are rolul de a economisi timp, dar este utilă numai dacă prețurile pentru fiecare nivel sunt relative la primul nivel. În majoritatea cazurilor, puteți ignora această pagină. ModelModulesProduct=Șabloane pentru documente de produs +WarehouseModelModules=Şabloane pentru documentele de depozit ToGenerateCodeDefineAutomaticRuleFirst=Pentru a putea genera automat coduri, trebuie mai întâi să definiți un manager pentru a defini automat numărul de cod de bare. SeeSubstitutionVars=Consultați * notă pentru lista variabilelor de înlocuire posibile SeeChangeLog=Vedeți fişierul ChangeLog (numai în engleză) @@ -1894,14 +1913,15 @@ MAIN_PDF_MARGIN_LEFT=Marginea stângă a PDF-ului MAIN_PDF_MARGIN_RIGHT=Marginea dreaptă a PDF-ului MAIN_PDF_MARGIN_TOP=Marginea superioară a PDF-ului MAIN_PDF_MARGIN_BOTTOM=Marginea inferioară a PDF-ului +MAIN_DOCUMENTS_LOGO_HEIGHT=Înălţime logo în PDF NothingToSetup=Nu există o configurație specifică necesară pentru acest modul. SetToYesIfGroupIsComputationOfOtherGroups=Setați acest lucru la da dacă acest grup este un calcul al altor grupuri EnterCalculationRuleIfPreviousFieldIsYes=Introduceți regula de calcul în cazul în care câmpul anterior a fost setat la Da (de exemplu "CODEGRP1 + CODEGRP2") SeveralLangugeVariatFound=Mai multe variante de limbă au fost găsite RemoveSpecialChars=Eliminați caracterele speciale COMPANY_AQUARIUM_CLEAN_REGEX=Filtrul Regex pentru a curăța valoarea (COMPANY_AQUARIUM_CLEAN_REGEX) -COMPANY_DIGITARIA_CLEAN_REGEX=Regex filter to clean value (COMPANY_DIGITARIA_CLEAN_REGEX) -COMPANY_DIGITARIA_UNIQUE_CODE=Duplicate not allowed +COMPANY_DIGITARIA_CLEAN_REGEX=Flitru Regex pentru curăţarea valorii (COMPANY_DIGITARIA_CLEAN_REGEX) +COMPANY_DIGITARIA_UNIQUE_CODE=Nu sunt permise duplicate GDPRContact=Responsabilul cu protecția datelor (DPO, confidențialitatea datelor sau contact GDPR ) GDPRContactDesc=Dacă stocați date despre companii/cetățeni europeni, puteți numi persoana de contact care este responsabilă cu Regulamentul general privind protecția datelor aici HelpOnTooltip=Text de ajutor care să apară pe butonul de sugestii @@ -1911,7 +1931,7 @@ ChartLoaded=Schema de cont încărcată SocialNetworkSetup=Configurarea modulelor Rețele sociale EnableFeatureFor=Activați caracteristici pentru %s VATIsUsedIsOff=Nota: Opțiunea de a utiliza impozitul pe vânzări sau TVA a fost setată la Oprit în meniu %s - %s, astfel încât impozitul pe vânzări sau TVA utilizate vor fi întotdeauna 0 pentru vânzări. -SwapSenderAndRecipientOnPDF=Swap sender and recipient address position on PDF documents +SwapSenderAndRecipientOnPDF=Interschimbă poziţia adreselor expeditorului şi destinatarului în documentele PDF generate FeatureSupportedOnTextFieldsOnly=Avertizare, caracteristică acceptată numai pe câmpurile de text. De asemenea, trebuie să fie setat un parametru URL = create sau action = editare SAU numele paginii trebuie să se termine cu "new.php" pentru a declanșa această caracteristică. EmailCollector=Colector de e-mailuri EmailCollectorDescription=Adăugați o lucrare programată și o pagină de configurare pentru a scana în mod regulat căsuţele de e-mail (utilizând protocolul IMAP) și pentru a înregistra e-mailurile primite în aplicația dvs., la locul potrivit și/sau pentru a crea automat înregistrări (cum ar fi clienții). @@ -1920,88 +1940,93 @@ EMailHost=Gazdă a serverului de email IMAP MailboxSourceDirectory=Directorul sursă al cutiei poștale MailboxTargetDirectory=Directorul ţintă al cutiei poștale EmailcollectorOperations=Operațiuni de făcut de către colector -MaxEmailCollectPerCollect=Max number of emails collected per collect +MaxEmailCollectPerCollect=Număr maxim de email-uri colectae per operaţiune CollectNow=Colectați acum -ConfirmCloneEmailCollector=Are you sure you want to clone the Email collector %s ? -DateLastCollectResult=Date latest collect tried -DateLastcollectResultOk=Date latest collect successfull -LastResult=Latest result +ConfirmCloneEmailCollector=Eşti sigur că vrei să clonezi colectorul de email %s? +DateLastCollectResult=Data ultimei încercări de colectare +DateLastcollectResultOk=Data ultimei colectări efectuate cu succes +LastResult=Ultimul rezultat EmailCollectorConfirmCollectTitle=Confirmarea colectării de emailuri EmailCollectorConfirmCollect=Doriți să rulați acum colecția pentru acest colector? NoNewEmailToProcess=Niciun email de procesat (care sa se potriveasca cu filtrele) NothingProcessed=Nimic nu s-a făcut -XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) +XEmailsDoneYActionsDone=%semail-uri calificate, %semail-uri procesate cu succes (pentru %s înregistrări/acţiuni efectuate) RecordEvent=Înregistrați evenimentul de e-mail CreateLeadAndThirdParty=Creați iniţiativă (și terț, dacă este necesar) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Creați tichet (și faceți legătura cu un terț dacă a fost încărcat de o operațiune anterioară) CodeLastResult=Ultimul cod rezultat -NbOfEmailsInInbox=Number of emails in source directory -LoadThirdPartyFromName=Load third party searching on %s (load only) -LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +NbOfEmailsInInbox=Numărul de email-uri în directorul sursă +LoadThirdPartyFromName=Încărcați un terţ căutând în %s (doar încărcare) +LoadThirdPartyFromNameOrCreate=Încărcați un terţ căutând în %s (creare dacă nu este găsit) +WithDolTrackingID=Mesaj dintr-o conversație inițiată de un prim e-mail trimis de la Dolibarr +WithoutDolTrackingID=Mesaj dintr-o conversație inițiată de un prim e-mail NU trimis de la Dolibarr +CreateCandidature=Creare candidatură FormatZip=Zip MainMenuCode=Codul de introducere a meniului (meniu principal) ECMAutoTree=Afișați arborele ECM automat -OperationParamDesc=Define the values to use for the object of the action, or how to extract values. For example:
    objproperty1=SET:the value to set
    objproperty2=SET:a value with replacement of __objproperty1__
    objproperty3=SETIFEMPTY:value used if objproperty3 is not already defined
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:My company name is\\s([^\\s]*)

    Use a ; char as separator to extract or set several properties. -OpeningHours=Ore de program -OpeningHoursDesc=Introduceți aici orele de program normale ale companiei dvs. +OperationParamDesc=Definiți valorile de utilizat pentru obiectul acțiunii sau modul de extragere a valorilor. De exemplu:
    objproperty1=SET:valoarea de setat
    objproperty2=SET:o valoare de înlocuire a __objproperty1__
    objproperty3=SETIFEMPTY:valoare folosită dacă objproperty3 nu este încă definită
    objproperty4=EXTRACT:HEADER:X-Myheaderkey:\\s*([^\\s]*)
    options_myextrafield1=EXTRACT:SUBJECT:([^\n]*)
    object.objproperty5=EXTRACT:BODY:Denumirea companiei mele este\\s([^\\s]*)

    Folosește caracterul ; ca separator pentru a extrage sau seta mai multe proprietăți. +OpeningHours=Program de lucru +OpeningHoursDesc=Introduceți aici programul de lucru normal ale companiei dvs. ResourceSetup=Configurarea modulului Resurse UseSearchToSelectResource=Utilizați un formular de căutare pentru a alege o resursă (mai degrabă decât o listă derulantă). DisabledResourceLinkUser=Dezactivați caracteristica care conectează o resursă la utilizatori DisabledResourceLinkContact=Dezactivați caracteristica care conectează o resursă la contacte -EnableResourceUsedInEventCheck=Enable feature to check if a resource is in use in an event +EnableResourceUsedInEventCheck=Activează funcţionalitatea de verificare a resurselor în uz pe un eveniment ConfirmUnactivation=Confirmați resetarea modulului OnMobileOnly=Numai pe ecranul mic (smartphone) DisableProspectCustomerType=Dezactivați tipul de terţ "Prospect + Client" (deci terţul trebuie să fie Prospect sau Client, dar nu poate fi ambele) MAIN_OPTIMIZEFORTEXTBROWSER=Simplificați interfața pentru o persoană nevăzătoare MAIN_OPTIMIZEFORTEXTBROWSERDesc=Activați această opțiune dacă sunteți o persoană nevăzătoare sau dacă utilizați aplicația dintr-un browser de text precum Lynx sau Links. -MAIN_OPTIMIZEFORCOLORBLIND=Change interface's color for color blind person -MAIN_OPTIMIZEFORCOLORBLINDDesc=Enable this option if you are a color blind person, in some case interface will change color setup to increase contrast. -Protanopia=Protanopia -Deuteranopes=Deuteranopes -Tritanopes=Tritanopes +MAIN_OPTIMIZEFORCOLORBLIND=Schimbă culorile interfeţei pentru persoanele cu disabilităţi vizuale +MAIN_OPTIMIZEFORCOLORBLINDDesc=Activează această opţiune dacă eşti o persoană cu probleme vizuale, în anumite cazuri interfaţa îşi va schimba paleta de culori pentru a mări contrastul. +Protanopia=Protanopie +Deuteranopes=Deuteranopie +Tritanopes=Tritanopie ThisValueCanOverwrittenOnUserLevel=Această valoare poate fi suprascrisă de fiecare utilizator de pe pagina sa de utilizator- tab '%s' DefaultCustomerType=Tipul terțului implicit pentru formularul de creare "Client nou" -ABankAccountMustBeDefinedOnPaymentModeSetup=Note: The bank account must be defined on the module of each payment mode (Paypal, Stripe, ...) to have this feature working. -RootCategoryForProductsToSell=Root category of products to sell -RootCategoryForProductsToSellDesc=If defined, only products inside this category or childs of this category will be available in the Point Of Sale -DebugBar=Debug Bar -DebugBarDesc=Toolbar that comes with a plenty of tools to simplify debugging -DebugBarSetup=DebugBar Setup -GeneralOptions=General Options -LogsLinesNumber=Number of lines to show on logs tab -UseDebugBar=Use the debug bar -DEBUGBAR_LOGS_LINES_NUMBER=Number of last log lines to keep in console -WarningValueHigherSlowsDramaticalyOutput=Warning, higher values slows dramaticaly output -ModuleActivated=Module %s is activated and slows the interface -EXPORTS_SHARE_MODELS=Export models are share with everybody -ExportSetup=Setup of module Export -ImportSetup=Setup of module Import -InstanceUniqueID=Unique ID of the instance -SmallerThan=Smaller than -LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. -WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. -EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. -EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. -EndPointFor=End point for %s : %s -DeleteEmailCollector=Delete email collector -ConfirmDeleteEmailCollector=Are you sure you want to delete this email collector? -RecipientEmailsWillBeReplacedWithThisValue=Recipient emails will be always replaced with this value -AtLeastOneDefaultBankAccountMandatory=At least 1 default bank account must be defined -RESTRICT_ON_IP=Allow access to some host IP only (wildcard not allowed, use space between values). Empty means every hosts can access. +ABankAccountMustBeDefinedOnPaymentModeSetup=Notă: Contul bancar trebuie definit în modul pentru fiecare metodă de plată (Paypal, Stripe, ...) pentru a funcţiona. +RootCategoryForProductsToSell=Categoria rădăcină pentru toate produsele de vânzare +RootCategoryForProductsToSellDesc=Dacă este definit, numai produsele din această categorie sau din subcategoriile acesteia vor fi disponibile în Punctul de vânzare +DebugBar=Debug bar +DebugBarDesc=Bara de instrumente pentru simplificarea depanării +DebugBarSetup=Configurare DebugBar +GeneralOptions=Opţiuni generale +LogsLinesNumber=Numărul de linii care se vor afişa în tab-ul Jurnal +UseDebugBar=Utilizează bara de debug +DEBUGBAR_LOGS_LINES_NUMBER=Numărul celor mai recente linii din jurnal care se vor păstra în consolă +WarningValueHigherSlowsDramaticalyOutput=Avertizare, valorile foarte mari încetinesc dramatic viteza de afişare +ModuleActivated=Modulul %s este activat şi încetineşte interfaţa +EXPORTS_SHARE_MODELS=Modele de export date sunt partajate cu toată lumea +ExportSetup=Configurare modul Export +ImportSetup=Configurare modul Import +InstanceUniqueID=ID unic al instanţei +SmallerThan=Mai mic decât +LargerThan=Mai mare decât +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. +WithGMailYouCanCreateADedicatedPassword=Cu un cont GMail, dacă ați activat validarea cu 2 factori, este recomandat să creați o a doua parolă dedicată pentru aplicație, în loc să utilizați propria parolă de la https://myaccount.google.com/. +EmailCollectorTargetDir=Poate fi de dorit să mutați email-ul într-o altă etichetă/director atunci când a fost procesat cu succes. Trebuie doar să setați numele directorului aici pentru a utiliza această caracteristică (NU folosiți caractere speciale în nume). Rețineți că, de asemenea, trebuie să utilizați un cont de autentificare pentru citire/scriere. +EmailCollectorLoadThirdPartyHelp=Puteți utiliza această acțiune pentru a folosi conținutul de e-mail la căutarea și încărcarea unui terț existent în baza de date. Terţul găsit (sau creat) va fi folosit pentru acțiunile în care este necesar. În câmpul parametru puteți folosi, de exemplu, 'EXTRACT: BODY: Name:\\s([^\\s]*)' dacă doriți să extrageți numele terțului dintr-un șir 'Nume: nume căutat' găsit în corpul email-ului. +EndPointFor=End point pentru %s:%s +DeleteEmailCollector=Şterge colectorul de email-uri +ConfirmDeleteEmailCollector=Eşti sigur că vrei să ştergi acest colector de email-uri? +RecipientEmailsWillBeReplacedWithThisValue= E-mailurile destinatarilor vor fi întotdeauna înlocuite cu această valoare +AtLeastOneDefaultBankAccountMandatory=Trebuie definit cel puțin 1 cont bancar implicit +RESTRICT_ON_IP=Permiteți accesul doar la un anumit IP gazdă (caracterul wildcard nu este permis, folosiți spațiu între valori). Gol înseamnă că fiecare gazdă poate avea acces. IPListExample=127.0.0.1 192.168.0.2 [::1] -BaseOnSabeDavVersion=Based on the library SabreDAV version -NotAPublicIp=Not a public IP -MakeAnonymousPing=Make an anonymous Ping '+1' to the Dolibarr foundation server (done 1 time only after installation) to allow the foundation to count the number of Dolibarr installation. -FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled -EmailTemplate=Template for email -EMailsWillHaveMessageID=Emails will have a tag 'References' matching this syntax -PDF_USE_ALSO_LANGUAGE_CODE=If you want to have some texts in your PDF duplicated in 2 different languages in the same generated PDF, you must set here this second language so generated PDF will contains 2 different languages in same page, the one chosen when generating PDF and this one (only few PDF templates support this). Keep empty for 1 language per PDF. -FafaIconSocialNetworksDesc=Enter here the code of a FontAwesome icon. If you don't know what is FontAwesome, you can use the generic value fa-address-book. -FeatureNotAvailableWithReceptionModule=Feature not available when module Reception is enabled -RssNote=Note: Each RSS feed definition provides a widget that you must enable to have it available in dashboard -JumpToBoxes=Jump to Setup -> Widgets -MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" -MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +BaseOnSabeDavVersion=Bazat pe o versiune a librăriei SabreDAV +NotAPublicIp=IP non-public +MakeAnonymousPing=Trimiteţi un Ping anonim '+1' către serverul fundației Dolibarr ( 1 dată numai după instalare) pentru a permite fundației să numere numărul de instalări Dolibarr. +FeatureNotAvailableWithReceptionModule=Funcţionalitatea nu este disponibilă când modulul Recepţie este activat +EmailTemplate=Şablon pentru email +EMailsWillHaveMessageID=E-mailuri care conţin eticheta „Referințe” care se potrivesc cu această expresie +PDF_USE_ALSO_LANGUAGE_CODE=Dacă doriți să aveți unele texte duplicate în PDF-ul în 2 limbi diferite în același PDF generat, trebuie să setați aici această a doua limbă, astfel încât PDF-ul generat va conține 2 limbi diferite în aceeași pagină, cea aleasă la generarea PDF-ului și aceasta ( doar câteva șabloane PDF acceptă acest lucru). Păstrați gol pentru 1 limbă pentru fiecare PDF. +FafaIconSocialNetworksDesc=Introduceți aici codul unei pictograme FontAwesome. Dacă nu știți ce este FontAwesome, puteți utiliza valoarea generică fa-address-book. +FeatureNotAvailableWithReceptionModule=Funcţionalitatea nu este disponibilă când modulul Recepţie este activat +RssNote=Notă: Fiecare definiție de flux RSS oferă un widget pe care trebuie să îl activați pentru a-l avea disponibil în tabloul de bord +JumpToBoxes=Mergi la Setări -> Widget-uri +MeasuringUnitTypeDesc=Foloseşte aici valori ca "mărime", "suprafaţă", "volum", "greutate", "durată" +MeasuringScaleDesc=Scala este numărul de zecimale pe care trebuie să le mutați pentru a se potrivi cu unitatea de referință implicită. Pentru tipul unitate "timp", acesta este numărul de secunde. Valorile cuprinse între 80 și 99 sunt valori rezervate. +TemplateAdded=Şablon adăugat +TemplateUpdated=Şablon actualizat +TemplateDeleted=Şablon şters +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ro_RO/agenda.lang b/htdocs/langs/ro_RO/agenda.lang index e6a335c513d..98ea4c798e3 100644 --- a/htdocs/langs/ro_RO/agenda.lang +++ b/htdocs/langs/ro_RO/agenda.lang @@ -14,31 +14,31 @@ EventsNb=Număr evenimente ListOfActions=Lista evenimente EventReports=Rapoarte Eveniment Location=Locație -ToUserOfGroup=Oricărui utilizator din grup -EventOnFullDay=Eveniment toat(ă)e zi(ua)lele -MenuToDoActions=Toate Ev. neterminate -MenuDoneActions=Toate Ev. terminate +ToUserOfGroup=Eveniment atribuit unui utilizator din grup +EventOnFullDay=Eveniment pe toat(ă)e zilele +MenuToDoActions=Toate ev. neterminate +MenuDoneActions=Toate ev. terminate MenuToDoMyActions=Ev. mele neterminate -MenuDoneMyActions=Ev. mele terminate -ListOfEvents=Lista Evenimente (calendar intern) +MenuDoneMyActions=Ev. mele terminate +ListOfEvents=Listă evenimente (calendar intern) ActionsAskedBy=Ev. înregistrate de ActionsToDoBy=Ev. atribuite lui ActionsDoneBy=Ev. efectuate de ActionAssignedTo=Eveniment atribuit lui -ViewCal=Vedere lunara -ViewDay=Vedere zilnica -ViewWeek=Vedere săptămânala +ViewCal=Vedere lunară +ViewDay=Vedere zilnică +ViewWeek=Vedere săptămânală ViewPerUser=Vedere pe utilizator ViewPerType=Vizualizare pe tip -AutoActions= Completarea automată +AutoActions= Completare automată AgendaAutoActionDesc= Aici puteți defini evenimentele pe care doriți ca Dolibarr să le creeze automat în Agendă. Dacă nu este bifat nimic, numai acțiunile manuale vor fi incluse în jurnale și afișate în Agendă. Urmărirea automată a acțiunilor de afaceri efectuate pe obiecte (validare, schimbare de stare) nu va fi salvată. AgendaSetupOtherDesc= Această pagină oferă opțiuni pentru a permite exportul evenimentelor Dolibarr într-un calendar extern (Thunderbird, Google Calendar etc.) AgendaExtSitesDesc=Această pagină vă permite să declaraţi sursele externe de calendare pentru a vedea evenimentele lor în agenda Dolibarr. ActionsEvents=Evenimente pentru care Dolibarr va crea o acţiune în agendă în mod automat EventRemindersByEmailNotEnabled=Evenimentul pentru mementouri prin e-mail nu a fost activat în configurarea modulului %s. ##### Agenda event labels ##### -NewCompanyToDolibarr=Terța parte %s a fost creată -COMPANY_DELETEInDolibarr=Third party %s deleted +NewCompanyToDolibarr=Terțul %s a fost creat +COMPANY_DELETEInDolibarr=Terţ %s şters ContractValidatedInDolibarr=Contract %s validat CONTRACT_DELETEInDolibarr=Contractul %s a fost șters PropalClosedSignedInDolibarr=Oferta %s semnată @@ -58,12 +58,12 @@ MemberDeletedInDolibarr=Membru %s şters MemberSubscriptionAddedInDolibarr=Abonament %s pentru membru %s a fost adăugat MemberSubscriptionModifiedInDolibarr=Abonamentul %s pentru membrul %s a fost modificat MemberSubscriptionDeletedInDolibarr=Abonamentul %s pentru membrul %s a fost eliminat -ShipmentValidatedInDolibarr=Livrarea %s validata -ShipmentClassifyClosedInDolibarr=Expediere %s clasificată facturată -ShipmentUnClassifyCloseddInDolibarr=Shipment %s classified re-open +ShipmentValidatedInDolibarr=Livrarea %s validată +ShipmentClassifyClosedInDolibarr=Expediere %s clasificată ca facturată +ShipmentUnClassifyCloseddInDolibarr=Livrarea%s clasificată ca re-deschisă ShipmentBackToDraftInDolibarr=Expedierea %s revine la starea de proiect ShipmentDeletedInDolibarr=Livrare %s ştearsă -ReceptionValidatedInDolibarr=Reception %s validated +ReceptionValidatedInDolibarr=Recepţie %s validată OrderCreatedInDolibarr=Comanda %s a fost creată OrderValidatedInDolibarr=Comanda %s validată OrderDeliveredInDolibarr=Comanda livrată %s clasificată @@ -71,52 +71,54 @@ OrderCanceledInDolibarr=Comanda %s anulată OrderBilledInDolibarr=Comanda livrată %s facturată OrderApprovedInDolibarr=Comanda %s aprobată OrderRefusedInDolibarr=Comanda %s refuzată -OrderBackToDraftInDolibarr=Comanda %s revenită de statutul schiţă +OrderBackToDraftInDolibarr=Comanda %s revenită la starea de schiţă ProposalSentByEMail=Propunerea comercială %s a fost trimisă prin e-mail ContractSentByEMail=Contractul %s a fost trimis prin e-mail OrderSentByEMail=Comanda vânzări %s a fost trimisă prin e-mail InvoiceSentByEMail=Factura clientului %s a fost trimisă prin e-mail SupplierOrderSentByEMail=Comanda de aprovizionare %s a fost trimisă prin e-mail -ORDER_SUPPLIER_DELETEInDolibarr=Purchase order %s deleted +ORDER_SUPPLIER_DELETEInDolibarr=Comanda de achiziţie%s ştearsă SupplierInvoiceSentByEMail=Factura furnizorului%s a fost trimisă prin e-mail ShippingSentByEMail=Expedierea %s trimisă prin e-mail -ShippingValidated= Livrarea %s validata +ShippingValidated= Livrarea %s validată InterventionSentByEMail=Intervenția %s trimisă prin e-mail ProposalDeleted=Ofertă ştearsă OrderDeleted=Comandă ştearsă InvoiceDeleted=Factură ştearsă -DraftInvoiceDeleted=Draft invoice deleted +DraftInvoiceDeleted=Factura schiţă a fost ştearsă +CONTACT_CREATEInDolibarr=Contactul %s a fost creat +CONTACT_DELETEInDolibarr=Contactul %s a fost şters PRODUCT_CREATEInDolibarr=Produs%s creat PRODUCT_MODIFYInDolibarr=Produs %s modificat -PRODUCT_DELETEInDolibarr=Produs %s sters -HOLIDAY_CREATEInDolibarr=Request for leave %s created -HOLIDAY_MODIFYInDolibarr=Request for leave %s modified -HOLIDAY_APPROVEInDolibarr=Request for leave %s approved -HOLIDAY_VALIDATEInDolibarr=Request for leave %s validated -HOLIDAY_DELETEInDolibarr=Request for leave %s deleted +PRODUCT_DELETEInDolibarr=Produs %s şters +HOLIDAY_CREATEInDolibarr=Cererea de concediu %screată +HOLIDAY_MODIFYInDolibarr=Cererea de concediu %smodificată +HOLIDAY_APPROVEInDolibarr=Cererea de concediu %saprobată +HOLIDAY_VALIDATEInDolibarr=Cererea de concediu %s validată +HOLIDAY_DELETEInDolibarr=Cererea de concediu %sştearsă EXPENSE_REPORT_CREATEInDolibarr=Raport cheltuieli %s creat EXPENSE_REPORT_VALIDATEInDolibarr=Raport cheltuieli %s validat EXPENSE_REPORT_APPROVEInDolibarr=Raport cheltuieli %s aprobat -EXPENSE_REPORT_DELETEInDolibarr=Raport cheltuieli %ssters +EXPENSE_REPORT_DELETEInDolibarr=Raport cheltuieli %s şters EXPENSE_REPORT_REFUSEDInDolibarr=Raport cheltuieli %s refuzat PROJECT_CREATEInDolibarr=Proiect %s creat PROJECT_MODIFYInDolibarr=Proiect %s modificat -PROJECT_DELETEInDolibarr=Proiect %s sters -TICKET_CREATEInDolibarr=Tichetul%s a fost creat +PROJECT_DELETEInDolibarr=Proiect %s şters +TICKET_CREATEInDolibarr=Tichetul %s a fost creat TICKET_MODIFYInDolibarr=Tichetul %s a fost modificat -TICKET_ASSIGNEDInDolibarr=Ticket %s assigned -TICKET_CLOSEInDolibarr=Ticket %s closed +TICKET_ASSIGNEDInDolibarr=Tichetul %s a fost atribuit +TICKET_CLOSEInDolibarr=Tichetul%s a fost închis TICKET_DELETEInDolibarr=Tichetul %s a fost șters -BOM_VALIDATEInDolibarr=BOM validated -BOM_UNVALIDATEInDolibarr=BOM unvalidated -BOM_CLOSEInDolibarr=BOM disabled -BOM_REOPENInDolibarr=BOM reopen -BOM_DELETEInDolibarr=BOM deleted -MRP_MO_VALIDATEInDolibarr=MO validated -MRP_MO_UNVALIDATEInDolibarr=MO set to draft status -MRP_MO_PRODUCEDInDolibarr=MO produced -MRP_MO_DELETEInDolibarr=MO deleted -MRP_MO_CANCELInDolibarr=MO canceled +BOM_VALIDATEInDolibarr=Bon de consum validat +BOM_UNVALIDATEInDolibarr=Bon de consum invalidat +BOM_CLOSEInDolibarr=Bon de consum dezactivat +BOM_REOPENInDolibarr=Bon de consum redeschis +BOM_DELETEInDolibarr=Bon de consum şters +MRP_MO_VALIDATEInDolibarr=Comanda de fabricaţie validată +MRP_MO_UNVALIDATEInDolibarr=Comanda de fabricaţie setată la schiţă +MRP_MO_PRODUCEDInDolibarr=Comanda de fabricaţie executată +MRP_MO_DELETEInDolibarr=Comanda de fabricaţie ştearsă +MRP_MO_CANCELInDolibarr=Comanda de fabricaţie anulată ##### End agenda events ##### AgendaModelModule=Șabloane de documente pentru eveniment DateActionStart=Data începerii @@ -127,12 +129,12 @@ AgendaUrlOptionsNotAdmin=logina=!%s ​​pentru a limita exportul de ac AgendaUrlOptions4=logint=%s ​​pentru a limita exportul de acțiuni atribuite utilizatorului %s( proprietari sau altii). AgendaUrlOptionsProject= project = __ PROJECT_ID __ pentru a restricționa ieșirea la acțiunile legate de proiectul __ PROJECT_ID __ . AgendaUrlOptionsNotAutoEvent= notactiontype = systemauto pentru a exclude evenimentele automate. -AgendaUrlOptionsIncludeHolidays=includeholidays=1 to include events of holidays. +AgendaUrlOptionsIncludeHolidays=includeholidays=1 pentru a include evenimentele din zilele libere. AgendaShowBirthdayEvents=Afişează ziua de naştere a contactelor AgendaHideBirthdayEvents=Ascunde ziua de naştere a contactelor Busy=Ocupat -ExportDataset_event1=Lista Ev. din agenda -DefaultWorkingDays=Rangul zilelor lucrătoare predefinite in săptămână (Examplu:1-5, 1-6) +ExportDataset_event1=Lista ev. din agendă +DefaultWorkingDays=Rangul zilelor lucrătoare predefinite in săptămână (Exemplu:1-5, 1-6) DefaultWorkingHours=Orele lucrătoare predefinite ale zilei (Examplu: 9-18) # External Sites ical ExportCal=Export calendar @@ -140,13 +142,13 @@ ExtSites=Import calendare externe ExtSitesEnableThisTool=Afișați calendarele externe (definite în configurația globală) din Agendă. Nu afectează calendarele externe definite de utilizatori. ExtSitesNbOfAgenda=Număr calendare AgendaExtNb=Calendar nr. %s -ExtSiteUrlAgenda=URL-ul pentru a accesa fişierul . ical +ExtSiteUrlAgenda=URL-ul pentru a accesa fişierul . ical ExtSiteNoLabel=Nicio descriere VisibleTimeRange=Interval de timp vizibil VisibleDaysRange=Interval zile vizibil AddEvent=Creare eveniment MyAvailability=Disponibilitatea mea -ActionType=Tip Eveniment +ActionType=Tip eveniment DateActionBegin=Dată începere eveniment ConfirmCloneEvent=Sigur doriți să clonați evenimentul %s? RepeatEvent=Repeta eveniment @@ -155,6 +157,12 @@ EveryMonth=Fiecare lună DayOfMonth=Zi a lunii DayOfWeek=Zi a saptamanii DateStartPlusOne=Dată început + 1 ora -SetAllEventsToTodo=Set all events to todo -SetAllEventsToInProgress=Set all events to in progress -SetAllEventsToFinished=Set all events to finished +SetAllEventsToTodo=Setează toate evenimentele la De făcut +SetAllEventsToInProgress=Setează toate evenimentele la În desfăşurare +SetAllEventsToFinished=Setează toate evenimentele la Finalizat +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ro_RO/banks.lang b/htdocs/langs/ro_RO/banks.lang index d9a7ca0584a..fc8de4eca78 100644 --- a/htdocs/langs/ro_RO/banks.lang +++ b/htdocs/langs/ro_RO/banks.lang @@ -37,9 +37,9 @@ IbanValid=BAN valabil IbanNotValid=BAN invalid StandingOrders=Comenzi debit direct StandingOrder=Ordin de plată direct -PaymentByDirectDebit=Payment by direct debit -PaymentByBankTransfers=Payments by credit transfer -PaymentByBankTransfer=Payment by credit transfer +PaymentByDirectDebit=Plată prin direct debit +PaymentByBankTransfers=Plăţi prin transfer de credit +PaymentByBankTransfer=Plată prin transfer credit AccountStatement=Extras Cont AccountStatementShort=Extras AccountStatements=Extrase Cont @@ -76,7 +76,7 @@ BankTransaction=Intrare bancară ListTransactions=Lista înregistrări ListTransactionsByCategory=Lista înregistrări/categorii TransactionsToConciliate=Intrări pentru reconciliere -TransactionsToConciliateShort=To reconcile +TransactionsToConciliateShort=De compensat Conciliable=Decontabil Conciliate=Deconteaza Conciliation=Conciliere @@ -98,7 +98,7 @@ AddBankRecordLong=Adăugați intrarea manual Conciliated=Reconciliat ConciliatedBy=Decontat de DateConciliating=Data Decontare -BankLineConciliated=Entry reconciled with bank receipt +BankLineConciliated=Intrare compensată cu extras bancar Reconciled=Reconciliat NotReconciled=Nu este conciliat CustomerInvoicePayment=Plată Client @@ -106,8 +106,8 @@ SupplierInvoicePayment=Plata furnizorului SubscriptionPayment=Plată cotizaţie WithdrawalPayment=Ordin de plată de debit SocialContributionPayment=Plata taxe sociale sau fiscale și tva -BankTransfer=Credit transfer -BankTransfers=Credit transfers +BankTransfer=Transfer credit +BankTransfers=Transferuri credit MenuBankInternalTransfer=Transfer intern TransferDesc=La un transfer de la un cont la altul, Dolibarr va scrie două înregistrări (un debit în contul sursă și un credit în contul țintă). Aceeași sumă (cu excepția semnului), eticheta și data va fi utilizată pentru această tranzacție) TransferFrom=De la @@ -157,22 +157,22 @@ RejectCheck=Cec returnat ConfirmRejectCheck=Sigur doriți să marcați acest cec ca respins? RejectCheckDate=data cecului ce a fost returnat CheckRejected=Cec returnat -CheckRejectedAndInvoicesReopened=Check returned and invoices re-open +CheckRejectedAndInvoicesReopened=Verificare facturi storno şi facturi re-deschise BankAccountModelModule=Șabloane de documente pentru conturi bancare DocumentModelSepaMandate=Modelul mandatului SEPA. Utile pentru țările europene numai în CEE. DocumentModelBan=Șablon pentru a imprima o pagină cu informații despre BAN. -NewVariousPayment=New miscellaneous payment -VariousPayment=Miscellaneous payment +NewVariousPayment=Plată diversă nouă +VariousPayment=Plată diversă VariousPayments=Diverse plăţi -ShowVariousPayment=Show miscellaneous payment -AddVariousPayment=Add miscellaneous payment +ShowVariousPayment=Afişare plăţi diverse +AddVariousPayment=Adaugă plată diversă SEPAMandate=Mandat SEPA YourSEPAMandate=Mandatul dvs. SEPA FindYourSEPAMandate=Acesta este mandatul dvs. SEPA pentru a autoriza compania noastră să efectueze un ordin de debitare directă către banca dvs. Reveniți semnat (scanarea documentului semnat) sau trimiteți-l prin poștă la AutoReportLastAccountStatement=Completați automat câmpul "numărul extrasului de cont" cu ultimul număr al declarației atunci când efectuați reconcilierea CashControl= Limită de numerar POS NewCashFence= Limită nouă de numerar -BankColorizeMovement=Colorize movements -BankColorizeMovementDesc=If this function is enable, you can choose specific background color for debit or credit movements -BankColorizeMovementName1=Background color for debit movement -BankColorizeMovementName2=Background color for credit movement +BankColorizeMovement=Colorează tranzacţiile +BankColorizeMovementDesc=Dacă această funcţie este activată, poţi alege o culoare de fundal personalizată pentru tranzacţiile de debit sau de credit +BankColorizeMovementName1=Culoarea de fundal pentru tranzacţiile de debit +BankColorizeMovementName2=Culoarea de fundal pentru tranzacţiile de credit diff --git a/htdocs/langs/ro_RO/bills.lang b/htdocs/langs/ro_RO/bills.lang index 64d877f3d13..8229964e9d0 100644 --- a/htdocs/langs/ro_RO/bills.lang +++ b/htdocs/langs/ro_RO/bills.lang @@ -11,7 +11,7 @@ BillsSuppliersUnpaidForCompany=Facturi furnizor neplătite pentru %s BillsLate=Plăţi întârziate BillsStatistics=Statistici Facturi Clienţi BillsStatisticsSuppliers=Statistici facturi furnizor -DisabledBecauseDispatchedInBookkeeping=Dezactivat deoarece factura a fost expediată în evidența contabilă +DisabledBecauseDispatchedInBookkeeping=Dezactivat deoarece factura a fost expediată în contabilitate DisabledBecauseNotLastInvoice=Dezactivat deoarece factura nu poate fi ștearsă. Unele facturi au fost înregistrate după aceasta și vor crea lipsuri în incrementare. DisabledBecauseNotErasable=Dezactivat pentru ca nu poate fi sters InvoiceStandard=Factură Standard @@ -25,7 +25,7 @@ InvoiceProFormaAsk=Factură Proformă InvoiceProFormaDesc=Factura Proformă este o imagine a adevăratei facturi, dar nu are nici o valoare contabilă. InvoiceReplacement=Factură de Înlocuire InvoiceReplacementAsk=Factură de Înlocuire a altei facturi -InvoiceReplacementDesc=Replacement invoice is used to completely replace an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. +InvoiceReplacementDesc=Factura de înlocuire este folosită pentru a înlocui o factură care nu a fost achitată.

    Notă: Se pot înlocui numai facturile neachitate. Dacă factura pe care o înlocuiți nu este încă închisă, aceasta va fi închisă automat la "Abandonată". InvoiceAvoir=Nota de credit InvoiceAvoirAsk=Nota de credit pentru a corecta factura InvoiceAvoirDesc= Nota de credit este o factură negativă utilizată pentru a corecta faptul că o factură arată o sumă care diferă de suma plătită efectiv (de exemplu, clientul a plătit prea mult din greșeală sau nu va plăti suma completă din momentul returnării unor produse). @@ -53,23 +53,23 @@ InvoiceLine=Linie Factură InvoiceCustomer=Factură Client CustomerInvoice=Factură Client CustomersInvoices=Facturi Clienţi -SupplierInvoice=Factura furnizorului +SupplierInvoice=Factura furnizor SuppliersInvoices=Facturi Furnizori -SupplierBill=Factura furnizorului +SupplierBill=Factura furnizor SupplierBills=Facturi Furnizori Payment=Plată PaymentBack=Rambursare CustomerInvoicePaymentBack=Rambursare Payments=Plăţi -PaymentsBack=Refunds +PaymentsBack=Rambursări paymentInInvoiceCurrency=in moneda facturii PaidBack=Restituit DeletePayment=Ştergere plată ConfirmDeletePayment=Sunteţi sigur că doriţi să ştergeţi această plată? -ConfirmConvertToReduc=Do you want to convert this %s into an available credit? -ConfirmConvertToReduc2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this customer. -ConfirmConvertToReducSupplier=Do you want to convert this %s into an available credit? -ConfirmConvertToReducSupplier2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this vendor. +ConfirmConvertToReduc=Vrei să converteşti această %s într-un credit disponibil? +ConfirmConvertToReduc2=Suma care va fi economisită cumulând toate reducerile poate fi utilizată ca reducere pentru o factură curentă sau viitoare pentru acest client. +ConfirmConvertToReducSupplier=Vrei să converteşti această %s într-un credit disponibil? +ConfirmConvertToReducSupplier2=Suma care va fi economisită cumulând toate reducerile și care poate fi folosită ca reducere pentru o factură curentă sau viitoare pentru acest furnizor. SupplierPayments=Plățile furnizorului ReceivedPayments=Încasări primite ReceivedCustomersPayments=Încasări Clienţi @@ -78,7 +78,7 @@ ReceivedCustomersPaymentsToValid=Încasări Clienţi de validat PaymentsReportsForYear=Rapoarte Plăţi pentru %s PaymentsReports=Rapoarte Plăţi PaymentsAlreadyDone=Plăţi deja efectuate -PaymentsBackAlreadyDone=Refunds already done +PaymentsBackAlreadyDone=Rambursări efectuate deja PaymentRule=Mod de Plată PaymentMode=Tipul plăţii PaymentTypeDC=Card de debit/de credit @@ -151,7 +151,7 @@ ErrorBillNotFound=Factura %s nu există ErrorInvoiceAlreadyReplaced=Eroare, ați încercat să validați o factură pentru a înlocui factura %s. Dar aceasta a fost deja înlocuită de factură %s. ErrorDiscountAlreadyUsed=Eroare, reducerea a fost deja utilizată ErrorInvoiceAvoirMustBeNegative=Eroare, factura de corecţie trebuie să aibă o valoare negativă -ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) +ErrorInvoiceOfThisTypeMustBePositive=Eroare, acets tip de factură trebuie să aibă valori pozitive(sau nule) fară TVA ErrorCantCancelIfReplacementInvoiceNotValidated=Eroare, nu se poate anula o factură care a fost înlocuită cu o altă factură, şi care este încă schiţă ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Această parte sau alta estedeja utilizată, astfel încât seria de reduceri nu poate fi eliminată. BillFrom=De la @@ -163,19 +163,19 @@ FoundXQualifiedRecurringInvoiceTemplate=Au fost găsite %s modele de facturi rec NotARecurringInvoiceTemplate=Nu este un model de factură recurentă. NewBill=Factură nouă LastBills=Ultimele%s facturi -LatestTemplateInvoices=Ultimele%s șabloane ale facturilor -LatestCustomerTemplateInvoices=Ultimele%s șabloane ale facturilor clientilor -LatestSupplierTemplateInvoices=Ultimele%s șabloane ale facturilor furnizorilor -LastCustomersBills=Ultimele%s facturi ale clientilor -LastSuppliersBills=Ultimele%s facturi ale furnizorilor +LatestTemplateInvoices=Ultimele%s șabloane factură +LatestCustomerTemplateInvoices=Ultimele%s șabloane factură client +LatestSupplierTemplateInvoices=Ultimele%s șabloane factură furnizor +LastCustomersBills=Ultimele%s facturi client +LastSuppliersBills=Ultimele%s facturi furnizor AllBills=Toate facturile AllCustomerTemplateInvoices=Toate șabloanele facturilor OtherBills=Alte facturi DraftBills=Facturi schiţă -CustomersDraftInvoices=Proiectarea facturilor clientului -SuppliersDraftInvoices=Proiectarea facturilor furnizorului +CustomersDraftInvoices=Facturi client schiţă +SuppliersDraftInvoices=Facturi furnizor schiţă Unpaid=Neachitate -ErrorNoPaymentDefined=Error No payment defined +ErrorNoPaymentDefined=Eroare Nu este definită plata ConfirmDeleteBill=Sunteţi sigur că doriţi să ştergeţi această factură? ConfirmValidateBill=Sigur doriţi să validaţi această factură cu referinţa%s? ConfirmUnvalidateBill=Sigur doriţi să schimbaţi factura %sla statusul de schiţă ? @@ -209,23 +209,23 @@ NumberOfBillsByMonth=Nr. de facturi pe lună AmountOfBills=Valoare facturi AmountOfBillsHT=Suma facturilor (fără impozit) AmountOfBillsByMonthHT=Valoarea facturilor pe luni (fără tva) -UseSituationInvoices=Allow situation invoice -UseSituationInvoicesCreditNote=Allow situation invoice credit note -Retainedwarranty=Retained warranty -AllowedInvoiceForRetainedWarranty=Retained warranty usable on the following types of invoices -RetainedwarrantyDefaultPercent=Retained warranty default percent -RetainedwarrantyOnlyForSituation=Make "retained warranty" available only for situation invoices -RetainedwarrantyOnlyForSituationFinal=On situation invoices the global "retained warranty" deduction is applied only on the final situation -ToPayOn=To pay on %s -toPayOn=to pay on %s -RetainedWarranty=Retained Warranty -PaymentConditionsShortRetainedWarranty=Retained warranty payment terms -DefaultPaymentConditionsRetainedWarranty=Default retained warranty payment terms -setPaymentConditionsShortRetainedWarranty=Set retained warranty payment terms -setretainedwarranty=Set retained warranty -setretainedwarrantyDateLimit=Set retained warranty date limit -RetainedWarrantyDateLimit=Retained warranty date limit -RetainedWarrantyNeed100Percent=The situation invoice need to be at 100%% progress to be displayed on PDF +UseSituationInvoices=Permite utilizare factură centralizatoare +UseSituationInvoicesCreditNote=Permite utilizare factură centralizatoare +Retainedwarranty=Garanţie reţinută +AllowedInvoiceForRetainedWarranty=Garanţia reţinută poate fi utilizată pentru urmatoarele tipuri de facturi +RetainedwarrantyDefaultPercent=Procent implicit pentru garanţia reţinută +RetainedwarrantyOnlyForSituation=Faceţi disponibilă "garanția reținută" numai pentru facturile centralizatoare +RetainedwarrantyOnlyForSituationFinal=La facturile centralizatoare, deducerea globală "garanție reținută" se aplică numai în situația finală +ToPayOn=De plătit la %s +toPayOn=de plătit la %s +RetainedWarranty=Garanţie reţinută +PaymentConditionsShortRetainedWarranty=Termeni de plată pentru garanţia reţinută +DefaultPaymentConditionsRetainedWarranty=Termeni de plată impliciţi pentru garanţia reţinută +setPaymentConditionsShortRetainedWarranty=Setare termeni de plată pentru garanţia reţinută +setretainedwarranty=Setare garanţie reţinută +setretainedwarrantyDateLimit=Setare dată limită garanţie reţinută +RetainedWarrantyDateLimit=Dată limită garanţie reţinută +RetainedWarrantyNeed100Percent=Factura centralizatoare trebuie să fie 100 %%finalizată pentru a fi afişată în PDF AlreadyPaid=Deja platite AlreadyPaidBack=Deja rambursată AlreadyPaidNoCreditNotesNoDeposits=Plătit deja (fără note de credit și plăți în avans) @@ -289,8 +289,8 @@ AddGlobalDiscount=Crează discount absolut EditGlobalDiscounts=Editează discounturile absolute AddCreditNote=Creză Note de credit ShowDiscount=Afişează discountul -ShowReduc=Show the discount -ShowSourceInvoice=Show the source invoice +ShowReduc=Afişează discount-ul +ShowSourceInvoice=Afişare factura sursă RelativeDiscount=Discount relativ GlobalDiscount=Discount Global CreditNote=Nota de credit @@ -327,9 +327,9 @@ InvoiceDateCreation=Data crearea factură InvoiceStatus=Status Factură InvoiceNote=Notă Factură InvoicePaid=Facturiă plătită -InvoicePaidCompletely=Paid completely -InvoicePaidCompletelyHelp=Invoice that are paid completely. This excludes invoices that are paid partially. To get list of all 'Closed' or non 'Closed' invoices, prefer to use a filter on the invoice status. -OrderBilled=Comanda facturată +InvoicePaidCompletely=Plătit integral +InvoicePaidCompletelyHelp=Facturi care sunt achitate integral. Aceasta exclude facturile achitate parțial. Pentru a obține lista tuturor facturilor „Închis” sau „Deschis”, utilizați un filtru pe starea facturii. +OrderBilled=Comandă facturată DonationPaid=Donația a fost plătită PaymentNumber=Număr plata RemoveDiscount=Înlăturaţi discountul @@ -379,11 +379,11 @@ InvoiceAutoValidate=Validare automată facturi GeneratedFromRecurringInvoice=Generate din model factura recurentă %s DateIsNotEnough=Incă nu este data setată InvoiceGeneratedFromTemplate=Factură %s generată din model factură recurentă %s -GeneratedFromTemplate=Generated from template invoice %s +GeneratedFromTemplate=Generată din şablonul de factură %s WarningInvoiceDateInFuture=Avertisment, data facturii este mai mare decât data curentă WarningInvoiceDateTooFarInFuture=Avertisment, data facturii este prea departe de data curentă ViewAvailableGlobalDiscounts=Vedeți reducerile disponibile -GroupPaymentsByModOnReports=Group payments by mode on reports +GroupPaymentsByModOnReports=Grupare plăţi după tip în rapoarte # PaymentConditions Statut=Status PaymentConditionShortRECEP=Scadentă la primire @@ -410,10 +410,10 @@ PaymentConditionShort14D=14 zile PaymentCondition14D=14 zile PaymentConditionShort14DENDMONTH=14 zile de la sfârșitul lunii PaymentCondition14DENDMONTH=În termen de 14 zile de la sfârșitul lunii -FixAmount=Fixed amount - 1 line with label '%s' +FixAmount=Sumă fixă - 1 linie cu eticheta '%s' VarAmount=Valoare variabilă (%% tot.) VarAmountOneLine=Cantitate variabilă (%% tot.) - 1 rând cu eticheta "%s" -VarAmountAllLines=Variable amount (%% tot.) - all same lines +VarAmountAllLines=Sumă variabilă (%% tot.) - aceiaşi pe toate liniile # PaymentType PaymentTypeVIR=Transfer bancar PaymentTypeShortVIR=Transfer bancar @@ -441,8 +441,8 @@ BankAccountNumberKey=checksum Residence=Adresă IBANNumber=Numărul contului IBAN IBAN=IBAN -CustomerIBAN=IBAN of customer -SupplierIBAN=IBAN of vendor +CustomerIBAN=IBAN client +SupplierIBAN=IBAN furnizor BIC=BIC / SWIFT BICNumber=cod BIC/SWIFT ExtraInfos=Informaţii suplimentare @@ -497,27 +497,27 @@ CantRemovePaymentWithOneInvoicePaid=Nu se poate elimina plata deoarece există c ExpectedToPay=Plată prevăzută CantRemoveConciliatedPayment=Nu se poate elimina plata reconciliată PayedByThisPayment=Achitat cu aceasta plată -ClosePaidInvoicesAutomatically=Classify automatically all standard, down payment or replacement invoices as "Paid" when payment is done entirely. -ClosePaidCreditNotesAutomatically=Classify automatically all credit notes as "Paid" when refund is done entirely. -ClosePaidContributionsAutomatically=Classify automatically all social or fiscal contributions as "Paid" when payment is done entirely. +ClosePaidInvoicesAutomatically=Clasificați automat toate facturile standard, de plată sau de înlocuire drept "Plătite" atunci când plata se face în întregime +ClosePaidCreditNotesAutomatically=Clasificați automat toate notele de credit drept "Plătite" atunci când rambursarea se face în întregime. +ClosePaidContributionsAutomatically=Clasificați automat toate contribuțiile sociale sau fiscale drept "Plătite" atunci când plata se face în întregime. AllCompletelyPayedInvoiceWillBeClosed=Toate facturile fără niciun avertisment de plată vor fi închise automat cu starea "Plătit". ToMakePayment=Plăteşte ToMakePaymentBack=Rambursează ListOfYourUnpaidInvoices=Lista facturilor neplătite NoteListOfYourUnpaidInvoices=Notă: Această listă conține numai facturile pentru partenerii la care sunteţi reprezentant de vânzării. -RevenueStamp=Tax stamp +RevenueStamp=Taxă fiscală YouMustCreateInvoiceFromThird=Această opțiune este disponibilă numai când creați o factură din fila "Client" al unui terț YouMustCreateInvoiceFromSupplierThird=Această opțiune este disponibilă numai când creați o factură din fila "Furnizor" al unui terț YouMustCreateStandardInvoiceFirstDesc=Intai se poate crea o factură standard si se transforma in model pentru a avea un nou model de factura. -PDFCrabeDescription=Invoice PDF template Crabe. A complete invoice template (old implementation of Sponge template) +PDFCrabeDescription= Şablon PDF de factură Crabe. Un șablon de factură complet (vechea implementare a șablonului Sponge) PDFSpongeDescription=Factura PDF șablon Burete. Un șablon complet de factură PDFCrevetteDescription=Model factură PDF Crevette. Un model complet pentru factura de situaţie TerreNumRefModelDesc1=Returnează numărul sub forma %syymm-nnnn pentru facturile standard și %syymm-nnnn pentru notele de credit unde yy este anul, mm este luna și nnnn este o secvenţă fără nici o pauză și fără revenire la 0 MarsNumRefModelDesc1=Returnați numărul cu formatul %syymm-nnnn pentru facturile standard, %syymm-nnnn pentru facturile de înlocuire, %syymm-nnnn pentru facturile de plată în avans și %syymm-nnnn pentru notele de credit unde yy este anul, mm este luna și nnnn este o secvență fără nicio pauză și nu reveniți la 0 TerreNumRefModelError=O factură începând cu $syymm există deja și nu este compatibilă cu acest model de numerotaţie. Ştergeţi sau redenumiți pentru a activa acest modul. CactusNumRefModelDesc1=Returnați numărul cu formatul %syymm-nnnn pentru facturile standard, %syymm-nnnn pentru notele de credit și %syymm-nnnn pentru facturile de plată în care yy este anul, mm este luna și nnnn este o secvență fără pauză și nici o întoarcere la 0 -EarlyClosingReason=Early closing reason -EarlyClosingComment=Early closing note +EarlyClosingReason= Motiv de închidere timpurie +EarlyClosingComment=Notă de închidere timpurie ##### Types de contacts ##### TypeContact_facture_internal_SALESREPFOLL=Responsabil urmarire factură client TypeContact_facture_external_BILLING=Contact facturare client @@ -571,7 +571,7 @@ AutoFillDateTo=Setați data de încheiere pentru linia de servicii cu data urmă AutoFillDateToShort=Setați data de încheiere MaxNumberOfGenerationReached=Numărul maxim de gen. atins BILL_DELETEInDolibarr=Factură ştearsă -BILL_SUPPLIER_DELETEInDolibarr=Supplier invoice deleted -UnitPriceXQtyLessDiscount=Unit price x Qty - Discount -CustomersInvoicesArea=Customer billing area -SupplierInvoicesArea=Supplier billing area +BILL_SUPPLIER_DELETEInDolibarr=Factură furnizor ştearsă +UnitPriceXQtyLessDiscount=Preţ unitar x Cantitate - Discount +CustomersInvoicesArea=Facturare clienţi +SupplierInvoicesArea=Facturare furnizori diff --git a/htdocs/langs/ro_RO/blockedlog.lang b/htdocs/langs/ro_RO/blockedlog.lang index 854459a81da..fb1ab84c5eb 100644 --- a/htdocs/langs/ro_RO/blockedlog.lang +++ b/htdocs/langs/ro_RO/blockedlog.lang @@ -8,15 +8,15 @@ BrowseBlockedLog=Înregistrări nemodificate ShowAllFingerPrintsMightBeTooLong=Arată toate jurnalele arhivate (ar putea fi lungi) ShowAllFingerPrintsErrorsMightBeTooLong=Arată toate jurnalele de arhivă nevalide (ar putea fi lungi) DownloadBlockChain=Descărcați amprentele digitale -KoCheckFingerprintValidity=Archived log entry is not valid. It means someone (a hacker?) has modified some data of this record after it was recorded, or has erased the previous archived record (check that line with previous # exists). +KoCheckFingerprintValidity=Înregistrarea din jurnalul arhivat nu este validă. Înseamnă că cineva (un hacker?) A modificat unele date din această înregistrare după ce a fost înregistrată sau a șters înregistrarea anterioară arhivată (verificați că această linie cu # anterior există). OkCheckFingerprintValidity=Intrarea în jurnal arhivată este validă. Datele de pe această linie nu au fost modificate şi intrarea urmează cele precedente. OkCheckFingerprintValidityButChainIsKo=Jurnalul arhivat pare valabil în comparație cu cel precedent, dar lanțul a fost corupt anterior. AddedByAuthority=Stocată în autoritate la distanţă NotAddedByAuthorityYet=Nu este încă stocată în autoritate la distanță ShowDetails=Afișați detaliile stocate -logPAYMENT_VARIOUS_CREATE=Payment (not assigned to an invoice) created -logPAYMENT_VARIOUS_MODIFY=Payment (not assigned to an invoice) modified -logPAYMENT_VARIOUS_DELETE=Payment (not assigned to an invoice) logical deletion +logPAYMENT_VARIOUS_CREATE=Plată (ne-asignată unei facturi) creată +logPAYMENT_VARIOUS_MODIFY=Plată ( ne-asignată unei facturi) modificată +logPAYMENT_VARIOUS_DELETE=Ştergere logică plată (ne-asignată unei facturi) logPAYMENT_ADD_TO_BANK=Plată adăugată la bancă logPAYMENT_CUSTOMER_CREATE=Plata clientului a fost creată logPAYMENT_CUSTOMER_DELETE=Ștergerea logică a plăţii clientului diff --git a/htdocs/langs/ro_RO/boxes.lang b/htdocs/langs/ro_RO/boxes.lang index 74d22e55b2c..c258d9aee69 100644 --- a/htdocs/langs/ro_RO/boxes.lang +++ b/htdocs/langs/ro_RO/boxes.lang @@ -19,7 +19,7 @@ BoxLastContacts=Ultimele contacte/ adrese BoxLastMembers=Ultimii membri BoxFicheInter=Ultimele intervenţii BoxCurrentAccounts=Sold conturi deschise -BoxTitleMemberNextBirthdays=Birthdays of this month (members) +BoxTitleMemberNextBirthdays=Aniversări în acreastă lună (membri) BoxTitleLastRssInfos=Ultimele %s noutăţi de la %s BoxTitleLastProducts=Produse / Servicii: ultima %s modificată BoxTitleProductsAlertStock=Produse: avertizare stoc @@ -27,25 +27,25 @@ BoxTitleLastSuppliers=Ultimii %s furnizori înregistraţi BoxTitleLastModifiedSuppliers=Furnizori: ultima %s modificată BoxTitleLastModifiedCustomers=Clienții: ultima %s modificată BoxTitleLastCustomersOrProspects=Ultimii %s clienti sau prospecţi -BoxTitleLastCustomerBills=Ultimele %s facturi ale clientului -BoxTitleLastSupplierBills=Ultimele %s facturi ale furnizorilor -BoxTitleLastModifiedProspects=Perspective: ultima %s modificată +BoxTitleLastCustomerBills=Ultimile %s facturi client modificate +BoxTitleLastSupplierBills=Ultimile %s facturi furnizor modificate +BoxTitleLastModifiedProspects=Prospecţi: ultimii %s modificaţi BoxTitleLastModifiedMembers=Ultimii %s membri BoxTitleLastFicheInter=Ultimele %s intervenţii modificate BoxTitleOldestUnpaidCustomerBills=Facturile cel mai vechi ale clientului: %s neplătite BoxTitleOldestUnpaidSupplierBills=Facturie cele mai vechi ale furnizorilor: %s neplătite BoxTitleCurrentAccounts=Conturi deschise: balanțe -BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception +BoxTitleSupplierOrdersAwaitingReception=Comenzi de achiziţie în aşteptare BoxTitleLastModifiedContacts=Contacte / Adrese: ultima %s modificată -BoxMyLastBookmarks=Bookmarks: latest %s +BoxMyLastBookmarks=Bookmark-uri : ultimile %s BoxOldestExpiredServices=Cele mai vechi servicii active expirate BoxLastExpiredServices=Cele mai vechi %s contacte cu servicii active expirate BoxTitleLastActionsToDo=Ultimele %s acţiuni de realizat BoxTitleLastContracts=Ultimele contracte modificate %s BoxTitleLastModifiedDonations=Ultimele %s donaţii modificate BoxTitleLastModifiedExpenses=Ultimele %s deconturi modificare -BoxTitleLatestModifiedBoms=Latest %s modified BOMs -BoxTitleLatestModifiedMos=Latest %s modified Manufacturing Orders +BoxTitleLatestModifiedBoms=Ultimile %sbonuri de consum modificate +BoxTitleLatestModifiedMos=Ultimile %s comenzi de producţie modificate BoxGlobalActivity=Activitate globală ( facturi, oferte, comenzi) BoxGoodCustomers=Clienţi buni BoxTitleGoodCustomers=%s Clienţi buni @@ -68,7 +68,7 @@ NoContractedProducts=Niciun produs / serviciu contractat NoRecordedContracts=Niciun contract înregistrat NoRecordedInterventions=Nicio intervenție înregistrată BoxLatestSupplierOrders=Ultimele comenzi de cumpărături -BoxLatestSupplierOrdersAwaitingReception=Latest Purchase Orders (with a pending reception) +BoxLatestSupplierOrdersAwaitingReception=Ultimile comenzi de achiziţie (în aşteptarea recepţiei) NoSupplierOrder=Nu sunt înregistrate comenzi de cumpărături BoxCustomersInvoicesPerMonth=Facturi clienți pe lună BoxSuppliersInvoicesPerMonth=Facturi furnizori pe lună @@ -77,26 +77,30 @@ BoxSuppliersOrdersPerMonth=Comenzi furnizori pe lună BoxProposalsPerMonth=Oferte pe luni NoTooLowStockProducts=Niciun produs sub limita minimă de stoc BoxProductDistribution= Distribuție de produse/servicii -ForObject=On %s +ForObject=Pe %s BoxTitleLastModifiedSupplierBills= Facturi furnizor: ultimul %s modificat BoxTitleLatestModifiedSupplierOrders=Comenzi furnizor: ultimul %s modificat BoxTitleLastModifiedCustomerBills=Facturi clienți: ultimul %s modificat BoxTitleLastModifiedCustomerOrders=Comenzi de vânzări: ultimul %s modificat BoxTitleLastModifiedPropals=Ultimele %s oferte modificate +BoxTitleLatestModifiedJobPositions=Ultimile %s joburi modificate +BoxTitleLatestModifiedCandidatures=Ultimile %scandidaturi modificate ForCustomersInvoices=Facturi clienţi ForCustomersOrders=Comenzi clienți ForProposals=Oferte LastXMonthRolling=Rulaj ultimele %s luni ChooseBoxToAdd=Adăugați widget în tabloul dvs. de bord BoxAdded=Widget a fost adăugat în tabloul dvs. de bord -BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) -BoxLastManualEntries=Last manual entries in accountancy -BoxTitleLastManualEntries=%s latest manual entries -NoRecordedManualEntries=No manual entries record in accountancy -BoxSuspenseAccount=Count accountancy operation with suspense account -BoxTitleSuspenseAccount=Number of unallocated lines -NumberOfLinesInSuspenseAccount=Number of line in suspense account -SuspenseAccountNotDefined=Suspense account isn't defined -BoxLastCustomerShipments=Last customer shipments -BoxTitleLastCustomerShipments=Latest %s customer shipments -NoRecordedShipments=No recorded customer shipment +BoxTitleUserBirthdaysOfMonth=Aniversări în această lună (utilizatori) +BoxLastManualEntries=Ultimele înregistrări manuale în contabilitate +BoxTitleLastManualEntries=Ultimile %s înregistrări contabile manule +NoRecordedManualEntries=Nici o înregistrare manuală în contabilitate +BoxSuspenseAccount=Contorizează operaţiunea contabilă cu contul suspendat +BoxTitleSuspenseAccount=Număr linii nealocate +NumberOfLinesInSuspenseAccount=Număr linie în cont suspendat +SuspenseAccountNotDefined=Contul suspendat nu este definit +BoxLastCustomerShipments=Ultimile livrări către clienţi +BoxTitleLastCustomerShipments=Ultimile %s livrări către clienţi +NoRecordedShipments=Nici o livrare către clienţi +# Pages +AccountancyHome=Contabilitate diff --git a/htdocs/langs/ro_RO/cashdesk.lang b/htdocs/langs/ro_RO/cashdesk.lang index 4a5919ad2b4..a1d61daa35e 100644 --- a/htdocs/langs/ro_RO/cashdesk.lang +++ b/htdocs/langs/ro_RO/cashdesk.lang @@ -1,6 +1,6 @@ # Language file - Source file is en_US - cashdesk -CashDeskMenu=Punctul de vânzare -CashDesk=Punctul de vânzare +CashDeskMenu=Punct de vânzare +CashDesk=Punct de vânzare CashDeskBankCash=Cont bancar (cash) CashDeskBankCB=Cont bancar (card) CashDeskBankCheque=Cont bancar (cec) @@ -16,7 +16,7 @@ AddThisArticle=Adauga acest articol RestartSelling=Du-te inapoi la vânzare SellFinished=Vanzare completa PrintTicket=Print bon -SendTicket=Send ticket +SendTicket=Trimite tichet NoProductFound=Niciun articol gasit ProductFound=produs găsit NoArticle=Niciun articol @@ -49,71 +49,76 @@ Footer=Subsol AmountAtEndOfPeriod=Valoare la sfârșitul perioadei (zi, lună sau an) TheoricalAmount=Valoare teoretică RealAmount=Sumă reală -CashFence=Cash fence +CashFence=Limită cash CashFenceDone=Limita de bani realizată pentru perioada NbOfInvoices=Nr facturi -Paymentnumpad=Type of Pad to enter payment +Paymentnumpad=Tipul de pad utilizat pentru introducerea plăţii Numberspad=Suport de numere -BillsCoinsPad=Coins and banknotes Pad +BillsCoinsPad=Pad Monede şi bancnote DolistorePosCategory=Modulele TakePOS și alte soluții POS pentru Dolibarr TakeposNeedsCategories=TakePOS are nevoie de categorii de produse pentru a lucra OrderNotes=Note de comandă -CashDeskBankAccountFor=Default account to use for payments in -NoPaimementModesDefined=No paiment mode defined in TakePOS configuration -TicketVatGrouped=Group VAT by rate in tickets|receipts -AutoPrintTickets=Automatically print tickets|receipts -PrintCustomerOnReceipts=Print customer on tickets|receipts -EnableBarOrRestaurantFeatures=Enable features for Bar or Restaurant -ConfirmDeletionOfThisPOSSale=Do your confirm the deletion of this current sale ? -ConfirmDiscardOfThisPOSSale=Do you want to discard this current sale ? +CashDeskBankAccountFor=Cont implicit utilizat pentru plăți +NoPaimementModesDefined=Nici un mod de plată definit în configurația TakePOS +TicketVatGrouped=Grupează TVA după cotă pe tichete|bonuri +AutoPrintTickets=Tipăreşte automat tichete|bonuri +PrintCustomerOnReceipts=Tipăreşte clientul pe tichete|bonuri +EnableBarOrRestaurantFeatures=Activați funcțiile pentru Bar sau Restaurant +ConfirmDeletionOfThisPOSSale=Confirmă ștergerea acestei vânzări curente? +ConfirmDiscardOfThisPOSSale=Vrei să elimini această vânzare curentă? History=Istoric -ValidateAndClose=Validate and close +ValidateAndClose=Validați și închideți Terminal=Terminal -NumberOfTerminals=Number of Terminals -TerminalSelect=Select terminal you want to use: -POSTicket=POS Ticket -POSTerminal=POS Terminal -POSModule=POS Module -BasicPhoneLayout=Use basic layout for phones -SetupOfTerminalNotComplete=Setup of terminal %s is not complete -DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button -InvoiceIsAlreadyValidated=Invoice is already validated -NoLinesToBill=No lines to bill -CustomReceipt=Custom Receipt -ReceiptName=Receipt Name -ProductSupplements=Product Supplements -SupplementCategory=Supplement category -ColorTheme=Color theme -Colorful=Colorful -HeadBar=Head Bar -SortProductField=Field for sorting products +NumberOfTerminals=Număr terminale +TerminalSelect=Selectați terminalul pe care doriți să-l utilizați: +POSTicket=Tichet POS +POSTerminal=Terminal POS +POSModule=Modul POS +BasicPhoneLayout=Utilizați aspectul de bază pentru telefoane +SetupOfTerminalNotComplete=Configurarea terminalului %s nu este completă +DirectPayment=Plată directă +DirectPaymentButton=Adaugă un buton "Plată directă în numerar" +InvoiceIsAlreadyValidated=Factura este deja validată +NoLinesToBill=Nici o linie de facturat +CustomReceipt=Bon personalizat +ReceiptName=Denumire bon +ProductSupplements=Suplimente produs +SupplementCategory=Categorie suplimente +ColorTheme=Tema de culoare +Colorful=Colorat +HeadBar=Head bar +SortProductField=Câmp utilizat pentru sortarea produselor Browser=Browser -BrowserMethodDescription=Simple and easy receipt printing. Only a few parameters to configure the receipt. Print via browser. -TakeposConnectorMethodDescription=External module with extra features. Posibility to print from the cloud. -PrintMethod=Print method -ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. -ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad -CashDeskRefNumberingModules=Numbering module for POS sales -CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number -TakeposGroupSameProduct=Group same products lines -StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos -CloseCashFence=Close cash fence -CashReport=Cash report -MainPrinterToUse=Main printer to use -OrderPrinterToUse=Order printer to use -MainTemplateToUse=Main template to use -OrderTemplateToUse=Order template to use +BrowserMethodDescription=Tipărirea simplă și ușoară a chitanței. Doar câțiva parametri pentru a configura chitanța. Tipăriți prin browser. +TakeposConnectorMethodDescription=Modul extern cu funcții suplimentare. Posibilitatea de a imprima din cloud. +PrintMethod=Metoda de tipărire +ReceiptPrinterMethodDescription=Metodă eficientă cu o mulțime de parametri. Personalizabilă cu șabloane. Nu se poate imprima din cloud. +ByTerminal=După terminal +TakeposNumpadUsePaymentIcon=Utilizați pictograme în loc de text pe butoanele de plată de pe numpad +CashDeskRefNumberingModules=Modul de numerotare pentru vânzările POS +CashDeskGenericMaskCodes6 = Tag-ul
    {TN} este utilizat pentru adăugarea numărului de terminal +TakeposGroupSameProduct=Grupează liniile cu produse identice +StartAParallelSale=Iniţiază o vânzare paralelă +ControlCashOpening=Controlează sertarul de bani la deschiderea POS +CloseCashFence=Închidere plafon de numerar +CashReport=Raport numerar +MainPrinterToUse=Imprimantă principală de utilizat +OrderPrinterToUse=Imprimantă utilizată pentru comenzi +MainTemplateToUse=Şablon principal de utilizat +OrderTemplateToUse=Şablon comandă utilizat BarRestaurant=Bar Restaurant -AutoOrder=Order by the customer himself -RestaurantMenu=Menu -CustomerMenu=Customer menu -ScanToMenu=Scan QR code to see the menu -ScanToOrder=Scan QR code to order -Appearance=Appearance -HideCategoryImages=Hide Category Images -HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +AutoOrder=Comandă făcută de client +RestaurantMenu=Meniu +CustomerMenu=Meniu client +ScanToMenu=Scanează codul QR pentru a vedea meniul +ScanToOrder=Scanează codul QR pentru a comanda +Appearance=Aspect +HideCategoryImages=Ascunde imaginile de categorie +HideProductImages=Ascunde imaginile de produs +NumberOfLinesToShow= Numărul de linii de imagini de afișat +DefineTablePlan=Definire plan de mese +GiftReceiptButton=Adaugă un buton "Bon cadou" +GiftReceipt=Bon cadou +ModuleReceiptPrinterMustBeEnabled= \nModulul Imprimanta bonuri trebuie să fi fost activat mai întâi +AllowDelayedPayment= Permite plata cu întârziere +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ro_RO/categories.lang b/htdocs/langs/ro_RO/categories.lang index 1f4f06fac43..9f3fd179ccf 100644 --- a/htdocs/langs/ro_RO/categories.lang +++ b/htdocs/langs/ro_RO/categories.lang @@ -1,90 +1,90 @@ # Dolibarr language file - Source file is en_US - categories -Rubrique=Tag / Categorie -Rubriques=Tag-uri / Categorii -RubriquesTransactions=Etichete / Categorii de tranzacții -categories=tag-uri / categorii +Rubrique=Tag/Categorie +Rubriques=Tag-uri/Categorii +RubriquesTransactions=Tag-uri/Categorii de tranzacții +categories=tag-uri/categorii NoCategoryYet=Niciun tag/categorie de acest tip creată In=În AddIn=Adăugă în modify=modifică Classify=Clasează -CategoriesArea=Tag-uri / Categorii -ProductsCategoriesArea=Taguri/ Categorii Produse / Servicii -SuppliersCategoriesArea=Zona etichetelor/categoriilor furnizorilor -CustomersCategoriesArea=Tag-uri / categorii Clienții -MembersCategoriesArea=Tag-uri / categorii Membri -ContactsCategoriesArea=Tag-uri / Categorii Contacte -AccountsCategoriesArea=Tag-uri / Categorii Contabilitate -ProjectsCategoriesArea=Zona etichetelor / categoriilor de proiecte -UsersCategoriesArea=Zona etichetelor / categoriilor utilizatorilor +CategoriesArea=Tag-uri/Categorii +ProductsCategoriesArea=Taguri/Categorii Produse/Servicii +SuppliersCategoriesArea=Tag-uri/categorii furnizori +CustomersCategoriesArea=Tag-uri/categorii clienți +MembersCategoriesArea=Tag-uri/categorii membri +ContactsCategoriesArea=Tag-uri/categorii contacte +AccountsCategoriesArea=Tag-uri/categorii conturi contabile +ProjectsCategoriesArea=Tag-uri/categorii proiecte +UsersCategoriesArea=Tag-uri/categorii utilizatori SubCats=Subcategorii -CatList=Lista Tag-uri / Categorii -NewCategory=Tag / categorie noua -ModifCat=Modifica Tag / categoria -CatCreated=Tag / categorie creată -CreateCat=Creați tag / categorie -CreateThisCat=Creați acest tag/ categorie +CatList=Lista tag-uri/categorii +NewCategory=Tag/categorie nouă +ModifCat=Modifică tag/categorie +CatCreated=Tag/categorie creată +CreateCat=Creare tag/categorie +CreateThisCat=Creați acest tag/categorie NoSubCat=Nicio subcategorie. SubCatOf=Subcategorie -FoundCats=Tag-uri / categorii gasite +FoundCats=Tag-uri/categorii găsite ImpossibleAddCat=Imposibil de adăugat tag-ul/ categoria %s -WasAddedSuccessfully= %s a fost adaugat cu succes. +WasAddedSuccessfully= %s a fost adăugat cu succes. ObjectAlreadyLinkedToCategory=Elementul este deja asociat cu acest tag/ categorie. ProductIsInCategories=Produsul/ serviciul este asociat cu următoarele tag-uri/ categorii CompanyIsInCustomersCategories=Acest partener este asociat cu următoarele tag-uri/ categorii clienţi/ prospecţi -CompanyIsInSuppliersCategories=Acest terț este legată de următoarele etichete/categorii de furnizori +CompanyIsInSuppliersCategories=Acest terț este legat de următoarele tag-uri/categorii de furnizori MemberIsInCategories=Acest menbru este asociat cu următoarele tag-uri/ categorii membri -ContactIsInCategories=Acest contact este asociat cu următoarele tag-uri/ categorii contacte -ProductHasNoCategory=Acest produs / serviciu nu este în niciun tag/ categorie -CompanyHasNoCategory=Această terță parte nu se află în nicio etichetă / categorie +ContactIsInCategories=Acest contact este asociat cu următoarele tag-uri/categorii contacte +ProductHasNoCategory=Acest produs/serviciu nu are asociat niciun tag/categorie +CompanyHasNoCategory=Acest terț nu are asociate tag-uri/categorii MemberHasNoCategory=Acest membru nu este asociat cu tag-uri/ categorii -ContactHasNoCategory=Acest contact nu este în niciun tag/ categorie -ProjectHasNoCategory=Acest proiect nu se află în nicio etichetă / categorie -ClassifyInCategory=Adauga la tag / categorie -NotCategorized=Fără tag / categorie -CategoryExistsAtSameLevel=Această categorie există deja cu această referinţă +ContactHasNoCategory=Acest contact nu are asociat niciun tag/categorie +ProjectHasNoCategory=Acest proiect nu are asociat niciun tag/categorie +ClassifyInCategory=Adaugă la tag/categorie +NotCategorized=Fără tag/categorie +CategoryExistsAtSameLevel=Această categorie există deja cu această referinţă ContentsVisibleByAllShort=Conţinut vizibil de către toţi ContentsNotVisibleByAllShort=Conţinutul nu va fi vizibil pentru toţi -DeleteCategory=Ştergere tag / categorie -ConfirmDeleteCategory=Sigur doriți să ștergeți această etichetă / categorie? -NoCategoriesDefined=Niciun tag / categorie definită -SuppliersCategoryShort=Eticheta/categoria furnizorilor -CustomersCategoryShort=Tag / categorie Clienții -ProductsCategoryShort= Tag / categorie Produse -MembersCategoryShort=Tag / categorie Membri -SuppliersCategoriesShort=Etichetele/categoriile furnizorilor -CustomersCategoriesShort=Tag-uri / categorii Clienții -ProspectsCategoriesShort=Tag-uri / categorii prospecte -CustomersProspectsCategoriesShort=Etichetele/categoriile client/proiecte -ProductsCategoriesShort=Tag-uri / categorii Produse -MembersCategoriesShort=Tag-uri / categorii Membri -ContactCategoriesShort=Tag-uri / Categorii Contacte -AccountsCategoriesShort=Tag-uri / Categorii Contabilitate -ProjectsCategoriesShort=Etichete / categorii de proiecte -UsersCategoriesShort=Etichetele/categoriile utilizatorilor -StockCategoriesShort=Warehouse tags/categories -ThisCategoryHasNoItems=This category does not contain any items. -CategId=Id Tag / Categorie -CatSupList=Lista de etichete/categorii furnizori -CatCusList=Lista Categorii/ taguri clienţi / prospecte -CatProdList=Lista Tag-uri / categorii Produse -CatMemberList=Lista Tag-uri / categorii Membri -CatContactList=Lista Tag-uri / Categorii Contacte -CatSupLinks=Legături dintre furnizori si taguri/categorii -CatCusLinks=Legături dintre clienti/prospecti si taguri/categorii -CatContactsLinks=Links between contacts/addresses and tags/categories -CatProdLinks=Legături dintre produse/servicii si ftaguri/categorii -CatProJectLinks=Legături între proiecte și etichete / categorii -DeleteFromCat=Elimina din tag-uri / categoriii +DeleteCategory=Ştergere tag/categorie +ConfirmDeleteCategory=Sigur doriți să ștergeți acest tag/categorie? +NoCategoriesDefined=Niciun tag/categorie definită +SuppliersCategoryShort=Tag/categorie furnizori +CustomersCategoryShort=Tag/categorie clienți +ProductsCategoryShort=Tag/categorie produse +MembersCategoryShort=Tag/categorie membri +SuppliersCategoriesShort=Tag-uri/categorii furnizori +CustomersCategoriesShort=Tag-uri/categorii clienți +ProspectsCategoriesShort=Tag-uri/categorii prospecţi +CustomersProspectsCategoriesShort=Tag-uri/categorii clienţi/prospecţi +ProductsCategoriesShort=Tag-uri/categorii produse +MembersCategoriesShort=Tag-uri/categorii membri +ContactCategoriesShort=Tag-uri/categorii contacte +AccountsCategoriesShort=Tag-uri/categorii conturi contabile +ProjectsCategoriesShort=Tag-uri/categorii proiecte +UsersCategoriesShort=Tag-uri/categorii utilizatori +StockCategoriesShort=Tag-uri/categorii depozite +ThisCategoryHasNoItems=Această categorie nu conţine nici un element. +CategId=ID tag/categorie +CatSupList=Listă tag-uri/categorii furnizori +CatCusList=Listă taguri/categorii clienţi/prospecţi +CatProdList=Listă tag-uri/categorii produse +CatMemberList=Listă tag-uri/categorii membri +CatContactList=Listă tag-uri/categorii contacte +CatSupLinks=Asocieri între furnizori şi tag-uri/categorii +CatCusLinks=Asocieri între clienţi/prospecţi şi tag-uri/categorii +CatContactsLinks=Asocieri între contacte/adrese şi tag-uri/categorii +CatProdLinks=Asocieri între produse/servicii şi tag-uri/categorii +CatProJectLinks=Asocieri între proiecte și tag-uri/categorii +DeleteFromCat=Elimină din tag-uri/categoriii ExtraFieldsCategories=Atribute complementare -CategoriesSetup=Configurare Tag-uri / categorii -CategorieRecursiv=Link automat către tag /categoria părinte +CategoriesSetup=Configurare tag-uri/categorii +CategorieRecursiv=Asociere automată către tag/categorie părinte CategorieRecursivHelp=Dacă opțiunea este activă, când adăugați un produs într-o subcategorie, produsul va fi adăugat și în categoria părinte -AddProductServiceIntoCategory=Add următoarele produseservicii -ShowCategory=Arată tag / categorie +AddProductServiceIntoCategory=Adaugă următoarele produse/servicii +ShowCategory=Arată tag/categorie ByDefaultInList=Implicit în listă ChooseCategory=Alegeți categoria -StocksCategoriesArea=Warehouses Categories Area -ActionCommCategoriesArea=Events Categories Area -WebsitePagesCategoriesArea=Page-Container Categories Area -UseOrOperatorForCategories=Use or operator for categories +StocksCategoriesArea=Categorii depozite +ActionCommCategoriesArea=Categorii evenimente +WebsitePagesCategoriesArea=Categorii pagină-container +UseOrOperatorForCategories=Utilizează operatorul SAU pentru categorii diff --git a/htdocs/langs/ro_RO/commercial.lang b/htdocs/langs/ro_RO/commercial.lang index 836c658f5c4..7f69341f5f6 100644 --- a/htdocs/langs/ro_RO/commercial.lang +++ b/htdocs/langs/ro_RO/commercial.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - commercial -Commercial=Commerce -CommercialArea=Commerce area +Commercial=Comercial +CommercialArea=Zona comercială Customer=Client Customers=Clienţi Prospect=Prospect @@ -18,7 +18,7 @@ TaskRDVWith=Întâlnire cu %s ShowTask=Arată sarcină ShowAction=Arată acţiune ActionsReport=Raport Evenimente -ThirdPartiesOfSaleRepresentative=Terțe părți cu reprezentant de vânzări +ThirdPartiesOfSaleRepresentative=Terți cu reprezentant de vânzări SaleRepresentativesOfThirdParty=Reprezentanți de vânzări ai unei terțe părți SalesRepresentative=Reprezentant vînzări SalesRepresentatives=Reprezentanţi vânzări @@ -67,14 +67,14 @@ ActionAC_OTH=Altele ActionAC_OTH_AUTO=Evenimente inserate automat ActionAC_MANUAL=Evenimente inserate manual ActionAC_AUTO=Evenimente inserate automat -ActionAC_OTH_AUTOShort=Auto +ActionAC_OTH_AUTOShort=Automat Stats=Statistici vânzări StatusProsp=Statut Prospect DraftPropals=Oferte Comerciale Schiţă NoLimit=Nelimitat ToOfferALinkForOnlineSignature=Link pentru semnatura online WelcomeOnOnlineSignaturePage=Bun venit pe pagina pentru a accepta propunerile comerciale de la %s -ThisScreenAllowsYouToSignDocFrom=Acest ecran vă permite sa acceptati sisemnati , sau refuzati o oferta /propunere comerciala -ThisIsInformationOnDocumentToSign=Aceasta este informatia pe document de accetat sau refuzat -SignatureProposalRef=Semnarea citării / propunerii comercialel %s -FeatureOnlineSignDisabled=Functionalitate pentru semnare online dezactivata sau documentul generat inainte de functionalitae a fost activat +ThisScreenAllowsYouToSignDocFrom=Acest ecran vă permite să acceptaţi şi să semnaţi sau refuzaţi o ofertă/propunere comercială +ThisIsInformationOnDocumentToSign=Acestea sunt informaţiile din document de acceptat sau refuzat +SignatureProposalRef=Semnarea ofertei/propunerii comerciale %s +FeatureOnlineSignDisabled=Funcţionalitatea pentru semnare online dezactivata sau documentul a fost generat înainte activarea acestei funcţionalităţi diff --git a/htdocs/langs/ro_RO/companies.lang b/htdocs/langs/ro_RO/companies.lang index 0fa8aa59667..ff66f92a9e1 100644 --- a/htdocs/langs/ro_RO/companies.lang +++ b/htdocs/langs/ro_RO/companies.lang @@ -10,36 +10,36 @@ MenuNewCustomer=Client nou MenuNewProspect=Prospect nou MenuNewSupplier=Furnizor nou MenuNewPrivateIndividual=Particular nou -NewCompany=Compania nouă (prospect, client, furnizor) +NewCompany=Companie nouă (prospect, client, furnizor) NewThirdParty=Terț nou (prospect, client, furnizor) CreateDolibarrThirdPartySupplier=Creează un terț (furnizor) CreateThirdPartyOnly=Creare terţ CreateThirdPartyAndContact=Creați un terț + un contact pentru copil -ProspectionArea=Prospecte +ProspectionArea=Prospecţi IdThirdParty=ID Terţ IdCompany=ID Societate IdContact=Id Contact -ThirdPartyContacts=Contactele terți -ThirdPartyContact=Contact / adresă terț +ThirdPartyContacts=Contacte terți +ThirdPartyContact=Contact/adresă terț Company=Societate -CompanyName=Nume societate -AliasNames=Alias nume (comercial, marca inregistrata, ...) -AliasNameShort=Porecla +CompanyName=Nume societate +AliasNames=Alias (comercial, marca inregistrata, ...) +AliasNameShort=Alias Companies=Societăţi CountryIsInEEC=Țara se află în interiorul Comunității Economice Europene -PriceFormatInCurrentLanguage=Formatul preţului în limba curentă si moneda -ThirdPartyName=Numele terț -ThirdPartyEmail=E-mail terț +PriceFormatInCurrentLanguage=Afişează formatul preţului în limba şi moneda curentă +ThirdPartyName=Nume terț +ThirdPartyEmail=Email terț ThirdParty=Terț ThirdParties=Terți -ThirdPartyProspects=Prospecte -ThirdPartyProspectsStats=Prospecte +ThirdPartyProspects=Prospecţi +ThirdPartyProspectsStats=Prospecţi ThirdPartyCustomers=Clienţi ThirdPartyCustomersStats=Clienţi ThirdPartyCustomersWithIdProf12=Clienţii cu %s sau %s ThirdPartySuppliers=Furnizori ThirdPartyType=Tip de terț -Individual=Persoană privată +Individual=Persoană fizică ToCreateContactWithSameName=Va crea automat o persoană de contact / o adresă cu aceleași informații ca și terțul terțului. În cele mai multe cazuri, chiar dacă partea terță este o persoană fizică, este suficientă crearea unei terțe părți singură. ParentCompany=Societatea-mamă Subsidiaries=Filiale @@ -52,54 +52,54 @@ Lastname=Nume Firstname=Prenume PostOrFunction=Funcţie UserTitle=Titlu -NatureOfThirdParty=Natura terților -NatureOfContact=Nature of Contact +NatureOfThirdParty=Natură terț +NatureOfContact=Natură contact Address=Adresă -State=Regiune / Judeţ -StateCode=State/Province code +State=Regiune/Judeţ +StateCode=Cod judeţ/provincie StateShort=Stare Region=Regiune Region-State=Region - Țară Country=Ţară CountryCode=Cod ţară -CountryId=ID Ţara +CountryId=ID Ţară Phone=Telefon PhoneShort=Telefon Skype=Skype Call=Apel Chat=Chat -PhonePro=Telefon Prof. -PhonePerso=Telefon Pers. -PhoneMobile=Telefon Mobil -No_Email=Refuzați e-mailurile în vrac +PhonePro=Telefon prof. +PhonePerso=Telefon pers. +PhoneMobile=Telefon mobil +No_Email=Refuză email-urile bulk Fax=Fax Zip=Cod postal Town=Oraş Web=Web -Poste= Poziţie +Poste= Funcţie DefaultLang=Limba implicită -VATIsUsed=Impozitul pe vânzări utilizat +VATIsUsed=Utilizează TVA VATIsUsedWhenSelling=Aceasta definește dacă acest terț include sau nu o taxă de vânzare atunci când efectuează o factură către clienții săi VATIsNotUsed=Impozitul pe vânzări nu este utilizat CopyAddressFromSoc=Copiați adresa de la detaliile terților -ThirdpartyNotCustomerNotSupplierSoNoRef=Partea terță nici client, nici vânzător, nu există obiecte care se face referință -ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Partea terță nici client, nici vânzător, reduceri nu sunt disponibile +ThirdpartyNotCustomerNotSupplierSoNoRef=Terț nu este nici client, nici vânzător, nu există obiecte la care se pot face referință +ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Terțul nu este nici client, nici vânzător, reducerile nu sunt disponibile PaymentBankAccount=Cont bancar de plată OverAllProposals=Oferte OverAllOrders=Comenzi OverAllInvoices=Facturi -OverAllSupplierProposals=Cereri Preţ +OverAllSupplierProposals=Cereri preţ ##### Local Taxes ##### -LocalTax1IsUsed=Utilizează taxa secundă +LocalTax1IsUsed=Utilizează taxa secundară LocalTax1IsUsedES= RE este utilizat LocalTax1IsNotUsedES= RE nu este utilizat -LocalTax2IsUsed=Utilizează taxa treia +LocalTax2IsUsed=Utilizează taxa a treia LocalTax2IsUsedES= IRPF este utilizat LocalTax2IsNotUsedES= IRPF nu este utilizat -WrongCustomerCode=Cod Client invalid -WrongSupplierCode=Codul furnizorului este invalid +WrongCustomerCode=Cod client invalid +WrongSupplierCode=Cod furnizor invalid CustomerCodeModel=Model cod client -SupplierCodeModel=Modelul codului furnizorului +SupplierCodeModel=Model cod furnizor Gencod=Coduri de bare ##### Professional ID ##### ProfId1Short=Prof. id 1 @@ -168,8 +168,8 @@ ProfId3DE=Prof Id-ul 3 (Handelsregister-Nr.) ProfId4DE=- ProfId5DE=- ProfId6DE=- -ProfId1ES=Id-ul prof. 1 (CIF / CUI) -ProfId2ES=Prof. ID 2 (Număr deasigurare socială) +ProfId1ES=Id-ul prof. 1 (CIF/CNP) +ProfId2ES=Prof. ID 2 (SSN) ProfId3ES=Id-ul prof. 3 (CNAE) ProfId4ES=Id-ul prof. 4 (Collegiate număr) ProfId5ES=- @@ -247,7 +247,7 @@ ProfId4US=- ProfId5US=- ProfId6US=- ProfId1RO=Prof Id 1 (CUI) -ProfId2RO=Prof Id 2 (Nr. Înmatriculare) +ProfId2RO=Prof Id 2 (Nr. Reg Com) ProfId3RO=Prof Id 3 (CAEN) ProfId4RO=- ProfId5RO=Prof Id 5 (EUID) @@ -270,42 +270,42 @@ ProspectCustomer=Prospect / Client Prospect=Prospect CustomerCard=Fişa Client Customer=Client -CustomerRelativeDiscount=Discount Relativ client -SupplierRelativeDiscount=Reducere relativă a furnizorului -CustomerRelativeDiscountShort=Discount Relativ -CustomerAbsoluteDiscountShort=Discount Absolut +CustomerRelativeDiscount=Discount relativ client +SupplierRelativeDiscount=Discount relativ furnizor +CustomerRelativeDiscountShort=Discount relativ +CustomerAbsoluteDiscountShort=Discount absolut CompanyHasRelativeDiscount=Acest client are un discount de %s%% CompanyHasNoRelativeDiscount=Acest client nu are nici un discount în mod implicit -HasRelativeDiscountFromSupplier=Aveți o reducere implicită de %s%% de la acest furnizor -HasNoRelativeDiscountFromSupplier=Nu aveți nici o reducere relativă implicită de la acest furnizor -CompanyHasAbsoluteDiscount=Acest client are reduceri disponibile (note de credit sau plăți în avans) pentru %s %s -CompanyHasDownPaymentOrCommercialDiscount=Acest client are reduceri disponibile (comerciale, plăți în avans) pentru %s %s +HasRelativeDiscountFromSupplier=Aveți un discount implicit de %s%% de la acest furnizor +HasNoRelativeDiscountFromSupplier=Nu aveți nici un discount relativ implicit de la acest furnizor +CompanyHasAbsoluteDiscount=Acest client are dicount-uri disponibile (note de credit sau plăți în avans) pentru %s %s +CompanyHasDownPaymentOrCommercialDiscount=Acest client are discount-uri disponibile (comerciale, plăți în avans) pentru %s %s CompanyHasCreditNote=Acest client are încă note de credit pentru %s %s -HasNoAbsoluteDiscountFromSupplier=Nu aveți credit de reducere disponibil de la acest furnizor -HasAbsoluteDiscountFromSupplier=Aveți reduceri disponibile (note de credit sau plăți în avans) pentru %s %s de la acest furnizor -HasDownPaymentOrCommercialDiscountFromSupplier=Aveți reduceri disponibile (comerciale, plăți în avans) pentru %s %s de la acest furnizor +HasNoAbsoluteDiscountFromSupplier=Nu aveți credit disponibil de discount de la acest furnizor +HasAbsoluteDiscountFromSupplier=Aveți discount-uri disponibile (note de credit sau plăți în avans) pentru %s %s de la acest furnizor +HasDownPaymentOrCommercialDiscountFromSupplier=Aveți discount-uri disponibile (comerciale, plăți în avans) pentru %s %s de la acest furnizor HasCreditNoteFromSupplier=Aveți note de credit pentru %s %s de la acest furnizor -CompanyHasNoAbsoluteDiscount=Acest client nu are nici o reducere de credit disponibil -CustomerAbsoluteDiscountAllUsers=Reduceri absolute ale clienților (acordate de toți utilizatorii) +CompanyHasNoAbsoluteDiscount=Acest client nu are nici discount de credit disponibil +CustomerAbsoluteDiscountAllUsers=Discount-uri absolute ale clienților (acordate de toți utilizatorii) CustomerAbsoluteDiscountMy=Reduceri absolute ale clienților (acordate de dvs.) -SupplierAbsoluteDiscountAllUsers=Reduceri absolute ale furnizorului (introduse de toți utilizatorii) -SupplierAbsoluteDiscountMy=Reduceri absolute ale furnizorilor (introduse de dvs.) +SupplierAbsoluteDiscountAllUsers=Discount-uri absolute ale furnizorului (introduse de toți utilizatorii) +SupplierAbsoluteDiscountMy=Discount-uri absolute ale furnizorilor (introduse de dvs.) DiscountNone=Niciunul Vendor=Furnizor Supplier=Furnizor AddContact=Creare contact AddContactAddress=Creare contact/adresă EditContact=Editare contact -EditContactAddress=Editează contact -Contact=Contact/Address +EditContactAddress=Editare contact/adresă +Contact=Contact/Adresă Contacts=Contacte ContactId=Id contact -ContactsAddresses=Contacte +ContactsAddresses=Contacte/Adrese FromContactName=Nume: NoContactDefinedForThirdParty=Niciun contact definit pentru acest terţ NoContactDefined=Niciun contact definit -DefaultContact=Contact Implicit -ContactByDefaultFor=Default contact/address for +DefaultContact=Contact/adresă implicită +ContactByDefaultFor=Contact/adresă implicită pentru AddThirdParty=Creare terţ DeleteACompany=Şterge o societate PersonalInformations=Informaţii personale @@ -315,54 +315,54 @@ SupplierCode=Cod furnizor CustomerCodeShort=Cod client SupplierCodeShort=Cod furnizor CustomerCodeDesc=Cod client, unic pentru toți clienți -SupplierCodeDesc=Cod furnizor, unic pentru toți furnizori +SupplierCodeDesc=Cod furnizor, unic pentru toți furnizorii RequiredIfCustomer=Obligatoriu, dacă un terţ este un client sau prospect -RequiredIfSupplier=Obligatoriu dacă un terț este un furnizor +RequiredIfSupplier=Obligatoriu dacă terțul este un furnizor ValidityControledByModule=Valabilitate controlată de modul ThisIsModuleRules=Reguli pentru acest modul -ProspectToContact=Prospect de contact +ProspectToContact=Prospect de contactat CompanyDeleted=Societatea " %s" a fost ştearsă din baza de date. -ListOfContacts=Lista Contacte -ListOfContactsAddresses=Lista Contacte -ListOfThirdParties=Lista terților -ShowCompany=Third Party -ShowContact=Contact-Address +ListOfContacts=Listă contacte/adrese +ListOfContactsAddresses=Lista contacte/adrese +ListOfThirdParties=Listă terți +ShowCompany=Terţ +ShowContact=Contact-Adresă ContactsAllShort=Toate (fără filtru) -ContactType=Tip Contact -ContactForOrders=Contact Comenzi -ContactForOrdersOrShipments=Contact Comenzi sau Livrari -ContactForProposals=Contact Ofertă -ContactForContracts=Contact Contracte -ContactForInvoices=Contact Facturi +ContactType=Tip contact +ContactForOrders=Contact comenzi +ContactForOrdersOrShipments=Contact comenzi sau livrări +ContactForProposals=Contact ofertă +ContactForContracts=Contact contracte +ContactForInvoices=Contact facturi NoContactForAnyOrder=Acest contact nu este contact pentru nici o comanda NoContactForAnyOrderOrShipments=Acest contact nu este contact pentru nicio comanda sau livrare NoContactForAnyProposal=Acest contact nu este contact pentru nicio ofertă comercială NoContactForAnyContract=Acest contact nu este contact pentru nici un contract NoContactForAnyInvoice=Acest contact nu este contact pentru nici o factură NewContact=Contact nou -NewContactAddress=Contact nou +NewContactAddress=Contact/adresă nouă MyContacts=Contactele mele Capital=Capital -CapitalOf=Capital de % s -EditCompany=Modifică societate -ThisUserIsNot=This user is not a prospect, customer or vendor -VATIntraCheck=Verifică -VATIntraCheckDesc=ID-ul de TVA trebuie să includă prefixul țării. Linkul %s utilizează serviciul european de verificare a TVA-ului (VIES), care necesită acces la internet de pe serverul Dolibarr. +CapitalOf=Capital de %s +EditCompany=Modificare societate +ThisUserIsNot=Acest utilizator nu este prospect, client sau furnizor +VATIntraCheck=Verificare +VATIntraCheckDesc=Codul TVA trebuie să includă prefixul țării. Linkul %s utilizează serviciul european de verificare TVA (VIES), care necesită acces la internet de pe serverul Dolibarr. VATIntraCheckURL=http://ec.europa.eu/taxation_customs/vies/vieshome.do VATIntraCheckableOnEUSite=Verificați codul TV intracomunitar pe site-ul web al Comisiei Europene -VATIntraManualCheck=De asemenea, puteți verifica manual pe site-ul web al Comisiei Europene %s -ErrorVATCheckMS_UNAVAILABLE=Verificare imposibilă. Verificaţi dacă serviciu nu este furnizat de către statul membru ( %s). -NorProspectNorCustomer=Fără perspectivă, fără client -JuridicalStatus=Tipul entității juridice +VATIntraManualCheck=De asemenea, puteți verifica manual pe site-ul web al UE %s +ErrorVATCheckMS_UNAVAILABLE=Verificare imposibilă. Verificaţi dacă serviciul este furnizat de către statul membru ( %s). +NorProspectNorCustomer=Nici prospect, nici client +JuridicalStatus=Tip entitate juridică Staff=Angajati -ProspectLevelShort=Potential -ProspectLevel=Prospect potenţial +ProspectLevelShort=Potenţial +ProspectLevel=Potenţial prospect ContactPrivate=Privat ContactPublic=Partajat ContactVisibility=Vizibilitate ContactOthers=Altele -OthersNotLinkedToThirdParty=Alţii, nelegate la un terţ -ProspectStatus=Statut Prospect +OthersNotLinkedToThirdParty=Alţii, nelegaţi la un terţ +ProspectStatus=Status prospect PL_NONE=Niciunul PL_UNKNOWN=Necunoscut PL_LOW=Scăzut @@ -372,87 +372,87 @@ TE_UNKNOWN=- TE_STARTUP=Startup TE_GROUP=Companie mare TE_MEDIUM=Companie medie -TE_ADMIN=Guvernamental +TE_ADMIN=Instituţie publică TE_SMALL=Companie mică TE_RETAIL=Vânzător cu amănuntul TE_WHOLE=Angrosist TE_PRIVATE=Persoană fizică TE_OTHER=Alt -StatusProspect-1=De necontactat -StatusProspect0=Niciodată contactat +StatusProspect-1=Nu contacta +StatusProspect0=Necontactat StatusProspect1=De contactat StatusProspect2=Contact în curs -StatusProspect3=Contact realizat -ChangeDoNotContact=Schimbă statutul la "De necontactat" -ChangeNeverContacted=Schimbă statutul la "Niciodată contactat" +StatusProspect3=Contactat +ChangeDoNotContact=Schimbă statusul la 'NU contacta' +ChangeNeverContacted=Schimbă statusul la 'Necontactat' ChangeToContact=Schimbare stare în "De contactat" -ChangeContactInProcess=Schimbă statutul la "Contact în curs" -ChangeContactDone=Schimbă statutul la 'Contact realizat' -ProspectsByStatus=Prospectele pe status +ChangeContactInProcess=Schimbă statusul la 'Contact în curs' +ChangeContactDone=Schimbă statusul la 'Contactat' +ProspectsByStatus=Prospecţi după status NoParentCompany=Niciunul ExportCardToFormat=Export fişă în format ContactNotLinkedToCompany=Contact nelegat la un terţ DolibarrLogin=Identificator utilizator -NoDolibarrAccess=Niciun acces utilizator +NoDolibarrAccess=Utilizator fără acces la Dolibarr ExportDataset_company_1=Terți (companii / fundații / persoane fizice) și proprietățile acestora ExportDataset_company_2=Persoanele de contact și proprietățile acestora ImportDataset_company_1=Terți și proprietățile acestora -ImportDataset_company_2=Contacte / adrese și atribute suplimentare pentru terţi -ImportDataset_company_3=Conturi bancare ale terților -ImportDataset_company_4=Reprezentanți de vânzări terți (desemnați reprezentanți de vânzări / utilizatori în companii) -PriceLevel=Nivelul prețului -PriceLevelLabels=Etichete de nivel de preț +ImportDataset_company_2=Contacte/adrese și atribute suplimentare pentru terţi +ImportDataset_company_3=Conturi bancare Terți +ImportDataset_company_4=Reprezentanți de vânzări ai terților (asociere reprezentanți vânzări/utilizatori la companii) +PriceLevel=Nivel de preț +PriceLevelLabels=Etichete nivel de preț DeliveryAddress=Adresă de livrare AddAddress=Adaugă adresă -SupplierCategory=Categoria furnizorului +SupplierCategory=Categorie furnizor JuridicalStatus200=Freelancer DeleteFile=Şterge fişier -ConfirmDeleteFile=Sigur doriţi să ştergeţi acest fişier? +ConfirmDeleteFile=Sigur doriţi să ştergeţi acest fişier? AllocateCommercial=Asociat la reprezentant vânzări -Organization=Instituția +Organization=Organizaţie FiscalYearInformation=An fiscal FiscalMonthStart=Luna de început a anului fiscal -SocialNetworksInformation=Social networks -SocialNetworksFacebookURL=Facebook URL -SocialNetworksTwitterURL=Twitter URL -SocialNetworksLinkedinURL=Linkedin URL -SocialNetworksInstagramURL=Instagram URL -SocialNetworksYoutubeURL=Youtube URL -SocialNetworksGithubURL=Github URL +SocialNetworksInformation=Reţele sociale +SocialNetworksFacebookURL=URL Facebook +SocialNetworksTwitterURL=URL Twitter +SocialNetworksLinkedinURL=URL Linkedin +SocialNetworksInstagramURL=URL Instagram +SocialNetworksYoutubeURL=URL Youtube +SocialNetworksGithubURL=URL Github YouMustAssignUserMailFirst=Trebuie să creați un e-mail pentru acest utilizator înainte de a putea adăuga o notificare prin e-mail. YouMustCreateContactFirst=Pentru a putea adaugă notificări pe email, este necesară definirea unor contacte pentru terţi cu adresa de email validă ListSuppliersShort=Lista furnizori -ListProspectsShort=Lista prospecte -ListCustomersShort=Lista clienți -ThirdPartiesArea=Terțe/Contacte -LastModifiedThirdParties=Latest %s modified Third Parties -UniqueThirdParties=Totalul terţilor +ListProspectsShort=Listă prospecţi +ListCustomersShort=Listă clienți +ThirdPartiesArea=Terți/Contacte +LastModifiedThirdParties=Ultimii %sTerţi modificaţi +UniqueThirdParties=Total terţi InActivity=Deschis ActivityCeased=Închis ThirdPartyIsClosed=Terțul este închis -ProductsIntoElements=Ultimele produse / servicii in %s -CurrentOutstandingBill=Facturi in suspensie curente +ProductsIntoElements=Ultimele produse/servicii în %s +CurrentOutstandingBill=Facturi neachitate curente OutstandingBill=Max. limită credit OutstandingBillReached=Limită credit depăsită -OrderMinAmount=Suma minim a comenzii -MonkeyNumRefModelDesc=Returnați un număr cu formatul %syymm-nnnn pentru codul clientului și %syymm-nnnn pentru codul furnizorului unde yy este anul, mm este luna și nnnn este o secvență fără pauză și nici o revenire la 0. -LeopardNumRefModelDesc=Codul este liber fîrî verificare. Acest cod poate fi modificat în orice moment. -ManagingDirectors=Nume Manager(i) nume (CEO, director, preşedinte...) -MergeOriginThirdparty=Duplica terț (terț dorit să-l ștergeți) -MergeThirdparties=Imbina terti +OrderMinAmount=Suma minimă a comenzii +MonkeyNumRefModelDesc=Returnați un număr cu formatul %syymm-nnnn pentru codul client și %syymm-nnnn pentru codul furnizor unde yy este anul, mm este luna și nnnn este o secvență fără pauză și nici o revenire la 0. +LeopardNumRefModelDesc=Codul este liber fără verificare. Acest cod poate fi modificat în orice moment. +ManagingDirectors=Nume manager(i) (CEO, director, preşedinte...) +MergeOriginThirdparty=Terț duplicat (terțul dorit a fi șters) +MergeThirdparties=Îmbină terţi ConfirmMergeThirdparties=Sunteți sigur că doriți să fuzionați aceast terț cu cel curent? Toate obiectele legate (facturi, comenzi, ...) vor fi mutate la un terț curent, iar terțul va fi șters. -ThirdpartiesMergeSuccess=Părțile terțe au fost fuzionate +ThirdpartiesMergeSuccess=Terții au fost unificaţi SaleRepresentativeLogin=Autentificare reprezentant vânzări SaleRepresentativeFirstname=Numele reprezentantului vânzări SaleRepresentativeLastname=Prenumele reprezentantului vânzări ErrorThirdpartiesMerge=A apărut o eroare la ștergerea terților Verificați jurnalul. S-a revenit la setarile anterioare. -NewCustomerSupplierCodeProposed=Codul clientului sau furnizorului utilizat deja, este sugerat un nou cod -KeepEmptyIfGenericAddress=Keep this field empty if this address is a generic address +NewCustomerSupplierCodeProposed=Codul clientului sau furnizorului utilizat deja, introduceţi un alt cod +KeepEmptyIfGenericAddress=Lasă acest câmp gol dacă această adresă este generică #Imports PaymentTypeCustomer=Tip de plată - Client -PaymentTermsCustomer=Conditii de plata - Client +PaymentTermsCustomer=Condiţii de plată - Client PaymentTypeSupplier=Tip de plată - Furnizor -PaymentTermsSupplier=Termen de plată - furnizor -PaymentTypeBoth=Payment Type - Customer and Vendor +PaymentTermsSupplier=Termen de plată - Furnizor +PaymentTypeBoth=Tip plată - Client şi Furnizor MulticurrencyUsed=Utilizați mai multe monede MulticurrencyCurrency=Moneda diff --git a/htdocs/langs/ro_RO/compta.lang b/htdocs/langs/ro_RO/compta.lang index 5a9926309ff..ea0496677f0 100644 --- a/htdocs/langs/ro_RO/compta.lang +++ b/htdocs/langs/ro_RO/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Taxa sociala / fiscala SocialContributions=Taxe sociale sau fiscale SocialContributionsDeductibles=Taxe deductibile SocialContributionsNondeductibles=Taxe nedeductibile +DateOfSocialContribution=Data taxei fiscale sau sociale LabelContrib=Eticheta contribuție TypeContrib=Tip de contribuție MenuSpecialExpenses=Cheltuieli speciale @@ -121,7 +122,7 @@ Turnover=Cifra de afaceri facturată TurnoverCollected=Cifra de afaceri colectată SalesTurnoverMinimum=Cifra de afaceri minimă ByExpenseIncome= După cheltuieli & venituri -ByThirdParties=Pe terţi +ByThirdParties=După terţi ByUserAuthorOfInvoice=După autorul facturii CheckReceipt=Borderou de cecuri remise CheckReceiptShort=Borderou cecuri @@ -157,9 +158,9 @@ SeeReportInInputOutputMode=Vedeți %sanaliza plăților%s pentru un calcul al pl SeeReportInDueDebtMode=Vedeți %sanaliza facturilor%s pentru un calcul bazat pe facturi înregistrate cunoscute, chiar dacă acestea nu sunt încă înregistrate în registru. SeeReportInBookkeepingMode=Vedeți %sraportul contabil%s pentru un calcul la Tabelul registrului contabil RulesAmountWithTaxIncluded=- Valoarea afişată este cu toate taxele incluse -RulesResultDue=- It includes outstanding invoices, expenses, VAT, donations whether they are paid or not. Is also includes paid salaries.
    - It is based on the billing date of invoices and on the due date for expenses or tax payments. For salaries defined with Salary module, the value date of payment is used. +RulesResultDue=- Include facturi restante, cheltuieli, TVA, donații indiferent dacă sunt plătite sau nu. Include și salariile plătite.
    - se bazează pe data de emitere a facturilor și data scadenței pentru cheltuieli sau plăți fiscale. Pentru salariile definite cu modulul Salarii, se utilizează data plăţii. RulesResultInOut=- Include plățile efective pe facturi, cheltuieli,TVA și salarii.
    - Se ia în calcul data plăţii facturilor, cheltuielilor, TVA-ului și salariilor . -RulesCADue=- It includes the customer's due invoices whether they are paid or not.
    - It is based on the billing date of these invoices.
    +RulesCADue=- Include facturile client scadente indiferent dacă sunt încasate sau nu.
    - Se bazează pe data emiterii acestor facturi.
    RulesCAIn=- include toate plățile efective ale facturilor primite de la clienți.
    - se bazează pe data de plată a acestor facturi
    RulesCATotalSaleJournal=Acesta include toate liniile de credit din jurnalul de vânzare. RulesAmountOnInOutBookkeepingRecord=Acesta include înregistrarea în registrul dvs. cu conturi contabile care are grupul "CHELTUIELI" sau "VENIT" @@ -255,10 +256,12 @@ TurnoverbyVatrate=Cifra de afaceri facturată prin rata impozitului pe vânzare TurnoverCollectedbyVatrate=Cifra de afaceri colectată prin rata impozitului pe vânzare PurchasebyVatrate=Cumpărare prin rata de impozitare a vânzării LabelToShow=Etichetă scurta -PurchaseTurnover=Purchase turnover -PurchaseTurnoverCollected=Purchase turnover collected -RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not.
    - It is based on the invoice date of these invoices.
    -RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.
    - It is based on the payment date of these invoices
    -RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. -ReportPurchaseTurnover=Purchase turnover invoiced -ReportPurchaseTurnoverCollected=Purchase turnover collected +PurchaseTurnover=Cifră de afaceri achiziţii +PurchaseTurnoverCollected=Cifra de afaceri colectată achiziţii +RulesPurchaseTurnoverDue=- Include facturile restante la furnizori indiferent dacă sunt achitate sau nu. -
    Se bazează pe data de emitere a acestor facturi.
    +RulesPurchaseTurnoverIn=- Include toate plățile efectuate ale facturilor de la furnizori.
    - Se bazează pe data la care s-au plătit aceste facturi
    +RulesPurchaseTurnoverTotalPurchaseJournal=Include toate liniile debitoare din jurnalul de cumpărări +ReportPurchaseTurnover=Cifra de afaceri achiziţii facturate +ReportPurchaseTurnoverCollected=Cifra de afaceri colectată achiziţii +IncludeVarpaysInResults = Include plăţile diverse în rapoarte +IncludeLoansInResults = Includeți creditele - împrumuturile în rapoarte diff --git a/htdocs/langs/ro_RO/contracts.lang b/htdocs/langs/ro_RO/contracts.lang index eaf5803e17c..cd470129815 100644 --- a/htdocs/langs/ro_RO/contracts.lang +++ b/htdocs/langs/ro_RO/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Servicii active MenuExpiredServices=Servicii expirate MenuClosedServices=Servicii închise NewContract=Contract nou -NewContractSubscription=Contract / Abonament nou +NewContractSubscription=Contract sau abonament nou AddContract=Crează contract DeleteAContract=Şterge contract ActivateAllOnContract=Activați toate serviciile @@ -99,6 +99,6 @@ TypeContact_contrat_internal_SALESREPFOLL=Sales reprezentative următoarele-up c TypeContact_contrat_external_BILLING=Contact client facturare contract TypeContact_contrat_external_CUSTOMER=Contact client urmărire contract TypeContact_contrat_external_SALESREPSIGN=Contact client semnarecontract -HideClosedServiceByDefault=Hide closed services by default -ShowClosedServices=Show Closed Services -HideClosedServices=Hide Closed Services +HideClosedServiceByDefault=Ascunde serviciile închise în mod implicit +ShowClosedServices=Afişare Servicii închise +HideClosedServices=Ascundere Servicii închise diff --git a/htdocs/langs/ro_RO/cron.lang b/htdocs/langs/ro_RO/cron.lang index 677540e3313..352feb51e3e 100644 --- a/htdocs/langs/ro_RO/cron.lang +++ b/htdocs/langs/ro_RO/cron.lang @@ -6,28 +6,28 @@ Permission23102 = Creare/Modificare job programat Permission23103 = Şterge Job programat Permission23104 = Execută Job programat # Admin -CronSetup= Setare Managementul joburilor programate -URLToLaunchCronJobs=URL to check and launch qualified cron jobs +CronSetup=Setare Managementul joburilor programate +URLToLaunchCronJobs=URL pentru a verifica și a lansa sarcini cron calificate OrToLaunchASpecificJob=Sau pentru a verifica și a lansa un anumit job KeyForCronAccess=Cheie de securitate pentru URL de lansare a joburilor cron -FileToLaunchCronJobs=Command line to check and launch qualified cron jobs +FileToLaunchCronJobs=Linie de comanda pentru a verifica și a lansa sarcini cron calificate CronExplainHowToRunUnix=Pe mediul Unix veţi utiliza instrumentul crontab pentru a rula urmatoarea linia de comanda la fiecare 5 minute -CronExplainHowToRunWin=Pe mediul Microsoft(tm) Windows puteţi utiliza instrumentul Scheduled task pentru a rula linia de comanda la fiecare 5 minute +CronExplainHowToRunWin=În mediul Microsoft (tm) Windows, puteți utiliza instrumentele programate pentru a executa linia de comandă la fiecare 5 minute CronMethodDoesNotExists= Clasa %s nu conține metoda %s -CronJobDefDesc=Cron job profiles are defined into the module descriptor file. When module is activated, they are loaded and available so you can administer the jobs from the admin tools menu %s. -CronJobProfiles=List of predefined cron job profiles +CronJobDefDesc=Profilele sarcinilor Cron sunt definite în fișierul descriptor de module. Când modulul este activat, acestea sunt încărcate și disponibile, astfel încât să puteți administra lucrările din meniul instrumentelor de administrare%s. +CronJobProfiles=Lista profilurilor sarcinilor cron predefinite # Menu EnabledAndDisabled=Activat și dezactivat # Page list -CronLastOutput=Latest run output -CronLastResult=Latest result code +CronLastOutput=Ultimul rezultat +CronLastResult=Ultimul cod rezultat CronCommand=Comandă CronList=Joburi programate CronDelete=Şterge Joburi programate -CronConfirmDelete=Are you sure you want to delete these scheduled jobs? -CronExecute=Launch scheduled job -CronConfirmExecute=Are you sure you want to execute these scheduled jobs now? -CronInfo=Scheduled job module allows to schedule jobs to execute them automatically. Jobs can also be started manually. +CronConfirmDelete=Sigur doriți să ștergeți aceste lucrări programate? +CronExecute=Lansați lucrările programate? +CronConfirmExecute=Sunteți sigur că doriți să executați aceste lucrări programate acum? +CronInfo=Modulul de lucrări programate permite programarea lucrărilor pentru a le executa automat. Lucrările pot fi pornite și manual. CronTask=Job CronNone=Niciunul CronDtStart=Dată începere @@ -42,8 +42,8 @@ CronModule=Modulul CronNoJobs=Niciun job înregistrat CronPriority=Prioritate CronLabel=Etichetă -CronNbRun=Nr. lansări -CronMaxRun=Max number launch +CronNbRun=Numărul de lansări +CronMaxRun=Număr maxim de lansări CronEach=Fiecare JobFinished=Job lansat şi terminat #Page card @@ -55,29 +55,30 @@ CronSaveSucess=Salvare cu succes CronNote=Comenteaza CronFieldMandatory=Câmpurile %s sunt obligatorii CronErrEndDateStartDt=Data de sfârşit nu poate fi înaintea datei de început -StatusAtInstall=Status at module installation +StatusAtInstall=Stare la instalarea modulului CronStatusActiveBtn=Activare CronStatusInactiveBtn=Dezactivare CronTaskInactive=Acest post este dezactivat CronId=Id -CronClassFile=Filename with class -CronModuleHelp=Name of Dolibarr module directory (also work with external Dolibarr module).
    For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for module is
    product -CronClassFileHelp=The relative path and file name to load (path is relative to web server root directory).
    For exemple to call the fetch method of Dolibarr Product object htdocs/product/class/product.class.php, the value for class file name is
    product/class/product.class.php -CronObjectHelp=The object name to load.
    For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for class file name is
    Product -CronMethodHelp=The object method to launch.
    For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for method is
    fetch -CronArgsHelp=The method arguments.
    For exemple to call the fetch method of Dolibarr Product object /htdocs/product/class/product.class.php, the value for paramters can be
    0, ProductRef +CronClassFile=Nume fișier cu clasă +CronModuleHelp=Numele directorului modulului Dolibarr (lucrați și cu modul Dolibarr extern).
    De exemplu, pentru a apela metoda de fetch Dolibarr Produs obiect/htdocs / produs /class/product.class.php, valoarea pentru modul este
    produs +CronClassFileHelp=Calea relativă și numele fișierului de încărcat (calea este relativă la directorul rădăcină web).
    De exemplu, pentru a apela metoda fetch a obiectului produsului Dolibarr htdocs / produs / clasa / product.class.php , valoarea pentru numele fişierului clasei este
    produs/ clasa / product.class.php +CronObjectHelp=Numele obiectului de încărcat .
    De exemplu, pentru a apela metoda fetch a produsului Dolibarr obiect/htdocs / produs / clasa / product.class.php, valoarea pentru numele fişierului clasei este
    Produs +CronMethodHelp=Metoda obiect pentru lansare.
    De exemplu, pentru a apela metoda fetch a produsului Dolibarr obiect/htdocs/product/class/product.class.php, valoarea metodei este
    preluare +CronArgsHelp=Argumentele metodei.
    De exemplu, pentru a apela metoda de preluare a produsului Dolibarr object /htdocs/product/class/product.class.php, valoarea parametrilor poate fi
    0, ProductRef CronCommandHelp=Linia de comandă de sistem pentru a executa. CronCreateJob=Creare job programat CronFrom=De la # Info # Common CronType=Tip job -CronType_method=Call method of a PHP Class +CronType_method=Metoda de apel a unei clase PHP CronType_command=Comandă shell -CronCannotLoadClass=Cannot load class file %s (to use class %s) -CronCannotLoadObject=Class file %s was loaded, but object %s was not found into it -UseMenuModuleToolsToAddCronJobs=Intrați în meniul ''Acasă - Module Instrumente - Joburi programate'' pentru a vedea și edita job-urile programate. +CronCannotLoadClass=Nu se poate încărca fișierul de clasă %s (pentru a folosi clasa %s) +CronCannotLoadObject=Fișier de clasă %s a fost încărcat, dar obiectul %s nu a fost găsit în el +UseMenuModuleToolsToAddCronJobs=Mergi în meniu "Acasă - Instrumente administrare - Joburi programate" pentru a vedea şi edita joburile programate. JobDisabled=Job dezactivat MakeLocalDatabaseDumpShort=Backup local baza de date -MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql' or 'pgsql'), 1, 'auto' or filename to build, number of backup files to keep -WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run. +MakeLocalDatabaseDump=Creați o bază de date locală. Parametrii sunt: ​​compresie ("gz" sau "bz" sau "none"), tipul de backup (mysql, pgsql, auto) 1, "auto" sau nume de fișier de construit, număr de fișiere de rezervă de păstrat +WarningCronDelayed=Atenție, în scopul performanței, indiferent de data următoare a executării activităţilor activate, este posibil ca activităţile dvs. să fie întârziate la maximum %s ore înainte de a rula +DATAPOLICYJob=Curățător de date și anonimizator diff --git a/htdocs/langs/ro_RO/deliveries.lang b/htdocs/langs/ro_RO/deliveries.lang index e0e52b5ecf7..53e4e7d825b 100644 --- a/htdocs/langs/ro_RO/deliveries.lang +++ b/htdocs/langs/ro_RO/deliveries.lang @@ -2,7 +2,7 @@ Delivery=Livrare DeliveryRef=Ref Livrare DeliveryCard=Chitanta card -DeliveryOrder=Delivery receipt +DeliveryOrder=Bon de livrare DeliveryDate=Data de livrare CreateDeliveryOrder=Generați chitanța de livrare DeliveryStateSaved=Stare livrare salvata diff --git a/htdocs/langs/ro_RO/dict.lang b/htdocs/langs/ro_RO/dict.lang index f52f8c045af..4454b749764 100644 --- a/htdocs/langs/ro_RO/dict.lang +++ b/htdocs/langs/ro_RO/dict.lang @@ -290,7 +290,7 @@ CurrencyXOF=CFA BCEAO Franci CurrencySingXOF=CFA franc BCEAO CurrencyXPF=PCP franci CurrencySingXPF=PCP franc -CurrencyCentEUR=cents +CurrencyCentEUR=procente CurrencyCentSingEUR=cent CurrencyCentINR=paisa CurrencyCentSingINR=paise diff --git a/htdocs/langs/ro_RO/donations.lang b/htdocs/langs/ro_RO/donations.lang index 61a0548379c..e3b5182b9c8 100644 --- a/htdocs/langs/ro_RO/donations.lang +++ b/htdocs/langs/ro_RO/donations.lang @@ -16,7 +16,7 @@ DonationStatusPromiseNotValidatedShort=Schiţă DonationStatusPromiseValidatedShort=Validată DonationStatusPaidShort=Plătită DonationTitle=Chitanţă donaţie -DonationDate=Donation date +DonationDate=Data donaţiei DonationDatePayment=Data Plata ValidPromess=Validează promisiune DonationReceipt=Chitanţă donaţie diff --git a/htdocs/langs/ro_RO/errors.lang b/htdocs/langs/ro_RO/errors.lang index 9741c368f4d..2a7f2df8659 100644 --- a/htdocs/langs/ro_RO/errors.lang +++ b/htdocs/langs/ro_RO/errors.lang @@ -23,7 +23,7 @@ ErrorFailToGenerateFile=Nu a reușit să genereze fișierul" %s ". ErrorThisContactIsAlreadyDefinedAsThisType=Acest contact este deja definit ca persoană de contact pentru acest tip. ErrorCashAccountAcceptsOnlyCashMoney=Acest cont bancar este un cont de bani, aşa că acceptă plăţi de tip cash numai. ErrorFromToAccountsMustDiffers=Sursa obiective şi conturi bancare trebuie să fie diferite. -ErrorBadThirdPartyName=Valoare gresită pentru numele terțului +ErrorBadThirdPartyName=Valoare greşită pentru numele terțului ErrorProdIdIsMandatory=%s este obligatoriu ErrorBadCustomerCodeSyntax=Bad sintaxă pentru codul de client ErrorBadBarCodeSyntax=Sintaxă greșită pentru codul de bare. Poate s-a setat un tip de cod de bare greșit sau ați definit o mască de cod de bare pentru numerotare care nu se potrivește cu valoarea scanată. @@ -36,7 +36,7 @@ ErrorBadSupplierCodeSyntax=Sintaxă greșită pentru codul furnizorului ErrorSupplierCodeRequired=Codul furnizorului este necesar ErrorSupplierCodeAlreadyUsed=Codul furnizorului deja folosit ErrorBadParameters=Bad parametrii -ErrorWrongParameters=Wrong or missing parameters +ErrorWrongParameters=Parametri eronaţi sau parametri lipsă ErrorBadValueForParameter=Valoarea incorectă '%s' pentru parametrul '%s' ErrorBadImageFormat=Fișier de imagine nu are un format acceptat (PHP dvs. nu acceptă funcții pentru a converti imagini de acest format) ErrorBadDateFormat="%s" Valoarea are formatul de dată greşit @@ -60,7 +60,7 @@ ErrorPartialFile=Fişierul nu a primit complet de server. ErrorNoTmpDir=Temporare directy %s nu există. ErrorUploadBlockedByAddon=Încărcaţi blocat de un PHP / Apache plug-in. ErrorFileSizeTooLarge=Dimensiunea fişierului este prea mare. -ErrorFieldTooLong=Field %s is too long. +ErrorFieldTooLong=Câmpul %s este prea lung. ErrorSizeTooLongForIntType=Prea mult timp pentru tipul int (%s cifre maxim) Dimensiune ErrorSizeTooLongForVarcharType=Prea mult timp pentru tipul de coarde (%s de caractere maxim) Dimensiune ErrorNoValueForSelectType=Completaţi valorile pentru lista de selecţie @@ -92,13 +92,13 @@ ErrorSpecialCharNotAllowedForField=Caractere speciale nu sunt permise pentru dom ErrorNumRefModel=O referire există în baza de date (%s) şi nu este compatibilă cu această regulă de numerotare. înregistra Remove sau redenumite de referinţă pentru a activa acest modul. ErrorQtyTooLowForThisSupplier=Cantitate prea mică pentru acest furnizor sau niciun preț definit pentru acest produs pentru acest furnizor ErrorOrdersNotCreatedQtyTooLow=Unele comenzi nu au fost create datorită cantităților prea mici -ErrorModuleSetupNotComplete=Setup of module %s looks to be uncomplete. Go on Home - Setup - Modules to complete. +ErrorModuleSetupNotComplete=Configurarea modulului %s pare incompletă. Mergi în Acasă - Setup - Module şi finalizează configurarea. ErrorBadMask=Eroare pe masca ErrorBadMaskFailedToLocatePosOfSequence=Eroare, fără a masca numărul de ordine ErrorBadMaskBadRazMonth=Eroare, Bad resetare valoarea ErrorMaxNumberReachForThisMask=Numărul maxim atins pentru această mască ErrorCounterMustHaveMoreThan3Digits=Contorul trebuie sa aiba mai mult de 3 cifre -ErrorSelectAtLeastOne=Error, select at least one entry. +ErrorSelectAtLeastOne=Eroare, selectează cel puţin o înregistrare. ErrorDeleteNotPossibleLineIsConsolidated=Ștergerea nu este posibilă deoarece înregistrarea este legată de o tranzacție bancară care este conciliată ErrorProdIdAlreadyExist=%s se atribuie o altă treime ErrorFailedToSendPassword=Nu a reuşit să trimită parola @@ -119,9 +119,9 @@ ErrorLoginDoesNotExists=User login cu %s nu a putut fi găsit. ErrorLoginHasNoEmail=Acest utilizator nu are nici o adresa de e-mail. Procesul de anulată. ErrorBadValueForCode=Bad valoare tipuri de cod. Încercaţi din nou cu o nouă valoare ... ErrorBothFieldCantBeNegative=%s Domenii şi %s nu poate fi atât negativ -ErrorFieldCantBeNegativeOnInvoice=Field %s cannot be negative on this type of invoice. If you need to add a discount line, just create the discount first (from field '%s' in thirdparty card) and apply it to the invoice. -ErrorLinesCantBeNegativeForOneVATRate=Total of lines (net of tax) can't be negative for a given not null VAT rate (Found a negative total for VAT rate %s%%). -ErrorLinesCantBeNegativeOnDeposits=Lines can't be negative in a deposit. You will face problems when you will need to consume the deposit in final invoice if you do so. +ErrorFieldCantBeNegativeOnInvoice=Câmpul %s nu poate fi negativ pe acest tip de factură. Dacă vrei să adaugi o linie de discount, creează mai discountul (în câmpul '%s' din fişa terţului) şi aplică-l pe factură. +ErrorLinesCantBeNegativeForOneVATRate=Totalul liniilor (fără taxe) nu poate fi negativ pentru o cotă TVA diferită de zero (S-a găsit un total negativ cota TVA %s%%). +ErrorLinesCantBeNegativeOnDeposits=Liniile nu pot fi negative într-un depozit. Dacă faceți acest lucru, vă veţi confrunta cu probleme atunci când veți consuma din stoc. ErrorQtyForCustomerInvoiceCantBeNegative=Cantitatea pentru linia unei facturi client nu poate fi negativa. ErrorWebServerUserHasNotPermission=Contul de utilizator %s folosite pentru a executa serverul de web nu are permisiunea, pentru că ErrorNoActivatedBarcode=Niciun tip de coduri de bare activat @@ -130,14 +130,15 @@ ErrNoZipEngine=Nu există niciun motor pentru a arhiva/dezarhiva fișierul %s î ErrorFileMustBeADolibarrPackage=Fșierul %s trebuie să fie un pachet zip Dolibarr ErrorModuleFileRequired=Trebuie să selectați un fișier pachet al modulului Dolibarr ErrorPhpCurlNotInstalled=PHP CURLnu este instalat, acest lucru este esențial pentru comunicarea cu Paypal -ErrorFailedToAddToMailmanList=Eşec la adăugarea %s la lista de Mailman % s sau la baza SPIP -ErrorFailedToRemoveToMailmanList=Eşec la înlăturarea %s din lista de Mailman % s sau din baza SPIP +ErrorFailedToAddToMailmanList=Eşec la adăugarea %s la lista de Mailman %s sau la baza SPIP +ErrorFailedToRemoveToMailmanList=Eşec la înlăturarea %s din lista de Mailman %s sau din baza SPIP ErrorNewValueCantMatchOldValue=Noua valoare nu poate fi egală cu cea veche ErrorFailedToValidatePasswordReset=Eşec la resetarea parolei. Este posibil săfi fost deja folosit acest link ( acest link poate fi folosit doar o dată). Dacă nu, încercați să reporniți şi reiniţializaţi procesul. ErrorToConnectToMysqlCheckInstance=Conectarea la baza de date eșuată. Verificați serverul de bază de date că functionează (de exemplu, cu mysql/mariadb, îl puteți lansa din linia de comandă cu 'sudo service mysql start'). ErrorFailedToAddContact=Eşuare la adaugare contact -ErrorDateMustBeBeforeToday=Data nu poate fi mai mare decât azi -ErrorPaymentModeDefinedToWithoutSetup=Un modul de plată a fost setat la tipul% s, dar setarea modulului Facturi nu a fost finalizată a arăta pentru acest mod de plată. +ErrorDateMustBeBeforeToday=Data trebuie să fie mai mică decât azi +ErrorDateMustBeInFuture=Data trebuie să fie mai mare decât azi +ErrorPaymentModeDefinedToWithoutSetup=Un modul de plată a fost setat la tipul %s, dar setarea modulului Facturi nu a fost finalizată a arăta pentru acest mod de plată. ErrorPHPNeedModule=Eroare, PHP trebuie să aibă modul %s instalat pentru a utiliza această funcţionalitate. ErrorOpenIDSetupNotComplete=Trebuie setat fișier de configurare Dolibarr pentru a permite autentificarea OpenID, dar URL-ul serviciului OpenID nu este definit în constanta %s ErrorWarehouseMustDiffers=Depozitul sursă și țintă trebuie să difere @@ -184,7 +185,7 @@ ErrorBadDefinitionOfMenuArrayInModuleDescriptor=Definire greșită pentru Menu A ErrorSavingChanges=A apărut o eroare la salvarea modificărilor ErrorWarehouseRequiredIntoShipmentLine=Depozitul este obligatoriu pe linie pentru livrare ErrorFileMustHaveFormat=Fisierul trebuie sa aiba format '%s' -ErrorFilenameCantStartWithDot=Filename can't start with a '.' +ErrorFilenameCantStartWithDot=Numele fişierului nu poate începe cu un '.' ErrorSupplierCountryIsNotDefined=Țara pentru acest furnizor nu este definită. Corectați mai întâi acest lucru. ErrorsThirdpartyMerge=Nu s-au putut îmbina cele două înregistrări. Cererea a fost anulată. ErrorStockIsNotEnoughToAddProductOnOrder=Stocul nu este suficient pentru produsul %s pentru a-l adăuga într-o comandă nouă. @@ -201,7 +202,7 @@ ErrorPhpMailDelivery=Verificați dacă nu utilizați un număr prea mare de dest ErrorUserNotAssignedToTask=Utilizatorul trebuie să fie atribuit sarcinii pentru a putea introduce timpul consumat. ErrorTaskAlreadyAssigned=Sarcină deja atribuită utilizatorului ErrorModuleFileSeemsToHaveAWrongFormat=Pachetul de module pare să aibă un format greșit. -ErrorModuleFileSeemsToHaveAWrongFormat2=At least one mandatory directory must exists into zip of module: %s or %s +ErrorModuleFileSeemsToHaveAWrongFormat2=Cel puțin un director trebuie să existe obligatoriu în arhiva zip a modulului: %s sau %s ErrorFilenameDosNotMatchDolibarrPackageRules=Numele pachetului de module ( %s ) nu se potrivește cu sintaxa numelui așteptat: %s ErrorDuplicateTrigger=Eroare, numele de declanșare duplicat %s. Deja încărcat de la %s. ErrorNoWarehouseDefined=Eroare, nu au fost definite depozite. @@ -222,28 +223,31 @@ ErrorDuringChartLoad=Eroare la încărcarea schemei de conturi. În cazul în ca ErrorBadSyntaxForParamKeyForContent=Sintaxă greşită pentru parametru keyforcontent. Trebuie să aibă o valoare începând cu %s sau %s ErrorVariableKeyForContentMustBeSet=Eroare, trebuie să fie setată constanta cu numele %s (cu conținut de text care trebuie afișat) sau %s (cu adresa URL externă de afișat). ErrorURLMustStartWithHttp=URL-ul %s trebuie să înceapă cu http:// sau https:// -ErrorNewRefIsAlreadyUsed=Error, the new reference is already used -ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Error, delete payment linked to a closed invoice is not possible. -ErrorSearchCriteriaTooSmall=Search criteria too small. -ErrorObjectMustHaveStatusActiveToBeDisabled=Objects must have status 'Active' to be disabled -ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Objects must have status 'Draft' or 'Disabled' to be enabled -ErrorNoFieldWithAttributeShowoncombobox=No fields has property 'showoncombobox' into definition of object '%s'. No way to show the combolist. -ErrorFieldRequiredForProduct=Field '%s' is required for product %s -ProblemIsInSetupOfTerminal=Problem is in setup of terminal %s. -ErrorAddAtLeastOneLineFirst=Add at least one line first -ErrorRecordAlreadyInAccountingDeletionNotPossible=Error, record is already transferred in accounting, deletion is not possible. -ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Error, language is mandatory if you set the page as a translation of another one. -ErrorLanguageOfTranslatedPageIsSameThanThisPage=Error, language of translated page is same than this one. -ErrorBatchNoFoundForProductInWarehouse=No lot/serial found for product "%s" in warehouse "%s". -ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this lot/serial for product "%s" in warehouse "%s". -ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) -ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? -ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorNewRefIsAlreadyUsed=Eroare, noua referintă este deja utilizată +ErrorDeletePaymentLinkedToAClosedInvoiceNotPossible=Eroare, ştergerea unei plăţi asociate la o factură închisă nu este posibilă. +ErrorSearchCriteriaTooSmall=Criteriul de căutare este prea scurt. +ErrorObjectMustHaveStatusActiveToBeDisabled=Obiectele trebuie să aibă statusul 'Activ' pentru a putea fi dezactivate +ErrorObjectMustHaveStatusDraftOrDisabledToBeActivated=Obiectele trebuie să aibă statusul 'Schiţă' sau 'Dezactivat' pentru a fi activate +ErrorNoFieldWithAttributeShowoncombobox=Nici un câmp nu are proprietatea 'showoncombobox' în definiţia obiectului '%s'. Nu se poate afişa lista combo. +ErrorFieldRequiredForProduct=Câmpul '%s' este obligatoriu de completat pentru produsul %s +ProblemIsInSetupOfTerminal=Problema este la configurarea terminalului %s. +ErrorAddAtLeastOneLineFirst=Adaugă cel puţin o linie mai întâi +ErrorRecordAlreadyInAccountingDeletionNotPossible=Eroare, tranzacţia este deja transferată în contabilitate, ştergerea nu este posibilă. +ErrorLanguageMandatoryIfPageSetAsTranslationOfAnother=Eroare, setarea limbii este obligatorie dacă setați pagina ca o traducere a alteia. +ErrorLanguageOfTranslatedPageIsSameThanThisPage=Eroare, limba paginii traduse este aceeași cu cea iniţială. +ErrorBatchNoFoundForProductInWarehouse=Nici un lot/serie găsită pentru produsul "%s" din depozitul "%s". +ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Cantitate insuficientă de produs "%s" din lot/serie în depozitulul "%s". +ErrorOnlyOneFieldForGroupByIsPossible=Doar 1 câmp din 'Grupare după' este posibil (celelalte sunt ignorate) +ErrorTooManyDifferentValueForSelectedGroupBy=S-au găsit prea multe valori diferite (mai multe de %s) pentru câmpul '%s', de aceea nu se poate folosi pentru 'Grupare după' în grafice. Câmpul 'Grupare după' a fost eliminat. Poate ai vrut să-l foloseşti ca axa-X ? +ErrorReplaceStringEmpty=Eroare, şirul înlocuitor este gol +ErrorProductNeedBatchNumber=Eroare, produsul '%s' necesită un număr de lot/serie +ErrorProductDoesNotNeedBatchNumber=Eroare, produsul '%s' nu acceptă un număr de lot/serie +ErrorFailedToReadObject=Eroare, nu am putut citi tipul obiectului %s # Warnings -WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. +WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Parametrul tău PHP upload_max_filesize (%s) este mai mare decât paramentrul PHP post_max_size (%s). Aceasta nu este o configuraţie consistentă. WarningPasswordSetWithNoAccount= O parolă a fost trimisă către acest membru. Cu toate acestea, nu a fost creat nici un cont de utilizator. Astfel, această parolă este stocată, dar nu poate fi utilizată pentru autentificare. Poate fi utilizată de către un modul / interfată externă, dar dacă nu aveți nevoie să definiți un utilizator sau o parolă pentru un membru, puteți dezactiva opțiunea "Gestionați o conectare pentru fiecare membru" din modul de configurare membri. În cazul în care aveți nevoie să gestionați un utilizator, dar nu este nevoie de parolă, aveți posibilitatea să păstrați acest câmp gol pentru a evita acest avertisment. Notă: Adresa de e-mail poate fi utilizată ca utilizator la autentificare, în cazul în care membrul este legat de un utilizator. -WarningMandatorySetupNotComplete=Click here to setup mandatory parameters -WarningEnableYourModulesApplications=Click here to enable your modules and applications +WarningMandatorySetupNotComplete=Click aici pentru a seta parametrii obligatorii +WarningEnableYourModulesApplications=Click aici pentru a activa modulele şi aplicaţiile tale WarningSafeModeOnCheckExecDir=Atenţie, PHP safe_mode opţiune este pe atât de comandă trebuie să fie depozitate într-un director declarate de safe_mode_exec_dir parametru PHP. WarningBookmarkAlreadyExists=Un marcaj cu acest titlu sau acest obiectiv (URL) există deja. WarningPassIsEmpty=Atenţie, parola baza de date este gol. Aceasta este o gaura de securitate. Ar trebui să adăugaţi o parolă pentru a vă baza de date şi să vă schimbaţi conf.php fişier, pentru a reflecta acest lucru. @@ -264,5 +268,5 @@ WarningAnEntryAlreadyExistForTransKey=Există deja o intrare pentru cheia de tra WarningNumberOfRecipientIsRestrictedInMassAction=Avertisment, numărul destinatarului diferit este limitat la %s când se utilizează acțiunile de masă din liste WarningDateOfLineMustBeInExpenseReportRange=Avertisment, data liniei nu este în intervalul raportului de cheltuieli WarningProjectClosed=Proiectul este închis. Trebuie să-l redeschideți mai întâi. -WarningSomeBankTransactionByChequeWereRemovedAfter=Some bank transaction were removed after that the receipt including them were generated. So nb of cheques and total of receipt may differ from number and total in list. -WarningFailedToAddFileIntoDatabaseIndex=Warnin, failed to add file entry into ECM database index table +WarningSomeBankTransactionByChequeWereRemovedAfter=Anumite tranzacţii bancare au fost eliminate după ce a fost generat extrasul care le includea. Aşa că numărul de cecuri şi totalul extrasului pot diferi de cele din listă. +WarningFailedToAddFileIntoDatabaseIndex=Avertizare, nu am putut adăuga fişierul în tabela index a ECM diff --git a/htdocs/langs/ro_RO/exports.lang b/htdocs/langs/ro_RO/exports.lang index b77635e9c98..34a37b99469 100644 --- a/htdocs/langs/ro_RO/exports.lang +++ b/htdocs/langs/ro_RO/exports.lang @@ -26,6 +26,8 @@ FieldTitle=Domeniul titlu NowClickToGenerateToBuildExportFile=Acum, selectați formatul de fișier în caseta combo și faceți clic pe "Generare" pentru a construi fișierul de export ... AvailableFormats=Formate disponibile LibraryShort=Biblioteca +ExportCsvSeparator=Separator caractere CSV +ImportCsvSeparator=Separator caractere CSV Step=Pasul FormatedImport=Asistent import FormatedImportDesc1=Acest modul vă permite să actualizați datele existente sau să adăugați obiecte noi în baza de date dintr-un fișier fără cunoștințe tehnice, utilizând un asistent. @@ -37,7 +39,7 @@ FormatedExportDesc3=Când sunt selectate datele de export, puteți alege formatu Sheet=Foaie NoImportableData=Nu importable de date (nu cu modul de definiţii, pentru a permite importul de date) FileSuccessfullyBuilt=Fișierul generat -SQLUsedForExport=SQL Request used to extract data +SQLUsedForExport=Interogare SQL utilizată pentru extragerea datelor LineId=Id-ul de linie LineLabel=Eticheta linie LineDescription=Descriere de linie @@ -113,7 +115,7 @@ ExportDateFilter=AAAA, AAAALL, AAAALLZZ: filtre pe un an / lună / zi
    AAAA ExportNumericFilter=Filtrele NNNNN cu o valoare
    NNNNN + NNNNN filtrează peste un interval de valori
    Filtre NNNNN prin valori mai mici
    > Filtre NNNNN prin valori mai mari ImportFromLine=Importul pornind de la linia numărul EndAtLineNb=Sfârșit la linia numărul -ImportFromToLine=Limit range (From - To). Eg. to omit header line(s). +ImportFromToLine=Interval limită (De la - Până la). Ex. pentru a omite linia(ile) de cap de tabel. SetThisValueTo2ToExcludeFirstLine=De exemplu, setați această valoare la 3 pentru a exclude primele 2 linii.
    Dacă liniile de antet NU sunt omise, aceasta va duce la mai multe erori în simularea importului. KeepEmptyToGoToEndOfFile=Păstrați acest câmp gol pentru a procesa toate liniile până la sfârșitul fișierului. SelectPrimaryColumnsForUpdateAttempt=Selectați coloana (coloanele) de utilizat ca cheie primară pentru o importare UPDATE diff --git a/htdocs/langs/ro_RO/holiday.lang b/htdocs/langs/ro_RO/holiday.lang index 7ffba8bf834..cbbb43ab7c1 100644 --- a/htdocs/langs/ro_RO/holiday.lang +++ b/htdocs/langs/ro_RO/holiday.lang @@ -18,7 +18,7 @@ ListeCP=Lista concediilor Leave=Cereri de concedii LeaveId=Lăsați ID-ul ReviewedByCP=Va fi aprobat de către -UserID=User ID +UserID=ID utilizator UserForApprovalID=Utilizator pentru ID de aprobare UserForApprovalFirstname=Prenumele utilizatorului de aprobare UserForApprovalLastname=Numele utilizatorului de aprobare @@ -40,10 +40,10 @@ TypeOfLeaveId=Tipul de ID de concediu TypeOfLeaveCode=Tipul codului de concediu TypeOfLeaveLabel=Tipul tabelului de concediu NbUseDaysCP=Numărul de zile de concediu consumate -NbUseDaysCPHelp=The calculation takes into account the non working days and the holidays defined in the dictionary. +NbUseDaysCPHelp= Calculul ține cont de zilele nelucrătoare și de sărbătorile definite în dicționar. NbUseDaysCPShort=Zile consumate NbUseDaysCPShortInMonth=Zilele consumate în lună -DayIsANonWorkingDay=%s is a non working day +DayIsANonWorkingDay=%s este o zi nelucrătoare DateStartInMonth=Data de începere în lună DateEndInMonth=Data de încheiere în lună EditCP=Editare @@ -130,5 +130,5 @@ HolidaysNumberingModules=Modelele de numerotare a cererilor de concediu TemplatePDFHolidays=Șablon pentru cererile de concediu PDF FreeLegalTextOnHolidays=Text gratuit pe PDF WatermarkOnDraftHolidayCards=Bază de fundal privind cererile de permis de concediu -HolidaysToApprove=Holidays to approve -NobodyHasPermissionToValidateHolidays=Nobody has permission to validate holidays +HolidaysToApprove=Concedii de aprobat +NobodyHasPermissionToValidateHolidays=Nimeni nu are permisiunea de a valida concedii diff --git a/htdocs/langs/ro_RO/hrm.lang b/htdocs/langs/ro_RO/hrm.lang index d7ec912e84f..985e1d3c558 100644 --- a/htdocs/langs/ro_RO/hrm.lang +++ b/htdocs/langs/ro_RO/hrm.lang @@ -11,7 +11,7 @@ CloseEtablishment=Inchide Sediu # Dictionary DictionaryPublicHolidays=Managementul resurselor umane - Sarbatori oficiale DictionaryDepartment=HRM - Lista Departamente -DictionaryFunction=HRM - Job positions +DictionaryFunction=HRM - Joburi disponibile # Module Employees=Angajati Employee=Angajat diff --git a/htdocs/langs/ro_RO/install.lang b/htdocs/langs/ro_RO/install.lang index 3326458dfa7..1cda37b563f 100644 --- a/htdocs/langs/ro_RO/install.lang +++ b/htdocs/langs/ro_RO/install.lang @@ -13,22 +13,22 @@ PHPSupportPOSTGETOk=Acest PHP suportă variabile POST si GET. PHPSupportPOSTGETKo=Este posibil ca configurarea dvs. PHP să nu accepte variabilele POST și/sau GET. Verificați parametrul variables_order în php.ini. PHPSupportGD=Acest PHP suportă funcții grafice GD. PHPSupportCurl=Acest PHP suportă Curl. -PHPSupportCalendar=This PHP supports calendars extensions. +PHPSupportCalendar=Acest PHP suportă extensii calendar. PHPSupportUTF8=Acest PHP suportă functiile UTF8. -PHPSupportIntl=This PHP supports Intl functions. -PHPSupportxDebug=This PHP supports extended debug functions. -PHPSupport=This PHP supports %s functions. +PHPSupportIntl=Aceasta versiune de PHP suportă funcţii Intl. +PHPSupportxDebug=Această versiune de PHP suportă funcţii de depanare extinse. +PHPSupport=Această versiune de PHP suportă funcţii %s. PHPMemoryOK=PHP max memorie sesiune este setată la %s. Acest lucru ar trebui să fie suficient. PHPMemoryTooLow=Memoria sesiunii PHP max este setată la %s octeți. Această valoare este prea mică. Schimbați-vă php.ini pentru a seta parametrul memory_limit la cel puțin %s octeți. Recheck=Faceți clic aici pentru un test mai detaliat ErrorPHPDoesNotSupportSessions=Instalarea dvs. de PHP nu acceptă sesiuni. Această caracteristică este necesară pentru a permite Dolibarr să funcționeze. Verificați configurarea PHP și permisiunile directorului sesiunilor. ErrorPHPDoesNotSupportGD=Instalarea dvs. PHP nu suportă funcții grafice GD. Nu vor fi disponibile grafice. ErrorPHPDoesNotSupportCurl=Instalarea dvs. PHP nu suportă Curl. -ErrorPHPDoesNotSupportCalendar=Your PHP installation does not support php calendar extensions. +ErrorPHPDoesNotSupportCalendar=Versiunea ta de PHP nu suportă extensii calendar. ErrorPHPDoesNotSupportUTF8=Instalarea dvs. de PHP nu suportă funcții UTF8. Dolibarr nu poate funcționa corect. Rezolvați acest lucru înainte de a instala Dolibarr. -ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions. -ErrorPHPDoesNotSupportxDebug=Your PHP installation does not support extend debug functions. -ErrorPHPDoesNotSupport=Your PHP installation does not support %s functions. +ErrorPHPDoesNotSupportIntl=Versiunea ta de PHP nu suportă funcţii Intl. +ErrorPHPDoesNotSupportxDebug=Versiunea ta de PHP nu suportă funcţii de depanare extinse. +ErrorPHPDoesNotSupport=Versiunea ta de PHP nu suportă funcţii %s. ErrorDirDoesNotExists=Directorul %s nu există. ErrorGoBackAndCorrectParameters=Întoarceți-vă și verificați/corectați parametrii. ErrorWrongValueForParameter=Este posibil să fi tastat greşit o valoare pentru parametrul "%s". @@ -93,7 +93,7 @@ GoToSetupArea=Du-te la Dolibarr (zona de configurare) MigrationNotFinished=Versiunea bazei de date nu este complet actualizată: executați din nou procesul de actualizare. GoToUpgradePage=Du-te la pagina din nou upgrade WithNoSlashAtTheEnd=Fără a slash "/" de la sfârşitul -DirectoryRecommendation=IMPORTANT: You must use a directory that is outside of the web pages (so do not use a subdirectory of previous parameter). +DirectoryRecommendation=IMPORTANT:Trebuie să utilizați un director care se află în afara paginilor web (deci nu folosiți un subdirector al parametrului anterior). LoginAlreadyExists=Există deja DolibarrAdminLogin=Dolibarr admin autentificare AdminLoginAlreadyExists=Contul de administrator Dolibarr " %s " există deja. Întoarce-te dacă vrei să creezi altul. @@ -209,7 +209,7 @@ MigrationRemiseExceptEntity=Actualizați valoarea câmpului entității din llx_ MigrationUserRightsEntity=Actualizați valoarea câmpului entității pentru llx_user_rights MigrationUserGroupRightsEntity=Actualizați valoarea câmpului entității din llx_usergroup_rights MigrationUserPhotoPath=Migrarea căilor foto pentru utilizatori -MigrationFieldsSocialNetworks=Migration of users fields social networks (%s) +MigrationFieldsSocialNetworks=Migrarea câmpurilor de reţele sociale ale utilizatorilor(%s) MigrationReloadModule=Reîncarcă modul %s MigrationResetBlockedLog=Resetați modulul BlockedLog pentru algoritmul v7 ShowNotAvailableOptions=Afișați opțiunile nedisponibile @@ -218,6 +218,6 @@ ErrorFoundDuringMigration=Eroarea (erorile) au fost raportate în timpul procesu YouTryInstallDisabledByDirLock=Aplicația a încercat să se autoactualizeze, însă paginile de instalare/upgrade au fost dezactivate pentru securitate (directorul redenumit cu sufixul .lock).
    YouTryInstallDisabledByFileLock=Aplicația a încercat să se autoactualizeze, însă paginile de instalare / upgrade au fost dezactivate pentru securitate (prin existența unui fișier de blocare install.lock în directorul de documente Dolibarr).
    ClickHereToGoToApp=Faceți clic aici pentru a merge la aplicația dvs. -ClickOnLinkOrRemoveManualy=If an upgrade is in progress, please wait. If not, click on the following link. If you always see this same page, you must remove/rename the file install.lock in the documents directory. -Loaded=Loaded -FunctionTest=Function test +ClickOnLinkOrRemoveManualy=Dacă o actualizare este în curs, așteptați. Dacă nu, faceți clic pe următorul link. Dacă vedeți întotdeauna aceeași pagină, trebuie să eliminați/să redenumiți fișierul install.lock din directorul documentelor. +Loaded=Incărcat +FunctionTest=Test de funcţionare diff --git a/htdocs/langs/ro_RO/interventions.lang b/htdocs/langs/ro_RO/interventions.lang index 7e5c62016e6..60dec3c350e 100644 --- a/htdocs/langs/ro_RO/interventions.lang +++ b/htdocs/langs/ro_RO/interventions.lang @@ -57,10 +57,10 @@ InterDateCreation=Data crearea Intervenție InterDuration=Durată Intervenție InterStatus=Status Intervenție InterNote=Nota interventie -InterLine=Line of intervention +InterLine=Linie intervenţie InterLineId=Id linie Intervenţie InterLineDate=Data linie interventie InterLineDuration=Durată linie Intervenție InterLineDesc=Descriere linie Intervenţie -RepeatableIntervention=Template of intervention -ToCreateAPredefinedIntervention=To create a predefined or recurring intervention, create a common intervention and convert it into intervention template +RepeatableIntervention=Şablon intervenţie +ToCreateAPredefinedIntervention=Pentru a crea o intervenţie predefinită sau recurentă, creează o intervenţie obişnuită şi converteşte-o într-un şablon diff --git a/htdocs/langs/ro_RO/languages.lang b/htdocs/langs/ro_RO/languages.lang index 607e824aa26..e2f800a3c76 100644 --- a/htdocs/langs/ro_RO/languages.lang +++ b/htdocs/langs/ro_RO/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Etiopiană Language_ar_AR=Arabă Language_ar_EG=Arabă (Egipt) Language_ar_SA=Arabă (Arabia Saudită) +Language_az_AZ=Azerbaijană Language_bn_BD=Bengaleza +Language_bn_IN=Bengală (India) Language_bg_BG=Bulgară Language_bs_BA=Bosniac Language_ca_ES=Catalană @@ -20,6 +23,7 @@ Language_en_GB=Engleză (Marea Britanie) Language_en_IN=Engleză (India) Language_en_NZ=Engleză (Noua Zeelandă) Language_en_SA=Engleză (Arabia Saudită) +Language_en_SG=Engleză (Singapore) Language_en_US=Engleză (Statele Unite) Language_en_ZA=Engleză (Africa de Sud) Language_es_ES=Spaniolă @@ -29,6 +33,7 @@ Language_es_CL=Spaniolă (Chile) Language_es_CO=Spaniolă (Columbia) Language_es_DO=Spaniolă (Republica Dominicană) Language_es_EC=Spaniolă (Ecuador) +Language_es_GT=Spaniolă (Guatemala) Language_es_HN=Spaniolă (Honduras) Language_es_MX=Spaniolă (Mexic) Language_es_PA=Spaniolă (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spaniolă (Paraguay) Language_es_PE=Spaniolă (Peru) Language_es_PR=Spaniolă (Puerto Rico) Language_es_UY=Spaniolă (Uruguay) +Language_es_GT=Spaniolă (Guatemala) Language_es_VE=Spaniolă (Venezuela) Language_et_EE=Estoniană Language_eu_ES=Basc @@ -44,15 +50,22 @@ Language_fi_FI=Finlandeză Language_fr_BE=Franceză (Belgia) Language_fr_CA=Franceză (Canada) Language_fr_CH=Franceză (Elveţia) +Language_fr_CI=Franceză (Coasta de Azur) +Language_fr_CM=Franceză (Camerun) Language_fr_FR=Franceză +Language_fr_GA=Franceză (Gabon) Language_fr_NC=Franceză (Noua Caledonie) +Language_fr_SN=Franceză (Senegal) Language_fy_NL=Finlandeza +Language_gl_ES=Galeză Language_he_IL=Ebraică +Language_hi_IN=Hindi (India) Language_hr_HR=Croat Language_hu_HU=Maghiară Language_id_ID=Indoneziană Language_is_IS=Islandeză Language_it_IT=Italiană +Language_it_CH=Italiană (Elveţia) Language_ja_JP=Japoneză Language_ka_GE=Georgiana Language_km_KH=khmeră @@ -64,8 +77,9 @@ Language_lv_LV=Letonă Language_mk_MK=Macedonean Language_mn_MN=mongoleză Language_nb_NO=Norvegiană (Bokmål) +Language_ne_NP=Nepaleză Language_nl_BE=Olandeză (Belgia) -Language_nl_NL=Dutch +Language_nl_NL=Olandeză Language_pl_PL=Poloneză Language_pt_BR=Portugheză (Brazilia) Language_pt_PT=Portugheză @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbecă Language_vi_VN=Vietnameză Language_zh_CN=Chineză Language_zh_TW=Chineză (Tradiţională) +Language_zh_HK=Chineză (Hong Kong) Language_bh_MY=Malaeziană diff --git a/htdocs/langs/ro_RO/link.lang b/htdocs/langs/ro_RO/link.lang index 9087a2eec65..12147377aea 100644 --- a/htdocs/langs/ro_RO/link.lang +++ b/htdocs/langs/ro_RO/link.lang @@ -8,4 +8,4 @@ LinkRemoved=Linkul %s a fost înlăturat ErrorFailedToDeleteLink= Eşec la înlăturarea linkului '%s' ErrorFailedToUpdateLink= Eşec la modificarea linkului '%s' URLToLink=URL la link -OverwriteIfExists=Overwrite file if exists +OverwriteIfExists=Suprascrie dacă fişierul există diff --git a/htdocs/langs/ro_RO/loan.lang b/htdocs/langs/ro_RO/loan.lang index 25878774961..ecd77415a51 100644 --- a/htdocs/langs/ro_RO/loan.lang +++ b/htdocs/langs/ro_RO/loan.lang @@ -23,9 +23,9 @@ AddLoan=Creați împrumut FinancialCommitment=Angajament financiar InterestAmount=Dobândă CapitalRemain=Capitalul rămâne -TermPaidAllreadyPaid = This term is allready paid -CantUseScheduleWithLoanStartedToPaid = Can't use scheduler for a loan with payment started -CantModifyInterestIfScheduleIsUsed = You can't modify interest if you use schedule +TermPaidAllreadyPaid = Acest element este plătit deja +CantUseScheduleWithLoanStartedToPaid = Nu poţi folosi programatorul pentru un credit pentru care au început plăţile +CantModifyInterestIfScheduleIsUsed = Nu poţi modifica dobânda dacă foloseşti programatorul # Admin ConfigLoan=Configurarea împrumutului modulului LOAN_ACCOUNTING_ACCOUNT_CAPITAL=Contabilitatea contului de capital în mod implicit diff --git a/htdocs/langs/ro_RO/mails.lang b/htdocs/langs/ro_RO/mails.lang index e660aa77eb3..c021a5391ca 100644 --- a/htdocs/langs/ro_RO/mails.lang +++ b/htdocs/langs/ro_RO/mails.lang @@ -19,8 +19,8 @@ MailTopic=Temă pentru e-mail MailText=Mesaj MailFile=Fişiere ataşate MailMessage=Continut Email -SubjectNotIn=Not in Subject -BodyNotIn=Not in Body +SubjectNotIn=Nu în subiect +BodyNotIn=Nu în corpul email-ului ShowEMailing=Arata email-uri ListOfEMailings=Lista de emailings NewMailing=Nou email-uri @@ -78,13 +78,13 @@ GroupEmails=Grup de emailuri OneEmailPerRecipient=Un email pentru fiecare destinatar (în mod implicit, un email selectat pentru fiecare înregistrare ) WarningIfYouCheckOneRecipientPerEmail=Atenție, dacă bifați această casetă, înseamnă că va fi trimis un singur email pentru mai multe înregistrări sectate, deci dacă mesajul dvs. conține variabile de substituție care se referă la datele unei înregistrări, nu este posibil să le înlocuiți. ResultOfMailSending=Rezultatul trimiterii de email în masă -NbSelected=Number selected -NbIgnored=Number ignored -NbSent=Number sent +NbSelected=Număr selectate +NbIgnored=Număr ignorate +NbSent=Număr trimise SentXXXmessages= %s Mesaj(e) trimise. ConfirmUnvalidateEmailing=Sigur doriți să schimbați emailul %s la starea de schiţă? MailingModuleDescContactsWithThirdpartyFilter=Contactați filtrele clienților -MailingModuleDescContactsByCompanyCategory=Contacte pe categorii terțe +MailingModuleDescContactsByCompanyCategory=Contacte după categorii terți MailingModuleDescContactsByCategory=Contacte pe categorii MailingModuleDescContactsByFunction=Contacte după poziție MailingModuleDescEmailsFromFile=Emailuri din fișier @@ -164,7 +164,11 @@ NoContactWithCategoryFound=Nu s-a găsit niciun contact / adresă cu o categorie NoContactLinkedToThirdpartieWithCategoryFound=Nu s-a găsit niciun contact / adresă cu o categorie OutGoingEmailSetup=Setarea emailului de ieșire InGoingEmailSetup=Configurarea emailului de primire -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=Setup email de ieşire( pentru modulul %s) DefaultOutgoingEmailSetup=Configurarea implicită a emailurilor de ieșire Information=Informatie ContactsWithThirdpartyFilter=Contacte cu filtrul terț +Unanswered=Fără răspuns +Answered=Răspuns +IsNotAnAnswer=Nu răspunde (e-mail inițial) +IsAnAnswer= Este un răspuns al unui email inițial diff --git a/htdocs/langs/ro_RO/main.lang b/htdocs/langs/ro_RO/main.lang index f2c6a10c15b..d8db4149020 100644 --- a/htdocs/langs/ro_RO/main.lang +++ b/htdocs/langs/ro_RO/main.lang @@ -25,13 +25,13 @@ FormatDateHourTextShort=%d %b %Y %H:%M FormatDateHourText=%d %B %Y %H:%M DatabaseConnection=Conexiunea la baza de date NoTemplateDefined=Nu există șablon disponibil pentru acest tip de email -AvailableVariables=Variabile substitutie disponibil +AvailableVariables=Variabile de substituţie disponibile NoTranslation=Fără traducere Translation=Traduceri -EmptySearchString=Enter non empty search criterias +EmptySearchString=Introdu criterii de căutare valide NoRecordFound=Nicio înregistrare gasită NoRecordDeleted=Nu s-au șters înregistrări -NotEnoughDataYet=Nu sunt date +NotEnoughDataYet=Nu sunt date NoError=Nicio eroare Error=Eroare Errors=Erori @@ -39,36 +39,36 @@ ErrorFieldRequired=Câmpul " %s" este obligatoriu ErrorFieldFormat=Câmpul " %s" are o valoare incorectă ErrorFileDoesNotExists=Fișierul % s nu există ErrorFailedToOpenFile=Nu se poate deschide fișierul % s -ErrorCanNotCreateDir=Nu se poate crea dir %s -ErrorCanNotReadDir=Nu se poate citi dir %s +ErrorCanNotCreateDir=Nu se poate crea directorul %s +ErrorCanNotReadDir=Nu se poate citi directorul %s ErrorConstantNotDefined=Parametrul %s nedefinit ErrorUnknown=Eroare Necunoscută ErrorSQL=Eroare SQL ErrorLogoFileNotFound=Fișierul logo '% s' nu a fost găsit -ErrorGoToGlobalSetup=Accesați setarea "Companie/Organizație" pentru a remedia această problemă +ErrorGoToGlobalSetup=Accesați setările 'Companie/Organizație' pentru a remedia această problemă ErrorGoToModuleSetup=Mergeţi la configurarea modulului pentru rezolvare -ErrorFailedToSendMail=Nu se poate trimite e-mail (expeditor=% s, destinatar =%s) -ErrorFileNotUploaded=Fișierul nu a fost încărcat. Verificați ca dimensiunea să nu depășească maximul permis, că spațiu pe disc este disponibil și că nu există deja un fișier cu același nume, în acest director. +ErrorFailedToSendMail=Nu se poate trimite e-mail (expeditor=%s, destinatar =%s) +ErrorFileNotUploaded=Fișierul nu a fost încărcat. Verificați ca dimensiunea să nu depășească maximul permis, că spațiu pe disc este disponibil și că nu există deja un fișier cu același nume, în acest director. ErrorInternalErrorDetected=Eroare detectată ErrorWrongHostParameter=Parametru Server greșit ErrorYourCountryIsNotDefined=Țara dvs. nu este definită. Mergeți la Home-Setup-Edit și postați din nou formularul. ErrorRecordIsUsedByChild=Nu s-a reușit ștergerea acestei înregistrări. Această înregistrare este utilizată de cel puțin o copie a înregistrării -ErrorWrongValue=Valoarea incorectă -ErrorWrongValueForParameterX=Valoarea incorectă pentru parametrul% s -ErrorNoRequestInError=Nicio cerere în eroare +ErrorWrongValue=Valoare incorectă +ErrorWrongValueForParameterX=Valoare incorectă pentru parametrul %s +ErrorNoRequestInError=Nicio cerere cu eroare ErrorServiceUnavailableTryLater=Serviciul nu este disponibil momentan. Încercați mai târziu. ErrorDuplicateField=Valoare duplicat într-un câmp unic -ErrorSomeErrorWereFoundRollbackIsDone=Au fost găsite unele erori. Modificările au fost reluate. +ErrorSomeErrorWereFoundRollbackIsDone=Au fost găsite unele erori. Modificările nu au fost salvate. ErrorConfigParameterNotDefined=Parametrul %s nu este definit în fișierul de configurare Dolibarr conf.php . -ErrorCantLoadUserFromDolibarrDatabase=Utilizatorul%s negăsit în baza de date Dolibarr. -ErrorNoVATRateDefinedForSellerCountry=Eroare, nici o cota de TVA definită pentru ţara '% s'. -ErrorNoSocialContributionForSellerCountry=Eroare, niciun tip taxa sociala /fiscala definit pentru ţara '%s'. -ErrorFailedToSaveFile=Eroare, salvarea fişierului eşuată. +ErrorCantLoadUserFromDolibarrDatabase=Utilizatorul%s negăsit în baza de date Dolibarr. +ErrorNoVATRateDefinedForSellerCountry=Eroare, nici o cotă de TVA nu este definită pentru ţara '%s'. +ErrorNoSocialContributionForSellerCountry=Eroare, niciun tip de taxă socială/fiscală nu este definită pentru ţara '%s'. +ErrorFailedToSaveFile=Eroare, salvarea fişierului a eşuat. ErrorCannotAddThisParentWarehouse=Încercați să adăugați un depozit părinte care este deja o copie a unui depozit existent MaxNbOfRecordPerPage=Numărul maxim de înregistrări pe pagină -NotAuthorized=Dvs nu aveti dreptusa faceti aceasta. -SetDate=setează data -SelectDate=selectează data +NotAuthorized=Nu aveţi dreptul să faceţi asta. +SetDate=Setează data +SelectDate=Selectează data SeeAlso=Vezi şi %s SeeHere=Vezi aici ClickHere=Click aici @@ -79,12 +79,12 @@ FileRenamed=Fișierul a fost redenumit cu succes FileGenerated=Fișierul a fost generat cu succes FileSaved=Fișierul a fost salvat cu succes FileUploaded=Fişierul a fost încărcat cu succes -FileTransferComplete=Fișierul (fișierele) a fost încărcat cu succes -FilesDeleted=Fișierul (fișierele) a fost șters cu succes -FileWasNotUploaded=Un fișier este selectat pentru atașament, dar nu a fost încă încărcat. Clic pe "Ataşează fișier" pentru aceasta. +FileTransferComplete=Fișierul(fișierele) a fost încărcat cu succes +FilesDeleted=Fișierul(fișierele) a fost șters cu succes +FileWasNotUploaded=Un fișier este selectat pentru atașament, dar nu a fost încă încărcat. Clic pe "Ataşează fișier". NbOfEntries=Numărul de intrări GoToWikiHelpPage=Citeşte ajutorul online (Acces la Internet necesar) -GoToHelpPage=Citeşte Ajutorul +GoToHelpPage=Citeşte Ajutorul RecordSaved=Înregistrare salvată RecordDeleted=Înregistrare ştearsă RecordGenerated=Înregistrată generată @@ -93,34 +93,34 @@ NotDefined=Nedefinit DolibarrInHttpAuthenticationSoPasswordUseless=Modul de autentificare Dolibarr este setat la %s în fișierul de configurare conf.php .
    Aceasta înseamnă că baza de date pentru parole este externă pentru Dolibarr, deci schimbarea acestui câmp poate să nu aibă efect. Administrator=Administrator Undefined=Nedefinit -PasswordForgotten=Parola uitata ? -NoAccount=Fără cont? +PasswordForgotten=Ai uitat parola? +NoAccount=Nu ai cont? SeeAbove=Vezi mai sus HomeArea=Acasă LastConnexion=Ultima autentificare PreviousConnexion=Autentificarea anterioară -PreviousValue=Valoarea anterioară +PreviousValue=Valoare anterioară ConnectedOnMultiCompany=Conectat la entitatea ConnectedSince=Conectat de -AuthenticationMode=Mod Autentificare -RequestedUrl=URL Solicitare -DatabaseTypeManager=Tip gestiune Baza de date -RequestLastAccessInError=Ultima eroare de solicitare acces baza de date +AuthenticationMode=Mod autentificare +RequestedUrl=URL solicitat +DatabaseTypeManager=Tip manager bază de date +RequestLastAccessInError=Ultima eroare de solicitare acces la baza de date ReturnCodeLastAccessInError=Cod returnat pentru ultima eroare de acces la baza de date InformationLastAccessInError=Info pentru ultima eroare de acces la baza de date DolibarrHasDetectedError=Dolibarr a detectat o eroare tehnică -YouCanSetOptionDolibarrMainProdToZero=Puteți citi fișierul jurnal sau setați opțiunea $ dolibarr_main_prod la "0" din fișierul config pentru a obține mai multe informații. -InformationToHelpDiagnose=Aceste informații pot fi utile în scopuri de diagnoză (puteți seta opțiunea $ dolibarr_main_prod la "1" pentru a elimina aceste anunțuri) +YouCanSetOptionDolibarrMainProdToZero=Puteți citi fișierul jurnal sau setați opțiunea $dolibarr_main_prod la "0" din fișierul config pentru a obține mai multe informații. +InformationToHelpDiagnose=Aceste informații pot fi utile în scopuri de diagnoză (puteți seta opțiunea $dolibarr_main_prod la '1' pentru a elimina aceste notificări) MoreInformation=Mai multe informaţii -TechnicalInformation=Informații Tehnice -TechnicalID= ID Technic -LineID=Line ID -NotePublic=Notă (publică) -NotePrivate=Notă (privată) -PrecisionUnitIsLimitedToXDecimals=Dolibarr a fost de configurat pentru o limita de precizie pentru prețuri unitare la% s zecimale. +TechnicalInformation=Informații tehnice +TechnicalID=ID tehnic +LineID=ID linie +NotePublic=Notă(publică) +NotePrivate=Notă(privată) +PrecisionUnitIsLimitedToXDecimals=Dolibarr a fost de configurat cu o limită de precizie pentru prețuri unitare de %s zecimale. DoTest=Test ToFilter=Filtru -NoFilter=Fara filtru +NoFilter=Fără filtru WarningYouHaveAtLeastOneTaskLate=Atenție, aveți cel puțin un element care a depășit timpul de toleranță. yes=da Yes=Da @@ -135,12 +135,12 @@ MediaBrowser=Media browser Always=Întotdeauna Never=Niciodată Under=sub -Period=Perioada -PeriodEndDate=Data sfârșitului perioadei +Period=Perioadă +PeriodEndDate=Data sfârșit perioadă SelectedPeriod=Perioada selectată PreviousPeriod=Perioada anterioară -Activate=Activează -Activated=Activ +Activate=Activare +Activated=Activat Closed=Închide Closed2=Închis NotClosed=Nu este închisă @@ -152,10 +152,10 @@ Disabled=Dezactivat Add=Adaugă AddLink=Adaugă link RemoveLink=Eliminaţi link -AddToDraft=Adauga la draft +AddToDraft=Adaugă la schiţă Update=Modifică Close=Închide -CloseBox=Eliminați widgetul din tabloul de bord +CloseBox=Elimină widget-ul din tabloul de bord Confirm=Confirmă ConfirmSendCardByMail=Chiar doriți să trimiteți conținutul acestui card prin poștă la %s ? Delete=Şterge @@ -165,29 +165,29 @@ Cancel=Anulează Modify=Modifică Edit=Editează Validate=Validează -ValidateAndApprove=Validareaza si aproba +ValidateAndApprove=Validează şi aprobă ToValidate=De validat -NotValidated=Nu este validată +NotValidated=Nevalidată Save=Salvează SaveAs=Salvează ca -SaveAndStay=Save and stay -SaveAndNew=Save and new +SaveAndStay=Salvează şi rămâi aici +SaveAndNew=Salvează şi mergi la pagină nouă TestConnection=Test conexiune ToClone=Clonează -ConfirmCloneAsk=Are you sure you want to clone the object %s? +ConfirmCloneAsk=Eşti sigur că vrei să clonezi obiectul %s? ConfirmClone=Alegeți datele pe care doriți să le clonați: NoCloneOptionsSpecified=Nu există date definite pentru a clona . Of=de Go=Go Run=Lansează -CopyOf=Copie de -Show=Arăta +CopyOf=Copie la +Show=Afişează Hide=Ascunde ShowCardHere=Arăta fişa aici Search=Caută SearchOf=Căutare SearchMenuShortCut=Ctrl + shift + f -QuickAdd=Quick add +QuickAdd=Adăugare rapidă QuickAddMenuShortCut=Ctrl + shift + l Valid=Validează Approve=Aprobaţi @@ -210,12 +210,12 @@ Password=Parola PasswordRetype=Repetă parola NoteSomeFeaturesAreDisabled=Atenţie, o mulţime de funcţionalităţi / module sunt dezactivate în această demonstraţie. Name=Nume -NameSlashCompany=Numele/Compania -Person=Persoana +NameSlashCompany=Nume/Companie +Person=Persoană Parameter=Parametru Parameters=Parametri Value=Valoare -PersonalValue=Valoare Personală +PersonalValue=Valoare personalizată NewObject=Nou %s NewValue=Valoare nouă CurrentValue=Valoarea curentă @@ -226,7 +226,7 @@ MultiLanguage=Multilimbă Note=Notă Title=Titlu Label=Etichetă -RefOrLabel=Ref. sau eticheta +RefOrLabel=Ref. sau etichetă Info=Loguri Family=Familie Description=Descriere @@ -239,32 +239,32 @@ DefaultModel=Șablonul documentului implicit Action=Eveniment About=Despre Number=Număr -NumberByMonth=Numărul pe luni -AmountByMonth=Valoarea pe luni +NumberByMonth=Număr pe luni +AmountByMonth=Valoare pe luni Numero=Număr -Limit=Limita +Limit=Limită Limits=Limite Logout=Deconectare NoLogoutProcessWithAuthMode=Nu există funcție de deconectare ce poate fi aplicată cu modul de autentificare %s -Connection=Login +Connection=Autentificare Setup=Setări -Alert=Alerta +Alert=Alertă MenuWarnings=Alerte Previous=Precedent Next=Următor Cards=Fişe Card=Fişă Now=Acum -HourStart=Ora Start +HourStart=Oră start Date=Dată -DateAndHour=Data şi ora +DateAndHour=Dată şi oră DateToday=Astazi -DateReference=Data Referinţă +DateReference=Data referinţă DateStart=Dată începere DateEnd=Dată sfîrşit DateCreation=Dată creare -DateCreationShort=Data Creare -DateModification=Dată modificarea +DateCreationShort=Dată creare +DateModification=Dată modificare DateModificationShort=Dată modif. DateLastModification=Data ultimei modificări DateValidation=Dată validare @@ -272,22 +272,22 @@ DateClosing=Dată închidere DateDue=Dată scadenţă DateValue=Dată decontare DateValueShort=Dată decontare -DateOperation=Dată operaţie +DateOperation=Dată operare DateOperationShort=Dată ope. DateLimit=Dată limită -DateRequest=Dată cerere -DateProcess=Dată Procesare +DateRequest=Data solicitării +DateProcess=Data procesării DateBuild=Dată generare raport DatePayment=Data plății -DateApprove=Data Aprobare -DateApprove2=Data aprobare (a doua aprobare) -RegistrationDate=Data Înregistrării -UserCreation=Utilizator de creare -UserModification=Utilizator de modificare -UserValidation=Utilizator de validare -UserCreationShort=Utilizator de creare -UserModificationShort=Utilizator de modificare -UserValidationShort=Utilizator de validare +DateApprove=Data aprobare +DateApprove2=Data aprobare(a doua aprobare) +RegistrationDate=Data înregistrării +UserCreation=Utilizatorul care a creat +UserModification=Utilizatorul care a modificat +UserValidation=Utilizatorul care a validat +UserCreationShort=Utilizatorul creator +UserModificationShort=Utilizatorul modificator +UserValidationShort=Utilizatorul valitator DurationYear=an DurationMonth=lună DurationWeek=săptămână @@ -323,13 +323,13 @@ HourShort=H MinuteShort=mn Rate=Rată CurrencyRate=Rata de conversie valutară -UseLocalTax=Include taxa -Bytes=Bytes -KiloBytes=Kilobytes -MegaBytes=Megabytes +UseLocalTax=Include taxe +Bytes=Octeţi +KiloBytes=Kiloocteţi +MegaBytes=Megaocteţi GigaBytes=Gigaocteţi -TeraBytes=Terabytes -UserAuthor=Utilizator al creației +TeraBytes=Teraocteţi +UserAuthor=Utilizatorul creator UserModif=Utilizatorul ultimei actualizări b=b. Kb=Kb @@ -341,54 +341,54 @@ Copy=Copiază Paste=Lipeşte Default=Implicit DefaultValue=Valoare implicită -DefaultValues=Valori/filtre/sortare implicite  +DefaultValues=Valori/filtre/sortare implicite Price=Preţ -PriceCurrency=Preț (valută) +PriceCurrency=Preț(valută) UnitPrice=Preţ unitar -UnitPriceHT=Prețul unitar (exclusiv) -UnitPriceHTCurrency=Prețul unitar (exclusiv) (fără valută) +UnitPriceHT=Prețul unitar(fără taxe) +UnitPriceHTCurrency=Prețul unitar(fără taxe)(fără valută) UnitPriceTTC=Preț unitar -PriceU=UP -PriceUHT=UP (net) -PriceUHTCurrency=U.P (moneda) -PriceUTTC=U.P. (inc. tax) +PriceU=P.U. +PriceUHT=PU(net) +PriceUHTCurrency=P.U (monedă) +PriceUTTC=P.U.(incl. taxe) Amount=Valoare -AmountInvoice=Valoare Factură +AmountInvoice=Valoare factură AmountInvoiced=Suma facturată -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Sumă facturată (fără TVA) +AmountInvoicedTTC=Valoare facturată (incl. taxe) AmountPayment=Valoare de plată -AmountHTShort=Sumă (exclusiv) -AmountTTCShort=Valoare (inc. taxe) -AmountHT=Sumă (fără taxă) -AmountTTC=Valoare (inc. taxe) -AmountVAT=Valoare TVA -MulticurrencyAlreadyPaid=Plătit deja, moneda inițială -MulticurrencyRemainderToPay=Rămas de plată, moneda inițială -MulticurrencyPaymentAmount=Suma plății, moneda inițială -MulticurrencyAmountHT=Sumă (fără taxă), moneda inițială -MulticurrencyAmountTTC=Valoare (inc. tax), moneda originala -MulticurrencyAmountVAT=Valoare tax, moneda originala +AmountHTShort=Sumă (fără taxe) +AmountTTCShort=Valoare (cu taxe) +AmountHT=Sumă (fără taxe) +AmountTTC=Valoare (cu taxe) +AmountVAT=Valoare TVA +MulticurrencyAlreadyPaid=Plătit deja, în moneda inițială +MulticurrencyRemainderToPay=Rămas de plată, în moneda inițială +MulticurrencyPaymentAmount=Suma de plată, în moneda inițială +MulticurrencyAmountHT=Sumă (fără taxe), în moneda inițială +MulticurrencyAmountTTC=Valoare (cu taxe), în moneda originală +MulticurrencyAmountVAT=Valoare taxe, în moneda originală AmountLT1=Valoare taxă 2 AmountLT2=Valoare taxă 3 -AmountLT1ES=Valoare RE -AmountLT2ES=Valoare IRPF -AmountTotal=Valoare totală +AmountLT1ES=Valoare RE +AmountLT2ES=Valoare IRPF +AmountTotal=Valoare totală AmountAverage=Valoare medie -PriceQtyMinHT=Preţ cantitate min. (fără taxă) -PriceQtyMinHTCurrency=Preţ cantitate min. (fără taxă) (valută) +PriceQtyMinHT=Preţ cantitate min. (fără taxe) +PriceQtyMinHTCurrency=Preţ cantitate min. (fără taxe) (valută) Percentage=Procentaj Total=Total SubTotal=Subtotal -TotalHTShort=Total (exclusiv) -TotalHT100Short=Total 100%% (excl.) -TotalHTShortCurrency=Total (exclusiv în valută) -TotalTTCShort=Total (inc. tax) -TotalHT=Total (fără taxă) +TotalHTShort=Total (fără taxe) +TotalHT100Short=Total 100%% (fără taxe) +TotalHTShortCurrency=Total (fără taxe în valută) +TotalTTCShort=Total (cu taxe) +TotalHT=Total (fără taxe) TotalHTforthispage=Total (fără taxă) pentru această pagină Totalforthispage=Total pentru această pagină TotalTTC=Total (inc. tax) -TotalTTCToYourCredit=Total (taxa Inc) în creditul dvs +TotalTTCToYourCredit=Total (taxa Inc) în creditul dvs TotalVAT=Total TVA TotalVATIN=Total IGST TotalLT1=Total tax 2 @@ -403,8 +403,8 @@ INCVATONLY=Include TVA INCT=Include toate taxele VAT=TVA VATIN=IGST -VATs=Taxe Vanzari -VATINs=Taxele IGST +VATs=Taxe vânzări +VATINs=Taxe IGST LT1=Impozitul pe vânzări 2 LT1Type=Tip impozit pe vânzări 2 LT2=Impozitul pe vânzări 3 @@ -413,11 +413,11 @@ LT1ES=RE LT2ES=IRPF LT1IN=CGST LT2IN=SGST -LT1GC=Additionnal cents +LT1GC=Procente adiţionale VATRate=Taxa TVA -VATCode=Codul ratei de impozitare +VATCode=Cod cotă TVA VATNPR=Rata impozitului NPR -DefaultTaxRate=Impozitul implicit +DefaultTaxRate=Cotă taxă implicită Average=Medie Sum=Suma Delta=Delta @@ -425,66 +425,67 @@ StatusToPay=De plată RemainToPay=Rămas de plată Module=Modul/Aplicaţie Modules=Module/Aplicații -Option=Opţiunea -List=Lista -FullList=Lista completă -FullConversation=Full conversation +Option=Opţiune +List=Listă +FullList=Listă completă +FullConversation=Conversaţie integrală Statistics=Statistici OtherStatistics=Alte statistici Status=Status Favorite=Favorite ShortInfo=Info. Ref=Ref. -ExternalRef=Ref. externa +ExternalRef=Ref. externă RefSupplier=Ref. furnizor RefPayment=Ref. plată -CommercialProposalsShort=Oferte Comerciale +CommercialProposalsShort=Oferte comerciale Comment=Comentează Comments=Comentarii ActionsToDo=Evenimente de făcut -ActionsToDoShort=De facut +ActionsToDoShort=De făcut ActionsDoneShort=Făcut ActionNotApplicable=Nu se aplică -ActionRunningNotStarted=De realizat -ActionRunningShort=In progres +ActionRunningNotStarted=De început +ActionRunningShort=În progres ActionDoneShort=Terminat ActionUncomplete=Incomplet -LatestLinkedEvents=Ultimele %sevenimente legate -CompanyFoundation=Compania / Organizația +LatestLinkedEvents=Ultimele %s evenimente asociate +CompanyFoundation=Companie/Organizație Accountant=Contabil ContactsForCompany=Contacte pentru aceast terţ ContactsAddressesForCompany=Contacte pentru aceast terţ AddressesForCompany=Adrese pentru acest terţ ActionsOnCompany=Evenimente pentru acest terț -ActionsOnContact=Evenimente pentru acest contact/adresa -ActionsOnContract=Events for this contract -ActionsOnMember=Evenimente privind acest membru +ActionsOnContact=Evenimente pentru acest contact/adresă +ActionsOnContract=Evenimente pentru acest contract +ActionsOnMember=Evenimente privind acest membru ActionsOnProduct=Evenimente despre acest produs -NActionsLate=%s întârziat -ToDo=De facut +NActionsLate=%s întârziat +ToDo=De făcut Completed=Complet -Running=In progres -RequestAlreadyDone=Cerere deja înregistrată +Running=În progres +RequestAlreadyDone=Cerere deja înregistrată Filter=Filtru -FilterOnInto=Criteriu Cautare '%s' in campurile %s +FilterOnInto=Criteriu Cautare '%s' in câmpurile %s RemoveFilter=Îndepărtați filtrul -ChartGenerated=Grafice generate +ChartGenerated=Grafice generate ChartNotGenerated=Grafic negenerat -GeneratedOn=Generat pe % s +GeneratedOn=Generat pe %s Generate=Generează -Duration=Durata +Duration=Durată TotalDuration=Durată totală Summary=Sumar -DolibarrStateBoard=Statisticile bazei de date -DolibarrWorkBoard=Deschideți Elementele -NoOpenedElementToProcess=No open element to process +DolibarrStateBoard=Statistici bază de date +DolibarrWorkBoard=Deschideți elementele +NoOpenedElementToProcess=Nici un element deschis care trebuie procesat Available=Disponibil NotYetAvailable=Nedisponibil încă -NotAvailable=Nedisponibil -Categories=Tag-uri / categorii -Category=Tag / categorie +NotAvailable=Indisponibil +Categories=Tag-uri/categorii +Category=Tag/categorie By=Pe From=De la +FromDate=De la FromLocation=De la to=la To=la @@ -500,7 +501,7 @@ ApprovedBy=Aprobat de ApprovedBy2=Aprobat de (a doua aprobare) Approved=Aprobat Refused=Refuzat -ReCalculate=Recalculează +ReCalculate=Recalculare ResultKo=Eşec Reporting=Raportare Reportings=Rapoarte @@ -510,7 +511,7 @@ StatusInterInvoiced=Facturată Validated=Validat Opened=Deschis OpenAll=Deschise (Toate) -ClosedAll=Închise (toate) +ClosedAll=Închise (Toate) New=Nou Discount=Discount Unknown=Necunoscut @@ -518,13 +519,13 @@ General=General Size=Dimensiune OriginalSize=Dimensiunea originală Received=Primit -Paid=Platit +Paid=Plătit Topic=Subiect -ByCompanies=Pe terți +ByCompanies=După terți ByUsers=De către utilizator Links=Link-uri Link=Link -Rejects=Respinge +Rejects=Respingeri Preview=Previzualizare NextStep=Etapa următoare Datas=Date @@ -533,17 +534,17 @@ NoneF=Niciunul NoneOrSeveral=Niciunul sau mai multe Late=Întârziat LateDesc=Un element este definit ca Întârziat conform configurației sistemului din meniul Acasă - Configurare - Alerte. -NoItemLate=Nici un articol târziu +NoItemLate=Nimic întârziat Photo=Foto Photos=Fotografii -AddPhoto=Adauga Foto -DeletePicture=Şterge Foto +AddPhoto=Adaugă foto +DeletePicture=Şterge foto ConfirmDeletePicture=Confirmaţi ştergere foto ? -Login=Login +Login=Autentificare LoginEmail=Autentificare (email) LoginOrEmail=Autentificare sau Email CurrentLogin=Login curent -EnterLoginDetail=Introduceți datele de autentificare +EnterLoginDetail=Introduceți datele de autentificare January=Ianuarie February=Februarie March=Martie @@ -610,7 +611,7 @@ File=Fișier Files=Fişiere NotAllowed=Nepermis ReadPermissionNotAllowed=Citirea nu este permisă -AmountInCurrency=Valoare în moneda %s +AmountInCurrency=Valoare în moneda %s Example=Exemplu Examples=Exemple NoExample=Nu exemplu @@ -632,7 +633,7 @@ Internals=Interne Externals=Extern Warning=Atenţie Warnings=Avertismente -BuildDoc=Generează Doc +BuildDoc=Generează Doc Entity=Mediu Entities=Entităţile CustomerPreview=Preview Client @@ -666,7 +667,7 @@ Owner=Proprietar FollowingConstantsWillBeSubstituted=Următoarele constante vor fi înlocuite cu valoarea corespunzătoare. Refresh=Refresh BackToList=Inapoi la lista -BackToTree=Back to tree +BackToTree=Înapoi la arbore GoBack=Du-te înapoi CanBeModifiedIfOk=Poate fi modificat, dacă e valid CanBeModifiedIfKo=Poate fi modificat, dacă nu e valid @@ -674,7 +675,7 @@ ValueIsValid=Valoarea este validă ValueIsNotValid=Valoarea nu este validă RecordCreatedSuccessfully=Înregistrarea creată cu succes RecordModifiedSuccessfully=Înregistrare modificată cu succes -RecordsModified=Înregistrările (Înregistrarea) %s au fost modificate +RecordsModified=Înregistrările (Înregistrarea) %s au fost modificate RecordsDeleted=Înregistrările (Înregistrarea) %s au fost șterse RecordsGenerated=Înregistrările (Înregistrarea) generate de %s AutomaticCode=Cod automat @@ -687,6 +688,7 @@ Method=Metoda Receive=Recepţionează CompleteOrNoMoreReceptionExpected=Completă sau nimic de așteptat ExpectedValue=Valoarea estimată +ExpectedQty=Cantitate aşteptată PartialWoman=Parţial TotalWoman=Total NeverReceived=Niciodată primit @@ -703,8 +705,9 @@ MenuECM=Documente MenuAWStats=AWStats MenuMembers=Membri MenuAgendaGoogle=Agenda Google -ThisLimitIsDefinedInSetup=Limită Dolibarr (Menu Home-setup-securitate): %s Kb, PHP limita: %s Kb -NoFileFound=Niciun document salvat în acest director, +MenuTaxesAndSpecialExpenses=Taxe | Cheltuieli speciale +ThisLimitIsDefinedInSetup=Limită Dolibarr (Menu Home-setup-securitate): %s Kb, PHP limita: %s Kb +NoFileFound=Niciun document salvat în acest director, CurrentUserLanguage=Limba curentă CurrentTheme=Tema curentă CurrentMenuManager=Manager meniu curent @@ -719,13 +722,13 @@ DateOfSignature=Data semnării HidePassword=Afișare comanda cu parola ascunsă UnHidePassword=Afișare comanda reală cu parola în clar Root=Rădăcină -RootOfMedias=Root of public medias (/medias) +RootOfMedias=Director rădăcină pentru media public (/medias) Informations=Informatie Page=Pagină Notes=Note AddNewLine=Adaugă linie nouă AddFile=Adaugă fişier -FreeZone=Nu este un produs/serviciu predefinit +FreeZone=Text liber pentru produs FreeLineOfType=Element text gratuit, tip: CloneMainAttributes=Clonează obiect cu atributele sale principale ReGeneratePDF=Regenerați PDF @@ -736,7 +739,7 @@ PrintContentArea=Afişaţi pagina pentru imprimat în zona conţinutului princip MenuManager=Manager Meniu WarningYouAreInMaintenanceMode=Atenție, sunteți în modul de întreținere: este permisă numai utilizarea sistemului de conectare %s în acest mod. CoreErrorTitle=Eroare de sistem -CoreErrorMessage=Scuze, a aparut o eroare. Contactați administratorul de sistem pentru a verifica jurnalele sau dezactivați $ dolibarr_main_prod = 1 pentru a obține mai multe informații. +CoreErrorMessage=Scuze, a aparut o eroare. Contactați administratorul de sistem pentru a verifica jurnalele sau dezactivați $ dolibarr_main_prod = 1 pentru a obține mai multe informații. CreditCard=Card de credit ValidatePayment=Validează plata CreditOrDebitCard=Card de credit sau debit @@ -748,7 +751,7 @@ NotSupported=Nesuportat RequiredField=Câmp obligatoriu Result=Rezultat ToTest=Testează -ValidateBefore=Item must be validated before using this feature +ValidateBefore=Elementul trebuie validat înainte de a utiliza această caracteristică Visibility=Vizibilitate Totalizable=Totalizabil TotalizableDesc=Acest câmp este totalizat în listă @@ -776,7 +779,7 @@ LinkToSupplierProposal=Link la propunerea vânzătorului LinkToSupplierInvoice=Link la factura furnizorului LinkToContract=Link la contract LinkToIntervention=Link la intervenție -LinkToTicket=Link to ticket +LinkToTicket=Link la tichet CreateDraft=Creareză schiţă SetToDraft=Inapoi la schiţă ClickToEdit=Clic pentru a edita @@ -792,7 +795,7 @@ ByMonthYear=Pe luna / an ByYear=Pe ani ByMonth=Pe luni ByDay=Pe zi -BySalesRepresentative=Pe reprezentant de vânzări +BySalesRepresentative=Pe reprezentant de vânzări LinkedToSpecificUsers=Link către un contact utilizator particular NoResults=Niciun Rezultat AdminTools=Instrumente de administrare @@ -823,27 +826,27 @@ AddBox=Adauga box SelectElementAndClick=Selectați un element și faceți clic pe %s PrintFile=Printeaza Fisierul %s ShowTransaction=Afișați intrarea în contul bancar -ShowIntervention=Afişează intervenţie +ShowIntervention=Afişează intervenţie ShowContract=Afişează contract GoIntoSetupToChangeLogo=Accesați Acasă - Configurare - Companie pentru a schimba logo-ul sau Accesați Acasă - Configurare - Afișare pentru ascundere. Deny=Respinge Denied=Respins ListOf=Listă de %s -ListOfTemplates=Listă template-uri +ListOfTemplates=Listă template-uri Gender=Gen Genderman=Barbat Genderwoman=Femeie ViewList=Vedere listă -ViewGantt=Gantt view -ViewKanban=Kanban view +ViewGantt=Vedere Gantt +ViewKanban=Vedere Kanban Mandatory=Obligatoriu Hello=Salut GoodBye=La revedere Sincerely=Cu sinceritate -ConfirmDeleteObject=Are you sure you want to delete this object? +ConfirmDeleteObject=Eşti sigur că vrei să ştergi acest obiect? DeleteLine=Şterge linie ConfirmDeleteLine=Sigur doriți să ștergeți această linie? -ErrorPDFTkOutputFileNotFound=Error: the file was not generated. Please check that the 'pdftk' command is installed in a directory included in the $PATH environment variable (linux/unix only) or contact your system administrator. +ErrorPDFTkOutputFileNotFound=Eroare: fişierul nu a fost generat. Verifică dacă comanda 'pdftk' este instalată într-un director inclus în variabila de sistem $PATH (doar în linux/unix) sau contactează administratorul sistemului. NoPDFAvailableForDocGenAmongChecked=Nu au fost disponibile PDF-uri pentru generarea de documente printre înregistrările înregistrate TooManyRecordForMassAction=Prea multe înregistrări selectate pentru acțiuni în masă. Acțiunea este limitată la o listă de %s înregistrări. NoRecordSelected=Nu a fost selectată nicio înregistrare @@ -858,18 +861,18 @@ Progress=Progres ProgressShort=Progr. FrontOffice=Front office BackOffice=Back office -Submit=Submit +Submit=Trimite View=Vizualizare Export=Export Exports=Exporturi ExportFilteredList=Exportați lista filtrată ExportList=Exportați lista ExportOptions=Opţiuni Export -IncludeDocsAlreadyExported=Include docs already exported -ExportOfPiecesAlreadyExportedIsEnable=Export of pieces already exported is enable -ExportOfPiecesAlreadyExportedIsDisable=Export of pieces already exported is disable -AllExportedMovementsWereRecordedAsExported=All exported movements were recorded as exported -NotAllExportedMovementsCouldBeRecordedAsExported=Not all exported movements could be recorded as exported +IncludeDocsAlreadyExported=Include documentele deja exportate +ExportOfPiecesAlreadyExportedIsEnable=Exportul elementelor deja exportate este activat +ExportOfPiecesAlreadyExportedIsDisable=Exportul elementelor deja exportate este dezactivat +AllExportedMovementsWereRecordedAsExported=Toate mişcările exportate au fost înegistrate ca exportate +NotAllExportedMovementsCouldBeRecordedAsExported=Nu toate mişcările exportate au putut fi înregistrate ca exportate Miscellaneous=Diverse Calendar=Calendar GroupBy=A se grupa cu... @@ -882,7 +885,7 @@ Download=Descarcă DownloadDocument=Descărcați documentul ActualizeCurrency=Actualizați cursul valutar Fiscalyear=An fiscal -ModuleBuilder=Module and Application Builder +ModuleBuilder=Dezvoltator de module şi aplicaţii SetMultiCurrencyCode=Setați moneda BulkActions=Acțiunile în masă ClickToShowHelp=Faceți clic pentru a afișa instrumente pentru ajutor @@ -942,6 +945,39 @@ ShortThursday=J ShortFriday=V ShortSaturday=S ShortSunday=D +one=unu +two=doi +three=trei +four=patru +five=cinci +six=şase +seven=şapte +eight=opt +nine=nouă +ten=zece +eleven=unsprezece +twelve=doisprezece +thirteen=treisprezece +fourteen=paisprezece +fifteen=cincisprezece +sixteen=şaisprezece +seventeen=şaptesprezece +eighteen=optsprezece +nineteen=nouăsprezece +twenty=douăzeci +thirty=treizeci +forty=patruzeci +fifty=cincizeci +sixty=şaizeci +seventy=şaptezeci +eighty=optzeci +ninety=nouăzeci +hundred=sută +thousand=mie +million=milion +billion=miliard +trillion=trilion +quadrillion=cvadrilion SelectMailModel=Selectați un șablon de email SetRef=Set ref Select2ResultFoundUseArrows=S-au găsit câteva rezultate. Utilizați săgețile pentru a selecta. @@ -958,11 +994,11 @@ SearchIntoMembers=Membri SearchIntoUsers=Utilizatori SearchIntoProductsOrServices=Produse sau servicii SearchIntoProjects=Proiecte -SearchIntoMO=Manufacturing Orders +SearchIntoMO=Comenzi de producţie SearchIntoTasks=Taskuri SearchIntoCustomerInvoices=Facturi Clienţi SearchIntoSupplierInvoices=Facturi Furnizori -SearchIntoCustomerOrders=Ordine de vânzări +SearchIntoCustomerOrders=Ordine de vânzări SearchIntoSupplierOrders=Comenzile de achiziție SearchIntoCustomerProposals=Oferte Comerciale SearchIntoSupplierProposals=Propunerile furnizorilor @@ -974,11 +1010,11 @@ SearchIntoLeaves=Concediu SearchIntoTickets=Tichete CommentLink=Comentarii NbComments=Număr de comentarii -CommentPage=Spațiu de comentarii +CommentPage=Spațiu de comentarii CommentAdded=Comentariu adăugat CommentDeleted=Comentariul șters Everybody=Toată lumea -PayedBy=Plătite de +PayedBy=Plătite de PayedTo=Plătit lui Monthly=Lunar Quarterly=Trimestrial @@ -996,46 +1032,54 @@ YouAreCurrentlyInSandboxMode=În prezent, sunteți în %s modul "sandbox" Inventory=Inventar AnalyticCode=Codul analitic TMenuMRP=MRP -ShowMoreInfos=Show More Infos -NoFilesUploadedYet=Please upload a document first -SeePrivateNote=See private note -PaymentInformation=Payment information -ValidFrom=Valid from -ValidUntil=Valid until -NoRecordedUsers=No users -ToClose=To close +ShowMoreInfos=Arată mai multe informaţii +NoFilesUploadedYet=Încarcă un document mai întâi +SeePrivateNote=Afişare notă privată +PaymentInformation=Informaţii plată +ValidFrom=Valid de la +ValidUntil=Valid până la +NoRecordedUsers=Nici un utilizator +ToClose=De închis ToProcess=De procesat -ToApprove=To approve -GlobalOpenedElemView=Global view -NoArticlesFoundForTheKeyword=No article found for the keyword '%s' -NoArticlesFoundForTheCategory=No article found for the category -ToAcceptRefuse=To accept | refuse +ToApprove=De aprobat +GlobalOpenedElemView=Vedere globală +NoArticlesFoundForTheKeyword=Nici un articol găsit pentru expresia '%s' +NoArticlesFoundForTheCategory=Nici un articol în această categorie +ToAcceptRefuse=De acceptat | refuzat ContactDefault_agenda=Eveniment ContactDefault_commande=Comanda ContactDefault_contrat=Contract ContactDefault_facture=Factură ContactDefault_fichinter=Intervenţie -ContactDefault_invoice_supplier=Supplier Invoice -ContactDefault_order_supplier=Purchase Order +ContactDefault_invoice_supplier=Factură furnizor +ContactDefault_order_supplier=Comandă de achiziţie ContactDefault_project=Proiect ContactDefault_project_task=Task -ContactDefault_propal=Ofertă -ContactDefault_supplier_proposal=Supplier Proposal +ContactDefault_propal=Ofertă +ContactDefault_supplier_proposal=Ofertă furnizor ContactDefault_ticket=Tichet -ContactAddedAutomatically=Contact added from contact thirdparty roles -More=More -ShowDetails=Show details -CustomReports=Custom reports -StatisticsOn=Statistics on -SelectYourGraphOptionsFirst=Select your graph options to build a graph -Measures=Measures -XAxis=X-Axis -YAxis=Y-Axis -StatusOfRefMustBe=Status of %s must be %s -DeleteFileHeader=Confirm file delete -DeleteFileText=Do you really want delete this file? -ShowOtherLanguages=Show other languages -SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for this language -NotUsedForThisCustomer=Not used for this customer -AmountMustBePositive=Amount must be positive -ByStatus=By status +ContactAddedAutomatically=Contact adăugat din rolurile de contact al terţului +More=Mai mult +ShowDetails=Arată detalii +CustomReports=Rapoarte personalizate +StatisticsOn=Statistici pentru +SelectYourGraphOptionsFirst=Selectează opţiunile pentru a construi un grafic +Measures=Dimensiuni +XAxis=Axa X +YAxis=Axa Y +StatusOfRefMustBe=Status-ul %s trebuie să fie %s +DeleteFileHeader=Confirmare ştergere fişier +DeleteFileText=Eşti sigur că vrei să ştergi acest fişier? +ShowOtherLanguages=Afişare alte limbi +SwitchInEditModeToAddTranslation=Comută în modul editare pentru a adăuga traduceri pentru această limbă +NotUsedForThisCustomer=Neutilizat pentru acest client +AmountMustBePositive=Suma trebuie să fie pozitivă +ByStatus=După status +InformationMessage=Informaţie +Used=Used +ASAP=Cât Mai Repede Posibil +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ro_RO/margins.lang b/htdocs/langs/ro_RO/margins.lang index f5fd2b7a1e8..38a23322f9f 100644 --- a/htdocs/langs/ro_RO/margins.lang +++ b/htdocs/langs/ro_RO/margins.lang @@ -16,29 +16,30 @@ MarginDetails=Detalii Marjă ProductMargins=Marjă Produs CustomerMargins=Marje Client SalesRepresentativeMargins=Marje Reprezentanţi vănzări +ContactOfInvoice=Contact pentru factură UserMargins=Marje Utilizator ProductService=Produs sau serviciu AllProducts=Toate produsele şi serviciile ChooseProduct/Service=Alege produs sau serviciu -ForceBuyingPriceIfNull=Force buying/cost price to selling price if not defined -ForceBuyingPriceIfNullDetails=If buying/cost price not defined, and this option "ON", margin will be zero on line (buying/cost price = selling price), otherwise ("OFF"), marge will be equal to suggested default. +ForceBuyingPriceIfNull=Forțaţi prețul de cumpărare / de cost la prețul de vânzare, dacă nu este definit +ForceBuyingPriceIfNullDetails=Dacă prețul de cumpărare / cost nu este definit și această opțiune este "ON", marja va fi zero pe linie (cumpărarea / prețul de cost = prețul de vânzare), în caz contrar ("OFF"), marginea va fi egală cu cea indicată. MARGIN_METHODE_FOR_DISCOUNT=Metoda marje pentru discounturi globale UseDiscountAsProduct=Ca produs UseDiscountAsService=Ca serviciu UseDiscountOnTotal=Pe subtotal MARGIN_METHODE_FOR_DISCOUNT_DETAILS=Definiti daca discontul global e tratat ca un produs, serviciu, sau numai pe total la calcularea marjei. -MARGIN_TYPE=Buying/Cost price suggested by default for margin calculation -MargeType1=Margin on Best vendor price -MargeType2=Margin on Weighted Average Price (WAP) -MargeType3=Margin on Cost Price -MarginTypeDesc=* Margin on best buying price = Selling price - Best vendor price defined on product card
    * Margin on Weighted Average Price (WAP) = Selling price - Product Weighted Average Price (WAP) or best supplier price if WAP not yet defined
    * Margin on Cost price = Selling price - Cost price defined on product card or WAP if cost price not defined, or best supplier price if WAP not yet defined +MARGIN_TYPE=Prețul de cumpărare / cost sugerat implicit pentru calcularea marjei +MargeType1=Marja la prețul cel mai bun al furnizororului +MargeType2=Marja privind prețul mediu ponderat (WAP) +MargeType3=Marja pe prețul de cost +MarginTypeDesc=* Marja la prețul cel mai bun de cumpărare = Prețul de vânzare - Cel mai bun preț al furnizorului definit pe cardul de produs
    * Marja pe prețul mediu ponderat (WAP) = Prețul de vânzare - prețul mediu ponderat al produsului(WAP)sau cel mai bun preț al furnizorului dacă WAP nu este definit încă
    Marja pe prețul de preț = prețul de vânzare - prețul de cost definit pe cardul de produs sau WAP dacă prețul de cost nu este definit sau cel mai bun preț al vânzătorului dacă WAP nu este încă definit CostPrice=Preţ de cost UnitCharges=Cheluieli unitare Charges=Cheltuieli AgentContactType=Tip contact agent comercial -AgentContactTypeDetails=Defineşte ce tip de contact ( legat pe factură) va fi utilizat pentru raportul marjei pe reprezentanti de vânzări +AgentContactTypeDetails= Definiți ce tip de contact (legat pe facturi) va fi utilizat pentru raportarea marjei pentru fiecare persoană de contact / adresă. Rețineți că citirea statisticilor referitoare la un contact nu este fiabilă, deoarece în cele mai multe cazuri, contactul nu poate fi definit explicit pe facturi. rateMustBeNumeric=Rata trebuie să fie numerică markRateShouldBeLesserThan100=Rata mîrcii trebuie să fie mai mica de 100 ShowMarginInfos=Arată informaţii marjă -CheckMargins=Margins detail -MarginPerSaleRepresentativeWarning=The report of margin per user use the link between third parties and sale representatives to calculate the margin of each sale representative. Because some thirdparties may not have any ddiated sale representative and some thirdparties may be linked to several, some amounts may not be included into this report (if there is no sale representative) and some may appear on different lines (for each sale representative). +CheckMargins=Detaliu marjă +MarginPerSaleRepresentativeWarning=Raportul privind marja per utilizator utilizează legătura dintre terți și reprezentanții de vânzare pentru a calcula marja fiecărui reprezentant de vânzare. Deoarece unii terți nu pot avea un reprezentant dedicat vânzării și unii terți pot fi legate de mai mulți, este posibil ca anumite sume să nu fie incluse în acest raport (dacă nu există reprezentant de vânzare) și unele pot apărea pe diferite linii (pentru fiecare reprezentant de vânzare) . diff --git a/htdocs/langs/ro_RO/members.lang b/htdocs/langs/ro_RO/members.lang index e309826e690..973f720f105 100644 --- a/htdocs/langs/ro_RO/members.lang +++ b/htdocs/langs/ro_RO/members.lang @@ -7,7 +7,7 @@ Members=Membri ShowMember=Arată fişa Membru UserNotLinkedToMember=Utilizator nelegat la un Membru ThirdpartyNotLinkedToMember=Terț care nu este legat de un membru -MembersTickets=Etichete Membri +MembersTickets=Tichete Membri FundationMembers=Membri Asociaţiei ListOfValidatedPublicMembers=Listă Membri publici validaţi ErrorThisMemberIsNotPublic=Acest membru nu este public @@ -29,7 +29,7 @@ MenuMembersUpToDate=Membri cu cotizaţia la zi MenuMembersNotUpToDate=Membri fără cotizaţia la zi MenuMembersResiliated=Membrii desființați MembersWithSubscriptionToReceive=Membri cu cotizaţia de încasat -MembersWithSubscriptionToReceiveShort=Subscription to receive +MembersWithSubscriptionToReceiveShort=Cotizaţie de încasat DateSubscription=Data Adeziune DateEndSubscription=Dată Sfârşit Adeziune EndSubscription=Sfârşit Adeziune @@ -52,6 +52,9 @@ MemberStatusResiliated=Membru desființat MemberStatusResiliatedShort=Desființat MembersStatusToValid=Membri schiţă MembersStatusResiliated=Membrii desființați +MemberStatusNoSubscription=Validată(nu este necesară cotizarea) +MemberStatusNoSubscriptionShort=Validată +SubscriptionNotNeeded=Nu este necesară cotizarea NewCotisation=Cotizaţie nouă PaymentSubscription=Plată cotizaţie nouă SubscriptionEndDate=Data de final a adeziunii @@ -78,7 +81,7 @@ DeleteType=Şterge VoteAllowed=Drept de vot Physical=Fizică Moral=Morală -MorPhy=Morală / fizică +MorPhy=Personalitate juridică Reenable=Reactivaţi ResiliateMember=Desfiinţaţi un membru ConfirmResiliateMember=Sigur doriți să desfiinţaţi acest membru? @@ -172,7 +175,7 @@ MembersStatisticsDesc=Alege statisticile pe care doriţi să le citiţi ... MenuMembersStats=Statistici LastMemberDate=Ultima dată de membru LatestSubscriptionDate=Ultima dată de abonament -MemberNature=Nature of member +MemberNature=Natură membru Public=Profil public NewMemberbyWeb=Membru nou adăugat. În aşteptarea validării NewMemberForm=Formular Membru nou @@ -198,4 +201,4 @@ SendReminderForExpiredSubscriptionTitle=Trimiteți un memento prin email pentru SendReminderForExpiredSubscription=Trimiteți un memento prin email membrilor când abonamentul este pe cale să expire (parametrul este numărul de zile înainte de încheierea abonamentului pentru a trimite o reamintire. Poate fi o listă de zile separate prin punct și virgulă, de exemplu '10; 5; 0; -5 „) MembershipPaid=Abonament plătit pentru perioada curentă (până la %s) YouMayFindYourInvoiceInThisEmail=Găsiți factura dvs. atașată acestui email -XMembersClosed=%s member(s) closed +XMembersClosed=%s membru(i) închis diff --git a/htdocs/langs/ro_RO/modulebuilder.lang b/htdocs/langs/ro_RO/modulebuilder.lang index b7d02b6dd7b..090269ab52f 100644 --- a/htdocs/langs/ro_RO/modulebuilder.lang +++ b/htdocs/langs/ro_RO/modulebuilder.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - loan -ModuleBuilderDesc=This tool must be used only by experienced users or developers. It provides utilities to build or edit your own module. Documentation for alternative manual development is here. +ModuleBuilderDesc=Acest instrument poate fi folosit doar de utilizatori cu experiență sau dezvoltatori de software. Oferă facilităţi pentru a vă construi sau edita propriul modul. Documentația pentru dezvoltare software alternativă se găsește aici. EnterNameOfModuleDesc=Introduceți numele modulului/aplicației pentru a crea fără spații. Utilizați majusculă pentru a separa cuvintele (De exemplu: MyModule, EcommerceForShop, SyncWithMySystem ...) EnterNameOfObjectDesc=Introduceți numele obiectului de creat fără spații. Utilizați majusculă pentru a separa cuvintele (De exemplu: MyObject, Student, Profesor ...). Se va genera și fișierul clasa CRUD, dar și fișierul API, paginile care vor lista/adăuga/edita/șterge obiectul și fișierele SQL. -ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): %s +ModuleBuilderDesc2=Calea unde sunt generate/editate modulele (primul director pentru module externe definite în %s): %s ModuleBuilderDesc3=Module generate sau editabile găsite: %s ModuleBuilderDesc4=Un modul este detectat ca "editabil" atunci când fișierul %s există în rădăcina directorului modulului NewModule=Modul nou @@ -21,14 +21,14 @@ ModuleBuilderDesctriggers=Aceasta este vizualizarea declanșatorilor furnizați ModuleBuilderDeschooks=Această filă este dedicată cârligelor. ModuleBuilderDescwidgets=Această filă este dedicată administrării/construirii widgeturilor. ModuleBuilderDescbuildpackage=Puteți genera aici un fișier pachet "pregătit pentru distribuire" (un fișier .zip normalizat) al modulului dvs. și un fișier de documentație "gata de distribuire". Doar faceți clic pe butonul pentru a construi pachetul sau documentația. -EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All coding files of module (generated or created manually) AND structured data and documentation will be deleted! -EnterNameOfObjectToDeleteDesc=You can delete an object. WARNING: All coding files (generated or created manually) related to object will be deleted! +EnterNameOfModuleToDeleteDesc= Puteți șterge modulul pe care l-aţi creat. ATENŢIE: Toate fișierele de cod ale modulului (generate sau create manual) ȘI datele și documentația de structură vor fi șterse! +EnterNameOfObjectToDeleteDesc=Puteți șterge un obiect. ATENŢIE: Toate fișierele de cod (generate sau create manual) legate de obiect vor fi șterse! DangerZone=Zona periculoasă BuildPackage=Construiți pachetul -BuildPackageDesc=You can generate a zip package of your application so your are ready to distribute it on any Dolibarr. You can also distribute it or sell it on marketplace like DoliStore.com. +BuildPackageDesc=Puteți genera un pachet zip al aplicației dvs., pentru a-l putea distribui in orice implementare de Dolibarr. Puteți, de asemenea, să-l distribuiți sau să-l vindeţi în marketplace, de exemplu pe DoliStore.com. BuildDocumentation=Construiți documentația -ModuleIsNotActive=This module is not activated yet. Go to %s to make it live or click here -ModuleIsLive=This module has been activated. Any change may break a current live feature. +ModuleIsNotActive=Acest modul nu este activat încă. Mergi la %s a-l activa sau dă click aici +ModuleIsLive=Acest modul a fost activat. Orice modificare poate duce la disfuncţionalităţi ale versiuni curente activate. DescriptionLong=Descriere lungă EditorName=Numele editorului EditorUrl=Adresa URL a editorului @@ -41,14 +41,14 @@ PageForAgendaTab=Pagina PHP pentru fila eveniment PageForDocumentTab=Pagina PHP pentru fila document PageForNoteTab=Pagina PHP pentru fila note PathToModulePackage=Calea pentru zipul pachetului de module/aplicații -PathToModuleDocumentation=Path to file of module/application documentation (%s) +PathToModuleDocumentation=Calea către fişierul documentaţie al modulului/aplicaţiei (%s) SpaceOrSpecialCharAreNotAllowed=Spațiile sau caracterele speciale nu sunt permise. FileNotYetGenerated=Fișierul nu a fost încă generat -RegenerateClassAndSql=Force update of .class and .sql files +RegenerateClassAndSql=Forţează actualizarea fişierelor .class şi .sql RegenerateMissingFiles=Generați fișierele lipsă -SpecificationFile=File of documentation +SpecificationFile=Fişier de documentaţie LanguageFile=Fișier pentru limbă -ObjectProperties=Object Properties +ObjectProperties=Proprietăţi obiect ConfirmDeleteProperty=Sigur doriți să ștergeți proprietatea %s ? Acest lucru va schimba codul în clasa PHP, dar va elimina și coloana din definiția tabelului de obiect. NotNull=Nu NUL NotNullDesc=1 = Setați baza de date la NOT NULL. -1 = Permite valorile null și valoarea forței la NULL dacă este goală ('' sau 0). @@ -60,17 +60,17 @@ HooksFile=Fișier pentru codul cârligelor ArrayOfKeyValues=Mulțimea de valori cheie ArrayOfKeyValuesDesc=Mulțimea de chei și valori dacă câmpul este o listă combo cu valori fixe WidgetFile=Fișier widget -CSSFile=CSS file -JSFile=Javascript file +CSSFile=Fişier CSS +JSFile=Fişier Javascript ReadmeFile=Fișierul Readme ChangeLog=Fișierul ChangeLog TestClassFile=Fișier pentru unitatea PHP Unitate de testare SqlFile=Dosar SQL -PageForLib=File for the common PHP library -PageForObjLib=File for the PHP library dedicated to object +PageForLib=Fişier pentru librăria common PHP +PageForObjLib=Fişier pentru librăria PHP dedicată obiectului SqlFileExtraFields=Dosar SQL pentru atributele complementare SqlFileKey=Dosar SQL pentru chei -SqlFileKeyExtraFields=Sql file for keys of complementary attributes +SqlFileKeyExtraFields=Fişier SQL pentru cheile atributelor complementare AnObjectAlreadyExistWithThisNameAndDiffCase=Un obiect există deja cu acest nume și cu un alt caz UseAsciiDocFormat=Puteți utiliza formatul Markdown, dar este recomandat să utilizați formatul Asciidoc (omparison între .md și .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) IsAMeasure=Este o măsură @@ -79,23 +79,23 @@ NoTrigger=Niciun declanșator NoWidget=Nu există widget GoToApiExplorer=Mergeți la exploratorul API ListOfMenusEntries=Lista intrărilor din meniu -ListOfDictionariesEntries=List of dictionaries entries +ListOfDictionariesEntries=Listă înregistrări dicţionare ListOfPermissionsDefined=Lista permisiunilor definite SeeExamples=Vedeți aici exemple EnabledDesc=Condiție de activare a acestui câmp (Exemple: 1 sau $ conf-> global-> MYMODULE_MYOPTION) -VisibleDesc=Is the field visible ? (Examples: 0=Never visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create), 5=Visible on list end view form only (not create, not update).

    Using a negative value means field is not shown by default on list but can be selected for viewing).

    It can be an expression, for example:
    preg_match('/public/', $_SERVER['PHP_SELF'])?0:1
    ($user->rights->holiday->define_holiday ? 1 : 0) -DisplayOnPdfDesc=Display this field on compatible PDF documents, you can manage position with "Position" field.
    Currently, known compatibles PDF models are : eratosthene (order), espadon (ship), sponge (invoices), cyan (propal/quotation), cornas (supplier order)

    For document :
    0 = not displayed
    1 = display
    2 = display only if not empty

    For document lines :
    0 = not displayed
    1 = displayed in a column
    3 = display in line description column after the description
    4 = display in description column after the description only if not empty -DisplayOnPdf=Display on PDF +VisibleDesc=Este vizibil câmpul? (Exemple: 0 = Invizibil întotdeauna, 1 = Vizibil în liste și în formularele de creare/actualizare/vizualizare, 2 = Vizibil doar în liste, 3 = Vizibil numai în formularele de creare/actualizare/vizualizare (nu în liste), 4 = Vizibil în liste și în formularele de actualizare/vizualizare (nu în cele de creare), 5 = Vizibil numai pe formularul de vizualizare finală a listei (nu pe cele de creare sau actualizare).

    Utilizarea unei valori negative înseamnă că câmp nu este afișat implicit în listă, dar poate fi selectat pentru vizualizare).

    Poate fi o expresie, de exemplu:
    preg_match ('/ public /', $ _SERVER ['PHP_SELF'])? 0: 1
    ($ user-> rights-> holiday-> define_holiday? 1: 0) +DisplayOnPdfDesc=Afișați acest câmp pe documente PDF compatibile, puteți gestiona poziția cu câmpul „Poziție”.
    În prezent, modelele PDF compatibile cunoscute sunt: ​​eratosten (comandă), espadon (livrare), sponge (facturi), cyan (propunere/ofertă), cornas (comandă achiziţie)

    Pentru documente:
    0 = nu se afișează
    1 = se afișează
    2 = se afișează dacă este completat

    Pentru linii de document:
    0 = nu se afişează
    1 = se afișează într-o coloană
    3 = se afișează în coloana descriere după descriere
    4 = se afișează în coloana descriere după descriere dacă este completat +DisplayOnPdf=Afişare în PDF IsAMeasureDesc=Poate fi cumulata valoarea câmpului pentru a obține un total în listă? (Exemple: 1 sau 0) SearchAllDesc=Este câmpul folosit pentru a face o căutare din instrumentul de căutare rapidă? (Exemple: 1 sau 0) SpecDefDesc=Introduceți aici toată documentația pe care doriți să o furnizați împreună cu modulul, care nu este deja definită de alte file. Puteți utiliza .md sau mai bine, sintaxa bogată .asciidoc. LanguageDefDesc=Introduceți în aceste fișiere toate cheile și traducerea pentru fiecare fișier lingvistic. -MenusDefDesc=Define here the menus provided by your module -DictionariesDefDesc=Define here the dictionaries provided by your module -PermissionsDefDesc=Define here the new permissions provided by your module -MenusDefDescTooltip=The menus provided by your module/application are defined into the array $this->menus into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), menus are also visible into the menu editor available to administrator users on %s. -DictionariesDefDescTooltip=The dictionaries provided by your module/application are defined into the array $this->dictionaries into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), dictionaries are also visible into the setup area to administrator users on %s. -PermissionsDefDescTooltip=The permissions provided by your module/application are defined into the array $this->rights into the module descriptor file. You can edit manually this file or use the embedded editor.

    Note: Once defined (and module re-activated), permissions are visible into the default permissions setup %s. +MenusDefDesc=Defineşte aici meniurile generate de modulul tău +DictionariesDefDesc=Defineşte aici dicţionarele furnizate de modulul tău +PermissionsDefDesc=Defineşte aici noile permisiuni furnizate de modulul tău +MenusDefDescTooltip=Meniurile furnizate de modulul/aplicația dvs. sunt definite în tabloul $this->menus în fișierul de descriere al modulului. Puteți edita manual acest fișier sau puteți utiliza editorul încorporat.

    Notă: odată definit (și reactivat modulul), meniurile sunt vizibile și în editorul de meniu disponibil pentru administratori la %s. +DictionariesDefDescTooltip=Dicționarele furnizate de modulul/aplicația dvs. sunt definite în tabloul $ this->dictionaries în fișierul de descriere al modulului. Puteți edita manual acest fișier sau puteți utiliza editorul încorporat.

    Notă: Modulul o dată definit (și reactivat), dicționarele lui sunt vizibile și în zona de configurare pentru administratori la %s. +PermissionsDefDescTooltip= Permisiunile furnizate de modulul/aplicația dvs. sunt definite în matricea $ this->rights în fișierul de descriere al modulului. Puteți edita manual acest fișier sau puteți utiliza editorul încorporat.

    Notă: Modulul o dată definit (și reactivat), permisiunile sunt vizibile în configurarea de bază a permisiunilor %s. HooksDefDesc=Definiți în proprietatea module_parts ['hooks'] , în descriptorul modulului, contextul de cârlige pe care doriți să îl gestionați (lista de contexte poate fi găsită printr-o căutare pe ' initHooks (' din codul principal)
    Edit fișierul cu cârlig pentru a adăuga codul funcțiilor dvs. înclinate (funcțiile legate pot fi găsite printr-o căutare pe ' executeHooks ' în codul principal). TriggerDefDesc=Definiți în fișierul declanșator codul pe care doriți să-l executați pentru fiecare eveniment de afaceri executat. SeeIDsInUse=Vedeți ID-urile utilizate în instalarea dvs. @@ -112,31 +112,31 @@ InitStructureFromExistingTable=Construiți șirul de structură al unui tabel ex UseAboutPage=Dezactivați pagina UseDocFolder=Dezactivați dosarul de documentare UseSpecificReadme=Utilizați un anumit ReadMe -ContentOfREADMECustomized=Note: The content of the README.md file has been replaced with the specific value defined into setup of ModuleBuilder. +ContentOfREADMECustomized=Notă: Conținutul fișierului README.md a fost înlocuit cu valoarea specifică definită la configurarea ModuleBuilder. RealPathOfModule=Calea reală a modulului ContentCantBeEmpty=Conținutul fișierului nu poate fi gol -WidgetDesc=You can generate and edit here the widgets that will be embedded with your module. -CSSDesc=You can generate and edit here a file with personalized CSS embedded with your module. -JSDesc=You can generate and edit here a file with personalized Javascript embedded with your module. -CLIDesc=You can generate here some command line scripts you want to provide with your module. -CLIFile=CLI File -NoCLIFile=No CLI files -UseSpecificEditorName = Use a specific editor name -UseSpecificEditorURL = Use a specific editor URL -UseSpecificFamily = Use a specific family -UseSpecificAuthor = Use a specific author -UseSpecificVersion = Use a specific initial version -ModuleMustBeEnabled=The module/application must be enabled first -IncludeRefGeneration=The reference of object must be generated automatically -IncludeRefGenerationHelp=Check this if you want to include code to manage the generation automatically of the reference -IncludeDocGeneration=I want to generate some documents from the object -IncludeDocGenerationHelp=If you check this, some code will be generated to add a "Generate document" box on the record. -ShowOnCombobox=Show value into combobox -KeyForTooltip=Key for tooltip -CSSClass=CSS Class -NotEditable=Not editable -ForeignKey=Foreign key -TypeOfFieldsHelp=Type of fields:
    varchar(99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php[:1[:filter]] ('1' means we add a + button after the combo to create the record, 'filter' can be 'status=1 AND fk_user = __USER_ID AND entity IN (__SHARED_ENTITIES__)' for example) -AsciiToHtmlConverter=Ascii to HTML converter -AsciiToPdfConverter=Ascii to PDF converter -TableNotEmptyDropCanceled=Table not empty. Drop has been canceled. +WidgetDesc=Puteți genera și edita aici widgeturile care vor fi încorporate în modulul dvs. +CSSDesc=Poţi genera şi edita aici un fişier personalizat CSS care va fi încorporat în modulul tău. +JSDesc=Puteți genera și edita aici un fișier Javascript personalizat care va fi încorporat în modulul dvs. +CLIDesc=Poţi genera aici spript-uri în linie comandă pe care să le furnizezi cu modulul tău. +CLIFile=Fişier CLI +NoCLIFile=Nici un fişier CLI +UseSpecificEditorName = Utilizează un nume specificat de editor +UseSpecificEditorURL = Utilizează un URL specificat de editor +UseSpecificFamily = Utilizează o familie specifică +UseSpecificAuthor = Utilizează un autor specific +UseSpecificVersion = Utilizează o versiune iniţială specifică +ModuleMustBeEnabled=Modulul/aplicaţia trebuie activată mai întâi +IncludeRefGeneration=Referinţa obiectului trebuie să fie generată automat +IncludeRefGenerationHelp=Bifează aceasta dacă vrei să incluzi cod de management pentru generarea automată a referinţei +IncludeDocGeneration=Vreau să generez documente din obiect +IncludeDocGenerationHelp=Dacă bifaţi, va fi generat cod pentru a adăuga o casetă "Generare document" în înregistrarea respectivă. +ShowOnCombobox=Afişează valoare în combox +KeyForTooltip=Cheie pentru tooltip +CSSClass=Clasă CSS +NotEditable=Needitabil +ForeignKey=Cheie străină +TypeOfFieldsHelp=Tip de câmpuri:
    varchar (99), double(24,8), real, text, html, datetime, timestamp, integer, integer:ClassName:relativepath/to/classfile.class.php [: 1 [: filter]] ( '1' înseamnă că adăugăm un buton + după combo pentru a crea înregistrarea, 'filtru' poate fi 'status = 1 ȘI fk_user = __USER_ID ȘI entity IN (__SHARED_ENTITIES__)', de exemplu) +AsciiToHtmlConverter=Convertor ASCII la HTML +AsciiToPdfConverter=Convertor ASCII la PDF +TableNotEmptyDropCanceled=Tabelul nu este gol. Operaţiunea de drop a fost anulată. diff --git a/htdocs/langs/ro_RO/mrp.lang b/htdocs/langs/ro_RO/mrp.lang index 1c7d38c59a0..7e50b46154f 100644 --- a/htdocs/langs/ro_RO/mrp.lang +++ b/htdocs/langs/ro_RO/mrp.lang @@ -1,77 +1,78 @@ -Mrp=Manufacturing Orders -MO=Manufacturing Order -MRPDescription=Module to manage production and Manufacturing Orders (MO). -MRPArea=MRP Area -MrpSetupPage=Setup of module MRP -MenuBOM=Bills of material -LatestBOMModified=Latest %s Bills of materials modified -LatestMOModified=Latest %s Manufacturing Orders modified -Bom=Bills of Material -BillOfMaterials=Bill of Material +Mrp=Comenzi de producţie +MO=Comandă de producţie +MOs=Manufacturing orders +MRPDescription=Modulul de gestionare a comenzilor de producție și fabricare (MO). +MRPArea=Producţie +MrpSetupPage=Configurare modul MRP +MenuBOM=Bonuri de consum +LatestBOMModified=Ultimele %s bonuri de consum modificate +LatestMOModified=Ultimele %s Comenzi de producţie modificate +Bom=Bonuri de consum +BillOfMaterials=Bon de consum BOMsSetup=Configurarea modulului BOM -ListOfBOMs=List of bills of material - BOM -ListOfManufacturingOrders=List of Manufacturing Orders -NewBOM=New bill of material -ProductBOMHelp=Product to create with this BOM.
    Note: Products with the property 'Nature of product' = 'Raw material' are not visible into this list. -BOMsNumberingModules=BOM numbering templates -BOMsModelModule=BOM document templates -MOsNumberingModules=MO numbering templates -MOsModelModule=MO document templates -FreeLegalTextOnBOMs=Free text on document of BOM -WatermarkOnDraftBOMs=Watermark on draft BOM -FreeLegalTextOnMOs=Free text on document of MO -WatermarkOnDraftMOs=Watermark on draft MO -ConfirmCloneBillOfMaterials=Are you sure you want to clone the bill of material %s ? -ConfirmCloneMo=Are you sure you want to clone the Manufacturing Order %s ? -ManufacturingEfficiency=Manufacturing efficiency -ConsumptionEfficiency=Consumption efficiency -ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the production -ValueOfMeansLossForProductProduced=Value of 0.95 means an average of 5%% of loss of produced product -DeleteBillOfMaterials=Delete Bill Of Materials -DeleteMo=Delete Manufacturing Order -ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? -ConfirmDeleteMo=Are you sure you want to delete this Bill Of Material? -MenuMRP=Manufacturing Orders -NewMO=New Manufacturing Order -QtyToProduce=Qty to produce -DateStartPlannedMo=Date start planned -DateEndPlannedMo=Date end planned -KeepEmptyForAsap=Empty means 'As Soon As Possible' -EstimatedDuration=Estimated duration -EstimatedDurationDesc=Estimated duration to manufacture this product using this BOM -ConfirmValidateBom=Are you sure you want to validate the BOM with the reference %s (you will be able to use it to build new Manufacturing Orders) -ConfirmCloseBom=Are you sure you want to cancel this BOM (you won't be able to use it to build new Manufacturing Orders anymore) ? -ConfirmReopenBom=Are you sure you want to re-open this BOM (you will be able to use it to build new Manufacturing Orders) -StatusMOProduced=Produced -QtyFrozen=Frozen Qty -QuantityFrozen=Frozen Quantity -QuantityConsumedInvariable=When this flag is set, the quantity consumed is always the value defined and is not relative to the quantity produced. -DisableStockChange=Stock change disabled -DisableStockChangeHelp=When this flag is set, there is no stock change on this product, whatever is the quantity consumed -BomAndBomLines=Bills Of Material and lines -BOMLine=Line of BOM -WarehouseForProduction=Warehouse for production -CreateMO=Create MO -ToConsume=To consume -ToProduce=To produce -QtyAlreadyConsumed=Qty already consumed -QtyAlreadyProduced=Qty already produced -QtyRequiredIfNoLoss=Qty required if there is no loss (Manufacturing efficiency is 100%%) -ConsumeOrProduce=Consume or Produce -ConsumeAndProduceAll=Consume and Produce All -Manufactured=Manufactured -TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce. -ForAQuantityOf=For a quantity to produce of %s -ConfirmValidateMo=Are you sure you want to validate this Manufacturing Order? -ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and/or production for the quantities set. This will also update the stock and record stock movements. -ProductionForRef=Production of %s -AutoCloseMO=Close automatically the Manufacturing Order if quantities to consume and to produce are reached -NoStockChangeOnServices=No stock change on services -ProductQtyToConsumeByMO=Product quantity still to consume by open MO -ProductQtyToProduceByMO=Product quentity still to produce by open MO -AddNewConsumeLines=Add new line to consume -ProductsToConsume=Products to consume -ProductsToProduce=Products to produce -UnitCost=Unit cost -TotalCost=Total cost -BOMTotalCost=The cost to produce this BOM based on cost of each quantity and product to consume (use Cost price if defined, else Average Weighted Price if defined, else the Best purchase price) +ListOfBOMs=Listă bonuri de consum - BOM +ListOfManufacturingOrders=Listă comenzi de producţie +NewBOM=Bon de consum nou +ProductBOMHelp=Produs de fabricat cu acest bon de consum.
    Notă: Produsele cu proprietatea 'Natură produs' = 'Materie primă' nu sunt vizibile în această listă. +BOMsNumberingModules=Şabloane numerotare BOM +BOMsModelModule=Şabloane documente BOM +MOsNumberingModules=Şabloane numerotare Comenzi de producţie +MOsModelModule=Şabloane document Comandă de producţie +FreeLegalTextOnBOMs=Text liber pe documentul Bon de consum +WatermarkOnDraftBOMs=Marcare schiţă Bon de consum BOM +FreeLegalTextOnMOs=Text liber pe documentul Comandă de producţie +WatermarkOnDraftMOs=Macaj pe schiţă Comandă de producţie +ConfirmCloneBillOfMaterials=Eşti sigur că vrei să clonezi bonul de consum %s ? +ConfirmCloneMo=Eşti sigur că vrei să clonezi Comanda de producţie %s ? +ManufacturingEfficiency=Eficienţa producţiei +ConsumptionEfficiency=Eficienţa consumului +ValueOfMeansLoss=Valoarea de 0,95 înseamnă o medie de 5 %% pierderi în timpul producției +ValueOfMeansLossForProductProduced= Valoarea de 0,95 înseamnă o medie de 5 %% pierdere din produsul fabricat +DeleteBillOfMaterials=Şterge Bonuri de consum +DeleteMo=Şterge comanda de producţie +ConfirmDeleteBillOfMaterials=Eşti sigur că vrei să ştergi acest Bon de consum? +ConfirmDeleteMo=Eşti sigur că vrei să ştergi acest Bon de consum? +MenuMRP=Comenzi de producţie +NewMO=Comandă de producţie nouă +QtyToProduce=Cantitate de fabricat +DateStartPlannedMo=Data de începere planificată +DateEndPlannedMo=Dată de finalizare planificată +KeepEmptyForAsap=Necompletat înseamnă 'Cât mai repede posibil' +EstimatedDuration=Durată estimată +EstimatedDurationDesc=Durata estimată de fabricație a acestui produs pe baza acestui Bon de consum +ConfirmValidateBom=Sunteți sigur că doriți să validați Bonul de consum cu referința %s (îl veți putea folosi pentru a genera noi Comenzi de fabricație) +ConfirmCloseBom=Sunteți sigur că doriți să anulați acest Bon de consum (nu îl veți mai putea folosi pentru a genera noi Comenzi de fabricație) ? +ConfirmReopenBom=Sunteți sigur că doriți să redeschideți acest Bon de consum (îl veți putea folosi pentru a genera noi Comenzi de fabricație) +StatusMOProduced=Fabricat +QtyFrozen=Cantitate ingheţată +QuantityFrozen=Cantitate îngheţată +QuantityConsumedInvariable=Când acest semnalizator este setat, cantitatea consumată este întotdeauna valoarea definită și nu este relativă la cantitatea produsă. +DisableStockChange=Modificarea de stoc este dezactivată +DisableStockChangeHelp=Când acest semnalizator este setat, nu va exista nici o modificare a stocului pentru acest produs, indiferent de cantitatea consumată +BomAndBomLines=Bonuri de consum şi linii +BOMLine=Linie comandă de producţie +WarehouseForProduction=Depozit pentru producţie +CreateMO=Creare Comandă de producţie +ToConsume=De consumat +ToProduce=De fabricat +QtyAlreadyConsumed=Cantitate deja consumată +QtyAlreadyProduced=Cantitate deja fabricată +QtyRequiredIfNoLoss=Cantitate necesară dacă nu există pierderi (eficiența de fabricație este 100%%) +ConsumeOrProduce=Consumă sau Produce +ConsumeAndProduceAll=Consumă sau Produce tot +Manufactured=Fabricat +TheProductXIsAlreadyTheProductToProduce= Produsul de adăugat este deja produsul de fabricat. +ForAQuantityOf=Pentru o cantitate de fabricat din %s +ConfirmValidateMo=Eşti sigur că vrei să validezi această Comandă de producţie? +ConfirmProductionDesc=Făcând clic pe '%s', veți valida consumul și/sau producția pentru cantitățile stabilite. Acest lucru va actualiza, de asemenea, stocurile și vor înregistra mișcările de stoc. +ProductionForRef=Producţia a %s +AutoCloseMO=Închidere automată Comandă de fabricație dacă se ating cantitățile de consumat și de fabricat +NoStockChangeOnServices=Fără modificări de stoc pentru servicii +ProductQtyToConsumeByMO=Cantitatea de produs rămasă de consumat pe Comanda de fabricaţie deschisă +ProductQtyToProduceByMO=cantitatea de produs rămasă de fabricat pe Comanda de fabricaţie +AddNewConsumeLines=Adaugă o linie de consum +ProductsToConsume=Produse de consumat +ProductsToProduce=Produse de fabricat +UnitCost=Cost unitar +TotalCost=Cost total +BOMTotalCost=Costul pentru fabricaţia acestui Bon de consum în funcție de costul fiecărei cantități și produs de consumat (utilizați Prețul de cost, dacă este definit, altfel Prețul mediu ponderat, dacă este definit, altfel cel mai bun preț de achiziție) diff --git a/htdocs/langs/ro_RO/multicurrency.lang b/htdocs/langs/ro_RO/multicurrency.lang index 9e55663db90..cc0dc65ad0d 100644 --- a/htdocs/langs/ro_RO/multicurrency.lang +++ b/htdocs/langs/ro_RO/multicurrency.lang @@ -7,10 +7,10 @@ multicurrency_syncronize_error=Eroare de sincronizare: %s MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE=Utilizați data documentului pentru a găsi rata valutei, în loc să utilizați cea mai recentă rată cunoscută multicurrency_useOriginTx=Când un obiect este creat din altul, păstrați rata inițială din obiectul sursă (altfel utilizați ultima rată cunoscută) CurrencyLayerAccount=CurrencyLayer API -CurrencyLayerAccount_help_to_synchronize=You must create an account on website %s to use this functionality.
    Get your API key.
    If you use a free account, you can't change the source currency (USD by default).
    If your main currency is not USD, the application will automatically recalculate it.

    You are limited to 1000 synchronizations per month. +CurrencyLayerAccount_help_to_synchronize=Pentru a utiliza această funcţionalitate trebuie să creaţi un cont pe site-ul %s .
    Obţineţi cheia API.
    dacă utilizaţi un cont gratuit, nu puteţi schimba moneda principală (USD in mod implicit).
    Dacă moneda ta principală nu este USD - dolar american, aplicaţia va recalcula automat valorile.

    Eşti limitat la 1000 sincronizări pe lună. multicurrency_appId=Cheia API -multicurrency_appCurrencySource=Source currency -multicurrency_alternateCurrencySource=Alternate source currency +multicurrency_appCurrencySource=Monedă principală +multicurrency_alternateCurrencySource=Monedă principală alternativă CurrenciesUsed=Valute utilizate CurrenciesUsed_help_to_add=Adăugați diferitele valute și ratele pe care trebuie să le utilizați pentru propunerile dvs. , ordine etc. rate=rată @@ -18,5 +18,5 @@ MulticurrencyReceived=Primite, valuta inițială MulticurrencyRemainderToTake=Valoarea rămasă, moneda inițială MulticurrencyPaymentAmount=Suma plății, moneda inițială AmountToOthercurrency=Suma pentru (în moneda contului de primire) -CurrencyRateSyncSucceed=Currency rate synchronization done successfuly -MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Use the currency of the document for online payments +CurrencyRateSyncSucceed=Sincronizarea cursului valutar a fost efectuată cu succes +MULTICURRENCY_USE_CURRENCY_ON_DOCUMENT=Utilizează moneda documentului pentru plățile online diff --git a/htdocs/langs/ro_RO/oauth.lang b/htdocs/langs/ro_RO/oauth.lang index 4d58dbce5e5..6bb293ad935 100644 --- a/htdocs/langs/ro_RO/oauth.lang +++ b/htdocs/langs/ro_RO/oauth.lang @@ -28,5 +28,5 @@ OAUTH_GITHUB_NAME=Serviciul OAuth GitHub OAUTH_GITHUB_ID=ID-ul OAuth GitHub OAUTH_GITHUB_SECRET=OAuth GitHub Secret OAUTH_GITHUB_DESC=Mergeți la această pagină apoi "Înregistrați o nouă aplicație" pentru a crea acreditările OAuth -OAUTH_STRIPE_TEST_NAME=OAuth Stripe Test +OAUTH_STRIPE_TEST_NAME=Testare OAuth Stripe OAUTH_STRIPE_LIVE_NAME=OAuth Stripe Live diff --git a/htdocs/langs/ro_RO/opensurvey.lang b/htdocs/langs/ro_RO/opensurvey.lang index 32701008c68..25a9479092e 100644 --- a/htdocs/langs/ro_RO/opensurvey.lang +++ b/htdocs/langs/ro_RO/opensurvey.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - opensurvey Survey=Sondaj Surveys=Sondaje -OrganizeYourMeetingEasily=Organize your meetings and polls easily. First select the type of poll... +OrganizeYourMeetingEasily=Organizați-vă ușor întâlnirile și chestionarele. Mai întâi selectați tipul de sondaj... NewSurvey=Sondaj nou OpenSurveyArea=Sondaje AddACommentForPoll=Puteţi adăuga un comentariu în sondaj... @@ -37,7 +37,7 @@ ExpireDate=Data limită NbOfSurveys=Numărul sondajelor NbOfVoters=Numărul de alegători SurveyResults=Rezultate -PollAdminDesc=Vi se permite să schimbaţi toate liniile de vot ale acestui sondaj cu butonul "Editează". Puteți, de asemenea, elimina o coloană sau o linie cu % s. Puteți adăuga, de asemenea, o nouă coloană cu % s. +PollAdminDesc=Vi se permite să schimbaţi toate liniile de vot ale acestui sondaj cu butonul "Editează". Puteți, de asemenea, elimina o coloană sau o linie cu %s. Puteți adăuga, de asemenea, o nouă coloană cu %s. 5MoreChoices=Mai mult de 5 alegeri Against=Împotrivă YouAreInivitedToVote=Sunteţi invitaţi să votaţi acest sondaj diff --git a/htdocs/langs/ro_RO/orders.lang b/htdocs/langs/ro_RO/orders.lang index 0ae0c5eba4d..9bbc1d3ffed 100644 --- a/htdocs/langs/ro_RO/orders.lang +++ b/htdocs/langs/ro_RO/orders.lang @@ -11,7 +11,7 @@ OrderDate=Dată Comandă OrderDateShort=Data comandă OrderToProcess=Comandă de procesat NewOrder=Comandă nouă -NewOrderSupplier=New Purchase Order +NewOrderSupplier=Comandă achiziţie nouă ToOrder=Plasează comanda MakeOrder=Plasează comanda SupplierOrder=Comandă de achiziție @@ -26,8 +26,8 @@ OrdersToBill=Comenzi de vânzări livrate OrdersInProcess=Comenzi de vânzări în curs OrdersToProcess=Comenzile de vânzări pentru procesare SuppliersOrdersToProcess=Comenzile de cumpărare pentru procesare -SuppliersOrdersAwaitingReception=Purchase orders awaiting reception -AwaitingReception=Awaiting reception +SuppliersOrdersAwaitingReception=Comenzi de achiziţie în aşteptarea recepţiei +AwaitingReception=În aşteptarea recepţiei StatusOrderCanceledShort=Anulata StatusOrderDraftShort=Schiţă StatusOrderValidatedShort=Validat @@ -47,7 +47,7 @@ StatusOrderCanceled=Anulată StatusOrderDraft=Schiţă (de validat) StatusOrderValidated=Validată StatusOrderOnProcess=Comandate - receptie standby -StatusOrderOnProcessWithValidation=Comandat - recepție în așteptare sau validare +StatusOrderOnProcessWithValidation=Comandat - În așteptarea recepţiei sau validării StatusOrderProcessed=Procesată StatusOrderToBill=Livrată StatusOrderApproved=Aprobată @@ -69,9 +69,9 @@ ValidateOrder=Validează comanda UnvalidateOrder=Devalidează comandă DeleteOrder=Şterge comada CancelOrder=Anulează comanda -OrderReopened= Order %s re-open +OrderReopened= Comanda %sredeschisă AddOrder=Crează comanda -AddPurchaseOrder=Create purchase order +AddPurchaseOrder=Creare comandă de achiziţie AddToDraftOrders=Adaugă la comanda schiţă ShowOrder=Afişează comanda OrdersOpened=Comenzi de procesat @@ -101,7 +101,7 @@ ClassifyShipped=Clasează livrată DraftOrders=Comenzi schiţă DraftSuppliersOrders=Schiţă de ordine de cumpărare OnProcessOrders=Comenzi în curs de tratare -RefOrder=Ref. comanda +RefOrder=Ref. comandă RefCustomerOrder=Ref. comenzii pentru client RefOrderSupplier=Ref. comanzii pentru furnizor RefOrderSupplierShort=Ref. furnizorului comenzii @@ -141,11 +141,12 @@ OrderByEMail=Email OrderByWWW=Online OrderByPhone=Telefon # Documents models -PDFEinsteinDescription=A complete order model -PDFEratostheneDescription=A complete order model +PDFEinsteinDescription=Un şablon de comandă (implementare veche a şablonului Eratosthene) +PDFEratostheneDescription=Un şablon complet de comadă PDFEdisonDescription=Un simplu pentru model -PDFProformaDescription=A complete Proforma invoice template +PDFProformaDescription=Un şablon complet de factură Proforma CreateInvoiceForThisCustomer=Comenzi facturate +CreateInvoiceForThisSupplier=Comenzi facturate NoOrdersToInvoice=Nicio comandă facturabilă CloseProcessedOrdersAutomatically=Clasează automat "Procesat" toate comenzile selectate. OrderCreation=Creare comandă @@ -154,11 +155,11 @@ OrderCreated=Comenzile dvs au fost generate OrderFail=O eroare întâlnită în timpul creării comezilor dvs CreateOrders=Crează Comenzi ToBillSeveralOrderSelectCustomer=Pentru crearea unei facturi pentru câteva comenzi, click mai întâi pe client apoi alege "%s". -OptionToSetOrderBilledNotEnabled=Option from module Workflow, to set order to 'Billed' automatically when invoice is validated, is not enabled, so you will have to set the status of orders to 'Billed' manually after the invoice has been generated. +OptionToSetOrderBilledNotEnabled=Opțiune pentru modulul Workflow, pentru setarea automată a comenzii ca „Facturată” când factura este validată, dacă nu este activată, va trebui să setați manual starea comenzilor la „Facturată” după ce factura a fost generată şi validată. IfValidateInvoiceIsNoOrderStayUnbilled=Dacă validarea facturilor este "Nu", comanda va rămâne în starea "Nefacturată" până când factura va fi validată. -CloseReceivedSupplierOrdersAutomatically=Close order to status "%s" automatically if all products are received. +CloseReceivedSupplierOrdersAutomatically=Închide automat comanda cu statusul "%s" dacă toatele produsele au fost recepţionate. SetShippingMode=Setați modul de expediere -WithReceptionFinished=With reception finished +WithReceptionFinished=Recepţionat integral #### supplier orders status StatusSupplierOrderCanceledShort=Anulata StatusSupplierOrderDraftShort=Draft diff --git a/htdocs/langs/ro_RO/other.lang b/htdocs/langs/ro_RO/other.lang index b40fbeccf54..545383cb7a3 100644 --- a/htdocs/langs/ro_RO/other.lang +++ b/htdocs/langs/ro_RO/other.lang @@ -6,7 +6,7 @@ TMenuTools=Instrumente ToolsDesc=Toate instrumentele care nu sunt incluse în alte intrări în meniu sunt grupate aici.
    Toate instrumentele pot fi accesate prin meniul din stânga. Birthday=Zi de naştere BirthdayDate=Data naştere -DateToBirth=Birth date +DateToBirth=Data naşterii BirthdayAlertOn=ziua de nastere de alertă activă BirthdayAlertOff=ziua de nastere de alertă inactiv TransKey=Traducerea cheii TransKey @@ -24,17 +24,17 @@ MessageOK=Mesaj pe pagina de returnare pentru o plată validată MessageKO=Mesaj de pe pagina de returnare pentru o plată anulată ContentOfDirectoryIsNotEmpty=Conținutul acestui director nu este gol. DeleteAlsoContentRecursively=Verificați pentru a șterge tot conținutul recursiv -PoweredBy=Powered by +PoweredBy=Dezvoltat de YearOfInvoice=Anul datei facturii PreviousYearOfInvoice=Anul anterior datei facturii NextYearOfInvoice=Anul următor datei facturii DateNextInvoiceBeforeGen=Data următoarei facturi (înainte de generare) DateNextInvoiceAfterGen=Data următoarei facturi (după generare) -GraphInBarsAreLimitedToNMeasures=Grapics are limited to %s measures in 'Bars' mode. The mode 'Lines' was automatically selected instead. -OnlyOneFieldForXAxisIsPossible=Only 1 field is currently possible as X-Axis. Only the first selected field has been selected. -AtLeastOneMeasureIsRequired=At least 1 field for measure is required -AtLeastOneXAxisIsRequired=At least 1 field for X-Axis is required -LatestBlogPosts=Latest Blog Posts +GraphInBarsAreLimitedToNMeasures=Graficele sunt limitate la %s metrici în modul 'Bare'. Modul 'Linii' a fost selectat automat din acest motiv. +OnlyOneFieldForXAxisIsPossible=Doar 1 câmp este posibil pentru axa X. Doar primul câmp a fost selectat. +AtLeastOneMeasureIsRequired=Cel puţin 1 câmp pentru metrică este necesar +AtLeastOneXAxisIsRequired=Cel puţin 1 câmp pentru axa X este necesar +LatestBlogPosts=Ultimile postări din blog Notify_ORDER_VALIDATE=Comanda vânzărilor validată Notify_ORDER_SENTBYMAIL=Comanda vânzărilor a fost trimisă prin poștă Notify_ORDER_SUPPLIER_SENTBYMAIL=Comanda de cumparare trimisa prin e-mail @@ -85,8 +85,8 @@ MaxSize=Mărimea maximă a AttachANewFile=Ataşaţi un fişier nou / document LinkedObject=Legate de obiectul NbOfActiveNotifications=Numărul de notificări (numărul e-mailurilor destinatarilor) -PredefinedMailTest=__(Hello)__\nThis is a test mail sent to __EMAIL__.\nThe lines are separated by a carriage return.\n\n__USER_SIGNATURE__ -PredefinedMailTestHtml=__(Hello)__
    This is a test mail sent to __EMAIL__ (the word test must be in bold).
    The lines are separated by a carriage return.

    __USER_SIGNATURE__ +PredefinedMailTest=__(Hello)__\nAcesta este un email de test trimis către __EMAIL__.\nAceste rânduri sunt separate prin carriage return.\n\n__USER_SIGNATURE__ +PredefinedMailTestHtml=__(Hello)__
    Acesta este un email de test trimis către __EMAIL__ (cuvântul test ar trebui să fie scris îngroşat).
    Aceste rânduri sunt separate prin carriage return.

    __USER_SIGNATURE__ PredefinedMailContentContract=__(Salut)__\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoice=__(Salut)__\n\nGăsiţi factura __REF__ atașată\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendInvoiceReminder=__(Salut)__\n\nAș dori să vă reamintim că factura __REF__ pare să nu fi fost plătită. O copie a facturii este atașată ca un memento.\n\n__ONLINE_PAYMENT_TEXT_AND_URL__\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Salut)__\n\nConsultați comanda __REF_ PredefinedMailContentSendSupplierInvoice=__(Salut)__\n\nConsultați factura __REF__ atașată\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Salut)__\n\nVeți găsi transportul __REF__ atașat\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Salut)__\n\nConsultați intervenția __REF__ atașată\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Salut)__\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Salut)__\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Salut)__\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Puteți face clic pe linkul de mai jos pentru a efectua plata dacă nu este deja făcută.\n\n%s\n\n +PredefinedMailContentGeneric=__(Salut)__\n\n\n__(Cu sinceritate)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr este un sistem ERP/CRM compact care suportă mai multe module de afaceri. O prezentare Demo pentru toate modulele nu are sens deoarece acest scenariu nu se produce niciodată (câteva sute disponibile). Deci, sunt disponibile mai multe profiluri demo. ChooseYourDemoProfil=Alegeți profilul demo care se potrivește cel mai bine nevoilor dvs. ... ChooseYourDemoProfilMore=... sau construiți propriul profil
    (selectarea manuală a modulelor) @@ -108,8 +106,8 @@ DemoFundation=Gestionare membrii unui Fundaţia DemoFundation2=Gestionaţi membri şi un cont bancar de Fundaţia DemoCompanyServiceOnly=Companie sau independent cu vânzare de servicii DemoCompanyShopWithCashDesk=Gestionaţi-un magazin cu o casă de marcat -DemoCompanyProductAndStocks=Shop selling products with Point Of Sales -DemoCompanyManufacturing=Company manufacturing products +DemoCompanyProductAndStocks=Comercializare produse cu POS +DemoCompanyManufacturing=Produse fabricate de companie DemoCompanyAll=Companie cu activități multiple (toate modulele principale) CreatedBy=Creat de %s ModifiedBy=Modificat de %s @@ -189,16 +187,16 @@ NumberOfCustomerInvoices=Numărul de facturi pentru clienți NumberOfSupplierProposals=Numărul de propuneri de furnizori NumberOfSupplierOrders=Numărul de ordine de cumpărare NumberOfSupplierInvoices=Numărul facturilor furnizorilor -NumberOfContracts=Number of contracts -NumberOfMos=Number of manufacturing orders +NumberOfContracts=Număr contracte +NumberOfMos=Număr comenzi de producţie NumberOfUnitsProposals=Numărul de unități pe propuneri NumberOfUnitsCustomerOrders=Numărul de unități din comenzile de vânzări NumberOfUnitsCustomerInvoices=Numărul de unități pe facturile clienților NumberOfUnitsSupplierProposals=Numărul de unități pe propunerile furnizorilor NumberOfUnitsSupplierOrders=Numărul de unități din comenzile de achiziție NumberOfUnitsSupplierInvoices=Numărul de unități pe facturile furnizorului -NumberOfUnitsContracts=Number of units on contracts -NumberOfUnitsMos=Number of units to produce in manufacturing orders +NumberOfUnitsContracts=Număr de unităţi pe contracte +NumberOfUnitsMos=Număr unităţi de fabricatpe comenzile de producţie EMailTextInterventionAddedContact=A fost atribuită o nouă intervenție %s. EMailTextInterventionValidated=Intervenţia %s validată EMailTextInvoiceValidated=Factura %s a fost validată. @@ -255,11 +253,11 @@ YourPasswordHasBeenReset=Parola dvs. a fost resetată cu succes ApplicantIpAddress=Adresa IP a solicitantului SMSSentTo=SMS trimis la %s MissingIds=ID-uri lipsă -ThirdPartyCreatedByEmailCollector=Third party created by email collector from email MSGID %s -ContactCreatedByEmailCollector=Contact/address created by email collector from email MSGID %s -ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s -TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s -OpeningHoursFormatDesc=Use a - to separate opening and closing hours.
    Use a space to enter different ranges.
    Example: 8-12 14-18 +ThirdPartyCreatedByEmailCollector=Terţ creat de colectorul de email-uri din email-ul cu MSGID %s +ContactCreatedByEmailCollector=Contact/adresă creată de colectorul de email-uri din email-ul cu MSGID %s +ProjectCreatedByEmailCollector=Proiect creat de colectorul de email-uri din email-ul cu MSGID %s +TicketCreatedByEmailCollector=Tichet creat de colectorul de email-uri din email-ul cu MSGID %s +OpeningHoursFormatDesc=Foloseşte un - pentru a separa orele de lucru.
    Foloseşte un spaţiu pentru a introduce intervale oarare diferite.
    Exemplu: 8-12 14-18 ##### Export ##### ExportsArea=Export @@ -274,13 +272,15 @@ WEBSITE_PAGEURL=URL pagina WEBSITE_TITLE=Titlu WEBSITE_DESCRIPTION=Descriere WEBSITE_IMAGE=Imagine -WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITE_KEY__ in the path if path depends on website name (for example: image/__WEBSITE_KEY__/stories/myimage.png). +WEBSITE_IMAGEDesc=Calea relativă către imagini media. Puteți lăsa necompletat, deoarece este foarte rar utilizată (poate fi folosită de conţinutul dinamic pentru a afișa o miniatură într-o listă de postări pe blog). Foloseşte __WEBSITE_KEY__ în cale dacă aceasta depinde de numele site-ului ( de exemplu: image/__WEBSITE_KEY__/stories/myimage.png). WEBSITE_KEYWORDS=Cuvânt cheie LinesToImport=Linii de import -MemoryUsage=Memory usage -RequestDuration=Duration of request -PopuProp=Products/Services by popularity in Proposals -PopuCom=Products/Services by popularity in Orders -ProductStatistics=Products/Services Statistics -NbOfQtyInOrders=Qty in orders +MemoryUsage=Memorie utilizată +RequestDuration=Durată request +ProductsPerPopularity=Produse/Servicii după popularitate +PopuProp=Produse/servicii după popularitate pe Oferte +PopuCom=Produse/servicii după popularitate pe Comenzi de vânzare +ProductStatistics=Statistici produse/servicii +NbOfQtyInOrders=Cantitate în comenzi +SelectTheTypeOfObjectToAnalyze=Selectează tipul obiectului de analizat... diff --git a/htdocs/langs/ro_RO/paybox.lang b/htdocs/langs/ro_RO/paybox.lang index b9baadf9ae7..e1161cf8b07 100644 --- a/htdocs/langs/ro_RO/paybox.lang +++ b/htdocs/langs/ro_RO/paybox.lang @@ -10,7 +10,7 @@ ToComplete=Pentru a completa YourEMail=E-mail de confirmare de plată Creditor=Creditor PaymentCode=Cod Plata -PayBoxDoPayment=Pay with Paybox +PayBoxDoPayment=Plăteşte cu Paybox YouWillBeRedirectedOnPayBox=Veţi fi redirecţionat pe pagina Paybox securizat la intrare ai card de credit Informatii Continue=Următorul SetupPayBoxToHavePaymentCreatedAutomatically=Configurați-vă caseta de plată cu url %s pentru a avea o plată creată automat când este validată de Paybox. @@ -28,4 +28,4 @@ PAYBOX_PAYONLINE_SENDEMAIL=E-mail notificare după încercarea de plată (succes PAYBOX_PBX_SITE=Valoare pentru PBX SITE PAYBOX_PBX_RANG=Valoare pentru PBX Rang PAYBOX_PBX_IDENTIFIANT=Valoare pentru PBX ID -PAYBOX_HMAC_KEY=HMAC key +PAYBOX_HMAC_KEY=Cheie HMAC diff --git a/htdocs/langs/ro_RO/paypal.lang b/htdocs/langs/ro_RO/paypal.lang index 91f38d16710..6533bfc0210 100644 --- a/htdocs/langs/ro_RO/paypal.lang +++ b/htdocs/langs/ro_RO/paypal.lang @@ -1,7 +1,7 @@ # Dolibarr language file - Source file is en_US - paypal PaypalSetup=PayPal modul de configurare PaypalDesc=Acest modul permite plata de către clienți prin intermediul PayPal . Aceasta poate fi utilizată pentru o plată ad-hoc sau pentru o plată aferentă unui obiect Dolibarr (factură, comandă, ...) -PaypalOrCBDoPayment=Pay with PayPal (Card or PayPal) +PaypalOrCBDoPayment=Plăteşte cu PayPal (Card sau PayPal) PaypalDoPayment=Plătiți cu PayPal PAYPAL_API_SANDBOX=Mod de încercare / sandbox PAYPAL_API_USER=API numele de utilizator @@ -32,5 +32,5 @@ PaypalImportPayment=Importați plăți PayPal PostActionAfterPayment=Acțiuni postate după plăți ARollbackWasPerformedOnPostActions=A fost efectuată o revocare a tuturor acțiunilor Post. Trebuie să finalizați manual acțiunile postate dacă acestea sunt necesare. ValidationOfPaymentFailed=Validarea plății a eșuat -CardOwner=Card holder -PayPalBalance=Paypal credit +CardOwner=Deţinătorul cardului +PayPalBalance=Credit Paypal diff --git a/htdocs/langs/ro_RO/products.lang b/htdocs/langs/ro_RO/products.lang index 414008feb43..76b5f94a930 100644 --- a/htdocs/langs/ro_RO/products.lang +++ b/htdocs/langs/ro_RO/products.lang @@ -2,7 +2,7 @@ ProductRef=Ref. Produs ProductLabel=Etichetă produs ProductLabelTranslated=Etichetă de produs tradusă -ProductDescription=Product description +ProductDescription=Descriere produs ProductDescriptionTranslated=Descrierea produsului tradus ProductNoteTranslated=Nota de produs tradusă ProductServiceCard=Fişe Produse / Servicii @@ -22,28 +22,28 @@ ProductVatMassChangeDesc=Acest instrument actualizează rata TVA definită pe < MassBarcodeInit=Init cod de bare în masă MassBarcodeInitDesc=Această pagină poate fi utilizată pentru a inițializa un cod de bare pe obiectele care nu au coduri de bare definit. Verificați înainte dacă modulul cod de bare este complet configurat. ProductAccountancyBuyCode=Codul contabil (achiziție) -ProductAccountancyBuyIntraCode=Accounting code (purchase intra-community) -ProductAccountancyBuyExportCode=Accounting code (purchase import) +ProductAccountancyBuyIntraCode=Cod contabil (achiziţie intra-comunitară) +ProductAccountancyBuyExportCode=Cont contabil (achiziţie import) ProductAccountancySellCode=Codul contabil (vânzare) ProductAccountancySellIntraCode=Codul contabil (vânzarea intracomunitară) ProductAccountancySellExportCode=Codul contabil (export de vânzare) ProductOrService=Produs sau serviciu ProductsAndServices=Produse si Servicii ProductsOrServices=Produse sau servicii -ProductsPipeServices=Produse | Servicii -ProductsOnSale=Products for sale -ProductsOnPurchase=Products for purchase +ProductsPipeServices=Produse|Servicii +ProductsOnSale=Produse de vânzare +ProductsOnPurchase=Produse de achiziţionat ProductsOnSaleOnly=Produsele doar de vânzare ProductsOnPurchaseOnly=Produsele doar pentru cumpărare ProductsNotOnSell=Produse care nu sunt de vânzare și cumpărare ProductsOnSellAndOnBuy=Produse supuse vânzării sau cumpărării -ServicesOnSale=Services for sale -ServicesOnPurchase=Services for purchase +ServicesOnSale=Servicii de vânzare +ServicesOnPurchase=Servicii de achiziţionat ServicesOnSaleOnly=Servicii doar de vânzare ServicesOnPurchaseOnly=Numai servicii de cumpărare ServicesNotOnSell=Servicii care nu sunt de vânzare și de cumpărare ServicesOnSellAndOnBuy=Servicii supuse vânzării sau cumpărării -LastModifiedProductsAndServices=Latest %s modified products/services +LastModifiedProductsAndServices=Ultimile %s produse/servicii modificate LastRecordedProducts=Ultimele %s produse înregistrate LastRecordedServices=Ultimele %s servicii înregistrate CardProduct0=Produs @@ -104,9 +104,10 @@ SetDefaultBarcodeType=Setări tip cod de bare BarcodeValue=Valoarea coduri de bare NoteNotVisibleOnBill=Notă (nevizibilă pe facturi, oferte ...) ServiceLimitedDuration=Dacă produsul este un serviciu cu durată limitată: +FillWithLastServiceDates=Completează cu data ultimelor linii de servicii MultiPricesAbility=Segmente multiple de preț pentru fiecare produs / serviciu (fiecare client se află într-un singur segment de preț) MultiPricesNumPrices=Numărul de preţ -DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices +DefaultPriceType=Baza prețurilor în mod implicit (cu sau fără taxe) la adăugarea noilor prețuri de vânzare AssociatedProductsAbility=Activați produsele virtuale (kituri) AssociatedProducts=Produse virtuale AssociatedProductsNumber=Număr produse ce compun produsul virtual @@ -156,7 +157,7 @@ RowMaterial=Materie primă ConfirmCloneProduct=Sunteți sigur că doriți să clonați produsul sau serviciul %s ? CloneContentProduct=Clonați toate informațiile principale ale produsului/serviciului ClonePricesProduct=Clonează preţurile -CloneCategoriesProduct=Clone tags/categories linked +CloneCategoriesProduct=Clonare tag-uri/categorii asociate CloneCompositionProduct=Clonează produsul / serviciul virtual CloneCombinationsProduct=Clonați variantele de produs ProductIsUsed=Acest produs este utilizat @@ -166,9 +167,11 @@ BuyingPrices=Prețuri de achiziționare CustomerPrices=Preţuri Client SuppliersPrices=Prețurile furnizorului SuppliersPricesOfProductsOrServices=Prețurile furnizorilor (de produse sau servicii) -CustomCode=Cod Vamal / Marfă / SA +CustomCode=Cod vamal/Marfă/Cod HS CountryOrigin=Ţara de origine -Nature=Nature of product (material/finished) +Nature=Natură produs(materie primă/produs finit) +NatureOfProductShort=Natură produs +NatureOfProductDesc=Materie primă sau produs finit ShortLabel=Etichetă scurta Unit=Unit p=u. @@ -202,7 +205,7 @@ unitLM=Metru liniar unitM2=Metru patrat unitM3=Metru cub unitL=Litru -unitT=ton +unitT=tonă unitKG=kg unitG=Gram unitMG=mg @@ -213,7 +216,7 @@ unitDM=dm unitCM=cm unitMM=mm unitFT=ft -unitIN=in +unitIN=inch unitM2=Metru patrat unitDM2=dm² unitCM2=cm² @@ -241,8 +244,8 @@ UseMultipriceRules=Utilizați regulile segmentului de preț (definite în config PercentVariationOver=Variația %% peste %s PercentDiscountOver=%% reducere peste %s KeepEmptyForAutoCalculation=Păstrați gol pentru a calcula acest lucru automat din greutate sau din volumul de produse -VariantRefExample=Examples: COL, SIZE -VariantLabelExample=Examples: Color, Size +VariantRefExample=Exemple: COL, SIZE +VariantLabelExample=Exemple: Culoare, Dimensiune ### composition fabrication Build=Produce ProductsMultiPrice=Produsele și prețurile pentru fiecare segment de preț @@ -294,7 +297,7 @@ AddVariable=Adăugați variabilă AddUpdater=Adăugați Updater GlobalVariables=Variabile globale VariableToUpdate=Variabilă de actualizat -GlobalVariableUpdaters=External updaters for variables +GlobalVariableUpdaters= Actualizatoare externe pentru variabile GlobalVariableUpdaterType0=Date JSON GlobalVariableUpdaterHelp0=Analizează datele JSON din adresa URL specificată, VALUE specifică locația valorii relevante, GlobalVariableUpdaterHelpFormat0=Format pentru solicitare {"URL": "http://example.com/urlofjson", "VALUE": "array1, array2, targetvalue"} @@ -320,10 +323,10 @@ ProductWeight=Greutate pentru 1 produs ProductVolume=Volum pentru 1 produs WeightUnits=Unitate de greutate VolumeUnits=Unitate de volum -WidthUnits=Width unit -LengthUnits=Length unit -HeightUnits=Height unit -SurfaceUnits=Surface unit +WidthUnits=Unitate lățime +LengthUnits=Unitate lungime +HeightUnits=Unitate înălţime +SurfaceUnits=Unitate suprafaţă SizeUnits=Unitate de măsură DeleteProductBuyPrice=Ștergeți prețul de achiziție ConfirmDeleteProductBuyPrice=Sigur doriți să ștergeți acest preț de cumpărare? @@ -332,11 +335,11 @@ ProductSheet=Fișa produsului ServiceSheet=Foaia de service PossibleValues=Valori posibile GoOnMenuToCreateVairants=Mergeți în meniul %s - %s pentru a pregăti variantele atributelor (cum ar fi culorile, mărimea, ...) -UseProductFournDesc=Add a feature to define the descriptions of products defined by the vendors in addition to descriptions for customers +UseProductFournDesc=Adăugați o caracteristică pentru a defini descrierile produselor definite de furnizori, pe lângă descrierile pentru clienți ProductSupplierDescription=Descrierea furnizorului pentru produs -UseProductSupplierPackaging=Use packaging on supplier prices (recalculate quantities according to packaging set on supplier price when adding/updating line in supplier documents) -PackagingForThisProduct=Packaging -QtyRecalculatedWithPackaging=The quantity of the line were recalculated according to supplier packaging +UseProductSupplierPackaging=Utilizați unităţile de ambalare la prețurile furnizorului (recalculați cantitățile în funcție de unităţile de ambalare stabilite la prețul furnizorului atunci când adăugați/actualizați linia în documentele furnizorului) +PackagingForThisProduct=Ambalare +QtyRecalculatedWithPackaging=Cantitatea liniei a fost recalculată conform unităţii de ambalare a furnizorului #Attributes VariantAttributes=Atribute variabile @@ -359,6 +362,9 @@ SelectCombination=Selectați combinația ProductCombinationGenerator=Generator de variante Features=Caracteristici PriceImpact=Impactul prețului +ImpactOnPriceLevel=Impact pe nivelul de preţ %s +ApplyToAllPriceImpactLevel= Aplică la toate nivelele +ApplyToAllPriceImpactLevelHelp=Făcând clic aici setați același impact asupra prețurilor pe toate nivelurile WeightImpact=Impactul greutăţii NewProductAttribute=Atribut nou NewProductAttributeValue=Valoare nouă a atributului @@ -367,10 +373,10 @@ ProductCombinationGeneratorWarning=Dacă veți continua, înainte de a genera no TooMuchCombinationsWarning=Generarea de numeroase variante poate avea ca rezultat un procesor ridicat, utilizarea memoriei și Dolibarr care nu le poate crea. Activarea opțiunii "%s" poate ajuta la reducerea utilizării memoriei. DoNotRemovePreviousCombinations=Nu eliminați variantele anterioare UsePercentageVariations=Utilizați variații procentuale -PercentageVariation=Procentaj variație +PercentageVariation=Variație procentuală ErrorDeletingGeneratedProducts=A apărut o eroare în timp ce încercați să ștergeți variantele de produs existente NbOfDifferentValues=Nr. de valori diferite -NbProducts=Number of products +NbProducts=Număr de produse ParentProduct=Produsul Părinte HideChildProducts=Ascundeți variantele produselor ShowChildProducts=Afișați variantele produselor @@ -380,7 +386,7 @@ CloneDestinationReference=Destinație referință produs ErrorCopyProductCombinations=A apărut o eroare la copierea variantelor de produs ErrorDestinationProductNotFound=Destinația produsului nu a fost găsita ErrorProductCombinationNotFound=Varianta de produs nu a fost găsită -ActionAvailableOnVariantProductOnly=Action only available on the variant of product -ProductsPricePerCustomer=Product prices per customers -ProductSupplierExtraFields=Additional Attributes (Supplier Prices) -DeleteLinkedProduct=Delete the child product linked to the combination +ActionAvailableOnVariantProductOnly=Acțiune disponibilă numai pentru varianta de produs +ProductsPricePerCustomer=Preţuri produs per clienţi +ProductSupplierExtraFields=Atribute suplimentare (Preţuri furnizor) +DeleteLinkedProduct=Ștergeți produsul copil asociat la combinație diff --git a/htdocs/langs/ro_RO/projects.lang b/htdocs/langs/ro_RO/projects.lang index 449a9d81e4d..25a12b3f4cd 100644 --- a/htdocs/langs/ro_RO/projects.lang +++ b/htdocs/langs/ro_RO/projects.lang @@ -7,7 +7,7 @@ ProjectsArea=Proiecte ProjectStatus=Statut Proiect SharedProject=Toată lumea PrivateProject=Contacte Proiect -ProjectsImContactFor=Projects for which I am explicitly a contact +ProjectsImContactFor=Proiecte pentru care sunt persoană de contact în mod explicit AllAllowedProjects=Toate proiectele pe care le pot citi (mie + public) AllProjects=Toate proiectele MyProjectsDesc=Această vizualizare este limitată la proiectele pentru care sunteți de contactat @@ -39,15 +39,15 @@ ShowProject=Afişează proiect ShowTask=Arată sarcină SetProject=Setare proiect NoProject=Niciun proiect definit sau responsabil -NbOfProjects=Number of projects -NbOfTasks=Number of tasks +NbOfProjects=Număr proiecte +NbOfTasks=Număr task-uri TimeSpent=Timp comsumat TimeSpentByYou=Timpul consumat da tine TimeSpentByUser=Timp consumat pe utilizator TimesSpent=Timpi consumaţi -TaskId=Task ID -RefTask=Task ref. -LabelTask=Task label +TaskId=ID task +RefTask=Ref. task +LabelTask=Denumire task TaskTimeSpent=Timp consumat pe task TaskTimeUser=Utilizator TaskTimeNote=Nota @@ -58,8 +58,8 @@ NewTimeSpent=Timpi consumaţi MyTimeSpent=Timpul meu consumat BillTime=Facturează timpul petrecut BillTimeShort=Timp facturat -TimeToBill=Time not billed -TimeBilled=Time billed +TimeToBill=Timp nefacturat +TimeBilled=Timp facturat Tasks=Taskuri Task=Task TaskDateStart=Data start task @@ -69,7 +69,7 @@ NewTask=Task nou AddTask=Creare sarcină AddTimeSpent=Creați timp petrecut AddHereTimeSpentForDay=Adăugați aici timpul petrecut pentru această zi / sarcină -AddHereTimeSpentForWeek=Add here time spent for this week/task +AddHereTimeSpentForWeek=Adaugă aici timpul consumat pe săptămână/task Activity=Activitate Activities=Activităţi / Taskuri MyActivities=Activităţile / Taskurile mele @@ -77,13 +77,13 @@ MyProjects=Proiectele mele MyProjectsArea=Zona proiectelor mele DurationEffective=Durata efectivă ProgressDeclared=Progres calculat -TaskProgressSummary=Task progress -CurentlyOpenedTasks=Curently open tasks -TheReportedProgressIsLessThanTheCalculatedProgressionByX=The declared progress is less %s than the calculated progression -TheReportedProgressIsMoreThanTheCalculatedProgressionByX=The declared progress is more %s than the calculated progression +TaskProgressSummary=Progres task +CurentlyOpenedTasks=Taskuri deschise recent +TheReportedProgressIsLessThanTheCalculatedProgressionByX=Progresul declarat este mai mic cu %s decât cel calculat +TheReportedProgressIsMoreThanTheCalculatedProgressionByX=Progresul declarat este mai mare cu %s decât cel calculat ProgressCalculated=Progres calculat -WhichIamLinkedTo=which I'm linked to -WhichIamLinkedToProject=which I'm linked to project +WhichIamLinkedTo=la care sunt atribuit +WhichIamLinkedToProject=pentru care sunt atribuit la proiect Time=Timp ListOfTasks=Lista de sarcini GoToListOfTimeConsumed=Accesați lista de timp consumată @@ -102,7 +102,7 @@ ListDonationsAssociatedProject=Lista donațiilor aferente proiectului ListVariousPaymentsAssociatedProject=Lista diverselor plăți aferente proiectului ListSalariesAssociatedProject=Lista plăților salariale aferente proiectului ListActionsAssociatedProject=Lista evenimentelor aferente proiectului -ListMOAssociatedProject=List of manufacturing orders related to the project +ListMOAssociatedProject=Lista comenzilor de producţie aferente proiectului ListTaskTimeUserProject=Lista timpului consumat pe sarcinile proiectului ListTaskTimeForTask=Listă de timp consumat pe sarcină ActivityOnProjectToday=Activitatea pe proiect astăzi @@ -115,7 +115,7 @@ ChildOfTask=Copil de sarcină TaskHasChild=Sarcina are copil NotOwnerOfProject=Nu este proprietar al acestui proiect privat AffectedTo=Alocat la -CantRemoveProject=This project can't be removed as it is referenced by some other objects (invoice, orders or other). See tab '%s'. +CantRemoveProject=Acest proiect nu poate fi şters pentru că este referenţiat de alte obiecte(facturi, comenzi sau altele) Vezi tab-ul '%s'. ValidateProject=Validează proiect ConfirmValidateProject=Sigur doriți să validați acest proiect? CloseAProject=Inchide proiect @@ -132,10 +132,10 @@ DeleteATimeSpent=Ştergeţi timpul consumat ConfirmDeleteATimeSpent=Sigur doriți să ștergeți acest timp petrecut? DoNotShowMyTasksOnly=Afişează, de asemenea, şi taskurile ce nu sunt atribuite mie ShowMyTasksOnly=Vezi numai taskurile atribuite mie -TaskRessourceLinks=Contacts of task +TaskRessourceLinks=Contacte task ProjectsDedicatedToThisThirdParty=Proiecte dedicate acestui terţ NoTasks=Nr sarcini pentru acest proiect -LinkedToAnotherCompany=Legat de terţe părţi, alta +LinkedToAnotherCompany=Legat de terţi, alta TaskIsNotAssignedToUser=Activitate nealocată utilizatorului. Utilizați butonul " %s " pentru a atribui sarcina acum. ErrorTimeSpentIsEmpty=Timpul consumat nu este completat ThisWillAlsoRemoveTasks=Această acţiune va şterge, de asemenea, toate taskurile proiectului (%s ) la acest moment şitoţi timpii petrecuţi. @@ -162,8 +162,8 @@ OpportunityProbability=Probabilitatea oportunităţii OpportunityProbabilityShort=Probabilitatea oportunităţii OpportunityAmount=Valoarea oportunităţii OpportunityAmountShort=Valoarea oportunităţii -OpportunityWeightedAmount=Opportunity weighted amount -OpportunityWeightedAmountShort=Opp. weighted amount +OpportunityWeightedAmount=Suma ponderată a oportunității +OpportunityWeightedAmountShort=Suma ponderată a oportunității OpportunityAmountAverageShort=Valoarea medie a oportunităţii OpportunityAmountWeigthedShort=Valoarea oportunităţii ponderată WonLostExcluded=Câștigat / pierdut eliminat @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Selectați elementul AddElement=Link către element +LinkToElementShort=Link la # Documents models DocumentModelBeluga=Șablon de document de proiect pentru prezentarea obiectelor legate DocumentModelBaleine=Șablon de document de proiect pentru sarcini @@ -186,10 +187,10 @@ PlannedWorkload=Volum de lucru Planificat PlannedWorkloadShort=Volum de muncă ProjectReferers=Obiecte asociate ProjectMustBeValidatedFirst=Proiectul trebuie validat mai întâi -FirstAddRessourceToAllocateTime=Assign a user resource as contact of project to allocate time +FirstAddRessourceToAllocateTime=Atribuie o resursă utilizator ca şi contact al proiectului pentru a aloca timp InputPerDay=Intrare pe zi InputPerWeek=Intrare pe saptamana -InputPerMonth=Input per month +InputPerMonth=Intrări pe lună InputDetail=Detaliile de intrare TimeAlreadyRecorded=Acesta este timpul petrecut deja înregistrat pentru această sarcină/zi și utilizator%s ProjectsWithThisUserAsContact=Proiecte cu acest utilizator ca contact @@ -210,21 +211,21 @@ ProjectNbProjectByMonth=Numărul de proiecte create pe lună ProjectNbTaskByMonth=Numărul de sarcini create pe lună ProjectOppAmountOfProjectsByMonth=Suma de instrucţiuni pe lună ProjectWeightedOppAmountOfProjectsByMonth=Suma ponderată a instrucţiunilor pe lună -ProjectOpenedProjectByOppStatus=Deschideți proiectul / instrucţiuni după stadiul de conducere -ProjectsStatistics=Statistici privind proiectele / conducerea -TasksStatistics=Statistici privind sarcinile de proiect / de conducere +ProjectOpenedProjectByOppStatus=Deschide proiect|lead după statusul lead-ului +ProjectsStatistics=Statistici pentru proiecte sau lead-uri +TasksStatistics=Statisticile cu privire la task-urile proiectelor sau lead-uri TaskAssignedToEnterTime=Sarcină atribuită. Introducerea timpului în această sarcină ar trebui să fie posibilă. IdTaskTime=Id timp sarcină YouCanCompleteRef=Dacă doriți să completați referinta cu un sufix, este recomandat să adăugați un caracter - pentru al separa, astfel încât numerotarea automată va funcționa corect pentru proiectele următoare. De exemplu, %s-MYSUFFIX OpenedProjectsByThirdparties=Proiecte deschise de terți OnlyOpportunitiesShort=Numai conducerea OpenedOpportunitiesShort=Oportunităţi deschise -NotOpenedOpportunitiesShort=Not an open lead +NotOpenedOpportunitiesShort=Nu este un lead deschis NotAnOpportunityShort=Nu este o oportunitate OpportunityTotalAmount=Valoarea totala a oportunităţilor OpportunityPonderatedAmount=Greutatea valorii oportunităţilor OpportunityPonderatedAmountDesc=Suma ponderată a oportunităţilor cu probabilitate -OppStatusPROSP=Prospect +OppStatusPROSP=Prospectare OppStatusQUAL=Calificare OppStatusPROPO=Ofertă OppStatusNEGO=Negociere @@ -238,7 +239,7 @@ LatestModifiedProjects=Ultimele %s proiecte modificate OtherFilteredTasks=Alte sarcini filtrate NoAssignedTasks=Nu au fost găsite sarcini atribuite (atribuiți proiectul / sarcinile utilizatorului curent din caseta de selectare superioară pentru a introduce ora pe acesta) ThirdPartyRequiredToGenerateInvoice=Un terț trebuie definit pe proiect pentru a putea să fie facturat. -ChooseANotYetAssignedTask=Choose a task not yet assigned to you +ChooseANotYetAssignedTask=Alege un task care nu îţi este atribuit # Comments trans AllowCommentOnTask=Permiteți comentariile utilizatorilor pe sarcini AllowCommentOnProject=Permiteți comentariile utilizatorilor pe proiecte @@ -253,16 +254,16 @@ TimeSpentForInvoice=Timpi consumaţi OneLinePerUser=O linie pe utilizator ServiceToUseOnLines=Serviciu de utilizare pe linii InvoiceGeneratedFromTimeSpent=Factura %s a fost generată din timpul petrecut pe proiect -ProjectBillTimeDescription=Check if you enter timesheet on tasks of project AND you plan to generate invoice(s) from the timesheet to bill the customer of the project (do not check if you plan to create invoice that is not based on entered timesheets). Note: To generate invoice, go on tab 'Time spent' of the project and select lines to include. -ProjectFollowOpportunity=Follow opportunity -ProjectFollowTasks=Follow tasks or time spent -Usage=Usage -UsageOpportunity=Usage: Opportunity -UsageTasks=Usage: Tasks -UsageBillTimeShort=Usage: Bill time -InvoiceToUse=Draft invoice to use +ProjectBillTimeDescription=Bifați dacă introduceți un timeline în task-urile proiectului ȘI intenționați să generați factură(i) din foaia de timp pentru a factura proiectul clientului (nu bifați dacă intenționați să creați o factură care nu se bazează pe foile de timp introduse). Notă: Pentru a genera factură, accesați fila "Timpul petrecut" al proiectului și selectați liniile pe care să le includeți. +ProjectFollowOpportunity=Urmăreşte oportunitatea +ProjectFollowTasks=Task-uri urmărite sau timp consumat +Usage=Utilizare +UsageOpportunity=Utilizare: Oportunitate +UsageTasks=Utilizare: Task-uri +UsageBillTimeShort=Utilizare: Timp facturat +InvoiceToUse=Şablon factură de utilizat NewInvoice=Factură nouă -OneLinePerTask=One line per task -OneLinePerPeriod=One line per period -RefTaskParent=Ref. Parent Task -ProfitIsCalculatedWith=Profit is calculated using +OneLinePerTask=O linie per task +OneLinePerPeriod=O linie per perioadă +RefTaskParent=Ref. task părinte +ProfitIsCalculatedWith=Profitul este calculat utilizând diff --git a/htdocs/langs/ro_RO/propal.lang b/htdocs/langs/ro_RO/propal.lang index b9844777bd4..9cc3450abe0 100644 --- a/htdocs/langs/ro_RO/propal.lang +++ b/htdocs/langs/ro_RO/propal.lang @@ -57,7 +57,7 @@ CreateEmptyPropal=Creați o propunere comercială goală sau dintr-o listă de p DefaultProposalDurationValidity=Durata validării implicite a ofertei (în zile) UseCustomerContactAsPropalRecipientIfExist=Utilizați contactul/adresa cu tipul de "propunere de urmărire a contactului" dacă este definită în locul adresei terțului ca adresă destinatar a propunerii ConfirmClonePropal=Sigur doriți să clonați propunerea comercială %s ? -ConfirmReOpenProp=Sigur doriți să redeschideți propunerea comercială %s ? +ConfirmReOpenProp=Sigur doriți să redeschideți oferta comercială %s ? ProposalsAndProposalsLines=Oferte Comerciale si linii ProposalLine=Linie Ofertă AvailabilityPeriod=Disponibilitate Livrare @@ -84,4 +84,4 @@ DefaultModelPropalClosed=Model implicit la închiderea unei oferte comerciale (n ProposalCustomerSignature=Acceptarea scrisă, ștampila companiei, data și semnătura ProposalsStatisticsSuppliers=Statistici privind propunerile furnizorilor CaseFollowedBy=Caz urmat de -SignedOnly=Signed only +SignedOnly=Doar semnată diff --git a/htdocs/langs/ro_RO/receiptprinter.lang b/htdocs/langs/ro_RO/receiptprinter.lang index b53e3bb6a5c..195342d6108 100644 --- a/htdocs/langs/ro_RO/receiptprinter.lang +++ b/htdocs/langs/ro_RO/receiptprinter.lang @@ -15,12 +15,12 @@ CONNECTOR_DUMMY=Dummy Printer CONNECTOR_NETWORK_PRINT=Imprimanta Retea CONNECTOR_FILE_PRINT=Imprimanta locala CONNECTOR_WINDOWS_PRINT=Imprimanta locala Windows -CONNECTOR_CUPS_PRINT=Cups Printer +CONNECTOR_CUPS_PRINT=Imprimantă CUPS CONNECTOR_DUMMY_HELP=Imprimantă falsă de test, nu face nimic CONNECTOR_NETWORK_PRINT_HELP=10.x.x.x:9100 CONNECTOR_FILE_PRINT_HELP=/dev/usb/lp0, /dev/usb/lp1 CONNECTOR_WINDOWS_PRINT_HELP=LPT1, COM1, smb: // FooUser: secret @ computername / workgroup / Printer Receipt -CONNECTOR_CUPS_PRINT_HELP=CUPS printer name, example: HPRT_TP805L +CONNECTOR_CUPS_PRINT_HELP=nume imprimantă CUPS, exemplu: HPRT_TP805L PROFILE_DEFAULT=Default Profil PROFILE_SIMPLE=Simplu Profil PROFILE_EPOSTEP=Epos Tep Profil @@ -31,7 +31,7 @@ PROFILE_SIMPLE_HELP=Profil simplu nu există grafică PROFILE_EPOSTEP_HELP=Epos Tep Profil PROFILE_P822D_HELP=P822D Profil No Graphics PROFILE_STAR_HELP=Star Profil -DOL_LINE_FEED=Skip line +DOL_LINE_FEED=Sări linia DOL_ALIGN_LEFT=Aliniaza stanga text DOL_ALIGN_CENTER=Centreaza text DOL_ALIGN_RIGHT=Aliniaza dreapta text @@ -45,38 +45,38 @@ DOL_CUT_PAPER_PARTIAL=Taie tichet partial DOL_OPEN_DRAWER=Deschide sertarul de bani DOL_ACTIVATE_BUZZER=Activează buzzer DOL_PRINT_QRCODE=Printeaza cod QR -DOL_PRINT_LOGO=Print logo of my company -DOL_PRINT_LOGO_OLD=Print logo of my company (old printers) -DOL_BOLD=Bold -DOL_BOLD_DISABLED=Disable bold -DOL_DOUBLE_HEIGHT=Double height size -DOL_DOUBLE_WIDTH=Double width size -DOL_DEFAULT_HEIGHT_WIDTH=Default height and width size -DOL_UNDERLINE=Enable underline -DOL_UNDERLINE_DISABLED=Disable underline -DOL_BEEP=Beed sound -DOL_PRINT_TEXT=Print text -DateInvoiceWithTime=Invoice date and time -YearInvoice=Invoice year -DOL_VALUE_MONTH_LETTERS=Invoice month in letters -DOL_VALUE_MONTH=Invoice month -DOL_VALUE_DAY=Invoice day -DOL_VALUE_DAY_LETTERS=Inovice day in letters -DOL_LINE_FEED_REVERSE=Line feed reverse -InvoiceID=Invoice ID +DOL_PRINT_LOGO=Tipăreşte logo-ul companiei +DOL_PRINT_LOGO_OLD=Printați logo-ul companiei mele (imprimante vechi) +DOL_BOLD=Îngroşare +DOL_BOLD_DISABLED=Dezactivează îngroşare +DOL_DOUBLE_HEIGHT=Înălţime dublă +DOL_DOUBLE_WIDTH=Lăţime dublă +DOL_DEFAULT_HEIGHT_WIDTH=Înălțimea și lățimea implicită +DOL_UNDERLINE=Activare subliniere +DOL_UNDERLINE_DISABLED= Dezactivare subliniere +DOL_BEEP=Beep +DOL_PRINT_TEXT=Tipăreşte text +DateInvoiceWithTime=Data şi ora facturii +YearInvoice=Anul facturii +DOL_VALUE_MONTH_LETTERS=Luna facturii literal +DOL_VALUE_MONTH=Luna facturii +DOL_VALUE_DAY=Ziua facturii +DOL_VALUE_DAY_LETTERS=Ziua facturii literal +DOL_LINE_FEED_REVERSE=Retur de linie +InvoiceID=ID Factură InvoiceRef=Ref Factură -DOL_PRINT_OBJECT_LINES=Invoice lines -DOL_VALUE_CUSTOMER_FIRSTNAME=Customer first name -DOL_VALUE_CUSTOMER_LASTNAME=Customer last name -DOL_VALUE_CUSTOMER_MAIL=Customer mail -DOL_VALUE_CUSTOMER_PHONE=Customer phone -DOL_VALUE_CUSTOMER_MOBILE=Customer mobile -DOL_VALUE_CUSTOMER_SKYPE=Customer Skype -DOL_VALUE_CUSTOMER_TAX_NUMBER=Customer tax number -DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Customer account balance -DOL_VALUE_MYSOC_NAME=Your company name -VendorLastname=Vendor last name -VendorFirstname=Vendor first name -VendorEmail=Vendor email -DOL_VALUE_CUSTOMER_POINTS=Customer points -DOL_VALUE_OBJECT_POINTS=Object points +DOL_PRINT_OBJECT_LINES=Linii de factură +DOL_VALUE_CUSTOMER_FIRSTNAME=Prenume client +DOL_VALUE_CUSTOMER_LASTNAME=Nume client +DOL_VALUE_CUSTOMER_MAIL=Email client +DOL_VALUE_CUSTOMER_PHONE=Telefon client +DOL_VALUE_CUSTOMER_MOBILE=Mobil client +DOL_VALUE_CUSTOMER_SKYPE=Skype client +DOL_VALUE_CUSTOMER_TAX_NUMBER=Cod TVA client +DOL_VALUE_CUSTOMER_ACCOUNT_BALANCE=Soldul cont client +DOL_VALUE_MYSOC_NAME=Denumirea companiei tale +VendorLastname=Nume furnizor +VendorFirstname=Prenume furnizor +VendorEmail=Email furnizor +DOL_VALUE_CUSTOMER_POINTS=Puncte client +DOL_VALUE_OBJECT_POINTS=Puncte obiect diff --git a/htdocs/langs/ro_RO/receptions.lang b/htdocs/langs/ro_RO/receptions.lang index 604dedd7d65..0f3ec29be18 100644 --- a/htdocs/langs/ro_RO/receptions.lang +++ b/htdocs/langs/ro_RO/receptions.lang @@ -43,5 +43,5 @@ ProductQtyInSuppliersReceptionAlreadyRecevied=Cantitatea de produse din comanda ValidateOrderFirstBeforeReception=Mai întâi trebuie să validezi comanda înainte de a putea face recepții. ReceptionsNumberingModules=Mod de numerotare pentru recepţii ReceptionsReceiptModel=Şabloane documente pentru recepţii -NoMorePredefinedProductToDispatch=No more predefined products to dispatch +NoMorePredefinedProductToDispatch=Nu mai sunt produse predefinite pentru expediere diff --git a/htdocs/langs/ro_RO/recruitment.lang b/htdocs/langs/ro_RO/recruitment.lang new file mode 100644 index 00000000000..cc01cf12885 --- /dev/null +++ b/htdocs/langs/ro_RO/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recrutare personal +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Gestionează și urmărește campaniile de recrutare pentru joburile noi + +# +# Admin page +# +RecruitmentSetup = Configurare modul Recrutare +Settings = Configurări +RecruitmentSetupPage = Introdu aici setările pentru opţiunile principale ale modulului Recrutare personal +RecruitmentArea=Recrutare personal +PublicInterfaceRecruitmentDesc=Paginile publice de locuri de muncă sunt adrese URL publice pentru a afișa și răspunde la joburile deschise. Există o legătură diferită pentru fiecare job deschis, găsit pe fiecare fișă de job. +EnablePublicRecruitmentPages=Activați paginile publice cu joburile disponibile + +# +# About page +# +About = Despre +RecruitmentAbout = Despre modulul Recrutare personal +RecruitmentAboutPage = Despre modulul Recrutări personal +NbOfEmployeesExpected=Necesar număr angajaţi +JobLabel=Denumire job +WorkPlace=Loc de muncă +DateExpected=Data aşteptată +FutureManager=Manager alocat +ResponsibleOfRecruitement=Responsabil cu recrutarea +IfJobIsLocatedAtAPartner=Dacă jobul este în locaţia unui partener +PositionToBeFilled=Ofertă job +PositionsToBeFilled=Oferte joburi +ListOfPositionsToBeFilled=Liste oferte joburi +NewPositionToBeFilled=Oferte job + +JobOfferToBeFilled=Ofertă job +ThisIsInformationOnJobPosition=Informaţii despre oferta job +ContactForRecruitment=Contact pentru recrutare +EmailRecruiter=Email recrutor +ToUseAGenericEmail=Utilizare email generic. Dacă nu este definit, se va utiliza emailul responsabilului de recrutare +NewCandidature=Candidatură nouă +ListOfCandidatures=Listă candidaturi +RequestedRemuneration=Remunerație solicitată +ProposedRemuneration=Remuneraţie propusă +ContractProposed=Contract propus +ContractSigned=Contract semnat +RecruitmentCandidature=Candidatură +JobPositions=Joburi disponibile +RecruitmentCandidatures=Candidaturi +InterviewToDo=Interviu de făcut +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ro_RO/stocks.lang b/htdocs/langs/ro_RO/stocks.lang index fc03258ac40..04b32acb280 100644 --- a/htdocs/langs/ro_RO/stocks.lang +++ b/htdocs/langs/ro_RO/stocks.lang @@ -17,10 +17,10 @@ CancelSending=Anulează expediere DeleteSending=Şterge expediere Stock=Stoc Stocks=Stocuri -MissingStocks=Missing stocks -StockAtDate=Stock at date -StockAtDateInPast=Date in past -StockAtDateInFuture=Date in future +MissingStocks=Stocuri lipsă +StockAtDate=Stocuri la data +StockAtDateInPast=Dată în trecut +StockAtDateInFuture=Dată în viitor StocksByLotSerial=Stocuri după lot/serie LotSerial=Loturi/Serii LotSerialList=Listă lot/serii @@ -34,7 +34,7 @@ StockMovementForId=ID-ul de mișcare %d ListMouvementStockProject=Lista miscărilor de stoc asociate proiectului StocksArea=Depozite AllWarehouses=Toate depozitele -IncludeEmptyDesiredStock=Include also undefined desired stock +IncludeEmptyDesiredStock= Includeți și stocul dorit nedefinit IncludeAlsoDraftOrders=Includeți, de asemenea, schiţele de proiecte Location=Locație LocationSummary=Nume scurt locaţie @@ -60,13 +60,13 @@ PMPValue=Valoric PMP PMPValueShort=WAP EnhancedValueOfWarehouses=Stoc valoric UserWarehouseAutoCreate=Creați automat un depozit utilizator atunci când creați un utilizator -AllowAddLimitStockByWarehouse=Manage also value for minimum and desired stock per pairing (product-warehouse) in addition to the value for minimum and desired stock per product +AllowAddLimitStockByWarehouse=Gestionează, de asemenea, valoarea pentru stocul minim și cel dorit pe perechi (produs-depozit), pe lângă valoarea pentru stocul minim și dorit pe produs RuleForWarehouse=Reguli pentru depozite WarehouseAskWarehouseDuringOrder=Setează un depozit pe comenzile de vânzare UserDefaultWarehouse=Setează un depozit pe utilizatori MainDefaultWarehouse=Depozit implicit -MainDefaultWarehouseUser=Use a default warehouse for each user -MainDefaultWarehouseUserDesc=By activating this option, during creation of a product, the warehouse assigned to the product will be defined on this one. If no warehouse is defined on the user, the default warehouse is defined. +MainDefaultWarehouseUser=Folosiți un depozit implicit pentru fiecare utilizator +MainDefaultWarehouseUserDesc=Prin activarea acestei opțiuni, în timpul creării unui produs, depozitul alocat produsului va fi definit pe acesta. Dacă nu este definit niciun depozit la utilizator, este definit depozitul implicit. IndependantSubProductStock=Stocul de produse și stocul de subproduse sunt independente QtyDispatched=Cantitate dipecerizată QtyDispatchedShort=Cant Expediate @@ -77,12 +77,12 @@ RuleForStockManagementIncrease=Alegeți regula pentru creșterea automată a sto DeStockOnBill=Reduceți stocurile reale la validarea facturii client / notei de credit DeStockOnValidateOrder=Reduceți stocurile reale la validarea ordinului de vânzări DeStockOnShipment=Descreşte stocul fizic bazat pe validarea livrarilor -DeStockOnShipmentOnClosing=Decrease real stocks when shipping is set to closed +DeStockOnShipmentOnClosing=Reduceți stocurile reale atunci când transportul este închis ReStockOnBill=Creșteți stocurile reale la validarea facturii vânzătorului / notei de credit ReStockOnValidateOrder=Creșterea stocurilor reale la aprobarea comenzii de achiziție ReStockOnDispatchOrder=Creșterea stocurilor reale la expedierea manuală în depozit, după primirea comenzii de cumpărare a bunurilor -StockOnReception=Increase real stocks on validation of reception -StockOnReceptionOnClosing=Increase real stocks when reception is set to closed +StockOnReception=Creșterea stocurilor reale la validarea recepției +StockOnReceptionOnClosing=Măriți stocurile reale atunci când recepția este închisă finalizată OrderStatusNotReadyToDispatch=Comanda nu mai este sau nu mai are un statut care să permită dipecerizarea produselor în depozit StockDiffPhysicTeoric=Explicație pentru diferența dintre stocul fizic și virtual NoPredefinedProductToDispatch=Nu sunt produse predefinite pentru acest obiect. Deci, nici o dispecerizare în stoc necesară. @@ -95,14 +95,16 @@ RealStock=Stoc Real RealStockDesc=Stocul fizic / real este stocul aflat în prezent în depozite. RealStockWillAutomaticallyWhen=Stocul real va fi modificat în conformitate cu această regulă (așa cum este definită în modulul Stoc): VirtualStock=Stoc Virtual -VirtualStockDesc=Stocul virtual este stocul calculat disponibil imediat ce toate acțiunile deschise / în așteptare (care afectează stocurile) sunt închise (comenzile de achiziție primite, comenzile de vânzări expediate etc.) +VirtualStockAtDate=Stoc virtual la data +VirtualStockAtDateDesc=Stoc virtual până când toate comenzile în așteptarea livrării care sunt planificate să fie efectuate înainte de termen vor fi finalizate +VirtualStockDesc=Stocul virtual este stocul calculat disponibil odată ce toate acțiunile deschise/în așteptare (care afectează stocurile) sunt închise (comenzi de achiziție primite, comenzi de vânzare expediate, comenzi de fabricație produse etc.) IdWarehouse=ID depozit DescWareHouse=Descriere depozit LieuWareHouse=Localizare depozit WarehousesAndProducts=Depozite şi produse WarehousesAndProductsBatchDetail=Depozite și produse (cu detalii pe lot / serie) -AverageUnitPricePMPShort=Preţul mediu ponderat de intrare -AverageUnitPricePMP=Preţul mediu ponderat de intrare +AverageUnitPricePMPShort=Valoric PMP +AverageUnitPricePMPDesc=Prețul unitar mediu de intrare pe care a trebuit să-l plătim furnizorilor pentru a intra în stocul nostru - PUMP. SellPriceMin=Preţ vânzare unitar EstimatedStockValueSellShort=Valoarea ieşire EstimatedStockValueSell=Valoarea ieşire @@ -130,18 +132,18 @@ CurentlyUsingPhysicalStock=Stoc Fizic RuleForStockReplenishment=Reguli pentru reaprovizionarea stocului SelectProductWithNotNullQty=Selectați cel puțin un produs cu cantitate nenulă și un furnizor AlertOnly= Numai Alerte -IncludeProductWithUndefinedAlerts = Include also negative stock for products with no desired quantity defined, to restore them to 0 +IncludeProductWithUndefinedAlerts = Includeți și stocuri negative pentru produsele fără cantitatea dorită definită, pentru a le restabili la 0 WarehouseForStockDecrease=Depozitul %s va fi utilizat pentru scăderea stocului WarehouseForStockIncrease=Depozitul %s va fi utilizat pentru creşterea stocului ForThisWarehouse=Pentru acest depozit ReplenishmentStatusDesc=Aceasta este o listă a tuturor produselor cu un stoc mai mic decât cel dorit (sau mai mic decât valoarea de alertă dacă este bifat checkbox-ul "numai alertă"). Dacă utilizați checkbox-ul, puteți crea comenzi de achiziție pentru a umple diferența. -ReplenishmentStatusDescPerWarehouse=If you want a replenishment based on desired quantity defined per warehouse, you must add a filter on the warehouse. +ReplenishmentStatusDescPerWarehouse=Dacă doriți o reaprovizionare bazată pe cantitatea dorită definită pe depozit, trebuie să adăugați un filtru pe depozit. ReplenishmentOrdersDesc=Aceasta este o listă a tuturor comenzilor de cumpărare deschise, inclusiv a produselor predefinite. Numai comenzile deschise cu produse predefinite, deci comenzile care pot afecta stocurile, sunt vizibile aici. Replenishments=Reaprovizionări NbOfProductBeforePeriod=Cantitatea de produs %s în stoc înainte de perioada selectată (< %s) NbOfProductAfterPeriod=Cantitatea de produs %s în stoc după perioada selectată (> %s) MassMovement=Mişcare în masă -SelectProductInAndOutWareHouse=Selectați un produs, o cantitate, un depozit sursă și un depozit țintă, apoi faceți clic pe"%s". Odată făcut acest lucru pentru toate transferurile cerute, faceți clic pe "%s". +SelectProductInAndOutWareHouse=Selectați un depozit sursă și un depozit destinaţie, un produs și o cantitate, apoi faceți clic pe "%s". Odată făcut acest lucru pentru toate mișcările necesare, faceți clic pe "%s". RecordMovement=Transferul înregistrărilor ReceivingForSameOrder=Recepţii pentru această comandă StockMovementRecorded=Mişcări stoc înregistrate @@ -156,7 +158,7 @@ InventoryCode=Codul de inventar sau transfer IsInPackage=Continute in pachet WarehouseAllowNegativeTransfer=Stocul poate fi negativ qtyToTranferIsNotEnough=Nu aveți suficiente stocuri din depozitul sursă și configurația dvs. nu permite stocuri negative. -qtyToTranferLotIsNotEnough=You don't have enough stock, for this lot number, from your source warehouse and your setup does not allow negative stocks (Qty for product '%s' with lot '%s' is %s in warehouse '%s'). +qtyToTranferLotIsNotEnough=Nu aveți suficient stoc, pentru acest număr de lot, din depozitul sursă, iar sistemul este configurat să nu permită stocuri negative (cantitatea de produs '%s' din lotul '%s' este %s în depozitul '%s'). ShowWarehouse=Arată depozit MovementCorrectStock=Corecția stocului pentru produsul%s MovementTransferStock=Transfer stoc al produsului %s in alt depozit @@ -198,7 +200,7 @@ SelectFournisseur=Filtru furnizor inventoryOnDate=Inventar INVENTORY_DISABLE_VIRTUAL=Produs virtual (kit): nu reduceți stocul de subprodus INVENTORY_USE_MIN_PA_IF_NO_LAST_PA=Utilizați prețul de cumpărare dacă nu puteți găsi ultimul preț de cumpărare -INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT=Stock movements will have the date of inventory (instead of the date of inventory validation) +INVENTORY_USE_INVENTORY_DATE_FOR_DATE_OF_MVT= Mișcările de stoc vor avea data inventarului (în loc de data validării inventarului) inventoryChangePMPPermission=Permiteți modificarea valorii PMP pentru un produs ColumnNewPMP=Nouă unitate PMP OnlyProdsInStock=Nu adăugați produsul fără stoc @@ -206,7 +208,7 @@ TheoricalQty=Cantitate teoretică TheoricalValue=Cantitate teoretică LastPA=Ultimul BP CurrentPA=BP Curent -RecordedQty=Recorded Qty +RecordedQty=Cantitate înregistrată RealQty=Cantitate reală RealValue=Valoare reală RegulatedQty=Cantitate reglementată @@ -227,11 +229,14 @@ StockIncreaseAfterCorrectTransfer=Măriți prin corecție/transfer StockDecreaseAfterCorrectTransfer=Scădeți prin corecție/transfer StockIncrease=Creșterea stocului StockDecrease=Scăderea stocului -InventoryForASpecificWarehouse=Inventory for a specific warehouse -InventoryForASpecificProduct=Inventory for a specific product -StockIsRequiredToChooseWhichLotToUse=Stock is required to choose which lot to use -ForceTo=Force to -AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (Warning: This may decrease dramatically performances) -StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past -StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future -CurrentStock=Current stock +InventoryForASpecificWarehouse=Inventar pentru un depozit specific +InventoryForASpecificProduct=Inventar pentru un produs specific +StockIsRequiredToChooseWhichLotToUse=Stocul trebuie specificat pentru a putea alege lotul care va fi folosit +ForceTo=Forţează la +AlwaysShowFullArbo=Afișează arborele complet al depozitului pe fereastra popup a legăturilor de depozit (Avertisment: Aceasta poate scădea dramatic performanțele sistemului) +StockAtDatePastDesc=Poți vedea aici stocul (stoc real) la o dată prestabilită în trecut +StockAtDateFutureDesc=Puteți vizualiza aici stocul (stoc virtual) la o dată dată în viitor +CurrentStock=Stoc curent +InventoryRealQtyHelp=Setați valoarea la 0 pentru a reseta câmpul cantitate
    Lăsaţi necompletat, sau eliminaţi linia, pentru a păstra neschimbat +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ro_RO/stripe.lang b/htdocs/langs/ro_RO/stripe.lang index 9646bb98cf7..290f8809f09 100644 --- a/htdocs/langs/ro_RO/stripe.lang +++ b/htdocs/langs/ro_RO/stripe.lang @@ -12,17 +12,17 @@ YourEMail=E-mail de confirmare de plată STRIPE_PAYONLINE_SENDEMAIL=Email de notificare după o încercare de plată (succes sau eșec) Creditor=Creditor PaymentCode=Cod Plata -StripeDoPayment=Pay with Stripe +StripeDoPayment=Plăteşte cu Stripe YouWillBeRedirectedOnStripe=Veți fi redirecționat pe pagina Stripe securizată pentru a vă introduce informațiile despre cardul de credit Continue=Următor ToOfferALinkForOnlinePayment=URL-ul pentru plata %s -ToOfferALinkForOnlinePaymentOnOrder=URL to offer a %s online payment page for a sales order -ToOfferALinkForOnlinePaymentOnInvoice=URL to offer a %s online payment page for a customer invoice -ToOfferALinkForOnlinePaymentOnContractLine=URL to offer a %s online payment page for a contract line -ToOfferALinkForOnlinePaymentOnFreeAmount=URL to offer a %s online payment page of any amount with no existing object -ToOfferALinkForOnlinePaymentOnMemberSubscription=URL to offer a %s online payment page for a member subscription -ToOfferALinkForOnlinePaymentOnDonation=URL to offer a %s online payment page for payment of a donation -YouCanAddTagOnUrl=You can also add url parameter &tag=value to any of those URL (mandatory only for payment not linked to an object) to add your own payment comment tag.
    For the URL of payments with no existing object, you may also add the parameter &noidempotency=1 so the same link with same tag can be used several times (some payment mode may limit the payment to 1 for each different link without this parameter) +ToOfferALinkForOnlinePaymentOnOrder=URL oferit pentru %s plată online pentru o comandă de vânzare +ToOfferALinkForOnlinePaymentOnInvoice= URL oferit pentru %s plată online pentru factură client +ToOfferALinkForOnlinePaymentOnContractLine= URL oferit pentru %s plată online pentru o linie de contract +ToOfferALinkForOnlinePaymentOnFreeAmount=URL oferit pentru %s plată online pentru orice sumă fără un produs/serviciu existent +ToOfferALinkForOnlinePaymentOnMemberSubscription= URL oferit pentru %s plată online pentru o cotizaţie de membru +ToOfferALinkForOnlinePaymentOnDonation= URL oferit pentru %s plată online pentru o achitare sau donaţie +YouCanAddTagOnUrl=Puteți adăuga, de asemenea, parametrul url & tag = valoare la oricare dintre respectivele URL (obligatoriu numai pentru plata care nu este legată de un obiect) pentru a adăuga motivul efectuării.
    Pentru adresa URL a plăților fără obiect existent, puteți adăuga și parametrul & noidempotency = 1 pentru ca aceeași legătură cu aceeași etichetă să poată fi folosită de mai multe ori (anumite moduri de plată pot plafona plata la 1 pentru fiecare link diferit fără acest parametru) SetupStripeToHavePaymentCreatedAutomatically=Configurați-vă Stripe cu URL %s pentru a avea o plată creată automat când este validată de Stripe. AccountParameter=Parametri Cont UsageParameter=Utilizarea parametrilor @@ -32,7 +32,7 @@ VendorName=Numele vânzătorului CSSUrlForPaymentForm=CSS foaie de URL-ul de stil pentru forma de plată NewStripePaymentReceived=Plata noua Stripe incasata NewStripePaymentFailed=Plata noua Stripe incercata dar esuata -FailedToChargeCard=Failed to charge card +FailedToChargeCard=Nu s-a putut încasa de pe card STRIPE_TEST_SECRET_KEY=Cheie de testare secreta STRIPE_TEST_PUBLISHABLE_KEY=Cheia de test publicabilă STRIPE_TEST_WEBHOOK_KEY=Cheia de test Webhook @@ -42,7 +42,7 @@ STRIPE_LIVE_WEBHOOK_KEY=Cheie in direct Webhook ONLINE_PAYMENT_WAREHOUSE=Stoc de utilizat pentru scăderea stocului atunci când se efectuează plata online
    (TODO Când opțiunea de a reduce stocul se face printr-o acțiune pe factură, iar plata online generează factura?) StripeLiveEnabled=Stripe live activat (altfel test / modul sandbox) StripeImportPayment=Plățile pentru importul Stripe -ExampleOfTestCreditCard=Example of credit card for test: %s => valid, %s => error CVC, %s => expired, %s => charge fails +ExampleOfTestCreditCard=Exemplu de card de credit pentru test: %s=> valid,%s => eroare CVC, %s=> expirat, %s=> retragere eşuată StripeGateways=Iesiri Stripe OAUTH_STRIPE_TEST_ID=ID-ul de conectare Stripe a clientului (ca _...) OAUTH_STRIPE_LIVE_ID=ID-ul de conectare Stripe a clientului (ca _...) @@ -65,8 +65,8 @@ CreateCardOnStripe=Creați un card pe Stripe ShowInStripe=Arată în Stripe StripeUserAccountForActions=Cont utilizator pe care să îl utilizați pentru notificarea prin email a anumitor evenimente Stripe (plăți Stripe) StripePayoutList=Listă de plăți Stripe -ToOfferALinkForTestWebhook=Link to setup Stripe WebHook to call the IPN (test mode) -ToOfferALinkForLiveWebhook=Link to setup Stripe WebHook to call the IPN (live mode) -PaymentWillBeRecordedForNextPeriod=Payment will be recorded for the next period. -ClickHereToTryAgain=Click here to try again... -CreationOfPaymentModeMustBeDoneFromStripeInterface=Due to Strong Customer Authentication rules, creation of a card must be done from Stripe backoffice. You can click here to switch on Stripe customer record: %s +ToOfferALinkForTestWebhook=Link de configurare Stripe WebHook pentru a apel IPN (mod de test) +ToOfferALinkForLiveWebhook=Link de configurare Stripe WebHook pentru a apel IPN (mod live) +PaymentWillBeRecordedForNextPeriod=Plata va fi înregistrată pentru perioada următoare. +ClickHereToTryAgain=Clic aici pentru a încerca din nou... +CreationOfPaymentModeMustBeDoneFromStripeInterface=Datorită regulilor de autentificare securizată a clienților, crearea unui card trebuie făcută din backoffice-ul Stripe. Puteți face clic aici pentru a activa înregistrarea clienților Stripe: %s diff --git a/htdocs/langs/ro_RO/supplier_proposal.lang b/htdocs/langs/ro_RO/supplier_proposal.lang index 1a50b477754..756cd3f1ab6 100644 --- a/htdocs/langs/ro_RO/supplier_proposal.lang +++ b/htdocs/langs/ro_RO/supplier_proposal.lang @@ -6,7 +6,7 @@ CommRequest=Cerere Preţ CommRequests=Cereri Preţ SearchRequest=Cauta o cerere DraftRequests=Cereri schiţă -SupplierProposalsDraft=Proiectarea propunerior furnizorului +SupplierProposalsDraft=Propuneri furnizor schiţă LastModifiedRequests=Ultimele %scereri de prețuri modificate RequestsOpened=Deschide Cereri Preţ SupplierProposalArea=Domeniul propunerilor furnizorilor diff --git a/htdocs/langs/ro_RO/suppliers.lang b/htdocs/langs/ro_RO/suppliers.lang index 1acfe2d1fdd..c6828bbbeed 100644 --- a/htdocs/langs/ro_RO/suppliers.lang +++ b/htdocs/langs/ro_RO/suppliers.lang @@ -1,47 +1,47 @@ -# Dolibarr language file - Source file is en_US - suppliers -Suppliers=Vendors -SuppliersInvoice=Vendor invoice -ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor +# Dolibarr language file - Source file is en_US - vendors +Suppliers=Furnizori +SuppliersInvoice=Factura furnizorului +ShowSupplierInvoice=Afișați factura furnizorului +NewSupplier=Furnizor nou History=Istoric -ListOfSuppliers=List of vendors -ShowSupplier=Show vendor -OrderDate=Data comandă -BuyingPriceMin=Best buying price -BuyingPriceMinShort=Best buying price +ListOfSuppliers=Lista furnizori +ShowSupplier=Afișează furnizorul +OrderDate=Data comenzii +BuyingPriceMin=Cel mai bun preț de cumpărare +BuyingPriceMinShort=Cel mai bun preț de cumpărare TotalBuyingPriceMinShort=Total prețuri de cumpărare subproduse -TotalSellingPriceMinShort=Total of subproducts selling prices +TotalSellingPriceMinShort=Totalul prețurilor de vânzare ale subproduselor SomeSubProductHaveNoPrices=Unele sub-produse nu au un preț definit -AddSupplierPrice=Add buying price -ChangeSupplierPrice=Change buying price -SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Acest furnizor este deja asociat cu referinta: % s -NoRecordedSuppliers=No vendor recorded -SupplierPayment=Vendor payment -SuppliersArea=Vendor area -RefSupplierShort=Ref. vendor +AddSupplierPrice=Adăugați prețul de cumpărare +ChangeSupplierPrice=Modificați prețul de achiziție +SupplierPrices=Prețurile furnizorului +ReferenceSupplierIsAlreadyAssociatedWithAProduct=Această referință de furnizor este asociată deja cu un produs: %s +NoRecordedSuppliers=Nu a fost înregistrat niciun furnizor +SupplierPayment=Plata furnizorului +SuppliersArea=Suprafața vânzătorului +RefSupplierShort=Ref. furnizor Availability=Disponibilitate -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines -ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_1=Facturi furnizor și detalii factură +ExportDataset_fournisseur_2=Facturi și plăți furnizorilor +ExportDataset_fournisseur_3=Comenzile de cumpărare și detaliile comenzii ApproveThisOrder=Aprobă această comandă -ConfirmApproveThisOrder=Are you sure you want to approve order %s? +ConfirmApproveThisOrder=Sigur doriți să aprobați comanda %s ? DenyingThisOrder=Refuză aceasta comanda -ConfirmDenyingThisOrder=Are you sure you want to deny this order %s? -ConfirmCancelThisOrder=Are you sure you want to cancel this order %s? -AddSupplierOrder=Create Purchase Order -AddSupplierInvoice=Create vendor invoice -ListOfSupplierProductForSupplier=List of products and prices for vendor %s -SentToSuppliers=Sent to vendors -ListOfSupplierOrders=List of purchase orders -MenuOrdersSupplierToBill=Purchase orders to invoice -NbDaysToDelivery= Intârziere Livrare in zile -DescNbDaysToDelivery=The biggest deliver delay of the products from this order -SupplierReputation=Vendor reputation -DoNotOrderThisProductToThisSupplier=Do not order -NotTheGoodQualitySupplier=Wrong quality -ReputationForThisProduct=Reputation -BuyerName=Buyer name -AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of supplier -BuyingPriceNumShort=Vendor prices +ConfirmDenyingThisOrder=Sigur doriți să refuzați această comandă %s ? +ConfirmCancelThisOrder=Sigur doriți să anulați această comandă %s ? +AddSupplierOrder=Creați comanda de aprovizionare +AddSupplierInvoice=Creați factura furnizorilor +ListOfSupplierProductForSupplier=Lista de produse și prețuri pentru vânzător %s +SentToSuppliers=Trimite furnizorilor +ListOfSupplierOrders=Lista comenzilor de achiziție +MenuOrdersSupplierToBill=Comenzi de achiziție pentru facturare +NbDaysToDelivery=întârziere de livrare (zile) +DescNbDaysToDelivery=Cea mai lungă întârziere de livrare a produselor din această comandă +SupplierReputation=Reputația furnizorului +DoNotOrderThisProductToThisSupplier=Nu comanda +NotTheGoodQualitySupplier=Calitate scăzută +ReputationForThisProduct=Reputatie +BuyerName=Numele cumpărătorului +AllProductServicePrices=Toate preturile produselor / serviciilor +AllProductReferencesOfSupplier=Toate referinţele furnizorului +BuyingPriceNumShort=Prețurile furnizorului diff --git a/htdocs/langs/ro_RO/ticket.lang b/htdocs/langs/ro_RO/ticket.lang index 4c44a686e55..6c582307da8 100644 --- a/htdocs/langs/ro_RO/ticket.lang +++ b/htdocs/langs/ro_RO/ticket.lang @@ -30,14 +30,14 @@ Permission56005=Vedeți tichetele tuturor terților (nu sunt eficiente pentru ut TicketDictType=Tipuri de tichete TicketDictCategory=Tichet - Grupuri TicketDictSeverity=Tichet - Severități -TicketDictResolution=Ticket - Resolution +TicketDictResolution=Tichet - Rezoluție TicketTypeShortBUGSOFT=Logică disfuncţională TicketTypeShortBUGHARD=Material disfuncţional TicketTypeShortCOM=Întrebare comercială -TicketTypeShortHELP=Request for functionnal help -TicketTypeShortISSUE=Issue, bug or problem -TicketTypeShortREQUEST=Change or enhancement request +TicketTypeShortHELP=Solicitare funcţionalitate +TicketTypeShortISSUE=Solicitare, eroare sau problemă +TicketTypeShortREQUEST=Solicitare de modificare sau îmbunătăţire TicketTypeShortPROJET=Proiect TicketTypeShortOTHER=Altele @@ -57,14 +57,14 @@ TypeContact_ticket_external_SUPPORTCLI=Urmărirea contactului/incidentului cu cl TypeContact_ticket_external_CONTRIBUTOR=Contribuitor extern OriginEmail=Sursa emailului -Notify_TICKET_SENTBYMAIL=Send ticket message by email +Notify_TICKET_SENTBYMAIL=Trimite mesaj tichet pe email # Status NotRead=Necitit Read=Citit Assigned=Atribuit InProgress=In progres -NeedMoreInformation=Waiting for information +NeedMoreInformation=În aşteptarea de informaţii Answered=Răspuns Waiting=Aşteptare Closed=Închis @@ -72,7 +72,6 @@ Deleted=Șters # Dict Type=Tip -Category=Codul analitic Severity=Gravitate # Email templates @@ -128,27 +127,26 @@ TicketsAutoAssignTicket=Desemnați automat utilizatorul care a creat tichetul TicketsAutoAssignTicketHelp=La crearea unui tichet, utilizatorul poate fi automat alocat tichetului. TicketNumberingModules=Modul de numerotare a tichetelor TicketNotifyTiersAtCreation=Notificați terțul la creare -TicketGroup=Grup -TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface -TicketsPublicNotificationNewMessage=Send email(s) when a new message is added -TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) -TicketPublicNotificationNewMessageDefaultEmail=Notifications email to (update) -TicketPublicNotificationNewMessageDefaultEmailHelp=Send email new message notifications to this address if the ticket don't have a user assigned or the user don't have a email. +TicketsDisableCustomerEmail=Dezactivați întotdeauna email-urile atunci când un tichet este creat din interfața publică +TicketsPublicNotificationNewMessage=Trimite email(uri) când un mesaj nou este adăugat +TicketsPublicNotificationNewMessageHelp=Trimiteți email(uri) când un nou mesaj este adăugat din interfața publică (utilizatorului atribuit sau adreselor de notificări la (actualizare) și/sau email-ului de notificări către) +TicketPublicNotificationNewMessageDefaultEmail=Notificări email către (actualizare) +TicketPublicNotificationNewMessageDefaultEmailHelp=Trimiteți email-urile referitoare la noile notificări la această adresă dacă tichetul nu are un utilizator alocat sau dacă utilizatorul nu are e-mail. # # Index & list page # -TicketsIndex=Tickets area +TicketsIndex=Tichete TicketList=Lista de tichete TicketAssignedToMeInfos=Această pagină afișează lista de tichete creată de utilizatorul curent sau atribuită acestuia NoTicketsFound=Nu a fost găsit un tichet -NoUnreadTicketsFound=No unread ticket found +NoUnreadTicketsFound=Nici un tichet necitit TicketViewAllTickets=Vezi toate tichetele TicketViewNonClosedOnly=Vedeți numai tichetele deschise TicketStatByStatus=Tichete după statut -OrderByDateAsc=Sort by ascending date -OrderByDateDesc=Sort by descending date -ShowAsConversation=Show as conversation list -MessageListViewType=Show as table list +OrderByDateAsc=Sortare după dată ascendent +OrderByDateDesc=Sortare după dată descendent +ShowAsConversation=Afişare ca listă de conversaţie +MessageListViewType=Afişare listă ca tabel # # Ticket card @@ -162,7 +160,7 @@ CreatedBy=Creat de NewTicket=Tichet nou SubjectAnswerToTicket=Tichet de răspuns TicketTypeRequest=Tip de solicitare -TicketCategory=Codul analitic +TicketCategory=Grup SeeTicket=Vedeți tichetul TicketMarkedAsRead=Tichetul a fost marcat ca citit TicketReadOn=Citește mai departe @@ -234,9 +232,9 @@ TicketConfirmChangeStatus=Confirmați modificarea stării: %s? TicketLogStatusChanged=Starea modificată: %s la %s TicketNotNotifyTiersAtCreate=Nu notificați compania la crearea Unread=Necitită -TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. -PublicInterfaceNotEnabled=Public interface was not enabled -ErrorTicketRefRequired=Ticket reference name is required +TicketNotCreatedFromPublicInterface=Indisponibil. Tichetul nu a fost creat din interfaţa publică. +PublicInterfaceNotEnabled=Interfaţa publică nu a fost activată +ErrorTicketRefRequired=Denumirea de referință al tichetului este necesară # # Logs @@ -246,7 +244,7 @@ NoLogForThisTicket=Nu există jurnal pentru acest bilet încă TicketLogAssignedTo=Tichet %s alocat la %s TicketLogPropertyChanged=Tichet %s modificat: clasificarea de la %s la %s TicketLogClosedBy=Tichet %s închis de %s -TicketLogReopen=Ticket %s re-open +TicketLogReopen=Tichetul %s re-deschis # # Public pages @@ -256,9 +254,9 @@ ShowListTicketWithTrackId=Afișați lista de tichete din ID-ul piesei ShowTicketWithTrackId=Afișați tichetul din ID-ul piesei TicketPublicDesc=Puteți crea un tichet de asistență sau un cec de la un ID existent. YourTicketSuccessfullySaved=Tichetul a fost salvat cu succes! -MesgInfosPublicTicketCreatedWithTrackId=A new ticket has been created with ID %s and Ref %s. +MesgInfosPublicTicketCreatedWithTrackId=Un nou tichet a fost creat cu ID %s şi Ref %s. PleaseRememberThisId=Păstrați numărul de urmărire pe care l-am putea întreba mai târziu. -TicketNewEmailSubject=Ticket creation confirmation - Ref %s (public ticket ID %s) +TicketNewEmailSubject=Confirmare creare tichet - Ref %s (ID tichet public %s) TicketNewEmailSubjectCustomer=Tichet de asistență nou TicketNewEmailBody=Acesta este un email automat pentru a confirma că ați înregistrat un nou tichet. TicketNewEmailBodyCustomer=Acesta este un email automat pentru a confirma că un nou tichet a fost creat în contul dvs. @@ -270,22 +268,22 @@ TicketEmailPleaseDoNotReplyToThisEmail=Nu răspundeți direct la acest email! Ut TicketPublicInfoCreateTicket=Acest formular vă permite să înregistrați un tichet de asistență în sistemul nostru de management. TicketPublicPleaseBeAccuratelyDescribe=Descrieți cu precizie problema. Furnizați cât mai multe informații posibile pentru a ne permite să identificăm corect solicitarea dvs. TicketPublicMsgViewLogIn=Introduceți codul de urmărire a tichetului -TicketTrackId=Public Tracking ID -OneOfTicketTrackId=One of your tracking ID +TicketTrackId=ID tracking public +OneOfTicketTrackId=Unul dintre ID-urile tale de tracking ErrorTicketNotFound=Tichetul cu codul de urmărire %s nu a fost găsit! Subject=Subiect ViewTicket=Vedeți tichetul ViewMyTicketList=Vedeți lista mea de tichete ErrorEmailMustExistToCreateTicket=Eroare: adresa de email nu a fost găsită în baza noastră de date -TicketNewEmailSubjectAdmin=New ticket created - Ref %s (public ticket ID %s) +TicketNewEmailSubjectAdmin=Un nou tichet creat - Ref %s(ID tichet public %s) TicketNewEmailBodyAdmin=

    Tichetul tocmai a fost creat cu ID # %s, vezi informațiile:

    SeeThisTicketIntomanagementInterface=Vedeți tichetul în interfața de gestionare TicketPublicInterfaceForbidden=Interfața publică pentru tichete nu a fost activată -ErrorEmailOrTrackingInvalid=Bad value for tracking ID or email -OldUser=Old user +ErrorEmailOrTrackingInvalid=Valoare incorectă pentru ID tracking sau email +OldUser=Utilizator anterior NewUser=Utilizator nou -NumberOfTicketsByMonth=Number of tickets per month -NbOfTickets=Number of tickets +NumberOfTicketsByMonth=Număr de tichete pe lună +NbOfTickets=Număr de tichete # notifications TicketNotificationEmailSubject=Tichet %s actualizat TicketNotificationEmailBody=Acesta este un mesaj automat care vă anunță că tichetul%s tocmai a fost actualizat diff --git a/htdocs/langs/ro_RO/trips.lang b/htdocs/langs/ro_RO/trips.lang index a563340a042..92727210426 100644 --- a/htdocs/langs/ro_RO/trips.lang +++ b/htdocs/langs/ro_RO/trips.lang @@ -3,26 +3,26 @@ ShowExpenseReport=Arată raportul cheltuielilor Trips=Rapoarte Cheltuieli TripsAndExpenses=Rapoarte Cheltuieli TripsAndExpensesStatistics=Statistici Rapoarte Cheltuieli -TripCard=Fisa Raport Cheltuieli -AddTrip=Creare Raport Cheltuieli +TripCard=Fişa Raport cheltuieli +AddTrip=Creare Raport cheltuieli ListOfTrips=Listă rapoarte de cheltuieli ListOfFees=Lista note cheltuieli TypeFees=Tipuri taxe ShowTrip=Arată raportul cheltuielilor -NewTrip= Raport de cheltuieli nou +NewTrip=Raport de cheltuieli nou LastExpenseReports=Ultimele%s rapoarte de cheltuieli -AllExpenseReports=Toate rapoarte cheltuielilor +AllExpenseReports=Toate rapoartele de cheltuieli CompanyVisited=Compania/instituția vizitată -FeesKilometersOrAmout=Valoarea sau km +FeesKilometersOrAmout=Valoarea sau kilometri DeleteTrip=Șterge raport de cheltuieli ConfirmDeleteTrip=Sigur doriți să ștergeți acest raport de cheltuieli? ListTripsAndExpenses=Listă rapoarte de cheltuieli ListToApprove=În așteptare pentru aprobare -ExpensesArea=Rapoarte de cheltuieli -ClassifyRefunded=Clasează "Rambursată" -ExpenseReportWaitingForApproval=Un nou raport de cheltuieli a fost prezentat spre aprobare -ExpenseReportWaitingForApprovalMessage=Un nou raport de cheltuieli a fost depus și așteaptă aprobarea.
    - Utilizator: %s
    - Perioada: %s
    Faceți clic aici pentru a valida: %s -ExpenseReportWaitingForReApproval=Un raport de cheltuieli a fost prezentat pentru reaprobare +ExpensesArea=Rapoarte cheltuieli +ClassifyRefunded=Clasează 'Rambursată' +ExpenseReportWaitingForApproval=Un nou raport de cheltuieli a fost trimis spre aprobare +ExpenseReportWaitingForApprovalMessage=Un nou raport de cheltuieli a fost trimis și așteaptă aprobarea.
    - Utilizator: %s
    - Perioada: %s
    Faceți clic aici pentru a valida: %s +ExpenseReportWaitingForReApproval=Un raport de cheltuieli a fost trimis pentru reaprobare ExpenseReportWaitingForReApprovalMessage=Un raport de cheltuieli a fost depus și așteaptă o nouă aprobare.
    %s, ați refuzat să aprobați raportul de cheltuieli din acest motiv: %s.
    A fost propusă o nouă versiune și vă așteaptă aprobarea.
    - Utilizator: %s
    - Perioada: %s
    Faceți clic aici pentru validare: %s ExpenseReportApproved=A fost aprobat un raport de cheltuieli ExpenseReportApprovedMessage=Raportul de cheltuieli %s a fost aprobat.
    - Utilizator: %s
    - Aprobat de: %s
    Faceți clic aici pentru a afișa raportul de cheltuieli: %s @@ -33,8 +33,8 @@ ExpenseReportCanceledMessage=Raportul de cheltuieli %s a fost anulat.
    - Uti ExpenseReportPaid=Un raport de cheltuieli a fost plătit ExpenseReportPaidMessage=Raportul de cheltuieli %s a fost plătit.
    - Utilizator: %s
    - Plătit de: %s
    Faceți clic aici pentru a afișa raportul de cheltuieli: %s TripId=ID Raport de cheltuieli -AnyOtherInThisListCanValidate=Persoana de informare pentru validare. -TripSociete=Informații companie +AnyOtherInThisListCanValidate=Persoana care trebuie informată pentru validare. +TripSociete=Informații companie TripNDF=Raport de cheltuieli privind informațiile PDFStandardExpenseReports=Șablon standard pentru generarea unui document PDF pentru raportul de cheltuieli ExpenseReportLine=Line raport de cheltuieli @@ -55,16 +55,16 @@ EX_HOT=Hotel EX_PAR=Variaţia costurilor cu parcarea EX_TOL=Variaţia costurilor cu vama EX_TAX=Diverse taxe -EX_IND=Abonament la despăgubire pentru transporturi +EX_IND=Decontare abonament transport EX_SUM=Întreținere -EX_SUO=Papetărie +EX_SUO=Papetărie - rechizite EX_CAR=Închirieri mașini EX_DOC=Documentație -EX_CUR=Primirea clienților -EX_OTR=Alte primiri -EX_POS=Timbre +EX_CUR=Protocol primire clienți +EX_OTR=Alte cheltuieli de protocol +EX_POS=Timbre şi taxe poştale EX_CAM=Variaţia costurilor cu întreţinerea şi reparaţiile -EX_EMM=Masa angajați +EX_EMM=Masă angajați EX_GUM=Masă oaspeți EX_BRE=Mic dejun EX_FUE_VP=Valoarea actuală a combustibilului @@ -73,12 +73,12 @@ EX_PAR_VP=Valoarea actuală a parcării EX_CAM_VP=Valoarea actuală a întreţinerii şi reparaţiilor DefaultCategoryCar=Modul implicit de transport DefaultRangeNumber=Numărul intervalului implicit -UploadANewFileNow=Upload a new document now +UploadANewFileNow=Încarcă un document nou acum Error_EXPENSEREPORT_ADDON_NotDefined=Eroare, regula de numerotare a rapoartelor de cheltuieli nu a fost definită în configurarea modulului "Raport de cheltuieli" ErrorDoubleDeclaration=Ați declarat un alt raport de cheltuieli într-un interval de timp similar. AucuneLigne=Nu există încă nici un raport de cheltuieli declarate -ModePaiement=Mod plata -VALIDATOR=Utilizator responsabil pentru aprobare +ModePaiement=Mod plată +VALIDATOR=Utilizator responsabil cu aprobarea VALIDOR=Aprobat de AUTHOR=Înregistrat de AUTHORPAIEMENT=Plătite de @@ -89,24 +89,24 @@ MOTIF_CANCEL=Motiv DATE_REFUS=Dată respingere DATE_SAVE=Dată validare DATE_CANCEL=Data anulare -DATE_PAIEMENT=Data Plata +DATE_PAIEMENT=Data plăţii BROUILLONNER=Redeschide ExpenseReportRef=Ref. raport de cheltuieli ValidateAndSubmit=Validareaza și trimite pentru aprobare -ValidatedWaitingApproval=Validat (așteaptă aprobarea) +ValidatedWaitingApproval=Validat(așteaptă aprobarea) NOT_AUTHOR=Tu nu esti autorul acestui raport de cheltuieli. Operatiune anulata. ConfirmRefuseTrip=Sigur doriți să refuzați acest raport de cheltuieli? -ValideTrip=Aproba raport de cheltuieli +ValideTrip=Aprobă raport de cheltuieli ConfirmValideTrip=Sunteți sigur că doriți să aprobaţi acest raport de cheltuieli? -PaidTrip=Plăste un raport de cheltuieli +PaidTrip=Plăteşte un raport de cheltuieli ConfirmPaidTrip=Sigur doriți să schimbați statusul acestui raport de cheltuieli la "Plătit"? ConfirmCancelTrip=Sunteți sigur că doriți să anulaţi acest raport de cheltuieli? BrouillonnerTrip=Mutați raportul de cheltuieli înapoi la starea "Draft" ConfirmBrouillonnerTrip=Sigur doriți să mutați raportul de cheltuieli la starea "Draft"? -SaveTrip=Valideaza raport de cheltuieli +SaveTrip=Validează raport de cheltuieli ConfirmSaveTrip=Sunteți sigur că doriți să validaţi acest raport de cheltuieli? NoTripsToExportCSV=Nu există un raport de cheltuieli de exportat pentru această perioadă. -ExpenseReportPayment=Plata Raport cheltuieli +ExpenseReportPayment=Plată Raport cheltuieli ExpenseReportsToApprove=Rapoartele de cheltuieli pentru aprobare ExpenseReportsToPay=Rapoartele de cheltuieli pentru plată ConfirmCloneExpenseReport=Sigur doriți să clonați acest raport de cheltuieli? @@ -114,7 +114,7 @@ ExpenseReportsIk=Indicele pretului /km din raportul de cheltuieli ExpenseReportsRules=Regulile rapoartelor de cheltuieli ExpenseReportIkDesc=Puteți modifica calculul cheltuielilor/km pe categorii și pe gama care au fost definite anterior. d este distanța în kilometri ExpenseReportRulesDesc=Puteți crea sau actualiza orice reguli de calcul. Această parte va fi utilizată atunci când utilizatorul va crea un nou raport de cheltuieli -expenseReportOffset=Decalaj +expenseReportOffset=Diferenţă expenseReportCoef=Coeficient expenseReportTotalForFive=Exemplu cu d = 5 expenseReportRangeFromTo=de la %d până la %d @@ -134,7 +134,7 @@ AllExpenseReport=Toate tipurile de rapoarte de cheltuieli OnExpense=Linie de cheltuieli ExpenseReportRuleSave=Regula raportului de cheltuieli a fost salvată ExpenseReportRuleErrorOnSave=Eroare: %s -RangeNum=Intervalul %d +RangeNum=Interval %d ExpenseReportConstraintViolationError=Constrângere violare id [%s]: %s este superior lui %s %s byEX_DAY=pe zi (limitare la %s) byEX_MON=pe lună (limitare la %s) @@ -148,4 +148,4 @@ nolimitbyEX_EXP=prin linie (fără limitare) CarCategory=Categorie de autovehicule ExpenseRangeOffset=Suma compensării: %s RangeIk=Interval de kilometri -AttachTheNewLineToTheDocument=Attach the new line to an existing document +AttachTheNewLineToTheDocument=Atașați reperul la un document încărcat diff --git a/htdocs/langs/ro_RO/users.lang b/htdocs/langs/ro_RO/users.lang index efe38577914..a2e0627163f 100644 --- a/htdocs/langs/ro_RO/users.lang +++ b/htdocs/langs/ro_RO/users.lang @@ -1,23 +1,23 @@ # Dolibarr language file - Source file is en_US - users HRMArea=HRM -UserCard=Fişă Utilizator -GroupCard=Fişă Grup -Permission=Permission +UserCard=Fişă utilizator +GroupCard=Fişă grup +Permission=Permisiune Permissions=Permisiuni -EditPassword=Modificarea parolei +EditPassword=Modificare parolă SendNewPassword=Trimite o parolă nouă SendNewPasswordLink=Trimiteți link de resetare parolă -ReinitPassword=Genera o parolă nouă -PasswordChangedTo=Parola schimbat la: %s +ReinitPassword=Generează o parolă nouă +PasswordChangedTo=Parola schimbată la: %s SubjectNewPassword=Noua dvs. parolă pentru %s -GroupRights=Grupul de permisiuni -UserRights=Permisiunile de utilizator +GroupRights=Grup de permisiuni +UserRights=Permisiuni utilizator UserGUISetup=Configurare afișare utilizator -DisableUser=Dezactiva +DisableUser=Dezactivare DisableAUser=Dezactivaţi un utilizator DeleteUser=Şterge -DeleteAUser=A şterge un utilizator -EnableAUser=Permite unui utilizator +DeleteAUser=Şterge un utilizator +EnableAUser=Activează un utilizator DeleteGroup=Şterge DeleteAGroup=Ştergeţi un grup ConfirmDisableUser=Sigur doriți să dezactivați utilizatorul %s ? @@ -27,91 +27,94 @@ ConfirmEnableUser=Sigur doriți să activați utilizatorul %s ? ConfirmReinitPassword=Sigur doriți să generați o nouă parolă pentru utilizatorul %s ? ConfirmSendNewPassword=Sigur doriți să generați și să trimiteți o nouă parolă pentru utilizatorul %s ? NewUser=Utilizator nou -CreateUser=Creaţi utilizator -LoginNotDefined=Login nu este definit. +CreateUser=Creare utilizator +LoginNotDefined=Numele de login nu este definit. NameNotDefined=Numele nu este definit. -ListOfUsers=Lista de utilizatori +ListOfUsers=Listă utilizatori SuperAdministrator=Super Administrator -SuperAdministratorDesc=Administrator, cu toate drepturile +SuperAdministratorDesc=Administrator global, cu toate drepturile AdministratorDesc=Administrator DefaultRights=Permisiuni implicite DefaultRightsDesc=Definiți aici permisiunile implicite care sunt acordate automat unui utilizator nou (pentru a modifica permisiunile pentru utilizatorii existenți, accesați cardul de utilizator). -DolibarrUsers=Dolibarr utilizatori +DolibarrUsers=Utilizatori Dolibarr LastName=Nume FirstName=Prenume -ListOfGroups=Lista de grupuri +ListOfGroups=Listă grupuri NewGroup=Grup nou -CreateGroup=Creaţi grup -RemoveFromGroup=Înlăturaţi din grup -PasswordChangedAndSentTo=Parola schimbat şi a trimis la %s. +CreateGroup=Creare grup +RemoveFromGroup=Înlăturare din grup +PasswordChangedAndSentTo=Parola a fost schimbată şi trimisă la %s. PasswordChangeRequest=Solicitare de modificarea parolei pentru %s PasswordChangeRequestSent=Cerere pentru a schimba parola pentru %s %s la trimis. ConfirmPasswordReset=Confirmați resetarea parolei -MenuUsersAndGroups=Utilizatorii & Grupuri +MenuUsersAndGroups=Utilizatori & Grupuri LastGroupsCreated=Ultimele %s grupuri create de LastUsersCreated=Ultimii %s utilizatori creaţi -ShowGroup=Arata grup -ShowUser=Arata utilizator -NonAffectedUsers=Non afectate utilizatori -UserModified=Utilizator modificate cu succes -PhotoFile=Foto fişier +ShowGroup=Arată grup +ShowUser=Arată utilizator +NonAffectedUsers=Utilizatori nealocaţi +UserModified=Utilizator modificat cu succes +PhotoFile=Fişier foto ListOfUsersInGroup=Lista de utilizatori în acest grup ListOfGroupsForUser=Lista de grupuri pentru acest utilizator LinkToCompanyContact=Link către o terţă parte / de contact -LinkedToDolibarrMember=Link către statele -LinkedToDolibarrUser=Link la Dolibarr utilizator -LinkedToDolibarrThirdParty=Link către o terţă parte Dolibarr -CreateDolibarrLogin=Creare cont Dolibarr -CreateDolibarrThirdParty=Creaţi o terţă parte +LinkedToDolibarrMember=Asociază la membru +LinkedToDolibarrUser=Asociază la utilizator Dolibarr +LinkedToDolibarrThirdParty=Asociază la terţ din sistem +CreateDolibarrLogin=Creare utilizator Dolibarr +CreateDolibarrThirdParty=Creaţi un terţ LoginAccountDisableInDolibarr=Cont dezactivat în Dolibarr. UsePersonalValue=Utilizaţi valoarea personale InternalUser=Interne de utilizator ExportDataset_user_1=Utilizatorii și proprietățile acestora DomainUser=Domeniu utilizatorul %s -Reactivate=Reactivaţi +Reactivate=Reactivare CreateInternalUserDesc=Acest formular vă permite să creați un utilizator intern în compania / organizația dvs. Pentru a crea un utilizator extern (client, furnizor etc.), utilizați butonul "Creare utilizator Dolibarr" de pe cartela de contact a terțului. -InternalExternalDesc=An internal user is a user that is part of your company/organization.
    An external user is a customer, vendor or other (Creating an external user for a third-party can be done from the contact record of the third-party).

    In both cases, permissions defines rights on Dolibarr, also external user can have a different menu manager than internal user (See Home - Setup - Display) +InternalExternalDesc=Un utilizator intern este un utilizator care face parte din compania / organizația dvs.
    Un utilizator extern este un client, un furnizor sau altul (Crearea unui utilizator extern pentru un terț se poate face din înregistrarea de contact a unui terț).

    În ambele cazuri, permisiunile definesc drepturile în Dolibarr, de asemenea, utilizatorul extern poate avea un manager de meniuri diferit de cel intern (a se vedea Acasă - Configurare - Afișare) PermissionInheritedFromAGroup=Permisiunea acordată deoarece moştenită de la un utilizator al unui grup. Inherited=Moştenit UserWillBeInternalUser=De utilizator creat va fi un utilizator intern (pentru că nu este legată de o parte terţă) UserWillBeExternalUser=De utilizator creat va fi un utilizator extern (deoarece legat de un terţ special) IdPhoneCaller=Id-ul telefonului apelantului -NewUserCreated=User %s create +NewUserCreated=Utilizatorul %s a fost creat NewUserPassword=Schimba parola pentru %s -EventUserModified=User %s modificate -UserDisabled=User %s cu handicap -UserEnabled=User %s activat -UserDeleted=User %s eliminat -NewGroupCreated=Grupul creat %s -GroupModified=Grup %s modificat -GroupDeleted=Grupul %s eliminat +NewPasswordValidated=Noua ta parolă a fost validată şi trebuie folosită de acum pentru a te loga. +EventUserModified=Utilizatorul %s a fost modificat +UserDisabled=Utilizatorul %s a fost dezactivat +UserEnabled=Utilizatorul %s a fost activat +UserDeleted=Utilizatorul %s a fost şters +NewGroupCreated=Grupul %s a fost creat +GroupModified=Grupul %s a fost modificat +GroupDeleted=Grupul %s a fost şters ConfirmCreateContact=Sigur doriți să creați un cont Dolibarr pentru această persoană de contact? ConfirmCreateLogin=Sigur doriți să creați un cont Dolibarr pentru acest membru? ConfirmCreateThirdParty=Sigur doriți să creați un terţ pentru acest membru? -LoginToCreate=Login pentru a crea -NameToCreate=Nume de terţă parte pentru a crea -YourRole=Dvs. de roluri -YourQuotaOfUsersIsReached=Cota dvs. de utilizatori activi este atins! -NbOfUsers=Numar de utilizatori +LoginToCreate=Nume login de creat +NameToCreate=Nume terţ de creat +YourRole=Rolurile tale +YourQuotaOfUsersIsReached=Cota ta de utilizatori activi a fost atinsă ! +NbOfUsers=Număr de utilizatori NbOfPermissions=Număr de permisiuni DontDowngradeSuperAdmin=Numai un superadmin poate declasa un superadmin -HierarchicalResponsible=Supervisor +HierarchicalResponsible=Supervizor HierarchicView=Vedere ierarhică UseTypeFieldToChange=Foloseşte câmpul Tip pentru schimbare OpenIDURL=URL OpenID LoginUsingOpenID=Utilizați OpenID pentru login -WeeklyHours=Ore lucrate (pe săptămână) -ExpectedWorkedHours=Numărul de ore lucrate săptămânal preconizat -ColorUser=Culoarea utilizatorului -DisabledInMonoUserMode=Dezactivat in modul mentenanţă -UserAccountancyCode=Codul de contabilitate al utilizatorului -UserLogoff=Logoff utilizator +WeeklyHours=Ore lucrate(pe săptămână) +ExpectedWorkedHours=Numărul estimat de ore lucrate săptămânal +ColorUser=Culoare utilizator +DisabledInMonoUserMode=Dezactivat în modulul mentenanţă +UserAccountancyCode=Cod contabil utilizator +UserLogoff=Deconectare utilizator UserLogged=Utilizator autentificat +DateOfEmployment=Data angajării DateEmployment=Data începerii angajării DateEmploymentEnd=Data încetării angajării CantDisableYourself=Nu vă puteți dezactiva propria înregistrare de utilizator ForceUserExpenseValidator=Forţează validarea raportului de cheltuieli ForceUserHolidayValidator=Forţează validarea cererii de concediu -ValidatorIsSupervisorByDefault= În mod implicit, validatorul este superviser-rul utilizatorului. Nu completaţi pentru a păstra acest comportament. -UserPersonalEmail=Personal email -UserPersonalMobile=Personal mobile phone +ValidatorIsSupervisorByDefault=În mod implicit, validatorul este supervizorul utilizatorului. Nu completaţi pentru a păstra acest comportament. +UserPersonalEmail=Email personal +UserPersonalMobile=Telefon mobil personal +WarningNotLangOfInterface=Atenţie, aceasta este limba principală pe care o vorbește utilizatorul, nu limba interfeței pe care a ales să o vadă. Pentru a schimba limba interfeței pentru acest utilizator, accesați fila %s diff --git a/htdocs/langs/ro_RO/website.lang b/htdocs/langs/ro_RO/website.lang index b0cce8bf277..e1bf4f55213 100644 --- a/htdocs/langs/ro_RO/website.lang +++ b/htdocs/langs/ro_RO/website.lang @@ -2,7 +2,7 @@ Shortname=Cod WebsiteSetupDesc=Creați aici site-urile pe care doriți să le utilizați. Apoi intrați în meniul Websites pentru a le edita. DeleteWebsite=Şterge website -ConfirmDeleteWebsite=Are you sure you want to delete this web site? All its pages and content will also be removed. The files uploaded (like into the medias directory, the ECM module, ...) will remain. +ConfirmDeleteWebsite=Sigur doriți să ștergeți acest site web? Toate paginile și conținutul său vor fi, de asemenea, şterse. Fișierele încărcate (cele din directorul media sau din modulul ECM, ...) vor rămâne. WEBSITE_TYPE_CONTAINER=Tipul paginii/recipientului WEBSITE_PAGE_EXAMPLE=Pagină web pentru utilizare ca exemplu WEBSITE_PAGENAME=Pagina nume/alias @@ -14,18 +14,18 @@ WEBSITE_JS_INLINE=Conținutul fișierului Javascript (comun tuturor paginilor) WEBSITE_HTML_HEADER=Adăugarea în partea de jos a antetului HTML (comun pentru toate paginile) WEBSITE_ROBOT=Fișier robot (robots.txt) WEBSITE_HTACCESS=Fișier .htaccess de pe site -WEBSITE_MANIFEST_JSON=Website manifest.json file -WEBSITE_README=README.md file -WEBSITE_KEYWORDSDesc=Use a comma to separate values -EnterHereLicenseInformation=Enter here meta data or license information to fille a README.md file. if you distribute your website as a template, the file will be included into the temptate package. +WEBSITE_MANIFEST_JSON=Fişier manifest.json website +WEBSITE_README=Fişier README.md +WEBSITE_KEYWORDSDesc=Foloseşte virgula pentru a separa valorile +EnterHereLicenseInformation=Introduceți aici metadate sau informații despre licență pentru a completa fișierul README.md. dacă distribuiți site-ul dvs. ca un șablon, fișierul va fi inclus în pachet. HtmlHeaderPage=Antet HTML (specific numai pentru această pagină) PageNameAliasHelp=Numele sau aliasul paginii.
    Acest alias este, de asemenea, folosit pentru a crea un URL SEO când site-ul web este rulat de o gazdă virtuală a unui server Web (cum ar fi Apacke, Nginx, ...). Utilizați butonul " %s " pentru a edita acest alias. EditTheWebSiteForACommonHeader=Notă: dacă doriți să definiți un antet personalizat pentru toate paginile, modificați antetul la nivelul site-ului în locul paginii / containerului. MediaFiles=Media library -EditCss=Edit website properties +EditCss=Editare proprietăţi website EditMenu=Edit meniu EditMedias=Editați mediile -EditPageMeta=Edit page/container properties +EditPageMeta=Editare proprietăţi pagină/container EditInLine=Editați inline AddWebsite=Adaugă pagina web Webpage=Pagina web / container @@ -43,10 +43,10 @@ ViewPageInNewTab=Afișați pagina în fila nouă SetAsHomePage=Seteaza ca pagina Home RealURL=Real URL ViewWebsiteInProduction=Vizualizați site-ul web utilizând URL-urile de home -SetHereVirtualHost=Use with Apache/NGinx/...
    Create on your web server (Apache, Nginx, ...) a dedicated Virtual Host with PHP enabled and a Root directory on
    %s -ExampleToUseInApacheVirtualHostConfig=Example to use in Apache virtual host setup: +SetHereVirtualHost=Utilizați cu Apache/NGinx/...
    Creați pe serverul dvs. web (Apache, Nginx, ...) un vhost dedicat cu PHP activat și un director Root activat pentru
    %s +ExampleToUseInApacheVirtualHostConfig=Exemplu configuraţie utilizabilă vhost Apache: YouCanAlsoTestWithPHPS= Utilizarea cu serverul încorporat PHP
    În mediul de dezvoltare, puteți prefera să testați site-ul cu serverul web încorporat PHP (PHP 5.5 necesar) executând
    php -S 0.0.0.0:8080 -t %s -YouCanAlsoDeployToAnotherWHP=Run your web site with another Dolibarr Hosting provider
    If you don't have a web server like Apache or NGinx available on internet, you can export and import your web site onto another Dolibarr instance provided by another Dolibarr hosting provider that provide full integration with the Website module. You can find a list of some Dolibarr hosting providers on https://saas.dolibarr.org +YouCanAlsoDeployToAnotherWHP=Rulaţi website-ul dvs. la un alt furnizor de găzduire Dolibarr
    Dacă nu aveți un server web precum Apache sau NGinx disponibil public pe internet, puteți exporta și importa site-ul dvs. web pe o altă instanță Dolibarr furnizată de un alt furnizor de găzduire Dolibarr care asigură o integrare completă cu modulul Website. Puteți găsi o listă a unor furnizori de găzduire Dolibarr pe https://saas.dolibarr.org  CheckVirtualHostPerms=Verificați, de asemenea, că gazda virtuală are permisiunea %s pe fișiere în
    %s ReadPerm=Citit WritePerm=Scrie @@ -58,10 +58,10 @@ NoPageYet=Nici o pagină YouCanCreatePageOrImportTemplate=Puteți să creați o pagină nouă sau să importați un șablon de site complet SyntaxHelp=Ajutor pe sfaturile de sintaxă specifice YouCanEditHtmlSourceckeditor=Puteți edita codul sursă HTML folosind butonul "Sursă" din editor. -YouCanEditHtmlSource=
    You can include PHP code into this source using tags <?php ?>. The following global variables are available: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    You can also include content of another Page/Container with the following syntax:
    <?php includeContainer('alias_of_container_to_include'); ?>

    You can make a redirect to another Page/Container with the following syntax (Note: do not output any content before a redirect):
    <?php redirectToContainer('alias_of_container_to_redirect_to'); ?>

    To add a link to another page, use the syntax:
    <a href="alias_of_page_to_link_to.php">mylink<a>

    To include a link to download a file stored into the documents directory, use the document.php wrapper:
    Example, for a file into documents/ecm (need to be logged), syntax is:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    For a file into documents/medias (open directory for public access), syntax is:
    <a href="/document.php?modulepart=medias&file=[relative_dir/]filename.ext">
    For a file shared with a share link (open access using the sharing hash key of file), syntax is:
    <a href="/document.php?hashp=publicsharekeyoffile">

    To include an image stored into the documents directory, use the viewimage.php wrapper:
    Example, for an image into documents/medias (open directory for public access), syntax is:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    +YouCanEditHtmlSource=
    Puteți include codul PHP în această sursă folosind etichete<?php?>. Sunt disponibile următoarele variabile globale: $conf, $db, $mysoc, $user, $website, $websitepage, $weblangs, $pagelangs.

    Puteți include, de asemenea, conținutul unei alte Pagini/Container cu următoarea sintaxă:
    <?php includeContainer ('alias_of_container_to_include'); ?>

    Puteți face o redirecționare către o altă Pagină/Container cu următoarea sintaxă (Notă: nu emiteți conținut înainte de o redirecționare):
    <?php redirectToContainer ('alias_of_container_to_redirect_to'); ?>

    Pentru a adăuga o legătură la o altă pagină, utilizați sintaxa:
    <a href ="alias_of_page_to_link_to.php">mylink<a>

    Pentru a include un link de descărcare fișier stocat în directorul documentelor, utilizați wrapper-ul document.php:
    Exemplu, pentru un fișier din documente/ECM (trebuie să fie înregistrat), sintaxa este:
    <a href="/document.php?modulepart=ecm&file=[relative_dir/]filename.ext">
    Pentru un fișier din documente/media (director deschis pentru acces public), sintaxa este:
    <a href ="/document.php?modulepart= medias&file=[relative_dir/]indicafilename.ext">
    Pentru un fișier partajat cu o legătură de partajare (acces deschis folosind cheia hash de partajare a fișierului), sintaxa este:
    <a href="/ document.php?hashp=publicsharekeyoffile">

    Pentru a include o imagine stocată în directorul de documente, utilizați wrapper-ul viewimage.php:
    Exemplu, pentru o imagine din documente/media (director deschis pentru acces public), sintaxa este:
    <img src="/viewimage.php?modulepart=medias&file=[relative_dir/]filename.ext">
    #YouCanEditHtmlSource2=
    To include a image shared publicaly, use the viewimage.php wrapper:
    Example with a shared key 123456789, syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSource2=For an image shared with a share link (open access using the sharing hash key of file), syntax is:
    <img src="/viewimage.php?hashp=12345679012...">
    -YouCanEditHtmlSourceMore=
    More examples of HTML or dynamic code available on the wiki documentation
    . +YouCanEditHtmlSource2=Pentru o imagine partajată cu un link de partajare (acces deschis folosind cheia de distribuire a fișierului), sintaxa este:
    <img src="/viewimage.php?hashp=12345679012...">
    +YouCanEditHtmlSourceMore=
    Mai multe exemple de cod HTML sau dinamic sunt disponibile în documentația wiki
    . ClonePage=Clona pagina/container CloneSite=Clonează site-ul SiteAdded=Site adăugat @@ -81,15 +81,15 @@ BlogPost=Postare pe blog WebsiteAccount=Contul site-ului WebsiteAccounts=Conturi de site AddWebsiteAccount=Creați un cont de site web -BackToListForThirdParty=Back to list for the third-party +BackToListForThirdParty=Înapoi la lista terţilor DisableSiteFirst=Dezactivați mai întâi site-ul web MyContainerTitle=Titlul site-ului meu web -AnotherContainer=This is how to include content of another page/container (you may have an error here if you enable dynamic code because the embedded subcontainer may not exists) -SorryWebsiteIsCurrentlyOffLine=Sorry, this website is currently off line. Please comme back later... +AnotherContainer=Așa se include conținutul altei pagini/container (este posibil să aveți o eroare aici dacă activați codul dinamic, deoarece subcontainerul încorporat poate să nu existe) +SorryWebsiteIsCurrentlyOffLine=Ne pare rău, acest site este în prezent offline. Reveniţi mai târziu ... WEBSITE_USE_WEBSITE_ACCOUNTS=Activați tabelul contului site-ului web WEBSITE_USE_WEBSITE_ACCOUNTSTooltip=Activați tabelul pentru a stoca conturile site-urilor web (Autentificare/parola) pentru fiecare site / terț YouMustDefineTheHomePage=Mai întâi trebuie să definiți pagina de Home implicită -OnlyEditionOfSourceForGrabbedContentFuture=Warning: Creating a web page by importing an external web page is reserved for experienced users. Depending on the complexity of source page, the result of importation may differ from the original. Also if the source page uses common CSS styles or conflicting javascript, it may break the look or features of the Website editor when working on this page. This method is a quicker way to create a page but it is recommended to create your new page from scratch or from a suggested page template.
    Note also that the inline editor may not works correclty when used on a grabbed external page. +OnlyEditionOfSourceForGrabbedContentFuture=Atenţie: Crearea unei pagini web prin importarea unei pagini web externe este rezervată utilizatorilor cu experiență. În funcție de complexitatea paginii sursă, rezultatul importului poate diferi de original. De asemenea, dacă pagina sursă folosește stiluri CSS obișnuite sau cod Javascript conflictual, acesta poate altera aspectul sau caracteristicile editorului site-ului Web atunci când lucrați pe această pagină. Această metodă este o modalitate mai rapidă de a crea o pagină, dar este recomandat să creezi pagina ta de la zero sau de la un șablon de pagină sugerat.
    De asemenea, reţineţi că editorul inline nu funcționează corect atunci când este utilizat pe o pagină externă capturată. OnlyEditionOfSourceForGrabbedContent=Numai ediția sursei HTML este posibilă atunci când conținutul a fost preluat de pe un site extern GrabImagesInto=Luați și imaginile găsite în CSS și pagină. ImagesShouldBeSavedInto=Imaginile trebuie salvate în director @@ -99,39 +99,39 @@ AliasPageAlreadyExists=Pagina Alias %s există deja CorporateHomePage=Pagina de Home a companiei EmptyPage=Pagina goală ExternalURLMustStartWithHttp=Adresa URL externă trebuie să înceapă cu http:// sau https:// -ZipOfWebsitePackageToImport=Upload the Zip file of the website template package -ZipOfWebsitePackageToLoad=or Choose an available embedded website template package +ZipOfWebsitePackageToImport=Încărcați fișierul Zip cu pachetul șablon website +ZipOfWebsitePackageToLoad=sau Alegeți un pachet șablon website încorporat disponibil ShowSubcontainers=Includeți conținut dinamic InternalURLOfPage=Adresa URL internă a paginii ThisPageIsTranslationOf=Această pagină/recipient este o traducere a ThisPageHasTranslationPages=Această pagină / recipient are traducere NoWebSiteCreateOneFirst=Niciun site nu a fost creat încă. Creați primul. -GoTo=Go to -DynamicPHPCodeContainsAForbiddenInstruction=You add dynamic PHP code that contains the PHP instruction '%s' that is forbidden by default as dynamic content (see hidden options WEBSITE_PHP_ALLOW_xxx to increase list of allowed commands). -NotAllowedToAddDynamicContent=You don't have permission to add or edit PHP dynamic content in websites. Ask permission or just keep code into php tags unmodified. -ReplaceWebsiteContent=Search or Replace website content -DeleteAlsoJs=Delete also all javascript files specific to this website? -DeleteAlsoMedias=Delete also all medias files specific to this website? -MyWebsitePages=My website pages -SearchReplaceInto=Search | Replace into -ReplaceString=New string -CSSContentTooltipHelp=Enter here CSS content. To avoid any conflict with the CSS of the application, be sure to prepend all declaration with the .bodywebsite class. For example:

    #mycssselector, input.myclass:hover { ... }
    must be
    .bodywebsite #mycssselector, .bodywebsite input.myclass:hover { ... }

    Note: If you have a large file without this prefix, you can use 'lessc' to convert it to append the .bodywebsite prefix everywhere. -LinkAndScriptsHereAreNotLoadedInEditor=Warning: This content is output only when site is accessed from a server. It is not used in Edit mode so if you need to load javascript files also in edit mode, just add your tag 'script src=...' into the page. -Dynamiccontent=Sample of a page with dynamic content +GoTo=Mergi la +DynamicPHPCodeContainsAForbiddenInstruction=Adăugați cod PHP dinamic care conține instrucțiunea PHP '%s' care este interzisă în mod implicit ca şi conținut dinamic (consultați opțiunile ascunse WEBSITE_PHP_ALLOW_xxx pentru a extinde lista comenzilor permise). +NotAllowedToAddDynamicContent=Nu aveți permisiunea să adăugați sau să editați conținut dinamic PHP în site-uri web. Cereți permisiunea sau păstrați codul nemodificat în etichetele php. +ReplaceWebsiteContent=Căutare sau înlocuire conținut website +DeleteAlsoJs= Ștergeți, de asemenea, toate fișierele javascript specifice acestui site web? +DeleteAlsoMedias=Ștergeți, de asemenea, toate fișierele media specifice acestui site web? +MyWebsitePages=Paginile site-ului meu +SearchReplaceInto=Căutare | Înlocuire +ReplaceString=String nou +CSSContentTooltipHelp=Introduceți aici conținut CSS. Pentru a evita orice conflict cu CSS-ul aplicației, asigurați-vă că adaugaţi cu prepend toate declarațiile la clasa .bodywebsite. De exemplu:

    #mycssselector, input.myclass: hover {...}
    trebuie să fie
    .bodywebsite #mycssselector, .bodywebsite input.myclass: hover {...}

    Notă: Dacă aveți un fișier mare fără acest prefix, puteți utiliza 'lessc' pentru a-l converti şi adăuga prefixul .bodywebsite peste tot. +LinkAndScriptsHereAreNotLoadedInEditor=Atenţie: Acest conținut este emis numai când site-ul este accesat de pe un server. Nu este utilizat în modul Edit, deci dacă trebuie să încărcați fișiere javascript și în modul de editare, trebuie doar să adăugați eticheta 'script src=...' în pagină. +Dynamiccontent= Exemplu de pagină cu conținut dinamic ImportSite=Importați șablonul de site web -EditInLineOnOff=Mode 'Edit inline' is %s -ShowSubContainersOnOff=Mode to execute 'dynamic content' is %s -GlobalCSSorJS=Global CSS/JS/Header file of web site -BackToHomePage=Back to home page... -TranslationLinks=Translation links -YouTryToAccessToAFileThatIsNotAWebsitePage=You try to access to a page that is not available.
    (ref=%s, type=%s, status=%s) -UseTextBetween5And70Chars=For good SEO practices, use a text between 5 and 70 characters -MainLanguage=Main language -OtherLanguages=Other languages -UseManifest=Provide a manifest.json file -PublicAuthorAlias=Public author alias -AvailableLanguagesAreDefinedIntoWebsiteProperties=Available languages are defined into website properties -ReplacementDoneInXPages=Replacement done in %s pages or containers +EditInLineOnOff=Modul 'Editare inline' este %s +ShowSubContainersOnOff=Modul de executare 'conţinut dinamic' este %s +GlobalCSSorJS=Fișierul CSS/JS/Header global al website-ului +BackToHomePage=Înapoi la pagina principală... +TranslationLinks=Linkuri traducere +YouTryToAccessToAFileThatIsNotAWebsitePage=Încercați să accesați o pagină care nu este disponibilă
    (ref =%s, type =%s, status =%s) +UseTextBetween5And70Chars=Pentru optimizare SEO, utilizați un text între 5 și 70 de caractere +MainLanguage=Limba principală +OtherLanguages=Alte limbi +UseManifest=Furnizați un fișier manifest.json +PublicAuthorAlias=Alias public autor +AvailableLanguagesAreDefinedIntoWebsiteProperties=Limbile disponibile sunt definite în proprietățile website-ului +ReplacementDoneInXPages=Înlocuirea s-a făcut în %s pagini sau containere RSSFeed=Feed RSS -RSSFeedDesc=You can get a RSS feed of latest articles with type 'blogpost' using this URL -PagesRegenerated=%s page(s)/container(s) regenerated +RSSFeedDesc=Puteți obține un flux RSS al celor mai recente articole cu tipul 'blogpost' folosind această adresă URL +PagesRegenerated=%s pagină(i) /container(e) regenerate diff --git a/htdocs/langs/ro_RO/withdrawals.lang b/htdocs/langs/ro_RO/withdrawals.lang index e40cfebcb30..d0c4e6162c6 100644 --- a/htdocs/langs/ro_RO/withdrawals.lang +++ b/htdocs/langs/ro_RO/withdrawals.lang @@ -1,46 +1,46 @@ # Dolibarr language file - Source file is en_US - withdrawals -CustomersStandingOrdersArea=Payments by Direct debit orders -SuppliersStandingOrdersArea=Payments by Credit transfer +CustomersStandingOrdersArea= Plăți prin Ordine de debit direct +SuppliersStandingOrdersArea=Plăți prin Transfer de credit StandingOrdersPayment=Ordine de plată prin debitare directă StandingOrderPayment=Ordin de plata prin debit direct NewStandingOrder=Ordin nou de debitare directă -NewPaymentByBankTransfer=New payment by credit transfer +NewPaymentByBankTransfer=Plată nouă prin Transfer de credit StandingOrderToProcess=De procesat -PaymentByBankTransferReceipts=Credit transfer orders -PaymentByBankTransferLines=Credit transfer order lines +PaymentByBankTransferReceipts=Ordine de transfer de credit +PaymentByBankTransferLines=Linii ordine transfer de credit WithdrawalsReceipts=Comenzi debit direct WithdrawalReceipt=Ordin de plată direct -BankTransferReceipts=Credit transfer order -BankTransferReceipt=Credit transfer order -LatestBankTransferReceipts=Latest %s credit transfer orders +BankTransferReceipts=Ordine de transfer de credit +BankTransferReceipt=Ordin de transfer de credit +LatestBankTransferReceipts=Ultimile %s ordine de transfer de credit LastWithdrawalReceipts=Ultimele fișiere de debit direct %s -WithdrawalsLine=Direct debit order line -CreditTransferLine=Credit transfer line +WithdrawalsLine=Linie ordin de Direct debit +CreditTransferLine=Linie transfer de credit WithdrawalsLines=Linii de ordine de debitare directă -CreditTransferLines=Credit transfer lines -RequestStandingOrderToTreat=Requests for direct debit payment order to process -RequestStandingOrderTreated=Requests for direct debit payment order processed -RequestPaymentsByBankTransferToTreat=Requests for credit transfer to process -RequestPaymentsByBankTransferTreated=Requests for credit transfer processed +CreditTransferLines=Linii transfer de credit +RequestStandingOrderToTreat= Solicitări de plată prin debitare directă de procesat +RequestStandingOrderTreated= Solicitări de plată prin debitare directă procesate +RequestPaymentsByBankTransferToTreat=Solicitări de transfer de credit de procesat +RequestPaymentsByBankTransferTreated=Solicitări de transfer de credit procesate NotPossibleForThisStatusOfWithdrawReceiptORLine=Nu a fost încă posibil. Statutul Withdraw trebuie să fie setat la "creditat" înaintea declarării respinge pe liniile specifice. -NbOfInvoiceToWithdraw=No. of qualified customer invoices with waiting direct debit order +NbOfInvoiceToWithdraw=Număr de facturi calificate ale clienților cu comandă de debit direct în așteptare NbOfInvoiceToWithdrawWithInfo=Nr. de factură client cu ordin de plată prin debit direct având informații despre contul bancar -NbOfInvoiceToPayByBankTransfer=No. of qualified supplier invoices waiting for a payment by credit transfer -SupplierInvoiceWaitingWithdraw=Vendor invoice waiting for payment by credit transfer +NbOfInvoiceToPayByBankTransfer=Număr facturi de achiziţie calificate cu transfer de credit în așteptare +SupplierInvoiceWaitingWithdraw=Factura de achiziţie cu plata prin transfer de credit în aşteptare InvoiceWaitingWithdraw=Factura în așteptare pentru debitul direct -InvoiceWaitingPaymentByBankTransfer=Invoice waiting for credit transfer +InvoiceWaitingPaymentByBankTransfer=Factură cu transfer de credit în aşteptare AmountToWithdraw=Suma de a se retrage -NoInvoiceToWithdraw=No invoice open for '%s' is waiting. Go on tab '%s' on invoice card to make a request. -NoSupplierInvoiceToWithdraw=No supplier invoice with open 'Direct credit requests' is waiting. Go on tab '%s' on invoice card to make a request. +NoInvoiceToWithdraw=Nici o factură deschisă pentru '%s' în aşteptare. Accesați fila '%s' de pe fişa de factură pentru a face o solicitare. +NoSupplierInvoiceToWithdraw=Nu este în așteptare nici o factură de de achiziţie cu 'Solicitare de direct credit'. Accesați fila '%s' de pe cardul de factură pentru a face o solicitare. ResponsibleUser=Utilizator responsabil WithdrawalsSetup=Setarea plății prin debit direct -CreditTransferSetup=Credit transfer setup +CreditTransferSetup=Configurare Transfer de credit WithdrawStatistics=Rapoarte de plată prin debit direct -CreditTransferStatistics=Credit transfer statistics +CreditTransferStatistics=Statistici transferuri de credit Rejects=Respinge LastWithdrawalReceipt=Ultimele încasări de debit direct %s MakeWithdrawRequest=Efectuați o solicitare de plată cu debit direct -MakeBankTransferOrder=Make a credit transfer request +MakeBankTransferOrder=Solicitare transfer de credit WithdrawRequestsDone=%s au fost înregistrate cererile de debitare directă ThirdPartyBankCode=Codul bancar al terțului NoInvoiceCouldBeWithdrawed=Nici o factură nu a fost debitată cu succes. Verificați dacă facturile sunt pe companiile cu un IBAN valabil și că IBAN are un UMR (referință unică de mandat) cu modul %s . @@ -53,7 +53,7 @@ Lines=Linii StandingOrderReject=Emite o respinge WithdrawsRefused=Debitul direct a fost refuzat WithdrawalRefused=Retragere refuzată -CreditTransfersRefused=Credit transfers refused +CreditTransfersRefused=Transferuri de credit refuzate WithdrawalRefusedConfirm=Sunteţi sigur că doriţi să introduceţi un respingere de retragere pentru societate RefusedData=Data respingerii RefusedReason=Motivul respingerii @@ -63,7 +63,9 @@ InvoiceRefused=Factura refuzată (Încărcați refuzul la client) StatusDebitCredit=Stare debit/credit StatusWaiting=Aşteptare StatusTrans=Trimis +StatusDebited=Debitat StatusCredited=Creditate +StatusPaid=Plătite StatusRefused=Refuzat StatusMotif0=Nespecificat StatusMotif1=Fonduri insuficiente @@ -77,35 +79,36 @@ StatusMotif8=Alte motive CreateForSepaFRST=Crearea unui fișier de debit direct (SEPA FRST) CreateForSepaRCUR=Creați un fișier de debit direct (SEPA RCUR) CreateAll=Creați un fișier de debit direct (toate) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) -CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) +CreateFileForPaymentByBankTransfer=Creați fișier pentru transfer de credit +CreateSepaFileForPaymentByBankTransfer=Creați fișier de transfer de credit (SEPA) CreateGuichet=Numai de birou CreateBanque=Numai banca OrderWaiting=De aşteptare pentru tratament -NotifyTransmision=Retragerea Transmitere -NotifyCredit=Retragerea de credit +NotifyTransmision=Înregistrați transmiterea fișierului de comandă +NotifyCredit= Înregistrați creditul comenzii NumeroNationalEmetter=Numărul naţional transmiţător WithBankUsingRIB=Pentru conturile bancare folosind RIB WithBankUsingBANBIC=Pentru conturile bancare folosind codul IBAN / BIC / SWIFT BankToReceiveWithdraw=Primirea contului bancar -BankToPayCreditTransfer=Bank Account used as source of payments +BankToPayCreditTransfer=Cont bancar utilizat ca sursă de plăți CreditDate=Credit pe WithdrawalFileNotCapable=Imposibil de a genera fișierul chitanţă de retragere pentru țara dvs %s (Țara dvs. nu este acceptată) -ShowWithdraw=Show Direct Debit Order -IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Fişier Retragere +ShowWithdraw=Afișează Comanda de debit direct +IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Cu toate acestea, dacă factura are cel puțin o comandă de plată prin debit direct, care încă nu a fost procesată, aceasta nu va fi setată ca plătită pentru a permite gestionarea prealabilă a retragerii. +DoStandingOrdersBeforePayments=Această filă vă permite să solicitați o comandă de plată cu debit direct. Odată terminat, accesați meniul Bancă-> Plată prin debit direct pentru a genera și gestiona comanda de debit direct. La închiderea ordinului de debit direct, plata facturii va fi înregistrată automat, iar facturile vor fi închise dacă restul de plată este nul. +DoCreditTransferBeforePayments=Această filă vă permite să solicitați o comandă de transfer de credit. Odată finalizată, accesați meniul Bancă-> Plată prin transfer de credit pentru a genera și gestiona comanda de transfer de credit. Atunci când comanda de transfer de credit este închisă, plata facturii va fi înregistrată automat, iar facturile vor fi închise dacă restul de plată este nul. +WithdrawalFile=Fişier debit order +CreditTransferFile=Fişier transfer credit SetToStatusSent=Setează statusul "Fişier Trimis" -ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null +ThisWillAlsoAddPaymentOnInvoice=Acest lucru va înregistra, de asemenea, plățile pe facturi și le va clasifica drept „Plătit” dacă suma rămasă de plată este nulă StatisticsByLineStatus=Statistici după starea liniilor RUM=RMU -DateRUM=Mandate signature date +DateRUM=Data semnării mandatului RUMLong=Referință de mandat unic RUMWillBeGenerated=Dacă este gol, se va genera un RMU (referință unică de mandat) odată ce informațiile despre contul bancar vor fi salvate. WithdrawMode=Modul debit direct (FRST sau RECUR) WithdrawRequestAmount=Suma solicitării de debitare directă: -BankTransferAmount=Amount of Credit Transfer request: +BankTransferAmount=Valoarea cererii de transfer de credit: WithdrawRequestErrorNilAmount=Nu se poate crea o solicitare de debitare directă pentru suma goală. SepaMandate=Mandatul SEPA Direct Debit SepaMandateShort=Mandat SEPA @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Tip de plata ModeRECUR=Plată recurentă ModeFRST=Plata unică PleaseCheckOne=Verificați doar una +CreditTransferOrderCreated=Ordin transfer credit %s creat DirectDebitOrderCreated=Comanda de debit direct %s a fost creată AmountRequested=Cantitatea cerută SEPARCUR=SEPA CUR @@ -131,7 +135,7 @@ ICS=Identificatorul creditorului CI END_TO_END=Eticheta "EndToEndId" SEPA XML - Id unic atribuit pentru fiecare tranzacție USTRD=Eticheta XML "nestructurată" SEPA ADDDAYS=Adăugați zile la data de executare -NoDefaultIBANFound=No default IBAN found for this third party +NoDefaultIBANFound=Nu a fost găsit un IBAN implicit pentru acest terț ### Notifications InfoCreditSubject=Plata ordinului de plată prin debit direct %s de către bancă InfoCreditMessage=Ordinul de plată prin debit direct %s a fost plătit de către bancă
    Datele de plată: %s @@ -141,3 +145,4 @@ InfoTransData=Suma: %s
    Metoda: %s
    Data: %s InfoRejectSubject=Comanda de debitare directă a fost refuzată InfoRejectMessage=Bună ziua,

    ordinul de plată prin debit direct al facturii %s aferente companiei %s, cu o sumă de %s a fost refuzată de bancă.

    -
    %s ModeWarning=Opţiunea pentru modul real, nu a fost stabilit, ne oprim după această simulare +ErrorCompanyHasDuplicateDefaultBAN=Compania cu id %s are mai multe conturi bancare implicite. Nu se poate determina cel care se doreşte a fi utilizat. diff --git a/htdocs/langs/ro_RO/workflow.lang b/htdocs/langs/ro_RO/workflow.lang index 5e4f0a4fb88..d463b4a8433 100644 --- a/htdocs/langs/ro_RO/workflow.lang +++ b/htdocs/langs/ro_RO/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Configurare Modul Flux de Lucru -WorkflowDesc=Acest modul este proiectat pentru modificarea comportamentului acțiunilor automate în aplicaţie. În mod implicit, fluxul de lucru este deschis (puteţi face ce doriţi în ordinea dorită). Puteți activa acțiunile automate de care sunteti interesat +WorkflowDesc=Acest module oferă câteva acțiuni automate. Implicit, fluxul de lucru este deschis (puteți face lucrurile în ordinea pe care o doriți), dar aici puteți activa unele acțiuni automate. ThereIsNoWorkflowToModify=Nu există nicio modificare workflow diponibila pentru modulele activate. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=În mod automat se crează o comandă de vânzări după ce se semnează o propunere comercială (noua comandă va avea aceeași valoare ca propunerea) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=În mod automat se crează o factură pentru client după ce se semnează o propunere comercială (noua factură va avea aceeași valoare ca propunerea) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Crează o factură client automat, după ce un contract este validat -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=În mod automat se crează o factură client după ce se închide o comandă de vânzări (noua factură va avea aceeași valoare ca comanda) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) -AutomaticCreation=Automatic creation -AutomaticClassification=Automatic classification +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Clasificați propunerea sursă asociată ca facturată atunci când comanda de vânzări este setată la facturare (și dacă valoarea comenzii este aceeași cu valoarea totală a propunerii asociate semnate) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Clasificați propunerea sursă asociată ca facturată atunci când factura clientului este validată (și dacă valoarea facturii este aceeași cu valoarea totală a propunerii asociate semnate) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Clasificați comanda de vânzări sursă asociată ca facturată atunci când factura clientului este validată (și dacă valoarea facturii este aceeași cu valoarea totală a ordinii de vânzări asociate) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Clasificați comanda de vânzări sursă asociată ca fiind facturată atunci când factura clientului este setată la plată (și dacă valoarea facturii este aceeași cu suma totală a comenzii asociate) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Clasificați comanda de vânzări sursă asociată ca livrată atunci când o livrare este validată (și dacă cantitatea livrată de toate expedițiile este aceeași ca în ordinea de actualizare) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Clasificați propunerea furnizorului sursă asociată ca fiind facturată atunci când factura furnizorului este validată (și dacă valoarea facturii este aceeași cu valoarea totală a propunerii asociate) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Clasificați comanda de vânzări sursă asociată ca fiind facturată atunci când factura furnizorului este validată (și dacă valoarea facturii este aceeași cu valoarea totală a comenzii asociate) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed +AutomaticCreation=Creare automată +AutomaticClassification=Clasificare automată diff --git a/htdocs/langs/ro_RO/zapier.lang b/htdocs/langs/ro_RO/zapier.lang index 6d6eda71313..b57810cb893 100644 --- a/htdocs/langs/ro_RO/zapier.lang +++ b/htdocs/langs/ro_RO/zapier.lang @@ -18,11 +18,12 @@ # # Module label 'ModuleZapierForDolibarrName' -ModuleZapierForDolibarrName = Zapier for Dolibarr +ModuleZapierForDolibarrName = Zapier pentru Dolibarr # Module description 'ModuleZapierForDolibarrDesc' -ModuleZapierForDolibarrDesc = Zapier for Dolibarr module +ModuleZapierForDolibarrDesc = Modul Zapier pentru Dolibarr # # Admin page # -ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierForDolibarrSetup = Configurare modul Zapier pentru Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/ru_RU/accountancy.lang b/htdocs/langs/ru_RU/accountancy.lang index 7f8974191fd..571f0a4e238 100644 --- a/htdocs/langs/ru_RU/accountancy.lang +++ b/htdocs/langs/ru_RU/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Журнал продаж ACCOUNTING_PURCHASE_JOURNAL=Журнал платежей @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Не согласовано ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/ru_RU/admin.lang b/htdocs/langs/ru_RU/admin.lang index 9003bdca1a4..a5bf50e855a 100644 --- a/htdocs/langs/ru_RU/admin.lang +++ b/htdocs/langs/ru_RU/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Электронная почта отправите UserEmail=Электронная почта пользователя CompanyEmail=Электронная почта компании FeatureNotAvailableOnLinux=Функция недоступна на Unix подобных систем. Проверьте вашу программу для отправки почты локально. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Если перевод для этого языка не завершен или вы обнаружили ошибки, вы можете исправить это, отредактировав файлы в каталоге langs / %s и отправив свое изменение по адресу www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Если перевод для этого языка не завершен или вы обнаружите ошибки, вы можете исправить это, отредактировав файлы в каталог langs/%s и отправив измененные файлы на dolibarr.org/forum или для разработчиков на github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Настройка модуля ModulesSetup=Настройка Модулей/Приложений ModuleFamilyBase=Система @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Для использования этой функци SecurityToken=Ключ для шифрования URL-адресов NoSmsEngine=Менеджер отправления SMS недоступен. Диспетчер отправления SMS не устанавливается вместе с дистрибутивом по умолчанию, поскольку он зависит от внешнего поставщика, но некоторые из них можно найти на %s. PDF=PDF -PDFDesc=Общие опции для генерации PDF. -PDFAddressForging=Правила для зоны адреса +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Скрыть всю информацию, связанную с налогом с продаж / НДС PDFRulesForSalesTax=Правила для налога с продаж/НДС PDFLocaltax=Правила для %s -HideLocalTaxOnPDF=Скрыть ставку %s в колонке Налог +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Скрыть описание товара HideRefOnPDF=Скрыть ссылки на продукты. HideDetailsOnPDF=Скрыть детали о линейки продуктов @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Изменять базовые цены на опреде MassConvert=Запустить пакетное преобразование PriceFormatInCurrentLanguage=Price Format In Current Language String=Строка +String1Line=String (1 line) TextLong=Длинный текст +TextLongNLines=Long text (n lines) HtmlText=Html текст Int=Целое Float=С плавающей запятой @@ -543,9 +546,9 @@ Module54Desc=Управление контрактами (услуги или п Module55Name=Штрих-коды Module55Desc=Управление штрих-кодами Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Прямые банковские платежи -Module57Desc=Управление платежными поручениями с прямым дебитом. Включает создание файла SEPA для европейских стран. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Интеграция с системами НажатьДляЗвонка (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Создать / изменить услуги Permission534=Удаление услуг Permission536=Смотреть / Управлять скрытыми услугами Permission538=Экспорт услуг +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Просмотр ведомости материалов Permission651=Создание/обновление ведомостей материалов Permission652=Удалить списки материалов +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Просмотр пожертвований Permission702=Создание / изменение пожертвований Permission703=Удаление пожертвований @@ -848,6 +858,8 @@ Permission773=Удаление отчётов о затратах Permission774=Просмотр всех отчётов о затратах (даже для неподчинённых пользователей) Permission775=Утвердить отчёты о расходах Permission776=Оплата отчётов о затратах +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Экспорт отчётов о затратах Permission1001=Просмотр запасов Permission1002=Создать/изменить склады @@ -900,6 +912,7 @@ Permission2515=Настройка директорий документов Permission2801=Использовать FTP клиент в режиме только чтения (только просмотр и загрузка файлов) Permission2802=Использовать FTP клиент в режиме записи (удаление или выгрузка файлов) Permission3200=Просмотреть архивированные события +Permission3301=Generate new modules Permission4001=Смотреть сотрудников Permission4002=Создать сотрудников Permission4003=Удалить сотрудников @@ -947,7 +960,8 @@ Permission63003=Удалить ресурсы Permission63004=Свяжите ресурсы с повесткой дня DictionaryCompanyType=Типы контрагента DictionaryCompanyJuridicalType=Правовая форма контрагента -DictionaryProspectLevel=Потенциальный клиент +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Штат/Провинция DictionaryRegion=Регионы DictionaryCountry=Страны @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Шаблоны электронной почты DictionaryUnits=Единицы DictionaryMeasuringUnits=Единицы измерения DictionarySocialNetworks=Социальные сети -DictionaryProspectStatus=Статус потенциального клиента +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Типы отпуска DictionaryOpportunityStatus=Правовой статус проекта/сделки DictionaryExpenseTaxCat=Отчет о расходах - Категории транспорта @@ -1076,7 +1091,7 @@ LoginPage=Страница авторизации BackgroundImageLogin=Фоновое изображение PermanentLeftSearchForm=Постоянный поиск формы на левом меню DefaultLanguage=Язык по умолчанию -EnableMultilangInterface=Включить поддержку мультиязычности +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Компания/Организация CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Критерии поиска требу NewTranslationStringToShow=Новая строка перевода для показа OriginalValueWas=Исходный перевод перезаписан. Исходное значение:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Активированное приложение/модули: %s/%s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Вы должны включить минимум 1 модуль ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Да летом @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Какую вкладку вы хотите открывать по умолчанию, когда выбираете из меню Повестку дня +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Включить напоминание о событиях по электронной почте (напоминание опции/задержки можно определить для каждого события). Примечание. Модуль %s должен быть включен и правильно настроен для отправки напоминания с правильной частотой. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Включить звуковое оповещение @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Показывать связанный объект ##### Clicktodial ##### ClickToDialSetup=Настройка модуля Click To Dial ClickToDialUrlDesc=Url звонившего, когда клик по пиктограмме телефона сделан. В URL-адресе вы можете использовать теги
    __PHONETO__, которые будут заменены на номер телефона человека для вызова
    __PHONEFROM__, который будет заменен номером телефона вызывающего абонента (вашего)
    __LOGIN__, который будет заменен на clicktodial login (определенном на карточке пользователя)
    __PASS__, который будет заменен кликтодиальным паролем (определяется на карточке пользователя). -ClickToDialDesc=Этот модуль делает номера телефонов кликабельными ссылками. Нажатие на значок заставит ваш телефонный номер позвонить. Это можно использовать для вызова системы call-центра из Dolibarr, которая может, например, позвонить по номеру телефона в системе SIP. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Используйте только ссылку «tel:» на номера телефонов ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Это поле содержит ссылку для идентиф Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=Цвет RGB находится в формате HEX, например: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Позиция строки в комбинированных списках SellTaxRate=Ставка налога на продажу RecuperableOnly=Да для НДС «Не воспринимается, а восстанавливается», предназначенный для некоторых государств во Франции. Сохраняйте значение «Нет» во всех других случаях. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Запрос коммерческого п MailToSendSupplierOrder=Заказы MailToSendSupplierInvoice=Счета-фактуры поставщика MailToSendContract=Договоры +MailToSendReception=Receptions MailToThirdparty=Контрагенты MailToMember=Участники MailToUser=Пользователи @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Доступен Dolibarr ERP & CRM %s. Ве ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Шаблоны для документов продуктов +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=См. * Примечание для списка возможных переменных замещения SeeChangeLog=См. Файл ChangeLog (только на английском языке) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Левый отступ в PDF MAIN_PDF_MARGIN_RIGHT=Правый отступ PDF MAIN_PDF_MARGIN_TOP=Верхний отступ PDF MAIN_PDF_MARGIN_BOTTOM=Нижний отступ PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Для этого модуля не требуется никаких специальных настроек. SetToYesIfGroupIsComputationOfOtherGroups=Установите для этого значение yes, если эта группа является вычислением других групп EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Индекс MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/ru_RU/agenda.lang b/htdocs/langs/ru_RU/agenda.lang index 3f3db99cf32..f63694850d1 100644 --- a/htdocs/langs/ru_RU/agenda.lang +++ b/htdocs/langs/ru_RU/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Количество событий ListOfActions=Список событий EventReports=События Location=Местонахождение -ToUserOfGroup= пользователем из группы +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Событие на весь день (все дни) MenuToDoActions=Все незавершенные события MenuDoneActions=Все прекращенные события @@ -86,6 +86,8 @@ ProposalDeleted=Предложение удалено OrderDeleted=Заказ удалён InvoiceDeleted=Счёт удалён DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Товар %sсоздан PRODUCT_MODIFYInDolibarr=Товар %sизменён PRODUCT_DELETEInDolibarr=Товар %sудалён @@ -158,3 +160,9 @@ DateStartPlusOne=Дата начала + 1 час SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/ru_RU/boxes.lang b/htdocs/langs/ru_RU/boxes.lang index d6efc00bac7..b8e47954693 100644 --- a/htdocs/langs/ru_RU/boxes.lang +++ b/htdocs/langs/ru_RU/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Последние %s зарегистрированные BoxTitleLastModifiedSuppliers=Продавцы: последнее %s изменений BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Заказы поставщиков: пос BoxTitleLastModifiedCustomerBills=Счета клиентов: последнее %s изменений BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Счета-фактуры Покупателей ForCustomersOrders=Заказы клиентов ForProposals=Предложения @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Бухгалтерия diff --git a/htdocs/langs/ru_RU/cashdesk.lang b/htdocs/langs/ru_RU/cashdesk.lang index 2af537014ab..9b2073aed88 100644 --- a/htdocs/langs/ru_RU/cashdesk.lang +++ b/htdocs/langs/ru_RU/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/ru_RU/compta.lang b/htdocs/langs/ru_RU/compta.lang index 393e05bc995..f9002c431a6 100644 --- a/htdocs/langs/ru_RU/compta.lang +++ b/htdocs/langs/ru_RU/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Специальные расходы @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/ru_RU/contracts.lang b/htdocs/langs/ru_RU/contracts.lang index 17d4815fd87..91829bc7048 100644 --- a/htdocs/langs/ru_RU/contracts.lang +++ b/htdocs/langs/ru_RU/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Запуск служб MenuExpiredServices=Истекшим сроком службы MenuClosedServices=Закрытые услуги NewContract=Новый договор -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Создать контракт DeleteAContract=Удалить договор ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/ru_RU/errors.lang b/htdocs/langs/ru_RU/errors.lang index 6fe63dd63d6..d9a8f880d67 100644 --- a/htdocs/langs/ru_RU/errors.lang +++ b/htdocs/langs/ru_RU/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Новое значение не может бы ErrorFailedToValidatePasswordReset=Невозможно обновить пароль. Может быть, обновление пароля уже выполнено (так как вы использовали одноразовую ссылку). Если это не так, попробуйте обновить пароль ещё раз. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Ошибка при добавлении контакта -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Ошибка. Ваш PHP должен иметь модуль %s для использования этой функции. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/ru_RU/languages.lang b/htdocs/langs/ru_RU/languages.lang index 1f3c3028ccc..6a544983929 100644 --- a/htdocs/langs/ru_RU/languages.lang +++ b/htdocs/langs/ru_RU/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Арабский Language_ar_EG=Arabic (Egypt) Language_ar_SA=Арабский +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Болгарский Language_bs_BA=Боснийский Language_ca_ES=Каталанский @@ -20,6 +23,7 @@ Language_en_GB=Английский (Великобритания) Language_en_IN=Английский (Индия) Language_en_NZ=Английский (Новая Зеландия) Language_en_SA=Английский (Саудовская Аравия) +Language_en_SG=English (Singapore) Language_en_US=Английский (США) Language_en_ZA=Английский (Южная Африка) Language_es_ES=Испанский @@ -29,6 +33,7 @@ Language_es_CL=Испанский (Чили) Language_es_CO=Spanish (Colombia) Language_es_DO=Испанский (Доминиканская Республика) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Испанский (Гондурас) Language_es_MX=Испанский (Мексика) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Испанский (Парагвай) Language_es_PE=Испанский (Перу) Language_es_PR=Испанский (Пуэрто-Рико) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Эстонский Language_eu_ES=Баскский @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Французский (Бельгия) Language_fr_CA=Французский (Канада) Language_fr_CH=Французский (Швейцария) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Французский +Language_fr_GA=French (Gabon) Language_fr_NC=Французский (Новая Каледония) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Иврит +Language_hi_IN=Hindi (India) Language_hr_HR=Хорватский Language_hu_HU=Венгерский Language_id_ID=Индонезийский Language_is_IS=Исландский Language_it_IT=Итальянский +Language_it_CH=Italian (Switzerland) Language_ja_JP=Японский Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Латышский Language_mk_MK=Македонский Language_mn_MN=Mongolian Language_nb_NO=Норвежский (Букмол) +Language_ne_NP=Nepali Language_nl_BE=Голландский (Бельгия) Language_nl_NL=Dutch Language_pl_PL=Польский @@ -86,4 +100,5 @@ Language_uz_UZ=Узбекский Language_vi_VN=Вьетнамский Language_zh_CN=Китайский Language_zh_TW=Китайский (традиционный) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/ru_RU/mails.lang b/htdocs/langs/ru_RU/mails.lang index 938569bc947..1da962648ec 100644 --- a/htdocs/langs/ru_RU/mails.lang +++ b/htdocs/langs/ru_RU/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Информация ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/ru_RU/main.lang b/htdocs/langs/ru_RU/main.lang index b663d6f4b5d..a5a59a9782a 100644 --- a/htdocs/langs/ru_RU/main.lang +++ b/htdocs/langs/ru_RU/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Цена ед. (с налогом) Amount=Сумма AmountInvoice=Сумма счета-фактуры AmountInvoiced=Сумма выставленного счета -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Сумма платежа AmountHTShort=Сумма (без налога) AmountTTCShort=Сумма (вкл-я налог) @@ -485,6 +485,7 @@ Categories=Теги/категории Category=Тег/категория By=Автор From=От +FromDate=От FromLocation=От to=к To=к @@ -687,6 +688,7 @@ Method=Метод Receive=Получить CompleteOrNoMoreReceptionExpected=Завершено или ничего больше не ожидается ExpectedValue=Ожидаемое значение +ExpectedQty=Expected Qty PartialWoman=Частичное TotalWoman=Всего NeverReceived=Не было получено @@ -703,6 +705,7 @@ MenuECM=Документы MenuAWStats=AWStats MenuMembers=Участники MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Лимит Dolibarr (Меню Главная-Настройки-Безопасность): %s Кб, лимит PHP: %s Кб NoFileFound=Нет документов, сохраненных в этом каталоге CurrentUserLanguage=Текущий язык @@ -725,7 +728,7 @@ Page=Страница Notes=Примечания AddNewLine=Добавить новую строку AddFile=Добавить файл -FreeZone=Не предопределенный продукт/услуга +FreeZone=Free-text product FreeLineOfType=Элемент произвольного текста, набрать: CloneMainAttributes=Клонирование объекта с его основными атрибутами ReGeneratePDF=Повторно сгенерировать PDF @@ -942,6 +945,39 @@ ShortThursday=Чт ShortFriday=Пт ShortSaturday=Сб ShortSunday=Вс +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Выберите шаблон электронной почты SetRef=Настроить источник Select2ResultFoundUseArrows=Найдено несколько результатов. Используйте стрелки для выбора. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Информация +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/ru_RU/members.lang b/htdocs/langs/ru_RU/members.lang index a43ce93ccef..7d3ed2063c4 100644 --- a/htdocs/langs/ru_RU/members.lang +++ b/htdocs/langs/ru_RU/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Проект участники MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Утверждена +SubscriptionNotNeeded=No subscription needed NewCotisation=Новый вклад PaymentSubscription=Новый вклад оплаты SubscriptionEndDate=Подписка на конец даты @@ -78,7 +81,7 @@ DeleteType=Удалить VoteAllowed=Голосовать разрешается Physical=Физическая Moral=Моральные -MorPhy=Морально / Физическая +MorPhy=Природа Reenable=Снова ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/ru_RU/mrp.lang b/htdocs/langs/ru_RU/mrp.lang index d56a9365a62..14f9b820743 100644 --- a/htdocs/langs/ru_RU/mrp.lang +++ b/htdocs/langs/ru_RU/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/ru_RU/other.lang b/htdocs/langs/ru_RU/other.lang index ac1a05e4432..390b2716c41 100644 --- a/htdocs/langs/ru_RU/other.lang +++ b/htdocs/langs/ru_RU/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/ru_RU/products.lang b/htdocs/langs/ru_RU/products.lang index 86a8255d39c..e664a576813 100644 --- a/htdocs/langs/ru_RU/products.lang +++ b/htdocs/langs/ru_RU/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Установить тип штрих-кода BarcodeValue=Значение штрих-кода NoteNotVisibleOnBill=Примечание (не видимые на счетах-фактурах, предложениях ...) ServiceLimitedDuration=Если продукт является услугой с ограниченной длительности: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Кол-во цен DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Таможенный / Товарный / HS код CountryOrigin=Страна происхождения Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Короткая метка Unit=Единица p=u. @@ -359,6 +362,9 @@ SelectCombination=Выберите комбинацию ProductCombinationGenerator=Генератор вариантов Features=Особенности PriceImpact=Влияние цены +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Влияние веса NewProductAttribute=Новый атрибут NewProductAttributeValue=Новое значение атрибута diff --git a/htdocs/langs/ru_RU/projects.lang b/htdocs/langs/ru_RU/projects.lang index d39a576de13..c1f34e89f14 100644 --- a/htdocs/langs/ru_RU/projects.lang +++ b/htdocs/langs/ru_RU/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Содействующий TypeContact_project_task_external_TASKCONTRIBUTOR=Содействующий SelectElement=Выберите элемент AddElement=Ссылка на элемент +LinkToElementShort=Ссылка к # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/ru_RU/recruitment.lang b/htdocs/langs/ru_RU/recruitment.lang new file mode 100644 index 00000000000..fe67a4ea03e --- /dev/null +++ b/htdocs/langs/ru_RU/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Настройки +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = О +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/ru_RU/stocks.lang b/htdocs/langs/ru_RU/stocks.lang index 098b5993bf6..84c38e3ba22 100644 --- a/htdocs/langs/ru_RU/stocks.lang +++ b/htdocs/langs/ru_RU/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Удалить отправку Stock=Фондовый Stocks=Акции MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real фондовая RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Виртуальный запас -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Идентификатор склад DescWareHouse=Описание склада LieuWareHouse=Локализация склад WarehousesAndProducts=Склады и продукты WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Средняя цена входного -AverageUnitPricePMP=Средняя цена входного +AverageUnitPricePMPShort=Значение +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Продажа Цена за штуку EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Пополнения NbOfProductBeforePeriod=Количество продукта %s в остатке на начало выбранного периода (< %s) NbOfProductAfterPeriod=Количество продукта %s в остатке на конец выбранного периода (< %s) MassMovement=Массовое перемещение -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Получатели заказа StockMovementRecorded=Перемещения остатков записаны @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/ru_RU/suppliers.lang b/htdocs/langs/ru_RU/suppliers.lang index d3fb1c16512..7ed1db76921 100644 --- a/htdocs/langs/ru_RU/suppliers.lang +++ b/htdocs/langs/ru_RU/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/ru_RU/ticket.lang b/htdocs/langs/ru_RU/ticket.lang index 4fe3fe15802..99c9e52ce56 100644 --- a/htdocs/langs/ru_RU/ticket.lang +++ b/htdocs/langs/ru_RU/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Тип -Category=Аналитический код Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Группа TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Аналитический код +TicketCategory=Группа SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/ru_RU/users.lang b/htdocs/langs/ru_RU/users.lang index 888fc7191ae..d2a34f41a12 100644 --- a/htdocs/langs/ru_RU/users.lang +++ b/htdocs/langs/ru_RU/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Созданный пользователь будет в IdPhoneCaller=Идентификатор телефона абонента NewUserCreated=Пользователь %s создан NewUserPassword=Смена пароля для %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Пользователь %s изменен UserDisabled=Пользователь %s отключен UserEnabled=Пользователь %s активирован @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Отключено в режиме обслуживани UserAccountancyCode=Код учета пользователя UserLogoff=Выход пользователя UserLogged=Пользователь вошел +DateOfEmployment=Employment date DateEmployment=Дата начала трудоустройства DateEmploymentEnd=Дата окончания занятости CantDisableYourself=Вы не можете отключить свою собственную запись пользователя @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/ru_RU/withdrawals.lang b/htdocs/langs/ru_RU/withdrawals.lang index 97300952777..e7d2417a55d 100644 --- a/htdocs/langs/ru_RU/withdrawals.lang +++ b/htdocs/langs/ru_RU/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Прямой дебетовый заказ -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Счёт отклонён (отказ платежа клиент StatusDebitCredit=Status debit/credit StatusWaiting=Ожидание StatusTrans=Передающиеся +StatusDebited=Debited StatusCredited=Кредитоваться +StatusPaid=Оплачено StatusRefused=Отказавшийся StatusMotif0=Не указано StatusMotif1=Предоставление insuffisante @@ -77,13 +79,13 @@ StatusMotif8=Другая причина CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Только служба CreateBanque=Только банк OrderWaiting=Ожидание для лечения -NotifyTransmision=Снятие передачи -NotifyCredit=Снятие кредитную +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Национальный передатчик Количество WithBankUsingRIB=Для банковских счетов с использованием RIB WithBankUsingBANBIC=Для банковских счетов с использованием IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Кредит на WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Файл изъятия средств +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Установить статус "Файл отправлен" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Статистика статуса по строкам @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Сумма: %s
    Metode: %s
    Дата: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Вариант для реального режима не был установлен, мы останавливаемся после этого моделирования +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/ru_RU/workflow.lang b/htdocs/langs/ru_RU/workflow.lang index bfacde3683f..3d5e478c0ba 100644 --- a/htdocs/langs/ru_RU/workflow.lang +++ b/htdocs/langs/ru_RU/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Автоматическое создание AutomaticClassification=Автоматическая классификация diff --git a/htdocs/langs/ru_RU/zapier.lang b/htdocs/langs/ru_RU/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/ru_RU/zapier.lang +++ b/htdocs/langs/ru_RU/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/sk_SK/accountancy.lang b/htdocs/langs/sk_SK/accountancy.lang index b5e3002812a..bac28ccc142 100644 --- a/htdocs/langs/sk_SK/accountancy.lang +++ b/htdocs/langs/sk_SK/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Zakázať priame zaznamenávanie transakcie na bankový účet ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Predaj denníka ACCOUNTING_PURCHASE_JOURNAL=Zakúpte denník @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Nezlúčené ## Admin +BindingOptions=Binding options ApplyMassCategories=Použiť hromadne kategórie AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/sk_SK/admin.lang b/htdocs/langs/sk_SK/admin.lang index e70abb77976..2509e6a075d 100644 --- a/htdocs/langs/sk_SK/admin.lang +++ b/htdocs/langs/sk_SK/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Funkcia nie je k dispozícii pre Unix, ako napr systémy. Otestujte si svoje sendmail programu na mieste. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Nastavenie modulu ModulesSetup=Modules/Application setup ModuleFamilyBase=Systém @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul %s musí byť aktívny ak potrebujete tú SecurityToken=Kľúč k zabezpečenej URL NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Zmeniť na cenách s hodnotou základného odkazu uvedené MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Reťaz +String1Line=String (1 line) TextLong=Dlhý text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Celé číslo Float=Vznášať sa @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Čiarové kódy Module55Desc=Barcode riadenie Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integrácia ClickToDial systému (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Vytvoriť / upraviť služby Permission534=Odstrániť služby Permission536=Pozri / správa skryté služby Permission538=Export služieb +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Prečítajte si dary Permission702=Vytvoriť / upraviť dary Permission703=Odstrániť dary @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Prečítajte si zásoby Permission1002=Vytvoriť / upraviť sklady @@ -900,6 +912,7 @@ Permission2515=Nastavenie adresára dokumenty Permission2801=Pomocou FTP klienta v režime čítania (prezerať a sťahovať iba) Permission2802=Pomocou FTP klienta v režime zápisu (odstrániť alebo vkladať) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Zmazať zdroje Permission63004=Pripnúť zdroje k udalosti agendy DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potenciál +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Okres DictionaryCountry=Štáty @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Jednotky DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect stav +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanentný vyhľadávací formulár na ľavom menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=Novy prekladový reťazec na zobrzenie OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Musíte povoliť aspoň jeden modul ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Áno v lete @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Kliknite pre Dial Nastavenie modulu ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Hodnota dane z predaja RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Zmluvy +MailToSendReception=Receptions MailToThirdparty=Tretie strany MailToMember=Členovia MailToUser=Užívatelia @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zips MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/sk_SK/agenda.lang b/htdocs/langs/sk_SK/agenda.lang index 6012ba11bd1..b326ed7fc23 100644 --- a/htdocs/langs/sk_SK/agenda.lang +++ b/htdocs/langs/sk_SK/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Počet udalostí ListOfActions=Zoznam udalostí EventReports=Event reports Location=Umiestnenie -ToUserOfGroup=Každému užívateľovy v skupine +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Akcie po celý deň (y) MenuToDoActions=Všetky neúplné udalosti MenuDoneActions=Všetky ukončené akcie @@ -86,6 +86,8 @@ ProposalDeleted=Ponuka zmazaná OrderDeleted=Objednávka zmazaná InvoiceDeleted=Faktúra zmazaná DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Čas začatia + 1 hodina SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/sk_SK/boxes.lang b/htdocs/langs/sk_SK/boxes.lang index 89f709081b0..dea1fdff8da 100644 --- a/htdocs/langs/sk_SK/boxes.lang +++ b/htdocs/langs/sk_SK/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Najnovšie %s pridaný dodávatelia BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Najnovší %s zákazníci alebo prospekty -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Najnovší %s užívatelia BoxTitleLastFicheInter=Najnovšie %s upravené zásahy @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Nedávno %s upravené ponuky +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Zákazníci faktúry ForCustomersOrders=Zákazníci objednávky ForProposals=Návrhy @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Účtovníctvo diff --git a/htdocs/langs/sk_SK/cashdesk.lang b/htdocs/langs/sk_SK/cashdesk.lang index b629f24a80b..849dfa5d97a 100644 --- a/htdocs/langs/sk_SK/cashdesk.lang +++ b/htdocs/langs/sk_SK/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/sk_SK/compta.lang b/htdocs/langs/sk_SK/compta.lang index 49dc4cebc1c..86356ba2d4a 100644 --- a/htdocs/langs/sk_SK/compta.lang +++ b/htdocs/langs/sk_SK/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=špeciálne rozšírenia @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/sk_SK/contracts.lang b/htdocs/langs/sk_SK/contracts.lang index 434e321d538..12ec7931181 100644 --- a/htdocs/langs/sk_SK/contracts.lang +++ b/htdocs/langs/sk_SK/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Spustené služby MenuExpiredServices=Prepadnuté služby MenuClosedServices=Uzavreté služby NewContract=Nová zmluva -NewContractSubscription=Nová zmluva/predplatné +NewContractSubscription=New contract or subscription AddContract=Vytvoriť zmluvu DeleteAContract=Odstránenie zmluvu ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/sk_SK/errors.lang b/htdocs/langs/sk_SK/errors.lang index 9b0b4d25237..2b0b88987e9 100644 --- a/htdocs/langs/sk_SK/errors.lang +++ b/htdocs/langs/sk_SK/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nová hodnota nemôže byť presne staré ErrorFailedToValidatePasswordReset=Nepodarilo sa Reinita heslo. Môže byť REINIT už bola vykonaná (tento odkaz možno použiť iba raz). Ak nie, skúste reštartovať REINIT procesu. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Nepodarilo sa pridať kontakt -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Platobný režim bol nastavený na typ %s ale nastavenie modulu Faktúry nebola dokončená definovať informácie, ktoré sa pre tento platobný režim. ErrorPHPNeedModule=Chyba, musí mať PHP modul %s nainštalovať túto funkciu používať. ErrorOpenIDSetupNotComplete=Môžete nastavenie Dolibarr konfiguračný súbor, aby OpenID overovania, ale URL OpenID služby nie je definovaný do stálych %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/sk_SK/languages.lang b/htdocs/langs/sk_SK/languages.lang index 6c632a39b8b..bc7dec6ceb7 100644 --- a/htdocs/langs/sk_SK/languages.lang +++ b/htdocs/langs/sk_SK/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabčina Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabčina +Language_az_AZ=Azerbaijani Language_bn_BD=Bengálština +Language_bn_IN=Bengali (India) Language_bg_BG=Bulharčina Language_bs_BA=Bosniansky Language_ca_ES=Katalánčina @@ -20,6 +23,7 @@ Language_en_GB=Angličtina (Veľká Británia) Language_en_IN=Angličtina (India) Language_en_NZ=Angličtina (Nový Zéland) Language_en_SA=Angličtina (Saudská Arábia) +Language_en_SG=English (Singapore) Language_en_US=Angličtina (Spojené štáty) Language_en_ZA=Angličtina (Južná Afrika) Language_es_ES=Španielčina @@ -29,6 +33,7 @@ Language_es_CL=Španielčina (Chile) Language_es_CO=Španielčina (Kolumbia) Language_es_DO=Španielčina (Dominikánska Republika) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Španielčina (Honduras) Language_es_MX=Španielčina (Mexiko) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Španielčina (Paraguaj) Language_es_PE=Španielčina (Peru) Language_es_PR=Španielčina (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Španielčina (Venezuela) Language_et_EE=Estónčina Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finština Language_fr_BE=Francúzština (Belgicko) Language_fr_CA=Francúzština (Kanada) Language_fr_CH=Francúzština (Švajčiarsko) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francúzština +Language_fr_GA=French (Gabon) Language_fr_NC=Francúzština (Nová Kaledónia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frízština +Language_gl_ES=Galician Language_he_IL=Hebrejčina +Language_hi_IN=Hindi (India) Language_hr_HR=Chorvátsky Language_hu_HU=Maďarčina Language_id_ID=Indonézština Language_is_IS=Islandský Language_it_IT=Taliančina +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japonština Language_ka_GE=Gruzínčina Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Lotyština Language_mk_MK=Macedónsky Language_mn_MN=Mongolian Language_nb_NO=Nórčina (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Holanďština (Belgicko) Language_nl_NL=Dutch Language_pl_PL=Poľština @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamčina Language_zh_CN=Čínština Language_zh_TW=Čínština (tradičná) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/sk_SK/mails.lang b/htdocs/langs/sk_SK/mails.lang index fc8cb12b03f..d8f41131b19 100644 --- a/htdocs/langs/sk_SK/mails.lang +++ b/htdocs/langs/sk_SK/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Informácie ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/sk_SK/main.lang b/htdocs/langs/sk_SK/main.lang index aa3cbd552cb..eaa10c84a42 100644 --- a/htdocs/langs/sk_SK/main.lang +++ b/htdocs/langs/sk_SK/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Množstvo AmountInvoice=Fakturovaná čiastka AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Suma platby AmountHTShort=Amount (excl.) AmountTTCShort=Čiastka (s DPH) @@ -485,6 +485,7 @@ Categories=Štítky/kategórie Category=Štítok/kategória By=Podľa From=Z +FromDate=Z FromLocation=Z to=na To=na @@ -687,6 +688,7 @@ Method=Metóda Receive=Prijať CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Čiastočný TotalWoman=Celkový NeverReceived=Nikdy nedostal @@ -703,6 +705,7 @@ MenuECM=Dokumenty MenuAWStats=AWStats MenuMembers=Členovia MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu domáce bezpečnostné nastavenia): %s Kb, PHP limit: %s Kb NoFileFound=Žiadne dokumenty uložené v tomto adresári CurrentUserLanguage=Aktuálny jazyk @@ -725,7 +728,7 @@ Page=Strana Notes=Poznámky AddNewLine=Pridať nový riadok AddFile=Pridať súbor -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone objekt s jeho hlavnými atribútmi ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informácie +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/sk_SK/members.lang b/htdocs/langs/sk_SK/members.lang index 26a80b0c1db..3a419e0d32c 100644 --- a/htdocs/langs/sk_SK/members.lang +++ b/htdocs/langs/sk_SK/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Návrhy členov MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Overené +SubscriptionNotNeeded=No subscription needed NewCotisation=Nový príspevok PaymentSubscription=Nový príspevok platba SubscriptionEndDate=Predplatné je dátum ukončenia @@ -78,7 +81,7 @@ DeleteType=Odstrániť VoteAllowed=Hlasovať povolená Physical=Fyzikálne Moral=Morálna -MorPhy=Morálna / Fyzikálne +MorPhy=Príroda Reenable=Znovu povoliť ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/sk_SK/mrp.lang b/htdocs/langs/sk_SK/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/sk_SK/mrp.lang +++ b/htdocs/langs/sk_SK/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/sk_SK/other.lang b/htdocs/langs/sk_SK/other.lang index 3a6e0c4b6d5..d758a30e814 100644 --- a/htdocs/langs/sk_SK/other.lang +++ b/htdocs/langs/sk_SK/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/sk_SK/products.lang b/htdocs/langs/sk_SK/products.lang index 6ee85cce9d9..90f384e7f2e 100644 --- a/htdocs/langs/sk_SK/products.lang +++ b/htdocs/langs/sk_SK/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Nastavte typ čiarového kódu BarcodeValue=Barcode hodnota NoteNotVisibleOnBill=Poznámka (nie je vidieť na návrhoch faktúry, ...) ServiceLimitedDuration=Je-li výrobok je služba s obmedzeným trvaním: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Počet cien DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Krajina pôvodu Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Krátky názov Unit=Jednotka p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Nový atribút NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/sk_SK/projects.lang b/htdocs/langs/sk_SK/projects.lang index ad5c2535ed4..e66dcd1adf2 100644 --- a/htdocs/langs/sk_SK/projects.lang +++ b/htdocs/langs/sk_SK/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Prispievateľ TypeContact_project_task_external_TASKCONTRIBUTOR=Prispievateľ SelectElement=Vyberte prvok AddElement=Odkaz na elementu +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/sk_SK/recruitment.lang b/htdocs/langs/sk_SK/recruitment.lang new file mode 100644 index 00000000000..759257ea80c --- /dev/null +++ b/htdocs/langs/sk_SK/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = O +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/sk_SK/stocks.lang b/htdocs/langs/sk_SK/stocks.lang index 21dce5eae16..b15427261ce 100644 --- a/htdocs/langs/sk_SK/stocks.lang +++ b/htdocs/langs/sk_SK/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Zmazať odoslanie Stock=Zásoba Stocks=Zásoby MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Zásoby podľa LOT/Serial @@ -95,14 +95,16 @@ RealStock=Skutočné Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtuálny sklad -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id sklad DescWareHouse=Popis sklad LieuWareHouse=Lokalizácia sklad WarehousesAndProducts=Sklady a produkty WarehousesAndProductsBatchDetail=Sklady a produkty ( podľa LOT/Serial ) -AverageUnitPricePMPShort=Vážený priemer cien vstupov -AverageUnitPricePMP=Vážený priemer cien vstupov +AverageUnitPricePMPShort=Vážená priemerná cena +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Predajná jednotka Cena EstimatedStockValueSellShort=Počet na predaj EstimatedStockValueSell=Počet na predaj @@ -141,7 +143,7 @@ Replenishments=Splátky NbOfProductBeforePeriod=Množstvo produktov %s na sklade, než zvolené obdobie (<%s) NbOfProductAfterPeriod=Množstvo produktov %s na sklade po zvolené obdobie (> %s) MassMovement=Hromadný pohyb -SelectProductInAndOutWareHouse=Vyberte si produkt, množstvo, zdrojový sklad a cieľový sklad, potom kliknite na "%s". Akonáhle sa tak stane pre všetky požadované pohyby, kliknite na "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Bločky tejto objednávky StockMovementRecorded=Zaznamenané pohyby zásob @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/sk_SK/suppliers.lang b/htdocs/langs/sk_SK/suppliers.lang index 526a84108a2..1d932bc8462 100644 --- a/htdocs/langs/sk_SK/suppliers.lang +++ b/htdocs/langs/sk_SK/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Niektoré podradené výrobky nemajú určenú cenu. AddSupplierPrice=Pridať nákupnú cenu ChangeSupplierPrice=Zmeniť nákupnú cenu SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Tento odkaz Dodávateľ je už spojená s odkazom: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Dostupnosť -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Schváliť túto objednávku ConfirmApproveThisOrder=Určite chcete potvrdiť objednávku %s? DenyingThisOrder=Odmietnuť objednávku @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Odstúpenie súbor +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Nastavte na stav "odoslaný súbor" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Voľba pre reálny režim nebol nastavený, môžeme zastaviť po tomto simuláciu +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/sk_SK/workflow.lang b/htdocs/langs/sk_SK/workflow.lang index 4944888de58..2a3db6f62aa 100644 --- a/htdocs/langs/sk_SK/workflow.lang +++ b/htdocs/langs/sk_SK/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow modul nastavenia -WorkflowDesc=Tento modul vám pomôže nastaviť fingovanie automatických akcií v aplikácií. V základe je postup otvorený ( možete robiť úlohy v poradí v akom chcete) Môžete aktivovať automatické akcie aké chcete. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=Úprava postupu nie je možná pri aktivovanom module. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automaticky vytvoriť zákaznícku faktúru po overení zmluvy -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/sk_SK/zapier.lang b/htdocs/langs/sk_SK/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/sk_SK/zapier.lang +++ b/htdocs/langs/sk_SK/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/sl_SI/accountancy.lang b/htdocs/langs/sl_SI/accountancy.lang index 327c2a57565..ed2ba10774e 100644 --- a/htdocs/langs/sl_SI/accountancy.lang +++ b/htdocs/langs/sl_SI/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Prodam revija ACCOUNTING_PURCHASE_JOURNAL=Nakup revij @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/sl_SI/admin.lang b/htdocs/langs/sl_SI/admin.lang index 158ff10864c..d6419d53bef 100644 --- a/htdocs/langs/sl_SI/admin.lang +++ b/htdocs/langs/sl_SI/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Funkcija ni na voljo pri Unix sistemih. Preverite program za pošiljanje pošte lokalno. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Nastavitve modula ModulesSetup=Modules/Application setup ModuleFamilyBase=Sistem @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Če potrebujete to funkcijo, morate najprej omogočiti SecurityToken=Ključ za šifriranje url NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Sprememba cen z definirano osnovno referenčno vrednostjo MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=Niz +String1Line=String (1 line) TextLong=Dolgo besedilo +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Celo število Float=Plavajoče @@ -520,7 +523,7 @@ Module22Name=Mass Emailings Module22Desc=Manage bulk emailing Module23Name=Energija Module23Desc=Nadzor porabe energije -Module25Name=Sales Orders +Module25Name=Naročila Module25Desc=Sales order management Module30Name=Računi Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Črtne kode Module55Desc=Upravljanje črtnih kod Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=Klic s klikom Module58Desc=Integracija klica s klikom Module59Name=Vaš zaznamek @@ -836,9 +839,16 @@ Permission532=Kreiranje/spreminjanje storitev Permission534=Brisanje storitev Permission536=Pregled/upravljanje skritih storitev Permission538=Izvoz storitev +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Branje donacij Permission702=Kreiranje/spreminjanje donacij Permission703=Delete donacij @@ -848,6 +858,8 @@ Permission773=Brisanje stroškovnih poročil Permission774=Branje vseh stroškovnih poročil (tudi za nepodrejene) Permission775=Odobritev stroškovnih poročil Permission776=Plačilo stroškovnih poročil +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Izvoz stroškovnih poročil Permission1001=Branje zalog Permission1002=Kreiranje/spreminjanje skladišč @@ -900,6 +912,7 @@ Permission2515=Nastavitve map dokumentov Permission2801=Uporaba FTP klienta samo za branje (samo brskanje in prenašanje) Permission2802=Uporaba FTP klienta za pisanje (brisanje ali nalaganje datotek) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Potencial možne stranke +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regije DictionaryCountry=Države @@ -957,7 +971,7 @@ DictionaryActions=Types of agenda events DictionarySocialContributions=Types of social or fiscal taxes DictionaryVAT=Stopnje DDV ali davkov DictionaryRevenueStamp=Amount of tax stamps -DictionaryPaymentConditions=Payment Terms +DictionaryPaymentConditions=Plačilni pogoji DictionaryPaymentModes=Payment Modes DictionaryTypeContact=Tipi kontaktov/naslovov DictionaryTypeOfContainer=Website - Type of website pages/containers @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Enote DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Status možne stranke +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Stalno polje za iskanje na levem meniju DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Omogočiti morate vsaj 1 modul ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Da poleti @@ -1316,7 +1332,7 @@ SuggestPaymentByChequeToAddress=Suggest payment by check to FreeLegalTextOnInvoices=Poljubno besedilo na računu WatermarkOnDraftInvoices=Vodni žig na osnutku računa (nič, če je prazno) PaymentsNumberingModule=Payments numbering model -SuppliersPayment=Vendor payments +SuppliersPayment=Plačila dobaviteljem SupplierPaymentSetup=Vendor payments setup ##### Proposals ##### PropalSetup=Nastavitve modula za komercialne ponudbe @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Kateri zavihek naj se privzeto odpre ko izberete meni Dnevni red +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Nastavitve modula za klicanje s klikom ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=To polje vsebuje referenco identifikacijske vrstice. Vnesite poljub Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Položaj vrstice v kombiniranih seznamih SellTaxRate=Stopnja prodajnega davka RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1840,9 +1857,10 @@ MailToSendInvoice=Računi za kupca MailToSendShipment=Odpreme MailToSendIntervention=Intervencije MailToSendSupplierRequestForQuotation=Quotation request -MailToSendSupplierOrder=Purchase orders -MailToSendSupplierInvoice=Vendor invoices +MailToSendSupplierOrder=Nabavni nalogi +MailToSendSupplierInvoice=Fakture dobaviteljev MailToSendContract=Pogodbe +MailToSendReception=Receptions MailToThirdparty=Partnerji MailToMember=Člani MailToUser=Uporabniki @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/sl_SI/agenda.lang b/htdocs/langs/sl_SI/agenda.lang index 8f5c44b6e42..85d7db4f84a 100644 --- a/htdocs/langs/sl_SI/agenda.lang +++ b/htdocs/langs/sl_SI/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Število dogodkov ListOfActions=Seznam dogodkov EventReports=Event reports Location=Lokacija -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Dogodek na celoten dan(ni) MenuToDoActions=Vsi nedokončani dogodki MenuDoneActions=Vsi prekinjeni dogodki @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Začetni datum + 1 ura SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/sl_SI/bills.lang b/htdocs/langs/sl_SI/bills.lang index edf62e53f54..2070ff6f437 100644 --- a/htdocs/langs/sl_SI/bills.lang +++ b/htdocs/langs/sl_SI/bills.lang @@ -1,34 +1,34 @@ # Dolibarr language file - Source file is en_US - bills -Bill=Račun -Bills=Računi -BillsCustomers=Računi za kupca -BillsCustomer=Račun za kupca -BillsSuppliers=Vendor invoices -BillsCustomersUnpaid=Neplačani računi stranke -BillsCustomersUnpaidForCompany=Unpaid customer invoices for %s -BillsSuppliersUnpaid=Unpaid vendor invoices -BillsSuppliersUnpaidForCompany=Unpaid vendors invoices for %s +Bill=Faktura +Bills=Fakture +BillsCustomers=Fakture za kupce +BillsCustomer=Faktura za kupca +BillsSuppliers=Fakture dobaviteljev +BillsCustomersUnpaid=Neplačane fakture kupcev +BillsCustomersUnpaidForCompany=%s neplačanih faktur kupcev +BillsSuppliersUnpaid=Neplačane fakture dobaviteljev +BillsSuppliersUnpaidForCompany=%s neplačnih faktur dobaviteljev BillsLate=Zamujena plačila -BillsStatistics=Statistika računov za kupce -BillsStatisticsSuppliers=Vendors invoices statistics -DisabledBecauseDispatchedInBookkeeping=Disabled because invoice was dispatched into bookkeeping -DisabledBecauseNotLastInvoice=Disabled because invoice is not erasable. Some invoices were recorded after this one and it will create holes in the counter. -DisabledBecauseNotErasable=Disabled because cannot be erased -InvoiceStandard=Standardni račun -InvoiceStandardAsk=Standardni račun -InvoiceStandardDesc=Ta vrsta računa je običajni račun. -InvoiceDeposit=Down payment invoice -InvoiceDepositAsk=Down payment invoice -InvoiceDepositDesc=This kind of invoice is done when a down payment has been received. +BillsStatistics=Statistika faktur za kupce +BillsStatisticsSuppliers=Statisika faktur dobaviteljev +DisabledBecauseDispatchedInBookkeeping=Onemogočeno, ker je bila faktura poslana v knjiženje +DisabledBecauseNotLastInvoice=Onemogočeno, ker brisanje fakture ni dovoljeno. Fakture so bile ustvarjene po tej fakturi, zato bi brisanje povzročilo škrbine v števcu. +DisabledBecauseNotErasable=Onemogočeno, ker brisanje ni dovoljeno +InvoiceStandard=Standardna faktura +InvoiceStandardAsk=Standardna faktura +InvoiceStandardDesc=Ta vrsta fakture je običajna faktura. +InvoiceDeposit=Avansni račun +InvoiceDepositAsk=Avansni račun +InvoiceDepositDesc=Ta vrsta fakture se naredi po prejemu avansa. InvoiceProForma=Predračun InvoiceProFormaAsk=Predračun InvoiceProFormaDesc=Predračun izgleda enako kot račun, vendar nima računovodske vrednosti. InvoiceReplacement=Nadomestni račun InvoiceReplacementAsk=Nadomestni račun za račun -InvoiceReplacementDesc=Replacement invoice is used to completely replace an invoice with no payment already received.

    Note: Only invoices with no payment on it can be replaced. If the invoice you replace is not yet closed, it will be automatically closed to 'abandoned'. +InvoiceReplacementDesc=Namen nadomestne fakture je v celoti nadomestiti fakturo, za katero ni bilo prejetega plačila.

    Opomba: Samo neplačane fakture je mogoče nadomestiti z nadomestno fakturo. Če faktura, za katero delate nadomestno fakturo, še ni zaključena, bo tista faktura avtomatsko dobila stanje 'opuščena'. InvoiceAvoir=Dobropis -InvoiceAvoirAsk=Dobropis za korekcijo računa -InvoiceAvoirDesc=The credit note is a negative invoice used to correct the fact that an invoice shows an amount that differs from the amount actually paid (eg the customer paid too much by mistake, or will not pay the complete amount since some products were returned). +InvoiceAvoirAsk=Dobropis za korekcijo fakture +InvoiceAvoirDesc=Dobropis je negativna faktura, namenjena korekciji zneskov na fakturi, ki se razlikujejo od zneskov prejetih plačil iz naslova fakture (npr. kupec je plačal previsok znesek, ali pa ni plačal celotnega zneska in vrnil del artiklov). invoiceAvoirWithLines=Ustvari dobropis z vrsticami iz originalnega računa invoiceAvoirWithPaymentRestAmount=Ustvari dobropis iz neplačanega preostanka osnovnega računa invoiceAvoirLineWithPaymentRestAmount=Dobropis za preostali neplačan znesek @@ -41,9 +41,9 @@ CorrectionInvoice=Račun za popravek UsedByInvoice=Uporabljen za plačilo računa %s ConsumedBy=Porabil NotConsumed=Ni porabljen -NoReplacableInvoice=No replaceable invoices +NoReplacableInvoice=Ni nadomestnih faktur NoInvoiceToCorrect=Ni računa za korekcijo -InvoiceHasAvoir=Was source of one or several credit notes +InvoiceHasAvoir=Je bila vir enemu ali več dobropisom CardBill=Kartica računa PredefinedInvoices=Vnaprej določeni računi Invoice=Račun @@ -53,118 +53,118 @@ InvoiceLine=Vrstica računa InvoiceCustomer=Račun za kupca CustomerInvoice=Račun za kupca CustomersInvoices=Računi za kupce -SupplierInvoice=Vendor invoice -SuppliersInvoices=Vendors invoices -SupplierBill=Vendor invoice -SupplierBills=Računi dobaviteljev +SupplierInvoice=Faktura dobavitelja +SuppliersInvoices=Fakture dobaviteljev +SupplierBill=Faktura dobavitelja +SupplierBills=Fakture dobaviteljev Payment=Plačilo -PaymentBack=Refund -CustomerInvoicePaymentBack=Refund +PaymentBack=Vračilo +CustomerInvoicePaymentBack=Vračilo Payments=Plačila -PaymentsBack=Refunds -paymentInInvoiceCurrency=in invoices currency +PaymentsBack=Vračila +paymentInInvoiceCurrency=V valuti faktur PaidBack=Vrnjeno plačilo DeletePayment=Brisanje plačila -ConfirmDeletePayment=Are you sure you want to delete this payment? -ConfirmConvertToReduc=Do you want to convert this %s into an available credit? -ConfirmConvertToReduc2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this customer. -ConfirmConvertToReducSupplier=Do you want to convert this %s into an available credit? -ConfirmConvertToReducSupplier2=The amount will be saved among all discounts and could be used as a discount for a current or a future invoice for this vendor. -SupplierPayments=Vendor payments +ConfirmDeletePayment=Ali želite brisati plačilo? +ConfirmConvertToReduc=Ali želite to %s pretvoriti v razpoložljivo dobroimetje? +ConfirmConvertToReduc2=Znesek bo shranjen med popuste in je lahko uporabljen kot popust na prihodnjih fakturah temu kupcu. +ConfirmConvertToReducSupplier=Ali želite to %s pretvoriti v razpoložljivo dobroimetje? +ConfirmConvertToReducSupplier2=Znesek bo shranjen med popuste in je lahko uporabljen kot popust na prihodnjih fakturah tega dobavitelja. +SupplierPayments=Plačila dobaviteljem ReceivedPayments=Prejeta plačila -ReceivedCustomersPayments=Prejeta plačila od kupcev -PayedSuppliersPayments=Payments paid to vendors +ReceivedCustomersPayments=Prejeta plačila kupcev +PayedSuppliersPayments=Izvedena plačila dobaviteljem ReceivedCustomersPaymentsToValid=Prejeta plačila od kupcev za potrditev PaymentsReportsForYear=Poročilo o plačilih za %s PaymentsReports=Poročila o plačilih PaymentsAlreadyDone=Izvršena plačila -PaymentsBackAlreadyDone=Refunds already done +PaymentsBackAlreadyDone=Izvedena vračila PaymentRule=Pravilo plačila -PaymentMode=Payment Type -PaymentTypeDC=Debit/Credit Card +PaymentMode=Tip plačila +PaymentTypeDC=Debetna/Kreditna kartica PaymentTypePP=PayPal -IdPaymentMode=Payment Type (id) -CodePaymentMode=Payment Type (code) -LabelPaymentMode=Payment Type (label) -PaymentModeShort=Payment Type -PaymentTerm=Payment Term -PaymentConditions=Payment Terms -PaymentConditionsShort=Payment Terms +IdPaymentMode=Tip plačila (id) +CodePaymentMode=Tip plačila (šifra) +LabelPaymentMode=Tip plačila (oznaka) +PaymentModeShort=Tip plačila +PaymentTerm=Plačilni pogoj +PaymentConditions=Plačilni pogoji +PaymentConditionsShort=Plačilni pogoji PaymentAmount=Znesek plačila PaymentHigherThanReminderToPay=Plačilo višje od opomina -HelpPaymentHigherThanReminderToPay=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
    Edit your entry, otherwise confirm and consider creating a credit note for the excess received for each overpaid invoice. -HelpPaymentHigherThanReminderToPaySupplier=Attention, the payment amount of one or more bills is higher than the outstanding amount to pay.
    Edit your entry, otherwise confirm and consider creating a credit note for the excess paid for each overpaid invoice. -ClassifyPaid=Označeno kot 'Plačano' -ClassifyUnPaid=Classify 'Unpaid' -ClassifyPaidPartially=Označeno kot 'Delno plačano' -ClassifyCanceled=Označeno kot 'Opuščeno' -ClassifyClosed=Označeno kot 'Zaključeno' +HelpPaymentHigherThanReminderToPay=Pozor, znesek plačila enega od faktur je večji od odprtega zneska za plačilo.
    Popravite vnos, ali pa potrdite in po potrebi izdelajte dobropis v presežnem znesku za vsako preplačano fakturo. +HelpPaymentHigherThanReminderToPaySupplier=Pozor, znesek plačila enega od faktur je večji od odprtega zneska za plačilo.
    Popravite vnos, ali pa potrdite in po potrebi izdelajte dobropis v presežnem znesku za vsako preplačano fakturo. +ClassifyPaid=Označi kot 'Plačano' +ClassifyUnPaid=Označi kot 'Neplačano' +ClassifyPaidPartially=Označi kot 'Delno plačano' +ClassifyCanceled=Označi kot 'Opuščeno' +ClassifyClosed=Označi kot 'Zaključeno' ClassifyUnBilled=Označi kot "Nezaračunano" -CreateBill=Kreiraj račun +CreateBill=Ustvari fakturo CreateCreditNote=Ustvari dobropis -AddBill=Ustvariti računa ali dobropis -AddToDraftInvoices=Dodaj osnutku računa -DeleteBill=Izbriši račun -SearchACustomerInvoice=Iskanje računa za kupca -SearchASupplierInvoice=Search for a vendor invoice -CancelBill=Preklic računa -SendRemindByMail=Pošlji opomin po e-mailu -DoPayment=Enter payment -DoPaymentBack=Enter refund -ConvertToReduc=Mark as credit available -ConvertExcessReceivedToReduc=Convert excess received into available credit -ConvertExcessPaidToReduc=Convert excess paid into available discount -EnterPaymentReceivedFromCustomer=Vnesi prejeto plačilo od kupca +AddBill=Ustvari fakturo ali dobropis +AddToDraftInvoices=Dodaj osnutku fakture +DeleteBill=Izbriši fakturo +SearchACustomerInvoice=Iskanje fakture za kupca +SearchASupplierInvoice=Iskanje fakture dobavitelja +CancelBill=Preklic fakture +SendRemindByMail=Pošlji opomin po e-pošti +DoPayment=Vnos plačila +DoPaymentBack=Vnos vračila +ConvertToReduc=Označi nerazpoložljivo dobroimetje +ConvertExcessReceivedToReduc=Pretvori presežek plačila v dobroimetje +ConvertExcessPaidToReduc=Pretvori presežek plačila v razpoložljiv popust +EnterPaymentReceivedFromCustomer=Vnesi prejem plačila kupca EnterPaymentDueToCustomer=Vnesi rok plačila za kupca -DisabledBecauseRemainderToPayIsZero=Onemogočeno, ker je neplačan opomin enako nič +DisabledBecauseRemainderToPayIsZero=Onemogočeno, ker je neplačan znesek enak nič PriceBase=Osnova cene -BillStatus=Status računa -StatusOfGeneratedInvoices=Status of generated invoices +BillStatus=Stanje fakture +StatusOfGeneratedInvoices=Stanja ustvarjenih faktur BillStatusDraft=Osnutek (potrebna potrditev) BillStatusPaid=Plačano -BillStatusPaidBackOrConverted=Credit note refund or marked as credit available -BillStatusConverted=Paid (ready for consumption in final invoice) +BillStatusPaidBackOrConverted=Vračilo dobropisa ali označeno kot nerazpoložljivo dobroimetje +BillStatusConverted=Plačano (pripravljeno za fakturiranje) BillStatusCanceled=Opuščeno BillStatusValidated=Potrjeno (potrebno plačilo) BillStatusStarted=Začeto BillStatusNotPaid=Ni plačano -BillStatusNotRefunded=Not refunded +BillStatusNotRefunded=Ni vrnjeno BillStatusClosedUnpaid=Zaključeno (neplačano) -BillStatusClosedPaidPartially=Plačano (delno) +BillStatusClosedPaidPartially=Delno plačano BillShortStatusDraft=Osnutek BillShortStatusPaid=Plačano -BillShortStatusPaidBackOrConverted=Refunded or converted -Refunded=Refunded -BillShortStatusConverted=Plačan +BillShortStatusPaidBackOrConverted=Vrnjeno ali pretvorjeno +Refunded=Vrnjeno +BillShortStatusConverted=Plačano BillShortStatusCanceled=Opuščeno BillShortStatusValidated=Potrjeno BillShortStatusStarted=Začeto BillShortStatusNotPaid=Neplačano -BillShortStatusNotRefunded=Not refunded +BillShortStatusNotRefunded=Ni vrnjeno BillShortStatusClosedUnpaid=Zaključeno -BillShortStatusClosedPaidPartially=Plačano (delno) +BillShortStatusClosedPaidPartially=Delno plačano PaymentStatusToValidShort=Za potrditev -ErrorVATIntraNotConfigured=Intra-Community VAT number not yet defined -ErrorNoPaiementModeConfigured=No default payment type defined. Go to Invoice module setup to fix this. -ErrorCreateBankAccount=Create a bank account, then go to Setup panel of Invoice module to define payment types -ErrorBillNotFound=Račun s številko %s ne obstaja -ErrorInvoiceAlreadyReplaced=Error, you tried to validate an invoice to replace invoice %s. But this one has already been replaced by invoice %s. +ErrorVATIntraNotConfigured=Med-podjetna DDV številka še ni določena +ErrorNoPaiementModeConfigured=Privzet tip plačila ni določen. Določite ga v modulu za fakturiranje. +ErrorCreateBankAccount=Ustvari bančni račun in potem v Nastavitvah, v modulu za fakturiranje, definiraj tipe plačil. +ErrorBillNotFound=Faktura s številko %s ne obstaja +ErrorInvoiceAlreadyReplaced=Napaka, potrditi skušate fakturo, ki bi nadomestila fakturo %s, ampak ta faktura je že bila nadomeščena s fakturo %s. ErrorDiscountAlreadyUsed=Napaka, popust je bil že uporabljen -ErrorInvoiceAvoirMustBeNegative=Napaka, na popravljenem računu mora biti negativni znesek -ErrorInvoiceOfThisTypeMustBePositive=Error, this type of invoice must have an amount excluding tax positive (or null) -ErrorCantCancelIfReplacementInvoiceNotValidated=Napaka, ne morete preklicati računa, ki je bil zamenjan z drugim računom, ki je še v statusu osnutka -ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=This part or another is already used so discount series cannot be removed. +ErrorInvoiceAvoirMustBeNegative=Napaka, na popravljeni fakturi mora biti negativni znesek +ErrorInvoiceOfThisTypeMustBePositive=Napaka, ta tip fakture mora imeti znesek brez davka (ali nič). +ErrorCantCancelIfReplacementInvoiceNotValidated=Napaka, ne morete preklicati fakture, ki je bil nadomeščena z drugo fakturo, ki je še v statusu osnutka +ErrorThisPartOrAnotherIsAlreadyUsedSoDiscountSerieCantBeRemoved=Ta ali drug del je že uporabljen, zato serije popustov ni dovoljeno odstraniti. BillFrom=Izdajatelj BillTo=Prejemnik ActionsOnBill=Aktivnosti na računu -RecurringInvoiceTemplate=Template / Recurring invoice -NoQualifiedRecurringInvoiceTemplateFound=No recurring template invoice qualified for generation. -FoundXQualifiedRecurringInvoiceTemplate=Found %s recurring template invoice(s) qualified for generation. -NotARecurringInvoiceTemplate=Not a recurring template invoice -NewBill=Nov račun -LastBills=Latest %s invoices -LatestTemplateInvoices=Latest %s template invoices -LatestCustomerTemplateInvoices=Latest %s customer template invoices +RecurringInvoiceTemplate=Predloga / Ponavljajoča se faktura +NoQualifiedRecurringInvoiceTemplateFound=Ni primernega osnutka ponavljajoče se fakture +FoundXQualifiedRecurringInvoiceTemplate=Najdenih %s primernih osnutkov ponavljajočih se faktur. +NotARecurringInvoiceTemplate=Ni predloga ponavljajoče se fakture +NewBill=Nova faktura +LastBills=Zadnjih %s faktur +LatestTemplateInvoices=Zadnjih %s predlog faktur +LatestCustomerTemplateInvoices=Zadnjih %s predlog faktur za kupce LatestSupplierTemplateInvoices=Latest %s vendor template invoices LastCustomersBills=Latest %s customer invoices LastSuppliersBills=Latest %s vendor invoices @@ -257,7 +257,7 @@ DateInvoice=Datum izdaje DatePointOfTax=Point of tax NoInvoice=Ni računa ClassifyBill=Klacificiraj račun -SupplierBillsToPay=Unpaid vendor invoices +SupplierBillsToPay=Neplačane fakture dobaviteljem CustomerBillsUnpaid=Neplačani računi stranke NonPercuRecuperable=Nepovratno SetConditions=Set Payment Terms @@ -524,8 +524,8 @@ TypeContact_facture_external_BILLING=Kontakt za račun kupcu TypeContact_facture_external_SHIPPING=Kontakt za pošiljanje kupcu TypeContact_facture_external_SERVICE=Kontakt za servis pri kupcu TypeContact_invoice_supplier_internal_SALESREPFOLL=Representative following-up vendor invoice -TypeContact_invoice_supplier_external_BILLING=Vendor invoice contact -TypeContact_invoice_supplier_external_SHIPPING=Vendor shipping contact +TypeContact_invoice_supplier_external_BILLING=Dobaviteljeva kontaktna oseba za fakture +TypeContact_invoice_supplier_external_SHIPPING=Dobaviteljeva kontaktna oseba za dobave TypeContact_invoice_supplier_external_SERVICE=Vendor service contact # Situation invoices InvoiceFirstSituationAsk=Račun za prvo situacijo diff --git a/htdocs/langs/sl_SI/boxes.lang b/htdocs/langs/sl_SI/boxes.lang index 8e2cde7fc9b..92f815a1a33 100644 --- a/htdocs/langs/sl_SI/boxes.lang +++ b/htdocs/langs/sl_SI/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Zadnji %s zabeleženi dobavitelji BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Najnovejše %s stranke in možne stranke -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Zadnji %s člani BoxTitleLastFicheInter=Zadnje %s spremenjene intervencije @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Računi za kupce ForCustomersOrders=Naročila kupcev ForProposals=Ponudbe @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Računovodstvo diff --git a/htdocs/langs/sl_SI/cashdesk.lang b/htdocs/langs/sl_SI/cashdesk.lang index 95e60738514..a103bd51275 100644 --- a/htdocs/langs/sl_SI/cashdesk.lang +++ b/htdocs/langs/sl_SI/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/sl_SI/commercial.lang b/htdocs/langs/sl_SI/commercial.lang index f59a8da7705..e13f6551d2a 100644 --- a/htdocs/langs/sl_SI/commercial.lang +++ b/htdocs/langs/sl_SI/commercial.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - commercial -Commercial=Commerce -CommercialArea=Commerce area +Commercial=Prodaja +CommercialArea=Področje prodaje Customer=Kupec Customers=Kupci Prospect=Možna stranka @@ -12,14 +12,14 @@ AddAnAction=Ustvari dogodek AddActionRendezVous=Ustvari srečanje ConfirmDeleteAction=Ali zares želite izbrisati ta dogodek ? CardAction=Kartica aktivnosti -ActionOnCompany=Related company -ActionOnContact=Related contact +ActionOnCompany=Povezano podjetje +ActionOnContact=Povezan stik TaskRDVWith=Sestanek z %s ShowTask=Prikaži naloge ShowAction=Prikaži aktivnosti ActionsReport=Poročilo o aktivnostih ThirdPartiesOfSaleRepresentative=Partnerji s prodajnimi predstavniki -SaleRepresentativesOfThirdParty=Sales representatives of third party +SaleRepresentativesOfThirdParty=Prodajni predstavniki tretje osebe SalesRepresentative=Prodajni predstavnik SalesRepresentatives=Prodajni predstavniki SalesRepresentativeFollowUp=Prodajni predstavnik (nadaljevanje) @@ -29,8 +29,8 @@ ShowCustomer=Prikaži kupca ShowProspect=Prikaži možno stranko ListOfProspects=Seznam možnih strank ListOfCustomers=Seznam kupcev -LastDoneTasks=Latest %s completed actions -LastActionsToDo=Oldest %s not completed actions +LastDoneTasks=Zadnjih %s zaključenih aktivnosti +LastActionsToDo=Nastarejših %s odprtih aktivnosti DoneAndToDoActions=Dokončane in odprte naloge DoneActions=Dokončane aktivnosti ToDoActions=Nedokončane aktivnosti @@ -52,17 +52,17 @@ ActionAC_TEL=Telefonski klic ActionAC_FAX=Poslati faks ActionAC_PROP=Poslati ponudbo ActionAC_EMAIL=Poslati e-mail -ActionAC_EMAIL_IN=Reception of Email +ActionAC_EMAIL_IN=Prejem e-maila ActionAC_RDV=Sestanek ActionAC_INT=Intervencija na lokaciji -ActionAC_FAC=Poslati račun kupcu po pošti -ActionAC_REL=Poslati račun kupcu po pošti (opomin) -ActionAC_CLO=Zapreti -ActionAC_EMAILING=Poslati skupinski e-mail -ActionAC_COM=Send sales order by mail +ActionAC_FAC=Račun bo poslan po pošti +ActionAC_REL=Račun bo poslan po pošti (opomnik) +ActionAC_CLO=Zapri +ActionAC_EMAILING=Pošlji skupinski e-mail +ActionAC_COM=Pošlji prodajno poročilo po e-pošti ActionAC_SHIP=Pošlji pošiljko po pošti -ActionAC_SUP_ORD=Send purchase order by mail -ActionAC_SUP_INV=Send vendor invoice by mail +ActionAC_SUP_ORD=Pošlji nabavno naročilo po e-pošti +ActionAC_SUP_INV=Prejeto fakturo poslati po pošti ActionAC_OTH=Ostalo ActionAC_OTH_AUTO=Avtomatsko vnešeni dogodki ActionAC_MANUAL=Ročno vnešeni dogodki @@ -72,9 +72,9 @@ Stats=Statistika prodaje StatusProsp=Status možne stranke DraftPropals=Osnutek komercialne ponudbe NoLimit=Brez omejitev -ToOfferALinkForOnlineSignature=Link for online signature -WelcomeOnOnlineSignaturePage=Welcome to the page to accept commercial proposals from %s -ThisScreenAllowsYouToSignDocFrom=This screen allow you to accept and sign, or refuse, a quote/commercial proposal -ThisIsInformationOnDocumentToSign=This is information on document to accept or refuse -SignatureProposalRef=Signature of quote/commercial proposal %s -FeatureOnlineSignDisabled=Feature for online signing disabled or document generated before the feature was enabled +ToOfferALinkForOnlineSignature=Povezava do online podpisa +WelcomeOnOnlineSignaturePage=Dobrodošli na strani za prejem ponudb od %s +ThisScreenAllowsYouToSignDocFrom=Na tem ekranu lahko sprejemate, podpisujete ali zavračate ponudbe +ThisIsInformationOnDocumentToSign=Informacije na dokumentu, ki jih je potrebno potrditi ali zavrniti +SignatureProposalRef=Podpis ponudbe %s +FeatureOnlineSignDisabled=Funkcionalnost elektronskega podpisovanja je onemogočena, oziroma je dokument nastal, preden je bilo omogočeno elektronsko podpisovanje diff --git a/htdocs/langs/sl_SI/compta.lang b/htdocs/langs/sl_SI/compta.lang index 4af0e6f6512..a3a4ec4adde 100644 --- a/htdocs/langs/sl_SI/compta.lang +++ b/htdocs/langs/sl_SI/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Posebni stroški @@ -106,7 +107,7 @@ VATPayments=Sales tax payments VATRefund=Sales tax refund NewVATPayment=New sales tax payment NewLocalTaxPayment=New tax %s payment -Refund=Refund +Refund=Vračilo SocialContributionsPayments=Social/fiscal taxes payments ShowVatPayment=Prikaži plačilo DDV TotalToPay=Skupaj za plačilo @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/sl_SI/contracts.lang b/htdocs/langs/sl_SI/contracts.lang index 2490c7978ef..847944c7047 100644 --- a/htdocs/langs/sl_SI/contracts.lang +++ b/htdocs/langs/sl_SI/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Aktivne storitve MenuExpiredServices=Pretečene storitve MenuClosedServices=Zaključene storitve NewContract=Nova pogodba -NewContractSubscription=Nova pogodba/naročnina +NewContractSubscription=New contract or subscription AddContract=Ustvari pogodbo DeleteAContract=Izbriši pogodbo ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/sl_SI/errors.lang b/htdocs/langs/sl_SI/errors.lang index d4e675c7825..c9142ec4843 100644 --- a/htdocs/langs/sl_SI/errors.lang +++ b/htdocs/langs/sl_SI/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/sl_SI/languages.lang b/htdocs/langs/sl_SI/languages.lang index 07280d58025..f449281f141 100644 --- a/htdocs/langs/sl_SI/languages.lang +++ b/htdocs/langs/sl_SI/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabščina Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabščina +Language_az_AZ=Azerbaijani Language_bn_BD=Bengalščina +Language_bn_IN=Bengali (India) Language_bg_BG=Bolgarski Language_bs_BA=Bosanski Language_ca_ES=Katalonščina @@ -20,6 +23,7 @@ Language_en_GB=Angleščina (Združeno kraljestvo) Language_en_IN=Angleščina (Indija) Language_en_NZ=Angleščina (Nova Zelandija) Language_en_SA=Angleški (Savdska Arabija) +Language_en_SG=English (Singapore) Language_en_US=Angleščina (ZDA) Language_en_ZA=Angleščina (Južna Afrika) Language_es_ES=Španščina @@ -29,6 +33,7 @@ Language_es_CL=Španščina (Čile) Language_es_CO=Španščina (Kolumbija) Language_es_DO=Španščina (Dominikanska republika) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Španščina (Honduras) Language_es_MX=Španščina (Mehika) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Španski (Paragvaj) Language_es_PE=Španski (Peru) Language_es_PR=Španščina (Portoriko) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonski Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finščina Language_fr_BE=Francoščina (Belgija) Language_fr_CA=Francoščina (Kanada) Language_fr_CH=Francoščina (Švica) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francoščina +Language_fr_GA=French (Gabon) Language_fr_NC=Francoski (Nova Kaledonija) +Language_fr_SN=French (Senegal) Language_fy_NL=Frizijščina +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Hrvaški Language_hu_HU=Madžarščina Language_id_ID=Indonezijščina Language_is_IS=Islandščina Language_it_IT=Italijanščina +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japonščina Language_ka_GE=Gruzijščina Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvijski Language_mk_MK=Makedonski Language_mn_MN=Mongolian Language_nb_NO=Norveščina (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Nizozemščina (Belgija) Language_nl_NL=Dutch Language_pl_PL=Poljščina @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamski Language_zh_CN=Kitajščina Language_zh_TW=Kitajščina (tradicionalna) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/sl_SI/mails.lang b/htdocs/langs/sl_SI/mails.lang index aa37bd15448..8c93e61eedc 100644 --- a/htdocs/langs/sl_SI/mails.lang +++ b/htdocs/langs/sl_SI/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Informacija ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/sl_SI/main.lang b/htdocs/langs/sl_SI/main.lang index 14587e0dbf0..71d8cbb4ee9 100644 --- a/htdocs/langs/sl_SI/main.lang +++ b/htdocs/langs/sl_SI/main.lang @@ -355,8 +355,8 @@ PriceUTTC=C.E. (z davkom) Amount=Znesek AmountInvoice=Znesek računa AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Znesek za plačilo AmountHTShort=Amount (excl.) AmountTTCShort=Znesek (z DDV) @@ -485,6 +485,7 @@ Categories=Značke/kategorije Category=Značka/kategorija By=Z From=Od +FromDate=Izdajatelj FromLocation=Izdajatelj to=do To=do @@ -687,6 +688,7 @@ Method=Metoda Receive=Prejeto CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Delni TotalWoman=Skupna NeverReceived=Nikoli prejeto @@ -703,6 +705,7 @@ MenuECM=Dokumenti MenuAWStats=AWStatistika MenuMembers=Člani MenuAgendaGoogle=Google dnevni red +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr omejitve (Meni domov-nastavitve-varnost): %s Kb, PHP omejitev: %s Kb NoFileFound=V tej mapi ni shranjenih dokumentov CurrentUserLanguage=Trenutni jezik @@ -725,7 +728,7 @@ Page=Stran Notes=Opombe AddNewLine=Dodaj novo vrstico AddFile=Dodaj datoteko -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Kloniraj objekt z osnovnimi atributi ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=Č ShortFriday=P ShortSaturday=S ShortSunday=N +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Nastavi referenco Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -961,9 +997,9 @@ SearchIntoProjects=Projekti SearchIntoMO=Manufacturing Orders SearchIntoTasks=Naloge SearchIntoCustomerInvoices=Računi za kupca -SearchIntoSupplierInvoices=Vendor invoices +SearchIntoSupplierInvoices=Fakture dobaviteljev SearchIntoCustomerOrders=Sales orders -SearchIntoSupplierOrders=Purchase orders +SearchIntoSupplierOrders=Nabavni nalogi SearchIntoCustomerProposals=Komercialne ponudbe SearchIntoSupplierProposals=Vendor proposals SearchIntoInterventions=Intervencije @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informacija +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/sl_SI/members.lang b/htdocs/langs/sl_SI/members.lang index 345902d0348..1dbada441d8 100644 --- a/htdocs/langs/sl_SI/members.lang +++ b/htdocs/langs/sl_SI/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Predlagani člani MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Potrjen +SubscriptionNotNeeded=No subscription needed NewCotisation=Nov prispevek PaymentSubscription=Plačilo novega prispevka SubscriptionEndDate=Končni datum članstva @@ -78,7 +81,7 @@ DeleteType=Izbriši VoteAllowed=Dovoljeno glasovanje Physical=Fizično Moral=Moralno -MorPhy=Moralno/fizično +MorPhy=Narava Reenable=Ponovno omogoči ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/sl_SI/mrp.lang b/htdocs/langs/sl_SI/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/sl_SI/mrp.lang +++ b/htdocs/langs/sl_SI/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/sl_SI/orders.lang b/htdocs/langs/sl_SI/orders.lang index 6ac81edd908..637417dddd2 100644 --- a/htdocs/langs/sl_SI/orders.lang +++ b/htdocs/langs/sl_SI/orders.lang @@ -1,6 +1,6 @@ # Dolibarr language file - Source file is en_US - orders OrdersArea=Področje naročil kupcev -SuppliersOrdersArea=Purchase orders area +SuppliersOrdersArea=Področje naročil dobaviteljem OrderCard=Kartica naročila OrderId=ID naročila Order=Naročilo @@ -11,23 +11,23 @@ OrderDate=Datum naročila OrderDateShort=Datum naročila OrderToProcess=Naročilo za obdelavo NewOrder=Novo naročilo -NewOrderSupplier=New Purchase Order +NewOrderSupplier=Nov nabavni nalog ToOrder=Potrebno naročiti MakeOrder=Izdelaj naročilo -SupplierOrder=Purchase order -SuppliersOrders=Purchase orders -SuppliersOrdersRunning=Current purchase orders -CustomerOrder=Sales Order -CustomersOrders=Sales Orders -CustomersOrdersRunning=Current sales orders -CustomersOrdersAndOrdersLines=Sales orders and order details -OrdersDeliveredToBill=Sales orders delivered to bill -OrdersToBill=Sales orders delivered -OrdersInProcess=Sales orders in process -OrdersToProcess=Sales orders to process -SuppliersOrdersToProcess=Purchase orders to process -SuppliersOrdersAwaitingReception=Purchase orders awaiting reception -AwaitingReception=Awaiting reception +SupplierOrder=Nabavni nalog +SuppliersOrders=Nabavni nalogi +SuppliersOrdersRunning=Trenutni nabavni nalogi +CustomerOrder=Naročilo +CustomersOrders=Naročila +CustomersOrdersRunning=Trenutna naročila +CustomersOrdersAndOrdersLines=Naročila s podrobnostmi +OrdersDeliveredToBill=Naročilo dostavljeno, za fakturiranje +OrdersToBill=Naročilo dostavljeno +OrdersInProcess=Naročila v obdelavi +OrdersToProcess=Naročila za obdelavo +SuppliersOrdersToProcess=Nabavni nalogi za obdelavo +SuppliersOrdersAwaitingReception=Naročila v čakanju na prejem +AwaitingReception=V čakanju na prejem StatusOrderCanceledShort=Preklicano StatusOrderDraftShort=Osnutek StatusOrderValidatedShort=Potrjeno @@ -42,7 +42,7 @@ StatusOrderApprovedShort=Odobreno StatusOrderRefusedShort=Zavrnjeno StatusOrderToProcessShort=Za obdelavo StatusOrderReceivedPartiallyShort=Delno prejeto -StatusOrderReceivedAllShort=Products received +StatusOrderReceivedAllShort=Prevzeti artikli StatusOrderCanceled=Preklicano StatusOrderDraft=Osnutek (potrebno potrditi) StatusOrderValidated=Potrjeno @@ -53,7 +53,7 @@ StatusOrderToBill=Za fakturiranje StatusOrderApproved=Odobreno StatusOrderRefused=Zavrnjeno StatusOrderReceivedPartially=Delno prejeto -StatusOrderReceivedAll=All products received +StatusOrderReceivedAll=Vsi artikli prevzeti ShippingExist=Pošiljka ne obstaja QtyOrdered=Naročena količina ProductQtyInDraft=Količina proizvoda v osnutkih naročil @@ -66,45 +66,45 @@ RefuseOrder=Zavrni naročilo ApproveOrder=Odobri naročilo Approve2Order=Odobri naročilo (drugi nivo) ValidateOrder=Potrdi naročilo -UnvalidateOrder=Unvalidate red +UnvalidateOrder=Razveljavi potrditev naročila DeleteOrder=Briši naročilo CancelOrder=Prekliči naročilo -OrderReopened= Order %s re-open +OrderReopened= Ponovno odpri naročilo %s AddOrder=Ustvari naročilo -AddPurchaseOrder=Create purchase order +AddPurchaseOrder=Ustvari nov nabavni nalog AddToDraftOrders=Dodaj osnutku naročila ShowOrder=Prikaži naročilo OrdersOpened=Naročila za procesiranje NoDraftOrders=Ni osnutkov naročil -NoOrder=No order -NoSupplierOrder=No purchase order -LastOrders=Latest %s sales orders -LastCustomerOrders=Latest %s sales orders -LastSupplierOrders=Latest %s purchase orders -LastModifiedOrders=Latest %s modified orders +NoOrder=Ni naročil +NoSupplierOrder=Ni nabavnih nalogov +LastOrders=Zadnjih %s naročil +LastCustomerOrders=Zadnjih %s naročil +LastSupplierOrders=Zadnjih %s nabavnih nalogov +LastModifiedOrders=Zadnjih %s spremenjenih naročil AllOrders=Vsa naročila NbOfOrders=Število naročil OrdersStatistics=Statistika naročil -OrdersStatisticsSuppliers=Purchase order statistics +OrdersStatisticsSuppliers=Statistika nabavnih nalogov NumberOfOrdersByMonth=Število naročil po mesecih -AmountOfOrdersByMonthHT=Amount of orders by month (excl. tax) +AmountOfOrdersByMonthHT=Vrednost naročil po mesecih (brez DDV) ListOfOrders=Seznam naročil CloseOrder=Zaključi naročilo -ConfirmCloseOrder=Are you sure you want to set this order to delivered? Once an order is delivered, it can be set to billed. -ConfirmDeleteOrder=Are you sure you want to delete this order? -ConfirmValidateOrder=Are you sure you want to validate this order under name %s? -ConfirmUnvalidateOrder=Are you sure you want to restore order %s to draft status? -ConfirmCancelOrder=Are you sure you want to cancel this order? -ConfirmMakeOrder=Are you sure you want to confirm you made this order on %s? +ConfirmCloseOrder=Ali želite označiti naročilo kot prevzeto? Ko je naročilo prevzeto, ga je mogoče označiti kot fakturirano. +ConfirmDeleteOrder=Ali želite brisati naročilo? +ConfirmValidateOrder=Ali želite potrditi naročilo pod imenom %s? +ConfirmUnvalidateOrder=Ali želiti vrniti stanje naročila %s v osnutek? +ConfirmCancelOrder=Ali želite preklicati naročilo? +ConfirmMakeOrder=Potrdite, da ste ustvarili naročilo dne %s. GenerateBill=Kreiraj račun ClassifyShipped=Označi kot dobavljeno DraftOrders=Osnutki naročil -DraftSuppliersOrders=Draft purchase orders +DraftSuppliersOrders=Nabavni nalogi v osnutku OnProcessOrders=Naročila v obdelavi -RefOrder=Ref. naročilo -RefCustomerOrder=Ref. order for customer -RefOrderSupplier=Ref. order for vendor -RefOrderSupplierShort=Ref. order vendor +RefOrder=Šifra naročila +RefCustomerOrder=Naročnikova oznaka naročila +RefOrderSupplier=Dobaviteljeva šifra nabavnega naloga +RefOrderSupplierShort=Šifra nabavnega naloga SendOrderByMail=Pošlji naročilo po pošti ActionsOnOrder=Aktivnosti ob naročilu NoArticleOfTypeProduct=Na tem naročilu ni artiklov tipa 'proizvod', zato ni potrebna odprema @@ -112,25 +112,25 @@ OrderMode=Način oddaje naročila AuthorRequest=Zahteva avtorja UserWithApproveOrderGrant=Uporabniki z dovoljenjem za "odobritev naročil". PaymentOrderRef=Plačilo naročila %s -ConfirmCloneOrder=Are you sure you want to clone this order %s? -DispatchSupplierOrder=Receiving purchase order %s +ConfirmCloneOrder=Ali želite klonirati naročilo %s? +DispatchSupplierOrder=Prejemanje po nabavnem nalogu %s FirstApprovalAlreadyDone=Prva odobritev je že narejena SecondApprovalAlreadyDone=Druga odobritev je že narejena -SupplierOrderReceivedInDolibarr=Purchase Order %s received %s -SupplierOrderSubmitedInDolibarr=Purchase Order %s submitted -SupplierOrderClassifiedBilled=Purchase Order %s set billed +SupplierOrderReceivedInDolibarr=Nabavni nalog %s prejet %s +SupplierOrderSubmitedInDolibarr=Nabavni nalog oddan %s +SupplierOrderClassifiedBilled=Nabavni nalog %s zaračunan OtherOrders=Ostala naročila ##### Types de contacts ##### -TypeContact_commande_internal_SALESREPFOLL=Representative following-up sales order +TypeContact_commande_internal_SALESREPFOLL=Predstavnik, ki sledi naročilu TypeContact_commande_internal_SHIPPING=Referent za sledenje odpreme TypeContact_commande_external_BILLING=Kontakt za račune pri kupcu TypeContact_commande_external_SHIPPING=Kontakt za dobave pri kupcu TypeContact_commande_external_CUSTOMER=Kontakt za sledenje naročila pri kupcu -TypeContact_order_supplier_internal_SALESREPFOLL=Representative following-up purchase order +TypeContact_order_supplier_internal_SALESREPFOLL=Predstavnik, ki sledi nabavnemu nalogu TypeContact_order_supplier_internal_SHIPPING=Referent za sledenje odpreme od dobavitelja -TypeContact_order_supplier_external_BILLING=Vendor invoice contact -TypeContact_order_supplier_external_SHIPPING=Vendor shipping contact -TypeContact_order_supplier_external_CUSTOMER=Vendor contact following-up order +TypeContact_order_supplier_external_BILLING=Dobaviteljeva kontaktna oseba za fakture +TypeContact_order_supplier_external_SHIPPING=Dobaviteljeva kontaktna oseba za dobave +TypeContact_order_supplier_external_CUSTOMER=Dobaviteljeva kontaktna oseba za sledenje naročila Error_COMMANDE_SUPPLIER_ADDON_NotDefined=Konstanta COMMANDE_SUPPLIER_ADDON ni definirana Error_COMMANDE_ADDON_NotDefined=Konstanta COMMANDE_ADDON ni definirana Error_OrderNotChecked=Ni izbranih naročil za račun @@ -141,11 +141,12 @@ OrderByEMail=E-pošta OrderByWWW=Internet OrderByPhone=Telefon # Documents models -PDFEinsteinDescription=A complete order model -PDFEratostheneDescription=A complete order model +PDFEinsteinDescription=Popoln vzorec naročanja (stara implementacija predloge Eratosthene) +PDFEratostheneDescription=Popoln vzorec naročanja PDFEdisonDescription=Vzorec enostavnega naročila -PDFProformaDescription=A complete Proforma invoice template +PDFProformaDescription=Popoln vzorec predloge predračuna CreateInvoiceForThisCustomer=Zaračunaj naročila +CreateInvoiceForThisSupplier=Zaračunaj naročila NoOrdersToInvoice=Ni naročil, ki bi jih lahko zaračunali CloseProcessedOrdersAutomatically=Označi vsa izbrana naročila kot "Procesirano" OrderCreation=Ustvarjanje naročila @@ -154,10 +155,10 @@ OrderCreated=Vaša naročila so bila ustvarjena OrderFail=Pri ustvarjanju naročil je prišlo do napake CreateOrders=Ustvari naročila ToBillSeveralOrderSelectCustomer=Za ustvarjanje računa za več naročil najprej kliknite na kupca, nato izberite "%s". -OptionToSetOrderBilledNotEnabled=Option from module Workflow, to set order to 'Billed' automatically when invoice is validated, is not enabled, so you will have to set the status of orders to 'Billed' manually after the invoice has been generated. -IfValidateInvoiceIsNoOrderStayUnbilled=If invoice validation is 'No', the order will remain to status 'Unbilled' until the invoice is validated. -CloseReceivedSupplierOrdersAutomatically=Close order to status "%s" automatically if all products are received. -SetShippingMode=Set shipping mode +OptionToSetOrderBilledNotEnabled=V modulu Delovni tokovi (Workflow) ni označeno, da naj se po potrditvi računa naročilu avtomatsko spremeni stanje v 'Zaračunano', zato morate po izdaji računa stanje spremeniti ročno. +IfValidateInvoiceIsNoOrderStayUnbilled=Dokler račun ni potrjen, naročilo ostane v stanju 'Nezaračunano'. +CloseReceivedSupplierOrdersAutomatically=Avtomatsko zapri naročilo v status "%s", če so vsi artikli prevzeti. +SetShippingMode=Izberi način pošiljanja WithReceptionFinished=With reception finished #### supplier orders status StatusSupplierOrderCanceledShort=Preklicano @@ -174,7 +175,7 @@ StatusSupplierOrderApprovedShort=Odobreno StatusSupplierOrderRefusedShort=Zavrnjeno StatusSupplierOrderToProcessShort=Za obdelavo StatusSupplierOrderReceivedPartiallyShort=Delno prejeto -StatusSupplierOrderReceivedAllShort=Products received +StatusSupplierOrderReceivedAllShort=Prejeti artikli StatusSupplierOrderCanceled=Preklicano StatusSupplierOrderDraft=Osnutek (potrebno potrditi) StatusSupplierOrderValidated=Potrjen @@ -185,4 +186,4 @@ StatusSupplierOrderToBill=Za fakturiranje StatusSupplierOrderApproved=Odobreno StatusSupplierOrderRefused=Zavrnjeno StatusSupplierOrderReceivedPartially=Delno prejeto -StatusSupplierOrderReceivedAll=All products received +StatusSupplierOrderReceivedAll=Vsi artikli prevzeti diff --git a/htdocs/langs/sl_SI/other.lang b/htdocs/langs/sl_SI/other.lang index bc9ade2dcb0..3cc9bcea61e 100644 --- a/htdocs/langs/sl_SI/other.lang +++ b/htdocs/langs/sl_SI/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/sl_SI/products.lang b/htdocs/langs/sl_SI/products.lang index 91f59823d0a..dd6d7012188 100644 --- a/htdocs/langs/sl_SI/products.lang +++ b/htdocs/langs/sl_SI/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Nastavi tip črtne kode BarcodeValue=Vrednost črtne kode NoteNotVisibleOnBill=Opomba (ni vidna na računih, ponudbah...) ServiceLimitedDuration=Če ima proizvod storitev z omejenim trajanjem: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Število cen DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Država porekla Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Kratek naziv Unit=Enota p=e. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Nov atribut NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/sl_SI/projects.lang b/htdocs/langs/sl_SI/projects.lang index 827c1bb71b8..9edb7c2fcaa 100644 --- a/htdocs/langs/sl_SI/projects.lang +++ b/htdocs/langs/sl_SI/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Sodelavec TypeContact_project_task_external_TASKCONTRIBUTOR=Sodelavec SelectElement=Izberi element AddElement=Povezava do elementa +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/sl_SI/recruitment.lang b/htdocs/langs/sl_SI/recruitment.lang new file mode 100644 index 00000000000..babb96232f7 --- /dev/null +++ b/htdocs/langs/sl_SI/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = O programu +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/sl_SI/stocks.lang b/htdocs/langs/sl_SI/stocks.lang index 7bb4dad06b0..b4c3a42fa2a 100644 --- a/htdocs/langs/sl_SI/stocks.lang +++ b/htdocs/langs/sl_SI/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Izbriši pošiljko Stock=Zaloga Stocks=Zaloge MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Zaloga po lotu/serijski številki @@ -95,14 +95,16 @@ RealStock=Dejanska zaloga RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtualna zaloga -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=ID skladišča DescWareHouse=Opis skladišča LieuWareHouse=Lokalizacija skladišča WarehousesAndProducts=Skladišča in proizvodi WarehousesAndProductsBatchDetail=Skladišča in proizvodi (s podrobnostmi o lotu/serijski številki) -AverageUnitPricePMPShort=Uravnotežena povprečna vhodna cena -AverageUnitPricePMP=Uravnotežena povprečna vhodna cena +AverageUnitPricePMPShort=Uravnotežena povprečna cena +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Prodajna cena za enoto EstimatedStockValueSellShort=Prodajna vrednost EstimatedStockValueSell=Prodajna vrednost @@ -141,7 +143,7 @@ Replenishments=Obnovitve NbOfProductBeforePeriod=Količina proizvoda %s na zalogi pred izbranim obdobjem (< %s) NbOfProductAfterPeriod=Količina proizvoda %s na zalogi po izbranem obdobju (> %s) MassMovement=Masovni premik -SelectProductInAndOutWareHouse=Izberi proizvod, količino, izvorno skladišče in ciljno skladišče, nato klikni "%s". Ko je to narejeno za vse zahtevane premike, klikni na "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Prevzem tega naročila StockMovementRecorded=Zapisan premik zaloge @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/sl_SI/suppliers.lang b/htdocs/langs/sl_SI/suppliers.lang index e236893244a..0ae910ef9b8 100644 --- a/htdocs/langs/sl_SI/suppliers.lang +++ b/htdocs/langs/sl_SI/suppliers.lang @@ -1,6 +1,6 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors -SuppliersInvoice=Vendor invoice +SuppliersInvoice=Fakture dobaviteljev ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor History=Zgodovina @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Nekateri pod-proizvodi nimajo določenih cen AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Ta referenčni dobavitelj je že povezan z referenco: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Razpoložljivost -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Odobri to naročilo ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Zavrni to naročilo @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Datoteka nakazila +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Nastavi status na "Datoteka poslana" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistika po statusu vrstic @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Znesek: %s
    Način: %s
    Datum: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Opcija za delo v živo ni bila nastavljena, zato se bo sistem ustavil po simulaciji +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/sl_SI/workflow.lang b/htdocs/langs/sl_SI/workflow.lang index 14d4f94791e..2fdcedce378 100644 --- a/htdocs/langs/sl_SI/workflow.lang +++ b/htdocs/langs/sl_SI/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Nastavitev modula poteka dela -WorkflowDesc=Ta modul je namenjen prilagajanju nastavitev samodejnih akcij. Privzeto je, da je modul odprt, kar pomeni, da lahko izvajate akcije v poljubnem vrstnem redu. Z nastavitvami delovnih tokov lahko določate zaporedje aktivnosti. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=Prilagajanje poteka dela za aktivirane module ni na voljo. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Samodejno ustvari račun za kupca, po validaciji pogodbe. -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Samodejno generiranje AutomaticClassification=Samodejno spreminjanje statusa diff --git a/htdocs/langs/sl_SI/zapier.lang b/htdocs/langs/sl_SI/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/sl_SI/zapier.lang +++ b/htdocs/langs/sl_SI/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/sq_AL/accountancy.lang b/htdocs/langs/sq_AL/accountancy.lang index 95a82239eda..cd2bc3b934d 100644 --- a/htdocs/langs/sq_AL/accountancy.lang +++ b/htdocs/langs/sq_AL/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/sq_AL/admin.lang b/htdocs/langs/sq_AL/admin.lang index 7fc32b14fa1..64235347ad4 100644 --- a/htdocs/langs/sq_AL/admin.lang +++ b/htdocs/langs/sq_AL/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Konfigurimi i modulit ModulesSetup=Modules/Application setup ModuleFamilyBase=Sistemi @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barkod Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/sq_AL/agenda.lang b/htdocs/langs/sq_AL/agenda.lang index e004fbe6804..8fa8da028f0 100644 --- a/htdocs/langs/sq_AL/agenda.lang +++ b/htdocs/langs/sq_AL/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Vendndodhja -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/sq_AL/boxes.lang b/htdocs/langs/sq_AL/boxes.lang index 08216cdcdbb..1468b3a7864 100644 --- a/htdocs/langs/sq_AL/boxes.lang +++ b/htdocs/langs/sq_AL/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/sq_AL/cashdesk.lang b/htdocs/langs/sq_AL/cashdesk.lang index 09b28e8d6bf..489e2191fa6 100644 --- a/htdocs/langs/sq_AL/cashdesk.lang +++ b/htdocs/langs/sq_AL/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/sq_AL/compta.lang b/htdocs/langs/sq_AL/compta.lang index 6d530dd3923..7a237dbc407 100644 --- a/htdocs/langs/sq_AL/compta.lang +++ b/htdocs/langs/sq_AL/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/sq_AL/contracts.lang b/htdocs/langs/sq_AL/contracts.lang index a17246a39ba..7006cb57cad 100644 --- a/htdocs/langs/sq_AL/contracts.lang +++ b/htdocs/langs/sq_AL/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/sq_AL/errors.lang b/htdocs/langs/sq_AL/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/sq_AL/errors.lang +++ b/htdocs/langs/sq_AL/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/sq_AL/languages.lang b/htdocs/langs/sq_AL/languages.lang index e6dccdc4768..84a95d47582 100644 --- a/htdocs/langs/sq_AL/languages.lang +++ b/htdocs/langs/sq_AL/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanjisht @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/sq_AL/mails.lang b/htdocs/langs/sq_AL/mails.lang index 7d0a2626fb9..16e913977d4 100644 --- a/htdocs/langs/sq_AL/mails.lang +++ b/htdocs/langs/sq_AL/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/sq_AL/main.lang b/htdocs/langs/sq_AL/main.lang index 4296aabe2b6..f11e7e94095 100644 --- a/htdocs/langs/sq_AL/main.lang +++ b/htdocs/langs/sq_AL/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Metoda Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/sq_AL/members.lang b/htdocs/langs/sq_AL/members.lang index 7b185a09616..5fa51ea43a3 100644 --- a/htdocs/langs/sq_AL/members.lang +++ b/htdocs/langs/sq_AL/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Fshi VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/sq_AL/mrp.lang b/htdocs/langs/sq_AL/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/sq_AL/mrp.lang +++ b/htdocs/langs/sq_AL/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/sq_AL/other.lang b/htdocs/langs/sq_AL/other.lang index 645a100df16..fd7a7fb44ea 100644 --- a/htdocs/langs/sq_AL/other.lang +++ b/htdocs/langs/sq_AL/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/sq_AL/products.lang b/htdocs/langs/sq_AL/products.lang index ecb56576969..4e6540adadc 100644 --- a/htdocs/langs/sq_AL/products.lang +++ b/htdocs/langs/sq_AL/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/sq_AL/projects.lang b/htdocs/langs/sq_AL/projects.lang index 36204eb309d..4a272a821a1 100644 --- a/htdocs/langs/sq_AL/projects.lang +++ b/htdocs/langs/sq_AL/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/sq_AL/recruitment.lang b/htdocs/langs/sq_AL/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/sq_AL/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/sq_AL/stocks.lang b/htdocs/langs/sq_AL/stocks.lang index cfb372fb1c2..6d0ac04ee34 100644 --- a/htdocs/langs/sq_AL/stocks.lang +++ b/htdocs/langs/sq_AL/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stok Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/sq_AL/suppliers.lang b/htdocs/langs/sq_AL/suppliers.lang index 38fce69b684..236e7c36352 100644 --- a/htdocs/langs/sq_AL/suppliers.lang +++ b/htdocs/langs/sq_AL/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/sq_AL/workflow.lang b/htdocs/langs/sq_AL/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/sq_AL/workflow.lang +++ b/htdocs/langs/sq_AL/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/sq_AL/zapier.lang b/htdocs/langs/sq_AL/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/sq_AL/zapier.lang +++ b/htdocs/langs/sq_AL/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/sr_RS/accountancy.lang b/htdocs/langs/sr_RS/accountancy.lang index 552b67f462e..04b94b6345d 100644 --- a/htdocs/langs/sr_RS/accountancy.lang +++ b/htdocs/langs/sr_RS/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Izveštaj prodaje ACCOUNTING_PURCHASE_JOURNAL=Izveštaj nabavke @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/sr_RS/admin.lang b/htdocs/langs/sr_RS/admin.lang index adb8fdba82d..405b1a234f9 100644 --- a/htdocs/langs/sr_RS/admin.lang +++ b/htdocs/langs/sr_RS/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Ukoliko prevod ovog jezika nije kompletan ili ukoliko pronađete greške, možete ih ispraviti editom fajlova u folderu langs/%s i proslediti izmene na dolibarr.org/forum ili na github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul %s mora biti aktiviran da biste koristili SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Potencijal kandidata +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Status prospekta +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Samo koristi link "tel:" na telefonskim brojevima ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Ugovori +MailToSendReception=Receptions MailToThirdparty=Subjekti MailToMember=Članovi MailToUser=Korisnici @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/sr_RS/agenda.lang b/htdocs/langs/sr_RS/agenda.lang index 1677dab1776..8e034566601 100644 --- a/htdocs/langs/sr_RS/agenda.lang +++ b/htdocs/langs/sr_RS/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Broj događaja ListOfActions=Lista događaja EventReports=Event reports Location=Lokacija -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Dogadaj svim danima MenuToDoActions=Svi nezavršeni događaji MenuDoneActions=Svi završeni događaji @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Početak + 1 sat SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/sr_RS/boxes.lang b/htdocs/langs/sr_RS/boxes.lang index 37a013dffd7..037853abcf2 100644 --- a/htdocs/langs/sr_RS/boxes.lang +++ b/htdocs/langs/sr_RS/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Fakture klijenata ForCustomersOrders=Narudžbine klijenata ForProposals=Ponude @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Računovodstvo diff --git a/htdocs/langs/sr_RS/cashdesk.lang b/htdocs/langs/sr_RS/cashdesk.lang index 8e43311f794..5074b404df8 100644 --- a/htdocs/langs/sr_RS/cashdesk.lang +++ b/htdocs/langs/sr_RS/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/sr_RS/compta.lang b/htdocs/langs/sr_RS/compta.lang index 6e3b7c3777d..edf211abd56 100644 --- a/htdocs/langs/sr_RS/compta.lang +++ b/htdocs/langs/sr_RS/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Socijalni i poreski trošak SocialContributions=Socijalni i poreski troškovi SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Posebni troškovi @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/sr_RS/contracts.lang b/htdocs/langs/sr_RS/contracts.lang index aab703d1c9c..b8dd7c87ab6 100644 --- a/htdocs/langs/sr_RS/contracts.lang +++ b/htdocs/langs/sr_RS/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Aktivne usluge MenuExpiredServices=Istekle usluge MenuClosedServices=Zatvorene usluge NewContract=Novi ugovor -NewContractSubscription=Novi ugovor/pretplata +NewContractSubscription=New contract or subscription AddContract=Kreiraj ugovor DeleteAContract=Obriši ugovor ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/sr_RS/errors.lang b/htdocs/langs/sr_RS/errors.lang index f812e802993..b257b6a38d4 100644 --- a/htdocs/langs/sr_RS/errors.lang +++ b/htdocs/langs/sr_RS/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nova vrednost ne može biti jednaka staroj ErrorFailedToValidatePasswordReset=Greška prilikom promene lozinke. Možda je promena već izvršena (ovaj link se može iskoristiti samo jednom). Ukoliko nije, pokušajte ponovo. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Greška prilikom dodavanja kontakta -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Način plaćanja je podešen na %s, ali podešavanja modula Fakture nisu završena i ne definišu koje se informacije prikazuju za ovaj način plaćanja. ErrorPHPNeedModule=Greška, PHP mora imati modul %s da biste koristili ovu funkcionalnost. ErrorOpenIDSetupNotComplete=Podesili ste konfiguracioni fajl da odobrava OpenID autentifikaciju, ali URL OpenID servisa nije definisan u konstanti %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Lozinka je podešena za ovog člana, ali korisnik nije kreiran. To znači da je lozinka sačuvana, ali se član ne može ulogovati na Dolibarr. Informaciju može koristiti neka eksterna komponenta, ali ako nemate potrebe da definišete korisnika/lozinku za članove, možete deaktivirati opciju "Upravljanje lozinkama za svakog člana" u podešavanjima modula Članovi. Ukoliko morate da kreirate login, ali Vam nije potrebna lozinka, ostavite ovo polje prazno da se ovo upozorenje ne bi prikazivalo. Napomena: email može biti korišćen kao login ako je član povezan sa korisnikom. diff --git a/htdocs/langs/sr_RS/languages.lang b/htdocs/langs/sr_RS/languages.lang index f7d432d33cb..09da9c8b90a 100644 --- a/htdocs/langs/sr_RS/languages.lang +++ b/htdocs/langs/sr_RS/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arapski Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arapski +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bugarski Language_bs_BA=Bosanski Language_ca_ES=Katalonski @@ -20,6 +23,7 @@ Language_en_GB=Engleski (UK) Language_en_IN=Engleski (Indija) Language_en_NZ=Engleski (Novi Zeland) Language_en_SA=Engleski (Saudijska Arabija) +Language_en_SG=English (Singapore) Language_en_US=Engleski (US) Language_en_ZA=Engleski (Južna Afrika) Language_es_ES=Španski @@ -29,6 +33,7 @@ Language_es_CL=Špnski (Čile) Language_es_CO=Španski (Kolumbija) Language_es_DO=Španski (Dominikanska Republika) Language_es_EC=Španski (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Španski (Honduras) Language_es_MX=Španski (Meksiko) Language_es_PA=Španski (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Španski (Paragvaj) Language_es_PE=Španski (Peru) Language_es_PR=Španski (Porto Riko) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Španski (Venecuela) Language_et_EE=Estonski Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finski Language_fr_BE=Francuski (Belgija) Language_fr_CA=Francuski (Kanada) Language_fr_CH=Francuski (Švajcarska) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Francuski +Language_fr_GA=French (Gabon) Language_fr_NC=Francuski (Nova Kaledonija) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisijski +Language_gl_ES=Galician Language_he_IL=Hebrejski +Language_hi_IN=Hindi (India) Language_hr_HR=Hrvatski Language_hu_HU=Mađarski Language_id_ID=Indonežanski Language_is_IS=Islanđanski Language_it_IT=Italijanski +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanski Language_ka_GE=Gruzijski Language_km_KH=Kmerski @@ -64,6 +77,7 @@ Language_lv_LV=Litvanski Language_mk_MK=Makedonski Language_mn_MN=Mongolski Language_nb_NO=Norveški (Bokmal) +Language_ne_NP=Nepali Language_nl_BE=Holandski (Belgija) Language_nl_NL=Dutch Language_pl_PL=Poljski @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbekistanski Language_vi_VN=Vijetnamski Language_zh_CN=Kineski Language_zh_TW=Kineski (Tradicionalni) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/sr_RS/mails.lang b/htdocs/langs/sr_RS/mails.lang index e5c1eb91c6a..9b2a31bd01f 100644 --- a/htdocs/langs/sr_RS/mails.lang +++ b/htdocs/langs/sr_RS/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Informacija ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/sr_RS/main.lang b/htdocs/langs/sr_RS/main.lang index d0b18b8d9f0..b5d9814035c 100644 --- a/htdocs/langs/sr_RS/main.lang +++ b/htdocs/langs/sr_RS/main.lang @@ -355,8 +355,8 @@ PriceUTTC=J.C. (bruto) Amount=Iznos AmountInvoice=Iznos računa AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Plaćeni iznos AmountHTShort=Amount (excl.) AmountTTCShort=Iznos (bruto) @@ -485,6 +485,7 @@ Categories=Tagovi/kategorije Category=Tag/kategorija By=Do From=Od +FromDate=Od FromLocation=Od to=do To=do @@ -687,6 +688,7 @@ Method=Metoda Receive=Primi CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Delimično TotalWoman=Celo NeverReceived=Nije primljena @@ -703,6 +705,7 @@ MenuECM=Dokumenti MenuAWStats=AWStats MenuMembers=Članovi MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Meni home-podešavanja-bezbednost): %s Kb, PHP limit: %s Kb NoFileFound=Nema sačuvanih dokumenata u folderu CurrentUserLanguage=Aktivni jezik @@ -725,7 +728,7 @@ Page=Strana Notes=Beleške AddNewLine=Dodaj liniju AddFile=Dodaj fajl -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Dupliraj objekat sa glavnim atributima ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=Č ShortFriday=P ShortSaturday=S ShortSunday=N +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Podesi ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Informacija +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/sr_RS/members.lang b/htdocs/langs/sr_RS/members.lang index edf0abd4c69..c00934a4e5e 100644 --- a/htdocs/langs/sr_RS/members.lang +++ b/htdocs/langs/sr_RS/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft članovi MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Potvrđen +SubscriptionNotNeeded=No subscription needed NewCotisation=Novi doprinos PaymentSubscription=Nova uplata doprinosa SubscriptionEndDate=Kraj pretplate @@ -78,7 +81,7 @@ DeleteType=Obriši VoteAllowed=Glasanje dozvoljeno Physical=Fizičko Moral=Pravno -MorPhy=Pravno/Fizičko +MorPhy=Priroda Reenable=Ponovo aktiviraj ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/sr_RS/mrp.lang b/htdocs/langs/sr_RS/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/sr_RS/mrp.lang +++ b/htdocs/langs/sr_RS/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/sr_RS/other.lang b/htdocs/langs/sr_RS/other.lang index cbafcaae166..a314caa0fb6 100644 --- a/htdocs/langs/sr_RS/other.lang +++ b/htdocs/langs/sr_RS/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/sr_RS/products.lang b/htdocs/langs/sr_RS/products.lang index 91b369bb9aa..037863591fd 100644 --- a/htdocs/langs/sr_RS/products.lang +++ b/htdocs/langs/sr_RS/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Postavi bar code BarcodeValue=Vrednost bar code NoteNotVisibleOnBill=Beleška (nije vidljiva na računima, ponudama...) ServiceLimitedDuration=Ako je proizvod usluga sa ograničenim trajanjem: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Broj cena DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Zemlja porekla Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Kratak naziv Unit=Jedinica p=j. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=Novi atribut NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/sr_RS/projects.lang b/htdocs/langs/sr_RS/projects.lang index a552711d74d..ac565c0140b 100644 --- a/htdocs/langs/sr_RS/projects.lang +++ b/htdocs/langs/sr_RS/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Saradnik TypeContact_project_task_external_TASKCONTRIBUTOR=Saradnik SelectElement=Selektiraj element AddElement=Link ka elementu +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistike na projektima/lead-ovima -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Zadatak je dodeljen. Unos vremena za ovaj zadatak je omogućen. IdTaskTime=Id vremena zadatka YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/sr_RS/recruitment.lang b/htdocs/langs/sr_RS/recruitment.lang new file mode 100644 index 00000000000..759257ea80c --- /dev/null +++ b/htdocs/langs/sr_RS/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = O +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/sr_RS/stocks.lang b/htdocs/langs/sr_RS/stocks.lang index 2f4a9a4cc65..0296f1775ce 100644 --- a/htdocs/langs/sr_RS/stocks.lang +++ b/htdocs/langs/sr_RS/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Obrii slanje Stock=Zaliha Stocks=Zalihe MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Zalihe po seriji @@ -95,14 +95,16 @@ RealStock=Realna zaliha RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Fiktivna zaliha -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id magacina DescWareHouse=Opis magacina LieuWareHouse=Lokacija magacina WarehousesAndProducts=Magacini i proizvodi WarehousesAndProductsBatchDetail=Magacini i proizvodi (sa detaljima po seriji) -AverageUnitPricePMPShort=Prosečna ulazna cena -AverageUnitPricePMP=Prosečna ulazna cena +AverageUnitPricePMPShort=Prosecna cena +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Jedinična prodajna cena EstimatedStockValueSellShort=Prodajna vrednost EstimatedStockValueSell=Prodajna vrednost @@ -141,7 +143,7 @@ Replenishments=Dopunjavanja NbOfProductBeforePeriod=Količina proizvoda %s u zalihama pre selektiranog perioda (< %s) NbOfProductAfterPeriod=Količina proizvoda %s u zalihama posle selektiranog perioda (> %s) MassMovement=Masivni promet -SelectProductInAndOutWareHouse=Izaberite proizvod, količinu, izvorni magacin, ciljani magacin i kliknite "%s". Kada su sva kretanja izvršena, kliknite "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Prijemnice za ovu narudžbinu StockMovementRecorded=Snimljeni prometi zalihe @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/sr_RS/suppliers.lang b/htdocs/langs/sr_RS/suppliers.lang index 5d6ee042aba..675f9b32f30 100644 --- a/htdocs/langs/sr_RS/suppliers.lang +++ b/htdocs/langs/sr_RS/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Neki od pod-proizvoda nemaju definisanu cenu AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=Ovaj dobavljač je već vezan za referencu: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Dostupnost -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Odobri ovu narudžbinu ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Odbij narudžbinu @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Fajl podizanja +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Podesi status "Fajl poslat" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistike po statusu linija @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Svota: %s
    Način: %s
    Datum: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Opcija za realni mod nije podešena, prekidamo posle ove simulacije. +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/sr_RS/workflow.lang b/htdocs/langs/sr_RS/workflow.lang index 1c2572bb994..e623a6593c3 100644 --- a/htdocs/langs/sr_RS/workflow.lang +++ b/htdocs/langs/sr_RS/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Podešavanja modula Workflow -WorkflowDesc=Ovaj modul je namenjen za izmene automatskih akcija u aplikaciji. Po defaultu, workflow je otvoren (možete vršiti akcije redosledom kojim poželite). Možete aktivirati automatske akcije koje Vas interesuju. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=Nema mogućih izmena workflow-a u aktiviranim modulima. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatski kreiraj fakturu klijenta posle potvrde ugovora -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatsko kriranje AutomaticClassification=Automatsko klasifikovanje diff --git a/htdocs/langs/sr_RS/zapier.lang b/htdocs/langs/sr_RS/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/sr_RS/zapier.lang +++ b/htdocs/langs/sr_RS/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/sv_SE/accountancy.lang b/htdocs/langs/sv_SE/accountancy.lang index 99ec491b21c..080f361671d 100644 --- a/htdocs/langs/sv_SE/accountancy.lang +++ b/htdocs/langs/sv_SE/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Tillåt att hantera olika antal nollor i slutet av ett bo BANK_DISABLE_DIRECT_INPUT=Inaktivera direktinspelning av transaktion i bankkonto ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Aktivera utkastexport på loggbok ACCOUNTANCY_COMBO_FOR_AUX=Aktivera kombinationslista för dotterkonto (kan vara långsamt om du har många tredje parter) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Försäljningsloggbok ACCOUNTING_PURCHASE_JOURNAL=Inköpsloggbok @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Inte avstämd ## Admin +BindingOptions=Binding options ApplyMassCategories=Applicera masskategorier AddAccountFromBookKeepingWithNoCategories=Tillgängligt konto ännu inte i den personifierade gruppen CategoryDeleted=Kategori för bokföringskonto har tagits bort diff --git a/htdocs/langs/sv_SE/admin.lang b/htdocs/langs/sv_SE/admin.lang index 27e2d4eabf7..63e36bd2c59 100644 --- a/htdocs/langs/sv_SE/admin.lang +++ b/htdocs/langs/sv_SE/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Standard avsändarmail för manuell sändning (använ UserEmail=Användar-e-post CompanyEmail=Företagets Email FeatureNotAvailableOnLinux=Funktionen inte finns på Unix-liknande system. Testa din sendmail program lokalt. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Om översättningen för detta språk inte är fullständigt eller du hittar fel kan du korrigera detta genom att redigera filer i katalogen langs / %s och skicka in din ändring till www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Om översättning för detta språk inte är fullständigt eller om du hittar fel kan du korrigera detta genom att redigera filer i katalogen langs / %s och skicka in ändrade filer på dolibarr.org/forum eller för utvecklare på github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Modul inställning ModulesSetup=Moduler / Programinställningar ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Modul %s måste aktiveras först om du behöve SecurityToken=Nyckeln till säkra webbadresser NoSmsEngine=Ingen SMS-avsändare finns tillgänglig. En SMS-avsändarhanterare är inte installerad med standarddistributionen eftersom de är beroende av en extern leverantör, men du kan hitta några på %s PDF=PDF -PDFDesc=Globala alternativ för PDF-generering. -PDFAddressForging=Regler för adresslådor +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Dölj all information om försäljningsskatt / moms PDFRulesForSalesTax=Regler för försäljningsskatt / moms PDFLocaltax=Regler för %s -HideLocalTaxOnPDF=Dölj %s-kurs i kolumnskattförsäljning +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Dölj produktbeskrivning HideRefOnPDF=Dölj produkter ref. HideDetailsOnPDF=Dölj produktlinjer detaljer @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Ändra om priser med bas referensvärde som definieras på MassConvert=Starta masskonvertering PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Lång text +TextLongNLines=Long text (n lines) HtmlText=Html-text Int=Heltal Float=Flyttal @@ -543,9 +546,9 @@ Module54Desc=Förvaltning av kontrakt (tjänster eller återkommande abonnemang) Module55Name=Streckkoder Module55Desc=Barcode ledning Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bankdirektbetalningar -Module57Desc=Förvaltning av direktbetalningsorder. Det omfattar generering av SEPA-fil för europeiska länder. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integrering av ett ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Skapa / modifiera tjänster Permission534=Ta bort tjänster Permission536=Se / Hantera dolda tjänster Permission538=Exportera tjänster +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Läs donationer Permission702=Skapa / ändra donationer Permission703=Ta bort donationer @@ -848,6 +858,8 @@ Permission773=Radera räkningar Permission774=Läs alla utgiftsrapporter (även för användare som inte underordnade) Permission775=Godkänn räkningar Permission776=Betala räkningar +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export räkningar Permission1001=Läs lager Permission1002=Skapa / ändra lager @@ -900,6 +912,7 @@ Permission2515=Setup dokument kataloger Permission2801=Använd FTP-klient i läsläge (bläddra och ladda endast) Permission2802=Använd FTP-klient i skrivläge (radera eller ladda upp filer) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Ta bort resurser Permission63004=Länka resurser till agendahändelser DictionaryCompanyType=Tredjepartstyper DictionaryCompanyJuridicalType=Tredjeparts juridiska personer -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Stater / Provinser DictionaryRegion=Regioner DictionaryCountry=Länder @@ -977,7 +991,8 @@ DictionaryEMailTemplates=E-postmallar DictionaryUnits=Enheter DictionaryMeasuringUnits=Mätningsenheter DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Typer av ledighet DictionaryOpportunityStatus=Ledningsstatus för projekt / ledning DictionaryExpenseTaxCat=Kostnadsrapport - Transportkategorier @@ -1076,7 +1091,7 @@ LoginPage=Login sida BackgroundImageLogin=Bakgrundsbild PermanentLeftSearchForm=Permanent sökformuläret på menyn till vänster DefaultLanguage=Standardspråk -EnableMultilangInterface=Aktivera flerspråkigt stöd +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Företag / Organisation CompanyIds=Företag / Organisationsidentiteter @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=En sökkriterium krävs åtminstone för NewTranslationStringToShow=Ny översättningssträng att visa OriginalValueWas=Den ursprungliga översättningen överskridits. Ursprungligt värde var:

    %s TransKeyWithoutOriginalValue=Du tvingade en ny översättning till översättningsnyckeln ' %s ' som inte finns i några språkfiler -TotalNumberOfActivatedModules=Aktiverad applikation / moduler: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Minst 1 modul måste aktiveras ClassNotFoundIntoPathWarning=Klass %s hittades inte i PHP-sökvägen YesInSummer=Ja, under sommaren @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Använd händelsetyper (hanteras i menyn Inställningar -> AGENDA_USE_EVENT_TYPE_DEFAULT=Ställ in det här standardvärdet för typ av händelse automatiskt i händelse skapa formulär AGENDA_DEFAULT_FILTER_TYPE=Ställ in denna typ av händelse automatiskt i sökfiltret i kalendervy AGENDA_DEFAULT_FILTER_STATUS=Ställ in denna status automatiskt för händelser i sökfilter i dagordning -AGENDA_DEFAULT_VIEW=Vilken flik vill du öppna som standard vid val av meny Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Aktivera händelsepåminnelse via e-postmeddelanden (påminnelse alternativ / fördröjning kan definieras på varje händelse). Obs! Modul %s måste vara aktiverad och korrekt inställd för att få påminnelse skickad med rätt frekvens. AGENDA_REMINDER_BROWSER=Aktivera händelsepåminnelse på användarens webbläsare (när händelsedatum har uppnåtts kan varje användare neka det från webbläsarbekräftelsespåfrågan) AGENDA_REMINDER_BROWSER_SOUND=Aktivera ljudanmälan @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Visa länkat objekt i agendan ##### Clicktodial ##### ClickToDialSetup=Klicka för att Dial modul inställning ClickToDialUrlDesc=Url ringde när ett klick på telefon picto är gjort. I URL kan du använda taggar
    __PHONETO__ som kommer att ersättas med telefonnumret person att ringa
    __PHONEFROM__ som kommer att ersättas med telefonnummer att ringa person (er)
    __LOGIN__ som kommer att ersättas med clicktodial inloggning (definierad på användarkort)
    __PASS__ som kommer att ersättas med clicktodial lösenord (definierat på användarkort). -ClickToDialDesc=Denna modul gör telefonnummer till klickbara länkar. Ett klick på ikonen kommer att göra ditt telefonsamtal till numret. Detta kan användas för att ringa ett call center-system från Dolibarr som exempelvis kan ringa telefonnumret på ett SIP-system. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Använd bara en länk "tel:" på telefonnummer ClickToDialUseTelLinkDesc=Använd den här metoden om användarna har en mjukvara eller ett programgränssnitt installerat på samma dator som webbläsaren och ringde när du klickar på en länk i din webbläsare som börjar med "tel:". Om du behöver en fullständig serverlösning (inget behov av lokal programinstallation) måste du ange detta till "Nej" och fylla i nästa fält. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Detta fält innehåller en hänvisning till identifiera linje. Ange Enter0or1=Enter 0 or 1 UnicodeCurrency=Ange här mellan hållare, lista med byte nummer som representerar valutasymbolen. Till exempel: för $, skriv [36] - för brazil real R $ [82,36] - för €, skriv [8364] ColorFormat=RGB-färgen är i HEX-format, t.ex.: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line i kombinationslistor SellTaxRate=Försäljning skattesats RecuperableOnly=Ja för moms "Ej uppfattad men återställbar" tillägnad vissa stater i Frankrike. Håll värdet till "Nej" i alla andra fall. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Offertförfrågan MailToSendSupplierOrder=Beställning MailToSendSupplierInvoice=Leverantörsfakturor MailToSendContract=Kontrakt +MailToSendReception=Receptions MailToThirdparty=Tredje part MailToMember=Medlemmar MailToUser=Användare @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s är tillgänglig. Vers ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s är tillgänglig. Version %s är en underhållsversion, så innehåller bara buggfixar. Vi rekommenderar alla användare att uppgradera till den här versionen. En underhållsutgivning introducerar inte nya funktioner eller ändringar i databasen. Du kan hämta det från hämtningsområdet på https://www.dolibarr.org portal (underkatalog Stabila versioner). Du kan läsa ChangeLog för fullständig lista över ändringar. MultiPriceRuleDesc=När alternativet "Flera prisnivåer per produkt / tjänst" är aktiverat kan du definiera olika priser (en per prisnivå) för varje produkt. För att spara tid kan du här ange en regel för att autokaluta ett pris för varje nivå baserat på priset på första nivån, så du måste bara ange ett pris för första nivån för varje produkt. Den här sidan är utformad för att spara tid, men är endast användbar om dina priser för varje nivå är i förhållande till första nivån. Du kan ignorera den här sidan i de flesta fall. ModelModulesProduct=Mallar för produktdokument +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=För att kunna generera koder automatiskt måste du först definiera en chef för att automatiskt definiera streckkodsnumret. SeeSubstitutionVars=Se * anteckning för lista över möjliga substitutionsvariabler SeeChangeLog=Se ChangeLog-fil (endast på engelska) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Vänster marginal på PDF MAIN_PDF_MARGIN_RIGHT=Höger marginal på PDF MAIN_PDF_MARGIN_TOP=Toppmarginal på PDF MAIN_PDF_MARGIN_BOTTOM=Bottenmarginal på PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Det finns ingen specifik inställning som krävs för den här modulen. SetToYesIfGroupIsComputationOfOtherGroups=Ställ det här på ja om den här gruppen är en beräkning av andra grupper EnterCalculationRuleIfPreviousFieldIsYes=Ange beräkningsregel om föregående fält satt till Ja (till exempel "CODEGRP1 + CODEGRP2") @@ -1933,13 +1953,14 @@ NothingProcessed=Inget gjort XEmailsDoneYActionsDone=%s e-postadresser kvalificerade, %s e-postmeddelanden som bearbetats framgångsrikt (för %s-post / åtgärder gjorda) RecordEvent=Spela in e-post händelse CreateLeadAndThirdParty=Skapa ledning (och tredje part om det behövs) -CreateTicketAndThirdParty=Skapa biljett (och tredje part om det behövs) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Senaste resultatkoden NbOfEmailsInInbox=Antal e-postmeddelanden i källkatalogen LoadThirdPartyFromName=Ladda tredjepartsökning på %s (endast belastning) LoadThirdPartyFromNameOrCreate=Ladda tredjepartsökning på %s (skapa om ej hittad) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menyinmatningskod (huvudmeny) ECMAutoTree=Visa automatiskt ECM-träd @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unikt ID för förekomsten SmallerThan=Mindre än LargerThan=Större än -IfTrackingIDFoundEventWillBeLinked=Observera att Om ett spårnings-ID finns i inkommande e-post, kopplas händelsen automatiskt till relaterade objekt. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Med ett GMail-konto, om du aktiverade valet av 2 steg, rekommenderas att du skapar ett dedikerat andra lösenord för programmet istället för att använda ditt eget lösenordsord från https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/sv_SE/agenda.lang b/htdocs/langs/sv_SE/agenda.lang index cbac9b54ce2..d533547fea8 100644 --- a/htdocs/langs/sv_SE/agenda.lang +++ b/htdocs/langs/sv_SE/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Antal händelser ListOfActions=Lista över evenemang EventReports=Händelsesrapporter Location=Läge -ToUserOfGroup=Till vilken som helst användare i grupp +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Händelse heldag MenuToDoActions=Alla ofullständiga handlingar MenuDoneActions=Alla avslutade åtgärder @@ -86,6 +86,8 @@ ProposalDeleted=Förslag raderad OrderDeleted=Order raderad InvoiceDeleted=Faktura raderad DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Produkt %s skapad PRODUCT_MODIFYInDolibarr=Produkt %s modified PRODUCT_DELETEInDolibarr=Produkt %s raderad @@ -158,3 +160,9 @@ DateStartPlusOne=Startdatum +1 timma SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/sv_SE/boxes.lang b/htdocs/langs/sv_SE/boxes.lang index c907e5b5342..8de035e3c7b 100644 --- a/htdocs/langs/sv_SE/boxes.lang +++ b/htdocs/langs/sv_SE/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Senaste %s inspelade leverantörerna BoxTitleLastModifiedSuppliers=Leverantörer: senaste %s modifierad BoxTitleLastModifiedCustomers=Kunder: senaste %s modifierad BoxTitleLastCustomersOrProspects=Senaste %s kunder eller framtidsutsikter -BoxTitleLastCustomerBills=Senaste %s Kundfakturor -BoxTitleLastSupplierBills=Senaste %s Leverantörsfakturor +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Utsikter: senaste %s modifierad BoxTitleLastModifiedMembers=Senaste %s medlemmarna BoxTitleLastFicheInter=Senaste %s modifierade interventioner @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Leverantörsorder: senaste %s modifierad BoxTitleLastModifiedCustomerBills=Kundfaktura: senaste %s modifierad BoxTitleLastModifiedCustomerOrders=Försäljningsorder: senaste %s modifierad BoxTitleLastModifiedPropals=Senaste %s ändrade förslag +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Kundens fakturor ForCustomersOrders=Kund beställningar ForProposals=Förslag @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Redovisning diff --git a/htdocs/langs/sv_SE/cashdesk.lang b/htdocs/langs/sv_SE/cashdesk.lang index bebdd7dc8ef..de64394d96b 100644 --- a/htdocs/langs/sv_SE/cashdesk.lang +++ b/htdocs/langs/sv_SE/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/sv_SE/compta.lang b/htdocs/langs/sv_SE/compta.lang index defa9852e23..481d0ead328 100644 --- a/htdocs/langs/sv_SE/compta.lang +++ b/htdocs/langs/sv_SE/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social eller skattemässig skatt SocialContributions=Sociala eller skattemässiga skatter SocialContributionsDeductibles=Avdragsgilla sociala eller skattemässiga skatter SocialContributionsNondeductibles=Avdragsgilla sociala eller skattemässiga skatter +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Etikettbidrag TypeContrib=Typbidrag MenuSpecialExpenses=Särskilda kostnader @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/sv_SE/contracts.lang b/htdocs/langs/sv_SE/contracts.lang index c78159a876b..eee5cd0c1f1 100644 --- a/htdocs/langs/sv_SE/contracts.lang +++ b/htdocs/langs/sv_SE/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Löpande tjänster MenuExpiredServices=Utlöpta tjänster MenuClosedServices=Stängda tjänster NewContract=Nytt kontrakt -NewContractSubscription=Nytt kontrakt / prenumeration +NewContractSubscription=New contract or subscription AddContract=Skapa kontrakt DeleteAContract=Ta bort ett kontrakt ActivateAllOnContract=Aktivera alla tjänster diff --git a/htdocs/langs/sv_SE/errors.lang b/htdocs/langs/sv_SE/errors.lang index 091e7c707a2..feca0db02b2 100644 --- a/htdocs/langs/sv_SE/errors.lang +++ b/htdocs/langs/sv_SE/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Nytt värde kan inte vara lika med gamla ErrorFailedToValidatePasswordReset=Det gick inte att REINIT lösenord. Kan vara reinit var redan gjort (den här länken kan bara användas en gång). Om inte, försök att starta om reinit processen. ErrorToConnectToMysqlCheckInstance=Anslut till databasen misslyckas. Kontrollera databaseserveren körs (till exempel med mysql / mariadb kan du starta det från kommandoraden med "sudo service mysql start"). ErrorFailedToAddContact=Det gick inte att lägga till kontakt -ErrorDateMustBeBeforeToday=Datumet kan inte vara större än idag +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Ett betalningsläge var inställt för att skriva %s, men installationen av modulens faktura fördes inte att definiera informationen som ska visas för den här betalningsläget. ErrorPHPNeedModule=Fel, din PHP måste ha modul %s installerad för att använda den här funktionen. ErrorOpenIDSetupNotComplete=Du inställning för Dolibarr konfigurationsfil möjliggör OpenID autentisering, men webbadressen OpenID tjänsten definieras inte i ständig %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=Ett lösenord har ställts för den här medlemmen. Men inget användarkonto skapades. Så det här lösenordet är lagrat men kan inte användas för att logga in till Dolibarr. Den kan användas av en extern modul / gränssnitt men om du inte behöver definiera någon inloggning eller ett lösenord för en medlem kan du inaktivera alternativet "Hantera en inloggning för varje medlem" från inställningen av medlemsmodulen. Om du behöver hantera en inloggning men inte behöver något lösenord, kan du hålla fältet tomt för att undvika denna varning. Obs! Email kan också användas som inloggning om medlemmen är länkad till en användare. diff --git a/htdocs/langs/sv_SE/languages.lang b/htdocs/langs/sv_SE/languages.lang index 9a4ffa4c3ad..8948b5489e8 100644 --- a/htdocs/langs/sv_SE/languages.lang +++ b/htdocs/langs/sv_SE/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabiska Language_ar_EG=Arabiska (egypten) Language_ar_SA=Arabiskt +Language_az_AZ=Azerbaijani Language_bn_BD=Bengaliska +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgariska Language_bs_BA=Bosniska Language_ca_ES=Katalanska @@ -20,6 +23,7 @@ Language_en_GB=Engelska (Storbritannien) Language_en_IN=Engelska (Indien) Language_en_NZ=Engelska (Nya Zeeland) Language_en_SA=Engelska (Saudiarabien) +Language_en_SG=English (Singapore) Language_en_US=Engelska (USA) Language_en_ZA=Engelska (Sydafrika) Language_es_ES=Spanska @@ -29,6 +33,7 @@ Language_es_CL=Spanska (Chile) Language_es_CO=Spanska (Colombia) Language_es_DO=Spanska (Dominikanska republiken) Language_es_EC=Spanska (ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanska (Honduras) Language_es_MX=Spanska (Mexiko) Language_es_PA=Spanska (panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanska (Paraguay) Language_es_PE=Spanska (Peru) Language_es_PR=Spanska (Puerto Rico) Language_es_UY=Spanska (uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanska (Venezuela) Language_et_EE=Estniska Language_eu_ES=Baskiska @@ -44,15 +50,22 @@ Language_fi_FI=finsk Language_fr_BE=Franska (Belgien) Language_fr_CA=Franska (Kanada) Language_fr_CH=Franska (Schweiz) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Franska +Language_fr_GA=French (Gabon) Language_fr_NC=Franska (Nya Kaledonien) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisiska +Language_gl_ES=Galician Language_he_IL=Hebreiska +Language_hi_IN=Hindi (India) Language_hr_HR=Kroatiska Language_hu_HU=Ungerska Language_id_ID=Indonesiska Language_is_IS=Isländska Language_it_IT=Italienska +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanska Language_ka_GE=Gregorianska Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Lettländska Language_mk_MK=Makedonska Language_mn_MN=mongoliska Language_nb_NO=Norska (bokmål) +Language_ne_NP=Nepali Language_nl_BE=Holländska (Belgien) Language_nl_NL=Dutch Language_pl_PL=Polska @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbekiska Language_vi_VN=Vietnamesiska Language_zh_CN=Kinesiska Language_zh_TW=Kinesiska (traditionell) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/sv_SE/mails.lang b/htdocs/langs/sv_SE/mails.lang index 0ba4ba088f7..ae4c2707259 100644 --- a/htdocs/langs/sv_SE/mails.lang +++ b/htdocs/langs/sv_SE/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Standard utgående e-postinstallation Information=Information ContactsWithThirdpartyFilter=Kontakter med filter från tredje part +Unanswered=Unanswered +Answered=Besvarade +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/sv_SE/main.lang b/htdocs/langs/sv_SE/main.lang index e24889a2687..a87178c34c9 100644 --- a/htdocs/langs/sv_SE/main.lang +++ b/htdocs/langs/sv_SE/main.lang @@ -355,8 +355,8 @@ PriceUTTC=UPP. (inkl. skatt) Amount=Belopp AmountInvoice=Fakturabelopp AmountInvoiced=Belopp fakturerat -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Betalningsbelopp AmountHTShort=Belopp (exkl.) AmountTTCShort=Belopp (inkl. moms) @@ -485,6 +485,7 @@ Categories=Taggar / kategorier Category=Tag / kategori By=Genom att From=Från +FromDate=Från FromLocation=Från to=till To=till @@ -687,6 +688,7 @@ Method=Metod Receive=Ta emot CompleteOrNoMoreReceptionExpected=Komplet eller inget mer förväntat ExpectedValue=Förväntat värde +ExpectedQty=Expected Qty PartialWoman=Partiell TotalWoman=Totalt NeverReceived=Aldrig fick @@ -703,6 +705,7 @@ MenuECM=Dokument MenuAWStats=AWStats MenuMembers=Medlemmar MenuAgendaGoogle=Google dagordning +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr gräns (meny hem-inställning-säkerhet): %s Kb, PHP gräns: %s Kb NoFileFound=Inga dokument har sparats i denhär katalogen CurrentUserLanguage=Nuvarande språk @@ -725,7 +728,7 @@ Page=Sida Notes=Anteckningar AddNewLine=Lägg till ny rad AddFile=Lägg till fil -FreeZone=Inte en fördefinierad produkt / tjänst +FreeZone=Free-text product FreeLineOfType=Fri text text, typ: CloneMainAttributes=Klona objekt med dess viktigaste attribut ReGeneratePDF=Återskapa PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Välj en e-postmall SetRef=Set ref Select2ResultFoundUseArrows=Några resultat hittades. Använd pilarna för att välja. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/sv_SE/members.lang b/htdocs/langs/sv_SE/members.lang index 1c6b81dbaac..e9173cd227d 100644 --- a/htdocs/langs/sv_SE/members.lang +++ b/htdocs/langs/sv_SE/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Avslutad medlem MemberStatusResiliatedShort=Avslutad MembersStatusToValid=Förslag medlemmar MembersStatusResiliated=Avslutade medlemmar +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Bekräftade +SubscriptionNotNeeded=No subscription needed NewCotisation=Nya bidrag PaymentSubscription=Nya bidrag betalning SubscriptionEndDate=Prenumeration slutdatum @@ -78,7 +81,7 @@ DeleteType=Ta bort VoteAllowed=Röstning tillåten Physical=Fysisk Moral=Moral -MorPhy=Moral / Fysisk +MorPhy=Naturen Reenable=Återaktivera ResiliateMember=Avsluta en medlem ConfirmResiliateMember=Är du säker på att du vill säga upp den här medlemmen? diff --git a/htdocs/langs/sv_SE/mrp.lang b/htdocs/langs/sv_SE/mrp.lang index 2535d0f33b8..c17d2ea60a6 100644 --- a/htdocs/langs/sv_SE/mrp.lang +++ b/htdocs/langs/sv_SE/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP-område MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/sv_SE/other.lang b/htdocs/langs/sv_SE/other.lang index 2207add9c61..15add067b10 100644 --- a/htdocs/langs/sv_SE/other.lang +++ b/htdocs/langs/sv_SE/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hej)__\n\nVänligen hitta vår bestäl PredefinedMailContentSendSupplierInvoice=__(Hej)__\n\nVänligen hitta faktura __REF__ bifogad\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hej)__\n\nVänligen hitta frakt __REF__ bifogad\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hej)__\n\nVänligen hitta intervention __REF__ bifogad\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hej)__\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hej)__\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hej)__\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Du kan klicka på länken nedan för att göra din betalning om den inte redan är klar.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hej)__\n\n\n__(Vänliga hälsningar)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr är en kompakt ERP / CRM som stöder flera affärsmoduler. En demo som visar alla moduler ger ingen mening eftersom detta scenario aldrig uppstår (flera hundra tillgängliga). Det finns därför flera demoprofiler tillgängliga. ChooseYourDemoProfil=Välj den demoprofil som bäst passar dina behov ... ChooseYourDemoProfilMore=... eller bygg din egen profil
    (manuellt modulval) @@ -280,7 +278,9 @@ LinesToImport=Rader att importera MemoryUsage=Minnesanvändning RequestDuration=Varaktighet för förfrågan +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/sv_SE/products.lang b/htdocs/langs/sv_SE/products.lang index 596c490e151..3ba8d873a03 100644 --- a/htdocs/langs/sv_SE/products.lang +++ b/htdocs/langs/sv_SE/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Ställ streckkodstypblock BarcodeValue=Barcode värde NoteNotVisibleOnBill=Obs (ej synlig på fakturor, förslag ...) ServiceLimitedDuration=Om produkten är en tjänst med begränsad varaktighet: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Flera prissegment per produkt / tjänst (varje kund är i ett prissegment) MultiPricesNumPrices=Antal pris DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Leverantörspriser (av produkter eller tjän CustomCode=Tull / Varu / HS-kod CountryOrigin=Ursprungsland Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Kort etikett Unit=Enhet p=u. @@ -359,6 +362,9 @@ SelectCombination=Välj kombination ProductCombinationGenerator=Varianter generator Features=Funktioner PriceImpact=Prispåverkan +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Viktpåverkan NewProductAttribute=Nya attribut NewProductAttributeValue=Nytt attributvärde diff --git a/htdocs/langs/sv_SE/projects.lang b/htdocs/langs/sv_SE/projects.lang index 10bb95319e2..e07fe348437 100644 --- a/htdocs/langs/sv_SE/projects.lang +++ b/htdocs/langs/sv_SE/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Bidragsgivare TypeContact_project_task_external_TASKCONTRIBUTOR=Bidragsgivare SelectElement=Välj elementet AddElement=Länk till inslag +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Projektdokumentmall för översikt över länkade objekt DocumentModelBaleine=Projektdokumentmall för uppgifter @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Antal skapade projekt per månad ProjectNbTaskByMonth=Antal skapade uppgifter per månad ProjectOppAmountOfProjectsByMonth=Antalet leder per månad ProjectWeightedOppAmountOfProjectsByMonth=Viktad mängd ledningar per månad -ProjectOpenedProjectByOppStatus=Öppna projekt / ledning med blystatus -ProjectsStatistics=Statistik över projekt / ledningar -TasksStatistics=Statistik över projekt / ledningsuppgifter +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Uppgift som tilldelats. Det är möjligt att ange tid på denna uppgift. IdTaskTime=Id uppgiftstid YouCanCompleteRef=Om du vill slutföra referensnumret med något suffix rekommenderas det att lägga till ett - tecken för att skilja det, så den automatiska numreringen fungerar fortfarande korrekt för nästa projekt. Till exempel %s-MYSUFFIX diff --git a/htdocs/langs/sv_SE/recruitment.lang b/htdocs/langs/sv_SE/recruitment.lang new file mode 100644 index 00000000000..7e226c674aa --- /dev/null +++ b/htdocs/langs/sv_SE/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = inställningar +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Om +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/sv_SE/stocks.lang b/htdocs/langs/sv_SE/stocks.lang index 927d753451b..5a3db05040a 100644 --- a/htdocs/langs/sv_SE/stocks.lang +++ b/htdocs/langs/sv_SE/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Radera sändning Stock=Lager Stocks=Lager MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Lager per lot / seriell @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Fysisk / reell lager är beståndet för närvarande i lagerlokalerna. RealStockWillAutomaticallyWhen=Den reala beståndet kommer att ändras enligt denna regel (enligt definitionen i Stock-modulen): VirtualStock=Virtuellt lager -VirtualStockDesc=Virtuellt lager är det beräknade lagret tillgängligt när alla öppna / pågående åtgärder (som påverkar lagerposterna) är stängda (inköpsorder mottagna, beställda leveransorder etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id lager DescWareHouse=Beskrivning lager LieuWareHouse=Lokalisering lager WarehousesAndProducts=Lager och produkter WarehousesAndProductsBatchDetail=Lager och produkter (med detaljer per lot / serie) -AverageUnitPricePMPShort=Vägt genomsnittligt inpris -AverageUnitPricePMP=Vägt genomsnittligt inpris +AverageUnitPricePMPShort=Vägda genomsnittliga priset +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Säljpris per styck EstimatedStockValueSellShort=Värde för försäljning EstimatedStockValueSell=Värde för försäljning @@ -141,7 +143,7 @@ Replenishments=Påfyllningar NbOfProductBeforePeriod=Antal av produkt %s i lager före vald period (< %s) NbOfProductAfterPeriod=Antal av produkt %s i lager efter vald period (> %s) MassMovement=Massrörelse -SelectProductInAndOutWareHouse=Välj produkt, antal, ursprungslager och mållager och klicka "%s". När det är gjort för alla lageröverföringar klicka på "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Spela in överföring ReceivingForSameOrder=Kvitton för denna beställning StockMovementRecorded=Sparade lageröverföringar @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/sv_SE/suppliers.lang b/htdocs/langs/sv_SE/suppliers.lang index 639be70feed..48307b7ac94 100644 --- a/htdocs/langs/sv_SE/suppliers.lang +++ b/htdocs/langs/sv_SE/suppliers.lang @@ -24,7 +24,7 @@ Availability=Tillgänglighet ExportDataset_fournisseur_1=Leverantörsfaktura och faktura detaljer ExportDataset_fournisseur_2=Leverantörsfakturor och betalningar ExportDataset_fournisseur_3=Beställningar och beställningsuppgifter -ApproveThisOrder=Godkänna denna ordning +ApproveThisOrder=Godkänna denna order ConfirmApproveThisOrder=Är du säker på att du vill godkänna beställningen %s ? DenyingThisOrder=Neka denna order ConfirmDenyingThisOrder=Är du säker på att du vill neka denna order %s ? @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Låg kvalitet ReputationForThisProduct=Rykte BuyerName=Köparens namn AllProductServicePrices=Alla produkt- / servicepriser -AllProductReferencesOfSupplier=Alla produkt / service referenser av säljaren +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Leverantörspriser diff --git a/htdocs/langs/sv_SE/ticket.lang b/htdocs/langs/sv_SE/ticket.lang index 9b5d532352e..860b4453738 100644 --- a/htdocs/langs/sv_SE/ticket.lang +++ b/htdocs/langs/sv_SE/ticket.lang @@ -72,7 +72,6 @@ Deleted=Raderade # Dict Type=Typ -Category=Analytisk kod Severity=Allvarlighet # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Tilldela automatiskt användaren som skapade biljetten TicketsAutoAssignTicketHelp=När du skapar en biljett kan användaren automatiskt tilldelas biljetten. TicketNumberingModules=Biljettnummermodul TicketNotifyTiersAtCreation=Meddela tredje part vid skapandet -TicketGroup=Grupp TicketsDisableCustomerEmail=Avaktivera alltid e-postmeddelanden när en biljett skapas från det offentliga gränssnittet TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Skapad av NewTicket=Ny biljett SubjectAnswerToTicket=Biljettsvar TicketTypeRequest=Förfrågan typ -TicketCategory=Analytisk kod +TicketCategory=Grupp SeeTicket=Se biljett TicketMarkedAsRead=Biljett har markerats som läst TicketReadOn=Läs vidare diff --git a/htdocs/langs/sv_SE/users.lang b/htdocs/langs/sv_SE/users.lang index 36c4c77529d..40d07f9c39b 100644 --- a/htdocs/langs/sv_SE/users.lang +++ b/htdocs/langs/sv_SE/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Skapad användare kommer att vara en extern användare (e IdPhoneCaller=Id telefonen ringer NewUserCreated=Användare %s skapade NewUserPassword=Ändring av lösenord för %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Användare %s modifierade UserDisabled=Användare %s funktionshindrade UserEnabled=Användare %s aktiverad @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Inaktiverad i underhållsläge UserAccountancyCode=Användarkonto UserLogoff=Användarutloggning UserLogged=Användare loggad +DateOfEmployment=Employment date DateEmployment=Anställningens startdatum DateEmploymentEnd=Anställningens slutdatum CantDisableYourself=Du kan inte inaktivera din egen användarrekord @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/sv_SE/withdrawals.lang b/htdocs/langs/sv_SE/withdrawals.lang index 97b505f90ab..4b18e747ab8 100644 --- a/htdocs/langs/sv_SE/withdrawals.lang +++ b/htdocs/langs/sv_SE/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direkt debiteringsorder WithdrawalReceipt=Direkt debitering -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Senaste %s direkt debit-filer @@ -63,7 +63,9 @@ InvoiceRefused=Faktura vägrade (Ladda avslag till kunden) StatusDebitCredit=Statusavgift / kredit StatusWaiting=Väntar StatusTrans=Överförs +StatusDebited=Debited StatusCredited=Krediteras +StatusPaid=Betald StatusRefused=Refused StatusMotif0=Ospecificerat StatusMotif1=Bestämmelse insuffisante @@ -77,13 +79,13 @@ StatusMotif8=Annan orsak CreateForSepaFRST=Skapa direkt debitfil (SEPA FRST) CreateForSepaRCUR=Skapa direkt debitfil (SEPA RCUR) CreateAll=Skapa direkt debitfil (alla) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Endast kontor CreateBanque=Endast bank OrderWaiting=Plats för en ny behandling -NotifyTransmision=Återkallelse Transmission -NotifyCredit=Återkallelse Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Nationella sändare Antal WithBankUsingRIB=För bankkonton med hjälp av RIB WithBankUsingBANBIC=För bankkonton som använder IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Krediter på WithdrawalFileNotCapable=Det går inte att skapa uttags kvitto fil för ditt land %s (ditt land stöds inte) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Utträde fil +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Ställ in på status "File Skickat" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistik efter status linjer @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Typ av betalning ModeRECUR=Återkommande betalning ModeFRST=Engångsbetalning PleaseCheckOne=Vänligen kolla en enda +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direkt debitering %s skapad AmountRequested=Belopp som begärs SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Belopp: %s
    Metode: %s
    Datum: %s InfoRejectSubject=Betalningsordern vägrade InfoRejectMessage=Hej,

    Betalningsordern för fakturan %s relaterad till företaget %s, med ett belopp på %s, har vägrats av banken.

    -
    %s ModeWarning=Alternativ på riktigt läget inte var satt, sluta vi efter denna simulering +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/sv_SE/workflow.lang b/htdocs/langs/sv_SE/workflow.lang index 2322ac0dbcd..6ae9ed67c3b 100644 --- a/htdocs/langs/sv_SE/workflow.lang +++ b/htdocs/langs/sv_SE/workflow.lang @@ -5,16 +5,19 @@ ThereIsNoWorkflowToModify=Det finns inga arbetsflödesändringar tillgängliga m # Autocreate descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Skapa automatiskt en försäljningsorder när ett kommersiellt förslag är undertecknat (den nya ordern kommer att ha samma belopp som förslaget) descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Skapa automatiskt en kundfaktura efter att ett kommersiellt förslag har skrivits (den nya fakturan kommer att ha samma belopp som förslaget) -descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Skapa automatiskt en kundfaktura efter att ett kontrakt är validerat +descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Skapa automatiskt en kundfaktura efter att ett kontrakt är bekräftat descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Skapa en kundfaktura automatiskt efter att en order har stängts (den nya fakturan kommer att ha samma belopp som beställningen) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Klassificera länkad källans förslag som fakturerad när försäljningsordern är inställd att faktureras (och om orderens storlek är densamma som det totala beloppet för det signerade länkade förslaget) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Klassificera länkad källans förslag som fakturerad när kundfakturan är validerad (och om fakturans belopp är samma som det totala beloppet för det signerade länkade förslaget) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Klassificera länkad källsäljorder som fakturerad när kundfaktura är validerad (och om fakturans storlek är densamma som totalbeloppet för den länkade ordern) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Klassificera länkad källsäljorder som fakturerad när kundfaktura är inställd att betala (och om fakturans storlek är densamma som totalbeloppet för den länkade ordern) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Klassificera länkad källsäljningsorder som skickas när en försändelse är validerad (och om den mängd som skickas av alla leveranser är densamma som i den ordning som ska uppdateras) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Märk det länkade källoffert som fakturerad när försäljningsordern är märkt fakturerad (och om orderens storlek är densamma som det totala beloppet för det signerade länkade förslaget) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Märk länkad källans förslag som fakturerad när kundfakturan är bekräftat (och om fakturans belopp är samma som det totala beloppet för det signerade länkade förslaget) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Märk länkad källsäljorder som fakturerad när kundfaktura är bekräftat (och om fakturans storlek är densamma som totalbeloppet för den länkade ordern) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Märk länkad källsäljorder som fakturerad när kundfaktura är inställd att betala (och om fakturans storlek är densamma som totalbeloppet för den länkade ordern) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Märk länkad källsäljningsorder som skickas när en försändelse är bekräftat (och om den mängd som skickas av alla leveranser är densamma som i den ordning som ska uppdateras) # Autoclassify purchase order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Klassificera länkad källleverantörsförslag som fakturerat när leverantörsfaktura är validerad (och om fakturans storlek är densamma som det totala beloppet för det länkade förslaget) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Klassificera kopplad inköpsorder som fakturerad när leverantörsfaktura är validerad (och om fakturans storlek är densamma som totalbeloppet för den länkade ordern) +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Märk länkad källleverantörsförslag som fakturerat när leverantörsfaktura är bekräftat (och om fakturans storlek är densamma som det totala beloppet för det länkade förslaget) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Märk kopplad inköpsorder som fakturerad när leverantörsfaktura är bekräftat (och om fakturans storlek är densamma som totalbeloppet för den länkade ordern) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatisk skapande -AutomaticClassification=Automatisk klassificering +AutomaticClassification=Automatisk uppmärkning diff --git a/htdocs/langs/sv_SE/zapier.lang b/htdocs/langs/sv_SE/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/sv_SE/zapier.lang +++ b/htdocs/langs/sv_SE/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/sw_SW/accountancy.lang b/htdocs/langs/sw_SW/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/sw_SW/accountancy.lang +++ b/htdocs/langs/sw_SW/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/sw_SW/admin.lang b/htdocs/langs/sw_SW/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/sw_SW/admin.lang +++ b/htdocs/langs/sw_SW/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/sw_SW/agenda.lang b/htdocs/langs/sw_SW/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/sw_SW/agenda.lang +++ b/htdocs/langs/sw_SW/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/sw_SW/boxes.lang b/htdocs/langs/sw_SW/boxes.lang index 8fe1f84b149..d6fd298a3a7 100644 --- a/htdocs/langs/sw_SW/boxes.lang +++ b/htdocs/langs/sw_SW/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/sw_SW/cashdesk.lang b/htdocs/langs/sw_SW/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/sw_SW/cashdesk.lang +++ b/htdocs/langs/sw_SW/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/sw_SW/compta.lang b/htdocs/langs/sw_SW/compta.lang index 6cd046c5607..8f4f058bb87 100644 --- a/htdocs/langs/sw_SW/compta.lang +++ b/htdocs/langs/sw_SW/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/sw_SW/contracts.lang b/htdocs/langs/sw_SW/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/sw_SW/contracts.lang +++ b/htdocs/langs/sw_SW/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/sw_SW/errors.lang b/htdocs/langs/sw_SW/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/sw_SW/errors.lang +++ b/htdocs/langs/sw_SW/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/sw_SW/languages.lang b/htdocs/langs/sw_SW/languages.lang index 5caf207f1fa..ee8df25c9ec 100644 --- a/htdocs/langs/sw_SW/languages.lang +++ b/htdocs/langs/sw_SW/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Kiarabu Language_ar_EG=Arabic (Egypt) Language_ar_SA=Kiarabu +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Kikatalani @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (Afrika Kusini) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Kihispania (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Kihispania (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Kihispania (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=Kifaransa (Ubelgiji) Language_fr_CA=Kifaransa (Canada) Language_fr_CH=Kifaransa (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Kifaransa +Language_fr_GA=French (Gabon) Language_fr_NC=Kifaransa (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Kiebrania +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Kiaislandi Language_it_IT=Italia +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japan Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norway (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Uholanzi (Ubelgiji) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Kivietinamu Language_zh_CN=Kichina Language_zh_TW=Kichina (cha Jadi) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/sw_SW/mails.lang b/htdocs/langs/sw_SW/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/sw_SW/mails.lang +++ b/htdocs/langs/sw_SW/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/sw_SW/main.lang b/htdocs/langs/sw_SW/main.lang index adbc443198f..0af5c66f0e0 100644 --- a/htdocs/langs/sw_SW/main.lang +++ b/htdocs/langs/sw_SW/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/sw_SW/members.lang b/htdocs/langs/sw_SW/members.lang index 5886c598d52..5ef946ddf67 100644 --- a/htdocs/langs/sw_SW/members.lang +++ b/htdocs/langs/sw_SW/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/sw_SW/mrp.lang b/htdocs/langs/sw_SW/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/sw_SW/mrp.lang +++ b/htdocs/langs/sw_SW/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/sw_SW/other.lang b/htdocs/langs/sw_SW/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/sw_SW/other.lang +++ b/htdocs/langs/sw_SW/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/sw_SW/products.lang b/htdocs/langs/sw_SW/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/sw_SW/products.lang +++ b/htdocs/langs/sw_SW/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/sw_SW/projects.lang b/htdocs/langs/sw_SW/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/sw_SW/projects.lang +++ b/htdocs/langs/sw_SW/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/sw_SW/recruitment.lang b/htdocs/langs/sw_SW/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/sw_SW/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/sw_SW/stocks.lang b/htdocs/langs/sw_SW/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/sw_SW/stocks.lang +++ b/htdocs/langs/sw_SW/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/sw_SW/suppliers.lang b/htdocs/langs/sw_SW/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/sw_SW/suppliers.lang +++ b/htdocs/langs/sw_SW/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/sw_SW/workflow.lang b/htdocs/langs/sw_SW/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/sw_SW/workflow.lang +++ b/htdocs/langs/sw_SW/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/sw_SW/zapier.lang b/htdocs/langs/sw_SW/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/sw_SW/zapier.lang +++ b/htdocs/langs/sw_SW/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/th_TH/accountancy.lang b/htdocs/langs/th_TH/accountancy.lang index c802c026e5b..bef58b499b2 100644 --- a/htdocs/langs/th_TH/accountancy.lang +++ b/htdocs/langs/th_TH/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=ขายวารสาร ACCOUNTING_PURCHASE_JOURNAL=วารสารการสั่งซื้อ @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/th_TH/admin.lang b/htdocs/langs/th_TH/admin.lang index de7faa73baf..9aa5baa9218 100644 --- a/htdocs/langs/th_TH/admin.lang +++ b/htdocs/langs/th_TH/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=คุณลักษณะที่ไม่สามารถใช้ได้บน Unix เหมือนระบบ ทดสอบโปรแกรม sendmail ในประเทศของคุณ +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=การติดตั้งโมดูล ModulesSetup=Modules/Application setup ModuleFamilyBase=ระบบ @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=กุญแจสำคัญในการรักษาความปลอดภัย URL ที่ NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=รูปแบบไฟล์ PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=การปรับเปลี่ยนราคาค MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=เชือก +String1Line=String (1 line) TextLong=ข้อความยาว +TextLongNLines=Long text (n lines) HtmlText=Html text Int=จำนวนเต็ม Float=ลอย @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=บาร์โค้ด Module55Desc=การจัดการบาร์โค้ด Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=บูรณาการของระบบ ClickToDial (ดอกจัน, ... ) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=สร้าง / แก้ไขบริการ Permission534=ลบบริการ Permission536=ดู / จัดการบริการซ่อน Permission538=บริการส่งออก +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=อ่านบริจาค Permission702=สร้าง / แก้ไขการบริจาค Permission703=ลบบริจาค @@ -848,6 +858,8 @@ Permission773=ลบรายงานค่าใช้จ่าย Permission774=อ่านรายงานค่าใช้จ่ายทั้งหมด (แม้จะไม่ได้สำหรับผู้ใช้ผู้ใต้บังคับบัญชา) Permission775=อนุมัติรายงานค่าใช้จ่าย Permission776=จ่ายรายงานค่าใช้จ่าย +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=รายงานค่าใช้จ่ายส่งออก Permission1001=อ่านหุ้น Permission1002=สร้าง / แก้ไขคลังสินค้า @@ -900,6 +912,7 @@ Permission2515=ไดเรกทอรีเอกสารการติด Permission2801=ใช้โปรแกรม FTP ในโหมดอ่าน (เรียกดูและดาวน์โหลดเท่านั้น) Permission2802=ใช้โปรแกรม FTP ในโหมดเขียน (ลบหรืออัปโหลดไฟล์) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect ที่มีศักยภาพ +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=ภูมิภาค DictionaryCountry=ประเทศ @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=หน่วย DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=สถานะ Prospect +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=แบบฟอร์มการค้นหาถาวรบนเมนูด้านซ้าย DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=คุณต้องเปิดการใช้งานอย่างน้อย 1 โมดูล ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=ใช่ในช่วงฤดู​​ร้อน @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=ซึ่งแท็บที่คุณต้องการที่จะเปิดตามค่าเริ่มต้นเมื่อมีการเลือกวาระที่เมนู +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=คลิกเพื่อกดติดตั้งโมดูล ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=ฟิลด์นี้มีการอ้างอิงใน Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=ตำแหน่งของเส้นเป็นรายการคำสั่งผสม SellTaxRate=อัตราภาษีการขาย RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=สัญญา +MailToSendReception=Receptions MailToThirdparty=บุคคลที่สาม MailToMember=สมาชิก MailToUser=ผู้ใช้ @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=ไปรษณีย์ MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/th_TH/agenda.lang b/htdocs/langs/th_TH/agenda.lang index 6f8754acf1b..f2a93b36d8b 100644 --- a/htdocs/langs/th_TH/agenda.lang +++ b/htdocs/langs/th_TH/agenda.lang @@ -14,7 +14,7 @@ EventsNb=จำนวนของเหตุการณ์ที่ ListOfActions=รายการของเหตุการณ์ EventReports=Event reports Location=สถานที่ -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=เหตุการณ์ทุกวัน (s) MenuToDoActions=ทุกเหตุการณ์ที่ไม่สมบูรณ์ MenuDoneActions=เหตุการณ์ยกเลิกทั้งหมด @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=เริ่มต้นวันที่ 1 ชั่วโม SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/th_TH/boxes.lang b/htdocs/langs/th_TH/boxes.lang index 92415f99549..48979414509 100644 --- a/htdocs/langs/th_TH/boxes.lang +++ b/htdocs/langs/th_TH/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=ใบแจ้งหนี้ลูกค้า ForCustomersOrders=คำสั่งซื้อของลูกค้า ForProposals=ข้อเสนอ @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=การบัญชี diff --git a/htdocs/langs/th_TH/cashdesk.lang b/htdocs/langs/th_TH/cashdesk.lang index e31525e1d6c..ec6eefe89a4 100644 --- a/htdocs/langs/th_TH/cashdesk.lang +++ b/htdocs/langs/th_TH/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/th_TH/compta.lang b/htdocs/langs/th_TH/compta.lang index 9b30b80baca..60fe78c8f6f 100644 --- a/htdocs/langs/th_TH/compta.lang +++ b/htdocs/langs/th_TH/compta.lang @@ -69,6 +69,7 @@ SocialContribution=ภาษีทางสังคมหรือทางก SocialContributions=ภาษีทางสังคมหรือทางการคลัง SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=ค่าใช้จ่ายพิเศษ @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/th_TH/contracts.lang b/htdocs/langs/th_TH/contracts.lang index 37b4eb981f9..d2bacf4f83a 100644 --- a/htdocs/langs/th_TH/contracts.lang +++ b/htdocs/langs/th_TH/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=วิ่งบริการ MenuExpiredServices=บริการหมดอายุ MenuClosedServices=ปิดบริการ NewContract=สัญญาฉบับใหม่ -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=สร้างสัญญา DeleteAContract=ลบสัญญา ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/th_TH/errors.lang b/htdocs/langs/th_TH/errors.lang index 40939e97e25..125ecf6e5b3 100644 --- a/htdocs/langs/th_TH/errors.lang +++ b/htdocs/langs/th_TH/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=ค่าใหม่ไม่สามารถ ErrorFailedToValidatePasswordReset=ล้มเหลวในการ reinit รหัสผ่าน อาจจะ reinit ถูกทำมาแล้ว (ลิงค์นี้สามารถใช้เพียงครั้งเดียว) ถ้าไม่ได้พยายามที่จะเริ่มต้นกระบวนการ reinit ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=ล้มเหลวในการเพิ่มรายชื่อ -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=โหมดการชำระเงินถูกกำหนดให้พิมพ์% s แต่การตั้งค่าของโมดูลใบแจ้งหนี้ที่ยังไม่เสร็จสมบูรณ์เพื่อกำหนดข้อมูลที่จะแสดงโหมดการชำระเงินนี้ ErrorPHPNeedModule=ข้อผิดพลาด, PHP ของคุณต้องมีโมดูล% s ที่ติดตั้งเพื่อใช้คุณลักษณะนี้ ErrorOpenIDSetupNotComplete=คุณติดตั้ง Dolibarr ไฟล์ config ที่จะช่วยให้การตรวจสอบ OpenID แต่ URL ของ OpenID บริการไม่ได้ถูกกำหนดลงไปใน s% คงที่ @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/th_TH/languages.lang b/htdocs/langs/th_TH/languages.lang index bf422d00155..85ebcd69f94 100644 --- a/htdocs/langs/th_TH/languages.lang +++ b/htdocs/langs/th_TH/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=ภาษาอาหรับ Language_ar_EG=Arabic (Egypt) Language_ar_SA=ภาษาอาหรับ +Language_az_AZ=Azerbaijani Language_bn_BD=ประเทศบังคลาเทศ +Language_bn_IN=Bengali (India) Language_bg_BG=บัลแกเรีย Language_bs_BA=บอสเนีย Language_ca_ES=คาตาลัน @@ -20,6 +23,7 @@ Language_en_GB=อังกฤษ (สหราชอาณาจักร) Language_en_IN=ภาษาอังกฤษ (อินเดีย) Language_en_NZ=อังกฤษ (นิวซีแลนด์) Language_en_SA=อังกฤษ (ซาอุดีอาระเบีย) +Language_en_SG=English (Singapore) Language_en_US=ภาษาอังกฤษ (สหรัฐอเมริกา) Language_en_ZA=ภาษาอังกฤษ (แอฟริกาใต้) Language_es_ES=สเปน @@ -29,6 +33,7 @@ Language_es_CL=สเปน (ชิลี) Language_es_CO=สเปน (โคลอมเบีย) Language_es_DO=ภาษาสเปน Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=สเปน (ฮอนดูรัส) Language_es_MX=สเปน (เม็กซิโก) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=สเปน (ปารากวัย) Language_es_PE=เสปน (เปรู) Language_es_PR=สเปน (เปอร์โตริโก) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=เอสโตเนีย Language_eu_ES=ชาวแบสค์ @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=ฝรั่งเศส (เบลเยี่ยม) Language_fr_CA=ฝรั่งเศส (แคนาดา) Language_fr_CH=ฝรั่งเศส (วิตเซอร์แลนด์) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=ฝรั่งเศส +Language_fr_GA=French (Gabon) Language_fr_NC=ฝรั่งเศส (ใหม่แคลิโดเนีย) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=ชาวอิสราเอล +Language_hi_IN=Hindi (India) Language_hr_HR=โครเอเชีย Language_hu_HU=ฮังการี Language_id_ID=ภาษาอินโดนีเซีย Language_is_IS=ไอซ์แลนด์ Language_it_IT=อิตาลี +Language_it_CH=Italian (Switzerland) Language_ja_JP=ญี่ปุ่น Language_ka_GE=จอร์เจีย Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=ลัตเวีย Language_mk_MK=มาซิโดเนีย Language_mn_MN=Mongolian Language_nb_NO=นอร์เวย์ (บ็อกมัล) +Language_ne_NP=Nepali Language_nl_BE=ดัตช์ (เบลเยี่ยม) Language_nl_NL=Dutch Language_pl_PL=โปแลนด์ @@ -86,4 +100,5 @@ Language_uz_UZ=อุซเบก Language_vi_VN=เวียตนาม Language_zh_CN=จีน Language_zh_TW=จีน (ดั้งเดิม) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/th_TH/mails.lang b/htdocs/langs/th_TH/mails.lang index e880ef23289..ea92de0f2ba 100644 --- a/htdocs/langs/th_TH/mails.lang +++ b/htdocs/langs/th_TH/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=ข้อมูล ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/th_TH/main.lang b/htdocs/langs/th_TH/main.lang index e48f7996c48..0ed430072db 100644 --- a/htdocs/langs/th_TH/main.lang +++ b/htdocs/langs/th_TH/main.lang @@ -355,8 +355,8 @@ PriceUTTC=UP (รวมภาษี). Amount=จำนวน AmountInvoice=จำนวนใบแจ้งหนี้ AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=จำนวนเงินที่ชำระ AmountHTShort=Amount (excl.) AmountTTCShort=จํานวนเงิน (รวมภาษี). @@ -485,6 +485,7 @@ Categories=แท็ก / ประเภท Category=Tag / หมวดหมู่ By=โดย From=จาก +FromDate=จาก FromLocation=จาก to=ไปยัง To=ไปยัง @@ -687,6 +688,7 @@ Method=วิธี Receive=ได้รับ CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=เป็นบางส่วน TotalWoman=ทั้งหมด NeverReceived=ไม่เคยได้รับ @@ -703,6 +705,7 @@ MenuECM=เอกสาร MenuAWStats=AWStats MenuMembers=สมาชิก MenuAgendaGoogle=วาระการประชุมของ Google +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr ขีด จำกัด (เมนูที่บ้านการตั้งค่าการรักษาความปลอดภัย):% s Kb, PHP ขีด จำกัด :% s Kb NoFileFound=ไม่มีเอกสารที่บันทึกไว้ในไดเรกทอรีนี้ CurrentUserLanguage=ภาษาปัจจุบัน @@ -725,7 +728,7 @@ Page=หน้า Notes=หมายเหตุ AddNewLine=เพิ่มบรรทัดใหม่ AddFile=เพิ่มไฟล์ -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=วัตถุโคลนที่มีคุณลักษณะหลัก ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=ข้อมูล +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/th_TH/members.lang b/htdocs/langs/th_TH/members.lang index c3ceb26c7e0..c736722b2f6 100644 --- a/htdocs/langs/th_TH/members.lang +++ b/htdocs/langs/th_TH/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=สมาชิกร่าง MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=ผ่านการตรวจสอบ +SubscriptionNotNeeded=No subscription needed NewCotisation=ผลงานใหม่ PaymentSubscription=การชำระเงินผลงานใหม่ SubscriptionEndDate=วันที่สิ้นสุดการสมัครสมาชิกของ @@ -78,7 +81,7 @@ DeleteType=ลบ VoteAllowed=โหวตที่ได้รับอนุญาต Physical=กายภาพ Moral=ศีลธรรม -MorPhy=คุณธรรม / กายภาพบำบัด +MorPhy=ธรรมชาติ Reenable=reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/th_TH/mrp.lang b/htdocs/langs/th_TH/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/th_TH/mrp.lang +++ b/htdocs/langs/th_TH/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/th_TH/other.lang b/htdocs/langs/th_TH/other.lang index 25611ec91c0..d877cbda594 100644 --- a/htdocs/langs/th_TH/other.lang +++ b/htdocs/langs/th_TH/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/th_TH/products.lang b/htdocs/langs/th_TH/products.lang index bb78febb11c..23bafa71159 100644 --- a/htdocs/langs/th_TH/products.lang +++ b/htdocs/langs/th_TH/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=ตั้งค่าชนิดบาร์โค้ด BarcodeValue=ค่าบาร์โค้ด NoteNotVisibleOnBill=หมายเหตุ (ไม่ปรากฏในใบแจ้งหนี้ข้อเสนอ ... ) ServiceLimitedDuration=หากผลิตภัณฑ์เป็นบริการที่มีระยะเวลา จำกัด : +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=จำนวนของราคา DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=ประเทศแหล่งกำเนิดสินค้า Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=ป้ายสั้น Unit=หน่วย p=ยู @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=คุณลักษณะใหม่ NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/th_TH/projects.lang b/htdocs/langs/th_TH/projects.lang index e696787b331..3cdc4c31d90 100644 --- a/htdocs/langs/th_TH/projects.lang +++ b/htdocs/langs/th_TH/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=ผู้สนับสนุ TypeContact_project_task_external_TASKCONTRIBUTOR=ผู้สนับสนุน SelectElement=องค์ประกอบที่เลือก AddElement=เชื่อมโยงไปยังองค์ประกอบ +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=สถิติในโครงการ / โอกาสในการขาย -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=งานที่ได้รับมอบหมาย เข้าครั้งในงานนี้จะเป็นไปได้ IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/th_TH/recruitment.lang b/htdocs/langs/th_TH/recruitment.lang new file mode 100644 index 00000000000..e6b0c0ff890 --- /dev/null +++ b/htdocs/langs/th_TH/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = เกี่ยวกับ +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/th_TH/stocks.lang b/htdocs/langs/th_TH/stocks.lang index f5c660060bf..95ce6f5a07f 100644 --- a/htdocs/langs/th_TH/stocks.lang +++ b/htdocs/langs/th_TH/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=ลบส่ง Stock=สต็อกสินค้า Stocks=หุ้น MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=หุ้นจริง RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=หุ้นเสมือนจริง -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=คลังสินค้า Id DescWareHouse=คลังสินค้ารายละเอียด LieuWareHouse=คลังสินค้าภาษาท้องถิ่น WarehousesAndProducts=โกดังและผลิตภัณฑ์ WarehousesAndProductsBatchDetail=โกดังและผลิตภัณฑ์ (ที่มีรายละเอียดมากต่อ / อนุกรม) -AverageUnitPricePMPShort=ถ่วงน้ำหนักราคานำเข้าเฉลี่ย -AverageUnitPricePMP=ถ่วงน้ำหนักราคานำเข้าเฉลี่ย +AverageUnitPricePMPShort=ราคาเฉลี่ยถ่วงน้ำหนัก +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=ราคาขายต่อหน่วย EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=replenishments NbOfProductBeforePeriod=ปริมาณของ% s สินค้าในสต็อกก่อนระยะเวลาที่เลือก (<% s) NbOfProductAfterPeriod=จำนวนของผลิตภัณฑ์% s ในสต็อกหลังจากระยะเวลาที่เลือก (>% s) MassMovement=การเคลื่อนไหวมวลชน -SelectProductInAndOutWareHouse=เลือกผลิตภัณฑ์ปริมาณโกดังแหล่งที่มาและคลังสินค้าเป้าหมายจากนั้นคลิก "% s" ครั้งนี้จะทำสำหรับการเคลื่อนไหวที่จำเป็นทั้งหมดคลิกไปยัง "% s" +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=ใบเสร็จรับเงินสำหรับการสั่งซื้อนี้ StockMovementRecorded=การเคลื่อนไหวของหุ้นที่บันทึกไว้ @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/th_TH/suppliers.lang b/htdocs/langs/th_TH/suppliers.lang index 7fbc2dbbc07..a272100e086 100644 --- a/htdocs/langs/th_TH/suppliers.lang +++ b/htdocs/langs/th_TH/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=บางผลิตภัณฑ์ย่อยไ AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=ผู้จัดจำหน่ายอ้างอิงนี้จะเชื่อมโยงกับการอ้างอิง:% s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=ห้องว่าง -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=อนุมัติคำสั่งนี้ ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=ปฏิเสธคำสั่งนี้ @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=ไฟล์ถอนเงิน +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=ตั้งสถานะ "แฟ้มส่ง" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=สถิติตามสถานะของสาย @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=จำนวนเงิน:% s
    วิธีการ:% s

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=ตัวเลือกสำหรับโหมดจริงไม่ได้ตั้งค่าเราหยุดหลังจากจำลองนี้ +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/th_TH/workflow.lang b/htdocs/langs/th_TH/workflow.lang index 8e634f15103..728e20bacb1 100644 --- a/htdocs/langs/th_TH/workflow.lang +++ b/htdocs/langs/th_TH/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=เวิร์กโฟลว์การติดตั้งโมดูล -WorkflowDesc=โมดูลนี้ถูกออกแบบมาเพื่อปรับเปลี่ยนพฤติกรรมของการกระทำโดยอัตโนมัติลงในใบสมัคร โดยค่าเริ่มต้นขั้นตอนการทำงานจะเปิด (คุณสามารถทำสิ่งที่อยู่ในลำดับที่คุณต้องการ) คุณสามารถเปิดใช้การกระทำโดยอัตโนมัติคุณมีความสนใจใน +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=ไม่มีการปรับเปลี่ยนขั้นตอนการทำงานที่มีอยู่กับโมดูลเปิดใช้งานคือ # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/th_TH/zapier.lang b/htdocs/langs/th_TH/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/th_TH/zapier.lang +++ b/htdocs/langs/th_TH/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/tr_TR/accountancy.lang b/htdocs/langs/tr_TR/accountancy.lang index 26d8a43bec5..73ebe7cb877 100644 --- a/htdocs/langs/tr_TR/accountancy.lang +++ b/htdocs/langs/tr_TR/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Satış günlüğü ACCOUNTING_PURCHASE_JOURNAL=Alış günlüğü @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Uzlaştırılmadı ## Admin +BindingOptions=Binding options ApplyMassCategories=Toplu kategori uygula AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/tr_TR/admin.lang b/htdocs/langs/tr_TR/admin.lang index 827f5657db1..b838d2f46ff 100644 --- a/htdocs/langs/tr_TR/admin.lang +++ b/htdocs/langs/tr_TR/admin.lang @@ -219,7 +219,7 @@ Nouveauté=Yenilik AchatTelechargement=Satın Al / Yükle GoModuleSetupArea=Yeni bir modül almak/yüklemek için, %s Modül ayar alanına gidin. DoliStoreDesc=DoliStore, Dolibarr ERP/CRM dış modülleri için resmi pazar yeri -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. +DoliPartnersDesc=İstek üzerine modüller veya özellikler geliştiren firmaların listesi.
    Not: Dolibarr açık kaynaklı bir uygulama olduğu için PHP programlamada deneyimli herhangi biri bir modül geliştirebilir. WebSiteDesc=Daha fazla eklenti modülleri (ana yazılımda bulunmayan) için harici web siteleri DevelopYourModuleDesc=Kendi modülünüzü geliştirmek için bazı çözümler... URL=URL @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Manuel gönderim için varsayılan gönderici e-posta UserEmail=Kullanıcı e-posta adresi CompanyEmail=Firma e-posta adresi FeatureNotAvailableOnLinux=Unix gibi sistemlerde bu özellik yoktur. +FixOnTransifex=Çeviriyi projenin çevrimiçi çeviri platformunda düzeltin SubmitTranslation=Bu dilin çevirisi tamamlanmamışsa veya hatalar görüyorsanız, langs/%s dizindeki dosyalarını düzenleyerek bu hataları düzeltebilir ve değişikliklerinizi www.transifex.com/dolibarr-association/dolibarr/ adresine gönderebilirsiniz. -SubmitTranslationENUS=Bu dil için çeviri tamamlanmamışsa ya da hatalar buluyorsanız, bunları langs/%s dizininde düzeltebilir ve değişikliklerinizi dolibarr.org/forum adresine veya geliştiriciler için github.com/Dolibarr/dolibarr adresine gönderebilirsiniz. +SubmitTranslationENUS=Bu dil için çeviri tamamlanmamışsa ya da hatalar buluyorsanız, bunları langs/%s dizininde düzeltebilir ve değişikliklerinizi dolibarr.org/forum adresine gönderebilirsiniz veya geliştiriciyseniz github.com/Dolibarr/dolibarr adresinde bir PR ile düzenleyebilirsiniz. ModuleSetup=Modül kurulumu ModulesSetup=Modül/Uygulama kurulumu ModuleFamilyBase=Sistem @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Bu özelliğe gereksinim duyarsanız öne %s mod SecurityToken=URL leri güvenli kılmak için anahtar NoSmsEngine=Sitemde hiç bir SMS gönderme yöneticisi mevcut değil. Standart Dolibarr sürümü ile bir SMS gönderme yöneticisi yüklü gelmez, çünkü bunlar bir dış sağlayıcıya bağlıdır. Yine de şu adresten birkaç tane bulabilirsiniz: %s PDF=PDF -PDFDesc=PDF oluşturma için global seçenekler. -PDFAddressForging=Adres kutuları için kurallar +PDFDesc=PDF oluşturma için global seçenekler +PDFAddressForging=Adres bölümü kuralları HideAnyVATInformationOnPDF=Satış Vergisi / KDV ile ilgili tüm bilgileri gizle PDFRulesForSalesTax=Satış Vergisi / KDV için Kurallar PDFLocaltax=%siçin kurallar -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Satış Vergisi / KDV sütununda %s oranını gizle HideDescOnPDF=Ürün açıklamasını gizle HideRefOnPDF=Ürün Referans No'sunu gizle HideDetailsOnPDF=Ürün satır detaylarını gizle @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Buna göre tanımlanan temel referans değerli fiyatları MassConvert=Toplu dönüştürmeyi başlat PriceFormatInCurrentLanguage=Geçerli Dilde Fiyat Formatı String=Dizi +String1Line=String (1 line) TextLong=Uzun metin +TextLongNLines=Long text (n lines) HtmlText=HTML metni Int=Tam sayı Float=Kayan @@ -543,9 +546,9 @@ Module54Desc=Sözleşmelerin yönetimi (hizmetler veya yinelenen abonelikler) Module55Name=Barkodlar Module55Desc=Barkod yönetimi Module56Name=Kredi transferiyle ödeme -Module56Desc=Tedarikçi ödemelerinin kredi transfer emirleri ile yönetimi. Avrupa ülkeleri için SEPA dosyasının oluşturulmasını içerir. -Module57Name=Banka Otomatik Ödemeleri -Module57Desc=Otomatik Ödeme talimatlarının yönetimi. Avrupa ülkeleri için SEPA dosyası üretimini içerir. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=TıklaAra Module58Desc=TıklaAra entegrasyonu Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Hizmet oluştur/değiştir Permission534=Hizmet sil Permission536=Gizli hizmetleri gör/yönet Permission538=Hizmetleri dışa aktar +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Gereç Cetvelleri Oku Permission651=Gereç Cetvelleri Oluştur/Güncelle Permission652=Gereç Cetvelleri Sil +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Bağış oluştur/değiştir Permission702=Bağış sil Permission703=Bağış sil @@ -848,6 +858,8 @@ Permission773=Gider raporu sil Permission774=Bütün gider raporlarını oku (emrinde olmayanlarınkini de) Permission775=Gider raporu onayla Permission776=Ödeme gider raporu +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Gider raporlarını dışa aktar Permission1001=Stok oku Permission1002=Depo oluştur/değiştir @@ -900,6 +912,7 @@ Permission2515=Belge dizinlerini kur Permission2801=Okuma modunda FTP istemcisi kullan (yalnızca tara ve indir) Permission2802=Yazma modunda FTP istemcisi kullan (sil ya da dosya yükle) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=Çalışanları gör Permission4002=Çalışan oluştur Permission4003=Çalışan sil @@ -947,7 +960,8 @@ Permission63003=Kaynak sil Permission63004=Gündem etkinliklerine kaynak bağlantıla DictionaryCompanyType=Üçüncü parti türleri DictionaryCompanyJuridicalType=Üçüncü partilerin yasal formları -DictionaryProspectLevel=Aday potansiyeli +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=İller Listesi DictionaryRegion=Bölgeler DictionaryCountry=Ülkeler @@ -977,7 +991,8 @@ DictionaryEMailTemplates=E-posta Şablonları DictionaryUnits=Birimler DictionaryMeasuringUnits=Ölçü Birimleri DictionarySocialNetworks=Sosyal Ağlar -DictionaryProspectStatus=Aday durumu +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=İzin türleri DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Gider raporu - Ulaşım kategorileri @@ -1076,7 +1091,7 @@ LoginPage=Oturum açma sayfası BackgroundImageLogin=Arka plan görüntüsü PermanentLeftSearchForm=Sol menüdeki sabit arama formu DefaultLanguage=Varsayılan dil -EnableMultilangInterface=Çoklu dil desteğini etkinleştir +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Firma logosunu menüde göster CompanyInfo=Firma/Kuruluş CompanyIds=Firma/Kuruluş kimlik bilgileri @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=En azından anahtar veya çeviri dizesi i NewTranslationStringToShow=Gösterilecek yeni çeviri dizesi OriginalValueWas=Orijinal çevirinin üzerine yazılır. Orijinal değerler şu şekildeydi:

    %s TransKeyWithoutOriginalValue=Herhangi bir dil dosyasında mevcut olmayan '%s' çeviri anahtarı için yeni bir çeviri zorlaması gerçekleştirdiniz. -TotalNumberOfActivatedModules=Etkinleştirilmiş uygulama/modüller: %s/%s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Enaz 1 modül etkinleştirmelisiniz ClassNotFoundIntoPathWarning=Class %s PHP yolunda bulunamadı YesInSummer=Yazın evet @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Etkinlik türleri kullanın (Ayarlar -> Sözlükler -> Gü AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Gündem menüsünü seçtiğinizde varsayılan olarak hangi sekmenin açılmasını istiyorsunuz +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Sesli bildirimi etkinleştir @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Bağlantılı nesneyi gündem görünümünde göster ##### Clicktodial ##### ClickToDialSetup=TıklaAra modülü kurulumu ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Telefon numaraları üzerinde yalnızca bir "tel:" linki kullan ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Bu alan satırın tanınması için bir referans içerir. Özel kar Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=RGB rengi HEX formatındadır, örn: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Satırın kombo listesindeki konumu SellTaxRate=Satış vergisi oranı RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Teklif talebi MailToSendSupplierOrder=Tedarikçi siparişleri MailToSendSupplierInvoice=Tedarikçi faturaları MailToSendContract=Sözleşmeler +MailToSendReception=Receptions MailToThirdparty=Üçüncü partiler MailToMember=Üyeler MailToUser=Kullanıcılar @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s kullanıma hazır. Ver ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Ürün belgeleri için şablonlar +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=Olası yedek değişkenlerin lstesi için * notuna bakın SeeChangeLog=ChangeLog dosyasına bakın (sadece ingilizce) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=PDF'deki sol boşluk MAIN_PDF_MARGIN_RIGHT=PDF'deki sağ boşluk MAIN_PDF_MARGIN_TOP=PDF'deki üst boşluk MAIN_PDF_MARGIN_BOTTOM=PDF'deki alt kenar boşluğu +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Bu modül için gerekli özel bir kurulum yok. SetToYesIfGroupIsComputationOfOtherGroups=Eğer bu grup diğer grupların bir hesaplaması ise bunu evet olarak ayarlayın EnterCalculationRuleIfPreviousFieldIsYes=Önceki alan Evet olarak ayarlanmışsa hesaplama kuralı girin (Örneğin 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Hiçbir şey yapılmadı XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Aday oluştur (ve gerekirse üçüncü parti) -CreateTicketAndThirdParty=Destek bildirimi (ve gerekliyse üçüncü parti) oluştur +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=En son sonuç kodu NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Posta Kodu MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Otomatik ECM ağacını göster @@ -1981,7 +2002,7 @@ ImportSetup=İçe aktarım modülünün kurulumu InstanceUniqueID=Unique ID of the instance SmallerThan=Şundan daha küçük LargerThan=Şundan daha büyük -IfTrackingIDFoundEventWillBeLinked=Eğer gelen e-posta içerisinde bir takip numarası bulunuyorsa, etkinliğin otomatik olarak ilgili nesnelere bağlanacağını unutmayınız. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/tr_TR/agenda.lang b/htdocs/langs/tr_TR/agenda.lang index 21dabf07d74..82b8160baa5 100644 --- a/htdocs/langs/tr_TR/agenda.lang +++ b/htdocs/langs/tr_TR/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Etkinlik sayısı ListOfActions=Etkinlik listesi EventReports=Etkinlik raporları Location=Konum -ToUserOfGroup=Gruptaki herhangi bir kullanıcıya +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Tam gün(ler)deki etkinlik MenuToDoActions=Sonlandırılmamış tüm etkinlikler MenuDoneActions=Sonlandırılmış tüm etkinlikler @@ -86,6 +86,8 @@ ProposalDeleted=Teklif silindi OrderDeleted=Sipariş silindi InvoiceDeleted=Fatura silindi DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=%s kodlu ürün oluşturuldu PRODUCT_MODIFYInDolibarr=%s kodlu ürün değiştirildi PRODUCT_DELETEInDolibarr=%s kodlu ürün silindi @@ -158,3 +160,9 @@ DateStartPlusOne=Başlama tarihi + 1 saat SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/tr_TR/boxes.lang b/htdocs/langs/tr_TR/boxes.lang index d0174a7cdcf..f374d3c9080 100644 --- a/htdocs/langs/tr_TR/boxes.lang +++ b/htdocs/langs/tr_TR/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Tedarikçi Siparişleri: değiştirilen son BoxTitleLastModifiedCustomerBills=Müşteri Faturaları: değiştirilen son %s BoxTitleLastModifiedCustomerOrders=Müşteri Siparişleri: son değiştirilen %s BoxTitleLastModifiedPropals=Değiştirilen son %s teklif +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Müşteri faturaları ForCustomersOrders=Müşteri siparişleri ForProposals=Teklifler @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Askı hesabı tanımlanmamış BoxLastCustomerShipments=Son müşteri gönderileri BoxTitleLastCustomerShipments=Son %s müşteri gönderileri NoRecordedShipments=Kayıtlı müşteri gönderimi yok +# Pages +AccountancyHome=Muhasebe diff --git a/htdocs/langs/tr_TR/cashdesk.lang b/htdocs/langs/tr_TR/cashdesk.lang index 19f1fdb9bf6..1c52f025daf 100644 --- a/htdocs/langs/tr_TR/cashdesk.lang +++ b/htdocs/langs/tr_TR/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/tr_TR/compta.lang b/htdocs/langs/tr_TR/compta.lang index 005e06e5a30..2623f2bdb57 100644 --- a/htdocs/langs/tr_TR/compta.lang +++ b/htdocs/langs/tr_TR/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Sosyal ya da mali vergi SocialContributions=Sosyal ya da mali vergiler SocialContributionsDeductibles=İndirilecek sosyal ya da mali vergiler SocialContributionsNondeductibles=İndirilemeyen sosyal ya da mali vergiler +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Katkı payı etiketi TypeContrib=Katkı payı türü MenuSpecialExpenses=Özel giderler diff --git a/htdocs/langs/tr_TR/contracts.lang b/htdocs/langs/tr_TR/contracts.lang index a6b0da91ad9..223779baa8a 100644 --- a/htdocs/langs/tr_TR/contracts.lang +++ b/htdocs/langs/tr_TR/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Yürürlükte olan hizmetler MenuExpiredServices=Süresi dolmuş hizmetler MenuClosedServices=Kapalı hizmetler NewContract=Yeni sözleşme -NewContractSubscription=Yeni sözleşme/üyelik +NewContractSubscription=New contract or subscription AddContract=Sözleşme oluştur DeleteAContract=Bir sözleşme sil ActivateAllOnContract=Tüm hizmetleri etkinleştir diff --git a/htdocs/langs/tr_TR/errors.lang b/htdocs/langs/tr_TR/errors.lang index dc0b2e0b760..8753b1ee175 100644 --- a/htdocs/langs/tr_TR/errors.lang +++ b/htdocs/langs/tr_TR/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Yeni değer eskisine eşit olamaz ErrorFailedToValidatePasswordReset=Parola yenilenemiyor. Belki yenileme zaten yapılmış olabilir (bu bağlantı yalnızca bir kez kullanılabilir). Aksi durumda yenileme işlemi tekrar başlatın. ErrorToConnectToMysqlCheckInstance=Veri tabanına bağlanılamıyor. Veritabanı sunucusunun çalıştığını kontrol edin (örneğin mysql/mariadb için, 'sudo service mysql start' ile komut satırından başlatabilirsiniz). ErrorFailedToAddContact=Kişi eklenmesinde hata -ErrorDateMustBeBeforeToday=Tarih bugünden büyük olamaz +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Bir ödeme biçimi %s türüne ayarlanmış, ancak fatura modülü kurulumu bu ödeme biçimi için tanımlanan bilgiyi gösterecek tamamlanmamış. ErrorPHPNeedModule=Hata, bu özelliği kulanmak için PHP nizde %s modülü kurulu olmalıdır. ErrorOpenIDSetupNotComplete=Dolibarr yapılandırma dosyasını OpenID kimlik doğrulamaya izin verecek şekilde ayarladınız, ancak OpenID hizmetine ait URL, %s değişmezine tanımlanmamıştır @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Bu partide/seride "%s" ür ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=PHP'nizdeki upload_max_filesize (%s) parametresi, post_max_size (%s) PHP parametresinden daha yüksek. Bu tutarlı bir kurulum değil. WarningPasswordSetWithNoAccount=Bu üye için bir parola ayarlıdır. Ancak, hiçbir kullanıcı hesabı oluşturulmamıştır. Yani bu şifre saklanır ama Dolibarr'a giriş için kullanılamaz. Dış bir modül/arayüz tarafından kullanılıyor olabilir, ama bir üye için ne bir kullanıcı adı ne de parola tanımlamanız gerekmiyorsa "Her üye için bir kullanıcı adı yönet" seçeneğini devre dışı bırakabilirsiniz. Bir kullanıcı adı yönetmeniz gerekiyorsa ama herhangi bir parolaya gereksinim duymuyorsanız bu uyarıyı engellemek için bu alanı boş bırakabilirsiniz. Not: Eğer bir üye bir kullanıcıya bağlıysa kullanıcı adı olarak e-posta adresi de kullanılabilir. diff --git a/htdocs/langs/tr_TR/languages.lang b/htdocs/langs/tr_TR/languages.lang index add5c987b2b..9946ec0de27 100644 --- a/htdocs/langs/tr_TR/languages.lang +++ b/htdocs/langs/tr_TR/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arapça Language_ar_EG=Arabça (Mısır) Language_ar_SA=Arapça +Language_az_AZ=Azerbaijani Language_bn_BD=Bengalce +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarca Language_bs_BA=Boşnakça Language_ca_ES=Katalanca @@ -20,6 +23,7 @@ Language_en_GB=İngilizce (Birleşik Krallık) Language_en_IN=İngilizce (Hindistan) Language_en_NZ=İngilizce (Yeni Zelanda) Language_en_SA=İngilizce (Suudi Arabistan) +Language_en_SG=English (Singapore) Language_en_US=İngilizce (ABD) Language_en_ZA=İngilizce (Güney Afrika) Language_es_ES=İspanyolca @@ -29,6 +33,7 @@ Language_es_CL=İspanyolca (Şilil) Language_es_CO=İspanyolca (Kolombiya) Language_es_DO=İspanyolca (Dominik Cumhuriyeti) Language_es_EC=İspanyolca (Ekvador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=İspanyolca (Honduras) Language_es_MX=İspanyolca (Meksika) Language_es_PA=İspanyolca (Panama) @@ -36,6 +41,7 @@ Language_es_PY=İspanyolca (Paraguay) Language_es_PE=İspanyolca (Peru) Language_es_PR=İspanyolca (Porto Riko) Language_es_UY=İspanyolca (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=İspanyolca (Venezuela) Language_et_EE=Estonyaca Language_eu_ES=Baskça @@ -44,15 +50,22 @@ Language_fi_FI=Fince Language_fr_BE=Fransızca (Belçika) Language_fr_CA=Fransızca (Kanada) Language_fr_CH=Fransızca (İsviçre) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Fransızca +Language_fr_GA=French (Gabon) Language_fr_NC=Fransızca (Yeni Kaledonya) +Language_fr_SN=French (Senegal) Language_fy_NL=Frizyanca +Language_gl_ES=Galician Language_he_IL=İbranice +Language_hi_IN=Hindi (India) Language_hr_HR=Hırvatça Language_hu_HU=Macarca Language_id_ID=Endonezya dili Language_is_IS=İzlandaca Language_it_IT=İtalyanca +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japonca Language_ka_GE=Gürcüce Language_km_KH=Khmerce @@ -64,6 +77,7 @@ Language_lv_LV=Letonca Language_mk_MK=Makedonca Language_mn_MN=Moğolca Language_nb_NO=Norveççe (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Flemenkçe (Belçika) Language_nl_NL=Flemenkçe Language_pl_PL=Lehçe @@ -86,4 +100,5 @@ Language_uz_UZ=Özbekçe Language_vi_VN=Vietnamca Language_zh_CN=Çince Language_zh_TW=Çince (Geleneksel) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malayca diff --git a/htdocs/langs/tr_TR/mails.lang b/htdocs/langs/tr_TR/mails.lang index 0787f4873f1..85fe5c91d72 100644 --- a/htdocs/langs/tr_TR/mails.lang +++ b/htdocs/langs/tr_TR/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Varsayılan giden e-posta kurulumu Information=Bilgi ContactsWithThirdpartyFilter=Üçüncü parti filtreli kişiler +Unanswered=Unanswered +Answered=Cevaplandı +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/tr_TR/main.lang b/htdocs/langs/tr_TR/main.lang index fa29afb06e9..c2b51ead847 100644 --- a/htdocs/langs/tr_TR/main.lang +++ b/htdocs/langs/tr_TR/main.lang @@ -355,8 +355,8 @@ PriceUTTC=B.F. (vergi dahil) Amount=Tutar AmountInvoice=Fatura tutarı AmountInvoiced=Faturalandırılmış tutar -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Ödeme tutarı AmountHTShort=Tutar (KDV hariç) AmountTTCShort=Tutar (KDV dahil) @@ -485,6 +485,7 @@ Categories=Etiketler/kategoriler Category=Etiket/kategori By=Tarafından From=Başlama +FromDate=Gönderen FromLocation=Gönderen to=Bitiş To=Bitiş @@ -687,6 +688,7 @@ Method=Yöntem Receive=Al CompleteOrNoMoreReceptionExpected=Tamamlandı ya da yapılacak başka şey yok ExpectedValue=Beklenen Değer +ExpectedQty=Expected Qty PartialWoman=Kısmi TotalWoman=Toplam NeverReceived=Hiç alınmadı @@ -703,6 +705,7 @@ MenuECM=Belgeler MenuAWStats=AWStats MenuMembers=Üyeler MenuAgendaGoogle=Google gündemi +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr sınırı (Giriş-Ayarlar-Güvenlik menüsü):%s Kb, PHP sınırı:%s Kb NoFileFound=Hiçbir belge bu dizine kaydedilmedi CurrentUserLanguage=Geçerli dil @@ -725,7 +728,7 @@ Page=Sayfa Notes=Notlar AddNewLine=Yeni satır ekle AddFile=Dosya ekle -FreeZone=Önceden tanımlanmış bir ürün/hizmet değil +FreeZone=Free-text product FreeLineOfType=Serbest metin öğesi, tür: CloneMainAttributes=Ana öznitelikleri ile birlikte nesnenin kopyasını oluştur. ReGeneratePDF=PDF'yi yeniden oluştur @@ -942,6 +945,39 @@ ShortThursday=Pe ShortFriday=Cu ShortSaturday=Ct ShortSunday=Pa +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Bir e-posta şablonu seçin SetRef=Ref ayarla Select2ResultFoundUseArrows=Bazı sonuçlar bulundu. Ok tuşlarını kullanarak seçin. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Bilgi +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/tr_TR/members.lang b/htdocs/langs/tr_TR/members.lang index 8e3928b9848..0b14e8cc388 100644 --- a/htdocs/langs/tr_TR/members.lang +++ b/htdocs/langs/tr_TR/members.lang @@ -81,7 +81,7 @@ DeleteType=Sil VoteAllowed=Oylamaya izin verildi Physical=Fiziksel Moral=Ahlaki -MorPhy=Ahlaki / Fiziksel +MorPhy=Niteliği Reenable=Yeniden etkinleştirilebilir ResiliateMember=Bir üyeyi sonlandır ConfirmResiliateMember=Bu üyeyi feshetmek istediğinizden emin misiniz? diff --git a/htdocs/langs/tr_TR/mrp.lang b/htdocs/langs/tr_TR/mrp.lang index 1e19e033ca7..e5a11e3ca43 100644 --- a/htdocs/langs/tr_TR/mrp.lang +++ b/htdocs/langs/tr_TR/mrp.lang @@ -1,5 +1,6 @@ Mrp=Üretim Emirleri MO=Üretim Emri +MOs=Manufacturing orders MRPDescription=Üretim ve Üretim Siparişlerini (MO) yönetmek için modül. MRPArea=MRP Alanı MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/tr_TR/other.lang b/htdocs/langs/tr_TR/other.lang index 510209b8f36..1ac66fd963c 100644 --- a/htdocs/langs/tr_TR/other.lang +++ b/htdocs/langs/tr_TR/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\n__REF__ referans numaralı PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\n__REF__ referans numaralı faturayı ekte bulabilirsiniz\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\n__REF__ referans numaralı sevkiyatı ekte bulabilirsiniz\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\n__REF__ referans numaralı müdahaleyi ekte bulabilirsiniz\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=Ödemeniz yapılmadıysa ödemenizi yapmak için aşağıdaki bağlantıyı tıklayabilirsiniz.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr, çeşitli iş modüllerini destekleyen kompakt bir ERP/CRM çözümüdür. Tüm modüllerin sergilendiği bir demonun mantığı yoktur, çünkü böyle bir senaryo asla gerçekleşmez (birkaç yüz adet mevcut). Bu nedenle birkaç demo profili vardır. ChooseYourDemoProfil=İşlemlerinize uyan demo profilini seçin... ChooseYourDemoProfilMore=...veya kendi profilinizi oluşturun
    (manuel modül seçimi) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Bellek kullanımı RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/tr_TR/products.lang b/htdocs/langs/tr_TR/products.lang index a2ded3bb8d5..37c185abd1b 100644 --- a/htdocs/langs/tr_TR/products.lang +++ b/htdocs/langs/tr_TR/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Barkod türü oluştur BarcodeValue=Barkod değeri NoteNotVisibleOnBill=Not (faturalarda, tekliflerde ... görünmez) ServiceLimitedDuration=Eğer ürün sınırlı süreli bir hizmetse: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Ürün/hizmet başına çoklu fiyat segmenti (her müşteri bir fiyat segmentinde) MultiPricesNumPrices=Fiyat sayısı DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Tedarikçi fiyatları (ürün veya hizmetler CustomCode=G.T.İ.P Numarası CountryOrigin=Menşei ülke Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Kısa etiket Unit=Birim p=Adet @@ -359,6 +362,9 @@ SelectCombination=Kombinasyonu seç ProductCombinationGenerator=Öznitelik oluşturucu Features=Özellikler PriceImpact=Fiyat etkisi +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Ağırlık etkisi NewProductAttribute=Yeni bir öznitelik NewProductAttributeValue=Yeni nitelik değeri diff --git a/htdocs/langs/tr_TR/projects.lang b/htdocs/langs/tr_TR/projects.lang index a6b9f1f9b8e..8b8891d2c6b 100644 --- a/htdocs/langs/tr_TR/projects.lang +++ b/htdocs/langs/tr_TR/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Katılımcı TypeContact_project_task_external_TASKCONTRIBUTOR=Katılımcı SelectElement=Öğe seç AddElement=Öğeye bağlan +LinkToElementShort=Buna bağlantıla # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Projeler/adaylar için istatistikler -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Atanan görevler. Bu göreve süre girmek mümkün olmalı. IdTaskTime=Görev zamanı kimliği YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/tr_TR/recruitment.lang b/htdocs/langs/tr_TR/recruitment.lang new file mode 100644 index 00000000000..9d6eec6b4cd --- /dev/null +++ b/htdocs/langs/tr_TR/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = İşe Alım +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Yeni iş pozisyonları için işe alım kampanyalarını yönetin ve takip edin + +# +# Admin page +# +RecruitmentSetup = İşe alım ayarları +Settings = Ayarlar +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Hakkında +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/tr_TR/stocks.lang b/htdocs/langs/tr_TR/stocks.lang index 5bf878266d1..822cf97e5c4 100644 --- a/htdocs/langs/tr_TR/stocks.lang +++ b/htdocs/langs/tr_TR/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Gönderim sil Stock=Stok Stocks=Stoklar MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Partiye/ürüne göre stoklar @@ -95,14 +95,16 @@ RealStock=Gerçek Stok RealStockDesc=Fiziksel/gerçek stok, şu anda depolardaki mevcut olan stoktur. RealStockWillAutomaticallyWhen=Gerçek stok bu kurala göre değiştirilecektir (Stok modulünde tanımlandığı gibi): VirtualStock=Sanal stok -VirtualStockDesc=Sanal stok, stokları etkileyen tüm açık/beklemede olan eylemlerin (teslim alınan tedarikçi siparişleri, sevk edilen müşteri siparişleri vb.) kapatılmasıyla hesaplanan mevcut stoktur +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Depo No DescWareHouse=Depo açıklaması LieuWareHouse=Depo konumlandırma WarehousesAndProducts=Depolar ve ürünler WarehousesAndProductsBatchDetail=Depolar ve ürünler (her parti/seri için ayrıntılı) -AverageUnitPricePMPShort=Ağırlıklı ortalama giriş fiyatı -AverageUnitPricePMP=Ağırlıklı ortalama giriş fiyatı +AverageUnitPricePMPShort=Ağırlıklı ortalama fiyat +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Satış Birim Fiyatı EstimatedStockValueSellShort=Satış değeri EstimatedStockValueSell=Satış değeri @@ -141,7 +143,7 @@ Replenishments=İkmal NbOfProductBeforePeriod=Stoktaki %s ürününün, seçilen dönemden (<%s) önceki miktarıdır NbOfProductAfterPeriod=Stoktaki %s ürününün, seçilen dönemden (<%s) sonraki miktarıdır MassMovement=Toplu hareket -SelectProductInAndOutWareHouse=Bir ürün, bir miktar, bir kaynak depo ve bir hedef depo seçin, sonra "%s" e tıklayın. Bütün gerekli hareketler için bu işlem yapıldığında "%s" e tıklayın. +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Kayıt transferi ReceivingForSameOrder=Bu siparişten yapılan kabuller StockMovementRecorded=Stok hareketleri kaydedildi @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/tr_TR/suppliers.lang b/htdocs/langs/tr_TR/suppliers.lang index c6f2264cedd..e160e652c96 100644 --- a/htdocs/langs/tr_TR/suppliers.lang +++ b/htdocs/langs/tr_TR/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Düşük kalite ReputationForThisProduct=İtibar BuyerName=Alıcı adı AllProductServicePrices=Tüm ürün/hizmet fiyatları -AllProductReferencesOfSupplier=Bu tedarikçinin tüm ürün/hizmet referansları +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Tedarikçi fiyatları diff --git a/htdocs/langs/tr_TR/ticket.lang b/htdocs/langs/tr_TR/ticket.lang index 5c79e574895..55746ab9f31 100644 --- a/htdocs/langs/tr_TR/ticket.lang +++ b/htdocs/langs/tr_TR/ticket.lang @@ -72,7 +72,6 @@ Deleted=Silindi # Dict Type=Türü -Category=Analitik kod Severity=Önem seviyesi # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Destek bildirimini oluşturan kullanıcıyı otomatik ol TicketsAutoAssignTicketHelp=Bir destek bildirimi oluştururken, kullanıcı otomatik olarak destek bildirimine atanabilir. TicketNumberingModules=Destek bildirimi numaralandırma modülü TicketNotifyTiersAtCreation=Oluşturunca üçüncü tarafa bildir -TicketGroup=Grup TicketsDisableCustomerEmail=Bir destek bildirimi ortak arayüzden oluşturulduğunda e-postaları her zaman devre dışı bırak TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Oluşturan NewTicket=Yeni destek bildirimi SubjectAnswerToTicket=Destek bildirimi cevabı TicketTypeRequest=İstek türü -TicketCategory=Analitik kod +TicketCategory=Grup SeeTicket=Destek bildirimini gör TicketMarkedAsRead=Destek bildirimi okundu olarak işaretlendi TicketReadOn=Okumaya devam et diff --git a/htdocs/langs/tr_TR/users.lang b/htdocs/langs/tr_TR/users.lang index 867a47400fb..84b68bfc470 100644 --- a/htdocs/langs/tr_TR/users.lang +++ b/htdocs/langs/tr_TR/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Bakım modunda devre dışıdır UserAccountancyCode=Kullanıcı muhasebe kodu UserLogoff=Kullanıcı çıkış yaptı UserLogged=Kullanıcı giriş yaptı +DateOfEmployment=Employment date DateEmployment=İşe Başlama Tarihi DateEmploymentEnd=İşi Bırakma Tarihi CantDisableYourself=Kendi kullanıcı kaydınızı devre dışı bırakamazsınız @@ -116,3 +117,4 @@ ForceUserHolidayValidator=İzin isteği doğrulayıcısını zorla ValidatorIsSupervisorByDefault=Varsayılan olarak, doğrulayıcı kullanıcının denetimcisidir. Bu durumu korumak için boş bırakın. UserPersonalEmail=Kişisel eposta UserPersonalMobile=Kişisel cep telefonu +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/tr_TR/withdrawals.lang b/htdocs/langs/tr_TR/withdrawals.lang index d8456fab5a9..04b9a4a8498 100644 --- a/htdocs/langs/tr_TR/withdrawals.lang +++ b/htdocs/langs/tr_TR/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Otomatik ödeme talimatları WithdrawalReceipt=Otomatik ödeme talimatı -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Son %s otomatik ödeme dosyaları @@ -63,7 +63,9 @@ InvoiceRefused=Fatura reddedildi (Reddedileni müşterinin hesabına yaz) StatusDebitCredit=Status debit/credit StatusWaiting=Bekliyor StatusTrans=Gönderildi +StatusDebited=Debited StatusCredited=Kredilendirilmiş +StatusPaid=Ödenmiş StatusRefused=Reddedildi StatusMotif0=Belirtilmemiş StatusMotif1=Bakiye yetersiz @@ -77,13 +79,13 @@ StatusMotif8=Başka bir nedenle CreateForSepaFRST=Otomatik ödeme dosyası oluşturun (SEPA FRST) CreateForSepaRCUR=Otomatik ödeme dosyası oluşturun (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Sadece ofis CreateBanque=Sadece banka OrderWaiting=İşlem için bekliyor -NotifyTransmision=Para çekme iletimleri -NotifyCredit=Kredi çekme +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Ulusal İletim Numarası WithBankUsingRIB=RIB kullanan banka hesapları için WithBankUsingBANBIC=IBAN/BIC/SWIFT kullanan banka hesapları için @@ -93,9 +95,10 @@ CreditDate=Alacak tarihi WithdrawalFileNotCapable=Ülkeniz %s için para çekme makbuzu oluşturulamıyor (Ülkeniz desteklenmiyor) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Para çekme dosyası +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent="Dosya Gönderildi" durumuna ayarla ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Durum satırlarına göre istatistkler @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Ödeme türü ModeRECUR=Yinelenen ödeme ModeFRST=Bir kerelik ödeme PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Otomatik ödeme talimatı %s oluşturuldu AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Tutarı: %s
    Yöntemi: %s
    Tarihi: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Merhaba,

    fatura %s, ait olduğu firma %s, tutarı %s olan otomatik ödeme talimatı banka tarafından reddedilmiştir.
    -
    --
    %s ModeWarning=Gerçek mod için seçenek ayarlanmamış, bu simülasyondan sonra durdururuz +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/tr_TR/workflow.lang b/htdocs/langs/tr_TR/workflow.lang index f43c46f51df..d3cc2b2f0b2 100644 --- a/htdocs/langs/tr_TR/workflow.lang +++ b/htdocs/langs/tr_TR/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=İş Akışı modülü kurulumu -WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. +WorkflowDesc=Bu modül bazı otomatik işlemler sağlar. Varsayılan olarak, iş akışı açıktır (işleri istediğiniz sırayla yapabilirsiniz) ama burada bazı otomatik eylemleri etkinleştirebilirsiniz. ThereIsNoWorkflowToModify=Etkin modüllerde hiç iş akışı değişikliği yok. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Bir teklifin imzalanmasının ardından otomatik olarak müşteri siparişi oluştur (yeni sipariş teklif ile aynı tutara sahip olacaktır) descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Bir teklifin imzalanmasına istinaden otomatik olarak bir müşteri faturası oluştur (yeni fatura teklifle aynı tutara sahip olacaktır) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Bir sözleşme doğrulandıktan sonra kendiliğinden bir müşteri faturası oluştur -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Bir müşteri siparişinin kapatılmasının ardından otomatik olarak müşteri faturası oluştur (yeni fatura sipariş ile aynı tutara sahip olacaktır) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Müşteri siparişi "faturalandı" olarak ayarlandığında (ve siparişin tutarı imzalanmış olan bağlantılı teklifin toplam tutarı ile aynı ise) bağlantılı kaynak teklifi de "faturalandı" olarak sınıflandır descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Müşteri faturası doğrulandığında (ve faturanın tutarı imzalanmış olan bağlantılı teklifin toplam tutarı ile aynı ise) bağlantılı kaynak teklifi "faturalandı" olarak sınıflandır -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Müşteri faturası doğrulandığında (ve faturanın tutarı bağlantılı siparişin toplam tutarı ile aynı ise) bağlantılı kaynak müşteri siparişini "faturalandı" olarak sınıflandır descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Bir sevkiyat doğrulandığında (ve tüm sevkiyatlardan sonra sevk edilen miktar siparişteki miktar ile aynı ise) bağlantılı kaynak müşteri siparişini "sevk edildi" olarak sınıflandır # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Tedarikçi faturası doğrulandığında (ve faturanın tutarı bağlantılı teklifin toplam tutarı ile aynı ise) bağlantılı kaynak tedarikçi teklifini "faturalandı" olarak sınıflandır descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Tedarikçi faturası doğrulandığında (ve faturanın tutarı bağlantılı siparişin toplam tutarı ile aynı ise) bağlantılı kaynak tedarikçi siparişini "faturalandı" olarak sınıflandır +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Otomatik oluşturma AutomaticClassification=Otomatik sınıflandırma diff --git a/htdocs/langs/tr_TR/zapier.lang b/htdocs/langs/tr_TR/zapier.lang index c1f64887a9a..75c635e864a 100644 --- a/htdocs/langs/tr_TR/zapier.lang +++ b/htdocs/langs/tr_TR/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Dolibarr modülü için Zapier # Admin page # ZapierForDolibarrSetup = Dolibarr için Zapier ayarları +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/uk_UA/accountancy.lang b/htdocs/langs/uk_UA/accountancy.lang index 4b2211076c4..af0f2f5295b 100644 --- a/htdocs/langs/uk_UA/accountancy.lang +++ b/htdocs/langs/uk_UA/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/uk_UA/admin.lang b/htdocs/langs/uk_UA/admin.lang index 38363864ea0..dbf81e98723 100644 --- a/htdocs/langs/uk_UA/admin.lang +++ b/htdocs/langs/uk_UA/admin.lang @@ -3,438 +3,441 @@ Foundation=Установа Version=Версія Publisher=Видавець VersionProgram=Версія програми -VersionLastInstall=Initial install version -VersionLastUpgrade=Latest version upgrade +VersionLastInstall=Початкова встановлена версія +VersionLastUpgrade=Версія останнього оновлення VersionExperimental=Експериментальна -VersionDevelopment=Розробча +VersionDevelopment=Розробницька VersionUnknown=Невизначена VersionRecommanded=Рекомендована FileCheck=Перевірка цілісності файлів -FileCheckDesc=This tool allows you to check the integrity of files and the setup of your application, comparing each file with the official one. The value of some setup constants may also be checked. You can use this tool to determine if any files have been modified (e.g by a hacker). -FileIntegrityIsStrictlyConformedWithReference=Files integrity is strictly conformed with the reference. -FileIntegrityIsOkButFilesWereAdded=Files integrity check has passed, however some new files have been added. -FileIntegritySomeFilesWereRemovedOrModified=Files integrity check has failed. Some files were modified, removed or added. -GlobalChecksum=Global checksum -MakeIntegrityAnalysisFrom=Make integrity analysis of application files from -LocalSignature=Embedded local signature (less reliable) -RemoteSignature=Remote distant signature (more reliable) -FilesMissing=Missing Files -FilesUpdated=Updated Files -FilesModified=Modified Files -FilesAdded=Added Files -FileCheckDolibarr=Check integrity of application files -AvailableOnlyOnPackagedVersions=The local file for integrity checking is only available when the application is installed from an official package -XmlNotFound=Xml Integrity File of application not found +FileCheckDesc=Ця утиліта дозволить Вам перевірити цілісність файлів установки Вашої програми, порівнюючи кожен файл на відповідність з офіційними. Деякі з налаштувань інсталятора також перевіряються. Використовуйте цей інструмент щоб скасувати будь-які зміни, внесені у файли програми (наприклад хакером). +FileIntegrityIsStrictlyConformedWithReference=Файли повність відповідають оригіналам. +FileIntegrityIsOkButFilesWereAdded=Файли пройшли перевірку, було додано декілька нових файлів. +FileIntegritySomeFilesWereRemovedOrModified=Перевірка цілісності провалена! Деякі файли було змінено, видалено або додано. +GlobalChecksum=Загальна контрольна сума +MakeIntegrityAnalysisFrom=Виконати перевірку цілісності файлів програми з +LocalSignature=Вбудовані локальні сигнатури (менш надійно) +RemoteSignature=Віддалені сигнатури (більш надійно) +FilesMissing=Втрачені файли +FilesUpdated=Оновлені файли +FilesModified=Змінені файли +FilesAdded=Додані файли +FileCheckDolibarr=Перевірка цілісності файлів програми +AvailableOnlyOnPackagedVersions=Локальний файл перевірки цілісності доступний лише тоді, коли програму встановлено з офіційного пакету +XmlNotFound=Xml-файл перевірки цілісності не знайдено SessionId=ID Сессії -SessionSaveHandler=Handler to save sessions -SessionSavePath=Session save location -PurgeSessions=Purge of sessions -ConfirmPurgeSessions=Do you really want to purge all sessions? This will disconnect every user (except yourself). -NoSessionListWithThisHandler=Save session handler configured in your PHP does not allow listing all running sessions. -LockNewSessions=Lock new connections -ConfirmLockNewSessions=Are you sure you want to restrict any new Dolibarr connection to yourself? Only user %s will be able to connect after that. -UnlockNewSessions=Remove connection lock +SessionSaveHandler=Обробник для зберігання сеансів +SessionSavePath=Місце зберігання сеансів +PurgeSessions=Очистка сеансів +ConfirmPurgeSessions=Ви дійсно бажаєте очистити всі сеанси? Це призведе до відключення всіх користувачів (окрім Вас). +NoSessionListWithThisHandler=Обробник сеансів, що налаштовано у вашому PHP не дозволяє переглядати активні сеанси. +LockNewSessions=Заблокувати нові з'єднання +ConfirmLockNewSessions=Ви впевнені, що хочете обмежити будь-які нові з'єднання Dolibarr? Тільки користувач %s зможе підключитися після цього. +UnlockNewSessions=Зняти блокування з'єднання YourSession=Ваш сеанс -Sessions=Users Sessions -WebUserGroup=Web server user/group -NoSessionFound=Your PHP configuration seems to not allow listing of active sessions. The directory used to save sessions (%s) may be protected (for example by OS permissions or by PHP directive open_basedir). -DBStoringCharset=Database charset to store data -DBSortingCharset=Database charset to sort data -HostCharset=Host charset -ClientCharset=Client charset -ClientSortingCharset=Client collation +Sessions=Сеанси користувачів +WebUserGroup=Користувач / група веб-сервера +NoSessionFound=Здається, що ваша конфігурація PHP не дозволяє перелічити активні сеанси. Каталог, який використовується для збереження сеансів ( %s ), може бути захищений (наприклад, дозволами ОС або директивою PHP open_basedir). +DBStoringCharset=Кодування бази даних для зберігання інформації +DBSortingCharset=Кодування бази даних для сортування даних +HostCharset=Кодування сервера +ClientCharset=Кодування клієнта +ClientSortingCharset=Співставлення клієнта WarningModuleNotActive=Модуль %s повинен бути активованим -WarningOnlyPermissionOfActivatedModules=Only permissions related to activated modules are shown here. You can activate other modules in the Home->Setup->Modules page. -DolibarrSetup=Dolibarr install or upgrade -InternalUser=Internal user -ExternalUser=External user -InternalUsers=Internal users -ExternalUsers=External users +WarningOnlyPermissionOfActivatedModules=Тут відображаються лише дозволи, пов'язані з активованими модулями. Ви можете активувати інші модулі на сторінці Головна-> Налаштування-> Модулі. +DolibarrSetup=Установка або оновлення Dolibarr +InternalUser=Внутрішній користувач +ExternalUser=Зовнішній користувач +InternalUsers=Внутрішні користувачі +ExternalUsers=Зовнішні користувачі GUISetup=Зовнішній вигляд -SetupArea=Setup -UploadNewTemplate=Upload new template(s) -FormToTestFileUploadForm=Form to test file upload (according to setup) -IfModuleEnabled=Note: yes is effective only if module %s is enabled -RemoveLock=Remove/rename file %s if it exists, to allow usage of the Update/Install tool. -RestoreLock=Restore file %s, with read permission only, to disable any further use of the Update/Install tool. -SecuritySetup=Security setup -SecurityFilesDesc=Define here options related to security about uploading files. -ErrorModuleRequirePHPVersion=Error, this module requires PHP version %s or higher -ErrorModuleRequireDolibarrVersion=Error, this module requires Dolibarr version %s or higher -ErrorDecimalLargerThanAreForbidden=Error, a precision higher than %s is not supported. -DictionarySetup=Dictionary setup -Dictionary=Dictionaries -ErrorReservedTypeSystemSystemAuto=Value 'system' and 'systemauto' for type is reserved. You can use 'user' as value to add your own record -ErrorCodeCantContainZero=Code can't contain value 0 -DisableJavascript=Disable JavaScript and Ajax functions -DisableJavascriptNote=Note: For test or debug purpose. For optimization for blind person or text browsers, you may prefer to use the setup on the profile of user -UseSearchToSelectCompanyTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant COMPANY_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -UseSearchToSelectContactTooltip=Also if you have a large number of third parties (> 100 000), you can increase speed by setting constant CONTACT_DONOTSEARCH_ANYWHERE to 1 in Setup->Other. Search will then be limited to start of string. -DelaiedFullListToSelectCompany=Wait until a key is pressed before loading content of Third Parties combo list.
    This may increase performance if you have a large number of third parties, but it is less convenient. -DelaiedFullListToSelectContact=Wait until a key is pressed before loading content of Contact combo list.
    This may increase performance if you have a large number of contacts, but it is less convenient) -NumberOfKeyToSearch=Number of characters to trigger search: %s -NumberOfBytes=Number of Bytes -SearchString=Search string -NotAvailableWhenAjaxDisabled=Not available when Ajax disabled -AllowToSelectProjectFromOtherCompany=On document of a third party, can choose a project linked to another third party -JavascriptDisabled=JavaScript disabled -UsePreviewTabs=Use preview tabs -ShowPreview=Show preview -PreviewNotAvailable=Preview not available -ThemeCurrentlyActive=Theme currently active -CurrentTimeZone=TimeZone PHP (server) -MySQLTimeZone=TimeZone MySql (database) -TZHasNoEffect=Dates are stored and returned by database server as if they were kept as submitted string. The timezone has effect only when using the UNIX_TIMESTAMP function (that should not be used by Dolibarr, so database TZ should have no effect, even if changed after data was entered). -Space=Space -Table=Table -Fields=Fields -Index=Index -Mask=Mask -NextValue=Next value -NextValueForInvoices=Next value (invoices) -NextValueForCreditNotes=Next value (credit notes) -NextValueForDeposit=Next value (down payment) -NextValueForReplacements=Next value (replacements) -MustBeLowerThanPHPLimit=Note: your PHP configuration currently limits the maximum filesize for upload to %s %s, irrespective of the value of this parameter -NoMaxSizeByPHPLimit=Note: No limit is set in your PHP configuration -MaxSizeForUploadedFiles=Maximum size for uploaded files (0 to disallow any upload) -UseCaptchaCode=Use graphical code (CAPTCHA) on login page -AntiVirusCommand=Full path to antivirus command -AntiVirusCommandExample=Example for ClamAv Daemon (require clamav-daemon): /usr/bin/clamdscan
    Example for ClamWin (very very slow): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe -AntiVirusParam= More parameters on command line -AntiVirusParamExample=Example for ClamAv Daemon: --fdpass
    Example for ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" -ComptaSetup=Accounting module setup -UserSetup=User management setup -MultiCurrencySetup=Multi-currency setup -MenuLimits=Limits and accuracy -MenuIdParent=Parent menu ID -DetailMenuIdParent=ID of parent menu (empty for a top menu) -DetailPosition=Sort number to define menu position +SetupArea=Налаштування +UploadNewTemplate=Завантажити новий шаблон(и) +FormToTestFileUploadForm=Форма для тестування завантаження файлу (відповідно до налаштування) +IfModuleEnabled=Примітка: так діє, лише якщо модуль %s увімкнено +RemoveLock=Видаліть або перейменуйте файл %s , якщо він існує, щоб дозволити використання інструменту "Оновити / Встановити". +RestoreLock=Відновіть файл %s , лише з дозволом для читання, щоб відключити подальше використання інструменту "Оновити / Встановити". +SecuritySetup=Налаштування безпеки +SecurityFilesDesc=Встановлені тут параметри пов’язані з безпекою щодо завантаження файлів. +ErrorModuleRequirePHPVersion=Помилка, для цього модуля потрібна версія PHP %s або вище +ErrorModuleRequireDolibarrVersion=Помилка, для цього модуля потрібна версія Dolibarr %s або вище +ErrorDecimalLargerThanAreForbidden=Помилка, точність вище %s не підтримується. +DictionarySetup=Налаштування довідників +Dictionary=Довідники +ErrorReservedTypeSystemSystemAuto=Значення 'system' і 'systemauto' для типу зарезервовано. Ви можете використовувати 'user' як значення, щоб додати свій власний запис +ErrorCodeCantContainZero=Код не може містити значення 0 +DisableJavascript=Вимкнення функцій JavaScript та Ajax +DisableJavascriptNote=Примітка. Для тестування або налагодження. Для оптимізації для незрячих або текстових браузерів ви можете скористатися налаштуваннями у профілі користувача +UseSearchToSelectCompanyTooltip=Крім того, якщо у вас є велика кількість контрагентів (> 100 000), ви можете збільшити швидкість, встановивши константі COMPANY_DONOTSEARCH_ANYWHERE значення 1 у Налаштування> Інше. Тоді пошук буде обмежений початком рядка. +UseSearchToSelectContactTooltip=Крім того, якщо у вас є велика кількість контрагентів (> 100 000), ви можете збільшити швидкість, встановивши константі CONTACT_DONOTSEARCH_ANYWHERE значення 1 у Налаштування> Інше. Тоді пошук буде обмежений початком рядка. +DelaiedFullListToSelectCompany=Чекати натискання клавіші перед завантаженням вмісту списку контрагентів
    Це може підвищити продуктивність, якщо у вас є велика кількість контрагентів, але це менш зручно. +DelaiedFullListToSelectContact=Чекати, поки не буде натиснута клавіша перед завантаженням вмісту списку контактів.
    (Це може підвищити продуктивність, якщо у вас є велика кількість контактів, але це менш зручно) +NumberOfKeyToSearch=Кількість символів для запуску пошуку: %s +NumberOfBytes=Кількість байт +SearchString=Рядок пошуку +NotAvailableWhenAjaxDisabled=Недоступно, коли Ajax відключений +AllowToSelectProjectFromOtherCompany=В документі контрагента можна вибрати проект, пов'язаний з іншим контрагентом +JavascriptDisabled=JavaScript відключений +UsePreviewTabs=Використовуйте вкладки попереднього перегляду +ShowPreview=Показати попередній перегляд +PreviewNotAvailable=Попередній перегляд недоступний +ThemeCurrentlyActive=Тема наразі активна +CurrentTimeZone=PHP TimeZone (сервер) +MySQLTimeZone=TimeZone MySql (база даних) +TZHasNoEffect=Дати зберігаються та повертаються сервером баз даних так, ніби вони зберігаються як подані рядки. Часовий пояс діє лише при використанні функції UNIX_TIMESTAMP (яку не використовує Dolibarr, тому часовий пояс бази даних не повинен мати ніякого ефекту, навіть якщо він був змінений після введення даних). +Space=Простір +Table=Таблиця +Fields=Поля +Index=Покажчик +Mask=Маска +NextValue=Наступне значення +NextValueForInvoices=Наступне значення (рахунки-фактури) +NextValueForCreditNotes=Наступне значення (кредитні нотатки) +NextValueForDeposit=Наступне значення (початковий внесок) +NextValueForReplacements=Наступне значення (заміни) +MustBeLowerThanPHPLimit=Примітка: ваша конфігурація PHP наразі обмежує максимальний розмір файлів для завантаження на %s %s, незалежно від значення цього параметра +NoMaxSizeByPHPLimit=Примітка: у вашій конфігурації PHP не встановлено обмеження +MaxSizeForUploadedFiles=Максимальний розмір для завантажених файлів (0 для заборони будь-яких завантажень) +UseCaptchaCode=Використовувати графічний код (CAPTCHA) на сторінці входу +AntiVirusCommand=Повний шлях команди антивірусу +AntiVirusCommandExample=Приклад для ClamAv Daemon (потрібен clamav-daemon): /usr/bin/clamdscan
    Приклад для ClamWin (дуже-дуже повільно): c:\\Progra~1\\ClamWin\\bin\\clamscan.exe +AntiVirusParam= Решта параметрів командного рядка +AntiVirusParamExample=Приклад для ClamAv Daemon: --fdpass
    Приклад для ClamWin: --database="C:\\Program Files (x86)\\ClamWin\\lib" +ComptaSetup=Налаштування модуля обліку +UserSetup=Управління користувачами +MultiCurrencySetup=Налаштування багато-валютних продаж +MenuLimits=Обмеження та точність +MenuIdParent=ID батьківського меню +DetailMenuIdParent=ID батьківського меню (порожній для кореневого меню) +DetailPosition=впорядкуйте номери, щоб визначити положення меню AllMenus=Всі -NotConfigured=Module/Application not configured -Active=Active -SetupShort=Setup -OtherOptions=Other options -OtherSetup=Other Setup -CurrentValueSeparatorDecimal=Decimal separator -CurrentValueSeparatorThousand=Thousand separator -Destination=Destination -IdModule=Module ID -IdPermissions=Permissions ID -LanguageBrowserParameter=Parameter %s -LocalisationDolibarrParameters=Localization parameters -ClientTZ=Client Time Zone (user) -ClientHour=Client time (user) -OSTZ=Server OS Time Zone -PHPTZ=PHP server Time Zone -DaylingSavingTime=Daylight saving time -CurrentHour=PHP Time (server) -CurrentSessionTimeOut=Current session timeout -YouCanEditPHPTZ=To set a different PHP timezone (not required), you can try to add a .htaccess file with a line like this "SetEnv TZ Europe/Paris" -HoursOnThisPageAreOnServerTZ=Warning, in contrary of other screens, hours on this page are not in your local timezone, but of the timezone of the server. -Box=Widget -Boxes=Widgets -MaxNbOfLinesForBoxes=Max. number of lines for widgets -AllWidgetsWereEnabled=All available widgets are enabled -PositionByDefault=Default order -Position=Position -MenusDesc=Menu managers set content of the two menu bars (horizontal and vertical). -MenusEditorDesc=The menu editor allows you to define custom menu entries. Use it carefully to avoid instability and permanently unreachable menu entries.
    Some modules add menu entries (in menu All mostly). If you remove some of these entries by mistake, you can restore them disabling and reenabling the module. -MenuForUsers=Menu for users -LangFile=.lang file -Language_en_US_es_MX_etc=Language (en_US, es_MX, ...) -System=System -SystemInfo=System information -SystemToolsArea=System tools area -SystemToolsAreaDesc=This area provides administration functions. Use the menu to choose the required feature. -Purge=Purge -PurgeAreaDesc=This page allows you to delete all files generated or stored by Dolibarr (temporary files or all files in %s directory). Using this feature is not normally necessary. It is provided as a workaround for users whose Dolibarr is hosted by a provider that does not offer permissions to delete files generated by the web server. -PurgeDeleteLogFile=Delete log files, including %s defined for Syslog module (no risk of losing data) -PurgeDeleteTemporaryFiles=Delete all temporary files (no risk of losing data). Note: Deletion is done only if the temp directory was created 24 hours ago. -PurgeDeleteTemporaryFilesShort=Delete temporary files -PurgeDeleteAllFilesInDocumentsDir=Delete all files in directory: %s.
    This will delete all generated documents related to elements (third parties, invoices etc...), files uploaded into the ECM module, database backup dumps and temporary files. -PurgeRunNow=Purge now -PurgeNothingToDelete=No directory or files to delete. -PurgeNDirectoriesDeleted=%s files or directories deleted. -PurgeNDirectoriesFailed=Failed to delete %s files or directories. -PurgeAuditEvents=Purge all security events -ConfirmPurgeAuditEvents=Are you sure you want to purge all security events? All security logs will be deleted, no other data will be removed. -GenerateBackup=Generate backup -Backup=Backup -Restore=Restore -RunCommandSummary=Backup has been launched with the following command -BackupResult=Backup result -BackupFileSuccessfullyCreated=Backup file successfully generated -YouCanDownloadBackupFile=The generated file can now be downloaded -NoBackupFileAvailable=No backup files available. -ExportMethod=Export method -ImportMethod=Import method -ToBuildBackupFileClickHere=To build a backup file, click here. -ImportMySqlDesc=To import a MySQL backup file, you may use phpMyAdmin via your hosting or use the mysql command from the Command line.
    For example: -ImportPostgreSqlDesc=To import a backup file, you must use pg_restore command from command line: +NotConfigured=Модуль/додаток не налаштовано +Active=Активно +SetupShort=Встановлення +OtherOptions=Інші опції +OtherSetup=Інші налаштування +CurrentValueSeparatorDecimal=Роздільник дробів +CurrentValueSeparatorThousand=Роздільник тисяч +Destination=Місце розташування +IdModule=ID модуля +IdPermissions=ID дозволів +LanguageBrowserParameter=Параметр %s +LocalisationDolibarrParameters=Параметри локалізації +ClientTZ=Клієнтський часовий пояс (користувач) +ClientHour=Клієнтський час (користувач) +OSTZ=Часовий пояс ОС сервера +PHPTZ=Часовий пояс сервера PHP +DaylingSavingTime=Літній час +CurrentHour=Час PHP (сервер) +CurrentSessionTimeOut=Там-аут поточної сесії +YouCanEditPHPTZ=Щоб встановити інший часовий пояс PHP (не обов'язково), ви можете спробувати додати в файл .htaccess такий рядок, як "SetEnv TZ Europe/Paris" +HoursOnThisPageAreOnServerTZ=Попередження, на відміну від інших екранів, час на цій сторінці знаходяться не у вашому локальному часовому поясі, а у часовому поясі сервера. +Box=Віджет +Boxes=Віджети +MaxNbOfLinesForBoxes=Макс. кількість рядків для віджетів +AllWidgetsWereEnabled=Усі доступні віджети ввімкнено +PositionByDefault=Порядок за замовчуванням +Position=Позиція +MenusDesc=Менеджери меню встановлюють вміст двох рядків меню (горизонтального та вертикального). +MenusEditorDesc=Редактор меню дозволяє визначити власні записи меню. Використовуйте його обережно, щоб уникнути нестабільності та постійно недоступних записів меню.
    Деякі модулі додають записи меню (в меню Усі зазвичай). Якщо ви видалите деякі з цих даних помилково, ви можете відновити їх відключивши та повторно увімкнувши модулі. +MenuForUsers=Меню для користувачів +LangFile=.lang файл +Language_en_US_es_MX_etc=Мова (en_US, es_MX, ...) +System=Система +SystemInfo=Інформація про систему +SystemToolsArea=Область системних інструментів +SystemToolsAreaDesc=Ця область забезпечує функції адміністрування. Використовуйте меню, щоб вибрати необхідну функцію. +Purge=Чистка +PurgeAreaDesc=Ця сторінка дозволяє видалити всі файли, що були створені або зберігаються Dolibarr (тимчасові файли або всі файли в каталозі %s ). Використовувати цю функцію зазвичай не потрібно. Вона надається як рішення для користувачів, у яких Dolibarr розміщений у провайдера, що не надає дозволу на видалення файлів, створених веб-сервером. +PurgeDeleteLogFile=Видалення файлів журналів, включаючи %s , визначених для модуля Syslog (немає ризику втрати даних) +PurgeDeleteTemporaryFiles=Видаліть усі тимчасові файли (без ризику втрати даних). Примітка: Видалення робиться лише в тому випадку, якщо тимчасовий каталог був створений 24 години тому. +PurgeDeleteTemporaryFilesShort=Видалення тимчасових файлів +PurgeDeleteAllFilesInDocumentsDir=Видалить усі файли в каталозі: %s .
    Це видалить усі згенеровані документи, пов'язані з елементами (контрагенти, рахунки тощо), файли, завантажені в модуль ECM, резервні копії бази даних та тимчасові файли. +PurgeRunNow=Очистити зараз +PurgeNothingToDelete=Немає каталогів або файлів для видалення. +PurgeNDirectoriesDeleted=Файли або каталоги %s видалено. +PurgeNDirectoriesFailed=Не вдалося видалити файли чи каталоги %s . +PurgeAuditEvents=Очистити усі події безпеки +ConfirmPurgeAuditEvents=Ви впевнені, що хочете очистити всі події безпеки? Усі журнали безпеки будуть видалені, інші дані не будуть видалені. +GenerateBackup=Створити резервну копію +Backup=Резервна копія +Restore=Відновлення резервної копії +RunCommandSummary=Резервне копіювання було запущено з використанням наступної команди +BackupResult=Результат резервного копіювання +BackupFileSuccessfullyCreated=Файл резервної копії успішно створено +YouCanDownloadBackupFile=Згенерований файл тепер можна завантажити +NoBackupFileAvailable=Файлів резервного копіювання немає. +ExportMethod=Спосіб експорту +ImportMethod=Спосіб імпорту +ToBuildBackupFileClickHere=Щоб створити файл резервної копії, натисніть тут. +ImportMySqlDesc=Щоб імпортувати файл резервної копії MySQL, ви можете використовувати phpMyAdmin через ваш хостинг або використовувати команду mysql з командного рядка.
    Наприклад: +ImportPostgreSqlDesc=Щоб імпортувати файл резервної копії, потрібно використовувати команду pg_restore з командного рядка: ImportMySqlCommand=%s %s < mybackupfile.sql ImportPostgreSqlCommand=%s %s mybackupfile.sql -FileNameToGenerate=Filename for backup: -Compression=Compression -CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import -CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later -ExportCompatibility=Compatibility of generated export file -ExportUseMySQLQuickParameter=Use the --quick parameter -ExportUseMySQLQuickParameterHelp=The '--quick' parameter helps limit RAM consumption for large tables. -MySqlExportParameters=MySQL export parameters -PostgreSqlExportParameters= PostgreSQL export parameters -UseTransactionnalMode=Use transactional mode -FullPathToMysqldumpCommand=Full path to mysqldump command -FullPathToPostgreSQLdumpCommand=Full path to pg_dump command -AddDropDatabase=Add DROP DATABASE command -AddDropTable=Add DROP TABLE command -ExportStructure=Structure -NameColumn=Name columns -ExtendedInsert=Extended INSERT -NoLockBeforeInsert=No lock commands around INSERT -DelayedInsert=Delayed insert -EncodeBinariesInHexa=Encode binary data in hexadecimal -IgnoreDuplicateRecords=Ignore errors of duplicate record (INSERT IGNORE) -AutoDetectLang=Autodetect (browser language) -FeatureDisabledInDemo=Feature disabled in demo -FeatureAvailableOnlyOnStable=Feature only available on official stable versions -BoxesDesc=Widgets are components showing some information that you can add to personalize some pages. You can choose between showing the widget or not by selecting target page and clicking 'Activate', or by clicking the trashcan to disable it. -OnlyActiveElementsAreShown=Only elements from enabled modules are shown. -ModulesDesc=The modules/applications determine which features are available in the software. Some modules require permissions to be granted to users after activating the module. Click the on/off button %s of each module to enable or disable a module/application. -ModulesMarketPlaceDesc=You can find more modules to download on external websites on the Internet... -ModulesDeployDesc=If permissions on your file system allow it, you can use this tool to deploy an external module. The module will then be visible on the tab %s. -ModulesMarketPlaces=Find external app/modules -ModulesDevelopYourModule=Develop your own app/modules -ModulesDevelopDesc=You may also develop your own module or find a partner to develop one for you. -DOLISTOREdescriptionLong=Instead of switching on www.dolistore.com web site to find an external module, you can use this embedded tool that will perform the search on the external market place for you (may be slow, need an internet access)... -NewModule=New module -FreeModule=Free -CompatibleUpTo=Compatible with version %s -NotCompatible=This module does not seem compatible with your Dolibarr %s (Min %s - Max %s). -CompatibleAfterUpdate=This module requires an update to your Dolibarr %s (Min %s - Max %s). -SeeInMarkerPlace=See in Market place -SeeSetupOfModule=See setup of module %s -Updated=Updated -Nouveauté=Novelty -AchatTelechargement=Buy / Download -GoModuleSetupArea=To deploy/install a new module, go to the Module setup area: %s. -DoliStoreDesc=DoliStore, the official market place for Dolibarr ERP/CRM external modules -DoliPartnersDesc=List of companies providing custom-developed modules or features.
    Note: since Dolibarr is an open source application, anyone experienced in PHP programming should be able to develop a module. -WebSiteDesc=External websites for more add-on (non-core) modules... -DevelopYourModuleDesc=Some solutions to develop your own module... -URL=URL -RelativeURL=Relative URL -BoxesAvailable=Widgets available -BoxesActivated=Widgets activated +FileNameToGenerate=Назва файлу резервної копії: +Compression=Стиснення +CommandsToDisableForeignKeysForImport=Команда для відключення сторонніх ключів при імпорті +CommandsToDisableForeignKeysForImportWarning=Обов’язково, якщо ви хочете пізніше відновити дамп sql +ExportCompatibility=Сумісність створеного експортного файлу +ExportUseMySQLQuickParameter=Використовувати параметр --quick +ExportUseMySQLQuickParameterHelp=Параметр '--quick' допомагає обмежити споживання оперативної пам’яті при обробці великих таблиць. +MySqlExportParameters=Параметри експорту MySQL +PostgreSqlExportParameters= Параметри експорту PostgreSQL +UseTransactionnalMode=Використовуйте режим транзакцій +FullPathToMysqldumpCommand=Повний шлях до команди mysqldump +FullPathToPostgreSQLdumpCommand=Повний шлях до команди pg_dump +AddDropDatabase=Додати команду DROP DATABASE +AddDropTable=Додати команду DROP TABLE +ExportStructure=Структура +NameColumn=Імена стовпців +ExtendedInsert=Розширений INSERT +NoLockBeforeInsert=Не застосовувати блокування перед командою INSERT +DelayedInsert=Відкладена вставка +EncodeBinariesInHexa=Кодувати двійкові дані в шістнадцятковий формат +IgnoreDuplicateRecords=Ігнорувати помилки дублювання запису (INSERT IGNORE) +AutoDetectLang=Автоматичне виявлення (мова браузера) +FeatureDisabledInDemo=Функція відключена в демонстрації +FeatureAvailableOnlyOnStable=Функція доступна лише в офіційних стабільних версіях +BoxesDesc=Віджети - це компоненти, які показують певну інформацію, яку ви можете додати, щоб персоналізувати деякі сторінки. Ви можете вибрати, показувати віджет чи ні, вибравши цільову сторінку та натиснувши "Активувати", або натиснувши смітник, щоб відключити його. +OnlyActiveElementsAreShown=Відображаються лише елементи з включених модулів. +ModulesDesc=Модулі/додатки визначають, які функції доступні в програмному забезпеченні. Деякі модулі вимагають надання дозволів користувачам після активації модуля. Натисніть кнопку включення/вимкнення %s кожного модуля, щоб увімкнути або вимкнути модуль/додаток. +ModulesMarketPlaceDesc=Ви можете знайти більше модулів для завантаження на зовнішніх веб-сайтах в Інтернеті ... +ModulesDeployDesc=Якщо дозволи у вашій файловій системі це дозволяють, ви можете використовувати цей інструмент для розгортання зовнішнього модуля. Потім модуль буде видно на вкладці %s . +ModulesMarketPlaces=Знайти зовнішні додатки/модулі +ModulesDevelopYourModule=Розробити власний додаток/модуль +ModulesDevelopDesc=Ви також можете розробити власний модуль або знайти партнера, який розробить його для вас. +DOLISTOREdescriptionLong=Замість того, щоб переходити на веб-сайт www.dolistore.com , щоб знайти зовнішній модуль, ви можете використовувати цей вбудований інструмент, який здійснюватиме пошук на зовнішньому ринку для вас (може бути повільним, потрібен доступ в Інтернет) ... +NewModule=Новий модуль +FreeModule=Безкоштовно +CompatibleUpTo=Сумісний з версією %s +NotCompatible=Цей модуль не сумісний з вашою версією Dolibarr %s (Мін %s - Макс %s). +CompatibleAfterUpdate=Цей модуль вимагає оновлення версії Dolibarr до %s (Мін %s - Макс %s). +SeeInMarkerPlace=Дивіться у магазині +SeeSetupOfModule=Див. налаштування модуля %s +Updated=Оновлено +Nouveauté=Новинка +AchatTelechargement=Придбати / завантажити +GoModuleSetupArea=Щоб розгорнути/встановити новий модуль, перейдіть на сторінку встановлення модулів: %s . +DoliStoreDesc=DoliStore, офіційне місце для зовнішніх модулів Dolibarr ERP / CRM +DoliPartnersDesc=Список компаній, що надають спеціально розроблені модулі або функції.
    Примітка: оскільки Dolibarr є програмою з відкритим кодом, будь-хто , досвідчений у програмуванні PHP, матє можливість розробляти модулі. +WebSiteDesc=Зовнішні веб-сайти для додаткових (непрофільних) модулів ... +DevelopYourModuleDesc=Деякі рішення для розробки власного модуля ... +URL=URL-адреса +RelativeURL=Відносна URL-адреса +BoxesAvailable=Доступні віджети +BoxesActivated=Активні віджети ActivateOn=Activate on ActiveOn=Activated on -SourceFile=Source file -AvailableOnlyIfJavascriptAndAjaxNotDisabled=Available only if JavaScript is not disabled -Required=Required -UsedOnlyWithTypeOption=Used by some agenda option only -Security=Security -Passwords=Passwords -DoNotStoreClearPassword=Encrypt passwords stored in database (NOT as plain-text). It is strongly recommended to activate this option. -MainDbPasswordFileConfEncrypted=Encrypt database password stored in conf.php. It is strongly recommended to activate this option. -InstrucToEncodePass=To have password encoded into the conf.php file, replace the line
    $dolibarr_main_db_pass="...";
    by
    $dolibarr_main_db_pass="crypted:%s"; -InstrucToClearPass=To have password decoded (clear) into the conf.php file, replace the line
    $dolibarr_main_db_pass="crypted:...";
    by
    $dolibarr_main_db_pass="%s"; -ProtectAndEncryptPdfFiles=Protect generated PDF files. This is NOT recommended as it breaks bulk PDF generation. -ProtectAndEncryptPdfFilesDesc=Protection of a PDF document keeps it available to read and print with any PDF browser. However, editing and copying is not possible anymore. Note that using this feature makes building of a global merged PDFs not working. -Feature=Feature -DolibarrLicense=License -Developpers=Developers/contributors -OfficialWebSite=Dolibarr official web site -OfficialWebSiteLocal=Local web site (%s) -OfficialWiki=Dolibarr documentation / Wiki -OfficialDemo=Dolibarr online demo -OfficialMarketPlace=Official market place for external modules/addons -OfficialWebHostingService=Referenced web hosting services (Cloud hosting) -ReferencedPreferredPartners=Preferred Partners -OtherResources=Other resources -ExternalResources=External Resources -SocialNetworks=Social Networks -ForDocumentationSeeWiki=For user or developer documentation (Doc, FAQs...),
    take a look at the Dolibarr Wiki:
    %s -ForAnswersSeeForum=For any other questions/help, you can use the Dolibarr forum:
    %s -HelpCenterDesc1=Here are some resources for getting help and support with Dolibarr. -HelpCenterDesc2=Some of these resources are only available in english. -CurrentMenuHandler=Current menu handler -MeasuringUnit=Measuring unit -LeftMargin=Left margin -TopMargin=Top margin -PaperSize=Paper type -Orientation=Orientation +SourceFile=Вихідний файл +AvailableOnlyIfJavascriptAndAjaxNotDisabled=Доступно лише якщо JavaScript не відключений +Required=обов'язково +UsedOnlyWithTypeOption=Використовується лише для деяких варіантів порядку денного +Security=Безпека +Passwords=Паролі +DoNotStoreClearPassword=Шифрувати паролі, що зберігаються в базі даних (НЕ як звичайний текст). Наполегливо рекомендується активувати цю опцію. +MainDbPasswordFileConfEncrypted=Зашифрувати пароль бази даних, що зберігається в conf.php. Наполегливо рекомендується активувати цю опцію. +InstrucToEncodePass=Щоб пароль був закодований у файл conf.php , замініть рядок
    $ dolibarr_main_db_pass = "...";
    на
    $ dolibarr_main_db_pass = "crypted: %s"; +InstrucToClearPass=Щоб пароль у файлі conf.php був декодований (очистився), замініть рядок
    $ dolibarr_main_db_pass = "crypted: ...";
    на
    $ dolibarr_main_db_pass = "%s"; +ProtectAndEncryptPdfFiles=Захистіть створені файли PDF. Це НЕ рекомендується, оскільки це порушує масову генерацію PDF. +ProtectAndEncryptPdfFilesDesc=Захист документа PDF дозволяє зберігати його та читати з будь-якого переглядача PDF. Однак редагування та копіювання вже неможливе. Зауважте, що ця функція робить створення глобальних об'єднаних PDF-файлів неможливим. +Feature=Особливість +DolibarrLicense=Ліцензія +Developpers=Розробники/дописувачі +OfficialWebSite=Офіційний веб-сайт Dolibarr +OfficialWebSiteLocal=Місцевий веб-сайт (%s) +OfficialWiki=Документація Dolibarr / Wiki +OfficialDemo=Онлайн демонстрація Dolibarr +OfficialMarketPlace=Офіційний магазин зовнішніх модулів/доповнень +OfficialWebHostingService=Рекомендовані провайдери послуг веб-хостингу (хмарний хостинг) +ReferencedPreferredPartners=Партнери +OtherResources=Інші ресурси +ExternalResources=Додаткові ресурси +SocialNetworks=Соціальні мережі +ForDocumentationSeeWiki=Для перегляду довідки користувача або документації розробника (Doc, FAQ...),
    перейдіть на Dolibarr Wiki:
    %s +ForAnswersSeeForum=Для будь-яких інших питань/допомоги ви можете скористатися форумом Dolibarr:
    %s +HelpCenterDesc1=Ось деякі ресурси для отримання допомоги та підтримки з Dolibarr. +HelpCenterDesc2=Деякі з цих ресурсів доступні лише англійською мовою. +CurrentMenuHandler=Поточний обробник меню +MeasuringUnit=Вимірювальний пристрій +LeftMargin=Ліве поле +TopMargin=Верхнє поле +PaperSize=Тип паперу +Orientation=Орієнтація SpaceX=Space X SpaceY=Space Y -FontSize=Font size -Content=Content -NoticePeriod=Notice period -NewByMonth=New by month +FontSize=Розмір шрифту +Content=Зміст +NoticePeriod=Період повідомлення +NewByMonth=Новий за місяць Emails=Emails -EMailsSetup=Emails setup -EMailsDesc=This page allows you to override your default PHP parameters for email sending. In most cases on Unix/Linux OS, the PHP setup is correct and these parameters are unnecessary. -EmailSenderProfiles=Emails sender profiles -EMailsSenderProfileDesc=You can keep this section empty. If you enter some emails here, they will be added to the list of possible senders into the combobox when your write a new email. -MAIN_MAIL_SMTP_PORT=SMTP/SMTPS Port (default value in php.ini: %s) -MAIN_MAIL_SMTP_SERVER=SMTP/SMTPS Host (default value in php.ini: %s) -MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=SMTP/SMTPS Port (Not defined into PHP on Unix-like systems) -MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP/SMTPS Host (Not defined into PHP on Unix-like systems) -MAIN_MAIL_EMAIL_FROM=Sender email for automatic emails (default value in php.ini: %s) -MAIN_MAIL_ERRORS_TO=Email used for error returns emails (fields 'Errors-To' in emails sent) -MAIN_MAIL_AUTOCOPY_TO= Copy (Bcc) all sent emails to -MAIN_DISABLE_ALL_MAILS=Disable all email sending (for test purposes or demos) -MAIN_MAIL_FORCE_SENDTO=Send all emails to (instead of real recipients, for test purposes) -MAIN_MAIL_ENABLED_USER_DEST_SELECT=Suggest emails of employees (if defined) into the list of predefined recipient when writing a new email -MAIN_MAIL_SENDMODE=Email sending method -MAIN_MAIL_SMTPS_ID=SMTP ID (if sending server requires authentication) -MAIN_MAIL_SMTPS_PW=SMTP Password (if sending server requires authentication) -MAIN_MAIL_EMAIL_TLS=Use TLS (SSL) encryption -MAIN_MAIL_EMAIL_STARTTLS=Use TLS (STARTTLS) encryption -MAIN_MAIL_EMAIL_DKIM_ENABLED=Use DKIM to generate email signature -MAIN_MAIL_EMAIL_DKIM_DOMAIN=Email Domain for use with dkim -MAIN_MAIL_EMAIL_DKIM_SELECTOR=Name of dkim selector -MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Private key for dkim signing -MAIN_DISABLE_ALL_SMS=Disable all SMS sending (for test purposes or demos) -MAIN_SMS_SENDMODE=Method to use to send SMS -MAIN_MAIL_SMS_FROM=Default sender phone number for SMS sending -MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email or Company email) -UserEmail=User email -CompanyEmail=Company Email -FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. -SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. -ModuleSetup=Module setup -ModulesSetup=Modules/Application setup -ModuleFamilyBase=System -ModuleFamilyCrm=Customer Relationship Management (CRM) -ModuleFamilySrm=Vendor Relationship Management (VRM) -ModuleFamilyProducts=Product Management (PM) -ModuleFamilyHr=Human Resource Management (HR) -ModuleFamilyProjects=Projects/Collaborative work +EMailsSetup=Налаштування Email +EMailsDesc=Тут Ви можете перевизначити параметри надсилання електронної пошти замість параметрів PHP. У більшості Unix/Linux OS налаштування PHP правильні і тут нічого міняти не потрібно. +EmailSenderProfiles=Профілі надсилання ел. пошти +EMailsSenderProfileDesc=Ви можете залишати цей розділ порожнім. Якщо ви введете тут деякі повідомлення електронної пошти, вони будуть додані до списку можливих відправників під час написання нового електронного листа. +MAIN_MAIL_SMTP_PORT=Порт SMTP/SMTPS (значення за замовчуванням у php.ini: %s ) +MAIN_MAIL_SMTP_SERVER=SMTP/SMTPS сервер (значення за замовчуванням у php.ini: %s ) +MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike=Порт SMTP/SMTPS (Не визначено в PHP для Unix-подібних систем) +MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike=SMTP/SMTPS сервер (Не визначено в PHP для Unix-подібних систем) +MAIN_MAIL_EMAIL_FROM=Відправник електронної пошти для автоматичних електронних листів (значення за замовчуванням у php.ini: %s ) +MAIN_MAIL_ERRORS_TO=Електронний лист, який використовується для повернення повідомлень про помилку (поле "Errors-To" в надісланих електронних листах) +MAIN_MAIL_AUTOCOPY_TO= Копія (Bcc) усіх листів надсилати до +MAIN_DISABLE_ALL_MAILS=Вимкнути надсилання всіх електронної пошти (для тестових цілей або демонстрацій) +MAIN_MAIL_FORCE_SENDTO=Надіслати всі електронні листи до (замість реальних одержувачів, для тестових цілей) +MAIN_MAIL_ENABLED_USER_DEST_SELECT=Пропонувати електронні адреси працівників (якщо їх визначено) у списку попередньо визначених одержувачів під час написання нового електронного листа +MAIN_MAIL_SENDMODE=Спосіб надсилання електронної пошти +MAIN_MAIL_SMTPS_ID=SMTP-ідентифікатор (якщо для надсилання сервер вимагає автентифікації) +MAIN_MAIL_SMTPS_PW=Пароль SMTP (якщо для надсилання сервер вимагає автентифікації) +MAIN_MAIL_EMAIL_TLS=Використовувати шифрування TLS (SSL) +MAIN_MAIL_EMAIL_STARTTLS=Використовувати шифрування TLS (STARTTLS) +MAIN_MAIL_EMAIL_DKIM_ENABLED=Використовувати DKIM для створення підпису електронної пошти +MAIN_MAIL_EMAIL_DKIM_DOMAIN=Домен електронної пошти для використання з dkim +MAIN_MAIL_EMAIL_DKIM_SELECTOR=Ім'я селектора dkim +MAIN_MAIL_EMAIL_DKIM_PRIVATE_KEY=Приватний ключ для підписання dkim +MAIN_DISABLE_ALL_SMS=Вимкнути надсилання всіх SMS (для тестових цілей або демонстрацій) +MAIN_SMS_SENDMODE=Спосіб що використовується для надсилання SMS +MAIN_MAIL_SMS_FROM=Номер телефону відправника за замовчуванням для надсилання SMS +MAIN_MAIL_DEFAULT_FROMTYPE=Електронна адреса відправника за замовчуванням для ручного надсилання (Електронна адреса користувача або компанії) +UserEmail=Електронна пошта користувача +CompanyEmail=Корпоративна електронна пошта +FeatureNotAvailableOnLinux=Функція недоступна в Unix-системах. Протестуйте свою програму sendmail локально. +FixOnTransifex=Виправте переклад на онлайн-платформі перекладу проекту +SubmitTranslation=Якщо переклад на цю мову не завершений або ви виявили помилки, ви можете виправити це, відредагувавши файли в каталозі langs/ %s та подавши свої зміни на www.transifex.com/dolibarr-association/dolibarr/ +SubmitTranslationENUS=Якщо переклад на цю мову не завершений або ви виявили помилки, ви можете виправити це, відредагувавши файли в каталозі langs/ %s та подавши змінені файли на dolibarr.org/forum або, якщо ви розробник, з PR на github .com/Dolibarr/dolibarr +ModuleSetup=Налаштування модулів +ModulesSetup=Налаштування модулів та додатків +ModuleFamilyBase=Система +ModuleFamilyCrm=Управління відносинами з клієнтами (CRM) +ModuleFamilySrm=Управління відносинами з постачальниками (VRM) +ModuleFamilyProducts=Управління продуктами (PM) +ModuleFamilyHr=Управління людськими ресурсами (HR) +ModuleFamilyProjects=Проекти/Спільна робота ModuleFamilyOther=Інший -ModuleFamilyTechnic=Multi-modules tools -ModuleFamilyExperimental=Experimental modules -ModuleFamilyFinancial=Financial Modules (Accounting/Treasury) +ModuleFamilyTechnic=Багатомодульні інструменти +ModuleFamilyExperimental=Експериментальні модулі +ModuleFamilyFinancial=Фінансові модулі (бухгалтерський облік / казначейство) ModuleFamilyECM=Electronic Content Management (ECM) -ModuleFamilyPortal=Websites and other frontal application -ModuleFamilyInterface=Interfaces with external systems -MenuHandlers=Menu handlers -MenuAdmin=Menu editor -DoNotUseInProduction=Do not use in production -ThisIsProcessToFollow=Upgrade procedure: -ThisIsAlternativeProcessToFollow=This is an alternative setup to process manually: -StepNb=Step %s -FindPackageFromWebSite=Find a package that provides the features you need (for example on the official web site %s). -DownloadPackageFromWebSite=Download package (for example from the official web site %s). -UnpackPackageInDolibarrRoot=Unpack/unzip the packaged files into your Dolibarr server directory: %s -UnpackPackageInModulesRoot=To deploy/install an external module, unpack/unzip the packaged files into the server directory dedicated to external modules:
    %s -SetupIsReadyForUse=Module deployment is finished. You must however enable and setup the module in your application by going to the page setup modules: %s. -NotExistsDirect=The alternative root directory is not defined to an existing directory.
    -InfDirAlt=Since version 3, it is possible to define an alternative root directory. This allows you to store, into a dedicated directory, plug-ins and custom templates.
    Just create a directory at the root of Dolibarr (eg: custom).
    -InfDirExample=
    Then declare it in the file conf.php
    $dolibarr_main_url_root_alt='/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    If these lines are commented with "#", to enable them, just uncomment by removing the "#" character. -YouCanSubmitFile=You can upload the .zip file of module package from here: -CurrentVersion=Dolibarr current version -CallUpdatePage=Browse to the page that updates the database structure and data: %s. -LastStableVersion=Latest stable version -LastActivationDate=Latest activation date -LastActivationAuthor=Latest activation author -LastActivationIP=Latest activation IP -UpdateServerOffline=Update server offline -WithCounter=Manage a counter -GenericMaskCodes=You may enter any numbering mask. In this mask, the following tags could be used:
    {000000} corresponds to a number which will be incremented on each %s. Enter as many zeros as the desired length of the counter. The counter will be completed by zeros from the left in order to have as many zeros as the mask.
    {000000+000} same as previous but an offset corresponding to the number to the right of the + sign is applied starting on first %s.
    {000000@x} same as previous but the counter is reset to zero when month x is reached (x between 1 and 12, or 0 to use the early months of fiscal year defined in your configuration, or 99 to reset to zero every month). If this option is used and x is 2 or higher, then sequence {yy}{mm} or {yyyy}{mm} is also required.
    {dd} day (01 to 31).
    {mm} month (01 to 12).
    {yy}, {yyyy} or {y} year over 2, 4 or 1 numbers.
    -GenericMaskCodes2={cccc} the client code on n characters
    {cccc000} the client code on n characters is followed by a counter dedicated for customer. This counter dedicated to customer is reset at same time than global counter.
    {tttt} The code of third party type on n characters (see menu Home - Setup - Dictionary - Types of third parties). If you add this tag, the counter will be different for each type of third party.
    -GenericMaskCodes3=All other characters in the mask will remain intact.
    Spaces are not allowed.
    -GenericMaskCodes4a=Example on the 99th %s of the third party TheCompany, with date 2007-01-31:
    -GenericMaskCodes4b=Example on third party created on 2007-03-01:
    -GenericMaskCodes4c=Example on product created on 2007-03-01:
    -GenericMaskCodes5=ABC{yy}{mm}-{000000} will give ABC0701-000099
    {0000+100@1}-ZZZ/{dd}/XXX will give 0199-ZZZ/31/XXX
    IN{yy}{mm}-{0000}-{t} will give IN0701-0099-A if the type of company is 'Responsable Inscripto' with code for type that is 'A_RI' -GenericNumRefModelDesc=Returns a customizable number according to a defined mask. -ServerAvailableOnIPOrPort=Server is available at address %s on port %s -ServerNotAvailableOnIPOrPort=Server is not available at address %s on port %s -DoTestServerAvailability=Test server connectivity -DoTestSend=Test sending -DoTestSendHTML=Test sending HTML -ErrorCantUseRazIfNoYearInMask=Error, can't use option @ to reset counter each year if sequence {yy} or {yyyy} is not in mask. -ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Error, can't use option @ if sequence {yy}{mm} or {yyyy}{mm} is not in mask. -UMask=UMask parameter for new files on Unix/Linux/BSD/Mac file system. -UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example).
    It must be the octal value (for example, 0666 means read and write for everyone).
    This parameter is useless on a Windows server. -SeeWikiForAllTeam=Take a look at the Wiki page for a list of contributors and their organization -UseACacheDelay= Delay for caching export response in seconds (0 or empty for no cache) -DisableLinkToHelpCenter=Hide link "Need help or support" on login page -DisableLinkToHelp=Hide link to online help "%s" -AddCRIfTooLong=There is no automatic text wrapping, text that is too long will not display on documents. Please add carriage returns in the text area if needed. -ConfirmPurge=Are you sure you want to execute this purge?
    This will permanently delete all your data files with no way to restore them (ECM files, attached files...). -MinLength=Minimum length -LanguageFilesCachedIntoShmopSharedMemory=Files .lang loaded in shared memory -LanguageFile=Language file -ExamplesWithCurrentSetup=Examples with current configuration -ListOfDirectories=List of OpenDocument templates directories +ModuleFamilyPortal=Веб-сайти та інші публічні програми +ModuleFamilyInterface=Інтерфейси із зовнішніми системами +MenuHandlers=Обробники меню +MenuAdmin=Редактор меню +DoNotUseInProduction=Не використовувати у робочій системі +ThisIsProcessToFollow=Процедура оновлення: +ThisIsAlternativeProcessToFollow=Це альтернативна установка для обробки вручну: +StepNb=Крок %s +FindPackageFromWebSite=Знайдіть пакет, який надає необхідні функції (наприклад, на офіційному веб-сайті %s). +DownloadPackageFromWebSite=Завантажте пакет (наприклад, з офіційного веб-сайту %s). +UnpackPackageInDolibarrRoot=Розпакуйте/розархівуйте упаковані файли у каталог на сервері Dolibarr: %s +UnpackPackageInModulesRoot=Щоб розгорнути/встановити зовнішній модуль, розпакуйте / розархівуйте його файли в каталог сервера, призначений для зовнішніх модулів:
    %s +SetupIsReadyForUse=Розгортання модуля закінчено. Однак ви повинні ввімкнути та налаштувати модуль у вашому додатку, перейшовши на сторінку налаштування модулів: %s . +NotExistsDirect=Альтернативний кореневий каталог не визначений для існуючого каталогу.
    +InfDirAlt=Починаючи з версії 3, можна визначити альтернативну кореневу директорію. Це дозволяє зберігати у спеціалізованому каталозі, плагіни та спеціальні шаблони.
    Просто створіть каталог у корені Dolibarr (наприклад: custom).
    +InfDirExample=
    Потім оголосити його в файлі conf.php
    $ $dolibarr_main_url_root_alt='/custom'
    $dolibarr_main_document_root_alt='/path/of/dolibarr/htdocs/custom'
    Якщо ці рядки закоментовано знаком "#", то просто розкоментуйте їх, видаливши "#", щоб щоб увімкнути це . +YouCanSubmitFile=Ви можете відвантажити .zip файл пакету модулів звідси: +CurrentVersion=Поточна версія Dolibarr +CallUpdatePage=Перейдіть на сторінку, яка оновлює структуру бази даних та дані: %s. +LastStableVersion=Остання стабільна версія +LastActivationDate=Дата останньої активації +LastActivationAuthor=Автор останньої активації +LastActivationIP=IP останньої активації +UpdateServerOffline=Оновити сервер офлайн +WithCounter=Управління лічильником +GenericMaskCodes=Ви можете ввести будь-яку маску нумерації. У цій масці можуть бути використані такі теги:
    {000000} відповідає числу, яке буде збільшуватися для кожного %s. Введіть стільки нулів, скільки потрібно для бажаної довжини лічильника. Лічильник буде заповнений нулями зліва, щоб мати стільки нулів, як і маска.
    {000000+000} аналогічно попередньому, але зміщення, відповідає номеру праворуч від знака +, застосовується починаючи з першого %s.
    {000000@x} такий же, як і попередній, але лічильник скидається до нуля, коли досягається місяць x (x між 1 та 12, або 0, щоб використовувати перші місяці фінансового року, визначені у вашій конфігурації, або 99 для скидання в нуль щомісяця). Якщо цей параметр використовується і x дорівнює 2 або вище, також потрібно послідовність {yy} {mm} або {yyyy} {mm}.
    {dd} день (від 01 до 31).
    {mm} місяць (від 01 до 12).
    {yy} , {yyyy} або {y} рік 1, 2 або 4 цифри
    +GenericMaskCodes2= {cccc} код клієнта на n символів
    {cccc000}код клієнта на n символів, супроводжується лічильником, призначеним для замовника. Цей лічильник, призначений клієнту, скидається одночасно, з глобальним лічильником.
    {tttt} Код типу контрагента на n символів (див. меню Домашня сторінка - Налаштування - Словник - Типи контрагентів). Якщо ви додасте цей тег, лічильник буде різним для кожного типу контрагента.
    +GenericMaskCodes3=Усі інші символи в масці залишаться незмінними.
    Пробіли не допускаються.
    +GenericMaskCodes4a= Приклад 99-го %s контрагента TheCompany, з датою 2007-01-31:
    +GenericMaskCodes4b=Зразок контрагента, створеного 2007-03-01:
    +GenericMaskCodes4c=Зразок товару, створеного 2007-03-01:
    +GenericMaskCodes5=ABC{yy}{mm}-{000000} дасть ABC0701-000099
    {0000+100@1}-ZZZ/{dd}/XXX дасть 0199-ZZZ/31/XXX
    IN{yy}{mm}-{0000}-{t} дасть IN0701-0099-A якщо тип компанії 'Responsable Inscripto' з кодом типу 'A_RI' +GenericNumRefModelDesc=Повертає настроюване число відповідно до визначеної маски. +ServerAvailableOnIPOrPort=Сервер доступний за адресою %s з портом %s +ServerNotAvailableOnIPOrPort=Сервер недоступний за адресою %s з портом %s +DoTestServerAvailability=Тест підключення до серверу +DoTestSend=Тест надсилання +DoTestSendHTML=Тест надсилання HTML +ErrorCantUseRazIfNoYearInMask=Помилка, не можна використовувати параметр @ для скидання лічильника щороку, якщо послідовність {yy} або {yyyy} відсутня в масці. +ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Помилка, не можна використовувати варіант @, якщо послідовність {yy} {mm} або {yyyy} {mm} не в масці. +UMask=Параметр UMask для нових файлів у файловій системі Unix/Linux/BSD/Mac. +UMaskExplanation=Цей параметр дозволяє визначити дозволи, встановлені за замовчуванням для файлів, створених Dolibarr на сервері (наприклад, під час завантаження).
    Це має бути вісімкове значення (наприклад, 0666 означає читання та запис для всіх).
    Цей параметр не потрібний на сервері Windows. +SeeWikiForAllTeam=Погляньте на сторінку Wiki, щоб ознайомитись зі списком учасників та їх організацією +UseACacheDelay= Затримка для кешування відповіді експорту в секундах (0 або порожньо щоб не кешувати) +DisableLinkToHelpCenter=Сховати посилання " Потрібна допомога або підтримка " на сторінці входу +DisableLinkToHelp=Сховати посилання на Інтернет-допомогу " %s " +AddCRIfTooLong=Тут немає автоматичного переносу тексту, занадто довгий текст не відображатиметься в документах. Будь ласка, додайте знаки переносу у текстовій області, якщо потрібно. +ConfirmPurge=Ви впевнені, що хочете виконати цю чистку?
    Це назавжди видалить усі ваші файли даних, без можливості їх відновлення (файли ECM, додані файли ...). +MinLength=Мінімальна довжина +LanguageFilesCachedIntoShmopSharedMemory=Файли .lang завантажені в спільну пам'ять +LanguageFile=Мовний файл +ExamplesWithCurrentSetup=Приклади з поточною конфігурацією +ListOfDirectories=Список каталогів шаблонів OpenDocument ListOfDirectoriesForModelGenODT=List of directories containing templates files with OpenDocument format.

    Put here full path of directories.
    Add a carriage return between eah directory.
    To add a directory of the GED module, add here DOL_DATA_ROOT/ecm/yourdirectoryname.

    Files in those directories must end with .odt or .ods. -NumberOfModelFilesFound=Number of ODT/ODS template files found in these directories -ExampleOfDirectoriesForModelGen=Examples of syntax:
    c:\\mydir
    /home/mydir
    DOL_DATA_ROOT/ecm/ecmdir -FollowingSubstitutionKeysCanBeUsed=
    To know how to create your odt document templates, before storing them in those directories, read wiki documentation: +NumberOfModelFilesFound=Кількість файлів шаблонів ODT/ODS, знайдених у цих каталогах +ExampleOfDirectoriesForModelGen=Приклади синтаксису:
    c:\\mydir
    /home/mydir
    DOL_DATA_ROOT/ecm/ecmdir +FollowingSubstitutionKeysCanBeUsed=
    Щоб дізнатися, як створити шаблони odt-документів, перш ніж зберігати їх у цих каталогах, прочитайте документацію на wiki: FullListOnOnlineDocumentation=http://wiki.dolibarr.org/index.php/Create_an_ODT_document_template -FirstnameNamePosition=Position of Name/Lastname -DescWeather=The following images will be shown on the dashboard when the number of late actions reach the following values: -KeyForWebServicesAccess=Key to use Web Services (parameter "dolibarrkey" in webservices) -TestSubmitForm=Input test form -ThisForceAlsoTheme=Using this menu manager will also use its own theme whatever the user choice. Also this menu manager specialized for smartphones does not work on all smartphone. Use another menu manager if you experience problems with yours. -ThemeDir=Skins directory -ConnectionTimeout=Connection timeout -ResponseTimeout=Response timeout -SmsTestMessage=Test message from __PHONEFROM__ to __PHONETO__ -ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this feature. -SecurityToken=Key to secure URLs -NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s +FirstnameNamePosition=Розміщення імені та прізвища +DescWeather=Вибрані зображення будуть показані на панелі, коли кількість пізніх дій досягне таких значень: +KeyForWebServicesAccess=Ключ для використання веб-служб (параметр "dolibarrkey" у веб-сервісах) +TestSubmitForm=Тест вводу +ThisForceAlsoTheme=Використання цього менеджера меню також призведе до використання власної тему, незалежно від вибору користувача. Також цей менеджер меню, призначений для смартфонів, працює не на всіх смартфонах. Використовуйте інший менеджер меню, якщо у вас виникли проблеми зі цим. +ThemeDir=Каталог тем +ConnectionTimeout=Час очікування з'єднання +ResponseTimeout=Час очікування відповіді +SmsTestMessage=Тестове повідомлення від __PHONEFROM__ до __PHONETO__ +ModuleMustBeEnabledFirst=Спершу потрібно увімкнути модуль %s , якщо вам потрібна ця функція. +SecurityToken=Ключ до захищених URL-адрес +NoSmsEngine=Не встановлено провайдера послуг для надсилання SMS. Модулі підтримки провайдерів послуг может знайти тут: %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes -HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT -PDFRulesForSalesTax=Rules for Sales Tax / VAT -PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale -HideDescOnPDF=Hide products description -HideRefOnPDF=Hide products ref. +PDFDesc=Глобальні налаштування генерації PDF +PDFAddressForging=Правила вибору адреси +HideAnyVATInformationOnPDF=Сховати всю інформацію щодо податків та зборів +PDFRulesForSalesTax=Правила податків та зборів +PDFLocaltax=Правило для %s +HideLocalTaxOnPDF=Сховати значення %sв колонці податків та зборів +HideDescOnPDF=Сховати опис товарів +HideRefOnPDF=Сховати характеристики товарів HideDetailsOnPDF=Hide product lines details -PlaceCustomerAddressToIsoLocation=Use french standard position (La Poste) for customer address position -Library=Library -UrlGenerationParameters=Parameters to secure URLs -SecurityTokenIsUnique=Use a unique securekey parameter for each URL -EnterRefToBuildUrl=Enter reference for object %s -GetSecuredUrl=Get calculated URL -ButtonHideUnauthorized=Hide buttons for non-admin users for unauthorized actions instead of showing greyed disabled buttons -OldVATRates=Old VAT rate -NewVATRates=New VAT rate +PlaceCustomerAddressToIsoLocation=Використовувати французький стандарт (La Poste) розміщення для адрес контрагентів +Library=Бібліотека +UrlGenerationParameters=Параметри безпеки URL +SecurityTokenIsUnique=Використовувати унікальний ключ безпеки для кожної URL-адреси +EnterRefToBuildUrl=Введіть характеристику для об'єкта %s +GetSecuredUrl=Отримати обчислену URL-адресу +ButtonHideUnauthorized=Заховати для звичайних користувачів кнопки привілейованих функцій, замість того щоб відображати їх затемненими. +OldVATRates=Старе значення комісії +NewVATRates=Нове значення комісії PriceBaseTypeToChange=Modify on prices with base reference value defined on -MassConvert=Launch bulk conversion -PriceFormatInCurrentLanguage=Price Format In Current Language -String=String -TextLong=Long text -HtmlText=Html text -Int=Integer -Float=Float -DateAndTime=Date and hour -Unique=Unique -Boolean=Boolean (one checkbox) -ExtrafieldPhone = Phone -ExtrafieldPrice = Price +MassConvert=Запустити фонову конвертацію +PriceFormatInCurrentLanguage=Формат ціни в поточній мові +String=Текст +String1Line=String (1 line) +TextLong=Довгий текст +TextLongNLines=Long text (n lines) +HtmlText=Форматований (HTML) текст +Int=Ціле чистло +Float=Дробове число +DateAndTime=Дата та час +Unique=Унікальне +Boolean=Булеве (один прапорець) +ExtrafieldPhone = Телефон +ExtrafieldPrice = іна ExtrafieldMail = Email -ExtrafieldUrl = Url -ExtrafieldSelect = Select list -ExtrafieldSelectList = Select from table -ExtrafieldSeparator=Separator (not a field) -ExtrafieldPassword=Password -ExtrafieldRadio=Radio buttons (one choice only) -ExtrafieldCheckBox=Checkboxes -ExtrafieldCheckBoxFromList=Checkboxes from table -ExtrafieldLink=Link to an object -ComputedFormula=Computed field -ComputedFormulaDesc=You can enter here a formula using other properties of object or any PHP coding to get a dynamic computed value. You can use any PHP compatible formulas including the "?" condition operator, and following global object: $db, $conf, $langs, $mysoc, $user, $object.
    WARNING: Only some properties of $object may be available. If you need a properties not loaded, just fetch yourself the object into your formula like in the second example.
    Using a computed field means you can't enter yourself any value from interface. Also, if there is a syntax error, the formula may return nothing.

    Example of formula:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Example to reload object
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Other example of formula to force load of object and its parent object:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' -Computedpersistent=Store computed field -ComputedpersistentDesc=Computed extra fields will be stored in the database, however, the value will only be recalculated when the object of this field is changed. If the computed field depends on other objects or global data this value might be wrong!! -ExtrafieldParamHelpPassword=Leaving this field blank means this value will be stored without encryption (field must be only hidden with star on screen).
    Set 'auto' to use the default encryption rule to save password into database (then value read will be the hash only, no way to retrieve original value) -ExtrafieldParamHelpselect=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    code3,value3
    ...

    In order to have the list depending on another complementary attribute list:
    1,value1|options_parent_list_code:parent_key
    2,value2|options_parent_list_code:parent_key

    In order to have the list depending on another list:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key -ExtrafieldParamHelpcheckbox=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... -ExtrafieldParamHelpradio=List of values must be lines with format key,value (where key can't be '0')

    for example:
    1,value1
    2,value2
    3,value3
    ... +ExtrafieldUrl = Адреса URL +ExtrafieldSelect = Список вибору +ExtrafieldSelectList = Вибір з таблиці +ExtrafieldSeparator=Роздільник (не поле) +ExtrafieldPassword=Пароль +ExtrafieldRadio=Перемикач (одиничний вибір) +ExtrafieldCheckBox=Прапорці +ExtrafieldCheckBoxFromList=Прапорці з таблиці +ExtrafieldLink=Посилання на об'єкт +ComputedFormula=Обчислюване поле +ComputedFormulaDesc=Ви можете ввести сюди формулу, що використовує інші значення об'єктів або будь-який PHP код для отримання динамічно обчислюваного поля. Можна використовувати будь-які PHP формули,в тому числі й перевірки з оператором "?", використовувати глобальні об'єкти: $db, $conf, $langs, $mysoc, $user, $object.
    УВАГА: Доступні не всі поля $object. Якщо необхідні Вам поля не завантажені, Просто заберіть об'єкт у формулу, як показано в наступному зразку.
    Використовуючи обчислювані поля, не вводьте нічого самостійно у інтерфейсі форми. Також, якщо присутні синтаксичні помилки, формула не поверне нічого.

    Зразок формули:
    $object->id < 10 ? round($object->id / 2, 2): ($object->id + 2 * $user->id) * (int) substr($mysoc->zip, 1, 2)

    Зразок перевантаження об'єкта:
    (($reloadedobj = new Societe($db)) && ($reloadedobj->fetchNoCompute($obj->id ? $obj->id: ($obj->rowid ? $obj->rowid: $object->id)) > 0)) ? $reloadedobj->array_options['options_extrafieldkey'] * $reloadedobj->capital / 5: '-1'

    Інший зразок формули для прискореного завантаження обєкта та його контейнера:
    (($reloadedobj = new Task($db)) && ($reloadedobj->fetchNoCompute($object->id) > 0) && ($secondloadedobj = new Project($db)) && ($secondloadedobj->fetchNoCompute($reloadedobj->fk_project) > 0)) ? $secondloadedobj->ref: 'Parent project not found' +Computedpersistent=Зберегти обчислюване поле +ComputedpersistentDesc=Обчислювальні поля будуть збережені в базі, тому значення буде перераховане лише тоді, коли об'єкт з цим полем буде змінено. Якщо обчислюване поле залежить від інших об'єктів, або глобальних даних - це значення може бути не правильним! +ExtrafieldParamHelpPassword=Залишивши це поле порожнім, це значення буде зберігатися без шифрування (поле буде приховане лише зірочками на екрані).
    Виберіть значення "Авто", щоб використовувати стандартне правило для шифрування паролів у базі даних (в такому випадку буде зчитуватися лише хеш, без можливості відновити оригінальне значення) +ExtrafieldParamHelpselect=Список значень складається з рядків вигляду ключ,значення (де ключ не повинен бути '0')

    Наприклад:
    1,value1
    2,value2
    code3,value3
    ...

    У випадку, коли потрібно щоб список залежав від значень іншого додаткового списку:
    1,value1|options_parent_list_code:parent_key
    2,value2|options_parent_list_code:parent_key

    У випадку, якщо потрібно мати список залежний від іншого:
    1,value1|parent_list_code:parent_key
    2,value2|parent_list_code:parent_key +ExtrafieldParamHelpcheckbox=Список значень повинен складатися з рядків з форматом ключ,значення (де ключ не може бути "0")

    , наприклад:
    1,значення1
    2,значення2
    3,значення3
    ... +ExtrafieldParamHelpradio=Список значень повинен складатися з рядків з форматом ключ,значення (де ключ не може бути "0")

    , наприклад:
    1,значення1
    2,значення2
    3,значення3
    ... ExtrafieldParamHelpsellist=List of values comes from a table
    Syntax: table_name:label_field:id_field::filter
    Example: c_typent:libelle:id::filter

    - idfilter is necessarly a primary int key
    - filter can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelpchkbxlst=List of values comes from a table
    Syntax: table_name:label_field:id_field::filter
    Example: c_typent:libelle:id::filter

    filter can be a simple test (eg active=1) to display only active value
    You can also use $ID$ in filter witch is the current id of current object
    To do a SELECT in filter use $SEL$
    if you want to filter on extrafields use syntax extra.fieldcode=... (where field code is the code of extrafield)

    In order to have the list depending on another complementary attribute list:
    c_typent:libelle:id:options_parent_list_code|parent_column:filter

    In order to have the list depending on another list:
    c_typent:libelle:id:parent_list_code|parent_column:filter ExtrafieldParamHelplink=Parameters must be ObjectName:Classpath
    Syntax: ObjectName:Classpath
    Examples:
    Societe:societe/class/societe.class.php
    Contact:contact/class/contact.class.php @@ -524,7 +527,7 @@ Module25Name=Sales Orders Module25Desc=Sales order management Module30Name=Рахунки-фактури Module30Desc=Management of invoices and credit notes for customers. Management of invoices and credit notes for suppliers -Module40Name=Vendors +Module40Name=Постачальники Module40Desc=Vendors and purchase management (purchase orders and billing of supplier invoices) Module42Name=Debug Logs Module42Desc=Logging facilities (file, syslog, ...). Such logs are for technical/debug purposes. @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -976,8 +990,9 @@ DictionaryAccountancyJournal=Accounting journals DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units -DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionarySocialNetworks=Соціальні мережі +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,15 +1091,15 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities CompanyName=Name -CompanyAddress=Address +CompanyAddress=Адреса CompanyZip=Zip CompanyTown=Town -CompanyCountry=Country +CompanyCountry=Країна CompanyCurrency=Main currency CompanyObject=Object of the company IDCountry=ID country @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1456,7 +1472,7 @@ LDAPFieldPasswordExample=Example: userPassword LDAPFieldCommonNameExample=Example: cn LDAPFieldName=Name LDAPFieldNameExample=Example: sn -LDAPFieldFirstName=First name +LDAPFieldFirstName=Ім'я LDAPFieldFirstNameExample=Example: givenName LDAPFieldMail=Email address LDAPFieldMailExample=Example: mail @@ -1474,7 +1490,7 @@ LDAPFieldZip=Zip LDAPFieldZipExample=Example: postalcode LDAPFieldTown=Town LDAPFieldTownExample=Example: l -LDAPFieldCountry=Country +LDAPFieldCountry=Країна LDAPFieldDescription=Description LDAPFieldDescriptionExample=Example: description LDAPFieldNotePublic=Public Note @@ -1482,12 +1498,12 @@ LDAPFieldNotePublicExample=Example: publicnote LDAPFieldGroupMembers= Group members LDAPFieldGroupMembersExample= Example: uniqueMember LDAPFieldBirthdate=Birthdate -LDAPFieldCompany=Company +LDAPFieldCompany=Компанія LDAPFieldCompanyExample=Example: o LDAPFieldSid=SID LDAPFieldSidExample=Example: objectsid LDAPFieldEndLastSubscription=Date of subscription end -LDAPFieldTitle=Job position +LDAPFieldTitle=Місце роботи LDAPFieldTitleExample=Example: title LDAPFieldGroupid=Group id LDAPFieldGroupidExample=Exemple : gidnumber @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/uk_UA/agenda.lang b/htdocs/langs/uk_UA/agenda.lang index 00b90386a7b..6798f1d9d63 100644 --- a/htdocs/langs/uk_UA/agenda.lang +++ b/htdocs/langs/uk_UA/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Кількість подій ListOfActions=Список подій EventReports=Event reports Location=Розташування -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Подія на цілий день(дні) MenuToDoActions=Усі невиконані події MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/uk_UA/bills.lang b/htdocs/langs/uk_UA/bills.lang index e259f2026d4..2a360131fe2 100644 --- a/htdocs/langs/uk_UA/bills.lang +++ b/htdocs/langs/uk_UA/bills.lang @@ -438,7 +438,7 @@ BankCode=Код банку DeskCode=Branch code BankAccountNumber=Номер рахунка BankAccountNumberKey=Checksum -Residence=Address +Residence=Адреса IBANNumber=IBAN account number IBAN=IBAN CustomerIBAN=IBAN of customer diff --git a/htdocs/langs/uk_UA/bookmarks.lang b/htdocs/langs/uk_UA/bookmarks.lang index 9d2003f34d3..87466cadcfa 100644 --- a/htdocs/langs/uk_UA/bookmarks.lang +++ b/htdocs/langs/uk_UA/bookmarks.lang @@ -6,15 +6,16 @@ ListOfBookmarks=List of bookmarks EditBookmarks=List/edit bookmarks NewBookmark=New bookmark ShowBookmark=Show bookmark -OpenANewWindow=Open a new window -ReplaceWindow=Replace current window -BookmarkTargetNewWindowShort=New window -BookmarkTargetReplaceWindowShort=Current window -BookmarkTitle=Bookmark title +OpenANewWindow=Open a new tab +ReplaceWindow=Replace current tab +BookmarkTargetNewWindowShort=New tab +BookmarkTargetReplaceWindowShort=Current tab +BookmarkTitle=Bookmark name UrlOrLink=URL BehaviourOnClick=Behaviour when a bookmark URL is selected CreateBookmark=Create bookmark -SetHereATitleForLink=Set a title for the bookmark -UseAnExternalHttpLinkOrRelativeDolibarrLink=Use an external http URL or a relative Dolibarr URL -ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choose if linked page must open in new window or not +SetHereATitleForLink=Set a name for the bookmark +UseAnExternalHttpLinkOrRelativeDolibarrLink=Use an external/absolute link (https://URL) or an internal/relative link (/DOLIBARR_ROOT/htdocs/...) +ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choose if the linked page should open in the current tab or a new tab BookmarksManagement=Bookmarks management +BookmarksMenuShortCut=Ctrl + shift + m diff --git a/htdocs/langs/uk_UA/boxes.lang b/htdocs/langs/uk_UA/boxes.lang index 2f4c5c557ab..187fb5abbfe 100644 --- a/htdocs/langs/uk_UA/boxes.lang +++ b/htdocs/langs/uk_UA/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Рахунки-фактури покупців ForCustomersOrders=Замовлення клієнтів ForProposals=Пропозиції @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/uk_UA/cashdesk.lang b/htdocs/langs/uk_UA/cashdesk.lang index 99a7023cc30..a77e6f6893f 100644 --- a/htdocs/langs/uk_UA/cashdesk.lang +++ b/htdocs/langs/uk_UA/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/uk_UA/commercial.lang b/htdocs/langs/uk_UA/commercial.lang index 283b14f25db..aec96a6ae3d 100644 --- a/htdocs/langs/uk_UA/commercial.lang +++ b/htdocs/langs/uk_UA/commercial.lang @@ -1,10 +1,10 @@ # Dolibarr language file - Source file is en_US - commercial Commercial=Commerce CommercialArea=Commerce area -Customer=Customer -Customers=Customers +Customer=Покупець +Customers=Покупці Prospect=Prospect -Prospects=Prospects +Prospects=Потенційні клієнти DeleteAction=Delete an event NewAction=New event AddAction=Create event diff --git a/htdocs/langs/uk_UA/companies.lang b/htdocs/langs/uk_UA/companies.lang index 7d8fe9f1e9f..cba4ef7dbda 100644 --- a/htdocs/langs/uk_UA/companies.lang +++ b/htdocs/langs/uk_UA/companies.lang @@ -1,106 +1,106 @@ # Dolibarr language file - Source file is en_US - companies -ErrorCompanyNameAlreadyExists=Company name %s already exists. Choose another one. -ErrorSetACountryFirst=Set the country first -SelectThirdParty=Select a third party -ConfirmDeleteCompany=Are you sure you want to delete this company and all inherited information? -DeleteContact=Delete a contact/address -ConfirmDeleteContact=Are you sure you want to delete this contact and all inherited information? -MenuNewThirdParty=New Third Party -MenuNewCustomer=New Customer -MenuNewProspect=New Prospect -MenuNewSupplier=New Vendor -MenuNewPrivateIndividual=New private individual -NewCompany=New company (prospect, customer, vendor) -NewThirdParty=New Third Party (prospect, customer, vendor) -CreateDolibarrThirdPartySupplier=Create a third party (vendor) -CreateThirdPartyOnly=Create third party -CreateThirdPartyAndContact=Create a third party + a child contact -ProspectionArea=Prospection area -IdThirdParty=Id third party -IdCompany=Company Id -IdContact=Contact Id -ThirdPartyContacts=Third-party contacts -ThirdPartyContact=Third-party contact/address -Company=Company -CompanyName=Company name -AliasNames=Alias name (commercial, trademark, ...) -AliasNameShort=Alias Name -Companies=Companies -CountryIsInEEC=Country is inside the European Economic Community -PriceFormatInCurrentLanguage=Price display format in the current language and currency -ThirdPartyName=Third-party name -ThirdPartyEmail=Third-party email -ThirdParty=Third-party -ThirdParties=Third-parties -ThirdPartyProspects=Prospects -ThirdPartyProspectsStats=Prospects -ThirdPartyCustomers=Customers -ThirdPartyCustomersStats=Customers -ThirdPartyCustomersWithIdProf12=Customers with %s or %s -ThirdPartySuppliers=Vendors -ThirdPartyType=Third-party type -Individual=Private individual -ToCreateContactWithSameName=Will automatically create a contact/address with same information as the third party under the third party. In most cases, even if your third party is a physical person, creating a third party alone is enough. -ParentCompany=Parent company -Subsidiaries=Subsidiaries -ReportByMonth=Report by month -ReportByCustomers=Report by customer -ReportByQuarter=Report by rate +ErrorCompanyNameAlreadyExists=Компанія з назвою %s уже існує. Виберіть іншу. +ErrorSetACountryFirst=Спершу оберіть країну +SelectThirdParty=Оберіть контрагента +ConfirmDeleteCompany=Ви впевнені що дійсно хочете видалити цю компанію та всю її інформацію? +DeleteContact=Видалити контакт/адресу +ConfirmDeleteContact=Ви впевнені що дійсно хочете видалити цей контакт та всю зв'язану з ним інформацію? +MenuNewThirdParty=Новий контрагент +MenuNewCustomer=Новий замовник +MenuNewProspect=Новий потенційний клієнт +MenuNewSupplier=Новий постачальник +MenuNewPrivateIndividual=Нова фізична особа +NewCompany=Нова компанія (потенційний, покупець, постачальник) +NewThirdParty=Новий контрагент (потенційний, покупець, постачальник) +CreateDolibarrThirdPartySupplier=Створити контрагента (постачальника) +CreateThirdPartyOnly=Створити контрагента +CreateThirdPartyAndContact=Створити контрагента та прив'язати контакт +ProspectionArea=Розділ потенційних клієнтів +IdThirdParty=Id контрагента +IdCompany=Id компанії +IdContact=Id контакту +ThirdPartyContacts=Контакти контрагента +ThirdPartyContact=Контакти/адреса контрагента +Company=Компанія +CompanyName=Назва компанії +AliasNames=Зв'язана назва (торгова точка, торгова марка) +AliasNameShort=Зв'язана назва +Companies=Компанії +CountryIsInEEC=Держава знаходиться в Європейській Економічній Зоні +PriceFormatInCurrentLanguage=Формат відображення ціни в поточній мові та поточній валюті +ThirdPartyName=Назва контрагента +ThirdPartyEmail=email контрагента +ThirdParty=Контрагент +ThirdParties=Контрагенти +ThirdPartyProspects=Потенційні клієнти +ThirdPartyProspectsStats=Потенційні клієнти +ThirdPartyCustomers=Покупці +ThirdPartyCustomersStats=Покупці +ThirdPartyCustomersWithIdProf12=Покупці з %s або %s +ThirdPartySuppliers=Постачальники +ThirdPartyType=Тип контрагента +Individual=Фізична особа +ToCreateContactWithSameName=Автоматично створить контакт / адресу з тією ж інформацією, що і в контрагента. У більшості випадків, якщо ваш контрагент є фізичною особою, достатньо створити контрагента. +ParentCompany=Батьківська компанія +Subsidiaries=Дочірні компанії +ReportByMonth=Звіт за місяць +ReportByCustomers=Звіт за покупцем +ReportByQuarter=Звіт за частотою CivilityCode=Civility code RegisteredOffice=Registered office -Lastname=Last name -Firstname=First name -PostOrFunction=Job position -UserTitle=Title -NatureOfThirdParty=Nature of Third party -NatureOfContact=Nature of Contact -Address=Address -State=State/Province -StateCode=State/Province code -StateShort=State -Region=Region -Region-State=Region - State -Country=Country -CountryCode=Country code -CountryId=Country id -Phone=Phone -PhoneShort=Phone +Lastname=Прізвище +Firstname=Ім'я +PostOrFunction=Місце роботи +UserTitle=Назва +NatureOfThirdParty=Характер контрагента +NatureOfContact=Характер контакту +Address=Адреса +State=Штат/провінція/область +StateCode=Код штату +StateShort=Штат/область +Region=Регіон +Region-State=Регіон - держава +Country=Країна +CountryCode=Код країни +CountryId=id країни +Phone=Телефон +PhoneShort=Телефон Skype=Skype Call=Call -Chat=Chat -PhonePro=Prof. phone -PhonePerso=Pers. phone -PhoneMobile=Mobile -No_Email=Refuse bulk emailings +Chat=Чат +PhonePro=Робочий телефон +PhonePerso=Особистий телефон +PhoneMobile=Мобільний телефон +No_Email=Скасувати автоматичну розсилку Fax=Факс -Zip=Zip Code -Town=City -Web=Web -Poste= Position -DefaultLang=Language default -VATIsUsed=Sales tax used -VATIsUsedWhenSelling=This defines if this third party includes a sale tax or not when it makes an invoice to its own customers -VATIsNotUsed=Sales tax is not used -CopyAddressFromSoc=Copy address from third-party details -ThirdpartyNotCustomerNotSupplierSoNoRef=Third party neither customer nor vendor, no available referring objects -ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Third party neither customer nor vendor, discounts are not available -PaymentBankAccount=Payment bank account +Zip=Індекс +Town=Місто +Web=Вебсайт +Poste= Позиція +DefaultLang=Мова по замовчуванню +VATIsUsed=Податок з продажу +VATIsUsedWhenSelling=Визначає, чи включати для цього контрагента податок з продажу чи ні, коли він виставляє рахунок власним клієнтам +VATIsNotUsed=Податок не використовується +CopyAddressFromSoc=Копія адреси з деталей контрагента +ThirdpartyNotCustomerNotSupplierSoNoRef=Контрагент ні покупець, ні постачальник, відсутні доступні об'єкти для посилання +ThirdpartyIsNeitherCustomerNorClientSoCannotHaveDiscounts=Контрагент ані покупець, ані постачальник, знижки не доступні +PaymentBankAccount=Платіжний рахунок у банку OverAllProposals=Пропозиції -OverAllOrders=Orders +OverAllOrders=Покупки OverAllInvoices=Рахунки-фактури -OverAllSupplierProposals=Price requests +OverAllSupplierProposals=Запити цін ##### Local Taxes ##### -LocalTax1IsUsed=Use second tax +LocalTax1IsUsed=Використовувати додаткову комісію/податок LocalTax1IsUsedES= RE is used LocalTax1IsNotUsedES= RE is not used -LocalTax2IsUsed=Use third tax +LocalTax2IsUsed=Використовувати третю комісію/податок LocalTax2IsUsedES= IRPF is used LocalTax2IsNotUsedES= IRPF is not used -WrongCustomerCode=Customer code invalid -WrongSupplierCode=Vendor code invalid +WrongCustomerCode=Індивідуальний код покупця +WrongSupplierCode=Індивідуальний код постачальника CustomerCodeModel=Customer code model SupplierCodeModel=Vendor code model -Gencod=Barcode +Gencod=Штрихкод ##### Professional ID ##### ProfId1Short=Prof. id 1 ProfId2Short=Prof. id 2 @@ -268,19 +268,19 @@ VATIntraSyntaxIsValid=Syntax is valid VATReturn=VAT return ProspectCustomer=Prospect / Customer Prospect=Prospect -CustomerCard=Customer Card -Customer=Customer -CustomerRelativeDiscount=Relative customer discount -SupplierRelativeDiscount=Relative vendor discount +CustomerCard=Картка покупця +Customer=Покупець +CustomerRelativeDiscount=Відносна знижка клієнта +SupplierRelativeDiscount=Відносна знижка постачальника CustomerRelativeDiscountShort=Відносна знижка -CustomerAbsoluteDiscountShort=Absolute discount -CompanyHasRelativeDiscount=This customer has a default discount of %s%% -CompanyHasNoRelativeDiscount=This customer has no relative discount by default -HasRelativeDiscountFromSupplier=You have a default discount of %s%% from this vendor -HasNoRelativeDiscountFromSupplier=You have no default relative discount from this vendor -CompanyHasAbsoluteDiscount=This customer has discounts available (credits notes or down payments) for %s %s +CustomerAbsoluteDiscountShort=Абсолютна знижка +CompanyHasRelativeDiscount=У цього клієнта знижка за замовчуванням %s%% +CompanyHasNoRelativeDiscount=Цей клієнт не має відносної знижки за замовчуванням +HasRelativeDiscountFromSupplier=У вас є знижка за замовчуванням %s%% у цього постачальника +HasNoRelativeDiscountFromSupplier=Ви не маєте відносної знижки за замовчуванням у цього постачальника +CompanyHasAbsoluteDiscount=У цього клієнта доступні знижки (бонусні бали або знижки) для %s %s CompanyHasDownPaymentOrCommercialDiscount=This customer has discounts available (commercial, down payments) for %s %s -CompanyHasCreditNote=This customer still has credit notes for %s %s +CompanyHasCreditNote=Цей клієнт ще має бонусні бали %s %s HasNoAbsoluteDiscountFromSupplier=You have no discount credit available from this vendor HasAbsoluteDiscountFromSupplier=You have discounts available (credits notes or down payments) for %s %s from this vendor HasDownPaymentOrCommercialDiscountFromSupplier=You have discounts available (commercial, down payments) for %s %s from this vendor @@ -291,33 +291,33 @@ CustomerAbsoluteDiscountMy=Absolute customer discounts (granted by yourself) SupplierAbsoluteDiscountAllUsers=Absolute vendor discounts (entered by all users) SupplierAbsoluteDiscountMy=Absolute vendor discounts (entered by yourself) DiscountNone=None -Vendor=Vendor -Supplier=Vendor -AddContact=Create contact -AddContactAddress=Create contact/address -EditContact=Edit contact -EditContactAddress=Edit contact/address -Contact=Contact/Address -Contacts=Contacts/Addresses -ContactId=Contact id -ContactsAddresses=Contacts/Addresses -FromContactName=Name: -NoContactDefinedForThirdParty=No contact defined for this third party -NoContactDefined=No contact defined -DefaultContact=Default contact/address -ContactByDefaultFor=Default contact/address for -AddThirdParty=Create third party -DeleteACompany=Delete a company -PersonalInformations=Personal data +Vendor=Постачальник +Supplier=Постачальник +AddContact=Створити контакт +AddContactAddress=Створити контакт/адресу +EditContact=Редагувати контакт +EditContactAddress=Редагувати контакт/адресу +Contact=Контакт/адреса +Contacts=онтакти/адреси +ContactId=id контакту +ContactsAddresses=Контакти/адреси +FromContactName=Назва: +NoContactDefinedForThirdParty=З цим контрагентом не зв'язано жодного контакту +NoContactDefined=Контакт не призначено +DefaultContact=Контакт/адреса за промовчанням +ContactByDefaultFor=Контакт/адреса за промовчанням для +AddThirdParty=Створити контрагента +DeleteACompany=Видалити компанію +PersonalInformations=Особисті дані AccountancyCode=Accounting account -CustomerCode=Customer Code -SupplierCode=Vendor Code -CustomerCodeShort=Customer Code -SupplierCodeShort=Vendor Code -CustomerCodeDesc=Customer Code, unique for all customers -SupplierCodeDesc=Vendor Code, unique for all vendors -RequiredIfCustomer=Required if third party is a customer or prospect -RequiredIfSupplier=Required if third party is a vendor +CustomerCode=Код клієнта +SupplierCode=Код постачальника +CustomerCodeShort=Код клієнта +SupplierCodeShort=Код постачальника +CustomerCodeDesc=Код клієнта, унікальний для всіх клієнтів +SupplierCodeDesc=Код постачальника, унікальний для всіх постачальників +RequiredIfCustomer=Обов'язково, якщо контрагент є потенційним, або покупцем +RequiredIfSupplier=Обов'язково, якщо контрагент є постачальником ValidityControledByModule=Validity controlled by module ThisIsModuleRules=Rules for this module ProspectToContact=Prospect to contact @@ -376,7 +376,7 @@ TE_ADMIN=Governmental TE_SMALL=Small company TE_RETAIL=Retailer TE_WHOLE=Wholesaler -TE_PRIVATE=Private individual +TE_PRIVATE=Приватна особа TE_OTHER=Інший StatusProspect-1=Do not contact StatusProspect0=Never contacted diff --git a/htdocs/langs/uk_UA/compta.lang b/htdocs/langs/uk_UA/compta.lang index 25d9f2b34e4..f7643379a98 100644 --- a/htdocs/langs/uk_UA/compta.lang +++ b/htdocs/langs/uk_UA/compta.lang @@ -10,7 +10,7 @@ OptionModeVirtualDesc=In this context, the turnover is calculated over invoices FeatureIsSupportedInInOutModeOnly=Feature only available in CREDITS-DEBTS accountancy mode (See Accountancy module configuration) VATReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Tax module setup. LTReportBuildWithOptionDefinedInModule=Amounts shown here are calculated using rules defined by Company setup. -Param=Setup +Param=Встановлення RemainingAmountPayment=Amount payment remaining: Account=Account Accountparent=Parent account @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/uk_UA/contracts.lang b/htdocs/langs/uk_UA/contracts.lang index 18e8ab5d426..dfcbc680ca0 100644 --- a/htdocs/langs/uk_UA/contracts.lang +++ b/htdocs/langs/uk_UA/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/uk_UA/errors.lang b/htdocs/langs/uk_UA/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/uk_UA/errors.lang +++ b/htdocs/langs/uk_UA/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/uk_UA/exports.lang b/htdocs/langs/uk_UA/exports.lang index 2dcf4317e00..50ef674d821 100644 --- a/htdocs/langs/uk_UA/exports.lang +++ b/htdocs/langs/uk_UA/exports.lang @@ -25,7 +25,9 @@ FieldsTitle=Fields title FieldTitle=Field title NowClickToGenerateToBuildExportFile=Now, select the file format in the combo box and click on "Generate" to build the export file... AvailableFormats=Available Formats -LibraryShort=Library +LibraryShort=Бібліотека +ExportCsvSeparator=Csv caracter separator +ImportCsvSeparator=Csv caracter separator Step=Step FormatedImport=Import Assistant FormatedImportDesc1=This module allows you to update existing data or add new objects into the database from a file without technical knowledge, using an assistant. @@ -120,7 +122,7 @@ SelectPrimaryColumnsForUpdateAttempt=Select column(s) to use as primary key for UpdateNotYetSupportedForThisImport=Update is not supported for this type of import (only insert) NoUpdateAttempt=No update attempt was performed, only insert ImportDataset_user_1=Users (employees or not) and properties -ComputedField=Computed field +ComputedField=Обчислюване поле ## filters SelectFilterFields=If you want to filter on some values, just input values here. FilteredFields=Filtered fields diff --git a/htdocs/langs/uk_UA/holiday.lang b/htdocs/langs/uk_UA/holiday.lang index 9f733ae189d..e28139cf3ca 100644 --- a/htdocs/langs/uk_UA/holiday.lang +++ b/htdocs/langs/uk_UA/holiday.lang @@ -110,7 +110,7 @@ UpdateConfCPOK=Updated successfully. Module27130Name= Management of leave requests Module27130Desc= Management of leave requests ErrorMailNotSend=An error occurred while sending email: -NoticePeriod=Notice period +NoticePeriod=Період повідомлення #Messages HolidaysToValidate=Validate leave requests HolidaysToValidateBody=Below is a leave request to validate diff --git a/htdocs/langs/uk_UA/languages.lang b/htdocs/langs/uk_UA/languages.lang index 02058181cf7..79195062114 100644 --- a/htdocs/langs/uk_UA/languages.lang +++ b/htdocs/langs/uk_UA/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Арабська Language_ar_EG=Арабська (Єгипет) Language_ar_SA=Арабська +Language_az_AZ=Azerbaijani Language_bn_BD=Бенгальська +Language_bn_IN=Bengali (India) Language_bg_BG=Болгарська Language_bs_BA=Боснійська Language_ca_ES=Каталонський @@ -20,6 +23,7 @@ Language_en_GB=Англійська (Великобританія) Language_en_IN=Англійська (Індія) Language_en_NZ=Англійська (Нова Зеландія) Language_en_SA=Англійська (Саудівська Аравія) +Language_en_SG=English (Singapore) Language_en_US=Англійська (США) Language_en_ZA=Англійська (Південна Африка) Language_es_ES=Іспанська @@ -29,6 +33,7 @@ Language_es_CL=Іспанська (Чілі) Language_es_CO=Іспанська (Колумбія) Language_es_DO=Іспанська (Домініканська Республіка) Language_es_EC=Іспанська (Еквадор) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Іспанська (Гондурас) Language_es_MX=Іспанська (Мексика) Language_es_PA=Іспанська (Панама) @@ -36,6 +41,7 @@ Language_es_PY=Іспанська (Парагвай) Language_es_PE=Іспанська (Перу) Language_es_PR=Іспанська (Пуерто-Ріко) Language_es_UY=Іспанська (Уругвай) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Іспанська (Венесуела) Language_et_EE=Естонська Language_eu_ES=Баскська @@ -44,15 +50,22 @@ Language_fi_FI=Фінська Language_fr_BE=Французька (Бельгія) Language_fr_CA=Французька (Канада) Language_fr_CH=Французька (Швейцарія) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Французький +Language_fr_GA=French (Gabon) Language_fr_NC=Французька (Нова Каледонія) +Language_fr_SN=French (Senegal) Language_fy_NL=Фризька +Language_gl_ES=Galician Language_he_IL=Іврит +Language_hi_IN=Hindi (India) Language_hr_HR=Хорватська Language_hu_HU=Угорська Language_id_ID=Індонезійська Language_is_IS=Ісландський Language_it_IT=Італійський +Language_it_CH=Italian (Switzerland) Language_ja_JP=Японський Language_ka_GE=Грузинська Language_km_KH=Кхмерська @@ -64,6 +77,7 @@ Language_lv_LV=Латвійська Language_mk_MK=Македонський Language_mn_MN=Монгольська Language_nb_NO=Норвезька (букмол) +Language_ne_NP=Nepali Language_nl_BE=Голандська (Бельгія) Language_nl_NL=Dutch Language_pl_PL=Польський @@ -86,4 +100,5 @@ Language_uz_UZ=Узбецький Language_vi_VN=В'єтнамська Language_zh_CN=Китайський Language_zh_TW=Китайська (традиційна) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Малайська diff --git a/htdocs/langs/uk_UA/mails.lang b/htdocs/langs/uk_UA/mails.lang index 8b1cb50fe79..754ce0cee4b 100644 --- a/htdocs/langs/uk_UA/mails.lang +++ b/htdocs/langs/uk_UA/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/uk_UA/main.lang b/htdocs/langs/uk_UA/main.lang index 5409a3b0652..62ebc2ddfd0 100644 --- a/htdocs/langs/uk_UA/main.lang +++ b/htdocs/langs/uk_UA/main.lang @@ -206,7 +206,7 @@ Users=Users Group=Group Groups=Groups NoUserGroupDefined=No user group defined -Password=Password +Password=Пароль PasswordRetype=Retype your password NoteSomeFeaturesAreDisabled=Note that a lot of features/modules are disabled in this demonstration. Name=Name @@ -224,7 +224,7 @@ Type=Тип Language=Language MultiLanguage=Multi-language Note=Note -Title=Title +Title=Назва Label=Label RefOrLabel=Ref. or label Info=Log @@ -247,7 +247,7 @@ Limits=Limits Logout=Logout NoLogoutProcessWithAuthMode=No applicative disconnect feature with authentication mode %s Connection=Login -Setup=Setup +Setup=Встановлення Alert=Alert MenuWarnings=Alerts Previous=Previous @@ -257,7 +257,7 @@ Card=Card Now=Now HourStart=Start hour Date=Date -DateAndHour=Date and hour +DateAndHour=Дата та час DateToday=Today's date DateReference=Reference date DateStart=Start date @@ -342,7 +342,7 @@ Paste=Paste Default=Default DefaultValue=Default value DefaultValues=Default values/filters/sorting -Price=Price +Price=іна PriceCurrency=Price (currency) UnitPrice=Unit price UnitPriceHT=Unit price (excl.) @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Сума AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Сума платежу AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=Продавець +FromDate=Продавець FromLocation=Продавець to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/uk_UA/members.lang b/htdocs/langs/uk_UA/members.lang index 65411506d6c..fc805a4c210 100644 --- a/htdocs/langs/uk_UA/members.lang +++ b/htdocs/langs/uk_UA/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Підтверджений +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? @@ -99,7 +102,7 @@ ExportDataset_member_1=Members and subscriptions ImportDataset_member_1=Members LastMembersModified=Latest %s modified members LastSubscriptionsModified=Latest %s modified subscriptions -String=String +String=Текст Text=Text Int=Int DateAndTime=Date and time diff --git a/htdocs/langs/uk_UA/modulebuilder.lang b/htdocs/langs/uk_UA/modulebuilder.lang index 460aef8103b..2ac06ba7f55 100644 --- a/htdocs/langs/uk_UA/modulebuilder.lang +++ b/htdocs/langs/uk_UA/modulebuilder.lang @@ -5,7 +5,7 @@ EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use upp ModuleBuilderDesc2=Path where modules are generated/edited (first directory for external modules defined into %s): %s ModuleBuilderDesc3=Generated/editable modules found: %s ModuleBuilderDesc4=A module is detected as 'editable' when the file %s exists in root of module directory -NewModule=New module +NewModule=Новий модуль NewObjectInModulebuilder=New object ModuleKey=Module key ObjectKey=Object key diff --git a/htdocs/langs/uk_UA/mrp.lang b/htdocs/langs/uk_UA/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/uk_UA/mrp.lang +++ b/htdocs/langs/uk_UA/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/uk_UA/orders.lang b/htdocs/langs/uk_UA/orders.lang index 54f235a923e..a784e083458 100644 --- a/htdocs/langs/uk_UA/orders.lang +++ b/htdocs/langs/uk_UA/orders.lang @@ -5,7 +5,7 @@ OrderCard=Order card OrderId=Order Id Order=Order PdfOrderTitle=Order -Orders=Orders +Orders=Покупки OrderLine=Order line OrderDate=Order date OrderDateShort=Order date @@ -139,13 +139,14 @@ OrderByMail=Mail OrderByFax=Факс OrderByEMail=Email OrderByWWW=Online -OrderByPhone=Phone +OrderByPhone=Телефон # Documents models -PDFEinsteinDescription=A complete order model +PDFEinsteinDescription=A complete order model (old implementation of Eratosthene template) PDFEratostheneDescription=A complete order model PDFEdisonDescription=A simple order model PDFProformaDescription=A complete Proforma invoice template CreateInvoiceForThisCustomer=Bill orders +CreateInvoiceForThisSupplier=Bill orders NoOrdersToInvoice=No orders billable CloseProcessedOrdersAutomatically=Classify "Processed" all selected orders. OrderCreation=Order creation diff --git a/htdocs/langs/uk_UA/other.lang b/htdocs/langs/uk_UA/other.lang index 5dc70fa068f..c6472c143db 100644 --- a/htdocs/langs/uk_UA/other.lang +++ b/htdocs/langs/uk_UA/other.lang @@ -78,7 +78,7 @@ Notify_EXPENSE_REPORT_VALIDATE=Expense report validated (approval required) Notify_EXPENSE_REPORT_APPROVE=Expense report approved Notify_HOLIDAY_VALIDATE=Leave request validated (approval required) Notify_HOLIDAY_APPROVE=Leave request approved -SeeModuleSetup=See setup of module %s +SeeModuleSetup=Див. налаштування модуля %s NbOfAttachedFiles=Number of attached files/documents TotalSizeOfAttachedFiles=Total size of attached files/documents MaxSize=Maximum size @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -271,7 +269,7 @@ NoExportableData=No exportable data (no modules with exportable data loaded, or ##### External sites ##### WebsiteSetup=Setup of module website WEBSITE_PAGEURL=URL of page -WEBSITE_TITLE=Title +WEBSITE_TITLE=Назва WEBSITE_DESCRIPTION=Description WEBSITE_IMAGE=Image WEBSITE_IMAGEDesc=Relative path of the image media. You can keep this empty as this is rarely used (it can be used by dynamic content to show a thumbnail in a list of blog posts). Use __WEBSITE_KEY__ in the path if path depends on website name (for example: image/__WEBSITE_KEY__/stories/myimage.png). @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/uk_UA/printing.lang b/htdocs/langs/uk_UA/printing.lang index cc26879e4f1..099c83d3435 100644 --- a/htdocs/langs/uk_UA/printing.lang +++ b/htdocs/langs/uk_UA/printing.lang @@ -2,7 +2,7 @@ Module64000Name=Direct Printing Module64000Desc=Enable Direct Printing System PrintingSetup=Setup of Direct Printing System -PrintingDesc=This module adds a Print button to send documents directly to a printer (without opening document into an application) with various module. +PrintingDesc=This module adds a Print button to various modules to allow documents to be printed directly to a printer without needing to open the document in another application. MenuDirectPrinting=Direct Printing jobs DirectPrint=Direct print PrintingDriverDesc=Configuration variables for printing driver. @@ -19,7 +19,7 @@ UserConf=Setup per user PRINTGCP_INFO=Google OAuth API setup PRINTGCP_AUTHLINK=Authentication PRINTGCP_TOKEN_ACCESS=Google Cloud Print OAuth Token -PrintGCPDesc=This driver allow to send documents directly to a printer with Google Cloud Print. +PrintGCPDesc=This driver allows sending documents directly to a printer using Google Cloud Print. GCP_Name=Name GCP_displayName=Display Name GCP_Id=Printer Id @@ -27,11 +27,11 @@ GCP_OwnerName=Owner Name GCP_State=Printer State GCP_connectionStatus=Online State GCP_Type=Printer Type -PrintIPPDesc=This driver allow to send documents directly to a printer. It requires a Linux system with CUPS installed. +PrintIPPDesc=This driver allows sending of documents directly to a printer. It requires a Linux system with CUPS installed. PRINTIPP_HOST=Print server PRINTIPP_PORT=Port PRINTIPP_USER=Login -PRINTIPP_PASSWORD=Password +PRINTIPP_PASSWORD=Пароль NoDefaultPrinterDefined=No default printer defined DefaultPrinter=Default printer Printer=Printer @@ -46,7 +46,9 @@ IPP_Device=Device IPP_Media=Printer media IPP_Supported=Type of media DirectPrintingJobsDesc=This page lists printing jobs found for available printers. -GoogleAuthNotConfigured=Google OAuth setup not done. Enable module OAuth and set a Google ID/Secret. +GoogleAuthNotConfigured=Google OAuth has not been setup. Enable module OAuth and set a Google ID/Secret. GoogleAuthConfigured=Google OAuth credentials were found into setup of module OAuth. PrintingDriverDescprintgcp=Configuration variables for printing driver Google Cloud Print. +PrintingDriverDescprintipp=Configuration variables for printing driver Cups. PrintTestDescprintgcp=List of Printers for Google Cloud Print. +PrintTestDescprintipp=List of Printers for Cups. diff --git a/htdocs/langs/uk_UA/products.lang b/htdocs/langs/uk_UA/products.lang index 858ad2408f4..f032491bdac 100644 --- a/htdocs/langs/uk_UA/products.lang +++ b/htdocs/langs/uk_UA/products.lang @@ -86,7 +86,7 @@ ErrorProductAlreadyExists=A product with reference %s already exists. ErrorProductBadRefOrLabel=Wrong value for reference or label. ErrorProductClone=There was a problem while trying to clone the product or service. ErrorPriceCantBeLowerThanMinPrice=Error, price can't be lower than minimum price. -Suppliers=Vendors +Suppliers=Постачальники SupplierRef=Vendor SKU ShowProduct=Show product ShowService=Show service @@ -98,12 +98,13 @@ BuyingPrice=Buying price PriceForEachProduct=Products with specific prices SupplierCard=Vendor card PriceRemoved=Price removed -BarCode=Barcode +BarCode=Штрихкод BarcodeType=Barcode type SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/uk_UA/projects.lang b/htdocs/langs/uk_UA/projects.lang index 7a1553b6d47..6218178d78d 100644 --- a/htdocs/langs/uk_UA/projects.lang +++ b/htdocs/langs/uk_UA/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/uk_UA/recruitment.lang b/htdocs/langs/uk_UA/recruitment.lang new file mode 100644 index 00000000000..0fe9eb85116 --- /dev/null +++ b/htdocs/langs/uk_UA/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Налаштування +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/uk_UA/stocks.lang b/htdocs/langs/uk_UA/stocks.lang index 0b424c874cc..81cd6394e96 100644 --- a/htdocs/langs/uk_UA/stocks.lang +++ b/htdocs/langs/uk_UA/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/uk_UA/supplier_proposal.lang b/htdocs/langs/uk_UA/supplier_proposal.lang index a9679242750..8b0b708c2c4 100644 --- a/htdocs/langs/uk_UA/supplier_proposal.lang +++ b/htdocs/langs/uk_UA/supplier_proposal.lang @@ -3,7 +3,7 @@ SupplierProposal=Vendor commercial proposals supplier_proposalDESC=Manage price requests to suppliers SupplierProposalNew=New price request CommRequest=Price request -CommRequests=Price requests +CommRequests=Запити цін SearchRequest=Find a request DraftRequests=Draft requests SupplierProposalsDraft=Draft vendor proposals @@ -32,7 +32,7 @@ SupplierProposalStatusValidatedShort=Підтверджений SupplierProposalStatusClosedShort=Зачинено SupplierProposalStatusSignedShort=Accepted SupplierProposalStatusNotSignedShort=Refused -CopyAskFrom=Create price request by copying existing a request +CopyAskFrom=Create a price request by copying an existing request CreateEmptyAsk=Create blank request ConfirmCloneAsk=Are you sure you want to clone the price request %s? ConfirmReOpenAsk=Are you sure you want to open back the price request %s? diff --git a/htdocs/langs/uk_UA/suppliers.lang b/htdocs/langs/uk_UA/suppliers.lang index d0cf540d3eb..9b3668c788b 100644 --- a/htdocs/langs/uk_UA/suppliers.lang +++ b/htdocs/langs/uk_UA/suppliers.lang @@ -1,5 +1,5 @@ -# Dolibarr language file - Source file is en_US - suppliers -Suppliers=Vendors +# Dolibarr language file - Source file is en_US - vendors +Suppliers=Постачальники SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice NewSupplier=New vendor @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sdefault permissions that are automatically granted to a new user (to modify permissions for existing users, go to the user card). DolibarrUsers=Dolibarr users -LastName=Last name -FirstName=First name +LastName=Прізвище +FirstName=Ім'я ListOfGroups=List of groups NewGroup=New group CreateGroup=Create group @@ -65,7 +65,7 @@ CreateDolibarrLogin=Create a user CreateDolibarrThirdParty=Create a third party LoginAccountDisableInDolibarr=Account disabled in Dolibarr. UsePersonalValue=Use personal value -InternalUser=Internal user +InternalUser=Внутрішній користувач ExportDataset_user_1=Users and their properties DomainUser=Domain user %s Reactivate=Reactivate @@ -78,6 +78,7 @@ UserWillBeExternalUser=Created user will be an external user (because linked to IdPhoneCaller=Id phone caller NewUserCreated=User %s created NewUserPassword=Password change for %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=User %s modified UserDisabled=User %s disabled UserEnabled=User %s activated @@ -107,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/uk_UA/withdrawals.lang b/htdocs/langs/uk_UA/withdrawals.lang index cccd8196481..533989bdd30 100644 --- a/htdocs/langs/uk_UA/withdrawals.lang +++ b/htdocs/langs/uk_UA/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Сплачений StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/uk_UA/workflow.lang b/htdocs/langs/uk_UA/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/uk_UA/workflow.lang +++ b/htdocs/langs/uk_UA/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/uk_UA/zapier.lang b/htdocs/langs/uk_UA/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/uk_UA/zapier.lang +++ b/htdocs/langs/uk_UA/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/uz_UZ/accountancy.lang b/htdocs/langs/uz_UZ/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/uz_UZ/accountancy.lang +++ b/htdocs/langs/uz_UZ/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/uz_UZ/admin.lang b/htdocs/langs/uz_UZ/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/uz_UZ/admin.lang +++ b/htdocs/langs/uz_UZ/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/uz_UZ/agenda.lang b/htdocs/langs/uz_UZ/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/uz_UZ/agenda.lang +++ b/htdocs/langs/uz_UZ/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/uz_UZ/boxes.lang b/htdocs/langs/uz_UZ/boxes.lang index 8fe1f84b149..d6fd298a3a7 100644 --- a/htdocs/langs/uz_UZ/boxes.lang +++ b/htdocs/langs/uz_UZ/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=Latest %s recorded suppliers BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=Latest %s customers or prospects -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=Latest %s members BoxTitleLastFicheInter=Latest %s modified interventions @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/uz_UZ/cashdesk.lang b/htdocs/langs/uz_UZ/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/uz_UZ/cashdesk.lang +++ b/htdocs/langs/uz_UZ/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/uz_UZ/compta.lang b/htdocs/langs/uz_UZ/compta.lang index 6cd046c5607..8f4f058bb87 100644 --- a/htdocs/langs/uz_UZ/compta.lang +++ b/htdocs/langs/uz_UZ/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/uz_UZ/contracts.lang b/htdocs/langs/uz_UZ/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/uz_UZ/contracts.lang +++ b/htdocs/langs/uz_UZ/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/uz_UZ/errors.lang b/htdocs/langs/uz_UZ/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/uz_UZ/errors.lang +++ b/htdocs/langs/uz_UZ/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/uz_UZ/languages.lang b/htdocs/langs/uz_UZ/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/uz_UZ/languages.lang +++ b/htdocs/langs/uz_UZ/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/uz_UZ/mails.lang b/htdocs/langs/uz_UZ/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/uz_UZ/mails.lang +++ b/htdocs/langs/uz_UZ/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/uz_UZ/main.lang b/htdocs/langs/uz_UZ/main.lang index f6629fadaf2..127dffb310d 100644 --- a/htdocs/langs/uz_UZ/main.lang +++ b/htdocs/langs/uz_UZ/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/uz_UZ/members.lang b/htdocs/langs/uz_UZ/members.lang index 5886c598d52..5ef946ddf67 100644 --- a/htdocs/langs/uz_UZ/members.lang +++ b/htdocs/langs/uz_UZ/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date @@ -78,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/uz_UZ/mrp.lang b/htdocs/langs/uz_UZ/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/uz_UZ/mrp.lang +++ b/htdocs/langs/uz_UZ/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/uz_UZ/other.lang b/htdocs/langs/uz_UZ/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/uz_UZ/other.lang +++ b/htdocs/langs/uz_UZ/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/uz_UZ/products.lang b/htdocs/langs/uz_UZ/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/uz_UZ/products.lang +++ b/htdocs/langs/uz_UZ/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/uz_UZ/projects.lang b/htdocs/langs/uz_UZ/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/uz_UZ/projects.lang +++ b/htdocs/langs/uz_UZ/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/uz_UZ/recruitment.lang b/htdocs/langs/uz_UZ/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/uz_UZ/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/uz_UZ/stocks.lang b/htdocs/langs/uz_UZ/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/uz_UZ/stocks.lang +++ b/htdocs/langs/uz_UZ/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/uz_UZ/suppliers.lang b/htdocs/langs/uz_UZ/suppliers.lang index d0cf540d3eb..51562b8bb7a 100644 --- a/htdocs/langs/uz_UZ/suppliers.lang +++ b/htdocs/langs/uz_UZ/suppliers.lang @@ -1,4 +1,4 @@ -# Dolibarr language file - Source file is en_US - suppliers +# Dolibarr language file - Source file is en_US - vendors Suppliers=Vendors SuppliersInvoice=Vendor invoice ShowSupplierInvoice=Show Vendor Invoice @@ -15,15 +15,15 @@ SomeSubProductHaveNoPrices=Some sub-products have no price defined AddSupplierPrice=Add buying price ChangeSupplierPrice=Change buying price SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=This reference supplier is already associated with a reference: %s +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s NoRecordedSuppliers=No vendor recorded SupplierPayment=Vendor payment SuppliersArea=Vendor area RefSupplierShort=Ref. vendor Availability=Availability -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines +ExportDataset_fournisseur_1=Vendor invoices and invoice details ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_3=Purchase orders and order details ApproveThisOrder=Approve this order ConfirmApproveThisOrder=Are you sure you want to approve order %s? DenyingThisOrder=Deny this order @@ -35,13 +35,13 @@ ListOfSupplierProductForSupplier=List of products and prices for vendor %sDirect Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/uz_UZ/workflow.lang b/htdocs/langs/uz_UZ/workflow.lang index 783373ad66d..299be277e1d 100644 --- a/htdocs/langs/uz_UZ/workflow.lang +++ b/htdocs/langs/uz_UZ/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=Workflow module setup -WorkflowDesc=This module is designed to modify the behaviour of automatic actions into application. By default, workflow is open (you can do things in the order you want). You can activate the automatic actions you are interested in. +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=There is no workflow modifications available with the activated modules. # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a customer order after a commercial proposal is signed (new order will have same amount than proposal) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (new invoice will have same amount than proposal) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=Automatically create a customer invoice after a contract is validated -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a customer order is closed (new invoice will have same amount than order) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer order is set to billed (and if amount of the order is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of signed linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is validated (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source customer order(s) to billed when customer invoice is set to paid (and if amount of the invoice is same than total amount of linked orders) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source customer order to shipped when a shipment is validated (and if quantity shipped by all shipments is the same as in the order to update) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/uz_UZ/zapier.lang b/htdocs/langs/uz_UZ/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/uz_UZ/zapier.lang +++ b/htdocs/langs/uz_UZ/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/vi_VN/accountancy.lang b/htdocs/langs/vi_VN/accountancy.lang index a90b39de00a..0c59133574f 100644 --- a/htdocs/langs/vi_VN/accountancy.lang +++ b/htdocs/langs/vi_VN/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Cho phép quản lý các số không khác nhau ở cu BANK_DISABLE_DIRECT_INPUT=Vô hiệu hóa ghi trực tiếp giao dịch trong tài khoản ngân hàng ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Cho phép xuất dữ liệu bản nháp trong nhật ký ACCOUNTANCY_COMBO_FOR_AUX=Bật danh sách kết hợp cho tài khoản công ty con (có thể chậm nếu bạn có nhiều bên thứ ba) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Nhật ký bán hàng ACCOUNTING_PURCHASE_JOURNAL=Nhật ký mua hàng @@ -284,6 +285,7 @@ ShowTutorial=Chương trình hướng dẫn NotReconciled=Chưa đối chiếu ## Admin +BindingOptions=Binding options ApplyMassCategories=Áp dụng cho số một lớn các danh mục AddAccountFromBookKeepingWithNoCategories=Tài khoản khả dụng chưa có trong nhóm được cá nhân hóa CategoryDeleted=Danh mục cho tài khoản kế toán đã bị xóa diff --git a/htdocs/langs/vi_VN/admin.lang b/htdocs/langs/vi_VN/admin.lang index be5452c38ab..15e6b1140c3 100644 --- a/htdocs/langs/vi_VN/admin.lang +++ b/htdocs/langs/vi_VN/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Email người gửi mặc định để gửi thủ UserEmail=Email người dùng CompanyEmail=Email công ty FeatureNotAvailableOnLinux=Tính năng không có sẵn trên Unix như hệ thống. Kiểm tra chương trình sendmail bản địa của bạn. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=Nếu bản dịch cho ngôn ngữ này chưa hoàn thành hoặc bạn thấy có lỗi, bạn có thể sửa lỗi này bằng cách chỉnh sửa các tệp trong thư mục langs / %s và gửi thay đổi của bạn tới www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=Nếu bản dịch cho ngôn ngữ này chưa hoàn tất hoặc bạn tìm thấy lỗi, bạn có thể sửa lỗi này bằng cách chỉnh sửa các tệp vào thư mục langs / %s và gửi các tệp đã sửa đổi trên dolibarr.org/forum hoặc cho các nhà phát triển trên github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Cài đặt module ModulesSetup=Thiết lập Mô-đun / Ứng dụng ModuleFamilyBase=Hệ thống @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Mô-đun %s phải được bật trước nếu SecurityToken=Key to secure URLs NoSmsEngine=Không có trình quản lý gửi SMS có sẵn. Trình quản lý gửi SMS không được cài đặt với phân phối mặc định vì chúng phụ thuộc vào nhà cung cấp bên ngoài, nhưng bạn có thể tìm thấy một số trên %s PDF=PDF -PDFDesc=Tùy chọn toàn cục để tạo PDF. -PDFAddressForging=Quy tắc cho hộp địa chỉ +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Ẩn tất cả thông tin liên quan đến Thuế bán hàng / VAT PDFRulesForSalesTax=Quy tắc thuế bán hàng / VAT PDFLocaltax=Quy tắc cho %s -HideLocalTaxOnPDF=Ẩn tỷ lệ %s trong cột Thuế Bán hàng +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Ẩn mô tả sản phẩm HideRefOnPDF=Ẩn tham chiếu sản phẩm HideDetailsOnPDF=Ẩn chi tiết dòng sản phẩm @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Sửa đổi về giá với giá trị tham chiếu cơ s MassConvert=Khởi chạy chuyển đổi hàng loạt PriceFormatInCurrentLanguage=Định dạng giá trong ngôn ngữ hiện tại String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Quản lý hợp đồng (dịch vụ hoặc đăng ký định k Module55Name=Mã vạch Module55Desc=Quản lý mã vạch Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Thanh toán ngân hàng ghi nợ trực tiếp -Module57Desc=Quản lý các lệnh thanh toán ghi nợ trực tiếp. Nó bao gồm việc tạo tệp SEPA cho các nước châu Âu. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Tạo/chỉnh sửa dịch vụ Permission534=Xóa dịch vụ Permission536=Xem/quản lý dịch vụ ẩn Permission538=Xuất dữ liệu Dịch vụ +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Xem hóa đơn vật liệu Permission651=Tạo / Sửa đổi nhật hóa đơn vật liệu Permission652=Xóa hóa đơn vật liệu +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Đọc thông tin Tài trợ Permission702=Tạo/sửa đổi Tài trợ Permission703=Xóa tài trợ @@ -848,6 +858,8 @@ Permission773=Xóa báo cáo chi phí Permission774=Đọc tất cả báo cáo chi phí (ngay cả người dùng không phụ thuộc) Permission775=Duyệt báo cáo chi phí Permission776=Báo cáo thanh toán chi phí +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Xuất dữ liệu báo cáo chi phí Permission1001=Xem tồn kho Permission1002=Tạo/chỉnh sửa Kho hàng @@ -900,6 +912,7 @@ Permission2515=Cài đặt thư mục tài liệu Permission2801=Sử dụng FTP client trong chế độ đọc (chỉ duyệt và tải về) Permission2802=Sử dụng FTP client trong chế độ ghi (xóa hoặc tải lên các tập tin) Permission3200=Xem các sự kiện được lưu trữ và dấu vân tay +Permission3301=Generate new modules Permission4001=Xem nhân viên Permission4002=Tạo nhân viên Permission4003=Xóa nhân viên @@ -947,7 +960,8 @@ Permission63003=Xóa tài nguyên Permission63004=Liên kết tài nguyên với các sự kiện chương trình nghị sự DictionaryCompanyType=Các loại bên thứ ba DictionaryCompanyJuridicalType=Pháp nhân bên thứ ba -DictionaryProspectLevel=KH tiềm năng +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=Bang / Tỉnh DictionaryRegion=Vùng DictionaryCountry=Quốc gia @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Mẫu thư điện tử DictionaryUnits=Đơn vị DictionaryMeasuringUnits=Đơn vị đo lường DictionarySocialNetworks=Mạng xã hội -DictionaryProspectStatus=Trạng thái KH tiềm năng +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Các loại nghỉ phép DictionaryOpportunityStatus=Trạng thái khách hàng tiềm năng cho dự án/ khách hàng tiềm năng DictionaryExpenseTaxCat=Báo cáo chi phí - Danh mục vận tải @@ -1076,7 +1091,7 @@ LoginPage=Trang đăng nhập BackgroundImageLogin=Hình nền PermanentLeftSearchForm=Forrm tìm kiếm cố định trên menu bên trái DefaultLanguage=Ngôn ngữ mặc định -EnableMultilangInterface=Cho phép hỗ trợ đa ngôn ngữ +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Hiển thị logo công ty trong menu CompanyInfo=Thông Tin Công ty/Tổ chức CompanyIds=Danh tính công ty / tổ chức @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=Một tiêu chí tìm kiếm được yê NewTranslationStringToShow=Chuỗi dịch mới để hiển thị OriginalValueWas=Bản dịch gốc được ghi đè. Giá trị ban đầu là:

    %s TransKeyWithoutOriginalValue=Bạn đã ép buộc một bản dịch mới cho từ khóa dịch ' %s ' không tồn tại trong bất kỳ tệp ngôn ngữ nào -TotalNumberOfActivatedModules=Khích hoạt Ứng dụng/mô-đun: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=Bạn phải có ít nhất 1 mô-đun cho phép ClassNotFoundIntoPathWarning=Không tìm thấy lớp %s trong đường dẫn PHP YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Sử dụng các loại sự kiện (được quản lý t AGENDA_USE_EVENT_TYPE_DEFAULT=Tự động đặt giá trị mặc định này cho loại sự kiện trong biểu mẫu tạo sự kiện AGENDA_DEFAULT_FILTER_TYPE=Tự động đặt loại sự kiện này trong bộ lọc tìm kiếm của chế độ xem chương trình nghị sự AGENDA_DEFAULT_FILTER_STATUS=Tự động đặt trạng thái này cho các sự kiện trong bộ lọc tìm kiếm của chế độ xem chương trình nghị sự -AGENDA_DEFAULT_VIEW=Tab mà bạn muốn mở mặc định khi lựa chọn menu chương trình nghị sự +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Bật nhắc nhở sự kiện bằng email (tùy chọn nhắc nhở / trì hoãn có thể được xác định trên mỗi sự kiện). Lưu ý: Mô-đun %s phải được bật và thiết lập chính xác để có lời nhắc được gửi ở tần số chính xác. AGENDA_REMINDER_BROWSER=Bật nhắc nhở sự kiện trên trình duyệt của người dùng (khi đạt đến ngày sự kiện, mỗi người dùng có thể từ chối câu hỏi này từ câu hỏi xác nhận trình duyệt) AGENDA_REMINDER_BROWSER_SOUND=Bật thông báo âm thanh @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Hiển thị đối tượng được liên kết vào ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url được gọi khi nhấp chuột vào hình ảnh điện thoại được thực hiện. Trong URL, bạn có thể sử dụng thẻ
    __PHONETO__ sẽ được thay thế bằng số điện thoại của người cần gọi
    __PHONEFROM__ sẽ được thay thế bằng số điện thoại của người gọi (của bạn)
    __LOGIN__ sẽ được thay thế bằng đăng nhập clicktodial (được xác định trên thẻ người dùng)
    __PASS__ sẽ được thay thế bằng mật khẩu clicktodial (được xác định trên thẻ người dùng). -ClickToDialDesc=Mô-đun này tạo liên kết một số điện thoại có thể nhấp vào. Một cú nhấp chuột vào biểu tượng sẽ làm cho điện thoại của bạn gọi số. Điều này có thể được sử dụng để gọi một hệ thống trung tâm cuộc gọi từ Dolibarr có thể gọi số điện thoại trên hệ thống SIP chẳng hạn. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Chỉ sử dụng một liên kết "tel:" trên các số điện thoại ClickToDialUseTelLinkDesc=Sử dụng phương pháp này nếu người dùng của bạn có điện thoại phần mềm hoặc giao diện phần mềm được cài đặt trên cùng một máy tính với trình duyệt và được gọi khi bạn nhấp vào liên kết trong trình duyệt bắt đầu bằng "tel:". Nếu bạn cần một giải pháp máy chủ đầy đủ (không cần cài đặt phần mềm cục bộ), bạn phải đặt giải pháp này thành "Không" và điền vào trường tiếp theo. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=Trường này chứa một tham chiếu để xác định dòng. Enter0or1=Lỗi 0 hoặc 1 UnicodeCurrency=Nhập vào đây giữa các dấu ngoặc nhọn, danh sách số byte đại diện cho ký hiệu tiền tệ. Ví dụ: với $, nhập [36] - đối với brazil real R $ [82,36] - với €, nhập [8364] ColorFormat=Màu RGB ở định dạng HEX, ví dụ: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Vị trí của dòng ở trong danh sách kết hợp SellTaxRate=Thuế suất bán hàng RecuperableOnly="Có" cho VAT "Không được nhận nhưng có thể thu hồi" dành riêng cho một số tiểu bang ở Pháp. Giữ giá trị thành "Không" trong tất cả các trường hợp khác. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Yêu cầu báo giá MailToSendSupplierOrder=Đơn đặt hàng mua MailToSendSupplierInvoice=Hóa đơn nhà cung cấp MailToSendContract=Hợp đồng +MailToSendReception=Tiếp nhận MailToThirdparty=Bên thứ ba MailToMember=Thành viên MailToUser=Người dùng @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s có sẵn. Phiên ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s có sẵn. Phiên bản %s là phiên bản bảo trì, do đó chỉ chứa các bản sửa lỗi. Chúng tôi khuyên tất cả người dùng nâng cấp lên phiên bản này. Một bản phát hành bảo trì không giới thiệu các tính năng mới hoặc thay đổi cơ sở dữ liệu. Bạn có thể tải xuống từ khu vực tải xuống của https://www.dolibarr.org cổng thông tin (thư mục con Phiên bản ổn định). Bạn có thể đọc ChangeLog để biết danh sách đầy đủ các thay đổi. MultiPriceRuleDesc=Khi tùy chọn "Một số mức giá cho mỗi sản phẩm/dịch vụ" được bật, bạn có thể xác định các mức giá khác nhau (một mức cho mỗi mức giá) cho mỗi sản phẩm. Để tiết kiệm thời gian của bạn, ở đây bạn có thể nhập quy tắc để tự động định giá cho từng cấp dựa trên giá của cấp đầu tiên, do đó bạn sẽ chỉ phải nhập giá cho cấp đầu tiên cho mỗi sản phẩm. Trang này được thiết kế để giúp bạn tiết kiệm thời gian nhưng chỉ hữu ích nếu giá của bạn cho mỗi cấp tương đối so với cấp đầu tiên. Bạn có thể bỏ qua trang này trong hầu hết các trường hợp. ModelModulesProduct=Mẫu cho tài liệu sản phẩm +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=Để có thể tạo mã tự động, trước tiên bạn phải xác định người quản lý để tự động xác định số mã vạch. SeeSubstitutionVars=Xem * lưu ý cho danh sách các biến thay thế có thể SeeChangeLog=Xem tệp ChangeLog (chỉ bằng tiếng Anh) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Lề trái trên PDF MAIN_PDF_MARGIN_RIGHT=Lề phải trên PDF MAIN_PDF_MARGIN_TOP=Lề trên PDF MAIN_PDF_MARGIN_BOTTOM=Lề dưới PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=Không có thiết lập cụ thể cần thiết cho mô-đun này. SetToYesIfGroupIsComputationOfOtherGroups=Đặt cái này thành Có nếu nhóm này là sự tính toán của các nhóm khác EnterCalculationRuleIfPreviousFieldIsYes=Nhập quy tắc tính toán nếu trường trước đó được đặt thành Có (Ví dụ: 'CODEGRP1 + CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Chưa có gì hoàn thành XEmailsDoneYActionsDone=%s email đủ điều kiện, %s email được xử lý thành công (đối với bản ghi / hành động %s được thực hiện) RecordEvent=Ghi lại sự kiện email CreateLeadAndThirdParty=Tạo khách hàng tiềm năng (và bên thứ ba nếu cần thiết) -CreateTicketAndThirdParty=Tạo vé (và bên thứ ba nếu cần thiết) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Mã kết quả mới nhất NbOfEmailsInInbox=Số lượng email trong thư mục nguồn LoadThirdPartyFromName=Tải tìm kiếm bên thứ ba trên %s (chỉ tải) LoadThirdPartyFromNameOrCreate=Tải tìm kiếm bên thứ ba trên %s (tạo nếu không tìm thấy) -WithDolTrackingID=Tham chiếu Dolibarr được tìm thấy trong ID tin nhắn -WithoutDolTrackingID=Tham chiếu Dolibarr không tìm thấy trong ID tin nhắn +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Mã mục nhập menu (mainmenu) ECMAutoTree=Hiển thị cây ECM tự động @@ -1981,7 +2002,7 @@ ImportSetup=Thiết lập module nhập liệu InstanceUniqueID=ID duy nhất của đối tượng SmallerThan=Nhỏ hơn LargerThan=Lớn hơn -IfTrackingIDFoundEventWillBeLinked=Lưu ý rằng nếu tìm thấy ID theo dõi trong email đến, sự kiện sẽ được tự động liên kết với các đối tượng liên quan. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=Với tài khoản GMail, nếu bạn đã bật xác thực 2 bước, bạn nên tạo mật khẩu thứ hai dành riêng cho ứng dụng thay vì sử dụng mật khẩu tài khoản của riêng bạn từ https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=Bạn có thể sử dụng hành động này để sử dụng nội dung email để tìm và tải một bên thứ ba hiện có trong cơ sở dữ liệu của bạn. Phần thứ ba được tìm thấy (hoặc được tạo) sẽ được sử dụng cho các hành động sau đây cần nó. Trong trường tham số, bạn có thể sử dụng ví dụ 'EXTRACT: BODY: Name: \\ s ([^ \\ s] *)' nếu bạn muốn trích xuất tên của bên thứ ba từ một chuỗi 'Name: name to find' được tìm thấy trong phần nội dung @@ -2005,3 +2026,7 @@ RssNote=Lưu ý: Mỗi nguồn cấp RSS cung cấp một tiện ích mà bạn JumpToBoxes=Chuyển tới Thiết lập --> Widgets MeasuringUnitTypeDesc=Sử dụng ở đây một giá trị như "kích thước", "diện tích", "khối lượng", "trọng lượng", "thời gian" MeasuringScaleDesc=Thang đo là số vị trí bạn phải di chuyển phần thập phân để khớp với đơn vị tham chiếu mặc định. Đối với loại đơn vị "thời gian", đó là số giây. Giá trị từ 80 đến 99 là giá trị dành riêng. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/vi_VN/agenda.lang b/htdocs/langs/vi_VN/agenda.lang index 9e9a1adf3a3..c8e17edbe45 100644 --- a/htdocs/langs/vi_VN/agenda.lang +++ b/htdocs/langs/vi_VN/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Số sự kiện ListOfActions=Danh sách các sự kiện EventReports=Báo cáo sự kiện Location=Địa phương -ToUserOfGroup=Cho bất kỳ người dùng nào trong nhóm +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Tất cả sự kiện MenuToDoActions=Tất cả sự kiện chưa xong MenuDoneActions=Tất cả sự kiện đã chấm dứt @@ -86,6 +86,8 @@ ProposalDeleted=Đề xuất đã bị xóa OrderDeleted=Đã xóa đơn hàng InvoiceDeleted=Hóa đơn đã bị xóa DraftInvoiceDeleted=Hoá đơn dự thảo đã được xoá +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Sản phẩm %s được tạo PRODUCT_MODIFYInDolibarr=Sản phẩm %s được sửa đổi PRODUCT_DELETEInDolibarr=Đã xóa sản phẩm %s @@ -158,3 +160,9 @@ DateStartPlusOne=Ngày bắt đầu + 1 giờ SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/vi_VN/boxes.lang b/htdocs/langs/vi_VN/boxes.lang index c2c515e133a..a92b40fb524 100644 --- a/htdocs/langs/vi_VN/boxes.lang +++ b/htdocs/langs/vi_VN/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Đơn đặt hàng của nhà cung cấp: % BoxTitleLastModifiedCustomerBills=Hóa đơn khách hàng: %s được sửa đổi lần cuối BoxTitleLastModifiedCustomerOrders=Đơn đặt hàng bán: %s được sửa đổi lần cuối BoxTitleLastModifiedPropals=Đề xuất sửa đổi %s mới nhất +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Khách hàng hoá đơn ForCustomersOrders=Khách hàng đặt hàng ForProposals=Đề xuất @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Tài khoản bị đình chỉ không được xác đ BoxLastCustomerShipments=Lô hàng cuối cùng của khách hàng BoxTitleLastCustomerShipments=Lô hàng mới nhất của khách hàng %s NoRecordedShipments=Không ghi nhận lô hàng của khách hàng +# Pages +AccountancyHome=Kế toán diff --git a/htdocs/langs/vi_VN/cashdesk.lang b/htdocs/langs/vi_VN/cashdesk.lang index 5caee8d95c7..b71e1adb3c9 100644 --- a/htdocs/langs/vi_VN/cashdesk.lang +++ b/htdocs/langs/vi_VN/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=Mô-đun POS BasicPhoneLayout=Sử dụng bố trí cơ bản cho điện thoại SetupOfTerminalNotComplete=Thiết lập đầu cuối %s chưa hoàn tất DirectPayment=Thanh toán trực tiếp -DirectPaymentButton=Nút thanh toán tiền mặt trực tiếp +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Hóa đơn đã được xác nhận NoLinesToBill=Không có dòng hóa đơn CustomReceipt=Biên nhận tùy chỉnh @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=Module ngoài với các tính năng bổ sung PrintMethod=Phương pháp in ReceiptPrinterMethodDescription=Phương pháp mạnh mẽ với rất nhiều thông số. Hoàn toàn tùy biến với các mẫu. Không thể in từ đám mây. ByTerminal=Bởi cổng -TakeposNumpadUsePaymentIcon=Sử dụng biểu tượng thanh toán trên numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN}được sử dụng để thêm số thiết bị đầu cuối TakeposGroupSameProduct=Nhóm sản phẩm cùng dòng StartAParallelSale=Bắt đầu bán hàng mới -ControlCashOpening=Kiểm soát hộp tiền mặt khi mở pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Báo cáo tiền mặt MainPrinterToUse=Máy in chính để dùng @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/vi_VN/compta.lang b/htdocs/langs/vi_VN/compta.lang index 7ac83c9969b..f1cc23cf244 100644 --- a/htdocs/langs/vi_VN/compta.lang +++ b/htdocs/langs/vi_VN/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Thuế xã hội hoặc tài chính SocialContributions=Thuế xã hội hoặc tài chính SocialContributionsDeductibles=Khấu trừ thuế xã hội hoặc tài khóa SocialContributionsNondeductibles=Thuế xã hội hoặc tài chính không được khấu trừ +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Nhãn đóng góp TypeContrib=Loại đóng góp MenuSpecialExpenses=Chi phí đặc biệt @@ -255,10 +256,12 @@ TurnoverbyVatrate=Doanh thu được lập hóa đơn theo thuế suất bán h TurnoverCollectedbyVatrate=Doanh thu được thu thập theo thuế suất bán hàng PurchasebyVatrate=Mua theo thuế suất bán hàng LabelToShow=Nhãn ngắn -PurchaseTurnover=Purchase turnover -PurchaseTurnoverCollected=Purchase turnover collected +PurchaseTurnover=Doanh số hàng mua +PurchaseTurnoverCollected=Doanh số hàng mua RulesPurchaseTurnoverDue=- It includes the supplier's due invoices whether they are paid or not.
    - It is based on the invoice date of these invoices.
    RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices done to suppliers.
    - It is based on the payment date of these invoices
    -RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. -ReportPurchaseTurnover=Purchase turnover invoiced -ReportPurchaseTurnoverCollected=Purchase turnover collected +RulesPurchaseTurnoverTotalPurchaseJournal=Nó bao gồm tất cả các dòng ghi nợ từ nhật ký +ReportPurchaseTurnover=Doanh số hàng mua đã ra hoá đơn +ReportPurchaseTurnoverCollected=Doanh số hàng mua đã tập hợp +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/vi_VN/contracts.lang b/htdocs/langs/vi_VN/contracts.lang index 7645ca96aec..182bb2d67fc 100644 --- a/htdocs/langs/vi_VN/contracts.lang +++ b/htdocs/langs/vi_VN/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Dịch vụ đang hoạt động MenuExpiredServices=Dịch vụ đã hết hạn MenuClosedServices=Dịch vụ đã đóng NewContract=Hợp đồng mới -NewContractSubscription=Hợp đồng/ thuê bao mới +NewContractSubscription=New contract or subscription AddContract=Tạo hợp đồng DeleteAContract=Xóa hợp đồng ActivateAllOnContract=Kích hoạt toàn bộ dịch vụ diff --git a/htdocs/langs/vi_VN/errors.lang b/htdocs/langs/vi_VN/errors.lang index 0c468dc48e3..5c97da8e340 100644 --- a/htdocs/langs/vi_VN/errors.lang +++ b/htdocs/langs/vi_VN/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=Giá trị mới không thể bằng cũ ErrorFailedToValidatePasswordReset=Không thể reinit mật khẩu. Có thể là reinit đã được thực hiện (liên kết này có thể được sử dụng một lần duy nhất). Nếu không, hãy thử khởi động lại quá trình reinit. ErrorToConnectToMysqlCheckInstance=Kết nối với cơ sở dữ liệu không thành công. Kiểm tra máy chủ cơ sở dữ liệu đang chạy (ví dụ: với mysql / mariadb, bạn có thể khởi chạy nó từ dòng lệnh với 'sudo service mysql start'). ErrorFailedToAddContact=Không thể thêm số điện thoại -ErrorDateMustBeBeforeToday=Ngày không thể lớn hơn ngày hôm nay +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=Một phương thức thanh toán đã được thiết lập để gõ% s nhưng thiết lập các mô-đun hóa đơn không được hoàn thành để xác định thông tin để hiển thị cho phương thức thanh toán này. ErrorPHPNeedModule=Lỗi, PHP của bạn phải có mô-đun% s được cài đặt để sử dụng tính năng này. ErrorOpenIDSetupNotComplete=Bạn thiết lập Dolibarr tập tin cấu hình để cho phép xác thực OpenID, nhưng URL của dịch vụ OpenID không được xác định vào liên tục% s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=Số lượng không đủ ErrorOnlyOneFieldForGroupByIsPossible=Chỉ có 1 trường được Nhóm bởi là có thể (các trường khác không phù hợp) ErrorTooManyDifferentValueForSelectedGroupBy=Tìm thấy rất nhiều giá trị khác nhau (hơn một %s) cho trường ' %s', nên chúng tôi không thể tạo nó như một 'Nhóm' cho Biểu đồ. Trường 'Nhóm bởi' đã được xóa. Có phải bạn muốn tạo nó cho trục X? ErrorReplaceStringEmpty=Lỗi, cụm từ để thay thế đang trống +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Tham số PHP của bạn upload_max_filesize (%s) cao hơn tham số PHP post_max_size (%s). Đây không phải là một thiết lập phù hợp. WarningPasswordSetWithNoAccount=Một mật khẩu đã được đặt cho thành viên này. Tuy nhiên, không có tài khoản người dùng nào được tạo. Vì vậy, mật khẩu này được lưu trữ nhưng không thể được sử dụng để đăng nhập vào Dolibarr. Nó có thể được sử dụng bởi một mô-đun / giao diện bên ngoài nhưng nếu bạn không cần xác định bất kỳ thông tin đăng nhập hay mật khẩu nào cho thành viên, bạn có thể tắt tùy chọn "Quản lý đăng nhập cho từng thành viên" từ thiết lập mô-đun Thành viên. Nếu bạn cần quản lý thông tin đăng nhập nhưng không cần bất kỳ mật khẩu nào, bạn có thể để trống trường này để tránh cảnh báo này. Lưu ý: Email cũng có thể được sử dụng làm thông tin đăng nhập nếu thành viên được liên kết với người dùng. diff --git a/htdocs/langs/vi_VN/languages.lang b/htdocs/langs/vi_VN/languages.lang index f275ef25a2f..78ad1328ac4 100644 --- a/htdocs/langs/vi_VN/languages.lang +++ b/htdocs/langs/vi_VN/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Ả Rập Language_ar_EG=Ả Rập (Ai Cập) Language_ar_SA=Ả Rập +Language_az_AZ=Azerbaijani Language_bn_BD=Tiếng Bengal +Language_bn_IN=Bengali (India) Language_bg_BG=Bungari Language_bs_BA=Bosnia Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=Anh (Vương quốc Anh) Language_en_IN=Anh (Ấn Độ) Language_en_NZ=Anh (New Zealand) Language_en_SA=Anh (Ả rập Saudi) +Language_en_SG=English (Singapore) Language_en_US=Anh (Hoa Kỳ) Language_en_ZA=Anh (Nam Phi) Language_es_ES=Tây Ban Nha @@ -29,6 +33,7 @@ Language_es_CL=Tây Ban Nha (Chile) Language_es_CO=Tây Ban Nha (Colombia) Language_es_DO=Tây Ban Nha (Cộng hòa Dominica) Language_es_EC=Tây Ban Nha (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Tây Ban Nha (Honduras) Language_es_MX=Tây Ban Nha (Mexico) Language_es_PA=Tây Ban Nha (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Tây Ban Nha (Paraguay) Language_es_PE=Tây Ban Nha (Peru) Language_es_PR=Tây Ban Nha (Puerto Rico) Language_es_UY=Tây Ban Nha (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Tây Ban Nha (Venezuela) Language_et_EE=Tiếng Estonia Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Phần Lan Language_fr_BE=Pháp (Bỉ) Language_fr_CA=Pháp (Canada) Language_fr_CH=Pháp (Thụy Sĩ) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=Pháp +Language_fr_GA=French (Gabon) Language_fr_NC=Pháp (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Do Thái +Language_hi_IN=Hindi (India) Language_hr_HR=Croatia Language_hu_HU=Hungary Language_id_ID=Indonesia Language_is_IS=Iceland Language_it_IT=Ý +Language_it_CH=Italian (Switzerland) Language_ja_JP=Nhật Bản Language_ka_GE=Gruzia Language_km_KH=Tiếng Khmer @@ -64,8 +77,9 @@ Language_lv_LV=Latvia Language_mk_MK=Macedonian Language_mn_MN=Mông Cổ Language_nb_NO=Na Uy (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Hà Lan (Bỉ) -Language_nl_NL=Dutch +Language_nl_NL=Hà Lan Language_pl_PL=Ba Lan Language_pt_BR=Bồ Đào Nha (Brazil) Language_pt_PT=Bồ Đào Nha @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Việt Language_zh_CN=Trung Quốc Language_zh_TW=Trung Quốc (truyền thống) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Mã Lai diff --git a/htdocs/langs/vi_VN/mails.lang b/htdocs/langs/vi_VN/mails.lang index 2ebdc7e1185..200b7eae30b 100644 --- a/htdocs/langs/vi_VN/mails.lang +++ b/htdocs/langs/vi_VN/mails.lang @@ -164,7 +164,11 @@ NoContactWithCategoryFound=Không có liên lạc/địa chỉ với một danh NoContactLinkedToThirdpartieWithCategoryFound=Không có liên lạc/địa chỉ với một danh mục được tìm thấy OutGoingEmailSetup=Thiết lập email đi InGoingEmailSetup=Thiết lập email đến -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=Thiết lập email gửi đi (cho module %s) DefaultOutgoingEmailSetup=Thiết lập email gửi đi mặc định Information=Thông tin ContactsWithThirdpartyFilter=Danh bạ với bộ lọc của bên thứ ba +Unanswered=Unanswered +Answered=Đã trả lời +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/vi_VN/main.lang b/htdocs/langs/vi_VN/main.lang index cb51c13d006..00071856294 100644 --- a/htdocs/langs/vi_VN/main.lang +++ b/htdocs/langs/vi_VN/main.lang @@ -355,8 +355,8 @@ PriceUTTC=Đơn giá (gồm thuế) Amount=Số tiền AmountInvoice=Số tiền hóa đơn AmountInvoiced=Số tiền đã xuất hóa đơn -AmountInvoicedHT=Số tiền (gồm thuế) -AmountInvoicedTTC=Số tiền (chưa gồm thuế) +AmountInvoicedHT=Số tiền (chưa gồm thuế) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Số tiền thanh toán AmountHTShort=Số tiền (không bao gồm) AmountTTCShort=Số tiền (gồm thuế) @@ -485,6 +485,7 @@ Categories=Gán thẻ/phân nhóm Category=Gán thẻ/phân nhóm By=Theo From=Từ +FromDate=Từ FromLocation=Từ to=đến To=đến @@ -687,6 +688,7 @@ Method=Phương pháp Receive=Nhận CompleteOrNoMoreReceptionExpected=Hoàn thành hoặc không mong đợi gì hơn ExpectedValue=Gia trị được ki vọng +ExpectedQty=Expected Qty PartialWoman=Một phần TotalWoman=Tổng NeverReceived=Chưa từng nhận @@ -703,6 +705,7 @@ MenuECM=Chứng từ MenuAWStats=AWStats MenuMembers=Thành viên MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Giới hạn của Dolibarr (Thực đơn Nhà-Thiết lập-Bảo mật): %s Kb, giới hạn của PHP: %s Kb NoFileFound=Không có chứng từ được lưu trong thư mục này CurrentUserLanguage=Ngôn ngữ hiện tại @@ -725,7 +728,7 @@ Page=Trang Notes=Ghi chú AddNewLine=Thêm dòng mới AddFile=Thêm tập tin -FreeZone=Một Sản phẩm/ dịch vụ không được xác định trước +FreeZone=Free-text product FreeLineOfType=Văn bản tự do, loại: CloneMainAttributes=Nhân bản đối tượng và các thuộc tính chính của nó ReGeneratePDF=Tạo lại PDF @@ -942,6 +945,39 @@ ShortThursday=N ShortFriday=S ShortSaturday=B ShortSunday=C +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Chọn một mẫu email SetRef=Đặt tham chiếu Select2ResultFoundUseArrows=Một số kết quả được tìm thấy. Sử dụng mũi tên để chọn. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Mở sang chế độ chỉnh sửa và thêm b NotUsedForThisCustomer=Không sử dụng cho khách hàng này AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Thông tin +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/vi_VN/members.lang b/htdocs/langs/vi_VN/members.lang index 4053675831d..6d197a30427 100644 --- a/htdocs/langs/vi_VN/members.lang +++ b/htdocs/langs/vi_VN/members.lang @@ -81,7 +81,7 @@ DeleteType=Xóa VoteAllowed=Bình chọn cho phép Physical=Vật lý Moral=Đạo đức -MorPhy=Đạo đức / Vật lý +MorPhy=Tự nhiên Reenable=Bật lại ResiliateMember=Chấm dứt thành viên ConfirmResiliateMember=Bạn có chắc chắn muốn chấm dứt thành viên này? diff --git a/htdocs/langs/vi_VN/mrp.lang b/htdocs/langs/vi_VN/mrp.lang index d7cbd41eb33..5e79c6e8c6e 100644 --- a/htdocs/langs/vi_VN/mrp.lang +++ b/htdocs/langs/vi_VN/mrp.lang @@ -1,5 +1,6 @@ Mrp=Đơn đặt hàng sản xuất MO=Đơn hàng sản xuất +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=Khu vực MRP MrpSetupPage=Thiết lập mô-đun MRP diff --git a/htdocs/langs/vi_VN/other.lang b/htdocs/langs/vi_VN/other.lang index e49834bd3b5..a5a94478621 100644 --- a/htdocs/langs/vi_VN/other.lang +++ b/htdocs/langs/vi_VN/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__ (Xin chào) __ \nVui lòng tìm đơn PredefinedMailContentSendSupplierInvoice=__ (Xin chào) __ \n\nVui lòng tìm hóa đơn __REF__ đính kèm \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__ (Xin chào) __ \n\nVui lòng tìm vận chuyển __REF__ đính kèm \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__ (Xin chào) __ \n\nVui lòng tìm sự can thiệp __REF__ đính kèm \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__ (Xin chào) __ \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__ (Xin chào) __ \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__ (Xin chào) __ \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ PredefinedMailContentLink=Bạn có thể nhấp vào liên kết bên dưới để thực hiện thanh toán nếu chưa được thực hiện.\n\n %s\n\n +PredefinedMailContentGeneric=__ (Xin chào) __ \n\n\n__ (Trân trọng) __ \n\n__USER_SIGNATURE__ DemoDesc=Dolibarr là một ERP / CRM nhỏ gọn hỗ trợ một số mô-đun kinh doanh. Một bản demo giới thiệu tất cả các mô-đun không có ý nghĩa vì kịch bản này không bao giờ xảy ra (có sẵn hàng trăm). Vì vậy, một số hồ sơ demo là có sẵn. ChooseYourDemoProfil=Chọn hồ sơ demo phù hợp nhất với nhu cầu của bạn ... ChooseYourDemoProfilMore=... hoặc xây dựng hồ sơ của riêng bạn
    (lựa chọn mô-đun thủ công) @@ -280,7 +278,9 @@ LinesToImport=Dòng để nhập MemoryUsage=Sử dụng bộ nhớ RequestDuration=Thời hạn yêu cầu +ProductsPerPopularity=Products/Services by popularity PopuProp=Sản phẩm/Dịch vụ phổ biến trong Đơn đề xuất PopuCom=Sản phẩm/dịch vụ phổ biến trong Đơn hàng ProductStatistics=Thống kê sản phẩm/dịch vụ NbOfQtyInOrders=Số lượng đã đặt hàng +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/vi_VN/products.lang b/htdocs/langs/vi_VN/products.lang index 5373ae2f2d1..452477dd2a9 100644 --- a/htdocs/langs/vi_VN/products.lang +++ b/htdocs/langs/vi_VN/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Đặt loại mã vạch BarcodeValue=Giá trị mã vạch NoteNotVisibleOnBill=Ghi chú (không hiển thị trên hóa đơn, đơn hàng đề xuất ...) ServiceLimitedDuration=Nếu sản phẩm là một dịch vụ có giới hạn thời gian: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Nhiều phân khúc giá cho mỗi sản phẩm/ dịch vụ (mỗi khách hàng một phân khúc giá) MultiPricesNumPrices=Số lượng Giá DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Giá nhà cung cấp (của sản phẩm ho CustomCode=Hải quan / Hàng hóa / HS code CountryOrigin=Nước xuất xứ Nature=Loại sản phẩm (nguyên liệu / thành phẩm) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Nhãn ngắn Unit=Đơn vị p=u. @@ -359,6 +362,9 @@ SelectCombination=Chọn kết hợp ProductCombinationGenerator=Tạo ra biến thể Features=Các tính năng PriceImpact=Tác động giá +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Tác động trọng số NewProductAttribute=Thuộc tính mới NewProductAttributeValue=Giá trị thuộc tính mới diff --git a/htdocs/langs/vi_VN/projects.lang b/htdocs/langs/vi_VN/projects.lang index 4d582f1bed6..66a08436bc7 100644 --- a/htdocs/langs/vi_VN/projects.lang +++ b/htdocs/langs/vi_VN/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Cộng sự TypeContact_project_task_external_TASKCONTRIBUTOR=Cộng sự SelectElement=Chọn yếu tố AddElement=Liên kết đến yếu tố +LinkToElementShort=Liên kết đến # Documents models DocumentModelBeluga=Mẫu tài liệu dự án cho các đối tượng tổng quát có liên quan DocumentModelBaleine=Mẫu tài liệu dự án cho các nhiệm vụ @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=Số lượng dự án được tạo theo tháng ProjectNbTaskByMonth=Số lượng nhiệm vụ được tạo theo tháng ProjectOppAmountOfProjectsByMonth=Số lượng khách hàng tiềm năng theo tháng ProjectWeightedOppAmountOfProjectsByMonth=Số tiền khách hàng tiềm năng có trọng số theo tháng -ProjectOpenedProjectByOppStatus=Mở Dự án/ khách hàng tiềm năng theo trạng thái tiềm năng -ProjectsStatistics=Thống kê dự án/ khách hàng tiềm năng -TasksStatistics=Thống kê các nhiệm vụ trên dự án/ khách hàng tiềm năng +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Nhiệm vụ được giao. Nhập thời gian vào nhiệm vụ này là có thể. IdTaskTime=ID Thời gian nhiệm vụ YouCanCompleteRef=Nếu bạn muốn hoàn thành tham chiếu này với một số hậu tố, bạn nên thêm một ký tự để tách nó, vì vậy việc đánh số tự động vẫn sẽ hoạt động chính xác cho các dự án tiếp theo. Ví dụ: %s-MYSUFFIX diff --git a/htdocs/langs/vi_VN/propal.lang b/htdocs/langs/vi_VN/propal.lang index 2a99f2a5577..a9e808d9f5a 100644 --- a/htdocs/langs/vi_VN/propal.lang +++ b/htdocs/langs/vi_VN/propal.lang @@ -85,3 +85,7 @@ ProposalCustomerSignature=Văn bản chấp nhận, dấu công ty, ngày và ch ProposalsStatisticsSuppliers=Thống kê đề xuất nhà cung cấp CaseFollowedBy=Theo bởi trường hợp SignedOnly=Signed only +IdProposal=ID đề xuất +IdProduct=ID sản phẩm +PrParentLine=Dòng mẹ đề xuất +LineBuyPriceHT=Giá mua Số lượng ròng của thuế cho dòng diff --git a/htdocs/langs/vi_VN/recruitment.lang b/htdocs/langs/vi_VN/recruitment.lang new file mode 100644 index 00000000000..463f8e555cb --- /dev/null +++ b/htdocs/langs/vi_VN/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Cài đặt +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = Về +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/vi_VN/stocks.lang b/htdocs/langs/vi_VN/stocks.lang index 40d651f7056..4b5a2a57249 100644 --- a/htdocs/langs/vi_VN/stocks.lang +++ b/htdocs/langs/vi_VN/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Xóa gửi Stock=Tồn kho Stocks=Tồn kho MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Tồn kho theo lô / sê-ri @@ -95,14 +95,16 @@ RealStock=Tồn kho thực RealStockDesc=Vật lý/ tồn kho thực là tồn kho hiện tại trong kho. RealStockWillAutomaticallyWhen=Tồn kho thực sẽ được sửa đổi theo quy tắc này (như được xác định trong mô-đun Tồn kho): VirtualStock=Tồn kho ảo -VirtualStockDesc=Tồn kho ảo là tồn kho được tính toán khả dụng khi tất cả các hành động mở/đang chờ xử lý (ảnh hưởng đến tồn kho) được đóng (đơn đặt hàng đã nhận, đơn đặt hàng được giao, v.v.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Mã kho DescWareHouse=Mô tả kho LieuWareHouse=Địa phương hóa kho WarehousesAndProducts=Các kho hàng và sản phẩm WarehousesAndProductsBatchDetail=Kho và sản phẩm (với chi tiết mỗi lô /sê-ri) -AverageUnitPricePMPShort=Trọng giá đầu vào trung bình -AverageUnitPricePMP=Trọng giá đầu vào trung bình +AverageUnitPricePMPShort=Giá bình quân gia quyền +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Đơn giá bán EstimatedStockValueSellShort=Giá trị bán EstimatedStockValueSell=Giá trị bán @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Số lượng sản phẩm% s trong kho trước khi thời gian được lựa chọn (<% s) NbOfProductAfterPeriod=Số lượng sản phẩm% s trong kho sau khi được lựa chọn thời gian (>% s) MassMovement=Chuyển kho toàn bộ -SelectProductInAndOutWareHouse=Chọn một sản phẩm, một số lượng lớn, kho nguồn và một kho hàng mục tiêu, sau đó nhấp vào "% s". Một khi điều này được thực hiện với mọi hoạt động cần thiết, kích vào "% s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Chuyển bản ghi ReceivingForSameOrder=Biên nhận cho đơn đặt hàng này StockMovementRecorded=Chuyển động kho được ghi nhận @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/vi_VN/suppliers.lang b/htdocs/langs/vi_VN/suppliers.lang index 832877e7dfd..d9b48630c61 100644 --- a/htdocs/langs/vi_VN/suppliers.lang +++ b/htdocs/langs/vi_VN/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Chất lượng thấp ReputationForThisProduct=Uy tín BuyerName=Tên người mua AllProductServicePrices=Tất cả giá sản phẩm/ dịch vụ -AllProductReferencesOfSupplier=Tất cả các tham chiếu sản phẩm/ dịch vụ của nhà cung cấp +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Giá nhà cung cấp diff --git a/htdocs/langs/vi_VN/ticket.lang b/htdocs/langs/vi_VN/ticket.lang index fef6c82773c..ea5424e4654 100644 --- a/htdocs/langs/vi_VN/ticket.lang +++ b/htdocs/langs/vi_VN/ticket.lang @@ -72,7 +72,6 @@ Deleted=Đã xóa # Dict Type=Loại -Category=Mã phân tích Severity=Mức độ nghiêm trọng # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Tự động chỉ định người dùng đã tạo vé TicketsAutoAssignTicketHelp=Khi tạo vé, người dùng có thể được tự động chỉ định cho vé. TicketNumberingModules=Mô-đun đánh số vé TicketNotifyTiersAtCreation=Thông báo cho bên thứ ba khi tạo -TicketGroup=Nhóm TicketsDisableCustomerEmail=Luôn vô hiệu hóa email khi vé được tạo từ giao diện công cộng TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Được tạo bởi NewTicket=Vé mới SubjectAnswerToTicket=Trả lời vé TicketTypeRequest=Loại yêu cầu -TicketCategory=Mã phân tích +TicketCategory=Nhóm SeeTicket=Xem vé TicketMarkedAsRead=Vé đã được đánh dấu là đã đọc TicketReadOn=Đọc tiếp diff --git a/htdocs/langs/vi_VN/users.lang b/htdocs/langs/vi_VN/users.lang index 97c911d59d0..9297c08b76f 100644 --- a/htdocs/langs/vi_VN/users.lang +++ b/htdocs/langs/vi_VN/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=Người dùng tạo ra sẽ là một người dùng bê IdPhoneCaller=Id người gọi điện thoại NewUserCreated=Người dùng %s được tạo NewUserPassword=Thay đổi mật khẩu cho %s +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=Người dùng %s đã chỉnh sửa UserDisabled=Người dùng %s đã bị vô hiệu hóa UserEnabled=Người dùng %s đã được kích hoạt @@ -107,11 +108,13 @@ DisabledInMonoUserMode=Vô hiệu hóa trong chế độ bảo trì UserAccountancyCode=Mã kế toán của người dùng UserLogoff=Người dùng đăng xuất UserLogged=Người dùng đăng nhập +DateOfEmployment=Employment date DateEmployment=Ngày bắt đầu làm việc DateEmploymentEnd=Ngày kết thúc việc làm CantDisableYourself=Bạn không thể vô hiệu hóa hồ sơ người dùng của bạn ForceUserExpenseValidator=Thúc phê duyệt báo cáo chi phí ForceUserHolidayValidator=Thúc phê duyệt báo cáo chi phí ValidatorIsSupervisorByDefault=Theo mặc định, việc xác nhận là người giám sát của người dùng. Giữ trống để giữ hành vi này. -UserPersonalEmail=Personal email -UserPersonalMobile=Personal mobile phone +UserPersonalEmail=Email cá nhân +UserPersonalMobile=Số di động +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/vi_VN/withdrawals.lang b/htdocs/langs/vi_VN/withdrawals.lang index 1462f35f30d..c3e19547427 100644 --- a/htdocs/langs/vi_VN/withdrawals.lang +++ b/htdocs/langs/vi_VN/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Lệnh ghi nợ trực tiếp WithdrawalReceipt=Lệnh ghi nợ trực tiếp -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Tệp ghi nợ trực tiếp mới nhất %s @@ -63,7 +63,9 @@ InvoiceRefused=Hóa đơn từ chối (Tính phí từ chối cho khách hàng) StatusDebitCredit=Tình trạng ghi nợ / tín dụng StatusWaiting=Chờ StatusTrans=Gửi +StatusDebited=Debited StatusCredited=Tín dụng +StatusPaid=Đã trả StatusRefused=Từ chối StatusMotif0=Không xác định StatusMotif1=Không đủ tiền @@ -77,13 +79,13 @@ StatusMotif8=Lý do khác CreateForSepaFRST=Tạo tệp ghi nợ trực tiếp (SEPA FRST) CreateForSepaRCUR=Tạo tệp ghi nợ trực tiếp (SEPA RCUR) CreateAll=Tạo tệp ghi nợ trực tiếp (tất cả) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Chỉ văn phòng CreateBanque=Chỉ ngân hàng OrderWaiting=Chờ xử lý -NotifyTransmision=Rút tiền chuyển -NotifyCredit=Rút tiền tín dụng +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=Con số chuyển lệnh quốc gia WithBankUsingRIB=Đối với tài khoản ngân hàng sử dụng RIB WithBankUsingBANBIC=Đối với tài khoản ngân hàng sử dụng IBAN / BIC / SWIFT @@ -93,9 +95,10 @@ CreditDate=Tín dụng vào WithdrawalFileNotCapable=Không thể tạo file biên lai rút tiền cho quốc gia của bạn %s (Quốc gia của bạn không được hỗ trợ) ShowWithdraw=Hiển thị lệnh ghi nợ trực tiếp IfInvoiceNeedOnWithdrawPaymentWontBeClosed=Tuy nhiên, nếu hóa đơn có ít nhất một lệnh thanh toán ghi nợ trực tiếp chưa được xử lý, nó sẽ không được đặt thành thanh toán để cho phép quản lý rút tiền trước đó. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Tệp tin rút tiền +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Đặt thành trạng thái "Đã gửi tệp" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Thống kê theo trạng thái của dòng @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Hình thức thanh toán ModeRECUR=Thanh toán định kỳ ModeFRST=Thanh toán một lần PleaseCheckOne=Vui lòng chỉ một séc +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Lệnh ghi nợ trực tiếp %s đã được tạo AmountRequested=Số tiền yêu cầu SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Số tiền: %s
    Phương pháp: %s
    Ngày: %s InfoRejectSubject=Lệnh thanh toán ghi nợ trực tiếp bị từ chối InfoRejectMessage=Xin chào,

    lệnh thanh toán ghi nợ trực tiếp của hóa đơn %s liên quan đến công ty %s, với số tiền %s đã bị ngân hàng từ chối.

    -
    %s ModeWarning=Tùy chọn cho chế độ thực không được đặt, chúng tôi dừng lại sau mô phỏng này +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/vi_VN/workflow.lang b/htdocs/langs/vi_VN/workflow.lang index b95352d0a54..0084de738c3 100644 --- a/htdocs/langs/vi_VN/workflow.lang +++ b/htdocs/langs/vi_VN/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Phân loại đơn đặt hàng bá # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Phân loại đề xuất nhà cung cấp nguồn được liên kết là đã xuất hóa đơn khi hóa đơn của nhà cung cấp được xác nhận (và nếu số tiền hóa đơn giống với tổng số tiền của đề xuất được liên kết) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Phân loại đơn đặt hàng mua nguồn được liên kết là đã xuất hóa đơn khi hóa đơn của nhà cung cấp được xác nhận (và nếu số tiền hóa đơn giống với tổng số tiền của đơn hàng được liên kết) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Tạo tự động AutomaticClassification=Phân loại tự động diff --git a/htdocs/langs/vi_VN/zapier.lang b/htdocs/langs/vi_VN/zapier.lang index 33d5ee1fd5a..bbb899dd004 100644 --- a/htdocs/langs/vi_VN/zapier.lang +++ b/htdocs/langs/vi_VN/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Mô-đun Zapier cho Dolibarr # Admin page # ZapierForDolibarrSetup = Thiết lập Zapier cho Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/zh_CN/accountancy.lang b/htdocs/langs/zh_CN/accountancy.lang index c806a1dfa77..1a235bd6572 100644 --- a/htdocs/langs/zh_CN/accountancy.lang +++ b/htdocs/langs/zh_CN/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=禁止在银行帐户中直接记录交易 ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=在日记帐上启用草稿导出 ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=销售日记帐 ACCOUNTING_PURCHASE_JOURNAL=采购日记帐 @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=未调解 ## Admin +BindingOptions=Binding options ApplyMassCategories=应用批量类别 AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=会计科目的类别已被删除 diff --git a/htdocs/langs/zh_CN/admin.lang b/htdocs/langs/zh_CN/admin.lang index c6ebf2a27a4..be82a61b831 100644 --- a/htdocs/langs/zh_CN/admin.lang +++ b/htdocs/langs/zh_CN/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=用户邮箱 CompanyEmail=Company Email FeatureNotAvailableOnLinux=功能在 Unix 类系统下不可用。请在本地测试您的sendmail程序。 +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=如果您发现当前语言的翻译不完整或有误,您可以通过编辑 langs/%s 文件更正它,并将修改后的文件提交至 www.transifex.com/dolibarr-association/dolibarr/(或者提交至QQ群:206239089) +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=模块设置 ModulesSetup=模块设置 ModuleFamilyBase=系统 @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=必须先行激活启用 %s 模块如果你需 SecurityToken=保护URL链接的密钥 NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF格式 -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=销售税/增值税规则 PDFLocaltax=%s的规则 -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=设置了基本参考价值的产品的价格 MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=字符串 +String1Line=String (1 line) TextLong=长文本 +TextLongNLines=Long text (n lines) HtmlText=Html文字 Int=整型 Float=浮点型 @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=条码 Module55Desc=条码管理 Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=网络电话 Module58Desc=网络电话系统集成(Asterisk ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=创建/变更服务 Permission534=删除服务 Permission536=查看/隐藏服务管理 Permission538=导出服务 +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=读取捐款资料 Permission702=创建/变更捐款资料 Permission703=删除捐款资料 @@ -848,6 +858,8 @@ Permission773=删除费用报表 Permission774=读取所有费用报表(即使用户没有下属) Permission775=批准费用报表 Permission776=支付费用报表 +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=导出费用报表 Permission1001=读取库存信息 Permission1002=创建/变更仓库 @@ -900,6 +912,7 @@ Permission2515=设置文档目录 Permission2801=允许FTP客户端读取(仅供浏览和下载) Permission2802=允许FTP客户端写入(删除和上传文件) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=删除资源 Permission63004=将资源链接到议程事件 DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=潜在的准客户 +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=地区 DictionaryCountry=国家 @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=单位 DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=社交网络 -DictionaryProspectStatus=准客户状态 +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=费用报告 - 运输类别 @@ -1076,7 +1091,7 @@ LoginPage=登录页面 BackgroundImageLogin=背景图 PermanentLeftSearchForm=常驻左侧菜单搜寻框 DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=公司/组织 CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=至少对于密钥或翻译字符串, NewTranslationStringToShow=显示新翻译字符串 OriginalValueWas=原始翻译被覆盖。原值是:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=启用的功能模块总共: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=您必须至少启用 1 个模块 ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=是(在夏天) @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=选择菜单议程时,您希望在默认情况下打开哪个选项卡 +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=通过电子邮件启用事件提醒(可以在每个事件上定义提醒选项/延迟)。注意:必须启用模块 %s 并正确设置才能以正确的频率发送提醒。 AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=启用声音通知 @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=将链接对象显示在议程视图中 ##### Clicktodial ##### ClickToDialSetup=点击拨号模块设置 ClickToDialUrlDesc=当点击手机图片完成时,网址会被呼叫。在网址中,您可以使用标记为
    __ PHONETO __ ,这些标记将替换为要拨打电话号码的人员的电话号码
    __ PHONEFROM __ 将替换为通话电话号码person(你的)
    __ LOGIN __将替换为clicktodial登录(在用户卡上定义)
    __ PASS __ 将替换为clicktodial密码(在用户上定义)卡)。 -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=在电话号码上链接 "tel:" ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=该字段包含标识行的引用。输入您选择的任何值, Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=RGB颜色采用HEX格式,例如:FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=行位置到组合列表中 SellTaxRate=消费税率 RecuperableOnly=适用于法国某些州的增值税“Not Perceived but Recoverable”是的。在所有其他情况下,将值保持为“否”。 @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=报价请求 MailToSendSupplierOrder=订单 MailToSendSupplierInvoice=供应商发票 MailToSendContract=合同 +MailToSendReception=Receptions MailToThirdparty=合作方 MailToMember=会员 MailToUser=用户 @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP&CRM %s可用。版本%s是一 ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=产品文件模板 +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=有关可能的替换变量列表,请参阅* note SeeChangeLog=请参阅ChangeLog文件(仅英文) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=PDF的左边距 MAIN_PDF_MARGIN_RIGHT=PDF的右边距 MAIN_PDF_MARGIN_TOP=PDF的上边距 MAIN_PDF_MARGIN_BOTTOM=PDF的底部边距 +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=如果此组是其他组的计算,则将此值设置为yes EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=邮编 MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/zh_CN/agenda.lang b/htdocs/langs/zh_CN/agenda.lang index dc5052e0cb2..0537baf6b02 100644 --- a/htdocs/langs/zh_CN/agenda.lang +++ b/htdocs/langs/zh_CN/agenda.lang @@ -14,7 +14,7 @@ EventsNb=事件数 ListOfActions=事件列表 EventReports=活动报告 Location=位置 -ToUserOfGroup=到组内任何用户 +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=全天事件 MenuToDoActions=所有未完成的事件 MenuDoneActions=所有终止事件 @@ -86,6 +86,8 @@ ProposalDeleted=报价已删除 OrderDeleted=订单已删除 InvoiceDeleted=发票已删除 DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=产品%s已创建 PRODUCT_MODIFYInDolibarr=产品%s改装 PRODUCT_DELETEInDolibarr=产品%s已删除 @@ -158,3 +160,9 @@ DateStartPlusOne=日期开始+ 1 小时 SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/zh_CN/boxes.lang b/htdocs/langs/zh_CN/boxes.lang index ef7f1c2f95b..99c36d31a7c 100644 --- a/htdocs/langs/zh_CN/boxes.lang +++ b/htdocs/langs/zh_CN/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=最近登记的 %s 位供应商 BoxTitleLastModifiedSuppliers=Vendors: last %s modified BoxTitleLastModifiedCustomers=Customers: last %s modified BoxTitleLastCustomersOrProspects=最近的 %s 位客户或准客户 -BoxTitleLastCustomerBills=Latest %s Customer invoices -BoxTitleLastSupplierBills=Latest %s Vendor invoices +BoxTitleLastCustomerBills=Latest %s modified Customer invoices +BoxTitleLastSupplierBills=Latest %s modified Vendor invoices BoxTitleLastModifiedProspects=Prospects: last %s modified BoxTitleLastModifiedMembers=新进 %s 位会员 BoxTitleLastFicheInter=最近变更的 %s 条干预 @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=最近变更的 %s 份报价 +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=客户发票 ForCustomersOrders=客户订单 ForProposals=报价 @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=会计 diff --git a/htdocs/langs/zh_CN/cashdesk.lang b/htdocs/langs/zh_CN/cashdesk.lang index 93498cb81b1..4ddbad3d082 100644 --- a/htdocs/langs/zh_CN/cashdesk.lang +++ b/htdocs/langs/zh_CN/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/zh_CN/compta.lang b/htdocs/langs/zh_CN/compta.lang index a861221bd87..6372c1186e3 100644 --- a/htdocs/langs/zh_CN/compta.lang +++ b/htdocs/langs/zh_CN/compta.lang @@ -69,6 +69,7 @@ SocialContribution=社会或财政税 SocialContributions=社会或财政税 SocialContributionsDeductibles=免赔额的社会或财政税 SocialContributionsNondeductibles=不可扣除的社会或财政税 +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=标签贡献 TypeContrib=类型贡献 MenuSpecialExpenses=其他费用 @@ -262,3 +263,5 @@ RulesPurchaseTurnoverIn=- It includes all the effective payments of invoices don RulesPurchaseTurnoverTotalPurchaseJournal=It includes all debit lines from the purchase journal. ReportPurchaseTurnover=Purchase turnover invoiced ReportPurchaseTurnoverCollected=Purchase turnover collected +IncludeVarpaysInResults = Include various payments in reports +IncludeLoansInResults = Include loans in reports diff --git a/htdocs/langs/zh_CN/contracts.lang b/htdocs/langs/zh_CN/contracts.lang index 927f4409a72..3bfdaae8fb7 100644 --- a/htdocs/langs/zh_CN/contracts.lang +++ b/htdocs/langs/zh_CN/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=正在运行的服务 MenuExpiredServices=过期服务 MenuClosedServices=休息服务 NewContract=新合同 -NewContractSubscription=新建联系人/订阅 +NewContractSubscription=New contract or subscription AddContract=创建联系人 DeleteAContract=删除合同 ActivateAllOnContract=激活所有服务 diff --git a/htdocs/langs/zh_CN/errors.lang b/htdocs/langs/zh_CN/errors.lang index 7fbf8ad3519..33ed9cea573 100644 --- a/htdocs/langs/zh_CN/errors.lang +++ b/htdocs/langs/zh_CN/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=新价值不能等于旧的价值 ErrorFailedToValidatePasswordReset=重新初始化密码密码失败。重新初始化密码已经完成(该链接可以只用一次)。如果没有,请尝试重新启动初始化过程。 ErrorToConnectToMysqlCheckInstance=连接数据库失败。检查数据库服务器是否正在运行(例如,使用mysql / mariadb,您可以使用'sudo service mysql start'从命令行启动它)。 ErrorFailedToAddContact=无法添加联系人 -ErrorDateMustBeBeforeToday=日期不能超过今天 +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=付款模式设置为键入%s但未完成模块发票的设置以定义要为此付款模式显示的信息。 ErrorPHPNeedModule=错误,您的PHP必须安装模块 %s 才能使用此功能。 ErrorOpenIDSetupNotComplete=您设置Dolibarr配置文件以允许OpenID身份验证,但OpenID服务的URL未定义为常量%s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=为此成员设置了密码。但是,未创建任何用户帐户。因此,此密码已存储,但无法用于登录Dolibarr。它可以由外部模块/接口使用,但如果您不需要为成员定义任何登录名或密码,则可以从成员模块设置中禁用“管理每个成员的登录名”选项。如果您需要管理登录但不需要任何密码,则可以将此字段保留为空以避免此警告。注意:如果成员链接到用户,则电子邮件也可用作登录。 diff --git a/htdocs/langs/zh_CN/languages.lang b/htdocs/langs/zh_CN/languages.lang index aab6e0b46a7..b70928b0819 100644 --- a/htdocs/langs/zh_CN/languages.lang +++ b/htdocs/langs/zh_CN/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=阿拉伯语 Language_ar_EG=阿拉伯语(埃及) Language_ar_SA=阿拉伯语 +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=保加利亚语 Language_bs_BA=波斯尼亚 Language_ca_ES=加泰罗尼亚 @@ -20,6 +23,7 @@ Language_en_GB=英语(英国) Language_en_IN=英国(印度) Language_en_NZ=英语(新西兰) Language_en_SA=英语(沙特阿拉伯) +Language_en_SG=English (Singapore) Language_en_US=英语(美国) Language_en_ZA=英语(南非) Language_es_ES=西班牙语 @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=西班牙语(厄瓜多尔) +Language_es_GT=Spanish (Guatemala) Language_es_HN=西班牙语(洪都拉斯) Language_es_MX=西班牙语(墨西哥) Language_es_PA=Spanish(巴拿马) @@ -36,6 +41,7 @@ Language_es_PY=西班牙语(巴拉圭) Language_es_PE=西班牙语(秘鲁) Language_es_PR=西班牙语(波多黎各) Language_es_UY=西班牙语(乌拉圭) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=爱沙尼亚语 Language_eu_ES=巴斯克 @@ -44,15 +50,22 @@ Language_fi_FI=完成 Language_fr_BE=法语(比利时) Language_fr_CA=法语(加拿大) Language_fr_CH=法语(瑞士) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=法国的 +Language_fr_GA=French (Gabon) Language_fr_NC=法语(新喀里多尼亚) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=希伯来语 +Language_hi_IN=Hindi (India) Language_hr_HR=克罗地亚 Language_hu_HU=匈牙利 Language_id_ID=Indonesian Language_is_IS=冰岛 Language_it_IT=意大利语 +Language_it_CH=Italian (Switzerland) Language_ja_JP=日语 Language_ka_GE=Georgian Language_km_KH=高棉 @@ -64,6 +77,7 @@ Language_lv_LV=拉脱维亚 Language_mk_MK=马其顿 Language_mn_MN=蒙 Language_nb_NO=挪威文(巴克摩) +Language_ne_NP=Nepali Language_nl_BE=荷兰语(比利时) Language_nl_NL=Dutch Language_pl_PL=波兰语 @@ -86,4 +100,5 @@ Language_uz_UZ=乌兹别克 Language_vi_VN=越南语 Language_zh_CN=中文 Language_zh_TW=中文(繁体) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/zh_CN/mails.lang b/htdocs/langs/zh_CN/mails.lang index 127a61c350d..c6a2af28558 100644 --- a/htdocs/langs/zh_CN/mails.lang +++ b/htdocs/langs/zh_CN/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=默认外发电子邮件设置 Information=信息 ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/zh_CN/main.lang b/htdocs/langs/zh_CN/main.lang index e04cd1732ec..cfa3a26ae4b 100644 --- a/htdocs/langs/zh_CN/main.lang +++ b/htdocs/langs/zh_CN/main.lang @@ -355,8 +355,8 @@ PriceUTTC=单价(含税) Amount=金额 AmountInvoice=发票金额 AmountInvoiced=发票金额 -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=付款金额 AmountHTShort=Amount (excl.) AmountTTCShort=金额(含税) @@ -485,6 +485,7 @@ Categories=标签/分类 Category=标签/分类 By=由 From=从 +FromDate=从 FromLocation=从 to=至 To=至 @@ -687,6 +688,7 @@ Method=方法 Receive=收到 CompleteOrNoMoreReceptionExpected=完成或没有更多的预期 ExpectedValue=期望值 +ExpectedQty=Expected Qty PartialWoman=局部的 TotalWoman=总计 NeverReceived=从未收到 @@ -703,6 +705,7 @@ MenuECM=文件 MenuAWStats=AWStats MenuMembers=会员 MenuAgendaGoogle=谷歌议程 +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=来自Dolibarr本身的大小限制(菜单:home-setup-security)为:%s Kb,而PHP的限制为: %s Kb NoFileFound=这个目录没保存有文档 CurrentUserLanguage=当前语言 @@ -725,7 +728,7 @@ Page=页面 Notes=备注 AddNewLine=添加新行 AddFile=添加文件 -FreeZone=不是预定义的产品/服务 +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=复制项目含主属性 ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=四 ShortFriday=五 ShortSaturday=六 ShortSunday=日 +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=选择电子邮件模板 SetRef=套编号 Select2ResultFoundUseArrows=发现结果。使用箭头选择。 @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=信息 +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/zh_CN/members.lang b/htdocs/langs/zh_CN/members.lang index 76512b6db6f..6c9362fb204 100644 --- a/htdocs/langs/zh_CN/members.lang +++ b/htdocs/langs/zh_CN/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=终止的成员 MemberStatusResiliatedShort=终止 MembersStatusToValid=待定会员 MembersStatusResiliated=解雇会员 +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=批准 +SubscriptionNotNeeded=No subscription needed NewCotisation=新的捐献 PaymentSubscription=支付的新贡献 SubscriptionEndDate=认购的结束日期 @@ -78,7 +81,7 @@ DeleteType=删除 VoteAllowed=是否允许投票 Physical=普通会员 Moral=荣誉会员 -MorPhy=荣誉会员/普通会员 +MorPhy=属性 Reenable=重新启用 ResiliateMember=终止会员 ConfirmResiliateMember=您确定要终止此会员吗? diff --git a/htdocs/langs/zh_CN/mrp.lang b/htdocs/langs/zh_CN/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/zh_CN/mrp.lang +++ b/htdocs/langs/zh_CN/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/zh_CN/other.lang b/htdocs/langs/zh_CN/other.lang index 4b416b2e696..4671a563cb1 100644 --- a/htdocs/langs/zh_CN/other.lang +++ b/htdocs/langs/zh_CN/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(你好)__\n\n\n__(此致)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(你好)__\n\n\n__(此致)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(你好)__\n\n\n__(此致)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=如果尚未完成,您可以点击下面的链接进行付款。\n\n%s\n\n +PredefinedMailContentGeneric=__(你好)__\n\n\n__(此致)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr是一款具有几百种业务模块支撑的紧凑型ERP / CRM系统。如若所有的业务模块统统向您展示演示我们认为这么做没有任何意义,假如真发生了这样的情况:这几百个业务贵公司统统都涉足到了那么请您直接包养我们吧,土豪请直接 (加我们中国社区QQ群206239089)赞助我们吧,让Dolibarr在中国推得更广走得更远!以下您有几个选择。 ChooseYourDemoProfil=请选择最贴近贵企业需求的演示… ChooseYourDemoProfilMore=...自定义配置
    (手动选择模块) @@ -280,7 +278,9 @@ LinesToImport=要导入的行 MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/zh_CN/products.lang b/htdocs/langs/zh_CN/products.lang index 7c4ca236f10..010f84186a7 100644 --- a/htdocs/langs/zh_CN/products.lang +++ b/htdocs/langs/zh_CN/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=设置条码类型 BarcodeValue=条码值 NoteNotVisibleOnBill=备注 (账单、报价...中不可见) ServiceLimitedDuration=如果产品是有限期的服务: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=价格个数 DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=海关/商品/ HS编码 CountryOrigin=产地国 Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=标签别名 Unit=单位 p=u. @@ -359,6 +362,9 @@ SelectCombination=选择组合 ProductCombinationGenerator=变种发电机 Features=特征 PriceImpact=价格影响 +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=重量影响 NewProductAttribute=新建属性 NewProductAttributeValue=新属性值 diff --git a/htdocs/langs/zh_CN/projects.lang b/htdocs/langs/zh_CN/projects.lang index 866cc0d8bd1..748dc5a455e 100644 --- a/htdocs/langs/zh_CN/projects.lang +++ b/htdocs/langs/zh_CN/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=捐助 TypeContact_project_task_external_TASKCONTRIBUTOR=捐助 SelectElement=选择元素 AddElement=链接到元素 +LinkToElementShort=链接到 # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=统计项目/线索 -TasksStatistics=项目/主要任务的统计数据 +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=任务已分配。应该可以输入此任务的时间。 IdTaskTime=Id任务时间 YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/zh_CN/propal.lang b/htdocs/langs/zh_CN/propal.lang index 2c782854e14..79d10f5e2ba 100644 --- a/htdocs/langs/zh_CN/propal.lang +++ b/htdocs/langs/zh_CN/propal.lang @@ -85,3 +85,7 @@ ProposalCustomerSignature=书面接受,公司盖章,日期和签名 ProposalsStatisticsSuppliers=Vendor proposals statistics CaseFollowedBy=Case followed by SignedOnly=Signed only +IdProposal=提案编号 +IdProduct=产品编号 +PrParentLine=提案父行 +LineBuyPriceHT=购买价格扣除税额 diff --git a/htdocs/langs/zh_CN/recruitment.lang b/htdocs/langs/zh_CN/recruitment.lang new file mode 100644 index 00000000000..4ec45432005 --- /dev/null +++ b/htdocs/langs/zh_CN/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = 设置 +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = 关于 +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/zh_CN/stocks.lang b/htdocs/langs/zh_CN/stocks.lang index 91e29231f45..3979fe7c0d4 100644 --- a/htdocs/langs/zh_CN/stocks.lang +++ b/htdocs/langs/zh_CN/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=删除发送 Stock=库存 Stocks=库存 MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=按库存批号/序列号 @@ -95,14 +95,16 @@ RealStock=实际库存 RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=虚拟库存 -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=编号仓库 DescWareHouse=说明仓库 LieuWareHouse=本地化仓库 WarehousesAndProducts=仓库和产品 WarehousesAndProductsBatchDetail=仓库和产品(各批号/序列号详情) -AverageUnitPricePMPShort=投入品平均价格 -AverageUnitPricePMP=投入品平均价格 +AverageUnitPricePMPShort=加权平均价格 +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=销售单价 EstimatedStockValueSellShort=销量 EstimatedStockValueSell=销量 @@ -141,7 +143,7 @@ Replenishments=补充资金 NbOfProductBeforePeriod=产品数量%s选定期前库存(<%s) NbOfProductAfterPeriod=选定期限后产品数量%s(> %s) MassMovement=批量库存调拨 -SelectProductInAndOutWareHouse=请选择一个产品,数量值,来源仓和目标仓,然后点击 "%s"。完了之后呢,点击 "%s"。 +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=记录转移 ReceivingForSameOrder=此订单的收据 StockMovementRecorded=库存调拨已记录 @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/zh_CN/suppliers.lang b/htdocs/langs/zh_CN/suppliers.lang index 5aa256c3c48..104c84a126f 100644 --- a/htdocs/langs/zh_CN/suppliers.lang +++ b/htdocs/langs/zh_CN/suppliers.lang @@ -1,11 +1,11 @@ -# Dolibarr language file - Source file is en_US - suppliers -Suppliers=Vendors -SuppliersInvoice=Vendor invoice -ShowSupplierInvoice=Show Vendor Invoice -NewSupplier=New vendor +# Dolibarr language file - Source file is en_US - vendors +Suppliers=供应商 +SuppliersInvoice=供应商发票 +ShowSupplierInvoice=显示供应商发票 +NewSupplier=新供应商 History=历史 -ListOfSuppliers=List of vendors -ShowSupplier=Show vendor +ListOfSuppliers=供应商列表 +ShowSupplier=显示供应商 OrderDate=订购日期 BuyingPriceMin=最优采购价 BuyingPriceMinShort=最优采购价 @@ -14,34 +14,34 @@ TotalSellingPriceMinShort=子产品销售价格合计 SomeSubProductHaveNoPrices=某些副产品没有定义价格 AddSupplierPrice=添加采购价 ChangeSupplierPrice=更改采购价 -SupplierPrices=Vendor prices -ReferenceSupplierIsAlreadyAssociatedWithAProduct=该参考供应商已经与一参考:%s的 -NoRecordedSuppliers=No vendor recorded -SupplierPayment=Vendor payment -SuppliersArea=Vendor area -RefSupplierShort=Ref. vendor +SupplierPrices=供应商价格 +ReferenceSupplierIsAlreadyAssociatedWithAProduct=This vendor reference is already associated with a product: %s +NoRecordedSuppliers=没有供应商记录 +SupplierPayment=供应商付款 +SuppliersArea=供应商区域 +RefSupplierShort=参考。供应商 Availability=可用性 -ExportDataset_fournisseur_1=Vendor invoices list and invoice lines -ExportDataset_fournisseur_2=Vendor invoices and payments -ExportDataset_fournisseur_3=Purchase orders and order lines +ExportDataset_fournisseur_1=供应商发票和发票详细信息 +ExportDataset_fournisseur_2=供应商发票和付款 +ExportDataset_fournisseur_3=采购订单和订单详情 ApproveThisOrder=批准这一命令 ConfirmApproveThisOrder=是否确定要批准此订单 %s ? DenyingThisOrder=否认这笔订单 ConfirmDenyingThisOrder=是否确定要拒绝此订单 %s? ConfirmCancelThisOrder=是否确定要取消此订单 %s? -AddSupplierOrder=Create Purchase Order -AddSupplierInvoice=Create vendor invoice -ListOfSupplierProductForSupplier=List of products and prices for vendor %s -SentToSuppliers=Sent to vendors -ListOfSupplierOrders=List of purchase orders -MenuOrdersSupplierToBill=Purchase orders to invoice -NbDaysToDelivery=交货延迟天数 -DescNbDaysToDelivery=此订单产品的最长交货延迟 -SupplierReputation=Vendor reputation +AddSupplierOrder=创建采购订单 +AddSupplierInvoice=创建供应商发票 +ListOfSupplierProductForSupplier=供应商的产品清单和价格 %s +SentToSuppliers=发送给供应商 +ListOfSupplierOrders=采购订单清单 +MenuOrdersSupplierToBill=采购订单发票 +NbDaysToDelivery=Delivery delay (days) +DescNbDaysToDelivery=The longest delivery delay of the products from this order +SupplierReputation=供应商声誉 DoNotOrderThisProductToThisSupplier=不订购 -NotTheGoodQualitySupplier=劣质 +NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=信誉 BuyerName=买家名称 AllProductServicePrices=全部 产品/服务 价格 -AllProductReferencesOfSupplier=供应商的所有 产品/服务 参考 -BuyingPriceNumShort=Vendor prices +AllProductReferencesOfSupplier=All references of vendor +BuyingPriceNumShort=供应商价格 diff --git a/htdocs/langs/zh_CN/ticket.lang b/htdocs/langs/zh_CN/ticket.lang index dd8e9fb79d4..2d2ab96304e 100644 --- a/htdocs/langs/zh_CN/ticket.lang +++ b/htdocs/langs/zh_CN/ticket.lang @@ -72,7 +72,6 @@ Deleted=删除 # Dict Type=类型 -Category=Analytic code Severity=严重 # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=自动分配创建故障单的用户 TicketsAutoAssignTicketHelp=创建故障单时,可以自动将用户分配给故障单。 TicketNumberingModules=票据编号模块 TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=组 TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=制作: NewTicket=新票据 SubjectAnswerToTicket=票据应答 TicketTypeRequest=请求类型 -TicketCategory=Analytic code +TicketCategory=组 SeeTicket=查看票据 TicketMarkedAsRead=票据已标记为已读 TicketReadOn=请继续阅读 diff --git a/htdocs/langs/zh_CN/users.lang b/htdocs/langs/zh_CN/users.lang index d84917431eb..a1b638ec1dd 100644 --- a/htdocs/langs/zh_CN/users.lang +++ b/htdocs/langs/zh_CN/users.lang @@ -78,6 +78,7 @@ UserWillBeExternalUser=创建的用户将是外部用户(因为链接到一个 IdPhoneCaller=手机来电者身份 NewUserCreated=创建用户%s NewUserPassword=%s修改了密码 +NewPasswordValidated=Your new password have been validated and must be used now to login. EventUserModified=用户 %s 已变更 UserDisabled=用户%s禁用 UserEnabled=用户%s启动 @@ -107,6 +108,7 @@ DisabledInMonoUserMode=在维护模式下禁用 UserAccountancyCode=用户科目代码 UserLogoff=用户注销 UserLogged=用户登录 +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -115,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/zh_CN/withdrawals.lang b/htdocs/langs/zh_CN/withdrawals.lang index 03b8d966939..952c2388f85 100644 --- a/htdocs/langs/zh_CN/withdrawals.lang +++ b/htdocs/langs/zh_CN/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=提款收据 WithdrawalReceipt=提款收据 -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=最后 %s 取款收据 @@ -63,7 +63,9 @@ InvoiceRefused=订单已被拒绝 (Charge the rejection to customer) StatusDebitCredit=状态借记/贷记 StatusWaiting=等候 StatusTrans=传播 +StatusDebited=Debited StatusCredited=计入 +StatusPaid=已支付 StatusRefused=拒绝 StatusMotif0=未指定 StatusMotif1=提供insuffisante @@ -77,13 +79,13 @@ StatusMotif8=其他原因 CreateForSepaFRST=创建直接借记文件(SEPA FRST) CreateForSepaRCUR=创建直接借记文件(SEPA RCUR) CreateAll=创建直接借记文件(全部) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=只有办公室 CreateBanque=只有银行 OrderWaiting=等待治疗 -NotifyTransmision=提款传输 -NotifyCredit=提款信用 +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=国家发射数 WithBankUsingRIB=有关银行账户,使用肋 WithBankUsingBANBIC=使用的IBAN / BIC / SWIFT的银行帐户 @@ -93,9 +95,10 @@ CreditDate=信贷 WithdrawalFileNotCapable=无法为您所在的国家/地区生成提款收据文件%s(不支持您所在的国家/地区) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=撤回文件 +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=设置状态“发送的文件” ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=按状态明细统计 @@ -121,6 +124,7 @@ SEPAFrstOrRecur=付款方式 ModeRECUR=Recurring payment ModeFRST=一次性付款 PleaseCheckOne=请检查一个 +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=创建直接借记订单%s AmountRequested=要求金额 SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=金额:%s
    metode:%s
    日期:%s InfoRejectSubject=直接付款订单被拒绝 InfoRejectMessage=您好,

    与公司%s相关的发票%s的直接借记支付订单,金额已被%s拒绝了。



    %s ModeWarning=实模式下的选项没有设置,这个模拟后,我们停止 +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/zh_CN/workflow.lang b/htdocs/langs/zh_CN/workflow.lang index 2aa7123b2ff..34d49860135 100644 --- a/htdocs/langs/zh_CN/workflow.lang +++ b/htdocs/langs/zh_CN/workflow.lang @@ -1,20 +1,23 @@ # Dolibarr language file - Source file is en_US - workflow WorkflowSetup=工作流模块设置 -WorkflowDesc=本模块旨在将自动操作的行为修改为应用程序。默认情况下, 工作流处于打开状态 (您可以按所需顺序执行某些动作)。您还可以激活您感兴趣的自动操作。 +WorkflowDesc=This module provides some automatic actions. By default, the workflow is open (you can do things in the order you want) but here you can activate some automatic actions. ThereIsNoWorkflowToModify=没有工作流程,您可以修改你已激活的模块。 # Autocreate -descWORKFLOW_PROPAL_AUTOCREATE_ORDER=在商业方案签订后自动创建客户订单 (新订单的金额将与方案相同) -descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=在商业方案签订后自动创建客户账单 (新账单的金额与提案金额相) +descWORKFLOW_PROPAL_AUTOCREATE_ORDER=Automatically create a sales order after a commercial proposal is signed (the new order will have same amount as the proposal) +descWORKFLOW_PROPAL_AUTOCREATE_INVOICE=Automatically create a customer invoice after a commercial proposal is signed (the new invoice will have same amount as the proposal) descWORKFLOW_CONTRACT_AUTOCREATE_INVOICE=在合同确认后自动创建客户发票 -descWORKFLOW_ORDER_AUTOCREATE_INVOICE=在客户订单关闭后自动创建客户账单 (新账单的金额将大于订单) +descWORKFLOW_ORDER_AUTOCREATE_INVOICE=Automatically create a customer invoice after a sales order is closed (the new invoice will have same amount as the order) # Autoclassify customer proposal or order -descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=将 "客户订单" 设置为 "记帐" 时对关联的源方案进行分类 (如果订单金额与已签名的关联方案总金额相同) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=当客户账单被确认时 ( 如果账单金额与已签订的关联方案总额相同 ) ,将关联源方案分类为账单。 -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=当客户账单被确认时,将关联源客户订单分类为账单(如果账单金额与关联订单总额相同) -descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=当客户账单设定为支付时,将关联源客户订单分类为账单(如果账单金额与关联订单总额相同) -descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=将关联源客户订单分类为发货时进行验证 (如果所有装运的货物数量与更新的订单相同) -# Autoclassify supplier order -descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked proposals) -descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order(s) to billed when vendor invoice is validated (and if amount of the invoice is same than total amount of linked orders) +descWORKFLOW_ORDER_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when sales order is set to billed (and if the amount of the order is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_PROPAL=Classify linked source proposal as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the signed linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_INVOICE_CLASSIFY_BILLED_ORDER=Classify linked source sales order as billed when customer invoice is set to paid (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order as shipped when a shipment is validated (and if the quantity shipped by all shipments is the same as in the order to update) +# Autoclassify purchase order +descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) +descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=自动创建 AutomaticClassification=自动分类 diff --git a/htdocs/langs/zh_CN/zapier.lang b/htdocs/langs/zh_CN/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/zh_CN/zapier.lang +++ b/htdocs/langs/zh_CN/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/zh_HK/accountancy.lang b/htdocs/langs/zh_HK/accountancy.lang index be6ca9e2f19..7b59e33b296 100644 --- a/htdocs/langs/zh_HK/accountancy.lang +++ b/htdocs/langs/zh_HK/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=Allow to manage different number of zeros at the end of a BANK_DISABLE_DIRECT_INPUT=Disable direct recording of transaction in bank account ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=Enable draft export on journal ACCOUNTANCY_COMBO_FOR_AUX=Enable combo list for subsidiary account (may be slow if you have a lot of third parties) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=Sell journal ACCOUNTING_PURCHASE_JOURNAL=Purchase journal @@ -284,6 +285,7 @@ ShowTutorial=Show Tutorial NotReconciled=Not reconciled ## Admin +BindingOptions=Binding options ApplyMassCategories=Apply mass categories AddAccountFromBookKeepingWithNoCategories=Available account not yet in the personalized group CategoryDeleted=Category for the accounting account has been removed diff --git a/htdocs/langs/zh_HK/admin.lang b/htdocs/langs/zh_HK/admin.lang index 7e9d78f1047..d7c4eb282cd 100644 --- a/htdocs/langs/zh_HK/admin.lang +++ b/htdocs/langs/zh_HK/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=Default sender email for manual sending (User email o UserEmail=User email CompanyEmail=Company Email FeatureNotAvailableOnLinux=Feature not available on Unix like systems. Test your sendmail program locally. +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=If the translation for this language is not complete or you find errors, you can correct this by editing files in directory langs/%s and submit your change to www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or for developers on github.com/Dolibarr/dolibarr. +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=Module setup ModulesSetup=Modules/Application setup ModuleFamilyBase=System @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=Module %s must be enabled first if you need this SecurityToken=Key to secure URLs NoSmsEngine=No SMS sender manager available. A SMS sender manager is not installed with the default distribution because they depend on an external vendor, but you can find some on %s PDF=PDF -PDFDesc=Global options for PDF generation. -PDFAddressForging=Rules for address boxes +PDFDesc=Global options for PDF generation +PDFAddressForging=Rules for address section HideAnyVATInformationOnPDF=Hide all information related to Sales Tax / VAT PDFRulesForSalesTax=Rules for Sales Tax / VAT PDFLocaltax=Rules for %s -HideLocalTaxOnPDF=Hide %s rate in column Tax Sale +HideLocalTaxOnPDF=Hide %s rate in column Sale Tax / VAT HideDescOnPDF=Hide products description HideRefOnPDF=Hide products ref. HideDetailsOnPDF=Hide product lines details @@ -408,7 +409,9 @@ PriceBaseTypeToChange=Modify on prices with base reference value defined on MassConvert=Launch bulk conversion PriceFormatInCurrentLanguage=Price Format In Current Language String=String +String1Line=String (1 line) TextLong=Long text +TextLongNLines=Long text (n lines) HtmlText=Html text Int=Integer Float=Float @@ -543,9 +546,9 @@ Module54Desc=Management of contracts (services or recurring subscriptions) Module55Name=Barcodes Module55Desc=Barcode management Module56Name=Payment by credit transfer -Module56Desc=Management of payment of suppliers by credit transfer orders. It includes generation of SEPA file for European countries. -Module57Name=Bank Direct Debit payments -Module57Desc=Management of Direct Debit payment orders. It includes generation of SEPA file for European countries. +Module56Desc=Management of payment of suppliers by Credit Transfer orders. It includes generation of SEPA file for European countries. +Module57Name=Payments by Direct Debit +Module57Desc=Management of Direct Debit orders. It includes generation of SEPA file for European countries. Module58Name=ClickToDial Module58Desc=Integration of a ClickToDial system (Asterisk, ...) Module59Name=Bookmark4u @@ -836,9 +839,16 @@ Permission532=Create/modify services Permission534=Delete services Permission536=See/manage hidden services Permission538=Export services +Permission561=Read payment orders by credit transfer +Permission562=Create/modify payment order by credit transfer +Permission563=Send/Transmit payment order by credit transfer +Permission564=Record Debits/Rejections of credit transfer Permission650=Read Bills of Materials Permission651=Create/Update Bills of Materials Permission652=Delete Bills of Materials +Permission660=Read Manufacturing Order (MO) +Permission661=Create/Update Manufacturing Order (MO) +Permission662=Delete Manufacturing Order (MO) Permission701=Read donations Permission702=Create/modify donations Permission703=Delete donations @@ -848,6 +858,8 @@ Permission773=Delete expense reports Permission774=Read all expense reports (even for user not subordinates) Permission775=Approve expense reports Permission776=Pay expense reports +Permission777=Read expense reports of everybody +Permission778=Create/modify expense reports of everybody Permission779=Export expense reports Permission1001=Read stocks Permission1002=Create/modify warehouses @@ -900,6 +912,7 @@ Permission2515=Setup documents directories Permission2801=Use FTP client in read mode (browse and download only) Permission2802=Use FTP client in write mode (delete or upload files) Permission3200=Read archived events and fingerprints +Permission3301=Generate new modules Permission4001=See employees Permission4002=Create employees Permission4003=Delete employees @@ -947,7 +960,8 @@ Permission63003=Delete resources Permission63004=Link resources to agenda events DictionaryCompanyType=Third-party types DictionaryCompanyJuridicalType=Third-party legal entities -DictionaryProspectLevel=Prospect potential +DictionaryProspectLevel=Prospect potential level for companies +DictionaryProspectContactLevel=Prospect potential level for contacts DictionaryCanton=States/Provinces DictionaryRegion=Regions DictionaryCountry=Countries @@ -977,7 +991,8 @@ DictionaryEMailTemplates=Email Templates DictionaryUnits=Units DictionaryMeasuringUnits=Measuring Units DictionarySocialNetworks=Social Networks -DictionaryProspectStatus=Prospect status +DictionaryProspectStatus=Prospect status for companies +DictionaryProspectContactStatus=Prospect status for contacts DictionaryHolidayTypes=Types of leave DictionaryOpportunityStatus=Lead status for project/lead DictionaryExpenseTaxCat=Expense report - Transportation categories @@ -1076,7 +1091,7 @@ LoginPage=Login page BackgroundImageLogin=Background image PermanentLeftSearchForm=Permanent search form on left menu DefaultLanguage=Default language -EnableMultilangInterface=Enable multilanguage support +EnableMultilangInterface=Enable multilanguage support for customer or vendor relationships EnableShowLogo=Show the company logo in the menu CompanyInfo=Company/Organization CompanyIds=Company/Organization identities @@ -1240,7 +1255,8 @@ WarningAtLeastKeyOrTranslationRequired=A search criteria is required at least fo NewTranslationStringToShow=New translation string to show OriginalValueWas=The original translation is overwritten. Original value was:

    %s TransKeyWithoutOriginalValue=You forced a new translation for the translation key '%s' that does not exist in any language files -TotalNumberOfActivatedModules=Activated application/modules: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=You must at least enable 1 module ClassNotFoundIntoPathWarning=Class %s not found in PHP path YesInSummer=Yes in summer @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=Use events types (managed in menu Setup -> Dictionaries -> AGENDA_USE_EVENT_TYPE_DEFAULT=Automatically set this default value for type of event in event create form AGENDA_DEFAULT_FILTER_TYPE=Automatically set this type of event in search filter of agenda view AGENDA_DEFAULT_FILTER_STATUS=Automatically set this status for events in search filter of agenda view -AGENDA_DEFAULT_VIEW=Which tab do you want to open by default when selecting menu Agenda +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=Enable event reminder by emails (remind option/delay can be defined on each event). Note: Module %s must be enabled and correctly setup to have reminder sent at the correct frequency. AGENDA_REMINDER_BROWSER=Enable event reminder on user's browser (when event date is reached, each user is able to refuse this from the browser confirmation question) AGENDA_REMINDER_BROWSER_SOUND=Enable sound notification @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=Show linked object into agenda view ##### Clicktodial ##### ClickToDialSetup=Click To Dial module setup ClickToDialUrlDesc=Url called when a click on phone picto is done. In URL, you can use tags
    __PHONETO__ that will be replaced with the phone number of person to call
    __PHONEFROM__ that will be replaced with phone number of calling person (yours)
    __LOGIN__ that will be replaced with clicktodial login (defined on user card)
    __PASS__ that will be replaced with clicktodial password (defined on user card). -ClickToDialDesc=This module makea phone numbers clickable links. A click on the icon will make your phone call the number. This can be used to call a call-center system from Dolibarr that can call the phone number on a SIP system for example. +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=Use just a link "tel:" on phone numbers ClickToDialUseTelLinkDesc=Use this method if your users have a softphone or a software interface installed on the same computer as the browser, and called when you click on a link in your browser that starts with "tel:". If you need a full server solution (no need of local software installation), you must set this to "No" and fill next field. ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=This field contains a reference to identify line. Enter any value o Enter0or1=Enter 0 or 1 UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364] ColorFormat=The RGB color is in HEX format, eg: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=Position of line into combo lists SellTaxRate=Sale tax rate RecuperableOnly=Yes for VAT "Not Perceived but Recoverable" dedicated for some state in France. Keep value to "No" in all other cases. @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=Quotation request MailToSendSupplierOrder=Purchase orders MailToSendSupplierInvoice=Vendor invoices MailToSendContract=Contracts +MailToSendReception=Receptions MailToThirdparty=Third parties MailToMember=Members MailToUser=Users @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=Dolibarr ERP & CRM %s is available. Version ExampleOfNewsMessageForMaintenanceRelease=Dolibarr ERP & CRM %s is available. Version %s is a maintenance version, so contains only bug fixes. We recommend all users to upgrade to this version. A maintenance release does not introduce new features or changes to the database. You may download it from the download area of https://www.dolibarr.org portal (subdirectory Stable versions). You can read the ChangeLog for complete list of changes. MultiPriceRuleDesc=When option "Several levels of prices per product/service" is enabled, you can define different prices (one per price level) for each product. To save you time, here you may enter a rule to autocalculate a price for each level based on the price of the first level, so you will have to only enter a price for the first level for each product. This page is designed to save you time but is useful only if your prices for each level are relative to first level. You can ignore this page in most cases. ModelModulesProduct=Templates for product documents +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=To be able to generate codes automatically, you must first define a manager to auto-define the barcode number. SeeSubstitutionVars=See * note for list of possible substitution variables SeeChangeLog=See ChangeLog file (english only) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=Left margin on PDF MAIN_PDF_MARGIN_RIGHT=Right margin on PDF MAIN_PDF_MARGIN_TOP=Top margin on PDF MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=There is no specific setup required for this module. SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups EnterCalculationRuleIfPreviousFieldIsYes=Enter calculation rule if previous field was set to Yes (For example 'CODEGRP1+CODEGRP2') @@ -1933,13 +1953,14 @@ NothingProcessed=Nothing done XEmailsDoneYActionsDone=%s emails qualified, %s emails successfully processed (for %s record/actions done) RecordEvent=Record email event CreateLeadAndThirdParty=Create lead (and third party if necessary) -CreateTicketAndThirdParty=Create ticket (and third party if necessary) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=Latest result code NbOfEmailsInInbox=Number of emails in source directory LoadThirdPartyFromName=Load third party searching on %s (load only) LoadThirdPartyFromNameOrCreate=Load third party searching on %s (create if not found) -WithDolTrackingID=Dolibarr Reference found in Message ID -WithoutDolTrackingID=Dolibarr Reference not found in Message ID +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=Menu entry code (mainmenu) ECMAutoTree=Show automatic ECM tree @@ -1981,7 +2002,7 @@ ImportSetup=Setup of module Import InstanceUniqueID=Unique ID of the instance SmallerThan=Smaller than LargerThan=Larger than -IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects. +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/. EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account. EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\\s([^\\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body. @@ -2005,3 +2026,7 @@ RssNote=Note: Each RSS feed definition provides a widget that you must enable to JumpToBoxes=Jump to Setup -> Widgets MeasuringUnitTypeDesc=Use here a value like "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=The scale is the number of places you have to move the decimal part to match the default reference unit. For "time" unit type, it is the number of seconds. Values between 80 and 99 are reserved values. +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/zh_HK/agenda.lang b/htdocs/langs/zh_HK/agenda.lang index 5b81d05db45..09d82139a49 100644 --- a/htdocs/langs/zh_HK/agenda.lang +++ b/htdocs/langs/zh_HK/agenda.lang @@ -14,7 +14,7 @@ EventsNb=Number of events ListOfActions=List of events EventReports=Event reports Location=Location -ToUserOfGroup=To any user in group +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=Event on all day(s) MenuToDoActions=All incomplete events MenuDoneActions=All terminated events @@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted OrderDeleted=Order deleted InvoiceDeleted=Invoice deleted DraftInvoiceDeleted=Draft invoice deleted +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted @@ -158,3 +160,9 @@ DateStartPlusOne=Date start + 1 hour SetAllEventsToTodo=Set all events to todo SetAllEventsToInProgress=Set all events to in progress SetAllEventsToFinished=Set all events to finished +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/zh_HK/boxes.lang b/htdocs/langs/zh_HK/boxes.lang index bd62684421a..d6fd298a3a7 100644 --- a/htdocs/langs/zh_HK/boxes.lang +++ b/htdocs/langs/zh_HK/boxes.lang @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=Vendor Orders: last %s modified BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified BoxTitleLastModifiedPropals=Latest %s modified proposals +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=Customers invoices ForCustomersOrders=Customers orders ForProposals=Proposals @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=Suspense account isn't defined BoxLastCustomerShipments=Last customer shipments BoxTitleLastCustomerShipments=Latest %s customer shipments NoRecordedShipments=No recorded customer shipment +# Pages +AccountancyHome=Accountancy diff --git a/htdocs/langs/zh_HK/cashdesk.lang b/htdocs/langs/zh_HK/cashdesk.lang index 157c5d93a4c..498baa82200 100644 --- a/htdocs/langs/zh_HK/cashdesk.lang +++ b/htdocs/langs/zh_HK/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS Module BasicPhoneLayout=Use basic layout for phones SetupOfTerminalNotComplete=Setup of terminal %s is not complete DirectPayment=Direct payment -DirectPaymentButton=Direct cash payment button +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill CustomReceipt=Custom Receipt @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=External module with extra features. Posibilit PrintMethod=Print method ReceiptPrinterMethodDescription=Powerful method with a lot of parameters. Full customizable with templates. Cannot print from the cloud. ByTerminal=By terminal -TakeposNumpadUsePaymentIcon=Use payment icon on numpad +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=Numbering module for POS sales CashDeskGenericMaskCodes6 =
    {TN} tag is used to add the terminal number TakeposGroupSameProduct=Group same products lines StartAParallelSale=Start a new parallel sale -ControlCashOpening=Control cash box at opening pos +ControlCashOpening=Control cash box at opening POS CloseCashFence=Close cash fence CashReport=Cash report MainPrinterToUse=Main printer to use @@ -115,5 +115,10 @@ ScanToOrder=Scan QR code to order Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/zh_HK/compta.lang b/htdocs/langs/zh_HK/compta.lang index 8a8c837ac87..8f4f058bb87 100644 --- a/htdocs/langs/zh_HK/compta.lang +++ b/htdocs/langs/zh_HK/compta.lang @@ -69,6 +69,7 @@ SocialContribution=Social or fiscal tax SocialContributions=Social or fiscal taxes SocialContributionsDeductibles=Deductible social or fiscal taxes SocialContributionsNondeductibles=Nondeductible social or fiscal taxes +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=Label contribution TypeContrib=Type contribution MenuSpecialExpenses=Special expenses diff --git a/htdocs/langs/zh_HK/contracts.lang b/htdocs/langs/zh_HK/contracts.lang index a6877e8385f..a9ac308142a 100644 --- a/htdocs/langs/zh_HK/contracts.lang +++ b/htdocs/langs/zh_HK/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=Running services MenuExpiredServices=Expired services MenuClosedServices=Closed services NewContract=New contract -NewContractSubscription=New contract/subscription +NewContractSubscription=New contract or subscription AddContract=Create contract DeleteAContract=Delete a contract ActivateAllOnContract=Activate all services diff --git a/htdocs/langs/zh_HK/errors.lang b/htdocs/langs/zh_HK/errors.lang index 7b1ff639ed8..893f4a35b65 100644 --- a/htdocs/langs/zh_HK/errors.lang +++ b/htdocs/langs/zh_HK/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=New value can't be equal to old one ErrorFailedToValidatePasswordReset=Failed to reinit password. May be the reinit was already done (this link can be used only one time). If not, try to restart the reinit process. ErrorToConnectToMysqlCheckInstance=Connect to database fails. Check database server is running (for example, with mysql/mariadb, you can launch it from command line with 'sudo service mysql start'). ErrorFailedToAddContact=Failed to add contact -ErrorDateMustBeBeforeToday=The date cannot be greater than today +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=A payment mode was set to type %s but setup of module Invoice was not completed to define information to show for this payment mode. ErrorPHPNeedModule=Error, your PHP must have module %s installed to use this feature. ErrorOpenIDSetupNotComplete=You setup Dolibarr config file to allow OpenID authentication, but URL of OpenID service is not defined into constant %s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=No enough quantity for this ErrorOnlyOneFieldForGroupByIsPossible=Only 1 field for the 'Group by' is possible (others are discarded) ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (more than %s) for the field '%s', so we can't use it as a 'Group by' for graphics. The field 'Group By' has been removed. May be you wanted to use it as an X-Axis ? ErrorReplaceStringEmpty=Error, the string to replace into is empty +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. diff --git a/htdocs/langs/zh_HK/languages.lang b/htdocs/langs/zh_HK/languages.lang index 6185183161b..cc80b9f1719 100644 --- a/htdocs/langs/zh_HK/languages.lang +++ b/htdocs/langs/zh_HK/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=Arabic Language_ar_EG=Arabic (Egypt) Language_ar_SA=Arabic +Language_az_AZ=Azerbaijani Language_bn_BD=Bengali +Language_bn_IN=Bengali (India) Language_bg_BG=Bulgarian Language_bs_BA=Bosnian Language_ca_ES=Catalan @@ -20,6 +23,7 @@ Language_en_GB=English (United Kingdom) Language_en_IN=English (India) Language_en_NZ=English (New Zealand) Language_en_SA=English (Saudi Arabia) +Language_en_SG=English (Singapore) Language_en_US=English (United States) Language_en_ZA=English (South Africa) Language_es_ES=Spanish @@ -29,6 +33,7 @@ Language_es_CL=Spanish (Chile) Language_es_CO=Spanish (Colombia) Language_es_DO=Spanish (Dominican Republic) Language_es_EC=Spanish (Ecuador) +Language_es_GT=Spanish (Guatemala) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PA=Spanish (Panama) @@ -36,6 +41,7 @@ Language_es_PY=Spanish (Paraguay) Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_es_UY=Spanish (Uruguay) +Language_es_GT=Spanish (Guatemala) Language_es_VE=Spanish (Venezuela) Language_et_EE=Estonian Language_eu_ES=Basque @@ -44,15 +50,22 @@ Language_fi_FI=Finnish Language_fr_BE=French (Belgium) Language_fr_CA=French (Canada) Language_fr_CH=French (Switzerland) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=French +Language_fr_GA=French (Gabon) Language_fr_NC=French (New Caledonia) +Language_fr_SN=French (Senegal) Language_fy_NL=Frisian +Language_gl_ES=Galician Language_he_IL=Hebrew +Language_hi_IN=Hindi (India) Language_hr_HR=Croatian Language_hu_HU=Hungarian Language_id_ID=Indonesian Language_is_IS=Icelandic Language_it_IT=Italian +Language_it_CH=Italian (Switzerland) Language_ja_JP=Japanese Language_ka_GE=Georgian Language_km_KH=Khmer @@ -64,6 +77,7 @@ Language_lv_LV=Latvian Language_mk_MK=Macedonian Language_mn_MN=Mongolian Language_nb_NO=Norwegian (Bokmål) +Language_ne_NP=Nepali Language_nl_BE=Dutch (Belgium) Language_nl_NL=Dutch Language_pl_PL=Polish @@ -86,4 +100,5 @@ Language_uz_UZ=Uzbek Language_vi_VN=Vietnamese Language_zh_CN=Chinese Language_zh_TW=Chinese (Traditional) +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=Malay diff --git a/htdocs/langs/zh_HK/mails.lang b/htdocs/langs/zh_HK/mails.lang index 7b3bfd3852a..1235eef3b27 100644 --- a/htdocs/langs/zh_HK/mails.lang +++ b/htdocs/langs/zh_HK/mails.lang @@ -168,3 +168,7 @@ OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) DefaultOutgoingEmailSetup=Default outgoing email setup Information=Information ContactsWithThirdpartyFilter=Contacts with third-party filter +Unanswered=Unanswered +Answered=Answered +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/zh_HK/main.lang b/htdocs/langs/zh_HK/main.lang index adbc443198f..0af5c66f0e0 100644 --- a/htdocs/langs/zh_HK/main.lang +++ b/htdocs/langs/zh_HK/main.lang @@ -355,8 +355,8 @@ PriceUTTC=U.P. (inc. tax) Amount=Amount AmountInvoice=Invoice amount AmountInvoiced=Amount invoiced -AmountInvoicedHT=Amount invoiced (incl. tax) -AmountInvoicedTTC=Amount invoiced (excl. tax) +AmountInvoicedHT=Amount invoiced (excl. tax) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=Payment amount AmountHTShort=Amount (excl.) AmountTTCShort=Amount (inc. tax) @@ -485,6 +485,7 @@ Categories=Tags/categories Category=Tag/category By=By From=From +FromDate=From FromLocation=From to=to To=to @@ -687,6 +688,7 @@ Method=Method Receive=Receive CompleteOrNoMoreReceptionExpected=Complete or nothing more expected ExpectedValue=Expected Value +ExpectedQty=Expected Qty PartialWoman=Partial TotalWoman=Total NeverReceived=Never received @@ -703,6 +705,7 @@ MenuECM=Documents MenuAWStats=AWStats MenuMembers=Members MenuAgendaGoogle=Google agenda +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr limit (Menu home-setup-security): %s Kb, PHP limit: %s Kb NoFileFound=No documents saved in this directory CurrentUserLanguage=Current language @@ -725,7 +728,7 @@ Page=Page Notes=Notes AddNewLine=Add new line AddFile=Add file -FreeZone=Not a predefined product/service +FreeZone=Free-text product FreeLineOfType=Free-text item, type: CloneMainAttributes=Clone object with its main attributes ReGeneratePDF=Re-generate PDF @@ -942,6 +945,39 @@ ShortThursday=T ShortFriday=F ShortSaturday=S ShortSunday=S +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=Select an email template SetRef=Set ref Select2ResultFoundUseArrows=Some results found. Use arrows to select. @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=Switch in edit mode to add translations for thi NotUsedForThisCustomer=Not used for this customer AmountMustBePositive=Amount must be positive ByStatus=By status +InformationMessage=Information +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/zh_HK/members.lang b/htdocs/langs/zh_HK/members.lang index dd0a5bf49e2..5ef946ddf67 100644 --- a/htdocs/langs/zh_HK/members.lang +++ b/htdocs/langs/zh_HK/members.lang @@ -81,7 +81,7 @@ DeleteType=Delete VoteAllowed=Vote allowed Physical=Physical Moral=Moral -MorPhy=Moral/Physical +MorPhy=Nature Reenable=Reenable ResiliateMember=Terminate a member ConfirmResiliateMember=Are you sure you want to terminate this member? diff --git a/htdocs/langs/zh_HK/mrp.lang b/htdocs/langs/zh_HK/mrp.lang index ab5f6d81fad..dd830a8e434 100644 --- a/htdocs/langs/zh_HK/mrp.lang +++ b/htdocs/langs/zh_HK/mrp.lang @@ -1,5 +1,6 @@ Mrp=Manufacturing Orders MO=Manufacturing Order +MOs=Manufacturing orders MRPDescription=Module to manage production and Manufacturing Orders (MO). MRPArea=MRP Area MrpSetupPage=Setup of module MRP diff --git a/htdocs/langs/zh_HK/other.lang b/htdocs/langs/zh_HK/other.lang index 5dc70fa068f..54c0572d453 100644 --- a/htdocs/langs/zh_HK/other.lang +++ b/htdocs/langs/zh_HK/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\nPlease find our order __RE PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\nPlease find invoice __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\nPlease find shipping __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\nPlease find intervention __REF__ attached\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=You can click on the link below to make your payment if it is not already done.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr is a compact ERP/CRM supporting several business modules. A demo showcasing all modules makes no sense as this scenario never occurs (several hundred available). So, several demo profiles are available. ChooseYourDemoProfil=Choose the demo profile that best suits your needs... ChooseYourDemoProfilMore=...or build your own profile
    (manual module selection) @@ -280,7 +278,9 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request +ProductsPerPopularity=Products/Services by popularity PopuProp=Products/Services by popularity in Proposals PopuCom=Products/Services by popularity in Orders ProductStatistics=Products/Services Statistics NbOfQtyInOrders=Qty in orders +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/zh_HK/products.lang b/htdocs/langs/zh_HK/products.lang index a1bbc45f970..b59aa2f7080 100644 --- a/htdocs/langs/zh_HK/products.lang +++ b/htdocs/langs/zh_HK/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=Set barcode type BarcodeValue=Barcode value NoteNotVisibleOnBill=Note (not visible on invoices, proposals...) ServiceLimitedDuration=If product is a service with limited duration: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=Multiple price segments per product/service (each customer is in one price segment) MultiPricesNumPrices=Number of prices DefaultPriceType=Base of prices per default (with versus without tax) when adding new sale prices @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=Vendor prices (of products or services) CustomCode=Customs / Commodity / HS code CountryOrigin=Origin country Nature=Nature of product (material/finished) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=Short label Unit=Unit p=u. @@ -359,6 +362,9 @@ SelectCombination=Select combination ProductCombinationGenerator=Variants generator Features=Features PriceImpact=Price impact +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=Weight impact NewProductAttribute=New attribute NewProductAttributeValue=New attribute value diff --git a/htdocs/langs/zh_HK/projects.lang b/htdocs/langs/zh_HK/projects.lang index ec37078a1c7..baf0ecde17f 100644 --- a/htdocs/langs/zh_HK/projects.lang +++ b/htdocs/langs/zh_HK/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=Contributor TypeContact_project_task_external_TASKCONTRIBUTOR=Contributor SelectElement=Select element AddElement=Link to element +LinkToElementShort=Link to # Documents models DocumentModelBeluga=Project document template for linked objects overview DocumentModelBaleine=Project document template for tasks @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=No. of created projects by month ProjectNbTaskByMonth=No. of created tasks by month ProjectOppAmountOfProjectsByMonth=Amount of leads by month ProjectWeightedOppAmountOfProjectsByMonth=Weighted amount of leads by month -ProjectOpenedProjectByOppStatus=Open project/lead by lead status -ProjectsStatistics=Statistics on projects/leads -TasksStatistics=Statistics on project/lead tasks +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=Task assigned. Entering time on this task should be possible. IdTaskTime=Id task time YouCanCompleteRef=If you want to complete the ref with some suffix, it is recommanded to add a - character to separate it, so the automatic numbering will still work correctly for next projects. For example %s-MYSUFFIX diff --git a/htdocs/langs/zh_HK/recruitment.lang b/htdocs/langs/zh_HK/recruitment.lang new file mode 100644 index 00000000000..73e9a7fa07f --- /dev/null +++ b/htdocs/langs/zh_HK/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = Settings +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = About +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/zh_HK/stocks.lang b/htdocs/langs/zh_HK/stocks.lang index 05d3d1b4f67..81163e8d4b0 100644 --- a/htdocs/langs/zh_HK/stocks.lang +++ b/htdocs/langs/zh_HK/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=Delete sending Stock=Stock Stocks=Stocks MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=Stocks by lot/serial @@ -95,14 +95,16 @@ RealStock=Real Stock RealStockDesc=Physical/real stock is the stock currently in the warehouses. RealStockWillAutomaticallyWhen=The real stock will be modified according to this rule (as defined in the Stock module): VirtualStock=Virtual stock -VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped etc.) +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=Id warehouse DescWareHouse=Description warehouse LieuWareHouse=Localisation warehouse WarehousesAndProducts=Warehouses and products WarehousesAndProductsBatchDetail=Warehouses and products (with detail per lot/serial) -AverageUnitPricePMPShort=Weighted average input price -AverageUnitPricePMP=Weighted average input price +AverageUnitPricePMPShort=Weighted average price +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=Selling Unit Price EstimatedStockValueSellShort=Value for sell EstimatedStockValueSell=Value for sell @@ -141,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded @@ -235,3 +237,6 @@ AlwaysShowFullArbo=Display full tree of warehouse on popup of warehouse links (W StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/zh_HK/suppliers.lang b/htdocs/langs/zh_HK/suppliers.lang index b69b11272b4..51562b8bb7a 100644 --- a/htdocs/langs/zh_HK/suppliers.lang +++ b/htdocs/langs/zh_HK/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=Low quality ReputationForThisProduct=Reputation BuyerName=Buyer name AllProductServicePrices=All product / service prices -AllProductReferencesOfSupplier=All product / service references of vendor +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=Vendor prices diff --git a/htdocs/langs/zh_HK/ticket.lang b/htdocs/langs/zh_HK/ticket.lang index a9cff9391d0..59519282c80 100644 --- a/htdocs/langs/zh_HK/ticket.lang +++ b/htdocs/langs/zh_HK/ticket.lang @@ -72,7 +72,6 @@ Deleted=Deleted # Dict Type=Type -Category=Analytic code Severity=Severity # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=Automatically assign the user who created the ticket TicketsAutoAssignTicketHelp=When creating a ticket, the user can be automatically assigned to the ticket. TicketNumberingModules=Tickets numbering module TicketNotifyTiersAtCreation=Notify third party at creation -TicketGroup=Group TicketsDisableCustomerEmail=Always disable emails when a ticket is created from public interface TicketsPublicNotificationNewMessage=Send email(s) when a new message is added TicketsPublicNotificationNewMessageHelp=Send email(s) when a new message is added from public interface (to assigned user or the notifications email to (update) and/or the notifications email to) @@ -162,7 +160,7 @@ CreatedBy=Created by NewTicket=New Ticket SubjectAnswerToTicket=Ticket answer TicketTypeRequest=Request type -TicketCategory=Analytic code +TicketCategory=Group SeeTicket=See ticket TicketMarkedAsRead=Ticket has been marked as read TicketReadOn=Read on diff --git a/htdocs/langs/zh_HK/users.lang b/htdocs/langs/zh_HK/users.lang index 41a5ebd0981..25d9205457b 100644 --- a/htdocs/langs/zh_HK/users.lang +++ b/htdocs/langs/zh_HK/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=Disabled in maintenance mode UserAccountancyCode=User accounting code UserLogoff=User logout UserLogged=User logged +DateOfEmployment=Employment date DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date CantDisableYourself=You can't disable your own user record @@ -116,3 +117,4 @@ ForceUserHolidayValidator=Force leave request validator ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. UserPersonalEmail=Personal email UserPersonalMobile=Personal mobile phone +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/zh_HK/withdrawals.lang b/htdocs/langs/zh_HK/withdrawals.lang index cccd8196481..114a8d9dd6c 100644 --- a/htdocs/langs/zh_HK/withdrawals.lang +++ b/htdocs/langs/zh_HK/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=Credit transfer orders PaymentByBankTransferLines=Credit transfer order lines WithdrawalsReceipts=Direct debit orders WithdrawalReceipt=Direct debit order -BankTransferReceipts=Credit transfer order +BankTransferReceipts=Credit transfer orders BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=Latest %s credit transfer orders LastWithdrawalReceipts=Latest %s direct debit files @@ -63,7 +63,9 @@ InvoiceRefused=Invoice refused (Charge the rejection to customer) StatusDebitCredit=Status debit/credit StatusWaiting=Waiting StatusTrans=Sent +StatusDebited=Debited StatusCredited=Credited +StatusPaid=Paid StatusRefused=Refused StatusMotif0=Unspecified StatusMotif1=Insufficient funds @@ -77,13 +79,13 @@ StatusMotif8=Other reason CreateForSepaFRST=Create direct debit file (SEPA FRST) CreateForSepaRCUR=Create direct debit file (SEPA RCUR) CreateAll=Create direct debit file (all) -CreateFileForPaymentByBankTransfer=Create credit transfer (all) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=Create credit transfer file (SEPA) CreateGuichet=Only office CreateBanque=Only bank OrderWaiting=Waiting for treatment -NotifyTransmision=Withdrawal Transmission -NotifyCredit=Withdrawal Credit +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=National Transmitter Number WithBankUsingRIB=For bank accounts using RIB WithBankUsingBANBIC=For bank accounts using IBAN/BIC/SWIFT @@ -93,9 +95,10 @@ CreditDate=Credit on WithdrawalFileNotCapable=Unable to generate withdrawal receipt file for your country %s (Your country is not supported) ShowWithdraw=Show Direct Debit Order IfInvoiceNeedOnWithdrawPaymentWontBeClosed=However, if invoice has at least one direct debit payment order not yet processed, it won't be set as paid to allow prior withdrawal management. -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=Withdrawal file +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=Set to status "File Sent" ThisWillAlsoAddPaymentOnInvoice=This will also record payments on invoices and will classify them as "Paid" if remain to pay is null StatisticsByLineStatus=Statistics by status of lines @@ -121,6 +124,7 @@ SEPAFrstOrRecur=Type of payment ModeRECUR=Recurring payment ModeFRST=One-off payment PleaseCheckOne=Please check one only +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=Direct debit order %s created AmountRequested=Amount requested SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=Amount: %s
    Method: %s
    Date: %s InfoRejectSubject=Direct debit payment order refused InfoRejectMessage=Hello,

    the direct debit payment order of invoice %s related to the company %s, with an amount of %s has been refused by the bank.

    --
    %s ModeWarning=Option for real mode was not set, we stop after this simulation +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/zh_HK/workflow.lang b/htdocs/langs/zh_HK/workflow.lang index be126eef0f4..299be277e1d 100644 --- a/htdocs/langs/zh_HK/workflow.lang +++ b/htdocs/langs/zh_HK/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=Classify linked source sales order # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=Classify linked source vendor proposal as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked proposal) descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=Classify linked source purchase order as billed when vendor invoice is validated (and if the amount of the invoice is the same as the total amount of the linked order) +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=Automatic creation AutomaticClassification=Automatic classification diff --git a/htdocs/langs/zh_HK/zapier.lang b/htdocs/langs/zh_HK/zapier.lang index 6d6eda71313..bbad7895588 100644 --- a/htdocs/langs/zh_HK/zapier.lang +++ b/htdocs/langs/zh_HK/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module # Admin page # ZapierForDolibarrSetup = Setup of Zapier for Dolibarr +ZapierDescription=Interface with Zapier diff --git a/htdocs/langs/zh_TW/accountancy.lang b/htdocs/langs/zh_TW/accountancy.lang index 0a695563266..c169b603290 100644 --- a/htdocs/langs/zh_TW/accountancy.lang +++ b/htdocs/langs/zh_TW/accountancy.lang @@ -149,6 +149,7 @@ ACCOUNTING_MANAGE_ZERO=允許在會計帳戶末尾管理不同數量的零。一 BANK_DISABLE_DIRECT_INPUT=停用銀行帳戶中直接記錄交易 ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL=在日記帳上啟用草稿匯出 ACCOUNTANCY_COMBO_FOR_AUX=為子公司帳戶啟用組合列表(如果您有很多合作方,可能會很慢) +ACCOUNTING_DATE_START_BINDING=Define a date to start binding & transfer in accountancy. Below this date, the transactions will not be transferred to accounting. ACCOUNTING_SELL_JOURNAL=銷售日記帳 ACCOUNTING_PURCHASE_JOURNAL=採購日記帳 @@ -284,6 +285,7 @@ ShowTutorial=顯示教程 NotReconciled=未對帳 ## Admin +BindingOptions=Binding options ApplyMassCategories=套用大量分類 AddAccountFromBookKeepingWithNoCategories=個性化組中尚未有可用帳戶 CategoryDeleted=會計項目的類別已移除 diff --git a/htdocs/langs/zh_TW/admin.lang b/htdocs/langs/zh_TW/admin.lang index c18ee2b2e46..e3457221e99 100644 --- a/htdocs/langs/zh_TW/admin.lang +++ b/htdocs/langs/zh_TW/admin.lang @@ -300,8 +300,9 @@ MAIN_MAIL_DEFAULT_FROMTYPE=手動寄送的預設寄件人電子郵件(用戶 UserEmail=用戶電子郵件 CompanyEmail=公司電子郵件 FeatureNotAvailableOnLinux=在Unix系列系統中不能使用功能。在本地測試您的寄送郵件程式。 +FixOnTransifex=Fix the translation on the online translation platform of project SubmitTranslation=如果此語言的翻譯不完整或發現錯誤,則可以通過編輯langs / %s資料夾中的文件來更正此錯誤,然後將更改提交到www.transifex.com/dolibarr-association/dolibarr/ -SubmitTranslationENUS=若您的語言翻譯尚未完成,或是您發現錯誤,您可以透過編輯在資料夾 langs/%s中的檔案修正它,並把修改後檔案傳送到 dolibarr.org/forum 或是給在 github.com/Dolibarr/dolibarr 的開發者。 +SubmitTranslationENUS=If translation for this language is not complete or you find errors, you can correct this by editing files into directory langs/%s and submit modified files on dolibarr.org/forum or, if you are a developer, with a PR on github.com/Dolibarr/dolibarr ModuleSetup=模組設定 ModulesSetup=模組/程式設定 ModuleFamilyBase=系統 @@ -386,12 +387,12 @@ ModuleMustBeEnabledFirst=若您需要此功能,您首先要啟用模組%s
    %s TransKeyWithoutOriginalValue=您為任何語言文件中都不存在的翻譯密鑰'%s'強制進行了新翻譯 -TotalNumberOfActivatedModules=已啟動程式/模組: %s / %s +TitleNumberOfActivatedModules=Activated modules +TotalNumberOfActivatedModules=Activated modules: %s / %s YouMustEnableOneModule=您至少要啟用 1 個模組 ClassNotFoundIntoPathWarning=在PHP路徑中找不到類別%s YesInSummer=是的,在夏天 @@ -1678,7 +1694,7 @@ AGENDA_USE_EVENT_TYPE=使用事件類型(在選單設定->分類->應辦事項 AGENDA_USE_EVENT_TYPE_DEFAULT=在事件建立表單中自動為事件類型設定此預設值 AGENDA_DEFAULT_FILTER_TYPE=在應辦事項視圖的搜索過濾器中自動設定此類事件 AGENDA_DEFAULT_FILTER_STATUS=在應辦事項視圖的搜索過濾器中自動為事件設定此狀態 -AGENDA_DEFAULT_VIEW=當選擇應辦事項功能選單時預設要打開的分頁 +AGENDA_DEFAULT_VIEW=Which view do you want to open by default when selecting menu Agenda AGENDA_REMINDER_EMAIL=通過電子郵件啟用事件提醒(可以在每個事件上定義提醒選項/延遲)。注意:必須啟用模組%s並正確設定,以正確的頻率發送提醒。 AGENDA_REMINDER_BROWSER=在用戶的瀏覽器上啟用事件提醒(到達事件日期時,每個用戶都可以從瀏覽器確認問題中拒絕此事件) AGENDA_REMINDER_BROWSER_SOUND=啟用音效警告 @@ -1686,7 +1702,7 @@ AGENDA_SHOW_LINKED_OBJECT=顯示已連結項目到行程的檢視中 ##### Clicktodial ##### ClickToDialSetup=點擊撥號模組設定 ClickToDialUrlDesc=當點選電話圖示時則呼叫網址。在網址中,你可使用標籤
    __PHONETO__,他可取代個人撥打的電話號碼
    __PHONEFROM__,他可以取代個人的電話號碼(您自己的)
    __LOGIN__,他可以取代點選撥打登錄(在用戶卡中定義)
    __PASS__,他可以取代點選撥打密碼(在用戶卡中定義)。 -ClickToDialDesc=此模組可以直接點選電話號碼。點選圖示會呼叫您手機進行撥號。這可用於call center 也就是從 Dolibarr 撥號到 SIP 系統。 +ClickToDialDesc=This module change phone numbers, when using a desktop computer, into clickable links. A click will call the number. This can be used to start the phone call when using a soft phone on your desktop or when using a CTI system based on SIP protocol for example. Note: When using a smartphone, phone numbers are always clickable. ClickToDialUseTelLink=在電話號碼中使用 "tel:" 連線 ClickToDialUseTelLinkDesc=若您的用戶有智慧型手機或是在同一台電腦上已有通訊軟體時使用此方法,則當您在瀏覽器上點選時將連線到 "tel:" 進行呼叫。若您需要完整服務的解決方案(不需要安裝軟體到本機中),您必須設定為 "否" 及填寫下一欄位。 ##### Point Of Sale (CashDesk) ##### @@ -1817,6 +1833,7 @@ EnterAnyCode=此欄位包含用於識別行的參考。輸入您選擇的任何 Enter0or1=輸入0或1 UnicodeCurrency=在括號之間輸入代表貨幣符號的字元數列表。例如:對於$,輸入[36]-對於巴西R $ [82,36]-對於€,輸入[8364] ColorFormat=在 HEX 格式中 RGB 顏色,例如: FF0000 +PictoHelp=Icon name in dolibarr format ('image.png' if into the current theme directory, 'image.png@nom_du_module' if into the directory /img/ of a module) PositionIntoComboList=行的位置放到組合清單中 SellTaxRate=銷貨稅率 RecuperableOnly=在法國某些州營業稅是 “Not Perceived but Recoverable”。 在其他情況下,則將該值保持為“否”。 @@ -1843,6 +1860,7 @@ MailToSendSupplierRequestForQuotation=要求報價 MailToSendSupplierOrder=採購訂單 MailToSendSupplierInvoice=供應商發票 MailToSendContract=合約 +MailToSendReception=收貨(s) MailToThirdparty=合作方 MailToMember= 會員 MailToUser=用戶 @@ -1856,6 +1874,7 @@ ExampleOfNewsMessageForMajorRelease=已提供Dolibarr ERP和CRM %s。版本%s是 ExampleOfNewsMessageForMaintenanceRelease=已提供Dolibarr ERP和CRM %s。版本%s是維護版本,因此僅包含錯誤修復。我們建議所有用戶升級到此版本。維護版本不加入新功能或對資料庫進行更改。您可以從https://www.dolibarr.org下載區域(穩定目錄的子目錄)下載此檔案。您可以閱讀ChangeLog以獲得完整的更改列表。 MultiPriceRuleDesc=啟用選項“產品/服務的多種價格”後,您可以為每種產品定義不同的價格(一種價格水平一個)。為了節省您的時間,您可以在此處輸入一個規則,根據第一級的價格自動計算每個級別的價格,因此您只需要為每種產品輸入第一級的價格。此頁面旨在節省您的時間,但僅在您每個級別的價格都相對於第一級別時才有用。在大多數情況下,您可以忽略此頁面。 ModelModulesProduct=產品文件的範本 +WarehouseModelModules=Templates for documents of warehouses ToGenerateCodeDefineAutomaticRuleFirst=為了能夠自動產生代碼,您首先必須定義一個管理器來自動定義條碼編號。 SeeSubstitutionVars=請參閱 * 註釋以取得可能的替代變數清單 SeeChangeLog=查看變更日誌檔案(僅有英文) @@ -1894,6 +1913,7 @@ MAIN_PDF_MARGIN_LEFT=PDF左邊邊距 MAIN_PDF_MARGIN_RIGHT=PDF右邊邊距 MAIN_PDF_MARGIN_TOP=PDF頂部邊距 MAIN_PDF_MARGIN_BOTTOM=PDF底部邊距 +MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF NothingToSetup=此模組不需要特別的設定。 SetToYesIfGroupIsComputationOfOtherGroups=若此群組是其他群組的計算值,則將其設定為 "是" EnterCalculationRuleIfPreviousFieldIsYes=如果先前欄位設定為“是”,則輸入計算規則(例如“ CODEGRP1 + CODEGRP2”) @@ -1933,13 +1953,14 @@ NothingProcessed=什麼都沒做 XEmailsDoneYActionsDone=%s電子郵件合格,%s電子郵件已成功處理(對於%s記錄/已完成操作) RecordEvent=記錄電子郵件事件 CreateLeadAndThirdParty=建立潛在(必要時建立合作方) -CreateTicketAndThirdParty=建立服務單(必要時建立合作方) +CreateTicketAndThirdParty=Create ticket (and link to third party if it was loaded by a previous operation) CodeLastResult=最新結果代碼 NbOfEmailsInInbox=來源資料夾中的電子郵件數量 LoadThirdPartyFromName=在%s載入合作方搜尋 (僅載入) LoadThirdPartyFromNameOrCreate= 在%s載入合作方搜尋 (如果找不到就建立) -WithDolTrackingID=在訊息ID中找到Dolibarr參考 -WithoutDolTrackingID=在訊息ID中找不到Dolibarr參考 +WithDolTrackingID=Message from a conversation initiated by a first email sent from Dolibarr +WithoutDolTrackingID=Message from a conversation initiated by a first email NOT sent from Dolibarr +CreateCandidature=Create candidature FormatZip=Zip MainMenuCode=選單輸入代碼(主選單) ECMAutoTree=顯示自動ECM樹狀圖 @@ -1981,7 +2002,7 @@ ImportSetup=模組匯入設定 InstanceUniqueID=實例的唯一ID SmallerThan=小於 LargerThan=大於 -IfTrackingIDFoundEventWillBeLinked=請注意,如果在傳入電子郵件中找到跟踪ID,則該事件將自動連結到相關對象。 +IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too. WithGMailYouCanCreateADedicatedPassword=對於GMail帳戶,如果啟用了兩步驗證,建議您為應用程序建立專用的第二個密碼,而不要使用來自https://myaccount.google.com/的帳戶密碼。 EmailCollectorTargetDir=當成功地寄出電子郵件後,您可能想將電子郵件移動到另一個標籤/資料夾。只需在此處設定一個值即可使用此功能。請注意,您還必須使用可讀/寫的登入帳戶。 EmailCollectorLoadThirdPartyHelp=您可以使用此操作來使用電子郵件內容在資料庫中尋找並載入現有的合作方。找到(或建立)的合作方將用於需要他的後續操作。在參數欄位中您可以使用例如如果您想要從合作方字串'Name: name to find'中將提取的姓名傳送進到內容中您可以使用欄位參數'EXTRACT:BODY:Name:\\s([^\\s]*)' @@ -2005,3 +2026,7 @@ RssNote=注意:每個RSS feed定義都提供一個小部件,您必須啟用 JumpToBoxes=跳至設定 -> 小部件 MeasuringUnitTypeDesc=使用值例如 "size", "surface", "volume", "weight", "time" MeasuringScaleDesc=比例尺是您必須移動小數部分以匹配默認參考單位的位數。對於“時間”單位類型,它是秒數。 80到99之間的值是保留值。 +TemplateAdded=Template added +TemplateUpdated=Template updated +TemplateDeleted=Template deleted +MailToSendEventPush=Template for event reminder emails diff --git a/htdocs/langs/zh_TW/agenda.lang b/htdocs/langs/zh_TW/agenda.lang index 43923ffc4b7..dbc8cb5e692 100644 --- a/htdocs/langs/zh_TW/agenda.lang +++ b/htdocs/langs/zh_TW/agenda.lang @@ -14,7 +14,7 @@ EventsNb=事件集數量 ListOfActions=事件清單 EventReports=事件報表 Location=位置 -ToUserOfGroup=給群組成員 +ToUserOfGroup=Event assigned to any user in group EventOnFullDay=整天事件 MenuToDoActions=全部未完成事件 MenuDoneActions=全部已停止事件 @@ -86,6 +86,8 @@ ProposalDeleted=提案/建議書已刪除 OrderDeleted=訂單已刪除 InvoiceDeleted=發票已刪除 DraftInvoiceDeleted=發票草稿已刪除 +CONTACT_CREATEInDolibarr=Contact %s created +CONTACT_DELETEInDolibarr=Contact %s deleted PRODUCT_CREATEInDolibarr=產品 %s 已建立 PRODUCT_MODIFYInDolibarr=產品 %s 已修改 PRODUCT_DELETEInDolibarr=產品 %s 已刪除 @@ -158,3 +160,9 @@ DateStartPlusOne=開始日 +1 小時 SetAllEventsToTodo=將所有事件設定為待辦事項 SetAllEventsToInProgress=將所有事件設定為進行中 SetAllEventsToFinished=將所有事件設定為已完成 +ReminderTime=Reminder period before the event +TimeType=Duration type +ReminderType=Callback type +AddReminder=Create an automatic reminder notification for this event +ErrorReminderActionCommCreation=Error creating the reminder notification for this event +BrowserPush=Browser Notification diff --git a/htdocs/langs/zh_TW/boxes.lang b/htdocs/langs/zh_TW/boxes.lang index 1deee20d364..9dcff47deff 100644 --- a/htdocs/langs/zh_TW/boxes.lang +++ b/htdocs/langs/zh_TW/boxes.lang @@ -27,8 +27,8 @@ BoxTitleLastSuppliers=最新%s位已記錄供應商 BoxTitleLastModifiedSuppliers=供應商:最新的%s位已修改 BoxTitleLastModifiedCustomers=客戶:最新%s位已修改 BoxTitleLastCustomersOrProspects=最新%s位客戶或潛在方 -BoxTitleLastCustomerBills=最新%s張客戶發票 -BoxTitleLastSupplierBills=最新%s張供應商發票 +BoxTitleLastCustomerBills=最近%s修改的客戶發票 +BoxTitleLastSupplierBills=最近%s修改的供應商發票 BoxTitleLastModifiedProspects=潛在方:最新%s位已修改 BoxTitleLastModifiedMembers=最新%s位會員 BoxTitleLastFicheInter=最新%s筆已修改干預措施 @@ -83,6 +83,8 @@ BoxTitleLatestModifiedSupplierOrders=供應商訂單:最後修改的%s筆 BoxTitleLastModifiedCustomerBills=客戶發票:最後修改的%s張 BoxTitleLastModifiedCustomerOrders=銷售訂單:最後修改的%s筆 BoxTitleLastModifiedPropals=最新%s筆修改的提案/建議書 +BoxTitleLatestModifiedJobPositions=Latest %s modified jobs +BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures ForCustomersInvoices=客戶發票 ForCustomersOrders=客戶訂單 ForProposals=提案/建議書 @@ -100,3 +102,5 @@ SuspenseAccountNotDefined=未定義暫記帳戶 BoxLastCustomerShipments=上次客戶發貨 BoxTitleLastCustomerShipments=最新%s筆客戶發貨 NoRecordedShipments=沒有已記錄的客戶發貨 +# Pages +AccountancyHome=會計 diff --git a/htdocs/langs/zh_TW/cashdesk.lang b/htdocs/langs/zh_TW/cashdesk.lang index 14dfbbe6749..59713d97ac3 100644 --- a/htdocs/langs/zh_TW/cashdesk.lang +++ b/htdocs/langs/zh_TW/cashdesk.lang @@ -77,7 +77,7 @@ POSModule=POS 模組 BasicPhoneLayout=在手機上使用基本佈局 SetupOfTerminalNotComplete=終端機%s的設定尚未完成 DirectPayment=直接付款 -DirectPaymentButton=直接現金付款按鈕 +DirectPaymentButton=Add a "Direct cash payment" button InvoiceIsAlreadyValidated=發票已通過驗證 NoLinesToBill=無計費項目 CustomReceipt=自訂收據 @@ -94,12 +94,12 @@ TakeposConnectorMethodDescription=具有附加功能的外部模組。可以從 PrintMethod=列印方式 ReceiptPrinterMethodDescription=具有很多參數的強大方法。完全可定制的模板。無法從雲端列印。 ByTerminal=依照站台 -TakeposNumpadUsePaymentIcon=在數字鍵上使用付款圖示 +TakeposNumpadUsePaymentIcon=Use icon instead of text on payment buttons of numpad CashDeskRefNumberingModules=POS銷售編號模組 CashDeskGenericMaskCodes6 =
    {TN} 標籤用於增加站台 TakeposGroupSameProduct=群組相同產品線 StartAParallelSale=開啟新的平行銷售 -ControlCashOpening=打開銷售點時控制收銀機 +ControlCashOpening=Control cash box at opening POS CloseCashFence=關閉現金圍籬 CashReport=現金報告 MainPrinterToUse=要使用的主印表機 @@ -115,5 +115,10 @@ ScanToOrder=掃描QR Code訂購 Appearance=Appearance HideCategoryImages=Hide Category Images HideProductImages=Hide Product Images -NumberOfLinesToShow=Number of lines to show in image box -DefineTablePlan=Define table plan +NumberOfLinesToShow=Number of lines of images to show +DefineTablePlan=Define tables plan +GiftReceiptButton=Add a "Gift receipt" button +GiftReceipt=Gift receipt +ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first +AllowDelayedPayment=Allow delayed payment +PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts diff --git a/htdocs/langs/zh_TW/compta.lang b/htdocs/langs/zh_TW/compta.lang index c6b1a038bf3..5465526e4ed 100644 --- a/htdocs/langs/zh_TW/compta.lang +++ b/htdocs/langs/zh_TW/compta.lang @@ -69,6 +69,7 @@ SocialContribution=社會稅或財政稅 SocialContributions=社會稅或財政稅 SocialContributionsDeductibles=可抵扣的社會稅或財政稅 SocialContributionsNondeductibles=不可抵扣的社會稅或財政稅 +DateOfSocialContribution=Date of social or fiscal tax LabelContrib=捐助標籤 TypeContrib=捐助類型 MenuSpecialExpenses=特別支出 diff --git a/htdocs/langs/zh_TW/contracts.lang b/htdocs/langs/zh_TW/contracts.lang index f8189cee724..d3e8619ee8c 100644 --- a/htdocs/langs/zh_TW/contracts.lang +++ b/htdocs/langs/zh_TW/contracts.lang @@ -28,7 +28,7 @@ MenuRunningServices=正在執行的服務 MenuExpiredServices=已過期服務 MenuClosedServices=已關閉服務 NewContract=新合約 -NewContractSubscription=新合約/訂閱 +NewContractSubscription=New contract or subscription AddContract=建立合約 DeleteAContract=刪除合約 ActivateAllOnContract=啟動所有服務 diff --git a/htdocs/langs/zh_TW/errors.lang b/htdocs/langs/zh_TW/errors.lang index 4a4a7216895..4eebe27f1aa 100644 --- a/htdocs/langs/zh_TW/errors.lang +++ b/htdocs/langs/zh_TW/errors.lang @@ -136,7 +136,8 @@ ErrorNewValueCantMatchOldValue=新值不能等於舊值 ErrorFailedToValidatePasswordReset=重置密碼失敗。可能是重新初始化已經完成(此連結只能使用一次)。如果不是,請嘗試再重置密碼一次。 ErrorToConnectToMysqlCheckInstance=連結資料庫失敗。檢查資料庫伺服器是否正在執行(例如mysql / mariadb,您可以使用“ sudo service mysql start”命令行啟動它)。 ErrorFailedToAddContact=新增聯絡人失敗 -ErrorDateMustBeBeforeToday=日期不能大於今天 +ErrorDateMustBeBeforeToday=The date must be lower than today +ErrorDateMustBeInFuture=The date must be greater than today ErrorPaymentModeDefinedToWithoutSetup=付款方式已設定為%s類型,但模組“發票”尚未完整定義要為此付款方式顯示的資訊設定。 ErrorPHPNeedModule=錯誤,您的PHP必須安裝模組%s才能使用此功能。 ErrorOpenIDSetupNotComplete=您設定了Dolibarr設定檔案以允許OpenID身份驗證,但未將OpenID的服務網址定義為常數%s @@ -239,6 +240,9 @@ ErrorBatchNoFoundEnoughQuantityForProductInWarehouse=倉庫“ %s”中產品“ ErrorOnlyOneFieldForGroupByIsPossible=“群組依據”只能使用1個欄位(其他欄位則被丟棄) ErrorTooManyDifferentValueForSelectedGroupBy=為欄位“ %s ”發現了太多不同的值(多於 %s ),因此我們不能將其用作“分組依據”。 “分組依據”欄位已刪除。也許您想將其用作X軸? ErrorReplaceStringEmpty=錯誤,要替換的字串為空 +ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number +ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number +ErrorFailedToReadObject=Error, failed to read object of type %s # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=您的PHP參數upload_max_filesize(%s)高於PHP參數post_max_size(%s)。這不是相同的設定。 WarningPasswordSetWithNoAccount=為此會員設定了密碼。但是,沒有建立用戶帳戶。因此,雖然密碼已儲存,但不能用於登入Dolibarr。外部模組/界面可以使用它,但是如果您不需要為會員定義任何登入名稱或密碼,則可以從會員模組設定中禁用選項“管理每個會員的登入名稱”。如果您需要管理登入名稱但不需要任何密碼,則可以將此欄位保留為空白以避免此警告。注意:如果會員連結到用戶,電子郵件也可以用作登入名稱。 diff --git a/htdocs/langs/zh_TW/languages.lang b/htdocs/langs/zh_TW/languages.lang index b0d7bf14a42..4019d6bc785 100644 --- a/htdocs/langs/zh_TW/languages.lang +++ b/htdocs/langs/zh_TW/languages.lang @@ -1,8 +1,11 @@ # Dolibarr language file - Source file is en_US - languages +Language_am_ET=Ethiopian Language_ar_AR=阿拉伯語 Language_ar_EG=阿拉伯語(埃及) Language_ar_SA=阿拉伯語 +Language_az_AZ=Azerbaijani Language_bn_BD=孟加拉語 +Language_bn_IN=Bengali (India) Language_bg_BG=保加利亞語 Language_bs_BA=波斯尼亞語 Language_ca_ES=加泰羅尼亞語 @@ -20,6 +23,7 @@ Language_en_GB=英語(英國) Language_en_IN=英國(印度) Language_en_NZ=英語(紐西蘭) Language_en_SA=英语 (沙特阿拉伯) +Language_en_SG=English (Singapore) Language_en_US=英語(美國) Language_en_ZA=英語(南非) Language_es_ES=西班牙語 @@ -29,6 +33,7 @@ Language_es_CL=西班牙語(智利) Language_es_CO=西班牙語(哥倫比亞) Language_es_DO=西班牙語(多明尼加共和國) Language_es_EC=西班牙語(厄瓜多爾) +Language_es_GT=Spanish (Guatemala) Language_es_HN=西班牙語(洪都拉斯) Language_es_MX=西班牙語(墨西哥) Language_es_PA=西班牙語(巴拿馬) @@ -36,6 +41,7 @@ Language_es_PY=西班牙語(巴拉圭) Language_es_PE=西班牙語(秘魯) Language_es_PR=西班牙語(波多黎各) Language_es_UY=西班牙語(烏拉圭) +Language_es_GT=Spanish (Guatemala) Language_es_VE=西班牙語(委內瑞拉) Language_et_EE=愛沙尼亞語 Language_eu_ES=巴斯克語 @@ -44,15 +50,22 @@ Language_fi_FI=芬蘭語 Language_fr_BE=法語(比利時) Language_fr_CA=法語(加拿大) Language_fr_CH=法語(瑞士) +Language_fr_CI=French (Cost Ivory) +Language_fr_CM=French (Cameroun) Language_fr_FR=法語 +Language_fr_GA=French (Gabon) Language_fr_NC=法語 (新喀里多尼亞) +Language_fr_SN=French (Senegal) Language_fy_NL=弗里斯蘭語 +Language_gl_ES=Galician Language_he_IL=希伯來語 +Language_hi_IN=Hindi (India) Language_hr_HR=克羅地亞語 Language_hu_HU=匈牙利語 Language_id_ID=印尼語 Language_is_IS=冰島語 Language_it_IT=意大利語 +Language_it_CH=Italian (Switzerland) Language_ja_JP=日語 Language_ka_GE=格魯吉亞人語 Language_km_KH=高棉語 @@ -64,6 +77,7 @@ Language_lv_LV=拉脫維亞語 Language_mk_MK=馬其頓語 Language_mn_MN=蒙古語 Language_nb_NO=挪威語(Bokmål) +Language_ne_NP=Nepali Language_nl_BE=荷蘭語(比利時) Language_nl_NL=荷蘭人 Language_pl_PL=波蘭語 @@ -86,4 +100,5 @@ Language_uz_UZ=烏茲別克語 Language_vi_VN=越南語 Language_zh_CN=簡體中文 Language_zh_TW=繁體中文 +Language_zh_HK=Chinese (Hong Kong) Language_bh_MY=馬來語 diff --git a/htdocs/langs/zh_TW/mails.lang b/htdocs/langs/zh_TW/mails.lang index dbcd1715b72..1ca5e5ccdb1 100644 --- a/htdocs/langs/zh_TW/mails.lang +++ b/htdocs/langs/zh_TW/mails.lang @@ -106,7 +106,7 @@ SearchAMailing=搜尋郵件 SendMailing=發送郵件 SentBy=寄件人 MailingNeedCommand=可以從命令行發送電子郵件。請您的伺服器管理員啟動以下命令,以將電子郵件發送給所有收件人: -MailingNeedCommand2=您可以透過增加MAILING_LIMIT_SENDBYWEB參數並設定每次程序中可發送最大電子郵件數量以在線發送。啟動此功能,請前往首頁-設定-其他。 +MailingNeedCommand2=您可以透過增加MAILING_LIMIT_SENDBYWEB參數並設定每次程序中可發送最大電子郵件數量以線上發送。啟動此功能,請前往首頁-設定-其他。 ConfirmSendingEmailing=如果要直接從此畫面發送電子郵件,請確認您確定要立即從瀏覽器發送電子郵件嗎? LimitSendingEmailing=注意:出於安全性和超時的原因,從Web界面多次進行發送電子郵件已完成,每次發送程序皆一個收件人%s 。 TargetsReset=清除清單 @@ -164,7 +164,11 @@ NoContactWithCategoryFound=找不到具有類別的聯絡人/地址 NoContactLinkedToThirdpartieWithCategoryFound=找不到具有類別的聯絡人/地址 OutGoingEmailSetup=發送電子郵件設定 InGoingEmailSetup=接收電子郵件設定 -OutGoingEmailSetupForEmailing=Outgoing email setup (for module %s) +OutGoingEmailSetupForEmailing=外送電子郵件設定(用於模組%s) DefaultOutgoingEmailSetup=預設發送電子郵件設定 Information=資訊 ContactsWithThirdpartyFilter=帶有合作方過濾器的聯絡人 +Unanswered=Unanswered +Answered=已回覆 +IsNotAnAnswer=Is not answer (initial email) +IsAnAnswer=Is an answer of an initial email diff --git a/htdocs/langs/zh_TW/main.lang b/htdocs/langs/zh_TW/main.lang index 5d313e1fe9d..d07ee319cac 100644 --- a/htdocs/langs/zh_TW/main.lang +++ b/htdocs/langs/zh_TW/main.lang @@ -355,8 +355,8 @@ PriceUTTC=單價(含稅) Amount=金額 AmountInvoice=發票金額 AmountInvoiced=已開發票金額 -AmountInvoicedHT=開票金額(含稅) -AmountInvoicedTTC=開票金額(不含稅) +AmountInvoicedHT=開票金額(不含稅) +AmountInvoicedTTC=Amount invoiced (inc. tax) AmountPayment=付款金額 AmountHTShort=金額(不含) AmountTTCShort=金額(含稅) @@ -485,6 +485,7 @@ Categories=標籤/類別 Category=標籤/類別 By=由 From=從 +FromDate=從 FromLocation=從 to=至 To=至 @@ -687,6 +688,7 @@ Method=方法 Receive=收到 CompleteOrNoMoreReceptionExpected=完成或沒有更多的預期 ExpectedValue=期望值 +ExpectedQty=Expected Qty PartialWoman=部分 TotalWoman=全部 NeverReceived=從未收到 @@ -703,6 +705,7 @@ MenuECM=文件 MenuAWStats=AWStats 軟體 MenuMembers=會員 MenuAgendaGoogle=Google 行事曆 +MenuTaxesAndSpecialExpenses=Taxes | Special expenses ThisLimitIsDefinedInSetup=Dolibarr 的限制(選單 首頁 - 設定 - 安全): %s Kb, PHP的限制:%s Kb NoFileFound=此資料夾沒有任何檔案 CurrentUserLanguage=目前語言 @@ -725,7 +728,7 @@ Page=頁面 Notes=備註 AddNewLine=新增一行 AddFile=新增檔案 -FreeZone=沒有預先定義的產品/服務 +FreeZone=Free-text product FreeLineOfType=自由輸入項目,輸入: CloneMainAttributes=複製物件時複製主要屬性 ReGeneratePDF=重新產生PDF @@ -942,6 +945,39 @@ ShortThursday=Th ShortFriday=Fr ShortSaturday=Sa ShortSunday=Su +one=one +two=two +three=three +four=four +five=five +six=six +seven=seven +eight=eight +nine=nine +ten=ten +eleven=eleven +twelve=twelve +thirteen=thirdteen +fourteen=fourteen +fifteen=fifteen +sixteen=sixteen +seventeen=seventeen +eighteen=eighteen +nineteen=nineteen +twenty=twenty +thirty=thirty +forty=forty +fifty=fifty +sixty=sixty +seventy=seventy +eighty=eighty +ninety=ninety +hundred=hundred +thousand=thousand +million=million +billion=billion +trillion=trillion +quadrillion=quadrillion SelectMailModel=選擇一個電子郵件範本 SetRef=設定參考 Select2ResultFoundUseArrows=找到某些結果。使用箭頭選擇。 @@ -1039,3 +1075,11 @@ SwitchInEditModeToAddTranslation=切換到編輯模式以添加該語言的翻 NotUsedForThisCustomer=未用於此客戶 AmountMustBePositive=金額必須為正 ByStatus=依狀態 +InformationMessage=資訊 +Used=Used +ASAP=As Soon As Possible +CREATEInDolibarr=Record %s create +MODIFYInDolibarr=Record %s modified +DELETEInDolibarr=Record %s deleted +VALIDATEInDolibarr=Record %s validated +APPROVEDInDolibarr=Record %s approved diff --git a/htdocs/langs/zh_TW/members.lang b/htdocs/langs/zh_TW/members.lang index 04c73132f61..35cda77bdee 100644 --- a/htdocs/langs/zh_TW/members.lang +++ b/htdocs/langs/zh_TW/members.lang @@ -81,7 +81,7 @@ DeleteType=刪除 VoteAllowed=允許投票 Physical=自然人 Moral=法人 -MorPhy=法人/自然人 +MorPhy=性質 Reenable=重新啟用 ResiliateMember=終止會員 ConfirmResiliateMember=您確定要終止此會員嗎? diff --git a/htdocs/langs/zh_TW/mrp.lang b/htdocs/langs/zh_TW/mrp.lang index 0d9de31ce83..160aa9091e2 100644 --- a/htdocs/langs/zh_TW/mrp.lang +++ b/htdocs/langs/zh_TW/mrp.lang @@ -1,5 +1,6 @@ Mrp=製造訂單 MO=製造訂單 +MOs=Manufacturing orders MRPDescription=管理生產和製造訂單(MO)的模組。 MRPArea=MRP區域 MrpSetupPage=MRP模組設定 diff --git a/htdocs/langs/zh_TW/other.lang b/htdocs/langs/zh_TW/other.lang index 58993a24263..0e643a6518f 100644 --- a/htdocs/langs/zh_TW/other.lang +++ b/htdocs/langs/zh_TW/other.lang @@ -97,10 +97,8 @@ PredefinedMailContentSendSupplierOrder=__(Hello)__\n\n請查看已附上之我 PredefinedMailContentSendSupplierInvoice=__(Hello)__\n\n請查看已附上之發票__REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendShipping=__(Hello)__\n\n請查看已附上之發貨__REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentSendFichInter=__(Hello)__\n\n請查看已附上之干預__REF__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentThirdparty=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentContact=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ -PredefinedMailContentUser=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ PredefinedMailContentLink=如果付款尚未完成您可以點擊以下連結.\n\n%s\n\n +PredefinedMailContentGeneric=__(Hello)__\n\n\n__(Sincerely)__\n\n__USER_SIGNATURE__ DemoDesc=Dolibarr是一個嚴謹的ERP / CRM,支援多個業務模組。展示所有模組的DEMO沒有意義,因為這種情況永遠不會發生(有數百種可用)。因此,有幾個DEMO設定檔案可用。 ChooseYourDemoProfil=選擇最適合您需求的DEMO設定檔案... ChooseYourDemoProfilMore=...或建立您自己的設定檔案
    (手動選擇模組) @@ -280,7 +278,9 @@ LinesToImport=要匯入的行 MemoryUsage=記憶體使用率 RequestDuration=請求期限 +ProductsPerPopularity=Products/Services by popularity PopuProp=依照在提案中受歡迎程度列出的產品/服務 PopuCom=依照在訂單中受歡迎程度列出的產品/服務 ProductStatistics=產品/服務統計 NbOfQtyInOrders=訂單數量 +SelectTheTypeOfObjectToAnalyze=Select the type of object to analyze... diff --git a/htdocs/langs/zh_TW/products.lang b/htdocs/langs/zh_TW/products.lang index 4e5460f0336..e9bf2515b0e 100644 --- a/htdocs/langs/zh_TW/products.lang +++ b/htdocs/langs/zh_TW/products.lang @@ -104,6 +104,7 @@ SetDefaultBarcodeType=設定條碼類型 BarcodeValue=條碼值 NoteNotVisibleOnBill=註解(不會在發票或提案/建議書上顯示) ServiceLimitedDuration=如果產品是一種有期限的服務: +FillWithLastServiceDates=Fill with last service line dates MultiPricesAbility=每個產品/服務有多個價格區段(每個客戶屬於一個價格區段) MultiPricesNumPrices=價格數量 DefaultPriceType=增加新銷售價格時的每個預設價格(含稅和不含稅)基準 @@ -169,6 +170,8 @@ SuppliersPricesOfProductsOrServices=供應商價格(產品或服務) CustomCode=海關/商品/ HS編碼 CountryOrigin=原產地 Nature=產品性質(材料/成品) +NatureOfProductShort=Nature of product +NatureOfProductDesc=Raw material or finished product ShortLabel=短標籤 Unit=單位 p=u. @@ -359,6 +362,9 @@ SelectCombination=選擇組合 ProductCombinationGenerator=變數產生器 Features=功能 PriceImpact=價格影響 +ImpactOnPriceLevel=Impact on price level %s +ApplyToAllPriceImpactLevel= Apply to all levels +ApplyToAllPriceImpactLevelHelp=By clicking here you set the same price impact on all levels WeightImpact=重量影響 NewProductAttribute=新屬性 NewProductAttributeValue=新屬性值 diff --git a/htdocs/langs/zh_TW/projects.lang b/htdocs/langs/zh_TW/projects.lang index 1abddf41e4a..163b487dd3a 100644 --- a/htdocs/langs/zh_TW/projects.lang +++ b/htdocs/langs/zh_TW/projects.lang @@ -178,6 +178,7 @@ TypeContact_project_task_internal_TASKCONTRIBUTOR=內部提案人 TypeContact_project_task_external_TASKCONTRIBUTOR=外部提案人 SelectElement=選擇元件 AddElement=連結到元件 +LinkToElementShort=連結到 # Documents models DocumentModelBeluga=已連結項目概述的專案文件範本 DocumentModelBaleine=任務的專案文件範本 @@ -210,9 +211,9 @@ ProjectNbProjectByMonth=每月建立的專案數 ProjectNbTaskByMonth=每月建立的任務數 ProjectOppAmountOfProjectsByMonth=每月的潛在客戶數量 ProjectWeightedOppAmountOfProjectsByMonth=每月加權的潛在客戶數量 -ProjectOpenedProjectByOppStatus=依照潛在狀態打開專案/ 潛在 -ProjectsStatistics=專案/潛在客戶統計 -TasksStatistics=專案/潛在客戶任務的統計 +ProjectOpenedProjectByOppStatus=Open project|lead by lead status +ProjectsStatistics=Statistics on projects or leads +TasksStatistics=Statistics on tasks of projects or leads TaskAssignedToEnterTime=任務已分配。應該可以輸入此任務的時間。 IdTaskTime=任務時間ID YouCanCompleteRef=如果要使用一些後綴來完成引用,則建議增加-字元以將其分隔,因此自動編號仍可正確用於下一個專案。例如%s-MYSUFFIX diff --git a/htdocs/langs/zh_TW/recruitment.lang b/htdocs/langs/zh_TW/recruitment.lang new file mode 100644 index 00000000000..4c77d970239 --- /dev/null +++ b/htdocs/langs/zh_TW/recruitment.lang @@ -0,0 +1,70 @@ +# Copyright (C) 2020 Laurent Destailleur +# +# 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 . + +# +# Generic +# + +# Module label 'ModuleRecruitmentName' +ModuleRecruitmentName = Recruitment +# Module description 'ModuleRecruitmentDesc' +ModuleRecruitmentDesc = Manage and follow recruitment campaigns for new job positions + +# +# Admin page +# +RecruitmentSetup = Recruitment setup +Settings = 設定 +RecruitmentSetupPage = Enter here the setup of main options for the recruitment module +RecruitmentArea=Recruitement area +PublicInterfaceRecruitmentDesc=Public pages of jobs are public URLs to show and answer to open jobs. There is one different link for each open job, found on each job record. +EnablePublicRecruitmentPages=Enable public pages of open jobs + +# +# About page +# +About = 關於 +RecruitmentAbout = About Recruitment +RecruitmentAboutPage = Recruitment about page +NbOfEmployeesExpected=Expected nb of employees +JobLabel=Label of job position +WorkPlace=Work place +DateExpected=Expected date +FutureManager=Future manager +ResponsibleOfRecruitement=Responsible of recruitment +IfJobIsLocatedAtAPartner=If job is located at a partner place +PositionToBeFilled=Job offer to be filled +PositionsToBeFilled=Job offers to be filled +ListOfPositionsToBeFilled=List of job offers to be filled +NewPositionToBeFilled=New job offers to be filled + +JobOfferToBeFilled=Job offer to be filled +ThisIsInformationOnJobPosition=Information of the job position to be filled +ContactForRecruitment=Contact for recruitment +EmailRecruiter=Email recruiter +ToUseAGenericEmail=To use a generic email. If not defined, the email of the responsible of recruitment will be used +NewCandidature=New candidature +ListOfCandidatures=List of candidatures +RequestedRemuneration=Requested remuneration +ProposedRemuneration=Proposed remuneration +ContractProposed=Contract proposed +ContractSigned=Contract signed +RecruitmentCandidature=Candidature +JobPositions=Job positions +RecruitmentCandidatures=Candidatures +InterviewToDo=Interview to do +AnswerCandidature=Candidature answer +YourCandidature=Your candidature +YourCandidatureAnswerMessage=Thanks you for your candidature.
    ... diff --git a/htdocs/langs/zh_TW/stocks.lang b/htdocs/langs/zh_TW/stocks.lang index da954b31660..025321db910 100644 --- a/htdocs/langs/zh_TW/stocks.lang +++ b/htdocs/langs/zh_TW/stocks.lang @@ -18,7 +18,7 @@ DeleteSending=刪除傳送 Stock=庫存 Stocks=庫存 MissingStocks=Missing stocks -StockAtDate=Stock at date +StockAtDate=Stocks at date StockAtDateInPast=Date in past StockAtDateInFuture=Date in future StocksByLotSerial=依批次/序號的庫存 @@ -95,14 +95,16 @@ RealStock=實際庫存 RealStockDesc=實體/實際庫存是當前倉庫中的庫存。 RealStockWillAutomaticallyWhen=實際庫存將根據以下規則(在“庫存”模組中定義)進行修改: VirtualStock=虛擬庫存 -VirtualStockDesc=虛擬庫存是指所有未完成的/待處理的操作(影響庫存)都已關閉而計算出的庫存(收到的採購訂單,已發貨的銷售訂單等)。 +VirtualStockAtDate=Virtual stock at date +VirtualStockAtDateDesc=Virtual stock once all pending orders that are planned to be done before the date will be finished +VirtualStockDesc=Virtual stock is the calculated stock available once all open/pending actions (that affect stocks) are closed (purchase orders received, sales orders shipped, manufacturing orders produced, etc) IdWarehouse=編號倉庫 DescWareHouse=說明倉庫 LieuWareHouse=本地化倉庫 WarehousesAndProducts=倉庫和產品 WarehousesAndProductsBatchDetail=倉庫和產品(有批次/序列的詳細信息) -AverageUnitPricePMPShort=加權平均投入價格 -AverageUnitPricePMP=加權平均投入價格 +AverageUnitPricePMPShort=加權平均價格 +AverageUnitPricePMPDesc=The input average unit price we had to pay to suppliers to get the product into our stock. SellPriceMin=銷售單價 EstimatedStockValueSellShort=銷售價值 EstimatedStockValueSell=銷售價值 @@ -141,7 +143,7 @@ Replenishments=補貨 NbOfProductBeforePeriod=選則期間以前產品%s庫存的數量(<%s) NbOfProductAfterPeriod=選則期間之後產品%s庫存的數量(> %s) MassMovement=全部活動 -SelectProductInAndOutWareHouse=選擇一項產品,數量,來源倉庫和目標倉庫,然後點擊“ %s”。完成所有必需的移動後,點擊“ %s”。 +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=記錄轉移 ReceivingForSameOrder=此訂單的收據 StockMovementRecorded=庫存變動已記錄 @@ -235,3 +237,6 @@ AlwaysShowFullArbo=在倉庫連結的彈出窗口上顯示完整的倉庫樹狀 StockAtDatePastDesc=You can view here the stock (real stock) at a given date in the past StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future CurrentStock=Current stock +InventoryRealQtyHelp=Set value to 0 to reset qty
    Keep field empty, or remove line, to keep unchanged +UpdateByScaningProductBarcode=Update by scan (product barcode) +UpdateByScaningLot=Update by scan (lot|Serial barcode) diff --git a/htdocs/langs/zh_TW/suppliers.lang b/htdocs/langs/zh_TW/suppliers.lang index 4352742be4a..377ad5d1067 100644 --- a/htdocs/langs/zh_TW/suppliers.lang +++ b/htdocs/langs/zh_TW/suppliers.lang @@ -43,5 +43,5 @@ NotTheGoodQualitySupplier=低品質 ReputationForThisProduct=信譽 BuyerName=買家名稱 AllProductServicePrices=所有產品/服務價格 -AllProductReferencesOfSupplier=供應商的所有產品/服務參考 +AllProductReferencesOfSupplier=All references of vendor BuyingPriceNumShort=供應商價格 diff --git a/htdocs/langs/zh_TW/ticket.lang b/htdocs/langs/zh_TW/ticket.lang index 1775c6f78f5..d591079e2f6 100644 --- a/htdocs/langs/zh_TW/ticket.lang +++ b/htdocs/langs/zh_TW/ticket.lang @@ -72,7 +72,6 @@ Deleted=已刪除 # Dict Type=類型 -Category=分析代碼 Severity=嚴重程度 # Email templates @@ -128,7 +127,6 @@ TicketsAutoAssignTicket=自動分配建立服務單的用戶 TicketsAutoAssignTicketHelp=建立服務單時,可以自動將用戶分配給服務單。 TicketNumberingModules=服務單編號模組 TicketNotifyTiersAtCreation=建立時通知合作方 -TicketGroup=群組 TicketsDisableCustomerEmail=從公共界面建立服務單時,始終禁用電子郵件 TicketsPublicNotificationNewMessage=當有新訊息時寄送電子郵件 TicketsPublicNotificationNewMessageHelp=當公共界面有新增訊息時寄送電子郵件(給已分配用戶或寄送通知電子郵件給(更新)與/或通知電子郵件給) @@ -162,7 +160,7 @@ CreatedBy=建立者 NewTicket=新服務單 SubjectAnswerToTicket=服務單回應 TicketTypeRequest=需求類型 -TicketCategory=分析代碼 +TicketCategory=群組 SeeTicket=查閱服務單 TicketMarkedAsRead=服務單已標記為已讀 TicketReadOn=繼續讀取 diff --git a/htdocs/langs/zh_TW/users.lang b/htdocs/langs/zh_TW/users.lang index 6bfe776b2e0..0ae2e4c036f 100644 --- a/htdocs/langs/zh_TW/users.lang +++ b/htdocs/langs/zh_TW/users.lang @@ -108,6 +108,7 @@ DisabledInMonoUserMode=在維護模式下禁用 UserAccountancyCode=用戶帳號 UserLogoff=用戶登出 UserLogged=用戶登入 +DateOfEmployment=Employment date DateEmployment=入職日期 DateEmploymentEnd=離職日期 CantDisableYourself=您不能禁用自己的用戶記錄 @@ -116,3 +117,4 @@ ForceUserHolidayValidator=強制使用休假請求驗證 ValidatorIsSupervisorByDefault=預設情況下,驗證者是用戶的主管。保持空白狀態以保持這種行為。 UserPersonalEmail=私人信箱 UserPersonalMobile=私人手機 +WarningNotLangOfInterface=Warning, this is the main language the user speak, not the language of the interface he choosed to see. To change the interface language visible by this user, go on tab %s diff --git a/htdocs/langs/zh_TW/withdrawals.lang b/htdocs/langs/zh_TW/withdrawals.lang index 9fabb6f302d..b4c32e4de5a 100644 --- a/htdocs/langs/zh_TW/withdrawals.lang +++ b/htdocs/langs/zh_TW/withdrawals.lang @@ -10,7 +10,7 @@ PaymentByBankTransferReceipts=信用轉帳訂單行 PaymentByBankTransferLines=信用轉帳訂單行 WithdrawalsReceipts=直接轉帳付款訂單 WithdrawalReceipt=直接轉帳付款訂單 -BankTransferReceipts=Credit transfer order +BankTransferReceipts=信用轉帳訂單行 BankTransferReceipt=Credit transfer order LatestBankTransferReceipts=最新%s筆信用轉帳訂單 LastWithdrawalReceipts=最新%s個直接轉帳付款檔案 @@ -63,7 +63,9 @@ InvoiceRefused=發票被拒絕(向客戶收取拒絕費用) StatusDebitCredit=借項/貸項狀況 StatusWaiting=等候 StatusTrans=傳送 +StatusDebited=Debited StatusCredited=已記入 +StatusPaid=已付款 StatusRefused=已拒絕 StatusMotif0=未指定 StatusMotif1=不充足的資金 @@ -77,13 +79,13 @@ StatusMotif8=其他原因 CreateForSepaFRST=建立直接轉帳付款檔案(SEPA FRST) CreateForSepaRCUR=建立直接轉帳付款檔案(SEPA RCUR) CreateAll=建立直接轉帳付款檔案(全部) -CreateFileForPaymentByBankTransfer=建立信用轉帳(全部) +CreateFileForPaymentByBankTransfer=Create file for credit transfer CreateSepaFileForPaymentByBankTransfer=建立信用轉帳文件(SEPA) CreateGuichet=只有辦公室 CreateBanque=只有銀行 OrderWaiting=等待處理 -NotifyTransmision=提款轉帳 -NotifyCredit=提款額度 +NotifyTransmision=Record file transmission of order +NotifyCredit=Record credit of order NumeroNationalEmetter=國際轉帳編號 WithBankUsingRIB=用於RIB的銀行帳戶 WithBankUsingBANBIC=用於IBAN / BIC / SWIFT的銀行帳戶 @@ -93,9 +95,10 @@ CreditDate=信貸 WithdrawalFileNotCapable=無法為您的國家/地區產生提款收據檔案%s(不支援您的國家/地區) ShowWithdraw=顯示直接轉帳付款訂單 IfInvoiceNeedOnWithdrawPaymentWontBeClosed=但是,如果發票中至少有一個直接轉帳付款訂單尚未處理,則不會將其設定為已付款以允許事先提款管理。 -DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Direct Debit orders to generate and manage the direct debit payment order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Credit transfer orders to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. -WithdrawalFile=提款檔案 +DoStandingOrdersBeforePayments=This tab allows you to request a direct debit payment order. Once done, go into menu Bank->Payment by direct debit to generate and manage the direct debit order. When direct debit order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +DoCreditTransferBeforePayments=This tab allows you to request a credit transfer order. Once done, go into menu Bank->Payment by credit transfer to generate and manage the credit transfer order. When credit transfer order is closed, payment on invoices will be automatically recorded, and invoices closed if remainder to pay is null. +WithdrawalFile=Debit order file +CreditTransferFile=Credit transfer file SetToStatusSent=設定狀態為“檔案已傳送” ThisWillAlsoAddPaymentOnInvoice=這還將記錄發票的付款,如果要支付的餘額為空白,則將其分類為“已付款” StatisticsByLineStatus=依照行狀態統計 @@ -121,6 +124,7 @@ SEPAFrstOrRecur=付款方式 ModeRECUR=定期付款 ModeFRST=一次性付款 PleaseCheckOne=請只確認一個 +CreditTransferOrderCreated=Credit transfer order %s created DirectDebitOrderCreated=已建立直接轉帳付款訂單%s AmountRequested=要求的金額 SEPARCUR=SEPA CUR @@ -141,3 +145,4 @@ InfoTransData=金額:%s
    方式:%s
    日期:%s InfoRejectSubject=直接轉帳付款訂單已被拒絕 InfoRejectMessage=您好,

    銀行拒絕了與公司%s相關的發票%s的直接轉帳付款訂單 。%s的金額已被銀行拒絕

    --
    %s ModeWarning=未設定實際模式選項,我們將在此模擬後停止 +ErrorCompanyHasDuplicateDefaultBAN=Company with id %s has more than one default bank account. No way to know wich one to use. diff --git a/htdocs/langs/zh_TW/workflow.lang b/htdocs/langs/zh_TW/workflow.lang index e175ad36476..2139dc0f143 100644 --- a/htdocs/langs/zh_TW/workflow.lang +++ b/htdocs/langs/zh_TW/workflow.lang @@ -16,5 +16,8 @@ descWORKFLOW_ORDER_CLASSIFY_SHIPPED_SHIPPING=當已確認裝運後(並且如 # Autoclassify purchase order descWORKFLOW_ORDER_CLASSIFY_BILLED_SUPPLIER_PROPOSAL=當供應商發票已確認時(如果發票金額與連接提案的總金額相同),將連接供應商提案分類為開票 descWORKFLOW_INVOICE_AMOUNT_CLASSIFY_BILLED_SUPPLIER_ORDER=當供應商發票已確認時(如果發票金額與連接訂單的總金額相同),將連接的採購訂單分類為開票 +descWORKFLOW_BILL_ON_RECEPTION=Classify receptions to "billed" when a linked supplier order is validated +# Autoclose intervention +descWORKFLOW_TICKET_CLOSE_INTERVENTION=Close all interventions linked to the ticket when a ticket is closed AutomaticCreation=自動建立 AutomaticClassification=自動分類 diff --git a/htdocs/langs/zh_TW/zapier.lang b/htdocs/langs/zh_TW/zapier.lang index 7d8e867e42d..0d40930b895 100644 --- a/htdocs/langs/zh_TW/zapier.lang +++ b/htdocs/langs/zh_TW/zapier.lang @@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier的Dolibarr模組 # Admin page # ZapierForDolibarrSetup = Zapier的設定 +ZapierDescription=Interface with Zapier diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 82c6521e00f..2a1646a5d80 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -50,7 +50,7 @@ $langs->loadLangs(array("sendings", "bills", 'deliveries', 'orders')); if (!empty($conf->incoterm->enabled)) $langs->load('incoterm'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -118,18 +118,14 @@ if ($action == 'add') $db->commit(); header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); exit; - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); $_GET["commande_id"] = $_POST["commande_id"]; $action = 'create'; } -} - -elseif ($action == 'confirm_valid' && $confirm == 'yes' && +} elseif ($action == 'confirm_valid' && $confirm == 'yes' && ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->livraison->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && !empty($user->rights->expedition->livraison_advance->validate))) ) @@ -147,7 +143,7 @@ elseif ($action == 'confirm_valid' && $confirm == 'yes' && $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $result = $object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); @@ -166,9 +162,7 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->expeditio if (!empty($backtopage)) header("Location: ".$backtopage); else header("Location: ".DOL_URL_ROOT.'/expedition/list.php?restore_lastsearch_values=1'); exit; - } - else - { + } else { $db->rollback(); } } @@ -195,7 +189,7 @@ if ($action == 'update_extras') $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'restricthtml')); if ($ret < 0) $error++; if (!$error) @@ -261,8 +255,7 @@ $formfile = new FormFile($db); if ($action == 'create') // Create. Seems to no be used { -} -else // View +} else // View { if ($object->id > 0) { @@ -452,9 +445,7 @@ else // View print $form->selectDate($object->date_delivery ? $object->date_delivery : -1, 'liv_', 1, 1, '', "setdate_livraison", 1, 1); print ''; print ''; - } - else - { + } else { print $object->date_delivery ? dol_print_date($object->date_delivery, 'dayhour') : ' '; } print ''; @@ -475,9 +466,7 @@ else // View if ($action != 'editincoterm') { print $form->textwithpicto($object->display_incoterms(), $object->label_incoterms, 1); - } - else - { + } else { print $form->select_incoterms((!empty($object->fk_incoterms) ? $object->fk_incoterms : ''), (!empty($object->location_incoterms) ? $object->location_incoterms : ''), $_SERVER['PHP_SELF'].'?id='.$object->id); } print ''; @@ -574,9 +563,7 @@ else // View } $label = (!empty($product->multilangs[$outputlangs->defaultlang]["label"])) ? $product->multilangs[$outputlangs->defaultlang]["label"] : $object->lines[$i]->product_label; - } - else - { + } else { $label = (!empty($object->lines[$i]->label) ? $object->lines[$i]->label : $object->lines[$i]->product_label); } @@ -596,9 +583,7 @@ else // View { print (!empty($object->lines[$i]->description) && $object->lines[$i]->description != $object->lines[$i]->product_label) ? '
    '.dol_htmlentitiesbr($object->lines[$i]->description) : ''; } - } - else - { + } else { print ""; if ($object->lines[$i]->fk_product_type == 1) $text = img_object($langs->trans('Service'), 'service'); else $text = img_object($langs->trans('Product'), 'product'); @@ -673,11 +658,9 @@ else // View { if ($conf->expedition_bon->enabled) { - print ''.$langs->trans("Delete").''; - } - else - { - print ''.$langs->trans("Delete").''; + print ''.$langs->trans("Delete").''; + } else { + print ''.$langs->trans("Delete").''; } } @@ -698,7 +681,7 @@ else // View $genallowed = $user->rights->expedition->livraison->lire; $delallowed = $user->rights->expedition->livraison->creer; - print $formfile->showdocuments('livraison', $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); + print $formfile->showdocuments('livraison', $objectref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $soc->default_lang); /* * Linked object block (of linked shipment) @@ -719,15 +702,11 @@ else // View // Rien a droite print ''; - } - else - { + } else { /* Expedition non trouvee */ print "Expedition inexistante ou acces refuse"; } - } - else - { + } else { /* Expedition non trouvee */ print "Expedition inexistante ou acces refuse"; } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index 6c5c6e49611..c612dbf6fe2 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -59,6 +59,11 @@ class Livraison extends CommonObject */ public $table_element_line = "livraisondet"; + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'sending'; + public $brouillon; public $socid; public $ref_customer; @@ -215,25 +220,19 @@ class Livraison extends CommonObject { $this->db->commit(); return $this->id; - } - else - { + } else { $error++; $this->error = $this->db->lasterror()." - sql=".$this->db->lastqueryerror; $this->db->rollback(); return -3; } - } - else - { + } else { $error++; $this->error = $this->db->lasterror()." - sql=".$this->db->lastqueryerror; $this->db->rollback(); return -2; } - } - else - { + } else { $error++; $this->error = $this->db->lasterror()." - sql=".$this->db->lastqueryerror; $this->db->rollback(); @@ -320,7 +319,8 @@ class Livraison extends CommonObject $this->note = $obj->note_private; //TODO deprecated $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; - $this->modelpdf = $obj->model_pdf; + $this->model_pdf = $obj->model_pdf; + $this->modelpdf = $obj->model_pdf; // deprecated $this->origin = $obj->origin; // May be 'shipping' $this->origin_id = $obj->origin_id; // May be id of shipping @@ -344,16 +344,12 @@ class Livraison extends CommonObject } return 1; - } - else - { + } else { $this->error = 'Delivery with id '.$id.' not found sql='.$sql; dol_syslog(get_class($this).'::fetch Error '.$this->error, LOG_ERR); return -2; } - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -399,9 +395,7 @@ class Livraison extends CommonObject if (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref)) // empty should not happened, but when it occurs, the test save life { $numref = $objMod->livraison_get_num($soc, $this); - } - else - { + } else { $numref = $this->ref; } $this->newref = dol_sanitizeFileName($numref); @@ -500,17 +494,13 @@ class Livraison extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } } } - } - else - { + } else { $this->error = "Non autorise"; dol_syslog(get_class($this)."::valid ".$this->error, LOG_ERR); return -1; @@ -633,9 +623,7 @@ class Livraison extends CommonObject $this->update_price(); return 1; - } - else - { + } else { return 0; } } @@ -704,23 +692,17 @@ class Livraison extends CommonObject // End call triggers return 1; - } - else - { + } else { $this->error = $this->db->lasterror()." - sql=$sql"; $this->db->rollback(); return -3; } - } - else - { + } else { $this->error = $this->db->lasterror()." - sql=$sql"; $this->db->rollback(); return -2; } - } - else - { + } else { $this->error = $this->db->lasterror()." - sql=$sql"; $this->db->rollback(); return -1; @@ -739,9 +721,9 @@ class Livraison extends CommonObject global $langs; $result = ''; - $picto = 'sending'; - $label = $langs->trans("ShowReceiving").': '.$this->ref; + $label = img_picto('', $this->picto).' '.$langs->trans("ShowReceiving").':
    '; + $label .= ''.$langs->trans("Status").': '.$this->ref; $url = DOL_URL_ROOT.'/livraison/card.php?id='.$this->id; @@ -757,7 +739,7 @@ class Livraison extends CommonObject $linkstart = ''; $linkend = ''; - if ($withpicto) $result .= ($linkstart.img_object($label, $picto, 'class="classfortooltip"').$linkend); + if ($withpicto) $result .= ($linkstart.img_object($label, $this->picto, 'class="classfortooltip"').$linkend); if ($withpicto && $withpicto != 2) $result .= ' '; $result .= $linkstart.$this->ref.$linkend; return $result; @@ -904,6 +886,8 @@ class Livraison extends CommonObject $sql .= " FROM ".MAIN_DB_PREFIX."product"; $sql .= " WHERE entity IN (".getEntity('product').")"; $sql .= " AND tosell = 1"; + $sql .= $this->db->plimit(100); + $resql = $this->db->query($sql); if ($resql) { @@ -990,16 +974,13 @@ class Livraison extends CommonObject if ($row[0] == $objSourceLine->rowid) { $array[$i]['qty'] = $objSourceLine->qty - $row[1]; - } - else - { + } else { $array[$i]['qty'] = $objSourceLine->qty; } $array[$i]['ref'] = $objSourceLine->ref; $array[$i]['label'] = $objSourceLine->label ? $objSourceLine->label : $objSourceLine->description; - } - elseif ($objSourceLine->qty - $row[1] < 0) + } elseif ($objSourceLine->qty - $row[1] < 0) { $array[$i]['qty'] = $objSourceLine->qty - $row[1]." Erreur livraison !"; $array[$i]['ref'] = $objSourceLine->ref; @@ -1009,9 +990,7 @@ class Livraison extends CommonObject $i++; } return $array; - } - else - { + } else { $this->error = $this->db->error()." - sql=$sqlSourceLine"; return -1; } @@ -1040,15 +1019,11 @@ class Livraison extends CommonObject { $this->date_delivery = $date_livraison; return 1; - } - else - { + } else { $this->error = $this->db->error(); return -1; } - } - else - { + } else { return -2; } } @@ -1073,8 +1048,8 @@ class Livraison extends CommonObject if (!dol_strlen($modele)) { $modele = 'typhon'; - if ($this->modelpdf) { - $modele = $this->modelpdf; + if ($this->model_pdf) { + $modele = $this->model_pdf; } elseif (!empty($conf->global->LIVRAISON_ADDON_PDF)) { $modele = $conf->global->LIVRAISON_ADDON_PDF; } diff --git a/htdocs/loan/calcmens.php b/htdocs/loan/calcmens.php index b65aa41c4d4..d5f9704addc 100644 --- a/htdocs/loan/calcmens.php +++ b/htdocs/loan/calcmens.php @@ -1,6 +1,7 @@ + * Copyright (C) 2020 Maxime DEMAREST * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,7 +29,7 @@ if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); require '../main.inc.php'; -require DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; +require DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; $mens = GETPOST('mens'); $capital = GETPOST('capital'); @@ -40,26 +41,6 @@ top_httphead(); $output = array(); -$object = new LoanSchedule($db); - -$int = ($capital * ($rate / 12)); -$int = round($int, 2, PHP_ROUND_HALF_UP); -$cap_rest = round($capital - ($mens - $int), 2, PHP_ROUND_HALF_UP); -$output[$echance] = array('cap_rest'=>$cap_rest, 'cap_rest_str'=>price($cap_rest, 0, '', 1, -1, -1, $conf->currency), 'interet'=>$int, 'interet_str'=>price($int, 0, '', 1, -1, -1, $conf->currency), 'mens'=>$mens); - -$echance++; -$capital = $cap_rest; -while ($echance <= $nbterm) { - $mens = round($object->calcMonthlyPayments($capital, $rate, $nbterm - $echance + 1), 2, PHP_ROUND_HALF_UP); - - $int = ($capital * ($rate / 12)); - $int = round($int, 2, PHP_ROUND_HALF_UP); - $cap_rest = round($capital - ($mens - $int), 2, PHP_ROUND_HALF_UP); - - $output[$echance] = array('cap_rest'=>$cap_rest, 'cap_rest_str'=>price($cap_rest, 0, '', 1, -1, -1, $conf->currency), 'interet'=>$int, 'interet_str'=>price($int, 0, '', 1, -1, -1, $conf->currency), 'mens'=>$mens); - - $capital = $cap_rest; - $echance++; -} +$output = loanCalcMonthlyPayment($mens, $capital, $rate, $echance, $nbterm); echo json_encode($output); diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 56b12321bb2..1c4116b34c2 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -2,6 +2,7 @@ /* Copyright (C) 2014-2018 Alexandre Spangaro * Copyright (C) 2015 Frederic France * Copyright (C) 2017 Laurent Destailleur + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -68,9 +69,7 @@ if (empty($reshook)) if ($result > 0) { setEventMessages($langs->trans('LoanPaid'), null, 'mesgs'); - } - else - { + } else { setEventMessages($loan->error, null, 'errors'); } } @@ -83,11 +82,9 @@ if (empty($reshook)) if ($result > 0) { setEventMessages($langs->trans('LoanDeleted'), null, 'mesgs'); - header("Location: index.php"); + header("Location: list.php"); exit; - } - else - { + } else { setEventMessages($loan->error, null, 'errors'); } } @@ -132,8 +129,8 @@ if (empty($reshook)) $object->dateend = $dateend; $object->nbterm = GETPOST('nbterm'); $object->rate = $rate; - $object->note_private = GETPOST('note_private', 'none'); - $object->note_public = GETPOST('note_public', 'none'); + $object->note_private = GETPOST('note_private', 'restricthtml'); + $object->note_public = GETPOST('note_public', 'restricthtml'); $object->fk_project = GETPOST('projectid', 'int'); $object->insurance_amount = GETPOST('insurance_amount', 'int'); @@ -153,9 +150,7 @@ if (empty($reshook)) $action = 'create'; } } - } - else - { + } else { header("Location: index.php"); exit(); } @@ -176,9 +171,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("LoanCapital")), null, 'errors'); $action = 'edit'; - } - else - { + } else { $object->datestart = $datestart; $object->dateend = $dateend; $object->capital = $capital; @@ -201,15 +194,11 @@ if (empty($reshook)) { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); } - } - else - { + } else { header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); exit; } @@ -274,9 +263,7 @@ if ($action == 'create') print ''.$langs->trans("Account").''; $form->select_comptes(GETPOST("accountid"), "accountid", 0, "courant=1", 1); // Show list of bank account with courant print ''; - } - else - { + } else { print ''.$langs->trans("Account").''; print $langs->trans("NoBankAccountDefined"); print ''; @@ -359,8 +346,7 @@ if ($action == 'create') print ''; print $formaccounting->select_account(GETPOST('accountancy_account_interest') ?GETPOST('accountancy_account_interest') : $conf->global->LOAN_ACCOUNTING_ACCOUNT_INTEREST, 'accountancy_account_interest', 1, '', 1, 1); print ''; - } - else // For external software + } else // For external software { // Accountancy_account_capital print ''.$langs->trans("LoanAccountancyCapitalCode").''; @@ -483,9 +469,7 @@ if ($id > 0) print ''.$langs->trans("LoanCapital").''; print ''; print ''; - } - else - { + } else { print ''.$langs->trans("LoanCapital").''.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).''; } @@ -495,9 +479,7 @@ if ($id > 0) print ''.$langs->trans("Insurance").''; print ''; print ''; - } - else - { + } else { print ''.$langs->trans("Insurance").''.price($object->insurance_amount, 0, $outputlangs, 1, -1, -1, $conf->currency).''; } @@ -507,9 +489,7 @@ if ($id > 0) if ($action == 'edit') { print $form->selectDate($object->datestart, 'start', 0, 0, 0, 'update', 1, 0); - } - else - { + } else { print dol_print_date($object->datestart, "day"); } print ""; @@ -520,9 +500,7 @@ if ($id > 0) if ($action == 'edit') { print $form->selectDate($object->dateend, 'end', 0, 0, 0, 'update', 1, 0); - } - else - { + } else { print dol_print_date($object->dateend, "day"); } print ""; @@ -533,9 +511,7 @@ if ($id > 0) if ($action == 'edit') { print ''; - } - else - { + } else { print $object->nbterm; } print ''; @@ -546,9 +522,7 @@ if ($id > 0) if ($action == 'edit') { print '%'; - } - else - { + } else { print price($object->rate).'%'; } print ''; @@ -564,15 +538,11 @@ if ($id > 0) if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($object->account_capital, 'accountancy_account_capital', 1, '', 1, 1); - } - else - { + } else { print ''; } print ''; - } - else - { + } else { print ''; print $langs->trans("LoanAccountancyCapitalCode"); print ''; @@ -602,15 +572,11 @@ if ($id > 0) if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($object->account_insurance, 'accountancy_account_insurance', 1, '', 1, 1); - } - else - { + } else { print ''; } print ''; - } - else - { + } else { print ''; print $langs->trans("LoanAccountancyInsuranceCode"); print ''; @@ -640,15 +606,11 @@ if ($id > 0) if (!empty($conf->accounting->enabled)) { print $formaccounting->select_account($object->account_interest, 'accountancy_account_interest', 1, '', 1, 1); - } - else - { + } else { print ''; } print ''; - } - else - { + } else { print ''; print $langs->trans("LoanAccountancyInterestCode"); print ''; @@ -726,7 +688,7 @@ if ($id > 0) $totalpaid = $total_capital; - if ($object->paid == 0) + if ($object->paid == 0 || $object->paid == 2) { print ''.$langs->trans("AlreadyPaid").' :'.price($totalpaid, 0, $langs, 0, -1, -1, $conf->currency).''; print ''.$langs->trans("AmountExpected").' :'.price($object->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).''; @@ -742,9 +704,7 @@ if ($id > 0) print '
    '; $db->free($resql); - } - else - { + } else { dol_print_error($db); } @@ -778,35 +738,33 @@ if ($id > 0) print '
    '; // Edit - if ($object->paid == 0 && $user->rights->loan->write) + if (($object->paid == 0 || $object->paid == 2) && $user->rights->loan->write) { print ''; } // Emit payment - if ($object->paid == 0 && ((price2num($object->capital) > 0 && round($staytopay) < 0) || (price2num($object->capital) > 0 && round($staytopay) > 0)) && $user->rights->loan->write) + if (($object->paid == 0 || $object->paid == 2) && ((price2num($object->capital) > 0 && round($staytopay) < 0) || (price2num($object->capital) > 0 && round($staytopay) > 0)) && $user->rights->loan->write) { - print ''; + print ''; } // Classify 'paid' - if ($object->paid == 0 && round($staytopay) <= 0 && $user->rights->loan->write) + if (($object->paid == 0 || $object->paid == 2) && round($staytopay) <= 0 && $user->rights->loan->write) { - print ''; + print ''; } // Delete - if ($object->paid == 0 && $user->rights->loan->delete) + if (($object->paid == 0 || $object->paid == 2) && $user->rights->loan->delete) { - print ''; + print ''; } print "
    "; } } - } - else - { + } else { // Loan not found dol_print_error('', $object->error); } diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index 1a24eb6be11..33f3d789806 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -107,6 +107,7 @@ class Loan extends CommonObject const STATUS_UNPAID = 0; const STATUS_PAID = 1; + const STATUS_STARTED = 2; /** @@ -160,15 +161,11 @@ class Loan extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->db->free($resql); return 0; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -258,9 +255,7 @@ class Loan extends CommonObject //dol_syslog("Loans::create this->id=".$this->id); $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -329,9 +324,7 @@ class Loan extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -375,9 +368,7 @@ class Loan extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->error = $this->db->error(); $this->db->rollback(); return -1; @@ -395,7 +386,51 @@ class Loan extends CommonObject { // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX."loan SET"; - $sql .= " paid = 1"; + $sql .= " paid = ".$this::STATUS_PAID; + $sql .= " WHERE rowid = ".$this->id; + $return = $this->db->query($sql); + if ($return) { + return 1; + } else { + $this->error = $this->db->lasterror(); + return -1; + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Tag loan as payement started + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function set_started($user) + { + // phpcs:enable + $sql = "UPDATE ".MAIN_DB_PREFIX."loan SET"; + $sql .= " paid = ".$this::STATUS_STARTED; + $sql .= " WHERE rowid = ".$this->id; + $return = $this->db->query($sql); + if ($return) { + return 1; + } else { + $this->error = $this->db->lasterror(); + return -1; + } + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Tag loan as payement as unpaid + * + * @param User $user Object user making change + * @return int <0 if KO, >0 if OK + */ + public function set_unpaid($user) + { + // phpcs:enable + $sql = "UPDATE ".MAIN_DB_PREFIX."loan SET"; + $sql .= " paid = ".$this::STATUS_UNPAID; $sql .= " WHERE rowid = ".$this->id; $return = $this->db->query($sql); if ($return) { @@ -439,17 +474,18 @@ class Loan extends CommonObject if (empty($this->labelStatus) || empty($this->labelStatusShort)) { global $langs; - //$langs->load("mymodule"); $this->labelStatus[self::STATUS_UNPAID] = $langs->trans('Unpaid'); $this->labelStatus[self::STATUS_PAID] = $langs->trans('Paid'); + $this->labelStatus[self::STATUS_STARTED] = $langs->trans("BillStatusStarted"); if ($status == 0 && $alreadypaid > 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans('Unpaid'); $this->labelStatusShort[self::STATUS_PAID] = $langs->trans('Enabled'); + $this->labelStatusShort[self::STATUS_STARTED] = $langs->trans("BillStatusStarted"); if ($status == 0 && $alreadypaid > 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->trans("BillStatusStarted"); } $statusType = 'status1'; - if ($status == 0 && $alreadypaid > 0) $statusType = 'status3'; + if (($status == 0 && $alreadypaid > 0) || $status == self::STATUS_STARTED) $statusType = 'status3'; if ($status == 1) $statusType = 'status6'; return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); @@ -501,8 +537,7 @@ class Loan extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -571,9 +606,7 @@ class Loan extends CommonObject $this->db->free($resql); return $amount; - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } @@ -618,15 +651,11 @@ class Loan extends CommonObject $this->db->free($result); return 1; - } - else - { + } else { $this->db->free($result); return 0; } - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index 3299e810991..4fd4b526d25 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -76,6 +76,11 @@ class LoanSchedule extends CommonObject */ public $fk_bank; + /** + * @var int Loan Payment ID + */ + public $fk_payment_loan; + /** * @var int Bank ID */ @@ -170,9 +175,7 @@ class LoanSchedule extends CommonObject if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_loan"); - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } @@ -183,9 +186,7 @@ class LoanSchedule extends CommonObject $this->amount_capital = $totalamount; $this->db->commit(); return $this->id; - } - else - { + } else { $this->errors[] = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -202,27 +203,28 @@ class LoanSchedule extends CommonObject { global $langs; $sql = "SELECT"; - $sql .= " t.rowid,"; - $sql .= " t.fk_loan,"; - $sql .= " t.datec,"; - $sql .= " t.tms,"; - $sql .= " t.datep,"; - $sql .= " t.amount_capital,"; - $sql .= " t.amount_insurance,"; - $sql .= " t.amount_interest,"; - $sql .= " t.fk_typepayment,"; - $sql .= " t.num_payment,"; - $sql .= " t.note_private,"; - $sql .= " t.note_public,"; - $sql .= " t.fk_bank,"; - $sql .= " t.fk_user_creat,"; - $sql .= " t.fk_user_modif,"; - $sql .= " pt.code as type_code, pt.libelle as type_label,"; - $sql .= ' b.fk_account'; - $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepayment = pt.id"; - $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid'; - $sql .= " WHERE t.rowid = ".$id; + $sql.= " t.rowid,"; + $sql.= " t.fk_loan,"; + $sql.= " t.datec,"; + $sql.= " t.tms,"; + $sql.= " t.datep,"; + $sql.= " t.amount_capital,"; + $sql.= " t.amount_insurance,"; + $sql.= " t.amount_interest,"; + $sql.= " t.fk_typepayment,"; + $sql.= " t.num_payment,"; + $sql.= " t.note_private,"; + $sql.= " t.note_public,"; + $sql.= " t.fk_bank,"; + $sql.= " t.fk_payment_loan,"; + $sql.= " t.fk_user_creat,"; + $sql.= " t.fk_user_modif,"; + $sql.= " pt.code as type_code, pt.libelle as type_label,"; + $sql.= ' b.fk_account'; + $sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; + $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as pt ON t.fk_typepayment = pt.id"; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'bank as b ON t.fk_bank = b.rowid'; + $sql.= " WHERE t.rowid = ".$id; dol_syslog(get_class($this)."::fetch", LOG_DEBUG); $resql = $this->db->query($sql); @@ -245,6 +247,7 @@ class LoanSchedule extends CommonObject $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; $this->fk_bank = $obj->fk_bank; + $this->fk_payment_loan = $obj->fk_payment_loan; $this->fk_user_creat = $obj->fk_user_creat; $this->fk_user_modif = $obj->fk_user_modif; @@ -257,9 +260,7 @@ class LoanSchedule extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -279,13 +280,14 @@ class LoanSchedule extends CommonObject $error = 0; // Clean parameters - if (isset($this->amount_capital)) $this->amount_capital = trim($this->amount_capital); - if (isset($this->amount_insurance)) $this->amount_insurance = trim($this->amount_insurance); - if (isset($this->amount_interest)) $this->amount_interest = trim($this->amount_interest); - if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment); - if (isset($this->note_private)) $this->note_private = trim($this->note_private); - if (isset($this->note_public)) $this->note_public = trim($this->note_public); - if (isset($this->fk_bank)) $this->fk_bank = trim($this->fk_bank); + if (isset($this->amount_capital)) $this->amount_capital=trim($this->amount_capital); + if (isset($this->amount_insurance)) $this->amount_insurance=trim($this->amount_insurance); + if (isset($this->amount_interest)) $this->amount_interest=trim($this->amount_interest); + if (isset($this->num_payment)) $this->num_payment=trim($this->num_payment); + if (isset($this->note_private)) $this->note_private=trim($this->note_private); + if (isset($this->note_public)) $this->note_public=trim($this->note_public); + if (isset($this->fk_bank)) $this->fk_bank=trim($this->fk_bank); + if (isset($this->fk_payment_loan)) $this->fk_payment_loan = (int) $this->fk_payment_loan; // Check parameters // Put here code to add control on parameters values @@ -305,6 +307,7 @@ class LoanSchedule extends CommonObject $sql .= " note_private=".(isset($this->note_private) ? "'".$this->db->escape($this->note_private)."'" : "null").","; $sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").","; $sql .= " fk_bank=".(isset($this->fk_bank) ? $this->fk_bank : "null").","; + $sql .= " fk_payment_loan=".(isset($this->fk_payment_loan) ? $this->fk_payment_loan : "null").","; $sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? $this->fk_user_creat : "null").","; $sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? $this->fk_user_modif : "null").""; @@ -321,9 +324,7 @@ class LoanSchedule extends CommonObject { $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -363,9 +364,7 @@ class LoanSchedule extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -415,6 +414,7 @@ class LoanSchedule extends CommonObject $sql .= " t.note_private,"; $sql .= " t.note_public,"; $sql .= " t.fk_bank,"; + $sql .= " t.fk_payment_loan,"; $sql .= " t.fk_user_creat,"; $sql .= " t.fk_user_modif"; $sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element." as t"; @@ -443,6 +443,7 @@ class LoanSchedule extends CommonObject $line->note_private = $obj->note_private; $line->note_public = $obj->note_public; $line->fk_bank = $obj->fk_bank; + $line->fk_payment_loan = $obj->fk_payment_loan; $line->fk_user_creat = $obj->fk_user_creat; $line->fk_user_modif = $obj->fk_user_modif; @@ -450,9 +451,7 @@ class LoanSchedule extends CommonObject } $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index 0aa5b2dbf62..9c5c1b559ad 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -1,6 +1,7 @@ - * Copyright (C) 2015-2020 Frederic France + * Copyright (C) 2015-2018 Frederic France + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -40,63 +41,63 @@ class PaymentLoan extends CommonObject */ public $table_element = 'payment_loan'; - /** - * @var string String with name of icon for PaymentLoan - */ - public $picto = 'money-bill-alt'; + /** + * @var string String with name of icon for PaymentLoan + */ + public $picto = 'money-bill-alt'; - /** - * @var int Loan ID - */ - public $fk_loan; + /** + * @var int Loan ID + */ + public $fk_loan; - /** - * @var string Create date - */ - public $datec = ''; + /** + * @var string Create date + */ + public $datec = ''; - public $tms = ''; + public $tms = ''; - /** - * @var string Payment date - */ - public $datep = ''; + /** + * @var string Payment date + */ + public $datep = ''; - public $amounts = array(); // Array of amounts + public $amounts = array(); // Array of amounts - public $amount_capital; // Total amount of payment + public $amount_capital; // Total amount of payment - public $amount_insurance; + public $amount_insurance; - public $amount_interest; + public $amount_interest; - /** - * @var int Payment type ID - */ - public $fk_typepayment; + /** + * @var int Payment mode ID + */ + public $fk_typepayment; - /** - * @var int Payment ID - */ - public $num_payment; + /** + * @var int Payment ID + */ + public $num_payment; - /** - * @var int Bank ID - */ - public $fk_bank; + /** + * @var int Bank ID + */ + public $fk_bank; - /** - * @var int User ID - */ - public $fk_user_creat; + /** + * @var int User ID + */ + public $fk_user_creat; - /** - * @var int user ID - */ - public $fk_user_modif; + /** + * @var int user ID + */ + public $fk_user_modif; - public $type_code; - public $type_label; + public $type_code; + public $type_label; /** @@ -170,9 +171,7 @@ class PaymentLoan extends CommonObject if ($resql) { $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."payment_loan"); - } - else - { + } else { $this->error = $this->db->lasterror(); $error++; } @@ -183,9 +182,7 @@ class PaymentLoan extends CommonObject $this->amount_capital = $totalamount; $this->db->commit(); return $this->id; - } - else - { + } else { $this->error = $this->db->lasterror(); $this->db->rollback(); return -1; @@ -259,9 +256,7 @@ class PaymentLoan extends CommonObject $this->db->free($resql); return 1; - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -331,9 +326,7 @@ class PaymentLoan extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -374,6 +367,40 @@ class PaymentLoan extends CommonObject if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } } + // Set loan unpaid if loan has no other payment + if (!$error) + { + require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; + $loan = new Loan($this->db); + $loan->fetch($this->fk_loan); + $sum_payment = $loan->getSumPayment(); + if ($sum_payment == 0) + { + dol_syslog(get_class($this)."::delete : set loan to unpaid", LOG_DEBUG); + if ($loan->set_unpaid($user) < 1) + { + $error++; + dol_print_error($this->db); + } + } + } + + //if (! $error) + //{ + // if (! $notrigger) + // { + // Uncomment this and change MYOBJECT to your own tag if you + // want this action call a trigger. + + //// Call triggers + //include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php'; + //$interface=new Interfaces($this->db); + //$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf); + //if ($result < 0) { $error++; $this->errors=$interface->errors; } + //// End call triggers + // } + //} + // Commit or rollback if ($error) { @@ -384,9 +411,7 @@ class PaymentLoan extends CommonObject } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -410,6 +435,7 @@ class PaymentLoan extends CommonObject global $conf; $error = 0; + $this->db->begin(); if (!empty($conf->banque->enabled)) { @@ -422,9 +448,9 @@ class PaymentLoan extends CommonObject if ($mode == 'payment_loan') $total = -$total; // Insert payment into llx_bank - $bank_line_id = $acc->addline( + $bank_line_id = $acc->addline( $this->datep, - $this->paymenttype, // Payment mode id or code ("CHQ or VIR for example") + $this->fk_typepayment, // Payment mode ID or code ("CHQ or VIR for example") $label, $total, $this->num_payment, @@ -458,32 +484,50 @@ class PaymentLoan extends CommonObject } } + // Add link 'loan' in bank_url between invoice and bank transaction (for each invoice concerned by payment) if ($mode == 'payment_loan') { $result = $acc->add_url_line($bank_line_id, $fk_loan, DOL_URL_ROOT.'/loan/card.php?id=', ($this->label ? $this->label : ''), 'loan'); if ($result <= 0) dol_print_error($this->db); } - } - else - { + } else { $this->error = $acc->error; $error++; } } + + // Set loan payment started if no set if (!$error) { + require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; + $loan = new Loan($this->db); + $loan->fetch($fk_loan); + if ($loan->paid == $loan::STATUS_UNPAID) + { + dol_syslog(get_class($this)."::addPaymentToBank : set loan payment to started", LOG_DEBUG); + if ($loan->set_started($user) < 1) + { + $error++; + dol_print_error($this->db); + } + } + } + + if (!$error) + { + $this->db->commit(); return 1; } - else - { + else { + $this->db->rollback(); return -1; } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Update link between loan's payment and the line generate in llx_bank * @@ -492,18 +536,16 @@ class PaymentLoan extends CommonObject */ public function update_fk_bank($id_bank) { - // phpcs:enable + // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX."payment_loan SET fk_bank = ".$id_bank." WHERE rowid = ".$this->id; dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { - $this->fk_bank = $id_bank; + $this->fk_bank = $id_bank; return 1; - } - else - { + } else { $this->error = $this->db->error(); return 0; } @@ -514,9 +556,9 @@ class PaymentLoan extends CommonObject * * @param int $withpicto 0=No picto, 1=Include picto into link, 2=No picto * @param int $maxlen Max length label - * @param int $notooltip 1=Disable tooltip - * @param string $moretitle Add more text to title tooltip - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @param int $notooltip 1=Disable tooltip + * @param string $moretitle Add more text to title tooltip + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking * @return string String with URL */ public function getNomUrl($withpicto = 0, $maxlen = 0, $notooltip = 0, $moretitle = '', $save_lastsearch_value = -1) diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 6ae646a93a1..442f8768390 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -158,9 +158,7 @@ if ($object->id) $permtoedit = $user->rights->loan->write; $param = '&id='.$object->id; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 3f87f322ccb..79e38dbdeb1 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -36,8 +36,8 @@ if ($user->socid) $socid = $user->socid; $result = restrictedArea($user, 'loan', '', '', ''); $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -55,7 +55,7 @@ $search_ref = GETPOST('search_ref', 'int'); $search_label = GETPOST('search_label', 'alpha'); $search_amount = GETPOST('search_amount', 'alpha'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'loanlist'; // To manage different context of search $optioncss = GETPOST('optioncss', 'alpha'); @@ -120,9 +120,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; -} -else -{ +} else { if ($limit) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -152,11 +150,9 @@ if ($resql) if ($search_amount) $param .= "&search_amount=".urlencode($search_amount); if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); - $newcardbutton = ''; - if ($user->rights->loan->write) - { - $newcardbutton .= dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/loan/card.php?action=create'); - } + $url = DOL_URL_ROOT.'/loan/card.php?action=create'; + if (!empty($socid)) $url .= '&socid='.$socid; + $newcardbutton = dolGetButtonTitle($langs->trans('NewLoan'), '', 'fa fa-plus-circle', $url, '', $user->rights->loan->write); print '
    '."\n"; if ($optioncss != '') print ''; @@ -261,9 +257,7 @@ if ($resql) print '
    '."\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index b739b81ca54..51aa3f85a92 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -57,15 +57,15 @@ if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->loan->del $sql = "UPDATE ".MAIN_DB_PREFIX."loan_schedule SET fk_bank = 0 WHERE fk_bank = ".$payment->fk_bank; $db->query($sql); + $fk_loan = $payment->fk_loan; + $result = $payment->delete($user); if ($result > 0) { $db->commit(); - header("Location: ".DOL_URL_ROOT."/loan/list.php"); + header("Location: ".DOL_URL_ROOT."/loan/card.php?id=".$fk_loan); exit; - } - else - { + } else { setEventMessages($payment->error, $payment->errors, 'errors'); $db->rollback(); } @@ -95,15 +95,13 @@ if ($action == 'confirm_valide' && $confirm == 'yes' && $user->rights->loan->wri $outputlangs->setDefaultLang($_REQUEST['lang_id']); } if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { - $fac->generateDocument($fac->modelpdf, $outputlangs); + $fac->generateDocument($fac->model_pdf, $outputlangs); } } header('Location: card.php?id='.$payment->id); exit; - } - else - { + } else { setEventMessages($payment->error, $payment->errors, 'errors'); $db->rollback(); } @@ -254,9 +252,7 @@ if ($resql) print "\n"; $db->free($resql); -} -else -{ +} else { dol_print_error($db); } @@ -285,10 +281,8 @@ if (empty($action) && !empty($user->rights->loan->delete)) { if (!$disable_delete) { - print '
    '.$langs->trans('Delete').''; - } - else - { + print ''.$langs->trans('Delete').''; + } else { print ''.$langs->trans('Delete').''; } } diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index ea37a298d49..9aaa75b9845 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -1,6 +1,7 @@ * Copyright (C) 2015-2018 Frédéric France + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -27,44 +28,49 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; $langs->loadLangs(array("bills", "loan")); -$chid = GETPOST('id', 'int'); -$action = GETPOST('action', 'aZ09'); -$cancel = GETPOST('cancel', 'alpha'); -$line_id = GETPOST('line_id', 'int'); -$last = GETPOST('last'); +$chid=GETPOST('id', 'int'); +$action=GETPOST('action', 'aZ09'); +$cancel=GETPOST('cancel', 'alpha'); +$datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); // Security check $socid = 0; if ($user->socid > 0) -{ $socid = $user->socid; -} +elseif (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int'); +if (empty($user->rights->loan->write)) accessforbidden(); $loan = new Loan($db); $loan->fetch($chid); -if ($last) +$echance = 0; +$ls = new LoanSchedule($db); +// grab all loanschedule +$res = $ls->fetchAll($chid); +if ($res > 0) { - $ls = new LoanSchedule($db); - // grab all loanschedule - $res = $ls->fetchAll($chid); - if ($res > 0) + foreach ($ls->lines as $l) { - foreach ($ls->lines as $l) + $echance++; // Count term pos + // last unpaid term + if (empty($l->fk_bank)) { - // get the last unpaid loanschedule - if (empty($l->fk_bank)) - { - $line_id = $l->id; - break; - } + $line_id = $l->id; + break; + } + // If line_id provided, only count temp pos + elseif ($line_id == $l->id) + { + break; } } } +// Set current line with last unpaid line (only if shedule is used) if (!empty($line_id)) { $line = new LoanSchedule($db); @@ -73,6 +79,7 @@ if (!empty($line_id)) $amount_capital = price($line->amount_capital); $amount_insurance = price($line->amount_insurance); $amount_interest = price($line->amount_interest); + if (empty($datepaid)) $ts_temppaid = $line->datep; } } @@ -92,9 +99,7 @@ if ($action == 'add_payment') exit; } - $datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - - if (!GETPOST('paymenttype', 'int') > 0) + if (! GETPOST('paymenttype', 'int') > 0) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("PaymentMode")), null, 'errors'); $error++; @@ -114,7 +119,27 @@ if ($action == 'add_payment') { $paymentid = 0; - $amount = GETPOST('amount_capital') + GETPOST('amount_insurance') + GETPOST('amount_interest'); + $pay_amount_capital = price2num(GETPOST('amount_capital')); + $pay_amount_insurance = price2num(GETPOST('amount_insurance')); + // User can't set interest him self if schedule is set (else value in schedule can be incoherent) + if (!empty($line)) $pay_amount_interest = $line->amount_interest; + else $pay_amount_interest = price2num(GETPOST('amount_interest')); + $remaindertopay = price2num(GETPOST('remaindertopay')); + $amount = $pay_amount_capital + $pay_amount_insurance + $pay_amount_interest; + + // This term is allready paid + if (!empty($line) && !empty($line->fk_bank)) + { + setEventMessages($langs->trans('TermPaidAllreadyPaid'), null, 'errors'); + $error++; + } + + if (empty($remaindertopay)) + { + setEventMessages('Empty sumpaid', null, 'errors'); + $error++; + } + if ($amount == 0) { setEventMessages($langs->trans('ErrorNoPaymentDefined'), null, 'errors'); @@ -127,16 +152,16 @@ if ($action == 'add_payment') // Create a line of payments $payment = new PaymentLoan($db); - $payment->chid = $chid; - $payment->datep = $datepaid; - $payment->label = $loan->label; - $payment->amount_capital = GETPOST('amount_capital'); - $payment->amount_insurance = GETPOST('amount_insurance'); - $payment->amount_interest = GETPOST('amount_interest'); - $payment->paymenttype = GETPOST('paymenttype', 'int'); - $payment->num_payment = GETPOST('num_payment'); - $payment->note_private = GETPOST('note_private', 'none'); - $payment->note_public = GETPOST('note_public', 'none'); + $payment->chid = $chid; + $payment->datep = $datepaid; + $payment->label = $loan->label; + $payment->amount_capital = $pay_amount_capital; + $payment->amount_insurance = $pay_amount_interest; + $payment->amount_interest = $pay_amount_insurance; + $payment->paymenttype = GETPOST('paymenttype', 'int'); + $payment->num_payment = GETPOST('num_payment'); + $payment->note_private = GETPOST('note_private', 'restricthtml'); + $payment->note_public = GETPOST('note_public', 'restricthtml'); if (!$error) { @@ -156,22 +181,56 @@ if ($action == 'add_payment') setEventMessages($payment->error, $payment->errors, 'errors'); $error++; } - elseif (isset($line)) - { - $line->fk_bank = $payment->fk_bank; - $line->update($user); - } } - if (!$error) + // Update loan schedule with payment value + if (! $error && !empty($line)) + { + // If payment values are modified, recalculate schedule + if (($line->amount_capital <> $pay_amount_capital) || ($line->amount_insurance <> $pay_amount_insurance) || ($line->amount_interest <> $pay_amount_interest)) + { + $arr_term = loanCalcMonthlyPayment(($pay_amount_capital + $pay_amount_interest), $remaindertopay, ($loan->rate / 100), $echance, $loan->nbterm); + foreach ($arr_term as $k=>$v) + { + // Update fk_bank for current line + if ($k == $echance) + { + $ls->lines[$k-1]->fk_bank = $payment->fk_bank; + $ls->lines[$k-1]->fk_payment_loan = $payment->id; + } + $ls->lines[$k-1]->amount_capital = $v['mens'] - $v['interet']; + $ls->lines[$k-1]->amount_interest = $v['interet']; + $ls->lines[$k-1]->tms = dol_now(); + $ls->lines[$k-1]->fk_user_modif = $user->id; + $result = $ls->lines[$k-1]->update($user, 0); + if ($result < 1) + { + setEventMessages(null, $ls->errors, 'errors'); + $error++; + break; + } + } + } + else // Only add fk_bank bank to schedule line (mark as paid) + { + $line->fk_bank = $payment->fk_bank; + $line->fk_payment_loan = $payment->id; + $result = $line->update($user, 0); + if ($result < 1) + { + setEventMessages(null, $line->errors, 'errors'); + $error++; + } + } + } + + if (! $error) { $db->commit(); $loc = DOL_URL_ROOT.'/loan/card.php?id='.$chid; header('Location: '.$loc); exit; - } - else - { + } else { $db->rollback(); } } @@ -197,11 +256,23 @@ if ($action == 'create') print load_fiche_titre($langs->trans("DoPayment")); + $sql = "SELECT SUM(amount_capital) as total"; + $sql.= " FROM ".MAIN_DB_PREFIX."payment_loan"; + $sql.= " WHERE fk_loan = ".$chid; + $resql = $db->query($sql); + if ($resql) + { + $obj=$db->fetch_object($resql); + $sumpaid = $obj->total; + $db->free(); + } + print '
    '; print ''; print ''; print ''; print ''; + print ''; print ''; dol_fiche_head(); @@ -211,20 +282,14 @@ if ($action == 'create') print ''.$langs->trans("Loan").''; print ''.$langs->trans("Ref").''.$chid.''; + if ($echance > 0) + { + print ''.$langs->trans("Term").''.$echance.''."\n"; + } print ''.$langs->trans("DateStart").''.dol_print_date($loan->datestart, 'day')."\n"; print ''.$langs->trans("Label").''.$loan->label."\n"; print ''.$langs->trans("Amount").''.price($loan->capital, 0, $outputlangs, 1, -1, -1, $conf->currency).''; - $sql = "SELECT SUM(amount_capital) as total"; - $sql .= " FROM ".MAIN_DB_PREFIX."payment_loan"; - $sql .= " WHERE fk_loan = ".$chid; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $sumpaid = $obj->total; - $db->free(); - } print ''.$langs->trans("AlreadyPaid").''.price($sumpaid, 0, $outputlangs, 1, -1, -1, $conf->currency).''; print ''.$langs->trans("RemainderToPay").''.price($total - $sumpaid, 0, $outputlangs, 1, -1, -1, $conf->currency).''; print ''; @@ -239,28 +304,31 @@ if ($action == 'create') print ''; print ''.$langs->trans("Date").''; - $datepaid = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); - $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE) ? (empty($_POST["remonth"]) ?-1 : $datepaye) : 0; + if (empty($datepaid)) + if (empty($ts_temppaid)) $datepayment = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:dol_now(); + else $datepayment = $ts_temppaid; + else $datepayment = $datepaid; print $form->selectDate($datepayment, '', '', '', '', "add_payment", 1, 1); print ""; + print ''; print ''.$langs->trans("PaymentMode").''; - $form->select_types_paiements(isset($_POST["paymenttype"]) ? $_POST["paymenttype"] : $loan->paymenttype, "paymenttype"); + $form->select_types_paiements(GETPOSTISSET("paymenttype") ? GETPOST("paymenttype", 'alphanohtml') : $loan->fk_typepayment, "paymenttype"); print "\n"; print ''; print ''; print ''.$langs->trans('AccountToDebit').''; print ''; - $form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $loan->accountid, "accountid", 0, '', 1); // Show opend bank account list + $form->select_comptes(isset($_POST["accountid"])?$_POST["accountid"]:$loan->accountid, "accountid", 0, 'courant = '.Account::TYPE_CURRENT, 1); // Show opend bank account list print ''; // Number print ''.$langs->trans('Numero'); print ' ('.$langs->trans("ChequeOrTransferNumber").')'; print ''; - print ''."\n"; + print ''."\n"; print ''; print ''.$langs->trans("NotePrivate").''; @@ -290,9 +358,7 @@ if ($action == 'create') if ($loan->datestart > 0) { print ''.dol_print_date($loan->datestart, 'day').''; - } - else - { + } else { print '!!!'; } @@ -305,28 +371,25 @@ if ($action == 'create') print ''; if ($sumpaid < $loan->capital) { - print $langs->trans("LoanCapital").': '; + print $langs->trans("LoanCapital") .': '; } - else - { + else { print '-'; } print '
    '; if ($sumpaid < $loan->capital) { - print $langs->trans("Insurance").': '; + print $langs->trans("Insurance") .': '; } - else - { + else { print '-'; } print '
    '; if ($sumpaid < $loan->capital) { - print $langs->trans("Interest").': '; + print $langs->trans("Interest") .': '; } - else - { + else { print '-'; } print ""; diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index fb3cd86ebe3..55f715fb050 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -1,6 +1,7 @@ * Copyright (C) 2018 Alexandre Spangaro + * Copyright (C) 2020 Maxime DEMAREST * * 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 @@ -27,16 +28,102 @@ require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loanschedule.class.php'; +require_once DOL_DOCUMENT_ROOT.'/loan/class/paymentloan.class.php'; $loanid = GETPOST('loanid', 'int'); $action = GETPOST('action', 'aZ09'); -$object = new Loan($db); -$object->fetch($loanid); +// Security check +$socid = 0; +if (GETPOSTISSET('socid')) $socid = GETPOST('socid', 'int'); +if ($user->socid) $socid=$user->socid; +if (empty($user->rights->loan->calc)) accessforbidden(); // Load translation files required by the page $langs->loadLangs(array("compta", "bills", "loan")); +$object = new Loan($db); +$object->fetch($loanid); + +$echeances = new LoanSchedule($db); +$echeances->fetchAll($object->id); + +if ($object->paid > 0 && count($echeances->lines) == 0) $pay_without_schedule = 1; + +/* + * Actions + */ + +if ($action == 'createecheancier' && empty($pay_without_schedule)) { + $db->begin(); + $i = 1; + while ($i < $object->nbterm + 1) { + $date = GETPOST('hi_date'.$i, 'int'); + $mens = price2num(GETPOST('mens'.$i)); + $int = price2num(GETPOST('hi_interets'.$i)); + $insurance = price2num(GETPOST('hi_insurance'.$i)); + + $new_echeance = new LoanSchedule($db); + + $new_echeance->fk_loan = $object->id; + $new_echeance->datec = dol_now(); + $new_echeance->tms = dol_now(); + $new_echeance->datep = $date; + $new_echeance->amount_capital = $mens - $int; + $new_echeance->amount_insurance = $insurance; + $new_echeance->amount_interest = $int; + $new_echeance->fk_typepayment = 3; + $new_echeance->fk_bank = 0; + $new_echeance->fk_user_creat = $user->id; + $new_echeance->fk_user_modif = $user->id; + $result = $new_echeance->create($user); + if ($result < 0) { + setEventMessages($new_echeance->error, $echeance->errors, 'errors'); + $db->rollback(); + unset($echeances->lines); + break; + } + $echeances->lines[] = $new_echeance; + $i++; + } + var_dump($result); + if ($result > 0) $db->commit(); +} + +if ($action == 'updateecheancier' && empty($pay_without_schedule)) { + $db->begin(); + $i = 1; + while ($i < $object->nbterm + 1) { + $mens = price2num(GETPOST('mens'.$i)); + $int = price2num(GETPOST('hi_interets'.$i)); + $id = GETPOST('hi_rowid'.$i); + $insurance = price2num(GETPOST('hi_insurance'.$i)); + + $new_echeance = new LoanSchedule($db); + $new_echeance->fetch($id); + $new_echeance->tms = dol_now(); + $new_echeance->amount_capital = $mens - $int; + $new_echeance->amount_insurance = $insurance; + $new_echeance->amount_interest = $int; + $new_echeance->fk_user_modif = $user->id; + $result = $new_echeance->update($user, 0); + if ($result < 0) { + setEventMessages(null, $new_echeance->errors, 'errors'); + $db->rollback(); + $echeances->fetchAll($object->id); + break; + } + + $echeances->lines[$i-1] = $new_echeance; + $i++; + } + if ($result > 0) $db->commit(); +} + +/* + * View + */ + $title = $langs->trans("Loan").' - '.$langs->trans("Card"); $help_url = 'EN:Module_Loan|FR:Module_Emprunt'; llxHeader("", $title, $help_url); @@ -86,73 +173,17 @@ $morehtmlref .= '
    '; $morehtmlright = ''; -dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); - -if ($action == 'createecheancier') { - $i = 1; - while ($i < $object->nbterm + 1) { - $date = GETPOST('hi_date'.$i, 'int'); - $mens = GETPOST('mens'.$i); - $int = GETPOST('hi_interets'.$i); - $insurance = GETPOST('hi_insurance'.$i); - - $echeance = new LoanSchedule($db); - - $echeance->fk_loan = $object->id; - $echeance->datec = dol_now(); - $echeance->tms = dol_now(); - $echeance->datep = $date; - $echeance->amount_capital = $mens - $int; - $echeance->amount_insurance = $insurance; - $echeance->amount_interest = $int; - $echeance->fk_typepayment = 3; - $echeance->fk_bank = 0; - $echeance->fk_user_creat = $user->id; - $echeance->fk_user_modif = $user->id; - $result = $echeance->create($user); - if ($result < 0) { - setEventMessages($echeance->error, $echeance->errors, 'errors'); - } - $i++; - } -} - -if ($action == 'updateecheancier') { - $i = 1; - while ($i < $object->nbterm + 1) { - $mens = GETPOST('mens'.$i); - $int = GETPOST('hi_interets'.$i); - $id = GETPOST('hi_rowid'.$i); - $insurance = GETPOST('hi_insurance'.$i); - - $echeance = new LoanSchedule($db); - $echeance->fetch($id); - $echeance->tms = dol_now(); - $echeance->amount_capital = $mens - $int; - $echeance->amount_insurance = $insurance; - $echeance->amount_interest = $int; - $echeance->fk_user_modif = $user->id; - $result = $echeance->update($user, 0); - if ($result < 0) { - setEventMessages(null, $echeance->errors, 'errors'); - } - $i++; - } -} - -$echeance = new LoanSchedule($db); -$echeance->fetchAll($object->id); - +dol_banner_tab($object, 'loanid', $linkback, 1, 'rowid', 'ref', $morehtmlref, '', 0, '', $morehtmlright); ?> '.$langs->trans('CantUseScheduleWithLoanStartedToPaid').'
    '."\n"; print ''; print ''; print ''; -if (count($echeance->lines) > 0) +if (count($echeances->lines) > 0) { print ''; } else { @@ -193,7 +226,7 @@ print '
    '; print ''; print ''; $colspan = 6; -if (count($echeance->lines) > 0) $colspan++; +if (count($echeances->lines) > 0) $colspan++; print ''; @@ -209,10 +242,10 @@ print ''; -if (count($echeance->lines) > 0) print ''; +if (count($echeances->lines) > 0) print ''; print ''."\n"; -if ($object->nbterm > 0 && count($echeance->lines) == 0) +if ($object->nbterm > 0 && count($echeances->lines) == 0) { $i = 1; $capital = $object->capital; @@ -221,7 +254,7 @@ if ($object->nbterm > 0 && count($echeance->lines) == 0) $regulInsurance = price2num($object->insurance_amount - ($insurance * $object->nbterm)); while ($i < $object->nbterm + 1) { - $mens = price2num($echeance->calcMonthlyPayments($capital, $object->rate / 100, $object->nbterm - $i + 1), 'MT'); + $mens = price2num($echeances->calcMonthlyPayments($capital, $object->rate / 100, $object->nbterm - $i + 1), 'MT'); $int = ($capital * ($object->rate / 12)) / 100; $int = price2num($int, 'MT'); $insu = ($insurance + (($i == 1) ? $regulInsurance : 0)); @@ -237,8 +270,7 @@ if ($object->nbterm > 0 && count($echeance->lines) == 0) $i++; $capital = $cap_rest; } -} -elseif (count($echeance->lines) > 0) +} elseif (count($echeances->lines) > 0) { $i = 1; $capital = $object->capital; @@ -246,7 +278,7 @@ elseif (count($echeance->lines) > 0) $insurance = price2num($insurance, 'MT'); $regulInsurance = price2num($object->insurance_amount - ($insurance * $object->nbterm)); $printed = false; - foreach ($echeance->lines as $line) { + foreach ($echeances->lines as $line) { $mens = $line->amount_capital + $line->amount_interest; $int = $line->amount_interest; $insu = ($insurance + (($i == 1) ? $regulInsurance : 0)); @@ -257,7 +289,7 @@ elseif (count($echeance->lines) > 0) print ''; print ''; print ''; - if ($line->datep > dol_now() && empty($line->fk_bank)) { + if (empty($line->fk_bank)) { print ''; } else { print ''; @@ -265,10 +297,15 @@ elseif (count($echeance->lines) > 0) print ''; print ''; @@ -283,10 +320,9 @@ print ''; print '
    '; - -if (count($echeance->lines) == 0) $label = $langs->trans("Create"); +if (count($echeances->lines) == 0) $label = $langs->trans("Create"); else $label = $langs->trans("Save"); -print '
    '; +print '
    '; print ''; // End of page diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index 41a221a7e72..46e8d017eca 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -208,14 +208,10 @@ class MailmanSpip if ($result) { return 1; - } - else $this->error = $mydb->lasterror(); - } - else $this->error = 'Failed to connect to SPIP'; - } - else $this->error = 'BadSPIPConfiguration'; - } - else $this->error = 'SPIPNotEnabled'; + } else $this->error = $mydb->lasterror(); + } else $this->error = 'Failed to connect to SPIP'; + } else $this->error = 'BadSPIPConfiguration'; + } else $this->error = 'SPIPNotEnabled'; return 0; } @@ -249,14 +245,10 @@ class MailmanSpip if ($result) { return 1; - } - else $this->error = $mydb->lasterror(); - } - else $this->error = 'Failed to connect to SPIP'; - } - else $this->error = 'BadSPIPConfiguration'; - } - else $this->error = 'SPIPNotEnabled'; + } else $this->error = $mydb->lasterror(); + } else $this->error = 'Failed to connect to SPIP'; + } else $this->error = 'BadSPIPConfiguration'; + } else $this->error = 'SPIPNotEnabled'; return 0; } @@ -290,25 +282,18 @@ class MailmanSpip // nous avons au moins une reponse $mydb->close($result); return 1; - } - else - { + } else { // nous n'avons pas de reponse => n'existe pas $mydb->close($result); return 0; } - } - else - { + } else { $this->error = $mydb->lasterror(); $mydb->close(); } - } - else $this->error = 'Failed to connect to SPIP'; - } - else $this->error = 'BadSPIPConfiguration'; - } - else $this->error = 'SPIPNotEnabled'; + } else $this->error = 'Failed to connect to SPIP'; + } else $this->error = 'BadSPIPConfiguration'; + } else $this->error = 'SPIPNotEnabled'; return -1; } @@ -373,13 +358,10 @@ class MailmanSpip { $this->mladded_ko[$list] = $object->email; return -2; - } - else $this->mladded_ok[$list] = $object->email; + } else $this->mladded_ok[$list] = $object->email; } return count($lists); - } - else - { + } else { $this->error = "ADHERENT_MAILMAN_URL not defined"; return -1; } @@ -447,13 +429,10 @@ class MailmanSpip { $this->mlremoved_ko[$list] = $object->email; return -2; - } - else $this->mlremoved_ok[$list] = $object->email; + } else $this->mlremoved_ok[$list] = $object->email; } return count($lists); - } - else - { + } else { $this->error = "ADHERENT_MAILMAN_UNSUB_URL not defined"; return -1; } diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 553b5245939..e2c4b605dcc 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -49,14 +49,21 @@ if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) } /** - * Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). + * Security: WAF layer for SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). * - * @param string $val Value + * @param string $val Value brut found int $_GET, $_POST or PHP_SELF * @param string $type 1=GET, 0=POST, 2=PHP_SELF, 3=GET without sql reserved keywords (the less tolerant test) * @return int >0 if there is an injection, 0 if none */ function testSqlAndScriptInject($val, $type) { + $val = html_entity_decode($val, ENT_QUOTES); // So $inj += preg_match('/ondrag([a-z]*)\s*=/i', $val); // @@ -104,13 +115,13 @@ function testSqlAndScriptInject($val, $type) $inj += preg_match('/on(timeupdate|toggle|unload|volumechange|waiting)\s*=/i', $val); //$inj += preg_match('/on[A-Z][a-z]+\*=/', $val); // To lock event handlers onAbort(), ... $inj += preg_match('/:|:|:/i', $val); // refused string ':' encoded (no reason to have it encoded) to lock 'javascript:...' - //if ($type == 1) - //{ - $inj += preg_match('/javascript:/i', $val); - $inj += preg_match('/vbscript:/i', $val); - //} + $inj += preg_match('/javascript\s*:/i', $val); + $inj += preg_match('/vbscript\s*:/i', $val); // For XSS Injection done by adding javascript closing html tags like with onmousemove, etc... (closing a src or href tag with not cleaned param) - if ($type == 1) $inj += preg_match('/"/i', $val); // We refused " in GET parameters value + if ($type == 1) { + $val = str_replace('enclosure="', 'enclosure=X', $val); // We accept enclosure=" + $inj += preg_match('/"/i', $val); // We refused " in GET parameters value. + } if ($type == 2) $inj += preg_match('/[;"]/', $val); // PHP_SELF is a file system path. It can contains spaces. return $inj; } @@ -131,17 +142,21 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type) if (analyseVarsForSqlAndScriptsInjection($key, $type) && analyseVarsForSqlAndScriptsInjection($value, $type)) { //$var[$key] = $value; // This is useless - } - else - { - print 'Access refused by SQL/Script injection protection in main.inc.php (type='.htmlentities($type).' key='.htmlentities($key).' value='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]).')'; + } else { + // Get remote IP: PS: We do not use getRemoteIP(), function is not yet loaded and we need a value that can't be spoofed + $ip = (empty($_SERVER['REMOTE_ADDR']) ? 'unknown' : $_SERVER['REMOTE_ADDR']); + $errormessage = 'Access refused to '.$ip.' by SQL or Script injection protection in main.inc.php (type='.htmlentities($type).' key='.htmlentities($key).' value='.htmlentities($value).' page='.htmlentities($_SERVER["REQUEST_URI"]).')'; + print $errormessage; + // Add entry into error log + if (function_exists('error_log')) { + error_log($errormessage); + } + // TODO Add entry into security audit table exit; } } return true; - } - else - { + } else { return (testSqlAndScriptInject($var, $type) <= 0); } } @@ -163,7 +178,10 @@ if (!empty($_SERVER["PHP_SELF"])) // Sanity check on GET parameters if (!defined('NOSCANGETFORINJECTION') && !empty($_SERVER["QUERY_STRING"])) { - $morevaltochecklikeget = array($_SERVER["QUERY_STRING"]); + // Note: QUERY_STRING is url encoded, but $_GET and $_POST are already decoded + // Because the analyseVarsForSqlAndScriptsInjection is designed for already url decoded value, we must decode QUERY_STRING + // Another solution is to provide $_GET as parameter + $morevaltochecklikeget = array(urldecode($_SERVER["QUERY_STRING"])); analyseVarsForSqlAndScriptsInjection($morevaltochecklikeget, 1); } // Sanity check on POST @@ -203,25 +221,25 @@ if (!empty($_POST["DOL_AUTOSET_COOKIE"])) } -// Init session. Name of session is specific to Dolibarr instance. -// Note: the function dol_getprefix may have been redefined to return a different key to manage another area to protect. -$prefix = dol_getprefix(''); +// Init the 5 global objects, this include will make the 'new Xxx()' and set properties for: $conf, $db, $langs, $user, $mysoc +require_once 'master.inc.php'; +// Init session. Name of session is specific to Dolibarr instance. +// Must be done after the include of master.inc.php so $conf file is loaded and vars like $dolibarr_main_force_https are set. +// Note: the function dol_getprefix may have been redefined to return a different key to manage another area to protect. +$prefix = dol_getprefix(''); // This uses the $conf file $sessionname = 'DOLSESSID_'.$prefix; $sessiontimeout = 'DOLSESSTIMEOUT_'.$prefix; if (!empty($_COOKIE[$sessiontimeout])) ini_set('session.gc_maxlifetime', $_COOKIE[$sessiontimeout]); session_set_cookie_params(0, '/', null, (empty($dolibarr_main_force_https) ? false : true), true); // Add tag secure and httponly on session cookie (same as setting session.cookie_httponly into php.ini). Must be called before the session_start. session_name($sessionname); -// This create lock, released when session_write_close() or end of page. +// This create lock, released by session_write_close() or end of page. // We need this lock as long as we read/write $_SESSION ['vars']. We can remove lock when finished. if (!defined('NOSESSION')) { session_start(); } -// Init the 5 global objects, this include will make the 'new Xxx()' and set properties for: $conf, $db, $langs, $user, $mysoc -require_once 'master.inc.php'; - // Activate end of page function register_shutdown_function('dol_shutdown'); @@ -269,14 +287,11 @@ if (!empty($conf->file->main_force_https) && (empty($_SERVER["HTTPS"]) || $_SERV { $newurl = preg_replace('/^http:/i', 'https:', $_SERVER["SCRIPT_URI"]); } - } - else // Check HTTPS environment variable (Apache/mod_ssl only) - { + } else { + // Check HTTPS environment variable (Apache/mod_ssl only) $newurl = preg_replace('/^http:/i', 'https:', DOL_MAIN_URL_ROOT).$_SERVER["REQUEST_URI"]; } - } - else - { + } else { // Check HTTPS environment variable (Apache/mod_ssl only) $newurl = $conf->file->main_force_https.$_SERVER["REQUEST_URI"]; } @@ -287,9 +302,7 @@ if (!empty($conf->file->main_force_https) && (empty($_SERVER["HTTPS"]) || $_SERV dol_syslog("main.inc: dolibarr_main_force_https is on, we make a redirect to ".$newurl); header("Location: ".$newurl); exit; - } - else - { + } else { dol_syslog("main.inc: dolibarr_main_force_https is on but we failed to forge new https url so no redirect is done", LOG_WARNING); } } @@ -353,28 +366,48 @@ if (!defined('NOTOKENRENEWAL')) $_SESSION['newtoken'] = $token; } -//var_dump(GETPOST('token').' '.$_SESSION['token'].' - '.newToken().' '.$_SERVER['SCRIPT_FILENAME']); +//dol_syslog("aaaa - ".defined('NOCSRFCHECK')." - ".$dolibarr_nocsrfcheck." - ".$conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN." - ".$_SERVER['REQUEST_METHOD']." - ".GETPOST('token', 'alpha').' '.$_SESSION['token']); //$dolibarr_nocsrfcheck=1; // Check token -//var_dump((! defined('NOCSRFCHECK')).' '.empty($dolibarr_nocsrfcheck).' '.(! empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)).' '.$_SERVER['REQUEST_METHOD'].' '.(! GETPOSTISSET('token'))); if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN)) || defined('CSRFCHECK_WITH_TOKEN')) // Check validity of token, only if option MAIN_SECURITY_CSRF_WITH_TOKEN enabled or if constant CSRFCHECK_WITH_TOKEN is set { - if ($_SERVER['REQUEST_METHOD'] == 'POST' && !GETPOSTISSET('token')) // Note: offender can still send request by GET + // Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions) + if ($_SERVER['REQUEST_METHOD'] == 'POST' || + ((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) || + in_array(GETPOST('action', 'aZ09'), array('add', 'addtimespent', 'update', 'install', 'delete', 'deleteprof', 'deletepayment'))) { - dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided."); - print "Access by POST method refused by CSRF protection in main.inc.php. Token not provided.\n"; - print "If you access your server behind a proxy using url rewriting, you might check that all HTTP header is propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file or MAIN_SECURITY_CSRF_WITH_TOKEN to 0 into setup).\n"; - die; + if (!GETPOSTISSET('token')) { + if (GETPOST('uploadform', 'int')) { + dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused. File size too large."); + $langs->loadLangs(array("errors", "install")); + print $langs->trans("ErrorFileSizeTooLarge").' '; + print $langs->trans("ErrorGoBackAndCorrectParameters"); + die; + } else { + dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided."); + print "Access to this page this way (POST method or page with CSRFCHECK_WITH_TOKEN on or having a sensible value for action parameter) is refused by CSRF protection in main.inc.php. Token not provided.\n"; + print "If you access your server behind a proxy using url rewriting, you might check that all HTTP header is propagated (or add the line \$dolibarr_nocsrfcheck=1 into your conf.php file or MAIN_SECURITY_CSRF_WITH_TOKEN to 0 into setup).\n"; + die; + } + } } if (GETPOSTISSET('token') && GETPOST('token', 'alpha') != $_SESSION['token']) { dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused due to invalid token, so we disable POST and some GET parameters - referer=".$_SERVER['HTTP_REFERER'].", action=".GETPOST('action', 'aZ09').", _GET|POST['token']=".GETPOST('token', 'alpha').", _SESSION['token']=".$_SESSION['token'], LOG_WARNING); //print 'Unset POST by CSRF protection in main.inc.php.'; // Do not output anything because this create problems when using the BACK button on browsers. - if ($conf->global->MAIN_FEATURES_LEVEL > 1) setEventMessages('Unset POST by CSRF protection in main.inc.php (POST for this token was already done or was done by a not allowed web page with a wrong token).'."
    \n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings'); + setEventMessages('SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry', null, 'warnings'); + //if ($conf->global->MAIN_FEATURES_LEVEL >= 1) setEventMessages('Unset POST and GET params by CSRF protection in main.inc.php (Token provided was not generated by the previous page).'."
    \n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings'); + $savid = ((int) $_POST['id']); unset($_POST); + //unset($_POST['action']); unset($_POST['massaction']); + //unset($_POST['confirm']); unset($_POST['confirmmassaction']); unset($_GET['confirm']); + unset($_GET['action']); + unset($_GET['confirmmassaction']); + unset($_GET['massaction']); + $_POST['id'] = ((int) $savid); } } @@ -430,9 +463,7 @@ if (!defined('NOLOGIN')) if (defined('MAIN_AUTHENTICATION_MODE')) { $dolibarr_main_authentication = constant('MAIN_AUTHENTICATION_MODE'); - } - else - { + } else { // Authentication mode if (empty($dolibarr_main_authentication)) $dolibarr_main_authentication = 'http,dolibarr'; // Authentication mode: forceuser @@ -526,7 +557,7 @@ if (!defined('NOLOGIN')) $allowedmethodtopostusername = 2; if (defined('MAIN_AUTHENTICATION_POST_METHOD')) $allowedmethodtopostusername = constant('MAIN_AUTHENTICATION_POST_METHOD'); - $usertotest = (!empty($_COOKIE['login_dolibarr']) ? $_COOKIE['login_dolibarr'] : GETPOST("username", "alpha", $allowedmethodtopostusername)); + $usertotest = (!empty($_COOKIE['login_dolibarr']) ? preg_replace('/[^a-zA-Z0-9_\-]/', '', $_COOKIE['login_dolibarr']) : GETPOST("username", "alpha", $allowedmethodtopostusername)); $passwordtotest = GETPOST('password', 'none', $allowedmethodtopostusername); $entitytotest = (GETPOST('entity', 'int') ? GETPOST('entity', 'int') : (!empty($conf->entity) ? $conf->entity : 1)); @@ -551,6 +582,10 @@ if (!defined('NOLOGIN')) if ($test && $goontestloop && (GETPOST('actionlogin', 'aZ09') == 'login' || $dolibarr_main_authentication != 'dolibarr')) { $login = checkLoginPassEntity($usertotest, $passwordtotest, $entitytotest, $authmode); + if ($login === '--bad-login-validity--') { + $login = ''; + } + if ($login) { $dol_authmode = $conf->authmode; // This properties is defined only when logged, to say what mode was successfully used @@ -607,11 +642,16 @@ if (!defined('NOLOGIN')) // No data to test login, so we show the login page. dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." - action=".GETPOST('action', 'aZ09')." - actionlogin=".GETPOST('actionlogin', 'aZ09')." - showing the login form and exit"); if (defined('NOREDIRECTBYMAINTOLOGIN')) return 'ERROR_NOT_LOGGED'; - else dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); + else { + if ($_SERVER["HTTP_USER_AGENT"] == 'securitytest') { + http_response_code(401); // It makes easier to understand if session was broken during security tests + } + dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); + } exit; } - $resultFetchUser = $user->fetch('', $login, '', 1, ($entitytotest > 0 ? $entitytotest : -1)); + $resultFetchUser = $user->fetch('', $login, '', 1, ($entitytotest > 0 ? $entitytotest : -1)); // login was retreived previously when checking password. if ($resultFetchUser <= 0) { dol_syslog('User not found, connexion refused'); @@ -657,13 +697,11 @@ if (!defined('NOLOGIN')) exit; } else { // User is loaded, we may need to change language for him according to its choice - if (! empty($user->conf->MAIN_LANG_DEFAULT)) { + if (!empty($user->conf->MAIN_LANG_DEFAULT)) { $langs->setDefaultLang($user->conf->MAIN_LANG_DEFAULT); } } - } - else - { + } else { // We are already into an authenticated session $login = $_SESSION["dol_login"]; $entity = $_SESSION["dol_entity"]; @@ -713,9 +751,7 @@ if (!defined('NOLOGIN')) if (GETPOST('lang', 'aZ09')) $paramsurl[] = 'lang='.GETPOST('lang', 'aZ09'); header('Location: '.DOL_URL_ROOT.'/index.php'.(count($paramsurl) ? '?'.implode('&', $paramsurl) : '')); exit; - } - else - { + } else { // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('main')); @@ -817,9 +853,7 @@ if (!defined('NOLOGIN')) session_destroy(); dol_print_error($db, 'Error in some triggers USER_LOGIN or in some hooks afterLogin'); exit; - } - else - { + } else { $db->commit(); } @@ -872,13 +906,13 @@ if (GETPOST('theme', 'alpha')) } // Set javascript option -if (!GETPOST('nojs', 'int')) // If javascript was not disabled on URL -{ - if (!empty($user->conf->MAIN_DISABLE_JAVASCRIPT)) - { +if (GETPOST('nojs', 'int')) { // If javascript was not disabled on URL + $conf->use_javascript_ajax = 0; +} else { + if (!empty($user->conf->MAIN_DISABLE_JAVASCRIPT)) { $conf->use_javascript_ajax = !$user->conf->MAIN_DISABLE_JAVASCRIPT; } -} else $conf->use_javascript_ajax = 0; +} // Set MAIN_OPTIMIZEFORTEXTBROWSER for user (must be after login part) if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && !empty($user->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) { @@ -948,8 +982,7 @@ if (!defined('NOLOGIN')) $user->getrights(); } - -dol_syslog("--- Access to ".$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09')); +dol_syslog("--- Access to ".$_SERVER["REQUEST_METHOD"].' '.$_SERVER["PHP_SELF"].' - action='.GETPOST('action', 'aZ09').', massaction='.GETPOST('massaction', 'aZ09')); //Another call for easy debugg //dol_syslog("Access to ".$_SERVER["PHP_SELF"].' GET='.join(',',array_keys($_GET)).'->'.join(',',$_GET).' POST:'.join(',',array_keys($_POST)).'->'.join(',',$_POST)); @@ -983,9 +1016,7 @@ if (empty($conf->browser->firefox)) define('ROWS_7', 7); define('ROWS_8', 8); define('ROWS_9', 9); -} -else -{ +} else { define('ROWS_1', 0); define('ROWS_2', 1); define('ROWS_3', 2); @@ -1005,9 +1036,8 @@ if (!defined('NOREQUIREMENU')) if (empty($user->socid)) // If internal user or not defined { $conf->standard_menu = (empty($conf->global->MAIN_MENU_STANDARD_FORCED) ? (empty($conf->global->MAIN_MENU_STANDARD) ? 'eldy_menu.php' : $conf->global->MAIN_MENU_STANDARD) : $conf->global->MAIN_MENU_STANDARD_FORCED); - } - else // If external user - { + } else { + // If external user $conf->standard_menu = (empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED) ? (empty($conf->global->MAIN_MENUFRONT_STANDARD) ? 'eldy_menu.php' : $conf->global->MAIN_MENUFRONT_STANDARD) : $conf->global->MAIN_MENUFRONT_STANDARD_FORCED); } @@ -1150,8 +1180,7 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0) // default-src http: https: 'unsafe-eval' 'unsafe-inline'; object-src 'none' header("Content-Security-Policy: ".$contentsecuritypolicy); } - } - elseif (constant('FORCECSP')) + } elseif (constant('FORCECSP')) { header("Content-Security-Policy: ".constant('FORCECSP')); } @@ -1259,6 +1288,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (GETPOSTISSET('dol_optimize_smallscreen')) { $themeparam .= '&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen', 'int'); } if (GETPOSTISSET('dol_no_mouse_hover')) { $themeparam .= '&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover', 'int'); } if (GETPOSTISSET('dol_use_jmobile')) { $themeparam .= '&dol_use_jmobile='.GETPOST('dol_use_jmobile', 'int'); $conf->dol_use_jmobile = GETPOST('dol_use_jmobile', 'int'); } + if (GETPOSTISSET('THEME_DARKMODEENABLED')) { $themeparam .= '&THEME_DARKMODEENABLED='.GETPOST('THEME_DARKMODEENABLED', 'int'); } if (GETPOSTISSET('THEME_SATURATE_RATIO')) { $themeparam .= '&THEME_SATURATE_RATIO='.GETPOST('THEME_SATURATE_RATIO', 'int'); } if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) @@ -1330,9 +1360,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (preg_match('/^(http|\/\/)/i', $cssfile)) { $urltofile = $cssfile; - } - else - { + } else { $urltofile = dol_buildpath($cssfile, 1); } print ''."\n".''."\n"; if (!defined('DISABLE_JQUERY_TABLEDND')) print ''."\n"; // jQuery jnotify - if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && !defined('DISABLE_JQUERY_JNOTIFY')) - { + if (empty($conf->global->MAIN_DISABLE_JQUERY_JNOTIFY) && !defined('DISABLE_JQUERY_JNOTIFY')) { print ''."\n"; } - // Flot - if (empty($conf->global->MAIN_JS_GRAPH) || $conf->global->MAIN_JS_GRAPH == 'jflot') - { - if (empty($conf->global->MAIN_DISABLE_JQUERY_FLOT) && !defined('DISABLE_JQUERY_FLOT')) - { - if (constant('JS_JQUERY_FLOT')) - { - print ''."\n"; - print ''."\n"; - print ''."\n"; - } - else - { - print ''."\n"; - print ''."\n"; - print ''."\n"; - /* Test for jflot 4.2 -> not better than current - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - */ - } - } - } // Chart - if ($conf->global->MAIN_JS_GRAPH == 'chart') - { + if (empty($conf->global->MAIN_JS_GRAPH) || $conf->global->MAIN_JS_GRAPH == 'chart') { print ''."\n"; } // jQuery jeditable for Edit In Place features - if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !defined('DISABLE_JQUERY_JEDITABLE')) - { + if (!empty($conf->global->MAIN_USE_JQUERY_JEDITABLE) && !defined('DISABLE_JQUERY_JEDITABLE')) { print ''."\n"; print ''."\n"; print ''."\n"; @@ -1419,13 +1414,12 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr print ''."\n"; } // jQuery Timepicker - if (!empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER')) - { + if (!empty($conf->global->MAIN_USE_JQUERY_TIMEPICKER) || defined('REQUIRE_JQUERY_TIMEPICKER')) { print ''."\n"; print ''."\n"; } - if (!defined('DISABLE_SELECT2') && (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) // jQuery plugin "mutiselect", "multiple-select", "select2", ... - { + if (!defined('DISABLE_SELECT2') && (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT'))) { + // jQuery plugin "mutiselect", "multiple-select", "select2", ... $tmpplugin = empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) ?constant('REQUIRE_JQUERY_MULTISELECT') : $conf->global->MAIN_USE_JQUERY_MULTISELECT; print ''."\n"; // We include full because we need the support of containerCssClass } @@ -1435,16 +1429,15 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr } } - if (!$disablejs && !empty($conf->use_javascript_ajax)) - { + if (!$disablejs && !empty($conf->use_javascript_ajax)) { // CKEditor if ((!empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor') && !defined('DISABLE_CKEDITOR')) || defined('FORCE_CKEDITOR')) { print ''."\n"; $pathckeditor = DOL_URL_ROOT.'/includes/ckeditor/ckeditor/'; $jsckeditor = 'ckeditor.js'; - if (constant('JS_CKEDITOR')) // To use external ckeditor 4 js lib - { + if (constant('JS_CKEDITOR')) { + // To use external ckeditor 4 js lib $pathckeditor = constant('JS_CKEDITOR'); } print ''."\n"; @@ -1506,9 +1497,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (preg_match('/^(http|\/\/)/i', $jsfile)) { print ''."\n"; - } - else - { + } else { print ''."\n"; } } @@ -1589,10 +1578,8 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead if (preg_match('/\d\.\d/', $appli)) { if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core - } - else $appli .= " ".DOL_VERSION; - } - else $appli .= " ".DOL_VERSION; + } else $appli .= " ".DOL_VERSION; + } else $appli .= " ".DOL_VERSION; if (!empty($conf->global->MAIN_FEATURES_LEVEL)) $appli .= "
    ".$langs->trans("LevelOfFeature").': '.$conf->global->MAIN_FEATURES_LEVEL; @@ -1607,9 +1594,7 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $logouttext .= ''; $logouttext .= img_picto($langs->trans('Logout'), 'sign-out', '', false, 0, 0, '', 'atoplogin'); $logouttext .= ''; - } - else - { + } else { $logouthtmltext .= $langs->trans("NoLogoutProcessWithAuthMode", $_SESSION["dol_authmode"]); $logouttext .= img_picto($langs->trans('Logout'), 'sign-out', '', false, 0, 0, '', 'atoplogin opacitymedium'); } @@ -1626,11 +1611,10 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead { if ($result == 0) $toprightmenu .= $hookmanager->resPrint; // add - else + else { $toprightmenu = $hookmanager->resPrint; // replace - } - else - { + } + } else { $toprightmenu .= $result; // For backward compatibility } @@ -1725,6 +1709,11 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead $toprightmenu .= top_menu_search(); } + if (!empty($conf->global->MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)) { + // Add search dropdown + $toprightmenu .= top_menu_quickadd(); + } + // Add bookmark dropdown $toprightmenu .= top_menu_bookmark(); @@ -1768,8 +1757,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') { $userImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'photouserphoto userphoto', 'small', 0, 1); $userDropDownImage = Form::showphoto('userphoto', $user, 0, 0, 0, 'dropdown-user-image', 'small', 0, 1); - } - else { + } else { $nophoto = '/public/theme/common/user_anonymous.png'; if ($user->gender == 'man') $nophoto = '/public/theme/common/user_man.png'; if ($user->gender == 'woman') $nophoto = '/public/theme/common/user_woman.png'; @@ -1822,8 +1810,7 @@ function top_menu_user($hideloginname = 0, $urllogout = '') { if ($result == 0) { $dropdownBody .= $hookmanager->resPrint; // add - } - else { + } else { $dropdownBody = $hookmanager->resPrint; // replace } } @@ -1849,10 +1836,8 @@ function top_menu_user($hideloginname = 0, $urllogout = '') if (preg_match('/\d\.\d/', $appli)) { if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core - } - else $appli .= " ".DOL_VERSION; - } - else $appli .= " ".DOL_VERSION; + } else $appli .= " ".DOL_VERSION; + } else $appli .= " ".DOL_VERSION; if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $btnUser = ' @@ -1870,7 +1855,8 @@ function top_menu_user($hideloginname = 0, $urllogout = '') if ($user->datepreviouslogin) { $btnUser .= ' '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser').'
    '; } - $btnUser .= ' '.$langs->trans("Version").' '.$appli.' + //$btnUser .= ' '.$langs->trans("Version").' '.$appli.''; + $btnUser .= '

    @@ -1937,6 +1923,224 @@ function top_menu_user($hideloginname = 0, $urllogout = '') return $btnUser; } +/** + * Build the tooltip on top menu quick add + * + * @return string HTML content + */ +function top_menu_quickadd() +{ + global $langs, $conf, $db, $hookmanager, $user; + global $menumanager; + $html = ''; + // Define $dropDownQuickAddHtml + $dropDownQuickAddHtml = ''; + + $dropDownQuickAddHtml .= ''; + + $html .= ' + '; + $html .= ' + + + '; + return $html; +} /** * Build the tooltip on top menu bookmark @@ -2243,10 +2447,8 @@ function left_menu($menu_array_before, $helppagename = '', $notused = '', $menu_ if (preg_match('/\d\.\d/', $appli)) { if (!preg_match('/'.preg_quote(DOL_VERSION).'/', $appli)) $appli .= " (".DOL_VERSION.")"; // If new title contains a version that is different than core - } - else $appli .= " ".DOL_VERSION; - } - else $appli .= " ".DOL_VERSION; + } else $appli .= " ".DOL_VERSION; + } else $appli .= " ".DOL_VERSION; print '
    '; print $langs->trans("FinancialCommitment"); print ''.$langs->trans("CapitalRemain"); print '
    ('.price($object->capital, 0, '', 1, -1, -1, $conf->currency).')'; print ''; print '
    '.$langs->trans('DoPayment').''.$langs->trans('DoPayment').'
    '.dol_print_date($line->datep, 'day').''.price($insu, 0, '', 1, -1, -1, $conf->currency).''.price($int, 0, '', 1, -1, -1, $conf->currency).''.price($mens, 0, '', 1, -1, -1, $conf->currency).''.price($cap_rest, 0, '', 1, -1, -1, $conf->currency).''; - if (!empty($line->fk_bank)) print $langs->trans('Paid'); + if (!empty($line->fk_bank)) + { + print $langs->trans('Paid'); + if (!empty($line->fk_payment_loan)) + print ' ('.img_object($langs->trans("Payment"), "payment").' '.$line->fk_payment_loan.')'; + } elseif (!$printed) { - print ''.$langs->trans('DoPayment').''; + print ''.$langs->trans('DoPayment').''; $printed = true; } print '
    '."\n"; print ''; print ''."\n"; print ''."\n"; print ''."\n"; @@ -2401,9 +2603,7 @@ function getHelpParamFor($helppagename, $langs) $helpbaseurl = '%s'; $helppage = $helppagename; $mode = 'local'; - } - else - { + } else { // If WIKI URL $reg = array(); if (preg_match('/^es/i', $langs->defaultlang)) @@ -2541,10 +2741,8 @@ if (!function_exists("llxFooter")) { $title = img_warning().' '.$langs->trans('CoreErrorTitle'); print ajax_dialog($title, $langs->trans('CoreErrorMessage')); - } - // html version - else - { + } else { + // html version $msg = img_warning().' '.$langs->trans('CoreErrorMessage'); print '
    '.$msg.'
    '; } @@ -2624,8 +2822,7 @@ if (!function_exists("llxFooter")) // No ping done if we are into an alpha version if (strpos('alpha', DOL_VERSION) > 0 && !$forceping) { print "\n\n"; - } - elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) // Cookie is set when we uncheck the checkbox in the installation wizard. + } elseif (empty($_COOKIE['DOLINSTALLNOPING_'.$hash_unique_id]) || $forceping) // Cookie is set when we uncheck the checkbox in the installation wizard. { // MAIN_LAST_PING_KO_DATE // Disable ping if MAIN_LAST_PING_KO_DATE is set and is recent @@ -2686,9 +2883,7 @@ if (!function_exists("llxFooter")) \n"; include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php index 5b6cd01ba97..cf2cde3e19d 100644 --- a/htdocs/margin/admin/margin.php +++ b/htdocs/margin/admin/margin.php @@ -33,7 +33,7 @@ $langs->loadLangs(array("admin", "bills", "margins", "stocks")); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); /* @@ -47,9 +47,7 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -61,9 +59,7 @@ if (preg_match('/del_([a-z0-9_\-]+)/i', $action, $reg)) { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -73,9 +69,7 @@ if ($action == 'remises') if (dolibarr_set_const($db, 'MARGIN_METHODE_FOR_DISCOUNT', $_POST['MARGIN_METHODE_FOR_DISCOUNT'], 'chaine', 0, '', $conf->entity) > 0) { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); - } - else - { + } else { dol_print_error($db); } } @@ -85,9 +79,7 @@ if ($action == 'typemarges') if (dolibarr_set_const($db, 'MARGIN_TYPE', $_POST['MARGIN_TYPE'], 'chaine', 0, '', $conf->entity) > 0) { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); - } - else - { + } else { dol_print_error($db); } } @@ -97,9 +89,7 @@ if ($action == 'contact') if (dolibarr_set_const($db, 'AGENT_CONTACT_TYPE', $_POST['AGENT_CONTACT_TYPE'], 'chaine', 0, '', $conf->entity) > 0) { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); - } - else - { + } else { dol_print_error($db); } } @@ -166,16 +156,12 @@ print '
    '; @@ -189,15 +175,11 @@ print ''; diff --git a/htdocs/margin/agentMargins.php b/htdocs/margin/agentMargins.php index cf1d70db91a..7e15b94aede 100644 --- a/htdocs/margin/agentMargins.php +++ b/htdocs/margin/agentMargins.php @@ -36,8 +36,8 @@ $mesg = ''; // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -48,8 +48,7 @@ if (!$sortfield) { if ($agentid > 0) $sortfield = "s.nom"; - else - $sortfield = "u.lastname"; + else $sortfield = "u.lastname"; } $startdate = $enddate = ''; @@ -156,16 +155,14 @@ $sql .= " AND sc.fk_soc = f.fk_soc"; $sql .= " AND (d.product_type = 0 OR d.product_type = 1)"; if (!empty($conf->global->AGENT_CONTACT_TYPE)) $sql .= " AND ((e.fk_socpeople IS NULL AND sc.fk_user = u.rowid) OR (e.fk_socpeople IS NOT NULL AND e.fk_socpeople = u.rowid))"; -else - $sql .= " AND sc.fk_user = u.rowid"; +else $sql .= " AND sc.fk_user = u.rowid"; $sql .= " AND f.fk_statut NOT IN (".implode(', ', $invoice_status_except_list).")"; $sql .= ' AND s.entity IN ('.getEntity('societe').')'; $sql .= " AND d.fk_facture = f.rowid"; if ($agentid > 0) { if (!empty($conf->global->AGENT_CONTACT_TYPE)) $sql .= " AND ((e.fk_socpeople IS NULL AND sc.fk_user = ".$agentid.") OR (e.fk_socpeople IS NOT NULL AND e.fk_socpeople = ".$agentid."))"; - else - $sql .= " AND sc.fk_user = ".$agentid; + else $sql .= " AND sc.fk_user = ".$agentid; } if (!empty($startdate)) $sql .= " AND f.datef >= '".$db->idate($startdate)."'"; @@ -205,7 +202,7 @@ if ($result) if ($conf->global->MARGIN_TYPE == "1") $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + else // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; $moreforfilter = ''; @@ -217,8 +214,7 @@ if ($result) print ''; if ($agentid > 0) print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder); - else - print_liste_field_titre("SalesRepresentative", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder); + else print_liste_field_titre("SalesRepresentative", $_SERVER["PHP_SELF"], "u.lastname", "", $param, '', $sortfield, $sortorder); print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", $param, '', $sortfield, $sortorder, 'right '); @@ -307,9 +303,7 @@ if ($result) } print "
    '; - if ($conf->global->MAIN_SHOW_LOGO && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && !empty($conf->global->MAIN_INFO_SOCIETE_LOGO)) + if ($conf->global->MAIN_SHOW_LOGO && empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) && !empty($conf->global->MAIN_INFO_SOCIETE_LOGO)) { print ''; + } print '
    '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_NOM).'
    '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ADDRESS).'
    '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_ZIP).' '.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_TOWN).'
    '; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARGIN_RATES'); -} -else -{ +} else { if (empty($conf->global->DISPLAY_MARGIN_RATES)) { - print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"), 'on').''; + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'on').''; } } print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('DISPLAY_MARK_RATES'); -} -else -{ +} else { if (empty($conf->global->DISPLAY_MARK_RATES)) { print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"), 'on').''; } } @@ -212,16 +194,12 @@ print ''; if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff('ForceBuyingPriceIfNull'); -} -else -{ +} else { if (empty($conf->global->ForceBuyingPriceIfNull)) { - print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"), 'on').''; + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'on').''; } } print '
    "; print '
    '; -} -else -{ +} else { dol_print_error($db); } $db->free($result); diff --git a/htdocs/margin/checkMargins.php b/htdocs/margin/checkMargins.php index 337791238ce..60052294baa 100644 --- a/htdocs/margin/checkMargins.php +++ b/htdocs/margin/checkMargins.php @@ -41,8 +41,8 @@ $optioncss = GETPOST('optioncss', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -222,7 +222,7 @@ if ($result) { if ($conf->global->MARGIN_TYPE == "1") $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + else // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; $moreforfilter = ''; diff --git a/htdocs/margin/customerMargins.php b/htdocs/margin/customerMargins.php index 3cdd9c3c650..a566c7bd620 100644 --- a/htdocs/margin/customerMargins.php +++ b/htdocs/margin/customerMargins.php @@ -45,8 +45,8 @@ $mesg = ''; // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -108,8 +108,7 @@ if ($socid > 0) { if (!$sortorder) $sortorder = "DESC"; if (!$sortfield) $sortfield = "f.datef"; } -} -else { +} else { print ''.$langs->trans('ThirdPartyName').''; print ''; print $form->select_company(null, 'socid', '(client=1 OR client=3)', 1, 0, 0); @@ -125,9 +124,7 @@ if (!$sortfield) { $sortfield = "f.datef"; $sortorder = "DESC"; - } - else - { + } else { $sortfield = "s.nom"; $sortorder = "ASC"; } @@ -255,7 +252,7 @@ if ($result) if ($conf->global->MARGIN_TYPE == "1") $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + else // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; $moreforfilter = ''; @@ -268,9 +265,7 @@ if ($result) if (!empty($client)) { print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&socid=".$socid, '', $sortfield, $sortorder); print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&socid=".$socid, 'align="center"', $sortfield, $sortorder); - } - else - print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "s.nom", "", "&socid=".$socid, '', $sortfield, $sortorder); + } else print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "s.nom", "", "&socid=".$socid, '', $sortfield, $sortorder); print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&socid=".$socid, 'align="right"', $sortfield, $sortorder); print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&socid=".$socid, 'align="right"', $sortfield, $sortorder); print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&socid=".$socid, 'align="right"', $sortfield, $sortorder); @@ -297,9 +292,7 @@ if ($result) { $marginRate = ($pa != 0) ?-1 * (100 * $marge / $pa) : ''; $markRate = ($pv != 0) ?-1 * (100 * $marge / $pv) : ''; - } - else - { + } else { $marginRate = ($pa != 0) ? (100 * $marge / $pa) : ''; $markRate = ($pv != 0) ? (100 * $marge / $pv) : ''; } @@ -313,8 +306,7 @@ if ($result) print "\n"; print ""; print dol_print_date($db->jdate($objp->datef), 'day').""; - } - else { + } else { $companystatic->id = $objp->socid; $companystatic->name = $objp->name; $companystatic->client = $objp->client; @@ -353,8 +345,7 @@ if ($result) print ''; if ($client) print ''; - else - print ''; + else print ''; print $langs->trans('TotalMargin').""; print "".price($cumul_vente, null, null, null, null, $rounding)."\n"; print "".price($cumul_achat, null, null, null, null, $rounding)."\n"; @@ -367,9 +358,7 @@ if ($result) print ""; print '
  • '; -} -else -{ +} else { dol_print_error($db); } $db->free($result); diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php index 1f1d6def849..6161ba2b6e4 100644 --- a/htdocs/margin/lib/margins.lib.php +++ b/htdocs/margin/lib/margins.lib.php @@ -42,11 +42,11 @@ function marges_admin_prepare_head() // Show more tabs from modules // Entries must be declared in modules descriptor with line - // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab - // $this->tabs = array('entity:-tabname); to remove a tab - complete_head_from_modules($conf, $langs, '', $head, $h, 'margesadmin'); + // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab + // $this->tabs = array('entity:-tabname); to remove a tab + complete_head_from_modules($conf, $langs, null, $head, $h, 'margesadmin'); - complete_head_from_modules($conf, $langs, '', $head, $h, 'margesadmin', 'remove'); + complete_head_from_modules($conf, $langs, null, $head, $h, 'margesadmin', 'remove'); return $head; } @@ -127,14 +127,10 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta if ($product->fetch_product_fournisseur_price($fk_pa)) { $paht_ret = $product->fourn_unitprice * (1 - $product->fourn_remise_percent / 100); - } - else - { + } else { $paht_ret = $paht; } - } - else - { + } else { $paht_ret = $paht; } @@ -147,8 +143,7 @@ function getMarginInfos($pvht, $remise_percent, $tva_tx, $localtax1_tx, $localta // calcul marge if ($pu_ht_remise < 0) $marge = -1 * (abs($pu_ht_remise) - $paht_ret); - else - $marge = $pu_ht_remise - $paht_ret; + else $marge = $pu_ht_remise - $paht_ret; // calcul taux marge if ($paht_ret != 0) diff --git a/htdocs/margin/productMargins.php b/htdocs/margin/productMargins.php index d4df22475d4..e390be68068 100644 --- a/htdocs/margin/productMargins.php +++ b/htdocs/margin/productMargins.php @@ -1,6 +1,7 @@ * Copyright (C) 2014 Ferran Marcet + * Copyright (C) 2020 Alexandre Spangaro * * 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 @@ -33,7 +34,7 @@ $langs->loadLangs(array('companies', 'bills', 'products', 'margins')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $TSelectedCats = GETPOST('categories', 'array'); @@ -48,8 +49,8 @@ $mesg = ''; // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $offset = $limit * $page; @@ -61,9 +62,7 @@ if (!$sortfield) { $sortfield = "f.datef"; $sortorder = "DESC"; - } - else - { + } else { $sortfield = "p.ref"; $sortorder = "ASC"; } @@ -113,8 +112,7 @@ if ($id > 0) { if (!$sortorder) $sortorder = "DESC"; if (!$sortfield) $sortfield = "f.datef"; -} -else { +} else { print ''.$langs->trans('ChooseProduct/Service').''; print ''; $form->select_produits('', 'id', '', 20, 0, 1, 2, '', 1, array(), 0, 'All'); @@ -183,6 +181,7 @@ if ($id > 0) $sql .= " d.fk_product,"; if ($id > 0) $sql .= " f.rowid as facid, f.ref, f.total as total_ht, f.datef, f.paye, f.fk_statut as statut,"; $sql .= " SUM(d.total_ht) as selling_price,"; // Note: qty and buy_price_ht is always positive (if not your database may be corrupted, you can update this) +$sql .= " SUM(d.qty) as product_qty,"; $sql .= " SUM(".$db->ifsql('d.total_ht < 0', 'd.qty * d.buy_price_ht * -1 * (d.situation_percent / 100)', 'd.qty * d.buy_price_ht * (d.situation_percent / 100)').") as buying_price,"; $sql .= " SUM(".$db->ifsql('d.total_ht < 0', '-1 * (abs(d.total_ht) - (d.buy_price_ht * d.qty * (d.situation_percent / 100)))', 'd.total_ht - (d.buy_price_ht * d.qty * (d.situation_percent / 100))').") as marge"; $sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; @@ -226,7 +225,7 @@ if ($result) //var_dump($conf->global->MARGIN_TYPE); if ($conf->global->MARGIN_TYPE == "1") $labelcostprice = 'BuyingPrice'; - else // value is 'costprice' or 'pmp' + else // value is 'costprice' or 'pmp' $labelcostprice = 'CostPrice'; $moreforfilter = ''; @@ -238,29 +237,30 @@ if ($result) print ''; if ($id > 0) { print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", "&id=".$id, '', $sortfield, $sortorder); - print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&id=".$id, 'align="center"', $sortfield, $sortorder); - } - else - { + print_liste_field_titre("DateInvoice", $_SERVER["PHP_SELF"], "f.datef", "", "&id=".$id, '', $sortfield, $sortorder, 'center '); + } else { print_liste_field_titre("ProductService", $_SERVER["PHP_SELF"], "p.ref", "", "&id=".$id, '', $sortfield, $sortorder); } - print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); - print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "product_qty", "", "&id=".$id, '', $sortfield, $sortorder, 'center '); + print_liste_field_titre("SellingPrice", $_SERVER["PHP_SELF"], "selling_price", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre($labelcostprice, $_SERVER["PHP_SELF"], "buying_price", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); + print_liste_field_titre("Margin", $_SERVER["PHP_SELF"], "marge", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); if (!empty($conf->global->DISPLAY_MARGIN_RATES)) - print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("MarginRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); if (!empty($conf->global->DISPLAY_MARK_RATES)) - print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, 'align="right"', $sortfield, $sortorder); + print_liste_field_titre("MarkRate", $_SERVER["PHP_SELF"], "", "", "&id=".$id, '', $sortfield, $sortorder, 'right '); print "\n"; $cumul_achat = 0; $cumul_vente = 0; + $cumul_qty = 0; if ($num > 0) { while ($i < $num /*&& $i < $conf->liste_limit*/) { $objp = $db->fetch_object($result); + $qty = $objp->product_qty; $pa = $objp->buying_price; $pv = $objp->selling_price; $marge = $objp->marge; @@ -269,9 +269,7 @@ if ($result) { $marginRate = ($pa != 0) ?-1 * (100 * $marge / $pa) : ''; $markRate = ($pv != 0) ?-1 * (100 * $marge / $pv) : ''; - } - else - { + } else { $marginRate = ($pa != 0) ? (100 * $marge / $pa) : ''; $markRate = ($pv != 0) ? (100 * $marge / $pv) : ''; } @@ -285,8 +283,7 @@ if ($result) print "\n"; print ""; print dol_print_date($db->jdate($objp->datef), 'day').""; - } - else { + } else { print ''; if ($objp->rowid > 0) { @@ -297,17 +294,16 @@ if ($result) $product_static->entity = $objp->pentity; $text = $product_static->getNomUrl(1); print $text .= ' - '.$objp->label; - } - else - { + } else { print img_object('', 'product').' '.$langs->trans("NotPredefinedProducts"); } print "\n"; //print "".$product_static->getNomUrl(1)."\n"; } - print "".price(price2num($pv, 'MT'))."\n"; - print "".price(price2num($pa, 'MT'))."\n"; - print "".price(price2num($marge, 'MT'))."\n"; + print "".$qty."\n"; + print "".price(price2num($pv, 'MT'))."\n"; + print "".price(price2num($pa, 'MT'))."\n"; + print "".price(price2num($marge, 'MT'))."\n"; if (!empty($conf->global->DISPLAY_MARGIN_RATES)) print "".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."\n"; if (!empty($conf->global->DISPLAY_MARK_RATES)) @@ -317,6 +313,7 @@ if ($result) $i++; $cumul_achat += $objp->buying_price; $cumul_vente += $objp->selling_price; + $cumul_qty += $objp->product_qty; } } @@ -330,12 +327,12 @@ if ($result) print ''; if ($id > 0) print ''; - else - print ''; + else print ''; print $langs->trans('TotalMargin').""; - print "".price(price2num($cumul_vente, 'MT'))."\n"; - print "".price(price2num($cumul_achat, 'MT'))."\n"; - print "".price(price2num($totalMargin, 'MT'))."\n"; + print "".$cumul_qty.""; + print "".price(price2num($cumul_vente, 'MT'))."\n"; + print "".price(price2num($cumul_achat, 'MT'))."\n"; + print "".price(price2num($totalMargin, 'MT'))."\n"; if (!empty($conf->global->DISPLAY_MARGIN_RATES)) print "".(($marginRate === '') ? 'n/a' : price(price2num($marginRate, 'MT'))."%")."\n"; if (!empty($conf->global->DISPLAY_MARK_RATES)) @@ -344,9 +341,7 @@ if ($result) print ""; print '
    '; -} -else -{ +} else { dol_print_error($db); } $db->free($result); diff --git a/htdocs/margin/tabs/productMargins.php b/htdocs/margin/tabs/productMargins.php index e68a042ace2..d5069249cbe 100644 --- a/htdocs/margin/tabs/productMargins.php +++ b/htdocs/margin/tabs/productMargins.php @@ -30,7 +30,7 @@ $langs->loadLangs(array("companies", "bills", "products", "margins")); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -229,9 +229,7 @@ if ($id > 0 || !empty($ref)) { $marginRate = ($cumul_achat != 0) ?-1 * (100 * $totalMargin / $cumul_achat) : ''; $markRate = ($cumul_vente != 0) ?-1 * (100 * $totalMargin / $cumul_vente) : ''; - } - else - { + } else { $marginRate = ($cumul_achat != 0) ? (100 * $totalMargin / $cumul_achat) : ''; $markRate = ($cumul_vente != 0) ? (100 * $totalMargin / $cumul_vente) : ''; } diff --git a/htdocs/margin/tabs/thirdpartyMargins.php b/htdocs/margin/tabs/thirdpartyMargins.php index ecb8a3ce764..c9711bd99ef 100644 --- a/htdocs/margin/tabs/thirdpartyMargins.php +++ b/htdocs/margin/tabs/thirdpartyMargins.php @@ -235,9 +235,7 @@ if ($socid > 0) { $marginRate = ($cumul_achat != 0) ?-1 * (100 * $totalMargin / $cumul_achat) : ''; $markRate = ($cumul_vente != 0) ?-1 * (100 * $totalMargin / $cumul_vente) : ''; - } - else - { + } else { $marginRate = ($cumul_achat != 0) ? (100 * $totalMargin / $cumul_achat) : ''; $markRate = ($cumul_vente != 0) ? (100 * $totalMargin / $cumul_vente) : ''; } @@ -254,9 +252,7 @@ if ($socid > 0) print "".(($markRate === '') ? 'n/a' : price(price2num($markRate, 'MT'))."%")."\n"; print ' '; print "\n"; - } - else - { + } else { dol_print_error($db); } print ""; @@ -264,9 +260,7 @@ if ($socid > 0) print '
    '; $db->free($result); -} -else -{ +} else { dol_print_error('', 'Parameter socid not defined'); } diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php index 0db06b121fd..4f56652b3da 100644 --- a/htdocs/master.inc.php +++ b/htdocs/master.inc.php @@ -60,14 +60,14 @@ if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type = constant('TEST_DB_FORCE_TYP // Set properties specific to conf file $conf->file->main_limit_users = $dolibarr_main_limit_users; -$conf->file->mailing_limit_sendbyweb = $dolibarr_mailing_limit_sendbyweb; -$conf->file->mailing_limit_sendbycli = $dolibarr_mailing_limit_sendbycli; +$conf->file->mailing_limit_sendbyweb = $dolibarr_mailing_limit_sendbyweb; +$conf->file->mailing_limit_sendbycli = $dolibarr_mailing_limit_sendbycli; $conf->file->main_authentication = empty($dolibarr_main_authentication) ? '' : $dolibarr_main_authentication; // Identification mode $conf->file->main_force_https = empty($dolibarr_main_force_https) ? '' : $dolibarr_main_force_https; // Force https -$conf->file->strict_mode = empty($dolibarr_strict_mode) ? '' : $dolibarr_strict_mode; // Force php strict mode (for debug) +$conf->file->strict_mode = empty($dolibarr_strict_mode) ? '' : $dolibarr_strict_mode; // Force php strict mode (for debug) $conf->file->instance_unique_id = empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; // Unique id of instance $conf->file->dol_document_root = array('main' => (string) DOL_DOCUMENT_ROOT); // Define array of document root directories ('/home/htdocs') -$conf->file->dol_url_root = array('main' => (string) DOL_URL_ROOT); // Define array of url root path ('' or '/dolibarr') +$conf->file->dol_url_root = array('main' => (string) DOL_URL_ROOT); // Define array of url root path ('' or '/dolibarr') if (!empty($dolibarr_main_document_root_alt)) { // dolibarr_main_document_root_alt can contains several directories @@ -132,9 +132,7 @@ if (!defined('NOREQUIREDB')) $langs->setDefaultLang('auto'); $langs->load("website"); print $langs->trans("SorryWebsiteIsCurrentlyOffLine"); - } - else - { + } else { print "SorryWebsiteIsCurrentlyOffLine"; } print ''; @@ -162,20 +160,17 @@ if (!defined('NOREQUIREUSER')) { */ // By default conf->entity is 1, but we change this if we ask another value. -if (session_id() && !empty($_SESSION["dol_entity"])) // Entity inside an opened session -{ +if (session_id() && !empty($_SESSION["dol_entity"])) { + // Entity inside an opened session $conf->entity = $_SESSION["dol_entity"]; -} -elseif (!empty($_ENV["dol_entity"])) // Entity inside a CLI script -{ +} elseif (!empty($_ENV["dol_entity"])) { + // Entity inside a CLI script $conf->entity = $_ENV["dol_entity"]; -} -elseif (GETPOSTISSET("loginfunction") && GETPOST("entity", 'int')) // Just after a login page -{ +} elseif (GETPOSTISSET("loginfunction") && GETPOST("entity", 'int')) { + // Just after a login page $conf->entity = GETPOST("entity", 'int'); -} -elseif (defined('DOLENTITY') && is_numeric(DOLENTITY)) // For public page with MultiCompany module -{ +} elseif (defined('DOLENTITY') && is_numeric(DOLENTITY)) { + // For public page with MultiCompany module $conf->entity = DOLENTITY; } @@ -225,9 +220,7 @@ if (!empty($conf->global->MAIN_ONLY_LOGIN_ALLOWED)) print 'You are logged with user "'.$_SESSION["dol_login"].'" and only administrator user "'.$conf->global->MAIN_ONLY_LOGIN_ALLOWED.'" is allowed to connect for the moment.'."\n"; $nexturl = DOL_URL_ROOT.'/user/logout.php'; print 'Please try later or
    click here to disconnect and change login user...'."\n"; - } - else - { + } else { print 'Sorry, your application is offline. Only administrator user "'.$conf->global->MAIN_ONLY_LOGIN_ALLOWED.'" is allowed to connect for the moment.'."\n"; $nexturl = DOL_URL_ROOT.'/'; print 'Please try later or click here to change login user...'."\n"; diff --git a/htdocs/modulebuilder/admin/setup.php b/htdocs/modulebuilder/admin/setup.php index db30c32607f..b7cadf26341 100644 --- a/htdocs/modulebuilder/admin/setup.php +++ b/htdocs/modulebuilder/admin/setup.php @@ -27,9 +27,9 @@ global $conf, $langs, $user, $db; $langs->loadLangs(array("admin", "other", "modulebuilder")); if (!$user->admin || empty($conf->modulebuilder->enabled)) - accessforbidden(); + accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); /* @@ -37,47 +37,46 @@ $backtopage = GETPOST('backtopage', 'alpha'); */ if ($action == "update") { - $res1 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README', 'none'), 'chaine', 0, '', $conf->entity); - $res2 = dolibarr_set_const($db, 'MODULEBUILDER_ASCIIDOCTOR', GETPOST('MODULEBUILDER_ASCIIDOCTOR', 'nohtml'), 'chaine', 0, '', $conf->entity); - $res3 = dolibarr_set_const($db, 'MODULEBUILDER_ASCIIDOCTORPDF', GETPOST('MODULEBUILDER_ASCIIDOCTORPDF', 'nohtml'), 'chaine', 0, '', $conf->entity); - $res4 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_EDITOR_NAME', GETPOST('MODULEBUILDER_SPECIFIC_EDITOR_NAME', 'nohtml'), 'chaine', 0, '', $conf->entity); - $res5 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_EDITOR_URL', GETPOST('MODULEBUILDER_SPECIFIC_EDITOR_URL', 'nohtml'), 'chaine', 0, '', $conf->entity); - $res6 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_FAMILY', GETPOST('MODULEBUILDER_SPECIFIC_FAMILY', 'nohtml'), 'chaine', 0, '', $conf->entity); - $res7 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_AUTHOR', GETPOST('MODULEBUILDER_SPECIFIC_AUTHOR', 'html'), 'chaine', 0, '', $conf->entity); - $res8 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_VERSION', GETPOST('MODULEBUILDER_SPECIFIC_VERSION', 'nohtml'), 'chaine', 0, '', $conf->entity); - if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0 || $res7 < 0 || $res8 < 0) { - setEventMessages('ErrorFailedToSaveDate', null, 'errors'); - $db->rollback(); - } - else - { - setEventMessages('RecordModifiedSuccessfully', null, 'mesgs'); - $db->commit(); - } + $res1 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_README', GETPOST('MODULEBUILDER_SPECIFIC_README', 'restricthtml'), 'chaine', 0, '', $conf->entity); + $res2 = dolibarr_set_const($db, 'MODULEBUILDER_ASCIIDOCTOR', GETPOST('MODULEBUILDER_ASCIIDOCTOR', 'nohtml'), 'chaine', 0, '', $conf->entity); + $res3 = dolibarr_set_const($db, 'MODULEBUILDER_ASCIIDOCTORPDF', GETPOST('MODULEBUILDER_ASCIIDOCTORPDF', 'nohtml'), 'chaine', 0, '', $conf->entity); + $res4 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_EDITOR_NAME', GETPOST('MODULEBUILDER_SPECIFIC_EDITOR_NAME', 'nohtml'), 'chaine', 0, '', $conf->entity); + $res5 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_EDITOR_URL', GETPOST('MODULEBUILDER_SPECIFIC_EDITOR_URL', 'nohtml'), 'chaine', 0, '', $conf->entity); + $res6 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_FAMILY', GETPOST('MODULEBUILDER_SPECIFIC_FAMILY', 'nohtml'), 'chaine', 0, '', $conf->entity); + $res7 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_AUTHOR', GETPOST('MODULEBUILDER_SPECIFIC_AUTHOR', 'html'), 'chaine', 0, '', $conf->entity); + $res8 = dolibarr_set_const($db, 'MODULEBUILDER_SPECIFIC_VERSION', GETPOST('MODULEBUILDER_SPECIFIC_VERSION', 'nohtml'), 'chaine', 0, '', $conf->entity); + if ($res1 < 0 || $res2 < 0 || $res3 < 0 || $res4 < 0 || $res5 < 0 || $res6 < 0 || $res7 < 0 || $res8 < 0) { + setEventMessages('ErrorFailedToSaveDate', null, 'errors'); + $db->rollback(); + } else { + setEventMessages('RecordModifiedSuccessfully', null, 'mesgs'); + $db->commit(); + } } +$reg = array(); if (preg_match('/set_(.*)/', $action, $reg)) { - $code = $reg[1]; - $values = GETPOST($code); - if (is_array($values)) - $values = implode(',', $values); + $code = $reg[1]; + $values = GETPOST($code); + if (is_array($values)) + $values = implode(',', $values); - if (dolibarr_set_const($db, $code, $values, 'chaine', 0, '', $conf->entity) > 0) { - header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } else { - dol_print_error($db); - } + if (dolibarr_set_const($db, $code, $values, 'chaine', 0, '', $conf->entity) > 0) { + header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } else { + dol_print_error($db); + } } if (preg_match('/del_(.*)/', $action, $reg)) { - $code = $reg[1]; - if (dolibarr_del_const($db, $code, 0) > 0) { - Header("Location: ".$_SERVER["PHP_SELF"]); - exit; - } else { - dol_print_error($db); - } + $code = $reg[1]; + if (dolibarr_del_const($db, $code, 0) > 0) { + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } else { + dol_print_error($db); + } } @@ -98,7 +97,7 @@ print ''; print load_fiche_titre($langs->trans("ModuleSetup").' '.$langs->trans('Modulebuilder'), $linkback); if (GETPOST('withtab', 'alpha')) { - dol_fiche_head($head, 'modulebuilder', '', -1); + dol_fiche_head($head, 'modulebuilder', '', -1); } print ''.$langs->trans("ModuleBuilderDesc")."
    \n"; @@ -115,56 +114,56 @@ print "\n"; if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { - // What is use cas of this 2 options ? + // What is use case of this 2 options ? print ''; print ''.$langs->trans("UseAboutPage").''; print ''; if ($conf->use_javascript_ajax) { - print ajax_constantonoff('MODULEBUILDER_USE_ABOUT'); + print ajax_constantonoff('MODULEBUILDER_USE_ABOUT'); } else { - if (empty($conf->global->MODULEBUILDER_USE_ABOUT)) { - print ''.img_picto($langs->trans("Disabled"), 'off').''; - } else { - print ''.img_picto($langs->trans("Enabled"), 'on').''; - } + if (empty($conf->global->MODULEBUILDER_USE_ABOUT)) { + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'on').''; + } } print ''; - print ''; - print ''.$langs->trans("UseSpecificEditorName").''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''.$langs->trans("UseSpecificEditorName").''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''.$langs->trans("UseSpecificEditorURL").''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''.$langs->trans("UseSpecificEditorURL").''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''.$langs->trans("UseSpecificFamily").''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''.$langs->trans("UseSpecificFamily").''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''.$langs->trans("UseSpecificAuthor").''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''.$langs->trans("UseSpecificAuthor").''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''.$langs->trans("UseSpecificVersion").''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''.$langs->trans("UseSpecificVersion").''; + print ''; + print ''; + print ''; + print ''; } print ''; @@ -195,7 +194,7 @@ print ''; print '
    '; if (GETPOST('withtab', 'alpha')) { - dol_fiche_end(); + dol_fiche_end(); } print '
    '; diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index ee750447636..49d097ffc8a 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -94,6 +94,90 @@ $result = restrictedArea($user, 'modulebuilder', null); $error = 0; +$form = new Form($db); + +// Define $listofmodules +$dirsrootforscan = array($dirread); +// Add also the core modules into the list of modules to show/edit +if ($dirread != DOL_DOCUMENT_ROOT && ($conf->global->MAIN_FEATURES_LEVEL >= 2 || !empty($conf->global->MODULEBUILDER_ADD_DOCUMENT_ROOT))) { $dirsrootforscan[] = DOL_DOCUMENT_ROOT; } + +// Search modules to edit +$textforlistofdirs = ''."\n"; +$listofmodules = array(); +$i = 0; +foreach ($dirsrootforscan as $dirread) +{ + $moduletype = 'external'; + if ($dirread == DOL_DOCUMENT_ROOT) { + $moduletype = 'internal'; + } + + $dirsincustom = dol_dir_list($dirread, 'directories'); + if (is_array($dirsincustom) && count($dirsincustom) > 0) { + foreach ($dirsincustom as $dircustomcursor) { + $fullname = $dircustomcursor['fullname']; + if (dol_is_file($fullname.'/'.$FILEFLAG)) + { + // Get real name of module (MyModule instead of mymodule) + $dirtoscanrel = basename($fullname).'/core/modules/'; + + $descriptorfiles = dol_dir_list(dirname($fullname).'/'.$dirtoscanrel, 'files', 0, 'mod.*\.class\.php$'); + if (empty($descriptorfiles)) // If descriptor not found into module dir, we look into main module dir. + { + $dirtoscanrel = 'core/modules/'; + $descriptorfiles = dol_dir_list($fullname.'/../'.$dirtoscanrel, 'files', 0, 'mod'.strtoupper(basename($fullname)).'\.class\.php$'); + } + $modulenamewithcase = ''; + $moduledescriptorrelpath = ''; + $moduledescriptorfullpath = ''; + + foreach ($descriptorfiles as $descriptorcursor) { + $modulenamewithcase = preg_replace('/^mod/', '', $descriptorcursor['name']); + $modulenamewithcase = preg_replace('/\.class\.php$/', '', $modulenamewithcase); + $moduledescriptorrelpath = $dirtoscanrel.$descriptorcursor['name']; + $moduledescriptorfullpath = $descriptorcursor['fullname']; + //var_dump($descriptorcursor); + } + if ($modulenamewithcase) + { + $listofmodules[$dircustomcursor['name']] = array( + 'modulenamewithcase'=>$modulenamewithcase, + 'moduledescriptorrelpath'=> $moduledescriptorrelpath, + 'moduledescriptorfullpath'=>$moduledescriptorfullpath, + 'moduledescriptorrootpath'=>$dirread, + 'moduletype'=>$moduletype + ); + } + //var_dump($listofmodules); + } + } + } + + if ($forceddirread && empty($listofmodules)) // $forceddirread is 1 if we forced dir to read with dirins=... or with module=...@mydir + { + $listofmodules[strtolower($module)] = array( + 'modulenamewithcase'=>$module, + 'moduledescriptorrelpath'=> 'notyetimplemented', + 'moduledescriptorfullpath'=> 'notyetimplemented', + 'moduledescriptorrootpath'=> 'notyetimplemented', + ); + } + + // Show description of content + $newdircustom = $dirins; + if (empty($newdircustom)) $newdircustom = img_warning(); + // If dirread was forced to somewhere else, by using URL + // htdocs/modulebuilder/index.php?module=Inventory@/home/ldestailleur/git/dolibarr/htdocs/product + if (empty($i)) $textforlistofdirs .= $langs->trans("DirScanned").' : '; + else $textforlistofdirs .= ', '; + $textforlistofdirs .= ''.$dirread.''; + if ($dirread == DOL_DOCUMENT_ROOT) { + if ($conf->global->MAIN_FEATURES_LEVEL >= 2) $textforlistofdirs .= $form->textwithpicto('', $langs->trans("ConstantIsOn", "MAIN_FEATURES_LEVEL")); + if (! empty($conf->global->MODULEBUILDER_ADD_DOCUMENT_ROOT)) $textforlistofdirs .= $form->textwithpicto('', $langs->trans("ConstantIsOn", "MODULEBUILDER_ADD_DOCUMENT_ROOT")); + } + $i++; +} + /* * Actions @@ -128,9 +212,8 @@ if ($dirins && $action == 'initmodule' && $modulename) $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFailToCopyDir", $srcdir, $destdir), null, 'errors'); - } - else // $result == 0 - { + } else { + // $result == 0 setEventMessages($langs->trans("AllFilesDidAlreadyExist", $srcdir, $destdir), null, 'warnings'); } } @@ -215,7 +298,6 @@ if ($dirins && $action == 'initmodule' && $modulename) } $result = dolReplaceInFile($phpfileval['fullname'], $arrayreplacement); - //var_dump($result); if ($result < 0) { @@ -270,9 +352,7 @@ if ($dirins && $action == 'initapi' && !empty($module)) ); dolReplaceInFile($destfile, $arrayreplacement); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } @@ -307,15 +387,12 @@ if ($dirins && $action == 'initphpunit' && !empty($module)) ); dolReplaceInFile($destfile, $arrayreplacement); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initsqlextrafields' && !empty($module)) -{ +if ($dirins && $action == 'initsqlextrafields' && !empty($module)) { $modulename = ucfirst($module); // Force first letter in uppercase $objectname = $tabobj; @@ -353,9 +430,7 @@ if ($dirins && $action == 'initsqlextrafields' && !empty($module)) dolReplaceInFile($destfile1, $arrayreplacement); dolReplaceInFile($destfile2, $arrayreplacement); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', ''), null, 'errors'); } @@ -388,9 +463,7 @@ if ($dirins && $action == 'inithook' && !empty($module)) ); dolReplaceInFile($destfile, $arrayreplacement); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } @@ -422,9 +495,7 @@ if ($dirins && $action == 'inittrigger' && !empty($module)) ); dolReplaceInFile($destfile, $arrayreplacement); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } @@ -438,8 +509,7 @@ if ($dirins && $action == 'initwidget' && !empty($module)) //var_dump($srcfile);var_dump($destfile); $result = dol_copy($srcfile, $destfile, 0, 0); - if ($result > 0) - { + if ($result > 0) { $modulename = ucfirst($module); // Force first letter in uppercase //var_dump($phpfileval['fullname']); @@ -456,9 +526,7 @@ if ($dirins && $action == 'initwidget' && !empty($module)) ); dolReplaceInFile($destfile, $arrayreplacement); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } @@ -495,13 +563,12 @@ if ($dirins && $action == 'initcss' && !empty($module)) $srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php'; $arrayreplacement = array('/\/\/\s*\''.preg_quote('/'.strtolower($module).'/css/'.strtolower($module).'.css.php', '/').'\'/' => '\'/'.strtolower($module).'/css/'.strtolower($module).'.css.php\''); dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } + if ($dirins && $action == 'initjs' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/js'); @@ -534,9 +601,7 @@ if ($dirins && $action == 'initjs' && !empty($module)) $srcfile = $dirins.'/'.strtolower($module).'/core/modules/mod'.$module.'.class.php'; $arrayreplacement = array('/\/\/\s*\''.preg_quote('/'.strtolower($module).'/js/'.strtolower($module).'.js.php', '/').'\'/' => '\'/'.strtolower($module).'/js/'.strtolower($module).'.js.php\''); dolReplaceInFile($srcfile, $arrayreplacement, '', 0, 0, 1); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } @@ -573,15 +638,12 @@ if ($dirins && $action == 'initcli' && !empty($module)) ); dolReplaceInFile($destfile, $arrayreplacement); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } } -if ($dirins && $action == 'initdoc' && !empty($module)) -{ +if ($dirins && $action == 'initdoc' && !empty($module)) { dol_mkdir($dirins.'/'.strtolower($module).'/doc'); $srcdir = DOL_DOCUMENT_ROOT.'/modulebuilder/template'; $srcfile = $srcdir.'/doc/Documentation.asciidoc'; @@ -589,8 +651,7 @@ if ($dirins && $action == 'initdoc' && !empty($module)) //var_dump($srcfile);var_dump($destfile); $result = dol_copy($srcfile, $destfile, 0, 0); - if ($result > 0) - { + if ($result > 0) { $modulename = ucfirst($module); // Force first letter in uppercase $modulelowercase = strtolower($module); @@ -624,9 +685,7 @@ if ($dirins && $action == 'initdoc' && !empty($module)) dol_delete_file($outputfiledoc, 0, 0, 0, null, false, 0); dol_delete_file($outputfiledocpdf, 0, 0, 0, null, false, 0); - } - else - { + } else { $langs->load("errors"); setEventMessages($langs->trans('ErrorFailToCreateFile', $destfile), null, 'errors'); } @@ -674,9 +733,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', if (empty($_results)) { setEventMessages($langs->trans("ErrorTableNotFound", $tablename), null, 'errors'); - } - else - { + } else { /** * 'type' if the field format ('integer', 'integer:Class:pathtoclass', 'varchar(x)', 'double(24,8)', 'text', 'html', 'datetime', 'timestamp', 'float') * 'label' the translation key. @@ -726,7 +783,9 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $fieldname = $obj->Field; // type $type = $obj->Type; - if ($type == 'int(11)') $type = 'integer'; + if ($type == 'int(11)') $type='integer'; + if ($type == 'float') $type='real'; + if (strstr($type, 'tinyint')) $type='integer'; if ($obj->Field == 'fk_soc') $type = 'integer:Societe:societe/class/societe.class.php'; if (preg_match('/^fk_proj/', $obj->Field)) $type = 'integer:Project:projet/class/project.class.php:1:fk_statut=1'; if (preg_match('/^fk_prod/', $obj->Field)) $type = 'integer:Product:product/class/product.class.php:1'; @@ -737,7 +796,7 @@ if ($dirins && $action == 'initobject' && $module && GETPOST('createtablearray', $notnull = ($obj->Null == 'YES' ? 0 : 1); if ($fieldname == 'fk_user_modif') $notnull = -1; // label - $label = preg_replace('/_/', ' ', ucfirst($fieldname)); + $label = preg_replace('/_/', '', ucfirst($fieldname)); if ($fieldname == 'rowid') $label = 'TechnicalID'; if ($fieldname == 'import_key') $label = 'ImportId'; if ($fieldname == 'fk_soc') $label = 'ThirdParty'; @@ -793,6 +852,9 @@ if ($dirins && $action == 'initobject' && $module && $objectname) { $objectname = ucfirst($objectname); + $dirins = $dirread = $listofmodules[strtolower($module)]['moduledescriptorrootpath']; + $moduletype = $listofmodules[strtolower($module)]['moduletype']; + if (preg_match('/[^a-z0-9_]/i', $objectname)) { $error++; @@ -886,9 +948,8 @@ if ($dirins && $action == 'initobject' && $module && $objectname) $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFailToCopyFile", $srcdir.'/'.$srcfile, $destdir.'/'.$destfile), null, 'errors'); - } - else // $result == 0 - { + } else { + // $result == 0 setEventMessages($langs->trans("FileAlreadyExists", $destfile), null, 'warnings'); } } @@ -1075,15 +1136,11 @@ if ($dirins && ($action == 'droptable' || $action == 'droptableextrafields') && { $nb = $obj->nb; } - } - else - { + } else { if ($db->lasterrno() == 'DB_ERROR_NOSUCHTABLE') { setEventMessages($langs->trans("TableDoesNotExists", $tabletodrop), null, 'warnings'); - } - else - { + } else { dol_print_error($db); } } @@ -1092,8 +1149,7 @@ if ($dirins && ($action == 'droptable' || $action == 'droptableextrafields') && $resql = $db->DDLDropTable($tabletodrop); //var_dump($resql); setEventMessages($langs->trans("TableDropped", $tabletodrop), null, 'mesgs'); - } - elseif ($nb > 0) + } elseif ($nb > 0) { setEventMessages($langs->trans("TableNotEmptyDropCanceled", $tabletodrop), null, 'warnings'); } @@ -1106,6 +1162,9 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) $objectname = $tabobj; + $dirins = $dirread = $listofmodules[strtolower($module)]['moduledescriptorrootpath']; + $moduletype = $listofmodules[strtolower($module)]['moduletype']; + $srcdir = $dirread.'/'.strtolower($module); $destdir = $dirins.'/'.strtolower($module); dol_mkdir($destdir); @@ -1133,7 +1192,7 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) { $addfieldentry = array( 'name'=>GETPOST('propname', 'aZ09'), 'label'=>GETPOST('proplabel', 'alpha'), 'type'=>GETPOST('proptype', 'alpha'), - 'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'none'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}' + 'arrayofkeyval'=>GETPOST('proparrayofkeyval', 'restricthtml'), // Example json string '{"0":"Draft","1":"Active","-1":"Cancel"}' 'visible'=>GETPOST('propvisible', 'int'), 'enabled'=>GETPOST('propenabled', 'int'), 'position'=>GETPOST('propposition', 'int'), 'notnull'=>GETPOST('propnotnull', 'int'), 'index'=>GETPOST('propindex', 'int'), 'searchall'=>GETPOST('propsearchall', 'int'), 'isameasure'=>GETPOST('propisameasure', 'int'), 'comment'=>GETPOST('propcomment', 'alpha'), 'help'=>GETPOST('prophelp', 'alpha') @@ -1155,7 +1214,9 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) // Edit the class file to write properties if (!$error) { - $object = rebuildObjectClass($destdir, $module, $objectname, $newmask, $srcdir, $addfieldentry); + $moduletype = 'external'; + + $object = rebuildObjectClass($destdir, $module, $objectname, $newmask, $srcdir, $addfieldentry, $moduletype); if (is_numeric($object) && $object <= 0) { $error++; @@ -1165,7 +1226,9 @@ if ($dirins && $action == 'addproperty' && !empty($module) && !empty($tabobj)) // Edit sql with new properties if (!$error) { - $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, $srcdir, $object); + $moduletype = 'external'; + + $result = rebuildObjectSql($destdir, $module, $objectname, $newmask, $srcdir, $object, $moduletype); if ($result <= 0) { $error++; @@ -1240,9 +1303,7 @@ if ($dirins && $action == 'confirm_deletemodule') if ($result > 0) { setEventMessages($langs->trans("DirWasRemoved", $modulelowercase), null); - } - else - { + } else { setEventMessages($langs->trans("PurgeNothingToDelete"), null, 'warnings'); } } @@ -1302,9 +1363,7 @@ if ($dirins && $action == 'confirm_deleteobject' && $objectname) if ($resultko == 0) { setEventMessages($langs->trans("FilesDeleted"), null); - } - else - { + } else { setEventMessages($langs->trans("ErrorSomeFilesCouldNotBeDeleted"), null, 'warnings'); } } @@ -1331,15 +1390,12 @@ if ($dirins && $action == 'generatepackage') { try { $moduleobj = new $class($db); - } - catch (Exception $e) + } catch (Exception $e) { $error++; dol_print_error($e->getMessage()); } - } - else - { + } else { $error++; $langs->load("errors"); dol_print_error($langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module)); @@ -1357,25 +1413,19 @@ if ($dirins && $action == 'generatepackage') { if (!dol_is_dir($dirofmodule)) dol_mkdir($dirofmodule); $result = dol_compress_dir($dir, $outputfilezip, 'zip', '', $modulelowercase); - } - else - { + } else { $result = -1; } if ($result > 0) { setEventMessages($langs->trans("ZipFileGeneratedInto", $outputfilezip), null); - } - else - { + } else { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFailToGenerateFile", $outputfilezip), null, 'errors'); } - } - else - { + } else { $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorCheckVersionIsDefined"), null, 'errors'); @@ -1393,9 +1443,7 @@ if ($dirins && $action == 'generatedoc') if ($result > 0) { setEventMessages($langs->trans("DocFileGeneratedInto", $dirofmodule), null); - } - else - { + } else { setEventMessages($util->error, $util->errors, 'errors'); } } @@ -1420,7 +1468,13 @@ if ($action == 'savefile' && empty($cancel)) dol_copy($pathoffile, $pathoffilebackup, 0, 1); } - $content = GETPOST('editfilecontent', 'none'); + $check = 'restricthtml'; + $srclang = dol_mimetype($pathoffile, '', 3); + if ($srclang == 'md') $check = 'restricthtml'; + if ($srclang == 'lang') $check = 'restricthtml'; + if ($srclang == 'php') $check = 'none'; + + $content = GETPOST('editfilecontent', $check); // Save file on disk if ($content) @@ -1432,14 +1486,10 @@ if ($action == 'savefile' && empty($cancel)) @chmod($pathoffile, octdec($newmask)); setEventMessages($langs->trans("FileSaved"), null); - } - else - { + } else { setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors'); } - } - else - { + } else { setEventMessages($langs->trans("ContentCantBeEmpty"), null, 'errors'); //$action='editfile'; $error++; @@ -1458,8 +1508,7 @@ if ($action == 'set' && $user->admin) $value = GETPOST('value', 'alpha'); $resarray = activateModule($value); if (!empty($resarray['errors'])) setEventMessages('', $resarray['errors'], 'errors'); - else - { + else { //var_dump($resarray);exit; if ($resarray['nbperms'] > 0) { @@ -1474,8 +1523,7 @@ if ($action == 'set' && $user->admin) $msg = $langs->trans('ModuleEnabledAdminMustCheckRights'); setEventMessages($msg, null, 'warnings'); } - } - else dol_print_error($db); + } else dol_print_error($db); } } header("Location: ".$_SERVER["PHP_SELF"]."?".$param); @@ -1519,7 +1567,7 @@ llxHeader('', $langs->trans("ModuleBuilder"), '', '', 0, 0, '/includes/ace/src/ext-statusbar.js', '/includes/ace/src/ext-language_tools.js', //'/includes/ace/src/ext-chromevox.js' - ), array()); + ), array(), '', 'classforhorizontalscrolloftabs'); $text = $langs->trans("ModuleBuilder"); @@ -1528,87 +1576,17 @@ print load_fiche_titre($text, '', 'title_setup'); print ''.$langs->trans("ModuleBuilderDesc", 'https://wiki.dolibarr.org/index.php/Module_development#Create_your_module').'
    '; -$dirsrootforscan = array($dirread); -// Add also the core modules into the list of modules to show/edit -if ($dirread != DOL_DOCUMENT_ROOT && ($conf->global->MAIN_FEATURES_LEVEL >= 2 || !empty($conf->global->MODULEBUILDER_ADD_DOCUMENT_ROOT))) { $dirsrootforscan[] = DOL_DOCUMENT_ROOT; } - -// Search modules to edit -print ''."\n"; -$listofmodules = array(); -$i = 0; -foreach ($dirsrootforscan as $dirread) -{ - $dirsincustom = dol_dir_list($dirread, 'directories'); - if (is_array($dirsincustom) && count($dirsincustom) > 0) { - foreach ($dirsincustom as $dircustomcursor) { - $fullname = $dircustomcursor['fullname']; - if (dol_is_file($fullname.'/'.$FILEFLAG)) - { - // Get real name of module (MyModule instead of mymodule) - $dirtoscanrel = basename($fullname).'/core/modules/'; - - $descriptorfiles = dol_dir_list(dirname($fullname).'/'.$dirtoscanrel, 'files', 0, 'mod.*\.class\.php$'); - if (empty($descriptorfiles)) // If descriptor not found into module dir, we look into main module dir. - { - $dirtoscanrel = 'core/modules/'; - $descriptorfiles = dol_dir_list($fullname.'/../'.$dirtoscanrel, 'files', 0, 'mod'.strtoupper(basename($fullname)).'\.class\.php$'); - } - $modulenamewithcase = ''; - $moduledescriptorrelpath = ''; - $moduledescriptorfullpath = ''; - - foreach ($descriptorfiles as $descriptorcursor) { - $modulenamewithcase = preg_replace('/^mod/', '', $descriptorcursor['name']); - $modulenamewithcase = preg_replace('/\.class\.php$/', '', $modulenamewithcase); - $moduledescriptorrelpath = $dirtoscanrel.$descriptorcursor['name']; - $moduledescriptorfullpath = $descriptorcursor['fullname']; - //var_dump($descriptorcursor); - } - if ($modulenamewithcase) - { - $listofmodules[$dircustomcursor['name']] = array( - 'modulenamewithcase'=>$modulenamewithcase, - 'moduledescriptorrelpath'=> $moduledescriptorrelpath, - 'moduledescriptorfullpath'=>$moduledescriptorfullpath, - 'moduledescriptorrootpath'=>$dirread - ); - } - //var_dump($listofmodules); - } - } - } - - if ($forceddirread && empty($listofmodules)) // $forceddirread is 1 if we forced dir to read with dirins=... or with module=...@mydir - { - $listofmodules[strtolower($module)] = array( - 'modulenamewithcase'=>$module, - 'moduledescriptorrelpath'=> 'notyetimplemented', - 'moduledescriptorfullpath'=> 'notyetimplemented', - 'moduledescriptorrootpath'=> 'notyetimplemented', - ); - } - - // Show description of content - $newdircustom = $dirins; - if (empty($newdircustom)) $newdircustom = img_warning(); - // If dirread was forced to somewhere else, by using URL - // htdocs/modulebuilder/index.php?module=Inventory@/home/ldestailleur/git/dolibarr/htdocs/product - if (empty($i)) print $langs->trans("DirScanned").' : '; - else print ', '; - print ''.$dirread.''; - $i++; -} +print $textforlistofdirs; print '
    '; //var_dump($listofmodules); + $message = ''; if (!$dirins) { $message = info_admin($langs->trans("ConfFileMustContainCustom", DOL_DOCUMENT_ROOT.'/custom', DOL_DOCUMENT_ROOT)); $allowfromweb = -1; -} -else -{ +} else { if ($dirins_ok) { if (!is_writable(dol_osencode($dirins))) @@ -1617,9 +1595,7 @@ else $message = info_admin($langs->trans("ErrorFailedToWriteInDir", $dirins)); $allowfromweb = 0; } - } - else - { + } else { $message = info_admin($langs->trans("NotExistsDirect", $dirins).$langs->trans("InfDirAlt").$langs->trans("InfDirExample")); $allowfromweb = 0; } @@ -1637,31 +1613,40 @@ $infomodulesfound = '
    '.$form->textwithpicto( $error = 0; $moduleobj = null; + if (!empty($module) && $module != 'initmodule' && $module != 'deletemodule') { $modulelowercase = strtolower($module); + $loadclasserrormessage = ''; // Load module - $fullpathdirtodescriptor = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; - dol_include_once($fullpathdirtodescriptor); - $class = 'mod'.$module; + try { + $fullpathdirtodescriptor = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; + + //throw(new Exception()); + dol_include_once($fullpathdirtodescriptor); + + $class = 'mod'.$module; + } catch (Throwable $e) { // This is called in PHP 7 only. Never called with PHP 5.6 + $loadclasserrormessage = $e->getMessage()."
    \n";; + $loadclasserrormessage .= 'File: '.$e->getFile()."
    \n"; + $loadclasserrormessage .= 'Line: '.$e->getLine()."
    \n"; + } if (class_exists($class)) { try { $moduleobj = new $class($db); - } - catch (Exception $e) + } catch (Exception $e) { $error++; print $e->getMessage(); } - } - else - { + } else { if (empty($forceddirread)) $error++; $langs->load("errors"); print img_warning('').' '.$langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module).'
    '; + print $loadclasserrormessage; } } @@ -1693,7 +1678,7 @@ if (is_array($listofmodules) && count($listofmodules) > 0) { $urltomodulesetup = ''.$langs->trans('Home').'-'.$langs->trans("Setup").'-'.$langs->trans("Modules").''; if (!empty($conf->global->$const_name)) // If module is already activated { - $linktoenabledisable .= ''; + $linktoenabledisable .= ''; $linktoenabledisable .= img_picto($langs->trans("Activated"), 'switch_on', '', false, 0, 0, '', '', 1); $linktoenabledisable .= ''; @@ -1714,30 +1699,22 @@ if (is_array($listofmodules) && count($listofmodules) > 0) { { $linktoenabledisable .= ' '.img_picto(ucfirst($page), "setup").''; // print ''.ucfirst($page).' '; - } - else - { + } else { if (preg_match('/^([^@]+)@([^@]+)$/i', $urlpage, $regs)) { $urltouse = dol_buildpath('/'.$regs[2].'/admin/'.$regs[1], 1); $linktoenabledisable .= '   '.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').''; - } - else - { + } else { $urltouse = $urlpage; $linktoenabledisable .= '   '.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').''; } } } - } - elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) - { + } elseif (preg_match('/^([^@]+)@([^@]+)$/i', $objMod->config_page_url, $regs)) { $linktoenabledisable .= '   '.img_picto($langs->trans("Setup"), "setup", 'style="padding-right: 6px"').''; } - } - else - { - $linktoenabledisable .= ''; + } else { + $linktoenabledisable .= ''; $linktoenabledisable .= img_picto($langs->trans("ModuleIsNotActive", $urltomodulesetup), 'switch_off', '', false, 0, 0, '', 'classfortooltip', 1); $linktoenabledisable .= "\n"; } @@ -1786,9 +1763,7 @@ if ($module == 'initmodule') print '
    '; print ''; -} -elseif ($module == 'deletemodule') -{ +} elseif ($module == 'deletemodule') { print ''."\n"; print '
    '; print ''; @@ -1800,9 +1775,7 @@ elseif ($module == 'deletemodule') print ''; print ''; print '
    '; -} -elseif (!empty($module)) -{ +} elseif (!empty($module)) { // Tabs for module if (!$error) { @@ -1892,6 +1865,8 @@ elseif (!empty($module)) print '
    '; + // Note module is inside $dirread + if ($tab == 'description') { $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; @@ -1900,7 +1875,7 @@ elseif (!empty($module)) if ($action != 'editfile' || empty($file)) { - dol_fiche_head($head2, $tab, '', -1, ''); // Description - level 2 + dol_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); // Description - level 2 print ''.$langs->trans("ModuleBuilderDesc".$tab).''; $infoonmodulepath = ''; @@ -1989,9 +1964,7 @@ elseif (!empty($module)) print ''; print ''; - } - else - { + } else { print $langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module).'
    '; } @@ -2033,7 +2006,7 @@ elseif (!empty($module)) print ''; print ''; - dol_fiche_head($head2, $tab, '', -1, ''); + dol_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); $doleditor = new DolEditor('editfilecontent', $content, '', '300', 'Full', 'In', true, false, 'ace', 0, '99%', ''); print $doleditor->Create(1, '', false, $langs->trans("File").' : '.$file, (GETPOST('format', 'aZ09') ?GETPOST('format', 'aZ09') : 'html')); @@ -2048,10 +2021,8 @@ elseif (!empty($module)) print ''; } - } - else - { - dol_fiche_head($head2, $tab, '', -1, ''); // Level 2 + } else { + dol_fiche_head($head2, $tab, '', -1, '', 0, '', '', 0, 'formodulesuffix'); // Level 2 } if ($tab == 'languages') @@ -2087,9 +2058,7 @@ elseif (!empty($module)) print ''; } print ''; - } - else - { + } else { // Edit text language file //print $langs->trans("UseAsciiDocFormat").'
    '; @@ -2218,9 +2187,7 @@ elseif (!empty($module)) print ''; $i++; } - } - else - { + } else { print ''.$langs->trans("None").''; } @@ -2228,9 +2195,7 @@ elseif (!empty($module)) print '
    '; print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -2334,9 +2299,7 @@ elseif (!empty($module)) print '
    '; print ''; - } - elseif ($tabobj == 'deleteobject') - { + } elseif ($tabobj == 'deleteobject') { // Delete object tab print '
    '; print ''; @@ -2349,9 +2312,8 @@ elseif (!empty($module)) print ''; print ''; print '
    '; - } - else - { // tabobj = module + } else { + // tabobj = module if ($action == 'deleteproperty') { $formconfirm = $form->formconfirm( @@ -2385,29 +2347,31 @@ elseif (!empty($module)) $pathtopicto = strtolower($module).'/img/object_'.strtolower($tabobj).'.png'; $pathtoscript = strtolower($module).'/scripts/'.strtolower($tabobj).'.php'; - //var_dump($pathtolib); - $realpathtoclass = dol_buildpath($pathtoclass, 0, 2); - $realpathtoapi = dol_buildpath($pathtoapi, 0, 2); - $realpathtoagenda = dol_buildpath($pathtoagenda, 0, 2); - $realpathtocard = dol_buildpath($pathtocard, 0, 2); - $realpathtodocument = dol_buildpath($pathtodocument, 0, 2); - $realpathtolist = dol_buildpath($pathtolist, 0, 2); - $realpathtonote = dol_buildpath($pathtonote, 0, 2); - $realpathtophpunit = dol_buildpath($pathtophpunit, 0, 2); - $realpathtosql = dol_buildpath($pathtosql, 0, 2); - $realpathtosqlextra = dol_buildpath($pathtosqlextra, 0, 2); - $realpathtosqlkey = dol_buildpath($pathtosqlkey, 0, 2); - $realpathtosqlextrakey = dol_buildpath($pathtosqlextrakey, 0, 2); - $realpathtolib = dol_buildpath($pathtolib, 0, 2); - $realpathtoobjlib = dol_buildpath($pathtoobjlib, 0, 2); - $realpathtopicto = dol_buildpath($pathtopicto, 0, 2); - $realpathtoscript = dol_buildpath($pathtoscript, 0, 2); + //var_dump($pathtoclass); var_dump($dirread); + $realpathtoclass = $dirread.'/'.$pathtoclass; + $realpathtoapi = $dirread.'/'.$pathtoapi; + $realpathtoagenda = $dirread.'/'.$pathtoagenda; + $realpathtocard = $dirread.'/'.$pathtocard; + $realpathtodocument = $dirread.'/'.$pathtodocument; + $realpathtolist = $dirread.'/'.$pathtolist; + $realpathtonote = $dirread.'/'.$pathtonote; + $realpathtophpunit = $dirread.'/'.$pathtophpunit; + $realpathtosql = $dirread.'/'.$pathtosql; + $realpathtosqlextra = $dirread.'/'.$pathtosqlextra; + $realpathtosqlkey = $dirread.'/'.$pathtosqlkey; + $realpathtosqlextrakey = $dirread.'/'.$pathtosqlextrakey; + $realpathtolib = $dirread.'/'.$pathtolib; + $realpathtoobjlib = $dirread.'/'.$pathtoobjlib; + $realpathtopicto = $dirread.'/'.$pathtopicto; + $realpathtoscript = $dirread.'/'.$pathtoscript; if (empty($realpathtoapi)) // For compatibility with some old modules { $pathtoapi = strtolower($module).'/class/api_'.strtolower($module).'s.class.php'; - $realpathtoapi = dol_buildpath($pathtoapi, 0, 2); + $realpathtoapi = $dirread.'/'.$pathtoapi; } + $urloflist = $dirread.'/'.$pathtolist; + $urlofcard = $dirread.'/'.$pathtocard; print '
    '; print ' '.$langs->trans("ClassFile").' : '.($realpathtoclass ? '' : '').$pathtoclass.($realpathtoclass ? '' : '').''; @@ -2423,14 +2387,10 @@ elseif (!empty($module)) if (empty($conf->global->$const_name)) // If module is not activated { print ''.$langs->trans("GoToApiExplorer").''; - } - else - { + } else { print ''.$langs->trans("GoToApiExplorer").''; } - } - else - { + } else { //print ''.$langs->trans("FileNotYetGenerated").' '; print ''; } @@ -2443,9 +2403,7 @@ elseif (!empty($module)) print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; - } - else - { + } else { //print ''.$langs->trans("FileNotYetGenerated").' '; print ''; } @@ -2481,8 +2439,7 @@ elseif (!empty($module)) print ''.img_picto($langs->trans("Delete"), 'delete').''; print '   '; print ''.$langs->trans("DropTableIfEmpty").''; - } - else { + } else { print ''; } //print '   '.$langs->trans("RunSql").''; @@ -2500,9 +2457,6 @@ elseif (!empty($module)) print '
    '; print '
    '; - $urloflist = dol_buildpath($pathtolist, 1); - $urlofcard = dol_buildpath($pathtocard, 1); - print '
    '; print ' '.$langs->trans("PageForList").' : '.($realpathtolist ? '' : '').$pathtolist.($realpathtolist ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; @@ -2549,20 +2503,17 @@ elseif (!empty($module)) if (function_exists('opcache_invalidate')) opcache_invalidate($dirread.'/'.$pathtoclass, true); // remove the include cache hell ! - if (empty($forceddirread)) + if (empty($forceddirread) && empty($dirread)) { $result = dol_include_once($pathtoclass); - } - else - { + } else { $result = @include_once $dirread.'/'.$pathtoclass; } if (class_exists($tabobj)) { try { $tmpobjet = @new $tabobj($db); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog('Failed to load Constructor of class: '.$e->getMessage(), LOG_WARNING); } @@ -2612,6 +2563,7 @@ elseif (!empty($module)) print ''.$form->textwithpicto($langs->trans("SearchAll"), $langs->trans("SearchAllDesc")).''; print ''.$form->textwithpicto($langs->trans("IsAMeasure"), $langs->trans("IsAMeasureDesc")).''; print ''.$langs->trans("CSSClass").''; + print ''.$langs->trans("CSSViewClass").''; print ''.$langs->trans("KeyForTooltip").''; print ''.$langs->trans("ShowOnCombobox").''; //print ''.$langs->trans("Disabled").''; @@ -2631,7 +2583,7 @@ elseif (!empty($module)) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -2643,6 +2595,7 @@ elseif (!empty($module)) print ''; print ''; print ''; + print ''; print ''; print ''; //print ''; @@ -2683,6 +2636,7 @@ elseif (!empty($module)) $propsearchall = $propval['searchall']; $propisameasure = $propval['isameasure']; $propcss = $propval['css']; + $propcssview = $propval['cssview']; $prophelp = $propval['help']; $propshowoncombobox = $propval['showoncombobox']; //$propdisabled=$propval['disabled']; @@ -2691,76 +2645,81 @@ elseif (!empty($module)) print ''; print ''; - print $propname; + print dol_escape_htmltag($propname); print ''; print ''; - print $proplabel; + print dol_escape_htmltag($proplabel); print ''; - print ''; - print $proptype; + print ''; + print ''.dol_escape_htmltag($proptype).''; print ''; - print ''; + print ''; if ($proparrayofkeyval) { - print json_encode($proparrayofkeyval); + print ''; + print dol_escape_htmltag(json_encode($proparrayofkeyval)); + print ''; } print ''; print ''; - print $propnotnull; + print dol_escape_htmltag($propnotnull); print ''; print ''; - print $propdefault; + print dol_escape_htmltag($propdefault); print ''; print ''; print $propindex ? '1' : ''; print ''; print ''; - print $propforeignkey ? $propforeignkey : ''; + print $propforeignkey ? dol_escape_htmltag($propforeignkey) : ''; print ''; print ''; - print $propposition; + print dol_escape_htmltag($propposition); print ''; print ''; - print $propenabled ? $propenabled : ''; + print $propenabled ? dol_escape_htmltag($propenabled) : ''; print ''; print ''; - print $propvisible ? $propvisible : '0'; + print $propvisible ? dol_escape_htmltag($propvisible) : '0'; print ''; print ''; - print $propnoteditable ? $propnoteditable : ''; + print $propnoteditable ? dol_escape_htmltag($propnoteditable) : ''; print ''; print ''; print $propsearchall ? '1' : ''; print ''; print ''; - print $propisameasure ? $propisameasure : ''; + print $propisameasure ? dol_escape_htmltag($propisameasure) : ''; print ''; print ''; - print $propcss ? $propcss : ''; + print $propcss ? dol_escape_htmltag($propcss) : ''; print ''; print ''; - print $prophelp ? $prophelp : ''; + print $propcssview ? dol_escape_htmltag($propcssview) : ''; + print ''; + print ''; + print $prophelp ? dol_escape_htmltag($prophelp) : ''; print ''; print ''; - print $propshowoncombobox ? $propshowoncombobox : ''; + print $propshowoncombobox ? dol_escape_htmltag($propshowoncombobox) : ''; print ''; /*print ''; print $propdisabled?$propdisabled:''; print '';*/ - print ''; - print $propcomment; + print ''; + print ''; + print dol_escape_htmltag($propcomment); + print ''; print ''; print ''; if ($propname != 'rowid') { - print ''.img_delete().''; + print ''.img_delete().''; } print ''; print ''; } - } - else - { + } else { if ($tab == 'specifications') { if ($action != 'editfile' || empty($file)) @@ -2779,9 +2738,7 @@ elseif (!empty($module)) print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
    '; } - } - else - { + } else { // Use MD or asciidoc //print $langs->trans("UseAsciiDocFormat").'
    '; @@ -2816,25 +2773,18 @@ elseif (!empty($module)) print '
    '; print ''; - } - else - { + } else { print ''.$langs->trans('Failed to init the object with the new.').''; } - } - catch (Exception $e) + } catch (Exception $e) { print $e->getMessage(); } - } - else - { + } else { if (empty($forceddirread)) { $fullpathoffile = dol_buildpath($file, 0); - } - else - { + } else { $fullpathoffile = $dirread.'/'.$file; } @@ -2967,19 +2917,15 @@ elseif (!empty($module)) print ''; } - } - else - { - print ''.$langs->trans("None").''; + } else { + print ''.$langs->trans("None").''; } print ''; print ''; print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3067,19 +3013,15 @@ elseif (!empty($module)) print ''; } - } - else - { - print ''.$langs->trans("None").''; + } else { + print ''.$langs->trans("None").''; } print ''; print ''; print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3130,17 +3072,13 @@ elseif (!empty($module)) print ''; print ''.img_picto($langs->trans("Edit"), 'edit').' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; - } - else - { + } else { print ''.$langs->trans("FileNotYetGenerated").''; print ''; print ''; } print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3199,9 +3137,7 @@ elseif (!empty($module)) print ''.img_picto($langs->trans("Delete"), 'delete').''; print ''; } - } - else - { + } else { print ''; print ' '.$langs->trans("NoTrigger"); print ''; @@ -3210,9 +3146,7 @@ elseif (!empty($module)) } print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3255,16 +3189,12 @@ elseif (!empty($module)) print ''.$pathtohook.''; print ''.img_picto($langs->trans("Edit"), 'edit').''; print ''.img_picto($langs->trans("Delete"), 'delete').''; - } - else - { + } else { print ''.$langs->trans("FileNotYetGenerated").''; print ''; } print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3307,16 +3237,12 @@ elseif (!empty($module)) print ''.$pathtohook.''; print ''.img_picto($langs->trans("Edit"), 'edit').''; print ''.img_picto($langs->trans("Delete"), 'delete').''; - } - else - { + } else { print ''.$langs->trans("FileNotYetGenerated").''; print ''; } print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3365,17 +3291,13 @@ elseif (!empty($module)) print ''.img_picto($langs->trans("Delete"), 'delete').''; print ''; } - } - else - { + } else { print ' '.$langs->trans("NoWidget"); print ''; print ''; } print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3451,17 +3373,13 @@ elseif (!empty($module)) print ''.img_picto($langs->trans("Delete"), 'delete').''; print ''; } - } - else - { + } else { print ' '.$langs->trans("NoCLIFile"); print ''; print ''; } print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3543,8 +3461,7 @@ elseif (!empty($module)) $texttoshow .= $langs->trans('CronMethod').': '.$cron['method']; $texttoshow .= '
    '.$langs->trans('CronArgs').': '.$cron['parameters']; $texttoshow .= '
    '.$langs->trans('Comment').': '.$langs->trans($cron['comment']); - } - elseif ($cron['jobtype'] == 'command') + } elseif ($cron['jobtype'] == 'command') { $text = $langs->trans('CronCommand'); $texttoshow = $langs->trans('CronCommand').': '.dol_trunc($cron['command']); @@ -3571,9 +3488,7 @@ elseif (!empty($module)) print ''; } - } - else - { + } else { print ''.$langs->trans("None").''; } @@ -3581,9 +3496,7 @@ elseif (!empty($module)) print ''; print ''; - } - else - { + } else { $fullpathoffile = dol_buildpath($file, 0); $content = file_get_contents($fullpathoffile); @@ -3632,18 +3545,14 @@ elseif (!empty($module)) print ''.img_picto($langs->trans("Delete"), 'delete').''; print ''; } - } - else - { + } else { print ''; print ' '.$langs->trans("FileNotYetGenerated"); print ''; print ''; } print ''; - } - else - { + } else { // Use MD or asciidoc //print $langs->trans("UseAsciiDocFormat").'
    '; @@ -3745,15 +3654,11 @@ elseif (!empty($module)) { try { $moduleobj = new $class($db); - } - catch (Exception $e) - { + } catch (Exception $e) { $error++; dol_print_error($e->getMessage()); } - } - else - { + } else { $error++; $langs->load("errors"); dol_print_error($langs->trans("ErrorFailedToLoadModuleDescriptorForXXX", $module)); diff --git a/htdocs/modulebuilder/template/admin/about.php b/htdocs/modulebuilder/template/admin/about.php index 2140d679695..ebb392810d1 100644 --- a/htdocs/modulebuilder/template/admin/about.php +++ b/htdocs/modulebuilder/template/admin/about.php @@ -48,7 +48,7 @@ $langs->loadLangs(array("errors", "admin", "mymodule@mymodule")); if (!$user->admin) accessforbidden(); // Parameters -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/modulebuilder/template/admin/myobject_extrafields.php b/htdocs/modulebuilder/template/admin/myobject_extrafields.php index 065feb6cebe..31bd430d6a3 100644 --- a/htdocs/modulebuilder/template/admin/myobject_extrafields.php +++ b/htdocs/modulebuilder/template/admin/myobject_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'mymodule_myobject'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index d66ede05696..11116fc33f4 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -50,7 +50,7 @@ $langs->loadLangs(array("admin", "mymodule@mymodule")); if (!$user->admin) accessforbidden(); // Parameters -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); $value = GETPOST('value', 'alpha'); @@ -244,9 +244,7 @@ if ($action == 'edit') print '
    '; print ''.$langs->trans("Modify").''; print '
    '; - } - else - { + } else { print '
    '.$langs->trans("NothingToSetup"); } } @@ -323,7 +321,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { { print img_picto($langs->trans("Activated"), 'switch_on'); } else { - print ''; + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); print ''; } @@ -376,7 +374,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; - $sql .= " WHERE type = '".$type."'"; + $sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -453,13 +451,13 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { if (in_array($name, $def)) { print ''."\n"; - print ''; + print ''; print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; } else { print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; } @@ -470,7 +468,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { { print img_picto($langs->trans("Default"), 'on'); } else { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; diff --git a/htdocs/modulebuilder/template/class/actions_mymodule.class.php b/htdocs/modulebuilder/template/class/actions_mymodule.class.php index 10bca2e8b9a..13a2b8e895c 100644 --- a/htdocs/modulebuilder/template/class/actions_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/actions_mymodule.class.php @@ -165,6 +165,7 @@ class ActionsMyModule global $conf, $user, $langs; $error = 0; // Error counter + $disabled = 1; /* print_r($parameters); print_r($object); echo "action: " . $action; */ if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) // do something only for the context 'somecontext1' or 'somecontext2' @@ -231,8 +232,8 @@ class ActionsMyModule dol_syslog(get_class($this).'::executeHooks action='.$action); /* print_r($parameters); print_r($object); echo "action: " . $action; */ - if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) // do something only for the context 'somecontext1' or 'somecontext2' - { + if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { + // do something only for the context 'somecontext1' or 'somecontext2' } return $ret; diff --git a/htdocs/modulebuilder/template/class/api_mymodule.class.php b/htdocs/modulebuilder/template/class/api_mymodule.class.php index f8699dc7568..32113b71ef0 100644 --- a/htdocs/modulebuilder/template/class/api_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php @@ -64,7 +64,8 @@ class MyModuleApi extends DolibarrApi * * @url GET myobjects/{id} * - * @throws RestException + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found */ public function get($id) { @@ -106,7 +107,7 @@ class MyModuleApi extends DolibarrApi global $db, $conf; $obj_ret = array(); - $tmpobject = new MyObject($db); + $tmpobject = new MyObject($this->db); if (!DolibarrApiAccess::$user->rights->mymodule->myobject->read) { throw new RestException(401); @@ -148,32 +149,32 @@ class MyModuleApi extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { $page = 0; } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } - $result = $db->query($sql); + $result = $this->db->query($sql); + $i = 0; if ($result) { - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); while ($i < $num) { - $obj = $db->fetch_object($result); - $tmp_object = new MyObject($db); + $obj = $this->db->fetch_object($result); + $tmp_object = new MyObject($this->db); if ($tmp_object->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($tmp_object); } $i++; } - } - else { - throw new RestException(503, 'Error when retrieving myobject list: '.$db->lasterror()); + } else { + throw new RestException(503, 'Error when retrieving myobject list: '.$this->db->lasterror()); } if (!count($obj_ret)) { throw new RestException(404, 'No myobject found'); @@ -239,12 +240,10 @@ class MyModuleApi extends DolibarrApi $this->myobject->$field = $value; } - if ($this->myobject->update($id, DolibarrApiAccess::$user) > 0) + if ($this->myobject->update(DolibarrApiAccess::$user, false) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $this->myobject->error); } } diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 85d07810f54..18ca9b5ea20 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -32,6 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; */ class MyObject extends CommonObject { + /** + * @var string ID of module. + */ + public $module = 'mymodule'; + /** * @var string ID to identify managed object. */ @@ -65,7 +70,7 @@ class MyObject extends CommonObject /** - * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') + * 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" * 'label' the translation key. * 'enabled' is a condition when the field must be managed (Example: 1 or '$conf->global->MY_SETUP_PARAM) @@ -78,7 +83,7 @@ class MyObject extends CommonObject * 'foreignkey'=>'tablename.field' if the field is a foreign key (it is recommanded to name the field fk_...). * '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). - * 'css' is the CSS style to use on field. For example: 'maxwidth200' + * 'css' and 'cssview' is the CSS style to use on field. 'css' is used in creation and update. 'cssview' is used in view mode. For example: 'maxwidth200', 'wordbreak' * 'help' is a string visible as a tooltip on field * 'showoncombobox' if value of the field must be visible into the label of the combobox that list record * 'disabled' is 1 if we want to have the field locked by a 'disabled' attribute. In most cases, this is never set into the definition of $fields into class, but is set dynamically by some part of code. @@ -94,10 +99,10 @@ class MyObject extends CommonObject * @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor. */ public $fields = array( - 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'noteditable'=>1, 'notnull'=> 1, 'index'=>1, 'position'=>1, 'comment'=>'Id'), + 'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-2, 'noteditable'=>1, 'notnull'=> 1, 'index'=>1, 'position'=>1, 'comment'=>'Id', 'css'=>'left'), 'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>1, 'noteditable'=>0, 'default'=>'', 'notnull'=> 1, 'showoncombobox'=>1, 'index'=>1, 'position'=>10, 'searchall'=>1, 'comment'=>'Reference of object'), 'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'notnull'=> 1, 'default'=>1, 'index'=>1, 'position'=>20), - 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth200', 'help'=>'Help text', 'showoncombobox'=>1), + 'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'searchall'=>1, 'css'=>'minwidth300', 'cssview'=>'wordbreak', 'help'=>'Help text', 'showoncombobox'=>1), 'amount' => array('type'=>'price', 'label'=>'Amount', 'enabled'=>1, 'visible'=>1, 'default'=>'null', 'position'=>40, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for amount'), 'qty' => array('type'=>'real', 'label'=>'Qty', 'enabled'=>1, 'visible'=>1, 'default'=>'0', 'position'=>45, 'searchall'=>0, 'isameasure'=>1, 'help'=>'Help text for quantity', 'css'=>'maxwidth75imp'), 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'ThirdParty', 'visible'=> 1, 'enabled'=>1, 'position'=>50, 'notnull'=>-1, 'index'=>1, 'help'=>'LinkToThirparty'), @@ -111,6 +116,7 @@ class MyObject extends CommonObject 'fk_user_creat' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserAuthor', 'enabled'=>1, 'visible'=>-2, 'notnull'=> 1, 'position'=>510, 'foreignkey'=>'user.rowid'), 'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'position'=>511), //'fk_user_valid' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-1, 'position'=>512), + 'last_main_doc' => array('type'=>'varchar(255)', 'label'=>'LastMainDoc', 'enabled'=>1, 'visible'=>0, 'notnull'=>0, 'position'=>600), 'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'notnull'=>-1, 'index'=>0, 'position'=>1000), 'model_pdf' => array('type'=>'varchar(255)', 'label'=>'Model pdf', 'enabled'=>1, 'visible'=>0, 'notnull'=>-1, 'position'=>1010), 'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=> 1, 'default'=>0, 'index'=>1, 'position'=>1000, 'arrayofkeyval'=>array(0=>'Draft', 1=>'Validated', 9=>'Canceled')), @@ -166,6 +172,11 @@ class MyObject extends CommonObject */ public $fk_user_modif; + /** + * @var string public $last_main_doc + */ + public $last_main_doc; + /** * @var string import_key */ @@ -416,14 +427,13 @@ class MyObject extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; - } - elseif (strpos($key, 'date') !== false) { + } elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; - } - elseif ($key == 'customsql') { + } elseif ($key == 'customsql') { $sqlwhere[] = $value; - } - else { + } elseif (strpos($value, '%') === false) { + $sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')'; + } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } @@ -548,9 +558,7 @@ class MyObject extends CommonObject if (!$error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life { $num = $this->getNextNumRef(); - } - else - { + } else { $num = $this->ref; } $this->newref = $num; @@ -633,9 +641,7 @@ class MyObject extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -735,7 +741,7 @@ class MyObject extends CommonObject $result = ''; - $label = ''.$langs->trans("MyObject").''; + $label = img_picto('', $this->picto).' '.$langs->trans("MyObject").''; $label .= '
    '; $label .= ''.$langs->trans('Ref').': '.$this->ref; if (isset($this->status)) { @@ -762,8 +768,7 @@ class MyObject extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -787,14 +792,12 @@ class MyObject extends CommonObject $pathtophoto = $class.'/'.$this->ref.'/thumbs/'.substr($filename, 0, $pospoint).'_mini'.substr($filename, $pospoint); if (empty($conf->global->{strtoupper($module.'_'.$class).'_FORMATLISTPHOTOSASUSERS'})) { $result .= '
    No photo
    '; - } - else { + } else { $result .= '
    No photo
    '; } $result .= ''; - } - else { + } else { $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); } } @@ -816,7 +819,7 @@ class MyObject extends CommonObject } /** - * Return label of the status + * Return the label of the status * * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto * @return string Label of status @@ -902,9 +905,7 @@ class MyObject extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -937,9 +938,7 @@ class MyObject extends CommonObject $this->error = $this->error; $this->errors = $this->errors; return $result; - } - else - { + } else { $this->lines = $result; return $this->lines; } @@ -989,9 +988,7 @@ class MyObject extends CommonObject if ($numref != '' && $numref != '-1') { return $numref; - } - else - { + } else { $this->error = $obj->error; //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); return ""; @@ -1000,9 +997,7 @@ class MyObject extends CommonObject print $langs->trans("Error")." ".$langs->trans("ClassNotFound").' '.$classname; return ""; } - } - else - { + } else { print $langs->trans("ErrorNumberingModuleNotSetup", $this->element); return ""; } @@ -1031,8 +1026,8 @@ class MyObject extends CommonObject if (!dol_strlen($modele)) { $modele = 'standard_myobject'; - if ($this->modelpdf) { - $modele = $this->modelpdf; + if ($this->model_pdf) { + $modele = $this->model_pdf; } elseif (!empty($conf->global->MYOBJECT_ADDON_PDF)) { $modele = $conf->global->MYOBJECT_ADDON_PDF; } @@ -1078,10 +1073,13 @@ class MyObject extends CommonObject } } + +require_once DOL_DOCUMENT_ROOT.'/core/class/commonobjectline.class.php'; + /** * Class MyObjectLine. You can also remove this and generate a CRUD class for lines objects. */ -class MyObjectLine +class MyObjectLine extends CommonObjectLine { // To complete with content of an object MyObjectLine // We should have a field rowid, fk_myobject and position diff --git a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php index 39b325924fc..cb6e15695c1 100644 --- a/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mailings/mailinglist_mymodule_myobject.modules.php @@ -146,9 +146,7 @@ class mailing_mailinglist_mymodule_myobject extends MailingTargets $i++; } - } - else - { + } else { dol_syslog($this->db->error()); $this->error = $this->db->error(); return -1; diff --git a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php index 5aecfe915c8..46943c6c9ab 100644 --- a/htdocs/modulebuilder/template/core/modules/modMyModule.class.php +++ b/htdocs/modulebuilder/template/core/modules/modMyModule.class.php @@ -297,7 +297,7 @@ class modMyModule extends DolibarrModules $this->menu[$r++]=array( 'fk_menu'=>'fk_mainmenu=mymodule,fk_leftmenu=myobject', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'left', // This is a Left menu entry - 'titre'=>'List MyObject', + 'titre'=>'List_MyObject', 'mainmenu'=>'mymodule', 'leftmenu'=>'mymodule_myobject_list', 'url'=>'/mymodule/myobject_list.php', @@ -311,7 +311,7 @@ class modMyModule extends DolibarrModules $this->menu[$r++]=array( 'fk_menu'=>'fk_mainmenu=mymodule,fk_leftmenu=myobject', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'type'=>'left', // This is a Left menu entry - 'titre'=>'New MyObject', + 'titre'=>'New_MyObject', 'mainmenu'=>'mymodule', 'leftmenu'=>'mymodule_myobject_new', 'url'=>'/mymodule/myobject_card.php?action=create', @@ -323,7 +323,6 @@ class modMyModule extends DolibarrModules 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both ); END MODULEBUILDER LEFTMENU MYOBJECT */ - // Exports profiles provided by this module $r = 1; /* BEGIN MODULEBUILDER EXPORT MYOBJECT */ diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php index d8b836a6593..d585815e805 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php @@ -47,10 +47,10 @@ class doc_generic_myobject_odt extends ModelePDFMyObject public $emetteur; /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = array(5, 5); + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.6 = array(5, 6) + */ + public $phpmin = array(5, 6); /** * @var string Dolibarr version of the loaded document @@ -136,9 +136,9 @@ class doc_generic_myobject_odt extends ModelePDFMyObject if (!$tmpdir) { unset($listofdir[$key]); continue; } - if (!is_dir($tmpdir)) $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); - else - { + if (!is_dir($tmpdir)) { + $texttitle .= img_warning($langs->trans("ErrorDirNotFound", $tmpdir), 0); + } else { $tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.(ods|odt)'); if (count($tmpfiles)) $listoffiles = array_merge($listoffiles, $tmpfiles); } @@ -274,9 +274,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $format = $conf->global->MAIN_DOC_USE_TIMING; if ($format == '1') $format = '%Y%m%d%H%M%S'; $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; - } - else - { + } else { $filename = $newfiletmp.'.'.$newfileformat; } $file = $dir.'/'.$filename; @@ -308,19 +306,17 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // if we have a CUSTOMER contact and we dont use it as recipient we store the contact object for later use $contactobject = $object->contact; } - } - else - { + } else { $socobject = $object->thirdparty; } // Make substitution $substitutionarray = array( - '__FROM_NAME__' => $this->emetteur->name, - '__FROM_EMAIL__' => $this->emetteur->email, - '__TOTAL_TTC__' => $object->total_ttc, - '__TOTAL_HT__' => $object->total_ht, - '__TOTAL_VAT__' => $object->total_vat + '__FROM_NAME__' => $this->emetteur->name, + '__FROM_EMAIL__' => $this->emetteur->email, + '__TOTAL_TTC__' => $object->total_ttc, + '__TOTAL_HT__' => $object->total_ht, + '__TOTAL_VAT__' => $object->total_vat ); complete_substitutions_array($substitutionarray, $langs, $object); // Call the ODTSubstitution hook @@ -347,8 +343,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject 'DELIMITER_RIGHT' => '}' ) ); - } - catch (Exception $e) + } catch (Exception $e) { $this->error = $e->getMessage(); dol_syslog($e->getMessage(), LOG_INFO); @@ -364,8 +359,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject // Make substitutions into odt of freetext try { $odfHandler->setVars('free_text', $newfreetext, true, 'UTF-8'); - } - catch (OdfException $e) + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } @@ -392,29 +386,25 @@ class doc_generic_myobject_odt extends ModelePDFMyObject foreach ($tmparray as $key=>$value) { try { - if (preg_match('/logo$/', $key)) // Image - { + if (preg_match('/logo$/', $key)) { + // Image if (file_exists($value)) $odfHandler->setImage($key, $value); else $odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8'); - } - else // Text - { + } else { + // Text $odfHandler->setVars($key, $value, true, 'UTF-8'); } - } - catch (OdfException $e) + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } } // Replace tags of lines - try - { + try { $foundtagforlines = 1; try { $listlines = $odfHandler->setSegment('lines'); - } - catch (OdfException $e) + } catch (OdfException $e) { // We may arrive here if tags for lines not present into template $foundtagforlines = 0; @@ -433,15 +423,12 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $reshook = $hookmanager->executeHooks('ODTSubstitutionLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks foreach ($tmparray as $key => $val) { - try - { + try { $listlines->setVars($key, $val, true, 'UTF-8'); - } - catch (OdfException $e) + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); - } - catch (SegmentException $e) + } catch (SegmentException $e) { dol_syslog($e->getMessage(), LOG_INFO); } @@ -450,8 +437,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject } $odfHandler->mergeSegment($listlines); } - } - catch (OdfException $e) + } catch (OdfException $e) { $this->error = $e->getMessage(); dol_syslog($this->error, LOG_WARNING); @@ -464,8 +450,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject { try { $odfHandler->setVars($key, $value, true, 'UTF-8'); - } - catch (OdfException $e) + } catch (OdfException $e) { dol_syslog($e->getMessage(), LOG_INFO); } @@ -485,8 +470,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject dol_syslog($e->getMessage(), LOG_INFO); return -1; } - } - else { + } else { try { $odfHandler->saveToDisk($file); } catch (Exception $e) { @@ -507,9 +491,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject $this->result = array('fullpath'=>$file); return 1; // Success - } - else - { + } else { $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); return -1; } diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 417a3b0c173..ea9eeed797d 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -43,82 +43,82 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; */ class pdf_standard_myobject extends ModelePDFMyObject { - /** - * @var DoliDb Database handler - */ - public $db; + /** + * @var DoliDb Database handler + */ + public $db; /** - * @var string model name - */ - public $name; + * @var string model name + */ + public $name; /** - * @var string model description (short text) - */ - public $description; - - /** - * @var int Save the name of generated file as the main doc when generating a doc with this template - */ - public $update_main_doc_field; + * @var string model description (short text) + */ + public $description; /** - * @var string document type - */ - public $type; + * @var int Save the name of generated file as the main doc when generating a doc with this template + */ + public $update_main_doc_field; /** - * @var array Minimum version of PHP required by module. - * e.g.: PHP ≥ 5.5 = array(5, 5) - */ - public $phpmin = array(5, 5); + * @var string document type + */ + public $type; /** - * Dolibarr version of the loaded document - * @var string - */ + * @var array Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.6 = array(5, 6) + */ + public $phpmin = array(5, 6); + + /** + * Dolibarr version of the loaded document + * @var string + */ public $version = 'dolibarr'; - /** - * @var int page_largeur - */ - public $page_largeur; + /** + * @var int page_largeur + */ + public $page_largeur; /** - * @var int page_hauteur - */ - public $page_hauteur; + * @var int page_hauteur + */ + public $page_hauteur; /** - * @var array format - */ - public $format; + * @var array format + */ + public $format; /** - * @var int marge_gauche - */ + * @var int marge_gauche + */ public $marge_gauche; /** - * @var int marge_droite - */ + * @var int marge_droite + */ public $marge_droite; /** - * @var int marge_haute - */ + * @var int marge_haute + */ public $marge_haute; /** - * @var int marge_basse - */ + * @var int marge_basse + */ public $marge_basse; - /** - * Issuer - * @var Societe Object that emits - */ + /** + * Issuer + * @var Societe Object that emits + */ public $emetteur; /** @@ -161,17 +161,6 @@ class pdf_standard_myobject extends ModelePDFMyObject $this->marge_haute = isset($conf->global->MAIN_PDF_MARGIN_TOP) ? $conf->global->MAIN_PDF_MARGIN_TOP : 10; $this->marge_basse = isset($conf->global->MAIN_PDF_MARGIN_BOTTOM) ? $conf->global->MAIN_PDF_MARGIN_BOTTOM : 10; - $this->option_logo = 1; // Display logo - $this->option_tva = 1; // Manage the vat option FACTURE_TVAOPTION - $this->option_modereg = 1; // Display payment mode - $this->option_condreg = 1; // Display payment terms - $this->option_codeproduitservice = 1; // Display product-service code - $this->option_multilang = 1; // Available in several languages - $this->option_escompte = 1; // Displays if there has been a discount - $this->option_credit_note = 1; // Support credit notes - $this->option_freetext = 1; // Support add of a personalised text - $this->option_draft_watermark = 1; // Support add of a watermark on drafts - // Get source company $this->emetteur = $mysoc; if (empty($this->emetteur->country_code)) $this->emetteur->country_code = substr($langs->defaultlang, -2); // By default, if was not defined @@ -193,50 +182,50 @@ class pdf_standard_myobject extends ModelePDFMyObject } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Function to build pdf onto disk - * - * @param Object $object Object to generate - * @param Translate $outputlangs Lang output object - * @param string $srctemplatepath Full path of source filename for generator using a template file - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return int 1=OK, 0=KO + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Function to build pdf onto disk + * + * @param Object $object Object to generate + * @param Translate $outputlangs Lang output object + * @param string $srctemplatepath Full path of source filename for generator using a template file + * @param int $hidedetails Do not show line details + * @param int $hidedesc Do not show desc + * @param int $hideref Do not show ref + * @return int 1=OK, 0=KO */ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidedetails = 0, $hidedesc = 0, $hideref = 0) { - // phpcs:enable - global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; + // phpcs:enable + global $user, $langs, $conf, $mysoc, $db, $hookmanager, $nblines; - dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); + dol_syslog("write_file outputlangs->defaultlang=".(is_object($outputlangs) ? $outputlangs->defaultlang : 'null')); - if (!is_object($outputlangs)) $outputlangs = $langs; - // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO - if (!empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output = 'ISO-8859-1'; + if (!is_object($outputlangs)) $outputlangs = $langs; + // For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO + if (!empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output = 'ISO-8859-1'; - // Load translation files required by the page - $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); + // Load translation files required by the page + $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies")); - if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) { - global $outputlangsbis; - $outputlangsbis = new Translate('', $conf); - $outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE); - $outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies")); - } + if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) { + global $outputlangsbis; + $outputlangsbis = new Translate('', $conf); + $outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE); + $outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies")); + } - $nblines = (is_array($object->lines) ? count($object->lines) : 0); + $nblines = (is_array($object->lines) ? count($object->lines) : 0); - $hidetop = 0; - if (!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)) { - $hidetop = $conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE; - } + $hidetop = 0; + if (!empty($conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE)) { + $hidetop = $conf->global->MAIN_PDF_DISABLE_COL_HEAD_TITLE; + } - // Loop on each lines to detect if there is at least one image to show - $realpatharray = array(); - $this->atleastonephoto = false; - /* + // Loop on each lines to detect if there is at least one image to show + $realpatharray = array(); + $this->atleastonephoto = false; + /* if (!empty($conf->global->MAIN_GENERATE_MYOBJECT_WITH_PICTURE)) { $objphoto = new Product($this->db); @@ -289,528 +278,528 @@ class pdf_standard_myobject extends ModelePDFMyObject } */ - //if (count($realpatharray) == 0) $this->posxpicture=$this->posxtva; + //if (count($realpatharray) == 0) $this->posxpicture=$this->posxtva; - if ($conf->mymodule->dir_output.'/myobject') - { - $object->fetch_thirdparty(); + if ($conf->mymodule->dir_output.'/myobject') + { + $object->fetch_thirdparty(); - // Definition of $dir and $file - if ($object->specimen) - { - $dir = $conf->mymodule->dir_output.'/myobject'; - $file = $dir."/SPECIMEN.pdf"; - } else { - $objectref = dol_sanitizeFileName($object->ref); - $dir = $conf->mymodule->dir_output.'/myobject/'.$objectref; - $file = $dir."/".$objectref.".pdf"; - } - if (!file_exists($dir)) - { - if (dol_mkdir($dir) < 0) - { - $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); - return 0; - } - } + // Definition of $dir and $file + if ($object->specimen) + { + $dir = $conf->mymodule->dir_output.'/myobject'; + $file = $dir."/SPECIMEN.pdf"; + } else { + $objectref = dol_sanitizeFileName($object->ref); + $dir = $conf->mymodule->dir_output.'/myobject/'.$objectref; + $file = $dir."/".$objectref.".pdf"; + } + if (!file_exists($dir)) + { + if (dol_mkdir($dir) < 0) + { + $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); + return 0; + } + } - if (file_exists($dir)) - { - // Add pdfgeneration hook - if (!is_object($hookmanager)) - { - include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; - $hookmanager = new HookManager($this->db); - } - $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); - global $action; - $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks + if (file_exists($dir)) + { + // Add pdfgeneration hook + if (!is_object($hookmanager)) + { + include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; + $hookmanager = new HookManager($this->db); + } + $hookmanager->initHooks(array('pdfgeneration')); + $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + global $action; + $reshook = $hookmanager->executeHooks('beforePDFCreation', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks - // Set nblines with the new facture lines content after hook - $nblines = (is_array($object->lines) ? count($object->lines) : 0); + // Set nblines with the new facture lines content after hook + $nblines = (is_array($object->lines) ? count($object->lines) : 0); - // Create pdf instance - $pdf = pdf_getInstance($this->format); - $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance - $pdf->SetAutoPageBreak(1, 0); + // Create pdf instance + $pdf = pdf_getInstance($this->format); + $default_font_size = pdf_getPDFFontSize($outputlangs); // Must be after pdf_getInstance + $pdf->SetAutoPageBreak(1, 0); - $heightforinfotot = 50; // Height reserved to output the info and total part and payment part - $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page - $heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin) + $heightforinfotot = 50; // Height reserved to output the info and total part and payment part + $heightforfreetext = (isset($conf->global->MAIN_PDF_FREETEXT_HEIGHT) ? $conf->global->MAIN_PDF_FREETEXT_HEIGHT : 5); // Height reserved to output the free text on last page + $heightforfooter = $this->marge_basse + (empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 12 : 22); // Height reserved to output the footer (value include bottom margin) - if (class_exists('TCPDF')) - { - $pdf->setPrintHeader(false); - $pdf->setPrintFooter(false); - } - $pdf->SetFont(pdf_getPDFFont($outputlangs)); + if (class_exists('TCPDF')) + { + $pdf->setPrintHeader(false); + $pdf->setPrintFooter(false); + } + $pdf->SetFont(pdf_getPDFFont($outputlangs)); - // Set path to the background PDF File - if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) - { - $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); - $tplidx = $pdf->importPage(1); - } + // Set path to the background PDF File + if (!empty($conf->global->MAIN_ADD_PDF_BACKGROUND)) + { + $pagecount = $pdf->setSourceFile($conf->mycompany->multidir_output[$object->entity].'/'.$conf->global->MAIN_ADD_PDF_BACKGROUND); + $tplidx = $pdf->importPage(1); + } - $pdf->Open(); - $pagenb = 0; - $pdf->SetDrawColor(128, 128, 128); + $pdf->Open(); + $pagenb = 0; + $pdf->SetDrawColor(128, 128, 128); - $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); - $pdf->SetSubject($outputlangs->transnoentities("PdfTitle")); - $pdf->SetCreator("Dolibarr ".DOL_VERSION); - $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); - $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); - if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); + $pdf->SetTitle($outputlangs->convToOutputCharset($object->ref)); + $pdf->SetSubject($outputlangs->transnoentities("PdfTitle")); + $pdf->SetCreator("Dolibarr ".DOL_VERSION); + $pdf->SetAuthor($outputlangs->convToOutputCharset($user->getFullName($outputlangs))); + $pdf->SetKeyWords($outputlangs->convToOutputCharset($object->ref)." ".$outputlangs->transnoentities("PdfTitle")." ".$outputlangs->convToOutputCharset($object->thirdparty->name)); + if (!empty($conf->global->MAIN_DISABLE_PDF_COMPRESSION)) $pdf->SetCompression(false); - // Set certificate - $cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT; - // If user has no certificate, we try to take the company one - if (!$cert) { - $cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT; - } - // If a certificate is found - if ($cert) { - $info = array( - 'Name' => $this->emetteur->name, - 'Location' => getCountry($this->emetteur->country_code, 0), - 'Reason' => 'MYOBJECT', - 'ContactInfo' => $this->emetteur->email - ); - $pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info); - } + // Set certificate + $cert = empty($user->conf->CERTIFICATE_CRT) ? '' : $user->conf->CERTIFICATE_CRT; + // If user has no certificate, we try to take the company one + if (!$cert) { + $cert = empty($conf->global->CERTIFICATE_CRT) ? '' : $conf->global->CERTIFICATE_CRT; + } + // If a certificate is found + if ($cert) { + $info = array( + 'Name' => $this->emetteur->name, + 'Location' => getCountry($this->emetteur->country_code, 0), + 'Reason' => 'MYOBJECT', + 'ContactInfo' => $this->emetteur->email + ); + $pdf->setSignature($cert, $cert, $this->emetteur->name, '', 2, $info); + } - $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right + $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right - // New page - $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - $pagenb++; + // New page + $pdf->AddPage(); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + $pagenb++; - $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); - $pdf->SetFont('', '', $default_font_size - 1); - $pdf->MultiCell(0, 3, ''); // Set interline to 3 - $pdf->SetTextColor(0, 0, 0); + $top_shift = $this->_pagehead($pdf, $object, 1, $outputlangs, $outputlangsbis); + $pdf->SetFont('', '', $default_font_size - 1); + $pdf->MultiCell(0, 3, ''); // Set interline to 3 + $pdf->SetTextColor(0, 0, 0); - $tab_top = 90 + $top_shift; - $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); - $tab_height = 130 - $top_shift; - $tab_height_newpage = 150; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $tab_height_newpage -= $top_shift; + $tab_top = 90 + $top_shift; + $tab_top_newpage = (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD) ? 42 + $top_shift : 10); + $tab_height = 130 - $top_shift; + $tab_height_newpage = 150; + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $tab_height_newpage -= $top_shift; - $nexY = $tab_top - 1; + $nexY = $tab_top - 1; - // Display notes - $notetoshow = empty($object->note_public) ? '' : $object->note_public; - // Extrafields in note - $extranote = $this->getExtrafieldsInHtml($object, $outputlangs); - if (!empty($extranote)) - { - $notetoshow = dol_concatdesc($notetoshow, $extranote); - } + // Display notes + $notetoshow = empty($object->note_public) ? '' : $object->note_public; + // Extrafields in note + $extranote = $this->getExtrafieldsInHtml($object, $outputlangs); + if (!empty($extranote)) + { + $notetoshow = dol_concatdesc($notetoshow, $extranote); + } - $pagenb = $pdf->getPage(); - if ($notetoshow) - { + $pagenb = $pdf->getPage(); + if ($notetoshow) + { $tab_top -= 2; - $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; - $pageposbeforenote = $pagenb; + $tab_width = $this->page_largeur - $this->marge_gauche - $this->marge_droite; + $pageposbeforenote = $pagenb; - $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); - complete_substitutions_array($substitutionarray, $outputlangs, $object); - $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); - $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); + $substitutionarray = pdf_getSubstitutionArray($outputlangs, null, $object); + complete_substitutions_array($substitutionarray, $outputlangs, $object); + $notetoshow = make_substitutions($notetoshow, $substitutionarray, $outputlangs); + $notetoshow = convertBackOfficeMediasLinksToPublicLinks($notetoshow); - $pdf->startTransaction(); + $pdf->startTransaction(); - $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); - // Description - $pageposafternote = $pdf->getPage(); - $posyafter = $pdf->GetY(); + $pdf->SetFont('', '', $default_font_size - 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); + // Description + $pageposafternote = $pdf->getPage(); + $posyafter = $pdf->GetY(); - if ($pageposafternote > $pageposbeforenote) - { - $pdf->rollbackTransaction(true); + if ($pageposafternote > $pageposbeforenote) + { + $pdf->rollbackTransaction(true); - // prepare pages to receive notes - while ($pagenb < $pageposafternote) { - $pdf->AddPage(); - $pagenb++; - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); - // $this->_pagefoot($pdf,$object,$outputlangs,1); - $pdf->setTopMargin($tab_top_newpage); - // The only function to edit the bottom margin of current page to set it. - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); - } + // prepare pages to receive notes + while ($pagenb < $pageposafternote) { + $pdf->AddPage(); + $pagenb++; + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + // $this->_pagefoot($pdf,$object,$outputlangs,1); + $pdf->setTopMargin($tab_top_newpage); + // The only function to edit the bottom margin of current page to set it. + $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); + } - // back to start - $pdf->setPage($pageposbeforenote); - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); - $pdf->SetFont('', '', $default_font_size - 1); - $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); - $pageposafternote = $pdf->getPage(); + // back to start + $pdf->setPage($pageposbeforenote); + $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); + $pdf->SetFont('', '', $default_font_size - 1); + $pdf->writeHTMLCell(190, 3, $this->posxdesc - 1, $tab_top, dol_htmlentitiesbr($notetoshow), 0, 1); + $pageposafternote = $pdf->getPage(); - $posyafter = $pdf->GetY(); + $posyafter = $pdf->GetY(); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text - { - $pdf->AddPage('', '', true); - $pagenb++; - $pageposafternote++; - $pdf->setPage($pageposafternote); - $pdf->setTopMargin($tab_top_newpage); - // The only function to edit the bottom margin of current page to set it. - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); - //$posyafter = $tab_top_newpage; - } + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) // There is no space left for total+free text + { + $pdf->AddPage('', '', true); + $pagenb++; + $pageposafternote++; + $pdf->setPage($pageposafternote); + $pdf->setTopMargin($tab_top_newpage); + // The only function to edit the bottom margin of current page to set it. + $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext); + //$posyafter = $tab_top_newpage; + } - // apply note frame to previous pages - $i = $pageposbeforenote; - while ($i < $pageposafternote) { - $pdf->setPage($i); + // apply note frame to previous pages + $i = $pageposbeforenote; + while ($i < $pageposafternote) { + $pdf->setPage($i); - $pdf->SetDrawColor(128, 128, 128); - // Draw note frame - if ($i > $pageposbeforenote) { - $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter); - $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); - } else { - $height_note = $this->page_hauteur - ($tab_top + $heightforfooter); - $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); - } + $pdf->SetDrawColor(128, 128, 128); + // Draw note frame + if ($i > $pageposbeforenote) { + $height_note = $this->page_hauteur - ($tab_top_newpage + $heightforfooter); + $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); + } else { + $height_note = $this->page_hauteur - ($tab_top + $heightforfooter); + $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); + } - // Add footer - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - $this->_pagefoot($pdf, $object, $outputlangs, 1); + // Add footer + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. + $this->_pagefoot($pdf, $object, $outputlangs, 1); - $i++; - } + $i++; + } - // apply note frame to last page - $pdf->setPage($pageposafternote); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); - $height_note = $posyafter - $tab_top_newpage; - $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); - } else // No pagebreak - { - $pdf->commitTransaction(); - $posyafter = $pdf->GetY(); - $height_note = $posyafter - $tab_top; - $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); + // apply note frame to last page + $pdf->setPage($pageposafternote); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + $height_note = $posyafter - $tab_top_newpage; + $pdf->Rect($this->marge_gauche, $tab_top_newpage - 1, $tab_width, $height_note + 1); + } else // No pagebreak + { + $pdf->commitTransaction(); + $posyafter = $pdf->GetY(); + $height_note = $posyafter - $tab_top; + $pdf->Rect($this->marge_gauche, $tab_top - 1, $tab_width, $height_note + 1); - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) - { - // not enough space, need to add page - $pdf->AddPage('', '', true); - $pagenb++; - $pageposafternote++; - $pdf->setPage($pageposafternote); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + 20))) + { + // not enough space, need to add page + $pdf->AddPage('', '', true); + $pagenb++; + $pageposafternote++; + $pdf->setPage($pageposafternote); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); - $posyafter = $tab_top_newpage; - } - } + $posyafter = $tab_top_newpage; + } + } - $tab_height = $tab_height - $height_note; - $tab_top = $posyafter + 6; - } else { - $height_note = 0; - } + $tab_height = $tab_height - $height_note; + $tab_top = $posyafter + 6; + } else { + $height_note = 0; + } - // Use new auto column system - $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); + // Use new auto column system + $this->prepareArrayColumnField($object, $outputlangs, $hidedetails, $hidedesc, $hideref); - // Table simulation to know the height of the title line - $pdf->startTransaction(); - $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); - $pdf->rollbackTransaction(true); + // Table simulation to know the height of the title line + $pdf->startTransaction(); + $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); + $pdf->rollbackTransaction(true); - $nexY = $tab_top + $this->tabTitleHeight; + $nexY = $tab_top + $this->tabTitleHeight; - // Loop on each lines - $pageposbeforeprintlines = $pdf->getPage(); - $pagenb = $pageposbeforeprintlines; - for ($i = 0; $i < $nblines; $i++) - { - $curY = $nexY; - $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage - $pdf->SetTextColor(0, 0, 0); + // Loop on each lines + $pageposbeforeprintlines = $pdf->getPage(); + $pagenb = $pageposbeforeprintlines; + for ($i = 0; $i < $nblines; $i++) + { + $curY = $nexY; + $pdf->SetFont('', '', $default_font_size - 1); // Into loop to work with multipage + $pdf->SetTextColor(0, 0, 0); - // Define size of image if we need it - $imglinesize = array(); - if (!empty($realpatharray[$i])) $imglinesize = pdf_getSizeForImage($realpatharray[$i]); + // Define size of image if we need it + $imglinesize = array(); + if (!empty($realpatharray[$i])) $imglinesize = pdf_getSizeForImage($realpatharray[$i]); - $pdf->setTopMargin($tab_top_newpage); - $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. - $pageposbefore = $pdf->getPage(); + $pdf->setTopMargin($tab_top_newpage); + $pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it. + $pageposbefore = $pdf->getPage(); - $showpricebeforepagebreak = 1; - $posYAfterImage = 0; + $showpricebeforepagebreak = 1; + $posYAfterImage = 0; - if ($this->getColumnStatus('photo')) - { - // We start with Photo of product line - if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // If photo too high, we moved completely on new page - { - $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - $pdf->setPage($pageposbefore + 1); + if ($this->getColumnStatus('photo')) + { + // We start with Photo of product line + if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // If photo too high, we moved completely on new page + { + $pdf->AddPage('', '', true); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + $pdf->setPage($pageposbefore + 1); - $curY = $tab_top_newpage; + $curY = $tab_top_newpage; // Allows data in the first page if description is long enough to break in multiples pages if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) $showpricebeforepagebreak = 1; else $showpricebeforepagebreak = 0; - } + } - if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($imglinesize['height'])) - { - $pdf->Image($realpatharray[$i], $this->getColumnContentXStart('photo'), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi - // $pdf->Image does not increase value return by getY, so we save it manually - $posYAfterImage = $curY + $imglinesize['height']; - } - } + if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($imglinesize['height'])) + { + $pdf->Image($realpatharray[$i], $this->getColumnContentXStart('photo'), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi + // $pdf->Image does not increase value return by getY, so we save it manually + $posYAfterImage = $curY + $imglinesize['height']; + } + } - // Description of product line - if ($this->getColumnStatus('desc')) - { - $pdf->startTransaction(); + // Description of product line + if ($this->getColumnStatus('desc')) + { + $pdf->startTransaction(); - $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); - $pageposafter = $pdf->getPage(); + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); + $pageposafter = $pdf->getPage(); - if ($pageposafter > $pageposbefore) // There is a pagebreak - { - $pdf->rollbackTransaction(true); - $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. + if ($pageposafter > $pageposbefore) // There is a pagebreak + { + $pdf->rollbackTransaction(true); + $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); + $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc); - $pageposafter = $pdf->getPage(); - $posyafter = $pdf->GetY(); - //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; - if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text - { - if ($i == ($nblines - 1)) // No more lines, and no space left to show total, so we create a new page - { - $pdf->AddPage('', '', true); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - $pdf->setPage($pageposafter + 1); - } - } else { - // We found a page break + $pageposafter = $pdf->getPage(); + $posyafter = $pdf->GetY(); + //var_dump($posyafter); var_dump(($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))); exit; + if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text + { + if ($i == ($nblines - 1)) // No more lines, and no space left to show total, so we create a new page + { + $pdf->AddPage('', '', true); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + $pdf->setPage($pageposafter + 1); + } + } else { + // We found a page break // Allows data in the first page if description is long enough to break in multiples pages if (!empty($conf->global->MAIN_PDF_DATA_ON_FIRST_PAGE)) $showpricebeforepagebreak = 1; else $showpricebeforepagebreak = 0; - } - } else // No pagebreak - { - $pdf->commitTransaction(); - } - } + } + } else // No pagebreak + { + $pdf->commitTransaction(); + } + } - $nexY = $pdf->GetY(); - $pageposafter = $pdf->getPage(); - $pdf->setPage($pageposbefore); - $pdf->setTopMargin($this->marge_haute); - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. + $nexY = $pdf->GetY(); + $pageposafter = $pdf->getPage(); + $pdf->setPage($pageposbefore); + $pdf->setTopMargin($this->marge_haute); + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - // We suppose that a too long description or photo were moved completely on next page - if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { - $pdf->setPage($pageposafter); $curY = $tab_top_newpage; - } + // We suppose that a too long description or photo were moved completely on next page + if ($pageposafter > $pageposbefore && empty($showpricebeforepagebreak)) { + $pdf->setPage($pageposafter); $curY = $tab_top_newpage; + } - $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut + $pdf->SetFont('', '', $default_font_size - 1); // On repositionne la police par defaut - // Quantity - // Enough for 6 chars - if ($this->getColumnStatus('qty')) - { - $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); - $this->printStdColumnContent($pdf, $curY, 'qty', $qty); - $nexY = max($pdf->GetY(), $nexY); - } + // Quantity + // Enough for 6 chars + if ($this->getColumnStatus('qty')) + { + $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); + $this->printStdColumnContent($pdf, $curY, 'qty', $qty); + $nexY = max($pdf->GetY(), $nexY); + } - // Extrafields - if (!empty($object->lines[$i]->array_options)) { - foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { - if ($this->getColumnStatus($extrafieldColKey)) - { - $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); - $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); - $nexY = max($pdf->GetY(), $nexY); - } - } - } + // Extrafields + if (!empty($object->lines[$i]->array_options)) { + foreach ($object->lines[$i]->array_options as $extrafieldColKey => $extrafieldValue) { + if ($this->getColumnStatus($extrafieldColKey)) + { + $extrafieldValue = $this->getExtrafieldContent($object->lines[$i], $extrafieldColKey); + $this->printStdColumnContent($pdf, $curY, $extrafieldColKey, $extrafieldValue); + $nexY = max($pdf->GetY(), $nexY); + } + } + } - $parameters = array( - 'object' => $object, - 'i' => $i, - 'pdf' =>& $pdf, - 'curY' =>& $curY, - 'nexY' =>& $nexY, - 'outputlangs' => $outputlangs, - 'hidedetails' => $hidedetails - ); - $reshook = $hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook + $parameters = array( + 'object' => $object, + 'i' => $i, + 'pdf' =>& $pdf, + 'curY' =>& $curY, + 'nexY' =>& $nexY, + 'outputlangs' => $outputlangs, + 'hidedetails' => $hidedetails + ); + $reshook = $hookmanager->executeHooks('printPDFline', $parameters, $this); // Note that $object may have been modified by hook - $sign = 1; - // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva - $prev_progress = $object->lines[$i]->get_prev_progress($object->id); - if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation - { - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; - else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; - } else { - if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; - else $tvaligne = $sign * $object->lines[$i]->total_tva; - } + $sign = 1; + // Collecte des totaux par valeur de tva dans $this->tva["taux"]=total_tva + $prev_progress = $object->lines[$i]->get_prev_progress($object->id); + if ($prev_progress > 0 && !empty($object->lines[$i]->situation_percent)) // Compute progress from previous situation + { + if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; + else $tvaligne = $sign * $object->lines[$i]->total_tva * ($object->lines[$i]->situation_percent - $prev_progress) / $object->lines[$i]->situation_percent; + } else { + if ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) $tvaligne = $sign * $object->lines[$i]->multicurrency_total_tva; + else $tvaligne = $sign * $object->lines[$i]->total_tva; + } - $localtax1ligne = $object->lines[$i]->total_localtax1; - $localtax2ligne = $object->lines[$i]->total_localtax2; - $localtax1_rate = $object->lines[$i]->localtax1_tx; - $localtax2_rate = $object->lines[$i]->localtax2_tx; - $localtax1_type = $object->lines[$i]->localtax1_type; - $localtax2_type = $object->lines[$i]->localtax2_type; + $localtax1ligne = $object->lines[$i]->total_localtax1; + $localtax2ligne = $object->lines[$i]->total_localtax2; + $localtax1_rate = $object->lines[$i]->localtax1_tx; + $localtax2_rate = $object->lines[$i]->localtax2_tx; + $localtax1_type = $object->lines[$i]->localtax1_type; + $localtax2_type = $object->lines[$i]->localtax2_type; - if ($object->remise_percent) $tvaligne -= ($tvaligne * $object->remise_percent) / 100; - if ($object->remise_percent) $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; - if ($object->remise_percent) $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; + if ($object->remise_percent) $tvaligne -= ($tvaligne * $object->remise_percent) / 100; + if ($object->remise_percent) $localtax1ligne -= ($localtax1ligne * $object->remise_percent) / 100; + if ($object->remise_percent) $localtax2ligne -= ($localtax2ligne * $object->remise_percent) / 100; - $vatrate = (string) $object->lines[$i]->tva_tx; + $vatrate = (string) $object->lines[$i]->tva_tx; - // Retrieve type from database for backward compatibility with old records - if ((!isset($localtax1_type) || $localtax1_type == '' || !isset($localtax2_type) || $localtax2_type == '') // if tax type not defined - && (!empty($localtax1_rate) || !empty($localtax2_rate))) // and there is local tax - { - $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); - $localtax1_type = $localtaxtmp_array[0]; - $localtax2_type = $localtaxtmp_array[2]; - } + // Retrieve type from database for backward compatibility with old records + if ((!isset($localtax1_type) || $localtax1_type == '' || !isset($localtax2_type) || $localtax2_type == '') // if tax type not defined + && (!empty($localtax1_rate) || !empty($localtax2_rate))) // and there is local tax + { + $localtaxtmp_array = getLocalTaxesFromRate($vatrate, 0, $object->thirdparty, $mysoc); + $localtax1_type = $localtaxtmp_array[0]; + $localtax2_type = $localtaxtmp_array[2]; + } - // retrieve global local tax - if ($localtax1_type && $localtax1ligne != 0) { - $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; - } - if ($localtax2_type && $localtax2ligne != 0) { - $this->localtax2[$localtax2_type][$localtax2_rate] += $localtax2ligne; - } + // retrieve global local tax + if ($localtax1_type && $localtax1ligne != 0) { + $this->localtax1[$localtax1_type][$localtax1_rate] += $localtax1ligne; + } + if ($localtax2_type && $localtax2ligne != 0) { + $this->localtax2[$localtax2_type][$localtax2_rate] += $localtax2ligne; + } - if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate .= '*'; - if (!isset($this->tva[$vatrate])) $this->tva[$vatrate] = 0; - $this->tva[$vatrate] += $tvaligne; + if (($object->lines[$i]->info_bits & 0x01) == 0x01) $vatrate .= '*'; + if (!isset($this->tva[$vatrate])) $this->tva[$vatrate] = 0; + $this->tva[$vatrate] += $tvaligne; - $nexY = max($nexY, $posYAfterImage); + $nexY = max($nexY, $posYAfterImage); - // Add line - if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { - $pdf->setPage($pageposafter); - $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); - //$pdf->SetDrawColor(190,190,200); - $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); - $pdf->SetLineStyle(array('dash'=>0)); - } + // Add line + if (!empty($conf->global->MAIN_PDF_DASH_BETWEEN_LINES) && $i < ($nblines - 1)) { + $pdf->setPage($pageposafter); + $pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80))); + //$pdf->SetDrawColor(190,190,200); + $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY); + $pdf->SetLineStyle(array('dash'=>0)); + } - // Detect if some page were added automatically and output _tableau for past pages - while ($pagenb < $pageposafter) { - $pdf->setPage($pagenb); - if ($pagenb == $pageposbeforeprintlines) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); - } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); - } - $this->_pagefoot($pdf, $object, $outputlangs, 1); - $pagenb++; - $pdf->setPage($pagenb); - $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); - } + // Detect if some page were added automatically and output _tableau for past pages + while ($pagenb < $pageposafter) { + $pdf->setPage($pagenb); + if ($pagenb == $pageposbeforeprintlines) { + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); + } else { + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); + } + $this->_pagefoot($pdf, $object, $outputlangs, 1); + $pagenb++; + $pdf->setPage($pagenb); + $pdf->setPageOrientation('', 1, 0); // The only function to edit the bottom margin of current page to set it. + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + } - if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { - if ($pagenb == $pageposafter) { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); - } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); - } - $this->_pagefoot($pdf, $object, $outputlangs, 1); - // New page - $pdf->AddPage(); - if (!empty($tplidx)) $pdf->useTemplate($tplidx); - $pagenb++; - if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); - } - } + if (isset($object->lines[$i + 1]->pagebreak) && $object->lines[$i + 1]->pagebreak) { + if ($pagenb == $pageposafter) { + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforfooter, 0, $outputlangs, $hidetop, 1, $object->multicurrency_code, $outputlangsbis); + } else { + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforfooter, 0, $outputlangs, 1, 1, $object->multicurrency_code, $outputlangsbis); + } + $this->_pagefoot($pdf, $object, $outputlangs, 1); + // New page + $pdf->AddPage(); + if (!empty($tplidx)) $pdf->useTemplate($tplidx); + $pagenb++; + if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs); + } + } - // Show square - if ($pagenb == $pageposbeforeprintlines) - { - $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; - } else { - $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis); - $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; - } + // Show square + if ($pagenb == $pageposbeforeprintlines) + { + $this->_tableau($pdf, $tab_top, $this->page_hauteur - $tab_top - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, $hidetop, 0, $object->multicurrency_code, $outputlangsbis); + $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; + } else { + $this->_tableau($pdf, $tab_top_newpage, $this->page_hauteur - $tab_top_newpage - $heightforinfotot - $heightforfreetext - $heightforfooter, 0, $outputlangs, 1, 0, $object->multicurrency_code, $outputlangsbis); + $bottomlasttab = $this->page_hauteur - $heightforinfotot - $heightforfreetext - $heightforfooter + 1; + } - // Display infos area - //$posy = $this->drawInfoTable($pdf, $object, $bottomlasttab, $outputlangs); + // Display infos area + //$posy = $this->drawInfoTable($pdf, $object, $bottomlasttab, $outputlangs); - // Display total zone - //$posy = $this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); + // Display total zone + //$posy = $this->drawTotalTable($pdf, $object, $deja_regle, $bottomlasttab, $outputlangs); - // Display payment area - /* + // Display payment area + /* if (($deja_regle || $amount_credit_notes_included || $amount_deposits_included) && empty($conf->global->INVOICE_NO_PAYMENT_DETAILS)) { $posy = $this->drawPaymentsTable($pdf, $object, $posy, $outputlangs); } */ - // Pagefoot - $this->_pagefoot($pdf, $object, $outputlangs); - if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); + // Pagefoot + $this->_pagefoot($pdf, $object, $outputlangs); + if (method_exists($pdf, 'AliasNbPages')) $pdf->AliasNbPages(); - $pdf->Close(); + $pdf->Close(); - $pdf->Output($file, 'F'); + $pdf->Output($file, 'F'); - // Add pdfgeneration hook - $hookmanager->initHooks(array('pdfgeneration')); - $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); - global $action; - $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks - if ($reshook < 0) - { - $this->error = $hookmanager->error; - $this->errors = $hookmanager->errors; - } + // Add pdfgeneration hook + $hookmanager->initHooks(array('pdfgeneration')); + $parameters = array('file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs); + global $action; + $reshook = $hookmanager->executeHooks('afterPDFCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + if ($reshook < 0) + { + $this->error = $hookmanager->error; + $this->errors = $hookmanager->errors; + } - if (!empty($conf->global->MAIN_UMASK)) - @chmod($file, octdec($conf->global->MAIN_UMASK)); + if (!empty($conf->global->MAIN_UMASK)) + @chmod($file, octdec($conf->global->MAIN_UMASK)); - $this->result = array('fullpath'=>$file); + $this->result = array('fullpath'=>$file); - return 1; // No error - } else { - $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); - return 0; - } - } else { - $this->error = $langs->transnoentities("ErrorConstantNotDefined", "FAC_OUTPUTDIR"); - return 0; - } + return 1; // No error + } else { + $this->error = $langs->transnoentities("ErrorCanNotCreateDir", $dir); + return 0; + } + } else { + $this->error = $langs->transnoentities("ErrorConstantNotDefined", "FAC_OUTPUTDIR"); + return 0; + } } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps @@ -883,7 +872,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop); if (empty($hidetop)) { - $pdf->line($this->marge_gauche, $tab_top + $this->tabTitleHeight, $this->page_largeur - $this->marge_droite, $tab_top + $this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter + $pdf->line($this->marge_gauche, $tab_top + $this->tabTitleHeight, $this->page_largeur - $this->marge_droite, $tab_top + $this->tabTitleHeight); // line takes a position y in 2nd parameter and 4th parameter } } @@ -910,10 +899,10 @@ class pdf_standard_myobject extends ModelePDFMyObject pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == Facture::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) - { - pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK); - } + if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) + { + pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK); + } $pdf->SetTextColor(0, 0, 60); $pdf->SetFont('', 'B', $default_font_size + 3); @@ -921,7 +910,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $w = 110; $posy = $this->marge_haute; - $posx = $this->page_largeur - $this->marge_droite - $w; + $posx = $this->page_largeur - $this->marge_droite - $w; $pdf->SetXY($this->marge_gauche, $posy); @@ -940,7 +929,7 @@ class pdf_standard_myobject extends ModelePDFMyObject } if (is_readable($logo)) { - $height = pdf_getHeightForLogo($logo); + $height = pdf_getHeightForLogo($logo); $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height); // width=0 (auto) } else { $pdf->SetTextColor(200, 0, 0); @@ -970,7 +959,7 @@ class pdf_standard_myobject extends ModelePDFMyObject $pdf->SetXY($posx, $posy); $pdf->SetTextColor(0, 0, 60); $textref = $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref); - if ($object->statut == Facture::STATUS_DRAFT) + if ($object->statut == $object::STATUS_DRAFT) { $pdf->SetTextColor(128, 0, 0); $textref .= ' - '.$outputlangs->transnoentities("NotValidated"); @@ -1033,16 +1022,16 @@ class pdf_standard_myobject extends ModelePDFMyObject // Get contact if (!empty($conf->global->DOC_SHOW_FIRST_SALES_REP)) { - $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); - if (count($arrayidcontact) > 0) - { - $usertmp = new User($this->db); - $usertmp->fetch($arrayidcontact[0]); - $posy += 4; - $pdf->SetXY($posx, $posy); - $pdf->SetTextColor(0, 0, 60); - $pdf->MultiCell($w, 3, $langs->transnoentities("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); - } + $arrayidcontact = $object->getIdContact('internal', 'SALESREPFOLL'); + if (count($arrayidcontact) > 0) + { + $usertmp = new User($this->db); + $usertmp->fetch($arrayidcontact[0]); + $posy += 4; + $pdf->SetXY($posx, $posy); + $pdf->SetTextColor(0, 0, 60); + $pdf->MultiCell($w, 3, $langs->transnoentities("SalesRepresentative")." : ".$usertmp->getFullName($langs), '', 'R'); + } } $posy += 1; @@ -1149,8 +1138,8 @@ class pdf_standard_myobject extends ModelePDFMyObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Show footer of page. Need this->emetteur object - * - * @param PDF $pdf PDF + * + * @param TCPDF $pdf PDF * @param Object $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text @@ -1168,28 +1157,28 @@ class pdf_standard_myobject extends ModelePDFMyObject * * @param object $object common object * @param Translate $outputlangs langs - * @param int $hidedetails Do not show line details - * @param int $hidedesc Do not show desc - * @param int $hideref Do not show ref - * @return null - */ - public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) - { - global $conf, $hookmanager; + * @param int $hidedetails Do not show line details + * @param int $hidedesc Do not show desc + * @param int $hideref Do not show ref + * @return null + */ + public function defineColumnField($object, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0) + { + global $conf, $hookmanager; - // Default field style for content - $this->defaultContentsFieldsStyle = array( - 'align' => 'R', // R,C,L - 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ); + // Default field style for content + $this->defaultContentsFieldsStyle = array( + 'align' => 'R', // R,C,L + 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ); - // Default field style for content - $this->defaultTitlesFieldsStyle = array( - 'align' => 'C', // R,C,L - 'padding' => array(0.5, 0, 0.5, 0), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ); + // Default field style for content + $this->defaultTitlesFieldsStyle = array( + 'align' => 'C', // R,C,L + 'padding' => array(0.5, 0, 0.5, 0), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ); - /* + /* * For exemple $this->cols['theColKey'] = array( 'rank' => $rank, // int : use for ordering columns @@ -1207,162 +1196,162 @@ class pdf_standard_myobject extends ModelePDFMyObject ); */ - $rank = 0; // do not use negative rank - $this->cols['desc'] = array( - 'rank' => $rank, - 'width' => false, // only for desc - 'status' => true, - 'title' => array( - 'textkey' => 'Designation', // use lang key is usefull in somme case with module - 'align' => 'L', - // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label - // 'label' => ' ', // the final label - 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'content' => array( - 'align' => 'L', - 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - ); + $rank = 0; // do not use negative rank + $this->cols['desc'] = array( + 'rank' => $rank, + 'width' => false, // only for desc + 'status' => true, + 'title' => array( + 'textkey' => 'Designation', // use lang key is usefull in somme case with module + 'align' => 'L', + // 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label + // 'label' => ' ', // the final label + 'padding' => array(0.5, 0.5, 0.5, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'content' => array( + 'align' => 'L', + 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + ); - // PHOTO - $rank = $rank + 10; - $this->cols['photo'] = array( - 'rank' => $rank, - 'width' => (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH), // in mm - 'status' => false, - 'title' => array( - 'textkey' => 'Photo', - 'label' => ' ' - ), - 'content' => array( - 'padding' => array(0, 0, 0, 0), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left - ), - 'border-left' => false, // remove left line separator - ); + // PHOTO + $rank = $rank + 10; + $this->cols['photo'] = array( + 'rank' => $rank, + 'width' => (empty($conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH) ? 20 : $conf->global->MAIN_DOCUMENTS_WITH_PICTURE_WIDTH), // in mm + 'status' => false, + 'title' => array( + 'textkey' => 'Photo', + 'label' => ' ' + ), + 'content' => array( + 'padding' => array(0, 0, 0, 0), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left + ), + 'border-left' => false, // remove left line separator + ); - if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE) && !empty($this->atleastonephoto)) - { - $this->cols['photo']['status'] = true; - } + if (!empty($conf->global->MAIN_GENERATE_INVOICES_WITH_PICTURE) && !empty($this->atleastonephoto)) + { + $this->cols['photo']['status'] = true; + } - $rank = $rank + 10; - $this->cols['vat'] = array( - 'rank' => $rank, - 'status' => false, - 'width' => 16, // in mm - 'title' => array( - 'textkey' => 'VAT' - ), - 'border-left' => true, // add left line separator - ); + $rank = $rank + 10; + $this->cols['vat'] = array( + 'rank' => $rank, + 'status' => false, + 'width' => 16, // in mm + 'title' => array( + 'textkey' => 'VAT' + ), + 'border-left' => true, // add left line separator + ); - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) - { - $this->cols['vat']['status'] = true; - } + if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT) && empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT_COLUMN)) + { + $this->cols['vat']['status'] = true; + } - $rank = $rank + 10; - $this->cols['subprice'] = array( - 'rank' => $rank, - 'width' => 19, // in mm - 'status' => true, - 'title' => array( - 'textkey' => 'PriceUHT' - ), - 'border-left' => true, // add left line separator - ); + $rank = $rank + 10; + $this->cols['subprice'] = array( + 'rank' => $rank, + 'width' => 19, // in mm + 'status' => true, + 'title' => array( + 'textkey' => 'PriceUHT' + ), + 'border-left' => true, // add left line separator + ); - $rank = $rank + 10; - $this->cols['qty'] = array( - 'rank' => $rank, - 'width' => 16, // in mm - 'status' => true, - 'title' => array( - 'textkey' => 'Qty' - ), - 'border-left' => true, // add left line separator - ); + $rank = $rank + 10; + $this->cols['qty'] = array( + 'rank' => $rank, + 'width' => 16, // in mm + 'status' => true, + 'title' => array( + 'textkey' => 'Qty' + ), + 'border-left' => true, // add left line separator + ); - $rank = $rank + 10; - $this->cols['progress'] = array( - 'rank' => $rank, - 'width' => 19, // in mm - 'status' => false, - 'title' => array( - 'textkey' => 'Progress' - ), - 'border-left' => true, // add left line separator - ); + $rank = $rank + 10; + $this->cols['progress'] = array( + 'rank' => $rank, + 'width' => 19, // in mm + 'status' => false, + 'title' => array( + 'textkey' => 'Progress' + ), + 'border-left' => true, // add left line separator + ); - if ($this->situationinvoice) - { - $this->cols['progress']['status'] = true; - } + if ($this->situationinvoice) + { + $this->cols['progress']['status'] = true; + } - $rank = $rank + 10; - $this->cols['unit'] = array( - 'rank' => $rank, - 'width' => 11, // in mm - 'status' => false, - 'title' => array( - 'textkey' => 'Unit' - ), - 'border-left' => true, // add left line separator - ); - if ($conf->global->PRODUCT_USE_UNITS) { - $this->cols['unit']['status'] = true; - } + $rank = $rank + 10; + $this->cols['unit'] = array( + 'rank' => $rank, + 'width' => 11, // in mm + 'status' => false, + 'title' => array( + 'textkey' => 'Unit' + ), + 'border-left' => true, // add left line separator + ); + if ($conf->global->PRODUCT_USE_UNITS) { + $this->cols['unit']['status'] = true; + } - $rank = $rank + 10; - $this->cols['discount'] = array( - 'rank' => $rank, - 'width' => 13, // in mm - 'status' => false, - 'title' => array( - 'textkey' => 'ReductionShort' - ), - 'border-left' => true, // add left line separator - ); - if ($this->atleastonediscount) { - $this->cols['discount']['status'] = true; - } + $rank = $rank + 10; + $this->cols['discount'] = array( + 'rank' => $rank, + 'width' => 13, // in mm + 'status' => false, + 'title' => array( + 'textkey' => 'ReductionShort' + ), + 'border-left' => true, // add left line separator + ); + if ($this->atleastonediscount) { + $this->cols['discount']['status'] = true; + } - $rank = $rank + 1000; // add a big offset to be sure is the last col because default extrafield rank is 100 - $this->cols['totalexcltax'] = array( - 'rank' => $rank, - 'width' => 26, // in mm - 'status' => true, - 'title' => array( - 'textkey' => 'TotalHT' - ), - 'border-left' => true, // add left line separator - ); + $rank = $rank + 1000; // add a big offset to be sure is the last col because default extrafield rank is 100 + $this->cols['totalexcltax'] = array( + 'rank' => $rank, + 'width' => 26, // in mm + 'status' => true, + 'title' => array( + 'textkey' => 'TotalHT' + ), + 'border-left' => true, // add left line separator + ); - // Add extrafields cols - if (!empty($object->lines)) { - $line = reset($object->lines); - $this->defineColumnExtrafield($line, $outputlangs, $hidedetails); - } + // Add extrafields cols + if (!empty($object->lines)) { + $line = reset($object->lines); + $this->defineColumnExtrafield($line, $outputlangs, $hidedetails); + } - $parameters = array( - 'object' => $object, - 'outputlangs' => $outputlangs, - 'hidedetails' => $hidedetails, - 'hidedesc' => $hidedesc, - 'hideref' => $hideref - ); + $parameters = array( + 'object' => $object, + 'outputlangs' => $outputlangs, + 'hidedetails' => $hidedetails, + 'hidedesc' => $hidedesc, + 'hideref' => $hideref + ); - $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook - if ($reshook < 0) - { - setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - } elseif (empty($reshook)) - { - $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys - } else { - $this->cols = $hookmanager->resArray; - } + $reshook = $hookmanager->executeHooks('defineColumnField', $parameters, $this); // Note that $object may have been modified by hook + if ($reshook < 0) + { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + } elseif (empty($reshook)) + { + $this->cols = array_replace($this->cols, $hookmanager->resArray); // array_replace is used to preserve keys + } else { + $this->cols = $hookmanager->resArray; + } } } diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php index 51e50fbf43f..6f1a5da7dd3 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_standard.php @@ -91,8 +91,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } - elseif ($object->ismultientitymanaged == 2) { + } elseif ($object->ismultientitymanaged == 2) { // TODO } @@ -129,8 +128,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject $sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'"; if ($object->ismultientitymanaged == 1) { $sql .= " AND entity = ".$conf->entity; - } - elseif ($object->ismultientitymanaged == 2) { + } elseif ($object->ismultientitymanaged == 2) { // TODO } @@ -140,9 +138,7 @@ class mod_myobject_standard extends ModeleNumRefMyObject $obj = $db->fetch_object($resql); if ($obj) $max = intval($obj->max); else $max = 0; - } - else - { + } else { dol_syslog("mod_myobject_standard::getNextValue", LOG_DEBUG); return -1; } diff --git a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php index 4c5951dad70..be6d42047ce 100644 --- a/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php +++ b/htdocs/modulebuilder/template/core/triggers/interface_99_modMyModule_MyModuleTriggers.class.php @@ -102,6 +102,19 @@ class InterfaceMyModuleTriggers extends DolibarrTriggers // Put here code you want to execute when a Dolibarr business events occurs. // Data and type of action are stored into $object and $action + // You can isolate code for each action in a separate method: this method should be named like the trigger in camelCase. + // For example : COMPANY_CREATE => public function companyCreate($action, $object, User $user, Translate $langs, Conf $conf) + $methodName = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', strtolower($action))))); + $callback = array($this, $methodName); + if (is_callable($callback)){ + dol_syslog( + "Trigger '" . $this->name . "' for action '$action' launched by " . __FILE__ . ". id=" . $object->id + ); + + return call_user_func($callback, $action, $object, $user, $langs, $conf); + }; + + // Or you can execute some code here switch ($action) { // Users //case 'USER_CREATE': diff --git a/htdocs/modulebuilder/template/modulebuilder.txt b/htdocs/modulebuilder/template/modulebuilder.txt index 24ea0d6eac5..670a1774929 100644 --- a/htdocs/modulebuilder/template/modulebuilder.txt +++ b/htdocs/modulebuilder/template/modulebuilder.txt @@ -1,3 +1,3 @@ # DO NOT DELETE THIS FILE MANUALLY # File to flag module built using official module template. -# When this file is present into a module directory, you can edit it with the module builder tool. Use ModuleBuilder if you want to delete module. \ No newline at end of file +# When this file is present into a module directory, you can edit it with the module builder tool. \ No newline at end of file diff --git a/htdocs/modulebuilder/template/mymoduleindex.php b/htdocs/modulebuilder/template/mymoduleindex.php index 4a3356f1d7e..3da38a7e02c 100644 --- a/htdocs/modulebuilder/template/mymoduleindex.php +++ b/htdocs/modulebuilder/template/mymoduleindex.php @@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Load translation files required by the page $langs->loadLangs(array("mymodule@mymodule")); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); // Security check @@ -106,7 +106,7 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) print ''; print ''; - print ''; + print ''; $var = true; if ($num > 0) @@ -117,22 +117,17 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) $obj = $db->fetch_object($resql); print ''; print ''; print ''; $i++; @@ -164,21 +159,19 @@ END MODULEBUILDER DRAFT MYOBJECT */ print '
    '; -$NBMAX = 3; -$max = 3; +$NBMAX = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; +$max = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT; /* BEGIN MODULEBUILDER LASTMODIFIED MYOBJECT // Last modified myobject if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) { - $sql = "SELECT s.rowid, s.nom as name, s.client, s.datec, s.tms, s.canvas"; - $sql.= ", s.code_client"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE s.client IN (1, 2, 3)"; - $sql.= " AND s.entity IN (".getEntity($companystatic->element).")"; - if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) $sql.= " AND s.rowid = $socid"; + $sql = "SELECT s.rowid, s.ref, s.label, s.date_creation, s.tms"; + $sql.= " FROM ".MAIN_DB_PREFIX."mymodule_myobject as s"; + //if (! $user->rights->societe->client->voir && ! $socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; + $sql.= " WHERE s.entity IN (".getEntity($myobjectstatic->element).")"; + //if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; + //if ($socid) $sql.= " AND s.rowid = $socid"; $sql .= " ORDER BY s.tms DESC"; $sql .= $db->plimit($max, 0); @@ -191,9 +184,7 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) print '
    '.$langs->trans("DraftOrders").($num?''.$num.'':'').'
    '.$langs->trans("DraftMyObjects").($num?''.$num.'':'').'
    '; - $orderstatic->id=$obj->rowid; - $orderstatic->ref=$obj->ref; - $orderstatic->ref_client=$obj->ref_client; - $orderstatic->total_ht = $obj->total_ht; - $orderstatic->total_tva = $obj->total_tva; - $orderstatic->total_ttc = $obj->total_ttc; - print $orderstatic->getNomUrl(1); + + $myobjectstatic->id=$obj->rowid; + $myobjectstatic->ref=$obj->ref; + $myobjectstatic->ref_client=$obj->ref_client; + $myobjectstatic->total_ht = $obj->total_ht; + $myobjectstatic->total_tva = $obj->total_tva; + $myobjectstatic->total_ttc = $obj->total_ttc; + + print $myobjectstatic->getNomUrl(1); print ''; - $companystatic->id=$obj->socid; - $companystatic->name=$obj->name; - $companystatic->client=$obj->client; - $companystatic->code_client = $obj->code_client; - $companystatic->code_fournisseur = $obj->code_fournisseur; - $companystatic->canvas=$obj->canvas; - print $companystatic->getNomUrl(1,'customer',16); print ''.price($obj->total_ttc).'
    '; print ''; print ''; print ''; print ''; @@ -202,28 +193,23 @@ if (! empty($conf->mymodule->enabled) && $user->rights->mymodule->read) while ($i < $num) { $objp = $db->fetch_object($resql); - $companystatic->id=$objp->rowid; - $companystatic->name=$objp->name; - $companystatic->client=$objp->client; - $companystatic->code_client = $objp->code_client; - $companystatic->code_fournisseur = $objp->code_fournisseur; - $companystatic->canvas=$objp->canvas; + + $myobjectstatic->id=$objp->rowid; + $myobjectstatic->ref=$objp->ref; + $myobjectstatic->label=$objp->label; + $myobjectstatic->status = $objp->status; + print ''; - print ''; + print ''; print '"; - print '"; + print '"; print ''; $i++; - - } $db->free($resql); - } - else - { + } else { print ''; } print "
    '; - if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastCustomersOrProspects",$max); - else if (! empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) print $langs->trans("BoxTitleLastModifiedProspects",$max); - else print $langs->trans("BoxTitleLastModifiedCustomers",$max); + print $langs->trans("BoxTitleLatestModifiedMyObjects", $max); print ''.$langs->trans("DateModificationShort").'
    '.$companystatic->getNomUrl(1,'customer',48).''.$myobjectstatic->getNomUrl(1).''; - print $companystatic->getLibCustProspStatut(); print "'.dol_print_date($db->jdate($objp->tms),'day')."'.dol_print_date($db->jdate($objp->tms), 'day')."
    '.$langs->trans("None").'

    "; diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 58d64b622d0..b5f6ef7f722 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -19,9 +19,29 @@ /** * \file htdocs/modulebuilder/template/myobject_agenda.php * \ingroup mymodule - * \brief Page of MyObject events + * \brief Tab of events on MyObject */ +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN','1'); // Force use of CSRF protection with tokens even for GET + // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) @@ -50,17 +70,14 @@ $langs->loadLangs(array("mymodule@mymodule", "other")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); -if (GETPOST('actioncode', 'array')) -{ +if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); @@ -206,13 +223,15 @@ if ($object->id > 0) $objthirdparty = $object; $objcon = new stdClass(); - $out = '&origin='.$object->element.'&originid='.$object->id; + $out = '&origin='.urlencode($object->element.'@'.$object->module).'&originid='.urlencode($object->id); + $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id; + $out .= '&backtopage='.urlencode($urlbacktopage); $permok = $user->rights->agenda->myactions->create; if ((!empty($objthirdparty->id) || !empty($objcon->id)) && $permok) { //$out.='
    trans("AddAnAction"),'filenew'); //$out.=""; @@ -226,9 +245,7 @@ if ($object->id > 0) if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print ''.$langs->trans("AddAction").''; - } - else - { + } else { print ''.$langs->trans("AddAction").''; } } @@ -249,7 +266,7 @@ if ($object->id > 0) $filters['search_agenda_label'] = $search_agenda_label; // TODO Replace this with same code than into list.php - show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, 'mymmodule'); + show_actions_done($conf, $langs, $db, $object, null, 0, $actioncode, '', $filters, $sortfield, $sortorder, $object->module); } } diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php index e00c0a3b618..1dacbcaac87 100644 --- a/htdocs/modulebuilder/template/myobject_card.php +++ b/htdocs/modulebuilder/template/myobject_card.php @@ -40,7 +40,7 @@ //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler //if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message //if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies - +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN','1'); // Force use of CSRF protection with tokens even for GET // Load Dolibarr environment $res = 0; @@ -89,7 +89,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -157,7 +157,7 @@ if (empty($reshook)) if ($action == 'set_thirdparty' && $permissiontoadd) { - $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY'); + $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname); } if ($action == 'classin' && $permissiontoadd) { @@ -165,7 +165,7 @@ if (empty($reshook)) } // Actions to send emails - $triggersendname = 'MYOBJECT_SENTBYMAIL'; + $triggersendname = 'MYMODULE_MYOBJECT_SENTBYMAIL'; $autocopy = 'MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; $trackid = 'myobject'.$object->id; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; @@ -287,13 +287,11 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $formconfirm = ''; // Confirmation to delete - if ($action == 'delete') - { + if ($action == 'delete') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMyObject'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1); } // Confirmation to delete line - if ($action == 'deleteline') - { + if ($action == 'deleteline') { $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$lineid, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_deleteline', '', 0, 1); } // Clone confirmation @@ -345,19 +343,19 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (! empty($conf->projet->enabled)) { $langs->load("projects"); - $morehtmlref.='
    '.$langs->trans('Project') . ' '; + $morehtmlref .= '
    '.$langs->trans('Project') . ' '; if ($permissiontoadd) { //if ($action != 'classify') $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' '; - $morehtmlref.=' : '; + $morehtmlref .= ' : '; if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref.='
    '; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref.=''; - $morehtmlref.='
    '; + //$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
    '; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
    '; } else { $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); } @@ -470,35 +468,26 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Back to draft - if ($object->status == $object::STATUS_VALIDATED) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_VALIDATED) { + if ($permissiontoadd) { print ''.$langs->trans("SetToDraft").''; } } // Modify - if ($permissiontoadd) - { + if ($permissiontoadd) { print ''.$langs->trans("Modify").''."\n"; - } - else - { + } else { print ''.$langs->trans('Modify').''."\n"; } // Validate - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { + if ($object->status == $object::STATUS_DRAFT) { + if ($permissiontoadd) { if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { print ''.$langs->trans("Validate").''; - } - else - { + } else { $langs->load("errors"); print ''.$langs->trans("Validate").''; } @@ -506,31 +495,24 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } // Clone - if ($permissiontoadd) - { + if ($permissiontoadd) { print ''.$langs->trans("ToClone").''."\n"; } /* if ($permissiontoadd) { - if ($object->status == $object::STATUS_ENABLED) - { + if ($object->status == $object::STATUS_ENABLED) { print ''.$langs->trans("Disable").''."\n"; - } - else - { + } else { print ''.$langs->trans("Enable").''."\n"; } } if ($permissiontoadd) { - if ($object->status == $object::STATUS_VALIDATED) - { + if ($object->status == $object::STATUS_VALIDATED) { print ''.$langs->trans("Cancel").''."\n"; - } - else - { + } else { print ''.$langs->trans("Re-Open").''."\n"; } } @@ -539,10 +521,8 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Delete (need delete permission, or if draft, just need create/modify permission) if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) { - print ''.$langs->trans('Delete').''."\n"; - } - else - { + print ''.$langs->trans('Delete').''."\n"; + } else { print ''.$langs->trans('Delete').''."\n"; } } @@ -589,7 +569,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, $object->element.'@mymodule', (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); + $somethingshown = $formactions->showactions($object, $object->element.'@'.$object->module, (is_object($object->thirdparty) ? $object->thirdparty->id : 0), 1, '', $MAXEVENT, '', $morehtmlright); print ''; } diff --git a/htdocs/modulebuilder/template/myobject_document.php b/htdocs/modulebuilder/template/myobject_document.php index 63b114ffc10..46a8d0c3a10 100644 --- a/htdocs/modulebuilder/template/myobject_document.php +++ b/htdocs/modulebuilder/template/myobject_document.php @@ -22,6 +22,26 @@ * \brief Tab for documents linked to MyObject */ +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN','1'); // Force use of CSRF protection with tokens even for GET + // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) @@ -199,9 +219,7 @@ if ($object->id) $relativepathwithnofile = 'myobject/'.dol_sanitizeFileName($object->ref).'/'; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { accessforbidden('', 0, 1); } diff --git a/htdocs/modulebuilder/template/myobject_list.php b/htdocs/modulebuilder/template/myobject_list.php index 809f7ffb107..b1ec021e774 100644 --- a/htdocs/modulebuilder/template/myobject_list.php +++ b/htdocs/modulebuilder/template/myobject_list.php @@ -22,24 +22,25 @@ * \brief List page for myobject */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB', '1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER', '1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN', '1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION', '1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION', '1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK', '1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', '1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK', '1'); // Do not check style html tag into posted data -//if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN", '1'); // If this page is public (can be called outside logged session) -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT', 'auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', '1'); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL', '1'); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL' +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN','1'); // Force use of CSRF protection with tokens even for GET // Load Dolibarr environment $res = 0; @@ -83,8 +84,8 @@ $id = GETPOST('id', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page < 0 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters $offset = $limit * $page; @@ -108,7 +109,7 @@ if (!$sortfield) $sortfield = "t.".key($object->fields); // Set here default sea if (!$sortorder) $sortorder = "ASC"; // Initialize array of search criterias -$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml')); +$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); foreach ($object->fields as $key => $val) { @@ -122,12 +123,21 @@ foreach ($object->fields as $key => $val) if ($val['searchall']) $fieldstosearchall['t.'.$key] = $val['label']; } -// Definition of fields for list +// Definition of array of fields for columns $arrayfields = array(); foreach ($object->fields as $key => $val) { // If $val['visible']==0, then we never show the field - if (!empty($val['visible'])) $arrayfields['t.'.$key] = array('label'=>$val['label'], 'checked'=>(($val['visible'] < 0) ? 0 : 1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']); + if (!empty($val['visible'])) { + $visible = dol_eval($val['visible'], 1); + $arrayfields['t.'.$key] = array( + 'label'=>$val['label'], + 'checked'=>(($visible < 0) ? 0 : 1), + 'enabled'=>($visible != 3 && dol_eval($val['enabled'], 1)), + 'position'=>$val['position'], + 'help'=>$val['help'] + ); + } } // Extra fields if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) @@ -140,7 +150,8 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count 'checked'=>(($extrafields->attributes[$object->table_element]['list'][$key] < 0) ? 0 : 1), 'position'=>$extrafields->attributes[$object->table_element]['pos'][$key], 'enabled'=>(abs($extrafields->attributes[$object->table_element]['list'][$key]) != 3 && $extrafields->attributes[$object->table_element]['perms'][$key]), - 'langfile'=>$extrafields->attributes[$object->table_element]['langfile'][$key] + 'langfile'=>$extrafields->attributes[$object->table_element]['langfile'][$key], + 'help'=>$extrafields->attributes[$object->table_element]['help'][$key] ); } } @@ -237,6 +248,10 @@ $sql .= preg_replace('/^,/', '', $hookmanager->resPrint); $sql = preg_replace('/,\s*$/', '', $sql); $sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; +// Add table from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; if ($object->ismultientitymanaged == 1) $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; else $sql .= " WHERE 1 = 1"; foreach ($search as $key => $val) @@ -270,7 +285,7 @@ if (! empty($extrafields->attributes[$object->table_element]['label'])) { } // Add where from hooks $parameters=array(); -$reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook +$reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters, $object); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql=preg_replace('/,\s*$/','', $sql); */ @@ -293,9 +308,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; -} -else -{ +} else { if ($limit) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -351,6 +364,10 @@ foreach ($search as $key => $val) if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); // Add $param from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; +// Add $param from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListSearchParam', $parameters, $object); // Note that $action and $object may have been modified by hook +$param .= $hookmanager->resPrint; // List of mass actions available $arrayofmassactions = array( @@ -370,7 +387,6 @@ print ''; print ''; print ''; -//print ''; print ''; $newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/mymodule/myobject_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); @@ -431,8 +447,7 @@ foreach ($object->fields as $key => $val) if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } - elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; print ''; } } @@ -511,7 +526,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) if (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; elseif ($key == 'ref') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; - if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield .= ($cssforfield ? ' ' : '').'right'; + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status'))) $cssforfield .= ($cssforfield ? ' ' : '').'right'; //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; if (!empty($arrayfields['t.'.$key]['checked'])) diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index aece1f98f29..1a6fd1a4cc6 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -19,9 +19,29 @@ /** * \file htdocs/modulebuilder/template/myobject_note.php * \ingroup mymodule - * \brief Car with notes on MyObject + * \brief Tab for notes on MyObject */ +//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db +//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user +//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc +//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs +//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters +//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters +//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). +//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) +//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data +//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu +//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php +//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library +//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. +//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip +//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value +//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler +//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message +//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies +//if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN','1'); // Force use of CSRF protection with tokens even for GET + // Load Dolibarr environment $res = 0; // Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) @@ -46,7 +66,7 @@ $langs->loadLangs(array("mymodule@mymodule", "companies")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/modulebuilder/template/scripts/mymodule.php b/htdocs/modulebuilder/template/scripts/mymodule.php index 009dcabaafd..0b8d7abfdfe 100644 --- a/htdocs/modulebuilder/template/scripts/mymodule.php +++ b/htdocs/modulebuilder/template/scripts/mymodule.php @@ -166,9 +166,7 @@ if (!$error) { $db->commit(); print '--- end ok'."\n"; -} -else -{ +} else { print '--- end error code='.$error."\n"; $db->rollback(); } diff --git a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.key.sql b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.key.sql index e9a612dca91..fc6b7b0d243 100644 --- a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.key.sql +++ b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject.key.sql @@ -15,7 +15,7 @@ -- BEGIN MODULEBUILDER INDEXES -ALTER TABLE llx_mymodule_myobject ADD INDEX idx_fieldobject (fieldobject); +ALTER TABLE llx_mymodule_myobject ADD INDEX idx_mymodule_myobject_fieldobject (fieldobject); -- END MODULEBUILDER INDEXES --ALTER TABLE llx_mymodule_myobject ADD UNIQUE INDEX uk_mymodule_myobject_fieldxy(fieldx, fieldy); diff --git a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.key.sql b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.key.sql index 6cb6bd48ca1..4c005e9d170 100644 --- a/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.key.sql +++ b/htdocs/modulebuilder/template/sql/llx_mymodule_myobject_extrafields.key.sql @@ -15,5 +15,5 @@ -- BEGIN MODULEBUILDER INDEXES -ALTER TABLE llx_mymodule_myobject_extrafields ADD INDEX idx_fk_object(fk_object); +ALTER TABLE llx_mymodule_myobject_extrafields ADD INDEX idx_myobject_fk_object(fk_object); -- END MODULEBUILDER INDEXES diff --git a/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php b/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php index d9693402980..169bfeb92f6 100644 --- a/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php +++ b/htdocs/modulebuilder/template/test/phpunit/MyObjectTest.php @@ -17,12 +17,26 @@ */ /** - * \file test/unit/MyObjectTest.php + * \file test/phpunit/MyObjectTest.php * \ingroup mymodule * \brief PHPUnit test for MyObject class. */ -namespace test\unit; +global $conf,$user,$langs,$db; +//define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver +//require_once 'PHPUnit/Autoload.php'; +require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; +require_once dirname(__FILE__).'/../../htdocs/mymodule/class/myobject.class.php'; + +if (empty($user->id)) { + print "Load permissions for admin user nb 1\n"; + $user->fetch(1); + $user->getrights(); +} +$conf->global->MAIN_DISABLE_ALL_MAILS=1; + +$langs->load("main"); + /** * Class MyObjectTest @@ -30,13 +44,43 @@ namespace test\unit; */ class MyObjectTest extends \PHPUnit_Framework_TestCase { + protected $savconf; + protected $savuser; + protected $savlangs; + protected $savdb; + + /** + * Constructor + * We save global variables into local variables + * + * @return MyObject + */ + public function __construct() + { + parent::__construct(); + + //$this->sharedFixture + global $conf,$user,$langs,$db; + $this->savconf=$conf; + $this->savuser=$user; + $this->savlangs=$langs; + $this->savdb=$db; + + print __METHOD__." db->type=".$db->type." user->id=".$user->id; + //print " - db ".$db->db; + print "\n"; + } + /** * Global test setup * @return void */ public static function setUpBeforeClass() { - fwrite(STDOUT, __METHOD__."\n"); + global $conf,$user,$langs,$db; + $db->begin(); // This is to have all actions inside a transaction even if test launched without suite. + + print __METHOD__."\n"; } /** @@ -45,36 +89,13 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase */ protected function setUp() { - fwrite(STDOUT, __METHOD__."\n"); - } + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; - /** - * Verify pre conditions - * @return void - */ - protected function assertPreConditions() - { - fwrite(STDOUT, __METHOD__."\n"); - } - - /** - * A sample test - * @return bool - */ - public function testSomething() - { - fwrite(STDOUT, __METHOD__."\n"); - // TODO: test something - $this->assertTrue(true); - } - - /** - * Verify post conditions - * @return void - */ - protected function assertPostConditions() - { - fwrite(STDOUT, __METHOD__."\n"); + print __METHOD__."\n"; } /** @@ -83,7 +104,7 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase */ protected function tearDown() { - fwrite(STDOUT, __METHOD__."\n"); + print __METHOD__."\n"; } /** @@ -92,19 +113,30 @@ class MyObjectTest extends \PHPUnit_Framework_TestCase */ public static function tearDownAfterClass() { - fwrite(STDOUT, __METHOD__."\n"); + global $conf,$user,$langs,$db; + $db->rollback(); + + print __METHOD__."\n"; } + /** - * Unsuccessful test - * - * @param Exception $e Exception - * @return void - * @throws Exception + * A sample test + * @return bool */ - protected function onNotSuccessfulTest(Exception $e) + public function testSomething() { - fwrite(STDOUT, __METHOD__."\n"); - throw $e; + global $conf,$user,$langs,$db; + $conf=$this->savconf; + $user=$this->savuser; + $langs=$this->savlangs; + $db=$this->savdb; + + $result = true; + + print __METHOD__." result=".$result."\n"; + $this->assertTrue($result); + + return $result; } } diff --git a/htdocs/mrp/ajax/ajax_bom.php b/htdocs/mrp/ajax/ajax_bom.php index 19fea01aa60..adf4a8f4ee7 100644 --- a/htdocs/mrp/ajax/ajax_bom.php +++ b/htdocs/mrp/ajax/ajax_bom.php @@ -34,7 +34,7 @@ require '../../main.inc.php'; // Load $user and permissions require_once DOL_DOCUMENT_ROOT.'/bom/class/bom.class.php'; $idbom = GETPOST('idbom', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); /* @@ -49,8 +49,6 @@ if ($result > 0) unset($object->fields); unset($object->db); echo json_encode($object); -} -else -{ +} else { echo 'Failed to load category with id='.$idbom; } diff --git a/htdocs/mrp/class/api_mos.class.php b/htdocs/mrp/class/api_mos.class.php index 963da439180..d502e5cc99d 100644 --- a/htdocs/mrp/class/api_mos.class.php +++ b/htdocs/mrp/class/api_mos.class.php @@ -99,7 +99,7 @@ class Mos extends DolibarrApi global $db, $conf; $obj_ret = array(); - $tmpobject = new Mo($db); + $tmpobject = new Mo($this->db); $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; @@ -139,7 +139,7 @@ class Mos extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { @@ -147,18 +147,18 @@ class Mos extends DolibarrApi } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $i = 0; while ($i < $num) { - $obj = $db->fetch_object($result); - $tmp_object = new Mo($db); + $obj = $this->db->fetch_object($result); + $tmp_object = new Mo($this->db); if ($tmp_object->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($tmp_object); } @@ -225,12 +225,9 @@ class Mos extends DolibarrApi $this->mo->$field = $value; } - if ($this->mo->update($id, DolibarrApiAccess::$user) > 0) - { + if ($this->mo->update($id, DolibarrApiAccess::$user) > 0) { return $this->get($id); - } - else - { + } else { throw new RestException(500, $this->mo->error); } } diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 89e9b25abef..c0d6658cab7 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -421,14 +421,11 @@ class Mo extends CommonObject foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; - } - elseif (strpos($key, 'date') !== false) { + } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; - } - elseif ($key == 'customsql') { + } elseif ($key == 'customsql') { $sqlwhere[] = $value; - } - else { + } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } @@ -582,8 +579,7 @@ class Mo extends CommonObject setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); $this->db->commit(); return 1; - } - else { + } else { setEventMessages($this->error, $this->errors, 'errors'); $this->db->rollback(); return -1; @@ -655,8 +651,7 @@ class Mo extends CommonObject $error++; $this->error = "BadValueForquantityToConsume"; break; - } - else { + } else { $moline->fk_product = $line->fk_product; $moline->role = 'toconsume'; $moline->position = $line->position; @@ -762,16 +757,12 @@ class Mo extends CommonObject if ($numref != "") { return $numref; - } - else - { + } else { $this->error = $obj->error; //dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error); return ""; } - } - else - { + } else { print $langs->trans("Error")." ".$langs->trans("Error_MRP_MO_ADDON_NotDefined"); return ""; } @@ -816,9 +807,7 @@ class Mo extends CommonObject { $this->fetch_product(); $num = $this->getNextNumRef($this->product); - } - else - { + } else { $num = $this->ref; } $this->newref = $num; @@ -899,9 +888,7 @@ class Mo extends CommonObject { $this->db->commit(); return 1; - } - else - { + } else { $this->db->rollback(); return -1; } @@ -1000,7 +987,7 @@ class Mo extends CommonObject $result = ''; - $label = ''.$langs->trans("MO").''; + $label = img_picto('', $this->picto).' '.$langs->trans("MO").''; $label .= '
    '; $label .= ''.$langs->trans('Ref').': '.$this->ref; if (isset($this->status)) { @@ -1028,8 +1015,7 @@ class Mo extends CommonObject } $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); $linkstart = ''; @@ -1078,7 +1064,7 @@ class Mo extends CommonObject global $langs; //$langs->load("mrp"); $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated').' ('.$langs->trans("ToProduce").')'; + $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('ValidatedToProduce'); $this->labelStatus[self::STATUS_INPROGRESS] = $langs->trans('InProgress'); $this->labelStatus[self::STATUS_PRODUCED] = $langs->trans('StatusMOProduced'); $this->labelStatus[self::STATUS_CANCELED] = $langs->trans('Canceled'); @@ -1145,9 +1131,7 @@ class Mo extends CommonObject } $this->db->free($result); - } - else - { + } else { dol_print_error($this->db); } } @@ -1180,9 +1164,7 @@ class Mo extends CommonObject $this->error = $this->error; $this->errors = $this->errors; return $result; - } - else - { + } else { $this->lines = $result; return $this->lines; } @@ -1209,8 +1191,8 @@ class Mo extends CommonObject //$modele = 'standard'; $modele = ''; // Remove this once a pdf_standard.php exists. - if ($this->modelpdf) { - $modele = $this->modelpdf; + if ($this->model_pdf) { + $modele = $this->model_pdf; } elseif (!empty($conf->global->MO_ADDON_PDF)) { $modele = $conf->global->MO_ADDON_PDF; } @@ -1328,9 +1310,7 @@ class Mo extends CommonObject $productstatic->fetch($line->fk_product); $this->tpl['label'] .= $productstatic->getNomUrl(1); //$this->tpl['label'].= ' - '.$productstatic->label; - } - else - { + } else { // If origin MRP line is not a product, but another MRP // TODO } @@ -1513,14 +1493,11 @@ class MoLine extends CommonObjectLine foreach ($filter as $key => $value) { if ($key == 't.rowid') { $sqlwhere[] = $key.'='.$value; - } - elseif (strpos($key, 'date') !== false) { + } elseif (strpos($key, 'date') !== false) { $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\''; - } - elseif ($key == 'customsql') { + } elseif ($key == 'customsql') { $sqlwhere[] = $value; - } - else { + } else { $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\''; } } diff --git a/htdocs/mrp/index.php b/htdocs/mrp/index.php index f0bdc8ba62d..d4359dcae90 100644 --- a/htdocs/mrp/index.php +++ b/htdocs/mrp/index.php @@ -136,9 +136,7 @@ if ($conf->use_javascript_ajax) print ""; print "
    "; - } - else - { + } else { dol_print_error($db); } } @@ -195,9 +193,7 @@ if ($resql) } print ""; print "
    "; -} -else -{ +} else { dol_print_error($db); } @@ -248,9 +244,7 @@ if ($resql) } print ""; print "
    "; -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/mrp/mo_agenda.php b/htdocs/mrp/mo_agenda.php index 20c2cbfe290..c2107296b2b 100644 --- a/htdocs/mrp/mo_agenda.php +++ b/htdocs/mrp/mo_agenda.php @@ -40,7 +40,7 @@ $langs->loadLangs(array("mrp", "other")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); @@ -48,9 +48,7 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); @@ -216,9 +214,7 @@ if ($object->id > 0) if (!empty($user->rights->agenda->myactions->create) || !empty($user->rights->agenda->allactions->create)) { print '
    '.$langs->trans("AddAction").''; - } - else - { + } else { print ''.$langs->trans("AddAction").''; } } diff --git a/htdocs/mrp/mo_card.php b/htdocs/mrp/mo_card.php index 17799f7cbd1..e20a57a6e4d 100644 --- a/htdocs/mrp/mo_card.php +++ b/htdocs/mrp/mo_card.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2017-2020 Laurent Destailleur * * 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 @@ -21,26 +21,6 @@ * \brief Page to create/edit/view mo */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies - - // Load Dolibarr environment require '../main.inc.php'; @@ -79,7 +59,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -127,77 +107,75 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - $error = 0; + $error = 0; - $backurlforlist = dol_buildpath('/mrp/mo_list.php', 1); + $backurlforlist = dol_buildpath('/mrp/mo_list.php', 1); - if (empty($backtopage) || ($cancel && empty($id))) { - if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { - if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; - else $backtopage = DOL_URL_ROOT.'/mrp/mo_card.php?id='.($id > 0 ? $id : '__ID__'); - } - } - if ($cancel && !empty($backtopageforcancel)) { - $backtopage = $backtopageforcancel; - } + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; + else $backtopage = DOL_URL_ROOT.'/mrp/mo_card.php?id='.($id > 0 ? $id : '__ID__'); + } + } + if ($cancel && !empty($backtopageforcancel)) { + $backtopage = $backtopageforcancel; + } - $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record + $triggermodname = 'MRP_MO_MODIFY'; // Name of trigger action code to execute when we modify record - // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen - include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; + // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; - // Actions when linking object each other - include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; + // Actions when linking object each other + include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; - // Actions when printing a doc from card - include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + // Actions when printing a doc from card + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; - // Actions to send emails - $triggersendname = 'MO_SENTBYMAIL'; - $autocopy = 'MAIN_MAIL_AUTOCOPY_MO_TO'; - $trackid = 'mo'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; + // Actions to send emails + $triggersendname = 'MO_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_MO_TO'; + $trackid = 'mo'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; - // Action to move up and down lines of object - //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once + // Action to move up and down lines of object + //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once - if ($action == 'set_thirdparty' && $permissiontoadd) - { - $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MO_MODIFY'); - } - if ($action == 'classin' && $permissiontoadd) - { - $object->setProject(GETPOST('projectid', 'int')); - } + if ($action == 'set_thirdparty' && $permissiontoadd) + { + $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MO_MODIFY'); + } + if ($action == 'classin' && $permissiontoadd) + { + $object->setProject(GETPOST('projectid', 'int')); + } - // Action close produced - if ($action == 'confirm_produced' && $confirm == 'yes' && $permissiontoadd) - { - $result = $object->setStatut($object::STATUS_PRODUCED, 0, '', 'MRP_MO_PRODUCED'); - if ($result >= 0) - { - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (!empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $model = $object->modelpdf; - $ret = $object->fetch($id); // Reload to get new records + // Action close produced + if ($action == 'confirm_produced' && $confirm == 'yes' && $permissiontoadd) + { + $result = $object->setStatut($object::STATUS_PRODUCED, 0, '', 'MRP_MO_PRODUCED'); + if ($result >= 0) + { + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (!empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model = $object->model_pdf; + $ret = $object->fetch($id); // Reload to get new records - $object->generateDocument($model, $outputlangs, 0, 0, 0); - } - } - else - { - setEventMessages($object->error, $object->errors, 'errors'); - } - } + $object->generateDocument($model, $outputlangs, 0, 0, 0); + } + } else { + setEventMessages($object->error, $object->errors, 'errors'); + } + } } @@ -339,7 +317,7 @@ if (($id || $ref) && $action == 'edit') print load_fiche_titre($langs->trans("MO"), '', 'mrp'); print '
    '; - print ''; + print ''; print ''; print ''; if ($backtopage) print ''; @@ -382,7 +360,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Confirmation to delete if ($action == 'delete') { - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMo'), $langs->trans('ConfirmDeleteMo'), 'confirm_delete', '', 0, 1); + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteMo'), $langs->trans('ConfirmDeleteMo'), 'confirm_delete', '', 0, 1); } // Confirmation to delete line if ($action == 'deleteline') @@ -461,32 +439,32 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Project if (!empty($conf->projet->enabled)) { - $langs->load("projects"); - $morehtmlref .= '
    '.$langs->trans('Project').' '; - if ($permissiontoadd) - { - if ($action != 'classify') - $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; - if ($action == 'classify') { - //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 1); - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= ''; - $morehtmlref .= $formproject->select_projects($object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1); - $morehtmlref .= ''; - $morehtmlref .= '
    '; - } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_soc, $object->fk_project, 'none', 0, 0, 0, 1); - } - } else { - if (!empty($object->fk_project)) { - $proj = new Project($db); - $proj->fetch($object->fk_project); - $morehtmlref .= ' : '.$proj->getNomUrl(); - } else { - $morehtmlref .= ''; - } - } + $langs->load("projects"); + $morehtmlref .= '
    '.$langs->trans('Project').' '; + if ($permissiontoadd) + { + if ($action != 'classify') + $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; + if ($action == 'classify') { + //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 1); + $morehtmlref .= '
    '; + $morehtmlref .= ''; + $morehtmlref .= ''; + $morehtmlref .= $formproject->select_projects($object->fk_soc, $object->fk_project, 'projectid', 0, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref .= ''; + $morehtmlref .= '
    '; + } else { + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->fk_soc, $object->fk_project, 'none', 0, 0, 0, 1); + } + } else { + if (!empty($object->fk_project)) { + $proj = new Project($db); + $proj->fetch($object->fk_project); + $morehtmlref .= ' : '.$proj->getNomUrl(); + } else { + $morehtmlref .= ''; + } + } } $morehtmlref .= ''; @@ -523,165 +501,167 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (!empty($object->table_element_line)) { - // Show object lines + // Show object lines //$result = $object->getLinesArray(); $object->fetchLines(); - print '
    + print ' '; - /*if (!empty($conf->use_javascript_ajax) && $object->status == 0) { + /*if (!empty($conf->use_javascript_ajax) && $object->status == 0) { include DOL_DOCUMENT_ROOT.'/core/tpl/ajaxrow.tpl.php'; }*/ - if (!empty($object->lines)) - { - print '
    '; - print ''; + if (!empty($object->lines)) + { + print '
    '; + print '
    '; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; - print '
    '.$langs->trans("Summary").'
    '.$langs->trans("Summary").'
    '.$langs->trans("ProductsToConsume").''; - if (!empty($object->lines)) - { - $i = 0; - foreach ($object->lines as $line) { - if ($line->role == 'toconsume') { - if ($i) print ', '; - $tmpproduct = new Product($db); - $tmpproduct->fetch($line->fk_product); - print $tmpproduct->getNomUrl(1); - $i++; - } - } - } - print '
    '.$langs->trans("ProductsToConsume").''; + if (!empty($object->lines)) + { + $i = 0; + foreach ($object->lines as $line) { + if ($line->role == 'toconsume') { + if ($i) print ', '; + $tmpproduct = new Product($db); + $tmpproduct->fetch($line->fk_product); + print $tmpproduct->getNomUrl(1); + $i++; + } + } + } + print '
    '.$langs->trans("ProductsToProduce").''; - if (!empty($object->lines)) - { - $i = 0; - foreach ($object->lines as $line) { - if ($line->role == 'toproduce') { - if ($i) print ', '; - $tmpproduct = new Product($db); - $tmpproduct->fetch($line->fk_product); - print $tmpproduct->getNomUrl(1); - $i++; - } - } - } - print '
    '.$langs->trans("ProductsToProduce").''; + if (!empty($object->lines)) + { + $i = 0; + foreach ($object->lines as $line) { + if ($line->role == 'toproduce') { + if ($i) print ', '; + $tmpproduct = new Product($db); + $tmpproduct->fetch($line->fk_product); + print $tmpproduct->getNomUrl(1); + $i++; + } + } + } + print '
    '; - print '
    '; - } + print ''; + print ''; + } - print "
    \n"; + print "\n"; } // Buttons for actions if ($action != 'presend' && $action != 'editline') { - print '
    '."\n"; - $parameters = array(); - $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + print '
    '."\n"; + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); - if (empty($reshook)) - { - // Send - //if (empty($user->socid)) { - // print '' . $langs->trans('SendMail') . ''."\n"; - //} + if (empty($reshook)) + { + // Send + //if (empty($user->socid)) { + // print '' . $langs->trans('SendMail') . ''."\n"; + //} - // Back to draft - if ($object->status == $object::STATUS_VALIDATED) - { - if ($permissiontoadd) - { - // TODO Add test that production has not started - print ''.$langs->trans("SetToDraft").''; - } - } + // Back to draft + if ($object->status == $object::STATUS_VALIDATED) + { + if ($permissiontoadd) + { + // TODO Add test that production has not started + print ''.$langs->trans("SetToDraft").''; + } + } - // Modify - if ($object->status == $object::STATUS_DRAFT) { - if ($permissiontoadd) - { - print ''.$langs->trans("Modify").''."\n"; - } - else - { - print ''.$langs->trans('Modify').''."\n"; - } - } + // Modify + if ($object->status == $object::STATUS_DRAFT) { + if ($permissiontoadd) + { + print ''.$langs->trans("Modify").''."\n"; + } else { + print ''.$langs->trans('Modify').''."\n"; + } + } - // Validate - if ($object->status == $object::STATUS_DRAFT) - { - if ($permissiontoadd) - { - if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) - { - print ''.$langs->trans("Validate").''; - } - else - { - $langs->load("errors"); - print ''.$langs->trans("Validate").''; - } - } - } + // Validate + if ($object->status == $object::STATUS_DRAFT) + { + if ($permissiontoadd) + { + if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) + { + print ''.$langs->trans("Validate").''; + } else { + $langs->load("errors"); + print ''.$langs->trans("Validate").''; + } + } + } - // Clone - if ($permissiontoadd) - { - print ''.$langs->trans("ToClone").''; - } + // Clone + if ($permissiontoadd) + { + print ''.$langs->trans("ToClone").''; + } - // Cancel - Reopen - if ($permissiontoadd) - { - if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS) - { - // TODO If production is already > 1, show only close, else show cancel - print ''.$langs->trans("Close").''."\n"; + // Cancel - Reopen + if ($permissiontoadd) + { + if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS) + { + $arrayproduced = $object->fetchLinesLinked('produced', 0); + $nbProduced = 0; + foreach ($arrayproduced as $lineproduced) { + $nbProduced += $lineproduced['qty']; + } + if ($nbProduced > 0) { // If production has started, we can close it + print ''.$langs->trans("Close").''."\n"; + } else { + print 'transnoentitiesnoconv("Production")).'">'.$langs->trans("Close").''."\n"; + } - print ''.$langs->trans("Cancel").''."\n"; - } + print ''.$langs->trans("Cancel").''."\n"; + } - if ($object->status == $object::STATUS_PRODUCED || $object->status == $object::STATUS_CANCELED) - { - print ''.$langs->trans("ReOpen").''."\n"; - } - } + if ($object->status == $object::STATUS_PRODUCED || $object->status == $object::STATUS_CANCELED) + { + print ''.$langs->trans("ReOpen").''."\n"; + } + } - // Delete (need delete permission, or if draft, just need create/modify permission) - if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) - { - print ''.$langs->trans('Delete').''."\n"; - } - else - { - print ''.$langs->trans('Delete').''."\n"; - } - } - print '
    '."\n"; + // Delete (need delete permission, or if draft, just need create/modify permission) + if ($permissiontodelete || ($object->status == $object::STATUS_DRAFT && $permissiontoadd)) + { + print ''.$langs->trans('Delete').''."\n"; + } else { + print ''.$langs->trans('Delete').''."\n"; + } + } + print '
    '."\n"; } @@ -692,37 +672,37 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($action != 'presend') { - print '
    '; - print ''; // ancre + print '
    '; + print ''; // ancre - // Documents - $objref = dol_sanitizeFileName($object->ref); - $relativepath = $objref.'/'.$objref.'.pdf'; - $filedir = $conf->mrp->dir_output.'/'.$objref; - $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $user->rights->mrp->read; // If you can read, you can build the PDF to read content - $delallowed = $user->rights->mrp->create; // If you can create/edit, you can remove a file on card - print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->modelpdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang); + // Documents + $objref = dol_sanitizeFileName($object->ref); + $relativepath = $objref.'/'.$objref.'.pdf'; + $filedir = $conf->mrp->dir_output.'/'.$objref; + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $user->rights->mrp->read; // If you can read, you can build the PDF to read content + $delallowed = $user->rights->mrp->create; // If you can create/edit, you can remove a file on card + print $formfile->showdocuments('mrp:mo', $objref, $filedir, $urlsource, $genallowed, $delallowed, $object->model_pdf, 1, 0, 0, 28, 0, '', '', '', $mysoc->default_lang); - // Show links to link elements - $linktoelem = $form->showLinkToObjectBlock($object, null, array('mo')); - $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); + // Show links to link elements + $linktoelem = $form->showLinkToObjectBlock($object, null, array('mo')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); - print '
    '; + print '
    '; - $MAXEVENT = 10; + $MAXEVENT = 10; - $morehtmlright = ''; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= ''; + $morehtmlright = ''; + $morehtmlright .= $langs->trans("SeeAll"); + $morehtmlright .= ''; - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'mo', $socid, 1, '', $MAXEVENT, '', $morehtmlright); + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'mo', $socid, 1, '', $MAXEVENT, '', $morehtmlright); - print '
    '; + print '
    '; } //Select mail models is same action as presend diff --git a/htdocs/mrp/mo_document.php b/htdocs/mrp/mo_document.php index afc7ef58819..68e693ca072 100644 --- a/htdocs/mrp/mo_document.php +++ b/htdocs/mrp/mo_document.php @@ -184,9 +184,7 @@ if ($object->id) $relativepathwithnofile = 'mo/'.dol_sanitizeFileName($object->ref).'/'; include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php'; -} -else -{ +} else { accessforbidden('', 0, 1); } diff --git a/htdocs/mrp/mo_list.php b/htdocs/mrp/mo_list.php index 4807c47fb53..b9da34958d4 100644 --- a/htdocs/mrp/mo_list.php +++ b/htdocs/mrp/mo_list.php @@ -21,25 +21,6 @@ * \brief List page for mo */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session) -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN', '1'); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("XFRAMEOPTIONS_ALLOWALL")) define('XFRAMEOPTIONS_ALLOWALL', '1'); // Do not add the HTTP header 'X-Frame-Options: SAMEORIGIN' but 'X-Frame-Options: ALLOWALL' - // Load Dolibarr environment require '../main.inc.php'; @@ -70,8 +51,8 @@ $id = GETPOST('id', 'int'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -107,7 +88,7 @@ if ($user->socid > 0) // Protection if external user // Initialize array of search criterias -$search_all = GETPOST('search_all', 'alphanohtml') ? trim(GETPOST('search_all', 'alphanohtml')) : trim(GETPOST('sall', 'alphanohtml')); +$search_all = GETPOST('search_all', 'alphanohtml') ? GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'); $search = array(); foreach ($object->fields as $key => $val) { @@ -279,9 +260,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { $num = $nbtotalofrecords; -} -else -{ +} else { if ($limit) $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -416,8 +395,7 @@ foreach ($object->fields as $key => $val) if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); elseif (strpos($val['type'], 'integer:') === 0) { print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); - } - elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; print ''; } } diff --git a/htdocs/mrp/mo_movements.php b/htdocs/mrp/mo_movements.php index 25d78c8c8e1..754a83c4770 100644 --- a/htdocs/mrp/mo_movements.php +++ b/htdocs/mrp/mo_movements.php @@ -21,26 +21,6 @@ * \brief Page to show tock movements of a MO */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies - - // Load Dolibarr environment require '../main.inc.php'; @@ -143,6 +123,12 @@ $arrayfields = array( //'m.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), //'m.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500) ); +if (!empty($conf->global->PRODUCT_DISABLE_EATBY)) { + unset($arrayfields['pl.eatby']); +} +if (!empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + unset($arrayfields['pl.sellby']); +} $objectlist->fields = dol_sort_array($objectlist->fields, 'position'); $arrayfields = dol_sort_array($arrayfields, 'position'); @@ -790,8 +776,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''; if ($productlot->id > 0) print $productlot->getNomUrl(1); - else - print $productlot->batch; // the id may not be defined if movement was entered when lot was not saved or if lot was removed after movement. + else print $productlot->batch; // the id may not be defined if movement was entered when lot was not saved or if lot was removed after movement. print ''; } if (!empty($arrayfields['pl.eatby']['checked'])) { diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index 7d0fe785c58..f25ebc35d0d 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -35,7 +35,7 @@ $langs->loadLangs(array("mrp", "companies")); // Get parameters $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'aZ09'); $backtopage = GETPOST('backtopage', 'alpha'); diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 2f8f2ce1d8e..e86fdc8348d 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2019-2020 Laurent Destailleur * * 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 @@ -21,26 +21,6 @@ * \brief Page to make production on a MO */ -//if (! defined('NOREQUIREDB')) define('NOREQUIREDB','1'); // Do not create database handler $db -//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1'); // Do not load object $user -//if (! defined('NOREQUIRESOC')) define('NOREQUIRESOC','1'); // Do not load object $mysoc -//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Do not load object $langs -//if (! defined('NOSCANGETFORINJECTION')) define('NOSCANGETFORINJECTION','1'); // Do not check injection attack on GET parameters -//if (! defined('NOSCANPOSTFORINJECTION')) define('NOSCANPOSTFORINJECTION','1'); // Do not check injection attack on POST parameters -//if (! defined('NOCSRFCHECK')) define('NOCSRFCHECK','1'); // Do not check CSRF attack (test on referer + on token if option MAIN_SECURITY_CSRF_WITH_TOKEN is on). -//if (! defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL','1'); // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) -//if (! defined('NOSTYLECHECK')) define('NOSTYLECHECK','1'); // Do not check style html tag into posted data -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu -//if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML','1'); // If we don't need to load the html.form.class.php -//if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not load ajax.lib.php library -//if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session). This include the NOIPCHECK too. -//if (! defined('NOIPCHECK')) define('NOIPCHECK','1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip -//if (! defined("MAIN_LANG_DEFAULT")) define('MAIN_LANG_DEFAULT','auto'); // Force lang to a particular value -//if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE','aloginmodule'); // Force authentication handler -//if (! defined("NOREDIRECTBYMAINTOLOGIN")) define('NOREDIRECTBYMAINTOLOGIN',1); // The main.inc.php does not make a redirect if not logged, instead show simple error message -//if (! defined("FORCECSP")) define('FORCECSP','none'); // Disable all Content Security Policies - - // Load Dolibarr environment require '../main.inc.php'; @@ -83,7 +63,7 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { @@ -274,7 +254,7 @@ if (empty($reshook)) setEventMessages($langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Warehouse"), $tmpproduct->ref), null, 'errors'); $error++; } - if ($tmpproduct->status_batch && (!GETPOST('batchtoproduce-'.$line->id.'-'.$i))) { + if (!empty($conf->productbatch->enabled) && $tmpproduct->status_batch && (!GETPOST('batchtoproduce-'.$line->id.'-'.$i))) { $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequiredForProduct", $langs->transnoentitiesnoconv("Batch"), $tmpproduct->ref), null, 'errors'); $error++; @@ -352,8 +332,7 @@ if (empty($reshook)) } } } - } - else { + } else { $consumptioncomplete = false; $productioncomplete = false; } @@ -401,14 +380,12 @@ if (empty($reshook)) $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); } - $model = $object->modelpdf; + $model = $object->model_pdf; $ret = $object->fetch($id); // Reload to get new records $object->generateDocument($model, $outputlangs, 0, 0, 0); } - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -592,9 +569,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) { print ''.$langs->trans("Validate").''; - } - else - { + } else { $langs->load("errors"); print ''.$langs->trans("Validate").''; } @@ -628,8 +603,16 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { if ($object->status == $object::STATUS_VALIDATED || $object->status == $object::STATUS_INPROGRESS) { - // TODO If production is already > 1, show only close, else show cancel - print ''.$langs->trans("Close").''."\n"; + $arrayproduced = $object->fetchLinesLinked('produced', 0); + $nbProduced = 0; + foreach ($arrayproduced as $lineproduced) { + $nbProduced += $lineproduced['qty']; + } + if ($nbProduced > 0) { // If production has started, we can close it + print ''.$langs->trans("Close").''."\n"; + } else { + print 'transnoentitiesnoconv("Production")).'">'.$langs->trans("Close").''."\n"; + } print ''.$langs->trans("Cancel").''."\n"; } @@ -668,8 +651,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
    '; print ''.$langs->trans("ConfirmProductionDesc", $langs->transnoentitiesnoconv("Confirm")).'
    '; - print $langs->trans("MovementLabel").':   '; - print $langs->trans("InventoryCode").':

    '; + print ''.$langs->trans("InventoryCode").':   '; + print ''; + print $langs->trans("MovementLabel").':

    '; print '
    '; print ''; print '   '; @@ -697,7 +681,10 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print '
    '; print '
    '; - $newlinetext = ''.$langs->trans("AddNewConsumeLines").''; + $newlinetext = ''; + if ($action != 'consumeorproduce' && $action != 'consumeandproduceall') { + $newlinetext = ''.$langs->trans("AddNewConsumeLines").''; + } print load_fiche_titre($langs->trans('Consumption'), '', '', 0, '', '', $newlinetext); print '
    '; @@ -828,7 +815,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $i = 1; print ''."\n"; print ''; - print ''.$langs->trans("ToConsume").''; + print ''.$langs->trans("ToConsume").''; $preselected = (GETPOSTISSET('qty-'.$line->id.'-'.$i) ? GETPOST('qty-'.$line->id.'-'.$i) : max(0, $line->qty - $alreadyconsumed)); if ($action == 'consumeorproduce' && !GETPOSTISSET('qty-'.$line->id.'-'.$i)) $preselected = 0; print ''; @@ -976,8 +963,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea } if (in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { + print ''."\n"; print ''; - print ''.$langs->trans("ToProduce").''; + print ''.$langs->trans("ToProduce").''; $preselected = (GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i) ? GETPOST('qtytoproduce-'.$line->id.'-'.$i) : max(0, $line->qty - $alreadyproduced)); if ($action == 'consumeorproduce' && !GETPOSTISSET('qtytoproduce-'.$line->id.'-'.$i)) $preselected = 0; print ''; diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php index 2c6a33f3ef9..2ce3277ae89 100644 --- a/htdocs/multicurrency/class/multicurrency.class.php +++ b/htdocs/multicurrency/class/multicurrency.class.php @@ -409,9 +409,7 @@ class MultiCurrency extends CommonObject { $this->rate = $currencyRate; return 1; - } - else - { + } else { $this->rate = null; $this->errors = $currencyRate->errors; return -1; @@ -425,15 +423,15 @@ class MultiCurrency extends CommonObject * @param double $rate new rate * @return int -1 if KO, 1 if OK, 2 if label found and OK */ - public function addRateFromDolibarr($code, $rate) - { - global $db, $user; + public function addRateFromDolibarr($code, $rate) + { + global $db, $user; - $currency = new MultiCurrency($db); + $currency = new MultiCurrency($this->db); $currency->code = $code; $currency->name = $code; - $sql = 'SELECT label FROM '.MAIN_DB_PREFIX.'c_currencies WHERE code_iso = \''.$db->escape($code).'\''; + $sql = 'SELECT label FROM '.MAIN_DB_PREFIX."c_currencies WHERE code_iso = '".$this->db->escape($code)."'"; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $db->query($sql); @@ -451,26 +449,26 @@ class MultiCurrency extends CommonObject } return -1; - } + } /** - * Add new entry into llx_multicurrency_rate - * - * @param double $rate rate value - * @return int <0 if KO, >0 if OK - */ - public function updateRate($rate) - { - return $this->addRate($rate); - } + * Add new entry into llx_multicurrency_rate + * + * @param double $rate rate value + * @return int <0 if KO, >0 if OK + */ + public function updateRate($rate) + { + return $this->addRate($rate); + } /** * Fetch CurrencyRate object in $this->rate * * @return int <0 if KO, 0 if not found, >0 if OK */ - public function getRate() - { + public function getRate() + { $sql = 'SELECT cr.rowid'; $sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element_line.' as cr'; $sql .= ' WHERE cr.fk_multicurrency = '.$this->id; @@ -482,40 +480,40 @@ class MultiCurrency extends CommonObject $this->rate = new CurrencyRate($this->db); return $this->rate->fetch($obj->rowid); } - } + } /** - * Get id of currency from code - * - * @param DoliDB $db object db - * @param string $code code value search - * - * @return int 0 if not found, >0 if OK - */ - public static function getIdFromCode(&$db, $code) - { + * Get id of currency from code + * + * @param DoliDB $db object db + * @param string $code code value search + * + * @return int 0 if not found, >0 if OK + */ + public static function getIdFromCode($db, $code) + { global $conf; - $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'multicurrency WHERE code = \''.$db->escape($code).'\' AND entity = '.$conf->entity; + $sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX."multicurrency WHERE code = '".$db->escape($code)."' AND entity = ".$conf->entity; dol_syslog(__METHOD__, LOG_DEBUG); $resql = $db->query($sql); if ($resql && $obj = $db->fetch_object($resql)) return $obj->rowid; else return 0; - } + } /** - * Get id and rate of currency from code - * - * @param DoliDB $db Object db - * @param string $code Code value search - * @param integer $date_document Date from document (propal, order, invoice, ...) - * - * @return array [0] => id currency - * [1] => rate - */ - public static function getIdAndTxFromCode(&$db, $code, $date_document = '') - { + * Get id and rate of currency from code + * + * @param DoliDB $db Object db + * @param string $code Code value search + * @param integer $date_document Date from document (propal, order, invoice, ...) + * + * @return array [0] => id currency + * [1] => rate + */ + public static function getIdAndTxFromCode($db, $code, $date_document = '') + { global $conf; $sql1 = 'SELECT m.rowid, mc.rate FROM '.MAIN_DB_PREFIX.'multicurrency m'; @@ -534,8 +532,7 @@ class MultiCurrency extends CommonObject $resql = $db->query($sql1.$sql2.$sql3); if ($resql && $obj = $db->fetch_object($resql)) return array($obj->rowid, $obj->rate); - else - { + else { if (!empty($conf->global->MULTICURRENCY_USE_RATE_ON_DOCUMENT_DATE)) { $resql = $db->query($sql1.$sql3); @@ -544,35 +541,34 @@ class MultiCurrency extends CommonObject return array(0, 1); } - } + } - /** - * Get the conversion of amount with invoice rate - * - * @param int $fk_facture id of facture - * @param double $amount amount to convert - * @param string $way dolibarr mean the amount is in dolibarr currency - * @param string $table facture or facture_fourn - * @return double amount converted - */ - public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way = 'dolibarr', $table = 'facture') - { - $multicurrency_tx = self::getInvoiceRate($fk_facture, $table); + /** + * Get the conversion of amount with invoice rate + * + * @param int $fk_facture id of facture + * @param double $amount amount to convert + * @param string $way 'dolibarr' mean the amount is in dolibarr currency + * @param string $table facture or facture_fourn + * @return double amount converted + */ + public static function getAmountConversionFromInvoiceRate($fk_facture, $amount, $way = 'dolibarr', $table = 'facture') + { + $multicurrency_tx = self::getInvoiceRate($fk_facture, $table); - if ($multicurrency_tx) - { - if ($way == 'dolibarr') return $amount * $multicurrency_tx; - else return $amount / $multicurrency_tx; - } - else return $amount; - } + if ($multicurrency_tx) + { + if ($way == 'dolibarr') return price2num($amount * $multicurrency_tx, 'MU'); + else return price2num($amount / $multicurrency_tx, 'MU'); + } else return $amount; + } /** * Get current invoite rate * * @param int $fk_facture id of facture * @param string $table facture or facture_fourn - * @return bool + * @return bool */ public static function getInvoiceRate($fk_facture, $table = 'facture') { @@ -603,7 +599,7 @@ class MultiCurrency extends CommonObject if ($conf->currency != $conf->global->MULTICURRENCY_APP_SOURCE) { - $alternate_source = 'USD'.$conf->currency; + $alternate_source = 'USD'.$conf->currency; if (!empty($TRate->{$alternate_source})) { $coef = $TRate->USDUSD / $TRate->{$alternate_source}; @@ -626,7 +622,7 @@ class MultiCurrency extends CommonObject * * @param string $key Key to use. Come from $conf->global->MULTICURRENCY_APP_ID. * @param int $addifnotfound Add if not found - * @return int <0 if KO, >0 if OK + * @return int <0 if KO, >0 if OK */ public static function syncRates($key, $addifnotfound = 0) { @@ -639,14 +635,14 @@ class MultiCurrency extends CommonObject dol_syslog("Call url endpoint ".$urlendpoint); // TODO Use getURLContent() function instead. - $ch = curl_init($urlendpoint); - curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); - $response = curl_exec($ch); - curl_close($ch); - $response = json_decode($response); + $ch = curl_init($urlendpoint); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + $response = curl_exec($ch); + curl_close($ch); + $response = json_decode($response); - if ($response->success) - { + if ($response->success) + { $TRate = $response->quotes; $timestamp = $response->timestamp; @@ -659,8 +655,7 @@ class MultiCurrency extends CommonObject if ($obj->fetch(null, $code) > 0) { $obj->updateRate($rate); - } - elseif ($addifnotfound) + } elseif ($addifnotfound) { self::addRateFromDolibarr($code, $rate); } @@ -668,10 +663,8 @@ class MultiCurrency extends CommonObject } return 1; - } - else - { - dol_syslog("Failed to call endpoint ".$response->error->info, LOG_WARNING); + } else { + dol_syslog("Failed to call endpoint ".$response->error->info, LOG_WARNING); setEventMessages($langs->trans('multicurrency_syncronize_error', $response->error->info), null, 'errors'); return -1; diff --git a/htdocs/opensurvey/card.php b/htdocs/opensurvey/card.php index 56aabc24721..f5fa5a5ab78 100644 --- a/htdocs/opensurvey/card.php +++ b/htdocs/opensurvey/card.php @@ -49,8 +49,8 @@ $object = new Opensurveysondage($db); $result = $object->fetch(0, $numsondage); if ($result <= 0) { - dol_print_error($db, $object->error); - exit; + dol_print_error($db, $object->error); + exit; } $expiredate = dol_mktime(0, 0, 0, GETPOST('expiremonth'), GETPOST('expireday'), GETPOST('expireyear')); @@ -67,113 +67,112 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - if ($cancel) $action = ''; + if ($cancel) $action = ''; - // Delete - if ($action == 'delete_confirm') - { - // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + // Delete + if ($action == 'delete_confirm') + { + // Security check + if (!$user->rights->opensurvey->write) accessforbidden(); - $result = $object->delete($user, '', $numsondage); + $result = $object->delete($user, '', $numsondage); - header('Location: '.dol_buildpath('/opensurvey/list.php', 1)); - exit(); - } + header('Location: '.dol_buildpath('/opensurvey/list.php', 1)); + exit(); + } - // Close - if ($action == 'close') - { - $object->status = Opensurveysondage::STATUS_CLOSED; - $object->update($user); - } + // Close + if ($action == 'close') + { + $object->status = Opensurveysondage::STATUS_CLOSED; + $object->update($user); + } - // Reopend - if ($action == 'reopen') - { - $object->status = Opensurveysondage::STATUS_VALIDATED; - $object->update($user); - } + // Reopend + if ($action == 'reopen') + { + $object->status = Opensurveysondage::STATUS_VALIDATED; + $object->update($user); + } - // Update - if ($action == 'update') - { - // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + // Update + if ($action == 'update') + { + // Security check + if (!$user->rights->opensurvey->write) accessforbidden(); - $error = 0; + $error = 0; - if (!GETPOST('nouveautitre')) - { - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); - $error++; - $action = 'edit'; - } + if (!GETPOST('nouveautitre')) + { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Title")), null, 'errors'); + $error++; + $action = 'edit'; + } - if (!$error) - { - $object->titre = GETPOST('nouveautitre', 'nohtml'); - $object->commentaires = GETPOST('nouveauxcommentaires', 'restricthtml'); - $object->description = GETPOST('nouveauxcommentaires', 'restricthtml'); - $object->mail_admin = GETPOST('nouvelleadresse', 'alpha'); - $object->date_fin = $expiredate; - $object->allow_comments = GETPOST('cancomment', 'alpha') == 'on' ? true : false; - $object->allow_spy = GETPOST('canseeothersvote', 'alpha') == 'on' ? true : false; - $object->mailsonde = GETPOST('mailsonde', 'alpha') == 'on' ? true : false; + if (!$error) + { + $object->title = GETPOST('nouveautitre', 'nohtml'); + $object->description = GETPOST('nouveauxcommentaires', 'restricthtml'); + $object->mail_admin = GETPOST('nouvelleadresse', 'alpha'); + $object->date_fin = $expiredate; + $object->allow_comments = GETPOST('cancomment', 'alpha') == 'on' ? 1 : 0; + $object->allow_spy = GETPOST('canseeothersvote', 'alpha') == 'on' ? 1 : 0; + $object->mailsonde = GETPOST('mailsonde', 'alpha') == 'on' ? true : false; - $res = $object->update($user); - if ($res < 0) - { - setEventMessages($object->error, $object->errors, 'errors'); - $action = 'edit'; - } - } - } + $res = $object->update($user); + if ($res < 0) + { + setEventMessages($object->error, $object->errors, 'errors'); + $action = 'edit'; + } + } + } - // Add comment - if (GETPOST('ajoutcomment')) - { - $error = 0; + // Add comment + if (GETPOST('ajoutcomment')) + { + $error = 0; - if (!GETPOST('comment')) - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors'); - } - if (!GETPOST('commentuser')) - { - $error++; - setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors'); - } + if (!GETPOST('comment')) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors'); + } + if (!GETPOST('commentuser')) + { + $error++; + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors'); + } - if (!$error) - { - $comment = GETPOST("comment"); - $comment_user = GETPOST('commentuser'); + if (!$error) + { + $comment = GETPOST("comment"); + $comment_user = GETPOST('commentuser'); - $resql = $object->addComment($comment, $comment_user); + $resql = $object->addComment($comment, $comment_user); - if (!$resql) - { - setEventMessages($langs->trans('ErrorInsertingComment'), null, 'errors'); - } - } - } + if (!$resql) + { + setEventMessages($langs->trans('ErrorInsertingComment'), null, 'errors'); + } + } + } - // Delete comment - $idcomment = GETPOST('deletecomment', 'int'); - if ($idcomment) - { - // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); + // Delete comment + $idcomment = GETPOST('deletecomment', 'int'); + if ($idcomment) + { + // Security check + if (!$user->rights->opensurvey->write) accessforbidden(); - $resql = $object->deleteComment($idcomment); - } + $resql = $object->deleteComment($idcomment); + } - if ($action == 'edit') { - // Security check - if (!$user->rights->opensurvey->write) accessforbidden(); - } + if ($action == 'edit') { + // Security check + if (!$user->rights->opensurvey->write) accessforbidden(); + } } @@ -189,7 +188,7 @@ if ($object->fk_user_creat) $userstatic->fetch($object->fk_user_creat); } -$title = $object->titre." - ".$langs->trans('Card'); +$title = $object->title." - ".$langs->trans('Card'); $helpurl = ''; $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); @@ -240,9 +239,8 @@ $adresseadmin = $object->mail_admin; print $langs->trans("Title").''; if ($action == 'edit') { - print ''; -} -else print dol_htmlentities($object->titre); + print ''; +} else print dol_htmlentities($object->title); print ''; // Description @@ -251,9 +249,7 @@ if ($action == 'edit') { $doleditor = new DolEditor('nouveauxcommentaires', $object->description, '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); $doleditor->Create(0, ''); -} -else -{ +} else { print (dol_textishtml($object->description) ? $object->description : dol_nl2br($object->description, 1, true)); } print ''; @@ -265,8 +261,7 @@ if (!$object->fk_user_creat) { if ($action == 'edit') { print ''; - } - else print dol_print_email($object->mail_admin, 0, 0, 1); + } else print dol_print_email($object->mail_admin, 0, 0, 1); print ''; } @@ -275,8 +270,7 @@ print ''.$langs->trans('ToReceiveEMailForEachVote').'mailsonde ? 'checked="checked"' : '').'">'; -} -else { +} else { print yn($object->mailsonde); //If option is active and linked user does not have an email, we show a warning @@ -293,8 +287,7 @@ print ''.$langs->trans('CanComment').''; if ($action == 'edit') { print 'allow_comments ? 'checked="checked"' : '').'">'; -} -else print yn($object->allow_comments); +} else print yn($object->allow_comments); print ''; // Users can see others vote @@ -302,17 +295,15 @@ print ''.$langs->trans('CanSeeOthersVote').''; if ($action == 'edit') { print 'allow_spy ? 'checked="checked"' : '').'">'; -} -else print yn($object->allow_spy); +} else print yn($object->allow_spy); print ''; // Expire date print ''.$langs->trans('ExpireDate').''; if ($action == 'edit') print $form->selectDate($expiredate ? $expiredate : $object->date_fin, 'expire', 0, 0, 0, '', 1, 0); -else -{ - print dol_print_date($object->date_fin, 'day'); - if ($object->date_fin && $object->date_fin < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) print img_warning($langs->trans("Expired")); +else { + print dol_print_date($object->date_fin, 'day'); + if ($object->date_fin && $object->date_fin < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) print img_warning($langs->trans("Expired")); } print ''; @@ -365,22 +356,22 @@ print ''."\n"; print '
    '; if ($action != 'edit' && $user->rights->opensurvey->write) { - //Modify button - print ''.$langs->trans("Modify").''; + //Modify button + print ''.$langs->trans("Modify").''; - if ($object->status == Opensurveysondage::STATUS_VALIDATED) - { - //Close button - print ''.$langs->trans("Close").''; - } - if ($object->status == Opensurveysondage::STATUS_CLOSED) - { - //Opened button - print ''.$langs->trans("ReOpen").''; - } + if ($object->status == Opensurveysondage::STATUS_VALIDATED) + { + //Close button + print ''.$langs->trans("Close").''; + } + if ($object->status == Opensurveysondage::STATUS_CLOSED) + { + //Opened button + print ''.$langs->trans("ReOpen").''; + } //Delete button - print ''.$langs->trans('Delete').''; + print ''.$langs->trans('Delete').''; } print '
    '; @@ -409,10 +400,8 @@ if ($comments) { print dol_htmlentities($comment->usercomment).': '.dol_nl2br(dol_htmlentities($comment->comment))."
    "; } -} -else -{ - print $langs->trans("NoCommentYet").'
    '; +} else { + print ''.$langs->trans("NoCommentYet").'
    '; } print '
    '; diff --git a/htdocs/opensurvey/class/opensurveysondage.class.php b/htdocs/opensurvey/class/opensurveysondage.class.php index c971b69b208..f8f6cb0f885 100644 --- a/htdocs/opensurvey/class/opensurveysondage.class.php +++ b/htdocs/opensurvey/class/opensurveysondage.class.php @@ -34,634 +34,615 @@ require_once DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php"; */ class Opensurveysondage extends CommonObject { - /** - * @var string ID to identify managed object - */ - public $element = 'opensurvey_sondage'; - - /** - * @var string Name of table without prefix where object is stored - */ - public $table_element = 'opensurvey_sondage'; - - /** - * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png - */ - public $picto = 'poll'; - - - /** - * @var string ID survey - */ - public $id_sondage; - /** - * @deprecated - * @see $description - */ - public $commentaires; - - /** - * @var string description - */ - public $description; - - public $mail_admin; - public $nom_admin; - - /** - * Id of user author of the poll - * @var int - */ - public $fk_user_creat; - - public $titre; - public $date_fin = ''; - public $status = 1; - public $format; - public $mailsonde; - - public $sujet; - - /** - * @var int Allow comments on this poll - */ - public $allow_comments; - - /** - * @var int Allow users see others vote - */ - public $allow_spy; - - - /** - * Draft status (not used) - */ - const STATUS_DRAFT = 0; - /** - * Validated/Opened status - */ - const STATUS_VALIDATED = 1; - /** - * Closed - */ - const STATUS_CLOSED = 2; - - - - /** - * Constructor - * - * @param DoliDb $db Database handler - */ - public function __construct($db) - { - $this->db = $db; - } - - - /** - * Create object into database - * - * @param User $user User that creates - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 if KO, Id of created object if OK - */ - public function create(User $user, $notrigger = 0) - { - $error = 0; - - // Clean parameters - $this->cleanParameters(); - - // Check parameters - if (!$this->date_fin > 0) - { - $this->error = 'BadValueForEndDate'; - dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); - return -1; - } - - // Insert request - $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_sondage("; - $sql .= "id_sondage,"; - $sql .= "commentaires,"; - $sql .= "fk_user_creat,"; - $sql .= "titre,"; - $sql .= "date_fin,"; - $sql .= "status,"; - $sql .= "format,"; - $sql .= "mailsonde,"; - $sql .= "allow_comments,"; - $sql .= "allow_spy,"; - $sql .= "sujet"; - $sql .= ") VALUES ("; - $sql .= "'".$this->db->escape($this->id_sondage)."',"; - $sql .= " ".(empty($this->commentaires) ? 'NULL' : "'".$this->db->escape($this->commentaires)."'").","; - $sql .= " ".$user->id.","; - $sql .= " '".$this->db->escape($this->titre)."',"; - $sql .= " '".$this->db->idate($this->date_fin)."',"; - $sql .= " ".$this->status.","; - $sql .= " '".$this->db->escape($this->format)."',"; - $sql .= " ".$this->db->escape($this->mailsonde).","; - $sql .= " ".$this->db->escape($this->allow_comments).","; - $sql .= " ".$this->db->escape($this->allow_spy).","; - $sql .= " '".$this->db->escape($this->sujet)."'"; - $sql .= ")"; - - $this->db->begin(); - - dol_syslog(get_class($this)."::create", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - - if (!$error) - { - if (!$notrigger) - { - global $langs, $conf; - - // Call trigger - $result = $this->call_trigger('OPENSURVEY_CREATE', $user); - if ($result < 0) $error++; - // End call triggers - } - } - - // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - else - { - $this->db->commit(); - return $this->id; - } - } - - - /** - * Load object in memory from the database - * - * @param int $id Id object - * @param string $numsurvey Ref of survey (admin or not) - * @return int <0 if KO, >0 if OK - */ - public function fetch($id, $numsurvey = '') - { - $sql = "SELECT"; - $sql .= " t.id_sondage,"; - $sql .= " t.commentaires as description,"; - $sql .= " t.mail_admin,"; - $sql .= " t.nom_admin,"; - $sql .= " t.fk_user_creat,"; - $sql .= " t.titre,"; - $sql .= " t.date_fin,"; - $sql .= " t.status,"; - $sql .= " t.format,"; - $sql .= " t.mailsonde,"; - $sql .= " t.allow_comments,"; - $sql .= " t.allow_spy,"; - $sql .= " t.sujet,"; - $sql .= " t.tms"; - $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t"; - $sql .= " WHERE t.id_sondage = '".$this->db->escape($id ? $id : $numsurvey)."'"; - - dol_syslog(get_class($this)."::fetch", LOG_DEBUG); - $resql = $this->db->query($sql); - if ($resql) - { - if ($this->db->num_rows($resql)) - { - $obj = $this->db->fetch_object($resql); - - $this->id_sondage = $obj->id_sondage; - $this->ref = $this->id_sondage; //For compatibility - - $this->commentaires = $obj->description; // deprecated - $this->description = $obj->description; - $this->mail_admin = $obj->mail_admin; - $this->nom_admin = $obj->nom_admin; - $this->titre = $obj->titre; - $this->date_fin = $this->db->jdate($obj->date_fin); - $this->status = $obj->status; - $this->format = $obj->format; - $this->mailsonde = $obj->mailsonde; - $this->allow_comments = $obj->allow_comments; - $this->allow_spy = $obj->allow_spy; - $this->sujet = $obj->sujet; - $this->fk_user_creat = $obj->fk_user_creat; - - $this->date_m = $this->db->jdate($obj->tls); - $ret = 1; - } - else - { - $sondage = ($id ? 'id='.$id : 'sondageid='.$numsurvey); - $this->error = 'Fetch no poll found for '.$sondage; - dol_syslog($this->error, LOG_ERR); - $ret = 0; - } - - $this->db->free($resql); - } - else - { - $this->error = "Error ".$this->db->lasterror(); - $ret = -1; - } - - return $ret; - } - - - /** - * Update object into database - * - * @param User $user User that modifies - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 if KO, >0 if OK - */ - public function update(User $user, $notrigger = 0) - { - global $conf, $langs; - $error = 0; - - // Clean parameters - $this->cleanParameters(); - - // Check parameters - // Put here code to add a control on parameters values - - // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."opensurvey_sondage SET"; - - $sql .= " id_sondage=".(isset($this->id_sondage) ? "'".$this->db->escape($this->id_sondage)."'" : "null").","; - $sql .= " commentaires=".(isset($this->commentaires) ? "'".$this->db->escape($this->commentaires)."'" : "null").","; - $sql .= " mail_admin=".(isset($this->mail_admin) ? "'".$this->db->escape($this->mail_admin)."'" : "null").","; - $sql .= " nom_admin=".(isset($this->nom_admin) ? "'".$this->db->escape($this->nom_admin)."'" : "null").","; - $sql .= " titre=".(isset($this->titre) ? "'".$this->db->escape($this->titre)."'" : "null").","; - $sql .= " date_fin=".(dol_strlen($this->date_fin) != 0 ? "'".$this->db->idate($this->date_fin)."'" : 'null').","; - $sql .= " status=".(isset($this->status) ? "'".$this->db->escape($this->status)."'" : "null").","; - $sql .= " format=".(isset($this->format) ? "'".$this->db->escape($this->format)."'" : "null").","; - $sql .= " mailsonde=".(isset($this->mailsonde) ? $this->db->escape($this->mailsonde) : "null").","; - $sql .= " allow_comments=".$this->db->escape($this->allow_comments).","; - $sql .= " allow_spy=".$this->db->escape($this->allow_spy); - - $sql .= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; - - $this->db->begin(); - - dol_syslog(get_class($this)."::update", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - - if (!$error && !$notrigger) - { - // Call trigger - $result = $this->call_trigger('OPENSURVEY_MODIFY', $user); - if ($result < 0) $error++; - // End call triggers - } - - // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - else - { - $this->db->commit(); - return 1; - } - } - - /** - * Delete object in database - * - * @param User $user User that deletes - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @param string $numsondage Num sondage admin to delete - * @return int <0 if KO, >0 if OK - */ - public function delete(User $user, $notrigger = 0, $numsondage = '') - { - global $conf, $langs; - $error = 0; - - if (empty($numsondage)) - { - $numsondage = $this->id_sondage; - } - - $this->db->begin(); - - if (!$error) - { - if (!$notrigger) - { - // Call trigger - $result = $this->call_trigger('OPENSURVEY_DELETE', $user); - if ($result < 0) $error++; - // End call triggers - } - } - - if (!$error) - { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX."opensurvey_comments WHERE id_sondage = '".$this->db->escape($numsondage)."'"; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $resql = $this->db->query($sql); - $sql = 'DELETE FROM '.MAIN_DB_PREFIX."opensurvey_user_studs WHERE id_sondage = '".$this->db->escape($numsondage)."'"; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $resql = $this->db->query($sql); - - $sql = "DELETE FROM ".MAIN_DB_PREFIX."opensurvey_sondage"; - $sql .= " WHERE id_sondage = '".$this->db->escape($numsondage)."'"; - - dol_syslog(get_class($this)."::delete", LOG_DEBUG); - $resql = $this->db->query($sql); - if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } - } - - // Commit or rollback - if ($error) - { - foreach ($this->errors as $errmsg) - { - dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); - $this->error .= ($this->error ? ', '.$errmsg : $errmsg); - } - $this->db->rollback(); - return -1 * $error; - } - else - { - $this->db->commit(); - return 1; - } - } - - /** - * Return a link to the object card (with optionaly the picto) - * - * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) - * @param int $notooltip 1=Disable tooltip - * @param string $morecss Add more css on link - * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking - * @return string String with URL - */ - public function getNomUrl($withpicto = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) - { - global $db, $conf, $langs; - global $dolibarr_main_authentication, $dolibarr_main_demo; - global $menumanager; - - if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips - - $result = ''; - $companylink = ''; - - $label = ''.$langs->trans("ShowSurvey").''; - $label .= '
    '; - $label .= ''.$langs->trans('Ref').': '.$this->ref.'
    '; - $label .= ''.$langs->trans('Title').': '.$this->title.'
    '; - - $url = DOL_URL_ROOT.'/opensurvey/card.php?id='.$this->id; - - // Add param to save lastsearch_values or not - $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); - if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; - if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; - - $linkclose = ''; - if (empty($notooltip)) - { - if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) - { - $label = $langs->trans("ShowMyObject"); - $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; - } - $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; - $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; - } - else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); - - $linkstart = ''; - $linkend = ''; - - $result .= $linkstart; - if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); - if ($withpicto != 2) $result .= $this->ref; - $result .= $linkend; - - return $result; - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return array of lines - * - * @return int <0 if KO, >0 if OK - */ - public function fetch_lines() - { - // phpcs:enable - $ret = array(); - - $sql = "SELECT id_users, nom as name, reponses FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; - $sql .= " WHERE id_sondage = '".$this->db->escape($this->id_sondage)."'"; - $resql = $this->db->query($sql); - - if ($resql) - { - $num = $this->db->num_rows($resql); - $i = 0; - while ($i < $num) - { - $obj = $this->db->fetch_object($resql); - $tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses); - - $ret[] = $tmp; - $i++; - } - } - else dol_print_error($this->db); - - $this->lines = $ret; - - return count($this->lines); - } - - /** - * Initialise object with example values - * Id must be 0 if object instance is a specimen - * - * @return void - */ - public function initAsSpecimen() - { - $this->id = 0; - - $this->id_sondage = ''; - $this->commentaires = 'Comment of the specimen survey'; - $this->description = 'Comment of the specimen survey'; - $this->mail_admin = ''; - $this->nom_admin = ''; - $this->titre = 'This is a specimen survey'; - $this->date_fin = dol_now() + 3600 * 24 * 10; - $this->status = 1; - $this->format = 'classic'; - $this->mailsonde = ''; - } - - /** - * Returns all comments for the current opensurvey poll - * - * @return Object[] - */ - public function getComments() - { - $comments = array(); - - $sql = 'SELECT id_comment, usercomment, comment'; - $sql .= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; - $sql .= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; - $sql .= " ORDER BY id_comment"; - $resql = $this->db->query($sql); - - if ($resql) - { - $num_rows = $this->db->num_rows($resql); - - if ($num_rows > 0) - { - while ($obj = $this->db->fetch_object($resql)) - { - $comments[] = $obj; - } - } - } - - return $comments; - } - - /** - * Adds a comment to the poll - * - * @param string $comment Comment content - * @param string $comment_user Comment author - * @return boolean False in case of the query fails, true if it was successful - */ - public function addComment($comment, $comment_user) - { - $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; - $sql .= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')"; - $resql = $this->db->query($sql); - - if (!$resql) { - return false; - } - - return true; - } - - /** - * Deletes a comment of the poll - * - * @param int $id_comment Id of the comment - * @return boolean False in case of the query fails, true if it was successful - */ - public function deleteComment($id_comment) - { - $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$id_comment.' AND id_sondage = "'.$this->db->escape($this->id_sondage).'"'; - $resql = $this->db->query($sql); - - if (!$resql) { - return false; - } - - return true; - } - - /** - * Cleans all the class variables before doing an update or an insert - * - * @return void - */ - private function cleanParameters() - { - $this->id_sondage = trim($this->id_sondage); - $this->commentaires = trim($this->commentaires); - $this->description = trim($this->description); - $this->mail_admin = trim($this->mail_admin); - $this->nom_admin = trim($this->nom_admin); - $this->titre = trim($this->titre); - $this->status = trim($this->status); - $this->format = trim($this->format); - $this->mailsonde = ($this->mailsonde ? 1 : 0); - $this->allow_comments = ($this->allow_comments ? 1 : 0); - $this->allow_spy = ($this->allow_spy ? 1 : 0); - $this->sujet = trim($this->sujet); - } - - - /** - * Return status label of Order - * - * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * @return string Libelle - */ - public function getLibStatut($mode) - { - return $this->LibStatut($this->status, $mode); - } - - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps - /** - * Return label of status - * - * @param int $status Id statut - * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto - * @return string Label of status - */ - public function LibStatut($status, $mode) - { - // phpcs:enable - global $langs, $conf; - - if (empty($this->labelStatus) || empty($this->labelStatusShort)) - { - global $langs; - //$langs->load("mymodule"); - $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Opened'); - $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('Closed'); - $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); - $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Opened'); - $this->labelStatusShort[self::STATUS_CLOSED] = $langs->trans('Closed'); - } - - $statusType = 'status'.$status; - if ($status == self::STATUS_VALIDATED) { - if (0) $statusType = 'status1'; - else $statusType = 'status4'; - } - if ($status == self::STATUS_CLOSED) $statusType = 'status6'; - - return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); - } + /** + * @var string ID to identify managed object + */ + public $element = 'opensurvey_sondage'; + + /** + * @var string Name of table without prefix where object is stored + */ + public $table_element = 'opensurvey_sondage'; + + /** + * @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png + */ + public $picto = 'poll'; + + + /** + * @var string ID survey + */ + public $id_sondage; + + /** + * @var string description + */ + public $description; + + public $mail_admin; + public $nom_admin; + + /** + * Id of user author of the poll + * @var int + */ + public $fk_user_creat; + + /** + * @var string Title + */ + public $title; + + public $date_fin = ''; + public $status = 1; + public $format; + public $mailsonde; + + public $sujet; + + /** + * @var int Allow comments on this poll + */ + public $allow_comments; + + /** + * @var int Allow users see others vote + */ + public $allow_spy; + + + /** + * Draft status (not used) + */ + const STATUS_DRAFT = 0; + /** + * Validated/Opened status + */ + const STATUS_VALIDATED = 1; + /** + * Closed + */ + const STATUS_CLOSED = 2; + + + + /** + * Constructor + * + * @param DoliDb $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + } + + + /** + * Create object into database + * + * @param User $user User that creates + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, Id of created object if OK + */ + public function create(User $user, $notrigger = 0) + { + $error = 0; + + // Clean parameters + $this->cleanParameters(); + + // Check parameters + if (!$this->date_fin > 0) + { + $this->error = 'BadValueForEndDate'; + dol_syslog(get_class($this)."::create ".$this->error, LOG_ERR); + return -1; + } + + // Insert request + $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_sondage("; + $sql .= "id_sondage,"; + $sql .= "commentaires,"; + $sql .= "fk_user_creat,"; + $sql .= "titre,"; + $sql .= "date_fin,"; + $sql .= "status,"; + $sql .= "format,"; + $sql .= "mailsonde,"; + $sql .= "allow_comments,"; + $sql .= "allow_spy,"; + $sql .= "sujet"; + $sql .= ") VALUES ("; + $sql .= "'".$this->db->escape($this->id_sondage)."',"; + $sql .= " ".(empty($this->description) ? 'NULL' : "'".$this->db->escape($this->description)."'").","; + $sql .= " ".$user->id.","; + $sql .= " '".$this->db->escape($this->title)."',"; + $sql .= " '".$this->db->idate($this->date_fin)."',"; + $sql .= " ".$this->status.","; + $sql .= " '".$this->db->escape($this->format)."',"; + $sql .= " ".$this->db->escape($this->mailsonde).","; + $sql .= " ".$this->db->escape($this->allow_comments).","; + $sql .= " ".$this->db->escape($this->allow_spy).","; + $sql .= " '".$this->db->escape($this->sujet)."'"; + $sql .= ")"; + + $this->db->begin(); + + dol_syslog(get_class($this)."::create", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + + if (!$error) + { + if (!$notrigger) + { + global $langs, $conf; + + // Call trigger + $result = $this->call_trigger('OPENSURVEY_CREATE', $user); + if ($result < 0) $error++; + // End call triggers + } + } + + // Commit or rollback + if ($error) + { + foreach ($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } else { + $this->db->commit(); + return $this->id; + } + } + + + /** + * Load object in memory from the database + * + * @param int $id Id object + * @param string $numsurvey Ref of survey (admin or not) + * @return int <0 if KO, >0 if OK + */ + public function fetch($id, $numsurvey = '') + { + $sql = "SELECT"; + $sql .= " t.id_sondage,"; + $sql .= " t.titre as title,"; + $sql .= " t.commentaires as description,"; + $sql .= " t.mail_admin,"; + $sql .= " t.nom_admin,"; + $sql .= " t.fk_user_creat,"; + $sql .= " t.date_fin,"; + $sql .= " t.status,"; + $sql .= " t.format,"; + $sql .= " t.mailsonde,"; + $sql .= " t.allow_comments,"; + $sql .= " t.allow_spy,"; + $sql .= " t.sujet,"; + $sql .= " t.tms"; + $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as t"; + $sql .= " WHERE t.id_sondage = '".$this->db->escape($id ? $id : $numsurvey)."'"; + + dol_syslog(get_class($this)."::fetch", LOG_DEBUG); + $resql = $this->db->query($sql); + if ($resql) + { + if ($this->db->num_rows($resql)) + { + $obj = $this->db->fetch_object($resql); + + $this->id_sondage = $obj->id_sondage; + $this->ref = $this->id_sondage; //For compatibility + + $this->description = $obj->description; + $this->mail_admin = $obj->mail_admin; + $this->nom_admin = $obj->nom_admin; + $this->title = $obj->title; + $this->date_fin = $this->db->jdate($obj->date_fin); + $this->status = $obj->status; + $this->format = $obj->format; + $this->mailsonde = $obj->mailsonde; + $this->allow_comments = $obj->allow_comments; + $this->allow_spy = $obj->allow_spy; + $this->sujet = $obj->sujet; + $this->fk_user_creat = $obj->fk_user_creat; + + $this->date_m = $this->db->jdate($obj->tls); + $ret = 1; + } else { + $sondage = ($id ? 'id='.$id : 'sondageid='.$numsurvey); + $this->error = 'Fetch no poll found for '.$sondage; + dol_syslog($this->error, LOG_ERR); + $ret = 0; + } + + $this->db->free($resql); + } else { + $this->error = "Error ".$this->db->lasterror(); + $ret = -1; + } + + return $ret; + } + + + /** + * Update object into database + * + * @param User $user User that modifies + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, >0 if OK + */ + public function update(User $user, $notrigger = 0) + { + global $conf, $langs; + $error = 0; + + // Clean parameters + $this->cleanParameters(); + + // Check parameters + // Put here code to add a control on parameters values + + // Update request + $sql = "UPDATE ".MAIN_DB_PREFIX."opensurvey_sondage SET"; + $sql .= " id_sondage=".(isset($this->id_sondage) ? "'".$this->db->escape($this->id_sondage)."'" : "null").","; + $sql .= " commentaires=".(isset($this->description) ? "'".$this->db->escape($this->description)."'" : "null").","; + $sql .= " mail_admin=".(isset($this->mail_admin) ? "'".$this->db->escape($this->mail_admin)."'" : "null").","; + $sql .= " nom_admin=".(isset($this->nom_admin) ? "'".$this->db->escape($this->nom_admin)."'" : "null").","; + $sql .= " titre=".(isset($this->title) ? "'".$this->db->escape($this->title)."'" : "null").","; + $sql .= " date_fin=".(dol_strlen($this->date_fin) != 0 ? "'".$this->db->idate($this->date_fin)."'" : 'null').","; + $sql .= " status=".(isset($this->status) ? "'".$this->db->escape($this->status)."'" : "null").","; + $sql .= " format=".(isset($this->format) ? "'".$this->db->escape($this->format)."'" : "null").","; + $sql .= " mailsonde=".(isset($this->mailsonde) ? $this->db->escape($this->mailsonde) : "null").","; + $sql .= " allow_comments=".$this->db->escape($this->allow_comments).","; + $sql .= " allow_spy=".$this->db->escape($this->allow_spy); + $sql .= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; + + $this->db->begin(); + + dol_syslog(get_class($this)."::update", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + + if (!$error && !$notrigger) + { + // Call trigger + $result = $this->call_trigger('OPENSURVEY_MODIFY', $user); + if ($result < 0) $error++; + // End call triggers + } + + // Commit or rollback + if ($error) + { + foreach ($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::update ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } else { + $this->db->commit(); + return 1; + } + } + + /** + * Delete object in database + * + * @param User $user User that deletes + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @param string $numsondage Num sondage admin to delete + * @return int <0 if KO, >0 if OK + */ + public function delete(User $user, $notrigger = 0, $numsondage = '') + { + global $conf, $langs; + $error = 0; + + if (empty($numsondage)) + { + $numsondage = $this->id_sondage; + } + + $this->db->begin(); + + if (!$error) + { + if (!$notrigger) + { + // Call trigger + $result = $this->call_trigger('OPENSURVEY_DELETE', $user); + if ($result < 0) $error++; + // End call triggers + } + } + + if (!$error) + { + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."opensurvey_comments WHERE id_sondage = '".$this->db->escape($numsondage)."'"; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql = $this->db->query($sql); + $sql = 'DELETE FROM '.MAIN_DB_PREFIX."opensurvey_user_studs WHERE id_sondage = '".$this->db->escape($numsondage)."'"; + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql = $this->db->query($sql); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."opensurvey_sondage"; + $sql .= " WHERE id_sondage = '".$this->db->escape($numsondage)."'"; + + dol_syslog(get_class($this)."::delete", LOG_DEBUG); + $resql = $this->db->query($sql); + if (!$resql) { $error++; $this->errors[] = "Error ".$this->db->lasterror(); } + } + + // Commit or rollback + if ($error) + { + foreach ($this->errors as $errmsg) + { + dol_syslog(get_class($this)."::delete ".$errmsg, LOG_ERR); + $this->error .= ($this->error ? ', '.$errmsg : $errmsg); + } + $this->db->rollback(); + return -1 * $error; + } else { + $this->db->commit(); + return 1; + } + } + + /** + * Return a link to the object card (with optionaly the picto) + * + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + public function getNomUrl($withpicto = 0, $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $db, $conf, $langs; + global $dolibarr_main_authentication, $dolibarr_main_demo; + global $menumanager; + + if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips + + $result = ''; + + $label = img_picto('', $this->picto).' '.$langs->trans("ShowSurvey").''; + $label .= '
    '; + $label .= ''.$langs->trans('Ref').': '.$this->ref.'
    '; + $label .= ''.$langs->trans('Title').': '.$this->title.'
    '; + + $url = DOL_URL_ROOT.'/opensurvey/card.php?id='.$this->id; + + // Add param to save lastsearch_values or not + $add_save_lastsearch_values = ($save_lastsearch_value == 1 ? 1 : 0); + if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values = 1; + if ($add_save_lastsearch_values) $url .= '&save_lastsearch_values=1'; + + $linkclose = ''; + if (empty($notooltip)) + { + if (!empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) + { + $label = $langs->trans("ShowMyObject"); + $linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"'; + } + $linkclose .= ' title="'.dol_escape_htmltag($label, 1).'"'; + $linkclose .= ' class="classfortooltip'.($morecss ? ' '.$morecss : '').'"'; + } else $linkclose = ($morecss ? ' class="'.$morecss.'"' : ''); + + $linkstart = ''; + $linkend = ''; + + $result .= $linkstart; + if ($withpicto) $result .= img_object(($notooltip ? '' : $label), $this->picto, ($notooltip ? (($withpicto != 2) ? 'class="paddingright"' : '') : 'class="'.(($withpicto != 2) ? 'paddingright ' : '').'classfortooltip"'), 0, 0, $notooltip ? 0 : 1); + if ($withpicto != 2) $result .= $this->ref; + $result .= $linkend; + + return $result; + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return array of lines + * + * @return int <0 if KO, >0 if OK + */ + public function fetch_lines() + { + // phpcs:enable + $ret = array(); + + $sql = "SELECT id_users, nom as name, reponses FROM ".MAIN_DB_PREFIX."opensurvey_user_studs"; + $sql .= " WHERE id_sondage = '".$this->db->escape($this->id_sondage)."'"; + $resql = $this->db->query($sql); + + if ($resql) + { + $num = $this->db->num_rows($resql); + $i = 0; + while ($i < $num) + { + $obj = $this->db->fetch_object($resql); + $tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses); + + $ret[] = $tmp; + $i++; + } + } else dol_print_error($this->db); + + $this->lines = $ret; + + return count($this->lines); + } + + /** + * Initialise object with example values + * Id must be 0 if object instance is a specimen + * + * @return void + */ + public function initAsSpecimen() + { + $this->id = 0; + + $this->id_sondage = ''; + $this->description = 'Description of the specimen survey'; + $this->mail_admin = ''; + $this->nom_admin = ''; + $this->title = 'This is a specimen survey'; + $this->date_fin = dol_now() + 3600 * 24 * 10; + $this->status = 1; + $this->format = 'classic'; + $this->mailsonde = ''; + } + + /** + * Returns all comments for the current opensurvey poll + * + * @return Object[] + */ + public function getComments() + { + $comments = array(); + + $sql = 'SELECT id_comment, usercomment, comment'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'opensurvey_comments'; + $sql .= " WHERE id_sondage='".$this->db->escape($this->id_sondage)."'"; + $sql .= " ORDER BY id_comment"; + $resql = $this->db->query($sql); + + if ($resql) + { + $num_rows = $this->db->num_rows($resql); + + if ($num_rows > 0) + { + while ($obj = $this->db->fetch_object($resql)) + { + $comments[] = $obj; + } + } + } + + return $comments; + } + + /** + * Adds a comment to the poll + * + * @param string $comment Comment content + * @param string $comment_user Comment author + * @return boolean False in case of the query fails, true if it was successful + */ + public function addComment($comment, $comment_user) + { + $sql = "INSERT INTO ".MAIN_DB_PREFIX."opensurvey_comments (id_sondage, comment, usercomment)"; + $sql .= " VALUES ('".$this->db->escape($this->id_sondage)."','".$this->db->escape($comment)."','".$this->db->escape($comment_user)."')"; + $resql = $this->db->query($sql); + + if (!$resql) { + return false; + } + + return true; + } + + /** + * Deletes a comment of the poll + * + * @param int $id_comment Id of the comment + * @return boolean False in case of the query fails, true if it was successful + */ + public function deleteComment($id_comment) + { + $sql = 'DELETE FROM '.MAIN_DB_PREFIX.'opensurvey_comments WHERE id_comment = '.$id_comment.' AND id_sondage = "'.$this->db->escape($this->id_sondage).'"'; + $resql = $this->db->query($sql); + + if (!$resql) { + return false; + } + + return true; + } + + /** + * Cleans all the class variables before doing an update or an insert + * + * @return void + */ + private function cleanParameters() + { + $this->id_sondage = trim($this->id_sondage); + $this->description = trim($this->description); + $this->mail_admin = trim($this->mail_admin); + $this->nom_admin = trim($this->nom_admin); + $this->title = trim($this->title); + $this->status = trim($this->status); + $this->format = trim($this->format); + $this->mailsonde = ($this->mailsonde ? 1 : 0); + $this->allow_comments = ($this->allow_comments ? 1 : 0); + $this->allow_spy = ($this->allow_spy ? 1 : 0); + $this->sujet = trim($this->sujet); + } + + + /** + * Return status label of Order + * + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Libelle + */ + public function getLibStatut($mode) + { + return $this->LibStatut($this->status, $mode); + } + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Return label of status + * + * @param int $status Id statut + * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto + * @return string Label of status + */ + public function LibStatut($status, $mode) + { + // phpcs:enable + global $langs, $conf; + + if (empty($this->labelStatus) || empty($this->labelStatusShort)) + { + global $langs; + //$langs->load("mymodule"); + $this->labelStatus[self::STATUS_DRAFT] = $langs->trans('Draft'); + $this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Opened'); + $this->labelStatus[self::STATUS_CLOSED] = $langs->trans('Closed'); + $this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('Draft'); + $this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Opened'); + $this->labelStatusShort[self::STATUS_CLOSED] = $langs->trans('Closed'); + } + + $statusType = 'status'.$status; + if ($status == self::STATUS_VALIDATED) { + if (0) $statusType = 'status1'; + else $statusType = 'status4'; + } + if ($status == self::STATUS_CLOSED) $statusType = 'status6'; + + return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode); + } } diff --git a/htdocs/opensurvey/css/style.css b/htdocs/opensurvey/css/style.css index d9cf48c72ee..409b64dddf5 100644 --- a/htdocs/opensurvey/css/style.css +++ b/htdocs/opensurvey/css/style.css @@ -363,6 +363,7 @@ div.cadre td.non { div.cadre td.vide { background-color: #DDDDDD; text-align:center; + padding: 4px; } /*Case de tableau contenant les noms dans affichage de sondage*/ div.cadre td.nom { @@ -403,17 +404,6 @@ div.cadre td.mois { padding:1px 5px; } -/*affichage du calendrier*/ -div.calendrier { - padding:10px; - background-color: #AAA; - width:490px; - font-size:12px; - font-family:arial, sans-serif; - margin-left: 30%; - margin-right: 30%; - position:static; -} /*jour de la semaine dans calendrier*/ div.calendrier td.joursemaine { width:65px; @@ -432,19 +422,16 @@ div.calendrier td.jourwe { background-color: #C0C0C0; } /*jour avant le premier jour du mois dans calendrier*/ -div.calendrier td.avant { +div.calendrier td.avant, div.calendrier td.libre { width:65px; text-align: center; border: 2px; font-family:arial, sans-serif; - font-size:13px; + font-size: 1.1em; background-color: #DDDDDD; } /*jour libre dans calendrier*/ div.calendrier td.libre { - width:65px; - text-align: center; - border: 2px; background-color: #66FF99; } /*jour deja selectionné dans calendrier*/ @@ -458,7 +445,6 @@ div.calendrier td.choisi { p.affichageresultats{ text-align: center; font-family:arial, sans-serif; - font-size:13px; } div.comment{ @@ -485,13 +471,16 @@ div.titregestionadmin{ .bouton { - width: 65px; + /* width: 65px; */ border:0; padding:0 0 0 0; margin:0; cursor:pointer; font-family:arial, sans-serif; - font-size:13px; + background: transparent !important; +} +.choisi .bouton { + color: #fff; } /*les boutons pour choisir un jour non selectionné*/ .ON { diff --git a/htdocs/opensurvey/exportcsv.php b/htdocs/opensurvey/exportcsv.php index 34e5b666710..6f9a699273b 100644 --- a/htdocs/opensurvey/exportcsv.php +++ b/htdocs/opensurvey/exportcsv.php @@ -108,14 +108,11 @@ if ($resql) { $input .= 'OK;'; $somme[$k]++; - } - elseif ($car == "2") + } elseif ($car == "2") { $input .= 'KO;'; $somme[$k]++; - } - else - { + } else { $input .= ';'; } } @@ -123,8 +120,7 @@ if ($resql) $input .= "\r\n"; $i++; } -} -else dol_print_error($db); +} else dol_print_error($db); $filesize = strlen($input); diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php index 2fa067ba9a3..4a3cb591b97 100644 --- a/htdocs/opensurvey/fonctions.php +++ b/htdocs/opensurvey/fonctions.php @@ -90,7 +90,6 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ print "\n"; // Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo) - $width = 0; // Define logo and logosmall $logosmall = $mysoc->logo_small; $logo = $mysoc->logo; @@ -102,13 +101,10 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall); - $width = 150; - } - elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) + } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) { $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo); - $width = 150; } // Output html code for logo @@ -117,7 +113,6 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $ print '
    '; print '
    '; print ''; print '
    '; if (empty($conf->global->MAIN_HIDE_POWERED_BY)) { @@ -243,11 +238,10 @@ function ajouter_sondage() // Insert survey $opensurveysondage = new Opensurveysondage($db); $opensurveysondage->id_sondage = $sondage; - $opensurveysondage->commentaires = $_SESSION['commentaires']; - $opensurveysondage->description = $_SESSION['commentaires']; + $opensurveysondage->description = $_SESSION['description']; $opensurveysondage->mail_admin = $_SESSION['adresse']; $opensurveysondage->nom_admin = $_SESSION['nom']; - $opensurveysondage->titre = $_SESSION['titre']; + $opensurveysondage->title = $_SESSION['title']; $opensurveysondage->date_fin = $_SESSION['champdatefin']; $opensurveysondage->format = $_SESSION['formatsondage']; $opensurveysondage->mailsonde = $_SESSION['mailsonde']; @@ -261,10 +255,10 @@ function ajouter_sondage() dol_print_error($db); } - unset($_SESSION["titre"]); + unset($_SESSION["title"]); unset($_SESSION["nom"]); unset($_SESSION["adresse"]); - unset($_SESSION["commentaires"]); + unset($_SESSION["description"]); unset($_SESSION["mailsonde"]); unset($_SESSION['allow_comments']); unset($_SESSION['allow_spy']); diff --git a/htdocs/opensurvey/index.php b/htdocs/opensurvey/index.php index 20609602ad2..50198e5202f 100644 --- a/htdocs/opensurvey/index.php +++ b/htdocs/opensurvey/index.php @@ -52,8 +52,7 @@ if ($resql) { $obj = $db->fetch_object($resql); $nbsondages = $obj->nb; -} -else dol_print_error($db, ''); +} else dol_print_error($db, ''); $title = $langs->trans("OpenSurveyArea"); diff --git a/htdocs/opensurvey/list.php b/htdocs/opensurvey/list.php index 442fc1b539b..77e7feed460 100644 --- a/htdocs/opensurvey/list.php +++ b/htdocs/opensurvey/list.php @@ -36,7 +36,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk $confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation $cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'opensurveylist'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') @@ -47,8 +47,8 @@ $search_status = GETPOST('search_status', 'alpha'); // Load variable for pagination $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action $offset = $limit * $page; @@ -155,7 +155,7 @@ $help_url = ''; $title = $langs->trans('OpenSurveyArea'); -$sql = "SELECT p.id_sondage as rowid, p.fk_user_creat, p.format, p.date_fin, p.status, p.titre, p.nom_admin,"; +$sql = "SELECT p.id_sondage as rowid, p.fk_user_creat, p.format, p.date_fin, p.status, p.titre as title, p.nom_admin,"; $sql .= " u.login, u.firstname, u.lastname"; $sql .= " FROM ".MAIN_DB_PREFIX."opensurvey_sondage as p"; $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON u.rowid = p.fk_user_creat"; @@ -190,9 +190,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) if (is_numeric($nbtotalofrecords) && $limit > $nbtotalofrecords) { $num = $nbtotalofrecords; -} -else -{ +} else { $sql .= $db->plimit($limit + 1, $offset); $resql = $db->query($sql); @@ -357,12 +355,11 @@ while ($i < min($num, $limit)) { $obj2 = $db->fetch_object($resql2); $nbuser = $obj2->nb; - } - else dol_print_error($db); + } else dol_print_error($db); $opensurvey_static->id = $obj->rowid; $opensurvey_static->ref = $obj->rowid; - $opensurvey_static->title = $obj->titre; + $opensurvey_static->title = $obj->title; $opensurvey_static->status = $obj->status; $opensurvey_static->date_fin = $db->jdate($obj->date_fin); @@ -376,7 +373,7 @@ while ($i < min($num, $limit)) if (!$i) $totalarray['nbfield']++; // Title - print ''.dol_htmlentities($obj->titre).''; + print ''.dol_htmlentities($obj->title).''; if (!$i) $totalarray['nbfield']++; // Type diff --git a/htdocs/opensurvey/results.php b/htdocs/opensurvey/results.php index 181ec830433..3327800527d 100644 --- a/htdocs/opensurvey/results.php +++ b/htdocs/opensurvey/results.php @@ -58,7 +58,7 @@ if (GETPOST('retoursondage')) { $nbcolonnes = substr_count($object->sujet, ',') + 1; // Add vote -if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // boutonp for chrom, boutonp.x for firefox +if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // boutonp for chrome, boutonp.x for firefox { if (GETPOST('nom')) { @@ -70,12 +70,10 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '1') { $nouveauchoix .= "1"; - } - elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + } elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix .= "2"; - } - else { // sinon c'est 0 + } else { // sinon c'est 0 $nouveauchoix .= "0"; } } @@ -93,9 +91,7 @@ if (GETPOST("boutonp") || GETPOST("boutonp.x") || GETPOST("boutonp_x")) // bout { setEventMessages($langs->trans("VoteNameAlreadyExists"), null, 'errors'); $error++; - } - else - { + } else { $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'opensurvey_user_studs (nom, id_sondage, reponses)'; $sql .= " VALUES ('".$db->escape($nom)."', '".$db->escape($numsondage)."','".$db->escape($nouveauchoix)."')"; $resql = $db->query($sql); @@ -135,12 +131,10 @@ if ($testmodifier) if (isset($_POST["choix$i"]) && $_POST["choix$i"] == '1') { $nouveauchoix .= "1"; - } - elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') + } elseif (isset($_POST["choix$i"]) && $_POST["choix$i"] == '2') { $nouveauchoix .= "2"; - } - else { // sinon c'est 0 + } else { // sinon c'est 0 $nouveauchoix .= "0"; } } @@ -164,7 +158,7 @@ if (GETPOST("ajoutercolonne") && GETPOST('nouvellecolonne') && $object->format = //on rajoute la valeur a la fin de tous les sujets deja entrés $nouveauxsujets .= ','; - $nouveauxsujets .= str_replace(array(",", "@"), " ", $_POST["nouvellecolonne"]).(empty($_POST["typecolonne"]) ? '' : '@'.$_POST["typecolonne"]); + $nouveauxsujets .= str_replace(array(",", "@"), " ", GETPOST("nouvellecolonne")).(empty($_POST["typecolonne"]) ? '' : '@'.GETPOST("typecolonne")); //mise a jour avec les nouveaux sujets dans la base $sql = 'UPDATE '.MAIN_DB_PREFIX."opensurvey_sondage"; @@ -192,21 +186,21 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") if (isset($_POST["nouvelleheuredebut"]) && $_POST["nouvelleheuredebut"] != "vide") { $nouvelledate .= "@"; - $nouvelledate .= $_POST["nouvelleheuredebut"]; + $nouvelledate .= GETPOST("nouvelleheuredebut"); $nouvelledate .= "h"; if ($_POST["nouvelleminutedebut"] != "vide") { - $nouvelledate .= $_POST["nouvelleminutedebut"]; + $nouvelledate .= GETPOST("nouvelleminutedebut"); } } if (isset($_POST["nouvelleheurefin"]) && $_POST["nouvelleheurefin"] != "vide") { $nouvelledate .= "-"; - $nouvelledate .= $_POST["nouvelleheurefin"]; + $nouvelledate .= GETPOST("nouvelleheurefin"); $nouvelledate .= "h"; if ($_POST["nouvelleminutefin"] != "vide") { - $nouvelledate .= $_POST["nouvelleminutefin"]; + $nouvelledate .= GETPOST("nouvelleminutefin"); } } @@ -261,9 +255,7 @@ if (isset($_POST["ajoutercolonne"]) && $object->format == "D") } $adresseadmin = $object->mail_admin; - } - else - { + } else { $erreur_ajout_date = "yes"; } } @@ -401,7 +393,7 @@ if ($result <= 0) exit; } -$title = $object->titre." - ".$langs->trans('Card'); +$title = $object->title." - ".$langs->trans('Card'); $helpurl = ''; $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); @@ -449,17 +441,20 @@ print ' '.$langs->trans($type == 'classic' ? "TypeClassic" : "TypeDate").'< print ''; $adresseadmin = $object->mail_admin; print $langs->trans("Title").''; -if ($action == 'edit') -{ - print ''; +if ($action == 'edit') { + print ''; +} else { + print dol_htmlentities($object->title); } -else print dol_htmlentities($object->titre); print ''; // Expire date print ''.$langs->trans('ExpireDate').''; if ($action == 'edit') print $form->selectDate($expiredate ? $expiredate : $object->date_fin, 'expire', 0, 0, 0, '', 1, 0); -else print dol_print_date($object->date_fin, 'day'); +else { + print dol_print_date($object->date_fin, 'day'); + if ($object->date_fin && $object->date_fin < dol_now() && $object->status == Opensurveysondage::STATUS_VALIDATED) print img_warning($langs->trans("Expired")); +} print ''; // Author @@ -537,9 +532,7 @@ if (GETPOST('ajoutsujet')) print '     '; print ''; print '

    '."\n"; - } - else - { + } else { require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $formother = new FormOther($db); @@ -755,9 +748,7 @@ if ($object->format == "D") print ''."\n"; } -} -else -{ +} else { // Show titles print ''."\n"; print ''."\n"; @@ -843,9 +834,7 @@ while ($compteur < $num) if (((string) $car) == "0") $sumagainst[$i]++; } } - } - else - { + } else { //sinon on remplace les choix de l'utilisateur par une ligne de checkbox pour recuperer de nouvelles valeurs if ($compteur == $ligneamodifier) { @@ -871,9 +860,7 @@ while ($compteur < $num) } print ''."\n"; } - } - else - { + } else { for ($i = 0; $i < $nbcolonnes; $i++) { $car = substr($ensemblereponses, $i, 1); @@ -971,7 +958,7 @@ if (empty($testligneamodifier)) } // Affichage du bouton de formulaire pour inscrire un nouvel utilisateur dans la base - print ''."\n"; + print ''."\n"; print ''."\n"; } @@ -1031,7 +1018,7 @@ if ($nbofcheckbox >= 2) } // S'il a oublié de remplir un nom -if (isset($_POST["boutonp"]) && $_POST["nom"] == "") { +if (GETPOSTISSET("boutonp") && GETPOST("nom") == "") { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Name")), null, 'errors'); } @@ -1067,9 +1054,7 @@ for ($i = 0; $i < $nbcolonnes; $i++) } else { $meilleursujet .= dol_print_date($toutsujet[$i], 'daytext').($toutsujet[$i] ? ' ('.dol_print_date($toutsujet[$i], '%A').')' : ''); } - } - else - { + } else { $tmps = explode('@', $toutsujet[$i]); $meilleursujet .= dol_htmlentities($tmps[0]); } diff --git a/htdocs/opensurvey/wizard/choix_autre.php b/htdocs/opensurvey/wizard/choix_autre.php index 7a31e21c843..6b39a70d5e9 100644 --- a/htdocs/opensurvey/wizard/choix_autre.php +++ b/htdocs/opensurvey/wizard/choix_autre.php @@ -36,14 +36,17 @@ if (!$user->rights->opensurvey->write) accessforbidden(); * Action */ +$arrayofchoices = GETPOST('choix', 'array'); +$arrayoftypecolumn = GETPOST('typecolonne', 'array'); + // Set session vars if (isset($_SESSION["nbrecases"])) { for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) { - if (isset($_POST["choix"][$i])) { - $_SESSION["choix$i"] = $_POST["choix"][$i]; + if (isset($arrayofchoices[$i])) { + $_SESSION["choix$i"] = $arrayofchoices[$i]; } - if (isset($_POST["typecolonne"][$i])) { - $_SESSION["typecolonne$i"] = $_POST["typecolonne"][$i]; + if (isset($arrayoftypecolumn[$i])) { + $_SESSION["typecolonne$i"] = $arrayoftypecolumn[$i]; } } } else { //nombre de cases par défaut @@ -56,16 +59,16 @@ if (GETPOST("ajoutcases") || GETPOST("ajoutcases_x")) } // Create survey into database -if (isset($_POST["confirmecreation"])) +if (GETPOSTISSET("confirmecreation")) { //recuperation des données de champs textes $toutchoix = ''; for ($i = 0; $i < $_SESSION["nbrecases"] + 1; $i++) { - if (!empty($_POST["choix"][$i])) + if (!empty($arrayofchoices[$i])) { $toutchoix .= ','; - $toutchoix .= str_replace(array(",", "@"), " ", $_POST["choix"][$i]).(empty($_POST["typecolonne"][$i]) ? '' : '@'.$_POST["typecolonne"][$i]); + $toutchoix .= str_replace(array(",", "@"), " ", $arrayofchoices[$i]).(empty($arrayoftypecolumn[$i]) ? '' : '@'.$arrayoftypecolumn[$i]); } } @@ -76,7 +79,7 @@ if (isset($_POST["confirmecreation"])) $testremplissage = ''; for ($i = 0; $i < $_SESSION["nbrecases"]; $i++) { - if (isset($_POST["choix"][$i])) + if (isset($arrayofchoices[$i])) { $testremplissage = "ok"; } @@ -94,7 +97,7 @@ if (isset($_POST["confirmecreation"])) } } - +var_dump($_SESSION);exit; /* @@ -107,7 +110,7 @@ $arrayofjs = array(); $arrayofcss = array('/opensurvey/css/style.css'); llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss); -if (empty($_SESSION['titre'])) +if (empty($_SESSION['title'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); llxFooter(); diff --git a/htdocs/opensurvey/wizard/choix_date.php b/htdocs/opensurvey/wizard/choix_date.php index 17c5bdea251..9ed44ae55c3 100644 --- a/htdocs/opensurvey/wizard/choix_date.php +++ b/htdocs/opensurvey/wizard/choix_date.php @@ -195,7 +195,7 @@ if (GETPOST('reset')) * View */ -if (!isset($_SESSION['commentaires']) && !isset($_SESSION['mail'])) +if (!isset($_SESSION['description']) && !isset($_SESSION['mail'])) { dol_print_error('', $langs->trans('ErrorOpenSurveyFillFirstSection')); exit; @@ -209,8 +209,7 @@ llxHeader('', $langs->trans("OpenSurvey"), "", '', 0, 0, $arrayofjs, $arrayofcss if (!isset($_SESSION["nbrecaseshoraires"])) { $_SESSION["nbrecaseshoraires"] = 5; -} -elseif (GETPOST('ajoutcases') && $_SESSION["nbrecaseshoraires"] == 5) +} elseif (GETPOST('ajoutcases') && $_SESSION["nbrecaseshoraires"] == 5) { $_SESSION["nbrecaseshoraires"] = 10; } @@ -319,9 +318,7 @@ $premierjourmois = date("N", mktime(0, 0, 0, $_SESSION["mois"], 1, $_SESSION["an if (is_integer($_SESSION["mois"]) && $_SESSION["mois"] > 0 && $_SESSION["mois"] < 13) { $motmois = dol_print_date(mktime(0, 0, 0, $_SESSION["mois"], 10), '%B'); -} -else -{ +} else { $motmois = dol_print_date(dol_now(), '%B'); } @@ -350,7 +347,7 @@ print ''."\n"; print ''."\n"; print '
    '."\n"; -print '
    '."\n"; +print '
    '."\n"; print ''."\n"; // The div class=center has no effect on table, so we must keep the align=center for table print ''."\n"; diff --git a/htdocs/opensurvey/wizard/create_survey.php b/htdocs/opensurvey/wizard/create_survey.php index 7bb7861edbe..e6b3cb3b97e 100644 --- a/htdocs/opensurvey/wizard/create_survey.php +++ b/htdocs/opensurvey/wizard/create_survey.php @@ -37,14 +37,14 @@ $langs->load("opensurvey"); // On teste toutes les variables pour supprimer l'ensemble des warnings PHP // On transforme en entites html les données afin éviter les failles XSS -$post_var = array('titre', 'commentaires', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); +$post_var = array('title', 'description', 'mailsonde', 'creation_sondage_date', 'creation_sondage_autre'); foreach ($post_var as $var) { $$var = GETPOST($var); } // On initialise egalement la session car sinon bonjour les warning :-) -$session_var = array('titre', 'commentaires', 'mailsonde'); +$session_var = array('title', 'description', 'mailsonde'); foreach ($session_var as $var) { if (isset($_SESSION[$var])) $_SESSION[$var] = null; @@ -57,8 +57,8 @@ $cochemail = ''; // Jump to correct page if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) { - $_SESSION["titre"] = $titre; - $_SESSION["commentaires"] = $commentaires; + $_SESSION["title"] = $title; + $_SESSION["description"] = $description; if (GETPOST('mailsonde') == 'on') { $_SESSION["mailsonde"] = true; @@ -88,9 +88,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) { $testdate = true; $_SESSION['champdatefin'] = dol_print_date($champdatefin, 'dayrfc'); - } - else - { + } else { $testdate = true; $_SESSION['champdatefin'] = dol_print_date($champdatefin, 'dayrfc'); //$testdate = false; @@ -103,7 +101,7 @@ if (GETPOST("creation_sondage_date") || GETPOST("creation_sondage_autre")) setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("ExpireDate")), null, 'errors'); } - if ($titre && $testdate) + if ($title && $testdate) { if (!empty($creation_sondage_date)) { @@ -143,15 +141,15 @@ dol_fiche_head(); // Affichage des différents champs textes a remplir print '
    '."\n"; -print ''."\n"; -if (!$_SESSION["titre"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) +print ''."\n"; +if (!$_SESSION["title"] && (GETPOST('creation_sondage_date') || GETPOST('creation_sondage_autre'))) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("PollTitle")), null, 'errors'); } print ''."\n"; print ''."\n"; print ''."\n"; @@ -192,9 +190,7 @@ if (GETPOST('choix_sondage')) else print ''; print ''; print '
    trans("TypeDate") : $langs->trans("TypeClassic")).')">'; -} -else -{ +} else { // Show image to selecte between date survey or other survey print '
    '.$langs->trans("PollTitle").'
    '.$langs->trans("PollTitle").'
    '.$langs->trans("Description").''; -$doleditor = new DolEditor('commentaires', $_SESSION["commentaires"], '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); +$doleditor = new DolEditor('description', $_SESSION["description"], '', 120, 'dolibarr_notes', 'In', 1, 1, 1, ROWS_7, '90%'); $doleditor->Create(0, ''); print '
    '."\n"; print ' '."\n"; diff --git a/htdocs/paybox/admin/paybox.php b/htdocs/paybox/admin/paybox.php index 13306deea32..a1ceb3e4810 100644 --- a/htdocs/paybox/admin/paybox.php +++ b/htdocs/paybox/admin/paybox.php @@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'other', 'paybox', 'paypal')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if ($action == 'setvalue' && $user->admin) @@ -79,9 +79,7 @@ if ($action == 'setvalue' && $user->admin) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -112,7 +110,7 @@ $head[$h][1] = $langs->trans("PayBox"); $head[$h][2] = 'payboxaccount'; $h++; -print ''; +print ''; print ''; print ''; @@ -131,27 +129,27 @@ print "\n"; print ''; print ''; print ''; print ''; print ''; @@ -181,15 +179,15 @@ print ''; print ''; print ''; @@ -205,7 +203,7 @@ if (!empty($conf->banque->enabled)) print ''; @@ -232,7 +230,7 @@ print ''; print ''; // Payment token for URL diff --git a/htdocs/paypal/admin/paypal.php b/htdocs/paypal/admin/paypal.php index 0af8262c54a..3cf751f7391 100644 --- a/htdocs/paypal/admin/paypal.php +++ b/htdocs/paypal/admin/paypal.php @@ -37,7 +37,7 @@ $langs->loadLangs(array('admin', 'other', 'paypal', 'paybox')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); if ($action == 'setvalue' && $user->admin) { @@ -72,16 +72,17 @@ if ($action == 'setvalue' && $user->admin) // Payment token for URL $result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN", GETPOST('PAYMENT_SECURITY_TOKEN', 'alpha'), 'chaine', 0, '', $conf->entity); if (!$result > 0) $error++; - $result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN_UNIQUE", GETPOST('PAYMENT_SECURITY_TOKEN_UNIQUE', 'alpha'), 'chaine', 0, '', $conf->entity); - if (!$result > 0) $error++; + if (empty($conf->use_javascript_ajax)) { + $result = dolibarr_set_const($db, "PAYMENT_SECURITY_TOKEN_UNIQUE", GETPOST('PAYMENT_SECURITY_TOKEN_UNIQUE', 'alpha'), 'chaine', 0, '', $conf->entity); + if (!$result > 0) { + $error++; + } + } - if (!$error) - { + if (!$error) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -95,9 +96,7 @@ if ($action == "setlive") if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -124,7 +123,7 @@ print ''; dol_fiche_head($head, 'paypalaccount', '', -1); -print $langs->trans("PaypalDesc")."
    \n"; +print ''.$langs->trans("PaypalDesc")."
    \n"; // Test if php curl exist if (!function_exists('curl_version')) @@ -149,12 +148,10 @@ print ''; @@ -162,7 +159,7 @@ print ''; print ''; @@ -175,7 +172,7 @@ print ''; print ''; @@ -205,9 +202,9 @@ print ''; print ''; if (!empty($conf->banque->enabled)) @@ -221,7 +218,7 @@ if (!empty($conf->banque->enabled)) print ''; @@ -254,8 +251,8 @@ print ''; print ''; print ''; @@ -266,15 +263,25 @@ print "\n"; // Payment token for URL print ''; +} +if (! empty($conf->global->PAYMENT_SECURITY_ACCEPT_ANY_TOKEN)) { + $langs->load("errors"); + print img_warning($langs->trans("WarningTheHiddenOptionIsOn", 'PAYMENT_SECURITY_ACCEPT_ANY_TOKEN'), '', 'pictowarning marginleftonly'); +} +print ''; - print ''; +print ''; print '
    '.$langs->trans("CreateSurveyDate").'
    '; print ''.$langs->trans("PAYBOX_PBX_SITE").''; print ''; -print '
    '.$langs->trans("Example").': 1999888 ('.$langs->trans("Test").')'; +print '
    '.$langs->trans("Example").': 1999888 ('.$langs->trans("Test").')
    '; print '
    '; print ''.$langs->trans("PAYBOX_PBX_RANG").''; print ''; -print '
    '.$langs->trans("Example").': 99 ('.$langs->trans("Test").')'; +print '
    '.$langs->trans("Example").': 99 ('.$langs->trans("Test").')
    '; print '
    '; print ''.$langs->trans("PAYBOX_PBX_IDENTIFIANT").''; print ''; -print '
    '.$langs->trans("Example").': 2 ('.$langs->trans("Test").')'; +print '
    '.$langs->trans("Example").': 2 ('.$langs->trans("Test").')
    '; print '
    '; print ''.$langs->trans("PAYBOX_HMAC_KEY").''; print ''; -print '
    '.$langs->trans("Example").': 1A2B3C4D5E6F'; +print '
    '.$langs->trans("Example").': 1A2B3C4D5E6F
    '; print '
    '; print ''.$langs->trans("PAYBOX_CGI_URL_V2").''; print ''; -print '
    '.$langs->trans("Example").' (preprod): https://preprod-tpeweb.paybox.com/php/'; -print '
    '.$langs->trans("Example").' (prod): https://tpeweb.paybox.com/php/'; +print '
    '.$langs->trans("Example").' (preprod): https://preprod-tpeweb.paybox.com/php/'; +print '
    '.$langs->trans("Example").' (prod): https://tpeweb.paybox.com/php/
    '; print '
    '; -print $langs->trans("VendorName").''; -print ''; -print '
    '.$langs->trans("Example").': '.$mysoc->name; +print $langs->trans("PublicVendorName").'
    '; +print ''; +print '
    '.$langs->trans("Example").': '.$mysoc->name.''; print '
    '; print $langs->trans("CSSUrlForPaymentForm").''; print ''; -print '
    '.$langs->trans("Example").': http://mysite/mycss.css'; +print '
    '.$langs->trans("Example").': http://mysite/mycss.css
    '; print '
    '; print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").''; print ''; -print '   '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; +print '   '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; print '
    '; print $langs->trans("PaypalLiveEnabled").''; if (empty($conf->global->PAYPAL_API_SANDBOX)) { - print ''; + print ''; print img_picto($langs->trans("Activated"), 'switch_on'); -} -else -{ - print ''; +} else { + print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); } print '
    '; print $langs->trans("PAYPAL_API_USER").''; print ''; -print '   '.$langs->trans("Example").': admin-facilitator_api1.example.com, paypal_api1.mywebsite.com'; +print '   '.$langs->trans("Example").': admin-facilitator_api1.example.com, paypal_api1.mywebsite.com'; print '
    '; print $langs->trans("PAYPAL_API_SIGNATURE").''; print ''; -print '
    '.$langs->trans("Example").': ASsqXEmw4KzmX-CPChWSVDNCNfd.A3YNR7uz-VncXXAERFDFDFDF'; +print '
    '.$langs->trans("Example").': ASsqXEmw4KzmX-CPChWSVDNCNfd.A3YNR7uz-VncXXAERFDFDFDF'; print '
    '; -print $langs->trans("VendorName").''; +print $langs->trans("PublicVendorName").''; print ''; -print '   '.$langs->trans("Example").': '.$mysoc->name; +print '   '.$langs->trans("Example").': '.$mysoc->name.''; print '
    '; print $langs->trans("CSSUrlForPaymentForm").''; print ''; -print '   '.$langs->trans("Example").': http://mysite/mycss.css'; +print '   '.$langs->trans("Example").': http://mysite/mycss.css'; print '
    '; print $langs->trans("ONLINE_PAYMENT_SENDEMAIL").''; -print ''; -print '   '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; +print ''; +print '   '.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; print '
    '; print $langs->trans("SecurityToken").''; -print ''; -if (!empty($conf->use_javascript_ajax)) +print ''; +if (!empty($conf->use_javascript_ajax)) { print ' '.img_picto($langs->trans('Generate'), 'refresh', 'id="generate_token" class="linkobject"'); - print '
    '; - print $langs->trans("SecurityTokenIsUnique").''; - print $form->selectyesno("PAYMENT_SECURITY_TOKEN_UNIQUE", (empty($conf->global->PAYMENT_SECURITY_TOKEN) ? 0 : $conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE), 1); - print '
    '; +print $langs->trans("SecurityTokenIsUnique").''; +if ($conf->use_javascript_ajax) { + print ajax_constantonoff('PAYMENT_SECURITY_TOKEN_UNIQUE'); +} else { + $arrval = array('0' => $langs->trans("No"), '1' => $langs->trans("Yes")); + print $form->selectarray("PAYMENT_SECURITY_TOKEN_UNIQUE", $arrval, $conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE); +} +print '
    '; diff --git a/htdocs/paypal/lib/paypal.lib.php b/htdocs/paypal/lib/paypal.lib.php index ab9ba921e16..18ebce49479 100644 --- a/htdocs/paypal/lib/paypal.lib.php +++ b/htdocs/paypal/lib/paypal.lib.php @@ -112,8 +112,7 @@ function getPaypalPaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) { if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else - { + else { $out .= '&securekey='.($mode ? '' : ''); if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + order_ref)"; if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); @@ -130,8 +129,7 @@ function getPaypalPaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) { if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else - { + else { $out .= '&securekey='.($mode ? '' : ''); if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + invoice_ref)"; if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); @@ -148,8 +146,7 @@ function getPaypalPaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) { if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else - { + else { $out .= '&securekey='.($mode ? '' : ''); if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + contractline_ref)"; if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); @@ -166,8 +163,7 @@ function getPaypalPaymentUrl($mode, $type, $ref = '', $amount = '9.99', $freetag if (!empty($conf->global->PAYPAL_SECURITY_TOKEN)) { if (empty($conf->global->PAYPAL_SECURITY_TOKEN_UNIQUE)) $out .= '&securekey='.$conf->global->PAYPAL_SECURITY_TOKEN; - else - { + else { $out .= '&securekey='.($mode ? '' : ''); if ($mode == 1) $out .= "hash('".$conf->global->PAYPAL_SECURITY_TOKEN."' + '".$type."' + member_ref)"; if ($mode == 0) $out .= dol_hash($conf->global->PAYPAL_SECURITY_TOKEN.$type.$ref, 2); @@ -263,9 +259,7 @@ function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, $payPalURL = $API_Url.$token; header("Location: ".$payPalURL); exit; - } - else - { + } else { //Display a user friendly Error on the page using any of the following error information returned by PayPal $ErrorCode = urldecode($resArray["L_ERRORCODE0"]); $ErrorShortMsg = urldecode($resArray["L_SHORTMESSAGE0"]); @@ -275,9 +269,7 @@ function print_paypal_redirect($paymentAmount, $currencyCodeType, $paymentType, if ($ErrorCode == 10729) { $mesg .= "PayPal can't accept payments for this thirdparty. An address is defined but is not complete (missing State).
    Ask system administrator to fix address or to setup Paypal module to accept payments even on not complete addresses (remove option PAYPAL_REQUIRE_VALID_SHIPPING_ADDRESS).
    \n"; - } - else - { + } else { $mesg = $langs->trans('SetExpressCheckoutAPICallFailed')."
    \n"; $mesg .= $langs->trans('DetailedErrorMessage').": ".$ErrorLongMsg."
    \n"; $mesg .= $langs->trans('ShortErrorMessage').": ".$ErrorShortMsg."
    \n"; @@ -351,9 +343,7 @@ function callSetExpressCheckout($paymentAmount, $currencyCodeType, $paymentType, if (empty($conf->global->PAYPAL_REQUIRE_VALID_SHIPPING_ADDRESS)) { $nvpstr = $nvpstr."&NOSHIPPING=1"; // An empty or not complete shipping address will be accepted - } - else - { + } else { $nvpstr = $nvpstr."&NOSHIPPING=0"; // A valid shipping address is required (full required fields mandatory) } $nvpstr = $nvpstr."&SOLUTIONTYPE=".urlencode($solutionType); @@ -596,9 +586,7 @@ function hash_call($methodName, $nvpStr) { $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp"; $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token="; - } - else - { + } else { $API_Endpoint = "https://api-3t.paypal.com/nvp"; $API_Url = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token="; } @@ -676,9 +664,7 @@ function hash_call($methodName, $nvpStr) $_SESSION['curl_error_msg'] = curl_error($ch); //Execute the Error handling module to display errors. - } - else - { + } else { //closing the curl curl_close($ch); } diff --git a/htdocs/paypal/lib/paypalfunctions.lib.php b/htdocs/paypal/lib/paypalfunctions.lib.php index 8b30e33704d..5fbe0f6e9cd 100644 --- a/htdocs/paypal/lib/paypalfunctions.lib.php +++ b/htdocs/paypal/lib/paypalfunctions.lib.php @@ -52,9 +52,7 @@ if (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'alpha' { $API_Endpoint = "https://api-3t.sandbox.paypal.com/nvp"; $API_Url = "https://www.sandbox.paypal.com/webscr?cmd=_express-checkout&token="; -} -else -{ +} else { $API_Endpoint = "https://api-3t.paypal.com/nvp"; $API_Url = "https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token="; } diff --git a/htdocs/printing/admin/printing.php b/htdocs/printing/admin/printing.php index ab655d790f6..2f906c68382 100644 --- a/htdocs/printing/admin/printing.php +++ b/htdocs/printing/admin/printing.php @@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'printing', 'oauth')); if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $mode = GETPOST('mode', 'alpha'); $value = GETPOST('value', 'alpha', 0, null, null, 1); // The value may be __google__docs so we force disable of replace $varname = GETPOST('varname', 'alpha'); @@ -73,9 +73,7 @@ if ($action == 'setconst' && $user->admin) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -93,9 +91,7 @@ if ($action == 'setvalue' && $user->admin) { $db->commit(); setEventMessages($langs->trans("SetupSaved"), null); - } - else - { + } else { $db->rollback(); dol_print_error($db); } @@ -161,9 +157,7 @@ if ($mode == 'setup' && $user->admin) if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') { print $langs->trans("IsTokenGenerated"); - } - else - { + } else { print $langs->trans($key['varname']); } print ''; @@ -197,11 +191,9 @@ if ($mode == 'setup' && $user->admin) $tokenobj = null; // Dolibarr storage $storage = new DoliStorage($db, $conf); - try - { + try { $tokenobj = $storage->retrieveAccessToken($OAUTH_SERVICENAME_GOOGLE); - } - catch (Exception $e) + } catch (Exception $e) { // Return an error if token not found } @@ -267,16 +259,12 @@ if ($mode == 'config' && $user->admin) if (!empty($conf->use_javascript_ajax)) { print ajax_constantonoff($printer->active); - } - else - { + } else { if (empty($conf->global->{$printer->conf})) { - print ''.img_picto($langs->trans("Disabled"), 'off').''; - } - else - { - print ''.img_picto($langs->trans("Enabled"), 'on').''; + print ''.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print ''.img_picto($langs->trans("Enabled"), 'on').''; } } print ''.img_picto('', 'setup').''; @@ -309,8 +297,7 @@ if ($mode == 'test' && $user->admin) } else { setEventMessages($printer->error, $printer->errors, 'errors'); } - } - else { + } else { print $langs->trans('PleaseConfigureDriverfromList'); } } else { diff --git a/htdocs/product/admin/dynamic_prices.php b/htdocs/product/admin/dynamic_prices.php index a50e22315d5..bdd86169466 100644 --- a/htdocs/product/admin/dynamic_prices.php +++ b/htdocs/product/admin/dynamic_prices.php @@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_global_variab $langs->load("products"); $id = GETPOST('id', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $save = GETPOST('save', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $selection = GETPOST('selection', 'int'); @@ -42,17 +42,17 @@ if (!$user->admin) accessforbidden(); //Objects $price_globals = new PriceGlobalVariable($db); if ($action == 'edit_variable') { - $res = $price_globals->fetch($selection); - if ($res < 1) { - setEventMessages($price_globals->error, $price_globals->errors, 'errors'); - } + $res = $price_globals->fetch($selection); + if ($res < 1) { + setEventMessages($price_globals->error, $price_globals->errors, 'errors'); + } } $price_updaters = new PriceGlobalVariableUpdater($db); if ($action == 'edit_updater') { - $res = $price_updaters->fetch($selection); - if ($res < 1) { - setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); - } + $res = $price_updaters->fetch($selection); + if ($res < 1) { + setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); + } } @@ -61,84 +61,84 @@ if ($action == 'edit_updater') { */ if (!empty($action) && empty($cancel)) { - //Global variable actions - if ($action == 'create_variable' || $action == 'edit_variable') { - $price_globals->code = GETPOSTISSET('code') ?GETPOST('code', 'alpha') : $price_globals->code; - $price_globals->description = GETPOSTISSET('description') ?GETPOST('description', 'alpha') : $price_globals->description; - $price_globals->value = GETPOSTISSET('value') ?GETPOST('value', 'int') : $price_globals->value; - //Check if record already exists only when saving - if (!empty($save)) { - foreach ($price_globals->listGlobalVariables() as $entry) { - if ($price_globals->id != $entry->id && dol_strtolower($price_globals->code) == dol_strtolower($entry->code)) { - setEventMessages($langs->trans("ErrorRecordAlreadyExists"), null, 'errors'); - $save = null; - } - } - } - } - if ($action == 'create_variable' && !empty($save)) { - $res = $price_globals->create($user); - if ($res > 0) { - $action = ''; - } else { - setEventMessages($price_globals->error, $price_globals->errors, 'errors'); - } - } elseif ($action == 'edit_variable' && !empty($save)) { - $res = $price_globals->update($user); - if ($res > 0) { - $action = ''; - } else { - setEventMessages($price_globals->error, $price_globals->errors, 'errors'); - } - } elseif ($action == 'delete_variable') { - $res = $price_globals->delete($selection, $user); - if ($res > 0) { - $action = ''; - } else { - setEventMessages($price_globals->error, $price_globals->errors, 'errors'); - } - } + //Global variable actions + if ($action == 'create_variable' || $action == 'edit_variable') { + $price_globals->code = GETPOSTISSET('code') ?GETPOST('code', 'alpha') : $price_globals->code; + $price_globals->description = GETPOSTISSET('description') ?GETPOST('description', 'restricthtml') : $price_globals->description; + $price_globals->value = GETPOSTISSET('value') ?GETPOST('value', 'int') : $price_globals->value; + //Check if record already exists only when saving + if (!empty($save)) { + foreach ($price_globals->listGlobalVariables() as $entry) { + if ($price_globals->id != $entry->id && dol_strtolower($price_globals->code) == dol_strtolower($entry->code)) { + setEventMessages($langs->trans("ErrorRecordAlreadyExists"), null, 'errors'); + $save = null; + } + } + } + } + if ($action == 'create_variable' && !empty($save)) { + $res = $price_globals->create($user); + if ($res > 0) { + $action = ''; + } else { + setEventMessages($price_globals->error, $price_globals->errors, 'errors'); + } + } elseif ($action == 'edit_variable' && !empty($save)) { + $res = $price_globals->update($user); + if ($res > 0) { + $action = ''; + } else { + setEventMessages($price_globals->error, $price_globals->errors, 'errors'); + } + } elseif ($action == 'delete_variable') { + $res = $price_globals->delete($selection, $user); + if ($res > 0) { + $action = ''; + } else { + setEventMessages($price_globals->error, $price_globals->errors, 'errors'); + } + } - //Updaters actions - if ($action == 'create_updater' || $action == 'edit_updater') { - $price_updaters->type = GETPOSTISSET('type') ?GETPOST('type', 'int') : $price_updaters->type; - $price_updaters->description = GETPOSTISSET('description') ?GETPOST('description', 'alpha') : $price_updaters->description; - $price_updaters->parameters = GETPOSTISSET('parameters') ?GETPOST('parameters') : $price_updaters->parameters; - $price_updaters->fk_variable = GETPOSTISSET('fk_variable') ?GETPOST('fk_variable', 'int') : $price_updaters->fk_variable; - $price_updaters->update_interval = GETPOSTISSET('update_interval') ?GETPOST('update_interval', 'int') : $price_updaters->update_interval; - } - if ($action == 'create_updater' && !empty($save)) { - //Verify if process() works - $res = $price_updaters->process(); - if ($res > 0) { - $res = $price_updaters->create($user); - } - if ($res > 0) { - $action = ''; - } else { - setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); - } - } elseif ($action == 'edit_updater' && !empty($save)) { - //Verify if process() works - $res = $price_updaters->process(); - if ($res > 0) { - $res = $price_updaters->update($user); - } - if ($res > 0) { - $action = ''; - } else { - setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); - } - } elseif ($action == 'delete_updater') { - $res = $price_updaters->delete($selection, $user); - if ($res > 0) { - $action = ''; - } else { - setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); - } - } + //Updaters actions + if ($action == 'create_updater' || $action == 'edit_updater') { + $price_updaters->type = GETPOSTISSET('type') ? GETPOST('type', 'int') : $price_updaters->type; + $price_updaters->description = GETPOSTISSET('description') ? GETPOST('description', 'restricthtml') : $price_updaters->description; + $price_updaters->parameters = GETPOSTISSET('parameters') ? GETPOST('parameters', 'alphanohtml') : $price_updaters->parameters; + $price_updaters->fk_variable = GETPOSTISSET('fk_variable') ? GETPOST('fk_variable', 'int') : $price_updaters->fk_variable; + $price_updaters->update_interval = GETPOSTISSET('update_interval') ? GETPOST('update_interval', 'int') : $price_updaters->update_interval; + } + if ($action == 'create_updater' && !empty($save)) { + //Verify if process() works + $res = $price_updaters->process(); + if ($res > 0) { + $res = $price_updaters->create($user); + } + if ($res > 0) { + $action = ''; + } else { + setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); + } + } elseif ($action == 'edit_updater' && !empty($save)) { + //Verify if process() works + $res = $price_updaters->process(); + if ($res > 0) { + $res = $price_updaters->update($user); + } + if ($res > 0) { + $action = ''; + } else { + setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); + } + } elseif ($action == 'delete_updater') { + $res = $price_updaters->delete($selection, $user); + if ($res > 0) { + $action = ''; + } else { + setEventMessages($price_updaters->error, $price_updaters->errors, 'errors'); + } + } } elseif (!empty($cancel)) { - $action = ''; + $action = ''; } @@ -159,175 +159,171 @@ print '
    '; //Global variables table if ($action != 'create_updater' && $action != 'edit_updater') { - print load_fiche_titre($langs->trans("GlobalVariables"), '', ''); + print load_fiche_titre($langs->trans("GlobalVariables"), '', ''); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; //Space for buttons - print ''; + print '
    '.$langs->trans("Variable").''.$langs->trans("Description").''.$langs->trans("Value").' 
    '; + print ''; + print ''; + print ''; + print ''; + print ''; //Space for buttons + print ''; - $arrayglobalvars = $price_globals->listGlobalVariables(); - if (!empty($arrayglobalvars)) - { - foreach ($arrayglobalvars as $i=>$entry) { - $var = !$var; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - } - else - { - print ''; - } - print '
    '.$langs->trans("Variable").''.$langs->trans("Description").''.$langs->trans("Value").' 
    '.$entry->code.''.$entry->description.''.price($entry->value).'id.'">'.img_edit().'  '; - print 'id.'">'.img_delete().'
    '; - print $langs->trans("None"); - print '
    '; + $arrayglobalvars = $price_globals->listGlobalVariables(); + if (!empty($arrayglobalvars)) + { + foreach ($arrayglobalvars as $i=>$entry) { + $var = !$var; + print ''; + print ''.$entry->code.''; + print ''.$entry->description.''; + print ''.price($entry->value).''; + print 'id.'">'.img_edit().'  '; + print 'id.'">'.img_delete().''; + print ''; + } + } else { + print ''; + print $langs->trans("None"); + print ''; + } + print ''; - if (empty($action)) - { - //Action Buttons - print '
    '; - print ''.$langs->trans("AddVariable").''; - print '
    '; - //Separator is only need for updaters table is showed after buttons - print '

    '; - } + if (empty($action)) + { + //Action Buttons + print '
    '; + print ''.$langs->trans("AddVariable").''; + print '
    '; + //Separator is only need for updaters table is showed after buttons + print '

    '; + } } //Global variable editor if ($action == 'create_variable' || $action == 'edit_variable') { - //Form - print ''; - print ''; - print ''; - print ''; + //Form + print ''; + print ''; + print ''; + print ''; - //Table - print '
    '; - //Code - print ''; - print ''; - print ''; - print ''; - //Description - print ''; - print ''; - print ''; - print ''; - //Value - print ''; - print ''; - print ''; - print ''; - print '
    '.$langs->trans("Variable").'
    '.$langs->trans("Description").'
    '.$langs->trans("Value").'
    '; + //Table + print '
    '; + //Code + print ''; + print ''; + print ''; + print ''; + //Description + print ''; + print ''; + print ''; + print ''; + //Value + print ''; + print ''; + print ''; + print ''; + print '
    '.$langs->trans("Variable").'
    '.$langs->trans("Description").'
    '.$langs->trans("Value").'
    '; - //Form Buttons - print '
    '; - print '  '; - print ''; - print '
    '; - print ''; + //Form Buttons + print '
    '; + print '  '; + print ''; + print '
    '; + print ''; } // Updaters table if ($action != 'create_variable' && $action != 'edit_variable') { - print load_fiche_titre($langs->trans("GlobalVariableUpdaters"), '', ''); + print load_fiche_titre($langs->trans("GlobalVariableUpdaters"), '', ''); - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; //Space for buttons - print ''; + print '
    '.$langs->trans("VariableToUpdate").''.$langs->trans("Description").''.$langs->trans("Type").''.$langs->trans("Parameters").''.$langs->trans("UpdateInterval").''.$langs->trans("LastUpdated").' 
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; //Space for buttons + print ''; - $arraypriceupdaters = $price_updaters->listUpdaters(); - if (!empty($arraypriceupdaters)) - { - foreach ($arraypriceupdaters as $i=>$entry) { - $code = ""; - if ($entry->fk_variable > 0) { - $res = $price_globals->fetch($entry->fk_variable); - if ($res > 0) { - $code = $price_globals->code; - } - } - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - } - } - else - { - print ''; - } - print '
    '.$langs->trans("VariableToUpdate").''.$langs->trans("Description").''.$langs->trans("Type").''.$langs->trans("Parameters").''.$langs->trans("UpdateInterval").''.$langs->trans("LastUpdated").' 
    '.$code.''.$entry->description.''.$langs->trans("GlobalVariableUpdaterType".$entry->type).''.$entry->parameters.''.$entry->update_interval.''.$entry->getLastUpdated().'id.'">'.img_edit().'  '; - print 'id.'">'.img_delete().'
    '; - print $langs->trans("None"); - print '
    '; + $arraypriceupdaters = $price_updaters->listUpdaters(); + if (!empty($arraypriceupdaters)) + { + foreach ($arraypriceupdaters as $i=>$entry) { + $code = ""; + if ($entry->fk_variable > 0) { + $res = $price_globals->fetch($entry->fk_variable); + if ($res > 0) { + $code = $price_globals->code; + } + } + print ''; + print ''.$code.''; + print ''.$entry->description.''; + print ''.$langs->trans("GlobalVariableUpdaterType".$entry->type).''; + print ''.$entry->parameters.''; + print ''.$entry->update_interval.''; + print ''.$entry->getLastUpdated().''; + print 'id.'">'.img_edit().'  '; + print 'id.'">'.img_delete().''; + print ''; + } + } else { + print ''; + print $langs->trans("None"); + print ''; + } + print ''; - if (empty($action)) - { - //Action Buttons - print '
    '; - print ''.$langs->trans("AddUpdater").''; - print '
    '; - } + if (empty($action)) + { + //Action Buttons + print '
    '; + print ''.$langs->trans("AddUpdater").''; + print '
    '; + } } //Updater editor if ($action == 'create_updater' || $action == 'edit_updater') { - //Form - print '
    '; - print ''; - print ''; - print ''; + //Form + print ''; + print ''; + print ''; + print ''; - //Table - print '
    '; - //Code - print ''; - print ''; - //Description - print ''; - print ''; - print ''; - print ''; - //Type - print ''; - print ''; - //Parameters - print ''; - $help = $langs->trans("GlobalVariableUpdaterHelp".$type).'
    '.$langs->trans("GlobalVariableUpdaterHelpFormat".$type).''; - print ''; - print ''; - //Interval - print ''; - print ''; - print ''; - print ''; - print '
    '.$langs->trans("VariableToUpdate").''; - $globals_list = array(); - foreach ($price_globals->listGlobalVariables() as $entry) { - $globals_list[$entry->id] = $entry->code; - } - print $form->selectarray('fk_variable', $globals_list, (empty($price_updaters->fk_variable) ? 0 : $price_updaters->fk_variable)); - print '
    '.$langs->trans("Description").'
    '.$langs->trans("Type").''; - $type = empty($price_updaters->type) ? 0 : $price_updaters->type; - $type_list = array(); - foreach ($price_updaters->types as $val) { - $type_list[$val] = $langs->trans("GlobalVariableUpdaterType".$val); - } - print $form->selectarray('type', $type_list, $type); - // This code submits form when type is changed - print ''; - print '
    '.$form->textwithpicto($langs->trans("Parameters"), $help, 1).''; - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $doleditor = new DolEditor('parameters', empty($price_updaters->parameters) ? '' : $price_updaters->parameters, '', 300, '', '', false, false, false, ROWS_8, '90%'); - $doleditor->Create(); - print '
    '.$langs->trans("UpdateInterval").'
    '; + print ''; + //Parameters + print ''; + $help = $langs->trans("GlobalVariableUpdaterHelp".$type).'
    '.$langs->trans("GlobalVariableUpdaterHelpFormat".$type).''; + print ''.$form->textwithpicto($langs->trans("Parameters"), $help, 1).''; + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + $doleditor = new DolEditor('parameters', empty($price_updaters->parameters) ? '' : $price_updaters->parameters, '', 300, '', '', false, false, false, ROWS_8, '90%'); + $doleditor->Create(); + print ''; + print ''; + //Interval + print ''; + print ''.$langs->trans("UpdateInterval").''; + print ''; + print ''; + print ''; - //Form Buttons - print '
    '; - print '  '; - print ''; - print '
    '; - print '
    '; + //Form Buttons + print '
    '; + print '  '; + print ''; + print '
    '; + print ''; } // End of page diff --git a/htdocs/product/admin/product.php b/htdocs/product/admin/product.php index 4ef011b28fc..09418b5e896 100644 --- a/htdocs/product/admin/product.php +++ b/htdocs/product/admin/product.php @@ -43,7 +43,7 @@ $langs->loadLangs(array("admin", "products")); if (!$user->admin || (empty($conf->product->enabled) && empty($conf->service->enabled))) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $value = GETPOST('value', 'alpha'); $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scan_dir', 'alpha'); @@ -81,9 +81,7 @@ if ($action == 'setcodeproduct') { header("Location: ".$_SERVER["PHP_SELF"]); exit; - } - else - { + } else { dol_print_error($db); } } @@ -101,7 +99,7 @@ if ($action == 'other' && GETPOST('value_PRODUIT_MULTIPRICES_LIMIT') > 0) if ($action == 'other') { $princingrules = GETPOST('princingrule', 'alpha'); - foreach ($select_pricing_rules as $rule=>$label) // Loop on each possible mode + foreach ($select_pricing_rules as $rule => $label) // Loop on each possible mode { if ($rule == $princingrules) // We are on selected rule, we enable it { @@ -111,17 +109,14 @@ if ($action == 'other') $res = dolibarr_set_const($db, 'PRODUIT_CUSTOMER_PRICES_BY_QTY', 0, 'chaine', 0, '', $conf->entity); $res = dolibarr_set_const($db, 'PRODUIT_CUSTOMER_PRICES', 0, 'chaine', 0, '', $conf->entity); dolibarr_set_const($db, 'PRODUCT_PRICE_UNIQ', 1, 'chaine', 0, '', $conf->entity); - } - else - { + } else { $multirule = explode('&', $princingrules); foreach ($multirule as $rulesselected) { $res = dolibarr_set_const($db, $rulesselected, 1, 'chaine', 0, '', $conf->entity); } } - } - else // We clear this mode + } else // We clear this mode { if (strpos($rule, '&') === false) { $res = dolibarr_set_const($db, $rule, 0, 'chaine', 0, '', $conf->entity); @@ -129,6 +124,9 @@ if ($action == 'other') } } + $value = GETPOST('price_base_type', 'alpha'); + $res = dolibarr_set_const($db, "PRODUCT_PRICE_BASE_TYPE", $value, 'chaine', 0, '', $conf->entity); + $value = GETPOST('PRODUIT_SOUSPRODUITS', 'alpha'); $res = dolibarr_set_const($db, "PRODUIT_SOUSPRODUITS", $value, 'chaine', 0, '', $conf->entity); @@ -201,15 +199,11 @@ if ($action == 'specimen') // For products { header("Location: ".DOL_URL_ROOT."/document.php?modulepart=product&file=SPECIMEN.pdf"); return; - } - else - { + } else { setEventMessages($obj->error, $obj->errors, 'errors'); dol_syslog($obj->error, LOG_ERR); } - } - else - { + } else { setEventMessages($langs->trans("ErrorModuleNotFound"), null, 'errors'); dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR); } @@ -270,9 +264,7 @@ if ($action) if (!$error) { setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages($langs->trans("SetupNotError"), null, 'errors'); } } @@ -289,8 +281,7 @@ if (empty($conf->product->enabled)) { $title = $langs->trans('ServiceSetup'); $tab = $langs->trans('Services'); -} -elseif (empty($conf->service->enabled)) +} elseif (empty($conf->service->enabled)) { $title = $langs->trans('ProductSetup'); $tab = $langs->trans('Products'); @@ -338,8 +329,7 @@ foreach ($dirproduct as $dirroot) try { dol_include_once($dirroot.$file.'.php'); - } - catch (Exception $e) + } catch (Exception $e) { dol_syslog($e->getMessage(), LOG_ERR); } @@ -361,13 +351,11 @@ foreach ($dirproduct as $dirroot) print ''."\n"; print img_picto($langs->trans("Activated"), 'switch_on'); print "\n"; - } - else - { + } else { $disabled = false; if (!empty($conf->multicompany->enabled) && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] == $conf->entity) ? false : true); print ''; - if (!$disabled) print ''; + if (!$disabled) print ''; print img_picto($langs->trans("Disabled"), 'switch_off'); if (!$disabled) print ''; print ''; @@ -390,7 +378,7 @@ print ''; $def = array(); $sql = "SELECT nom"; $sql .= " FROM ".MAIN_DB_PREFIX."document_model"; -$sql .= " WHERE type = '".$type."'"; +$sql .= " WHERE type = '".$db->escape($type)."'"; $sql .= " AND entity = ".$conf->entity; $resql = $db->query($sql); if ($resql) @@ -403,9 +391,7 @@ if ($resql) array_push($def, $array[0]); $i++; } -} -else -{ +} else { dol_print_error($db); } @@ -475,11 +461,9 @@ foreach ($dirmodels as $reldir) print img_picto($langs->trans("Enabled"), 'switch_on'); print ''; print ''; - } - else - { + } else { print ''."\n"; - print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').''; print ""; } @@ -488,10 +472,8 @@ foreach ($dirmodels as $reldir) if ($conf->global->PRODUCT_ADDON_PDF == $name) { print img_picto($langs->trans("Default"), 'on'); - } - else - { - print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; + } else { + print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').''; } print ''; @@ -516,9 +498,7 @@ foreach ($dirmodels as $reldir) if ($module->type == 'pdf') { print ''.img_object($langs->trans("Preview"), 'contract').''; - } - else - { + } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } print ''; @@ -572,12 +552,10 @@ print ''; if (empty($conf->multicompany->enabled)) { print ''.$langs->trans("PricingRule").''; -} -else -{ +} else { print ''.$form->textwithpicto($langs->trans("PricingRule"), $langs->trans("SamePriceAlsoForSharedCompanies"), 1).''; } -print ''; +print ''; $current_rule = 'PRODUCT_PRICE_UNIQ'; if (!empty($conf->global->PRODUIT_MULTIPRICES)) $current_rule = 'PRODUIT_MULTIPRICES'; if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES_BY_QTY)) $current_rule = 'PRODUIT_CUSTOMER_PRICES_BY_QTY'; @@ -597,11 +575,19 @@ if (!empty($conf->global->PRODUIT_MULTIPRICES) || !empty($conf->global->PRODUIT_ print ''; } +//Default product price base type +print ''; +print ''.$langs->trans("DefaultPriceType").''; +print ''; +print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type"); +print ''; +print ''; + // sousproduits activation/desactivation print ''; print ''.$langs->trans("AssociatedProductsAbility").''; -print ''; +print ''; print $form->selectyesno("PRODUIT_SOUSPRODUITS", $conf->global->PRODUIT_SOUSPRODUITS, 1); print ''; print ''; @@ -612,13 +598,11 @@ print ''; print ''.$form->textwithpicto($langs->trans("UseSearchToSelectProduct"), $langs->trans('UseSearchToSelectProductTooltip'), 1).''; if (empty($conf->use_javascript_ajax)) { - print ''; + print ''; print $langs->trans("NotAvailableWhenAjaxDisabled"); print ''; -} -else -{ - print ''; +} else { + print ''; $arrval = array( '0'=>$langs->trans("No"), '1'=>$langs->trans("Yes").' ('.$langs->trans("NumberOfKeyToSearch", 1).')', @@ -641,7 +625,7 @@ if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT)) // Visualiser description produit dans les formulaires activation/desactivation print ''; print ''.$langs->trans("ViewProductDescInFormAbility").''; -print ''; +print ''; print $form->selectyesno("activate_viewProdDescInForm", $conf->global->PRODUIT_DESC_IN_FORM, 1); print ''; print ''; @@ -651,7 +635,7 @@ print ''; print ''; print ''.$langs->trans("MergePropalProductCard").''; -print ''; +print ''; print $form->selectyesno("activate_mergePropalProductCard",$conf->global->PRODUIT_PDF_MERGE_PROPAL,1); print ''; print ''; @@ -662,7 +646,7 @@ print ''; print ''; print ''.$langs->trans("UseUnits").''; -print ''; +print ''; print $form->selectyesno("activate_units",$conf->global->PRODUCT_USE_UNITS,1); print ''; print ''; @@ -673,7 +657,7 @@ if (!empty($conf->global->MAIN_MULTILANGS)) { print ''; print ''.$langs->trans("ViewProductDescInThirdpartyLanguageAbility").''; - print ''; + print ''; print $form->selectyesno("activate_viewProdTextsInThirdpartyLanguage", (!empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE) ? $conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE : 0), 1); print ''; print ''; @@ -683,14 +667,14 @@ if (!empty($conf->fournisseur->enabled) && empty($conf->global->MAIN_USE_NEW_SUP { print ''; print ''.$langs->trans("UseProductFournDesc").''; - print ''; + print ''; print $form->selectyesno("activate_useProdFournDesc", (!empty($conf->global->PRODUIT_FOURN_TEXTS) ? $conf->global->PRODUIT_FOURN_TEXTS : 0), 1); print ''; print ''; print ''; print ''.$langs->trans("UseProductSupplierPackaging").''; - print ''; + print ''; print $form->selectyesno("activate_useProdSupplierPackaging", (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING) ? $conf->global->PRODUCT_USE_SUPPLIER_PACKAGING : 0), 1); print ''; print ''; @@ -704,8 +688,8 @@ if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) print ''; print ''.$langs->trans("ProductSpecial").''."\n"; - print ''.$langs->trans("Value").''."\n"; - print ' '."\n"; + print ''.$langs->trans("Value").''."\n"; + print ''."\n"; if (is_dir($dir)) { @@ -740,12 +724,10 @@ if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) { print img_picto($langs->trans("Active"), 'tick'); print ''; - print ''.$langs->trans("Disable").''; - } - else - { + print ''.$langs->trans("Disable").''; + } else { print ' '; - print ''.$langs->trans("Activate").''; + print ''.$langs->trans("Activate").''; } print ''; @@ -754,9 +736,7 @@ if (!empty($conf->global->PRODUCT_CANVAS_ABILITY)) } closedir($handle); } - } - else - { + } else { setEventMessages($dir.' '.$langs->trans("IsNotADir"), null, 'errors'); } } diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index 7814c3bcda8..59d6437578c 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -40,7 +40,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'product'; //Must be the $element of the class that manage extrafield @@ -65,8 +65,7 @@ if (empty($conf->product->enabled)) { $title = $langs->trans('ServiceSetup'); $textobject = $langs->trans('Services'); -} -elseif (empty($conf->service->enabled)) +} elseif (empty($conf->service->enabled)) { $title = $langs->trans('ProductSetup'); $textobject = $langs->trans('Products'); diff --git a/htdocs/product/admin/product_lot_extrafields.php b/htdocs/product/admin/product_lot_extrafields.php index 625ca8bf1b3..e5e058927a1 100644 --- a/htdocs/product/admin/product_lot_extrafields.php +++ b/htdocs/product/admin/product_lot_extrafields.php @@ -40,7 +40,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'product_lot'; //Must be the $element of the class that manage extrafield diff --git a/htdocs/product/admin/product_supplier_extrafields.php b/htdocs/product/admin/product_supplier_extrafields.php index d35e6012e1f..daaf3a9edfd 100644 --- a/htdocs/product/admin/product_supplier_extrafields.php +++ b/htdocs/product/admin/product_supplier_extrafields.php @@ -41,7 +41,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'product_fournisseur_price'; //Must be the $element of the class that manage extrafield @@ -66,8 +66,7 @@ if (empty($conf->product->enabled)) { $title = $langs->trans('ServiceSetup'); $textobject = $langs->trans('Services'); -} -elseif (empty($conf->service->enabled)) +} elseif (empty($conf->service->enabled)) { $title = $langs->trans('ProductSetup'); $textobject = $langs->trans('Products'); diff --git a/htdocs/product/admin/product_tools.php b/htdocs/product/admin/product_tools.php index 4ce4a067e5c..592dd89baaa 100644 --- a/htdocs/product/admin/product_tools.php +++ b/htdocs/product/admin/product_tools.php @@ -37,7 +37,7 @@ $langs->loadLangs(array('admin', 'products')); // Security check if (!$user->admin) accessforbidden(); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $oldvatrate = GETPOST('oldvatrate', 'alpha'); $newvatrate = GETPOST('newvatrate', 'alpha'); //$price_base_type=GETPOST('price_base_type'); @@ -90,7 +90,7 @@ if ($action == 'convert') $sql .= ' FROM '.MAIN_DB_PREFIX.'product'; $sql .= ' WHERE entity IN ('.getEntity('product').')'; $sql .= " AND tva_tx = '".$db->escape($oldvatrateclean)."'"; - if ($vat_src_code_old) $sql .= " AND default_vat_code = '".$vat_src_code_old."'"; + if ($vat_src_code_old) $sql .= " AND default_vat_code = '".$db->escape($vat_src_code_old)."'"; else " AND default_vat_code = IS NULL"; $resql = $db->query($sql); @@ -120,9 +120,7 @@ if ($action == 'convert') { $newprice = price2num($objectstatic->multiprices_ttc[$level], 'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals) $newminprice = $objectstatic->multiprices_min_ttc[$level]; - } - else - { + } else { $newprice = price2num($objectstatic->multiprices[$level], 'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals) $newminprice = $objectstatic->multiprices_min[$level]; } @@ -151,9 +149,7 @@ if ($action == 'convert') { $newprice = price2num($objectstatic->price_ttc, 'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals) $newminprice = $objectstatic->price_min_ttc; - } - else - { + } else { $newprice = price2num($objectstatic->price, 'MU'); // Second param must be MU (we want a unit price so 'MU'. If unit price was on 4 decimal, we must keep 4 decimals) $newminprice = $objectstatic->price_min; } @@ -176,8 +172,7 @@ if ($action == 'convert') $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); } $fourn = new Fournisseur($db); @@ -187,9 +182,9 @@ if ($action == 'convert') $sql .= ' FROM '.MAIN_DB_PREFIX.'product_fournisseur_price as pfp, '.MAIN_DB_PREFIX.'societe as s'; $sql .= ' WHERE pfp.fk_soc = s.rowid AND pfp.entity IN ('.getEntity('product').')'; $sql .= " AND tva_tx = '".$db->escape($oldvatrate)."'"; - if ($vat_src_code_old) $sql .= " AND default_vat_code = '".$vat_src_code_old."'"; + if ($vat_src_code_old) $sql .= " AND default_vat_code = '".$db->escape($vat_src_code_old)."'"; else " AND default_vat_code = IS NULL"; - $sql .= " AND s.fk_pays = '".$country_id."'"; + $sql .= " AND s.fk_pays = ".((int) $country_id); //print $sql; $resql = $db->query($sql); if ($resql) @@ -245,15 +240,12 @@ if ($action == 'convert') $i++; } - } - else dol_print_error($db); + } else dol_print_error($db); if (!$error) { $db->commit(); - } - else - { + } else { $db->rollback(); } @@ -262,9 +254,7 @@ if ($action == 'convert') { if ($nbrecordsmodified > 0) setEventMessages($langs->trans("RecordsModified", $nbrecordsmodified), null, 'mesgs'); else setEventMessages($langs->trans("NoRecordFound"), null, 'warnings'); - } - else - { + } else { setEventMessages($langs->trans("Error"), null, 'errors'); } } @@ -289,9 +279,7 @@ if (empty($mysoc->country_code)) $langs->load("errors"); $warnpicto = img_error($langs->trans("WarningMandatorySetupNotComplete")); print '
    '.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").''; -} -else -{ +} else { print '
    '; print ''; print ''; diff --git a/htdocs/product/admin/stock_extrafields.php b/htdocs/product/admin/stock_extrafields.php index 22ad53cd0e8..4c9e1435c15 100644 --- a/htdocs/product/admin/stock_extrafields.php +++ b/htdocs/product/admin/stock_extrafields.php @@ -39,7 +39,7 @@ $tmptype2label = ExtraFields::$type2label; $type2label = array(''); foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $attrname = GETPOST('attrname', 'alpha'); $elementtype = 'entrepot'; //Must be the $table_element of the class that manage extrafield diff --git a/htdocs/product/agenda.php b/htdocs/product/agenda.php index 808ba9739ba..acd698d9f37 100644 --- a/htdocs/product/agenda.php +++ b/htdocs/product/agenda.php @@ -40,9 +40,7 @@ if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) $actioncode = '0'; -} -else -{ +} else { $actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT)); } $search_agenda_label = GETPOST('search_agenda_label'); diff --git a/htdocs/product/ajax/products.php b/htdocs/product/ajax/products.php index 918950179c7..7441d88abc0 100644 --- a/htdocs/product/ajax/products.php +++ b/htdocs/product/ajax/products.php @@ -39,7 +39,7 @@ $mode = GETPOST('mode', 'int'); $status = ((GETPOST('status', 'int') >= 0) ? GETPOST('status', 'int') : - 1); $outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0); $price_level = GETPOST('price_level', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $id = GETPOST('id', 'int'); $price_by_qty_rowid = GETPOST('pbq', 'int'); $finished = GETPOST('finished', 'int'); @@ -162,9 +162,7 @@ if (!empty($action) && $action == 'fetch' && !empty($id)) } echo json_encode($outjson); -} -else -{ +} else { require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; $langs->loadLangs(array("main", "products")); diff --git a/htdocs/product/canvas/product/actions_card_product.class.php b/htdocs/product/canvas/product/actions_card_product.class.php index 1612448c1bb..85cd3464c1f 100644 --- a/htdocs/product/canvas/product/actions_card_product.class.php +++ b/htdocs/product/canvas/product/actions_card_product.class.php @@ -287,9 +287,7 @@ class ActionsCardProduct $i++; } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db, $sql); } } @@ -322,7 +320,7 @@ class ActionsCardProduct if ($field['enabled']) { $fieldname = "s".$field['alias']; - $$fieldname = trim(GETPOST($fieldname)); + $$fieldname = GETPOST($fieldname); } } @@ -407,14 +405,12 @@ class ActionsCardProduct $this->type = $obj->fk_product_type; $this->entity = $obj->entity; $datas[$alias] = $this->getNomUrl(1, '', 24); - } - elseif ($alias == 'stock') + } elseif ($alias == 'stock') { $this->load_stock(); if ($this->stock_reel < $obj->seuil_stock_alerte) $datas[$alias] = $this->stock_reel.' '.img_warning($langs->trans("StockTooLow")); else $datas[$alias] = $this->stock_reel; - } - elseif ($alias == 'label') $datas[$alias] = dol_trunc($obj->$alias, 40); + } elseif ($alias == 'label') $datas[$alias] = dol_trunc($obj->$alias, 40); elseif (preg_match('/price/i', $alias)) $datas[$alias] = price($obj->$alias); elseif ($alias == 'datem') $datas[$alias] = dol_print_date($this->db->jdate($obj->$alias), 'day'); elseif ($alias == 'status') $datas[$alias] = $this->LibStatut($obj->$alias, 5); @@ -427,9 +423,7 @@ class ActionsCardProduct $i++; } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db); } } diff --git a/htdocs/product/canvas/service/actions_card_service.class.php b/htdocs/product/canvas/service/actions_card_service.class.php index 331cecb3071..0518cfed475 100644 --- a/htdocs/product/canvas/service/actions_card_service.class.php +++ b/htdocs/product/canvas/service/actions_card_service.class.php @@ -205,8 +205,7 @@ class ActionsCardService if ($this->object->duration_value > 1) { $dur = array("h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); - } - elseif ($this->object->duration_value > 0) + } elseif ($this->object->duration_value > 0) { $dur = array("h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); } @@ -267,9 +266,7 @@ class ActionsCardService $i++; } $this->db->free($resql); - } - else - { + } else { dol_print_error($this->db, $sql); } } @@ -360,9 +357,7 @@ class ActionsCardService $i++; } $this->db->free($resql); - } - else - { + } else { print $sql; } } diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 8b4654ba921..e3467e871c8 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -18,6 +18,7 @@ * Copyright (C) 2017 Josep Lluís Amador * Copyright (C) 2019 Frédéric France * Copyright (C) 2019-2020 Thibault FOUCART + * Copyright (C) 2020 Pierre Ardoin * * 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 @@ -44,6 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/genericobject.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php'; @@ -97,16 +99,16 @@ $extrafields->fetch_name_optionals_label($object->table_element); if ($id > 0 || !empty($ref)) { - $result = $object->fetch($id, $ref); + $result = $object->fetch($id, $ref); - if (!empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); - elseif (!empty($conf->service->enabled)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); + if (!empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); + elseif (!empty($conf->service->enabled)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); - if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs - { - if (!empty($conf->product->enabled)) $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; - else $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; - } + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs + { + if (!empty($conf->product->enabled)) $upload_dirold = $conf->product->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; + else $upload_dirold = $conf->service->multidir_output[$object->entity].'/'.substr(substr("000".$object->id, -2), 1, 1).'/'.substr(substr("000".$object->id, -2), 0, 1).'/'.$object->id."/photos"; + } } $modulepart = 'product'; @@ -116,9 +118,9 @@ $canvas = !empty($object->canvas) ? $object->canvas : GETPOST("canvas"); $objcanvas = null; if (!empty($canvas)) { - require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; - $objcanvas = new Canvas($db, $action); - $objcanvas->getCanvas('product', 'card', $canvas); + require_once DOL_DOCUMENT_ROOT.'/core/class/canvas.class.php'; + $objcanvas = new Canvas($db, $action); + $objcanvas->getCanvas('product', 'card', $canvas); } // Security check @@ -149,185 +151,183 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (empty($reshook)) { - // Type + // Type if ($action == 'setfk_product_type' && $usercancreate) - { - $result = $object->setValueFrom('fk_product_type', GETPOST('fk_product_type'), '', null, 'text', '', $user, 'PRODUCT_MODIFY'); - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } + { + $result = $object->setValueFrom('fk_product_type', GETPOST('fk_product_type'), '', null, 'text', '', $user, 'PRODUCT_MODIFY'); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } - // Actions to build doc - $upload_dir = $conf->product->dir_output; - $permissiontoadd = $usercancreate; - include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + // Actions to build doc + $upload_dir = $conf->product->dir_output; + $permissiontoadd = $usercancreate; + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; - include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; - // Barcode type - if ($action == 'setfk_barcode_type' && $createbarcode) - { - $result = $object->setValueFrom('fk_barcode_type', GETPOST('fk_barcode_type'), '', null, 'text', '', $user, 'PRODUCT_MODIFY'); - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } + // Barcode type + if ($action == 'setfk_barcode_type' && $createbarcode) + { + $result = $object->setValueFrom('fk_barcode_type', GETPOST('fk_barcode_type'), '', null, 'text', '', $user, 'PRODUCT_MODIFY'); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } - // Barcode value - if ($action == 'setbarcode' && $createbarcode) - { - $result = $object->check_barcode(GETPOST('barcode'), GETPOST('barcode_type_code')); + // Barcode value + if ($action == 'setbarcode' && $createbarcode) + { + $result = $object->check_barcode(GETPOST('barcode'), GETPOST('barcode_type_code')); if ($result >= 0) { - $result = $object->setValueFrom('barcode', GETPOST('barcode'), '', null, 'text', '', $user, 'PRODUCT_MODIFY'); - header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); - exit; - } - else - { + $result = $object->setValueFrom('barcode', GETPOST('barcode'), '', null, 'text', '', $user, 'PRODUCT_MODIFY'); + header("Location: ".$_SERVER['PHP_SELF']."?id=".$object->id); + exit; + } else { $langs->load("errors"); - if ($result == -1) $errors[] = 'ErrorBadBarCodeSyntax'; - elseif ($result == -2) $errors[] = 'ErrorBarCodeRequired'; - elseif ($result == -3) $errors[] = 'ErrorBarCodeAlreadyUsed'; - else $errors[] = 'FailedToValidateBarCode'; + if ($result == -1) $errors[] = 'ErrorBadBarCodeSyntax'; + elseif ($result == -2) $errors[] = 'ErrorBarCodeRequired'; + elseif ($result == -3) $errors[] = 'ErrorBarCodeAlreadyUsed'; + else $errors[] = 'FailedToValidateBarCode'; $error++; setEventMessages($errors, null, 'errors'); } - } + } - // Add a product or service - if ($action == 'add' && $usercancreate) - { - $error = 0; + // Add a product or service + if ($action == 'add' && $usercancreate) + { + $error = 0; - if (!GETPOST('label', 'alphanohtml')) - { - setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Label')), null, 'errors'); - $action = "create"; - $error++; - } - if (empty($ref)) - { - setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors'); - $action = "create"; - $error++; - } - if (!empty($duration_value) && empty($duration_unit)) - { - setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Unit')), null, 'errors'); - $action = "create"; - $error++; - } + if (!GETPOST('label', 'alphanohtml')) + { + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Label')), null, 'errors'); + $action = "create"; + $error++; + } + if (empty($ref)) + { + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Ref')), null, 'errors'); + $action = "create"; + $error++; + } + if (!empty($duration_value) && empty($duration_unit)) + { + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentities('Unit')), null, 'errors'); + $action = "create"; + $error++; + } - if (!$error) - { - $units = GETPOST('units', 'int'); + if (!$error) + { + $units = GETPOST('units', 'int'); - $object->ref = $ref; - $object->label = GETPOST('label', 'alphanohtml'); - $object->price_base_type = GETPOST('price_base_type', 'aZ09'); + $object->ref = $ref; + $object->label = GETPOST('label', 'alphanohtml'); + $object->price_base_type = GETPOST('price_base_type', 'aZ09'); - if ($object->price_base_type == 'TTC') - $object->price_ttc = GETPOST('price'); - else - $object->price = GETPOST('price'); - if ($object->price_base_type == 'TTC') - $object->price_min_ttc = GETPOST('price_min'); - else - $object->price_min = GETPOST('price_min'); + if ($object->price_base_type == 'TTC') + $object->price_ttc = GETPOST('price'); + else $object->price = GETPOST('price'); + if ($object->price_base_type == 'TTC') + $object->price_min_ttc = GETPOST('price_min'); + else $object->price_min = GETPOST('price_min'); - $tva_tx_txt = GETPOST('tva_tx', 'alpha'); // tva_tx can be '8.5' or '8.5*' or '8.5 (XXX)' or '8.5* (XXX)' + $tva_tx_txt = GETPOST('tva_tx', 'alpha'); // tva_tx can be '8.5' or '8.5*' or '8.5 (XXX)' or '8.5* (XXX)' - // We must define tva_tx, npr and local taxes - $vatratecode = ''; - $tva_tx = preg_replace('/[^0-9\.].*$/', '', $tva_tx_txt); // keep remove all after the numbers and dot - $npr = preg_match('/\*/', $tva_tx_txt) ? 1 : 0; - $localtax1 = 0; $localtax2 = 0; $localtax1_type = '0'; $localtax2_type = '0'; - // If value contains the unique code of vat line (new recommanded method), we use it to find npr and local taxes - if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) - { - // We look into database using code (we can't use get_localtax() because it depends on buyer that is not known). Same in update price. - $vatratecode = $reg[1]; - // Get record from code - $sql = "SELECT t.rowid, t.code, t.recuperableonly, t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type"; - $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c"; - $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$mysoc->country_code."'"; - $sql .= " AND t.taux = ".((float) $tva_tx)." AND t.active = 1"; - $sql .= " AND t.code ='".$vatratecode."'"; - $resql = $db->query($sql); - if ($resql) - { - $obj = $db->fetch_object($resql); - $npr = $obj->recuperableonly; - $localtax1 = $obj->localtax1; - $localtax2 = $obj->localtax2; - $localtax1_type = $obj->localtax1_type; - $localtax2_type = $obj->localtax2_type; - } - } + // We must define tva_tx, npr and local taxes + $vatratecode = ''; + $tva_tx = preg_replace('/[^0-9\.].*$/', '', $tva_tx_txt); // keep remove all after the numbers and dot + $npr = preg_match('/\*/', $tva_tx_txt) ? 1 : 0; + $localtax1 = 0; $localtax2 = 0; $localtax1_type = '0'; $localtax2_type = '0'; + // If value contains the unique code of vat line (new recommanded method), we use it to find npr and local taxes + $reg = array(); + if (preg_match('/\((.*)\)/', $tva_tx_txt, $reg)) + { + // We look into database using code (we can't use get_localtax() because it depends on buyer that is not known). Same in update price. + $vatratecode = $reg[1]; + // Get record from code + $sql = "SELECT t.rowid, t.code, t.recuperableonly, t.localtax1, t.localtax2, t.localtax1_type, t.localtax2_type"; + $sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c"; + $sql .= " WHERE t.fk_pays = c.rowid AND c.code = '".$db->escape($mysoc->country_code)."'"; + $sql .= " AND t.taux = ".((float) $tva_tx)." AND t.active = 1"; + $sql .= " AND t.code = '".$db->escape($vatratecode)."'"; + $resql = $db->query($sql); + if ($resql) + { + $obj = $db->fetch_object($resql); + $npr = $obj->recuperableonly; + $localtax1 = $obj->localtax1; + $localtax2 = $obj->localtax2; + $localtax1_type = $obj->localtax1_type; + $localtax2_type = $obj->localtax2_type; + } + } - $object->default_vat_code = $vatratecode; - $object->tva_tx = $tva_tx; - $object->tva_npr = $npr; - $object->localtax1_tx = $localtax1; - $object->localtax2_tx = $localtax2; - $object->localtax1_type = $localtax1_type; - $object->localtax2_type = $localtax2_type; + $object->default_vat_code = $vatratecode; + $object->tva_tx = $tva_tx; + $object->tva_npr = $npr; + $object->localtax1_tx = $localtax1; + $object->localtax2_tx = $localtax2; + $object->localtax1_type = $localtax1_type; + $object->localtax2_type = $localtax2_type; - $object->type = $type; - $object->status = GETPOST('statut'); - $object->status_buy = GETPOST('statut_buy'); + $object->type = $type; + $object->status = GETPOST('statut'); + $object->status_buy = GETPOST('statut_buy'); $object->status_batch = GETPOST('status_batch'); - $object->barcode_type = GETPOST('fk_barcode_type'); - $object->barcode = GETPOST('barcode'); - // Set barcode_type_xxx from barcode_type id - $stdobject = new GenericObject($db); - $stdobject->element = 'product'; - $stdobject->barcode_type = GETPOST('fk_barcode_type'); - $result = $stdobject->fetch_barcode(); - if ($result < 0) - { - $error++; - $mesg = 'Failed to get bar code type information '; - setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); - } - $object->barcode_type_code = $stdobject->barcode_type_code; - $object->barcode_type_coder = $stdobject->barcode_type_coder; - $object->barcode_type_label = $stdobject->barcode_type_label; + $object->barcode_type = GETPOST('fk_barcode_type'); + $object->barcode = GETPOST('barcode'); + // Set barcode_type_xxx from barcode_type id + $stdobject = new GenericObject($db); + $stdobject->element = 'product'; + $stdobject->barcode_type = GETPOST('fk_barcode_type'); + $result = $stdobject->fetch_barcode(); + if ($result < 0) + { + $error++; + $mesg = 'Failed to get bar code type information '; + setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); + } + $object->barcode_type_code = $stdobject->barcode_type_code; + $object->barcode_type_coder = $stdobject->barcode_type_coder; + $object->barcode_type_label = $stdobject->barcode_type_label; - $object->description = dol_htmlcleanlastbr(GETPOST('desc', 'none')); - $object->url = GETPOST('url'); - $object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'none')); - $object->note = $object->note_private; // deprecated - $object->customcode = GETPOST('customcode', 'alphanohtml'); - $object->country_id = GETPOST('country_id', 'int'); - $object->duration_value = $duration_value; - $object->duration_unit = $duration_unit; - $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); - $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte') ?GETPOST('seuil_stock_alerte') : 0; - $object->desiredstock = GETPOST('desiredstock') ?GETPOST('desiredstock') : 0; - $object->canvas = GETPOST('canvas'); - $object->net_measure = GETPOST('net_measure'); - $object->net_measure_units = GETPOST('net_measure_units'); // This is not the fk_unit but the power of unit - $object->weight = GETPOST('weight'); - $object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit - $object->length = GETPOST('size'); - $object->length_units = GETPOST('size_units'); // This is not the fk_unit but the power of unit - $object->width = GETPOST('sizewidth'); - $object->height = GETPOST('sizeheight'); - $object->surface = GETPOST('surface'); - $object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit - $object->volume = GETPOST('volume'); - $object->volume_units = GETPOST('volume_units'); // This is not the fk_unit but the power of unit - $object->finished = GETPOST('finished', 'alpha'); - $object->fk_unit = GETPOST('units', 'alpha'); // This is the fk_unit of sale + $object->description = dol_htmlcleanlastbr(GETPOST('desc', 'restricthtml')); + $object->url = GETPOST('url'); + $object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'restricthtml')); + $object->note = $object->note_private; // deprecated + $object->customcode = GETPOST('customcode', 'alphanohtml'); + $object->country_id = GETPOST('country_id', 'int'); + $object->state_id = GETPOST('state_id', 'int'); + $object->duration_value = $duration_value; + $object->duration_unit = $duration_unit; + $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); + $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte') ?GETPOST('seuil_stock_alerte') : 0; + $object->desiredstock = GETPOST('desiredstock') ?GETPOST('desiredstock') : 0; + $object->canvas = GETPOST('canvas'); + $object->net_measure = GETPOST('net_measure'); + $object->net_measure_units = GETPOST('net_measure_units'); // This is not the fk_unit but the power of unit + $object->weight = GETPOST('weight'); + $object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit + $object->length = GETPOST('size'); + $object->length_units = GETPOST('size_units'); // This is not the fk_unit but the power of unit + $object->width = GETPOST('sizewidth'); + $object->height = GETPOST('sizeheight'); + $object->surface = GETPOST('surface'); + $object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit + $object->volume = GETPOST('volume'); + $object->volume_units = GETPOST('volume_units'); // This is not the fk_unit but the power of unit + $object->finished = GETPOST('finished', 'alpha'); + $object->fk_unit = GETPOST('units', 'alpha'); // This is the fk_unit of sale - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); - $accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha'); - $accountancy_code_sell_export = GETPOST('accountancy_code_sell_export', 'alpha'); - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); + $accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha'); + $accountancy_code_sell_export = GETPOST('accountancy_code_sell_export', 'alpha'); + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); $accountancy_code_buy_intra = GETPOST('accountancy_code_buy_intra', 'alpha'); $accountancy_code_buy_export = GETPOST('accountancy_code_buy_export', 'alpha'); @@ -338,34 +338,32 @@ if (empty($reshook)) if ($accountancy_code_buy_intra <= 0) { $object->accountancy_code_buy_intra = ''; } else { $object->accountancy_code_buy_intra = $accountancy_code_buy_intra; } if ($accountancy_code_buy_export <= 0) { $object->accountancy_code_buy_export = ''; } else { $object->accountancy_code_buy_export = $accountancy_code_buy_export; } - // MultiPrix - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { - for ($i = 2; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) - { - if (GETPOSTISSET("price_".$i)) - { - $object->multiprices["$i"] = price2num($_POST["price_".$i], 'MU'); - $object->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i]; - } - else - { - $object->multiprices["$i"] = ""; - } - } - } + // MultiPrix + if (!empty($conf->global->PRODUIT_MULTIPRICES)) + { + for ($i = 2; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) + { + if (GETPOSTISSET("price_".$i)) + { + $object->multiprices["$i"] = price2num($_POST["price_".$i], 'MU'); + $object->multiprices_base_type["$i"] = $_POST["multiprices_base_type_".$i]; + } else { + $object->multiprices["$i"] = ""; + } + } + } - // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost(null, $object); + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if (!$error) { - $id = $object->create($user); + $id = $object->create($user); } - if ($id > 0) - { + if ($id > 0) + { // Category association $categories = GETPOST('categories', 'array'); $object->setCategories($categories); @@ -376,105 +374,100 @@ if (empty($reshook)) if (preg_match('/\?/', $backtopage)) $backtopage .= '&socid='.$object->id; // Old method header("Location: ".$backtopage); exit; + } else { + header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); + exit; } - else - { - header("Location: ".$_SERVER['PHP_SELF']."?id=".$id); - exit; - } - } - else - { - if (count($object->errors)) setEventMessages($object->error, $object->errors, 'errors'); + } else { + if (count($object->errors)) setEventMessages($object->error, $object->errors, 'errors'); else setEventMessages($langs->trans($object->error), null, 'errors'); - $action = "create"; - } - } - } + $action = "create"; + } + } + } - // Update a product or service - if ($action == 'update' && $usercancreate) - { - if (GETPOST('cancel', 'alpha')) - { - $action = ''; - } - else - { - if ($object->id > 0) - { + // Update a product or service + if ($action == 'update' && $usercancreate) + { + if (GETPOST('cancel', 'alpha')) + { + $action = ''; + } else { + if ($object->id > 0) + { $object->oldcopy = clone $object; - $object->ref = $ref; - $object->label = GETPOST('label', 'alphanohtml'); - $object->description = dol_htmlcleanlastbr(GETPOST('desc', 'none')); - $object->url = GETPOST('url'); - if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) - { - $object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'none')); - $object->note = $object->note_private; - } - $object->customcode = GETPOST('customcode', 'alpha'); - $object->country_id = GETPOST('country_id', 'int'); - $object->status = GETPOST('statut', 'int'); - $object->status_buy = GETPOST('statut_buy', 'int'); - $object->status_batch = GETPOST('status_batch', 'aZ09'); - // removed from update view so GETPOST always empty - $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); - /* + $object->ref = $ref; + $object->label = GETPOST('label', 'alphanohtml'); + $object->description = dol_htmlcleanlastbr(GETPOST('desc', 'restricthtml')); + $object->url = GETPOST('url'); + if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) + { + $object->note_private = dol_htmlcleanlastbr(GETPOST('note_private', 'restricthtml')); + $object->note = $object->note_private; + } + $object->customcode = GETPOST('customcode', 'alpha'); + $object->country_id = GETPOST('country_id', 'int'); + $object->state_id = GETPOST('state_id', 'int'); + $object->status = GETPOST('statut', 'int'); + $object->status_buy = GETPOST('statut_buy', 'int'); + $object->status_batch = GETPOST('status_batch', 'aZ09'); + // removed from update view so GETPOST always empty + $object->fk_default_warehouse = GETPOST('fk_default_warehouse'); + /* $object->seuil_stock_alerte = GETPOST('seuil_stock_alerte'); $object->desiredstock = GETPOST('desiredstock'); */ - $object->duration_value = GETPOST('duration_value', 'int'); - $object->duration_unit = GETPOST('duration_unit', 'alpha'); + $object->duration_value = GETPOST('duration_value', 'int'); + $object->duration_unit = GETPOST('duration_unit', 'alpha'); - $object->canvas = GETPOST('canvas'); - $object->net_measure = GETPOST('net_measure'); - $object->net_measure_units = GETPOST('net_measure_units'); // This is not the fk_unit but the power of unit - $object->weight = GETPOST('weight'); - $object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit - $object->length = GETPOST('size'); - $object->length_units = GETPOST('size_units'); // This is not the fk_unit but the power of unit - $object->width = GETPOST('sizewidth'); - $object->height = GETPOST('sizeheight'); + $object->canvas = GETPOST('canvas'); + $object->net_measure = GETPOST('net_measure'); + $object->net_measure_units = GETPOST('net_measure_units'); // This is not the fk_unit but the power of unit + $object->weight = GETPOST('weight'); + $object->weight_units = GETPOST('weight_units'); // This is not the fk_unit but the power of unit + $object->length = GETPOST('size'); + $object->length_units = GETPOST('size_units'); // This is not the fk_unit but the power of unit + $object->width = GETPOST('sizewidth'); + $object->height = GETPOST('sizeheight'); - $object->surface = GETPOST('surface'); - $object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit - $object->volume = GETPOST('volume'); - $object->volume_units = GETPOST('volume_units'); // This is not the fk_unit but the power of unit - $object->finished = GETPOST('finished', 'alpha'); + $object->surface = GETPOST('surface'); + $object->surface_units = GETPOST('surface_units'); // This is not the fk_unit but the power of unit + $object->volume = GETPOST('volume'); + $object->volume_units = GETPOST('volume_units'); // This is not the fk_unit but the power of unit + $object->finished = GETPOST('finished', 'alpha'); - $units = GETPOST('units', 'int'); + $units = GETPOST('units', 'int'); - if ($units > 0) { - $object->fk_unit = $units; - } else { - $object->fk_unit = null; - } + if ($units > 0) { + $object->fk_unit = $units; + } else { + $object->fk_unit = null; + } - $object->barcode_type = GETPOST('fk_barcode_type'); - $object->barcode = GETPOST('barcode'); - // Set barcode_type_xxx from barcode_type id - $stdobject = new GenericObject($db); - $stdobject->element = 'product'; - $stdobject->barcode_type = GETPOST('fk_barcode_type'); - $result = $stdobject->fetch_barcode(); - if ($result < 0) - { - $error++; - $mesg = 'Failed to get bar code type information '; - setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); - } - $object->barcode_type_code = $stdobject->barcode_type_code; - $object->barcode_type_coder = $stdobject->barcode_type_coder; - $object->barcode_type_label = $stdobject->barcode_type_label; + $object->barcode_type = GETPOST('fk_barcode_type'); + $object->barcode = GETPOST('barcode'); + // Set barcode_type_xxx from barcode_type id + $stdobject = new GenericObject($db); + $stdobject->element = 'product'; + $stdobject->barcode_type = GETPOST('fk_barcode_type'); + $result = $stdobject->fetch_barcode(); + if ($result < 0) + { + $error++; + $mesg = 'Failed to get bar code type information '; + setEventMessages($mesg.$stdobject->error, $mesg.$stdobject->errors, 'errors'); + } + $object->barcode_type_code = $stdobject->barcode_type_code; + $object->barcode_type_coder = $stdobject->barcode_type_coder; + $object->barcode_type_label = $stdobject->barcode_type_label; - $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); - $accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha'); - $accountancy_code_sell_export = GETPOST('accountancy_code_sell_export', 'alpha'); - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); - $accountancy_code_buy_intra = GETPOST('accountancy_code_buy_intra', 'alpha'); - $accountancy_code_buy_export = GETPOST('accountancy_code_buy_export', 'alpha'); + $accountancy_code_sell = GETPOST('accountancy_code_sell', 'alpha'); + $accountancy_code_sell_intra = GETPOST('accountancy_code_sell_intra', 'alpha'); + $accountancy_code_sell_export = GETPOST('accountancy_code_sell_export', 'alpha'); + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); + $accountancy_code_buy_intra = GETPOST('accountancy_code_buy_intra', 'alpha'); + $accountancy_code_buy_export = GETPOST('accountancy_code_buy_export', 'alpha'); if ($accountancy_code_sell <= 0) { $object->accountancy_code_sell = ''; } else { $object->accountancy_code_sell = $accountancy_code_sell; } if ($accountancy_code_sell_intra <= 0) { $object->accountancy_code_sell_intra = ''; } else { $object->accountancy_code_sell_intra = $accountancy_code_sell_intra; } @@ -483,407 +476,382 @@ if (empty($reshook)) if ($accountancy_code_buy_intra <= 0) { $object->accountancy_code_buy_intra = ''; } else { $object->accountancy_code_buy_intra = $accountancy_code_buy_intra; } if ($accountancy_code_buy_export <= 0) { $object->accountancy_code_buy_export = ''; } else { $object->accountancy_code_buy_export = $accountancy_code_buy_export; } - // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost(null, $object); + // Fill array 'array_options' with data from add form + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; - if (!$error && $object->check()) - { - if ($object->update($object->id, $user) > 0) - { + if (!$error && $object->check()) + { + if ($object->update($object->id, $user) > 0) + { // Category association $categories = GETPOST('categories', 'array'); $object->setCategories($categories); - $action = 'view'; - } - else - { + $action = 'view'; + } else { if (count($object->errors)) setEventMessages($object->error, $object->errors, 'errors'); - else setEventMessages($langs->trans($object->error), null, 'errors'); - $action = 'edit'; - } - } - else - { + else setEventMessages($langs->trans($object->error), null, 'errors'); + $action = 'edit'; + } + } else { if (count($object->errors)) setEventMessages($object->error, $object->errors, 'errors'); - else setEventMessages($langs->trans("ErrorProductBadRefOrLabel"), null, 'errors'); - $action = 'edit'; - } - } - } - } + else setEventMessages($langs->trans("ErrorProductBadRefOrLabel"), null, 'errors'); + $action = 'edit'; + } + } + } + } - // Action clone object - if ($action == 'confirm_clone' && $confirm != 'yes') { $action = ''; } - if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) - { - if (!GETPOST('clone_content') && !GETPOST('clone_prices')) - { - setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); - } - else - { - $db->begin(); + // Action clone object + if ($action == 'confirm_clone' && $confirm != 'yes') { $action = ''; } + if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) + { + if (!GETPOST('clone_content') && !GETPOST('clone_prices')) + { + setEventMessages($langs->trans("NoCloneOptionsSpecified"), null, 'errors'); + } else { + $db->begin(); - $originalId = $id; - if ($object->id > 0) - { - $object->ref = GETPOST('clone_ref', 'alphanohtml'); - $object->status = 0; - $object->status_buy = 0; - $object->id = null; - $object->barcode = -1; + $originalId = $id; + if ($object->id > 0) + { + $object->ref = GETPOST('clone_ref', 'alphanohtml'); + $object->status = 0; + $object->status_buy = 0; + $object->id = null; + $object->barcode = -1; - if ($object->check()) - { - $object->context['createfromclone'] = 'createfromclone'; - $id = $object->create($user); - if ($id > 0) - { - if (GETPOST('clone_composition')) - { - $result = $object->clone_associations($originalId, $id); + if ($object->check()) + { + $object->context['createfromclone'] = 'createfromclone'; + $id = $object->create($user); + if ($id > 0) + { + if (GETPOST('clone_composition')) + { + $result = $object->clone_associations($originalId, $id); - if ($result < 1) - { - $db->rollback(); - setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId); - exit; - } - } + if ($result < 1) + { + $db->rollback(); + setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId); + exit; + } + } - if (GETPOST('clone_categories')) - { - $result = $object->cloneCategories($originalId, $id); + if (GETPOST('clone_categories')) + { + $result = $object->cloneCategories($originalId, $id); - if ($result < 1) - { - $db->rollback(); - setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId); - exit; - } - } + if ($result < 1) + { + $db->rollback(); + setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$originalId); + exit; + } + } - if (GETPOST('clone_prices')) { - $result = $object->clone_price($originalId, $id); + if (GETPOST('clone_prices')) { + $result = $object->clone_price($originalId, $id); - if ($result < 1) { - $db->rollback(); - setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); - header('Location: '.$_SERVER['PHP_SELF'].'?id='.$originalId); - exit(); - } - } + if ($result < 1) { + $db->rollback(); + setEventMessages($langs->trans('ErrorProductClone'), null, 'errors'); + header('Location: '.$_SERVER['PHP_SELF'].'?id='.$originalId); + exit(); + } + } - // $object->clone_fournisseurs($originalId, $id); + // $object->clone_fournisseurs($originalId, $id); - $db->commit(); - $db->close(); + $db->commit(); + $db->close(); - header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); - exit; - } - else - { - $id = $originalId; + header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id); + exit; + } else { + $id = $originalId; - if ($object->error == 'ErrorProductAlreadyExists') - { - $db->rollback(); + if ($object->error == 'ErrorProductAlreadyExists') + { + $db->rollback(); - $refalreadyexists++; - $action = ""; + $refalreadyexists++; + $action = ""; - $mesg = $langs->trans("ErrorProductAlreadyExists", $object->ref); - $mesg .= ' '.$langs->trans("ShowCardHere").'.'; - setEventMessages($mesg, null, 'errors'); - $object->fetch($id); - } - else - { - $db->rollback(); - if (count($object->errors)) - { - setEventMessages($object->error, $object->errors, 'errors'); - dol_print_error($db, $object->errors); - } - else - { - setEventMessages($langs->trans($object->error), null, 'errors'); - dol_print_error($db, $object->error); - } - } - } + $mesg = $langs->trans("ErrorProductAlreadyExists", $object->ref); + $mesg .= ' '.$langs->trans("ShowCardHere").'.'; + setEventMessages($mesg, null, 'errors'); + $object->fetch($id); + } else { + $db->rollback(); + if (count($object->errors)) + { + setEventMessages($object->error, $object->errors, 'errors'); + dol_print_error($db, $object->errors); + } else { + setEventMessages($langs->trans($object->error), null, 'errors'); + dol_print_error($db, $object->error); + } + } + } - unset($object->context['createfromclone']); - } - } - else - { - $db->rollback(); - dol_print_error($db, $object->error); - } - } - } + unset($object->context['createfromclone']); + } + } else { + $db->rollback(); + dol_print_error($db, $object->error); + } + } + } - // Delete a product - if ($action == 'confirm_delete' && $confirm != 'yes') { $action = ''; } - if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) + // Delete a product + if ($action == 'confirm_delete' && $confirm != 'yes') { $action = ''; } + if ($action == 'confirm_delete' && $confirm == 'yes' && $usercandelete) { $result = $object->delete($user); - if ($result > 0) - { - header('Location: '.DOL_URL_ROOT.'/product/list.php?type='.$object->type.'&delprod='.urlencode($object->ref)); - exit; - } - else - { - setEventMessages($langs->trans($object->error), null, 'errors'); - $reload = 0; - $action = ''; - } - } + if ($result > 0) + { + header('Location: '.DOL_URL_ROOT.'/product/list.php?type='.$object->type.'&delprod='.urlencode($object->ref)); + exit; + } else { + setEventMessages($langs->trans($object->error), null, 'errors'); + $reload = 0; + $action = ''; + } + } - // Add product into object - if ($object->id > 0 && $action == 'addin') - { - $thirpdartyid = 0; - if (GETPOST('propalid') > 0) - { - $propal = new Propal($db); - $result = $propal->fetch(GETPOST('propalid')); - if ($result <= 0) - { - dol_print_error($db, $propal->error); - exit; - } - $thirpdartyid = $propal->socid; - } - elseif (GETPOST('commandeid') > 0) - { - $commande = new Commande($db); - $result = $commande->fetch(GETPOST('commandeid')); - if ($result <= 0) - { - dol_print_error($db, $commande->error); - exit; - } - $thirpdartyid = $commande->socid; - } - elseif (GETPOST('factureid') > 0) - { - $facture = new Facture($db); - $result = $facture->fetch(GETPOST('factureid')); - if ($result <= 0) - { - dol_print_error($db, $facture->error); - exit; - } - $thirpdartyid = $facture->socid; - } + // Add product into object + if ($object->id > 0 && $action == 'addin') + { + $thirpdartyid = 0; + if (GETPOST('propalid') > 0) + { + $propal = new Propal($db); + $result = $propal->fetch(GETPOST('propalid')); + if ($result <= 0) + { + dol_print_error($db, $propal->error); + exit; + } + $thirpdartyid = $propal->socid; + } elseif (GETPOST('commandeid') > 0) + { + $commande = new Commande($db); + $result = $commande->fetch(GETPOST('commandeid')); + if ($result <= 0) + { + dol_print_error($db, $commande->error); + exit; + } + $thirpdartyid = $commande->socid; + } elseif (GETPOST('factureid') > 0) + { + $facture = new Facture($db); + $result = $facture->fetch(GETPOST('factureid')); + if ($result <= 0) + { + dol_print_error($db, $facture->error); + exit; + } + $thirpdartyid = $facture->socid; + } - if ($thirpdartyid > 0) { - $soc = new Societe($db); - $result = $soc->fetch($thirpdartyid); - if ($result <= 0) { - dol_print_error($db, $soc->error); - exit; - } + if ($thirpdartyid > 0) { + $soc = new Societe($db); + $result = $soc->fetch($thirpdartyid); + if ($result <= 0) { + dol_print_error($db, $soc->error); + exit; + } - $desc = $object->description; + $desc = $object->description; - $tva_tx = get_default_tva($mysoc, $soc, $object->id); - $tva_npr = get_default_npr($mysoc, $soc, $object->id); - if (empty($tva_tx)) $tva_npr = 0; - $localtax1_tx = get_localtax($tva_tx, 1, $soc, $mysoc, $tva_npr); - $localtax2_tx = get_localtax($tva_tx, 2, $soc, $mysoc, $tva_npr); + $tva_tx = get_default_tva($mysoc, $soc, $object->id); + $tva_npr = get_default_npr($mysoc, $soc, $object->id); + if (empty($tva_tx)) $tva_npr = 0; + $localtax1_tx = get_localtax($tva_tx, 1, $soc, $mysoc, $tva_npr); + $localtax2_tx = get_localtax($tva_tx, 2, $soc, $mysoc, $tva_npr); - $pu_ht = $object->price; - $pu_ttc = $object->price_ttc; - $price_base_type = $object->price_base_type; + $pu_ht = $object->price; + $pu_ttc = $object->price_ttc; + $price_base_type = $object->price_base_type; - // If multiprice - if ($conf->global->PRODUIT_MULTIPRICES && $soc->price_level) { - $pu_ht = $object->multiprices[$soc->price_level]; - $pu_ttc = $object->multiprices_ttc[$soc->price_level]; - $price_base_type = $object->multiprices_base_type[$soc->price_level]; - } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { - require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; + // If multiprice + if ($conf->global->PRODUIT_MULTIPRICES && $soc->price_level) { + $pu_ht = $object->multiprices[$soc->price_level]; + $pu_ttc = $object->multiprices_ttc[$soc->price_level]; + $price_base_type = $object->multiprices_base_type[$soc->price_level]; + } elseif (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) { + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; - $prodcustprice = new Productcustomerprice($db); + $prodcustprice = new Productcustomerprice($db); - $filter = array('t.fk_product' => $object->id, 't.fk_soc' => $soc->id); + $filter = array('t.fk_product' => $object->id, 't.fk_soc' => $soc->id); - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); - if ($result) { - if (count($prodcustprice->lines) > 0) { - $pu_ht = price($prodcustprice->lines [0]->price); - $pu_ttc = price($prodcustprice->lines [0]->price_ttc); - $price_base_type = $prodcustprice->lines [0]->price_base_type; - $tva_tx = $prodcustprice->lines [0]->tva_tx; - } - } - } + $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + if ($result) { + if (count($prodcustprice->lines) > 0) { + $pu_ht = price($prodcustprice->lines [0]->price); + $pu_ttc = price($prodcustprice->lines [0]->price_ttc); + $price_base_type = $prodcustprice->lines [0]->price_base_type; + $tva_tx = $prodcustprice->lines [0]->tva_tx; + } + } + } $tmpvat = price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx)); $tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx)); - // On reevalue prix selon taux tva car taux tva transaction peut etre different - // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). - if ($tmpvat != $tmpprodvat) { - if ($price_base_type != 'HT') { - $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); - } else { - $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); - } - } + // On reevalue prix selon taux tva car taux tva transaction peut etre different + // de ceux du produit par defaut (par exemple si pays different entre vendeur et acheteur). + if ($tmpvat != $tmpprodvat) { + if ($price_base_type != 'HT') { + $pu_ht = price2num($pu_ttc / (1 + ($tmpvat / 100)), 'MU'); + } else { + $pu_ttc = price2num($pu_ht * (1 + ($tmpvat / 100)), 'MU'); + } + } - if (GETPOST('propalid') > 0) { - // Define cost price for margin calculation - $buyprice = 0; - if (($result = $propal->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) - { - dol_syslog($langs->trans('FailedToGetCostPrice')); - setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); - } - else - { - $buyprice = $result; - } + if (GETPOST('propalid') > 0) { + // Define cost price for margin calculation + $buyprice = 0; + if (($result = $propal->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) + { + dol_syslog($langs->trans('FailedToGetCostPrice')); + setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); + } else { + $buyprice = $result; + } - $result = $propal->addline( - $desc, - $pu_ht, - GETPOST('qty'), - $tva_tx, - $localtax1_tx, // localtax1 - $localtax2_tx, // localtax2 - $object->id, - GETPOST('remise_percent'), - $price_base_type, - $pu_ttc, - 0, - 0, - -1, - 0, - 0, - 0, - $buyprice, - '', - '', - '', - 0, - $object->fk_unit - ); - if ($result > 0) { - header("Location: ".DOL_URL_ROOT."/comm/propal/card.php?id=".$propal->id); - return; - } + $result = $propal->addline( + $desc, + $pu_ht, + GETPOST('qty'), + $tva_tx, + $localtax1_tx, // localtax1 + $localtax2_tx, // localtax2 + $object->id, + GETPOST('remise_percent'), + $price_base_type, + $pu_ttc, + 0, + 0, + -1, + 0, + 0, + 0, + $buyprice, + '', + '', + '', + 0, + $object->fk_unit + ); + if ($result > 0) { + header("Location: ".DOL_URL_ROOT."/comm/propal/card.php?id=".$propal->id); + return; + } - setEventMessages($langs->trans("ErrorUnknown").": $result", null, 'errors'); - } elseif (GETPOST('commandeid') > 0) { - // Define cost price for margin calculation - $buyprice = 0; - if (($result = $commande->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) - { - dol_syslog($langs->trans('FailedToGetCostPrice')); - setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); - } - else - { - $buyprice = $result; - } + setEventMessages($langs->trans("ErrorUnknown").": $result", null, 'errors'); + } elseif (GETPOST('commandeid') > 0) { + // Define cost price for margin calculation + $buyprice = 0; + if (($result = $commande->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) + { + dol_syslog($langs->trans('FailedToGetCostPrice')); + setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); + } else { + $buyprice = $result; + } - $result = $commande->addline( - $desc, - $pu_ht, - GETPOST('qty'), - $tva_tx, - $localtax1_tx, // localtax1 - $localtax2_tx, // localtax2 - $object->id, - GETPOST('remise_percent'), - '', - '', - $price_base_type, - $pu_ttc, - '', - '', - 0, - -1, - 0, - 0, - null, - $buyprice, - '', - 0, - $object->fk_unit - ); + $result = $commande->addline( + $desc, + $pu_ht, + GETPOST('qty'), + $tva_tx, + $localtax1_tx, // localtax1 + $localtax2_tx, // localtax2 + $object->id, + GETPOST('remise_percent'), + '', + '', + $price_base_type, + $pu_ttc, + '', + '', + 0, + -1, + 0, + 0, + null, + $buyprice, + '', + 0, + $object->fk_unit + ); - if ($result > 0) { - header("Location: ".DOL_URL_ROOT."/commande/card.php?id=".$commande->id); - exit; - } - } elseif (GETPOST('factureid') > 0) { - // Define cost price for margin calculation - $buyprice = 0; - if (($result = $facture->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) - { - dol_syslog($langs->trans('FailedToGetCostPrice')); - setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); - } - else - { - $buyprice = $result; - } + if ($result > 0) { + header("Location: ".DOL_URL_ROOT."/commande/card.php?id=".$commande->id); + exit; + } + } elseif (GETPOST('factureid') > 0) { + // Define cost price for margin calculation + $buyprice = 0; + if (($result = $facture->defineBuyPrice($pu_ht, GETPOST('remise_percent'), $object->id)) < 0) + { + dol_syslog($langs->trans('FailedToGetCostPrice')); + setEventMessages($langs->trans('FailedToGetCostPrice'), null, 'errors'); + } else { + $buyprice = $result; + } - $result = $facture->addline( - $desc, - $pu_ht, - GETPOST('qty'), - $tva_tx, - $localtax1_tx, - $localtax2_tx, - $object->id, - GETPOST('remise_percent'), - '', - '', - '', - '', - '', - $price_base_type, - $pu_ttc, - Facture::TYPE_STANDARD, - -1, - 0, - '', - 0, - 0, - null, - $buyprice, - '', - 0, - 100, - '', - $object->fk_unit - ); + $result = $facture->addline( + $desc, + $pu_ht, + GETPOST('qty'), + $tva_tx, + $localtax1_tx, + $localtax2_tx, + $object->id, + GETPOST('remise_percent'), + '', + '', + '', + '', + '', + $price_base_type, + $pu_ttc, + Facture::TYPE_STANDARD, + -1, + 0, + '', + 0, + 0, + null, + $buyprice, + '', + 0, + 100, + '', + $object->fk_unit + ); - if ($result > 0) { - header("Location: ".DOL_URL_ROOT."/compta/facture/card.php?facid=".$facture->id); - exit; - } - } - } - else { - $action = ""; - setEventMessages($langs->trans("WarningSelectOneDocument"), null, 'warnings'); - } - } + if ($result > 0) { + header("Location: ".DOL_URL_ROOT."/compta/facture/card.php?facid=".$facture->id); + exit; + } + } + } else { + $action = ""; + setEventMessages($langs->trans("WarningSelectOneDocument"), null, 'warnings'); + } + } } @@ -911,6 +879,7 @@ llxHeader('', $title, $helpurl); $form = new Form($db); $formfile = new FormFile($db); $formproduct = new FormProduct($db); +$formcompany = new FormCompany($db); if (!empty($conf->accounting->enabled)) $formaccounting = new FormAccounting($db); // Load object modBarCodeProduct @@ -944,35 +913,42 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) } $objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates $objcanvas->display_canvas($action); // Show template -} -else -{ - // ----------------------------------------- - // When used in standard mode - // ----------------------------------------- +} else { + // ----------------------------------------- + // When used in standard mode + // ----------------------------------------- if ($action == 'create' && $usercancreate) - { - //WYSIWYG Editor - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + { + //WYSIWYG Editor + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + + print ''."\n"; // Load object modCodeProduct - $module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard'); - if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') - { - $module = substr($module, 0, dol_strlen($module) - 4); - } - $result = dol_include_once('/core/modules/product/'.$module.'.php'); - if ($result > 0) - { - $modCodeProduct = new $module(); - } + $module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard'); + if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') + { + $module = substr($module, 0, dol_strlen($module) - 4); + } + $result = dol_include_once('/core/modules/product/'.$module.'.php'); + if ($result > 0) + { + $modCodeProduct = new $module(); + } - dol_set_focus('input[name="ref"]'); + dol_set_focus('input[name="ref"]'); - print ''; - print ''; - print ''; - print ''."\n"; + print ''; + print ''; + print ''; + print ''."\n"; if (!empty($modCodeProduct->code_auto)) print ''; if (!empty($modBarCodeProduct->code_auto)) @@ -982,44 +958,52 @@ else if ($type == 1) { $picto = 'service'; $title = $langs->trans("NewService"); - } - else { + } else { $picto = 'product'; $title = $langs->trans("NewProduct"); } - $linkback = ""; - print load_fiche_titre($title, $linkback, $picto); + $linkback = ""; + print load_fiche_titre($title, $linkback, $picto); - dol_fiche_head(''); + // We set country_id, country_code and country for the selected country + $object->country_id = GETPOSTISSET('country_id') ? GETPOST('country_id', 'int') : null; + if ($object->country_id > 0) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } - print ''; + dol_fiche_head(''); - print ''; - $tmpcode = ''; + print '
    '; + + print ''; + $tmpcode = ''; if (!empty($modCodeProduct->code_auto)) $tmpcode = $modCodeProduct->getNextValue($object, $type); print ''; + if ($refalreadyexists) + { + print $langs->trans("RefAlreadyExists"); + } + print ''; - // Label - print ''; + // Label + print ''; - // On sell - print ''; + // On sell + print ''; - // To buy - print ''; + // To buy + print ''; - // Batch number management + // Batch number management if (!empty($conf->productbatch->enabled)) { print ''; } - $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; + $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; - if ($showbarcode) - { - print ''; - if ($conf->browser->layout == 'phone') print ''; - print ''; - } + if ($showbarcode) + { + print ''; + if ($conf->browser->layout == 'phone') print ''; + print ''; + } - // Description (used in invoice, propal...) - print '"; + print ""; - // Public URL - print ''; + print ''; - if ($type != 1 && !empty($conf->stock->enabled)) - { - // Default warehouse - print ''; - print ''; + if ($type != 1 && !empty($conf->stock->enabled)) + { + // Default warehouse + print ''; + print ''; - // Stock min level - print ''; - if ($conf->browser->layout == 'phone') print ''; - // Stock desired level - print ''; - } - else - { - print ''; - print ''; - } + // Stock min level + print ''; + if ($conf->browser->layout == 'phone') print ''; + // Stock desired level + print ''; + } else { + print ''; + print ''; + } - // Duration - if ($type == 1) - { - print ''; - } + // Duration + if ($type == 1) + { + print ''; + } - if ($type != 1) // Nature, Weight and volume only applies to products and not to services - { - // Nature - print ''; + if ($type != 1) // Nature, Weight and volume only applies to products and not to services + { + // Nature + print ''; - // Brut Weight - print ''; + // Brut Weight + print ''; - // Brut Length - if (empty($conf->global->PRODUCT_DISABLE_SIZE)) - { - print ''; - } - if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) - { - // Brut Surface - print ''; - } - if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) - { - // Brut Volume - print ''; - } + // Brut Length + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) + { + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) + { + // Brut Surface + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) + { + // Brut Volume + print ''; + } - if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) - { - // Net Measure - print ''; - } - } + if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) + { + // Net Measure + print ''; + } + } - // Units - if ($conf->global->PRODUCT_USE_UNITS) - { - print ''; - print ''; - } + // Units + if ($conf->global->PRODUCT_USE_UNITS) + { + print ''; + print ''; + } - // Custom code - if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) - { - print ''; - if ($conf->browser->layout == 'phone') print ''; - // Origin country - print ''; - print ''; - } + // Custom code + if (empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO) && empty($type)) + { + print ''; - // Other attributes - $parameters = array('colspan' => 3, 'cols' => '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', $parameters); - } + // Origin country + print ''; + print ''; - // Note (private, no output on invoices, propales...) - //if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) available in create mode - //{ - print ''; + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) + { + print ''; + } + print ''; + } - print ""; - //} + // Other attributes + $parameters = array('colspan' => 3, 'cols' => '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', $parameters); + } + + // Note (private, no output on invoices, propales...) + //if (! empty($conf->global->MAIN_DISABLE_NOTES_TAB)) available in create mode + //{ + print '"; + //} if ($conf->categorie->enabled) { // Categories @@ -1205,64 +1202,62 @@ else print ""; } - print '
    '.$langs->trans("Ref").''; - if ($refalreadyexists) - { - print $langs->trans("RefAlreadyExists"); - } - print '
    '.$langs->trans("Label").'
    '.$langs->trans("Label").'
    '.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); - print $form->selectarray('statut', $statutarray, GETPOST('statut')); - print '
    '.$langs->trans("Status").' ('.$langs->trans("Sell").')'; + $statutarray = array('1' => $langs->trans("OnSell"), '0' => $langs->trans("NotOnSell")); + print $form->selectarray('statut', $statutarray, GETPOST('statut')); + print '
    '.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - $statutarray = array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy")); - print $form->selectarray('statut_buy', $statutarray, GETPOST('statut_buy')); - print '
    '.$langs->trans("Status").' ('.$langs->trans("Buy").')'; + $statutarray = array('1' => $langs->trans("ProductStatusOnBuy"), '0' => $langs->trans("ProductStatusNotOnBuy")); + print $form->selectarray('statut_buy', $statutarray, GETPOST('statut_buy')); + print '
    '.$langs->trans("ManageLotSerial").''; @@ -1028,174 +1012,187 @@ else print '
    '.$langs->trans('BarcodeType').''; - if (isset($_POST['fk_barcode_type'])) - { - $fk_barcode_type = GETPOST('fk_barcode_type'); - } - else - { - if (empty($fk_barcode_type) && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; - } - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; - $formbarcode = new FormBarCode($db); - print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1); - print '
    '.$langs->trans("BarcodeValue").''; - $tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode; - if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); - print ''; - print '
    '.$langs->trans('BarcodeType').''; + if (isset($_POST['fk_barcode_type'])) + { + $fk_barcode_type = GETPOST('fk_barcode_type'); + } else { + if (empty($fk_barcode_type) && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; + } + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; + $formbarcode = new FormBarCode($db); + print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1); + print '
    '.$langs->trans("BarcodeValue").''; + $tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode; + if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); + print ''; + print '
    '.$langs->trans("Description").''; + // Description (used in invoice, propal...) + print '
    '.$langs->trans("Description").''; - $doleditor = new DolEditor('desc', GETPOST('desc', 'none'), '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); - $doleditor->Create(); + $doleditor = new DolEditor('desc', GETPOST('desc', 'restricthtml'), '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); + $doleditor->Create(); - print "
    '.$langs->trans("PublicUrl").''; + // Public URL + print '
    '.$langs->trans("PublicUrl").''; print ''; - print '
    '.$langs->trans("DefaultWarehouse").''; - print $formproduct->selectWarehouses(GETPOST('fk_default_warehouse'), 'fk_default_warehouse', 'warehouseopen', 1); - print ' '; - print ''; - print ''; - print '
    '.$langs->trans("DefaultWarehouse").''; + print $formproduct->selectWarehouses(GETPOST('fk_default_warehouse'), 'fk_default_warehouse', 'warehouseopen', 1); + print ' '; + print ''; + print ''; + print '
    '.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).''; - print ''; - print '
    '.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).''; - print ''; - print '
    '.$form->textwithpicto($langs->trans("StockLimit"), $langs->trans("StockLimitDesc"), 1).''; + print ''; + print '
    '.$form->textwithpicto($langs->trans("DesiredStock"), $langs->trans("DesiredStockDesc"), 1).''; + print ''; + print '
    '.$langs->trans("Duration").''; - print ''; - print $formproduct->selectMeasuringUnits("duration_unit", "time", GETPOST('duration_value', 'alpha'), 0, 1); - print '
    '.$langs->trans("Duration").''; + print ''; + print $formproduct->selectMeasuringUnits("duration_unit", "time", GETPOST('duration_value', 'alpha'), 0, 1); + print '
    '.$langs->trans("Nature").''; - $statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); - print $form->selectarray('finished', $statutarray, GETPOST('finished', 'alpha'), 1); - print '
    '.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; + $statutarray = array('1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); + print $form->selectarray('finished', $statutarray, GETPOST('finished', 'alpha'), 1); + print '
    '.$langs->trans("Weight").''; - print ''; - print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units') ?GETPOST('weight_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 2); - print '
    '.$langs->trans("Weight").''; + print ''; + print $formproduct->selectMeasuringUnits("weight_units", "weight", GETPOSTISSET('weight_units') ?GETPOST('weight_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 2); + print '
    '.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; - print ' x '; - print ' x '; - print ''; - print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ?GETPOST('size_units', 'alpha') : '0', 0, 2); - print '
    '.$langs->trans("Surface").''; - print ''; - print $formproduct->selectMeasuringUnits("surface_units", "surface", GETPOSTISSET('surface_units') ?GETPOST('surface_units', 'alpha') : '0', 0, 2); - print '
    '.$langs->trans("Volume").''; - print ''; - print $formproduct->selectMeasuringUnits("volume_units", "volume", GETPOSTISSET('volume_units') ?GETPOST('volume_units', 'alpha') : '0', 0, 2); - print '
    '.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; + print ' x '; + print ' x '; + print ''; + print $formproduct->selectMeasuringUnits("size_units", "size", GETPOSTISSET('size_units') ?GETPOST('size_units', 'alpha') : '0', 0, 2); + print '
    '.$langs->trans("Surface").''; + print ''; + print $formproduct->selectMeasuringUnits("surface_units", "surface", GETPOSTISSET('surface_units') ?GETPOST('surface_units', 'alpha') : '0', 0, 2); + print '
    '.$langs->trans("Volume").''; + print ''; + print $formproduct->selectMeasuringUnits("volume_units", "volume", GETPOSTISSET('volume_units') ?GETPOST('volume_units', 'alpha') : '0', 0, 2); + print '
    '.$langs->trans("NetMeasure").''; - print ''; - print $formproduct->selectMeasuringUnits("net_measure_units", '', GETPOSTISSET('net_measure_units') ?GETPOST('net_measure_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 0); - print '
    '.$langs->trans("NetMeasure").''; + print ''; + print $formproduct->selectMeasuringUnits("net_measure_units", '', GETPOSTISSET('net_measure_units') ?GETPOST('net_measure_units', 'alpha') : (empty($conf->global->MAIN_WEIGHT_DEFAULT_UNIT) ? 0 : $conf->global->MAIN_WEIGHT_DEFAULT_UNIT), 0, 0); + print '
    '.$langs->trans('DefaultUnitToShow').''; - print $form->selectUnits('', 'units'); - print '
    '.$langs->trans('DefaultUnitToShow').''; + print $form->selectUnits(empty($line->fk_unit) ? $conf->global->PRODUCT_USE_UNITS : $line->fk_unit, 'units'); + print '
    '.$langs->trans("CustomCode").'
    '.$langs->trans("CountryOrigin").''; - print $form->select_country(GETPOST('country_id', 'int'), 'country_id'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
    '.$langs->trans("CustomCode").'
    '.$langs->trans("CountryOrigin").''; + print img_picto('', 'globe-americas', 'class="paddingrightonly"'); + print $form->select_country((GETPOSTISSET('country_id') ? GETPOST('country_id') : $object->country_id), 'country_id', '', 0, 'minwidth300 widthcentpercentminusx'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print '
    '.$langs->trans("NoteNotVisibleOnBill").''; + // State + if (empty($conf->global->PRODUCT_DISABLE_STATE)) + { + if ($conf->browser->layout == 'phone') print '
    '.$form->editfieldkey('Region-StateOrigine', 'state_id', '', $object, 0).''; + } else { + print ''.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).''; + } - // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('note_private', GETPOST('note_private', 'none'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_8, '90%'); - $doleditor->Create(); + print $formcompany->select_state($object->state_id, $object->country_code); + print '
    '.$langs->trans("NoteNotVisibleOnBill").''; + + // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. + $doleditor = new DolEditor('note_private', GETPOST('note_private', 'restricthtml'), '', 140, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_8, '90%'); + $doleditor->Create(); + + print "
    '; + print ''; - print '
    '; + print '
    '; - if (!empty($conf->global->PRODUIT_MULTIPRICES)) - { - // We do no show price array on create when multiprices enabled. - // We must set them on prices tab. - print ''; - // VAT - print ''; - print '
    '.$langs->trans("VATRate").''; - $defaultva = get_default_tva($mysoc, $mysoc); - print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); - print '
    '; - - print '
    '; - } - else + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { - print ''; + // We do no show price array on create when multiprices enabled. + // We must set them on prices tab. + print '
    '; + // VAT + print ''; + print '
    '.$langs->trans("VATRate").''; + $defaultva = get_default_tva($mysoc, $mysoc); + print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); + print '
    '; - // Price - print ''.$langs->trans("SellingPrice").''; - print ''; - print $form->selectPriceBaseType($object->price_base_type, "price_base_type"); - print ''; + print '
    '; + } else { + print ''; - // Min price - print ''; - print ''; + // Price + print ''; + print ''; - // VAT - print ''; + // Min price + print ''; + print ''; - print '
    '.$langs->trans("MinPrice").''; - print '
    '.$langs->trans("SellingPrice").''; + print $form->selectPriceBaseType($conf->global->PRODUCT_PRICE_BASE_TYPE, "price_base_type"); + print '
    '.$langs->trans("VATRate").''; - $defaultva = get_default_tva($mysoc, $mysoc); - print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); - print '
    '.$langs->trans("MinPrice").''; + print '
    '; + // VAT + print ''.$langs->trans("VATRate").''; + $defaultva = get_default_tva($mysoc, $mysoc); + print $form->load_tva("tva_tx", $defaultva, $mysoc, $mysoc, 0, 0, '', false, 1); + print ''; - print '
    '; - } + print ''; - // Accountancy codes - print ''; + print '
    '; + } + + // Accountancy codes + print '
    '; if (!empty($conf->accounting->enabled)) { // Accountancy_code_sell print ''; print ''; // Accountancy_code_sell_intra @@ -1270,36 +1265,36 @@ else { print ''; print ''; + if ($type == 0) { + $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT); + } else { + $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, ''); + print ''; } // Accountancy_code_sell_export print ''; print ''; + if ($type == 0) + { + $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT); + } else { + $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, ''); + print ''; // Accountancy_code_buy print ''; print ''; @@ -1328,8 +1323,7 @@ else } print $formaccounting->select_account($accountancy_code_buy_export, 'accountancy_code_buy_export', 1, null, 1, 1, ''); print ''; - } - else // For external software + } else // For external software { if (!empty($accountancy_code_sell)) { $object->accountancy_code_sell = $accountancy_code_sell; } if (!empty($accountancy_code_sell_intra)) { $object->accountancy_code_sell_intra = $accountancy_code_sell_intra; } @@ -1385,75 +1379,87 @@ else print ''; print ''; - } - - /* - * Product card - */ - - elseif ($object->id > 0) - { - // Fiche en mode edition + } elseif ($object->id > 0) { + /* + * Product card + */ + // Fiche en mode edition if ($action == 'edit' && $usercancreate) { - //WYSIWYG Editor - require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + //WYSIWYG Editor + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; - $type = $langs->trans('Product'); - if ($object->isService()) $type = $langs->trans('Service'); - //print load_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), ""); + print ''."\n"; - // Main official, simple, and not duplicated code - print ''."\n"; - print ''; - print ''; - print ''; - print ''; + // We set country_id, country_code and country for the selected country + $object->country_id = GETPOST('country_id') ? GETPOST('country_id') : $object->country_id; + if ($object->country_id) + { + $tmparray = getCountry($object->country_id, 'all'); + $object->country_code = $tmparray['code']; + $object->country = $tmparray['label']; + } - $head = product_prepare_head($object); - $titre = $langs->trans("CardProduct".$object->type); - $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); - dol_fiche_head($head, 'card', $titre, 0, $picto); - print '
    '.$langs->trans("ProductAccountancySellCode").''; - if ($type == 0) { - $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT); - } else { - $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, ''); + if ($type == 0) { + $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_ACCOUNT); + } else { + $accountancy_code_sell = (GETPOSTISSET('accountancy_code_sell') ? GETPOST('accountancy_code_sell', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_ACCOUNT); + } + print $formaccounting->select_account($accountancy_code_sell, 'accountancy_code_sell', 1, null, 1, 1, ''); print '
    '.$langs->trans("ProductAccountancySellIntraCode").''; - if ($type == 0) { - $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_INTRA_ACCOUNT); - } else { - $accountancy_code_sell_intra = (GETPOSTISSET('accountancy_code_sell_intra') ? GETPOST('accountancy_code_sell_intra', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_INTRA_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_sell_intra, 'accountancy_code_sell_intra', 1, null, 1, 1, ''); - print '
    '.$langs->trans("ProductAccountancySellExportCode").''; - if ($type == 0) - { - $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_PRODUCT_SOLD_EXPORT_ACCOUNT); - } else { - $accountancy_code_sell_export = (GETPOST('accountancy_code_sell_export') ? GETPOST('accountancy_code_sell_export', 'alpha') : $conf->global->ACCOUNTING_SERVICE_SOLD_EXPORT_ACCOUNT); - } - print $formaccounting->select_account($accountancy_code_sell_export, 'accountancy_code_sell_export', 1, null, 1, 1, ''); - print '
    '.$langs->trans("ProductAccountancyBuyCode").''; - if ($type == 0) - { - $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT); - } else { - $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); - } + if ($type == 0) + { + $accountancy_code_buy = (GETPOST('accountancy_code_buy', 'alpha') ? (GETPOST('accountancy_code_buy', 'alpha')) : $conf->global->ACCOUNTING_PRODUCT_BUY_ACCOUNT); + } else { + $accountancy_code_buy = GETPOST('accountancy_code_buy', 'alpha'); + } print $formaccounting->select_account($accountancy_code_buy, 'accountancy_code_buy', 1, null, 1, 1, ''); print '
    '; + $type = $langs->trans('Product'); + if ($object->isService()) $type = $langs->trans('Service'); + //print load_fiche_titre($langs->trans('Modify').' '.$type.' : '.(is_object($object->oldcopy)?$object->oldcopy->ref:$object->ref), ""); - // Ref - print ''; + // Main official, simple, and not duplicated code + print ''."\n"; + print ''; + print ''; + print ''; + print ''; - // Label - print ''; + $head = product_prepare_head($object); + $titre = $langs->trans("CardProduct".$object->type); + $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); + dol_fiche_head($head, 'card', $titre, 0, $picto); - // Status To sell - print ''; - // Status To Buy - print ''; + print '
    '.$langs->trans("Ref").'
    '.$langs->trans("Label").'
    '.$langs->trans("Status").' ('.$langs->trans("Sell").')'; - print ''; - print '
    '.$langs->trans("Status").' ('.$langs->trans("Buy").')'; - print ''; - print '
    '; + + // Ref + print ''; + + // Label + print ''; + + // Status To sell + print ''; + + // Status To Buy + print ''; // Batch number managment if ($conf->productbatch->enabled) @@ -1467,56 +1473,54 @@ else } } - // Barcode - $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; + // Barcode + $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; - if ($showbarcode) - { - print ''; - } + if ($showbarcode) + { + print ''; + } - // Description (used in invoice, propal...) - print '"; - print "\n"; + print ""; + print "\n"; - // Public Url - print ''; + // Public Url + print ''; - // Stock - if ($object->isProduct() && !empty($conf->stock->enabled)) - { - // Default warehouse - print ''; - /* + // Stock + if ($object->isProduct() && !empty($conf->stock->enabled)) + { + // Default warehouse + print ''; + /* print "".''; @@ -1525,38 +1529,36 @@ else print ''; print ''; */ - } - /* + } + /* else { print ''; print ''; }*/ - if ($object->isService()) - { - // Duration - print ''; - } - else - { - // Nature - print ''; + if ($object->isService()) + { + // Duration + print ''; + } else { + // Nature + print ''; - // Brut Weight - print ''; + // Brut Weight + print ''; - if (empty($conf->global->PRODUCT_DISABLE_SIZE)) - { + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) + { // Brut Length print ''; - } - if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) - { - // Brut Surface - print ''; - } - if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) - { - // Brut Volume - print ''; - } + } + if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) + { + // Brut Surface + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) + { + // Brut Volume + print ''; + } - if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) - { - // Net Measure - print ''; - } - } - // Units - if ($conf->global->PRODUCT_USE_UNITS) - { - print ''; - print ''; - } + if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) + { + // Net Measure + print ''; + } + } + // Units + if ($conf->global->PRODUCT_USE_UNITS) + { + print ''; + print ''; + } - // Custom code - if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) - { - print ''; - // Origin country - print ''; - } + // Custom code + if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) + { + print ''; + // Origin country + print ''; + print ''; + // State + if (empty($conf->global->PRODUCT_DISABLE_STATE)) + { + if ($conf->browser->layout == 'phone') print ''; + if (!empty($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT) && ($conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 1 || $conf->global->MAIN_SHOW_REGION_IN_STATE_SELECT == 2)) + { + print ''; + } + print ''; + } + + // Other attributes + $parameters = array('colspan' => ' colspan="3"', 'cols' => 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', $parameters); + } // Tags-Categories - if ($conf->categorie->enabled) + if ($conf->categorie->enabled) { print '"; } - // Note private + // Note private if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { - print '"; + print ""; } - print '
    '.$langs->trans("Ref").'
    '.$langs->trans("Label").'
    '.$langs->trans("Status").' ('.$langs->trans("Sell").')'; + print ''; + print '
    '.$langs->trans("Status").' ('.$langs->trans("Buy").')'; + print ''; + print '
    '.$langs->trans('BarcodeType').''; - if (isset($_POST['fk_barcode_type'])) - { - $fk_barcode_type = GETPOST('fk_barcode_type'); - } - else - { - $fk_barcode_type = $object->barcode_type; - if (empty($fk_barcode_type) && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; - } - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; - $formbarcode = new FormBarCode($db); - print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1); - print ''.$langs->trans("BarcodeValue").''; - $tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode; - if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); - print ''; - print '
    '.$langs->trans('BarcodeType').''; + if (isset($_POST['fk_barcode_type'])) + { + $fk_barcode_type = GETPOST('fk_barcode_type'); + } else { + $fk_barcode_type = $object->barcode_type; + if (empty($fk_barcode_type) && !empty($conf->global->PRODUIT_DEFAULT_BARCODE_TYPE)) $fk_barcode_type = $conf->global->PRODUIT_DEFAULT_BARCODE_TYPE; + } + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; + $formbarcode = new FormBarCode($db); + print $formbarcode->selectBarcodeType($fk_barcode_type, 'fk_barcode_type', 1); + print ''.$langs->trans("BarcodeValue").''; + $tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode; + if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); + print ''; + print '
    '.$langs->trans("Description").''; + // Description (used in invoice, propal...) + print '
    '.$langs->trans("Description").''; - // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); - $doleditor->Create(); + // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. + $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); + $doleditor->Create(); - print "
    '.$langs->trans("PublicUrl").''; - print ''; - print '
    '.$langs->trans("PublicUrl").''; + print ''; + print '
    '.$langs->trans("DefaultWarehouse").''; - print $formproduct->selectWarehouses($object->fk_default_warehouse, 'fk_default_warehouse', 'warehouseopen', 1); - print ' '; - print '
    '.$langs->trans("DefaultWarehouse").''; + print $formproduct->selectWarehouses($object->fk_default_warehouse, 'fk_default_warehouse', 'warehouseopen', 1); + print ' '; + print '
    '.$langs->trans("StockLimit").''; print ''; print '
    '.$langs->trans("Duration").''; - print ' '; - print $formproduct->selectMeasuringUnits("duration_unit", "time", $object->duration_unit, 0, 1); - print '
    '.$langs->trans("Nature").''; - $statutarray = array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); - print $form->selectarray('finished', $statutarray, $object->finished); - print '
    '.$langs->trans("Duration").''; + print ' '; + print $formproduct->selectMeasuringUnits("duration_unit", "time", $object->duration_unit, 0, 1); + print '
    '.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; + $statutarray = array('-1'=>' ', '1' => $langs->trans("Finished"), '0' => $langs->trans("RowMaterial")); + print $form->selectarray('finished', $statutarray, $object->finished); + print '
    '.$langs->trans("Weight").''; - print ' '; - print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); - print '
    '.$langs->trans("Weight").''; + print ' '; + print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); + print '
    '.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; print 'x'; @@ -1564,64 +1566,81 @@ else print ' '; print $formproduct->selectMeasuringUnits("size_units", "size", $object->length_units, 0, 2); print '
    '.$langs->trans("Surface").''; - print ' '; - print $formproduct->selectMeasuringUnits("surface_units", "surface", $object->surface_units, 0, 2); - print '
    '.$langs->trans("Volume").''; - print ' '; - print $formproduct->selectMeasuringUnits("volume_units", "volume", $object->volume_units, 0, 2); - print '
    '.$langs->trans("Surface").''; + print ' '; + print $formproduct->selectMeasuringUnits("surface_units", "surface", $object->surface_units, 0, 2); + print '
    '.$langs->trans("Volume").''; + print ' '; + print $formproduct->selectMeasuringUnits("volume_units", "volume", $object->volume_units, 0, 2); + print '
    '.$langs->trans("NetMeasure").''; - print ' '; - print $formproduct->selectMeasuringUnits("net_measure_units", "", $object->net_measure_units, 0, 0); - print '
    '.$langs->trans('DefaultUnitToShow').''; - print $form->selectUnits($object->fk_unit, 'units'); - print '
    '.$langs->trans("NetMeasure").''; + print ' '; + print $formproduct->selectMeasuringUnits("net_measure_units", "", $object->net_measure_units, 0, 0); + print '
    '.$langs->trans('DefaultUnitToShow').''; + print $form->selectUnits($object->fk_unit, 'units'); + print '
    '.$langs->trans("CustomCode").''.$langs->trans("CountryOrigin").''; - print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone'); - if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); - print '
    '.$langs->trans("CustomCode").'
    '.$langs->trans("CountryOrigin").''; + print img_picto('', 'globe-americas', 'class="paddingrightonly"'); + print $form->select_country($object->country_id, 'country_id', '', 0, 'minwidth100 maxwidthonsmartphone'); + if ($user->admin) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); + print '
    '.$form->editfieldkey('Region-StateOrigine', 'state_id', '', $object, 0).''; + } else { + print ''.$form->editfieldkey('StateOrigin', 'state_id', '', $object, 0).''; + } - // Other attributes - $parameters = array('colspan' => ' colspan="3"', 'cols' => 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', $parameters); - } + print $formcompany->select_state($object->state_id, $object->country_code); + print '
    '.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1); @@ -1637,22 +1656,22 @@ else print "
    '.$langs->trans("NoteNotVisibleOnBill").''; + print '
    '.$langs->trans("NoteNotVisibleOnBill").''; - $doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); - $doleditor->Create(); + $doleditor = new DolEditor('note_private', $object->note_private, '', 140, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); + $doleditor->Create(); - print "
    '; + print ''; - print '
    '; + print '
    '; - print ''; + print '
    '; if (!empty($conf->accounting->enabled)) { @@ -1697,9 +1716,8 @@ else print ''; - } - else // For external software - { + } else { + // For external software // Accountancy_code_sell print ''; print '
    '; print $formaccounting->select_account($object->accountancy_code_buy_export, 'accountancy_code_buy_export', 1, '', 1, 1); print '
    '.$langs->trans("ProductAccountancySellCode").''; @@ -1747,33 +1765,31 @@ else print ''; print ''; - } - // Fiche en mode visu - else - { - $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; - if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; + } else { + // Fiche en mode visu + $showbarcode = empty($conf->barcode->enabled) ? 0 : 1; + if (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->barcode->lire_advance)) $showbarcode = 0; - $head = product_prepare_head($object); - $titre = $langs->trans("CardProduct".$object->type); - $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); + $head = product_prepare_head($object); + $titre = $langs->trans("CardProduct".$object->type); + $picto = ($object->type == Product::TYPE_SERVICE ? 'service' : 'product'); - dol_fiche_head($head, 'card', $titre, -1, $picto); + dol_fiche_head($head, 'card', $titre, -1, $picto); - $linkback = ''.$langs->trans("BackToList").''; - $object->next_prev_filter = " fk_product_type = ".$object->type; + $linkback = ''.$langs->trans("BackToList").''; + $object->next_prev_filter = " fk_product_type = ".$object->type; - $shownav = 1; - if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; + $shownav = 1; + if ($user->socid && !in_array('product', explode(',', $conf->global->MAIN_MODULES_FOR_EXTERNAL))) $shownav = 0; - dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); + dol_banner_tab($object, 'ref', $linkback, $shownav, 'ref'); - print '
    '; - print '
    '; + print '
    '; + print '
    '; - print '
    '; - print ''; + print '
    '; + print '
    '; // Type if (!empty($conf->product->enabled) && !empty($conf->service->enabled)) @@ -1787,42 +1803,40 @@ else print ''; } - if ($showbarcode) - { - // Barcode type - print ''."\n"; + if ($action == 'editbarcodetype') + { + print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type'); + } else { + $object->fetch_barcode(); + print $object->barcode_type_label ? $object->barcode_type_label : ($object->barcode ? '
    '.$langs->trans("SetDefaultBarcodeType").'
    ' : ''); + } + print ''."\n"; - // Barcode value - print '
    '."\n"; - } + } + print ''."\n"; + } // Accountancy sell code print ''; - // Batch number management (to batch) - if (!empty($conf->productbatch->enabled)) - { + // Batch number management (to batch) + if (!empty($conf->productbatch->enabled)) + { if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { - print ''; + print ''; } - } + } - // Description - print ''; + // Description + print ''; - // Public URL - print ''; + print ''; - // Default warehouse - if ($object->isProduct() && !empty($conf->stock->enabled)) - { - $warehouse = new Entrepot($db); - $warehouse->fetch($object->fk_default_warehouse); + // Default warehouse + if ($object->isProduct() && !empty($conf->stock->enabled)) + { + $warehouse = new Entrepot($db); + $warehouse->fetch($object->fk_default_warehouse); - print ''; - } + print ''; + } - // Parent product. - if (!empty($conf->variants->enabled) && ($object->isProduct() || $object->isService())) { - $combination = new ProductCombination($db); + // Parent product. + if (!empty($conf->variants->enabled) && ($object->isProduct() || $object->isService())) { + $combination = new ProductCombination($db); - if ($combination->fetchByFkProductChild($object->id) > 0) { - $prodstatic = new Product($db); - $prodstatic->fetch($combination->fk_product_parent); + if ($combination->fetchByFkProductChild($object->id) > 0) { + $prodstatic = new Product($db); + $prodstatic->fetch($combination->fk_product_parent); - // Parent product - print ''; - } - } + // Parent product + print ''; + } + } - print '
    '; - print ''; - if (($action != 'editbarcodetype') && $usercancreate && $createbarcode) print ''; - print '
    '; - print $langs->trans("BarcodeType"); - print 'id.'">'.img_edit($langs->trans('Edit'), 1).'
    '; - print '
    '; - if ($action == 'editbarcodetype' || $action == 'editbarcode') - { - require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; - $formbarcode = new FormBarCode($db); + if ($showbarcode) + { + // Barcode type + print '
    '; + print ''; + if (($action != 'editbarcodetype') && $usercancreate && $createbarcode) print ''; + print '
    '; + print $langs->trans("BarcodeType"); + print 'id.'">'.img_edit($langs->trans('Edit'), 1).'
    '; + print '
    '; + if ($action == 'editbarcodetype' || $action == 'editbarcode') + { + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; + $formbarcode = new FormBarCode($db); } - if ($action == 'editbarcodetype') - { - print $formbarcode->formBarcodeType($_SERVER['PHP_SELF'].'?id='.$object->id, $object->barcode_type, 'fk_barcode_type'); - } - else - { - $object->fetch_barcode(); - print $object->barcode_type_label ? $object->barcode_type_label : ($object->barcode ? '
    '.$langs->trans("SetDefaultBarcodeType").'
    ' : ''); - } - print '
    '; - print ''; - if (($action != 'editbarcode') && $usercancreate && $createbarcode) print ''; - print '
    '; - print $langs->trans("BarcodeValue"); - print 'id.'">'.img_edit($langs->trans('Edit'), 1).'
    '; - print '
    '; - if ($action == 'editbarcode') - { + // Barcode value + print '
    '; + print ''; + if (($action != 'editbarcode') && $usercancreate && $createbarcode) print ''; + print '
    '; + print $langs->trans("BarcodeValue"); + print 'id.'">'.img_edit($langs->trans('Edit'), 1).'
    '; + print '
    '; + if ($action == 'editbarcode') + { $tmpcode = isset($_POST['barcode']) ?GETPOST('barcode') : $object->barcode; if (empty($tmpcode) && !empty($modBarCodeProduct->code_auto)) $tmpcode = $modBarCodeProduct->getNextValue($object, $type); @@ -1833,13 +1847,11 @@ else print ''; print ' '; print ''; - } - else - { + } else { print $object->barcode; - } - print '
    '; @@ -1955,157 +1967,144 @@ else } print '
    '.$langs->trans("ManageLotSerial").''; - if (!empty($conf->use_javascript_ajax) && $usercancreate && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { - print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch'); - } else { - print $object->getLibStatut(0, 2); - } - print '
    '.$langs->trans("ManageLotSerial").''; + if (!empty($conf->use_javascript_ajax) && $usercancreate && !empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) { + print ajax_object_onoff($object, 'status_batch', 'tobatch', 'ProductStatusOnBatch', 'ProductStatusNotOnBatch'); + } else { + print $object->getLibStatut(0, 2); + } + print '
    '.$langs->trans("Description").''.(dol_textishtml($object->description) ? $object->description : dol_nl2br($object->description, 1, true)).'
    '.$langs->trans("Description").''.(dol_textishtml($object->description) ? $object->description : dol_nl2br($object->description, 1, true)).'
    '.$langs->trans("PublicUrl").''; + // Public URL + print '
    '.$langs->trans("PublicUrl").''; print dol_print_url($object->url); - print '
    '.$langs->trans("DefaultWarehouse").''; - print (!empty($warehouse->id) ? $warehouse->getNomUrl(1) : ''); - print '
    '.$langs->trans("DefaultWarehouse").''; + print (!empty($warehouse->id) ? $warehouse->getNomUrl(1) : ''); + print '
    '.$langs->trans("ParentProduct").''; - print $prodstatic->getNomUrl(1); - print '
    '.$langs->trans("ParentProduct").''; + print $prodstatic->getNomUrl(1); + print '
    '; - print '
    '; - print '
    '; + print '
    '; + print '
    '; + print '
    '; - print '
    '; - print ''; + print '
    '; + print '
    '; - if ($object->isService()) - { - // Duration - print ''; - } - else - { - // Nature - print ''; + print ''; + } else { + // Nature + print ''; - // Brut Weight - print '\n"; + // Brut Weight + print '\n"; - if (empty($conf->global->PRODUCT_DISABLE_SIZE)) - { - // Brut Length - print '\n"; - } - if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) - { - // Brut Surface - print '\n"; - } - if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) - { - // Brut Volume - print '\n"; - } + if (empty($conf->global->PRODUCT_DISABLE_SIZE)) + { + // Brut Length + print '\n"; + } + if (empty($conf->global->PRODUCT_DISABLE_SURFACE)) + { + // Brut Surface + print '\n"; + } + if (empty($conf->global->PRODUCT_DISABLE_VOLUME)) + { + // Brut Volume + print '\n"; + } - if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) - { - // Net Measure - print ''; } - // Custom code - if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) - { - print ''; + // Custom code + if (!$object->isService() && empty($conf->global->PRODUCT_DISABLE_CUSTOM_INFO)) + { + print ''; - // Origin country code - print ''; - } + // Origin country code + print ''; + } - // Other attributes - $parameters = array('colspan' => ' colspan="'.(2 + (($showphoto || $showbarcode) ? 1 : 0)).'"', 'cols' => (2 + (($showphoto || $showbarcode) ? 1 : 0))); - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; + // Other attributes + $parameters = array('colspan' => ' colspan="'.(2 + (($showphoto || $showbarcode) ? 1 : 0)).'"', 'cols' => (2 + (($showphoto || $showbarcode) ? 1 : 0))); + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; // Categories if ($conf->categorie->enabled) { @@ -2139,34 +2140,33 @@ else print ""; } - // Note private + // Note private if (!empty($conf->global->MAIN_DISABLE_NOTES_TAB)) { - print ' '."\n"; - print ''."\n"; - print ' '."\n"; + print ' '."\n"; + print ''."\n"; + print ' '."\n"; } - print "
    '.$langs->trans("Duration").''.$object->duration_value.' '; - if ($object->duration_value > 1) - { - $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); - } - elseif ($object->duration_value > 0) - { - $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); - } - print (!empty($object->duration_unit) && isset($dur[$object->duration_unit]) ? $langs->trans($dur[$object->duration_unit]) : '')." "; + if ($object->isService()) + { + // Duration + print '
    '.$langs->trans("Duration").''.$object->duration_value.' '; + if ($object->duration_value > 1) + { + $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hours"), "d"=>$langs->trans("Days"), "w"=>$langs->trans("Weeks"), "m"=>$langs->trans("Months"), "y"=>$langs->trans("Years")); + } elseif ($object->duration_value > 0) + { + $dur = array("i"=>$langs->trans("Minute"), "h"=>$langs->trans("Hour"), "d"=>$langs->trans("Day"), "w"=>$langs->trans("Week"), "m"=>$langs->trans("Month"), "y"=>$langs->trans("Year")); + } + print (!empty($object->duration_unit) && isset($dur[$object->duration_unit]) ? $langs->trans($dur[$object->duration_unit]) : '')." "; - print '
    '.$langs->trans("Nature").''; - print $object->getLibFinished(); - print '
    '.$form->textwithpicto($langs->trans("NatureOfProductShort"), $langs->trans("NatureOfProductDesc")).''; + print $object->getLibFinished(); + print '
    '.$langs->trans("Weight").''; - if ($object->weight != '') - { - print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); - } - else - { - print ' '; - } - print "
    '.$langs->trans("Weight").''; + if ($object->weight != '') + { + print $object->weight." ".measuringUnitString(0, "weight", $object->weight_units); + } else { + print ' '; + } + print "
    '.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; - if ($object->length != '' || $object->width != '' || $object->height != '') - { - print $object->length; - if ($object->width) print " x ".$object->width; - if ($object->height) print " x ".$object->height; - print ' '.measuringUnitString(0, "size", $object->length_units); - } - else - { - print ' '; - } - print "
    '.$langs->trans("Surface").''; - if ($object->surface != '') - { - print $object->surface." ".measuringUnitString(0, "surface", $object->surface_units); - } - else - { - print ' '; - } - print "
    '.$langs->trans("Volume").''; - if ($object->volume != '') - { - print $object->volume." ".measuringUnitString(0, "volume", $object->volume_units); - } - else - { - print ' '; - } - print "
    '.$langs->trans("Length").' x '.$langs->trans("Width").' x '.$langs->trans("Height").''; + if ($object->length != '' || $object->width != '' || $object->height != '') + { + print $object->length; + if ($object->width) print " x ".$object->width; + if ($object->height) print " x ".$object->height; + print ' '.measuringUnitString(0, "size", $object->length_units); + } else { + print ' '; + } + print "
    '.$langs->trans("Surface").''; + if ($object->surface != '') + { + print $object->surface." ".measuringUnitString(0, "surface", $object->surface_units); + } else { + print ' '; + } + print "
    '.$langs->trans("Volume").''; + if ($object->volume != '') + { + print $object->volume." ".measuringUnitString(0, "volume", $object->volume_units); + } else { + print ' '; + } + print "
    '.$langs->trans("NetMeasure").''; - if ($object->net_measure != '') - { - print $object->net_measure." ".measuringUnitString($object->net_measure_units); - } - else - { - print ' '; - } - } - } + if (!empty($conf->global->PRODUCT_ADD_NET_MEASURE)) + { + // Net Measure + print '
    '.$langs->trans("NetMeasure").''; + if ($object->net_measure != '') + { + print $object->net_measure." ".measuringUnitString($object->net_measure_units); + } else { + print ' '; + } + } + } // Unit if (!empty($conf->global->PRODUCT_USE_UNITS)) @@ -2119,18 +2118,20 @@ else print '
    '.$langs->trans("CustomCode").''.$object->customcode.'
    '.$langs->trans("CustomCode").''.$object->customcode.'
    '.$langs->trans("CountryOrigin").''.getCountry($object->country_id, 0, $db).'
    '.$langs->trans("Origin").''.getCountry($object->country_id, 0, $db); + if (!empty($object->state_id)) print ' - '.getState($object->state_id, 0, $db); + print '
    '.$langs->trans("NotePrivate").''.(dol_textishtml($object->note_private) ? $object->note_private : dol_nl2br($object->note_private, 1, true)).'
    '.$langs->trans("NotePrivate").''.(dol_textishtml($object->note_private) ? $object->note_private : dol_nl2br($object->note_private, 1, true)).'
    \n"; - print '
    '; + print "\n"; + print '
    '; - print '
    '; - print '
    '; + print '
    '; + print '
    '; - dol_fiche_end(); - } - } - elseif ($action != 'create') - { - exit; - } + dol_fiche_end(); + } + } elseif ($action != 'create') + { + exit; + } } // Load object modCodeProduct $module = (!empty($conf->global->PRODUCT_CODEPRODUCT_ADDON) ? $conf->global->PRODUCT_CODEPRODUCT_ADDON : 'mod_codeproduct_leopard'); if (substr($module, 0, 16) == 'mod_codeproduct_' && substr($module, -3) == 'php') { - $module = substr($module, 0, dol_strlen($module) - 4); + $module = substr($module, 0, dol_strlen($module) - 4); } $result = dol_include_once('/core/modules/product/'.$module.'.php'); if ($result > 0) @@ -2177,35 +2177,45 @@ if ($result > 0) $tmpcode = ''; if (!empty($modCodeProduct->code_auto)) $tmpcode = $modCodeProduct->getNextValue($object, $object->type); -// Define confirmation messages -$formquestionclone = array( - 'text' => $langs->trans("ConfirmClone"), - array('type' => 'text', 'name' => 'clone_ref', 'label' => $langs->trans("NewRefForClone"), 'value' => empty($tmpcode) ? $langs->trans("CopyOf").' '.$object->ref : $tmpcode, 'size'=>24), - array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneContentProduct"), 'value' => 1), - array('type' => 'checkbox', 'name' => 'clone_categories', 'label' => $langs->trans("CloneCategoriesProduct"), 'value' => 1), -); -if (!empty($conf->global->PRODUIT_MULTIPRICES)) { - $formquestionclone[] = array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("CustomerPrices").')', 'value' => 0); -} -if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) -{ - $formquestionclone[] = array('type' => 'checkbox', 'name' => 'clone_composition', 'label' => $langs->trans('CloneCompositionProduct'), 'value' => 1); -} +$formconfirm=''; // Confirm delete product if (($action == 'delete' && (empty($conf->use_javascript_ajax) || !empty($conf->dol_use_jmobile))) // Output when action = clone if jmobile or no js || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) // Always output when not jmobile nor js { - print $form->formconfirm("card.php?id=".$object->id, $langs->trans("DeleteProduct"), $langs->trans("ConfirmDeleteProduct"), "confirm_delete", '', 0, "action-delete"); + $formconfirm = $form->formconfirm("card.php?id=".$object->id, $langs->trans("DeleteProduct"), $langs->trans("ConfirmDeleteProduct"), "confirm_delete", '', 0, "action-delete"); } // Clone confirmation if (($action == 'clone' && (empty($conf->use_javascript_ajax) || !empty($conf->dol_use_jmobile))) // Output when action = clone if jmobile or no js || (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile))) // Always output when not jmobile nor js { - print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneProduct', $object->ref), 'confirm_clone', $formquestionclone, 'yes', 'action-clone', 350, 600); + // Define confirmation messages + $formquestionclone = array( + 'text' => $langs->trans("ConfirmClone"), + array('type' => 'text', 'name' => 'clone_ref', 'label' => $langs->trans("NewRefForClone"), 'value' => empty($tmpcode) ? $langs->trans("CopyOf").' '.$object->ref : $tmpcode, 'size'=>24), + array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneContentProduct"), 'value' => 1), + array('type' => 'checkbox', 'name' => 'clone_categories', 'label' => $langs->trans("CloneCategoriesProduct"), 'value' => 1), + ); + if (!empty($conf->global->PRODUIT_MULTIPRICES)) { + $formquestionclone[] = array('type' => 'checkbox', 'name' => 'clone_prices', 'label' => $langs->trans("ClonePricesProduct").' ('.$langs->trans("CustomerPrices").')', 'value' => 0); + } + if (!empty($conf->global->PRODUIT_SOUSPRODUITS)) + { + $formquestionclone[] = array('type' => 'checkbox', 'name' => 'clone_composition', 'label' => $langs->trans('CloneCompositionProduct'), 'value' => 1); + } + + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneProduct', $object->ref), 'confirm_clone', $formquestionclone, 'yes', 'action-clone', 350, 600); } +// Call Hook formConfirm +$parameters = array('formConfirm' => $formconfirm, 'object' => $object); +$reshook = $hookmanager->executeHooks('formConfirm', $parameters, $object, $action); // Note that $action and $object may have been modified by hook +if (empty($reshook)) $formconfirm .= $hookmanager->resPrint; +elseif ($reshook > 0) $formconfirm = $hookmanager->resPrint; + +// Print form confirm +print $formconfirm; /* ************************************************************************** */ /* */ @@ -2214,55 +2224,47 @@ if (($action == 'clone' && (empty($conf->use_javascript_ajax) || !empty($conf->d /* ************************************************************************** */ if ($action != 'create' && $action != 'edit') { - print "\n".'
    '."\n"; + print "\n".'
    '."\n"; - $parameters = array(); - $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - if (empty($reshook)) + $parameters = array(); + $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook + if (empty($reshook)) { if ($usercancreate) - { - if (!isset($object->no_button_edit) || $object->no_button_edit <> 1) print 'id.'">'.$langs->trans("Modify").''; + { + if (!isset($object->no_button_edit) || $object->no_button_edit <> 1) print 'id.'">'.$langs->trans("Modify").''; - if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) - { - if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) - { - print ''.$langs->trans('ToClone').''."\n"; - } - else - { - print 'id.'">'.$langs->trans("ToClone").''; - } - } - } - $object_is_used = $object->isObjectUsed($object->id); + if (!isset($object->no_button_copy) || $object->no_button_copy <> 1) + { + if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) + { + print ''.$langs->trans('ToClone').''."\n"; + } else { + print 'id.'">'.$langs->trans("ToClone").''; + } + } + } + $object_is_used = $object->isObjectUsed($object->id); - if ($usercandelete) - { - if (empty($object_is_used) && (!isset($object->no_button_delete) || $object->no_button_delete <> 1)) - { - if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) - { - print ''.$langs->trans('Delete').''."\n"; - } - else - { - print 'id.'">'.$langs->trans("Delete").''; - } - } - else - { - print ''.$langs->trans("Delete").''; - } - } - else - { - print ''.$langs->trans("Delete").''; - } - } + if ($usercandelete) + { + if (empty($object_is_used) && (!isset($object->no_button_delete) || $object->no_button_delete <> 1)) + { + if (!empty($conf->use_javascript_ajax) && empty($conf->dol_use_jmobile)) + { + print ''.$langs->trans('Delete').''."\n"; + } else { + print 'id.'">'.$langs->trans("Delete").''; + } + } else { + print ''.$langs->trans("Delete").''; + } + } else { + print ''.$langs->trans("Delete").''; + } + } - print "\n
    \n"; + print "\n
    \n"; } /* @@ -2271,112 +2273,106 @@ if ($action != 'create' && $action != 'edit') if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == '' || $action == 'view') && $object->status) { - //Variable used to check if any text is going to be printed - $html = ''; + //Variable used to check if any text is going to be printed + $html = ''; //print '
    '; - // Propals - if (!empty($conf->propal->enabled) && $user->rights->propale->creer) - { - $propal = new Propal($db); + // Propals + if (!empty($conf->propal->enabled) && $user->rights->propale->creer) + { + $propal = new Propal($db); - $langs->load("propal"); + $langs->load("propal"); - $otherprop = $propal->liste_array(2, 1, 0); + $otherprop = $propal->liste_array(2, 1, 0); - if (is_array($otherprop) && count($otherprop)) - { - $html .= ''; - $html .= $langs->trans("AddToDraftProposals").''; - $html .= $form->selectarray("propalid", $otherprop, 0, 1); - $html .= ''; - } - else + if (is_array($otherprop) && count($otherprop)) { - $html .= ''; - $html .= $langs->trans("AddToDraftProposals").''; - $html .= $langs->trans("NoDraftProposals"); - $html .= ''; - } - } + $html .= ''; + $html .= $langs->trans("AddToDraftProposals").''; + $html .= $form->selectarray("propalid", $otherprop, 0, 1); + $html .= ''; + } else { + $html .= ''; + $html .= $langs->trans("AddToDraftProposals").''; + $html .= $langs->trans("NoDraftProposals"); + $html .= ''; + } + } - // Commande - if (!empty($conf->commande->enabled) && $user->rights->commande->creer) - { - $commande = new Commande($db); + // Commande + if (!empty($conf->commande->enabled) && $user->rights->commande->creer) + { + $commande = new Commande($db); - $langs->load("orders"); + $langs->load("orders"); - $othercom = $commande->liste_array(2, 1, null); - if (is_array($othercom) && count($othercom)) - { - $html .= ''; - $html .= $langs->trans("AddToDraftOrders").''; - $html .= $form->selectarray("commandeid", $othercom, 0, 1); - $html .= ''; - } - else + $othercom = $commande->liste_array(2, 1, null); + if (is_array($othercom) && count($othercom)) { - $html .= ''; - $html .= $langs->trans("AddToDraftOrders").''; - $html .= $langs->trans("NoDraftOrders"); - $html .= ''; - } - } + $html .= ''; + $html .= $langs->trans("AddToDraftOrders").''; + $html .= $form->selectarray("commandeid", $othercom, 0, 1); + $html .= ''; + } else { + $html .= ''; + $html .= $langs->trans("AddToDraftOrders").''; + $html .= $langs->trans("NoDraftOrders"); + $html .= ''; + } + } - // Factures - if (!empty($conf->facture->enabled) && $user->rights->facture->creer) - { - $invoice = new Facture($db); + // Factures + if (!empty($conf->facture->enabled) && $user->rights->facture->creer) + { + $invoice = new Facture($db); - $langs->load("bills"); + $langs->load("bills"); - $otherinvoice = $invoice->liste_array(2, 1, null); - if (is_array($otherinvoice) && count($otherinvoice)) - { - $html .= ''; - $html .= $langs->trans("AddToDraftInvoices").''; - $html .= $form->selectarray("factureid", $otherinvoice, 0, 1); - $html .= ''; - } - else - { - $html .= ''; - $html .= $langs->trans("AddToDraftInvoices").''; - $html .= $langs->trans("NoDraftInvoices"); - $html .= ''; - } - } + $otherinvoice = $invoice->liste_array(2, 1, null); + if (is_array($otherinvoice) && count($otherinvoice)) + { + $html .= ''; + $html .= $langs->trans("AddToDraftInvoices").''; + $html .= $form->selectarray("factureid", $otherinvoice, 0, 1); + $html .= ''; + } else { + $html .= ''; + $html .= $langs->trans("AddToDraftInvoices").''; + $html .= $langs->trans("NoDraftInvoices"); + $html .= ''; + } + } - //If any text is going to be printed, then we show the table - if (!empty($html)) - { - print '
    '; - print ''; - print ''; + //If any text is going to be printed, then we show the table + if (!empty($html)) + { + print ''; + print ''; + print ''; - print load_fiche_titre($langs->trans("AddToDraft"), '', ''); + print load_fiche_titre($langs->trans("AddToDraft"), '', ''); dol_fiche_head(''); - $html .= ''.$langs->trans("Quantity").' '; - $html .= ''; - $html .= ''.$langs->trans("ReductionShort").'(%) '; - $html .= ''; - $html .= ''; + $html .= ''.$langs->trans("Quantity").' '; + $html .= ''; + $html .= ''.$langs->trans("ReductionShort").'(%) '; + $html .= ''; + $html .= ''; - print ''; - print $html; - print '
    '; + print ''; + print $html; + print '
    '; - print '
    '; - print ''; - print '
    '; + print '
    '; + print ''; + print '
    '; - dol_fiche_end(); + dol_fiche_end(); - print '
    '; - } + print ''; + } } @@ -2386,34 +2382,38 @@ if (!empty($conf->global->PRODUCT_ADD_FORM_ADD_TO) && $object->id && ($action == if ($action != 'create' && $action != 'edit' && $action != 'delete') { - print '
    '; - print ''; // ancre + print '
    '; + print ''; // ancre - // Documents - $objectref = dol_sanitizeFileName($object->ref); - $relativepath = $comref.'/'.$objectref.'.pdf'; - $filedir = $conf->product->dir_output.'/'.$objectref; - $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; - $genallowed = $usercanread; - $delallowed = $usercancreate; + // Documents + $objectref = dol_sanitizeFileName($object->ref); + $relativepath = $comref.'/'.$objectref.'.pdf'; + if (!empty($conf->product->multidir_output[$object->entity])) { + $filedir = $conf->product->multidir_output[$object->entity].'/'.$objectref; //Check repertories of current entities + } else { + $filedir = $conf->product->dir_output.'/'.$objectref; + } + $urlsource = $_SERVER["PHP_SELF"]."?id=".$object->id; + $genallowed = $usercanread; + $delallowed = $usercancreate; - print $formfile->showdocuments($modulepart, $object->ref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object); - $somethingshown = $formfile->numoffiles; + print $formfile->showdocuments($modulepart, $object->ref, $filedir, $urlsource, $genallowed, $delallowed, '', 0, 0, 0, 28, 0, '', 0, '', $object->default_lang, '', $object); + $somethingshown = $formfile->numoffiles; - print '
    '; + print '
    '; - $MAXEVENT = 10; + $MAXEVENT = 10; - $morehtmlright = ''; - $morehtmlright .= $langs->trans("SeeAll"); - $morehtmlright .= ''; + $morehtmlright = ''; + $morehtmlright .= $langs->trans("SeeAll"); + $morehtmlright .= ''; - // List of actions on element - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; - $formactions = new FormActions($db); - $somethingshown = $formactions->showactions($object, 'product', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product + // List of actions on element + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; + $formactions = new FormActions($db); + $somethingshown = $formactions->showactions($object, 'product', 0, 1, '', $MAXEVENT, '', $morehtmlright); // Show all action for product - print '
    '; + print '
    '; } // End of page diff --git a/htdocs/product/class/api_products.class.php b/htdocs/product/class/api_products.class.php index 10cb3686752..6c75d96fe89 100644 --- a/htdocs/product/class/api_products.class.php +++ b/htdocs/product/class/api_products.class.php @@ -58,6 +58,7 @@ class Products extends DolibarrApi public function __construct() { global $db, $conf; + $this->db = $db; $this->product = new Product($this->db); $this->productsupplier = new ProductFournisseur($this->db); @@ -71,15 +72,16 @@ class Products extends DolibarrApi * @param int $id ID of product * @param int $includestockdata Load also information about stock (slower) * @param bool $includesubproducts Load information about subproducts + * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) * @return array|mixed Data without useless information * * @throws RestException 401 * @throws RestException 403 * @throws RestException 404 */ - public function get($id, $includestockdata = 0, $includesubproducts = false) + public function get($id, $includestockdata = 0, $includesubproducts = false, $includeparentid = false) { - return $this->_fetch($id, '', '', '', $includestockdata, $includesubproducts); + return $this->_fetch($id, '', '', '', $includestockdata, $includesubproducts, $includeparentid); } /** @@ -90,6 +92,7 @@ class Products extends DolibarrApi * @param string $ref Ref of element * @param int $includestockdata Load also information about stock (slower) * @param bool $includesubproducts Load information about subproducts + * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) * * @return array|mixed Data without useless information * @@ -99,9 +102,9 @@ class Products extends DolibarrApi * @throws RestException 403 * @throws RestException 404 */ - public function getByRef($ref, $includestockdata = 0, $includesubproducts = false) + public function getByRef($ref, $includestockdata = 0, $includesubproducts = false, $includeparentid = false) { - return $this->_fetch('', $ref, '', '', $includestockdata, $includesubproducts); + return $this->_fetch('', $ref, '', '', $includestockdata, $includesubproducts, $includeparentid); } /** @@ -112,6 +115,7 @@ class Products extends DolibarrApi * @param string $ref_ext Ref_ext of element * @param int $includestockdata Load also information about stock (slower) * @param bool $includesubproducts Load information about subproducts + * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) * * @return array|mixed Data without useless information * @@ -121,9 +125,9 @@ class Products extends DolibarrApi * @throws RestException 403 * @throws RestException 404 */ - public function getByRefExt($ref_ext, $includestockdata = 0, $includesubproducts = false) + public function getByRefExt($ref_ext, $includestockdata = 0, $includesubproducts = false, $includeparentid = false) { - return $this->_fetch('', '', $ref_ext, '', $includestockdata, $includesubproducts); + return $this->_fetch('', '', $ref_ext, '', $includestockdata, $includesubproducts, $includeparentid); } /** @@ -134,6 +138,7 @@ class Products extends DolibarrApi * @param string $barcode Barcode of element * @param int $includestockdata Load also information about stock (slower) * @param bool $includesubproducts Load information about subproducts + * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) * * @return array|mixed Data without useless information * @@ -143,9 +148,9 @@ class Products extends DolibarrApi * @throws RestException 403 * @throws RestException 404 */ - public function getByBarcode($barcode, $includestockdata = 0, $includesubproducts = false) + public function getByBarcode($barcode, $includestockdata = 0, $includesubproducts = false, $includeparentid = false) { - return $this->_fetch('', '', '', $barcode, $includestockdata, $includesubproducts); + return $this->_fetch('', '', '', $barcode, $includestockdata, $includesubproducts, $includeparentid); } /** @@ -178,7 +183,7 @@ class Products extends DolibarrApi $sql .= ' WHERE t.entity IN ('.getEntity('product').')'; // Select products of given category if ($category > 0) { - $sql .= " AND c.fk_categorie = ".$db->escape($category); + $sql .= " AND c.fk_categorie = ".$this->db->escape($category); $sql .= " AND c.fk_product = t.rowid "; } if ($mode == 1) { @@ -197,33 +202,32 @@ class Products extends DolibarrApi $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; } - $sql .= $db->order($sortfield, $sortorder); + $sql .= $this->db->order($sortfield, $sortorder); if ($limit) { if ($page < 0) { $page = 0; } $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); + $sql .= $this->db->plimit($limit + 1, $offset); } - $result = $db->query($sql); + $result = $this->db->query($sql); if ($result) { - $num = $db->num_rows($result); + $num = $this->db->num_rows($result); $min = min($num, ($limit <= 0 ? $num : $limit)); $i = 0; while ($i < $min) { - $obj = $db->fetch_object($result); - $product_static = new Product($db); + $obj = $this->db->fetch_object($result); + $product_static = new Product($this->db); if ($product_static->fetch($obj->rowid)) { $obj_ret[] = $this->_cleanObjectDatas($product_static); } $i++; } - } - else { - throw new RestException(503, 'Error when retrieve product list : '.$db->lasterror()); + } else { + throw new RestException(503, 'Error when retrieve product list : '.$this->db->lasterror()); } if (!count($obj_ret)) { throw new RestException(404, 'No product found'); @@ -288,6 +292,9 @@ class Products extends DolibarrApi foreach ($request_data as $field => $value) { if ($field == 'id') { continue; } + if ($field == 'stock_reel') { + throw new RestException(400, 'Stock reel cannot be updated here. Use the /stockmovements endpoint instead'); + } $this->product->$field = $value; } @@ -303,8 +310,7 @@ class Products extends DolibarrApi // We update price only if it was changed $pricemodified = false; if ($this->product->price_base_type != $oldproduct->price_base_type) { $pricemodified = true; - } else - { + } else { if ($this->product->tva_tx != $oldproduct->tva_tx) { $pricemodified = true; } if ($this->product->tva_npr != $oldproduct->tva_npr) { $pricemodified = true; @@ -317,9 +323,7 @@ class Products extends DolibarrApi } if ($this->product->price_min_ttc != $oldproduct->price_min_ttc) { $pricemodified = true; } - } - else - { + } else { if ($this->product->price != $oldproduct->price) { $pricemodified = true; } if ($this->product->price_min != $oldproduct->price_min) { $pricemodified = true; @@ -446,8 +450,7 @@ class Products extends DolibarrApi /** * Remove subproduct. - * - * Unlink a product/service from a parent product/service + * Unlink a product/service from a parent product/service * * @param int $id Id of parent product/service * @param int $subproduct_id Id of child product/service @@ -579,12 +582,12 @@ class Products extends DolibarrApi } if ($result > 0) { - require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; - $prodcustprice = new Productcustomerprice($this->db); - $filter = array(); - $filter['t.fk_product'] .= $id; - if ($thirdparty_id) $filter['t.fk_soc'] .= $thirdparty_id; - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php'; + $prodcustprice = new Productcustomerprice($this->db); + $filter = array(); + $filter['t.fk_product'] .= $id; + if ($thirdparty_id) $filter['t.fk_soc'] .= $thirdparty_id; + $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); } if (empty($prodcustprice->lines)) { @@ -625,8 +628,8 @@ class Products extends DolibarrApi } return array( - 'prices_by_qty'=>$this->product->prices_by_qty[0], // 1 if price by quantity was activated for the product - 'prices_by_qty_list'=>$this->product->prices_by_qty_list[0] + 'prices_by_qty'=>$this->product->prices_by_qty[0], // 1 if price by quantity was activated for the product + 'prices_by_qty_list'=>$this->product->prices_by_qty_list[0] ); } @@ -642,11 +645,11 @@ class Products extends DolibarrApi * @param string $ref_fourn Supplier ref * @param float $tva_tx New VAT Rate (For example 8.5. Should not be a string) * @param string $charges costs affering to product - * @param float $remise_percent Discount regarding qty (percent) - * @param float $remise Discount regarding qty (amount) - * @param int $newnpr Set NPR or not - * @param int $delivery_time_days Delay in days for delivery (max). May be '' if not defined. - * @param string $supplier_reputation Reputation with this product to the defined supplier (empty, FAVORITE, DONOTORDER) + * @param float $remise_percent Discount regarding qty (percent) + * @param float $remise Discount regarding qty (amount) + * @param int $newnpr Set NPR or not + * @param int $delivery_time_days Delay in days for delivery (max). May be '' if not defined. + * @param string $supplier_reputation Reputation with this product to the defined supplier (empty, FAVORITE, DONOTORDER) * @param array $localtaxes_array Array with localtaxes info array('0'=>type1,'1'=>rate1,'2'=>type2,'3'=>rate2) (loaded by getLocalTaxesFromRate(vatrate, 0, ...) function). * @param string $newdefaultvatcode Default vat code * @param float $multicurrency_buyprice Purchase price for the quantity min in currency @@ -750,78 +753,80 @@ class Products extends DolibarrApi */ public function getSupplierProducts($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $mode = 0, $category = 0, $supplier = 0, $sqlfilters = '') { - global $db, $conf; - $obj_ret = array(); - $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; - $sql = "SELECT t.rowid, t.ref, t.ref_ext"; - $sql .= " FROM ".MAIN_DB_PREFIX."product as t"; - if ($category > 0) { - $sql .= ", ".MAIN_DB_PREFIX."categorie_product as c"; - } - $sql .= ", ".MAIN_DB_PREFIX."product_fournisseur_price as s"; + global $db, $conf; - $sql .= ' WHERE t.entity IN ('.getEntity('product').')'; + $obj_ret = array(); - if ($supplier > 0) { - $sql .= " AND s.fk_soc = ".$db->escape($supplier); - } - $sql .= " AND s.fk_product = t.rowid"; - // Select products of given category - if ($category > 0) { - $sql .= " AND c.fk_categorie = ".$db->escape($category); - $sql .= " AND c.fk_product = t.rowid"; - } - if ($mode == 1) { - // Show only products - $sql .= " AND t.fk_product_type = 0"; - } elseif ($mode == 2) { - // Show only services - $sql .= " AND t.fk_product_type = 1"; - } - // Add sql filters - if ($sqlfilters) { - if (!DolibarrApi::_checkFilters($sqlfilters)) { - throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); - } - $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; - $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; - } - $sql .= $db->order($sortfield, $sortorder); - if ($limit) { - if ($page < 0) { - $page = 0; - } - $offset = $limit * $page; - $sql .= $db->plimit($limit + 1, $offset); - } - $result = $db->query($sql); - if ($result) { - $num = $db->num_rows($result); - $min = min($num, ($limit <= 0 ? $num : $limit)); - $i = 0; - while ($i < $min) - { - $obj = $db->fetch_object($result); + $socid = DolibarrApiAccess::$user->socid ? DolibarrApiAccess::$user->socid : ''; - $product_fourn = new ProductFournisseur($this->db); - $product_fourn_list = $product_fourn->list_product_fournisseur_price($obj->rowid, '', '', 0, 0); - foreach($product_fourn_list as $tmpobj) { - $this->_cleanObjectDatas($tmpobj); - } + $sql = "SELECT t.rowid, t.ref, t.ref_ext"; + $sql .= " FROM ".MAIN_DB_PREFIX."product as t"; + if ($category > 0) { + $sql .= ", ".MAIN_DB_PREFIX."categorie_product as c"; + } + $sql .= ", ".MAIN_DB_PREFIX."product_fournisseur_price as s"; - //var_dump($product_fourn_list->db);exit; - $obj_ret[$obj->rowid] = $product_fourn_list; + $sql .= ' WHERE t.entity IN ('.getEntity('product').')'; - $i++; - } - } - else { - throw new RestException(503, 'Error when retrieve product list : '.$db->lasterror()); - } - if (!count($obj_ret)) { - throw new RestException(404, 'No product found'); - } - return $obj_ret; + if ($supplier > 0) { + $sql .= " AND s.fk_soc = ".$this->db->escape($supplier); + } + $sql .= " AND s.fk_product = t.rowid"; + // Select products of given category + if ($category > 0) { + $sql .= " AND c.fk_categorie = ".$this->db->escape($category); + $sql .= " AND c.fk_product = t.rowid"; + } + if ($mode == 1) { + // Show only products + $sql .= " AND t.fk_product_type = 0"; + } elseif ($mode == 2) { + // Show only services + $sql .= " AND t.fk_product_type = 1"; + } + // Add sql filters + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + $sql .= $this->db->order($sortfield, $sortorder); + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + $sql .= $this->db->plimit($limit + 1, $offset); + } + $result = $this->db->query($sql); + if ($result) { + $num = $this->db->num_rows($result); + $min = min($num, ($limit <= 0 ? $num : $limit)); + $i = 0; + while ($i < $min) + { + $obj = $this->db->fetch_object($result); + + $product_fourn = new ProductFournisseur($this->db); + $product_fourn_list = $product_fourn->list_product_fournisseur_price($obj->rowid, '', '', 0, 0); + foreach ($product_fourn_list as $tmpobj) { + $this->_cleanObjectDatas($tmpobj); + } + + //var_dump($product_fourn_list->db);exit; + $obj_ret[$obj->rowid] = $product_fourn_list; + + $i++; + } + } else { + throw new RestException(503, 'Error when retrieve product list : '.$this->db->lasterror()); + } + if (!count($obj_ret)) { + throw new RestException(404, 'No product found'); + } + return $obj_ret; } /** @@ -871,7 +876,7 @@ class Products extends DolibarrApi $product_fourn_list = $product_fourn->list_product_fournisseur_price($this->product->id, '', '', 0, 0); } - foreach($product_fourn_list as $tmpobj) { + foreach ($product_fourn_list as $tmpobj) { $this->_cleanObjectDatas($tmpobj); } @@ -880,21 +885,71 @@ class Products extends DolibarrApi /** * Get attributes. - * + * + * @param string $sortfield Sort field + * @param string $sortorder Sort order + * @param int $limit Limit for list + * @param int $page Page number + * @param string $sqlfilters Other criteria to filter answers separated by a comma. Syntax example "(t.ref:like:color)" * @return array * * @throws RestException * * @url GET attributes */ - public function getAttributes() + public function getAttributes($sortfield = "t.ref", $sortorder = 'ASC', $limit = 100, $page = 0, $sqlfilters = '') { if (!DolibarrApiAccess::$user->rights->produit->lire) { throw new RestException(401); } - $prodattr = new ProductAttribute($this->db); - return $prodattr->fetchAll(); + $sql = "SELECT t.rowid, t.ref, t.ref_ext, t.label, t.rang, t.entity"; + $sql .= " FROM ".MAIN_DB_PREFIX."product_attribute as t"; + $sql .= ' WHERE t.entity IN ('.getEntity('product').')'; + + // Add sql filters + if ($sqlfilters) { + if (!DolibarrApi::_checkFilters($sqlfilters)) { + throw new RestException(503, 'Error when validating parameter sqlfilters '.$sqlfilters); + } + $regexstring = '\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)'; + $sql .= " AND (".preg_replace_callback('/'.$regexstring.'/', 'DolibarrApi::_forge_criteria_callback', $sqlfilters).")"; + } + + $sql .= $this->db->order($sortfield, $sortorder); + if ($limit) { + if ($page < 0) { + $page = 0; + } + $offset = $limit * $page; + + $sql .= $this->db->plimit($limit, $offset); + } + + $result = $this->db->query($sql); + + if (!$result) { + throw new RestException(503, 'Error when retrieve product attribute list : '.$this->db->lasterror()); + } + + $return = []; + while ($result = $this->db->fetch_object($query)) { + $tmp = new ProductAttribute($this->db); + $tmp->id = $result->rowid; + $tmp->ref = $result->ref; + $tmp->ref_ext = $result->ref_ext; + $tmp->label = $result->label; + $tmp->rang = $result->rang; + $tmp->entity = $result->entity; + + $return[] = $this->_cleanObjectDatas($tmp); + } + + if (!count($return)) { + throw new RestException(404, 'No product attribute found'); + } + + return $return; } /** @@ -919,9 +974,25 @@ class Products extends DolibarrApi $result = $prodattr->fetch((int) $id); if ($result < 0) { - throw new RestException(404, "Attribute not found"); + throw new RestException(404, "Product attribute not found"); } + $fields = ["id", "ref", "ref_ext", "label", "rang", "entity"]; + + foreach ($prodattr as $field => $value) { + if (!in_array($field, $fields)) { + unset($prodattr->{$field}); + } + } + + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."product_attribute_combination2val as pac2v"; + $sql .= " JOIN ".MAIN_DB_PREFIX."product_attribute_combination as pac ON pac2v.fk_prod_combination = pac.rowid"; + $sql .= " WHERE pac2v.fk_prod_attr = ".((int) $prodattr->id)." AND pac.entity IN (".getEntity('product').")"; + + $resql = $this->db->query($sql); + $obj = $this->db->fetch_object($resql); + $prodattr->is_used_by_products = (int) $obj->nb; + return $prodattr; } @@ -942,7 +1013,7 @@ class Products extends DolibarrApi throw new RestException(401); } - $sql = "SELECT rowid, ref, label, rang FROM ".MAIN_DB_PREFIX."product_attribute WHERE ref LIKE '".trim($ref)."' AND entity IN (".getEntity('product').")"; + $sql = "SELECT rowid, ref, ref_ext, label, rang, entity FROM ".MAIN_DB_PREFIX."product_attribute WHERE ref LIKE '".trim($ref)."' AND entity IN (".getEntity('product').")"; $query = $this->db->query($sql); @@ -955,8 +1026,65 @@ class Products extends DolibarrApi $attr = []; $attr['id'] = $result->rowid; $attr['ref'] = $result->ref; + $attr['ref_ext'] = $result->ref_ext; $attr['label'] = $result->label; $attr['rang'] = $result->rang; + $attr['entity'] = $result->entity; + + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."product_attribute_combination2val as pac2v"; + $sql .= " JOIN ".MAIN_DB_PREFIX."product_attribute_combination as pac ON pac2v.fk_prod_combination = pac.rowid"; + $sql .= " WHERE pac2v.fk_prod_attr = ".((int) $result->rowid)." AND pac.entity IN (".getEntity('product').")"; + + $resql = $this->db->query($sql); + $obj = $this->db->fetch_object($resql); + + $attr["is_used_by_products"] = (int) $obj->nb; + + return $attr; + } + + /** + * Get attributes by ref_ext. + * + * @param string $ref_ext External reference of Attribute + * @return array + * + * @throws RestException 500 + * @throws RestException 401 + * + * @url GET attributes/ref_ext/{ref_ext} + */ + public function getAttributesByRefExt($ref_ext) + { + if (!DolibarrApiAccess::$user->rights->produit->lire) { + throw new RestException(401); + } + + $sql = "SELECT rowid, ref, ref_ext, label, rang, entity FROM ".MAIN_DB_PREFIX."product_attribute WHERE ref_ext LIKE '".trim($ref_ext)."' AND entity IN (".getEntity('product').")"; + + $query = $this->db->query($sql); + + if (!$this->db->num_rows($query)) { + throw new RestException(404); + } + + $result = $this->db->fetch_object($query); + + $attr = []; + $attr['id'] = $result->rowid; + $attr['ref'] = $result->ref; + $attr['ref_ext'] = $result->ref_ext; + $attr['label'] = $result->label; + $attr['rang'] = $result->rang; + $attr['entity'] = $result->entity; + + $sql = "SELECT COUNT(*) as nb FROM ".MAIN_DB_PREFIX."product_attribute_combination2val as pac2v"; + $sql .= " JOIN ".MAIN_DB_PREFIX."product_attribute_combination as pac ON pac2v.fk_prod_combination = pac.rowid"; + $sql .= " WHERE pac2v.fk_prod_attr = ".((int) $result->rowid)." AND pac.entity IN (".getEntity('product').")"; + + $resql = $this->db->query($sql); + $obj = $this->db->fetch_object($resql); + $attr["is_used_by_products"] = (int) $obj->nb; return $attr; } @@ -966,6 +1094,7 @@ class Products extends DolibarrApi * * @param string $ref Reference of Attribute * @param string $label Label of Attribute + * @param string $ref_ext Reference of Attribute * @return int * * @throws RestException 500 @@ -973,7 +1102,7 @@ class Products extends DolibarrApi * * @url POST attributes */ - public function addAttributes($ref, $label) + public function addAttributes($ref, $label, $ref_ext = '') { if (!DolibarrApiAccess::$user->rights->produit->creer) { throw new RestException(401); @@ -982,6 +1111,7 @@ class Products extends DolibarrApi $prodattr = new ProductAttribute($this->db); $prodattr->label = $label; $prodattr->ref = $ref; + $prodattr->ref_ext = $ref_ext; $resid = $prodattr->create(DolibarrApiAccess::$user); if ($resid <= 0) { @@ -1059,7 +1189,7 @@ class Products extends DolibarrApi $result = $prodattr->delete(DolibarrApiAccess::$user); if ($result <= 0) { - throw new RestException(500, "Error deleting attribute"); + throw new RestException(500, "Error deleting attribute"); } return $result; @@ -1163,9 +1293,23 @@ class Products extends DolibarrApi throw new RestException(401); } - $sql = "DELETE FROM ".MAIN_DB_PREFIX."product_attribute_value WHERE ref LIKE '".trim($ref)."' AND fk_product_attribute = ".(int) $id; + $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."product_attribute_value WHERE ref LIKE '".trim($ref)."' AND fk_product_attribute = ".(int) $id." AND entity IN (".getEntity('product').")"; + $query = $this->db->query($sql); - if ($this->db->query($sql)) { + if (!$query) { + throw new RestException(401); + } + + if (!$this->db->num_rows($query)) { + throw new RestException(404, 'Attribute value not found'); + } + + $result = $this->db->fetch_object($query); + + $attrval = new ProductAttributeValue($this->db); + $attrval->id = $result->rowid; + $result = $attrval->delete(DolibarrApiAccess::$user); + if ($result > 0) { return 1; } @@ -1190,7 +1334,18 @@ class Products extends DolibarrApi } $objectval = new ProductAttributeValue($this->db); - return $objectval->fetchAllByProductAttribute((int) $id); + + $return = $objectval->fetchAllByProductAttribute((int) $id); + + if (count($return) == 0) { + throw new RestException(404, 'Attribute values not found'); + } + + foreach ($return as $key => $val) { + $return[$key] = $this->_cleanObjectDatas($return[$key]); + } + + return $return; } /** @@ -1212,19 +1367,19 @@ class Products extends DolibarrApi $return = array(); $sql = 'SELECT '; - $sql .= 'v.fk_product_attribute, v.rowid, v.ref, v.value FROM '.MAIN_DB_PREFIX.'product_attribute_value v '; - $sql .= "WHERE v.fk_product_attribute = ( SELECT rowid FROM ".MAIN_DB_PREFIX."product_attribute WHERE ref LIKE '".strtoupper(trim($ref))."' LIMIT 1)"; + $sql .= 'v.fk_product_attribute, v.rowid, v.ref, v.value FROM '.MAIN_DB_PREFIX.'product_attribute_value as v'; + $sql .= " WHERE v.fk_product_attribute IN (SELECT rowid FROM ".MAIN_DB_PREFIX."product_attribute WHERE ref LIKE '".$this->db->escape(trim($ref))."')"; - $query = $this->db->query($sql); + $resql = $this->db->query($sql); - while ($result = $this->db->fetch_object($query)) { + while ($result = $this->db->fetch_object($resql)) { $tmp = new ProductAttributeValue($this->db); $tmp->fk_product_attribute = $result->fk_product_attribute; $tmp->id = $result->rowid; $tmp->ref = $result->ref; $tmp->value = $result->value; - $return[] = $tmp; + $return[] = $this->_cleanObjectDatas($tmp); } return $return; @@ -1330,7 +1485,7 @@ class Products extends DolibarrApi $objectval = new ProductAttributeValue($this->db); $objectval->id = (int) $id; - if ($objectval->delete() > 0) { + if ($objectval->delete(DolibarrApiAccess::$user) > 0) { return 1; } throw new RestException(500, "Error deleting attribute value"); @@ -1407,7 +1562,8 @@ class Products extends DolibarrApi * @param float $price_impact Price impact of variant * @param bool $price_impact_is_percent Price impact in percent (true or false) * @param array $features List of attributes pairs id_attribute->id_value. Example: array(id_color=>id_Blue, id_size=>id_small, id_option=>id_val_a, ...) - * @param bool|string $reference Customized reference of variant + * @param string $reference Customized reference of variant + * @param string $ref_ext External reference of variant * @return int * * @throws RestException 500 @@ -1416,7 +1572,7 @@ class Products extends DolibarrApi * * @url POST {id}/variants */ - public function addVariant($id, $weight_impact, $price_impact, $price_impact_is_percent, $features, $reference = false) + public function addVariant($id, $weight_impact, $price_impact, $price_impact_is_percent, $features, $reference = '', $ref_ext = '') { if (!DolibarrApiAccess::$user->rights->produit->creer) { throw new RestException(401); @@ -1447,12 +1603,12 @@ class Products extends DolibarrApi $prodcomb = new ProductCombination($this->db); - $result = $prodcomb->createProductCombination(DolibarrApiAccess::$user, $this->product, $features, array(), $price_impact_is_percent, $price_impact, $weight_impact, $reference); + $result = $prodcomb->createProductCombination(DolibarrApiAccess::$user, $this->product, $features, array(), $price_impact_is_percent, $price_impact, $weight_impact, $reference, $ref_ext); if ($result > 0) { - return $result; + return $result; } else { - throw new RestException(500, "Error creating new product variant"); + throw new RestException(500, "Error creating new product variant"); } } @@ -1575,7 +1731,7 @@ class Products extends DolibarrApi $result = $prodcomb->delete(DolibarrApiAccess::$user); if ($result <= 0) { - throw new RestException(500, "Error deleting variant"); + throw new RestException(500, "Error deleting variant"); } return $result; } @@ -1638,14 +1794,15 @@ class Products extends DolibarrApi * @param string $ref_ext Ref ext of element * @param string $barcode Barcode of element * @param int $includestockdata Load also information about stock (slower) - * @param bool $includesubproducts Load information about subproducts + * @param bool $includesubproducts Load information about subproducts (if product is a virtual product) + * @param bool $includeparentid Load also ID of parent product (if product is a variant of a parent product) * @return array|mixed Data without useless information * * @throws RestException 401 * @throws RestException 403 * @throws RestException 404 */ - private function _fetch($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0, $includesubproducts = false) + private function _fetch($id, $ref = '', $ref_ext = '', $barcode = '', $includestockdata = 0, $includesubproducts = false, $includeparentid = false) { if (empty($id) && empty($ref) && empty($ref_ext) && empty($barcode)) { throw new RestException(400, 'bad value for parameter id, ref, ref_ext or barcode'); @@ -1667,17 +1824,17 @@ class Products extends DolibarrApi } if ($includestockdata) { - $this->product->load_stock(); + $this->product->load_stock(); - if (is_array($this->product->stock_warehouse)) { - foreach ($this->product->stock_warehouse as $keytmp => $valtmp) { - if (is_array($this->product->stock_warehouse[$keytmp]->detail_batch)) { - foreach ($this->product->stock_warehouse[$keytmp]->detail_batch as $keytmp2 => $valtmp2) { - unset($this->product->stock_warehouse[$keytmp]->detail_batch[$keytmp2]->db); - } - } - } - } + if (is_array($this->product->stock_warehouse)) { + foreach ($this->product->stock_warehouse as $keytmp => $valtmp) { + if (is_array($this->product->stock_warehouse[$keytmp]->detail_batch)) { + foreach ($this->product->stock_warehouse[$keytmp]->detail_batch as $keytmp2 => $valtmp2) { + unset($this->product->stock_warehouse[$keytmp]->detail_batch[$keytmp2]->db); + } + } + } + } } if ($includesubproducts) { @@ -1692,6 +1849,14 @@ class Products extends DolibarrApi $this->product->sousprods = $childs; } + if ($includeparentid) { + $prodcomb = new ProductCombination($this->db); + $this->product->fk_product_parent = null; + if (($fk_product_parent = $prodcomb->fetchByFkProductChild($this->product->id)) > 0) { + $this->product->fk_product_parent = $fk_product_parent; + } + } + return $this->_cleanObjectDatas($this->product); } } diff --git a/htdocs/product/class/html.formproduct.class.php b/htdocs/product/class/html.formproduct.class.php index 903eedd3e8a..a0fd2bdb10c 100644 --- a/htdocs/product/class/html.formproduct.class.php +++ b/htdocs/product/class/html.formproduct.class.php @@ -101,13 +101,10 @@ class FormProduct if (!empty($batch)) { $sql .= ", pb.qty as stock"; - } - else - { + } else { $sql .= ", ps.reel as stock"; } - } - elseif ($sumStock) + } elseif ($sumStock) { $sql .= ", sum(ps.reel) as stock"; } @@ -115,19 +112,17 @@ class FormProduct $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_stock as ps on ps.fk_entrepot = e.rowid"; if (!empty($fk_product)) { - $sql .= " AND ps.fk_product = '".$fk_product."'"; + $sql .= " AND ps.fk_product = ".((int) $fk_product); if (!empty($batch)) { - $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_batch as pb on pb.fk_product_stock = ps.rowid AND pb.batch = '".$batch."'"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_batch as pb on pb.fk_product_stock = ps.rowid AND pb.batch = '".$this->db->escape($batch)."'"; } } $sql .= " WHERE e.entity IN (".getEntity('stock').")"; if (count($warehouseStatus)) { - $sql .= " AND e.statut IN (".$this->db->escape(implode(',', $warehouseStatus)).")"; - } - else - { + $sql .= " AND e.statut IN (".$this->db->sanitize($this->db->escape(implode(',', $warehouseStatus))).")"; + } else { $sql .= " AND e.statut = 1"; } @@ -178,9 +173,7 @@ class FormProduct } return $num; - } - else - { + } else { dol_print_error($this->db); return -1; } @@ -256,8 +249,12 @@ class FormProduct } if (strpos($htmlname, 'search_') !== 0) { - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; + if (empty($user->fk_warehouse) || $user->fk_warehouse == -1){ + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $selected = $conf->global->MAIN_DEFAULT_WAREHOUSE; + } + else { + if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE_USER)) $selected = $user->fk_warehouse; + } } $out .= ''; print ''; - } - else { + } else { print ''.$nb_of_subproduct.''; print ''.($value['incdec'] == 1 ? 'x' : '').''; } print ''."\n"; - } - else - { + } else { $hide = ''; if (empty($conf->global->PRODUCT_SHOW_SUB_SUB_PRODUCTS)) $hide = ' hideobject'; // By default, we do not show this. It makes screen very difficult to understand @@ -469,9 +449,7 @@ if ($id > 0 || !empty($ref)) } print ''; print ''."\n"; - } - else - { + } else { $colspan = 8; if (!empty($conf->stock->enabled)) $colspan++; @@ -600,9 +578,7 @@ if ($id > 0 || !empty($ref)) //$addchecked = ' checked'; $qty = $object->is_sousproduit_qty; $incdec = $object->is_sousproduit_incdec; - } - else - { + } else { //$addchecked = ''; $qty = 0; $incdec = 0; @@ -616,8 +592,7 @@ if ($id > 0 || !empty($ref)) // Inc Dec print ''; if ($qty) print ''; - else - { + else { // TODO Hide field and show it when setting a qty print ''; //print ''; @@ -636,9 +611,7 @@ if ($id > 0 || !empty($ref)) print ''; print ''; } - } - else - { + } else { dol_print_error($db); } print ''; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index e5702078dd2..8d06e211bab 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -42,7 +42,7 @@ $langs->loadLangs(array('other', 'products')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); // Security check @@ -313,9 +313,7 @@ if ($object->id) $filename = $filetoadd['name'].' - '.$langs->trans('Language_'.$default_lang); $checked = ' checked '; } - } - else - { + } else { if (array_key_exists($filetoadd['name'], $filetomerge->lines)) { $checked = ' checked '; @@ -337,9 +335,7 @@ if ($object->id) print ''; } } -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/product/dynamic_price/class/price_expression.class.php b/htdocs/product/dynamic_price/class/price_expression.class.php index 420d5aaddb2..cf498d6f998 100644 --- a/htdocs/product/dynamic_price/class/price_expression.class.php +++ b/htdocs/product/dynamic_price/class/price_expression.class.php @@ -123,9 +123,7 @@ class PriceExpression } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -162,14 +160,10 @@ class PriceExpression $this->title = $obj->title; $this->expression = $obj->expression; return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -205,9 +199,7 @@ class PriceExpression $this->db->free($resql); return $retarray; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -236,14 +228,10 @@ class PriceExpression if ($obj) { return (int) $obj->rowid; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -301,9 +289,7 @@ class PriceExpression } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -359,9 +345,7 @@ class PriceExpression } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/product/dynamic_price/class/price_global_variable.class.php b/htdocs/product/dynamic_price/class/price_global_variable.class.php index acede724da5..f2ab8006b02 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable.class.php @@ -128,9 +128,7 @@ class PriceGlobalVariable } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -162,14 +160,10 @@ class PriceGlobalVariable $this->value = $obj->value; $this->checkParameters(); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -225,9 +219,7 @@ class PriceGlobalVariable } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -282,9 +274,7 @@ class PriceGlobalVariable } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -349,9 +339,7 @@ class PriceGlobalVariable $this->db->free($resql); return $retarray; - } - else - { + } else { $this->error = $this->db->error(); return -1; } diff --git a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php index 0c8e25e8751..6706dded094 100644 --- a/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php +++ b/htdocs/product/dynamic_price/class/price_global_variable_updater.class.php @@ -144,9 +144,7 @@ class PriceGlobalVariableUpdater } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return $this->id; } @@ -182,14 +180,10 @@ class PriceGlobalVariableUpdater $this->last_status = $obj->last_status; $this->checkParameters(); return 1; - } - else - { + } else { return 0; } - } - else - { + } else { $this->error = "Error ".$this->db->lasterror(); return -1; } @@ -249,9 +243,7 @@ class PriceGlobalVariableUpdater } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -305,9 +297,7 @@ class PriceGlobalVariableUpdater } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -399,9 +389,7 @@ class PriceGlobalVariableUpdater $this->db->free($resql); return $retarray; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -441,9 +429,7 @@ class PriceGlobalVariableUpdater $this->db->free($resql); return $retarray; - } - else - { + } else { $this->error = $this->db->error(); return -1; } @@ -598,9 +584,7 @@ class PriceGlobalVariableUpdater } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } @@ -644,9 +628,7 @@ class PriceGlobalVariableUpdater } $this->db->rollback(); return -1 * $error; - } - else - { + } else { $this->db->commit(); return 1; } diff --git a/htdocs/product/dynamic_price/class/price_parser.class.php b/htdocs/product/dynamic_price/class/price_parser.class.php index 6659dc56054..7a7dd5aac56 100644 --- a/htdocs/product/dynamic_price/class/price_parser.class.php +++ b/htdocs/product/dynamic_price/class/price_parser.class.php @@ -103,20 +103,16 @@ class PriceParser if (in_array($code, array(9, 14, 19, 20))) //Errors which have 0 arg { return $langs->trans("ErrorPriceExpression".$code); - } - elseif (in_array($code, array(1, 2, 3, 4, 5, 8, 10, 11, 17, 21, 22))) //Errors which have 1 arg + } elseif (in_array($code, array(1, 2, 3, 4, 5, 8, 10, 11, 17, 21, 22))) //Errors which have 1 arg { return $langs->trans("ErrorPriceExpression".$code, $info); - } - elseif (in_array($code, array(6, 23))) //Errors which have 2 args + } elseif (in_array($code, array(6, 23))) //Errors which have 2 args { return $langs->trans("ErrorPriceExpression".$code, $info[0], $info[1]); - } - elseif (in_array($code, array(7, 12, 13, 15, 16, 18))) //Internal errors + } elseif (in_array($code, array(7, 12, 13, 15, 16, 18))) //Internal errors { return $langs->trans("ErrorPriceExpressionInternal", $code); - } - else //Unknown errors + } else //Unknown errors { return $langs->trans("ErrorPriceExpressionUnknown", $code); } @@ -276,7 +272,7 @@ class PriceParser if ($res < 0) { $this->error_parser = array(25, null); return -1; - } elseif ($res == 0) { + } elseif ($res == 0) { $supplier_min_price = 0; } else { $supplier_min_price = $productFournisseur->fourn_unitprice; diff --git a/htdocs/product/dynamic_price/editor.php b/htdocs/product/dynamic_price/editor.php index bf2f58f63f3..b59319ad985 100644 --- a/htdocs/product/dynamic_price/editor.php +++ b/htdocs/product/dynamic_price/editor.php @@ -33,7 +33,7 @@ $langs->loadLangs(array('products', 'accountancy')); //"Back" translation is on $id = GETPOST('id', 'int'); $eid = GETPOST('eid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $title = GETPOST('expression_title', 'alpha'); $expression = GETPOST('expression'); $tab = GETPOST('tab', 'alpha'); @@ -54,8 +54,7 @@ $price_globals = new PriceGlobalVariable($db); if (empty($eid)) //This also disables fetch when eid == 0 { $eid = 0; -} -elseif ($action != 'delete') +} elseif ($action != 'delete') { $price_expression->fetch($eid); } @@ -77,9 +76,7 @@ if ($action == 'add') $price_result = $priceparser->testExpression($id, $expression); if ($price_result < 0) { //Expression is not valid setEventMessages($priceparser->translatedError(), null, 'errors'); - } - else - { + } else { $price_expression->title = $title; $price_expression->expression = $expression; $result = $price_expression->create($user); @@ -87,19 +84,14 @@ if ($action == 'add') { $eid = $price_expression->id; setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); - } - else - { + } else { setEventMessages("add: ".$price_expression->error, $price_expression->errors, 'errors'); } } - } - elseif ($result < 0) + } elseif ($result < 0) { setEventMessages("add find: ".$price_expression->error, $price_expression->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("ErrorRecordAlreadyExists"), null, 'errors'); } } @@ -117,9 +109,7 @@ if ($action == 'update') $price_result = $priceparser->testExpression($id, $expression); if ($price_result < 0) { //Expression is not valid setEventMessages($priceparser->translatedError(), null, 'errors'); - } - else - { + } else { $price_expression->id = $eid; $price_expression->title = $title; $price_expression->expression = $expression; @@ -127,19 +117,14 @@ if ($action == 'update') if ($result < 0) { setEventMessages("update: ".$price_expression->error, $price_expression->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); } } - } - elseif ($result < 0) + } elseif ($result < 0) { setEventMessages("update find: ".$price_expression->error, $price_expression->errors, 'errors'); - } - else - { + } else { setEventMessages($langs->trans("ErrorRecordAlreadyExists"), null, 'errors'); } } @@ -220,10 +205,8 @@ print ''.$langs->trans("Back").''; if ($eid == 0) { print '
    '.$langs->trans('Delete').'
    '."\n"; -} -else -{ - print ''; +} else { + print ''; } print '
    '; diff --git a/htdocs/product/fournisseurs.php b/htdocs/product/fournisseurs.php index 9140de09513..fb1be576ad5 100644 --- a/htdocs/product/fournisseurs.php +++ b/htdocs/product/fournisseurs.php @@ -47,7 +47,7 @@ $langs->loadLangs(array('products', 'suppliers', 'bills', 'margins', 'stocks')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); $rowid = GETPOST('rowid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'pricesuppliercard'; @@ -127,9 +127,7 @@ if (empty($reshook)) { setEventMessages($langs->trans("RecordSaved"), null, 'mesgs'); $action = ''; - } - else - { + } else { $error++; setEventMessages($object->error, $object->errors, 'errors'); } @@ -210,9 +208,7 @@ if (empty($reshook)) $error++; $langs->load("errors"); setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Price")), null, 'errors'); - } - else - { + } else { $_POST["price"] = 0; } } @@ -255,8 +251,7 @@ if (empty($reshook)) $productLink = $object->getNomUrl(1, 'supplier'); setEventMessages($langs->trans("ReferenceSupplierIsAlreadyAssociatedWithAProduct", $productLink), null, 'errors'); - } - elseif ($ret < 0) + } elseif ($ret < 0) { $error++; setEventMessages($object->error, $object->errors, 'errors'); @@ -286,8 +281,8 @@ if (empty($reshook)) $sql .= '"'.$value.'", '; } $sql = substr($sql, 0, strlen($sql) - 2).')'; - } // else update the existing one - else { + } else { + // update the existing one $sql = "UPDATE ".MAIN_DB_PREFIX."product_fournisseur_price_extrafields SET "; foreach ($extrafield_values as $key => $value) { $sql .= str_replace('options_', '', $key).' = "'.$value.'", '; @@ -315,9 +310,7 @@ if (empty($reshook)) { $error++; setEventMessages($object->error, $object->errors, 'errors'); - } - else - { + } else { if (!empty($conf->dynamicprices->enabled) && $price_expression !== '') { //Check the expression validity by parsing it @@ -346,14 +339,10 @@ if (empty($reshook)) { $db->commit(); $action = ''; - } - else - { + } else { $db->rollback(); } - } - else - { + } else { $action = 'add_price'; } } @@ -458,9 +447,7 @@ if ($id > 0 || $ref) { $object->fetch_product_fournisseur_price($rowid, 1); //Ignore the math expression when getting the price print load_fiche_titre($langs->trans("ChangeSupplierPrice")); - } - else - { + } else { print load_fiche_titre($langs->trans("AddSupplierPrice")); } @@ -483,9 +470,7 @@ if ($id > 0 || $ref) print ''; print ''; print ''; - } - else - { + } else { $events = array(); $events[] = array('method' => 'getVatRates', 'url' => dol_buildpath('/core/ajax/vatrates.php', 1), 'htmlname' => 'tva_tx', 'params' => array()); print $form->select_company(GETPOST("id_fourn", 'alpha'), 'id_fourn', 'fournisseur=1', 'SelectThirdParty', 0, 0, $events); @@ -508,9 +493,7 @@ if ($id > 0 || $ref) { print ''; print ''; - } - else - { + } else { print ''; } print ''; @@ -534,9 +517,7 @@ if ($id > 0 || $ref) { print ''; print $object->fourn_qty; - } - else - { + } else { print ''; } // Units @@ -569,9 +550,7 @@ if ($id > 0 || $ref) $tmpproductsupplier->fetch_product_fournisseur_price($rowid, 1); $default_vat = $tmpproductsupplier->fourn_tva_tx; $default_npr = $tmpproductsupplier->fourn_tva_npr; - } - else - { + } else { if (empty($default_vat)) { $default_vat = $object->tva_tx; @@ -879,6 +858,50 @@ SCRIPT; print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1); + // Definition of fields for lists + // Some fields are missing because they are not included in the database query + $arrayfields = array( + 'pfp.datec'=>array('label'=>$langs->trans("AppliedPricesFrom"), 'checked'=>1, 'position'=>1), + 's.nom'=>array('label'=>$langs->trans("Suppliers"), 'checked'=>1, 'position'=>2), + 'pfp.fk_availability'=>array('label'=>$langs->trans("Availability"), 'enabled' => !empty($conf->global->FOURN_PRODUCT_AVAILABILITY), 'checked'=>0, 'position'=>4), + 'pfp.quantity'=>array('label'=>$langs->trans("QtyMin"), 'checked'=>1, 'position'=>5), + 'pfp.unitprice'=>array('label'=>$langs->trans("UnitPriceHT"), 'checked'=>1, 'position'=>9), + 'pfp.multicurrency_unitprice'=>array('label'=>$langs->trans("UnitPriceHTCurrency"), 'enabled' => $conf->multicurrency->enabled, 'checked'=>0, 'position'=>10), + 'pfp.delivery_time_days'=>array('label'=>$langs->trans("NbDaysToDelivery"), 'checked'=>1, 'position'=>13), + 'pfp.supplier_reputation'=>array('label'=>$langs->trans("ReputationForThisProduct"), 'checked'=>1, 'position'=>14), + 'pfp.barcode'=>array('label'=>$langs->trans("BarcodeValue"), 'enabled' => $conf->barcode->enabled, 'checked'=>0, 'position'=>15), + 'pfp.fk_barcode_type'=>array('label'=>$langs->trans("BarcodeType"), 'enabled' => $conf->barcode->enabled, 'checked'=>0, 'position'=>16), + 'pfp.packaging'=>array('label'=>$langs->trans("PackagingForThisProduct"), 'enabled' => !empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING), 'checked'=>0, 'position'=>17), + 'pfp.tms'=>array('label'=>$langs->trans("DateModification"), 'enabled' => $conf->barcode->enabled, 'checked'=>1, 'position'=>18), + ); + + // fetch optionals attributes and labels + $extrafields->fetch_name_optionals_label("product_fournisseur_price"); + $extralabels = $extrafields->attributes["product_fournisseur_price"]['label']; + + if (!empty($extralabels)) { + foreach ($extralabels as $key => $value) { + // Show field if not hidden + if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + $extratitle = $langs->trans($value); + $arrayfields['ef.'.$key] = array('label'=>$extratitle, 'checked'=>0, 'position'=>(end($arrayfields)['position']+1), 'langfile'=>$extrafields->attributes["product_fournisseur_price"]['langfile'][$key], 'help'=>$extrafields->attributes["product_fournisseur_price"]['help'][$key]); + } + } + } + + // Selection of new fields + include DOL_DOCUMENT_ROOT.'/core/actions_changeselectedfields.inc.php'; + + $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; + $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + + print '
    '; + print ''; + print ''; + print ''; + print ''; + print ''; + // Suppliers list title print '
    '; print ''; @@ -886,42 +909,37 @@ SCRIPT; $param = "&id=".$object->id; print ''; - print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); + if (!empty($arrayfields['pfp.datec']['checked'])) print_liste_field_titre("AppliedPricesFrom", $_SERVER["PHP_SELF"], "pfp.datec", "", $param, "", $sortfield, $sortorder); + if (!empty($arrayfields['s.nom']['checked'])) print_liste_field_titre("Suppliers", $_SERVER["PHP_SELF"], "s.nom", "", $param, "", $sortfield, $sortorder); print_liste_field_titre("SupplierRef", $_SERVER["PHP_SELF"], "", "", $param, "", $sortfield, $sortorder); - if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) print_liste_field_titre("Availability", $_SERVER["PHP_SELF"], "pfp.fk_availability", "", $param, "", $sortfield, $sortorder); - print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['pfp.fk_availability']['checked'])) print_liste_field_titre("Availability", $_SERVER["PHP_SELF"], "pfp.fk_availability", "", $param, "", $sortfield, $sortorder); + if (!empty($arrayfields['pfp.quantity']['checked'])) print_liste_field_titre("QtyMin", $_SERVER["PHP_SELF"], "pfp.quantity", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("VATRate", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("PriceQtyMinHT", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); - if ($conf->multicurrency->enabled) { - print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); - } - print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, '', $sortfield, $sortorder, 'right '); - if ($conf->multicurrency->enabled) { - print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); - } + if ($conf->multicurrency->enabled) print_liste_field_titre("PriceQtyMinHTCurrency", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['pfp.unitprice']['checked'])) print_liste_field_titre("UnitPriceHT", $_SERVER["PHP_SELF"], "pfp.unitprice", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['pfp.multicurrency_unitprice']['checked'])) print_liste_field_titre("UnitPriceHTCurrency", $_SERVER["PHP_SELF"], "pfp.multicurrency_unitprice", "", $param, '', $sortfield, $sortorder, 'right '); + if ($conf->multicurrency->enabled) print_liste_field_titre("Currency", $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder, 'right '); print_liste_field_titre("DiscountQtyMin", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, '', $sortfield, $sortorder, 'right '); - print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, '', $sortfield, $sortorder, 'center '); - if ($conf->barcode->enabled) { - print_liste_field_titre("BarcodeValue", $_SERVER["PHP_SELF"], "pfp.barcode", "", $param, '', $sortfield, $sortorder, 'center '); - print_liste_field_titre("BarcodeType", $_SERVER["PHP_SELF"], "pfp.fk_barcode_type", "", $param, '', $sortfield, $sortorder, 'center '); - } - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) print_liste_field_titre("PackagingForThisProduct", $_SERVER["PHP_SELF"], "pfp.packaging", "", $param, 'align="center"', $sortfield, $sortorder); - print_liste_field_titre("DateModification", $_SERVER["PHP_SELF"], "pfp.tms", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['pfp.delivery_time_days']['checked'])) print_liste_field_titre("NbDaysToDelivery", $_SERVER["PHP_SELF"], "pfp.delivery_time_days", "", $param, '', $sortfield, $sortorder, 'right '); + if (!empty($arrayfields['pfp.supplier_reputation']['checked'])) print_liste_field_titre("ReputationForThisProduct", $_SERVER["PHP_SELF"], "pfp.supplier_reputation", "", $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['pfp.barcode']['checked'])) print_liste_field_titre("BarcodeValue", $_SERVER["PHP_SELF"], "pfp.barcode", "", $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) print_liste_field_titre("BarcodeType", $_SERVER["PHP_SELF"], "pfp.fk_barcode_type", "", $param, '', $sortfield, $sortorder, 'center '); + if (!empty($arrayfields['pfp.packaging']['checked'])) print_liste_field_titre("PackagingForThisProduct", $_SERVER["PHP_SELF"], "pfp.packaging", "", $param, 'align="center"', $sortfield, $sortorder); + if (!empty($arrayfields['pfp.tms']['checked'])) print_liste_field_titre("DateModification", $_SERVER["PHP_SELF"], "pfp.tms", "", $param, '', $sortfield, $sortorder, 'right '); // fetch optionals attributes and labels $extrafields->fetch_name_optionals_label("product_fournisseur_price"); $extralabels = $extrafields->attributes["product_fournisseur_price"]['label']; + if (!empty($extralabels)) { foreach ($extralabels as $key => $value) { // Show field if not hidden if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { if (!empty($extrafields->attributes["product_fournisseur_price"]['langfile'][$key])) $langs->load($extrafields->attributes["product_fournisseur_price"]['langfile'][$key]); if (!empty($extrafields->attributes["product_fournisseur_price"]['help'][$key])) $extratitle = $form->textwithpicto($langs->trans($value), $langs->trans($extrafields->attributes["product_fournisseur_price"]['help'][$key])); - else $extratitle = $langs->trans($value); - print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right '); + else $extratitle = $langs->trans($value); + if (!empty($arrayfields['ef.'.$key]['checked'])) print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.'.$key, '', $param, '', $sortfield, $sortorder, 'right '); } } } @@ -931,7 +949,7 @@ SCRIPT; $parameters = array('id_fourn'=>$id_fourn, 'prod_id'=>$object->id); $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); } - print_liste_field_titre(''); + print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); print "\n"; if (is_array($product_fourn_list)) @@ -941,23 +959,25 @@ SCRIPT; print ''; // Date from - print ''; + if (!empty($arrayfields['pfp.datec']['checked'])) { + print ''; + } // Supplier - print ''; + if (!empty($arrayfields['s.nom']['checked'])) { + print ''; + } // Supplier ref if ($usercancreate) // change required right here { print ''; - } - else - { + } else { print ''; } // Availability - if (!empty($conf->global->FOURN_PRODUCT_AVAILABILITY)) + if (!empty($arrayfields['pfp.fk_availability']['checked'])) { $form->load_cache_availability(); $availability = $form->cache_availability[$productfourn->fk_availability]['label']; @@ -965,16 +985,18 @@ SCRIPT; } // Quantity - print ''; + if (!empty($arrayfields['pfp.quantity']['checked'])) { + print ''; + } // VAT rate print ''; + if (!empty($arrayfields['pfp.unitprice']['checked'])) { + print ''; + } - if ($conf->multicurrency->enabled) { - // Unit price in currency + // Unit price in currency + if (!empty($arrayfields['pfp.multicurrency_unitprice']['checked'])) { print ''; + print '';} - // Currency + // Currency + if ($conf->multicurrency->enabled) { print ''; @@ -1017,24 +1042,30 @@ SCRIPT; print ''; // Delivery delay - print ''; + if (!empty($arrayfields['pfp.delivery_time_days']['checked'])) { + print ''; + } // Reputation - print ''; } - print''; - if ($conf->barcode->enabled) { - // Barcode + // Barcode + if (!empty($arrayfields['pfp.barcode']['checked'])) { print ''; + print ''; + } - // Barcode type + // Barcode type + if (!empty($arrayfields['pfp.fk_barcode_type']['checked'])) { print ''; } // Date - print ''; + if (!empty($arrayfields['pfp.tms']['checked'])) { + print ''; + } // Extrafields if (!empty($extralabels)) { @@ -1068,14 +1100,14 @@ SCRIPT; if ($resql) { if ($db->num_rows($resql) != 1) { foreach ($extralabels as $key => $value) { - if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + if (!empty($arrayfields['ef.'.$key]['checked']) && !empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { print ""; } } } else { $obj = $db->fetch_object($resql); foreach ($extralabels as $key => $value) { - if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { + if (!empty($arrayfields['ef.'.$key]['checked']) && !empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { print '"; } } @@ -1104,20 +1136,17 @@ SCRIPT; print ''; } - } - else - { + } else { dol_print_error($db); } print '
    '.dol_print_date(($productfourn->fourn_date_creation ? $productfourn->fourn_date_creation : $productfourn->date_creation), 'dayhour').''.dol_print_date(($productfourn->fourn_date_creation ? $productfourn->fourn_date_creation : $productfourn->date_creation), 'dayhour').''.$productfourn->getSocNomUrl(1, 'supplier').''.$productfourn->getSocNomUrl(1, 'supplier').''.$productfourn->getNomUrl().''.$productfourn->fourn_ref.''; - print $productfourn->fourn_qty; - // Units - if ($conf->global->PRODUCT_USE_UNITS) { - $unit = $object->getLabelOfUnit(); - if ($unit !== '') { - print '  '.$langs->trans($unit); - } - } - print ''; + print $productfourn->fourn_qty; + // Units + if ($conf->global->PRODUCT_USE_UNITS) { + $unit = $object->getLabelOfUnit(); + if ($unit !== '') { + print '  '.$langs->trans($unit); + } + } + print ''; @@ -994,18 +1016,21 @@ SCRIPT; } // Unit price - print ''; - print price($productfourn->fourn_unitprice); - //print $objp->unitprice? price($objp->unitprice) : ($objp->quantity?price($objp->price/$objp->quantity):" "); - print ''; + print price($productfourn->fourn_unitprice); + //print $objp->unitprice? price($objp->unitprice) : ($objp->quantity?price($objp->price/$objp->quantity):" "); + print ''; print price($productfourn->fourn_multicurrency_unitprice); - print ''; print $productfourn->fourn_multicurrency_code ? currency_name($productfourn->fourn_multicurrency_code) : ''; print ''; - print $productfourn->delivery_time_days; - print ''; + print $productfourn->delivery_time_days; + print ''; - if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) { - print $object->reputations[$productfourn->supplier_reputation]; + if (!empty($arrayfields['pfp.supplier_reputation']['checked'])) { + print ''; + if (!empty($productfourn->supplier_reputation) && !empty($object->reputations[$productfourn->supplier_reputation])) { + print $object->reputations[$productfourn->supplier_reputation]; + } + print''; print $productfourn->barcode; - print ''; $productfourn->barcode_type = !empty($productfourn->fk_barcode_type) ? $productfourn->fk_barcode_type : 0; $productfourn->fetch_barcode(); @@ -1043,17 +1074,18 @@ SCRIPT; } // Packaging - if (!empty($conf->global->PRODUCT_USE_SUPPLIER_PACKAGING)) - { + if (!empty($arrayfields['pfp.packaging']['checked'])) { print ''; print price2num($productfourn->packaging); print ''; - print dol_print_date(($productfourn->fourn_date_modification ? $productfourn->fourn_date_modification : $productfourn->date_modification), "dayhour"); - print ''; + print dol_print_date(($productfourn->fourn_date_modification ? $productfourn->fourn_date_modification : $productfourn->date_modification), "dayhour"); + print ''.$extrafields->showOutputField($key, $obj->{$key})."
    '; print '
    '; + print '
    '; } } } -} -else -{ +} else { print $langs->trans("ErrorUnknown"); } diff --git a/htdocs/product/index.php b/htdocs/product/index.php index 6c5d1603168..53136237eca 100644 --- a/htdocs/product/index.php +++ b/htdocs/product/index.php @@ -224,9 +224,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA if ($i < $nbmax) { $dataseries[] = array($obj->label, round($obj->nb)); - } - else - { + } else { $rest += $obj->nb; } $total += $obj->nb; @@ -246,9 +244,7 @@ if (!empty($conf->categorie->enabled) && !empty($conf->global->CATEGORY_GRAPHSTA $dolgraph->setHeight('200'); $dolgraph->draw('idstatscategproduct'); print $dolgraph->show($total ? 0 : 1); - } - else - { + } else { while ($i < $num) { $obj = $db->fetch_object($result); @@ -331,7 +327,7 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us $sql = "SELECT label"; $sql .= " FROM ".MAIN_DB_PREFIX."product_lang"; $sql .= " WHERE fk_product=".$objp->rowid; - $sql .= " AND lang='".$langs->getDefaultLang()."'"; + $sql .= " AND lang='".$db->escape($langs->getDefaultLang())."'"; $resultd = $db->query($sql); if ($resultd) @@ -384,9 +380,7 @@ if ((!empty($conf->product->enabled) || !empty($conf->service->enabled)) && ($us print '
    '; print '
    '; } - } - else - { + } else { dol_print_error($db); } } @@ -456,8 +450,7 @@ function activitytrim($product_type) if ($product_type == 0) print ''.$langs->trans("ProductSellByQuarterHT").''; - else - print ''.$langs->trans("ServiceSellByQuarterHT").''; + else print ''.$langs->trans("ServiceSellByQuarterHT").''; print ''.$langs->trans("Quarter1").''; print ''.$langs->trans("Quarter2").''; print ''.$langs->trans("Quarter3").''; diff --git a/htdocs/product/inventory/ajax/ajax.inventory.php b/htdocs/product/inventory/ajax/ajax.inventory.php index 1ea99480bd6..85dd488df6f 100644 --- a/htdocs/product/inventory/ajax/ajax.inventory.php +++ b/htdocs/product/inventory/ajax/ajax.inventory.php @@ -20,9 +20,7 @@ switch ($put) $res = $det->update($user); echo $det->qty_view; - } - else - { + } else { echo -2; } @@ -40,9 +38,7 @@ switch ($put) $det->update($user); echo $det->new_pmp; - } - else - { + } else { echo -2; } diff --git a/htdocs/product/inventory/card.php b/htdocs/product/inventory/card.php index 0e8ab8bda55..f7dbc1f6410 100644 --- a/htdocs/product/inventory/card.php +++ b/htdocs/product/inventory/card.php @@ -22,9 +22,11 @@ */ require '../../main.inc.php'; -include_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; -include_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; -include_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/inventory/class/inventory.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/inventory/lib/inventory.lib.php'; // Load translation files required by the page $langs->loadLangs(array("stocks", "other")); @@ -35,15 +37,13 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); $cancel = GETPOST('cancel', 'aZ09'); -$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search +$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inventorycard'; // To manage different context of search $backtopage = GETPOST('backtopage', 'alpha'); if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { $result = restrictedArea($user, 'stock', $id); -} -else -{ +} else { $result = restrictedArea($user, 'stock', $id, '', 'inventory_advance'); } @@ -51,7 +51,7 @@ else $object = new Inventory($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->stock->dir_output.'/temp/massgeneration/'.$user->id; -$hookmanager->initHooks(array('inventorycard')); // Note that conf->hooks_modules contains array +$hookmanager->initHooks(array('inventorycard', 'globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels $extrafields->fetch_name_optionals_label($object->table_element); @@ -59,11 +59,11 @@ $extrafields->fetch_name_optionals_label($object->table_element); $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias -$search_all = trim(GETPOST("search_all", 'alpha')); +$search_all = GETPOST("search_all", 'alpha'); $search = array(); foreach ($object->fields as $key => $val) { - if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); + if (GETPOST('search_'.$key, 'alpha')) $search[$key] = GETPOST('search_'.$key, 'alpha'); } if (empty($action) && empty($id) && empty($ref)) $action = 'view'; @@ -78,13 +78,19 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ if (empty($conf->global->MAIN_USE_ADVANCED_PERMS)) { + $permissiontoread = $user->rights->stock->lire; $permissiontoadd = $user->rights->stock->creer; $permissiontodelete = $user->rights->stock->supprimer; -} -else -{ + $permissionnote = $user->rights->stock->creer; // Used by the include of actions_setnotes.inc.php + $permissiondellink = $user->rights->stock->creer; // Used by the include of actions_dellink.inc.php + $upload_dir = $conf->stock->multidir_output[isset($object->entity) ? $object->entity : 1]; +} else { + $permissiontoread = $user->rights->stock->inventory_advance->read; $permissiontoadd = $user->rights->stock->inventory_advance->write; $permissiontodelete = $user->rights->stock->inventory_advance->write; + $permissionnote = $user->rights->stock->inventory_advance->write; // Used by the include of actions_setnotes.inc.php + $permissiondellink = $user->rights->stock->inventory_advance->write; // Used by the include of actions_dellink.inc.php + $upload_dir = $conf->stock->multidir_output[isset($object->entity) ? $object->entity : 1]; } @@ -102,7 +108,15 @@ if (empty($reshook)) $backurlforlist = DOL_URL_ROOT.'/product/inventory/list.php'; - // Actions cancel, add, update, delete or clone + if (empty($backtopage) || ($cancel && empty($id))) { + if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) { + if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) $backtopage = $backurlforlist; + else $backtopage = dol_buildpath('/product/inventory/card.php', 1).'?id='.($id > 0 ? $id : '__ID__'); + } + } + $triggermodname = 'STOCK_INVENTORY_MODIFY'; // Name of trigger action code to execute when we modify record + + // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; // Actions when linking object each other @@ -111,11 +125,26 @@ if (empty($reshook)) // Actions when printing a doc from card include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; + // Action to move up and down lines of object + //include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; + + // Action to build doc + include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; + + /*if ($action == 'set_thirdparty' && $permissiontoadd) + { + $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY'); + }*/ + if ($action == 'classin' && $permissiontoadd) + { + $object->setProject(GETPOST('projectid', 'int')); + } + // Actions to send emails - /*$triggersendname = 'MYOBJECT_SENTBYMAIL'; - $autocopy='MAIN_MAIL_AUTOCOPY_MYOBJECT_TO'; - $trackid='myobject'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';*/ + $triggersendname = 'INVENTORY_SENTBYMAIL'; + $autocopy = 'MAIN_MAIL_AUTOCOPY_INVENTORY_TO'; + $trackid = 'stockinv'.$object->id; + include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; } @@ -126,8 +155,12 @@ if (empty($reshook)) */ $form = new Form($db); +$formfile = new FormFile($db); +$formproject = new FormProjets($db); -llxHeader('', $langs->trans('Inventory'), ''); +$title = $langs->trans("Inventory"); +$help_url = ''; +llxHeader('', $title, $help_url); // Example : Adding jquery code print ''; -$sql = "SELECT"; -$sql .= " t.rowid,"; -$sql .= " t.entity,"; -$sql .= " t.fk_product,"; -$sql .= " t.batch,"; -$sql .= " t.sellby,"; -$sql .= " t.eatby,"; -$sql .= " t.datec as date_creation,"; -$sql .= " t.tms as date_update,"; -$sql .= " t.fk_user_creat,"; -$sql .= " t.fk_user_modif,"; -$sql .= " t.import_key,"; -$sql .= " p.fk_product_type as product_type,"; -$sql .= " p.ref as product_ref,"; -$sql .= " p.label as product_label,"; -$sql .= " p.tosell,"; -$sql .= " p.tobuy,"; -$sql .= " p.tobatch"; -// Add fields for extrafields +// Build and execute select +// -------------------------------------------------------------------- +$sql = 'SELECT '; +foreach ($object->fields as $key => $val) +{ + $sql .= 't.'.$key.', '; +} +// Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { - foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); } // Add fields from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook -$sql .= $hookmanager->resPrint; -$sql .= " FROM ".MAIN_DB_PREFIX."product_lot as t"; +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook +$sql .= preg_replace('/^,/', '', $hookmanager->resPrint); +$sql = preg_replace('/,\s*$/', '', $sql); +$sql .= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; -$sql .= ", ".MAIN_DB_PREFIX."product as p"; -$sql .= " WHERE p.rowid = t.fk_product"; -$sql .= " AND p.entity IN (".getEntity('product').")"; - -if ($search_entity) $sql .= natural_search("entity", $search_entity); -if ($search_product) $sql .= natural_search("p.ref", $search_product); -if ($search_batch) $sql .= natural_search("batch", $search_batch); -if ($search_fk_user_creat) $sql .= natural_search("fk_user_creat", $search_fk_user_creat); -if ($search_fk_user_modif) $sql .= natural_search("fk_user_modif", $search_fk_user_modif); -if ($search_import_key) $sql .= natural_search("import_key", $search_import_key); - -if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall); +if ($object->ismultientitymanaged == 1) $sql .= " WHERE t.entity IN (".getEntity($object->element).")"; +else $sql .= " WHERE 1 = 1"; +foreach ($search as $key => $val) +{ + if ($key == 'status' && $search[$key] == -1) continue; + $mode_search = (($object->isInt($object->fields[$key]) || $object->isFloat($object->fields[$key])) ? 1 : 0); + if (strpos($object->fields[$key]['type'], 'integer:') === 0) { + if ($search[$key] == '-1') $search[$key] = ''; + $mode_search = 2; + } + if ($search[$key] != '') $sql .= natural_search($key, $search[$key], (($key == 'status') ? 2 : $mode_search)); +} +if ($search_all) $sql .= natural_search(array_keys($fieldstosearchall), $search_all); +//$sql.= dolSqlDateFilter("t.field", $search_xxxday, $search_xxxmonth, $search_xxxyear); // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; // Add where from hooks $parameters = array(); -$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters, $object); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; + +/* If a group by is required + $sql.= " GROUP BY "; + foreach($object->fields as $key => $val) + { + $sql.='t.'.$key.', '; + } + // Add fields from extrafields + if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); + } + // Add where from hooks + $parameters=array(); + $reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook + $sql.=$hookmanager->resPrint; + $sql=preg_replace('/,\s*$/','', $sql); + */ + $sql .= $db->order($sortfield, $sortorder); -//$sql.= $db->plimit($conf->liste_limit+1, $offset); // Count total nb of records $nbtotalofrecords = ''; if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { - $result = $db->query($sql); - $nbtotalofrecords = $db->num_rows($result); - if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + $resql = $db->query($sql); + $nbtotalofrecords = $db->num_rows($resql); + if (($page * $limit) > $nbtotalofrecords) // if total of record found is smaller than page * limit, goto and load page 0 { $page = 0; $offset = 0; } } - -$sql .= $db->plimit($limit + 1, $offset); - - -dol_syslog($script_file, LOG_DEBUG); -$resql = $db->query($sql); -if ($resql) +// if total of record found is smaller than limit, no need to do paging and to restart another select with limits set. +if (is_numeric($nbtotalofrecords) && ($limit > $nbtotalofrecords || empty($limit))) { + $num = $nbtotalofrecords; +} else { + if ($limit) $sql .= $db->plimit($limit + 1, $offset); + + $resql = $db->query($sql); + if (!$resql) + { + dol_print_error($db); + exit; + } + $num = $db->num_rows($resql); +} - $arrayofselected = is_array($toselect) ? $toselect : array(); +// Direct jump if only one record found +if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) +{ + $obj = $db->fetch_object($resql); + $id = $obj->rowid; + header("Location: ".dol_buildpath('/mymodule/myobject_card.php', 1).'?id='.$id); + exit; +} - $param = ''; - if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.$contextpage; - if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.$limit; - if ($search_entity != '') $param .= '&search_entity='.urlencode($search_entity); - if ($search_product != '') $param .= '&search_product='.urlencode($search_product); - if ($search_batch != '') $param .= '&search_batch='.urlencode($search_batch); - if ($search_fk_user_creat != '') $param .= '&search_fk_user_creat='.urlencode($search_fk_user_creat); - if ($search_fk_user_modif != '') $param .= '&search_fk_user_modif='.urlencode($search_fk_user_modif); - if ($search_import_key != '') $param .= '&search_import_key='.urlencode($search_import_key); - if ($optioncss != '') $param .= '&optioncss='.$optioncss; - // Add $param from extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - $arrayofmassactions = array( - //'presend'=>$langs->trans("SendByMail"), - //'builddoc'=>$langs->trans("PDFMerge"), - ); - //if ($user->rights->stock->supprimer) $arrayofmassactions['predelete']=''.$langs->trans("Delete"); - if (in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); - $massactionbutton = $form->selectMassAction('', $arrayofmassactions); +// Output page +// -------------------------------------------------------------------- - print '
    '; - if ($optioncss != '') print ''; - print ''; - print ''; - print ''; - print ''; - print ''; +llxHeader('', $title, $help_url); - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'lot', 0, '', '', $limit, 0, 0, 1); +$arrayofselected = is_array($toselect) ? $toselect : array(); - $topicmail = "Information"; - $modelmail = "productlot"; - $objecttmp = new Productlot($db); - $trackid = 'lot'.$object->id; - include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; +$param = ''; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +foreach ($search as $key => $val) +{ + if (is_array($search[$key]) && count($search[$key])) foreach ($search[$key] as $skey) $param .= '&search_'.$key.'[]='.urlencode($skey); + else $param .= '&search_'.$key.'='.urlencode($search[$key]); +} +if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss); +// Add $param from extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; - if ($sall) +// List of mass actions available +$arrayofmassactions = array( + //'validate'=>$langs->trans("Validate"), + //'generate_doc'=>$langs->trans("ReGeneratePDF"), + //'builddoc'=>$langs->trans("PDFMerge"), + //'presend'=>$langs->trans("SendByMail"), +); +if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); +if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); +$massactionbutton = $form->selectMassAction('', $arrayofmassactions); + +print ''."\n"; +if ($optioncss != '') print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +//print ''; +print ''; + +$newcardbutton = dolGetButtonTitle($langs->trans('New'), '', 'fa fa-plus-circle', dol_buildpath('/mymodule/myobject_card.php', 1).'?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd); +$newcardbutton = ''; + +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'object_'.$object->picto, 0, $newcardbutton, '', $limit, 0, 0, 1); + +// Add code for pre mass action (confirmation or email presend form) +$topicmail = "Information"; +$modelmail = "productlot"; +$objecttmp = new Productlot($db); +$trackid = 'lot'.$object->id; +include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php'; + +if ($search_all) +{ + foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); + print '
    '.$langs->trans("FilterOnInto", $search_all).join(', ', $fieldstosearchall).'
    '; +} + +$moreforfilter = ''; +/*$moreforfilter.='
    '; + $moreforfilter.= $langs->trans('MyFilter') . ': '; + $moreforfilter.= '
    ';*/ + +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook +if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; +else $moreforfilter = $hookmanager->resPrint; + +if (!empty($moreforfilter)) +{ + print '
    '; + print $moreforfilter; + print '
    '; +} + +$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; +$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields +$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); + +print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print ''."\n"; + + +// Fields title search +// -------------------------------------------------------------------- +print ''; +foreach ($object->fields as $key => $val) +{ + $cssforfield = (empty($val['css']) ? '' : $val['css']); + if ($key == 'status') $cssforfield .= ($cssforfield ? ' ' : '').'center'; + elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right'; + if (!empty($arrayfields['t.'.$key]['checked'])) { - foreach ($fieldstosearchall as $key => $val) $fieldstosearchall[$key] = $langs->trans($val); - print '
    '.$langs->trans("FilterOnInto", $sall).join(', ', $fieldstosearchall).'
    '; - } - - /*$moreforfilter = ''; - $moreforfilter.='
    '; - $moreforfilter.= $langs->trans('MyFilter') . ': '; - $moreforfilter.= '
    ';*/ - - $parameters = array(); - $reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook - if (empty($reshook)) $moreforfilter .= $hookmanager->resPrint; - else $moreforfilter = $hookmanager->resPrint; - - if (!empty($moreforfilter)) - { - print '
    '; - print $moreforfilter; - print '
    '; - } - - $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; - $selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields - - print '
    '; - print '
    '."\n"; - - // Fields title search - print ''; - if (!empty($arrayfields['t.entity']['checked'])) print ''; - if (!empty($arrayfields['t.batch']['checked'])) print ''; - if (!empty($arrayfields['t.fk_product']['checked'])) print ''; - if (!empty($arrayfields['t.sellby']['checked'])) print ''; - if (!empty($arrayfields['t.eatby']['checked'])) print ''; - if (!empty($arrayfields['t.fk_user_creat']['checked'])) print ''; - if (!empty($arrayfields['t.fk_user_modif']['checked'])) print ''; - if (!empty($arrayfields['t.import_key']['checked'])) print ''; - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; - - // Fields from hook - $parameters = array('arrayfields'=>$arrayfields); - $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (!empty($arrayfields['t.datec']['checked'])) - { - // Date creation - print ''; } - if (!empty($arrayfields['t.tms']['checked'])) +} +// Extra fields +include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php'; + +// Fields from hook +$parameters = array('arrayfields'=>$arrayfields); +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +// Action column +print ''; +print ''."\n"; + + +// Fields title label +// -------------------------------------------------------------------- +print ''; +foreach ($object->fields as $key => $val) +{ + $cssforfield = (empty($val['css']) ? '' : $val['css']); + if ($key == 'status') $cssforfield .= ($cssforfield ? ' ' : '').'center'; + elseif (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; + elseif (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $val['label'] != 'TechnicalID') $cssforfield .= ($cssforfield ? ' ' : '').'right'; + if (!empty($arrayfields['t.'.$key]['checked'])) { - // Date modification - print ''; + print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''))."\n"; } - /*if (! empty($arrayfields['u.statut']['checked'])) - { - // Status - print ''; - }*/ - // Action column - print ''; - print ''."\n"; +} +// 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, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; +// Action column +print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; +print ''."\n"; - // Fields title - print ''; - if (!empty($arrayfields['t.entity']['checked'])) print_liste_field_titre($arrayfields['t.entity']['label'], $_SERVER['PHP_SELF'], 't.entity', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.batch']['checked'])) print_liste_field_titre($arrayfields['t.batch']['label'], $_SERVER['PHP_SELF'], 't.batch', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.fk_product']['checked'])) print_liste_field_titre($arrayfields['t.fk_product']['label'], $_SERVER['PHP_SELF'], 't.fk_product', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.sellby']['checked'])) print_liste_field_titre($arrayfields['t.sellby']['label'], $_SERVER['PHP_SELF'], 't.sellby', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.eatby']['checked'])) print_liste_field_titre($arrayfields['t.eatby']['label'], $_SERVER['PHP_SELF'], 't.eatby', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.fk_user_creat']['checked'])) print_liste_field_titre($arrayfields['t.fk_user_creat']['label'], $_SERVER['PHP_SELF'], 't.fk_user_creat', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.fk_user_modif']['checked'])) print_liste_field_titre($arrayfields['t.fk_user_modif']['label'], $_SERVER['PHP_SELF'], 't.fk_user_modif', '', $param, '', $sortfield, $sortorder); - if (!empty($arrayfields['t.import_key']['checked'])) print_liste_field_titre($arrayfields['t.import_key']['label'], $_SERVER['PHP_SELF'], 't.import_key', '', $param, '', $sortfield, $sortorder); - // 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['t.datec']['checked'])) { - print_liste_field_titre($arrayfields['t.datec']['label'], $_SERVER["PHP_SELF"], "t.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - } - if (!empty($arrayfields['t.tms']['checked'])) { - print_liste_field_titre($arrayfields['t.tms']['label'], $_SERVER["PHP_SELF"], "t.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - } - //if (! empty($arrayfields['t.status']['checked'])) { - // print_liste_field_titre($arrayfields['t.status']['label'], $_SERVER["PHP_SELF"], "t.status", "", $param, '', $sortfield, $sortorder, 'center '); - //} - print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); - print ''."\n"; - $productlot = new Productlot($db); - - $i = 0; - $totalarray = array(); - while ($i < min($num, $limit)) +// Detect if we need a fetch on each output line +$needToFetchEachLine = 0; +if (is_array($extrafields->attributes[$object->table_element]['computed']) && count($extrafields->attributes[$object->table_element]['computed']) > 0) +{ + foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val) { - $obj = $db->fetch_object($resql); - if ($obj) + if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object + } +} + + +// Loop on record +// -------------------------------------------------------------------- +$i = 0; +$totalarray = array(); +while ($i < ($limit ? min($num, $limit) : $num)) +{ + $obj = $db->fetch_object($resql); + if (empty($obj)) break; // Should not happen + + // Store properties in $object + $object->setVarsFromFetchObj($obj); + + // Show here line of result + print ''; + foreach ($object->fields as $key => $val) + { + $cssforfield = (empty($val['css']) ? '' : $val['css']); + if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'center'; + elseif ($key == 'status') $cssforfield .= ($cssforfield ? ' ' : '').'center'; + + if (in_array($val['type'], array('timestamp'))) $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + elseif ($key == 'ref' || $key == 'batch') $cssforfield .= ($cssforfield ? ' ' : '').'nowrap'; + + if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('rowid', 'status'))) $cssforfield .= ($cssforfield ? ' ' : '').'right'; + //if (in_array($key, array('fk_soc', 'fk_user', 'fk_warehouse'))) $cssforfield = 'tdoverflowmax100'; + + if (!empty($arrayfields['t.'.$key]['checked'])) { - $productlot->id = $obj->rowid; - $productlot->status = $obj->tosell; - $productlot->batch = $obj->batch; - - // You can use here results - print ''; - if (!empty($arrayfields['t.entity']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['t.batch']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['t.fk_product']['checked'])) - { - $productstatic->id = $obj->fk_product; - $productstatic->type = $obj->product_type; - $productstatic->ref = $obj->product_ref; - $productstatic->label = $obj->product_label; - $productstatic->status = $obj->tosell; - $productstatic->status_buy = $obj->tobuy; - $productstatic->status_batch = $obj->tobatch; - - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['t.sellby']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['t.eatby']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['t.fk_user_creat']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['t.fk_user_modif']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - if (!empty($arrayfields['t.import_key']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Extra fields - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; - // Fields from hook - $parameters = array('arrayfields'=>$arrayfields, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - // Date creation - if (!empty($arrayfields['t.datec']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Date modification - if (!empty($arrayfields['t.tms']['checked'])) - { - print ''; - if (!$i) $totalarray['nbfield']++; - } - // Status - /* - if (! empty($arrayfields['u.statut']['checked'])) - { - $userstatic->statut=$obj->statut; - print ''; - }*/ - - // Action column - print ''; if (!$i) $totalarray['nbfield']++; - - print ''; + if (!empty($val['isameasure'])) + { + if (!$i) $totalarray['pos'][$totalarray['nbfield']] = 't.'.$key; + $totalarray['val']['t.'.$key] += $object->$key; + } } - $i++; } - - // Show total line - include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; - - $db->free($resql); - - $parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); - $reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook + // Extra fields + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; + // Fields from hook + $parameters = array('arrayfields'=>$arrayfields, 'object'=>$object, 'obj'=>$obj, 'i'=>$i, 'totalarray'=>&$totalarray); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; + // Action column + print ''; + if (!$i) $totalarray['nbfield']++; - print '
    '; + print ''; + if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75'); + elseif (strpos($val['type'], 'integer:') === 0) { + print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1); + } elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print ''; print ''; +$searchpicto = $form->showFilterButtons(); +print $searchpicto; +print '
    '; - print ''; - print $form->selectarray('search_statut', array('-1'=>'','0'=>$langs->trans('Disabled'),'1'=>$langs->trans('Enabled')),$search_statut); - print ''; - $searchpicto = $form->showFilterAndCheckAddButtons($massactionbutton ? 1 : 0, 'checkforselect', 1); - print $searchpicto; - print '
    '.$obj->entity.''.$productlot->getNomUrl(1).''.$productstatic->getNomUrl(1).''.dol_print_date($db->jdate($obj->sellby), 'day').''.dol_print_date($db->jdate($obj->eatby), 'day').''.$obj->fk_user_creat.''.$obj->fk_user_modif.''.$obj->import_key.''; - print dol_print_date($db->jdate($obj->date_creation), 'dayhour', 'tzuser'); - print ''; - print dol_print_date($db->jdate($obj->date_update), 'dayhour', 'tzuser'); - print ''.$userstatic->getLibStatut(3).''; - if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined - { - $selected = 0; - if (in_array($obj->rowid, $arrayofselected)) $selected = 1; - print ''; + print ''; + if ($key == 'status') print $object->getLibStatut(5); + elseif ($key == 'rowid') print $object->id; + else { + if ($key == 'batch') { + print $object->getNomUrl(1); + } else { + print $object->showOutputField($val, $key, $object->$key, ''); + } } print '
    '; + if ($massactionbutton || $massaction) // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined + { + $selected = 0; + if (in_array($object->id, $arrayofselected)) $selected = 1; + print ''; + } + print '
    '."\n"; - print '
    '; + print ''."\n"; - print '
    '."\n"; - - /* - $hidegeneratedfilelistifempty=1; - if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0; - - // Show list of available documents - $urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; - $urlsource.=str_replace('&','&',$param); - - $filedir=$diroutputmassaction; - $genallowed=$user->rights->facture->lire; - $delallowed=$user->rights->facture->creer; - - print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty); - */ + $i++; } -else + +// Show total line +include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; + +// If no record found +if ($num == 0) { - $error++; - dol_print_error($db); + $colspan = 1; + foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; } + print ''.$langs->trans("NoRecordFound").''; +} + + +$db->free($resql); + +$parameters = array('arrayfields'=>$arrayfields, 'sql'=>$sql); +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print ''."\n"; +print ''."\n"; + +print ''."\n"; + +if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords)) +{ + $hidegeneratedfilelistifempty = 1; + if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty = 0; + + require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; + $formfile = new FormFile($db); + + // Show list of available documents + $urlsource = $_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder; + $urlsource .= str_replace('&', '&', $param); + + $filedir = $diroutputmassaction; + $genallowed = $permissiontoread; + $delallowed = $permissiontoadd; + + print $formfile->showdocuments('massfilesarea_mymodule', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty); } // End of page diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php index 34a6f61bbb0..2518f0ee17d 100644 --- a/htdocs/product/stock/replenish.php +++ b/htdocs/product/stock/replenish.php @@ -48,13 +48,14 @@ $hookmanager->initHooks(array('stockreplenishlist')); //checks if a product has been ordered -$action = GETPOST('action', 'alpha'); -$sref = GETPOST('sref', 'alpha'); -$snom = GETPOST('snom', 'alpha'); +$action = GETPOST('action', 'aZ09'); +$search_ref = GETPOST('search_ref', 'alpha'); +$search_label = GETPOST('search_label', 'alpha'); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $type = GETPOST('type', 'int'); $tobuy = GETPOST('tobuy', 'int'); $salert = GETPOST('salert', 'alpha'); +$includeproductswithoutdesiredqty = GETPOST('includeproductswithoutdesiredqty', 'alpha'); $mode = GETPOST('mode', 'alpha'); $draftorder = GETPOST('draftorder', 'alpha'); @@ -64,8 +65,8 @@ $fk_supplier = GETPOST('fk_supplier', 'int'); $fk_entrepot = GETPOST('fk_entrepot', 'int'); $texte = ''; -$sortfield = GETPOST('sortfield', 'alpha'); -$sortorder = GETPOST('sortorder', 'alpha'); +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; @@ -106,10 +107,11 @@ if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'e if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha') || isset($_POST['valid'])) // Both test are required to be compatible with all browsers { - $sref = ''; - $snom = ''; + $search_ref = ''; + $search_label = ''; $sall = ''; $salert = ''; + $includeproductswithoutdesiredqty = ''; $draftorder = ''; } if ($draftorder == 'on') $draftchecked = "checked"; @@ -179,13 +181,10 @@ if ($action == 'order' && isset($_POST['valid'])) $line->fk_unit = $productsupplier->fk_unit; $suppliers[$productsupplier->fourn_socid]['lines'][] = $line; } - } - elseif ($idprod == -1) + } elseif ($idprod == -1) { $errorQty++; - } - else - { + } else { $error = $db->lasterror(); dol_print_error($db); } @@ -274,9 +273,7 @@ if ($action == 'order' && isset($_POST['valid'])) setEventMessages($langs->trans('OrderCreated'), null, 'mesgs'); header('Location: replenishorders.php'); exit; - } - else - { + } else { $db->rollback(); } } @@ -295,7 +292,7 @@ $form = new Form($db); $formproduct = new FormProduct($db); $prod = new Product($db); -$title = $langs->trans('Status'); +$title = $langs->trans('MissingStocks'); if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { $sqldesiredtock = $db->ifsql("pse.desiredstock IS NULL", "p.desiredstock", "pse.desiredstock"); @@ -315,6 +312,9 @@ if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entre $sql .= ' '.$sqldesiredtock.' as desiredstockcombined, '.$sqlalertstock.' as seuil_stock_alertecombined,'; $sql .= ' s.fk_product,'; $sql .= ' SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").') as stock_physique'; +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { + $sql .= ', SUM('.$db->ifsql("s.reel IS NULL OR s.fk_entrepot <> ".$fk_entrepot, "0", "s.reel").') as stock_real_warehouse'; +} // Add fields from hooks $parameters = array(); @@ -346,8 +346,8 @@ if (dol_strlen($type)) { $sql .= ' AND p.fk_product_type <> 1'; } } -if ($sref) $sql .= natural_search('p.ref', $sref); -if ($snom) $sql .= natural_search('p.label', $snom); +if ($search_ref) $sql .= natural_search('p.ref', $search_ref); +if ($search_label) $sql .= natural_search('p.label', $search_label); $sql .= ' AND p.tobuy = 1'; if (!empty($canvas)) $sql .= ' AND p.canvas = "'.$db->escape($canvas).'"'; $sql .= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price'; @@ -424,8 +424,7 @@ if ($usevirtualstock) $sqlProductionToProduce .= " AND mp5.fk_product = p.rowid"; $sqlProductionToProduce .= " AND mp5.role IN ('toproduce', 'produced')"; $sqlProductionToProduce .= " AND mm5.status IN (1,2))"; - } else - { + } else { $sqlProductionToConsume = '0'; $sqlProductionToProduce = '0'; } @@ -434,34 +433,65 @@ if ($usevirtualstock) $sql .= ' ('.$sqldesiredtock.' >= 0 AND ('.$sqldesiredtock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; $sql .= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.') + ('.$sqlProductionToProduce.' - '.$sqlProductionToConsume.')))'; $sql .= ' OR '; - $sql .= ' ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + if ($includeproductswithoutdesiredqty == 'on') { + $sql .= ' (('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + } else { + $sql .= ' ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + } $sql .= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.') + ('.$sqlProductionToProduce.' - '.$sqlProductionToConsume.')))'; $sql .= ')'; if ($salert == 'on') // Option to see when stock is lower than alert { - $sql .= ' AND ('; - $sql .= $sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + $sql .= ' AND (('; + if ($includeproductswithoutdesiredqty == 'on') { + $sql .= $sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + } else { + $sql .= $sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')'; + } $sql .= ' - ('.$sqlCommandesCli.' - '.$sqlExpeditionsCli.') + ('.$sqlCommandesFourn.' - '.$sqlReceptionFourn.') + ('.$sqlProductionToProduce.' - '.$sqlProductionToConsume.'))'; $sql .= ')'; $alertchecked = 'checked'; } } else { $sql .= ' HAVING (('.$sqldesiredtock.' >= 0 AND ('.$sqldesiredtock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))'; - $sql .= ' OR ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))'; + if ($includeproductswithoutdesiredqty == 'on') { + $sql .= ' OR (('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))'; + } else { + $sql .= ' OR ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").'))))'; + } if ($salert == 'on') // Option to see when stock is lower than alert { - $sql .= ' AND ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))'; + if ($includeproductswithoutdesiredqty == 'on') { + $sql .= ' AND (('.$sqlalertstock.' >= 0 OR '.$sqlalertstock.' IS NULL) AND ('.$db->ifsql("$sqlalertstock IS NULL", "0", $sqlalertstock).' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))'; + } else { + $sql .= ' AND ('.$sqlalertstock.' >= 0 AND ('.$sqlalertstock.' > SUM('.$db->ifsql("s.reel IS NULL", "0", "s.reel").')))'; + } $alertchecked = 'checked'; } } +$includeproductswithoutdesiredqtychecked = ''; +if ($includeproductswithoutdesiredqty == 'on') { + $includeproductswithoutdesiredqtychecked = 'checked'; +} + // Add where from hooks $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; +$nbtotalofrecords = ''; +if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) { + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) { + $page = 0; + $offset = 0; + } +} + $sql .= $db->order($sortfield, $sortorder); $sql .= $db->plimit($limit + 1, $offset); @@ -482,9 +512,11 @@ $helpurl .= 'ES:Módulo_Stocks'; llxHeader('', $title, $helpurl, ''); $head = array(); + $head[0][0] = DOL_URL_ROOT.'/product/stock/replenish.php'; $head[0][1] = $title; $head[0][2] = 'replenish'; + $head[1][0] = DOL_URL_ROOT.'/product/stock/replenishorders.php'; $head[1][1] = $langs->trans("ReplenishmentOrders"); $head[1][2] = 'replenishorders'; @@ -501,24 +533,31 @@ if (empty($fk_warhouse) && !empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_ if ($usevirtualstock == 1) { print $langs->trans("CurentSelectionMode").': '; - print $langs->trans("CurentlyUsingVirtualStock").' - '; - print ''.$langs->trans("UsePhysicalStock").'
    '; + print $langs->trans("CurentlyUsingVirtualStock"); + print ' ('.$langs->trans("UsePhysicalStock").')'; + print '
    '; } if ($usevirtualstock == 0) { print $langs->trans("CurentSelectionMode").': '; - print $langs->trans("CurentlyUsingPhysicalStock").' - '; - print ''.$langs->trans("UseVirtualStock").'
    '; + print $langs->trans("CurentlyUsingPhysicalStock"); + print ' ('.$langs->trans("UseVirtualStock").')'; + print '
    '; } print '
    '."\n"; -print '
    '; +print ''; +print ''; print ''; -print ''; -print ''; +print ''; +print ''; print ''; +print ''; print ''; print ''; +if ($limit > 0 && $limit != $conf->liste_limit) { + print ''; +} if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE)) { print '
    '; @@ -539,8 +578,20 @@ print '
    '; print '
    '; -if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alpha')) { - $filters = '&sref='.$sref.'&snom='.$snom; +print '
    '; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + + +if ($search_ref || $search_label || $sall || $salert || $draftorder || GETPOST('search', 'alpha')) { + $filters = '&search_ref='.$search_ref.'&search_label='.$search_label; $filters .= '&sall='.$sall; $filters .= '&salert='.$salert; $filters .= '&draftorder='.$draftorder; @@ -558,7 +609,7 @@ if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alph $num ); } else { - $filters = '&sref='.$sref.'&snom='.$snom; + $filters = '&search_ref='.$search_ref.'&search_label='.$search_label; $filters .= '&fourn_id='.$fourn_id; $filters .= (isset($type) ? '&type='.$type : ''); $filters .= '&='.$salert; @@ -578,51 +629,89 @@ if ($sref || $snom || $sall || $salert || $draftorder || GETPOST('search', 'alph ); } -print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table -print ''; +if ($limit > 0 && $limit != $conf->liste_limit) { + $filters .= '&limit='.urlencode($limit); +} $param = (isset($type) ? '&type='.$type : ''); -$param .= '&fourn_id='.$fourn_id.'&snom='.$snom.'&salert='.$salert.'&draftorder='.$draftorder; -$param .= '&sref='.$sref; +$param .= '&fourn_id='.$fourn_id.'&search_label='.$search_label.'&includeproductswithoutdesiredqty='.$includeproductswithoutdesiredqty.'&salert='.$salert.'&draftorder='.$draftorder; +$param .= '&search_ref='.$search_ref; $param .= '&mode='.$mode; $param .= '&fk_supplier='.$fk_supplier; $param .= '&fk_entrepot='.$fk_entrepot; $stocklabel = $langs->trans('Stock'); +$stocklabelbis = $langs->trans('Stock'); if ($usevirtualstock == 1) $stocklabel = $langs->trans('VirtualStock'); if ($usevirtualstock == 0) $stocklabel = $langs->trans('PhysicalStock'); if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) { + $stocklabelbis = $stocklabel.' (Selected warehouse)'; $stocklabel .= ' ('.$langs->trans("AllWarehouses").')'; } -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; -print ''; +$texte = $langs->trans('Replenishment'); + +print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table + +if (!empty($conf->global->REPLENISH_ALLOW_VARIABLESIZELIST)) { + print_barre_liste( + $texte, + $page, + 'replenish.php', + $filters, + $sortfield, + $sortorder, + '', + $num, + $nbtotalofrecords, + 'object_stock.png', + 0, + '', + '', + $limit + ); +} else { + print_barre_liste( + $texte, + $page, + 'replenish.php', + $filters, + $sortfield, + $sortorder, + '', + $num, + $nbtotalofrecords, + 'object_stock.png' + ); +} + +print '
    '; // Fields title search print ''; print ''; -print ''; -print ''; +print ''; +print ''; if (!empty($conf->service->enabled) && $type == 1) print ''; -print ''; -print ''; +print ''; +print ''; print ''; -print ''; +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) +{ + print ''; +} +print ''; print ''; // Fields from hook $parameters = array('param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; -print ''; @@ -637,6 +726,10 @@ if (!empty($conf->service->enabled) && $type == 1) print_liste_field_titre('Dura print_liste_field_titre('DesiredStock', $_SERVER["PHP_SELF"], 'p.desiredstock', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre('StockLimitShort', $_SERVER["PHP_SELF"], 'p.seuil_stock_alerte', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], 'stock_physique', $param, '', '', $sortfield, $sortorder, 'right '); +if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) +{ + print_liste_field_titre($stocklabelbis, $_SERVER["PHP_SELF"], 'stock_real_warehouse', $param, '', '', $sortfield, $sortorder, 'right '); +} print_liste_field_titre('Ordered', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre('StockToBuy', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); print_liste_field_titre('SupplierRef', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); @@ -675,14 +768,15 @@ while ($i < ($limit ? min($num, $limit) : $num)) } } + $stockwarehouse = 0; if ($usevirtualstock) { // If option to increase/decrease is not on an object validation, virtual stock may differs from physical stock. $stock = $prod->stock_theorique; - } - else - { + //TODO $stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->; + } else { $stock = $prod->stock_reel; + $stockwarehouse = $prod->stock_warehouse[$fk_entrepot]->real; } // Force call prod->load_stats_xxx to choose status to count (otherwise it is loaded by load_stock function) @@ -698,91 +792,105 @@ while ($i < ($limit ? min($num, $limit) : $num)) //print $prod->stats_reception['qty']; $ordered = $prod->stats_commande_fournisseur['qty'] - $prod->stats_reception['qty']; - $desiredstock = ($objp->desiredstockpse ? $objp->desiredstockpse : $objp->desiredstock); - $alertstock = ($objp->seuil_stock_alertepse ? $objp->seuil_stock_alertepse : $objp->seuil_stock_alerte); + $desiredstock = $objp->desiredstock; + $alertstock = $objp->seuil_stock_alerte; + $desiredstockwarehouse = ($objp->desiredstockpse ? $objp->desiredstockpse : 0); + $alertstockwarehouse = ($objp->seuil_stock_alertepse ? $objp->seuil_stock_alertepse : 0); $warning = ''; if ($alertstock && ($stock < $alertstock)) { $warning = img_warning($langs->trans('StockTooLow')).' '; } + $warningwarehouse = ''; + if ($alertstockwarehouse && ($stockwarehouse < $alertstockwarehouse)) + { + $warningwarehouse = img_warning($langs->trans('StockTooLow')).' '; + } //depending on conf, use either physical stock or //virtual stock to compute the stock to buy value if (empty($usevirtualstock)) $stocktobuy = max(max($desiredstock, $alertstock) - $stock - $ordered, 0); else $stocktobuy = max(max($desiredstock, $alertstock) - $stock, 0); //ordered is already in $stock in virtual mode + if (empty($usevirtualstock)) $stocktobuywarehouse = max(max($desiredstockwarehouse, $alertstockwarehouse) - $stockwarehouse - $ordered, 0); + else $stocktobuywarehouse = max(max($desiredstockwarehouse, $alertstockwarehouse) - $stockwarehouse, 0); //ordered is already in $stock in virtual mode - $disabled = ''; + $picto = ''; if ($ordered > 0) { - $stockforcompare = $usevirtualstock ? $stock : $stock + $ordered; - if ($stockforcompare >= $desiredstock) + $stockforcompare = ($usevirtualstock ? $stock : $stock + $ordered); + /*if ($stockforcompare >= $desiredstock) { - $picto = img_picto('', './img/yes', '', 1); - $disabled = 'disabled'; - } - else { - $picto = img_picto('', './img/no', '', 1); - } - } else { - //$picto = img_help('',$langs->trans("NoPendingReceptionOnSupplierOrder")); - $picto = img_picto($langs->trans("NoPendingReceptionOnSupplierOrder"), './img/no', '', 1); - } - - print ''; - - // Select field - //print ''; - print ''; - - print ''; - - print ''; - - if (!empty($conf->service->enabled) && $type == 1) - { - if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { - $duration = $regs[1].' '.$langs->trans('DurationYear'); - } elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) { - $duration = $regs[1].' '.$langs->trans('DurationMonth'); - } elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) { - $duration = $regs[1].' '.$langs->trans('DurationDay'); + $picto = img_picto('', 'help'); } else { - $duration = $objp->duration; - } - print ''; + $picto = img_picto('', 'help'); + }*/ + } else { + $picto = img_picto($langs->trans("NoPendingReceptionOnSupplierOrder"), 'help'); } - // Desired stock - print ''; + $variants = $prod->hasVariants(); + if (!$variants || !empty($conf->global->VARIANT_ALLOW_STOCK_MOVEMENT_ON_VARIANT_PARENT)) { + print ''; - // Limit stock for alert - print ''; + // Select field + print ''; - // Current stock (all warehouses) - print ''; + print ''; - // Already ordered - print ''; + print ''; - // To order - //print ''; - print ''; + if (!empty($conf->service->enabled) && $type == 1) + { + $regs = array(); + if (preg_match('/([0-9]+)y/i', $objp->duration, $regs)) { + $duration = $regs[1].' '.$langs->trans('DurationYear'); + } elseif (preg_match('/([0-9]+)m/i', $objp->duration, $regs)) { + $duration = $regs[1].' '.$langs->trans('DurationMonth'); + } elseif (preg_match('/([0-9]+)d/i', $objp->duration, $regs)) { + $duration = $regs[1].' '.$langs->trans('DurationDay'); + } else { + $duration = $objp->duration; + } + print ''; + } - // Supplier - print ''; + // Desired stock + print ''; - // Fields from hook - $parameters = array('objp'=>$objp); - $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; + // Limit stock for alert + print ''; - print ''; + // Current stock (all warehouses) + print ''; + + // Current stock (warehouse selected only) + if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) + { + print ''; + } + + // Already ordered + print ''; + + // To order + print ''; + + // Supplier + print ''; + + // Fields from hook + $parameters = array('objp'=>$objp); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + print ''; + } } $i++; } diff --git a/htdocs/product/stock/replenishorders.php b/htdocs/product/stock/replenishorders.php index 42469b4dd2a..ef8639787b7 100644 --- a/htdocs/product/stock/replenishorders.php +++ b/htdocs/product/stock/replenishorders.php @@ -47,7 +47,7 @@ $snom = GETPOST('search_nom', 'alpha'); $suser = GETPOST('search_user', 'alpha'); $sttc = GETPOST('search_ttc', 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); -$sproduct = GETPOST('sproduct', 'int'); +$search_product = GETPOST('search_product', 'int'); $search_dateyear = GETPOST('search_dateyear', 'int'); $search_datemonth = GETPOST('search_datemonth', 'int'); $search_dateday = GETPOST('search_dateday', 'int'); @@ -78,7 +78,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_datemonth = ''; $search_dateday = ''; $search_dateyear = ''; - $sproduct = 0; + $search_product = 0; } @@ -97,9 +97,11 @@ llxHeader('', $texte, $helpurl, ''); print load_fiche_titre($langs->trans('Replenishment'), '', 'stock'); $head = array(); + $head[0][0] = DOL_URL_ROOT.'/product/stock/replenish.php'; -$head[0][1] = $langs->trans('Status'); +$head[0][1] = $langs->trans('MissingStocks'); $head[0][2] = 'replenish'; + $head[1][0] = DOL_URL_ROOT.'/product/stock/replenishorders.php'; $head[1][1] = $texte; $head[1][2] = 'replenishorders'; @@ -141,7 +143,7 @@ if (GETPOST('statut', 'int')) { $sql .= ' GROUP BY cf.rowid, cf.ref, cf.date_creation, cf.fk_statut'; $sql .= ', cf.total_ttc, cf.fk_user_author, u.login, s.rowid, s.nom'; $sql .= $db->order($sortfield, $sortorder); -if (!$sproduct) { +if (!$search_product) { $sql .= $db->plimit($limit + 1, $offset); } @@ -259,11 +261,11 @@ if ($resql) $userstatic = new User($db); - while ($i < min($num, $sproduct ? $num : $conf->liste_limit)) + while ($i < min($num, $search_product ? $num : $conf->liste_limit)) { $obj = $db->fetch_object($resql); - $showline = dolDispatchToDo($obj->rowid) && (!$sproduct || in_array($sproduct, getProducts($obj->rowid))); + $showline = dolDispatchToDo($obj->rowid) && (!$search_product || in_array($search_product, getProducts($obj->rowid))); if ($showline) { @@ -314,9 +316,7 @@ if ($resql) $db->free($resql); dol_fiche_end(); -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php new file mode 100644 index 00000000000..f581242c9f2 --- /dev/null +++ b/htdocs/product/stock/stockatdate.php @@ -0,0 +1,563 @@ + + * Copyright (C) 2013-2020 Laurent Destaileur + * Copyright (C) 2014 Regis Houssin + * Copyright (C) 2016 Juanjo Menent + * Copyright (C) 2016 ATM Consulting + * Copyright (C) 2019 Frédéric France + * + * 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 . + */ + +/** + * \file htdocs/product/stock/stockatdate.php + * \ingroup stock + * \brief Page to list stocks at a given date + */ + +require '../../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; +require_once './lib/replenishment.lib.php'; + +// Load translation files required by the page +$langs->loadLangs(array('products', 'stocks', 'orders')); + +// Security check +if ($user->socid) { + $socid = $user->socid; +} +$result = restrictedArea($user, 'produit|service'); + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('stockreplenishlist')); + +//checks if a product has been ordered + +$action = GETPOST('action', 'aZ09'); +$type = GETPOST('type', 'int'); +$mode = GETPOST('mode', 'alpha'); +$date = ''; +$dateendofday = ''; +if (GETPOSTISSET('dateday') && GETPOSTISSET('datemonth') && GETPOSTISSET('dateyear')) { + $date = dol_mktime(0, 0, 0, GETPOST('datemonth', 'int'), GETPOST('dateday', 'int'), GETPOST('dateyear', 'int')); + $dateendofday = dol_mktime(23, 59, 59, GETPOST('datemonth', 'int'), GETPOST('dateday', 'int'), GETPOST('dateyear', 'int')); +} + +$now = dol_now(); + +$productid = GETPOST('productid', 'int'); +$fk_warehouse = GETPOST('fk_warehouse', 'int'); + +$sortfield = GETPOST('sortfield', 'aZ09comma'); +$sortorder = GETPOST('sortorder', 'aZ09comma'); +$page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); +if (empty($page) || $page == -1) { $page = 0; } // If $page is not defined, or '' or -1 +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; +$offset = $limit * $page; +if (!$sortfield) { + $sortfield = 'p.ref'; +} +if (!$sortorder) { + $sortorder = 'ASC'; +} + +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +$dateIsValid= true; +if ($mode == 'future') { + if ($date && $date < $now) { + setEventMessages($langs->trans("ErrorDateMustBeInFuture"), null, 'errors'); + $dateIsValid= false; + } +} else { + if ($date && $date > $now) { + setEventMessages($langs->trans("ErrorDateMustBeBeforeToday"), null, 'errors'); + $dateIsValid= false; + } +} + + +/* + * Actions + */ + +if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // Both test are required to be compatible with all browsers +{ + $date = ''; + $productid = 0; + $fk_warehouse = 0; +} + +$warehouseStatus = array(); +if ($conf->global->ENTREPOT_EXTRA_STATUS) { + //$warehouseStatus[] = Entrepot::STATUS_CLOSED; + $warehouseStatus[] = Entrepot::STATUS_OPEN_ALL; + $warehouseStatus[] = Entrepot::STATUS_OPEN_INTERNAL; +} + +// Get array with current stock per product, warehouse +$stock_prod_warehouse = array(); +$stock_prod = array(); +if ($date && $dateIsValid) { // Avoid heavy sql if mandatory date is not defined + $sql = "SELECT ps.fk_product, ps.fk_entrepot as fk_warehouse,"; + $sql .= " SUM(ps.reel) AS stock"; + $sql .= " FROM ".MAIN_DB_PREFIX."product_stock as ps"; + $sql .= ", ".MAIN_DB_PREFIX."entrepot as w"; + $sql .= " WHERE w.entity IN (".getEntity('stock').")"; + $sql .= " AND w.rowid = ps.fk_entrepot"; + if (! empty($conf->global->ENTREPOT_EXTRA_STATUS) && count($warehouseStatus)) { + $sql .= " AND w.statut IN (".$db->sanitize($db->escape(implode(',', $warehouseStatus))).")"; + } + if ($productid > 0) { + $sql .= " AND ps.fk_product = ".$productid; + } + if ($fk_warehouse > 0) { + $sql .= " AND ps.fk_entrepot = ".$fk_warehouse; + } + $sql .= " GROUP BY fk_product, fk_entrepot"; + //print $sql; + + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + while ($i < $num) { + $obj = $db->fetch_object($resql); + + $tmp_fk_product = $obj->fk_product; + $tmp_fk_warehouse = $obj->fk_warehouse; + $stock = $obj->stock; + + $stock_prod_warehouse[$tmp_fk_product][$tmp_fk_warehouse] = $stock; + $stock_prod[$tmp_fk_product] = (isset($stock_prod[$tmp_fk_product]) ? $stock_prod[$tmp_fk_product] : 0) + $stock; + + $i++; + } + + $db->free($resql); + } else { + dol_print_error($db); + } + //var_dump($stock_prod_warehouse); +} elseif ($action == 'filter') { + setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Date")), null, 'errors'); +} + +// Get array with list of stock movements between date and now (for product/warehouse= +$movements_prod_warehouse = array(); +$movements_prod = array(); +$movements_prod_warehouse_nb = array(); +$movements_prod_nb = array(); +if ($date && $dateIsValid) { + $sql = "SELECT sm.fk_product, sm.fk_entrepot, SUM(sm.value) AS stock, COUNT(sm.rowid) AS nbofmovement"; + $sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as sm"; + $sql .= ", ".MAIN_DB_PREFIX."entrepot as w"; + $sql .= " WHERE w.entity IN (".getEntity('stock').")"; + $sql .= " AND w.rowid = sm.fk_entrepot"; + if (! empty($conf->global->ENTREPOT_EXTRA_STATUS) && count($warehouseStatus)) { + $sql .= " AND w.statut IN (".$db->sanitize($db->escape(implode(',', $warehouseStatus))).")"; + } + if ($mode == 'future') { + $sql .= " AND sm.datem <= '".$db->idate($dateendofday)."'"; + } else { + $sql .= " AND sm.datem >= '".$db->idate($date)."'"; + } + if ($productid > 0) { + $sql .= " AND sm.fk_product = ".$productid; + } + if ($fk_warehouse > 0) { + $sql .= " AND sm.fk_entrepot = ".$fk_warehouse; + } + $sql .= " GROUP BY sm.fk_product, sm.fk_entrepot"; + $resql = $db->query($sql); + + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + + while ($i < $num) { + $obj = $db->fetch_object($resql); + $fk_product = $obj->fk_product; + $fk_entrepot = $obj->fk_entrepot; + $stock = $obj->stock; + $nbofmovement = $obj->nbofmovement; + + // Pour llx_product_stock.reel + $movements_prod_warehouse[$fk_product][$fk_entrepot] = $stock; + $movements_prod_warehouse_nb[$fk_product][$fk_entrepot] = $nbofmovement; + + // Pour llx_product.stock + $movements_prod[$fk_product] += $stock; + $movements_prod_nb[$fk_product] += $nbofmovement; + + $i++; + } + + $db->free($resql); + } else { + dol_print_error($db); + } +} +//var_dump($movements_prod_warehouse); +//var_dump($movements_prod); + + +/* + * View + */ + +$form = new Form($db); +$formproduct = new FormProduct($db); +$prod = new Product($db); + +$num = 0; + +$title = $langs->trans('StockAtDate'); + +$sql = 'SELECT p.rowid, p.ref, p.label, p.description, p.price,'; +$sql .= ' p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,'; +$sql .= ' p.tms as datem, p.duration, p.tobuy, p.stock'; +if ($fk_warehouse > 0) { + $sql .= ', SUM(ps.reel) as stock_reel'; +} +// Add fields from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; + +$sql .= ' FROM '.MAIN_DB_PREFIX.'product as p'; +if ($fk_warehouse > 0) { + $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as ps ON p.rowid = ps.fk_product AND ps.fk_entrepot = '.$fk_warehouse; +} +// Add fields from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListJoin', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; +$sql .= ' WHERE p.entity IN ('.getEntity('product').')'; +if ($productid > 0) { + $sql .= " AND p.rowid = ".$productid; +} +if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) { + $sql .= " AND p.fk_product_type = 0"; +} +if (!empty($canvas)) $sql .= ' AND p.canvas = "'.$db->escape($canvas).'"'; +if ($fk_warehouse > 0) { + $sql .= ' GROUP BY p.rowid, p.ref, p.label, p.description, p.price, p.price_ttc, p.price_base_type, p.fk_product_type, p.desiredstock, p.seuil_stock_alerte,'; + $sql .= ' p.tms, p.duration, p.tobuy, p.stock'; +} +// Add where from hooks +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook +$sql .= $hookmanager->resPrint; + +if ($sortfield == 'stock_reel' && $fk_warehouse <= 0) { + $sortfield = 'stock'; +} +if ($sortfield == 'stock' && $fk_warehouse > 0) { + $sortfield = 'stock_reel'; +} +$sql .= $db->order($sortfield, $sortorder); + +if ($date && $dateIsValid) { // We avoid a heavy sql if mandatory parameter date not yet defined + $nbtotalofrecords = ''; + if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) + { + $result = $db->query($sql); + $nbtotalofrecords = $db->num_rows($result); + if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0 + { + $page = 0; + $offset = 0; + } + } + + $sql .= $db->plimit($limit + 1, $offset); + + //print $sql; + $resql = $db->query($sql); + if (empty($resql)) + { + dol_print_error($db); + exit; + } + + $num = $db->num_rows($resql); +} + +$i = 0; +//print $sql; + +$helpurl = 'EN:Module_Stocks_En|FR:Module_Stock|'; +$helpurl .= 'ES:Módulo_Stocks'; + +llxHeader('', $title, $helpurl, ''); + +$head = array(); + +$head[0][0] = DOL_URL_ROOT.'/product/stock/stockatdate.php'; +$head[0][1] = $langs->trans("StockAtDateInPast"); +$head[0][2] = 'stockatdatepast'; + +$head[1][0] = DOL_URL_ROOT.'/product/stock/stockatdate.php?mode=future'; +$head[1][1] = $langs->trans("StockAtDateInFuture"); +$head[1][2] = 'stockatdatefuture'; + + +print load_fiche_titre($langs->trans('StockAtDate'), '', 'stock'); + +dol_fiche_head($head, ($mode == 'future' ? 'stockatdatefuture' : 'stockatdatepast'), '', -1, ''); + +$desc = $langs->trans("StockAtDatePastDesc"); +if ($mode == 'future') $desc = $langs->trans("StockAtDateFutureDesc"); +print ''.$desc.'
    '."\n"; +print '
    '."\n"; + +print ''; +print ''; +print ''; +print ''; + +print '
    '; +print ''.$langs->trans('Date').' '.$form->selectDate(($date ? $date : -1), 'date'); + +print '   '.$langs->trans('Product').' '; +$form->select_produits($productid, 'productid', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300'); + +print '   '.$langs->trans('Warehouse').' '; +print $formproduct->selectWarehouses($fk_warehouse, 'fk_warehouse', '', 1); +print '
    '; + +$parameters = array(); +$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook +if (empty($reshook)) print $hookmanager->resPrint; + +print '
    '; +print ''; +print '
    '; + +//print ''; + +$param = ''; +if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage); +if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit); +$param .= '&mode='.$mode; +if ($fk_warehouse > 0) $param .= '&fk_warehouse='.$fk_warehouse; +if ($productid > 0) $param .= '&productid='.$productid; +if (GETPOST('dateday', 'int') > 0) $param .= '&dateday='.GETPOST('dateday', 'int'); +if (GETPOST('datemonth', 'int') > 0) $param .= '&datemonth='.GETPOST('datemonth', 'int'); +if (GETPOST('dateyear', 'int') > 0) $param .= '&dateyear='.GETPOST('dateyear', 'int'); + +// TODO Move this into the title line ? +print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'stock', 0, '', '', $limit, 0, 0, 1); + +print '
    '; // You can use div-table-responsive-no-min if you dont need reserved height for your table +print '
        '.$form->textwithpicto($langs->trans('IncludeEmptyDesiredStock'), $langs->trans('IncludeProductWithUndefinedAlerts')).' '.$langs->trans('AlertOnly').' '.$langs->trans('IncludeAlsoDraftOrders').'  '; +if (!empty($conf->global->STOCK_REPLENISH_ADD_CHECKBOX_INCLUDE_DRAFT_ORDER)) { + print $langs->trans('IncludeAlsoDraftOrders').' '; +} +print ' '; +print ''; $searchpicto = $form->showFilterAndCheckAddButtons(0); print $searchpicto; print '
    '.$prod->getNomUrl(1, '').''.$objp->label; - print ''; // TODO Remove this and make a fetch to get description when creating order instead of a GETPOST - print ''.$duration.''.$desiredstock.'
    '.$alertstock.''.$warning.$stock.''.$prod->getNomUrl(1, 'stock').''.$ordered.' '.$picto.''.$objp->label; + print ''; // TODO Remove this and make a fetch to get description when creating order instead of a GETPOST + print ''.$duration.''; - print $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier); - print ''.($fk_entrepot > 0 ? $desiredstockwarehouse : $desiredstock).''.($fk_entrepot > 0 ? $alertstockwarehouse : $alertstock).'
    '.$warning.$stock.''.$warningwarehouse.$stockwarehouse.''.$ordered.' '.$picto.''; + print $form->select_product_fourn_price($prod->id, 'fourn'.$i, $fk_supplier); + print '
    '; + +$stocklabel = $langs->trans('StockAtDate'); +if ($mode == 'future') $stocklabel = $langs->trans("VirtualStockAtDate"); + +//print ''; +print ''; +print ''; +print ''; +print ''; +print ''; + +// Fields title search +print ''; +print ''; +print ''; +print ''; +print ''; +print ''; +if ($mode == 'future') { + print ''; +} +// Fields from hook +$parameters = array('param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder); +$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print ''; +print ''; + +$fieldtosortcurrentstock = 'stock'; +if ($fk_warehouse > 0) { + $fieldtosortcurrentstock = 'stock_reel'; +} + +// Lines of title +print ''; +print_liste_field_titre('Ref', $_SERVER["PHP_SELF"], 'p.ref', $param, '', '', $sortfield, $sortorder); +print_liste_field_titre('Label', $_SERVER["PHP_SELF"], 'p.label', $param, '', '', $sortfield, $sortorder); +if ($mode == 'future') { + print_liste_field_titre('CurrentStock', $_SERVER["PHP_SELF"], $fieldtosortcurrentstock, $param, '', '', $sortfield, $sortorder, 'right '); + print_liste_field_titre('', $_SERVER["PHP_SELF"]); + print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ', 'VirtualStockAtDateDesc'); + print_liste_field_titre('VirtualStock', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right ', 'VirtualStockDesc'); +} else { + print_liste_field_titre($stocklabel, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); + print_liste_field_titre('', $_SERVER["PHP_SELF"]); + print_liste_field_titre('CurrentStock', $_SERVER["PHP_SELF"], $fieldtosortcurrentstock, $param, '', '', $sortfield, $sortorder, 'right '); +} +print_liste_field_titre('', $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'right '); + +// Hook fields +$parameters = array('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; + +print "\n"; + +$i = 0; +while ($i < ($limit ? min($num, $limit) : $num)) +{ + $objp = $db->fetch_object($resql); + + if (!empty($conf->global->STOCK_SUPPORTS_SERVICES) || $objp->fk_product_type == 0) + { + $prod->fetch($objp->rowid); + + // Multilangs + /*if (!empty($conf->global->MAIN_MULTILANGS)) + { + $sql = 'SELECT label,description'; + $sql .= ' FROM '.MAIN_DB_PREFIX.'product_lang'; + $sql .= ' WHERE fk_product = '.$objp->rowid; + $sql .= ' AND lang = "'.$langs->getDefaultLang().'"'; + $sql .= ' LIMIT 1'; + + $resqlm = $db->query($sql); + if ($resqlm) + { + $objtp = $db->fetch_object($resqlm); + if (!empty($objtp->description)) $objp->description = $objtp->description; + if (!empty($objtp->label)) $objp->label = $objtp->label; + } + }*/ + + $currentstock = ''; + if ($fk_warehouse > 0) + { + //if ($productid > 0) { + $currentstock = $stock_prod_warehouse[$objp->rowid][$fk_warehouse]; + //} else { + // $currentstock = $objp->stock_reel; + //} + } else { + //if ($productid > 0) { + $currentstock = $stock_prod[$objp->rowid]; + //} else { + // $currentstock = $objp->stock; + //} + } + + if ($mode == 'future') { + $prod->load_stock('warehouseopen, warehouseinternal', 0); // This call also ->load_virtual_stock() + + //$result = $prod->load_stats_reception(0, '4'); + //print $prod->stats_commande_fournisseur['qty'].'
    '."\n"; + //print $prod->stats_reception['qty']; + + $stock = ''.$langs->trans("FeatureNotYetAvailable").''; + $virtualstock = $prod->stock_theorique; + } else { + if ($fk_warehouse > 0) { + $stock = $currentstock - $movements_prod_warehouse[$objp->rowid][$fk_warehouse]; + $nbofmovement = $movements_prod_warehouse_nb[$objp->rowid][$fk_warehouse]; + } else { + $stock = $currentstock - $movements_prod[$objp->rowid]; + $nbofmovement = $movements_prod_nb[$objp->rowid]; + } + } + + + print ''; + + // Product ref + print ''; + + // Product label + print ''; + + if ($mode == 'future') { + // Current stock + print ''; + + print ''; + + // Virtual stock at date + print ''; + + // Final virtual stock + print ''; + } else { + // Stock at date + print ''; + + print ''; + + // Current stock + print ''; + } + + // Action + print ''; + + // Fields from hook + $parameters = array('objp'=>$objp); + $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook + print $hookmanager->resPrint; + + print ''; + } + $i++; +} + +$parameters = array('sql'=>$sql); +$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook +print $hookmanager->resPrint; + +print '
    '; +$searchpicto = $form->showFilterAndCheckAddButtons(0); +print $searchpicto; +print '
    '.$prod->getNomUrl(1, '').''.$objp->label; + print ''; // TODO Remove this and make a fetch to get description when creating order instead of a GETPOST + print ''.$currentstock.''.$stock.''.$virtualstock.''.($stock ? $stock : ''.$stock.'').''; + if ($nbofmovement > 0) { + print ''.$langs->trans("Movements").''; + print ' '.$nbofmovement.''; + } + print ''.($currentstock ? $currentstock : '0').'
    '; +print '
    '; + +$db->free($resql); + +dol_fiche_end(); + +print ''; + +llxFooter(); + +$db->close(); diff --git a/htdocs/product/stock/tpl/stockcorrection.tpl.php b/htdocs/product/stock/tpl/stockcorrection.tpl.php index 22d92d4211f..88cced3b99d 100644 --- a/htdocs/product/stock/tpl/stockcorrection.tpl.php +++ b/htdocs/product/stock/tpl/stockcorrection.tpl.php @@ -68,7 +68,9 @@ print ''; if ($object->element == 'product') { print ''.$langs->trans("Warehouse").''; print ''; - print $formproduct->selectWarehouses((GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ?GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))), 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); + $ident = (GETPOST("dwid") ?GETPOST("dwid", 'int') : (GETPOST('id_entrepot') ? GETPOST('id_entrepot', 'int') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))); + if (empty($ident) && !empty($conf->global->MAIN_DEFAULT_WAREHOUSE)) $ident = $conf->global->MAIN_DEFAULT_WAREHOUSE; + print $formproduct->selectWarehouses($ident, 'id_entrepot', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, null, 'minwidth100'); print '   '; print ''; - } - else - { + } else { print ''; } print ''; print ''; print ''; - print ''.$langs->trans("EatByDate").''; - print $form->selectDate(($d_eatby ? $d_eatby : $pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled - print ''; - print ''.$langs->trans("SellByDate").''; - print $form->selectDate(($d_sellby ? $d_sellby : $pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled - print ''; + if (empty($conf->global->PRODUCT_DISABLE_EATBY)) { + print ''.$langs->trans("EatByDate").''; + print $form->selectDate(($d_eatby ? $d_eatby : $pdluo->eatby), 'eatby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled + print ''; + } + if (empty($conf->global->PRODUCT_DISABLE_SELLBY)) { + print ''.$langs->trans("SellByDate").''; + print $form->selectDate(($d_sellby ? $d_sellby : $pdluo->sellby), 'sellby', '', '', 1, "", 1, 0, ($pdluoid > 0 ? 1 : 0)); // If form was opened for a specific pdluoid, field is disabled + print ''; + } print ''; } diff --git a/htdocs/product/stock/valo.php b/htdocs/product/stock/valo.php index 816d97351b4..182d78e9cd1 100644 --- a/htdocs/product/stock/valo.php +++ b/htdocs/product/stock/valo.php @@ -149,9 +149,7 @@ if ($result) $url = DOL_URL_ROOT.'/viewimage.php?modulepart=graph_stock&file='.$file; print '
    '; } -} -else -{ +} else { dol_print_error($db); } diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php index 5bb816ad42e..c6a5d15a0b0 100644 --- a/htdocs/product/traduction.php +++ b/htdocs/product/traduction.php @@ -36,7 +36,7 @@ $langs->loadLangs(array('products', 'languages')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $cancel = GETPOST('cancel', 'alpha'); // Security check @@ -73,27 +73,21 @@ $cancel != $langs->trans("Cancel") && $current_lang = $langs->getDefaultLang(); // update de l'objet - if ($_POST["forcelangprod"] == $current_lang) - { + if ($_POST["forcelangprod"] == $current_lang) { $object->label = $_POST["libelle"]; $object->description = dol_htmlcleanlastbr($_POST["desc"]); $object->other = dol_htmlcleanlastbr($_POST["other"]); $object->update($object->id, $user); - } - else - { + } else { $object->multilangs[$_POST["forcelangprod"]]["label"] = $_POST["libelle"]; $object->multilangs[$_POST["forcelangprod"]]["description"] = dol_htmlcleanlastbr($_POST["desc"]); $object->multilangs[$_POST["forcelangprod"]]["other"] = dol_htmlcleanlastbr($_POST["other"]); } // sauvegarde en base - if ($object->setMultiLangs($user) > 0) - { + if ($object->setMultiLangs($user) > 0) { $action = ''; - } - else - { + } else { $action = 'add'; setEventMessages($object->error, $object->errors, 'errors'); } @@ -115,9 +109,7 @@ $cancel != $langs->trans("Cancel") && $object->label = $_POST["libelle-".$key]; $object->description = dol_htmlcleanlastbr($_POST["desc-".$key]); $object->other = dol_htmlcleanlastbr($_POST["other-".$key]); - } - else - { + } else { $object->multilangs[$key]["label"] = $_POST["libelle-".$key]; $object->multilangs[$key]["description"] = dol_htmlcleanlastbr($_POST["desc-".$key]); $object->multilangs[$key]["other"] = dol_htmlcleanlastbr($_POST["other-".$key]); @@ -127,9 +119,7 @@ $cancel != $langs->trans("Cancel") && if ($object->setMultiLangs($user) > 0) { $action = ''; - } - else - { + } else { $action = 'edit'; setEventMessages($object->error, $object->errors, 'errors'); } @@ -148,9 +138,7 @@ $cancel != $langs->trans("Cancel") && if ($object->delMultiLangs($langtodelete, $user) > 0) { $action = ''; - } - else - { + } else { $action = 'edit'; setEventMessages($object->error, $object->errors, 'errors'); } @@ -248,7 +236,7 @@ if ($action == 'edit') foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print "
    ".($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
    "; + print "
    ".($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
    "; print '
    '; print ''; @@ -277,15 +265,14 @@ if ($action == 'edit') print ''; print ''; -} -elseif ($action != 'add') +} elseif ($action != 'add') { if (!empty($object->multilangs)) { foreach ($object->multilangs as $key => $value) { $s = picto_from_langcode($key); - print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; + print ($s ? $s.' ' : '')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; print '
    '; print '
    '; diff --git a/htdocs/projet/activity/index.php b/htdocs/projet/activity/index.php index 107bcb4e4e3..295f96370f3 100644 --- a/htdocs/projet/activity/index.php +++ b/htdocs/projet/activity/index.php @@ -86,8 +86,7 @@ $morehtml .= ''; $morehtml .= ''; if ($mine) $tooltiphelp = $langs->trans("MyTasksDesc"); -else -{ +else { if ($user->rights->projet->all->lire && !$socid) $tooltiphelp = $langs->trans("TasksDesc"); else $tooltiphelp = $langs->trans("TasksPublicDesc"); } @@ -146,7 +145,7 @@ $sql .= " AND p.entity = ".$conf->entity; $sql .= " AND tt.fk_task = t.rowid"; $sql .= " AND tt.fk_user = ".$user->id; $sql .= " AND task_date BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; -$sql .= " AND p.rowid in (".$projectsListId.")"; +$sql .= " AND p.rowid in (".$db->sanitize($projectsListId).")"; $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); @@ -170,9 +169,7 @@ if ($resql) } $db->free($resql); -} -else -{ +} else { dol_print_error($db); } print '
    '; @@ -203,7 +200,7 @@ $sql .= " AND p.entity = ".$conf->entity; $sql .= " AND tt.fk_task = t.rowid"; $sql .= " AND tt.fk_user = ".$user->id; $sql .= " AND task_date BETWEEN '".$db->idate(dol_time_plus_duree(dol_mktime(0, 0, 0, $month, $day, $year), -1, 'd'))."' AND '".$db->idate(dol_time_plus_duree(dol_mktime(23, 59, 59, $month, $day, $year), -1, 'd'))."'"; -$sql .= " AND p.rowid in (".$projectsListId.")"; +$sql .= " AND p.rowid in (".$db->sanitize($projectsListId).")"; $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); @@ -227,9 +224,7 @@ if ($resql) } $db->free($resql); -} -else -{ +} else { dol_print_error($db); } print ''; @@ -263,7 +258,7 @@ if ($db->type != 'pgsql') $sql.= " AND tt.fk_task = t.rowid"; $sql.= " AND tt.fk_user = ".$user->id; $sql.= " AND task_date >= '".$db->idate(dol_get_first_day($year, $month)).'" AND ..."; - $sql.= " AND p.rowid in (".$projectsListId.")"; + $sql.= " AND p.rowid in (".$db->sanitize($projectsListId).")"; $sql.= " GROUP BY p.rowid, p.ref, p.title"; $resql = $db->query($sql); @@ -320,7 +315,7 @@ if (!empty($conf->global->PROJECT_TASK_TIME_MONTH)) $sql .= " AND tt.fk_task = t.rowid"; $sql .= " AND tt.fk_user = ".$user->id; $sql .= " AND task_date BETWEEN '".$db->idate(dol_get_first_day($year, $month))."' AND '".$db->idate(dol_get_last_day($year, $month))."'"; - $sql .= " AND p.rowid in (".$projectsListId.")"; + $sql .= " AND p.rowid in (".$db->sanitize($projectsListId).")"; $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); @@ -339,9 +334,7 @@ if (!empty($conf->global->PROJECT_TASK_TIME_MONTH)) print "\n"; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } print ''; @@ -371,7 +364,7 @@ if (!empty($conf->global->PROJECT_TASK_TIME_YEAR)) $sql .= " AND tt.fk_task = t.rowid"; $sql .= " AND tt.fk_user = ".$user->id; $sql .= " AND YEAR(task_date) = '".strftime("%Y", $now)."'"; - $sql .= " AND p.rowid in (".$projectsListId.")"; + $sql .= " AND p.rowid in (".$db->sanitize($projectsListId).")"; $sql .= " GROUP BY p.rowid, p.ref, p.title, p.public"; $resql = $db->query($sql); @@ -391,9 +384,7 @@ if (!empty($conf->global->PROJECT_TASK_TIME_YEAR)) print "\n"; } $db->free($resql); - } - else - { + } else { dol_print_error($db); } print ''; @@ -409,7 +400,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH // Get id of types of contacts for projects (This list never contains a lot of elements) $listofprojectcontacttype = array(); $sql = "SELECT ctc.rowid, ctc.code FROM ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sql .= " WHERE ctc.element = '".$projectstatic->element."'"; + $sql .= " WHERE ctc.element = '".$db->escape($projectstatic->element)."'"; $sql .= " AND ctc.source = 'internal'"; $resql = $db->query($sql); if ($resql) @@ -418,13 +409,12 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH { $listofprojectcontacttype[$obj->rowid] = $obj->code; } - } - else dol_print_error($db); + } else dol_print_error($db); if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0] = '0'; // To avoid sql syntax error if not found // Get id of types of contacts for tasks (This list never contains a lot of elements) $listoftaskcontacttype = array(); $sql = "SELECT ctc.rowid, ctc.code FROM ".MAIN_DB_PREFIX."c_type_contact as ctc"; - $sql .= " WHERE ctc.element = '".$taskstatic->element."'"; + $sql .= " WHERE ctc.element = '".$db->escape($taskstatic->element)."'"; $sql .= " AND ctc.source = 'internal'"; $resql = $db->query($sql); if ($resql) @@ -433,8 +423,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH { $listoftaskcontacttype[$obj->rowid] = $obj->code; } - } - else dol_print_error($db); + } else dol_print_error($db); if (count($listoftaskcontacttype) == 0) $listoftaskcontacttype[0] = '0'; // To avoid sql syntax error if not found @@ -456,7 +445,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH $sql .= ", ".MAIN_DB_PREFIX."element_contact as ect"; } $sql .= " WHERE p.entity IN (".getEntity('project').")"; - if ($mine || empty($user->rights->projet->all->lire)) $sql .= " AND p.rowid IN (".$projectsListId.")"; // project i have permission on + if ($mine || empty($user->rights->projet->all->lire)) $sql .= " AND p.rowid IN (".$db->sanitize($projectsListId).")"; // project i have permission on if ($mine) // this may duplicate record if we are contact twice { $sql .= " AND ect.fk_c_type_contact IN (".join(',', array_keys($listoftaskcontacttype)).") AND ect.element_id = t.rowid AND ect.fk_socpeople = ".$user->id; @@ -536,8 +525,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH $tasktmp->ref = $obj->ref; $tasktmp->label = $obj->label; print $tasktmp->getNomUrl(1, 'withproject', 'task', 1, '
    '); - } - else print $langs->trans("NoTasks"); + } else print $langs->trans("NoTasks"); print ''; print ''; print ''; } -} -else -{ +} else { print ''; } print "
    '.dol_print_date($db->jdate($obj->dateo), 'day').''.dol_print_date($db->jdate($obj->datee), 'day'); @@ -580,9 +568,7 @@ if (empty($conf->global->PROJECT_HIDE_TASKS) && !empty($conf->global->PROJECT_SH $db->free($resql); - } - else - { + } else { dol_print_error($db); } } diff --git a/htdocs/projet/activity/perday.php b/htdocs/projet/activity/perday.php index 2c9de0fa62c..1fb12e7202e 100644 --- a/htdocs/projet/activity/perday.php +++ b/htdocs/projet/activity/perday.php @@ -93,15 +93,12 @@ if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) { $usertoprocess = $user; $search_usertoprocessid = $usertoprocess->id; -} -elseif ($search_usertoprocessid > 0) +} elseif ($search_usertoprocessid > 0) { $usertoprocess = new User($db); $usertoprocess->fetch($search_usertoprocessid); $search_usertoprocessid = $usertoprocess->id; -} -else -{ +} else { $usertoprocess = new User($db); } @@ -193,9 +190,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') { $result = $object->fetch($taskid, $ref); if ($result < 0) $error++; - } - else - { + } else { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Task")), '', 'errors'); $error++; } @@ -231,9 +226,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') $result = $project->add_contact($idfortaskuser, $typeforprojectcontact, 'internal'); } } - } - else - { + } else { dol_print_error($db); } } @@ -246,9 +239,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') { $langs->load("errors"); setEventMessages($langs->trans("ErrorTaskAlreadyAssigned"), null, 'warnings'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -307,9 +298,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac { $object->timespent_datehour = dol_mktime(GETPOST($key."hour", 'int'), GETPOST($key."min", 'int'), 0, $monthofday, $dayofday, $yearofday); $object->timespent_withhour = 1; - } - else - { + } else { $object->timespent_datehour = dol_mktime(12, 0, 0, $monthofday, $dayofday, $yearofday); } $object->timespent_date = $object->timespent_datehour; @@ -317,9 +306,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac if ($object->timespent_date > 0) { $result = $object->addTimeSpent($user); - } - else - { + } else { setEventMessages("ErrorBadDate", null, 'errors'); $error++; break; @@ -341,9 +328,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('formfilterac header('Location: '.$_SERVER["PHP_SELF"].'?'.($projectid ? 'id='.$projectid : '').($search_usertoprocessid ? '&search_usertoprocessid='.$search_usertoprocessid : '').($mode ? '&mode='.$mode : '').'&year='.$yearofday.'&month='.$monthofday.'&day='.$dayofday); exit; } - } - else - { + } else { setEventMessages($langs->trans("ErrorTimeSpentIsEmpty"), null, 'errors'); } } @@ -463,13 +448,12 @@ print ''; print ''; $head = project_timesheet_prepare_head($mode, $usertoprocess); -dol_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, 'task'); +dol_fiche_head($head, 'inputperday', $langs->trans('TimeSpent'), -1, 'projecttask'); // Show description of content print '
    '; if ($mine || ($usertoprocess->id == $user->id)) print $langs->trans("MyTasksDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'
    '; -else -{ +else { if (empty($usertoprocess->id) || $usertoprocess->id < 0) { if ($user->rights->projet->all->lire && !$socid) print $langs->trans("ProjectsDesc").'.'.($onlyopenedproject ? ' '.$langs->trans("OnlyOpenedProject") : '').'
    '; @@ -479,9 +463,7 @@ else if ($mine || ($usertoprocess->id == $user->id)) { print $langs->trans("OnlyYourTaskAreVisible").'
    '; -} -else -{ +} else { print $langs->trans("AllTaskVisibleButEditIfYouAreAssigned").'
    '; } print '
    '; @@ -790,9 +772,7 @@ if (count($tasksarray) > 0)
    '.$langs->trans("NoAssignedTasks").'
    "; diff --git a/htdocs/projet/activity/permonth.php b/htdocs/projet/activity/permonth.php index ae4eed48515..26db00aeeca 100644 --- a/htdocs/projet/activity/permonth.php +++ b/htdocs/projet/activity/permonth.php @@ -96,15 +96,12 @@ if (empty($search_usertoprocessid) || $search_usertoprocessid == $user->id) { $usertoprocess = $user; $search_usertoprocessid = $usertoprocess->id; -} -elseif ($search_usertoprocessid > 0) +} elseif ($search_usertoprocessid > 0) { $usertoprocess = new User($db); $usertoprocess->fetch($search_usertoprocessid); $search_usertoprocessid = $usertoprocess->id; -} -else -{ +} else { $usertoprocess = new User($db); } @@ -149,9 +146,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') { $result = $object->fetch($taskid, $ref); if ($result < 0) $error++; - } - else - { + } else { setEventMessages($langs->transnoentitiesnoconv("ErrorFieldRequired", $langs->transnoentitiesnoconv("Task")), '', 'errors'); $error++; } @@ -188,9 +183,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') $result = $project->add_contact($idfortaskuser, $typeforprojectcontact, 'internal'); } } - } - else - { + } else { dol_print_error($db); } } @@ -203,9 +196,7 @@ if ($action == 'addtime' && $user->rights->projet->lire && GETPOST('assigntask') { $langs->load("errors"); setEventMessages($langs->trans("ErrorTaskAlreadyAssigned"), null, 'warnings'); - } - else - { + } else { setEventMessages($object->error, $object->errors, 'errors'); } } @@ -225,9 +216,7 @@ if ($action == 'addtime' && $user->rights->projet->lire) if (empty($timetoadd)) { setEventMessages($langs->trans("ErrorTimeSpentIsEmpty"), null, 'errors'); - } - else - { + } else { foreach ($timetoadd as $taskid => $value) // Loop on each task { $updateoftaskdone = 0; @@ -376,7 +365,7 @@ $nav .= '
    '; print ''; ?> - 0) { - $paycode = $paiements[0]->code; + 0) { + $paycode = $arrayOfValidPaymentModes[0]->code; $payIcon = ''; if ($paycode == 'LIQ') { $paycode = 'cash'; @@ -273,7 +297,7 @@ print ''; + print ''; } else { print ''; } @@ -282,8 +306,8 @@ print ''; print ''; ?> - 1) { - $paycode = $paiements[1]->code; + 1) { + $paycode = $arrayOfValidPaymentModes[1]->code; $payIcon = ''; if ($paycode == 'LIQ') { $paycode = 'cash'; @@ -296,7 +320,7 @@ print ''; + print ''; } else { $button = array_pop($action_buttons); print ''; @@ -306,8 +330,8 @@ print ''; print ''; ?> - 2) { - $paycode = $paiements[2]->code; + 2) { + $paycode = $arrayOfValidPaymentModes[2]->code; $payIcon = ''; if ($paycode == 'LIQ') { $paycode = 'cash'; @@ -320,9 +344,9 @@ print ''; + print ''; } else { - $button = array_pop($action_buttons); + $button = array_pop($action_buttons); print ''; } @@ -331,8 +355,8 @@ print ''; $i = 3; -while ($i < count($paiements)) { - print ''; +while ($i < count($arrayOfValidPaymentModes)) { + print ''; $i = $i + 1; } @@ -348,9 +372,13 @@ if ($conf->global->TAKEPOS_ENABLE_SUMUP) { $class = ($i == 3) ? "calcbutton3" : "calcbutton2"; foreach ($action_buttons as $button) { - $newclass = $class.($button["class"] ? " ".$button["class"] : ""); + $newclass = $class.($button["class"] ? " ".$button["class"] : ""); print ''; } + +if ($conf->global->TAKEPOS_DELAYED_PAYMENT) { + print ''; +} ?> diff --git a/htdocs/takepos/phone.php b/htdocs/takepos/phone.php index 0e49eff4ed5..14ca718740b 100644 --- a/htdocs/takepos/phone.php +++ b/htdocs/takepos/phone.php @@ -43,7 +43,7 @@ if (defined('INCLUDE_PHONEPAGE_FROM_PUBLIC_PAGE')) { } else { $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is id of table for Ba or Restaurant } -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $setterminal = GETPOST('setterminal', 'int'); $idproduct = GETPOST('idproduct', 'int'); @@ -169,9 +169,7 @@ elseif ($action == "checkplease") { if ($categorycursor['level'] == $levelofmaincategories) { $maincategories[$key] = $categorycursor; - } - else - { + } else { $subcategories[$key] = $categorycursor; } } @@ -202,11 +200,11 @@ $( document ).ready(function() { function LoadPlace(placeid){ place=placeid; @@ -236,11 +234,11 @@ function PublicPreOrder(){ function AddProductConfirm(placeid, productid){ place=placeid; if (qty==0){ - $("#phonediv2").load("auto_order.php?mobilepage=invoice&action=deleteline&place="+place+"&idline="+selectedline, function() { + $("#phonediv2").load("auto_order.php?mobilepage=invoice&action=deleteline&token=&place="+place+"&idline="+selectedline, function() { }); } else{ @@ -264,7 +262,7 @@ function SetQty(place, selectedline, qty){ else { ?> if (qty==0){ - $("#phonediv2").load("invoice.php?mobilepage=invoice&action=deleteline&place="+place+"&idline="+selectedline, function() { + $("#phonediv2").load("invoice.php?mobilepage=invoice&action=deleteline&token=&place="+place+"&idline="+selectedline, function() { }); } else{ @@ -273,7 +271,7 @@ function SetQty(place, selectedline, qty){ } + ?> LoadCats(); } @@ -286,11 +284,11 @@ function SetNote(place, selectedline){ function LoadCats(){
    '.strtoupper(substr($langs->trans('Floors'), 0, 3)).''; print ''; print ''; diff --git a/htdocs/takepos/receipt.php b/htdocs/takepos/receipt.php index 90b3a5c1fee..0773053d4a2 100644 --- a/htdocs/takepos/receipt.php +++ b/htdocs/takepos/receipt.php @@ -34,6 +34,8 @@ $place = (GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : 0); // $place is $facid = GETPOST('facid', 'int'); +$gift = GETPOST('gift', 'int'); + if (empty($user->rights->takepos->run)) { accessforbidden(); } @@ -89,12 +91,14 @@ if (!empty($hookmanager->resPrint)) {

    global->TAKEPOS_HEADER)) +$constFreeText = 'TAKEPOS_HEADER'.$_SESSION['takeposterminal']; +if (!empty($conf->global->TAKEPOS_HEADER) || !empty($conf->global->{$constFreeText})) { + $newfreetext = ''; $substitutionarray = getCommonSubstitutionArray($langs); - if (!empty($conf->global->TAKEPOS_HEADER)) - $newfreetext = make_substitutions($conf->global->TAKEPOS_HEADER, $substitutionarray); - echo $newfreetext; + if (!empty($conf->global->TAKEPOS_HEADER)) $newfreetext .= make_substitutions($conf->global->TAKEPOS_HEADER, $substitutionarray); + if (!empty($conf->global->{$constFreeText})) $newfreetext .= make_substitutions($conf->global->{$constFreeText}, $substitutionarray); + print $newfreetext; } ?>

    @@ -123,8 +127,8 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) trans("Label"); ?> trans("Qty"); ?> - trans("Price"); ?> - trans("TotalTTC"); ?> + trans("Price"); ?> + trans("TotalTTC"); ?> @@ -138,8 +142,8 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) else echo $line->description; ?> qty; ?> - total_ttc / $line->qty, 'MT'), 1); ?> - total_ttc, 1); ?> + total_ttc / $line->qty, 'MT'), 1); ?> + total_ttc, 1); ?> global->TAKEPOS_SHOW_CUSTOMER)
    - - + + global->TAKEPOS_TICKET_VAT_GROUPPED) { $vat_groups = array(); @@ -164,30 +168,84 @@ if ($conf->global->TAKEPOS_SHOW_CUSTOMER) foreach ($vat_groups as $key => $val) { ?> - - + + - + - + +multicurrency->enabled) && $_SESSION["takeposcustomercurrency"] != "" && $conf->currency != $_SESSION["takeposcustomercurrency"]) { + //Only show customer currency if multicurrency module is enabled, if currency selected and if this currency selected is not the same as main currency + include_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; + $multicurrency = new MultiCurrency($db); + $multicurrency->fetch(0, $_SESSION["takeposcustomercurrency"]); + echo ''; +} + +if ($conf->global->TAKEPOS_PRINT_PAYMENT_METHOD) { + $sql = "SELECT p.pos_change as pos_change, p.datep as date, p.fk_paiement, p.num_paiement as num, pf.amount as amount, pf.multicurrency_amount,"; + $sql .= " cp.code"; + $sql .= " FROM ".MAIN_DB_PREFIX."paiement_facture as pf, ".MAIN_DB_PREFIX."paiement as p"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as cp ON p.fk_paiement = cp.id"; + $sql .= " WHERE pf.fk_paiement = p.rowid AND pf.fk_facture = ".$facid; + $sql .= " ORDER BY p.datep"; + $resql = $db->query($sql); + if ($resql) + { + $num = $db->num_rows($resql); + $i = 0; + while ($i < $num) { + $row = $db->fetch_object($resql); + echo ''; + echo ''; + echo ''; + echo ''; + if ($row->code == "LIQ" && $row->pos_change > 0) // Print change only in cash payments + { + echo ''; + echo ''; + echo ''; + echo ''; + } + $i++; + } + } +} +?>
    trans("TotalHT"); ?>total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>trans("TotalHT"); ?>total_ht, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>
    trans("VAT").' '.vatrate($key, 1); ?>currency)."\n"; ?>trans("VAT").' '.vatrate($key, 1); ?>currency)."\n"; ?>
    trans("TotalVAT").''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>trans("TotalVAT").''.price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>
    trans("TotalTTC").''.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>trans("TotalTTC").''.price($object->total_ttc, 1, '', 1, - 1, - 1, $conf->currency)."\n"; ?>
    '; + if ($gift != 1) echo ''.$langs->trans("TotalTTC").' '.$_SESSION["takeposcustomercurrency"].''.price($object->total_ttc * $multicurrency->rate->rate, 1, '', 1, - 1, - 1, $_SESSION["takeposcustomercurrency"])."\n"; + echo '
    '; + echo $langs->transnoentitiesnoconv("PaymentTypeShort".$row->code); + echo ''; + $amount_payment = ($conf->multicurrency->enabled && $object->multicurrency_tx != 1) ? $row->multicurrency_amount : $row->amount; + if ($row->code == "LIQ") $amount_payment = $amount_payment + $row->pos_change; // Show amount with excess received if is cash payment + echo price($amount_payment, 1, '', 1, - 1, - 1, $conf->currency); + echo '
    '; + echo $langs->trans("Change"); + echo ''; + echo price($row->pos_change, 1, '', 1, - 1, - 1, $conf->currency); + echo '



    global->TAKEPOS_FOOTER)) +$constFreeText = 'TAKEPOS_FOOTER'.$_SESSION['takeposterminal']; +if (!empty($conf->global->TAKEPOS_FOOTER) || !empty($conf->global->{$constFreeText})) { + $newfreetext = ''; $substitutionarray = getCommonSubstitutionArray($langs); - $newfreetext = make_substitutions($conf->global->TAKEPOS_FOOTER, $substitutionarray); - echo $newfreetext; + if (!empty($conf->global->{$constFreeText})) $newfreetext .= make_substitutions($conf->global->{$constFreeText}, $substitutionarray); + if (!empty($conf->global->TAKEPOS_FOOTER)) $newfreetext .= make_substitutions($conf->global->TAKEPOS_FOOTER, $substitutionarray); + print $newfreetext; } ?> diff --git a/htdocs/takepos/reduction.php b/htdocs/takepos/reduction.php index 7be5ee85938..e882957ad14 100644 --- a/htdocs/takepos/reduction.php +++ b/htdocs/takepos/reduction.php @@ -51,9 +51,7 @@ $invoice = new Facture($db); if ($invoiceid > 0) { $invoice->fetch($invoiceid); -} -else -{ +} else { $sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."facture where ref='(PROV-POS".$_SESSION["takeposterminal"]."-".$place.")'"; $resql = $db->query($sql); $obj = $db->fetch_object($resql); @@ -64,9 +62,7 @@ else if (!$invoiceid) { $invoiceid = 0; // Invoice does not exist yet - } - else - { + } else { $invoice->fetch($invoiceid); } } diff --git a/htdocs/takepos/send.php b/htdocs/takepos/send.php index 3f59d4069b5..ea97e6d560b 100644 --- a/htdocs/takepos/send.php +++ b/htdocs/takepos/send.php @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; $facid = GETPOST('facid', 'int'); -$action = GETPOST('action', 'alpha'); +$action = GETPOST('action', 'aZ09'); $email = GETPOST('email', 'alpha'); if (empty($user->rights->takepos->run)) { @@ -51,29 +51,31 @@ $invoice->fetch($facid); $customer = new Societe($db); $customer->fetch($invoice->socid); -if ($action=="send") +if ($action == "send") { - include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; - include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; - $formmail = new FormMail($db); - $outputlangs = new Translate('', $conf); - $model_id = $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE; - $arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, $model_id); - $subject = $arraydefaultmessage->topic; - ob_start(); // turn on output receipt - include 'receipt.php'; - $receipt = ob_get_contents(); // get the contents of the output buffer - ob_end_clean(); - $msg="".$arraydefaultmessage->content."
    ".$receipt.""; - $sendto=$email; - $from=$mysoc->email; - $mail = new CMailFile($subject, $sendto, $from, $msg, array(), array(), array(), '', '', 0, 1); - if ($mail->error || $mail->errors) { - setEventMessages($mail->error, $mail->errors, 'errors'); - } else { - $result = $mail->sendfile(); - } - exit; + include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php'; + $formmail = new FormMail($db); + $outputlangs = new Translate('', $conf); + $model_id = $conf->global->TAKEPOS_EMAIL_TEMPLATE_INVOICE; + $arraydefaultmessage = $formmail->getEMailTemplate($db, 'facture_send', $user, $outputlangs, $model_id); + $subject = $arraydefaultmessage->topic; + + ob_start(); // turn on output receipt + include 'receipt.php'; + $receipt = ob_get_contents(); // get the contents of the output buffer + ob_end_clean(); + + $msg="".$arraydefaultmessage->content."
    ".$receipt.""; + $sendto=$email; + $from=$mysoc->email; + $mail = new CMailFile($subject, $sendto, $from, $msg, array(), array(), array(), '', '', 0, 1); + if ($mail->error || $mail->errors) { + setEventMessages($mail->error, $mail->errors, 'errors'); + } else { + $result = $mail->sendfile(); + } + exit; } $arrayofcss = array('/takepos/css/pos.css.php'); $arrayofjs = array(); diff --git a/htdocs/theme/eldy/badges.inc.php b/htdocs/theme/eldy/badges.inc.php index d2a59447bb9..36296bb0b8a 100644 --- a/htdocs/theme/eldy/badges.inc.php +++ b/htdocs/theme/eldy/badges.inc.php @@ -24,6 +24,18 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); font-size: 0.95em; padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */ } +.tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status { + font-size: 1.1em; + padding: .4em .4em; +} +/* Force values for small screen 767 */ +@media only screen and (max-width: 767px) +{ + .tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status { + font-size: 0.95em; + padding: .3em .2em; + } +} .badge-pill, .tabs .badge { padding-right: .5em; diff --git a/htdocs/theme/eldy/btn.inc.php b/htdocs/theme/eldy/btn.inc.php index a697274dffc..c866b187638 100644 --- a/htdocs/theme/eldy/btn.inc.php +++ b/htdocs/theme/eldy/btn.inc.php @@ -7,14 +7,20 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> --btncolorbg: #fbfbfb; --btncolorborderhover: none; --btncolorborder: #FFF; - --butactionbg:rgb(218, 235, 225); --butactiondeletebg: rgb(234,228,225); + /* tertiary color */ + /* --butactionbg:rgb(218, 235, 225); */ + /* --butactionbg:rgb(228, 218, 235); */ + --butactionbg:rgb(118, 145, 225); } global->MAIN_THEME_DARKMODEENABLED)) { +if (!empty($conf->global->THEME_DARKMODEENABLED)) { + print "/* For dark mode */\n"; + if ($conf->global->THEME_DARKMODEENABLED != 2) { + print "@media (prefers-color-scheme: dark) {"; + } print " - @media (prefers-color-scheme: dark) { :root { --btncolortext: ; @@ -24,8 +30,10 @@ if (!empty($conf->global->MAIN_THEME_DARKMODEENABLED)) { --butactionbg:rgb(173,140,79); --butactiondeletebg: rgb(252,84,91); - } - }"; + }\n"; + if ($conf->global->THEME_DARKMODEENABLED != 2) { + print "}"; + } } ?> @@ -51,6 +59,8 @@ span.butAction, span.butActionDelete { .butAction { background: var(--butactionbg); + color: #FFF !important; + border-radius: 3px; /* background: rgb(230, 232, 239); */ } .butActionRefused, .butAction, .butAction:link, .butAction:visited, .butAction:hover, .butAction:active, .butActionDelete, .butActionDelete:link, .butActionDelete:visited, .butActionDelete:hover, .butActionDelete:active { @@ -60,7 +70,6 @@ span.butAction, span.butActionDelete { margin: 0em em; padding: 0.6em em; - font-family: ; display: inline-block; text-align: center; cursor: pointer; @@ -70,10 +79,10 @@ span.butAction, span.butActionDelete { /* border: 1px solid #aaa; */ /* border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25); */ - border-top-right-radius: 0 !important; + /*border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; border-top-left-radius: 0 !important; - border-bottom-left-radius: 0 !important; + border-bottom-left-radius: 0 !important;*/ } .butActionNew, .butActionNewRefused, .butActionNew:link, .butActionNew:visited, .butActionNew:hover, .butActionNew:active { text-decoration: none; @@ -102,18 +111,6 @@ span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list padding-left: 0px; } -/*a.butActionNew>span.fa-plus-circle, a.butActionNew>span.fa-plus-circle:hover, -span.butActionNew>span.fa-plus-circle, span.butActionNew>span.fa-plus-circle:hover, -a.butActionNewRefused>span.fa-plus-circle, a.butActionNewRefused>span.fa-plus-circle:hover, -span.butActionNewRefused>span.fa-plus-circle, span.butActionNewRefused>span.fa-plus-circle:hover, -a.butActionNew>span.fa-list-alt, a.butActionNew>span.fa-list-alt:hover, -span.butActionNew>span.fa-list-alt, span.butActionNew>span.fa-list-alt:hover, -a.butActionNewRefused>span.fa-list-alt, a.butActionNewRefused>span.fa-list-alt:hover, -span.butActionNewRefused>span.fa-list-alt, span.butActionNewRefused>span.fa-list-alt:hover, -a.butActionNew>span.fa-comment-dots, a.butActionNew>span.fa-comment-dots:hover, -span.butActionNew>span.fa-comment-dots, span.butActionNew>span.fa-comment-dots:hover, -a.butActionNewRefused>span.fa-comment-dots, a.butActionNewRefused>span.fa-comment-dots:hover, -span.butActionNewRefused>span.fa-comment-dots, span.butActionNewRefused>span.fa-comment-dots:hover,*/ a.butActionNew>span.fa, a.butActionNew>span.fa:hover, span.butActionNew>span.fa, span.butActionNew>span.fa:hover, a.butActionNewRefused>span.fa, a.butActionNewRefused>span.fa:hover, @@ -195,7 +192,7 @@ TITLE BUTTON .btnTitle, a.btnTitle { display: inline-block; - padding: 4px 12px 4px 12px; + padding: 4px 4px 4px 4px; font-weight: 400; /* line-height: 1; */ text-align: center; @@ -211,8 +208,8 @@ TITLE BUTTON box-shadow: var(--btncolorbg); text-decoration: none; position: relative; - margin: 0 0 0 10px; - min-width: 80px; + /* margin: 0 0 0 8px; */ + min-width: 72px; text-align: center; color: var(--btncolortext); border: none; @@ -239,7 +236,6 @@ a.btnTitle.btnTitleSelected { border: 1px solid #bbb; border-radius: 3px; position: relative; - margin: 0 0 0 10px; text-align: center; /* color: #ffffff; background-color: rgb(); */ @@ -280,6 +276,9 @@ div.pagination li:first-child a.btnTitle{ /* rule to reduce top menu - 2nd reduction: Reduce width of top menu icons again */ @media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2) ? round($nbtopmenuentries * 69, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC2; ?>px) /* reduction 2 */ { + .butAction, .butActionRefused, .butActionDelete { + font-size: 0.95em; + } .btnTitle, a.btnTitle { display: inline-block; padding: 4px 4px 4px 4px; diff --git a/htdocs/theme/eldy/ckeditor/config.js b/htdocs/theme/eldy/ckeditor/config.js index b52fd6f7e51..50bf77c00ff 100644 --- a/htdocs/theme/eldy/ckeditor/config.js +++ b/htdocs/theme/eldy/ckeditor/config.js @@ -73,7 +73,7 @@ CKEDITOR.editorConfig = function( config ) ['Maximize'], ['SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone ['Undo','Redo','-','Find','Replace'], - ['Format','Font','FontSize'], + ['Font','FontSize'], ['Bold','Italic','Underline','Strike','Superscript','-','TextColor','RemoveFormat'], ['NumberedList','BulletedList','Outdent','Indent'], ['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'], diff --git a/htdocs/theme/eldy/dropdown.inc.php b/htdocs/theme/eldy/dropdown.inc.php index 2944dbe6c61..1140589a2e2 100644 --- a/htdocs/theme/eldy/dropdown.inc.php +++ b/htdocs/theme/eldy/dropdown.inc.php @@ -9,7 +9,7 @@ button.dropdown-item.global-search-item { outline: none; } -.open>.dropdown-search, .open>.dropdown-bookmark, .open>.dropdown-menu, .dropdown dd ul.open { +.open>.dropdown-search, .open>.dropdown-bookmark, .open>.dropdown-quickadd, .open>.dropdown-menu, .dropdown dd ul.open { display: block; } @@ -59,6 +59,29 @@ button.dropdown-item.global-search-item { -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175); box-shadow: 0 6px 12px rgba(0,0,0,.175); } +.dropdown-quickadd { + border-color: #eee; + + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 240px; + margin: 2px 0 0; + font-size: 14px; + text-align: left; + list-style: none; + background-color: #fff; + -webkit-background-clip: padding-box; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0,0,0,.15); + border-radius: 4px; + -webkit-box-shadow: 0 6px 12px rgba(0,0,0,.175); + box-shadow: 0 6px 12px rgba(0,0,0,.175); +} .dropdown-menu { border-color: #eee; @@ -163,7 +186,7 @@ button.dropdown-item.global-search-item { max-width: 100%; } -div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown { +div#topmenu-global-search-dropdown, div#topmenu-bookmark-dropdown, div#topmenu-quickadd-dropdown { global->THEME_TOPMENU_DISABLE_IMAGE)) { ?> line-height: 46px; @@ -194,6 +217,7 @@ a.top-menu-dropdown-link { } .dropdown-menu > .user-footer { + border-top: 1px solid #f0f0f0; background-color: #f9f9f9; padding: 10px; } @@ -202,8 +226,9 @@ a.top-menu-dropdown-link { clear: both; } - .dropdown-menu > .bookmark-footer{ + border-top: 1px solid #f0f0f0; + background-color: #f9f9f9; padding: 10px; } @@ -216,7 +241,6 @@ a.top-menu-dropdown-link { } .dropdown-menu > .bookmark-body, .dropdown-body{ - padding: 10px 0; overflow-y: auto; max-height: 60vh ; /* fallback for browsers without support for calc() */ max-height: calc(90vh - 110px) ; @@ -310,7 +334,7 @@ a.top-menu-dropdown-link { display: block !important; box-sizing: border-box; width: 100%; - padding: .25rem 1.5rem .25rem 1rem; + padding: .3em 1.5em .4em 1em; clear: both; font-weight: 400; color: #212529 !important; @@ -383,6 +407,63 @@ a.top-menu-dropdown-link { display: none !important; } +/* + * QUICK ADD + */ +#topmenu-quickadd-dropdown .dropdown-menu { + width: 310px !important; + color: #444; +} + +.quickadd-body.dropdown-body { + padding: unset; + padding-top: 15px; +} + +.quickadd-header { + color: #444 !important; +} + +div.quickadd { + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-justify-content: center; + -ms-flex-pack: center; + justify-content: center; + -webkit-align-content: center; + -ms-flex-line-pack: center; + align-content: center; + -webkit-align-items: flex-start; + -ms-flex-align: start; + align-items: flex-start; +} + +div.quickadd a { + color: #444; +} + +div.quickadd a:hover, div.quickadd a:active { + color: #000000; +} + +div.quickaddblock { + width: 95px; + height: 80px; +} + +div.quickaddblock:hover, +div.quickaddblock:active, +div.quickaddblock:focus { + background: ; +} + /* smartphone */ @media only screen and (max-width: 767px) { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 3bd0e560ce5..b9519eb50af 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -34,7 +34,7 @@ --oddevencolor: #202020; --colorboxstatsborder: #e0e0e0; --dolgraphbg: rgba(255,255,255,0); - --fieldrequiredcolor: #000055; + --fieldrequiredcolor: #804000; --colortextbacktab: #; --colorboxiconbg: #eee; --refidnocolor:#444; @@ -45,10 +45,12 @@ } global->MAIN_THEME_DARKMODEENABLED)) { - print "@media (prefers-color-scheme: dark) { - :root { - +if (!empty($conf->global->THEME_DARKMODEENABLED)) { + print "/* For dark mode */\n"; + if ($conf->global->THEME_DARKMODEENABLED != 2) { + print "@media (prefers-color-scheme: dark) {"; + } + print ":root { --colorbackhmenu1: #1d1e20; --colorbackvmenu1: #2b2c2e; --colorbacktitle1: #2b2d2f; @@ -84,8 +86,10 @@ if (!empty($conf->global->MAIN_THEME_DARKMODEENABLED)) { --amountremaintopaycolor:rgb(252,84,91); --amountpaymentcomplete:rgb(101,184,77); --amountremaintopaybackcolor:rbg(245,130,46); - } - }"; + }\n"; + if ($conf->global->THEME_DARKMODEENABLED != 2) { + print "}\n"; + } } ?> @@ -114,7 +118,7 @@ body { th a { font-weight: !important; } a.tab { font-weight: 500 !important; } -a:link, a:visited, a:hover, a:active { font-family: ; color: var(--colortextlink); text-decoration: none; } +a:link, a:visited, a:hover, a:active, .classlink { color: var(--colortextlink); text-decoration: none; } a:hover { text-decoration: underline; color: var(--colortextlink); } a.commonlink { color: var(--colortextlink) !important; text-decoration: none; } th.liste_titre a div div:hover, th.liste_titre_sel a div div:hover { text-decoration: underline; } @@ -139,7 +143,7 @@ table.liste th.wrapcolumntitle.liste_titre:not(.maxwidthsearch), table.liste td. .liste_titre input[name=search_smonth], .liste_titre input[name=search_month], .liste_titre input[name=search_emonth], .liste_titre input[name=smonth], .liste_titre input[name=month], .liste_titre select[name=month], .liste_titre input[name=month_lim], .liste_titre input[name=month_start], .liste_titre input[name=month_end], .liste_titre input[name=month_create], .liste_titre input[name=search_month_lim], .liste_titre input[name=search_month_start], .liste_titre input[name=search_month_end], .liste_titre input[name=search_month_create], -.liste_titre input[name=search_month_create], .liste_titre input[name=search_month_start], .liste_titre input[name=search_month_end], +.liste_titre input[name=search_month_update], .liste_titre input[name=search_month_start], .liste_titre input[name=search_month_end], .liste_titre input[name=day_date_when], .liste_titre input[name=dayvalid], .liste_titre input[name=search_orderday], .liste_titre input[name=search_deliveryday], .liste_titre input[name=search_sday], .liste_titre input[name=search_day], .liste_titre input[name=search_eday], .liste_titre input[name=sday], .liste_titre input[name=day], .liste_titre select[name=day], .liste_titre input[name=day_lim], .liste_titre input[name=day_start], .liste_titre input[name=day_end], .liste_titre input[name=day_create], @@ -165,7 +169,7 @@ input, input.flat, textarea, textarea.flat, form.flat select, select, select.fla font-family: ; outline: none; margin: 0px 0px 0px 0px; - borderglobal->THEME_HIDE_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor); + borderglobal->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor); } input { @@ -186,9 +190,14 @@ input, select { } #mainbody input.button:not(.buttongen):not(.bordertransp) { background: var(--butactionbg); + color: #FFF !important; + border-radius: 3px; border-collapse: collapse; border: none; } +#mainbody span.websitetools input.button:not(.buttongen):not(.bordertransp) { + color: #000 !important; +} #mainbody input.buttongen, #mainbody button.buttongen { padding: 3px 4px; } @@ -207,7 +216,6 @@ input:invalid, select:invalid { /* Focus definitions must be after standard definition */ textarea:focus { - /* v6 box-shadow: 0 0 4px #8091BF; */ border: 1px solid #aaa !important; } input:focus, select:focus { @@ -306,6 +314,10 @@ input.buttonpaymentstripe { background-repeat: no-repeat; background-position: 8px 11px; } +.logopublicpayment #dolpaymentlogo { + max-height: 100px; +} + a.buttonticket { padding-left: 5px; padding-right: 5px; @@ -372,6 +384,9 @@ input.pageplusone { .colorwhite { color: #fff; } +.colorgrey { + color: #888 !important; +} .colorblack { color: #000; } @@ -392,7 +407,16 @@ input.removedfile { border: 0px !important; vertical-align: text-bottom; } -input[type=file ] { background-color: transparent; border-top: none; border-left: none; border-right: none; box-shadow: none; } +input[type=file ] { + background-color: transparent; + box-shadow: none; + global->THEME_SHOW_BORDER_ON_INPUT)) { ?> + border-top: none; + border-left: none; + border-right: none; + + borderglobal->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor); +} input[type=checkbox] { background-color: transparent; border: none; box-shadow: none; } input[type=radio] { background-color: transparent; border: none; box-shadow: none; } input[type=image] { background-color: transparent; border: none; box-shadow: none; } @@ -494,10 +518,28 @@ div.floatright { float:; } +.block +{ + display:block; +} .inline-block { display:inline-block; } +.largenumber { + font-size: 1.4em; +} +button[name='button_search_x'] span.fa.fa-search { + font-size: 1.3em; +} +button[name='button_removefilter_x'] span.fa.fa-remove { + opacity: 0.5; + font-size: 1.3em; +} +button:focus { + outline: none; +} + th .button { -webkit-box-shadow: none !important; @@ -524,6 +566,9 @@ th .button { .centpercent { width: 100%; } +.centpercentwithoutmenu { + width: calc(100% - 200px); +} .quatrevingtpercent, .inputsearch { width: 80%; } @@ -556,6 +601,9 @@ textarea.centpercent { text-align: center; margin: 0px auto; } +.alignstart { + text-align: start; +} .left { text-align: ; } @@ -598,6 +646,9 @@ textarea.centpercent { .nobold { font-weight: normal !important; } +.uppercase { + text-transform: uppercase; +} .nounderline { text-decoration: none; } @@ -653,10 +704,18 @@ textarea.centpercent { font-size: 0.85em; opacity: 0.7; } - +.borderimp { + border: 1px solid #888 !important; +} .text-warning{ color : } +.longmessagecut { + max-height: 250px; + max-width: 100%; + overflow-y: auto; +} + body[class*="colorblind-"] .text-warning{ color : } @@ -686,9 +745,17 @@ body[class*="colorblind-"] .text-success{ float: none !important; } +span.fa.fa-plus-circle.paddingleft { + padding-right: 4px; + padding-top: 3px; + padding-bottom: 2px; +} + .fa-toggle-on, .fa-toggle-off { font-size: 2em; } .websiteselectionsection .fa-toggle-on, .websiteselectionsection .fa-toggle-off, -.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off { +.asetresetmodule .fa-toggle-on, .asetresetmodule .fa-toggle-off, +.tdwebsitesearchresult .fa-toggle-on, .tdwebsitesearchresult .fa-toggle-off +{ font-size: 1.5em; vertical-align: text-bottom; } @@ -704,9 +771,15 @@ body[class*="colorblind-"] .text-success{ #formuserfile { margin-top: 4px; } +#formuserfile input[type='file'] { + font-size: 1em; +} #formuserfile_link { margin-left: 1px; } +#formuserfile_link input[type='text'] { + font-size: 1em; +} .listofinvoicetype { height: 28px; vertical-align: middle; @@ -763,6 +836,43 @@ div.divsearchfield { padding: 3px; } +.a-filter, .a-mesure { + border-radius: 50px; + background: var(--colortexttitlenotab); + color: #fff; + padding: 8px 10px 8px 6px; +} +.a-filter:before { + content: "\f0b0"; +} +.a-mesure:before { + content: "\f080"; +} +.a-filter:before, .a-mesure:before { + font-family: "Font Awesome 5 Free"; + font-weight: 600; + padding-right: 5px; + padding-left: 5px; +} +.a-filter-disabled, .a-mesure-disabled { + border-radius: 50px; + background: var(--colorbacktitle1); + padding: 8px; + opacity: 0.6; +} + +div.div-for-modal { + /* display: none; */ + position:absolute; + top:calc(50% - 200px); + left:calc(50% - 250px); + width:500px; /* adjust as per your needs */ + height:400px; /* adjust as per your needs */ + background: #fff; + border: 1px solid #bbb; + box-shadow: 2px 2px 20px #ddd; + z-index: 100; +} px; /* we guarantee height of 500 */ +} +.maxscreenheightless300 { + max-height: px; /* we guarantee height of 500 */ +} + + + /* ============================================================================== */ /* Styles to hide objects */ /* ============================================================================== */ .clearboth { clear:both; } + .hideobject { display: none; } .minwidth50 { min-width: 50px; } .minwidth75 { min-width: 75px; } @@ -1071,16 +1204,21 @@ table[summary="list_of_modules"] .fa-cog { .maxwidth25 { max-width: 25px; } .maxwidth50 { max-width: 50px; } .maxwidth75 { max-width: 75px; } +.maxwidthdate { max-width: 80px; } .maxwidth100 { max-width: 100px; } .maxwidth125 { max-width: 125px; } .maxwidth150 { max-width: 150px; } .maxwidth200 { max-width: 200px; } +.maxwidth250 { max-width: 250px; } .maxwidth300 { max-width: 300px; } .maxwidth400 { max-width: 400px; } .maxwidth500 { max-width: 500px; } +.maxwidth750 { max-width: 750px; } +.maxwidth1000 { max-width: 1000px; } .maxwidth50imp { max-width: 50px !important; } .maxwidth75imp { max-width: 75px !important; } .minheight20 { min-height: 20px; } +.minheight30 { min-height: 30px; } .minheight40 { min-height: 40px; } .titlefieldcreate { width: 20%; } .titlefield { /* width: 25%; */ width: 250px; } @@ -1133,6 +1271,11 @@ table[summary="list_of_modules"] .fa-cog { .minwidth500imp { min-width: 250px !important; } } +.widthcentpercentminusx { + width: calc(100% - 50px) !important; + display: inline-block; +} + /* Force values for small screen 767 */ @media only screen and (max-width: 767px) { @@ -1155,11 +1298,12 @@ table[summary="list_of_modules"] .fa-cog { margin-bottom: 15px !important; } - select.minwidth100imp, select.minwidth100, select.minwidth200, .widthcentpercentminusx { + select.minwidth100imp, select.minwidth100, select.minwidth200, select.minwidth300 { width: calc(100% - 50px) !important; display: inline-block; } + .clearbothonsmartphone { clear: both; display: block; } /*img.photoref, div.photoref { box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2); }*/ @@ -1344,7 +1488,7 @@ td.showDragHandle { #id-left { padding-top: 20px; padding-bottom: 5px; - global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN)) { ?> + global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN) && ! empty($conf->global->MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)) { ?> padding-top: 8px; } @@ -1354,11 +1498,22 @@ td.showDragHandle { background: var(--colorbackbody); padding-bottom: 20px; } -#id-left { -/* background-color: #fff; - border-right: 1px #888 solid; - height: calc(100% - 50px);*/ + +/* DOL_XXX For having horizontal scroll into array (like with smartphone) */ + +.classforhorizontalscrolloftabs #id-container { + width: 100%; } +.classforhorizontalscrolloftabs .side-nav { + display: block; + float: left; +} +.classforhorizontalscrolloftabs #id-right { + width:calc(100% - 210px); + display: inline-block; +} + + global->THEME_DISABLE_STICKY_TOPMENU)) { ?> .side-nav-vert { @@ -1369,6 +1524,8 @@ td.showDragHandle { .side-nav { + /*display: block; + float: left; */ display: table-cell; border-: 1px solid #E0E0E0; box-shadow: 3px 0 6px -2px #eee; @@ -1452,51 +1609,63 @@ div.vmenu, td.vmenu { .menuhider { display: none !important; } + /* rule to reduce top menu - 3rd reduction: The menu for user is on left */ @media only screen and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */ { -body.sidebar-collapse .side-nav { - display: none; + body.sidebar-collapse .side-nav { + display: none; + } + + body.sidebar-collapse .login_block { + display: none; + } + + .menuhider { display: block !important; } + .dropdown-user-image { display: none; } + .user-header { height: auto !important; color: var(--colorbackbody); } + + #id-container { + width: 100%; + } + .side-nav { + border-bottom: 1px solid #BBB; + background: #FFF; + padding-left: 20px; + padding-right: 20px; + position: absolute; + z-index: 90; + } + div.blockvmenulogo + { + border-bottom: 0 !important; + } + div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks, div.blockvmenuend { + border-top: none !important; + border-left: none !important; + border-right: none !important; + border-bottom: 1px solid #e0e0e0; + padding-left: 0 !important; + } + div.vmenu, td.vmenu { + padding-right: 6px !important; + } + div.fiche { + margin-: 9px !important; + margin-: 10px !important; + } + + .pagination .fa-chevron-left, .pagination .fa-chevron-right { + font-size: 1.2em; + } } -body.sidebar-collapse .login_block { - display: none; -} - -.menuhider { display: block !important; } -.dropdown-user-image { display: none; } -.user-header { height: auto !important; color: var(--colorbackbody); } - -#id-container { - width: 100%; -} -.side-nav { - border-bottom: 1px solid #BBB; - background: #FFF; - padding-left: 20px; - padding-right: 20px; - position: absolute; - z-index: 90; -} -div.blockvmenulogo +@media only screen and (min-width: 768px) and (max-width: global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3) ? round($nbtopmenuentries * 47, 0) + 130 : $conf->global->THEME_ELDY_WITDHOFFSET_FOR_REDUC3; ?>px) /* reduction 3 */ { - border-bottom: 0 !important; -} -div.blockvmenupair, div.blockvmenuimpair, div.blockvmenubookmarks, div.blockvmenuend { - border-top: none !important; - border-left: none !important; - border-right: none !important; - border-bottom: 1px solid #e0e0e0; - padding-left: 0 !important; -} -div.vmenu, td.vmenu { - padding-right: 6px !important; -} -div.fiche { - margin-: 9px !important; - margin-: 10px !important; -} - + div.fiche { + margin-: 13px !important; + margin-: 14px !important; + } } @@ -1513,7 +1682,7 @@ div.fiche>table:first-child { margin-bottom: 15px; } div.fiche>table.table-fiche-title { - margin-bottom: 7px; + margin-bottom: 12px; } div.fichecenter { width: 100%; @@ -1642,8 +1811,8 @@ td.nobordernopadding.widthpictotitle.col-picto { color: #999; } +/* span.widthpictotitle.pictotitle { - /* background: rgba(70, 3, 62, 0.5); */ background: var(--colortexttitlenotab); opacity: 0.8; color: #fff !important; @@ -1652,10 +1821,12 @@ span.widthpictotitle.pictotitle { min-width: 30px; text-align: center; } +*/ .pictotitle { margin-: 8px; /* margin-bottom: 4px; */ } + .pictoobjectwidth { width: 14px; } @@ -1703,7 +1874,7 @@ div.attacharea { } div.attachareaformuserfileecm { padding-top: 0; - padding-bottom: 0; + padding-bottom: 6px; } div.arearef { @@ -1758,6 +1929,9 @@ img.photoref, div.photoref { width: 80px; object-fit: contain; } +div.photoref .fa, div.photoref .fas, div.photoref .far { + font-size: 2.5em; +} img.fitcontain { object-fit: contain; } @@ -1997,90 +2171,7 @@ a.tmenuimage:hover{ /* Do not load menu img for other if hidden to save bandwidth */ - - - - div.mainmenu.home{ - background-image: url(); - background-position-x: center; - } - - div.mainmenu.billing { - background-image: url(); - } - - div.mainmenu.accountancy { - background-image: url(); - } - - div.mainmenu.agenda { - background-image: url(); - } - - div.mainmenu.bank { - background-image: url(); - } - - div.mainmenu.cashdesk { - background-image: url(); - } - - div.mainmenu.takepos { - background-image: url(); - } - - div.mainmenu.companies { - background-image: url(); - } - - div.mainmenu.commercial { - background-image: url(); - } - - div.mainmenu.ecm { - background-image: url(); - } - - div.mainmenu.externalsite { - background-image: url(); - } - - div.mainmenu.ftp { - background-image: url(); - } - - div.mainmenu.hrm { - background-image: url(); - } - - div.mainmenu.members { - background-image: url(); - } - - div.mainmenu.products { - background-image: url(); - } - - div.mainmenu.mrp { - background-image: url(); - } - - div.mainmenu.project { - background-image: url(); - } - - div.mainmenu.ticket { - background-image: url(); - } - - div.mainmenu.tools { - background-image: url(); - } - - div.mainmenu.website { - background-image: url(); - } - + 'name of class for div') @@ -2131,9 +2222,7 @@ a.tmenuimage:hover{ print 'div.mainmenu.'.$val.'::before { content: "\f249"; }'."\n"; - } - else - { + } else { print "/* A mainmenu entry was found but img file ".$val.".png not found (check /".$val."/img/".$val.".png), so we use a generic one */\n"; $url = dol_buildpath($path.'/theme/'.$theme.'/img/menus/generic'.(min($generic, 4))."_over.png", 1); print "div.mainmenu.".$val." {\n"; @@ -2141,9 +2230,7 @@ a.tmenuimage:hover{ print "}\n"; } $generic++; - } - else - { + } else { print "div.mainmenu.".$val." {\n"; print " background-image: url(".$url.");\n"; print "}\n"; @@ -2657,7 +2744,7 @@ li.expanded > a.fmdirlia.jqft.ecmjqft { /* ============================================================================== */ div.tabs { text-align: ; - padding-top: 10px; + margin-top: 10px; padding-left: 6px; padding-right: 6px; clear:both; @@ -2886,6 +2973,12 @@ div.tabs.nopaddingleft { .nopaddingright { padding-: 0px; } +.nopaddingtopimp { + padding-top: 0px !important; +} +.nopaddingbottomimp { + padding-bottom: 0px !important; +} .notopnoleft { border-collapse: collapse; border: 0px; @@ -2979,22 +3072,22 @@ td.border, div.tagtable div div.border { } table.liste, table.noborder, table.formdoc, div.noborder { width: 100%; - border-collapse: separate !important; border-spacing: 0px; - border-top-width: px; border-top-color: rgb(); border-top-style: solid; - /* border-top-width: 2px; - border-top-color: var(--colorbackhmenu1); - border-top-style: solid; */ - - /*border-bottom-width: 1px; - border-bottom-color: rgb(); - border-bottom-style: solid;*/ - margin: 0px 0px 5px 0px; + + /*width: calc(100% - 7px); + border-collapse: separate !important; + border-spacing: 0px; + border-top-width: 0px; + border-top-color: rgb(215,215,215); + border-top-style: solid; + margin: 0px 0px 5px 2px; + box-shadow: 1px 1px 5px #ddd; + */ } #tablelines { border-bottom-width: 1px; @@ -3025,6 +3118,10 @@ table.paddingtopbottomonly tr td { .liste_titre_filter { background: var(--colorbacktitle1) !important; } +.liste_titre2 { + background: var(--colorbackhmenu1) !important; + color: #fff; +} table:not(.listwithfilterbefore) tr.liste_titre_filter:first-of-type td.liste_titre { padding-top: 5px; } @@ -3116,6 +3213,7 @@ div.refid { font-weight: bold; color: var(--colortexttitlenotab); font-size: 1.2em; + word-break: break-word; } div.refidno { padding-top: 3px; @@ -3211,11 +3309,7 @@ div.pagination li:first-child span { /*border-top-left-radius: 4px; border-bottom-left-radius: 4px;*/ } -div.pagination li:last-child a, -div.pagination li:last-child span { - /*border-top-right-radius: 4px; - border-bottom-right-radius: 4px;*/ -} + div.pagination li a:hover, div.pagination li:not(.paginationafterarrows,.title-button) span:hover, div.pagination li a:focus, @@ -3268,7 +3362,17 @@ table.hidepaginationprevious .paginationprevious { table.hidepaginationnext .paginationnext { display: none; } - +.tabBar .arearef .pagination.paginationref { + max-width: calc(30%); +} +.paginationafterarrows a.btnTitlePlus, .titre_right a.btnTitlePlus { + border: 1px solid var(--btncolorborder); +} +.paginationafterarrows a.btnTitlePlus:hover span:before, .titre_right a.btnTitlePlus:hover span:before { + /* text-shadow: 0px 0px 5px #ccc; */ + /* filter: invert(0.3); */ + font-size: 1.07em; +} /* Set the color for hover lines */ @@ -3290,9 +3394,6 @@ table.hidepaginationnext .paginationnext { } -.nohover:hover { - background: unset !important; -} .nohoverborder:hover { border: unset; box-shadow: unset; @@ -3620,8 +3721,8 @@ ul.noborder li:nth-child(even):not(.liste_titre) { /* padding: 3px; */ } .boxstats { - padding-left: 3px; - padding-right: 3px; + padding-left: 6px; + padding-right: 6px; padding-top: 2px; padding-bottom: 2px; width: 118px; @@ -3706,8 +3807,10 @@ ul.noborder li:nth-child(even):not(.liste_titre) { .boxstats:hover { box-shadow: 0px 0px 8px 0px rgba(0,0,0,0.20); } -span.boxstatstext { +span.boxstatstext span:not(.fas) { opacity: 0.5; +} +span.boxstatstext { line-height: 18px; color: var(--colortext); } @@ -3938,7 +4041,7 @@ div.boximport { .product_line_stock_ok { color: #002200; } .product_line_stock_too_low { color: #884400; } -.fieldrequired { font-weight: bold; color: var(--fieldrequiredcolor); } +.fieldrequired { font-weight: bold; color: var(--fieldrequiredcolor) !important; } td.widthpictotitle { width: 26px; text-align: ; } span.widthpictotitle { font-size: 1.7em; } @@ -4004,15 +4107,18 @@ div.titre { text-decoration: none; padding-top: 5px; padding-bottom: 5px; + /* text-transform: capitalize; */ } div.fiche > table.table-fiche-title:first-of-type div { color: var(--colortexttitlenotab); + font-size: 1.05em; + /* text-transform: uppercase; */ /* font-weight: 600; */ } + div.titre { color: var(--colortexttitlenotab); } - .secondary { color: var(--colortexttitlenotab); } @@ -4024,7 +4130,7 @@ table.table-fiche-title .col-title div.titre{ line-height: 40px; } table.table-fiche-title { - margin-bottom: 5px; + margin-bottom: 12px; } @@ -4044,6 +4150,9 @@ div.backgreypublicpayment { background-color: #f0f0f0; padding: 20px; border-bot #tablepublicpayment .CTableRow1 { background-color: #F0F0F0 !important; } #tablepublicpayment tr.liste_total { border-bottom: 1px solid #CCCCCC !important; } #tablepublicpayment tr.liste_total td { border-top: none; } +input#cardholder-name { + font-size: 1em; +} .divmainbodylarge { margin-left: 40px; margin-right: 40px; } #divsubscribe { max-width: 900px; } @@ -4158,7 +4267,7 @@ div.ui-tooltip { div.ui-tooltip.mytooltip { border: none !important; padding: 10px 15px; - border-radius: 0; + border-radius: 4px; margin: 2px; font-stretch: condensed; -moz-box-shadow: 0.5px 0.5px 4px 0px rgba(0, 0, 0, 0.5); @@ -4168,6 +4277,8 @@ div.ui-tooltip.mytooltip { filter:progid:DXImageTransform.Microsoft.Shadow(color=#656565, Direction=134, Strength=5); background: var(--tooltipbgcolor) !important; color : var(--tooltipfontcolor); + line-height: 1.6em; + min-width: 200px; } @@ -4315,7 +4426,7 @@ span[phptag] { border-bottom: 1px solid #ccc; background: #e6e6e6; display: inline-block; - padding: 4px 0 4px 0; + padding: 5px 0 5px 0; z-index: 1000; } .websitebar .buttonDelete, .websitebar .button { @@ -4401,7 +4512,7 @@ table.cal_month td { padding-left: 1px !important; padding-right: 1px !important .cal_other_month_right { border-right: solid 1px #C0C0C0; } .cal_other_month { /* opacity: 0.6; */ background: #EAEAEA; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_past_month { /* opacity: 0.6; */ background: #EEEEEE; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } -.cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } +.cal_current_month { background: #FFFFFF; border-left: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px !important; } .cal_current_month_peruserleft { background: #FFFFFF; border-left: solid 2px #6C7C7B; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today { background: #FDFDF0; border-left: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } .cal_today_peruser { background: #FDFDF0; border-right: solid 1px #E0E0E0; border-bottom: solid 1px #E0E0E0; padding-: 2px; padding-: 1px; padding-top: 0px; padding-bottom: 0px; } @@ -4418,7 +4529,8 @@ table.cal_month td { padding-left: 1px !important; padding-right: 1px !important .cal_today_peruser_impair { background: #F8F8F0; } .peruser_busy { } .peruser_notbusy { opacity: 0.5; } -table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; min-height: 20px; filter: saturate(0.8); } +div.event { margin-left: 8px; margin-right: 8px; margin-bottom: 8px; margin-top: 4px; border-radius: 4px; box-shadow: 2px 2px 5px rgba(100, 100, 100, 0.2); } +table.cal_event { border: none; border-collapse: collapse; margin-bottom: 1px; min-height: 20px; filter: saturate(0.8); border-radius: 3px; } table.cal_event td { border: none; padding-: 2px; padding-: 2px; padding-top: 0px; padding-bottom: 0px; } table.cal_event td.cal_event { padding: 4px 4px !important; } table.cal_event td.cal_event_right { padding: 4px 4px !important; } @@ -4426,10 +4538,15 @@ table.cal_event td.cal_event_right { padding: 4px 4px !important; } .cal_event a:link { color: #111111; font-weight: normal !important; } .cal_event a:visited { color: #111111; font-weight: normal !important; } .cal_event a:active { color: #111111; font-weight: normal !important; } -.cal_event_busy a:hover { color: #111111; font-weight: normal !important; color:rgba(255,255,255,.75); } +.cal_event_notbusy a.cal_event_title:hover { color: #111111; font-weight: normal !important; color:rgba(255,255,255,.75); } .cal_event_busy { } -.cal_peruserviewname { max-width: 140px; height: 22px; } +.cal_peruserviewname { max-width: 140px; height: 30px !important; } +.cal_event span.badge.badge-status { border: 1px solid #aaa; } table.cal_month tr td table.nobordernopadding tr td { padding: 0 2px 0 2px; } +table.cal_month tr.liste_titre td.tdfordaytitle { min-width: 120px; } +a.dayevent-aday { + padding-left: 8px; +} .calendarviewcontainertr { height: 100px; } @@ -4510,7 +4627,7 @@ td.cal_other_month { /* ============================================================================== */ /* CSS for treeview */ -.treeview ul { background-color: transparent !important; margin-top: 4px; padding-top: 4px !important; } +.treeview ul { background-color: transparent !important; margin-bottom: 4px !important; margin-top: 0 !important; padding-top: 4px !important; } .treeview li { background-color: transparent !important; padding: 0 0 0 16px !important; min-height: 26px; } .treeview .hover { color: var(--colortextlink) !important; text-decoration: underline !important; } .treeview .hitarea { margin-top: 3px; } @@ -4992,6 +5109,12 @@ div.ecmjqft { right:4px; clear: both; } +#ecm-layout-north { + min-height: 40px; +} +#ecm-layout-north div.attachareaformuserfileecm { + padding-bottom: 0px; +} div#ecm-layout-west { width: 380px; vertical-align: top; @@ -5159,16 +5282,18 @@ span#select2-taskid-container[title^='--'] { } span.select2.select2-container.select2-container--default { + global->THEME_SHOW_BORDER_ON_INPUT)) { ?> border-left: none; border-top: none; border-right: none; + } input.select2-input { border-bottom: none ! important; } .select2-choice { border: none; - border-bottom: solid 1px rgba(0,0,0,.2) !important; /* required to avoid to lose bottom line when focus is lost on select2. */ + border-bottom: solid 1px var(--inputbordercolor) !important; /* required to avoid to lose bottom line when focus is lost on select2. */ } .select2-results .select2-highlighted.optionblue { color: #FFF !important; @@ -5231,19 +5356,23 @@ input.select2-input { box-shadow: none !important; } .select2-container--open .select2-dropdown--above { - border-bottom: solid 1px rgba(0,0,0,.2); + border-bottom: solid 1px var(--inputbordercolor); } .select2-drop.select2-drop-above.select2-drop-active { border-top: 1px solid #ccc; - border-bottom: solid 1px rgba(0,0,0,.2); + border-bottom: solid 1px var(--inputbordercolor); } .select2-container--default .select2-selection--single { outline: none; + global->THEME_SHOW_BORDER_ON_INPUT)) { ?> border-top: none; border-left: none; border-right: none; - border-bottom: solid 1px rgba(0,0,0,.2); + + + borderglobal->THEME_SHOW_BORDER_ON_INPUT) ? '-bottom' : ''; ?>: solid 1px var(--inputbordercolor); + -webkit-box-shadow: none !important; box-shadow: none !important; border-radius: 0 !important; @@ -5254,7 +5383,7 @@ input.select2-input { border-right: none; } .select2-container--default .select2-selection--multiple { - border-bottom: solid 1px rgba(0,0,0,.2); + border-bottom: solid 1px var(--inputbordercolor); border-top: none; border-left: none; border-right: none; @@ -5347,6 +5476,9 @@ a span.select2-chosen .select2-results { max-height: 400px; } +.select2-results__option { + word-break: break-word; +} .select2-container.select2-container-disabled .select2-choice, .select2-container-multi.select2-container-disabled .select2-choices { background-color: var(--colorbackvmenu1); background-image: none; @@ -5401,7 +5533,7 @@ span#select2-boxbookmark-container, span#select2-boxcombo-container { /* To emulate select 2 style */ .select2-container-multi-dolibarr .select2-choices-dolibarr .select2-search-choice-dolibarr { - padding: 2px 5px 1px 5px; + padding: 3px 5px 2px 5px; margin: 0 0 2px 3px; position: relative; line-height: 13px; @@ -5457,7 +5589,8 @@ span.noborderoncategories a, li.noborderoncategories a { vertical-align: top; } span.noborderoncategories { - padding: 3px 5px 0px 5px; + padding: 4px 5px 0px 5px; + display: inline-block; } .categtextwhite, .treeview .categtextwhite.hover { color: #fff !important; @@ -6235,6 +6368,41 @@ div.tabsElem a.tab { } +/* ============================================================================== */ +/* CSS style for debugbar */ +/* ============================================================================== */ + +span.phpdebugbar-tooltip.phpdebugbar-tooltip-extra-wide, span.phpdebugbar-tooltip.phpdebugbar-tooltip-wide { + width: 250px !important; +} +.phpdebugbar-indicator span.phpdebugbar-tooltip { + opacity: .95 !important; +} +a.phpdebugbar-tab.phpdebugbar-active { + background-image: unset !important; +} +.phpdebugbar-indicator .fa { + font-family: "Font Awesome 5 Free"; + font-weight: 600; +} +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-warning:before, +div.phpdebugbar-widgets-messages li.phpdebugbar-widgets-list-item span.phpdebugbar-widgets-value.phpdebugbar-widgets-error:before, +div.phpdebugbar-widgets-exceptions a.phpdebugbar-widgets-editor-link:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-database:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-duration:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-memory:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-row-count:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-copy-clipboard:before, +div.phpdebugbar-widgets-sqlqueries span.phpdebugbar-widgets-stmt-id:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-render-time:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-memory:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-param-count:before, +div.phpdebugbar-widgets-templates span.phpdebugbar-widgets-type:before, +div.phpdebugbar-widgets-templates a.phpdebugbar-widgets-editor-link:before +{ + font-family: "Font Awesome 5 Free" !important; +} + /* ============================================================================== */ /* CSS style used for jFlot */ /* ============================================================================== */ @@ -6247,7 +6415,6 @@ div.tabsElem a.tab { } - /* ============================================================================== */ /* CSS style used for small screen */ /* ============================================================================== */ diff --git a/htdocs/theme/eldy/info-box.inc.php b/htdocs/theme/eldy/info-box.inc.php index e7c8d388aa0..0d3ee436bf4 100644 --- a/htdocs/theme/eldy/info-box.inc.php +++ b/htdocs/theme/eldy/info-box.inc.php @@ -17,14 +17,18 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> min-height: 90px; /* background: #fff; */ width: 100%; - box-shadow: 1px 1px 2px rgba(128, 128, 128, 0.2); + box-shadow: 1px 1px 15px rgba(192, 192, 192, 0.2); border-radius: 2px; border: 1px solid #e9e9e9; margin-bottom: 15px; } -.info-box.info-box-sm{ +.info-box.info-box-sm { min-height: 80px; margin-bottom: 10px; + background: #fff; +} +.opened-dash-board-wrap .info-box.info-box-sm { + border-radius: 0 0 0 20px; } .info-box-more { float: right; @@ -74,7 +78,12 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> text-align: center; font-size: 45px; line-height: 90px; - background: rgba(0, 0, 0, 0.08) !important + background: rgba(0, 0, 0, 0.08) !important; +} + +.info-box-module .info-box-icon { + padding-top: 5px; + padding-bottom: 5px; } .info-box-sm .info-box-icon { height: 80px; @@ -82,6 +91,9 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> font-size: 25px; line-height: 92px; } +.opened-dash-board-wrap .info-box-sm .info-box-icon { + border-radius: 0 20px 0 20px; +} .opened-dash-board-wrap .info-box-sm .info-box-icon { line-height: 80px; } @@ -167,15 +179,21 @@ a.info-box-text-a i.fa.fa-exclamation-triangle { padding: 5px 10px; margin-left: 84px; } - .info-box-sm .info-box-content{ margin-left: 80px; } -/*.info-box-setup span { - color: var(--colortexttitlenotab2); +.info-box-sm .info-box-module-enabled { + /* background: linear-gradient(0.35turn, #fff, #fff, #f6faf8, #e4efe8) */ + background: linear-gradient(0.4turn, #fff, #fff, #fff, #e4efe8); } -.tdsetuppicto span { - color: var(--colortexttitlenotab2); +.info-box-content-warning span.font-status4 { + color: #bc9526 !important; +} +/*.info-box-sm .info-box-content-warning { + background: #ffd7a3; +}*/ +/*.info-box-icon.info-box-icon-module-enabled { + background: #e4f0e4 !important; }*/ .info-box-number { @@ -213,6 +231,8 @@ a.info-box-text{ text-decoration: none;} + + /* ICONS INFO BOX */ global->THEME_SATURATE_RATIO = } +.customer-back { + background-color: #55955d !important; + color: #FFF !important; + padding: 2px; + margin: 2px; + border-radius: 3px; +} +.vendor-back { + background-color: #599caf !important; + color: #FFF !important; + padding: 2px; + margin: 2px; + border-radius: 3px; +} +.user-back { + background-color: #79633f !important; + color: #FFF !important; + padding: 2px; + margin: 2px; + border-radius: 3px; +} + + + .bg-infobox-project{ color: #6c6aa8 !important; } .bg-infobox-action{ - color: #a47080 !important; + color: #b06080 !important; } -.bg-infobox-propal, -.bg-infobox-facture, -.bg-infobox-commande{ - color: #99a17d !important; +.bg-infobox-propal, .bg-infobox-facture, .bg-infobox-commande { + color: #55955d !important; } -.bg-infobox-supplier_proposal, -.bg-infobox-invoice_supplier, -.bg-infobox-order_supplier{ +.bg-infobox-supplier_proposal, .bg-infobox-invoice_supplier, .bg-infobox-order_supplier { color: #599caf !important; } .bg-infobox-contrat, .bg-infobox-ticket{ - color: #46a676 !important; + color: #3bbfa8 !important; } .bg-infobox-bank_account{ - color: #b0a53e !important; + color: #b0bb39 !important; } .bg-infobox-adherent, .bg-infobox-member { color: #79633f !important; @@ -273,23 +313,23 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = color: #6c6aa8 !important; } .infobox-action{ - color: #a47080 !important; + color: #b06080 !important; } -.infobox-propal, -.infobox-facture, -.infobox-commande{ - color: #99a17d !important; +.infobox-propal:not(.pictotitle), +.infobox-facture:not(.pictotitle), +.infobox-commande:not(.pictotitle) { + color: #65955d !important; } -.infobox-supplier_proposal, -.infobox-invoice_supplier, -.infobox-order_supplier{ +.infobox-supplier_proposal:not(.pictotitle), +.infobox-invoice_supplier:not(.pictotitle), +.infobox-order_supplier:not(.pictotitle){ color: #599caf !important; } .infobox-contrat, .infobox-ticket{ - color: #46a676 !important; + color: #3bbfa8 !important; } .infobox-bank_account{ - color: #b0a53e !important; + color: #b0bb39 !important; } .infobox-adherent, .infobox-member { color: #79633f !important; @@ -346,23 +386,23 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = } .fa-weather-level0:before{ content: "\f185"; - color : #cccccc; + color : #cfbf00; } .fa-weather-level1:before{ content: "\f6c4"; - color : #cccccc; + color : #bc9526; } .fa-weather-level2:before{ - content: "\f0c2"; - color : #cccccc; + content: "\f743"; + color : #b16000; } .fa-weather-level3:before{ content: "\f740"; - color : #cccccc; + color : #b04000; } .fa-weather-level4:before{ content: "\f0e7"; - color : #b91f1f; + color : #b01000; } @@ -409,7 +449,7 @@ if (GETPOSTISSET('THEME_SATURATE_RATIO')) $conf->global->THEME_SATURATE_RATIO = .info-box-module .info-box-content { - height: 6.4em; + height: 98px; } /* Disabled. This break the responsive on smartphone .box{ diff --git a/htdocs/theme/eldy/main_menu_fa_icons.inc.php b/htdocs/theme/eldy/main_menu_fa_icons.inc.php index 2286f19e355..fbccc810fe7 100644 --- a/htdocs/theme/eldy/main_menu_fa_icons.inc.php +++ b/htdocs/theme/eldy/main_menu_fa_icons.inc.php @@ -16,6 +16,9 @@ color: #; } +.fa-15x { + font-size: 1.5em; +} div.mainmenu.menu { background-image: none; @@ -149,7 +152,7 @@ div.mainmenu.generic4::before { opacity: 0.7; color: #440; } -.fa-at, .fa-external-link-alt { +.fa-at, .fa-external-link-alt, .fa-share-alt { opacity: 0.7; color: #304; } diff --git a/htdocs/theme/eldy/manifest.json.php b/htdocs/theme/eldy/manifest.json.php index bc6262d1a92..d7f01b3375e 100644 --- a/htdocs/theme/eldy/manifest.json.php +++ b/htdocs/theme/eldy/manifest.json.php @@ -41,6 +41,8 @@ require_once __DIR__.'/../../main.inc.php'; $appli = constant('DOL_APPLICATION_TITLE'); if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli = $conf->global->MAIN_APPLICATION_TITLE; +top_httphead('text/json'); + ?> { "name": "", diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 526846f8a19..59aaf0ecc2c 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -31,8 +31,8 @@ if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1'); //if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1); if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1); -if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed by logon page so without login -//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content +if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed by logon page so without login. +//if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We load menu manager class (note that object loaded may have wrong content because NOLOGIN is set and some values depends on login) if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1); if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1'); @@ -55,6 +55,10 @@ if (empty($user->id) && !empty($_SESSION['dol_login'])) { $user->fetch('', $_SESSION['dol_login'], '', 1); $user->getrights(); + + // Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct. + $menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1); + $menumanager->loadMenu(); } @@ -66,6 +70,7 @@ else header('Cache-Control: no-cache'); if (GETPOST('theme', 'alpha')) $conf->theme = GETPOST('theme', 'alpha'); // If theme was forced on URL if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL +if (GETPOST('THEME_DARKMODEENABLED', 'int')) $conf->global->THEME_DARKMODEENABLED = GETPOST('THEME_DARKMODEENABLED', 'int'); // If darkmode was forced on URL $langs->load("main", 0, 1); $right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right'); @@ -154,24 +159,20 @@ else $colortextbackhmenu = '000000'; $colorbackvmenu1 = join(',', colorStringToArray($colorbackvmenu1)); // Normalize value to 'x,y,z' $tmppart = explode(',', $colorbackvmenu1); $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0); -if ($tmpval <= 460) { $colortextbackvmenu = 'FFFFFF'; } -else { $colortextbackvmenu = '000000'; } +if ($tmpval <= 460) { $colortextbackvmenu = 'FFFFFF'; } else { $colortextbackvmenu = '000000'; } $colorbacktitle1 = join(',', colorStringToArray($colorbacktitle1)); // Normalize value to 'x,y,z' $tmppart = explode(',', $colorbacktitle1); if ($colortexttitle == '') { $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0); - if ($tmpval <= 460) { $colortexttitle = 'FFFFFF'; $colorshadowtitle = '888888'; } - else { $colortexttitle = '000000'; $colorshadowtitle = 'FFFFFF'; } -} -else $colorshadowtitle = '888888'; + if ($tmpval <= 460) { $colortexttitle = 'FFFFFF'; $colorshadowtitle = '888888'; } else { $colortexttitle = '000000'; $colorshadowtitle = 'FFFFFF'; } +} else $colorshadowtitle = '888888'; $colorbacktabcard1 = join(',', colorStringToArray($colorbacktabcard1)); // Normalize value to 'x,y,z' $tmppart = explode(',', $colorbacktabcard1); $tmpval = (!empty($tmppart[0]) ? $tmppart[0] : 0) + (!empty($tmppart[1]) ? $tmppart[1] : 0) + (!empty($tmppart[2]) ? $tmppart[2] : 0); -if ($tmpval <= 460) { $colortextbacktab = 'FFFFFF'; } -else { $colortextbacktab = '000000'; } +if ($tmpval <= 460) { $colortextbacktab = 'FFFFFF'; } else { $colortextbacktab = '000000'; } // Format color value to match expected format (may be 'FFFFFF' or '255,255,255') @@ -193,6 +194,7 @@ $colortext = join(',', colorStringToArray($colortext)); $colortextlink = join(',', colorStringToArray($colortextlink)); $nbtopmenuentries = $menumanager->showmenu('topnb'); + if ($conf->browser->layout == 'phone') $nbtopmenuentries = max($nbtopmenuentries, 10); @@ -203,7 +205,7 @@ $disableimages = 0; $maxwidthloginblock = 180; if (!empty($conf->global->THEME_TOPMENU_DISABLE_IMAGE)) { $disableimages = 1; $maxwidthloginblock = $maxwidthloginblock + 50; $minwidthtmenu = 0; } - +if (!empty($conf->global->MAIN_USE_TOP_MENU_QUICKADD_DROPDOWN)) { $maxwidthloginblock = $maxwidthloginblock + 55; } if (!empty($conf->global->MAIN_USE_TOP_MENU_SEARCH_DROPDOWN)) { $maxwidthloginblock = $maxwidthloginblock + 55; } if (!empty($conf->bookmark->enabled)) { $maxwidthloginblock = $maxwidthloginblock + 55; } diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 18f0cbfa135..293dc6a2c39 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -40,9 +40,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) // File is run after an include of a php p if ($conf->global->MAIN_OPTIMIZEFORCOLORBLIND == 'flashy') { $theme_datacolor = array(array(157, 56, 191), array(0, 147, 183), array(250, 190, 30), array(221, 75, 57), array(0, 166, 90), array(140, 140, 220), array(190, 120, 120), array(190, 190, 100), array(115, 125, 150), array(100, 170, 20), array(150, 135, 125), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150)); - } - else - { + } else { // for now we use the same configuration for all types of color blind $theme_datacolor = array(array(248, 220, 1), array(9, 85, 187), array(42, 208, 255), array(0, 0, 0), array(169, 169, 169), array(253, 102, 136), array(120, 154, 190), array(146, 146, 55), array(0, 52, 251), array(196, 226, 161), array(222, 160, 41), array(85, 135, 150), array(150, 135, 80), array(150, 80, 150)); } @@ -67,13 +65,13 @@ $colorbacklinepairhover = '230,237,244'; // line hover $colorbacklinepairchecked = '230,237,244'; // line checked $colorbacklinebreak = '248,247,244'; // line break $colorbackbody = '255,255,255'; -$colortexttitlenotab = '0,123,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 +$colortexttitlenotab = '10,120,140'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 $colortexttitlenotab2 = '100,0,100'; // 150,90,121 140,80,10 or 10,140,80 #875a7b green=0,123,140, violet: 0,50,120 $colortexttitle = '0,0,0'; $colortexttitlelink = '10, 20, 100'; $colortext = '0,0,0'; $colortextlink = '10, 20, 100'; -$fontsize = '0.86em'; +$fontsize = '0.90em'; $fontsizesmaller = '0.75em'; $topMenuFontSize = '1.1em'; $toolTipBgColor = 'rgba(255, 255, 255, 0.96)'; @@ -89,11 +87,11 @@ $colorblind_deuteranopes_textWarning = $textWarning; // currently not tested wit // Badges colors $badgePrimary = '#007bff'; -$badgeSecondary = '#cccccc'; +$badgeSecondary = '#aaaabb'; +$badgeInfo = '#aaaabb'; $badgeSuccess = '#55a580'; $badgeWarning = '#bc9526'; // See $textWarning bc9526 $badgeDanger = '#9f4705'; // See $textDanger -$badgeInfo = '#aaaabb'; $badgeDark = '#343a40'; $badgeLight = '#f8f9fa'; diff --git a/htdocs/theme/md/badges.inc.php b/htdocs/theme/md/badges.inc.php index 22e9dee6917..1ce2d912669 100644 --- a/htdocs/theme/md/badges.inc.php +++ b/htdocs/theme/md/badges.inc.php @@ -26,6 +26,18 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> font-size: 1em; padding: .19em .35em; /* more than 0.19 generate a change into heigth of lines */ } +.tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status { + font-size: 1.1em; + padding: .4em .4em; +} +/* Force values for small screen 767 */ +@media only screen and (max-width: 767px) +{ + .tabBar .arearef .statusref .badge-status, .tabBar .arearefnobottom .statusref .badge-status { + font-size: 0.95em; + padding: .3em .2em; + } +} .badge-pill, .tabs .badge { padding-right: .5em; @@ -36,7 +48,7 @@ if (!defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> .badge-dot { padding: 0; border-radius: 50%; - padding: 0.35em; + padding: 0.45em; vertical-align: unset; } @@ -120,6 +132,17 @@ a.badge-warning:focus, a.badge-warning:hover { background-color: ; } +/* WARNING colorblind */ +body[class*="colorblind-"] .badge-warning { + background-color: ; + } +body[class*="colorblind-"] a.badge-warning.focus,body[class^="colorblind-"] a.badge-warning:focus { + box-shadow: 0 0 0 0.2rem ; +} +body[class*="colorblind-"] a.badge-warning:focus, a.badge-warning:hover { + background-color: ; +} + /* INFO */ .badge-info { color: #fff !important; @@ -163,10 +186,9 @@ a.badge-dark:focus, a.badge-dark:hover { } -/* - * STATUS BADGES - */ - /*